@toolsplus/nx-forge 1.1.4-test-fix-forge-app-build-dependencies.1 → 1.2.0
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/package.json +2 -2
- package/src/executors/build/executor.js +2 -2
- package/src/executors/build/executor.js.map +1 -1
- package/src/executors/build/lib/load-manifest-yml.d.ts +1 -1
- package/src/executors/build/lib/load-manifest-yml.js +14 -11
- package/src/executors/build/lib/load-manifest-yml.js.map +1 -1
- package/src/executors/build/lib/patch-manifest-yml.d.ts +1 -1
- package/src/executors/build/lib/patch-manifest-yml.js +11 -8
- package/src/executors/build/lib/patch-manifest-yml.js.map +1 -1
- package/src/executors/build/lib/process-custom-ui-dependencies.d.ts +1 -1
- package/src/executors/build/lib/process-custom-ui-dependencies.js +8 -5
- package/src/executors/build/lib/process-custom-ui-dependencies.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolsplus/nx-forge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Atlassian Forge plugin for Nx",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"typings": "./src/index.d.ts",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@forge/manifest": "^
|
|
14
|
+
"@forge/manifest": "^4.4.1",
|
|
15
15
|
"js-yaml": "^4.1.0",
|
|
16
16
|
"fs-extra": "^10.0.1"
|
|
17
17
|
}
|
|
@@ -36,8 +36,8 @@ function runExecutor(rawOptions, context) {
|
|
|
36
36
|
finally { if (e_1) throw e_1.error; }
|
|
37
37
|
}
|
|
38
38
|
(0, copy_forge_app_assets_1.copyForgeAppAssets)(options);
|
|
39
|
-
(0, process_custom_ui_dependencies_1.processCustomUIDependencies)(options, context);
|
|
40
|
-
(0, patch_manifest_yml_1.patchManifestYml)(options);
|
|
39
|
+
yield (0, process_custom_ui_dependencies_1.processCustomUIDependencies)(options, context);
|
|
40
|
+
yield (0, patch_manifest_yml_1.patchManifestYml)(options);
|
|
41
41
|
(0, generate_package_json_1.generatePackageJson)(context.projectName, (0, project_graph_1.readCachedProjectGraph)(), options);
|
|
42
42
|
console.log('Executor ran for build');
|
|
43
43
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/forge/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAEA,+DAA2D;AAC3D,yFAAmF;AACnF,iEAA4D;AAC5D,uEAAkE;AAClE,0EAAgF;AAChF,2DAAuD;AACvD,uEAAiE;AAEjE,SAA8B,WAAW,CACvC,UAAgC,EAChC,OAAwB;;;QAExB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE7E,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,8BAA8B,CAAC,CAAC;SACvE;QAED,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,wBAAwB,CAAC,CAAC;SACjE;QAED,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7E,MAAM,WAAW,GAAG,IAAA,gCAAc,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;;YAErD,KAA2B,IAAA,gBAAA,2BAAA,WAAW,CAAA,iBAAA;gBAA3B,MAAM,MAAM,wBAAA,CAAA;gBACrB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;oBACnB,MAAM,IAAI,KAAK,CACb,uCAAuC,OAAO,CAAC,WAAW,GAAG,CAC9D,CAAC;iBACH;aACF;;;;;;;;;QAED,IAAA,0CAAkB,EAAC,OAAO,CAAC,CAAC;QAC5B,IAAA,4DAA2B,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/forge/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAEA,+DAA2D;AAC3D,yFAAmF;AACnF,iEAA4D;AAC5D,uEAAkE;AAClE,0EAAgF;AAChF,2DAAuD;AACvD,uEAAiE;AAEjE,SAA8B,WAAW,CACvC,UAAgC,EAChC,OAAwB;;;QAExB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE7E,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,8BAA8B,CAAC,CAAC;SACvE;QAED,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,wBAAwB,CAAC,CAAC;SACjE;QAED,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7E,MAAM,WAAW,GAAG,IAAA,gCAAc,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;;YAErD,KAA2B,IAAA,gBAAA,2BAAA,WAAW,CAAA,iBAAA;gBAA3B,MAAM,MAAM,wBAAA,CAAA;gBACrB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;oBACnB,MAAM,IAAI,KAAK,CACb,uCAAuC,OAAO,CAAC,WAAW,GAAG,CAC9D,CAAC;iBACH;aACF;;;;;;;;;QAED,IAAA,0CAAkB,EAAC,OAAO,CAAC,CAAC;QAC5B,MAAM,IAAA,4DAA2B,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,MAAM,IAAA,qCAAgB,EAAC,OAAO,CAAC,CAAC;QAChC,IAAA,2CAAmB,EAAC,OAAO,CAAC,WAAW,EAAE,IAAA,sCAAsB,GAAE,EAAE,OAAO,CAAC,CAAC;QAE5E,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;;CACH;AAlCD,8BAkCC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ManifestSchema } from '@forge/manifest';
|
|
2
|
-
export declare function loadManifestYml(manifestPath: string): ManifestSchema
|
|
2
|
+
export declare function loadManifestYml(manifestPath: string): Promise<ManifestSchema>;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadManifestYml = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const manifest_1 = require("@forge/manifest");
|
|
5
6
|
const FULL_SCHEMA = require("@forge/manifest/out/schema/manifest-schema.json");
|
|
6
7
|
function loadManifestYml(manifestPath) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
9
|
+
const { manifestObject, success: isManifestParseSuccess, errors, } = yield new ManifestYmlValidator().process(manifestPath);
|
|
10
|
+
if (!isManifestParseSuccess) {
|
|
11
|
+
throw new Error(`Failed to parse manifest.yml (${manifestPath}): ${errors
|
|
12
|
+
.map((e) => e.message)
|
|
13
|
+
.join('\n')}`);
|
|
14
|
+
}
|
|
15
|
+
const manifestSchema = manifestObject.typedContent;
|
|
16
|
+
if (!manifestSchema) {
|
|
17
|
+
throw new Error('Manifest parse result did not return any content.');
|
|
18
|
+
}
|
|
19
|
+
return manifestSchema;
|
|
20
|
+
});
|
|
18
21
|
}
|
|
19
22
|
exports.loadManifestYml = loadManifestYml;
|
|
20
23
|
class ManifestYmlValidator extends manifest_1.AbstractValidationProcessor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/load-manifest-yml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/load-manifest-yml.ts"],"names":[],"mappings":";;;;AAAA,8CAMyB;AACzB,+EAA+E;AAE/E,SAAsB,eAAe,CACnC,YAAoB;;QAEpB,MAAM,EACJ,cAAc,EACd,OAAO,EAAE,sBAAsB,EAC/B,MAAM,GACP,GAAG,MAAM,IAAI,oBAAoB,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAE3D,IAAI,CAAC,sBAAsB,EAAE;YAC3B,MAAM,IAAI,KAAK,CACb,iCAAiC,YAAY,MAAM,MAAM;iBACtD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;iBACrB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;SACH;QAED,MAAM,cAAc,GAAmB,cAAc,CAAC,YAAY,CAAC;QAEnE,IAAI,CAAC,cAAc,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CAAA;AAxBD,0CAwBC;AAED,MAAM,oBAAqB,SAAQ,sCAA2C;IAC5E;QACE,KAAK,CAAC;YACJ,IAAI,wBAAa,EAAE;YACnB,IAAI,wBAAa,EAAE;YACnB,IAAI,0BAAe,CAAC,WAAW,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.patchManifestYml = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const fs_1 = require("fs");
|
|
5
6
|
const js_yaml_1 = require("js-yaml");
|
|
6
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
@@ -14,14 +15,16 @@ const load_manifest_yml_1 = require("./load-manifest-yml");
|
|
|
14
15
|
* @param options Executor options
|
|
15
16
|
*/
|
|
16
17
|
function patchManifestYml(options) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
19
|
+
const manifestPath = (0, devkit_1.joinPathFragments)(options.outputPath, 'manifest.yml');
|
|
20
|
+
devkit_1.logger.info(`Patching ${manifestPath}...`);
|
|
21
|
+
const manifestSchema = yield (0, load_manifest_yml_1.loadManifestYml)(manifestPath);
|
|
22
|
+
const resources = manifestSchema.resources || [];
|
|
23
|
+
const patchedManifest = Object.assign(Object.assign({}, manifestSchema), { resources: resources.map((r) => patchResource(options.customUIPath, r)) });
|
|
24
|
+
const patchedManifestContent = (0, js_yaml_1.dump)(patchedManifest, {});
|
|
25
|
+
(0, fs_1.writeFileSync)(manifestPath, patchedManifestContent, { encoding: 'utf8' });
|
|
26
|
+
devkit_1.logger.info(`Done patching ${manifestPath}.`);
|
|
27
|
+
});
|
|
25
28
|
}
|
|
26
29
|
exports.patchManifestYml = patchManifestYml;
|
|
27
30
|
function patchResource(customUIPath, resource) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/patch-manifest-yml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patch-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/patch-manifest-yml.ts"],"names":[],"mappings":";;;;AAAA,2BAAmC;AACnC,qCAA+B;AAC/B,yCAAyD;AAIzD,2DAAsD;AAEtD;;;;;;;GAOG;AACH,SAAsB,gBAAgB,CAAC,OAA0B;;QAC/D,MAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAE3E,eAAM,CAAC,IAAI,CAAC,YAAY,YAAY,KAAK,CAAC,CAAC;QAE3C,MAAM,cAAc,GAAG,MAAM,IAAA,mCAAe,EAAC,YAAY,CAAC,CAAC;QAE3D,MAAM,SAAS,GAAc,cAAc,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5D,MAAM,eAAe,mCAChB,cAAc,KACjB,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,GACxE,CAAC;QAEF,MAAM,sBAAsB,GAAG,IAAA,cAAI,EAAC,eAAe,EAAE,EAAE,CAAC,CAAC;QACzD,IAAA,kBAAa,EAAC,YAAY,EAAE,sBAAsB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAE1E,eAAM,CAAC,IAAI,CAAC,iBAAiB,YAAY,GAAG,CAAC,CAAC;IAChD,CAAC;CAAA;AAjBD,4CAiBC;AAED,SAAS,aAAa,CACpB,YAAoB,EACpB,QAA+B;IAE/B,uCACK,QAAQ,KACX,IAAI,EAAE,GAAG,YAAY,IAAI,QAAQ,CAAC,IAAI,EAAE,IACxC;AACJ,CAAC"}
|
|
@@ -13,4 +13,4 @@ import { NormalizedOptions } from '../schema';
|
|
|
13
13
|
* @param options Executor options
|
|
14
14
|
* @param context Executor context
|
|
15
15
|
*/
|
|
16
|
-
export declare function processCustomUIDependencies(options: NormalizedOptions, context: ExecutorContext): Resources
|
|
16
|
+
export declare function processCustomUIDependencies(options: NormalizedOptions, context: ExecutorContext): Promise<Resources>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processCustomUIDependencies = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const fs_extra_1 = require("fs-extra");
|
|
5
6
|
const fs_1 = require("fs");
|
|
6
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
@@ -18,11 +19,13 @@ const load_manifest_yml_1 = require("./load-manifest-yml");
|
|
|
18
19
|
* @param context Executor context
|
|
19
20
|
*/
|
|
20
21
|
function processCustomUIDependencies(options, context) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
23
|
+
const manifestPath = (0, devkit_1.joinPathFragments)(context.root, 'apps', context.projectName, 'manifest.yml');
|
|
24
|
+
const manifestSchema = yield (0, load_manifest_yml_1.loadManifestYml)(manifestPath);
|
|
25
|
+
const resources = manifestSchema.resources || [];
|
|
26
|
+
resources.forEach((r) => verifyAndCopyCustomUIDependency(r, context, options));
|
|
27
|
+
return resources;
|
|
28
|
+
});
|
|
26
29
|
}
|
|
27
30
|
exports.processCustomUIDependencies = processCustomUIDependencies;
|
|
28
31
|
const verifyAndCopyCustomUIDependency = (resource, context, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-custom-ui-dependencies.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/process-custom-ui-dependencies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-custom-ui-dependencies.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/process-custom-ui-dependencies.ts"],"names":[],"mappings":";;;;AAAA,uCAAoC;AACpC,2BAA6C;AAE7C,yCAAyD;AAIzD,2DAAsD;AAEtD;;;;;;;;;;;GAWG;AACH,SAAsB,2BAA2B,CAC/C,OAA0B,EAC1B,OAAwB;;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