@storm-software/cloudflare-tools 0.55.64 → 0.55.65

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-MLJ3OSJX.js → chunk-2YQVZSHO.js} +16 -16
  3. package/dist/{chunk-HBBHWDJS.mjs → chunk-4KLMKQMN.mjs} +11 -3
  4. package/dist/{chunk-PG2M24AG.mjs → chunk-65QGIJV4.mjs} +197 -1074
  5. package/dist/{chunk-VQLLSEHB.mjs → chunk-6YO5XRT2.mjs} +1 -1
  6. package/dist/{chunk-6RVDU4NC.mjs → chunk-7TRJIJ2N.mjs} +4 -4
  7. package/dist/{chunk-EGSNPA63.js → chunk-DWDJDH7W.js} +1 -1
  8. package/dist/{chunk-XFPT4O23.js → chunk-IVLCYFXD.js} +50 -42
  9. package/dist/{chunk-4FV3KOBI.mjs → chunk-NGKRYZY2.mjs} +2 -2
  10. package/dist/{chunk-ZYEYSCDM.js → chunk-NNDGLEEI.js} +12 -12
  11. package/dist/{chunk-RGBGVGWZ.mjs → chunk-PFHP5EL7.mjs} +2 -2
  12. package/dist/{chunk-UBEHQVYS.js → chunk-QGRENI3O.js} +3 -3
  13. package/dist/{chunk-ITJMNVMG.mjs → chunk-U2DL5OU3.mjs} +2 -2
  14. package/dist/{chunk-SSSAGTTW.mjs → chunk-U5WWE2HS.mjs} +1 -6
  15. package/dist/{chunk-H3FNUUB5.js → chunk-UQLMM4XV.js} +279 -1156
  16. package/dist/{chunk-TEEOPHLZ.js → chunk-V7LBWOVV.js} +1 -6
  17. package/dist/{chunk-CI3G746G.mjs → chunk-XPLMFM2J.mjs} +1 -1
  18. package/dist/{chunk-C3CWFFYT.mjs → chunk-YV555N5S.mjs} +5 -5
  19. package/dist/executors.js +5 -5
  20. package/dist/executors.mjs +8 -8
  21. package/dist/generators.js +5 -5
  22. package/dist/generators.mjs +5 -5
  23. package/dist/index.js +8 -8
  24. package/dist/index.mjs +10 -10
  25. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  26. package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
  27. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  28. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  29. package/dist/src/executors/serve/executor.js +4 -4
  30. package/dist/src/executors/serve/executor.mjs +5 -5
  31. package/dist/src/generators/init/generator.js +2 -2
  32. package/dist/src/generators/init/generator.mjs +2 -2
  33. package/dist/src/generators/worker/generator.js +5 -5
  34. package/dist/src/generators/worker/generator.mjs +5 -5
  35. package/dist/src/utils/index.js +3 -3
  36. package/dist/src/utils/index.mjs +3 -3
  37. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  38. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  39. package/dist/tsup.config.mjs +1 -1
  40. package/package.json +1 -1
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.55.63-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.55.64-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 -->
@@ -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 _chunkUBEHQVYSjs = require('./chunk-UBEHQVYS.js');
4
+ var _chunkQGRENI3Ojs = require('./chunk-QGRENI3O.js');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
9
9
 
10
10
 
11
- var _chunkXFPT4O23js = require('./chunk-XFPT4O23.js');
11
+ var _chunkIVLCYFXDjs = require('./chunk-IVLCYFXD.js');
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
17
 
18
- var _chunkTEEOPHLZjs = require('./chunk-TEEOPHLZ.js');
18
+ var _chunkV7LBWOVVjs = require('./chunk-V7LBWOVV.js');
19
19
 
20
20
 
21
21
  var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
@@ -36,8 +36,8 @@ async function runExecutor(options, context) {
36
36
  throw new Error("The executor requires projectsConfigurations.");
37
37
  }
38
38
  try {
39
- const workspaceRoot = _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, );
40
- const config = await _chunkXFPT4O23js.getConfig.call(void 0, workspaceRoot);
39
+ const workspaceRoot = _chunkV7LBWOVVjs.findWorkspaceRoot.call(void 0, );
40
+ const config = await _chunkIVLCYFXDjs.getConfig.call(void 0, workspaceRoot);
41
41
  const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
42
42
  const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
43
43
  const projectDetails = _chunkVTHBMY4Bjs.getPackageInfo.call(void 0, context.projectsConfigurations.projects[context.projectName]);
