@toolsplus/nx-forge 1.2.0 → 1.3.1
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 +6 -5
- package/src/executors/build/executor.js +19 -3
- package/src/executors/build/executor.js.map +1 -1
- package/src/executors/build/lib/compile-webpack.d.ts +1 -4
- package/src/executors/build/lib/compile-webpack.js.map +1 -1
- package/src/executors/build/lib/load-manifest-yml.js +1 -1
- package/src/executors/build/lib/patch-manifest-yml.js +1 -1
- package/src/executors/build/lib/process-custom-ui-dependencies.js +1 -1
- package/src/executors/build/schema.json +2 -0
- package/src/executors/deploy/executor.js +1 -1
- package/src/executors/deploy/schema.json +2 -0
- package/src/generators/application/generator.js +1 -1
- package/src/generators/application/lib/index.js +3 -3
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/init/generator.js +1 -1
- package/src/generators/init/lib/index.js +2 -2
- package/src/generators/init/lib/index.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.3.1",
|
|
4
4
|
"description": "Atlassian Forge plugin for Nx",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
"@nrwl/node": "^14.0.0",
|
|
10
10
|
"@nrwl/workspace": "^14.0.0"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"types": "./src/index.d.ts",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"
|
|
16
|
-
"
|
|
14
|
+
"@nrwl/webpack": "15.2.4",
|
|
15
|
+
"@forge/manifest": "4.5.1",
|
|
16
|
+
"js-yaml": "4.1.0",
|
|
17
|
+
"fs-extra": "10.1.0"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -8,9 +8,24 @@ const generate_package_json_1 = require("./lib/generate-package-json");
|
|
|
8
8
|
const project_graph_1 = require("@nrwl/workspace/src/core/project-graph");
|
|
9
9
|
const compile_webpack_1 = require("./lib/compile-webpack");
|
|
10
10
|
const copy_forge_app_assets_1 = require("./lib/copy-forge-app-assets");
|
|
11
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
12
|
+
/**
|
|
13
|
+
* Try to read a cached project graph. If it does not exist
|
|
14
|
+
* trigger creation to ensure the project graph exists.
|
|
15
|
+
*/
|
|
16
|
+
function readOrCreateProjectGraph() {
|
|
17
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
try {
|
|
19
|
+
return (0, project_graph_1.readCachedProjectGraph)();
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
return (0, devkit_1.createProjectGraphAsync)();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
11
26
|
function runExecutor(rawOptions, context) {
|
|
12
27
|
var e_1, _a;
|
|
13
|
-
return
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
29
|
const { root, sourceRoot } = context.workspace.projects[context.projectName];
|
|
15
30
|
if (!sourceRoot) {
|
|
16
31
|
throw new Error(`${context.projectName} does not have a sourceRoot.`);
|
|
@@ -21,7 +36,7 @@ function runExecutor(rawOptions, context) {
|
|
|
21
36
|
const options = (0, normalize_options_1.normalizeOptions)(rawOptions, context.root, sourceRoot, root);
|
|
22
37
|
const compilation = (0, compile_webpack_1.compileWebpack)(options, context);
|
|
23
38
|
try {
|
|
24
|
-
for (var compilation_1 =
|
|
39
|
+
for (var compilation_1 = tslib_1.__asyncValues(compilation), compilation_1_1; compilation_1_1 = yield compilation_1.next(), !compilation_1_1.done;) {
|
|
25
40
|
const result = compilation_1_1.value;
|
|
26
41
|
if (!result.success) {
|
|
27
42
|
throw new Error(`Failed to compile files for project ${context.projectName}.`);
|
|
@@ -38,7 +53,8 @@ function runExecutor(rawOptions, context) {
|
|
|
38
53
|
(0, copy_forge_app_assets_1.copyForgeAppAssets)(options);
|
|
39
54
|
yield (0, process_custom_ui_dependencies_1.processCustomUIDependencies)(options, context);
|
|
40
55
|
yield (0, patch_manifest_yml_1.patchManifestYml)(options);
|
|
41
|
-
|
|
56
|
+
const projectGraph = yield readOrCreateProjectGraph();
|
|
57
|
+
(0, generate_package_json_1.generatePackageJson)(context.projectName, projectGraph, options);
|
|
42
58
|
console.log('Executor ran for build');
|
|
43
59
|
return {
|
|
44
60
|
success: true,
|
|
@@ -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;
|
|
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;AACjE,yCAAuD;AAEvD;;;GAGG;AACH,SAAe,wBAAwB;;QACrC,IAAI;YACF,OAAO,IAAA,sCAAsB,GAAE,CAAC;SACjC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,IAAA,gCAAuB,GAAE,CAAC;SAClC;IACH,CAAC;CAAA;AAED,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,sBAAA,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,MAAM,YAAY,GAAG,MAAM,wBAAwB,EAAE,CAAC;QACtD,IAAA,2CAAmB,EAAC,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;QAEhE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;;CACH;AAnCD,8BAmCC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
2
|
import { NormalizedOptions } from '../schema';
|
|
3
|
-
export declare function compileWebpack(options: NormalizedOptions, context: ExecutorContext): AsyncGenerator<
|
|
4
|
-
success: boolean;
|
|
5
|
-
outfile: string;
|
|
6
|
-
}>;
|
|
3
|
+
export declare function compileWebpack(options: NormalizedOptions, context: ExecutorContext): AsyncGenerator<import('@nrwl/webpack').WebpackExecutorEvent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-webpack.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/compile-webpack.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAElE,gFAAgF;AAGhF,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,OAAwB;
|
|
1
|
+
{"version":3,"file":"compile-webpack.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/executors/build/lib/compile-webpack.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAElE,gFAAgF;AAGhF,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,OAAwB;IAExB,MAAM,cAAc,GAA2B;QAC7C,UAAU,EAAE,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;QACxD,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,GAAG,OAAO,CAAC,WAAW,oBAAoB;QACpD,IAAI,EAAE,GAAG,OAAO,CAAC,WAAW,eAAe;QAC3C,mBAAmB,EAAE,KAAK;QAC1B,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,YAAY,EAAE,EAAE;QAChB,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,KAAK;QACtB,oBAAoB,EAAE,KAAK;KAC5B,CAAC;IAEF,OAAO,IAAA,8BAAe,EAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAnBD,wCAmBC"}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const manifest_1 = require("@forge/manifest");
|
|
6
6
|
const FULL_SCHEMA = require("@forge/manifest/out/schema/manifest-schema.json");
|
|
7
7
|
function loadManifestYml(manifestPath) {
|
|
8
|
-
return
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
const { manifestObject, success: isManifestParseSuccess, errors, } = yield new ManifestYmlValidator().process(manifestPath);
|
|
10
10
|
if (!isManifestParseSuccess) {
|
|
11
11
|
throw new Error(`Failed to parse manifest.yml (${manifestPath}): ${errors
|
|
@@ -15,7 +15,7 @@ const load_manifest_yml_1 = require("./load-manifest-yml");
|
|
|
15
15
|
* @param options Executor options
|
|
16
16
|
*/
|
|
17
17
|
function patchManifestYml(options) {
|
|
18
|
-
return
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const manifestPath = (0, devkit_1.joinPathFragments)(options.outputPath, 'manifest.yml');
|
|
20
20
|
devkit_1.logger.info(`Patching ${manifestPath}...`);
|
|
21
21
|
const manifestSchema = yield (0, load_manifest_yml_1.loadManifestYml)(manifestPath);
|
|
@@ -19,7 +19,7 @@ const load_manifest_yml_1 = require("./load-manifest-yml");
|
|
|
19
19
|
* @param context Executor context
|
|
20
20
|
*/
|
|
21
21
|
function processCustomUIDependencies(options, context) {
|
|
22
|
-
return
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
const manifestPath = (0, devkit_1.joinPathFragments)(context.root, 'apps', context.projectName, 'manifest.yml');
|
|
24
24
|
const manifestSchema = yield (0, load_manifest_yml_1.loadManifestYml)(manifestPath);
|
|
25
25
|
const resources = manifestSchema.resources || [];
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
function runExecutor(options) {
|
|
7
|
-
return
|
|
7
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
8
|
const args = [
|
|
9
9
|
'deploy',
|
|
10
10
|
`--environment=${options.environment}`,
|
|
@@ -8,7 +8,7 @@ const jest_1 = require("@nrwl/jest");
|
|
|
8
8
|
const generator_1 = require("../init/generator");
|
|
9
9
|
const lib_1 = require("./lib");
|
|
10
10
|
function default_1(tree, rawOptions) {
|
|
11
|
-
return
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
12
|
const options = (0, lib_1.normalizeOptions)(tree, rawOptions);
|
|
13
13
|
const tasks = [];
|
|
14
14
|
const initTask = yield (0, generator_1.default)(tree, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./create-files"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./add-project"), exports);
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,8DAAoC;AACpC,wDAA8B"}
|
|
@@ -7,7 +7,7 @@ const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-i
|
|
|
7
7
|
const lib_1 = require("./lib");
|
|
8
8
|
const jest_1 = require("@nrwl/jest");
|
|
9
9
|
function default_1(tree, rawOptions) {
|
|
10
|
-
return
|
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
11
|
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
12
12
|
(0, set_default_collection_1.setDefaultCollection)(tree, '@toolsplus/nx-forge');
|
|
13
13
|
const jestTask = (0, jest_1.jestInitGenerator)(tree, {});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./add-dependencies"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/generators/init/lib/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/forge/src/generators/init/lib/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,8DAAoC"}
|