@toolsplus/nx-forge 3.2.0 → 3.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolsplus/nx-forge",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "Atlassian Forge plugin for Nx",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const node_fs_1 = require("node:fs");
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const normalize_options_1 = require("./lib/normalize-options");
6
7
  const process_custom_ui_dependencies_1 = require("./lib/process-custom-ui-dependencies");
@@ -8,6 +9,14 @@ const patch_manifest_yml_1 = require("./lib/patch-manifest-yml");
8
9
  const generate_package_json_1 = require("./lib/generate-package-json");
9
10
  const compile_webpack_1 = require("./lib/compile-webpack");
10
11
  const copy_forge_app_assets_1 = require("./lib/copy-forge-app-assets");
12
+ function fileExists(path) {
13
+ try {
14
+ return (0, node_fs_1.statSync)(path).isFile();
15
+ }
16
+ catch (_a) {
17
+ return false;
18
+ }
19
+ }
11
20
  function runExecutor(rawOptions, context) {
12
21
  var _a, e_1, _b, _c;
13
22
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -19,23 +28,25 @@ function runExecutor(rawOptions, context) {
19
28
  throw new Error(`${context.projectName} does not have a root.`);
20
29
  }
21
30
  const options = (0, normalize_options_1.normalizeOptions)(rawOptions, context.root, sourceRoot, root);
22
- const compilation = (0, compile_webpack_1.compileWebpack)(options, context);
23
- try {
24
- for (var _d = true, compilation_1 = tslib_1.__asyncValues(compilation), compilation_1_1; compilation_1_1 = yield compilation_1.next(), _a = compilation_1_1.done, !_a; _d = true) {
25
- _c = compilation_1_1.value;
26
- _d = false;
27
- const result = _c;
28
- if (!result.success) {
29
- throw new Error(`Failed to compile files for project ${context.projectName}.`);
31
+ if (fileExists(`${options.projectRoot}/src/index.ts`)) {
32
+ const compilation = (0, compile_webpack_1.compileWebpack)(options, context);
33
+ try {
34
+ for (var _d = true, compilation_1 = tslib_1.__asyncValues(compilation), compilation_1_1; compilation_1_1 = yield compilation_1.next(), _a = compilation_1_1.done, !_a; _d = true) {
35
+ _c = compilation_1_1.value;
36
+ _d = false;
37
+ const result = _c;
38
+ if (!result.success) {
39
+ throw new Error(`Failed to compile files for project ${context.projectName}.`);
40
+ }
30
41
  }
31
42
  }
32
- }
33
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
34
- finally {
35
- try {
36
- if (!_d && !_a && (_b = compilation_1.return)) yield _b.call(compilation_1);
43
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
44
+ finally {
45
+ try {
46
+ if (!_d && !_a && (_b = compilation_1.return)) yield _b.call(compilation_1);
47
+ }
48
+ finally { if (e_1) throw e_1.error; }
37
49
  }
38
- finally { if (e_1) throw e_1.error; }
39
50
  }
40
51
  (0, copy_forge_app_assets_1.copyForgeAppAssets)(options);
41
52
  const customUIResources = yield (0, process_custom_ui_dependencies_1.processCustomUIDependencies)(options, context);
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/nx-forge/src/executors/build/executor.ts"],"names":[],"mappings":";;;AACA,uCAAoC;AAEpC,+DAA2D;AAC3D,yFAAmF;AACnF,iEAA4D;AAC5D,uEAAkE;AAClE,2DAAuD;AACvD,uEAAiE;AAEjE,SAA8B,WAAW,CACvC,UAAgC,EAChC,OAAwB;;;QAExB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GACxB,OAAO,CAAC,sBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAY,CAAC,CAAC;QAEjE,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,eAAA,gBAAA,sBAAA,WAAW,CAAA,iBAAA,2FAAE;gBAAb,2BAAW;gBAAX,WAAW;gBAA3B,MAAM,MAAM,KAAA,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,iBAAiB,GAAG,MAAM,IAAA,4DAA2B,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9E,MAAM,IAAA,qCAAgB,EAAC,OAAO,CAAC,CAAC;QAChC,IAAA,2CAAmB,EACjB,OAAO,CAAC,WAAY,EACpB,OAAO,CAAC,YAAa,EACrB,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,eAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;;CACH;AAxCD,8BAwCC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/nx-forge/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAAA,qCAA6C;AAE7C,uCAAoC;AAEpC,+DAA2D;AAC3D,yFAAmF;AACnF,iEAA4D;AAC5D,uEAAkE;AAClE,2DAAuD;AACvD,uEAAiE;AAEjE,SAAS,UAAU,CAAC,IAAc;IAChC,IAAI;QACF,OA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AAC,WAAY,EACpB,OAAO,CAAC,YAAa,EACrB,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,eAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;;CACH;AA1CD,8BA0CC"}
@@ -53,13 +53,13 @@
53
53
  "babelJest": {
54
54
  "type": "boolean",
55
55
  "description": "Use `babel` instead of `ts-jest`.",
56
- "default": false
56
+ "default": false,
57
+ "x-deprecated": "Use --swcJest instead for faster compilation"
57
58
  },
58
59
  "js": {
59
60
  "type": "boolean",
60
61
  "description": "Generate JavaScript files rather than TypeScript files.",
61
- "default": false,
62
- "x-deprecated": "Use --swcJest instead for faster compilation"
62
+ "default": false
63
63
  },
64
64
  "setParserOptionsProject": {
65
65
  "type": "boolean",