@shell-shock/nx 0.0.79 → 0.0.80
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 +10 -0
- package/dist/base/base-executor.schema.d.ts +16 -4
- package/dist/base/base-executor.schema.json +20 -13
- package/dist/{base-executor-CXGfAvut.mjs → base-executor-DxPjWb68.mjs} +28 -14
- package/dist/base-executor-DxPjWb68.mjs.map +1 -0
- package/dist/{base-executor-CjzYhdJI.js → base-executor-X4qL_j3i.js} +27 -13
- package/dist/executors/build/executor.d.mts +14 -4
- package/dist/executors/build/executor.d.mts.map +1 -1
- package/dist/executors/build/executor.d.ts +14 -4
- package/dist/executors/build/executor.d.ts.map +1 -1
- package/dist/executors/build/executor.js +1 -1
- package/dist/executors/build/executor.mjs +1 -1
- package/dist/executors/build/executor.mjs.map +1 -1
- package/dist/executors/build/schema.d.ts +16 -4
- package/dist/executors/build/schema.json +20 -13
- package/dist/executors/clean/executor.d.mts +14 -4
- package/dist/executors/clean/executor.d.mts.map +1 -1
- package/dist/executors/clean/executor.d.ts +14 -4
- package/dist/executors/clean/executor.d.ts.map +1 -1
- package/dist/executors/clean/executor.js +1 -1
- package/dist/executors/clean/executor.mjs +1 -1
- package/dist/executors/clean/schema.d.ts +16 -4
- package/dist/executors/clean/schema.json +20 -13
- package/dist/executors/docs/executor.d.mts +14 -4
- package/dist/executors/docs/executor.d.mts.map +1 -1
- package/dist/executors/docs/executor.d.ts +14 -4
- package/dist/executors/docs/executor.d.ts.map +1 -1
- package/dist/executors/docs/executor.js +1 -1
- package/dist/executors/docs/executor.mjs +1 -1
- package/dist/executors/docs/schema.d.ts +16 -4
- package/dist/executors/docs/schema.json +20 -13
- package/dist/executors/lint/executor.d.mts +14 -4
- package/dist/executors/lint/executor.d.mts.map +1 -1
- package/dist/executors/lint/executor.d.ts +14 -4
- package/dist/executors/lint/executor.d.ts.map +1 -1
- package/dist/executors/lint/executor.js +1 -1
- package/dist/executors/lint/executor.mjs +1 -1
- package/dist/executors/lint/schema.d.ts +16 -4
- package/dist/executors/lint/schema.json +20 -13
- package/dist/executors/prepare/executor.d.mts +14 -4
- package/dist/executors/prepare/executor.d.mts.map +1 -1
- package/dist/executors/prepare/executor.d.ts +14 -4
- package/dist/executors/prepare/executor.d.ts.map +1 -1
- package/dist/executors/prepare/executor.js +1 -1
- package/dist/executors/prepare/executor.mjs +1 -1
- package/dist/executors/prepare/schema.d.ts +16 -4
- package/dist/executors/prepare/schema.json +20 -13
- package/dist/index.d.mts +14 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugin/index.d.mts +1 -1
- package/dist/plugin/index.d.mts.map +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +128 -24
- package/dist/plugin/index.mjs +128 -24
- package/dist/plugin/index.mjs.map +1 -1
- package/docs/api/base-executor.schema.md +11 -4
- package/docs/api/build/schema.md +11 -4
- package/docs/api/clean/schema.md +11 -4
- package/docs/api/docs/schema.md +11 -4
- package/docs/api/lint/schema.md +11 -4
- package/docs/api/prepare/schema.md +11 -4
- package/package.json +16 -16
- package/dist/base-executor-CXGfAvut.mjs.map +0 -1
package/dist/plugin/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
|
19
19
|
import { readNxJson } from "nx/src/config/nx-json.js";
|
|
20
20
|
import { readTargetsFromPackageJson } from "nx/src/utils/package-json.js";
|
|
21
21
|
|
|
22
|
-
//#region ../../node_modules/.pnpm/@powerlines+nx@0.
|
|
22
|
+
//#region ../../node_modules/.pnpm/@powerlines+nx@0.13.22_37905bc55cd94c2f54b3276dd4704cf6/node_modules/@powerlines/nx/dist/src/helpers/constants.mjs
|
|
23
23
|
/**
|
|
24
24
|
* A list of Nx input strings that describe the Powerlines configuration file
|
|
25
25
|
*/
|
|
@@ -51,14 +51,109 @@ const CONFIG_INPUTS = [
|
|
|
51
51
|
];
|
|
52
52
|
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
54
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/ci-checks.mjs
|
|
55
|
+
/**
|
|
56
|
+
* Returns true if the current environment is a CI environment.
|
|
57
|
+
*
|
|
58
|
+
* @returns True if the current environment is a CI environment.
|
|
59
|
+
*/
|
|
60
|
+
const isCI = (env = process.env) => {
|
|
61
|
+
return Boolean(env.STORM_CI || env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || env.AGOLA_GIT_REF || env.AC_APPCIRCLE || env.APPVEYOR || env.CODEBUILD || env.TF_BUILD || env.bamboo_planKey || env.BITBUCKET_COMMIT || env.BITRISE_IO || env.BUDDY_WORKSPACE_ID || env.BUILDKITE || env.CIRCLECI || env.CIRRUS_CI || env.CF_BUILD_ID || env.CM_BUILD_ID || env.CI_NAME || env.DRONE || env.DSARI || env.EARTHLY_CI || env.EAS_BUILD || env.GERRIT_PROJECT || env.GITEA_ACTIONS || env.GITHUB_ACTIONS || env.GITLAB_CI || env.GOCD || env.BUILDER_OUTPUT || env.HARNESS_BUILD_ID || env.JENKINS_URL || env.BUILD_ID || env.LAYERCI || env.MAGNUM || env.NETLIFY || env.NEVERCODE || env.PROW_JOB_ID || env.RELEASE_BUILD_ID || env.RENDER || env.SAILCI || env.HUDSON || env.JENKINS_URL || env.BUILD_ID || env.SCREWDRIVER || env.SEMAPHORE || env.SOURCEHUT || env.STRIDER || env.TASK_ID || env.RUN_ID || env.TEAMCITY_VERSION || env.TRAVIS || env.VELA || env.NOW_BUILDER || env.APPCENTER_BUILD_ID || env.CI_XCODE_PROJECT || env.XCS || false);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/environment-checks.mjs
|
|
66
|
+
/** Value of process.platform */
|
|
67
|
+
const platform = process?.platform || "";
|
|
68
|
+
/** Detect if stdout.TTY is available */
|
|
69
|
+
const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);
|
|
70
|
+
/** Detect if `DEBUG` environment variable is set */
|
|
71
|
+
const isDebug = Boolean(process.env.DEBUG);
|
|
72
|
+
/** Detect the `NODE_ENV` environment variable */
|
|
73
|
+
const mode = process.env.STORM_MODE || process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV || "production";
|
|
74
|
+
/** Detect if the application is running in a staging environment */
|
|
75
|
+
const isStaging = [
|
|
76
|
+
"stg",
|
|
77
|
+
"stage",
|
|
78
|
+
"staging"
|
|
79
|
+
].includes(mode?.toLowerCase());
|
|
80
|
+
/**
|
|
81
|
+
* Check if the current environment is production.
|
|
82
|
+
*
|
|
83
|
+
* @param mode - The mode string to check.
|
|
84
|
+
* @returns Whether the environment is production
|
|
85
|
+
*/
|
|
86
|
+
function isProductionMode(mode$1) {
|
|
87
|
+
return [
|
|
88
|
+
"prd",
|
|
89
|
+
"prod",
|
|
90
|
+
"production",
|
|
91
|
+
"preprod",
|
|
92
|
+
"preproduction",
|
|
93
|
+
"uat"
|
|
94
|
+
].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
|
|
95
|
+
}
|
|
96
|
+
/** Detect if `NODE_ENV` environment variable is `production` */
|
|
97
|
+
const isProduction = isProductionMode(mode);
|
|
98
|
+
/**
|
|
99
|
+
* Check if the current environment is test.
|
|
100
|
+
*
|
|
101
|
+
* @param mode - The mode string to check.
|
|
102
|
+
* @returns Whether the environment is test
|
|
103
|
+
*/
|
|
104
|
+
function isTestMode(mode$1) {
|
|
105
|
+
return [
|
|
106
|
+
"tst",
|
|
107
|
+
"test",
|
|
108
|
+
"testing",
|
|
109
|
+
"stg",
|
|
110
|
+
"stage",
|
|
111
|
+
"staging",
|
|
112
|
+
"qa",
|
|
113
|
+
"qualityassurance"
|
|
114
|
+
].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
|
|
115
|
+
}
|
|
116
|
+
/** Detect if `NODE_ENV` environment variable is `test` */
|
|
117
|
+
const isTest = isTestMode(mode) || isStaging || Boolean(process.env.TEST);
|
|
118
|
+
/**
|
|
119
|
+
* Check if the current environment is development.
|
|
120
|
+
*
|
|
121
|
+
* @param mode - The mode string to check.
|
|
122
|
+
* @returns Whether the environment is development
|
|
123
|
+
*/
|
|
124
|
+
function isDevelopmentMode(mode$1) {
|
|
125
|
+
return [
|
|
126
|
+
"dev",
|
|
127
|
+
"development",
|
|
128
|
+
"int",
|
|
129
|
+
"integration"
|
|
130
|
+
].includes(mode$1?.toLowerCase()?.replace(/[\s\-_]/g, ""));
|
|
131
|
+
}
|
|
132
|
+
/** Detect if `NODE_ENV` environment variable is `dev` or `development` */
|
|
133
|
+
const isDevelopment = isDevelopmentMode(mode) || isDebug;
|
|
134
|
+
/** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
|
|
135
|
+
const isMinimal = Boolean(process.env.MINIMAL) || isCI() || isTest || !hasTTY;
|
|
136
|
+
/** Detect if process.platform is Windows */
|
|
137
|
+
const isWindows = /^win/i.test(platform);
|
|
138
|
+
/** Detect if process.platform is Linux */
|
|
139
|
+
const isLinux = /^linux/i.test(platform);
|
|
140
|
+
/** Detect if process.platform is macOS (darwin kernel) */
|
|
141
|
+
const isMacOS = /^darwin/i.test(platform);
|
|
142
|
+
/** Color Support */
|
|
143
|
+
const isColorSupported = !process.env.NO_COLOR && (Boolean(process.env.FORCE_COLOR) || (hasTTY || isWindows) && process.env.TERM !== "dumb" || isCI());
|
|
144
|
+
/** Node.js versions */
|
|
145
|
+
const nodeVersion = (process?.versions?.node || "").replace(/^v/, "") || null;
|
|
146
|
+
const nodeMajorVersion = Number(nodeVersion?.split(".")[0]) || null;
|
|
147
|
+
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/path/src/regex.mjs
|
|
55
150
|
const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
56
151
|
const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
57
152
|
const UNC_REGEX = /^[/\\]{2}/;
|
|
58
153
|
const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
59
154
|
|
|
60
155
|
//#endregion
|
|
61
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
156
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/path/src/slash.mjs
|
|
62
157
|
/**
|
|
63
158
|
* Replace backslash to slash
|
|
64
159
|
*
|
|
@@ -71,7 +166,7 @@ function slash(path) {
|
|
|
71
166
|
}
|
|
72
167
|
|
|
73
168
|
//#endregion
|
|
74
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
169
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/path/src/is-type.mjs
|
|
75
170
|
/**
|
|
76
171
|
* Check if the path is an absolute path.
|
|
77
172
|
*
|
|
@@ -95,7 +190,7 @@ function isAbsolute(path) {
|
|
|
95
190
|
}
|
|
96
191
|
|
|
97
192
|
//#endregion
|
|
98
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
193
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/path/src/join-paths.mjs
|
|
99
194
|
function normalizeWindowsPath(input = "") {
|
|
100
195
|
if (!input) return input;
|
|
101
196
|
return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
@@ -212,7 +307,7 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
212
307
|
}
|
|
213
308
|
|
|
214
309
|
//#endregion
|
|
215
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
310
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/acronyms.mjs
|
|
216
311
|
/**
|
|
217
312
|
* A running list of common acronyms and their meanings.
|
|
218
313
|
*
|
|
@@ -624,7 +719,7 @@ Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.di
|
|
|
624
719
|
Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.description]));
|
|
625
720
|
|
|
626
721
|
//#endregion
|
|
627
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
722
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/combine.mjs
|
|
628
723
|
/**
|
|
629
724
|
* Combine two strings with a space in between.
|
|
630
725
|
*
|
|
@@ -637,7 +732,7 @@ function combine(acc, str) {
|
|
|
637
732
|
}
|
|
638
733
|
|
|
639
734
|
//#endregion
|
|
640
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
735
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/decamelize.mjs
|
|
641
736
|
/**
|
|
642
737
|
* Convert a camelCase or PascalCase string to a snake_case string.
|
|
643
738
|
*
|
|
@@ -649,7 +744,7 @@ function decamelize(value) {
|
|
|
649
744
|
}
|
|
650
745
|
|
|
651
746
|
//#endregion
|
|
652
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
747
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/articles.mjs
|
|
653
748
|
const ARTICLES = [
|
|
654
749
|
"a",
|
|
655
750
|
"an",
|
|
@@ -657,7 +752,7 @@ const ARTICLES = [
|
|
|
657
752
|
];
|
|
658
753
|
|
|
659
754
|
//#endregion
|
|
660
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
755
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/conjunctions.mjs
|
|
661
756
|
const CONJUNCTIONS = [
|
|
662
757
|
"and",
|
|
663
758
|
"that",
|
|
@@ -687,7 +782,7 @@ const CONJUNCTIONS = [
|
|
|
687
782
|
];
|
|
688
783
|
|
|
689
784
|
//#endregion
|
|
690
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
785
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/prepositions.mjs
|
|
691
786
|
const PREPOSITIONS = [
|
|
692
787
|
"about",
|
|
693
788
|
"above",
|
|
@@ -753,7 +848,7 @@ const PREPOSITIONS = [
|
|
|
753
848
|
];
|
|
754
849
|
|
|
755
850
|
//#endregion
|
|
756
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
851
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/special-cases.mjs
|
|
757
852
|
const SPECIAL_CASES = [
|
|
758
853
|
"2FA",
|
|
759
854
|
"4K",
|
|
@@ -804,7 +899,7 @@ const SPECIAL_CASES = [
|
|
|
804
899
|
];
|
|
805
900
|
|
|
806
901
|
//#endregion
|
|
807
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
902
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/format-special-cases.mjs
|
|
808
903
|
/**
|
|
809
904
|
* Handle special words in a title.
|
|
810
905
|
*
|
|
@@ -830,7 +925,7 @@ function formatSpecialCases(value, index, words, options) {
|
|
|
830
925
|
}
|
|
831
926
|
|
|
832
927
|
//#endregion
|
|
833
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
928
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/upper-case-first.mjs
|
|
834
929
|
/**
|
|
835
930
|
* Upper case the first character of an input string.
|
|
836
931
|
*
|
|
@@ -845,7 +940,7 @@ function upperCaseFirst(input) {
|
|
|
845
940
|
}
|
|
846
941
|
|
|
847
942
|
//#endregion
|
|
848
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
943
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/string-format/src/title-case.mjs
|
|
849
944
|
/**
|
|
850
945
|
* Convert a string to title case.
|
|
851
946
|
*
|
|
@@ -858,7 +953,7 @@ function titleCase$1(input, options) {
|
|
|
858
953
|
}
|
|
859
954
|
|
|
860
955
|
//#endregion
|
|
861
|
-
//#region ../../node_modules/.pnpm/@stryke+env@0.20.
|
|
956
|
+
//#region ../../node_modules/.pnpm/@stryke+env@0.20.86_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+run_61d4c3bf57932cffbdee02e7a41731b0/node_modules/@stryke/env/dist/get-env-paths.mjs
|
|
862
957
|
const homedir = os.homedir();
|
|
863
958
|
const tmpdir = os.tmpdir();
|
|
864
959
|
const macos = (orgId) => {
|
|
@@ -936,7 +1031,7 @@ function getEnvPaths(options = {}) {
|
|
|
936
1031
|
}
|
|
937
1032
|
|
|
938
1033
|
//#endregion
|
|
939
|
-
//#region ../../node_modules/.pnpm/@stryke+fs@0.33.
|
|
1034
|
+
//#region ../../node_modules/.pnpm/@stryke+fs@0.33.69_nx@22.7.1_@swc-node+register@1.11.1_@emnapi+core@1.10.0_@emnapi+runt_883743f52e6029b1917f6d7e21fd4584/node_modules/@stryke/fs/dist/exists.mjs
|
|
940
1035
|
/**
|
|
941
1036
|
* Check if a file exists
|
|
942
1037
|
*
|
|
@@ -948,7 +1043,7 @@ function existsSync$1(filePath) {
|
|
|
948
1043
|
}
|
|
949
1044
|
|
|
950
1045
|
//#endregion
|
|
951
|
-
//#region ../../node_modules/.pnpm/@powerlines+nx@0.
|
|
1046
|
+
//#region ../../node_modules/.pnpm/@powerlines+nx@0.13.22_37905bc55cd94c2f54b3276dd4704cf6/node_modules/@powerlines/nx/dist/src/helpers/plugin-utilities.mjs
|
|
952
1047
|
/**
|
|
953
1048
|
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
954
1049
|
*
|
|
@@ -1013,7 +1108,16 @@ function createNxPlugin(opts) {
|
|
|
1013
1108
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
1014
1109
|
let userConfig = {};
|
|
1015
1110
|
try {
|
|
1016
|
-
if (loadUserConfigFile)
|
|
1111
|
+
if (loadUserConfigFile) {
|
|
1112
|
+
const parsedConfig = await loadUserConfigFile({
|
|
1113
|
+
root: projectRoot,
|
|
1114
|
+
cwd: contextV2.workspaceRoot,
|
|
1115
|
+
mode: isDevelopment ? "development" : isTest ? "test" : "production",
|
|
1116
|
+
configFile,
|
|
1117
|
+
framework
|
|
1118
|
+
}, resolver);
|
|
1119
|
+
if (isSetObject(parsedConfig)) userConfig = parsedConfig.config;
|
|
1120
|
+
}
|
|
1017
1121
|
} catch (error) {
|
|
1018
1122
|
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to load user configuration for project in ${projectRoot} - ${isError(error) ? error.message : isSetString(error) ? error : "Unknown error"} \n\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`);
|
|
1019
1123
|
}
|
|
@@ -1027,7 +1131,7 @@ function createNxPlugin(opts) {
|
|
|
1027
1131
|
return {};
|
|
1028
1132
|
}
|
|
1029
1133
|
const packageJson = JSON.parse(packageJsonContent);
|
|
1030
|
-
if (!userConfig.
|
|
1134
|
+
if (!(userConfig && Object.keys(userConfig).length > 0) && !packageJson?.[camelCase(framework)]) {
|
|
1031
1135
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
1032
1136
|
return {};
|
|
1033
1137
|
}
|
|
@@ -1085,7 +1189,7 @@ function createNxPlugin(opts) {
|
|
|
1085
1189
|
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
1086
1190
|
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
1087
1191
|
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
1088
|
-
dependsOn: options?.build?.dependsOn ?? [`^${options?.build?.targetName || "build"}`, userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
1192
|
+
dependsOn: options?.build?.dependsOn ?? [`^${options?.build?.targetName || "build"}`, userConfig.skipCache || isDevelopment ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
1089
1193
|
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
1090
1194
|
options: {
|
|
1091
1195
|
projectType: projectConfig.projectType,
|
|
@@ -1106,7 +1210,7 @@ function createNxPlugin(opts) {
|
|
|
1106
1210
|
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
1107
1211
|
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
1108
1212
|
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
1109
|
-
dependsOn: options?.lint?.dependsOn ?? [`^${options?.lint?.targetName || "lint"}`, userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
1213
|
+
dependsOn: options?.lint?.dependsOn ?? [`^${options?.lint?.targetName || "lint"}`, userConfig.skipCache || isDevelopment ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
1110
1214
|
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
1111
1215
|
options: {
|
|
1112
1216
|
projectType: projectConfig.projectType,
|
|
@@ -1130,7 +1234,7 @@ function createNxPlugin(opts) {
|
|
|
1130
1234
|
dependsOn: options?.docs?.dependsOn ?? [
|
|
1131
1235
|
`^${options?.docs?.targetName || "docs"}`,
|
|
1132
1236
|
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
1133
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
1237
|
+
userConfig.skipCache || isDevelopment ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
1134
1238
|
].filter(Boolean),
|
|
1135
1239
|
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
1136
1240
|
options: {
|
|
@@ -1155,7 +1259,7 @@ function createNxPlugin(opts) {
|
|
|
1155
1259
|
dependsOn: options?.deploy?.dependsOn ?? [
|
|
1156
1260
|
`^${options?.deploy?.targetName || "deploy"}`,
|
|
1157
1261
|
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
1158
|
-
userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
1262
|
+
userConfig.skipCache || isDevelopment ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
1159
1263
|
].filter(Boolean),
|
|
1160
1264
|
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
1161
1265
|
options: {
|