@powerlines/nx 0.1.0 → 0.2.0

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 (48) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{chunk-2IKNOV7W.mjs → chunk-22QO45EK.mjs} +31 -50
  3. package/dist/{chunk-OZMYXUES.mjs → chunk-4QSGA5A4.mjs} +25 -159
  4. package/dist/{chunk-WKH7IEJU.js → chunk-F3B56YER.js} +2 -2
  5. package/dist/{chunk-O6BSKBJP.js → chunk-JIRHFIPP.js} +2 -2
  6. package/dist/{chunk-6ZABD5GY.js → chunk-K6XBJH2L.js} +2 -2
  7. package/dist/{chunk-3QPPK4K2.js → chunk-KVN36KM4.js} +2 -2
  8. package/dist/{chunk-E6VIOC6R.mjs → chunk-LRQS76FH.mjs} +1 -1
  9. package/dist/{chunk-ESI25Y6Y.mjs → chunk-PSSLJDP5.mjs} +1 -1
  10. package/dist/{chunk-6UG6SXHV.js → chunk-SH2Y2OGJ.js} +25 -159
  11. package/dist/{chunk-FXCIWWXO.mjs → chunk-U6AMKLJF.mjs} +1 -1
  12. package/dist/{chunk-AKX3TTDA.js → chunk-VRETYARN.js} +2 -2
  13. package/dist/{chunk-5K7DMFAV.mjs → chunk-Y7YQWWS2.mjs} +1 -1
  14. package/dist/{chunk-CQP2LCFV.mjs → chunk-YPHW2GBQ.mjs} +1 -1
  15. package/dist/{chunk-OOERKIVS.js → chunk-Z4BJ37JY.js} +31 -50
  16. package/dist/executors.js +11 -11
  17. package/dist/executors.mjs +6 -6
  18. package/dist/index.js +14 -14
  19. package/dist/index.mjs +7 -7
  20. package/dist/src/base/base-executor.js +2 -2
  21. package/dist/src/base/base-executor.mjs +1 -1
  22. package/dist/src/executors/build/executor.js +4 -4
  23. package/dist/src/executors/build/executor.mjs +2 -2
  24. package/dist/src/executors/build/schema.d.ts +85 -0
  25. package/dist/src/executors/build/schema.json +96 -0
  26. package/dist/src/executors/clean/executor.js +4 -4
  27. package/dist/src/executors/clean/executor.mjs +2 -2
  28. package/dist/src/executors/clean/schema.d.ts +75 -0
  29. package/dist/src/executors/clean/schema.json +77 -0
  30. package/dist/src/executors/docs/executor.js +4 -4
  31. package/dist/src/executors/docs/executor.mjs +2 -2
  32. package/dist/src/executors/docs/schema.d.ts +75 -0
  33. package/dist/src/executors/docs/schema.json +77 -0
  34. package/dist/src/executors/lint/executor.js +4 -4
  35. package/dist/src/executors/lint/executor.mjs +2 -2
  36. package/dist/src/executors/lint/schema.d.ts +75 -0
  37. package/dist/src/executors/lint/schema.json +77 -0
  38. package/dist/src/executors/prepare/executor.js +4 -4
  39. package/dist/src/executors/prepare/executor.mjs +2 -2
  40. package/dist/src/executors/prepare/schema.d.ts +75 -0
  41. package/dist/src/executors/prepare/schema.json +77 -0
  42. package/dist/src/generators/sync/schema.d.ts +15 -0
  43. package/dist/src/generators/sync/schema.json +19 -0
  44. package/dist/src/plugin/index.d.mts +9 -0
  45. package/dist/src/plugin/index.d.ts +9 -0
  46. package/dist/src/plugin/index.js +3 -3
  47. package/dist/src/plugin/index.mjs +1 -1
  48. package/package.json +3 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ![Storm Software's logo banner](https://public.storm-cdn.com/brand-banner.png)
2
+
3
+ # Changelog for Powerlines - Nx
4
+
5
+ ## [0.1.0](https://github.com/storm-software/powerlines/releases/tag/nx%400.1.0) (2025-10-20)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated powerlines to 0.1.0
@@ -12,44 +12,42 @@ import { kebabCase } from '@stryke/string-format/kebab-case';
12
12
  import { isError } from '@stryke/type-checks/is-error';
13
13
  import defu from 'defu';
14
14
  import { createJiti } from 'jiti';
15
- import { join } from 'node:path';
16
15
  import { readNxJson } from 'nx/src/config/nx-json.js';
17
16
  import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
18
17
 
19
18
  // src/helpers/constants.ts
20
19
  var CONFIG_INPUTS = [
21
- "{projectRoot}/.storm",
22
- "{projectRoot}/storm.json",
23
- "{projectRoot}/storm.*.json",
24
- "{projectRoot}/storm.jsonc",
25
- "{projectRoot}/storm.*.jsonc",
26
- "{projectRoot}/storm.json5",
27
- "{projectRoot}/storm.*.json5",
28
- "{projectRoot}/storm.yaml",
29
- "{projectRoot}/storm.*.yaml",
30
- "{projectRoot}/storm.yml",
31
- "{projectRoot}/storm.*.yml",
32
- "{projectRoot}/storm.toml",
33
- "{projectRoot}/storm.*.toml",
34
- "{projectRoot}/storm.js",
35
- "{projectRoot}/storm.*.js",
36
- "{projectRoot}/storm.cjs",
37
- "{projectRoot}/storm.*.cjs",
38
- "{projectRoot}/storm.mjs",
39
- "{projectRoot}/storm.*.mjs",
40
- "{projectRoot}/storm.ts",
41
- "{projectRoot}/storm.*.ts",
42
- "{projectRoot}/storm.cts",
43
- "{projectRoot}/storm.*.cts",
44
- "{projectRoot}/storm.mts",
45
- "{projectRoot}/storm.*.mts"
20
+ "{projectRoot}/package.json",
21
+ "{projectRoot}/powerlines.json",
22
+ "{projectRoot}/powerlines.*.json",
23
+ "{projectRoot}/powerlines.jsonc",
24
+ "{projectRoot}/powerlines.*.jsonc",
25
+ "{projectRoot}/powerlines.json5",
26
+ "{projectRoot}/powerlines.*.json5",
27
+ "{projectRoot}/powerlines.yaml",
28
+ "{projectRoot}/powerlines.*.yaml",
29
+ "{projectRoot}/powerlines.yml",
30
+ "{projectRoot}/powerlines.*.yml",
31
+ "{projectRoot}/powerlines.toml",
32
+ "{projectRoot}/powerlines.*.toml",
33
+ "{projectRoot}/powerlines.js",
34
+ "{projectRoot}/powerlines.*.js",
35
+ "{projectRoot}/powerlines.cjs",
36
+ "{projectRoot}/powerlines.*.cjs",
37
+ "{projectRoot}/powerlines.mjs",
38
+ "{projectRoot}/powerlines.*.mjs",
39
+ "{projectRoot}/powerlines.ts",
40
+ "{projectRoot}/powerlines.*.ts",
41
+ "{projectRoot}/powerlines.cts",
42
+ "{projectRoot}/powerlines.*.cts",
43
+ "{projectRoot}/powerlines.mts",
44
+ "{projectRoot}/powerlines.*.mts"
46
45
  ];
47
46
 
48
47
  // src/plugin/index.ts
49
48
  var name = "powerlines/nx/plugin";
50
- var stormConfigGlob = "**/{package.json,storm.json,storm.*.json,storm.jsonc,storm.*.jsonc,storm.json5,storm.*.json5,storm.yaml,storm.*.yaml,storm.yml,storm.*.yml,storm.toml,storm.*.toml,storm.js,storm.*.js,storm.ts,storm.*.ts,storm.mjs,storm.*.mjs,storm.cjs,storm.*.cjs,storm.mts,storm.*.mts,storm.cts,storm.*.cts}";
51
49
  var createNodesV2 = [
52
- stormConfigGlob,
50
+ `**/{${CONFIG_INPUTS.map((input) => input.replace("{projectRoot}/", "")).join(",")}}`,
53
51
  async (configFiles, optionsV2, contextV2) => {
54
52
  const envPaths = getEnvPaths({
55
53
  orgId: "storm-software",
@@ -59,6 +57,7 @@ var createNodesV2 = [
59
57
  if (!envPaths.cache) {
60
58
  throw new Error("The cache directory could not be determined.");
61
59
  }
60
+ const runtimeFolder = optionsV2?.runtimeFolder || ".powerlines";
62
61
  const nxJson = readNxJson(contextV2.workspaceRoot);
63
62
  return createNodesFromFiles(async (configFile, options, context) => {
64
63
  try {
@@ -119,7 +118,7 @@ var createNodesV2 = [
119
118
  "typescript"
120
119
  ]),
121
120
  outputs: [
122
- "{projectRoot}/.storm"
121
+ `{projectRoot}/${runtimeFolder}`
123
122
  ],
124
123
  dependsOn: [
125
124
  "clean",
@@ -147,24 +146,6 @@ var createNodesV2 = [
147
146
  }
148
147
  }
149
148
  };
150
- targets["type-check"] ??= {
151
- cache: true,
152
- inputs: [
153
- "typescript",
154
- "^production"
155
- ],
156
- outputs: [
157
- "{workspaceRoot}/dist/{projectRoot}"
158
- ],
159
- executor: "nx:run-commands",
160
- dependsOn: [
161
- "^type-check",
162
- "^build"
163
- ],
164
- options: {
165
- command: `pnpm exec tsc --noEmit --pretty --project ${userConfig.tsconfig || join(projectConfig.root, "tsconfig.json")}`
166
- }
167
- };
168
149
  targets.build = {
169
150
  cache: true,
170
151
  inputs: withNamedInputs(CONFIG_INPUTS, [
@@ -204,13 +185,13 @@ var createNodesV2 = [
204
185
  cache: true,
205
186
  inputs: withNamedInputs([
206
187
  ...CONFIG_INPUTS,
207
- "{projectRoot}/.storm"
188
+ `{projectRoot}/${runtimeFolder}`
208
189
  ], [
209
190
  "linting",
210
191
  "typescript"
211
192
  ]),
212
193
  outputs: withNamedInputs([
213
- "{projectRoot}/.storm"
194
+ `{projectRoot}/${runtimeFolder}`
214
195
  ], [
215
196
  "typescript"
216
197
  ]),
@@ -244,7 +225,7 @@ var createNodesV2 = [
244
225
  cache: true,
245
226
  inputs: withNamedInputs([
246
227
  ...CONFIG_INPUTS,
247
- "{projectRoot}/.storm"
228
+ `{projectRoot}/${runtimeFolder}`
248
229
  ], [
249
230
  "documentation",
250
231
  "typescript"
@@ -9,7 +9,7 @@ import { LogLevelLabel } from '@storm-software/config-tools/types';
9
9
  import { toArray } from '@stryke/convert/to-array';
10
10
  import { copyFiles } from '@stryke/fs/copy-file';
11
11
  import { existsSync } from '@stryke/fs/exists';
12
- import { createDirectory, removeDirectory } from '@stryke/fs/helpers';
12
+ import { createDirectory } from '@stryke/fs/helpers';
13
13
  import { install } from '@stryke/fs/install';
14
14
  import { listFiles, listFilesSync } from '@stryke/fs/list-files';
15
15
  import { isPackageExists, isPackageListed, doesPackageMatch, getPackageListing } from '@stryke/fs/package-fns';
@@ -24,14 +24,11 @@ import { isSetObject } from '@stryke/type-checks/is-set-object';
24
24
  import { isSetString } from '@stryke/type-checks/is-set-string';
25
25
  import chalk5 from 'chalk';
26
26
  import Handlebars from 'handlebars';
27
- import { writeFile as writeFile$1 } from 'node:fs/promises';
28
- import path, { sep } from 'node:path';
29
- import { Application, TypeDocReader, PackageJsonReader, TSConfigReader, Converter, ReflectionKind, PageEvent } from 'typedoc';
30
27
  import { readJsonFile, readJsonFileSync } from '@stryke/fs/json';
31
28
  import { appendPath } from '@stryke/path/append';
32
29
  import ts3, { createProgram, createCompilerHost, getPreEmitDiagnostics, getLineAndCharacterOfPosition, flattenDiagnosticMessageText } from 'typescript';
33
30
  import { isUndefined } from '@stryke/type-checks/is-undefined';
34
- import { writeFile } from '@stryke/fs/write-file';
31
+ import { writeFile as writeFile$1 } from '@stryke/fs/write-file';
35
32
  import { format, resolveConfig } from 'prettier';
36
33
  import { resolvePackage } from '@stryke/fs/resolve';
37
34
  import { titleCase } from '@stryke/string-format/title-case';
@@ -61,6 +58,7 @@ import { isDirectory } from '@stryke/fs/is-file';
61
58
  import { readFile, readFileIfExistingSync } from '@stryke/fs/read-file';
62
59
  import { isValidRange, parseVersion } from '@stryke/fs/semver-fns';
63
60
  import { getParentPath } from '@stryke/path/get-parent-path';
61
+ import path from 'node:path';
64
62
  import { hasPackageVersion, getPackageName, getPackageVersion } from '@stryke/string-format/package';
65
63
  import { transformAsync } from '@babel/core';
66
64
  import MagicString from 'magic-string';
@@ -76,125 +74,6 @@ import { match, tsconfigPathsToRegExp } from 'bundle-require';
76
74
  import { defineNuxtModule, addVitePlugin, addWebpackPlugin } from '@nuxt/kit';
77
75
  import '@nuxt/schema';
78
76
 
79
- var objectToFrontmatter = /* @__PURE__ */ __name((object = {}) => Object.entries(object).filter(([, value]) => {
80
- return value !== void 0 && value !== null && value !== "" && typeof value === "string" || Array.isArray(value) && value.length > 0;
81
- }).map(([key, value]) => `${key}: ${value}`).join("\n"), "objectToFrontmatter");
82
- var onRendererPageEnd = /* @__PURE__ */ __name((frontmatterObject) => (event) => {
83
- if (!event.contents) {
84
- return;
85
- } else if (/README\.md$/.test(event.url)) {
86
- event.preventDefault();
87
- return;
88
- }
89
- const frontmatter = `---
90
- title: '${event.model.name}'
91
- ${objectToFrontmatter(frontmatterObject)}
92
- ---
93
-
94
- `;
95
- event.contents = frontmatter + event.contents;
96
- }, "onRendererPageEnd");
97
- var buildNavigationFromProjectReflection = /* @__PURE__ */ __name((baseUrl = "", project) => {
98
- const baseUrlWithoutTrailingSlash = baseUrl.replace(/\/$/gm, "");
99
- const result = {
100
- type: "flat"
101
- };
102
- const isGroupOfModules = /* @__PURE__ */ __name((group) => group.title === "Modules", "isGroupOfModules");
103
- const reflectionToNavItem = /* @__PURE__ */ __name((reflection) => {
104
- return {
105
- title: reflection.name,
106
- url: `${baseUrlWithoutTrailingSlash}/${reflection.url}`.replace(/\.md$/, "")
107
- };
108
- }, "reflectionToNavItem");
109
- const modulesGroupToNavigationGroup = /* @__PURE__ */ __name((module) => ({
110
- items: (module.groups ?? []).flatMap((group) => group.children.map(reflectionToNavItem)),
111
- name: module.name
112
- }), "modulesGroupToNavigationGroup");
113
- const navFromReflectionGroups = /* @__PURE__ */ __name((groups, nav = {
114
- type: "flat"
115
- }) => {
116
- groups.forEach((group) => {
117
- if (isGroupOfModules(group)) {
118
- nav.type = "modular";
119
- nav.modules = group.children.map(modulesGroupToNavigationGroup);
120
- } else {
121
- nav.items = nav?.items?.length ? nav.items : [];
122
- nav.items = nav.items.concat(group.children.flatMap(reflectionToNavItem));
123
- }
124
- });
125
- return nav;
126
- }, "navFromReflectionGroups");
127
- return navFromReflectionGroups(project.groups, result);
128
- }, "buildNavigationFromProjectReflection");
129
- var onDeclaration = /* @__PURE__ */ __name((entryPoints = []) => (context, reflection) => {
130
- if (reflection.kind === ReflectionKind.Module) {
131
- const matchingEntryPoint = entryPoints.find((entryPoint) => entryPoint.path === reflection.sources[0].fullFileName);
132
- reflection.name = matchingEntryPoint?.name ?? reflection.name;
133
- }
134
- }, "onDeclaration");
135
- var typedocConfig = {
136
- excludeExternals: true,
137
- excludeInternal: true,
138
- excludePrivate: true,
139
- excludeProtected: true,
140
- githubPages: false
141
- };
142
- var markdownPluginConfig = {
143
- hideBreadcrumbs: true,
144
- hideInPageTOC: true,
145
- hidePageHeader: true,
146
- hidePageTitle: true
147
- };
148
- var removeTrailingSlash = /* @__PURE__ */ __name((pathString = "") => pathString.endsWith(sep) ? pathString.slice(0, pathString.length - 1) : pathString, "removeTrailingSlash");
149
- var initTypedoc = /* @__PURE__ */ __name(async (context, options) => {
150
- const { baseUrl = "/docs/", outputPath } = options;
151
- const entryPoints = options.entryPoints ?? context.entry.map((entry) => ({
152
- name: entry.name || entry.output || findFileName(entry.file, {
153
- withExtension: false
154
- }),
155
- path: joinPaths(context.config.projectRoot, entry.file)
156
- }));
157
- const app = await Application.bootstrapWithPlugins({
158
- ...typedocConfig,
159
- ...markdownPluginConfig,
160
- gitRevision: context.workspaceConfig.branch || "main",
161
- tsconfig: context.tsconfig.tsconfigFilePath,
162
- exclude: context.tsconfig.tsconfigJson.exclude?.filter(Boolean),
163
- out: outputPath,
164
- basePath: baseUrl,
165
- entryPoints: entryPoints?.map((e) => e.path),
166
- plugin: [
167
- "typedoc-plugin-markdown",
168
- "powerlines/lib/typedoc/plugin"
169
- ],
170
- theme: "powerlines",
171
- readme: "none",
172
- excludePrivate: true,
173
- hideGenerator: true
174
- }, [
175
- new TypeDocReader(),
176
- new PackageJsonReader(),
177
- new TSConfigReader()
178
- ]);
179
- app.options.addReader(new TSConfigReader());
180
- app.converter.on(Converter.EVENT_CREATE_DECLARATION, onDeclaration(entryPoints));
181
- const getReflections = /* @__PURE__ */ __name(async () => app.convert(), "getReflections");
182
- const generateDocs = /* @__PURE__ */ __name(async (opts) => {
183
- const { outputPath: outputFolder, project, frontmatter } = opts;
184
- app.renderer.on(PageEvent.END, onRendererPageEnd(frontmatter));
185
- await app.generateDocs(project, outputFolder || outputPath);
186
- }, "generateDocs");
187
- const generateNavigationJSON = /* @__PURE__ */ __name(async (project, outputFolder = outputPath) => {
188
- const navigation = buildNavigationFromProjectReflection(baseUrl, project);
189
- await writeFile$1(`${removeTrailingSlash(outputFolder)}/nav.json`, JSON.stringify(navigation));
190
- }, "generateNavigationJSON");
191
- return {
192
- app,
193
- generateDocs,
194
- generateNavigationJSON,
195
- getReflections
196
- };
197
- }, "initTypedoc");
198
77
  function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig = "tsconfig.json") {
199
78
  let tsconfigFilePath = tsconfig;
200
79
  if (!existsSync(tsconfigFilePath)) {
@@ -369,24 +248,24 @@ function addPluginHook(context, plugin, pluginHook, hooksList) {
369
248
  }
370
249
  }
371
250
  __name(addPluginHook, "addPluginHook");
372
- async function writeFile2(log, filepath, content, skipFormat = false) {
251
+ async function writeFile(log, filepath, content, skipFormat = false) {
373
252
  try {
374
253
  if (skipFormat) {
375
- await writeFile(filepath, content);
254
+ await writeFile$1(filepath, content);
376
255
  } else {
377
256
  const config = await resolveConfig(filepath);
378
257
  const formatted = await format(content, {
379
258
  ...config ?? {},
380
259
  filepath
381
260
  });
382
- await writeFile(filepath, formatted || "");
261
+ await writeFile$1(filepath, formatted || "");
383
262
  }
384
263
  } catch (error) {
385
264
  log(LogLevelLabel.ERROR, `Failed to write file ${filepath} to disk
386
265
  ${error?.message ? error.message : ""}`);
387
266
  }
388
267
  }
389
- __name(writeFile2, "writeFile");
268
+ __name(writeFile, "writeFile");
390
269
  var DEFAULT_ENVIRONMENT = "default";
391
270
  function createEnvironment(name, userConfig) {
392
271
  return defu4(userConfig.environments?.[name] ?? {}, {
@@ -727,7 +606,7 @@ var VirtualFileSystem = class {
727
606
  * @returns Whether the ID is a valid runtime ID.
728
607
  */
729
608
  isValidBuiltinId(id) {
730
- return id.startsWith(`${this.#context.config.builtinPrefix}:`);
609
+ return id.startsWith(`${this.#context.config.output.builtinPrefix}:`);
731
610
  }
732
611
  /**
733
612
  * Check if a path or ID corresponds to a virtual file.
@@ -1307,7 +1186,7 @@ var VirtualFileSystem = class {
1307
1186
  if (!isSetString(path2)) {
1308
1187
  throw new Error(`Invalid path provided. Expected a string or a valid file path.`);
1309
1188
  }
1310
- return path2.replace(new RegExp(`^${this.#context.config.builtinPrefix}:`), "").replace(/^\\0/, "");
1189
+ return path2.replace(new RegExp(`^${this.#context.config.output.builtinPrefix}:`), "").replace(/^\\0/, "");
1311
1190
  }
1312
1191
  /**
1313
1192
  * Converts a relative path to an absolute path based on the workspace and project root.
@@ -1331,7 +1210,7 @@ var VirtualFileSystem = class {
1331
1210
  * @returns The formatted runtime ID.
1332
1211
  */
1333
1212
  formatRuntimeId(id) {
1334
- return `${this.#context.config.builtinPrefix}:${this.formatFilePath(id).replace(/\.[m|c]?[t|j]sx?$/, "")}`;
1213
+ return `${this.#context.config.output.builtinPrefix}:${this.formatFilePath(id).replace(/\.[m|c]?[t|j]sx?$/, "")}`;
1335
1214
  }
1336
1215
  /**
1337
1216
  * Resolves a path or ID parameter to a corresponding virtual file path in the virtual file system (VFS).
@@ -1340,7 +1219,7 @@ var VirtualFileSystem = class {
1340
1219
  * @returns The resolved file path if it exists, otherwise undefined.
1341
1220
  */
1342
1221
  resolvePathName(pathOrId, options = {}) {
1343
- if (pathOrId.startsWith(`${this.#context.config.builtinPrefix}:`)) {
1222
+ if (pathOrId.startsWith(`${this.#context.config.output.builtinPrefix}:`)) {
1344
1223
  return false;
1345
1224
  }
1346
1225
  if (isAbsolutePath(pathOrId)) {
@@ -1658,7 +1537,6 @@ var PowerlinesContext = class _PowerlinesContext {
1658
1537
  configFile: config.configFile,
1659
1538
  customLogger: config.customLogger,
1660
1539
  logLevel: config.logLevel,
1661
- builtinPrefix: config.builtinPrefix,
1662
1540
  tsconfig: config.tsconfig,
1663
1541
  tsconfigRaw: config.tsconfigRaw,
1664
1542
  skipCache: config.skipCache,
@@ -1966,7 +1844,9 @@ var PowerlinesContext = class _PowerlinesContext {
1966
1844
  output: {
1967
1845
  outputPath: joinPaths$1("dist", cacheKey.projectRoot),
1968
1846
  mode: "virtual",
1969
- dts: joinPaths$1(cacheKey.projectRoot, "storm.d.ts"),
1847
+ dts: joinPaths$1(cacheKey.projectRoot, "powerlines.d.ts"),
1848
+ builtinPrefix: "powerlines",
1849
+ runtimeFolder: joinPaths$1(cacheKey.projectRoot, ".powerlines"),
1970
1850
  assets: [
1971
1851
  {
1972
1852
  glob: "LICENSE"
@@ -1988,7 +1868,6 @@ var PowerlinesContext = class _PowerlinesContext {
1988
1868
  mode: "production",
1989
1869
  projectType: "application",
1990
1870
  logLevel: "info",
1991
- builtinPrefix: "storm",
1992
1871
  preview: false,
1993
1872
  environments: {},
1994
1873
  transform: {
@@ -2510,7 +2389,7 @@ export default getConfig({
2510
2389
  });
2511
2390
  `;
2512
2391
  log(LogLevelLabel.INFO, `Writing a default ESLint config file to ${eslintConfigFile}`);
2513
- return writeFile2(log, eslintConfigFile, eslintConfig);
2392
+ return writeFile(log, eslintConfigFile, eslintConfig);
2514
2393
  }
2515
2394
  __name(writeDefaultEslintConfig, "writeDefaultEslintConfig");
2516
2395
  var VALID_SEVERITY = [
@@ -2528,7 +2407,7 @@ async function writeOutputFile(log, outputFile, outputData) {
2528
2407
  log(LogLevelLabel.ERROR, `Cannot write to output file path, it is a directory: ${filePath}`);
2529
2408
  } else {
2530
2409
  try {
2531
- await writeFile2(log, filePath, outputData);
2410
+ await writeFile(log, filePath, outputData);
2532
2411
  log(LogLevelLabel.INFO, `The output file has been created: ${filePath}`);
2533
2412
  } catch (err) {
2534
2413
  log(LogLevelLabel.ERROR, `There was a problem writing the output file: ${filePath}`);
@@ -3194,7 +3073,7 @@ async function resolveTsconfig(context) {
3194
3073
  `).join("\n")}
3195
3074
  `);
3196
3075
  }
3197
- await writeFile2(context.log, context.tsconfig.tsconfigFilePath, StormJSON.stringify(updateTsconfigJson));
3076
+ await writeFile(context.log, context.tsconfig.tsconfigFilePath, StormJSON.stringify(updateTsconfigJson));
3198
3077
  context.tsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
3199
3078
  if (!context.tsconfig) {
3200
3079
  throw new Error("Failed to parse the TypeScript configuration file.");
@@ -3441,7 +3320,7 @@ ${formatLogMessage(context.config)}`);
3441
3320
  for (const file of files) {
3442
3321
  context.log(LogLevelLabel.TRACE, `Adding template file: ${file}`);
3443
3322
  const template = Handlebars.compile(file);
3444
- await writeFile2(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3323
+ await writeFile(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3445
3324
  }
3446
3325
  await this.callNormalHook(context, "new");
3447
3326
  if (context.config.projectType === "application") {
@@ -3449,14 +3328,14 @@ ${formatLogMessage(context.config)}`);
3449
3328
  for (const file of files2) {
3450
3329
  context.log(LogLevelLabel.TRACE, `Adding application template file: ${file}`);
3451
3330
  const template = Handlebars.compile(file);
3452
- await writeFile2(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3331
+ await writeFile(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3453
3332
  }
3454
3333
  } else {
3455
3334
  const files2 = await listFiles(joinPaths(context.corePackagePath, "files/library/**/*.hbs"));
3456
3335
  for (const file of files2) {
3457
3336
  context.log(LogLevelLabel.TRACE, `Adding library template file: ${file}`);
3458
3337
  const template = Handlebars.compile(file);
3459
- await writeFile2(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3338
+ await writeFile(context.log, joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
3460
3339
  }
3461
3340
  }
3462
3341
  await this.callPostHook(context, "new");
@@ -3540,27 +3419,14 @@ ${formatLogMessage(context.config)}`);
3540
3419
  async docs(inlineConfig = {
3541
3420
  command: "docs"
3542
3421
  }) {
3543
- this.context.log(LogLevelLabel.INFO, "Generating documentation for the Powerlines project");
3422
+ this.context.log(LogLevelLabel.INFO, "\u{1F4D3} Generating documentation for the Powerlines project");
3544
3423
  await this.prepare(inlineConfig);
3545
3424
  await this.#executeEnvironments(async (context) => {
3546
- context.log(LogLevelLabel.TRACE, "Writing API-Reference documentation for the Powerlines project artifacts.");
3547
- await this.callPreHook(context, "docs");
3548
- const outputPath = joinPaths(context.config.projectRoot, "docs", "generated", "api-reference");
3549
- if (existsSync(outputPath)) {
3550
- await removeDirectory(outputPath);
3551
- }
3552
- await createDirectory(outputPath);
3553
- await this.callNormalHook(context, "docs");
3554
- const { generateDocs, getReflections } = await initTypedoc(context, {
3555
- outputPath
3425
+ context.log(LogLevelLabel.TRACE, "Writing documentation for the Powerlines project artifacts.");
3426
+ await this.prepare(inlineConfig);
3427
+ await this.#executeEnvironments(async (context2) => {
3428
+ await this.callHook(context2, "docs");
3556
3429
  });
3557
- const project = await getReflections();
3558
- if (project) {
3559
- await generateDocs({
3560
- project
3561
- });
3562
- }
3563
- await this.callPostHook(context, "docs");
3564
3430
  });
3565
3431
  this.#context.log(LogLevelLabel.TRACE, "Powerlines documentation generation completed");
3566
3432
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
3
+ var chunkSH2Y2OGJ_js = require('./chunk-SH2Y2OGJ.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
  var defu = require('defu');
6
6
 
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
19
19
  };
20
20
  }
21
21
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
22
- var executor = chunk6UG6SXHV_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkSH2Y2OGJ_js.withExecutor("prepare", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
3
+ var chunkSH2Y2OGJ_js = require('./chunk-SH2Y2OGJ.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
  var defu = require('defu');
6
6
 
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
19
19
  };
20
20
  }
21
21
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
22
- var executor = chunk6UG6SXHV_js.withExecutor("build", executorFn);
22
+ var executor = chunkSH2Y2OGJ_js.withExecutor("build", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
3
+ var chunkSH2Y2OGJ_js = require('./chunk-SH2Y2OGJ.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
 
6
6
  // src/executors/clean/executor.ts
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
11
11
  };
12
12
  }
13
13
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
- var executor = chunk6UG6SXHV_js.withExecutor("clean", executorFn);
14
+ var executor = chunkSH2Y2OGJ_js.withExecutor("clean", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UG6SXHV_js = require('./chunk-6UG6SXHV.js');
3
+ var chunkSH2Y2OGJ_js = require('./chunk-SH2Y2OGJ.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
 
6
6
  // src/executors/lint/executor.ts
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
11
11
  };
12
12
  }
13
13
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
- var executor = chunk6UG6SXHV_js.withExecutor("lint", executorFn);
14
+ var executor = chunkSH2Y2OGJ_js.withExecutor("lint", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-OZMYXUES.mjs';
1
+ import { withExecutor } from './chunk-4QSGA5A4.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-OZMYXUES.mjs';
1
+ import { withExecutor } from './chunk-4QSGA5A4.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/lint/executor.ts