@storm-software/cloudflare-tools 0.63.26 → 0.63.28

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 (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-TSJWYL6Q.js → chunk-6TGFIMO5.js} +1 -1
  4. package/dist/{chunk-6LXAWJUW.mjs → chunk-AOLWFHH5.mjs} +3 -3
  5. package/dist/{chunk-UUPXZQE4.mjs → chunk-D5YG7CU5.mjs} +3 -3
  6. package/dist/{chunk-X3P4PVUJ.js → chunk-DMJM3W36.js} +12 -12
  7. package/dist/{chunk-3OAEUWSP.mjs → chunk-DW5K6TQT.mjs} +1 -1
  8. package/dist/{chunk-GLPDUIZ5.js → chunk-GL7JLG36.js} +16 -16
  9. package/dist/{chunk-5WE4TNLQ.mjs → chunk-I5P7M77J.mjs} +1 -1
  10. package/dist/{chunk-LR64JTPC.js → chunk-IATTWS2I.js} +87 -87
  11. package/dist/{chunk-WT7TBR2C.js → chunk-J6WBZNBT.js} +3 -3
  12. package/dist/{chunk-GGWEYZ6F.mjs → chunk-LVQQJNPK.mjs} +5 -5
  13. package/dist/{chunk-JFRM3B2T.js → chunk-PJGFLSPV.js} +128 -120
  14. package/dist/{chunk-LVA3TEJC.mjs → chunk-QTMO3CXB.mjs} +1 -1
  15. package/dist/{chunk-EDVXAHJB.js → chunk-YMATJZEA.js} +43 -43
  16. package/dist/{chunk-77YKYAKQ.mjs → chunk-ZHQVMJQB.mjs} +14 -6
  17. package/dist/executors.js +5 -5
  18. package/dist/executors.mjs +5 -5
  19. package/dist/generators.js +5 -5
  20. package/dist/generators.mjs +4 -4
  21. package/dist/index.js +8 -8
  22. package/dist/index.mjs +7 -7
  23. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  24. package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
  25. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  26. package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
  27. package/dist/src/executors/serve/executor.js +4 -4
  28. package/dist/src/executors/serve/executor.mjs +3 -3
  29. package/dist/src/generators/init/generator.js +2 -2
  30. package/dist/src/generators/init/generator.mjs +1 -1
  31. package/dist/src/generators/worker/generator.js +5 -5
  32. package/dist/src/generators/worker/generator.mjs +4 -4
  33. package/dist/src/utils/index.js +3 -3
  34. package/dist/src/utils/index.mjs +2 -2
  35. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  36. package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
  37. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  # Changelog for Storm Ops - Cloudflare Tools
4
4
 
