@powerlines/nx 0.13.231 → 0.13.233

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.
Files changed (155) hide show
  1. package/dist/src/base/base-executor.schema.d.ts +175 -164
  2. package/package.json +28 -18
  3. package/dist/src/_virtual/_rolldown/runtime.js +0 -28
  4. package/dist/src/base/base-executor.d.mts +0 -60
  5. package/dist/src/base/base-executor.d.mts.map +0 -1
  6. package/dist/src/base/base-executor.d.ts +0 -60
  7. package/dist/src/base/base-executor.d.ts.map +0 -1
  8. package/dist/src/base/base-executor.js +0 -118
  9. package/dist/src/base/base-executor.mjs +0 -116
  10. package/dist/src/base/base-executor.mjs.map +0 -1
  11. package/dist/src/base/base-executor.schema.d.js +0 -0
  12. package/dist/src/base/base-executor.schema.d.mts +0 -167
  13. package/dist/src/base/base-executor.schema.d.mts.map +0 -1
  14. package/dist/src/base/base-executor.schema.d.ts.map +0 -1
  15. package/dist/src/base/base-executor.untyped.d.mts +0 -5
  16. package/dist/src/base/base-executor.untyped.d.mts.map +0 -1
  17. package/dist/src/base/base-executor.untyped.d.ts +0 -4
  18. package/dist/src/base/base-executor.untyped.d.ts.map +0 -1
  19. package/dist/src/base/base-executor.untyped.js +0 -176
  20. package/dist/src/base/base-executor.untyped.mjs +0 -177
  21. package/dist/src/base/base-executor.untyped.mjs.map +0 -1
  22. package/dist/src/base/index.d.mts +0 -2
  23. package/dist/src/base/index.d.ts +0 -2
  24. package/dist/src/base/index.js +0 -5
  25. package/dist/src/base/index.mjs +0 -4
  26. package/dist/src/base-executor-BTwUZeOz.js +0 -122
  27. package/dist/src/base-executor-HCD7M10I.mjs +0 -116
  28. package/dist/src/base-executor-HCD7M10I.mjs.map +0 -1
  29. package/dist/src/base-executor.untyped-B9Vk-kJC.mjs +0 -177
  30. package/dist/src/base-executor.untyped-B9Vk-kJC.mjs.map +0 -1
  31. package/dist/src/base-executor.untyped-DZhWL1zT.js +0 -181
  32. package/dist/src/executors/build/executor.d.mts +0 -194
  33. package/dist/src/executors/build/executor.d.mts.map +0 -1
  34. package/dist/src/executors/build/executor.d.ts +0 -193
  35. package/dist/src/executors/build/executor.d.ts.map +0 -1
  36. package/dist/src/executors/build/executor.js +0 -11
  37. package/dist/src/executors/build/executor.mjs +0 -12
  38. package/dist/src/executors/build/executor.mjs.map +0 -1
  39. package/dist/src/executors/build/untyped.d.mts +0 -5
  40. package/dist/src/executors/build/untyped.d.mts.map +0 -1
  41. package/dist/src/executors/build/untyped.d.ts +0 -4
  42. package/dist/src/executors/build/untyped.d.ts.map +0 -1
  43. package/dist/src/executors/build/untyped.js +0 -24
  44. package/dist/src/executors/build/untyped.mjs +0 -25
  45. package/dist/src/executors/build/untyped.mjs.map +0 -1
  46. package/dist/src/executors/clean/executor.d.mts +0 -171
  47. package/dist/src/executors/clean/executor.d.mts.map +0 -1
  48. package/dist/src/executors/clean/executor.d.ts +0 -170
  49. package/dist/src/executors/clean/executor.d.ts.map +0 -1
  50. package/dist/src/executors/clean/executor.js +0 -11
  51. package/dist/src/executors/clean/executor.mjs +0 -12
  52. package/dist/src/executors/clean/executor.mjs.map +0 -1
  53. package/dist/src/executors/clean/untyped.d.mts +0 -5
  54. package/dist/src/executors/clean/untyped.d.mts.map +0 -1
  55. package/dist/src/executors/clean/untyped.d.ts +0 -4
  56. package/dist/src/executors/clean/untyped.d.ts.map +0 -1
  57. package/dist/src/executors/clean/untyped.js +0 -16
  58. package/dist/src/executors/clean/untyped.mjs +0 -17
  59. package/dist/src/executors/clean/untyped.mjs.map +0 -1
  60. package/dist/src/executors/docs/executor.d.mts +0 -185
  61. package/dist/src/executors/docs/executor.d.mts.map +0 -1
  62. package/dist/src/executors/docs/executor.d.ts +0 -184
  63. package/dist/src/executors/docs/executor.d.ts.map +0 -1
  64. package/dist/src/executors/docs/executor.js +0 -11
  65. package/dist/src/executors/docs/executor.mjs +0 -12
  66. package/dist/src/executors/docs/executor.mjs.map +0 -1
  67. package/dist/src/executors/docs/untyped.d.mts +0 -5
  68. package/dist/src/executors/docs/untyped.d.mts.map +0 -1
  69. package/dist/src/executors/docs/untyped.d.ts +0 -4
  70. package/dist/src/executors/docs/untyped.d.ts.map +0 -1
  71. package/dist/src/executors/docs/untyped.js +0 -16
  72. package/dist/src/executors/docs/untyped.mjs +0 -17
  73. package/dist/src/executors/docs/untyped.mjs.map +0 -1
  74. package/dist/src/executors/lint/executor.d.mts +0 -185
  75. package/dist/src/executors/lint/executor.d.mts.map +0 -1
  76. package/dist/src/executors/lint/executor.d.ts +0 -184
  77. package/dist/src/executors/lint/executor.d.ts.map +0 -1
  78. package/dist/src/executors/lint/executor.js +0 -11
  79. package/dist/src/executors/lint/executor.mjs +0 -12
  80. package/dist/src/executors/lint/executor.mjs.map +0 -1
  81. package/dist/src/executors/lint/untyped.d.mts +0 -5
  82. package/dist/src/executors/lint/untyped.d.mts.map +0 -1
  83. package/dist/src/executors/lint/untyped.d.ts +0 -4
  84. package/dist/src/executors/lint/untyped.d.ts.map +0 -1
  85. package/dist/src/executors/lint/untyped.js +0 -16
  86. package/dist/src/executors/lint/untyped.mjs +0 -17
  87. package/dist/src/executors/lint/untyped.mjs.map +0 -1
  88. package/dist/src/executors/prepare/executor.d.mts +0 -185
  89. package/dist/src/executors/prepare/executor.d.mts.map +0 -1
  90. package/dist/src/executors/prepare/executor.d.ts +0 -184
  91. package/dist/src/executors/prepare/executor.d.ts.map +0 -1
  92. package/dist/src/executors/prepare/executor.js +0 -11
  93. package/dist/src/executors/prepare/executor.mjs +0 -12
  94. package/dist/src/executors/prepare/executor.mjs.map +0 -1
  95. package/dist/src/executors/prepare/untyped.d.mts +0 -5
  96. package/dist/src/executors/prepare/untyped.d.mts.map +0 -1
  97. package/dist/src/executors/prepare/untyped.d.ts +0 -4
  98. package/dist/src/executors/prepare/untyped.d.ts.map +0 -1
  99. package/dist/src/executors/prepare/untyped.js +0 -26
  100. package/dist/src/executors/prepare/untyped.mjs +0 -27
  101. package/dist/src/executors/prepare/untyped.mjs.map +0 -1
  102. package/dist/src/generators/sync/generator.d.mts +0 -7
  103. package/dist/src/generators/sync/generator.d.mts.map +0 -1
  104. package/dist/src/generators/sync/generator.d.ts +0 -7
  105. package/dist/src/generators/sync/generator.d.ts.map +0 -1
  106. package/dist/src/generators/sync/generator.js +0 -11
  107. package/dist/src/generators/sync/generator.mjs +0 -10
  108. package/dist/src/generators/sync/generator.mjs.map +0 -1
  109. package/dist/src/generators/sync/untyped.d.mts +0 -5
  110. package/dist/src/generators/sync/untyped.d.mts.map +0 -1
  111. package/dist/src/generators/sync/untyped.d.ts +0 -4
  112. package/dist/src/generators/sync/untyped.d.ts.map +0 -1
  113. package/dist/src/generators/sync/untyped.js +0 -22
  114. package/dist/src/generators/sync/untyped.mjs +0 -23
  115. package/dist/src/generators/sync/untyped.mjs.map +0 -1
  116. package/dist/src/helpers/constants.d.mts +0 -8
  117. package/dist/src/helpers/constants.d.mts.map +0 -1
  118. package/dist/src/helpers/constants.d.ts +0 -8
  119. package/dist/src/helpers/constants.d.ts.map +0 -1
  120. package/dist/src/helpers/constants.js +0 -34
  121. package/dist/src/helpers/constants.mjs +0 -34
  122. package/dist/src/helpers/constants.mjs.map +0 -1
  123. package/dist/src/helpers/index.d.mts +0 -3
  124. package/dist/src/helpers/index.d.ts +0 -3
  125. package/dist/src/helpers/index.js +0 -8
  126. package/dist/src/helpers/index.mjs +0 -4
  127. package/dist/src/helpers/plugin-utilities.d.mts +0 -56
  128. package/dist/src/helpers/plugin-utilities.d.mts.map +0 -1
  129. package/dist/src/helpers/plugin-utilities.d.ts +0 -56
  130. package/dist/src/helpers/plugin-utilities.d.ts.map +0 -1
  131. package/dist/src/helpers/plugin-utilities.js +0 -255
  132. package/dist/src/helpers/plugin-utilities.mjs +0 -251
  133. package/dist/src/helpers/plugin-utilities.mjs.map +0 -1
  134. package/dist/src/index.d.mts +0 -7
  135. package/dist/src/index.d.ts +0 -7
  136. package/dist/src/index.js +0 -12
  137. package/dist/src/index.mjs +0 -7
  138. package/dist/src/plugin/index.d.mts +0 -291
  139. package/dist/src/plugin/index.d.mts.map +0 -1
  140. package/dist/src/plugin/index.d.ts +0 -291
  141. package/dist/src/plugin/index.d.ts.map +0 -1
  142. package/dist/src/plugin/index.js +0 -288
  143. package/dist/src/plugin/index.mjs +0 -286
  144. package/dist/src/plugin/index.mjs.map +0 -1
  145. package/dist/src/rolldown-runtime-C24Yb2bl.js +0 -33
  146. package/dist/src/types/index.d.mts +0 -2
  147. package/dist/src/types/index.d.ts +0 -2
  148. package/dist/src/types/index.js +0 -0
  149. package/dist/src/types/index.mjs +0 -1
  150. package/dist/src/types/plugin.d.mts +0 -288
  151. package/dist/src/types/plugin.d.mts.map +0 -1
  152. package/dist/src/types/plugin.d.ts +0 -288
  153. package/dist/src/types/plugin.d.ts.map +0 -1
  154. package/dist/src/types/plugin.js +0 -0
  155. package/dist/src/types/plugin.mjs +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"untyped.mjs","names":[],"sources":["../../../../src/generators/sync/untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"SyncGeneratorSchema\",\n title: \"Sync Generator\",\n description:\n \"A type definition for the Powerlines - Sync generator's options\",\n required: []\n },\n outOfSyncMessage: {\n $schema: {\n title: \"Out of Sync Message\",\n type: \"string\",\n description:\n \"The message to display when the project is out of sync with the legal-message.txt file\"\n },\n $default: \"The legal-message.txt file needs to be created\"\n }\n});\n"],"mappings":";;;AAoBA,sBAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,CAAC;CACb;CACA,kBAAkB;EAChB,SAAS;GACP,OAAO;GACP,MAAM;GACN,aACE;EACJ;EACA,UAAU;CACZ;AACF,CAAC"}
