@forge/cli-shared 6.5.1-next.3 → 6.5.1-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 +6 -0
- package/out/apps/register-app.d.ts +3 -2
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +11 -1
- package/out/config/config-file.d.ts +2 -1
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +22 -1
- package/out/graphql/graphql-types.d.ts +11 -0
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +17 -12
- package/out/ui/text.d.ts +3 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigSectionReader, ConfigSectionWriter, NO_VALIDATION_TYPE } from '../config';
|
|
1
|
+
import { ConfigFile, ConfigSectionReader, ConfigSectionWriter, NO_VALIDATION_TYPE } from '../config';
|
|
2
2
|
import { Logger } from '../ui';
|
|
3
3
|
import { AppDetails } from './app-config';
|
|
4
4
|
export interface CreateAppClientInput {
|
|
@@ -26,7 +26,8 @@ export declare class RegisterAppCommand {
|
|
|
26
26
|
private readonly appConfigReader;
|
|
27
27
|
private readonly appConfigWriter;
|
|
28
28
|
private readonly logger;
|
|
29
|
-
|
|
29
|
+
private readonly configFile;
|
|
30
|
+
constructor(appClient: CreateAppClient, appConfigReader: ConfigSectionReader<NO_VALIDATION_TYPE>, appConfigWriter: ConfigSectionWriter<AppDetails>, logger: Logger, configFile: ConfigFile);
|
|
30
31
|
execute(input: CreateAppClientInput, { shouldPrependAppName }?: {
|
|
31
32
|
shouldPrependAppName?: boolean | undefined;
|
|
32
33
|
}): Promise<RegisterAppResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../src/apps/register-app.ts"],"names":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KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQvG,WAAW,CACtB,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,MAAM,EACjB,EAAE,oBAAoB,EAAE,EAAE;QAAE,oBAAoB,EAAE,OAAO,CAAA;KAAE,GAC1D,OAAO,CAAC,eAAe,CAAC;CAgC5B"}
|
package/out/apps/register-app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RegisterAppCommand = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
4
5
|
const file_system_1 = require("../file-system");
|
|
5
6
|
const ui_1 = require("../ui");
|
|
6
7
|
class RegisterAppCommand {
|
|
@@ -8,11 +9,13 @@ class RegisterAppCommand {
|
|
|
8
9
|
appConfigReader;
|
|
9
10
|
appConfigWriter;
|
|
10
11
|
logger;
|
|
11
|
-
|
|
12
|
+
configFile;
|
|
13
|
+
constructor(appClient, appConfigReader, appConfigWriter, logger, configFile) {
|
|
12
14
|
this.appClient = appClient;
|
|
13
15
|
this.appConfigReader = appConfigReader;
|
|
14
16
|
this.appConfigWriter = appConfigWriter;
|
|
15
17
|
this.logger = logger;
|
|
18
|
+
this.configFile = configFile;
|
|
16
19
|
}
|
|
17
20
|
async execute(input, { shouldPrependAppName = false } = {}) {
|
|
18
21
|
const result = await this.registerApp(input, '.', { shouldPrependAppName });
|
|
@@ -25,6 +28,13 @@ class RegisterAppCommand {
|
|
|
25
28
|
this.logger.info(ui_1.Text.create.taskRegister);
|
|
26
29
|
const result = await this.appClient.createApp(input);
|
|
27
30
|
await (0, file_system_1.inDirectory)(directory, async () => {
|
|
31
|
+
const { modules } = await this.configFile.readConfig();
|
|
32
|
+
if (modules) {
|
|
33
|
+
const uiKit1Modules = (0, config_1.findUIKit1Modules)(modules);
|
|
34
|
+
if (uiKit1Modules.length > 0) {
|
|
35
|
+
this.logger.warn(ui_1.Text.warning.deprecation.uikit(uiKit1Modules));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
28
38
|
const section = await this.appConfigReader.readConfigSection();
|
|
29
39
|
let newAppDetails = {
|
|
30
40
|
id: result.id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileSystemReader, FileSystemWriter } from '../file-system';
|
|
2
2
|
import { ConfigReader, ConfigWriter } from './';
|
|
3
|
-
import { ManifestSchema, Resources } from '@forge/manifest';
|
|
3
|
+
import { Modules, ManifestSchema, Resources } from '@forge/manifest';
|
|
4
4
|
import { UserError, ValidationError } from '../shared';
|
|
5
5
|
import { RuntimeType } from '../runtimes';
|
|
6
6
|
export declare class InvalidManifestError extends ValidationError {
|
|
@@ -22,6 +22,7 @@ export declare type UIResourceType = 'customUI' | 'nativeUI' | 'default';
|
|
|
22
22
|
export interface ResourceDetails extends Resource {
|
|
23
23
|
resourceType: UIResourceType;
|
|
24
24
|
}
|
|
25
|
+
export declare function findUIKit1Modules(modules: Modules): string[];
|
|
25
26
|
export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInteractor {
|
|
26
27
|
private readonly fileReader;
|
|
27
28
|
private readonly fileWriter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,IAAI,CAAC;AAGlE,OAAO,
|
|
1
|
+
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,IAAI,CAAC;AAGlE,OAAO,EACL,OAAO,EACP,cAAc,EACd,SAAS,EAMV,MA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kBAAkB;IAoBb,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajE,OAAO,CAAC,aAAa;IAIR,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1G,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,6BAA6B;IAarC,OAAO,CAAC,gBAAgB;IAIX,oBAAoB,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;IAoClF,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAe1E,YAAY,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAsB1E,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKzD,OAAO,CAAC,eAAe;CA0BxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigFile = exports.ResourceDefinitionMissingError = exports.InvalidManifestError = void 0;
|
|
3
|
+
exports.ConfigFile = exports.findUIKit1Modules = exports.ResourceDefinitionMissingError = exports.InvalidManifestError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const yaml_1 = require("yaml");
|
|
6
6
|
const ui_1 = require("../ui");
|
|
@@ -23,6 +23,27 @@ class ResourceDefinitionMissingError extends shared_1.UserError {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.ResourceDefinitionMissingError = ResourceDefinitionMissingError;
|
|
26
|
+
const isUIKit1 = (module) => {
|
|
27
|
+
return (typeof module === 'object' &&
|
|
28
|
+
module !== null &&
|
|
29
|
+
module.hasOwnProperty('function') &&
|
|
30
|
+
!module.hasOwnProperty('render') &&
|
|
31
|
+
!module.hasOwnProperty('resource'));
|
|
32
|
+
};
|
|
33
|
+
function findUIKit1Modules(modules) {
|
|
34
|
+
const notUIKit1Modules = ['trigger', 'webtrigger', 'scheduledTrigger', 'action'];
|
|
35
|
+
return (0, manifest_1.getValidModules)(modules)
|
|
36
|
+
.filter((moduleType) => {
|
|
37
|
+
return !notUIKit1Modules.includes(moduleType);
|
|
38
|
+
})
|
|
39
|
+
.map((moduleType) => {
|
|
40
|
+
const moduleItems = modules[moduleType] || [];
|
|
41
|
+
return moduleItems.filter(isUIKit1).map((module) => module.key);
|
|
42
|
+
})
|
|
43
|
+
.flat()
|
|
44
|
+
.filter((a) => a);
|
|
45
|
+
}
|
|
46
|
+
exports.findUIKit1Modules = findUIKit1Modules;
|
|
26
47
|
class ConfigFile {
|
|
27
48
|
fileReader;
|
|
28
49
|
fileWriter;
|
|
@@ -42649,6 +42649,7 @@ export declare type HelpLayout = Node & {
|
|
|
42649
42649
|
id: Scalars['ID']['output'];
|
|
42650
42650
|
reloadOnPublish?: Maybe<Scalars['Boolean']['output']>;
|
|
42651
42651
|
sections?: Maybe<HelpLayoutSectionConnection>;
|
|
42652
|
+
type?: Maybe<HelpLayoutType>;
|
|
42652
42653
|
visualConfig?: Maybe<HelpLayoutVisualConfig>;
|
|
42653
42654
|
};
|
|
42654
42655
|
export declare type HelpLayoutSectionsArgs = {
|
|
@@ -42805,6 +42806,7 @@ export declare type HelpLayoutCreatePayload = Payload & {
|
|
|
42805
42806
|
export declare type HelpLayoutCreationInput = {
|
|
42806
42807
|
parentAri: Scalars['ID']['input'];
|
|
42807
42808
|
sections: Array<HelpLayoutSectionInput>;
|
|
42809
|
+
type?: InputMaybe<HelpLayoutType>;
|
|
42808
42810
|
};
|
|
42809
42811
|
export declare type HelpLayoutEditorElement = HelpLayoutVisualEntity & Node & {
|
|
42810
42812
|
__typename?: 'HelpLayoutEditorElement';
|
|
@@ -43216,6 +43218,10 @@ export declare type HelpLayoutTopicsListInput = {
|
|
|
43216
43218
|
elementTitle?: InputMaybe<Scalars['String']['input']>;
|
|
43217
43219
|
visualConfig?: InputMaybe<HelpLayoutVisualConfigInput>;
|
|
43218
43220
|
};
|
|
43221
|
+
export declare enum HelpLayoutType {
|
|
43222
|
+
CustomPage = "CUSTOM_PAGE",
|
|
43223
|
+
HomePage = "HOME_PAGE"
|
|
43224
|
+
}
|
|
43219
43225
|
export declare type HelpLayoutUpdateInput = {
|
|
43220
43226
|
layoutId: Scalars['ID']['input'];
|
|
43221
43227
|
sections: Array<HelpLayoutSectionInput>;
|
|
@@ -53692,6 +53698,7 @@ export declare type JiraProject = Node & {
|
|
|
53692
53698
|
projectUrl?: Maybe<Scalars['String']['output']>;
|
|
53693
53699
|
projectWithVisibleIssueTypeIds?: Maybe<JiraProjectWithIssueTypeIds>;
|
|
53694
53700
|
repositories?: Maybe<GraphStoreSimplifiedProjectAssociatedRepoConnection>;
|
|
53701
|
+
requestTypes?: Maybe<JiraServiceManagementRequestTypeConnection>;
|
|
53695
53702
|
selectedDeploymentAppsProperty?: Maybe<Array<JiraDeploymentApp>>;
|
|
53696
53703
|
servicesAvailableToLinkWith?: Maybe<DevOpsServiceConnection>;
|
|
53697
53704
|
similarIssues?: Maybe<JiraSimilarIssues>;
|
|
@@ -53811,6 +53818,10 @@ export declare type JiraProjectRepositoriesArgs = {
|
|
|
53811
53818
|
first?: InputMaybe<Scalars['Int']['input']>;
|
|
53812
53819
|
sort?: InputMaybe<GraphStoreProjectAssociatedRepoSortInput>;
|
|
53813
53820
|
};
|
|
53821
|
+
export declare type JiraProjectRequestTypesArgs = {
|
|
53822
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
53823
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
53824
|
+
};
|
|
53814
53825
|
export declare type JiraProjectServicesAvailableToLinkWithArgs = {
|
|
53815
53826
|
after?: InputMaybe<Scalars['String']['input']>;
|
|
53816
53827
|
filter?: InputMaybe<DevOpsServicesFilterInput>;
|