5
+ ## [0.63.27](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.27) (2025-06-20)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Update README markdown files
10
+ ([90a90bfac](https://github.com/storm-software/storm-ops/commit/90a90bfac))
11
+
12
+ ## [0.63.26](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.26) (2025-06-20)
13
+
14
+ ### Miscellaneous
15
+
16
+ - **monorepo:** Regenerate README markdown files
17
+ ([0bdc8a84e](https://github.com/storm-software/storm-ops/commit/0bdc8a84e))
18
+ - **monorepo:** Update workspace packages' links
19
+ ([35f3ef346](https://github.com/storm-software/storm-ops/commit/35f3ef346))
20
+
5
21
  ## [0.63.25](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.25) (2025-06-18)
6
22
 
7
23
  ### Miscellaneous
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.63.25-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.63.27-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -7,7 +7,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.63.25",
10
+ version: "0.63.27",
11
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
12
12
  repository: {
13
13
  type: "github",
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generator_default
3
- } from "./chunk-LVA3TEJC.mjs";
3
+ } from "./chunk-QTMO3CXB.mjs";
4
4
  import {
5
5
  getConfig
6
- } from "./chunk-5WE4TNLQ.mjs";
6
+ } from "./chunk-I5P7M77J.mjs";
7
7
  import {
8
8
  findWorkspaceRoot,
9
9
  getStopwatch,
@@ -12,7 +12,7 @@ import {
12
12
  writeFatal,
13
13
  writeInfo,
14
14
  writeTrace
15
- } from "./chunk-GGWEYZ6F.mjs";
15
+ } from "./chunk-LVQQJNPK.mjs";
16
16
  import {
17
17
  __dirname
18
18
  } from "./chunk-B7N6WOYD.mjs";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  getInternalDependencies,
3
3
  r2UploadFile
4
- } from "./chunk-3OAEUWSP.mjs";
4
+ } from "./chunk-DW5K6TQT.mjs";
5
5
  import {
6
6
  createCliOptions,
7
7
  getPackageInfo
8
8
  } from "./chunk-RH2IXKSC.mjs";
9
9
  import {
10
10
  getConfig
11
- } from "./chunk-5WE4TNLQ.mjs";
11
+ } from "./chunk-I5P7M77J.mjs";
12
12
  import {
13
13
  findWorkspaceRoot,
14
14
  writeDebug,
15
15
  writeInfo,
16
16
  writeSuccess,
17
17
  writeWarning
18
- } from "./chunk-GGWEYZ6F.mjs";
18
+ } from "./chunk-LVQQJNPK.mjs";
19
19
 
20
20
  // src/executors/r2-upload-publish/executor.ts
21
21
  import { S3 } from "@aws-sdk/client-s3";
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkTSJWYL6Qjs = require('./chunk-TSJWYL6Q.js');
3
+ var _chunk6TGFIMO5js = require('./chunk-6TGFIMO5.js');
4
4
 
5
5
 
6
- var _chunkEDVXAHJBjs = require('./chunk-EDVXAHJB.js');
6
+ var _chunkYMATJZEAjs = require('./chunk-YMATJZEA.js');
7
7
 
8
8
 
9
9
 
@@ -12,7 +12,7 @@ var _chunkEDVXAHJBjs = require('./chunk-EDVXAHJB.js');
12
12
 
13
13
 
14
14
 
15
- var _chunkLR64JTPCjs = require('./chunk-LR64JTPC.js');
15
+ var _chunkIATTWS2Ijs = require('./chunk-IATTWS2I.js');
16
16
 
17
17
  // src/generators/worker/generator.ts
18
18
 
@@ -45,20 +45,20 @@ var vitestScript = `"test": "vitest run"`;
45
45
 
46
46
  // src/generators/worker/generator.ts
