@shell-shock/nx 0.0.68 → 0.0.70

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.
@@ -29,6 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
30
30
  let defu = require("defu");
31
31
  defu = __toESM(defu);
32
+ let jiti = require("jiti");
32
33
  let _nx_devkit = require("@nx/devkit");
33
34
  let _storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
34
35
  let _storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
@@ -46,11 +47,10 @@ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case
46
47
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
47
48
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
48
49
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
49
- let jiti = require("jiti");
50
50
  let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
51
51
  let nx_src_utils_package_json_js = require("nx/src/utils/package-json.js");
52
52
 
53
- //#region ../../node_modules/.pnpm/@powerlines+nx@0.11.315_6eae83d0f7d51842213644190ee41583/node_modules/@powerlines/nx/dist/src/helpers/constants.mjs
53
+ //#region ../../node_modules/.pnpm/@powerlines+nx@0.12.6_557091af903c2e0976da65b5bc598025/node_modules/@powerlines/nx/dist/src/helpers/constants.mjs
54
54
  /**
55
55
  * A list of Nx input strings that describe the Powerlines configuration file
56
56
  */
@@ -82,14 +82,14 @@ const CONFIG_INPUTS = [
82
82
  ];
83
83
 
84
84
  //#endregion
85
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/regex.mjs
85
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/regex.mjs
86
86
  const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
87
87
  const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
88
88
  const UNC_REGEX = /^[/\\]{2}/;
89
89
  const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
90
90
 
91
91
  //#endregion
92
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/slash.mjs
92
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/slash.mjs
93
93
  /**
94
94
  * Replace backslash to slash
95
95
  *
@@ -102,7 +102,7 @@ function slash(path) {
102
102
  }
103
103
 
104
104
  //#endregion
105
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/is-type.mjs
105
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/is-type.mjs
106
106
  /**
107
107
  * Check if the path is an absolute path.
108
108
  *
@@ -126,7 +126,7 @@ function isAbsolute(path) {
126
126
  }
127
127
 
128
128
  //#endregion
129
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/join-paths.mjs
129
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/join-paths.mjs
130
130
  function normalizeWindowsPath(input = "") {
131
131
  if (!input) return input;
132
132
  return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
@@ -243,7 +243,7 @@ function normalizeString(path, allowAboveRoot) {
243
243
  }
244
244
 
245
245
  //#endregion
246
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/acronyms.mjs
246
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/acronyms.mjs
247
247
  /**
248
248
  * A running list of common acronyms and their meanings.
249
249
  *
@@ -612,6 +612,7 @@ const ACRONYMS = {
612
612
  TOTP: { description: "Time-based One-Time Password" },
613
613
  TRPC: { description: "TypeScript Remote Procedure Call" },
614
614
  TSA: { description: "Transportation Security Administration" },
615
+ TSC: { description: "TypeScript Compiler" },
615
616
  TTL: { description: "Time To Live" },
616
617
  UDP: { description: "User Datagram Protocol" },
617
618
  UI: { description: "User Interface" },
@@ -654,7 +655,7 @@ Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.di
654
655
  Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.description]));
655
656
 
656
657
  //#endregion
657
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/combine.mjs
658
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/combine.mjs
658
659
  /**
659
660
  * Combine two strings with a space in between.
660
661
  *
@@ -667,7 +668,7 @@ function combine(acc, str) {
667
668
  }
668
669
 
669
670
  //#endregion
670
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/decamelize.mjs
671
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/decamelize.mjs
671
672
  /**
672
673
  * Convert a camelCase or PascalCase string to a snake_case string.
673
674
  *
@@ -679,7 +680,7 @@ function decamelize(value) {
679
680
  }
680
681
 
681
682
  //#endregion
682
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/articles.mjs
683
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/articles.mjs
683
684
  const ARTICLES = [
684
685
  "a",
685
686
  "an",
@@ -687,7 +688,7 @@ const ARTICLES = [
687
688
  ];
688
689
 
689
690
  //#endregion
690
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/conjunctions.mjs
691
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/conjunctions.mjs
691
692
  const CONJUNCTIONS = [
692
693
  "and",
693
694
  "that",
@@ -717,7 +718,7 @@ const CONJUNCTIONS = [
717
718
  ];
718
719
 
719
720
  //#endregion
720
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/prepositions.mjs
721
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/prepositions.mjs
721
722
  const PREPOSITIONS = [
722
723
  "about",
723
724
  "above",
@@ -783,7 +784,7 @@ const PREPOSITIONS = [
783
784
  ];
784
785
 
785
786
  //#endregion
786
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/special-cases.mjs
787
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/special-cases.mjs
787
788
  const SPECIAL_CASES = [
788
789
  "2FA",
789
790
  "4K",
@@ -834,7 +835,7 @@ const SPECIAL_CASES = [
834
835
  ];
835
836
 
836
837
  //#endregion
837
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/format-special-cases.mjs
838
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/format-special-cases.mjs
838
839
  /**
839
840
  * Handle special words in a title.
840
841
  *
@@ -860,7 +861,7 @@ function formatSpecialCases(value, index, words, options) {
860
861
  }
861
862
 
862
863
  //#endregion
863
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/upper-case-first.mjs
864
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/upper-case-first.mjs
864
865
  /**
865
866
  * Upper case the first character of an input string.
866
867
  *
@@ -875,7 +876,7 @@ function upperCaseFirst(input) {
875
876
  }
876
877
 
877
878
  //#endregion
878
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/title-case.mjs
879
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/title-case.mjs
879
880
  /**
880
881
  * Convert a string to title case.
881
882
  *
@@ -884,11 +885,11 @@ function upperCaseFirst(input) {
884
885
  * @returns The title cased string.
885
886
  */