@@ -1,8 +0,0 @@
1
- //#region src/helpers/constants.d.ts
2
- /**
3
- * A list of Nx input strings that describe the Powerlines configuration file
4
- */
5
- declare const CONFIG_INPUTS: readonly ["{projectRoot}/{framework}.json", "{projectRoot}/{framework}.*.json", "{projectRoot}/{framework}.jsonc", "{projectRoot}/{framework}.*.jsonc", "{projectRoot}/{framework}.json5", "{projectRoot}/{framework}.*.json5", "{projectRoot}/{framework}.yaml", "{projectRoot}/{framework}.*.yaml", "{projectRoot}/{framework}.yml", "{projectRoot}/{framework}.*.yml", "{projectRoot}/{framework}.toml", "{projectRoot}/{framework}.*.toml", "{projectRoot}/{framework}.config.js", "{projectRoot}/{framework}.*.config.js", "{projectRoot}/{framework}.config.cjs", "{projectRoot}/{framework}.*.config.cjs", "{projectRoot}/{framework}.config.mjs", "{projectRoot}/{framework}.*.config.mjs", "{projectRoot}/{framework}.config.ts", "{projectRoot}/{framework}.*.config.ts", "{projectRoot}/{framework}.config.cts", "{projectRoot}/{framework}.*.config.cts", "{projectRoot}/{framework}.config.mts", "{projectRoot}/{framework}.*.config.mts"];
6
- //#endregion
7
- export { CONFIG_INPUTS };
8
- //# sourceMappingURL=constants.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.mts","names":[],"sources":["../../../src/helpers/constants.ts"],"mappings":";;;;cAqBa"}
@@ -1,8 +0,0 @@
1
- //#region src/helpers/constants.d.ts
2
- /**
3
- * A list of Nx input strings that describe the Powerlines configuration file
4
- */
5
- declare const CONFIG_INPUTS: readonly ["{projectRoot}/{framework}.json", "{projectRoot}/{framework}.*.json", "{projectRoot}/{framework}.jsonc", "{projectRoot}/{framework}.*.jsonc", "{projectRoot}/{framework}.json5", "{projectRoot}/{framework}.*.json5", "{projectRoot}/{framework}.yaml", "{projectRoot}/{framework}.*.yaml", "{projectRoot}/{framework}.yml", "{projectRoot}/{framework}.*.yml", "{projectRoot}/{framework}.toml", "{projectRoot}/{framework}.*.toml", "{projectRoot}/{framework}.config.js", "{projectRoot}/{framework}.*.config.js", "{projectRoot}/{framework}.config.cjs", "{projectRoot}/{framework}.*.config.cjs", "{projectRoot}/{framework}.config.mjs", "{projectRoot}/{framework}.*.config.mjs", "{projectRoot}/{framework}.config.ts", "{projectRoot}/{framework}.*.config.ts", "{projectRoot}/{framework}.config.cts", "{projectRoot}/{framework}.*.config.cts", "{projectRoot}/{framework}.config.mts", "{projectRoot}/{framework}.*.config.mts"];
6
- //#endregion
7
- export { CONFIG_INPUTS };
8
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/helpers/constants.ts"],"mappings":";;;;cAqBa"}
@@ -1,34 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/helpers/constants.ts
3
- /**
4
- * A list of Nx input strings that describe the Powerlines configuration file
5
- */
6
- const CONFIG_INPUTS = [
7
- "{projectRoot}/{framework}.json",
8
- "{projectRoot}/{framework}.*.json",
9
- "{projectRoot}/{framework}.jsonc",
10
- "{projectRoot}/{framework}.*.jsonc",
11
- "{projectRoot}/{framework}.json5",
12
- "{projectRoot}/{framework}.*.json5",
13
- "{projectRoot}/{framework}.yaml",
14
- "{projectRoot}/{framework}.*.yaml",
15
- "{projectRoot}/{framework}.yml",
16
- "{projectRoot}/{framework}.*.yml",
17
- "{projectRoot}/{framework}.toml",
18
- "{projectRoot}/{framework}.*.toml",
19
- "{projectRoot}/{framework}.config.js",
20
- "{projectRoot}/{framework}.*.config.js",
21
- "{projectRoot}/{framework}.config.cjs",
22
- "{projectRoot}/{framework}.*.config.cjs",
23
- "{projectRoot}/{framework}.config.mjs",
24
- "{projectRoot}/{framework}.*.config.mjs",
25
- "{projectRoot}/{framework}.config.ts",
26
- "{projectRoot}/{framework}.*.config.ts",
27
- "{projectRoot}/{framework}.config.cts",
28
- "{projectRoot}/{framework}.*.config.cts",
29
- "{projectRoot}/{framework}.config.mts",
30
- "{projectRoot}/{framework}.*.config.mts"
31
- ];
32
-
33
- //#endregion
34
- exports.CONFIG_INPUTS = CONFIG_INPUTS;
@@ -1,34 +0,0 @@
1
- //#region src/helpers/constants.ts
2
- /**
3
- * A list of Nx input strings that describe the Powerlines configuration file
4
- */
5
- const CONFIG_INPUTS = [
6
- "{projectRoot}/{framework}.json",
7
- "{projectRoot}/{framework}.*.json",
8
- "{projectRoot}/{framework}.jsonc",
9
- "{projectRoot}/{framework}.*.jsonc",
10
- "{projectRoot}/{framework}.json5",
11
- "{projectRoot}/{framework}.*.json5",
12
- "{projectRoot}/{framework}.yaml",
13
- "{projectRoot}/{framework}.*.yaml",
14
- "{projectRoot}/{framework}.yml",
15
- "{projectRoot}/{framework}.*.yml",
16
- "{projectRoot}/{framework}.toml",
17
- "{projectRoot}/{framework}.*.toml",
18
- "{projectRoot}/{framework}.config.js",
19
- "{projectRoot}/{framework}.*.config.js",
20
- "{projectRoot}/{framework}.config.cjs",
21
- "{projectRoot}/{framework}.*.config.cjs",
22
- "{projectRoot}/{framework}.config.mjs",
23
- "{projectRoot}/{framework}.*.config.mjs",
24
- "{projectRoot}/{framework}.config.ts",
25
- "{projectRoot}/{framework}.*.config.ts",
26
- "{projectRoot}/{framework}.config.cts",
27
- "{projectRoot}/{framework}.*.config.cts",
28
- "{projectRoot}/{framework}.config.mts",
29
- "{projectRoot}/{framework}.*.config.mts"
30
- ];
31
-
32
- //#endregion
33
- export { CONFIG_INPUTS };
34
- //# sourceMappingURL=constants.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.mjs","names":[],"sources":["../../../src/helpers/constants.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * A list of Nx input strings that describe the Powerlines configuration file\n */\nexport const CONFIG_INPUTS = [\n \"{projectRoot}/{framework}.json\",\n \"{projectRoot}/{framework}.*.json\",\n \"{projectRoot}/{framework}.jsonc\",\n \"{projectRoot}/{framework}.*.jsonc\",\n \"{projectRoot}/{framework}.json5\",\n \"{projectRoot}/{framework}.*.json5\",\n \"{projectRoot}/{framework}.yaml\",\n \"{projectRoot}/{framework}.*.yaml\",\n \"{projectRoot}/{framework}.yml\",\n \"{projectRoot}/{framework}.*.yml\",\n \"{projectRoot}/{framework}.toml\",\n \"{projectRoot}/{framework}.*.toml\",\n \"{projectRoot}/{framework}.config.js\",\n \"{projectRoot}/{framework}.*.config.js\",\n \"{projectRoot}/{framework}.config.cjs\",\n \"{projectRoot}/{framework}.*.config.cjs\",\n \"{projectRoot}/{framework}.config.mjs\",\n \"{projectRoot}/{framework}.*.config.mjs\",\n \"{projectRoot}/{framework}.config.ts\",\n \"{projectRoot}/{framework}.*.config.ts\",\n \"{projectRoot}/{framework}.config.cts\",\n \"{projectRoot}/{framework}.*.config.cts\",\n \"{projectRoot}/{framework}.config.mts\",\n \"{projectRoot}/{framework}.*.config.mts\"\n] as const;\n"],"mappings":";;;;AAqBA,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1,3 +0,0 @@
1
- import { CONFIG_INPUTS } from "./constants.mjs";
2
- import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./plugin-utilities.mjs";
3
- export { CONFIG_INPUTS, CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
@@ -1,3 +0,0 @@
1
- import { CONFIG_INPUTS } from "./constants.js";
2
- import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./plugin-utilities.js";
3
- export { CONFIG_INPUTS, CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
@@ -1,8 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_helpers_constants = require('./constants.js');
3
- const require_helpers_plugin_utilities = require('./plugin-utilities.js');
4
-
5
- exports.CONFIG_INPUTS = require_helpers_constants.CONFIG_INPUTS;
6
- exports.createNxPlugin = require_helpers_plugin_utilities.createNxPlugin;
7
- exports.getNxPluginInputs = require_helpers_plugin_utilities.getNxPluginInputs;
8
- exports.getNxTargetInputs = require_helpers_plugin_utilities.getNxTargetInputs;
@@ -1,4 +0,0 @@
1
- import { CONFIG_INPUTS } from "./constants.mjs";
2
- import { createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./plugin-utilities.mjs";
3
-
4
- export { CONFIG_INPUTS, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
@@ -1,56 +0,0 @@
1
- import { NxPluginOptions } from "../types/plugin.mjs";
2
- import { CreateNodesV2 } from "@nx/devkit";
3
- //#region src/helpers/plugin-utilities.d.ts
4
- /**
5
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
6
- *
7
- * @param framework - The framework name to use in the input strings
8
- * @returns An array of Nx input strings for the configuration file
9
- */
10
- declare function getNxTargetInputs(framework: string): string[];
11
- /**
12
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
13
- *
14
- * @param framework - The framework name to use in the input strings
15
- * @returns An array of Nx input strings for the configuration file
16
- */
17
- declare function getNxPluginInputs(framework: string): string;
18
- interface CreateNxPluginOptions {
19
- /**
20
- * The name of the Nx plugin to create
21
- *
22
- * @remarks
23
- * This will be used in logging and project tagging.
24
- *
25
- * @defaultValue "\{framework\}/plugin/nx"
26
- */
27
- name?: string;
28
- /**
29
- * The folder where the generated runtime artifacts will be located
30
- *
31
- * @remarks
32
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
33
- *
34
- * @defaultValue "\{projectRoot\}/.powerlines"
35
- */
36
- artifactsFolder?: string;
37
- /**
38
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
39
- *
40
- * @remarks
41
- * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
42
- *
43
- * @defaultValue "powerlines"
44
- */
45
- framework?: string;
46
- }
47
- /**
48
- * Creates an Nx plugin that integrates Powerlines into the Nx build process.
49
- *
50
- * @param opts - Options for creating the Nx plugin
51
- * @returns A CreateNodesV2 function that can be used as an Nx plugin
52
- */
53
- declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
54
- //#endregion
55
- export { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
56
- //# sourceMappingURL=plugin-utilities.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-utilities.d.mts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"mappings":";;;;;;;;;iBA6DgB,kBAAkB;;;;;;;iBAUlB,kBAAkB;UAMjB;;;;;;;;;EASf;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;;iBAkBc,eACd,iBAAiB,kBAAkB,iBACnC,OAAO,wBAAwB,cAAc"}
@@ -1,56 +0,0 @@
1
- import { NxPluginOptions } from "../types/plugin.js";
2
- import { CreateNodesV2 } from "@nx/devkit";
3
- //#region src/helpers/plugin-utilities.d.ts
4
- /**
5
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
6
- *
7
- * @param framework - The framework name to use in the input strings
8
- * @returns An array of Nx input strings for the configuration file
9
- */
10
- declare function getNxTargetInputs(framework: string): string[];
11
- /**
12
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
13
- *
14
- * @param framework - The framework name to use in the input strings
15
- * @returns An array of Nx input strings for the configuration file
16
- */
17
- declare function getNxPluginInputs(framework: string): string;
18
- interface CreateNxPluginOptions {
19
- /**
20
- * The name of the Nx plugin to create
21
- *
22
- * @remarks
23
- * This will be used in logging and project tagging.
24
- *
25
- * @defaultValue "\{framework\}/plugin/nx"
26
- */
27
- name?: string;
28
- /**
29
- * The folder where the generated runtime artifacts will be located
30
- *
31
- * @remarks
32
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
33
- *
34
- * @defaultValue "\{projectRoot\}/.powerlines"
35
- */
36
- artifactsFolder?: string;
37
- /**
38
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
39
- *
40
- * @remarks
41
- * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
42
- *
43
- * @defaultValue "powerlines"
44
- */
45
- framework?: string;
46
- }
47
- /**
48
- * Creates an Nx plugin that integrates Powerlines into the Nx build process.
49
- *
50
- * @param opts - Options for creating the Nx plugin
51
- * @returns A CreateNodesV2 function that can be used as an Nx plugin
52
- */
53
- declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
54
- //#endregion
55
- export { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
56
- //# sourceMappingURL=plugin-utilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-utilities.d.ts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"mappings":";;;;;;;;;iBA6DgB,kBAAkB;;;;;;;iBAUlB,kBAAkB;UAMjB;;;;;;;;;EASf;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;;iBAkBc,eACd,iBAAiB,kBAAkB,iBACnC,OAAO,wBAAwB,cAAc"}
@@ -1,255 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
- const require_helpers_constants = require('./constants.js');
4
- let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
5
- let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
- let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
7
- let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
8
- let defu = require("defu");
9
- defu = require_runtime.__toESM(defu);
10
- let _nx_devkit = require("@nx/devkit");
11
- let _storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
12
- let _storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
13
- let _storm_software_workspace_tools_utils_project_tags = require("@storm-software/workspace-tools/utils/project-tags");
14
- let _stryke_env_environment_checks = require("@stryke/env/environment-checks");
15
- let _stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
16
- let _stryke_fs_exists = require("@stryke/fs/exists");
17
- let _stryke_path_join_paths = require("@stryke/path/join-paths");
18
- let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
19
- let node_fs_promises = require("node:fs/promises");
20
- let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
21
- let nx_src_utils_package_json_js = require("nx/src/utils/package-json.js");
22
-
23
- //#region src/helpers/plugin-utilities.ts
24
- /**
25
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
26
- *
27
- * @param framework - The framework name to use in the input strings
28
- * @returns An array of Nx input strings for the configuration file
29
- */
30
- function getNxTargetInputs(framework) {
31
- return require_helpers_constants.CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
32
- }
33
- /**
34
- * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
35
- *
36
- * @param framework - The framework name to use in the input strings
37
- * @returns An array of Nx input strings for the configuration file
38
- */
39
- function getNxPluginInputs(framework) {
40
- return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
41
- }
42
- /**
43
- * Creates an Nx plugin that integrates Powerlines into the Nx build process.
44
- *
45
- * @param opts - Options for creating the Nx plugin
46
- * @returns A CreateNodesV2 function that can be used as an Nx plugin
47
- */
48
- function createNxPlugin(opts) {
49
- const framework = (0, _stryke_string_format_kebab_case.kebabCase)(opts?.framework) || "powerlines";
50
- const title = `${(0, _stryke_string_format_title_case.titleCase)(framework)} Nx Plugin`;
51
- try {
52
- const name = opts?.name || `${framework}/nx/plugin`;
53
- const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
54
- const targetInputs = getNxTargetInputs(framework);
55
- const pluginInputs = getNxPluginInputs(framework);
56
- return [pluginInputs, async (configFiles, options, contextV2) => {
57
- if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
58
- if (!(0, _stryke_env_get_env_paths.getEnvPaths)({
59
- orgId: "storm-software",
60
- appId: framework,
61
- workspaceRoot: contextV2.workspaceRoot
62
- }).cache) throw new Error("The cache directory could not be determined.");
63
- const nxJson = (0, nx_src_config_nx_json_js.readNxJson)(contextV2.workspaceRoot);
64
- return (0, _nx_devkit.createNodesFromFiles)(async (configFile, _, context) => {
65
- try {
66
- const projectRoot = (0, _storm_software_workspace_tools_utils_plugin_helpers.getProjectRoot)(configFile, contextV2.workspaceRoot);
67
- if (!projectRoot) {
68
- 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}`);
69
- return {};
70
- }
71
- const root = (0, _storm_software_workspace_tools_utils_plugin_helpers.getRoot)(projectRoot, context);
72
- if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
73
- if (!(0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot, "package.json"))) {
74
- if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${(0, _stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
75
- return {};
76
- }
77
- const packageJsonContent = await (0, node_fs_promises.readFile)((0, _stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
78
- if (!packageJsonContent) {
79
- if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
80
- return {};
81
- }
82
- const packageJson = JSON.parse(packageJsonContent);
83
- const projectConfig = (0, _storm_software_workspace_tools_utils_plugin_helpers.getProjectConfigFromProjectRoot)(projectRoot, packageJson);
84
- if (!projectConfig) {
85
- if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
86
- return {};
87
- }
88
- const targets = (0, nx_src_utils_package_json_js.readTargetsFromPackageJson)(packageJson, nxJson, projectRoot, context.workspaceRoot);
89
- if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
90
- if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
91
- cache: options?.clean?.cache ?? options?.cache ?? true,
92
- inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.clean?.inputs || "typescript"]),
93
- outputs: options?.clean?.outputs,
94
- executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
95
- dependsOn: options?.clean?.dependsOn ?? [`^${options?.clean?.targetName || "clean"}`],
96
- defaultConfiguration: options?.clean?.defaultConfiguration || "production",
97
- options: {
98
- root: projectRoot,
99
- configFile,
100
- projectType: projectConfig.projectType,
101
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
102
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
103
- },
104
- configurations: {
105
- production: { mode: "production" },
106
- test: { mode: "test" },
107
- development: {
108
- mode: "development",
109
- skipCache: true
110
- }
111
- }
112
- };
113
- if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
114
- cache: options?.prepare?.cache ?? options?.cache ?? true,
115
- inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.prepare?.inputs || "typescript"]),
116
- outputs: options?.prepare?.outputs ?? [artifactsFolder],
117
- executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
118
- dependsOn: options?.prepare?.dependsOn ?? [`^${options?.prepare?.targetName || "build"}`].filter(Boolean),
119
- defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
120
- options: {
121
- projectType: projectConfig.projectType,
122
- configFile,
123
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
124
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
125
- },
126
- configurations: {
127
- production: { mode: "production" },
128
- test: { mode: "test" },
129
- development: {
130
- mode: "development",
131
- skipCache: true
132
- }
133
- }
134
- };
135
- if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
136
- cache: options?.build?.cache ?? options?.cache ?? true,
137
- inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : (0, _storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.build?.inputs || "typescript"]),
138
- outputs: options?.build?.outputs ?? ["{options.outputPath}"],
139
- executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
140
- dependsOn: options?.build?.dependsOn ?? [`^${options?.build?.targetName || "build"}`, _stryke_env_environment_checks.isDevelopment ? void 0 : (0, _stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
141
- defaultConfiguration: options?.build?.defaultConfiguration || "production",
142
- options: {
143
- projectType: projectConfig.projectType,
144
- configFile,
145
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
146
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
147
- },
148
- configurations: {
149
- production: { mode: "production" },
150
- test: { mode: "test" },
151
- development: {
152
- mode: "development",
153
- skipCache: true
154
- }
155
- }
156
- };
157
- if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
158
- cache: options?.lint?.cache ?? options?.cache ?? true,
159
- 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"]),
160
- outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
161
- executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
162
- dependsOn: options?.lint?.dependsOn ?? [`^${options?.lint?.targetName || "lint"}`, _stryke_env_environment_checks.isDevelopment ? void 0 : (0, _stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
163
- defaultConfiguration: options?.lint?.defaultConfiguration || "production",
164
- options: {
165
- projectType: projectConfig.projectType,
166
- configFile,
167
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
168
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
169
- },
170
- configurations: {
171
- production: { mode: "production" },
172
- test: { mode: "test" },
173
- development: {
174
- mode: "development",
175
- skipCache: true
176
- }
177
- }
178
- };
179
- if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
180
- cache: options?.docs?.cache ?? options?.cache ?? true,
181
- 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"]),
182
- outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
183
- executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
184
- dependsOn: options?.docs?.dependsOn ?? [
185
- `^${options?.docs?.targetName || "docs"}`,
186
- options?.build !== false && `${options?.build?.targetName || "build"}`,
187
- _stryke_env_environment_checks.isDevelopment ? void 0 : (0, _stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
188
- ].filter(Boolean),
189
- defaultConfiguration: options?.docs?.defaultConfiguration || "production",
190
- options: {
191
- projectType: projectConfig.projectType,
192
- configFile,
193
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
194
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
195
- },
196
- configurations: {
197
- production: { mode: "production" },
198
- test: { mode: "test" },
199
- development: {
200
- mode: "development",
201
- skipCache: true
202
- }
203
- }
204
- };
205
- if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
206
- cache: options?.deploy?.cache ?? false,
207
- 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"]),
208
- outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
209
- executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
210
- dependsOn: options?.deploy?.dependsOn ?? [
211
- `^${options?.deploy?.targetName || "deploy"}`,
212
- options?.build !== false && `${options?.build?.targetName || "build"}`,
213
- _stryke_env_environment_checks.isDevelopment ? void 0 : (0, _stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
214
- ].filter(Boolean),
215
- defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
216
- options: {
217
- projectType: projectConfig.projectType,
218
- configFile,
219
- outputPath: `{workspaceRoot}/${projectRoot}/dist`,
220
- copyPath: `{workspaceRoot}/dist/${projectRoot}`
221
- },
222
- configurations: {
223
- production: { mode: "production" },
224
- test: { mode: "test" },
225
- development: {
226
- mode: "development",
227
- skipCache: true
228
- }
229
- }
230
- };
231
- (0, _storm_software_workspace_tools_utils_project_tags.setDefaultProjectTags)(projectConfig, name);
232
- (0, _storm_software_workspace_tools_utils_project_tags.addProjectTag)(projectConfig, framework, projectConfig.projectType || "library", { overwrite: true });
233
- if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
234
- return { projects: { [root]: (0, defu.default)(projectConfig, {
235
- projectType: projectConfig.projectType || "library",
236
- root,
237
- sourceRoot: (0, _stryke_path_join_paths.joinPaths)(root, "src"),
238
- targets
239
- }) } };
240
- } catch (error) {
241
- console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to process the project configuration for file "${configFile}" - ${(0, _stryke_type_checks_is_error.isError)(error) ? error.message : (0, _stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown fatal error"}`);
242
- return {};
243
- }
244
- }, configFiles, options, contextV2);
245
- }];
246
- } catch (error) {
247
- console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, _stryke_type_checks_is_error.isError)(error) ? error.message : (0, _stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown fatal error during plugin initialization"}`);
248
- throw new Error(`Failed to initialize the ${title} - ${(0, _stryke_type_checks_is_error.isError)(error) ? error.message : (0, _stryke_type_checks_is_set_string.isSetString)(error) ? error : "See previous logs for more details"}`, { cause: error instanceof Error ? error : void 0 });
249
- }
250
- }
251
-
252
- //#endregion
253
- exports.createNxPlugin = createNxPlugin;
254
- exports.getNxPluginInputs = getNxPluginInputs;
255
- exports.getNxTargetInputs = getNxTargetInputs;