diff --git a/graphql.config.json b/graphql.config.json
new file mode 100644
index 0000000000..b1c1fd11ea
--- /dev/null
+++ b/graphql.config.json
@@ -0,0 +1,25 @@
+{
+ "schema": {
+ "request": {
+ "url" : "http://localhost:4200/graphql",
+ "method" : "POST",
+ "postIntrospectionQuery" : true,
+ "options" : {
+ "headers": {
+ "user-agent" : "JS GraphQL"
+ }
+ }
+ }
+ },
+ "endpoints" : [
+ {
+ "name": "Default",
+ "url": "http://localhost:4200/graphql",
+ "options" : {
+ "headers": {
+ "user-agent" : "JS GraphQL"
+ }
+ }
+ }
+ ]
+}
diff --git a/libs/feature-action-bar/src/lib/generated/graphql.ts b/libs/feature-action-bar/src/lib/generated/graphql.ts
index c9451827d1..0aa0bfb084 100644
--- a/libs/feature-action-bar/src/lib/generated/graphql.ts
+++ b/libs/feature-action-bar/src/lib/generated/graphql.ts
@@ -1,13 +1,19 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
-import { Injectable } from '@angular/core';
-
-import * as Apollo from 'apollo-angular';
-
-import gql from 'graphql-tag';
+// ====================================================
+// END: Typescript template
+// ====================================================
diff --git a/libs/feature-extensions/src/lib/generated/graphql.ts b/libs/feature-extensions/src/lib/generated/graphql.ts
index 1620670123..19218ee978 100644
--- a/libs/feature-extensions/src/lib/generated/graphql.ts
+++ b/libs/feature-extensions/src/lib/generated/graphql.ts
@@ -1,11 +1,27 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace NgAdd {
export type Variables = {
path: string;
@@ -14,11 +30,13 @@ export namespace NgAdd {
export type Mutation = {
__typename?: 'Mutation';
+
ngAdd?: NgAdd | null;
};
export type NgAdd = {
__typename?: 'CommandStarted';
+
id: string;
};
}
@@ -31,24 +49,31 @@ export namespace WorkspaceAndExtensionsByName {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
+
availableExtensions?: (AvailableExtensions | null)[] | null;
};
export type Workspace = {
__typename?: 'Workspace';
+
extensions?: (Extensions | null)[] | null;
};
export type Extensions = {
__typename?: 'Extension';
+
name: string;
};
export type AvailableExtensions = {
__typename?: 'Extension';
+
name: string;
+
description?: string | null;
+
detailedDescription?: string | null;
};
}
@@ -60,33 +85,47 @@ export namespace WorkspaceAndExtensions {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
+
availableExtensions?: (AvailableExtensions | null)[] | null;
};
export type Workspace = {
__typename?: 'Workspace';
+
extensions?: (Extensions | null)[] | null;
};
export type Extensions = {
__typename?: 'Extension';
+
name: string;
};
export type AvailableExtensions = {
__typename?: 'Extension';
+
name: string;
+
description?: string | null;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -142,3 +181,7 @@ export class WorkspaceAndExtensionsGQL extends Apollo.Query<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/feature-generate/src/lib/generated/graphql.ts b/libs/feature-generate/src/lib/generated/graphql.ts
index 4dc148f236..380b6859c1 100644
--- a/libs/feature-generate/src/lib/generated/graphql.ts
+++ b/libs/feature-generate/src/lib/generated/graphql.ts
@@ -1,11 +1,27 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace Generate {
export type Variables = {
path: string;
@@ -15,11 +31,13 @@ export namespace Generate {
export type Mutation = {
__typename?: 'Mutation';
+
generate?: Generate | null;
};
export type Generate = {
__typename?: 'CommandStarted';
+
id: string;
};
}
@@ -33,35 +51,49 @@ export namespace SchematicCollectionsByName {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
schematicCollections?: (SchematicCollections | null)[] | null;
};
export type SchematicCollections = {
__typename?: 'SchematicCollection';
+
schematics?: (Schematics | null)[] | null;
};
export type Schematics = {
__typename?: 'Schematic';
+
collection: string;
+
name: string;
+
description?: string | null;
+
schema?: (Schema | null)[] | null;
};
export type Schema = {
__typename?: 'SchematicSchema';
+
name: string;
+
enum?: (string | null)[] | null;
+
type: string;
+
description?: string | null;
+
defaultValue?: string | null;
+
required: boolean;
+
positional: boolean;
};
}
@@ -75,23 +107,29 @@ export namespace SchematicDocs {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
docs: Docs;
};
export type Docs = {
__typename?: 'Docs';
+
schematicDocs: SchematicDocs[];
};
export type SchematicDocs = {
__typename?: 'Doc';
+
id: string;
+
description?: string | null;
+
prop?: string | null;
};
}
@@ -103,34 +141,49 @@ export namespace SchematicCollections {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
schematicCollections?: (SchematicCollections | null)[] | null;
};
export type SchematicCollections = {
__typename?: 'SchematicCollection';
+
name: string;
+
schematics?: (Schematics | null)[] | null;
};
export type Schematics = {
__typename?: 'Schematic';
+
name: string;
+
description?: string | null;
+
collection: string;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -231,3 +284,7 @@ export class SchematicCollectionsGQL extends Apollo.Query<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/feature-install-node-js/src/lib/generated/graphql.ts b/libs/feature-install-node-js/src/lib/generated/graphql.ts
index 8695d44552..14368c0a02 100644
--- a/libs/feature-install-node-js/src/lib/generated/graphql.ts
+++ b/libs/feature-install-node-js/src/lib/generated/graphql.ts
@@ -1,25 +1,47 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace InstallNodeJsStatus {
export type Variables = {};
export type Query = {
__typename?: 'Query';
+
installNodeJsStatus?: InstallNodeJsStatus | null;
};
export type InstallNodeJsStatus = {
__typename?: 'InstallNodeJsStatus';
+
downloadPercentage?: number | null;
+
downloadSpeed?: number | null;
+
success?: boolean | null;
+
cancelled?: boolean | null;
+
error?: string | null;
};
}
@@ -29,11 +51,13 @@ export namespace InstallNodeJs {
export type Mutation = {
__typename?: 'Mutation';
+
installNodeJs?: InstallNodeJs | null;
};
export type InstallNodeJs = {
__typename?: 'InstallNodeJsStatus';
+
cancelled?: boolean | null;
};
}
@@ -43,21 +67,31 @@ export namespace IsNodejsInstalled {
export type Query = {
__typename?: 'Query';
+
isNodejsInstalled?: IsNodejsInstalled | null;
};
export type IsNodejsInstalled = {
__typename?: 'IsNodeInstalledResult';
+
result: boolean;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -107,3 +141,7 @@ export class IsNodejsInstalledGQL extends Apollo.Query<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/feature-run/src/lib/generated/graphql.ts b/libs/feature-run/src/lib/generated/graphql.ts
index e94ef04c9c..a6c7e528b8 100644
--- a/libs/feature-run/src/lib/generated/graphql.ts
+++ b/libs/feature-run/src/lib/generated/graphql.ts
@@ -1,11 +1,27 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace NpmRun {
export type Variables = {
path: string;
@@ -15,11 +31,13 @@ export namespace NpmRun {
export type Mutation = {
__typename?: 'Mutation';
+
runNpm?: RunNpm | null;
};
export type RunNpm = {
__typename?: 'CommandStarted';
+
id: string;
};
}
@@ -32,29 +50,41 @@ export namespace NpmScripts {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
npmScripts?: (NpmScripts | null)[] | null;
};
export type NpmScripts = {
__typename?: 'NpmScript';
+
name: string;
+
npmClient: string;
+
schema?: (Schema | null)[] | null;
};
export type Schema = {
__typename?: 'ArchitectSchema';
+
name: string;
+
enum?: (string | null)[] | null;
+
type: string;
+
description?: string | null;
+
defaultValue?: string | null;
+
required: boolean;
+
positional: boolean;
};
}
@@ -68,43 +98,61 @@ export namespace Projects {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
projects?: (Projects | null)[] | null;
};
export type Projects = {
__typename?: 'Project';
+
name: string;
+
root: string;
+
projectType: string;
+
architect?: (Architect | null)[] | null;
};
export type Architect = {
__typename?: 'Architect';
+
name: string;
+
builder: string;
+
configurations?: (Configurations | null)[] | null;
+
schema?: (Schema | null)[] | null;
};
export type Configurations = {
__typename?: 'ArchitectConfigurations';
+
name: string;
};
export type Schema = {
__typename?: 'ArchitectSchema';
+
name: string;
+
enum?: (string | null)[] | null;
+
type: string;
+
description?: string | null;
+
defaultValue?: string | null;
+
required: boolean;
+
positional: boolean;
};
}
@@ -117,11 +165,13 @@ export namespace RunNg {
export type Mutation = {
__typename?: 'Mutation';
+
runNg?: RunNg | null;
};
export type RunNg = {
__typename?: 'CommandStarted';
+
id: string;
};
}
@@ -135,23 +185,29 @@ export namespace SchematicDocs {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
docs: Docs;
};
export type Docs = {
__typename?: 'Docs';
+
schematicDocs: SchematicDocs[];
};
export type SchematicDocs = {
__typename?: 'Doc';
+
id: string;
+
description?: string | null;
+
prop?: string | null;
};
}
@@ -163,41 +219,59 @@ export namespace WorkspaceAndProjects {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
npmScripts?: (NpmScripts | null)[] | null;
+
projects?: (Projects | null)[] | null;
};
export type NpmScripts = {
__typename?: 'NpmScript';
+
name: string;
};
export type Projects = {
__typename?: 'Project';
+
name: string;
+
root: string;
+
projectType: string;
+
architect?: (Architect | null)[] | null;
};
export type Architect = {
__typename?: 'Architect';
+
name: string;
+
project: string;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -342,3 +416,7 @@ export class WorkspaceAndProjectsGQL extends Apollo.Query<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/feature-settings/src/lib/feature-settings.module.ts b/libs/feature-settings/src/lib/feature-settings.module.ts
index 5a59474d64..62f570a4f1 100644
--- a/libs/feature-settings/src/lib/feature-settings.module.ts
+++ b/libs/feature-settings/src/lib/feature-settings.module.ts
@@ -7,7 +7,8 @@ import {
MatFormFieldModule,
MatSlideToggleModule,
MatListModule,
- MatInputModule
+ MatInputModule,
+ MatSelectModule
} from '@angular/material';
import { SettingsComponent } from './settings/settings.component';
@@ -17,6 +18,7 @@ export const settingsRoutes: Route[] = [
component: SettingsComponent
}
];
+
@NgModule({
imports: [
CommonModule,
@@ -24,6 +26,7 @@ export const settingsRoutes: Route[] = [
MatSlideToggleModule,
MatInputModule,
MatListModule,
+ MatSelectModule,
MatFormFieldModule,
ReactiveFormsModule
],
diff --git a/libs/feature-settings/src/lib/generated/graphql.ts b/libs/feature-settings/src/lib/generated/graphql.ts
index c9451827d1..0aa0bfb084 100644
--- a/libs/feature-settings/src/lib/generated/graphql.ts
+++ b/libs/feature-settings/src/lib/generated/graphql.ts
@@ -1,13 +1,19 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
-import { Injectable } from '@angular/core';
-
-import * as Apollo from 'apollo-angular';
-
-import gql from 'graphql-tag';
+// ====================================================
+// END: Typescript template
+// ====================================================
diff --git a/libs/feature-settings/src/lib/settings/settings.component.html b/libs/feature-settings/src/lib/settings/settings.component.html
index d130b3a473..ab18a66329 100644
--- a/libs/feature-settings/src/lib/settings/settings.component.html
+++ b/libs/feature-settings/src/lib/settings/settings.component.html
@@ -14,6 +14,26 @@
Send anonymous usage data
[checked]="canCollectionData()"
>
+
+
+
Auto Update Channel
+
+ Try new features before everyone else by switching to the beta and
+ alpha channels.
+
+
+
+
+
+ Latest
+ Beta
+ Alpha
+
+
+
Features
diff --git a/libs/feature-settings/src/lib/settings/settings.component.ts b/libs/feature-settings/src/lib/settings/settings.component.ts
index 837892dbbf..13a3402e9a 100644
--- a/libs/feature-settings/src/lib/settings/settings.component.ts
+++ b/libs/feature-settings/src/lib/settings/settings.component.ts
@@ -34,4 +34,12 @@ export class SettingsComponent implements OnInit {
toggleDetailedStatus(x: boolean) {
this.settingsService.setEnableDetailedStatus(x);
}
+
+ setChannel(channel: 'latest' | 'beta' | 'alpha') {
+ this.settingsService.setChannel(channel);
+ }
+
+ getChannel() {
+ return this.settingsService.getChannel();
+ }
}
diff --git a/libs/feature-workspaces/src/lib/generated/graphql.ts b/libs/feature-workspaces/src/lib/generated/graphql.ts
index 26e4c1b924..5d3c700833 100644
--- a/libs/feature-workspaces/src/lib/generated/graphql.ts
+++ b/libs/feature-workspaces/src/lib/generated/graphql.ts
@@ -1,11 +1,27 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace BasicWorkspace {
export type Variables = {
path: string;
@@ -13,12 +29,15 @@ export namespace BasicWorkspace {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
path: string;
+
name: string;
};
}
@@ -32,12 +51,15 @@ export namespace GetDirectoryPath {
export type Mutation = {
__typename?: 'Mutation';
+
selectDirectory?: SelectDirectory | null;
};
export type SelectDirectory = {
__typename?: 'SelectDirectoryResult';
+
selectedDirectoryPath?: string | null;
+
error?: string | null;
};
}
@@ -51,11 +73,13 @@ export namespace NgNew {
export type Mutation = {
__typename?: 'Mutation';
+
ngNew?: NgNew | null;
};
export type NgNew = {
__typename?: 'CommandStarted';
+
id: string;
};
}
@@ -67,11 +91,13 @@ export namespace OpenWorkspace {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
name: string;
};
}
@@ -81,12 +107,15 @@ export namespace SchematicCollections {
export type Query = {
__typename?: 'Query';
+
schematicCollections?: (SchematicCollections | null)[] | null;
};
export type SchematicCollections = {
__typename?: 'SchematicCollectionForNgNew';
+
name: string;
+
description: string;
};
}
@@ -98,23 +127,29 @@ export namespace WorkspaceDocs {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
docs: Docs;
};
export type Docs = {
__typename?: 'Docs';
+
workspaceDocs: WorkspaceDocs[];
};
export type WorkspaceDocs = {
__typename?: 'Doc';
+
id: string;
+
description?: string | null;
+
prop?: string | null;
};
}
@@ -126,43 +161,63 @@ export namespace Workspace {
export type Query = {
__typename?: 'Query';
+
workspace: Workspace;
};
export type Workspace = {
__typename?: 'Workspace';
+
name: string;
+
path: string;
+
dependencies?: (Dependencies | null)[] | null;
+
projects?: (Projects | null)[] | null;
};
export type Dependencies = {
__typename?: 'Dependencies';
+
name: string;
+
version: string;
};
export type Projects = {
__typename?: 'Project';
+
name: string;
+
root: string;
+
projectType: string;
+
architect?: (Architect | null)[] | null;
};
export type Architect = {
__typename?: 'Architect';
+
name: string;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -295,3 +350,7 @@ export class WorkspaceGQL extends Apollo.Query<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/schema/src/lib/generated/graphql.ts b/libs/schema/src/lib/generated/graphql.ts
index c9451827d1..0aa0bfb084 100644
--- a/libs/schema/src/lib/generated/graphql.ts
+++ b/libs/schema/src/lib/generated/graphql.ts
@@ -1,13 +1,19 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
-import { Injectable } from '@angular/core';
-
-import * as Apollo from 'apollo-angular';
-
-import gql from 'graphql-tag';
+// ====================================================
+// END: Typescript template
+// ====================================================
diff --git a/libs/ui/src/lib/generated/graphql.ts b/libs/ui/src/lib/generated/graphql.ts
index c9451827d1..0aa0bfb084 100644
--- a/libs/ui/src/lib/generated/graphql.ts
+++ b/libs/ui/src/lib/generated/graphql.ts
@@ -1,13 +1,19 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
-import { Injectable } from '@angular/core';
-
-import * as Apollo from 'apollo-angular';
-
-import gql from 'graphql-tag';
+// ====================================================
+// END: Typescript template
+// ====================================================
diff --git a/libs/ui/src/lib/ui.module.ts b/libs/ui/src/lib/ui.module.ts
index e9e51d5471..79f84fe3d8 100644
--- a/libs/ui/src/lib/ui.module.ts
+++ b/libs/ui/src/lib/ui.module.ts
@@ -47,50 +47,30 @@ import { HttpClientModule } from '@angular/common/http';
const IMPORTS = [
HttpClientModule,
CdkTreeModule,
- CdkTreeModule,
CommonModule,
FlexLayoutModule,
MatAutocompleteModule,
- MatAutocompleteModule,
MatBadgeModule,
MatButtonModule,
- MatButtonModule,
MatCardModule,
- MatCardModule,
- MatDividerModule,
MatDividerModule,
MatExpansionModule,
- MatExpansionModule,
- MatIconModule,
MatIconModule,
MatInputModule,
- MatInputModule,
- MatListModule,
MatListModule,
MatMenuModule,
MatOptionModule,
- MatOptionModule,
MatProgressBarModule,
MatProgressSpinnerModule,
- MatProgressSpinnerModule,
- MatRadioModule,
MatRadioModule,
MatRippleModule,
- MatRippleModule,
MatSelectModule,
- MatSelectModule,
- MatSidenavModule,
MatSidenavModule,
MatSlideToggleModule,
- MatSlideToggleModule,
MatStepperModule,
MatTabsModule,
- MatTabsModule,
- MatToolbarModule,
MatToolbarModule,
MatTooltipModule,
- MatTooltipModule,
- MatTreeModule,
MatTreeModule,
ReactiveFormsModule,
RouterModule
diff --git a/libs/utils/src/lib/generated/graphql.ts b/libs/utils/src/lib/generated/graphql.ts
index 1cb538beae..80bfb98421 100644
--- a/libs/utils/src/lib/generated/graphql.ts
+++ b/libs/utils/src/lib/generated/graphql.ts
@@ -1,11 +1,27 @@
/* tslint:disable */
+// ====================================================
+// START: Typescript template
+// ====================================================
+
+// ====================================================
+// Enums
+// ====================================================
+
export enum FileType {
file = 'file',
directory = 'directory',
angularDirectory = 'angularDirectory'
}
+// ====================================================
+// END: Typescript template
+// ====================================================
+
+// ====================================================
+// Documents
+// ====================================================
+
export namespace Commands {
export type Variables = {
id?: string | null;
@@ -13,14 +29,19 @@ export namespace Commands {
export type Query = {
__typename?: 'Query';
+
commands?: (Commands | null)[] | null;
};
export type Commands = {
__typename?: 'CommandResponse';
+
command: string;
+
status: string;
+
outChunk: string;
+
detailedStatus?: string | null;
};
}
@@ -30,12 +51,15 @@ export namespace Editors {
export type Query = {
__typename?: 'Query';
+
editors: Editors[];
};
export type Editors = {
__typename?: 'EditorSupport';
+
name: string;
+
icon: string;
};
}
@@ -47,17 +71,25 @@ export namespace GetCommandInitial {
export type Query = {
__typename?: 'Query';
+
commands?: (Commands | null)[] | null;
};
export type Commands = {
__typename?: 'CommandResponse';
+
id: string;
+
type: string;
+
workspace?: string | null;
+
command: string;
+
status: string;
+
out: string;
+
detailedStatus?: string | null;
};
}
@@ -69,17 +101,25 @@ export namespace GetCommand {
export type Query = {
__typename?: 'Query';
+
commands?: (Commands | null)[] | null;
};
export type Commands = {
__typename?: 'CommandResponse';
+
id: string;
+
type: string;
+
workspace?: string | null;
+
command: string;
+
status: string;
+
outChunk: string;
+
detailedStatus?: string | null;
};
}
@@ -89,11 +129,13 @@ export namespace IsNodejsInstalled {
export type Query = {
__typename?: 'Query';
+
isNodejsInstalled?: IsNodejsInstalled | null;
};
export type IsNodejsInstalled = {
__typename?: 'IsNodeInstalledResult';
+
result: boolean;
};
}
@@ -103,15 +145,21 @@ export namespace ListAllCommands {
export type Query = {
__typename?: 'Query';
+
commands?: (Commands | null)[] | null;
};
export type Commands = {
__typename?: 'CommandResponse';
+
id: string;
+
type: string;
+
status: string;
+
workspace?: string | null;
+
command: string;
};
}
@@ -124,19 +172,25 @@ export namespace ListFiles {
export type Query = {
__typename?: 'Query';
+
directory: Directory;
};
export type Directory = {
__typename?: 'FilesType';
+
path: string;
+
exists: boolean;
+
files?: (Files | null)[] | null;
};
export type Files = {
__typename?: 'FileListType';
+
name: string;
+
type: FileType;
};
}
@@ -148,11 +202,13 @@ export namespace OpenDoc {
export type Mutation = {
__typename?: 'Mutation';
+
openDoc?: OpenDoc | null;
};
export type OpenDoc = {
__typename?: 'OpenDocResult';
+
result: boolean;
};
}
@@ -164,11 +220,13 @@ export namespace OpenInBrowser {
export type Mutation = {
__typename?: 'Mutation';
+
openInBrowser?: OpenInBrowser | null;
};
export type OpenInBrowser = {
__typename?: 'OpenInBrowserResult';
+
result: boolean;
};
}
@@ -181,11 +239,13 @@ export namespace OpenInEditor {
export type Mutation = {
__typename?: 'Mutation';
+
openInEditor?: OpenInEditor | null;
};
export type OpenInEditor = {
__typename?: 'OpenInEditor';
+
response: string;
};
}
@@ -195,11 +255,13 @@ export namespace RemoveAllCommands {
export type Mutation = {
__typename?: 'Mutation';
+
removeAllCommands?: RemoveAllCommands | null;
};
export type RemoveAllCommands = {
__typename?: 'RemoveResult';
+
result?: boolean | null;
};
}
@@ -211,11 +273,13 @@ export namespace RemoveCommand {
export type Mutation = {
__typename?: 'Mutation';
+
removeCommand?: RemoveCommand | null;
};
export type RemoveCommand = {
__typename?: 'RemoveResult';
+
result?: boolean | null;
};
}
@@ -227,11 +291,13 @@ export namespace RestartCommand {
export type Mutation = {
__typename?: 'Mutation';
+
restartCommand?: RestartCommand | null;
};
export type RestartCommand = {
__typename?: 'RemoveResult';
+
result?: boolean | null;
};
}
@@ -241,21 +307,31 @@ export namespace Settings {
export type Query = {
__typename?: 'Query';
+
settings: Settings;
};
export type Settings = {
__typename?: 'Settings';
+
canCollectData: boolean;
+
installNodeManually?: boolean | null;
+
enableDetailedStatus?: boolean | null;
+
+ channel?: string | null;
+
recent?: (Recent | null)[] | null;
};
export type Recent = {
__typename?: 'WorkspaceDefinition';
+
path: string;
+
name: string;
+
favorite?: boolean | null;
};
}
@@ -267,11 +343,13 @@ export namespace ShowItemInFolder {
export type Mutation = {
__typename?: 'Mutation';
+
showItemInFolder?: ShowItemInFolder | null;
};
export type ShowItemInFolder = {
__typename?: 'ShowItemInFolderResult';
+
result: boolean;
};
}
@@ -283,11 +361,13 @@ export namespace StopCommand {
export type Mutation = {
__typename?: 'Mutation';
+
stopCommand?: StopCommand | null;
};
export type StopCommand = {
__typename?: 'StopResult';
+
result?: boolean | null;
};
}
@@ -299,31 +379,49 @@ export namespace UpdateSettings {
export type Mutation = {
__typename?: 'Mutation';
+
updateSettings: UpdateSettings;
};
export type UpdateSettings = {
__typename?: 'Settings';
+
canCollectData: boolean;
+
installNodeManually?: boolean | null;
+
enableDetailedStatus?: boolean | null;
+
+ channel?: string | null;
+
recent?: (Recent | null)[] | null;
};
export type Recent = {
__typename?: 'WorkspaceDefinition';
+
path: string;
+
name: string;
+
favorite?: boolean | null;
};
}
+// ====================================================
+// START: Apollo Angular template
+// ====================================================
+
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
import gql from 'graphql-tag';
+// ====================================================
+// Apollo Services
+// ====================================================
+
@Injectable({
providedIn: 'root'
})
@@ -554,6 +652,7 @@ export class SettingsGQL extends Apollo.Query<
canCollectData
installNodeManually
enableDetailedStatus
+ channel
recent {
path
name
@@ -606,6 +705,7 @@ export class UpdateSettingsGQL extends Apollo.Mutation<
canCollectData
installNodeManually
enableDetailedStatus
+ channel
recent {
path
name
@@ -615,3 +715,7 @@ export class UpdateSettingsGQL extends Apollo.Mutation<
}
`;
}
+
+// ====================================================
+// END: Apollo Angular template
+// ====================================================
diff --git a/libs/utils/src/lib/graphql/settings.graphql b/libs/utils/src/lib/graphql/settings.graphql
index ac83a1e75a..273c6e1e2a 100644
--- a/libs/utils/src/lib/graphql/settings.graphql
+++ b/libs/utils/src/lib/graphql/settings.graphql
@@ -3,6 +3,7 @@ query Settings {
canCollectData
installNodeManually
enableDetailedStatus
+ channel
recent {
path
name
diff --git a/libs/utils/src/lib/graphql/update-settings.graphql b/libs/utils/src/lib/graphql/update-settings.graphql
index 101a46e833..f97ffaae4e 100644
--- a/libs/utils/src/lib/graphql/update-settings.graphql
+++ b/libs/utils/src/lib/graphql/update-settings.graphql
@@ -3,6 +3,7 @@ mutation UpdateSettings($data: String!) {
canCollectData
installNodeManually
enableDetailedStatus
+ channel
recent {
path
name
diff --git a/libs/utils/src/lib/settings.service.ts b/libs/utils/src/lib/settings.service.ts
index ba11843588..bb6a100787 100644
--- a/libs/utils/src/lib/settings.service.ts
+++ b/libs/utils/src/lib/settings.service.ts
@@ -13,6 +13,7 @@ interface SettingsData {
readonly canCollectData: boolean;
readonly installNodeManually: boolean;
readonly enableDetailedStatus: boolean;
+ readonly channel: 'latest' | 'beta' | 'alpha';
}
@Injectable({
@@ -23,7 +24,8 @@ export class Settings {
recent: [],
canCollectData: false,
installNodeManually: false,
- enableDetailedStatus: true
+ enableDetailedStatus: true,
+ channel: 'latest'
};
constructor(
@@ -73,6 +75,10 @@ export class Settings {
return this.settings.enableDetailedStatus;
}
+ getChannel() {
+ return this.settings.channel;
+ }
+
showConnectPlugin(): boolean {
return true;
}
@@ -93,6 +99,10 @@ export class Settings {
this.store({ ...this.settings, enableDetailedStatus });
}
+ setChannel(channel: 'latest' | 'beta' | 'alpha'): void {
+ this.store({ ...this.settings, channel });
+ }
+
fetch() {
return this.settingsGQL.fetch().pipe(
first(),
diff --git a/package.json b/package.json
index fdc1633ebc..dc1e61f211 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,7 @@
}
],
"removePackageScripts": false,
+ "generateUpdatesFilesForAllChannels": true,
"directories": {
"app": "dist/server",
"buildResources": "dist/server/assets/icons/build",
diff --git a/server/src/api/read-settings.ts b/server/src/api/read-settings.ts
index 2165a2e903..74b3d79a01 100644
--- a/server/src/api/read-settings.ts
+++ b/server/src/api/read-settings.ts
@@ -17,6 +17,9 @@ export function readSettings() {
if (settings.enableDetailedStatus === undefined) {
settings.enableDetailedStatus = true;
}
+ if (settings.channel === undefined) {
+ settings.channel = 'latest';
+ }
return settings;
}
diff --git a/server/src/graphql-types.ts b/server/src/graphql-types.ts
index 39e772c549..badfe7f6a0 100644
--- a/server/src/graphql-types.ts
+++ b/server/src/graphql-types.ts
@@ -45,6 +45,7 @@ export interface Settings {
showSupportPlugin?: boolean | null;
installNodeManually?: boolean | null;
enableDetailedStatus?: boolean | null;
+ channel?: string | null;
recent?: (WorkspaceDefinition | null)[] | null;
}
@@ -469,6 +470,7 @@ export namespace SettingsResolvers {
any,
Context
>;
+ channel?: ChannelResolver;
recent?: RecentResolver<
(WorkspaceDefinition | null)[] | null,
any,
@@ -496,6 +498,11 @@ export namespace SettingsResolvers {
Parent = any,
Context = any
> = Resolver;
+ export type ChannelResolver<
+ R = string | null,
+ Parent = any,
+ Context = any
+ > = Resolver;
export type RecentResolver<
R = (WorkspaceDefinition | null)[] | null,
Parent = any,
diff --git a/server/src/index.ts b/server/src/index.ts
index fe0d41afa3..85e57fd241 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -8,6 +8,7 @@ import { autoUpdater } from 'electron-updater';
import { telemetry } from './telemetry';
import { ipcMain } from 'electron';
+import { readSettings, storeSettings } from './api/read-settings';
const fixPath = require('fix-path');
const getPort = require('get-port');
@@ -203,6 +204,7 @@ function showRestartDialog() {
function checkForUpdates() {
setTimeout(async () => {
+ autoUpdater.channel = getUpdateChannel();
if (process.env.NODE_ENV !== 'development') {
try {
const r = await autoUpdater.checkForUpdates();
@@ -225,6 +227,20 @@ function checkForUpdates() {
}, 0);
}
+function getUpdateChannel() {
+ const settings = readSettings();
+ const token = store.get('access_token');
+ if (settings.channel === undefined) {
+ const channel = token ? 'beta' : 'latest';
+ storeSettings({ ...settings, channel });
+ return channel;
+ } else if (token && settings.channel === 'latest') {
+ return 'beta';
+ } else {
+ return settings.channel;
+ }
+}
+
function startSession() {
telemetry.reportLifecycleEvent('StartSession');
}
diff --git a/server/src/schema/type-defs.ts b/server/src/schema/type-defs.ts
index 89cd378d2b..ad0923a1ba 100644
--- a/server/src/schema/type-defs.ts
+++ b/server/src/schema/type-defs.ts
@@ -1,11 +1,6 @@
import { gql } from 'apollo-server-express';
export const typeDefs = gql`
- schema {
- query: Database
- mutation: Mutation
- }
-
type Architect {
name: String!
project: String!
@@ -227,6 +222,7 @@ export const typeDefs = gql`
showSupportPlugin: Boolean
installNodeManually: Boolean
enableDetailedStatus: Boolean
+ channel: String
recent: [WorkspaceDefinition]
}
@@ -256,4 +252,9 @@ export const typeDefs = gql`
description: String
id: String!
}
+
+ schema {
+ query: Database
+ mutation: Mutation
+ }
`;