886
887
  function titleCase$1(input, options) {
887
- return input?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value) => options?.expandAcronyms ? ACRONYMS[value]?.description || value : value).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
888
+ return input?.replaceAll(":", " - ")?.replaceAll("+", " + ")?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value) => options?.expandAcronyms ? ACRONYMS[value]?.description || value : value).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
888
889
  }
889
890
 
890
891
  //#endregion
891
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/get-env-paths.mjs
892
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/get-env-paths.mjs
892
893
  const homedir = node_os.default.homedir();
893
894
  const tmpdir = node_os.default.tmpdir();
894
895
  const macos = (orgId) => {
@@ -966,7 +967,7 @@ function getEnvPaths(options = {}) {
966
967
  }
967
968
 
968
969
  //#endregion
969
- //#region ../../node_modules/.pnpm/@stryke+fs@0.33.64_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+core@1.9.2_@emnapi+runti_f273a241b2b83d5251ad6cae4ae3f6e7/node_modules/@stryke/fs/dist/exists.mjs
970
+ //#region ../../node_modules/.pnpm/@stryke+fs@0.33.66_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+core@1.9.2_@emnapi+runti_5540e42e3f878a0a4fabb80165b0c2a2/node_modules/@stryke/fs/dist/exists.mjs
970
971
  /**
971
972
  * Check if a file exists
972
973
  *
@@ -978,7 +979,7 @@ function existsSync(filePath) {
978
979
  }
979
980
 
980
981
  //#endregion
981
- //#region ../../node_modules/.pnpm/@powerlines+nx@0.11.315_6eae83d0f7d51842213644190ee41583/node_modules/@powerlines/nx/dist/src/helpers/plugin-utilities.mjs
982
+ //#region ../../node_modules/.pnpm/@powerlines+nx@0.12.6_557091af903c2e0976da65b5bc598025/node_modules/@powerlines/nx/dist/src/helpers/plugin-utilities.mjs
982
983
  /**
983
984
  * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
984
985
  *
@@ -1069,7 +1070,7 @@ function createNxPlugin(opts) {
1069
1070
  const targets = (0, nx_src_utils_package_json_js.readTargetsFromPackageJson)(packageJson, nxJson, projectRoot, context.workspaceRoot);
1070
1071
  if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
1071
1072
  if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
1072
- cache: true,
1073
+ cache: options?.clean?.cache ?? options?.cache ?? true,
1073
1074
  inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.clean?.inputs || "typescript"]),
1074
1075
  outputs: options?.clean?.outputs,
1075
1076
  executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
@@ -1090,7 +1091,7 @@ function createNxPlugin(opts) {
1090
1091
  }
1091
1092
  };
1092
1093
  if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
1093
- cache: true,
1094
+ cache: options?.prepare?.cache ?? options?.cache ?? true,
1094
1095
  inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.prepare?.inputs || "typescript"]),
1095
1096
  outputs: options?.prepare?.outputs ?? [artifactsFolder],
1096
1097
  executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
@@ -1111,7 +1112,7 @@ function createNxPlugin(opts) {
1111
1112
  }
1112
1113
  };
1113
1114
  if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
1114
- cache: true,
1115
+ cache: options?.build?.cache ?? options?.cache ?? true,
1115
1116
  inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.build?.inputs || "typescript"]),
1116
1117
  outputs: options?.build?.outputs ?? ["{options.outputPath}"],
1117
1118
  executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
@@ -1132,7 +1133,7 @@ function createNxPlugin(opts) {
1132
1133
  }
1133
1134
  };
1134
1135
  if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
1135
- cache: true,
1136
+ cache: options?.lint?.cache ?? options?.cache ?? true,
1136
1137
  inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
1137
1138
  outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
1138
1139
  executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
@@ -1153,7 +1154,7 @@ function createNxPlugin(opts) {
1153
1154
  }
1154
1155
  };
1155
1156
  if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
1156
- cache: true,
1157
+ cache: options?.docs?.cache ?? options?.cache ?? true,
1157
1158
  inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
1158
1159
  outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
1159
1160
  executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
@@ -1178,6 +1179,7 @@ function createNxPlugin(opts) {
1178
1179
  }
1179
1180
  };
1180
1181
  if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
1182
+ cache: options?.deploy?.cache ?? false,
1181
1183
  inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
1182
1184
  outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
1183
1185
  executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
@@ -1,5 +1,6 @@
1
1
  import { isError } from "@stryke/type-checks/is-error";
2
2
  import defu from "defu";
3
+ import { createJiti } from "jiti";
3
4
  import { createNodesFromFiles } from "@nx/devkit";
4
5
  import { withNamedInputs } from "@storm-software/workspace-tools/utils/nx-json";
5
6
  import { getProjectConfigFromProjectRoot, getProjectRoot, getRoot } from "@storm-software/workspace-tools/utils/plugin-helpers";
@@ -15,11 +16,10 @@ import { kebabCase } from "@stryke/string-format/kebab-case";
15
16
  import { titleCase } from "@stryke/string-format/title-case";
16
17
  import { isSetObject } from "@stryke/type-checks/is-set-object";
17
18
  import { isSetString } from "@stryke/type-checks/is-set-string";
18
- import { createJiti } from "jiti";
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.11.315_6eae83d0f7d51842213644190ee41583/node_modules/@powerlines/nx/dist/src/helpers/constants.mjs
22
+ //#region ../../node_modules/.pnpm/@powerlines+nx@0.12.6_557091af903c2e0976da65b5bc598025/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,14 @@ const CONFIG_INPUTS = [
51
51
  ];
52
52
 
53
53
  //#endregion
54
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/regex.mjs
54
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/regex.mjs
55
55
  const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
56
56
  const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
57
57
  const UNC_REGEX = /^[/\\]{2}/;
58
58
  const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
59
59
 
60
60
  //#endregion
61
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/slash.mjs
61
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/slash.mjs
62
62
  /**
63
63
  * Replace backslash to slash
64
64
  *
@@ -71,7 +71,7 @@ function slash(path) {
71
71
  }
72
72
 
73
73
  //#endregion
74
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/is-type.mjs
74
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/is-type.mjs
75
75
  /**
76
76
  * Check if the path is an absolute path.
77
77
  *
@@ -95,7 +95,7 @@ function isAbsolute(path) {
95
95
  }
96
96
 
97
97
  //#endregion
98
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/path/src/join-paths.mjs
98
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/path/src/join-paths.mjs
99
99
  function normalizeWindowsPath(input = "") {
100
100
  if (!input) return input;
101
101
  return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
@@ -212,7 +212,7 @@ function normalizeString(path, allowAboveRoot) {
212
212
  }
213
213
 
214
214
  //#endregion
215
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/acronyms.mjs
215
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/acronyms.mjs
216
216
  /**
217
217
  * A running list of common acronyms and their meanings.
218
218
  *
@@ -581,6 +581,7 @@ const ACRONYMS = {
581
581
  TOTP: { description: "Time-based One-Time Password" },
582
582
  TRPC: { description: "TypeScript Remote Procedure Call" },
583
583
  TSA: { description: "Transportation Security Administration" },
584
+ TSC: { description: "TypeScript Compiler" },
584
585
  TTL: { description: "Time To Live" },
585
586
  UDP: { description: "User Datagram Protocol" },
586
587
  UI: { description: "User Interface" },
@@ -623,7 +624,7 @@ Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.di
623
624
  Object.fromEntries(Object.entries(ACRONYMS).map(([key, value]) => [key, value.description]));
624
625
 
625
626
  //#endregion
626
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/combine.mjs
627
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/combine.mjs
627
628
  /**
628
629
  * Combine two strings with a space in between.
629
630
  *
@@ -636,7 +637,7 @@ function combine(acc, str) {
636
637
  }
637
638
 
638
639
  //#endregion
639
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/decamelize.mjs
640
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/decamelize.mjs
640
641
  /**
641
642
  * Convert a camelCase or PascalCase string to a snake_case string.
642
643
  *
@@ -648,7 +649,7 @@ function decamelize(value) {
648
649
  }
649
650
 
650
651
  //#endregion
651
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/articles.mjs
652
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/articles.mjs
652
653
  const ARTICLES = [
653
654
  "a",
654
655
  "an",
@@ -656,7 +657,7 @@ const ARTICLES = [
656
657
  ];
657
658
 
658
659
  //#endregion
659
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/conjunctions.mjs
660
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/conjunctions.mjs
660
661
  const CONJUNCTIONS = [
661
662
  "and",
662
663
  "that",
@@ -686,7 +687,7 @@ const CONJUNCTIONS = [
686
687
  ];
687
688
 
688
689
  //#endregion
689
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/prepositions.mjs
690
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/prepositions.mjs
690
691
  const PREPOSITIONS = [
691
692
  "about",
692
693
  "above",
@@ -752,7 +753,7 @@ const PREPOSITIONS = [
752
753
  ];
753
754
 
754
755
  //#endregion
755
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/special-cases.mjs
756
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/special-cases.mjs
756
757
  const SPECIAL_CASES = [
757
758
  "2FA",
758
759
  "4K",
@@ -803,7 +804,7 @@ const SPECIAL_CASES = [
803
804
  ];
804
805
 
805
806
  //#endregion
806
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/format-special-cases.mjs
807
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/format-special-cases.mjs
807
808
  /**
808
809
  * Handle special words in a title.
809
810
  *
@@ -829,7 +830,7 @@ function formatSpecialCases(value, index, words, options) {
829
830
  }
830
831
 
831
832
  //#endregion
832
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/upper-case-first.mjs
833
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/upper-case-first.mjs
833
834
  /**
834
835
  * Upper case the first character of an input string.
835
836
  *
@@ -844,7 +845,7 @@ function upperCaseFirst(input) {
844
845
  }
845
846
 
846
847
  //#endregion
847
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/string-format/src/title-case.mjs
848
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/string-format/src/title-case.mjs
848
849
  /**
849
850
  * Convert a string to title case.
850
851
  *
@@ -853,11 +854,11 @@ function upperCaseFirst(input) {
853
854
  * @returns The title cased string.
854
855
  */
855
856
  function titleCase$1(input, options) {
856
- return input?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value) => options?.expandAcronyms ? ACRONYMS[value]?.description || value : value).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
857
+ return input?.replaceAll(":", " - ")?.replaceAll("+", " + ")?.split(/\s+-\s+/).map((segment) => decamelize(segment).split(/[\s\-_]/).map(upperCaseFirst).map((value) => options?.expandAcronyms ? ACRONYMS[value]?.description || value : value).map((value, index, array) => formatSpecialCases(value, index, array, options)).reduce(combine)).join(" - ");
857
858
  }
