@forge/cli-shared 6.7.1-next.2-experimental-611b366 → 6.8.0-next.4
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 +9 -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 +3 -2
- package/out/graphql/graphql-types.d.ts +16 -2
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +0 -2
- package/out/ui/text.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
-
## 6.
|
|
3
|
+
## 6.8.0-next.4
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
- Updated dependencies [64daaa5]
|
|
8
|
+
- @forge/manifest@8.9.0-next.1
|
|
9
|
+
|
|
10
|
+
## 6.8.0-next.3
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- d156658: Switch the `forge create` flow to select product context first
|
|
11
15
|
|
|
12
16
|
## 6.7.1-next.2
|
|
13
17
|
|
|
@@ -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,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAI1C;AAED,oBAAY,sBAAsB,GAAG,iBAAiB,GAAG;IACvD,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAHP,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,cAAc;IAG7B,OAAO,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EAChB,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAa7C,qBAAqB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAS1C,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACnD,QAAQ,EAAE,CAAC,EAAE,EACb,aAAa,EAAE,CAAC,EAChB,YAAY,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,EAAE,CAAC;CAehB"}
|
|
@@ -12,15 +12,18 @@ class CreateAppCommand {
|
|
|
12
12
|
templater;
|
|
13
13
|
registerAppCommand;
|
|
14
14
|
packageInstaller;
|
|
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,EA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B,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;CAiC5B"}
|
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,8 @@ 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 && { requiredProduct })
|
|
41
42
|
};
|
|
42
43
|
if (section !== 'invalid' && section !== 'missing') {
|
|
43
44
|
newAppDetails = {
|
|
@@ -24712,7 +24712,6 @@ export declare enum ExternalDocumentCategory {
|
|
|
24712
24712
|
Audio = "AUDIO",
|
|
24713
24713
|
Blogpost = "BLOGPOST",
|
|
24714
24714
|
Code = "CODE",
|
|
24715
|
-
Comment = "COMMENT",
|
|
24716
24715
|
Document = "DOCUMENT",
|
|
24717
24716
|
Folder = "FOLDER",
|
|
24718
24717
|
Form = "FORM",
|
|
@@ -24722,7 +24721,6 @@ export declare enum ExternalDocumentCategory {
|
|
|
24722
24721
|
Pdf = "PDF",
|
|
24723
24722
|
Presentation = "PRESENTATION",
|
|
24724
24723
|
Shortcut = "SHORTCUT",
|
|
24725
|
-
Space = "SPACE",
|
|
24726
24724
|
Spreadsheet = "SPREADSHEET",
|
|
24727
24725
|
Video = "VIDEO",
|
|
24728
24726
|
WebPage = "WEB_PAGE"
|
|
@@ -25023,6 +25021,7 @@ export declare type ExternalRepository = Node & {
|
|
|
25023
25021
|
displayName?: Maybe<Scalars['String']['output']>;
|
|
25024
25022
|
forkOfId?: Maybe<Scalars['String']['output']>;
|
|
25025
25023
|
id: Scalars['ID']['output'];
|
|
25024
|
+
lastUpdated?: Maybe<Scalars['String']['output']>;
|
|
25026
25025
|
lastUpdatedBy?: Maybe<ExternalUser>;
|
|
25027
25026
|
name?: Maybe<Scalars['String']['output']>;
|
|
25028
25027
|
owners?: Maybe<Array<Maybe<ExternalUser>>>;
|
|
@@ -25158,6 +25157,8 @@ export declare type ExternalWorkItem = Node & {
|
|
|
25158
25157
|
associatedWith?: Maybe<ExternalAssociationConnection>;
|
|
25159
25158
|
attachments?: Maybe<Array<Maybe<ExternalWorkItemAttachment>>>;
|
|
25160
25159
|
collaborators?: Maybe<Array<Maybe<ExternalUser>>>;
|
|
25160
|
+
container?: Maybe<ExternalEntity>;
|
|
25161
|
+
containerId?: Maybe<Scalars['ID']['output']>;
|
|
25161
25162
|
createdAt?: Maybe<Scalars['String']['output']>;
|
|
25162
25163
|
createdBy?: Maybe<ExternalUser>;
|
|
25163
25164
|
description?: Maybe<Scalars['String']['output']>;
|
|
@@ -25166,6 +25167,7 @@ export declare type ExternalWorkItem = Node & {
|
|
|
25166
25167
|
exceedsMaxCollaborators?: Maybe<Scalars['Boolean']['output']>;
|
|
25167
25168
|
externalId?: Maybe<Scalars['String']['output']>;
|
|
25168
25169
|
id: Scalars['ID']['output'];
|
|
25170
|
+
largeDescription?: Maybe<ExternalLargeContent>;
|
|
25169
25171
|
lastUpdated?: Maybe<Scalars['String']['output']>;
|
|
25170
25172
|
lastUpdatedBy?: Maybe<ExternalUser>;
|
|
25171
25173
|
parent?: Maybe<ExternalEntity>;
|
|
@@ -58563,7 +58565,9 @@ export declare type JiraIssueSearchChildIssuesInput = {
|
|
|
58563
58565
|
filterByProjectKeys?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
58564
58566
|
filterId?: InputMaybe<Scalars['String']['input']>;
|
|
58565
58567
|
jql?: InputMaybe<Scalars['String']['input']>;
|
|
58568
|
+
namespace?: InputMaybe<Scalars['String']['input']>;
|
|
58566
58569
|
parentIssueKey: Scalars['String']['input'];
|
|
58570
|
+
viewId?: InputMaybe<Scalars['String']['input']>;
|
|
58567
58571
|
};
|
|
58568
58572
|
export declare type JiraIssueSearchContextlessContent = JiraIssueSearchResultContent & {
|
|
58569
58573
|
__typename?: 'JiraIssueSearchContextlessContent';
|
|
@@ -60408,6 +60412,7 @@ export declare type JiraMutation = {
|
|
|
60408
60412
|
replaceIssueSearchViewFieldSets?: Maybe<JiraIssueSearchViewPayload>;
|
|
60409
60413
|
replaceSpreadsheetViewFieldSets?: Maybe<JiraSpreadsheetViewPayload>;
|
|
60410
60414
|
requestCancelIssueExportTask?: Maybe<JiraIssueExportTaskCancellationResult>;
|
|
60415
|
+
restoreJiraJourneyConfiguration?: Maybe<JiraUpdateJourneyConfigurationPayload>;
|
|
60411
60416
|
saveBusinessBoardSettings?: Maybe<JiraWorkManagementBoardSettingsPayload>;
|
|
60412
60417
|
saveVersionDetailsCollapsedUis?: Maybe<JiraVersionDetailsCollapsedUisPayload>;
|
|
60413
60418
|
saveVersionIssueTableColumnHiddenState?: Maybe<JiraVersionIssueTableColumnHiddenStatePayload>;
|
|
@@ -60819,6 +60824,10 @@ export declare type JiraMutationRequestCancelIssueExportTaskArgs = {
|
|
|
60819
60824
|
cloudId: Scalars['ID']['input'];
|
|
60820
60825
|
taskId?: InputMaybe<Scalars['String']['input']>;
|
|
60821
60826
|
};
|
|
60827
|
+
export declare type JiraMutationRestoreJiraJourneyConfigurationArgs = {
|
|
60828
|
+
cloudId: Scalars['ID']['input'];
|
|
60829
|
+
input: JiraRestoreJourneyConfigurationInput;
|
|
60830
|
+
};
|
|
60822
60831
|
export declare type JiraMutationSaveBusinessBoardSettingsArgs = {
|
|
60823
60832
|
input: JiraWorkManagementBoardSettingsInput;
|
|
60824
60833
|
};
|
|
@@ -64850,6 +64859,10 @@ export declare enum JiraResourceUsageRecommendationStatus {
|
|
|
64850
64859
|
Obsolete = "OBSOLETE",
|
|
64851
64860
|
Trashed = "TRASHED"
|
|
64852
64861
|
}
|
|
64862
|
+
export declare type JiraRestoreJourneyConfigurationInput = {
|
|
64863
|
+
etag?: InputMaybe<Scalars['String']['input']>;
|
|
64864
|
+
id: Scalars['ID']['input'];
|
|
64865
|
+
};
|
|
64853
64866
|
export declare enum JiraReviewState {
|
|
64854
64867
|
Approval = "APPROVAL",
|
|
64855
64868
|
Closed = "CLOSED",
|
|
@@ -86639,6 +86652,7 @@ export declare enum SearchSortOrder {
|
|
|
86639
86652
|
export declare type SearchThirdPartyFilter = {
|
|
86640
86653
|
ancestorAris?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
86641
86654
|
assignees?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
86655
|
+
containerAris?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
86642
86656
|
containerNames?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
86643
86657
|
excludeSubtypes?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
86644
86658
|
integrations?: InputMaybe<Array<Scalars['ID']['input']>>;
|