@forge/cli-shared 6.7.1-next.2-experimental-611b366 → 6.8.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -5
- package/out/apps/create-an-app.d.ts +6 -2
- package/out/apps/create-an-app.d.ts.map +1 -1
- package/out/apps/create-an-app.js +20 -3
- package/out/apps/register-app.d.ts +2 -1
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +9 -2
- package/out/graphql/graphql-types.d.ts +930 -21
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +102 -26
- package/out/shared/test.d.ts +2 -1
- package/out/shared/test.d.ts.map +1 -1
- package/out/shared/test.js +6 -1
- package/out/ui/command-line-ui.d.ts +5 -0
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +13 -0
- package/out/ui/text.d.ts +1 -52
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +32 -49
- package/out/ui/ui.d.ts +5 -0
- package/out/ui/ui.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,71 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
-
## 6.
|
|
3
|
+
## 6.8.0-next.11
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- @forge/manifest@8.9.0-next.
|
|
7
|
+
- 336f74f: Support serving i18n resources while using `forge tunnel`
|
|
8
|
+
- Updated dependencies [336f74f]
|
|
9
|
+
- @forge/i18n@0.0.5-next.0
|
|
10
|
+
- @forge/manifest@8.9.0-next.6
|
|
11
|
+
|
|
12
|
+
## 6.8.0-next.10
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [de0bf46]
|
|
17
|
+
- @forge/manifest@8.9.0-next.5
|
|
18
|
+
|
|
19
|
+
## 6.8.0-next.9
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [acf1edf]
|
|
24
|
+
- Updated dependencies [3a703de]
|
|
25
|
+
- @forge/manifest@8.9.0-next.4
|
|
26
|
+
|
|
27
|
+
## 6.8.0-next.8
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 0aad197: Change product wording to context
|
|
32
|
+
|
|
33
|
+
## 6.8.0-next.7
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 9d231e9: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
|
|
38
|
+
- b503084: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
|
|
39
|
+
- Updated dependencies [9d231e9]
|
|
40
|
+
- Updated dependencies [b503084]
|
|
41
|
+
- @forge/manifest@8.9.0-next.3
|
|
42
|
+
|
|
43
|
+
## 6.8.0-next.6
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- a7db2e6: improve error message
|
|
48
|
+
- Updated dependencies [003b1ed]
|
|
49
|
+
- @forge/manifest@8.9.0-next.2
|
|
50
|
+
|
|
51
|
+
## 6.8.0-next.5
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- 210360b: Refactor text functions for easier read and maintenance
|
|
56
|
+
|
|
57
|
+
## 6.8.0-next.4
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [64daaa5]
|
|
62
|
+
- @forge/manifest@8.9.0-next.1
|
|
63
|
+
|
|
64
|
+
## 6.8.0-next.3
|
|
65
|
+
|
|
66
|
+
### Minor Changes
|
|
67
|
+
|
|
68
|
+
- d156658: Switch the `forge create` flow to select product context first
|
|
11
69
|
|
|
12
70
|
## 6.7.1-next.2
|
|
13
71
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CreateAppClientInput, RegisterAppCommand, RegisterAppResult } from './register-app';
|
|
2
2
|
import { Templater } from './template';
|
|
3
3
|
import { PackageInstaller } from './package-installer';
|
|
4
|
+
import { StatsigService } from '../service';
|
|
4
5
|
export interface CreateAppCommandInput extends CreateAppClientInput {
|
|
5
6
|
template: string;
|
|
6
7
|
directory: string;
|
|
8
|
+
requiredProduct?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare class NoTemplatesError extends Error {
|
|
9
11
|
constructor();
|
|
@@ -17,8 +19,10 @@ export declare class CreateAppCommand {
|
|
|
17
19
|
private readonly templater;
|
|
18
20
|
private readonly registerAppCommand;
|
|
19
21
|
private readonly packageInstaller;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
private readonly statsig;
|
|
23
|
+
constructor(templater: Templater, registerAppCommand: RegisterAppCommand, packageInstaller: PackageInstaller, statsig: StatsigService);
|
|
24
|
+
execute({ name, description, template, directory, requiredProduct }: CreateAppCommandInput): Promise<CreateAppCommandResult>;
|
|
22
25
|
getAvailableTemplates(): Promise<string[]>;
|
|
26
|
+
filterAvailableProducts<T extends string>(products: T[], teamworkGraph: T, crossContext: T): Promise<T[]>;
|
|
23
27
|
}
|
|
24
28
|
//# sourceMappingURL=create-an-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-an-app.d.ts","sourceRoot":"","sources":["../../src/apps/create-an-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-an-app.d.ts","sourceRoot":"","sources":["../../src/apps/create-an-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,kBA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15
|
-
|
|
15
|
+
statsig;
|
|
16
|
+
constructor(templater, registerAppCommand, packageInstaller, statsig) {
|
|
16
17
|
this.templater = templater;
|
|
17
18
|
this.registerAppCommand = registerAppCommand;
|
|
18
19
|
this.packageInstaller = packageInstaller;
|
|
20
|
+
this.statsig = statsig;
|
|
19
21
|
}
|
|
20
|
-
async execute({ name, description, template, directory }) {
|
|
22
|
+
async execute({ name, description, template, directory, requiredProduct }) {
|
|
21
23
|
await this.templater.downloadAndExtract(template, directory);
|
|
22
24
|
const result = await this.registerAppCommand.registerApp({ name, description }, directory, {
|
|
23
|
-
shouldPrependAppName: true
|
|
25
|
+
shouldPrependAppName: true,
|
|
26
|
+
requiredProduct
|
|
24
27
|
});
|
|
25
28
|
await this.packageInstaller.install(directory);
|
|
26
29
|
return {
|
|
@@ -35,5 +38,19 @@ class CreateAppCommand {
|
|
|
35
38
|
}
|
|
36
39
|
return availableTemplates;
|
|
37
40
|
}
|
|
41
|
+
async filterAvailableProducts(products, teamworkGraph, crossContext) {
|
|
42
|
+
const useTeamworkGraph = await this.statsig.isTeamworkGraphProductSupported();
|
|
43
|
+
const useCrossProduct = await this.statsig.enableCrossProductAppInstallation();
|
|
44
|
+
return products.filter((product) => {
|
|
45
|
+
switch (product) {
|
|
46
|
+
case teamworkGraph:
|
|
47
|
+
return useTeamworkGraph;
|
|
48
|
+
case crossContext:
|
|
49
|
+
return useCrossProduct;
|
|
50
|
+
default:
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
38
55
|
}
|
|
39
56
|
exports.CreateAppCommand = CreateAppCommand;
|
|
@@ -31,8 +31,9 @@ export declare class RegisterAppCommand {
|
|
|
31
31
|
execute(input: CreateAppClientInput, { shouldPrependAppName }?: {
|
|
32
32
|
shouldPrependAppName?: boolean | undefined;
|
|
33
33
|
}): Promise<RegisterAppResult>;
|
|
34
|
-
registerApp(input: CreateAppClientInput, directory: string, { shouldPrependAppName }: {
|
|
34
|
+
registerApp(input: CreateAppClientInput, directory: string, { shouldPrependAppName, requiredProduct }: {
|
|
35
35
|
shouldPrependAppName: boolean;
|
|
36
|
+
requiredProduct?: string;
|
|
36
37
|
}): Promise<CreateAppResult>;
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=register-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../src/apps/register-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,mBAAmB,EAAqB,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAExH,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACL;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAClE;AAED,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAJV,SAAS,EAAE,eAAe,EAC1B,eAAe,EAAE,mB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CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAJV,SAAS,EAAE,eAAe,EAC1B,eAAe,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,EACxD,eAAe,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAChD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU;IAG5B,OAAO,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAAE,oBAA4B,EAAE;;KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQvG,WAAW,CACtB,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,MAAM,EACjB,EAAE,oBAAoB,EAAE,eAAe,EAAE,EAAE;QAAE,oBAAoB,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,GACrG,OAAO,CAAC,eAAe,CAAC;CAuC5B"}
|
package/out/apps/register-app.js
CHANGED
|
@@ -24,7 +24,7 @@ class RegisterAppCommand {
|
|
|
24
24
|
environments: result.environments.map((env) => env.key)
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
async registerApp(input, directory, { shouldPrependAppName }) {
|
|
27
|
+
async registerApp(input, directory, { shouldPrependAppName, requiredProduct }) {
|
|
28
28
|
this.logger.info(ui_1.Text.create.taskRegister);
|
|
29
29
|
const result = await this.appClient.createApp(input);
|
|
30
30
|
await (0, file_system_1.inDirectory)(directory, async () => {
|
|
@@ -37,7 +37,14 @@ class RegisterAppCommand {
|
|
|
37
37
|
}
|
|
38
38
|
const section = await this.appConfigReader.readConfigSection();
|
|
39
39
|
let newAppDetails = {
|
|
40
|
-
id: result.id
|
|
40
|
+
id: result.id,
|
|
41
|
+
...(requiredProduct && {
|
|
42
|
+
contexts: {
|
|
43
|
+
[requiredProduct]: {
|
|
44
|
+
required: true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
})
|
|
41
48
|
};
|
|
42
49
|
if (section !== 'invalid' && section !== 'missing') {
|
|
43
50
|
newAppDetails = {
|