@powerlines/nx 0.11.221 → 0.11.223
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 +21 -0
- package/dist/{src/base/base-executor.d.ts → base-executor-BKuqWAnc.d.mts} +14 -12
- package/dist/base-executor-BKuqWAnc.d.mts.map +1 -0
- package/dist/base-executor-CL9md5FK.d.cts +28 -0
- package/dist/base-executor-CL9md5FK.d.cts.map +1 -0
- package/dist/base-executor-DIVmWt0_.mjs +76 -0
- package/dist/base-executor-DIVmWt0_.mjs.map +1 -0
- package/dist/base-executor-hfeykVFL.cjs +83 -0
- package/dist/base-executor.schema-CH9f7UZz.d.cts +131 -0
- package/dist/base-executor.schema-CH9f7UZz.d.cts.map +1 -0
- package/dist/base-executor.schema-LJ14f-QU.d.mts +131 -0
- package/dist/base-executor.schema-LJ14f-QU.d.mts.map +1 -0
- package/dist/base-executor.untyped-Bet42T8_.mjs +139 -0
- package/dist/base-executor.untyped-Bet42T8_.mjs.map +1 -0
- package/dist/base-executor.untyped-DUgXmZji.cjs +144 -0
- package/dist/chunk-CbDLau6x.cjs +34 -0
- package/dist/constants-BHT2TeEj.cjs +39 -0
- package/dist/constants-DPeeG_si.mjs +34 -0
- package/dist/constants-DPeeG_si.mjs.map +1 -0
- package/dist/executor-9aTY5L1O.d.mts +155 -0
- package/dist/executor-9aTY5L1O.d.mts.map +1 -0
- package/dist/executor-BA-Xvw_2.cjs +23 -0
- package/dist/executor-BDu-MfKS.d.cts +155 -0
- package/dist/executor-BDu-MfKS.d.cts.map +1 -0
- package/dist/executor-BaJuosQ2.d.cts +139 -0
- package/dist/executor-BaJuosQ2.d.cts.map +1 -0
- package/dist/executor-BerELzzO.d.cts +165 -0
- package/dist/executor-BerELzzO.d.cts.map +1 -0
- package/dist/executor-C12a2R2m.d.mts +165 -0
- package/dist/executor-C12a2R2m.d.mts.map +1 -0
- package/dist/executor-CQoHBvIx.d.mts +155 -0
- package/dist/executor-CQoHBvIx.d.mts.map +1 -0
- package/dist/executor-CR4F9h0Q.mjs +13 -0
- package/dist/executor-CR4F9h0Q.mjs.map +1 -0
- package/dist/executor-CmOJDW7i.cjs +30 -0
- package/dist/executor-CsYeTG7f.d.mts +155 -0
- package/dist/executor-CsYeTG7f.d.mts.map +1 -0
- package/dist/executor-DXs-DQDq.cjs +23 -0
- package/dist/executor-DY3Q5btA.mjs +18 -0
- package/dist/executor-DY3Q5btA.mjs.map +1 -0
- package/dist/executor-DaM4shEF.d.mts +139 -0
- package/dist/executor-DaM4shEF.d.mts.map +1 -0
- package/dist/executor-DriX4F9a.mjs +13 -0
- package/dist/executor-DriX4F9a.mjs.map +1 -0
- package/dist/executor-DupYdy7P.cjs +23 -0
- package/dist/executor-_6Wimayo.d.cts +155 -0
- package/dist/executor-_6Wimayo.d.cts.map +1 -0
- package/dist/executor-dakLe5jY.mjs +13 -0
- package/dist/executor-dakLe5jY.mjs.map +1 -0
- package/dist/executor-gauQV_Qs.mjs +18 -0
- package/dist/executor-gauQV_Qs.mjs.map +1 -0
- package/dist/executor-q94V36zQ.d.cts +155 -0
- package/dist/executor-q94V36zQ.d.cts.map +1 -0
- package/dist/executor-tEMakUYi.cjs +30 -0
- package/dist/executors-C15iG1sF.mjs +1 -0
- package/dist/executors-D7478W2S.cjs +0 -0
- package/dist/executors-YbcSXKr5.d.mts +1 -0
- package/dist/executors-hX1C9GbI.d.cts +1 -0
- package/dist/executors.cjs +13 -0
- package/dist/executors.d.cts +9 -0
- package/dist/executors.d.mts +9 -11
- package/dist/executors.mjs +9 -9
- package/dist/generator-DeiwVUqC.mjs +11 -0
- package/dist/generator-DeiwVUqC.mjs.map +1 -0
- package/dist/generator-Dv37nXlF.d.cts +8 -0
- package/dist/generator-Dv37nXlF.d.cts.map +1 -0
- package/dist/generator-Uu2ErkQj.cjs +22 -0
- package/dist/generator-aA0eb35E.d.mts +8 -0
- package/dist/generator-aA0eb35E.d.mts.map +1 -0
- package/dist/generators-B8_tB0mD.d.cts +17 -0
- package/dist/generators-B8_tB0mD.d.cts.map +1 -0
- package/dist/generators-Bi9wzfNx.mjs +1 -0
- package/dist/generators-DymCAfYw.d.mts +17 -0
- package/dist/generators-DymCAfYw.d.mts.map +1 -0
- package/dist/generators-q39_jUCw.cjs +0 -0
- package/dist/generators.cjs +5 -0
- package/dist/generators.d.cts +3 -0
- package/dist/generators.d.mts +3 -19
- package/dist/generators.mjs +4 -3
- package/dist/index-BAMQksFF.d.mts +8 -0
- package/dist/index-BAMQksFF.d.mts.map +1 -0
- package/dist/index-C5yJ9lGj.d.cts +8 -0
- package/dist/index-C5yJ9lGj.d.cts.map +1 -0
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.mts +13 -16
- package/dist/index.mjs +14 -14
- package/dist/plugin-A9gAUguP.cjs +12 -0
- package/dist/plugin-CODFOru1.d.cts +243 -0
- package/dist/plugin-CODFOru1.d.cts.map +1 -0
- package/dist/plugin-Dbr_Q4yi.mjs +8 -0
- package/dist/plugin-Dbr_Q4yi.mjs.map +1 -0
- package/dist/plugin-DpjoI0QS.d.mts +243 -0
- package/dist/plugin-DpjoI0QS.d.mts.map +1 -0
- package/dist/plugin-utilities-Ci8AHf-K.mjs +347 -0
- package/dist/plugin-utilities-Ci8AHf-K.mjs.map +1 -0
- package/dist/plugin-utilities-Ddlc3SiI.cjs +366 -0
- package/dist/src/base/base-executor.cjs +3 -0
- package/dist/src/base/base-executor.d.cts +3 -0
- package/dist/src/base/base-executor.d.mts +3 -26
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/base-executor.schema.d.cjs +0 -0
- package/dist/src/base/base-executor.schema.d.cts +2 -0
- package/dist/src/base/base-executor.schema.d.mts +2 -0
- package/dist/src/base/base-executor.untyped.cjs +3 -0
- package/dist/src/base/base-executor.untyped.d.cts +6 -0
- package/dist/src/base/base-executor.untyped.d.cts.map +1 -0
- package/dist/src/base/base-executor.untyped.d.mts +5 -3
- package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
- package/dist/src/base/base-executor.untyped.mjs +3 -2
- package/dist/src/executors/build/executor.cjs +6 -0
- package/dist/src/executors/build/executor.d.cts +4 -0
- package/dist/src/executors/build/executor.d.mts +4 -7
- package/dist/src/executors/build/executor.mjs +4 -4
- package/dist/src/executors/build/untyped.cjs +26 -0
- package/dist/src/executors/build/untyped.d.cts +6 -0
- package/dist/src/executors/build/untyped.d.cts.map +1 -0
- package/dist/src/executors/build/untyped.d.mts +5 -3
- package/dist/src/executors/build/untyped.d.mts.map +1 -0
- package/dist/src/executors/build/untyped.mjs +23 -30
- package/dist/src/executors/build/untyped.mjs.map +1 -0
- package/dist/src/executors/clean/executor.cjs +6 -0
- package/dist/src/executors/clean/executor.d.cts +4 -0
- package/dist/src/executors/clean/executor.d.mts +4 -7
- package/dist/src/executors/clean/executor.mjs +4 -4
- package/dist/src/executors/clean/untyped.cjs +17 -0
- package/dist/src/executors/clean/untyped.d.cts +6 -0
- package/dist/src/executors/clean/untyped.d.cts.map +1 -0
- package/dist/src/executors/clean/untyped.d.mts +5 -3
- package/dist/src/executors/clean/untyped.d.mts.map +1 -0
- package/dist/src/executors/clean/untyped.mjs +12 -10
- package/dist/src/executors/clean/untyped.mjs.map +1 -0
- package/dist/src/executors/docs/executor.cjs +6 -0
- package/dist/src/executors/docs/executor.d.cts +4 -0
- package/dist/src/executors/docs/executor.d.mts +4 -7
- package/dist/src/executors/docs/executor.mjs +4 -4
- package/dist/src/executors/docs/untyped.cjs +18 -0
- package/dist/src/executors/docs/untyped.d.cts +6 -0
- package/dist/src/executors/docs/untyped.d.cts.map +1 -0
- package/dist/src/executors/docs/untyped.d.mts +5 -3
- package/dist/src/executors/docs/untyped.d.mts.map +1 -0
- package/dist/src/executors/docs/untyped.mjs +15 -13
- package/dist/src/executors/docs/untyped.mjs.map +1 -0
- package/dist/src/executors/lint/executor.cjs +6 -0
- package/dist/src/executors/lint/executor.d.cts +4 -0
- package/dist/src/executors/lint/executor.d.mts +4 -7
- package/dist/src/executors/lint/executor.mjs +4 -4
- package/dist/src/executors/lint/untyped.cjs +18 -0
- package/dist/src/executors/lint/untyped.d.cts +6 -0
- package/dist/src/executors/lint/untyped.d.cts.map +1 -0
- package/dist/src/executors/lint/untyped.d.mts +5 -3
- package/dist/src/executors/lint/untyped.d.mts.map +1 -0
- package/dist/src/executors/lint/untyped.mjs +15 -13
- package/dist/src/executors/lint/untyped.mjs.map +1 -0
- package/dist/src/executors/prepare/executor.cjs +6 -0
- package/dist/src/executors/prepare/executor.d.cts +4 -0
- package/dist/src/executors/prepare/executor.d.mts +4 -7
- package/dist/src/executors/prepare/executor.mjs +4 -4
- package/dist/src/executors/prepare/untyped.cjs +4 -0
- package/dist/src/executors/prepare/untyped.d.cts +6 -0
- package/dist/src/executors/prepare/untyped.d.cts.map +1 -0
- package/dist/src/executors/prepare/untyped.d.mts +5 -3
- package/dist/src/executors/prepare/untyped.d.mts.map +1 -0
- package/dist/src/executors/prepare/untyped.mjs +4 -3
- package/dist/src/generators/sync/generator.cjs +5 -0
- package/dist/src/generators/sync/generator.d.cts +2 -0
- package/dist/src/generators/sync/generator.d.mts +2 -6
- package/dist/src/generators/sync/generator.mjs +3 -2
- package/dist/src/generators/sync/untyped.cjs +23 -0
- package/dist/src/generators/sync/untyped.d.cts +6 -0
- package/dist/src/generators/sync/untyped.d.cts.map +1 -0
- package/dist/src/generators/sync/untyped.d.mts +5 -3
- package/dist/src/generators/sync/untyped.d.mts.map +1 -0
- package/dist/src/generators/sync/untyped.mjs +18 -16
- package/dist/src/generators/sync/untyped.mjs.map +1 -0
- package/dist/src/helpers/constants.cjs +3 -0
- package/dist/src/helpers/{constants.d.ts → constants.d.cts} +3 -1
- package/dist/src/helpers/constants.d.cts.map +1 -0
- package/dist/src/helpers/constants.d.mts +3 -1
- package/dist/src/helpers/constants.d.mts.map +1 -0
- package/dist/src/helpers/constants.mjs +3 -2
- package/dist/src/helpers/plugin-utilities.cjs +6 -0
- package/dist/src/helpers/plugin-utilities.d.cts +58 -0
- package/dist/src/helpers/plugin-utilities.d.cts.map +1 -0
- package/dist/src/helpers/plugin-utilities.d.mts +34 -31
- package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
- package/dist/src/helpers/plugin-utilities.mjs +4 -4
- package/dist/src/plugin/index.cjs +5 -0
- package/dist/src/plugin/index.d.cts +3 -0
- package/dist/src/plugin/index.d.mts +3 -6
- package/dist/src/plugin/index.mjs +5 -5
- package/dist/src/types/plugin.cjs +0 -0
- package/dist/src/types/plugin.d.cts +2 -0
- package/dist/src/types/plugin.d.mts +2 -241
- package/dist/src/types/plugin.mjs +1 -1
- package/dist/untyped-BIEzjl_J.mjs +27 -0
- package/dist/untyped-BIEzjl_J.mjs.map +1 -0
- package/dist/untyped-DKPJSDgJ.cjs +32 -0
- package/executors.json +1 -1
- package/generators.json +1 -1
- package/package.json +117 -88
- package/dist/chunk-23KFTIT2.mjs +0 -1
- package/dist/chunk-326QB2VK.mjs +0 -14
- package/dist/chunk-3BI2YVJ3.js +0 -156
- package/dist/chunk-3D3MU5VP.js +0 -26
- package/dist/chunk-4OMPO3GC.mjs +0 -154
- package/dist/chunk-ADMWJVSB.js +0 -374
- package/dist/chunk-DXL4NVUO.js +0 -18
- package/dist/chunk-F4QJKUNK.js +0 -18
- package/dist/chunk-GCIPEE4T.mjs +0 -28
- package/dist/chunk-IC47MFKB.mjs +0 -29
- package/dist/chunk-IDXFQ2WL.mjs +0 -15
- package/dist/chunk-IOBDAGVL.js +0 -30
- package/dist/chunk-IQVSZEQ6.js +0 -31
- package/dist/chunk-N2YKXZ5R.js +0 -2
- package/dist/chunk-NB2KHU33.mjs +0 -19
- package/dist/chunk-NXR5JH7F.js +0 -10
- package/dist/chunk-O6YSETKJ.mjs +0 -4
- package/dist/chunk-P5X6KXLE.js +0 -26
- package/dist/chunk-PKGTRC56.mjs +0 -15
- package/dist/chunk-PMQ5YVLP.js +0 -18
- package/dist/chunk-R577MOZR.js +0 -4928
- package/dist/chunk-RBIHD4JS.mjs +0 -4900
- package/dist/chunk-RLODK6TM.js +0 -281
- package/dist/chunk-RLYU2FOM.mjs +0 -366
- package/dist/chunk-SHUYVCID.js +0 -6
- package/dist/chunk-SQV3SFA4.mjs +0 -8
- package/dist/chunk-UV4HQO3Y.mjs +0 -1
- package/dist/chunk-W75JGXP2.mjs +0 -260
- package/dist/chunk-WIPWBPB3.mjs +0 -19
- package/dist/chunk-WUJKJGEW.js +0 -17
- package/dist/chunk-XO62WWX4.js +0 -2
- package/dist/chunk-ZERXJ7S6.mjs +0 -15
- package/dist/executor-AQVlPFta.d.ts +0 -163
- package/dist/executor-BNmIhtpF.d.mts +0 -153
- package/dist/executor-C0A5mFLO.d.mts +0 -137
- package/dist/executor-Cep8-Y3A.d.mts +0 -153
- package/dist/executor-CkyahICv.d.ts +0 -137
- package/dist/executor-DOsxw-Ih.d.ts +0 -153
- package/dist/executor-DUQbjUVt.d.ts +0 -153
- package/dist/executor-O3MDQSFT.d.ts +0 -153
- package/dist/executor-U4mVkhQK.d.mts +0 -163
- package/dist/executor-Xt5qNzC5.d.mts +0 -153
- package/dist/executors.d.ts +0 -11
- package/dist/executors.js +0 -34
- package/dist/generators.d.ts +0 -19
- package/dist/generators.js +0 -16
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -51
- package/dist/src/base/base-executor.js +0 -12
- package/dist/src/base/base-executor.schema.d.d.mts +0 -129
- package/dist/src/base/base-executor.schema.d.d.ts +0 -129
- package/dist/src/base/base-executor.schema.d.js +0 -2
- package/dist/src/base/base-executor.schema.d.mjs +0 -1
- package/dist/src/base/base-executor.untyped.d.ts +0 -5
- package/dist/src/base/base-executor.untyped.js +0 -10
- package/dist/src/executors/build/executor.d.ts +0 -7
- package/dist/src/executors/build/executor.js +0 -19
- package/dist/src/executors/build/untyped.d.ts +0 -5
- package/dist/src/executors/build/untyped.js +0 -37
- package/dist/src/executors/clean/executor.d.ts +0 -7
- package/dist/src/executors/clean/executor.js +0 -19
- package/dist/src/executors/clean/untyped.d.ts +0 -5
- package/dist/src/executors/clean/untyped.js +0 -19
- package/dist/src/executors/docs/executor.d.ts +0 -7
- package/dist/src/executors/docs/executor.js +0 -19
- package/dist/src/executors/docs/untyped.d.ts +0 -5
- package/dist/src/executors/docs/untyped.js +0 -20
- package/dist/src/executors/lint/executor.d.ts +0 -7
- package/dist/src/executors/lint/executor.js +0 -19
- package/dist/src/executors/lint/untyped.d.ts +0 -5
- package/dist/src/executors/lint/untyped.js +0 -20
- package/dist/src/executors/prepare/executor.d.ts +0 -7
- package/dist/src/executors/prepare/executor.js +0 -19
- package/dist/src/executors/prepare/untyped.d.ts +0 -5
- package/dist/src/executors/prepare/untyped.js +0 -11
- package/dist/src/generators/sync/generator.d.ts +0 -6
- package/dist/src/generators/sync/generator.js +0 -17
- package/dist/src/generators/sync/untyped.d.ts +0 -5
- package/dist/src/generators/sync/untyped.js +0 -25
- package/dist/src/helpers/constants.js +0 -11
- package/dist/src/helpers/plugin-utilities.d.ts +0 -55
- package/dist/src/helpers/plugin-utilities.js +0 -21
- package/dist/src/plugin/index.d.ts +0 -6
- package/dist/src/plugin/index.js +0 -14
- package/dist/src/types/plugin.d.ts +0 -241
- package/dist/src/types/plugin.js +0 -2
package/dist/chunk-RLODK6TM.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
4
|
-
var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
|
|
5
|
-
var toArray = require('@stryke/convert/to-array');
|
|
6
|
-
var murmurhash = require('@stryke/hash/murmurhash');
|
|
7
|
-
var getUnique = require('@stryke/helpers/get-unique');
|
|
8
|
-
var append = require('@stryke/path/append');
|
|
9
|
-
var isType = require('@stryke/path/is-type');
|
|
10
|
-
var joinPaths = require('@stryke/path/join-paths');
|
|
11
|
-
var replace = require('@stryke/path/replace');
|
|
12
|
-
var isObject = require('@stryke/type-checks/is-object');
|
|
13
|
-
var isRegexp = require('@stryke/type-checks/is-regexp');
|
|
14
|
-
var isSetString = require('@stryke/type-checks/is-set-string');
|
|
15
|
-
var isString = require('@stryke/type-checks/is-string');
|
|
16
|
-
var join = require('@stryke/path/join');
|
|
17
|
-
var logger = require('@storm-software/config-tools/logger');
|
|
18
|
-
var types = require('@storm-software/config-tools/types');
|
|
19
|
-
var colors = require('@storm-software/config-tools/utilities/colors');
|
|
20
|
-
var noop = require('@stryke/helpers/noop');
|
|
21
|
-
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
22
|
-
var titleCase = require('@stryke/string-format/title-case');
|
|
23
|
-
var chalk = require('chalk');
|
|
24
|
-
var listFiles = require('@stryke/fs/list-files');
|
|
25
|
-
var isParentPath = require('@stryke/path/is-parent-path');
|
|
26
|
-
var prettier = require('prettier');
|
|
27
|
-
require('@stryke/fs/read-file');
|
|
28
|
-
var isSetObject = require('@stryke/type-checks/is-set-object');
|
|
29
|
-
require('magic-string');
|
|
30
|
-
var Diff = require('diff-match-patch');
|
|
31
|
-
require('@stryke/fs/write-file');
|
|
32
|
-
var getConfig = require('@storm-software/config-tools/get-config');
|
|
33
|
-
var exists = require('@stryke/fs/exists');
|
|
34
|
-
var isFunction = require('@stryke/type-checks/is-function');
|
|
35
|
-
var c12 = require('c12');
|
|
36
|
-
var defu = require('defu');
|
|
37
|
-
|
|
38
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
39
|
-
|
|
40
|
-
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
41
|
-
var Diff__default = /*#__PURE__*/_interopDefault(Diff);
|
|
42
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
43
|
-
|
|
44
|
-
// ../core/src/lib/constants/meta.ts
|
|
45
|
-
var ROOT_HASH_LENGTH = 45;
|
|
46
|
-
var CACHE_HASH_LENGTH = 62;
|
|
47
|
-
|
|
48
|
-
// ../core/src/lib/constants/environments.ts
|
|
49
|
-
var DEFAULT_ENVIRONMENT = "default";
|
|
50
|
-
var GLOBAL_ENVIRONMENT = "__global__";
|
|
51
|
-
function replacePathTokens(context, path) {
|
|
52
|
-
if (!path) {
|
|
53
|
-
return path;
|
|
54
|
-
}
|
|
55
|
-
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.root).replaceAll("{projectRoot}", context.config.root).replaceAll("{sourceRoot}", join.joinPaths(context.config.root, "src")).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
56
|
-
}
|
|
57
|
-
chunkSHUYVCID_js.__name(replacePathTokens, "replacePathTokens");
|
|
58
|
-
|
|
59
|
-
// ../core/src/lib/entry.ts
|
|
60
|
-
function resolveEntryOutput(context, typeDefinition) {
|
|
61
|
-
return replace.replaceExtension(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(typeDefinition.file, joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, "src")), joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root)), joinPaths.joinPaths(context.config.root, "src")), context.config.root), "src"));
|
|
62
|
-
}
|
|
63
|
-
chunkSHUYVCID_js.__name(resolveEntryOutput, "resolveEntryOutput");
|
|
64
|
-
function resolveEntry(context, typeDefinition, input, output) {
|
|
65
|
-
return {
|
|
66
|
-
...typeDefinition,
|
|
67
|
-
input: isSetString.isSetString(input) || isRegexp.isRegExp(input) ? {
|
|
68
|
-
file: String(input)
|
|
69
|
-
} : typeDefinition,
|
|
70
|
-
output: output || resolveEntryOutput(context, typeDefinition)
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
chunkSHUYVCID_js.__name(resolveEntry, "resolveEntry");
|
|
74
|
-
function isTypeDefinition(entry) {
|
|
75
|
-
return !isString.isString(entry) && entry.file !== void 0;
|
|
76
|
-
}
|
|
77
|
-
chunkSHUYVCID_js.__name(isTypeDefinition, "isTypeDefinition");
|
|
78
|
-
function isResolvedEntryTypeDefinition(entry) {
|
|
79
|
-
return !isRegexp.isRegExp(entry) && isTypeDefinition(entry) && entry.output !== void 0;
|
|
80
|
-
}
|
|
81
|
-
chunkSHUYVCID_js.__name(isResolvedEntryTypeDefinition, "isResolvedEntryTypeDefinition");
|
|
82
|
-
function resolveEntriesSync(context, typeDefinitions) {
|
|
83
|
-
return (isObject.isObject(typeDefinitions) ? Object.values(typeDefinitions).flat() : toArray.toArray(typeDefinitions)).map((entry) => {
|
|
84
|
-
if (isResolvedEntryTypeDefinition(entry)) {
|
|
85
|
-
return {
|
|
86
|
-
...entry,
|
|
87
|
-
output: entry.output ? replacePathTokens(context, entry.output) : void 0,
|
|
88
|
-
file: replacePathTokens(context, entry.file)
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
let typeDefinition;
|
|
92
|
-
if (isString.isString(entry)) {
|
|
93
|
-
typeDefinition = parseTypeDefinition.parseTypeDefinition(replacePathTokens(context, entry));
|
|
94
|
-
} else if (isRegexp.isRegExp(entry)) {
|
|
95
|
-
typeDefinition = {
|
|
96
|
-
file: replacePathTokens(context, entry.source)
|
|
97
|
-
};
|
|
98
|
-
} else {
|
|
99
|
-
typeDefinition = entry;
|
|
100
|
-
typeDefinition.file = replacePathTokens(context, typeDefinition.file);
|
|
101
|
-
}
|
|
102
|
-
const filePath = isType.isAbsolutePath(typeDefinition.file) ? typeDefinition.file : append.appendPath(typeDefinition.file, context.config.root);
|
|
103
|
-
if (context.fs.isFileSync(filePath)) {
|
|
104
|
-
return resolveEntry(context, {
|
|
105
|
-
file: append.appendPath(filePath, context.workspaceConfig.workspaceRoot),
|
|
106
|
-
name: typeDefinition.name
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return context.fs.globSync(append.appendPath(filePath, context.workspaceConfig.workspaceRoot)).map((file) => resolveEntry(context, {
|
|
110
|
-
file,
|
|
111
|
-
name: typeDefinition.name
|
|
112
|
-
}));
|
|
113
|
-
}).flat().filter(Boolean);
|
|
114
|
-
}
|
|
115
|
-
chunkSHUYVCID_js.__name(resolveEntriesSync, "resolveEntriesSync");
|
|
116
|
-
function getUniqueInputs(inputs = []) {
|
|
117
|
-
return isObject.isObject(inputs) ? inputs : getUnique.getUniqueBy(toArray.toArray(inputs), (item) => isSetString.isSetString(item) ? item : murmurhash.murmurhash(item ?? {}, {
|
|
118
|
-
maxLength: 24
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
chunkSHUYVCID_js.__name(getUniqueInputs, "getUniqueInputs");
|
|
122
|
-
var createLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((name, options = {}) => {
|
|
123
|
-
const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
|
|
124
|
-
if (logLevel === types.LogLevelLabel.SILENT) {
|
|
125
|
-
return noop.noop;
|
|
126
|
-
}
|
|
127
|
-
if (options.customLogger) {
|
|
128
|
-
return options.customLogger;
|
|
129
|
-
}
|
|
130
|
-
return (type, ...args) => logger.getLogFn(logger.getLogLevel(type), {
|
|
131
|
-
...options,
|
|
132
|
-
logLevel
|
|
133
|
-
})(`${chalk__default.default.bold.hex(colors.getColor("brand", options))(`${name ? kebabCase.kebabCase(name) : ""}${options.name ? `${name ? chalk__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
|
|
134
|
-
}, "createLog");
|
|
135
|
-
var BADGE_COLORS = [
|
|
136
|
-
"#00A0DD",
|
|
137
|
-
"#6FCE4E",
|
|
138
|
-
"#FBBF24",
|
|
139
|
-
"#F43F5E",
|
|
140
|
-
"#3B82F6",
|
|
141
|
-
"#A855F7",
|
|
142
|
-
"#469592",
|
|
143
|
-
"#288EDF",
|
|
144
|
-
"#D8B4FE",
|
|
145
|
-
"#10B981",
|
|
146
|
-
"#EF4444",
|
|
147
|
-
"#F0EC56",
|
|
148
|
-
"#F472B6",
|
|
149
|
-
"#22D3EE",
|
|
150
|
-
"#EAB308",
|
|
151
|
-
"#84CC16",
|
|
152
|
-
"#F87171",
|
|
153
|
-
"#0EA5E9",
|
|
154
|
-
"#D946EF",
|
|
155
|
-
"#FACC15",
|
|
156
|
-
"#34D399",
|
|
157
|
-
"#8B5CF6"
|
|
158
|
-
];
|
|
159
|
-
var extendLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((logFn, name) => {
|
|
160
|
-
return (type, ...args) => logFn(type, ` ${chalk__default.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name)} `)} ${args.join(" ")} `);
|
|
161
|
-
}, "extendLog");
|
|
162
|
-
function getBaseFileHeader(context) {
|
|
163
|
-
return `
|
|
164
|
-
// Generated with ${titleCase.titleCase(context.config.framework)}
|
|
165
|
-
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
166
|
-
`;
|
|
167
|
-
}
|
|
168
|
-
chunkSHUYVCID_js.__name(getBaseFileHeader, "getBaseFileHeader");
|
|
169
|
-
function getFileHeader(context, options = {}) {
|
|
170
|
-
const { directive = null, prettierIgnore = false } = options;
|
|
171
|
-
return `/* eslint-disable */
|
|
172
|
-
// biome-ignore lint: disable
|
|
173
|
-
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `
|
|
174
|
-
|
|
175
|
-
${directive}
|
|
176
|
-
` : "\n"}
|
|
177
|
-
${getBaseFileHeader(context)}
|
|
178
|
-
|
|
179
|
-
`;
|
|
180
|
-
}
|
|
181
|
-
chunkSHUYVCID_js.__name(getFileHeader, "getFileHeader");
|
|
182
|
-
async function format(context, path, data, force = false) {
|
|
183
|
-
if (!force && (isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) {
|
|
184
|
-
return data;
|
|
185
|
-
}
|
|
186
|
-
let code = data;
|
|
187
|
-
const resolvedConfig = await prettier.resolveConfig(path);
|
|
188
|
-
if (resolvedConfig) {
|
|
189
|
-
code = await prettier.format(data, {
|
|
190
|
-
absolutePath: path,
|
|
191
|
-
...resolvedConfig
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
return code;
|
|
195
|
-
}
|
|
196
|
-
chunkSHUYVCID_js.__name(format, "format");
|
|
197
|
-
async function formatFolder(context, path) {
|
|
198
|
-
if (!isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
|
|
199
|
-
await Promise.allSettled((await listFiles.listFiles(path)).map(async (file) => {
|
|
200
|
-
if (!isParentPath.isParentPath(file, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(file, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
|
|
201
|
-
const data = await context.fs.read(file);
|
|
202
|
-
if (data) {
|
|
203
|
-
const formatted = await format(context, file, data);
|
|
204
|
-
return context.fs.write(file, formatted);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}));
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
chunkSHUYVCID_js.__name(formatFolder, "formatFolder");
|
|
211
|
-
new Diff__default.default();
|
|
212
|
-
async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
213
|
-
return defu__default.default({
|
|
214
|
-
workspaceRoot
|
|
215
|
-
}, await getConfig.getWorkspaceConfig(true, {
|
|
216
|
-
cwd,
|
|
217
|
-
workspaceRoot,
|
|
218
|
-
useDefault: true
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
chunkSHUYVCID_js.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
|
|
222
|
-
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
|
|
223
|
-
let resolvedUserConfig = {};
|
|
224
|
-
let resolvedUserConfigFile;
|
|
225
|
-
if (configFile) {
|
|
226
|
-
resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
|
|
227
|
-
}
|
|
228
|
-
if (!resolvedUserConfigFile) {
|
|
229
|
-
resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
230
|
-
}
|
|
231
|
-
if (resolvedUserConfigFile) {
|
|
232
|
-
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
233
|
-
if (resolved) {
|
|
234
|
-
let config = {};
|
|
235
|
-
if (isFunction.isFunction(resolved)) {
|
|
236
|
-
config = await Promise.resolve(resolved({
|
|
237
|
-
command,
|
|
238
|
-
mode,
|
|
239
|
-
isSsrBuild: false,
|
|
240
|
-
isPreview: false
|
|
241
|
-
}));
|
|
242
|
-
}
|
|
243
|
-
if (isSetObject.isSetObject(config)) {
|
|
244
|
-
resolvedUserConfig = {
|
|
245
|
-
...config,
|
|
246
|
-
config,
|
|
247
|
-
configFile: resolvedUserConfigFile
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
const result = await c12.loadConfig({
|
|
253
|
-
cwd: projectRoot,
|
|
254
|
-
name: framework,
|
|
255
|
-
envName: mode,
|
|
256
|
-
globalRc: true,
|
|
257
|
-
packageJson: true,
|
|
258
|
-
dotenv: true,
|
|
259
|
-
jiti
|
|
260
|
-
});
|
|
261
|
-
return defu__default.default(resolvedUserConfig, isSetObject.isSetObject(result?.config) ? {
|
|
262
|
-
...result.config,
|
|
263
|
-
...result
|
|
264
|
-
} : {});
|
|
265
|
-
}
|
|
266
|
-
chunkSHUYVCID_js.__name(loadUserConfigFile, "loadUserConfigFile");
|
|
267
|
-
|
|
268
|
-
exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
|
|
269
|
-
exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
|
|
270
|
-
exports.GLOBAL_ENVIRONMENT = GLOBAL_ENVIRONMENT;
|
|
271
|
-
exports.ROOT_HASH_LENGTH = ROOT_HASH_LENGTH;
|
|
272
|
-
exports.createLog = createLog;
|
|
273
|
-
exports.extendLog = extendLog;
|
|
274
|
-
exports.format = format;
|
|
275
|
-
exports.formatFolder = formatFolder;
|
|
276
|
-
exports.getFileHeader = getFileHeader;
|
|
277
|
-
exports.getUniqueInputs = getUniqueInputs;
|
|
278
|
-
exports.loadUserConfigFile = loadUserConfigFile;
|
|
279
|
-
exports.loadWorkspaceConfig = loadWorkspaceConfig;
|
|
280
|
-
exports.replacePathTokens = replacePathTokens;
|
|
281
|
-
exports.resolveEntriesSync = resolveEntriesSync;
|
package/dist/chunk-RLYU2FOM.mjs
DELETED
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
import { ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-W75JGXP2.mjs';
|
|
2
|
-
import { CONFIG_INPUTS } from './chunk-IC47MFKB.mjs';
|
|
3
|
-
import { __name } from './chunk-O6YSETKJ.mjs';
|
|
4
|
-
import { createNodesFromFiles } from '@nx/devkit';
|
|
5
|
-
import { withNamedInputs } from '@storm-software/workspace-tools/utils/nx-json';
|
|
6
|
-
import { getProjectRoot, getRoot, getProjectConfigFromProjectRoot } from '@storm-software/workspace-tools/utils/plugin-helpers';
|
|
7
|
-
import { setDefaultProjectTags, addProjectTag } from '@storm-software/workspace-tools/utils/project-tags';
|
|
8
|
-
import { getEnvPaths } from '@stryke/env/get-env-paths';
|
|
9
|
-
import { existsSync } from '@stryke/fs/exists';
|
|
10
|
-
import { murmurhash } from '@stryke/hash/murmurhash';
|
|
11
|
-
import { joinPaths } from '@stryke/path/join-paths';
|
|
12
|
-
import { kebabCase } from '@stryke/string-format/kebab-case';
|
|
13
|
-
import { titleCase } from '@stryke/string-format/title-case';
|
|
14
|
-
import { isError } from '@stryke/type-checks/is-error';
|
|
15
|
-
import { isSetObject } from '@stryke/type-checks/is-set-object';
|
|
16
|
-
import defu from 'defu';
|
|
17
|
-
import { createJiti } from 'jiti';
|
|
18
|
-
import { readFile } from 'node:fs/promises';
|
|
19
|
-
import { readNxJson } from 'nx/src/config/nx-json.js';
|
|
20
|
-
import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
|
|
21
|
-
|
|
22
|
-
function getNxTargetInputs(framework) {
|
|
23
|
-
return CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
|
|
24
|
-
}
|
|
25
|
-
__name(getNxTargetInputs, "getNxTargetInputs");
|
|
26
|
-
function getNxPluginInputs(framework) {
|
|
27
|
-
return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
|
|
28
|
-
}
|
|
29
|
-
__name(getNxPluginInputs, "getNxPluginInputs");
|
|
30
|
-
function createNxPlugin(opts) {
|
|
31
|
-
const framework = opts?.framework || "powerlines";
|
|
32
|
-
const title = `${titleCase(framework)} Nx Plugin`;
|
|
33
|
-
try {
|
|
34
|
-
const name = opts?.name || `${framework}/nx/plugin`;
|
|
35
|
-
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
36
|
-
const targetInputs = getNxTargetInputs(framework);
|
|
37
|
-
const pluginInputs = getNxPluginInputs(framework);
|
|
38
|
-
return [
|
|
39
|
-
pluginInputs,
|
|
40
|
-
async (configFiles, options, contextV2) => {
|
|
41
|
-
if (options?.verboseOutput) {
|
|
42
|
-
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
|
|
43
|
-
}
|
|
44
|
-
const envPaths = getEnvPaths({
|
|
45
|
-
orgId: "storm-software",
|
|
46
|
-
appId: framework,
|
|
47
|
-
workspaceRoot: contextV2.workspaceRoot
|
|
48
|
-
});
|
|
49
|
-
if (!envPaths.cache) {
|
|
50
|
-
throw new Error("The cache directory could not be determined.");
|
|
51
|
-
}
|
|
52
|
-
const nxJson = readNxJson(contextV2.workspaceRoot);
|
|
53
|
-
const resolver = createJiti(contextV2.workspaceRoot, {
|
|
54
|
-
debug: !!options?.debug,
|
|
55
|
-
interopDefault: true,
|
|
56
|
-
fsCache: joinPaths(envPaths.cache, "nx-plugin", murmurhash(contextV2.workspaceRoot, {
|
|
57
|
-
maxLength: ROOT_HASH_LENGTH
|
|
58
|
-
}), "jiti"),
|
|
59
|
-
moduleCache: true
|
|
60
|
-
});
|
|
61
|
-
return createNodesFromFiles(async (configFile, _, context) => {
|
|
62
|
-
try {
|
|
63
|
-
const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
|
|
64
|
-
if (!projectRoot) {
|
|
65
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
66
|
-
return {};
|
|
67
|
-
}
|
|
68
|
-
const root = getRoot(projectRoot, context);
|
|
69
|
-
if (options?.verboseOutput) {
|
|
70
|
-
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
71
|
-
}
|
|
72
|
-
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
73
|
-
if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
74
|
-
if (options?.verboseOutput) {
|
|
75
|
-
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
76
|
-
}
|
|
77
|
-
return {};
|
|
78
|
-
}
|
|
79
|
-
const packageJsonContent = await readFile(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
80
|
-
if (!packageJsonContent) {
|
|
81
|
-
if (options?.verboseOutput) {
|
|
82
|
-
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
83
|
-
}
|
|
84
|
-
return {};
|
|
85
|
-
}
|
|
86
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
87
|
-
if (!userConfig.configFile && !packageJson?.storm) {
|
|
88
|
-
if (options?.verboseOutput) {
|
|
89
|
-
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
90
|
-
}
|
|
91
|
-
return {};
|
|
92
|
-
}
|
|
93
|
-
const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
|
|
94
|
-
if (!projectConfig) {
|
|
95
|
-
if (options?.verboseOutput) {
|
|
96
|
-
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
97
|
-
}
|
|
98
|
-
return {};
|
|
99
|
-
}
|
|
100
|
-
const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
101
|
-
if (options?.verboseOutput) {
|
|
102
|
-
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
103
|
-
}
|
|
104
|
-
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
|
|
105
|
-
targets[options?.clean?.targetName || "clean"] = {
|
|
106
|
-
cache: true,
|
|
107
|
-
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [
|
|
108
|
-
options?.clean?.inputs || "typescript"
|
|
109
|
-
]),
|
|
110
|
-
outputs: options?.clean?.outputs,
|
|
111
|
-
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
112
|
-
dependsOn: options?.clean?.dependsOn ?? [
|
|
113
|
-
`^${options?.clean?.targetName || "clean"}`
|
|
114
|
-
],
|
|
115
|
-
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
116
|
-
options: {
|
|
117
|
-
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
118
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
119
|
-
autoInstall: userConfig.autoInstall
|
|
120
|
-
},
|
|
121
|
-
configurations: {
|
|
122
|
-
production: {
|
|
123
|
-
mode: "production"
|
|
124
|
-
},
|
|
125
|
-
test: {
|
|
126
|
-
mode: "test"
|
|
127
|
-
},
|
|
128
|
-
development: {
|
|
129
|
-
mode: "development",
|
|
130
|
-
skipCache: true
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) {
|
|
136
|
-
targets[options?.prepare?.targetName || "prepare"] = {
|
|
137
|
-
cache: true,
|
|
138
|
-
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : withNamedInputs(targetInputs, [
|
|
139
|
-
options?.prepare?.inputs || "typescript"
|
|
140
|
-
]),
|
|
141
|
-
outputs: options?.prepare?.outputs ?? [
|
|
142
|
-
artifactsFolder
|
|
143
|
-
],
|
|
144
|
-
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
145
|
-
dependsOn: options?.prepare?.dependsOn ?? [
|
|
146
|
-
`^${options?.prepare?.targetName || "build"}`,
|
|
147
|
-
options?.clean !== false && `${options?.clean?.targetName || "clean"}`
|
|
148
|
-
].filter(Boolean),
|
|
149
|
-
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
150
|
-
options: {
|
|
151
|
-
input: userConfig.input,
|
|
152
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
153
|
-
autoInstall: userConfig.autoInstall,
|
|
154
|
-
skipCache: userConfig.skipCache
|
|
155
|
-
},
|
|
156
|
-
configurations: {
|
|
157
|
-
production: {
|
|
158
|
-
mode: "production"
|
|
159
|
-
},
|
|
160
|
-
test: {
|
|
161
|
-
mode: "test"
|
|
162
|
-
},
|
|
163
|
-
development: {
|
|
164
|
-
mode: "development",
|
|
165
|
-
skipCache: true
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) {
|
|
171
|
-
targets[options?.build?.targetName || "build"] = {
|
|
172
|
-
cache: true,
|
|
173
|
-
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [
|
|
174
|
-
options?.build?.inputs || "typescript"
|
|
175
|
-
]),
|
|
176
|
-
outputs: options?.build?.outputs ?? [
|
|
177
|
-
"{options.outputPath}"
|
|
178
|
-
],
|
|
179
|
-
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
180
|
-
dependsOn: options?.build?.dependsOn ?? [
|
|
181
|
-
`^${options?.build?.targetName || "build"}`,
|
|
182
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
183
|
-
].filter(Boolean),
|
|
184
|
-
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
185
|
-
options: {
|
|
186
|
-
input: userConfig.input,
|
|
187
|
-
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
188
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
189
|
-
autoInstall: userConfig.autoInstall,
|
|
190
|
-
skipCache: userConfig.skipCache
|
|
191
|
-
},
|
|
192
|
-
configurations: {
|
|
193
|
-
production: {
|
|
194
|
-
mode: "production"
|
|
195
|
-
},
|
|
196
|
-
test: {
|
|
197
|
-
mode: "test"
|
|
198
|
-
},
|
|
199
|
-
development: {
|
|
200
|
-
mode: "development",
|
|
201
|
-
skipCache: true
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) {
|
|
207
|
-
targets[options?.lint?.targetName || "lint"] = {
|
|
208
|
-
cache: true,
|
|
209
|
-
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([
|
|
210
|
-
...targetInputs,
|
|
211
|
-
artifactsFolder
|
|
212
|
-
], options?.lint?.inputs ? [
|
|
213
|
-
options.lint.inputs
|
|
214
|
-
] : [
|
|
215
|
-
"linting",
|
|
216
|
-
"typescript"
|
|
217
|
-
]),
|
|
218
|
-
outputs: options?.lint?.outputs ?? [
|
|
219
|
-
"{options.outputPath}"
|
|
220
|
-
],
|
|
221
|
-
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
222
|
-
dependsOn: options?.lint?.dependsOn ?? [
|
|
223
|
-
`^${options?.lint?.targetName || "lint"}`,
|
|
224
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
225
|
-
].filter(Boolean),
|
|
226
|
-
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
227
|
-
options: {
|
|
228
|
-
input: userConfig.input,
|
|
229
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
230
|
-
autoInstall: userConfig.autoInstall,
|
|
231
|
-
skipCache: userConfig.skipCache
|
|
232
|
-
},
|
|
233
|
-
configurations: {
|
|
234
|
-
production: {
|
|
235
|
-
mode: "production"
|
|
236
|
-
},
|
|
237
|
-
test: {
|
|
238
|
-
mode: "test"
|
|
239
|
-
},
|
|
240
|
-
development: {
|
|
241
|
-
mode: "development",
|
|
242
|
-
skipCache: true
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) {
|
|
248
|
-
targets[options?.docs?.targetName || "docs"] = {
|
|
249
|
-
cache: true,
|
|
250
|
-
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : withNamedInputs([
|
|
251
|
-
...targetInputs,
|
|
252
|
-
artifactsFolder
|
|
253
|
-
], options?.docs?.inputs ? [
|
|
254
|
-
options.docs.inputs
|
|
255
|
-
] : [
|
|
256
|
-
"documentation",
|
|
257
|
-
"typescript"
|
|
258
|
-
]),
|
|
259
|
-
outputs: options?.docs?.outputs ?? [
|
|
260
|
-
"{options.outputPath}"
|
|
261
|
-
],
|
|
262
|
-
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
263
|
-
dependsOn: options?.docs?.dependsOn ?? [
|
|
264
|
-
`^${options?.docs?.targetName || "docs"}`,
|
|
265
|
-
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
266
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
267
|
-
].filter(Boolean),
|
|
268
|
-
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
269
|
-
options: {
|
|
270
|
-
input: userConfig.input,
|
|
271
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
272
|
-
autoInstall: userConfig.autoInstall,
|
|
273
|
-
skipCache: userConfig.skipCache
|
|
274
|
-
},
|
|
275
|
-
configurations: {
|
|
276
|
-
production: {
|
|
277
|
-
mode: "production"
|
|
278
|
-
},
|
|
279
|
-
test: {
|
|
280
|
-
mode: "test"
|
|
281
|
-
},
|
|
282
|
-
development: {
|
|
283
|
-
mode: "development",
|
|
284
|
-
skipCache: true
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) {
|
|
290
|
-
targets[options?.deploy?.targetName || "deploy"] = {
|
|
291
|
-
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : withNamedInputs([
|
|
292
|
-
...targetInputs,
|
|
293
|
-
artifactsFolder
|
|
294
|
-
], options?.deploy?.inputs ? [
|
|
295
|
-
options.deploy.inputs
|
|
296
|
-
] : [
|
|
297
|
-
"documentation",
|
|
298
|
-
"typescript"
|
|
299
|
-
]),
|
|
300
|
-
outputs: options?.deploy?.outputs ?? [
|
|
301
|
-
"{options.outputPath}"
|
|
302
|
-
],
|
|
303
|
-
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
304
|
-
dependsOn: options?.deploy?.dependsOn ?? [
|
|
305
|
-
`^${options?.deploy?.targetName || "deploy"}`,
|
|
306
|
-
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
307
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
308
|
-
].filter(Boolean),
|
|
309
|
-
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
310
|
-
options: {
|
|
311
|
-
input: userConfig.input,
|
|
312
|
-
projectType: projectConfig.projectType || userConfig.projectType,
|
|
313
|
-
autoInstall: userConfig.autoInstall,
|
|
314
|
-
skipCache: userConfig.skipCache
|
|
315
|
-
},
|
|
316
|
-
configurations: {
|
|
317
|
-
production: {
|
|
318
|
-
mode: "production"
|
|
319
|
-
},
|
|
320
|
-
test: {
|
|
321
|
-
mode: "test"
|
|
322
|
-
},
|
|
323
|
-
development: {
|
|
324
|
-
mode: "development",
|
|
325
|
-
skipCache: true
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
setDefaultProjectTags(projectConfig, name);
|
|
331
|
-
addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
|
|
332
|
-
overwrite: true
|
|
333
|
-
});
|
|
334
|
-
if (options?.verboseOutput) {
|
|
335
|
-
console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
336
|
-
}
|
|
337
|
-
return {
|
|
338
|
-
projects: {
|
|
339
|
-
[root]: defu(projectConfig, {
|
|
340
|
-
name: kebabCase(userConfig.name),
|
|
341
|
-
projectType: userConfig.projectType || "library",
|
|
342
|
-
root,
|
|
343
|
-
sourceRoot: joinPaths(root, "src"),
|
|
344
|
-
targets
|
|
345
|
-
})
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
} catch (error) {
|
|
349
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
|
|
350
|
-
throw new Error(`The ${title} failed to process the project configuration for file ${configFile}. See previous logs for more details.`, {
|
|
351
|
-
cause: error instanceof Error ? error : void 0
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
}, configFiles, options, contextV2);
|
|
355
|
-
}
|
|
356
|
-
];
|
|
357
|
-
} catch (error) {
|
|
358
|
-
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
359
|
-
throw new Error(`Failed to initialize the ${title}. See previous logs for more details.`, {
|
|
360
|
-
cause: error instanceof Error ? error : void 0
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
__name(createNxPlugin, "createNxPlugin");
|
|
365
|
-
|
|
366
|
-
export { createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
package/dist/chunk-SHUYVCID.js
DELETED
package/dist/chunk-SQV3SFA4.mjs
DELETED
package/dist/chunk-UV4HQO3Y.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|