@toolsplus/nx-forge 6.0.1 → 6.0.2
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 +3 -2
- package/src/executors/build/executor.js +24 -40
- package/src/executors/build/executor.js.map +1 -1
- package/src/executors/build/lib/normalize-options.js +9 -2
- package/src/executors/build/lib/normalize-options.js.map +1 -1
- package/src/executors/build/lib/patch-manifest-yml.js +33 -22
- package/src/executors/build/lib/patch-manifest-yml.js.map +1 -1
- package/src/executors/build/lib/process-resource-dependencies.js +14 -12
- package/src/executors/build/lib/process-resource-dependencies.js.map +1 -1
- package/src/executors/deploy/executor.js +24 -24
- package/src/executors/deploy/executor.js.map +1 -1
- package/src/executors/deploy/lib/transform-manifest-yml.js +5 -5
- package/src/executors/deploy/lib/transform-manifest-yml.js.map +1 -1
- package/src/executors/install/executor.js +19 -22
- package/src/executors/install/executor.js.map +1 -1
- package/src/executors/package/executor.js +31 -29
- package/src/executors/package/executor.js.map +1 -1
- package/src/executors/register/executor.js +23 -26
- package/src/executors/register/executor.js.map +1 -1
- package/src/executors/register/lib/normalize-options.js +6 -2
- package/src/executors/register/lib/normalize-options.js.map +1 -1
- package/src/executors/register/lib/patch-manifest-yml.js +16 -13
- package/src/executors/register/lib/patch-manifest-yml.js.map +1 -1
- package/src/executors/tunnel/executor.js +32 -49
- package/src/executors/tunnel/executor.js.map +1 -1
- package/src/executors/tunnel/lib/extract-custom-ui-projects.js +14 -19
- package/src/executors/tunnel/lib/extract-custom-ui-projects.js.map +1 -1
- package/src/executors/tunnel/lib/run-tunnel.js +72 -76
- package/src/executors/tunnel/lib/run-tunnel.js.map +1 -1
- package/src/executors/tunnel/lib/start-custom-uis.js +6 -9
- package/src/executors/tunnel/lib/start-custom-uis.js.map +1 -1
- package/src/generators/application/generator.js +84 -57
- package/src/generators/application/generator.js.map +1 -1
- package/src/generators/application/lib/add-project-dependencies.js +33 -32
- package/src/generators/application/lib/add-project-dependencies.js.map +1 -1
- package/src/generators/application/lib/normalize-options.js +26 -21
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/init/generator.js +16 -20
- package/src/generators/init/generator.js.map +1 -1
- package/src/graph/create-dependencies.js +11 -23
- package/src/graph/create-dependencies.js.map +1 -1
- package/src/migrations/update-2-3-0/remove-implicit-custom-ui-dependencies.js +15 -18
- package/src/migrations/update-2-3-0/remove-implicit-custom-ui-dependencies.js.map +1 -1
- package/src/migrations/update-2-3-0/utils/manifest.js +3 -3
- package/src/migrations/update-2-3-0/utils/manifest.js.map +1 -1
- package/src/migrations/update-3-0-0-webpack-config-setup/update-3-0-0-webpack-config-setup.js +15 -18
- package/src/migrations/update-3-0-0-webpack-config-setup/update-3-0-0-webpack-config-setup.js.map +1 -1
- package/src/shared/manifest/util-manifest.d.ts +18 -9
- package/src/shared/manifest/util-manifest.js +53 -37
- package/src/shared/manifest/util-manifest.js.map +1 -1
- package/src/utils/forge/async-commands.js +1 -1
- package/src/utils/forge/async-commands.js.map +1 -1
- package/src/utils/forge/manifest-yml.d.ts +3 -1
- package/src/utils/forge/manifest-yml.js +8 -7
- package/src/utils/forge/manifest-yml.js.map +1 -1
- package/src/utils/forge/yaml-validator.d.ts +19 -0
- package/src/utils/forge/yaml-validator.js +73 -0
- package/src/utils/forge/yaml-validator.js.map +1 -0
|
@@ -1,36 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = runExecutor;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
7
6
|
const patch_manifest_yml_1 = require("./lib/patch-manifest-yml");
|
|
8
7
|
const async_commands_1 = require("../../utils/forge/async-commands");
|
|
9
|
-
function runExecutor(rawOptions, context) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
cwd: options.outputPath,
|
|
28
|
-
});
|
|
29
|
-
yield (0, patch_manifest_yml_1.patchManifestYml)(options);
|
|
30
|
-
devkit_1.logger.info('✅ Forge app registered');
|
|
31
|
-
return {
|
|
32
|
-
success: true,
|
|
33
|
-
};
|
|
8
|
+
async function runExecutor(rawOptions, context) {
|
|
9
|
+
const { root, sourceRoot } = context.projectsConfigurations.projects[context.projectName];
|
|
10
|
+
if (!sourceRoot) {
|
|
11
|
+
throw new Error(`${context.projectName} does not have a sourceRoot.`);
|
|
12
|
+
}
|
|
13
|
+
if (!root) {
|
|
14
|
+
throw new Error(`${context.projectName} does not have a root.`);
|
|
15
|
+
}
|
|
16
|
+
const options = (0, normalize_options_1.normalizeOptions)(rawOptions, context.root, sourceRoot, root);
|
|
17
|
+
// https://developer.atlassian.com/platform/forge/cli-reference/register/
|
|
18
|
+
const args = [
|
|
19
|
+
'register',
|
|
20
|
+
...(options.verbose === true ? ['--verbose'] : []),
|
|
21
|
+
options.appName,
|
|
22
|
+
];
|
|
23
|
+
devkit_1.logger.log(`Running: forge ${args.join(' ')}`);
|
|
24
|
+
await (0, async_commands_1.runForgeCommandAsync)(args, {
|
|
25
|
+
cwd: options.outputPath,
|
|
34
26
|
});
|
|
27
|
+
await (0, patch_manifest_yml_1.patchManifestYml)(options);
|
|
28
|
+
devkit_1.logger.info('✅ Forge app registered');
|
|
29
|
+
return {
|
|
30
|
+
success: true,
|
|
31
|
+
};
|
|
35
32
|
}
|
|
36
33
|
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/nx-forge/src/executors/register/executor.ts"],"names":[],"mappings":";;AAMA,8BAqCC
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/nx-forge/src/executors/register/executor.ts"],"names":[],"mappings":";;AAMA,8BAqCC;AA3CD,uCAAqD;AAErD,+DAA2D;AAC3D,iEAA4D;AAC5D,qEAAwE;AAEzD,KAAK,UAAU,WAAW,CACvC,UAAmC,EACnC,OAAwB;IAExB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GACxB,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE/D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,8BAA8B,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,wBAAwB,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAE7E,yEAAyE;IACzE,MAAM,IAAI,GAAG;QACX,UAAU;QACV,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,OAAO,CAAC,OAAO;KAChB,CAAC;IAEF,eAAM,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAE/C,MAAM,IAAA,qCAAoB,EAAC,IAAI,EAAE;QAC/B,GAAG,EAAE,OAAO,CAAC,UAAU;KACxB,CAAC,CAAC;IAEH,MAAM,IAAA,qCAAgB,EAAC,OAAO,CAAC,CAAC;IAEhC,eAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAEtC,OAAO;QACL,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
function normalizeOptions(options, root, sourceRoot, projectRoot) {
|
|
6
|
-
return
|
|
6
|
+
return {
|
|
7
|
+
...options,
|
|
8
|
+
root,
|
|
7
9
|
sourceRoot,
|
|
8
|
-
projectRoot,
|
|
10
|
+
projectRoot,
|
|
11
|
+
outputPath: (0, path_1.resolve)(root, options.outputPath),
|
|
12
|
+
};
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/register/lib/normalize-options.ts"],"names":[],"mappings":";;AAGA,4CAaC;AAhBD,+BAA+B;AAG/B,SAAgB,gBAAgB,CAC9B,OAAgC,EAChC,IAAY,EACZ,UAAkB,EAClB,WAAmB;IAEnB,
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/register/lib/normalize-options.ts"],"names":[],"mappings":";;AAGA,4CAaC;AAhBD,+BAA+B;AAG/B,SAAgB,gBAAgB,CAC9B,OAAgC,EAChC,IAAY,EACZ,UAAkB,EAClB,WAAmB;IAEnB,OAAO;QACL,GAAG,OAAO;QACV,IAAI;QACJ,UAAU;QACV,WAAW;QACX,UAAU,EAAE,IAAA,cAAO,EAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.patchManifestYml = patchManifestYml;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const manifest_yml_1 = require("../../../utils/forge/manifest-yml");
|
|
7
6
|
/**
|
|
@@ -10,17 +9,21 @@ const manifest_yml_1 = require("../../../utils/forge/manifest-yml");
|
|
|
10
9
|
*
|
|
11
10
|
* @param options Executor options
|
|
12
11
|
*/
|
|
13
|
-
function patchManifestYml(options) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
async function patchManifestYml(options) {
|
|
13
|
+
const outputManifestPath = (0, devkit_1.joinPathFragments)(options.outputPath, 'manifest.yml');
|
|
14
|
+
const outputManifestSchema = await (0, manifest_yml_1.readManifestYml)(outputManifestPath);
|
|
15
|
+
const appId = outputManifestSchema.app.id;
|
|
16
|
+
const projectManifestPath = (0, devkit_1.joinPathFragments)(options.projectRoot, 'manifest.yml');
|
|
17
|
+
const projectManifestSchema = await (0, manifest_yml_1.readManifestYml)(projectManifestPath);
|
|
18
|
+
devkit_1.logger.info(`Patching project manifest ${projectManifestPath} with app id ${appId}...`);
|
|
19
|
+
const patchedProjectManifest = {
|
|
20
|
+
...projectManifestSchema,
|
|
21
|
+
app: {
|
|
22
|
+
...projectManifestSchema.app,
|
|
23
|
+
id: appId,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
(0, manifest_yml_1.writeManifestYml)(projectManifestPath, patchedProjectManifest);
|
|
27
|
+
devkit_1.logger.info(`Done patching ${projectManifestPath}.`);
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=patch-manifest-yml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/register/lib/patch-manifest-yml.ts"],"names":[],"mappings":";;AAaA,4CA6BC
|
|
1
|
+
{"version":3,"file":"patch-manifest-yml.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/register/lib/patch-manifest-yml.ts"],"names":[],"mappings":";;AAaA,4CA6BC;AA1CD,uCAAuD;AAEvD,oEAG2C;AAE3C;;;;;GAKG;AACI,KAAK,UAAU,gBAAgB,CAAC,OAA0B;IAC/D,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,OAAO,CAAC,UAAU,EAClB,cAAc,CACf,CAAC;IACF,MAAM,oBAAoB,GAAG,MAAM,IAAA,8BAAe,EAAC,kBAAkB,CAAC,CAAC;IAEvE,MAAM,KAAK,GAAW,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;IAElD,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,OAAO,CAAC,WAAW,EACnB,cAAc,CACf,CAAC;IACF,MAAM,qBAAqB,GAAG,MAAM,IAAA,8BAAe,EAAC,mBAAmB,CAAC,CAAC;IAEzE,eAAM,CAAC,IAAI,CACT,6BAA6B,mBAAmB,gBAAgB,KAAK,KAAK,CAC3E,CAAC;IACF,MAAM,sBAAsB,GAAG;QAC7B,GAAG,qBAAqB;QACxB,GAAG,EAAE;YACH,GAAG,qBAAqB,CAAC,GAAG;YAC5B,EAAE,EAAE,KAAK;SACV;KACF,CAAC;IAEF,IAAA,+BAAgB,EAAC,mBAAmB,EAAE,sBAAsB,CAAC,CAAC;IAE9D,eAAM,CAAC,IAAI,CAAC,iBAAiB,mBAAmB,GAAG,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -19,57 +19,40 @@ const start_custom_uis_1 = require("./lib/start-custom-uis");
|
|
|
19
19
|
* @see https://gist.github.com/chrisui/a3cdf050bf18eccd499fba29b609b90a
|
|
20
20
|
* @see https://github.com/nrwl/nx/blob/cded83b2c5bf3e4252c03d4dbcbb5b203b0faed0/packages/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl.ts
|
|
21
21
|
*/
|
|
22
|
-
function runTunnelExecutor(options, context) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (!output.success)
|
|
48
|
-
throw new Error(`A started process failed: ${JSON.stringify(output)}`);
|
|
49
|
-
if ((output === null || output === void 0 ? void 0 : output.id) === 'tunnel') {
|
|
50
|
-
devkit_1.logger.info('Tunnel process has been terminated.');
|
|
51
|
-
const { value } = yield combined.return({ success: true });
|
|
52
|
-
return value;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
22
|
+
async function runTunnelExecutor(options, context) {
|
|
23
|
+
var _a;
|
|
24
|
+
const customUIProjectConfigs = await (0, extract_custom_ui_projects_1.getCustomUiProjects)(context);
|
|
25
|
+
const customUIIters = await (0, start_custom_uis_1.startCustomUIs)(customUIProjectConfigs, context);
|
|
26
|
+
const forgeAppBuildIter = await (0, devkit_1.runExecutor)({ project: context.projectName, target: 'build' }, { watch: true }, context);
|
|
27
|
+
await (0, devkit_1.runExecutor)({ project: context.projectName, target: 'package' }, {}, context);
|
|
28
|
+
try {
|
|
29
|
+
const preTunnelTimeout = (_a = options.preTunnelTimeout) !== null && _a !== void 0 ? _a : 5000;
|
|
30
|
+
await (0, run_tunnel_1.isTunnelPreparationComplete)(options.outputPath, preTunnelTimeout);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
devkit_1.logger.error(err.message);
|
|
34
|
+
return { success: false };
|
|
35
|
+
}
|
|
36
|
+
// execute the tunnel target on the focused project
|
|
37
|
+
const forgeTunnelIter = promiseToIterator((0, run_tunnel_1.default)({ ...options, customUIProjectConfigs }, context));
|
|
38
|
+
const combined = (0, async_iterable_1.combineAsyncIterables)(forgeAppBuildIter, ...customUIIters, forgeTunnelIter);
|
|
39
|
+
try {
|
|
40
|
+
for await (const output of combined) {
|
|
41
|
+
if (!output.success)
|
|
42
|
+
throw new Error(`A started process failed: ${JSON.stringify(output)}`);
|
|
43
|
+
if ((output === null || output === void 0 ? void 0 : output.id) === 'tunnel') {
|
|
44
|
+
devkit_1.logger.info('Tunnel process has been terminated.');
|
|
45
|
+
const { value } = await combined.return({ success: true });
|
|
46
|
+
return value;
|
|
55
47
|
}
|
|
56
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (!_e && !_a && (_b = combined_1.return)) yield _b.call(combined_1);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e_1) throw e_1.error; }
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
devkit_1.logger.error(`Failed to tunnel Forge app: ${err}`);
|
|
66
|
-
return yield combined.return({ success: false });
|
|
67
48
|
}
|
|
68
|
-
}
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
devkit_1.logger.error(`Failed to tunnel Forge app: ${err}`);
|
|
52
|
+
return await combined.return({ success: false });
|
|
53
|
+
}
|
|
69
54
|
}
|
|
70
|
-
function promiseToIterator(v) {
|
|
71
|
-
|
|
72
|
-
yield yield tslib_1.__await(yield tslib_1.__await(v));
|
|
73
|
-
});
|
|
55
|
+
async function* promiseToIterator(v) {
|
|
56
|
+
yield await v;
|
|
74
57
|
}
|
|
75
58
|
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/nx-forge/src/executors/tunnel/executor.ts"],"names":[],"mappings":";;AAmBA,oCAmDC;;AAtED,uCAAkE;AAClE,wEAA4E;AAE5E,uEAA0E;AAC1E,iFAAuE;AACvE,6DAAwD;AAExD;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../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eAAe,CAAC,CAAC;IAE9E,IAAI,CAAC;QACH,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,OAAO;gBACjB,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAEzE,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE,MAAK,QAAQ,EAAE,CAAC;gBAC5B,eAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;gBACnD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC3D,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;QACnD,OAAO,MAAM,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED,KAAK,SAAS,CAAC,CAAC,iBAAiB,CAG/B,CAAa;IACb,MAAM,MAAM,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCustomUiProjects = getCustomUiProjects;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const manifest_yml_1 = require("../../../utils/forge/manifest-yml");
|
|
7
6
|
const util_manifest_1 = require("../../../shared/manifest/util-manifest");
|
|
@@ -11,14 +10,12 @@ const util_manifest_1 = require("../../../shared/manifest/util-manifest");
|
|
|
11
10
|
* @param context Executor context for this call
|
|
12
11
|
* @returns Custom UI project names and the tunnel port on which they are required to serve their dev server.
|
|
13
12
|
*/
|
|
14
|
-
function getCustomUiProjects(context) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}));
|
|
21
|
-
});
|
|
13
|
+
async function getCustomUiProjects(context) {
|
|
14
|
+
const projects = await extractVerifiedCustomUIProjects(context);
|
|
15
|
+
return projects.map((p) => ({
|
|
16
|
+
projectName: p.path,
|
|
17
|
+
port: p.tunnel.port,
|
|
18
|
+
}));
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
21
|
* Extracts all Custom UI projects from the manifest.yml
|
|
@@ -32,16 +29,14 @@ function getCustomUiProjects(context) {
|
|
|
32
29
|
* @param context Executor context for this call
|
|
33
30
|
* @returns All configured and verified Custom UI resources
|
|
34
31
|
*/
|
|
35
|
-
function extractVerifiedCustomUIProjects(context) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.map(verifyCustomUIDependency(context));
|
|
44
|
-
});
|
|
32
|
+
async function extractVerifiedCustomUIProjects(context) {
|
|
33
|
+
var _a;
|
|
34
|
+
const manifestPath = (0, devkit_1.joinPathFragments)(context.root, context.projectsConfigurations.projects[context.projectName].root, 'manifest.yml');
|
|
35
|
+
const manifestSchema = await (0, manifest_yml_1.readManifestYml)(manifestPath);
|
|
36
|
+
const resources = (_a = manifestSchema.resources) !== null && _a !== void 0 ? _a : [];
|
|
37
|
+
return resources
|
|
38
|
+
.filter((0, util_manifest_1.isResourceType)(manifestSchema, ['custom-ui']))
|
|
39
|
+
.map(verifyCustomUIDependency(context));
|
|
45
40
|
}
|
|
46
41
|
const verifyCustomUIDependency = (context) => (resource) => {
|
|
47
42
|
const customUIProjectName = resource.path;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-custom-ui-projects.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/extract-custom-ui-projects.ts"],"names":[],"mappings":";;AAcA,kDAQC
|
|
1
|
+
{"version":3,"file":"extract-custom-ui-projects.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/extract-custom-ui-projects.ts"],"names":[],"mappings":";;AAcA,kDAQC;AAtBD,uCAAgE;AAGhE,oEAAoE;AACpE,0EAAwE;AAIxE;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CACvC,OAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAChE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1B,WAAW,EAAE,CAAC,CAAC,IAAI;QACnB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI;KACpB,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;;;GAWG;AACH,KAAK,UAAU,+BAA+B,CAC5C,OAAwB;;IAExB,MAAM,YAAY,GAAG,IAAA,0BAAiB,EACpC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,EACjE,cAAc,CACf,CAAC;IACF,MAAM,cAAc,GAAG,MAAM,IAAA,8BAAe,EAAC,YAAY,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAc,MAAA,cAAc,CAAC,SAAS,mCAAI,EAAE,CAAC;IAC5D,OAAO,SAAS;SACb,MAAM,CAAC,IAAA,8BAAc,EAAC,cAAc,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;SACrD,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,wBAAwB,GAC5B,CAAC,OAAwB,EAAE,EAAE,CAC7B,CAAC,QAA+B,EAA0B,EAAE;IAC1D,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC;IAE1C,MAAM,4BAA4B,GAChC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAE/D,IAAI,CAAC,4BAA4B,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,sDAAsD,mBAAmB,oFAAoF,CAC9J,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CACb,sBAAsB,mBAAmB,gMAAgM,CAC1O,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,CAAC,GAAG,iIAAiI,QAAQ,CAAC,GAAG,0GAA0G,CACnS,CAAC;IACJ,CAAC;IAED,OAAO,QAAkC,CAAC;AAC5C,CAAC,CAAC"}
|
|
@@ -23,45 +23,41 @@ const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
|
23
23
|
* @param timeoutMs Timeout in ms
|
|
24
24
|
* @param initialDelayMs Initial delay before re-checking the condition
|
|
25
25
|
*/
|
|
26
|
-
function isTunnelPreparationComplete(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
setTimeout(() => reject(new Error(`Tunnel preparation timed out: Did not completed within ${timeoutMs} ms.
|
|
26
|
+
async function isTunnelPreparationComplete(outputPath, timeoutMs, initialDelayMs = 200) {
|
|
27
|
+
const manifestExists = () => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return (_b = (_a = (0, node_fs_1.statSync)(node_path_1.default.join(outputPath, 'manifest.yml'), {
|
|
30
|
+
throwIfNoEntry: false,
|
|
31
|
+
})) === null || _a === void 0 ? void 0 : _a.isFile()) !== null && _b !== void 0 ? _b : false;
|
|
32
|
+
};
|
|
33
|
+
const isOutputPathSrcDirNonEmpty = () => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
return (_b = (((_a = (0, node_fs_1.statSync)(node_path_1.default.join(outputPath, 'src'), {
|
|
36
|
+
throwIfNoEntry: false,
|
|
37
|
+
})) === null || _a === void 0 ? void 0 : _a.isDirectory()) &&
|
|
38
|
+
(0, node_fs_1.readdirSync)(node_path_1.default.join(outputPath, 'src')).length > 0)) !== null && _b !== void 0 ? _b : false;
|
|
39
|
+
};
|
|
40
|
+
const timeout = new Promise((_, reject) => {
|
|
41
|
+
setTimeout(() => reject(new Error(`Tunnel preparation timed out: Did not completed within ${timeoutMs} ms.
|
|
43
42
|
|
|
44
43
|
You can set a longer time out using the 'preTunnelTimeout' option of the tunnel executor.`)), timeoutMs);
|
|
45
|
-
});
|
|
46
|
-
const tunnelReadyCondition = function () {
|
|
47
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
let delay = initialDelayMs;
|
|
49
|
-
while (true) {
|
|
50
|
-
try {
|
|
51
|
-
if (manifestExists() && isOutputPathSrcDirNonEmpty()) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (err) {
|
|
56
|
-
throw new Error(`Unexpected error checking tunnel preparation complete: ${err}`);
|
|
57
|
-
}
|
|
58
|
-
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
59
|
-
delay *= 2;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
return Promise.race([tunnelReadyCondition(), timeout]);
|
|
64
44
|
});
|
|
45
|
+
const tunnelReadyCondition = async function () {
|
|
46
|
+
let delay = initialDelayMs;
|
|
47
|
+
while (true) {
|
|
48
|
+
try {
|
|
49
|
+
if (manifestExists() && isOutputPathSrcDirNonEmpty()) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
throw new Error(`Unexpected error checking tunnel preparation complete: ${err}`);
|
|
55
|
+
}
|
|
56
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
57
|
+
delay *= 2;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return Promise.race([tunnelReadyCondition(), timeout]);
|
|
65
61
|
}
|
|
66
62
|
/**
|
|
67
63
|
* Starts the `forge tunnel` process in the app's output directory. The execution of `forge tunnel` will be delayed
|
|
@@ -74,47 +70,47 @@ function isTunnelPreparationComplete(outputPath_1, timeoutMs_1) {
|
|
|
74
70
|
* @param options Tunnel executor options
|
|
75
71
|
* @param context Executor context for this call
|
|
76
72
|
*/
|
|
77
|
-
function runTunnel(options, context) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
73
|
+
async function runTunnel(options, context) {
|
|
74
|
+
if (options.customUIProjectConfigs.length > 0) {
|
|
75
|
+
devkit_1.logger.info(`Wait for all Custom UI 'serve' targets to have started and servers are listening...`);
|
|
76
|
+
await Promise.all(options.customUIProjectConfigs.map(({ port }) => (0, wait_until_server_is_listening_1.waitUntilServerIsListening)(port, context)));
|
|
77
|
+
devkit_1.logger.info(`All Custom UI 'serve' targets have started and servers are listening`);
|
|
78
|
+
}
|
|
79
|
+
const args = [
|
|
80
|
+
'tunnel',
|
|
81
|
+
...(options.verbose === true ? ['--verbose'] : []),
|
|
82
|
+
...(options.debug === true ? ['--debug'] : []),
|
|
83
|
+
];
|
|
84
|
+
const command = `forge ${args.join(' ')}`;
|
|
85
|
+
devkit_1.logger.info(`Running: > ${command}`);
|
|
86
|
+
// https://2ality.com/2018/05/child-process-streams.html#running-commands-in-child-processes
|
|
87
|
+
const tunnelProcess = (0, node_child_process_1.spawn)('forge', args, {
|
|
88
|
+
cwd: options.outputPath,
|
|
89
|
+
env: {
|
|
90
|
+
...process.env,
|
|
91
|
+
// Unset NODE_ENV, if this is set to 'development' it may cause issues
|
|
92
|
+
// starting the tunnel process
|
|
93
|
+
// https://stackoverflow.com/questions/69566849/installing-forge-cli-is-bringing-spawn-ts-node-enoent-error
|
|
94
|
+
NODE_ENV: undefined,
|
|
95
|
+
},
|
|
96
|
+
stdio: 'inherit',
|
|
97
|
+
shell: true,
|
|
98
|
+
});
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
tunnelProcess.once('exit', (code) => {
|
|
101
|
+
if (code === 0) {
|
|
102
|
+
devkit_1.logger.info('Exiting the forge tunnel process...');
|
|
103
|
+
resolve({
|
|
104
|
+
id: 'tunnel',
|
|
105
|
+
success: true,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
reject(new Error('Forge tunnel process terminated with error code: ' + code));
|
|
110
|
+
}
|
|
101
111
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (code === 0) {
|
|
105
|
-
devkit_1.logger.info('Exiting the forge tunnel process...');
|
|
106
|
-
resolve({
|
|
107
|
-
id: 'tunnel',
|
|
108
|
-
success: true,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
reject(new Error('Forge tunnel process terminated with error code: ' + code));
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
tunnelProcess.once('error', (err) => {
|
|
116
|
-
reject(new Error('Forge tunnel process failed: ' + err));
|
|
117
|
-
});
|
|
112
|
+
tunnelProcess.once('error', (err) => {
|
|
113
|
+
reject(new Error('Forge tunnel process failed: ' + err));
|
|
118
114
|
});
|
|
119
115
|
});
|
|
120
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-tunnel.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/run-tunnel.ts"],"names":[],"mappings":";;AAsBA,kEAiDC;AAaD,4BAkEC;;AAtJD,uCAAqD;AACrD,2DAA2C;AAC3C,8DAAwC;AAExC,qFAA8E;AAC9E,qCAAgD;AAChD,kEAA6B;AAE7B;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"run-tunnel.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/run-tunnel.ts"],"names":[],"mappings":";;AAsBA,kEAiDC;AAaD,4BAkEC;;AAtJD,uCAAqD;AACrD,2DAA2C;AAC3C,8DAAwC;AAExC,qFAA8E;AAC9E,qCAAgD;AAChD,kEAA6B;AAE7B;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,2BAA2B,CAC/C,UAAkB,EAClB,SAAiB,EACjB,cAAc,GAAG,GAAG;IAEpB,MAAM,cAAc,GAAG,GAAG,EAAE;;QAC1B,OAAA,MAAA,MAAA,IAAA,kBAAQ,EAAC,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE;YAC9C,cAAc,EAAE,KAAK;SACtB,CAAC,0CAAE,MAAM,EAAE,mCAAI,KAAK,CAAA;KAAA,CAAC;IACxB,MAAM,0BAA0B,GAAG,GAAG,EAAE;;QACtC,OAAA,MAAA,CAAC,CAAA,MAAA,IAAA,kBAAQ,EAAC,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE;YACtC,cAAc,EAAE,KAAK;SACtB,CAAC,0CAAE,WAAW,EAAE;YACf,IAAA,qBAAW,EAAC,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,mCACvD,KAAK,CAAA;KA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AC,GAAU,EAAE,EAAE;YACzC,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,GAAG,GAAG,CAAC,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startCustomUIs = startCustomUIs;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
function startCustomUIs(customUIProjectConfigs, context) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return customUIIters;
|
|
13
|
-
});
|
|
5
|
+
async function startCustomUIs(customUIProjectConfigs, context) {
|
|
6
|
+
const customUIIters = [];
|
|
7
|
+
for (const config of customUIProjectConfigs) {
|
|
8
|
+
customUIIters.push(await (0, devkit_1.runExecutor)({ project: config.projectName, target: 'serve' }, { port: config.port }, context));
|
|
9
|
+
}
|
|
10
|
+
return customUIIters;
|
|
14
11
|
}
|
|
15
12
|
//# sourceMappingURL=start-custom-uis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-custom-uis.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/start-custom-uis.ts"],"names":[],"mappings":";;AAEA,wCAgBC
|
|
1
|
+
{"version":3,"file":"start-custom-uis.js","sourceRoot":"","sources":["../../../../../../../packages/nx-forge/src/executors/tunnel/lib/start-custom-uis.ts"],"names":[],"mappings":";;AAEA,wCAgBC;AAlBD,uCAA0D;AAEnD,KAAK,UAAU,cAAc,CAClC,sBAA+D,EAC/D,OAAwB;IAExB,MAAM,aAAa,GAA0C,EAAE,CAAC;IAEhE,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE,CAAC;QAC5C,aAAa,CAAC,IAAI,CAChB,MAAM,IAAA,oBAAW,EACf,EAAE,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,EAChD,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EACrB,OAAO,CACR,CACF,CAAC;IACJ,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|