@forge/cli-shared 3.20.0-next.15 → 3.20.0-next.17
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 +16 -0
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +3 -8
- package/out/file-system/file-system-reader.d.ts +5 -1
- package/out/file-system/file-system-reader.d.ts.map +1 -1
- package/out/file-system/file-system-reader.js +17 -2
- package/out/file-system/index.d.ts +1 -0
- package/out/file-system/index.d.ts.map +1 -1
- package/out/file-system/index.js +1 -0
- package/out/file-system/util.d.ts +2 -0
- package/out/file-system/util.d.ts.map +1 -0
- package/out/file-system/util.js +14 -0
- package/out/graphql/graphql-types.d.ts +10 -5
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +6 -11
- package/out/shared/read-app-config-files.js +5 -5
- package/out/ui/text.d.ts +1 -1
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 3.20.0-next.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- de5d2023: Allow packaging extra files in Forge apps
|
|
8
|
+
- Updated dependencies [de5d2023]
|
|
9
|
+
- @forge/manifest@4.20.2-next.5
|
|
10
|
+
|
|
11
|
+
## 3.20.0-next.16
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- f11f7384: Bumping dependencies via Renovate:
|
|
16
|
+
|
|
17
|
+
- @sentry/node
|
|
18
|
+
|
|
3
19
|
## 3.20.0-next.15
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app.d.ts","sourceRoot":"","sources":["../../src/apps/register-app.ts"],"names":[],"mappings":"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OAAO,GAC5B,OAAO,CAAC,eAAe,CAAC;CAqB5B"}
|
package/out/apps/register-app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RegisterAppCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const file_system_1 = require("../file-system");
|
|
5
5
|
const ui_1 = require("../ui");
|
|
6
6
|
class RegisterAppCommand {
|
|
7
7
|
constructor(appClient, appConfigReader, appConfigWriter, logger) {
|
|
@@ -20,9 +20,7 @@ class RegisterAppCommand {
|
|
|
20
20
|
async registerApp(input, directory, shouldPrependAppName) {
|
|
21
21
|
this.logger.info(ui_1.Text.create.taskRegister);
|
|
22
22
|
const result = await this.appClient.createApp(input);
|
|
23
|
-
|
|
24
|
-
process.chdir((0, path_1.resolve)(cwd, directory));
|
|
25
|
-
try {
|
|
23
|
+
await (0, file_system_1.inDirectory)(directory, async () => {
|
|
26
24
|
const section = await this.appConfigReader.readConfigSection();
|
|
27
25
|
let newAppDetails = {
|
|
28
26
|
id: result.id
|
|
@@ -34,10 +32,7 @@ class RegisterAppCommand {
|
|
|
34
32
|
if (shouldPrependAppName) {
|
|
35
33
|
await this.appConfigWriter.prependAppNameToModules(input.name);
|
|
36
34
|
}
|
|
37
|
-
}
|
|
38
|
-
finally {
|
|
39
|
-
process.chdir(cwd);
|
|
40
|
-
}
|
|
35
|
+
});
|
|
41
36
|
this.logger.info(ui_1.Text.create.taskCreateEnvironments);
|
|
42
37
|
return result;
|
|
43
38
|
}
|
|
@@ -7,7 +7,10 @@ export declare class FileSystemReader {
|
|
|
7
7
|
readFile(filePath: string): string | undefined;
|
|
8
8
|
readFileAsync(filePath: string): Promise<string | undefined>;
|
|
9
9
|
recursiveReadDir(rootDir: string, ignores?: ReadonlyArray<string | IgnoreFunction>): Promise<string[]>;
|
|
10
|
-
readGlob(pattern
|
|
10
|
+
readGlob({ pattern, filesOnly }: {
|
|
11
|
+
pattern: string;
|
|
12
|
+
filesOnly?: boolean;
|
|
13
|
+
}): Promise<string[]>;
|
|
11
14
|
hasGlobSpecialChars(pattern: string): boolean;
|
|
12
15
|
readBinaryFile(filePath: string): Buffer | undefined;
|
|
13
16
|
readBinaryFileAsync(filePath: string): Promise<Buffer | undefined>;
|
|
@@ -16,6 +19,7 @@ export declare class FileSystemReader {
|
|
|
16
19
|
getSize(filePath: string): number | undefined;
|
|
17
20
|
getFolderSizeAsync(directory: string): Promise<number | undefined>;
|
|
18
21
|
private handleFileError;
|
|
22
|
+
getFileGlobList(globList: string[]): Promise<string[]>;
|
|
19
23
|
}
|
|
20
24
|
export {};
|
|
21
25
|
//# sourceMappingURL=file-system-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-reader.d.ts","sourceRoot":"","sources":["../../src/file-system/file-system-reader.ts"],"names":[],"mappings":";;AAAA,OAAO,EAA4B,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"file-system-reader.d.ts","sourceRoot":"","sources":["../../src/file-system/file-system-reader.ts"],"names":[],"mappings":";;AAAA,OAAO,EAA4B,MAAM,IAAI,CAAC;AAW9C,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC;AAEjE,qBAAa,gBAAgB;IACpB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQxC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAS5D,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAgBtG,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAiB,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB3G,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI7C,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQ9C,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IASxE,gBAAgB,IAAI,MAAM;IAI1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAO3C,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAQvC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAW/E,OAAO,CAAC,eAAe;IAQV,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAIpE"}
|
|
@@ -9,6 +9,7 @@ const path_1 = tslib_1.__importStar(require("path"));
|
|
|
9
9
|
const util_1 = require("util");
|
|
10
10
|
const recursive_readdir_1 = tslib_1.__importDefault(require("recursive-readdir"));
|
|
11
11
|
const get_folder_size_1 = tslib_1.__importDefault(require("get-folder-size"));
|
|
12
|
+
const shared_1 = require("../shared");
|
|
12
13
|
const FILE_NOT_FOUND_CODE = 'ENOENT';
|
|
13
14
|
class FileSystemReader {
|
|
14
15
|
fileExists(filePath) {
|
|
@@ -43,8 +44,18 @@ class FileSystemReader {
|
|
|
43
44
|
}
|
|
44
45
|
return (0, recursive_readdir_1.default)(rootDir, ignoreDirs);
|
|
45
46
|
}
|
|
46
|
-
async readGlob(pattern) {
|
|
47
|
-
|
|
47
|
+
async readGlob({ pattern, filesOnly = false }) {
|
|
48
|
+
let results = await (0, glob_1.glob)(pattern, {});
|
|
49
|
+
if (filesOnly) {
|
|
50
|
+
results = (0, shared_1.flat)(await Promise.all(results.map(async (result) => {
|
|
51
|
+
if ((await fs_1.default.promises.lstat(result)).isFile()) {
|
|
52
|
+
return [result];
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
})));
|
|
58
|
+
}
|
|
48
59
|
results.sort();
|
|
49
60
|
return results;
|
|
50
61
|
}
|
|
@@ -103,5 +114,9 @@ class FileSystemReader {
|
|
|
103
114
|
throw error;
|
|
104
115
|
}
|
|
105
116
|
}
|
|
117
|
+
async getFileGlobList(globList) {
|
|
118
|
+
const files = await Promise.all(globList.map((pattern) => this.readGlob({ pattern, filesOnly: true })));
|
|
119
|
+
return (0, shared_1.flat)(files);
|
|
120
|
+
}
|
|
106
121
|
}
|
|
107
122
|
exports.FileSystemReader = FileSystemReader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file-system/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file-system/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
|
package/out/file-system/index.js
CHANGED
|
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./file-system-reader"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./file-system-writer"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./util"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./zip-accessor"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/file-system/util.ts"],"names":[],"mappings":"AAAA,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQvF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inDirectory = void 0;
|
|
4
|
+
async function inDirectory(path, action) {
|
|
5
|
+
const originalPath = process.cwd();
|
|
6
|
+
try {
|
|
7
|
+
process.chdir(path);
|
|
8
|
+
return await action();
|
|
9
|
+
}
|
|
10
|
+
finally {
|
|
11
|
+
process.chdir(originalPath);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.inDirectory = inDirectory;
|
|
@@ -12729,7 +12729,7 @@ export type HelpObjectStoreSearchInput = {
|
|
|
12729
12729
|
entityType: HelpObjectStoreSearchEntityType;
|
|
12730
12730
|
portalIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
12731
12731
|
queryTerm: Scalars['String']['input'];
|
|
12732
|
-
resultLimit
|
|
12732
|
+
resultLimit: Scalars['Int']['input'];
|
|
12733
12733
|
};
|
|
12734
12734
|
export type HelpObjectStoreSearchMetaData = {
|
|
12735
12735
|
__typename?: 'HelpObjectStoreSearchMetaData';
|
|
@@ -12749,10 +12749,6 @@ export type HelpObjectStoreSearchResult = Node & {
|
|
|
12749
12749
|
metaData?: Maybe<HelpObjectStoreSearchMetaData>;
|
|
12750
12750
|
title: Scalars['String']['output'];
|
|
12751
12751
|
};
|
|
12752
|
-
export declare enum HelpObjectStoreSearchableEntityType {
|
|
12753
|
-
Article = "ARTICLE",
|
|
12754
|
-
RequestForm = "REQUEST_FORM"
|
|
12755
|
-
}
|
|
12756
12752
|
export type HelpObjectStoreSuccessfullyCreatedEntityMappingDetail = {
|
|
12757
12753
|
__typename?: 'HelpObjectStoreSuccessfullyCreatedEntityMappingDetail';
|
|
12758
12754
|
ari: Scalars['ID']['output'];
|
|
@@ -13527,6 +13523,13 @@ export type JiraAdfToConvertedPlainText = {
|
|
|
13527
13523
|
isTruncated?: Maybe<Scalars['Boolean']['output']>;
|
|
13528
13524
|
plainText?: Maybe<Scalars['String']['output']>;
|
|
13529
13525
|
};
|
|
13526
|
+
export type JiraAdminRichTextFieldConfig = {
|
|
13527
|
+
__typename?: 'JiraAdminRichTextFieldConfig';
|
|
13528
|
+
aiEnabledByProject?: Maybe<Scalars['Boolean']['output']>;
|
|
13529
|
+
};
|
|
13530
|
+
export type JiraAdminRichTextFieldConfigAiEnabledByProjectArgs = {
|
|
13531
|
+
projectId?: InputMaybe<Scalars['ID']['input']>;
|
|
13532
|
+
};
|
|
13530
13533
|
export type JiraAffectedService = {
|
|
13531
13534
|
__typename?: 'JiraAffectedService';
|
|
13532
13535
|
name?: Maybe<Scalars['String']['output']>;
|
|
@@ -13822,6 +13825,7 @@ export type JiraBitbucketWorkspace = {
|
|
|
13822
13825
|
approvalState?: Maybe<JiraBitbucketWorkspaceApprovalState>;
|
|
13823
13826
|
name?: Maybe<Scalars['String']['output']>;
|
|
13824
13827
|
workspaceId?: Maybe<Scalars['ID']['output']>;
|
|
13828
|
+
workspaceUrl?: Maybe<Scalars['URL']['output']>;
|
|
13825
13829
|
};
|
|
13826
13830
|
export declare enum JiraBitbucketWorkspaceApprovalState {
|
|
13827
13831
|
Approved = "APPROVED",
|
|
@@ -19620,6 +19624,7 @@ export type JiraRichText = {
|
|
|
19620
19624
|
};
|
|
19621
19625
|
export type JiraRichTextField = JiraIssueField & JiraIssueFieldConfiguration & JiraUserIssueFieldConfiguration & Node & {
|
|
19622
19626
|
__typename?: 'JiraRichTextField';
|
|
19627
|
+
adminRichTextConfig?: Maybe<JiraAdminRichTextFieldConfig>;
|
|
19623
19628
|
aliasFieldId?: Maybe<Scalars['ID']['output']>;
|
|
19624
19629
|
description?: Maybe<Scalars['String']['output']>;
|
|
19625
19630
|
fieldConfig?: Maybe<JiraFieldConfig>;
|