858
859
 
859
860
  //#endregion
860
- //#region ../../node_modules/.pnpm/@stryke+env@0.20.81_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_e9ff788aa2bb7ca22c36f5838abe7497/node_modules/@stryke/env/dist/get-env-paths.mjs
861
+ //#region ../../node_modules/.pnpm/@stryke+env@0.20.83_@types+picomatch@4.0.3_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+_4ecfb61e26b11db18775607114a554ac/node_modules/@stryke/env/dist/get-env-paths.mjs
861
862
  const homedir = os.homedir();
862
863
  const tmpdir = os.tmpdir();
863
864
  const macos = (orgId) => {
@@ -935,7 +936,7 @@ function getEnvPaths(options = {}) {
935
936
  }
936
937
 
937
938
  //#endregion
938
- //#region ../../node_modules/.pnpm/@stryke+fs@0.33.64_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+core@1.9.2_@emnapi+runti_f273a241b2b83d5251ad6cae4ae3f6e7/node_modules/@stryke/fs/dist/exists.mjs
939
+ //#region ../../node_modules/.pnpm/@stryke+fs@0.33.66_nx@22.6.4_@swc-node+register@1.11.1_@emnapi+core@1.9.2_@emnapi+runti_5540e42e3f878a0a4fabb80165b0c2a2/node_modules/@stryke/fs/dist/exists.mjs
939
940
  /**
940
941
  * Check if a file exists
941
942
  *
@@ -947,7 +948,7 @@ function existsSync$1(filePath) {
947
948
  }
948
949
 
949
950
  //#endregion
950
- //#region ../../node_modules/.pnpm/@powerlines+nx@0.11.315_6eae83d0f7d51842213644190ee41583/node_modules/@powerlines/nx/dist/src/helpers/plugin-utilities.mjs
951
+ //#region ../../node_modules/.pnpm/@powerlines+nx@0.12.6_557091af903c2e0976da65b5bc598025/node_modules/@powerlines/nx/dist/src/helpers/plugin-utilities.mjs
951
952
  /**
952
953
  * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
953
954
  *
@@ -1038,7 +1039,7 @@ function createNxPlugin(opts) {
1038
1039
  const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
1039
1040
  if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
1040
1041
  if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
1041
- cache: true,
1042
+ cache: options?.clean?.cache ?? options?.cache ?? true,
1042
1043
  inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [options?.clean?.inputs || "typescript"]),
1043
1044
  outputs: options?.clean?.outputs,
1044
1045
  executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
@@ -1059,7 +1060,7 @@ function createNxPlugin(opts) {
1059
1060
  }
1060
1061
  };
1061
1062
  if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
1062
- cache: true,
1063
+ cache: options?.prepare?.cache ?? options?.cache ?? true,
1063
1064
  inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : withNamedInputs(targetInputs, [options?.prepare?.inputs || "typescript"]),
1064
1065
  outputs: options?.prepare?.outputs ?? [artifactsFolder],
1065
1066
  executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
@@ -1080,7 +1081,7 @@ function createNxPlugin(opts) {
1080
1081
  }
1081
1082
  };
1082
1083
  if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
1083
- cache: true,
1084
+ cache: options?.build?.cache ?? options?.cache ?? true,
1084
1085
  inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [options?.build?.inputs || "typescript"]),
1085
1086
  outputs: options?.build?.outputs ?? ["{options.outputPath}"],
1086
1087
  executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
@@ -1101,7 +1102,7 @@ function createNxPlugin(opts) {
1101
1102
  }
1102
1103
  };
1103
1104
  if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
1104
- cache: true,
1105
+ cache: options?.lint?.cache ?? options?.cache ?? true,
1105
1106
  inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
1106
1107
  outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
1107
1108
  executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
@@ -1122,7 +1123,7 @@ function createNxPlugin(opts) {
1122
1123
  }
1123
1124
  };
1124
1125
  if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
1125
- cache: true,
1126
+ cache: options?.docs?.cache ?? options?.cache ?? true,
1126
1127
  inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
1127
1128
  outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
1128
1129
  executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
@@ -1147,6 +1148,7 @@ function createNxPlugin(opts) {
1147
1148
  }
1148
1149
  };
1149
1150
  if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
1151
+ cache: options?.deploy?.cache ?? false,
1150
1152
  inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : withNamedInputs([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
1151
1153
  outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
1152
1154
  executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,