47
47
  async function applicationGenerator(tree, schema) {
48
- const stopwatch = _chunkLR64JTPCjs.getStopwatch.call(void 0, "Storm Worker generator");
48
+ const stopwatch = _chunkIATTWS2Ijs.getStopwatch.call(void 0, "Storm Worker generator");
49
49
  let config;
50
50
  try {
51
- _chunkLR64JTPCjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
51
+ _chunkIATTWS2Ijs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
52
52
 
53
53
  `, config);
54
- const workspaceRoot = _chunkLR64JTPCjs.findWorkspaceRoot.call(void 0, );
55
- _chunkLR64JTPCjs.writeDebug.call(void 0,
54
+ const workspaceRoot = _chunkIATTWS2Ijs.findWorkspaceRoot.call(void 0, );
55
+ _chunkIATTWS2Ijs.writeDebug.call(void 0,
56
56
  `Loading the Storm Config from environment variables and storm.json file...
57
57
  - workspaceRoot: ${workspaceRoot}`,
58
58
  config
59
59
  );
60
- config = await _chunkEDVXAHJBjs.getConfig.call(void 0, workspaceRoot);
61
- _chunkLR64JTPCjs.writeTrace.call(void 0,
60
+ config = await _chunkYMATJZEAjs.getConfig.call(void 0, workspaceRoot);
61
+ _chunkIATTWS2Ijs.writeTrace.call(void 0,
62
62
  `Loaded Storm config into env:
63
63
  ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
64
64
  config
@@ -66,7 +66,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
66
66
  const options = await normalizeOptions(tree, schema, config);
67
67
  const tasks = [];
68
68
  tasks.push(
69
- await _chunkTSJWYL6Qjs.generator_default.call(void 0, tree, {
69
+ await _chunk6TGFIMO5js.generator_default.call(void 0, tree, {
70
70
  ...options,
71
71
  skipFormat: true
72
72
  })
@@ -134,11 +134,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
134
134
  return _devkit.runTasksInSerial.call(void 0, ...tasks);
135
135
  } catch (error) {
136
136
  return () => {
137
- _chunkLR64JTPCjs.writeFatal.call(void 0,
137
+ _chunkIATTWS2Ijs.writeFatal.call(void 0,
138
138
  "A fatal error occurred while running the generator - the process was forced to terminate",
139
139
  config
140
140
  );
141
- _chunkLR64JTPCjs.writeError.call(void 0,
141
+ _chunkIATTWS2Ijs.writeError.call(void 0,
142
142
  `An exception was thrown in the generator's process
143
143
  - Details: ${error.message}
144
144
  - Stacktrace: ${error.stack}`,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  writeDebug,
3
3
  writeWarning
4
- } from "./chunk-GGWEYZ6F.mjs";
4
+ } from "./chunk-LVQQJNPK.mjs";
5
5
 
6
6
  // src/utils/r2-bucket-helpers.ts
7
7
  import { createHash } from "node:crypto";
@@ -1,21 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkWT7TBR2Cjs = require('./chunk-WT7TBR2C.js');
4
+ var _chunkJ6WBZNBTjs = require('./chunk-J6WBZNBT.js');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkKTFMIXUNjs = require('./chunk-KTFMIXUN.js');
9
9
 
10
10
 
11
- var _chunkEDVXAHJBjs = require('./chunk-EDVXAHJB.js');
11
+ var _chunkYMATJZEAjs = require('./chunk-YMATJZEA.js');
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
17
 
18
- var _chunkLR64JTPCjs = require('./chunk-LR64JTPC.js');
18
+ var _chunkIATTWS2Ijs = require('./chunk-IATTWS2I.js');
19
19
 
20
20
  // src/executors/r2-upload-publish/executor.ts
21
21
  var _clients3 = require('@aws-sdk/client-s3');
@@ -39,8 +39,8 @@ async function runExecutor(options, context) {
39
39
  throw new Error("The executor requires projectsConfigurations.");
40
40
  }
41
41
  try {
42
- const workspaceRoot = _chunkLR64JTPCjs.findWorkspaceRoot.call(void 0, );
43
- const config = await _chunkEDVXAHJBjs.getConfig.call(void 0, workspaceRoot);
42
+ const workspaceRoot = _chunkIATTWS2Ijs.findWorkspaceRoot.call(void 0, );
43
+ const config = await _chunkYMATJZEAjs.getConfig.call(void 0, workspaceRoot);
44
44
  const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
45
45
  const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
46
46
  const projectDetails = _chunkKTFMIXUNjs.getPackageInfo.call(void 0,
@@ -79,7 +79,7 @@ async function runExecutor(options, context) {
79
79
  "The executor failed because the project graph is not available. Please run the build command again."
80
80
  );
81
81
  }
82
- _chunkLR64JTPCjs.writeInfo.call(void 0,
82
+ _chunkIATTWS2Ijs.writeInfo.call(void 0,
83
83
  `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`
84
84
  );
85
85
  const s3Client = new (0, _clients3.S3)({
@@ -91,12 +91,12 @@ async function runExecutor(options, context) {
91
91
  }
92
92
  });
93
93
  const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
94
- _chunkLR64JTPCjs.writeInfo.call(void 0, `Generated component version: ${version}`);
94
+ _chunkIATTWS2Ijs.writeInfo.call(void 0, `Generated component version: ${version}`);
95
95
  const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
96
96
  ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
97
97
  });
98
98
  const projectPath = `registry/${context.projectName}`;
99
- const internalDependencies = await _chunkWT7TBR2Cjs.getInternalDependencies.call(void 0,
99
+ const internalDependencies = await _chunkJ6WBZNBTjs.getInternalDependencies.call(void 0,
100
100
  context.projectName,
101
101
  projectGraph
102
102
  );
@@ -109,14 +109,14 @@ async function runExecutor(options, context) {
109
109
  return ret;
110
110
  }, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
111
111
  const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
112
- _chunkLR64JTPCjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
112
+ _chunkIATTWS2Ijs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
113
113
  if (!isDryRun) {
114
114
  const response = await s3Client.listObjects({
115
115
  Bucket: options.bucketId,
116
116
  Prefix: projectPath
117
117
  });
118
118
  if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
119
- _chunkLR64JTPCjs.writeDebug.call(void 0,
119
+ _chunkIATTWS2Ijs.writeDebug.call(void 0,
120
120
  `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`
121
121
  );
122
122
  await Promise.all(
@@ -135,12 +135,12 @@ async function runExecutor(options, context) {
135
135
  )
136
136
  );
137
137
  } else {
138
- _chunkLR64JTPCjs.writeDebug.call(void 0,
138
+ _chunkIATTWS2Ijs.writeDebug.call(void 0,
139
139
  `No existing items to delete in the component registry path ${projectPath}`
140
140
  );
141
141
  }
142
142
  } else {
143
- _chunkLR64JTPCjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
143
+ _chunkIATTWS2Ijs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
144
144
  }
145
145
  const meta = {
146
146
  name: context.projectName,
@@ -158,9 +158,9 @@ async function runExecutor(options, context) {
158
158
  meta.devDependencies = projectDetails.content.devDependencies;
159
159
  }
160
160
  const metaJson = JSON.stringify(meta);
161
- _chunkLR64JTPCjs.writeInfo.call(void 0, `Generating meta.json file:
161
+ _chunkIATTWS2Ijs.writeInfo.call(void 0, `Generating meta.json file:
162
162
  ${metaJson}`);
163
- await _chunkWT7TBR2Cjs.r2UploadFile.call(void 0,
163
+ await _chunkJ6WBZNBTjs.r2UploadFile.call(void 0,
164
164
  s3Client,
165
165
  options.bucketId,
166
166
  projectPath,
@@ -174,7 +174,7 @@ ${metaJson}`);
174
174
  files.map((file) => {
175
175
  const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
176
176
  return _promises.readFile.call(void 0, file, { encoding: "utf8" }).then(
177
- (fileContent) => _chunkWT7TBR2Cjs.r2UploadFile.call(void 0,
177
+ (fileContent) => _chunkJ6WBZNBTjs.r2UploadFile.call(void 0,
178
178
  s3Client,
179
179
  options.bucketId,
180
180
  projectPath,
@@ -187,7 +187,7 @@ ${metaJson}`);
187
187
  );
188
188
  })
189
189
  );
190
- _chunkLR64JTPCjs.writeSuccess.call(void 0,
190
+ _chunkIATTWS2Ijs.writeSuccess.call(void 0,
191
191
  `Successfully uploaded the ${projectName} component to the Cyclone Registry`,
192
192
  config
193
193
  );
@@ -15,7 +15,7 @@ import {
15
15
  stormWorkspaceConfigSchema,
16
16
  writeTrace,
17
17
  writeWarning
18
- } from "./chunk-GGWEYZ6F.mjs";
18
+ } from "./chunk-LVQQJNPK.mjs";
19
19
 
20
20
  // ../config-tools/src/create-storm-config.ts
21
21
  import defu2 from "defu";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ../config-tools/src/utilities/correct-paths.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ../config-tools/src/utilities/correct-paths.ts
2
2
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
3
  function normalizeWindowsPath(input = "") {
4
4
  if (!input) {
@@ -265,22 +265,22 @@ If this sounds interesting, and you would like to help us in creating the next g
265
265
  var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
266
266
 
267
267
  // ../config/src/schema.ts
268
- var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
269
- var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
270
- var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
271
- var BrandColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
272
- var AlternateColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
273
- var AccentColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
274
- var LinkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
275
- var HelpColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
276
- var SuccessColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
277
- var InfoColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
278
- var WarningColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
279
- var DangerColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
280
- var FatalColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
281
- var PositiveColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
282
- var NegativeColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
283
- var DarkThemeColorConfigSchema = _zod2.default.object({
268
+ var _v4 = require('zod/v4'); var z = _interopRequireWildcard(_v4);
269
+ var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
270
+ var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
271
+ var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
272
+ var AlternateColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
273
+ var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
274
+ var LinkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
275
+ var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
276
+ var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
277
+ var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
278
+ var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
279
+ var DangerColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
280
+ var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
281
+ var PositiveColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
282
+ var NegativeColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
283
+ var DarkThemeColorConfigSchema = z.object({
284
284
  foreground: LightColorSchema,
285
285
  background: DarkColorSchema,
286
286
  brand: BrandColorSchema,
@@ -296,7 +296,7 @@ var DarkThemeColorConfigSchema = _zod2.default.object({
296
296
  positive: PositiveColorSchema,
297
297
  negative: NegativeColorSchema
298
298
  });
299
- var LightThemeColorConfigSchema = _zod2.default.object({
299
+ var LightThemeColorConfigSchema = z.object({
300
300
  foreground: DarkColorSchema,
301
301
  background: LightColorSchema,
302
302
  brand: BrandColorSchema,
@@ -312,11 +312,11 @@ var LightThemeColorConfigSchema = _zod2.default.object({
312
312
  positive: PositiveColorSchema,
313
313
  negative: NegativeColorSchema
314
314
  });
315
- var MultiThemeColorConfigSchema = _zod2.default.object({
315
+ var MultiThemeColorConfigSchema = z.object({
316
316
  dark: DarkThemeColorConfigSchema,
317
317
  light: LightThemeColorConfigSchema
318
318
  });
319
- var SingleThemeColorConfigSchema = _zod2.default.object({
319
+ var SingleThemeColorConfigSchema = z.object({
320
320
  dark: DarkColorSchema,
321
321
  light: LightColorSchema,
322
322
  brand: BrandColorSchema,
@@ -332,8 +332,8 @@ var SingleThemeColorConfigSchema = _zod2.default.object({
332
332
  positive: PositiveColorSchema,
333
333
  negative: NegativeColorSchema
334
334
  });
335
- var RegistryUrlConfigSchema = _zod2.default.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
336
- var RegistryConfigSchema = _zod2.default.object({
335
+ var RegistryUrlConfigSchema = z.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
336
+ var RegistryConfigSchema = z.object({
337
337
  github: RegistryUrlConfigSchema,
338
338
  npm: RegistryUrlConfigSchema,
339
339
  cargo: RegistryUrlConfigSchema,
@@ -343,122 +343,122 @@ var RegistryConfigSchema = _zod2.default.object({
343
343
  var ColorConfigSchema = SingleThemeColorConfigSchema.or(
344
344
  MultiThemeColorConfigSchema
345
345
  ).describe("Colors used for various workspace elements");
346
- var ColorConfigMapSchema = _zod2.default.union([
347
- _zod2.default.object({ base: ColorConfigSchema }),
348
- _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
346
+ var ColorConfigMapSchema = z.union([
347
+ z.object({ base: ColorConfigSchema }),
348
+ z.record(z.string(), ColorConfigSchema)
349
349
  ]);
350
- var ExtendsItemSchema = _zod2.default.string().trim().describe(
350
+ var ExtendsItemSchema = z.string().trim().describe(
351
351
  "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
352
352
  );
353
353
  var ExtendsSchema = ExtendsItemSchema.or(
354
- _zod2.default.array(ExtendsItemSchema)
354
+ z.array(ExtendsItemSchema)
355
355
  ).describe(
356
356
  "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
357
357
  );
358
- var WorkspaceBotConfigSchema = _zod2.default.object({
359
- name: _zod2.default.string().trim().default("stormie-bot").describe(
358
+ var WorkspaceBotConfigSchema = z.object({
359
+ name: z.string().trim().default("stormie-bot").describe(
360
360
  "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
361
361
  ),
362
- email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
362
+ email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
363
363
  }).describe(
364
364
  "The workspace's bot user's config used to automated various operations tasks"
365
365
  );
366
- var WorkspaceReleaseConfigSchema = _zod2.default.object({
367
- banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
366
+ var WorkspaceReleaseConfigSchema = z.object({
367
+ banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
368
368
  "A URL to a banner image used to display the workspace's release"
369
369
  ),
370
- header: _zod2.default.string().trim().optional().describe(
370
+ header: z.string().trim().optional().describe(
371
371
  "A header message appended to the start of the workspace's release notes"
372
372
  ),
373
- footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
373
+ footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
374
374
  "A footer message appended to the end of the workspace's release notes"
375
375
  )
376
376
  }).describe("The workspace's release config used during the release process");
377
- var WorkspaceAccountConfigSchema = _zod2.default.object({
378
- twitter: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
379
- discord: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
380
- telegram: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
381
- slack: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
382
- medium: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
383
- github: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
377
+ var WorkspaceAccountConfigSchema = z.object({
378
+ twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
379
+ discord: z.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
380
+ telegram: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
381
+ slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
382
+ medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
383
+ github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
384
384
  }).describe(
385
385
  "The workspace's account config used to store various social media links"
386
386
  );
387
- var WorkspaceDirectoryConfigSchema = _zod2.default.object({
388
- cache: _zod2.default.string().trim().optional().describe(
387
+ var WorkspaceDirectoryConfigSchema = z.object({
388
+ cache: z.string().trim().optional().describe(
389
389
  "The directory used to store the environment's cached file data"
390
390
  ),
391
- data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
392
- config: _zod2.default.string().trim().optional().describe(
391
+ data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
392
+ config: z.string().trim().optional().describe(
393
393
  "The directory used to store the environment's configuration files"
394
394
  ),
395
- temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
396
- log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
397
- build: _zod2.default.string().trim().default("dist").describe(
395
+ temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
396
+ log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
397
+ build: z.string().trim().default("dist").describe(
398
398
  "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
399
399
  )
400
400
  }).describe(
401
401
  "Various directories used by the workspace to store data, cache, and configuration files"
402
402
  );
403
- var errorConfigSchema = _zod2.default.object({
404
- codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
405
- url: _zod2.default.string().trim().url().optional().describe(
403
+ var errorConfigSchema = z.object({
404
+ codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
405
+ url: z.string().trim().url().optional().describe(
406
406
  "A URL to a page that looks up the workspace's error messages given a specific error code"
407
407
  )
408
408
  }).describe("The workspace's error config used during the error process");
409
- var organizationConfigSchema = _zod2.default.object({
410
- name: _zod2.default.string().trim().describe("The name of the organization"),
411
- description: _zod2.default.string().trim().optional().describe("A description of the organization"),
412
- logo: _zod2.default.string().trim().url().optional().describe("A URL to the organization's logo image"),
413
- icon: _zod2.default.string().trim().url().optional().describe("A URL to the organization's icon image"),
414
- url: _zod2.default.string().trim().url().optional().describe(
409
+ var organizationConfigSchema = z.object({
410
+ name: z.string().trim().describe("The name of the organization"),
411
+ description: z.string().trim().optional().describe("A description of the organization"),
412
+ logo: z.string().trim().url().optional().describe("A URL to the organization's logo image"),
413
+ icon: z.string().trim().url().optional().describe("A URL to the organization's icon image"),
414
+ url: z.string().trim().url().optional().describe(
415
415
  "A URL to a page that provides more information about the organization"
416
416
  )
417
417
  }).describe("The workspace's organization details");
418
- var stormWorkspaceConfigSchema = _zod2.default.object({
419
- $schema: _zod2.default.string().trim().default(
420
- "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
421
- ).optional().nullish().describe(
422
- "The URL to the JSON schema file that describes the Storm configuration file"
418
+ var stormWorkspaceConfigSchema = z.object({
419
+ $schema: z.string().trim().default(
420
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
421
+ ).describe(
422
+ "The URL or file path to the JSON schema file that describes the Storm configuration file"
423
423
  ),
424
424
  extends: ExtendsSchema.optional(),
425
- name: _zod2.default.string().trim().toLowerCase().optional().describe(
425
+ name: z.string().trim().toLowerCase().optional().describe(
426
426
  "The name of the service/package/scope using this configuration"
427
427
  ),
428
- namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
429
- organization: organizationConfigSchema.or(_zod2.default.string().trim().describe("The organization of the workspace")).optional().describe(
428
+ namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
429
+ organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
430
430
  "The organization of the workspace. This can be a string or an object containing the organization's details"
431
431
  ),
432
- repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
433
- license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
434
- homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
435
- docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
436
- portal: _zod2.default.string().trim().url().optional().describe("The development portal site for the workspace"),
437
- licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
438
- contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
439
- support: _zod2.default.string().trim().url().optional().describe(
432
+ repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
433
+ license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
434
+ homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
435
+ docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
436
+ portal: z.string().trim().url().optional().describe("The development portal site for the workspace"),
437
+ licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
438
+ contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
439
+ support: z.string().trim().url().optional().describe(
440
440
  "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
441
441
  ),
442
- branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
443
- preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
444
- owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
442
+ branch: z.string().trim().default("main").describe("The branch of the workspace"),
443
+ preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
444
+ owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
445
445
  bot: WorkspaceBotConfigSchema,
446
446
  release: WorkspaceReleaseConfigSchema,
447
447
  account: WorkspaceAccountConfigSchema,
448
448
  error: errorConfigSchema,
449
- mode: _zod2.default.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
450
- workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
451
- externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
449
+ mode: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
450
+ workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
451
+ externalPackagePatterns: z.array(z.string()).default([]).describe(
452
452
  "The build will use these package patterns to determine if they should be external to the bundle"
453
453
  ),
454
- skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
454
+ skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
455
455
  directories: WorkspaceDirectoryConfigSchema,
456
- packageManager: _zod2.default.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
456
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
457
457
  "The JavaScript/TypeScript package manager used by the repository"
458
458
  ),
459
- timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
460
- locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
461
- logLevel: _zod2.default.enum([
459
+ timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
460
+ locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
461
+ logLevel: z.enum([
462
462
  "silent",
463
463
  "fatal",
464
464
  "error",
@@ -471,17 +471,17 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
471
471
  ]).default("info").describe(
472
472
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
473
473
  ),
474
- skipConfigLogging: _zod2.default.boolean().optional().describe(
474
+ skipConfigLogging: z.boolean().optional().describe(
475
475
  "Should the logging of the current Storm Workspace configuration be skipped?"
476
476
  ),
477
477
  registry: RegistryConfigSchema,
478
- configFile: _zod2.default.string().trim().nullable().default(null).describe(
478
+ configFile: z.string().trim().nullable().default(null).describe(
479
479
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
480
480
  ),
481
481
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
482
482
  "Storm theme config values used for styling various package elements"
483
483
  ),
484
- extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
484
+ extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
485
485
  }).describe(
486
486
  "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
487
487
  );