@@ -62,7 +62,7 @@ async function runExecutor(options, context) {
62
62
  if (!projectGraph) {
63
63
  throw new Error("No project graph found in cache");
64
64
  }
65
- _chunkTEEOPHLZjs.writeInfo.call(void 0, `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`);
65
+ _chunkV7LBWOVVjs.writeInfo.call(void 0, `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`);
66
66
  const s3Client = new (0, _clients3.S3)({
67
67
  region: "auto",
68
68
  endpoint,
@@ -72,12 +72,12 @@ async function runExecutor(options, context) {
72
72
  }
73
73
  });
74
74
  const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
75
- _chunkTEEOPHLZjs.writeInfo.call(void 0, `Generated component version: ${version}`);
75
+ _chunkV7LBWOVVjs.writeInfo.call(void 0, `Generated component version: ${version}`);
76
76
  const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
77
77
  ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
78
78
  });
79
79
  const projectPath = `registry/${context.projectName}`;
80
- const internalDependencies = await _chunkUBEHQVYSjs.getInternalDependencies.call(void 0, context.projectName, projectGraph);
80
+ const internalDependencies = await _chunkQGRENI3Ojs.getInternalDependencies.call(void 0, context.projectName, projectGraph);
81
81
  const dependencies = internalDependencies.filter((projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")).reduce((ret, dep) => {
82
82
  if (!ret[dep.name]) {
83
83
  ret[dep.name] = "latest";
@@ -85,14 +85,14 @@ async function runExecutor(options, context) {
85
85
  return ret;
86
86
  }, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
87
87
  const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
88
- _chunkTEEOPHLZjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
88
+ _chunkV7LBWOVVjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
89
89
  if (!isDryRun) {
90
90
  const response = await s3Client.listObjects({
91
91
  Bucket: options.bucketId,
92
92
  Prefix: projectPath
93
93
  });
94
94
  if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
95
- _chunkTEEOPHLZjs.writeDebug.call(void 0, `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`);
95
+ _chunkV7LBWOVVjs.writeDebug.call(void 0, `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`);
96
96
  await Promise.all(response.Contents.map((item) => s3Client.deleteObjects({
97
97
  Bucket: options.bucketId,
98
98
  Delete: {
@@ -105,10 +105,10 @@ async function runExecutor(options, context) {
105
105
  }
106
106
  })));
107
107
  } else {
108
- _chunkTEEOPHLZjs.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
108
+ _chunkV7LBWOVVjs.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
109
109
  }
110
110
  } else {
111
- _chunkTEEOPHLZjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
111
+ _chunkV7LBWOVVjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
112
112
  }
113
113
  const meta = {
114
114
  name: context.projectName,
@@ -124,16 +124,16 @@ async function runExecutor(options, context) {
124
124
  meta.devDependencies = projectDetails.content.devDependencies;
125
125
  }
126
126
  const metaJson = JSON.stringify(meta);
127
- _chunkTEEOPHLZjs.writeInfo.call(void 0, `Generating meta.json file:
127
+ _chunkV7LBWOVVjs.writeInfo.call(void 0, `Generating meta.json file:
128
128
  ${metaJson}`);
129
- await _chunkUBEHQVYSjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, "meta.json", version, metaJson, "application/json", isDryRun);
129
+ await _chunkQGRENI3Ojs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, "meta.json", version, metaJson, "application/json", isDryRun);
130
130
  await Promise.all(files.map((file) => {
131
131
  const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
132
132
  return _promises.readFile.call(void 0, file, {
133
133
  encoding: "utf8"
134
- }).then((fileContent) => _chunkUBEHQVYSjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
134
+ }).then((fileContent) => _chunkQGRENI3Ojs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
135
135
  }));
136
- _chunkTEEOPHLZjs.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
136
+ _chunkV7LBWOVVjs.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
137
137
  return {
138
138
  success: true
139
139
  };
@@ -14,10 +14,10 @@ import {
14
14
  stormWorkspaceConfigSchema,
15
15
  writeTrace,
16
16
  writeWarning
17
- } from "./chunk-SSSAGTTW.mjs";
17
+ } from "./chunk-U5WWE2HS.mjs";
18
18
  import {
19
19
  __name
20
- } from "./chunk-VQLLSEHB.mjs";
20
+ } from "./chunk-6YO5XRT2.mjs";
21
21
 
22
22
  // ../config-tools/src/create-storm-config.ts
23
23
  import defu2 from "defu";
@@ -613,7 +613,15 @@ ${formatLogMessage(config)}`, config);
613
613
  var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
614
614
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
615
615
  }, "getConfig");
616
+ var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {}) => {
617
+ let workspaceRoot = options.workspaceRoot;
618
+ if (!workspaceRoot) {
619
+ workspaceRoot = findWorkspaceRoot(options.cwd);
620
+ }
621
+ return getConfig(workspaceRoot, skipLogs);
622
+ }, "getWorkspaceConfig");
616
623
 
617
624
  export {
618
- getConfig
625
+ getConfig,
626
+ getWorkspaceConfig
619
627
  };