@storm-software/cloudflare-tools 0.71.209 → 0.71.211

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 (50) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-KW5NUAMY.js → chunk-66HLJNAF.js} +2 -2
  4. package/dist/{chunk-37JKGWKW.mjs → chunk-6Z2WUPYH.mjs} +4 -4
  5. package/dist/{chunk-J725S66W.js → chunk-AYBX4RT3.js} +29 -1
  6. package/dist/{chunk-F5RW4AZL.mjs → chunk-CSTZEHUP.mjs} +2 -73
  7. package/dist/chunk-E52DON6Y.mjs +132 -0
  8. package/dist/chunk-E7ITICBK.js +77 -0
  9. package/dist/chunk-FBLD25X4.js +93 -0
  10. package/dist/{chunk-O7L7SGHE.js → chunk-KUGKM6MY.js} +5 -5
  11. package/dist/{chunk-LBHXS7RE.js → chunk-O327KKPU.js} +2 -2
  12. package/dist/{chunk-FEGLXQK4.mjs → chunk-OL24QIXM.mjs} +1 -1
  13. package/dist/chunk-T6GKRQUF.mjs +77 -0
  14. package/dist/{chunk-TNVZ6KHS.mjs → chunk-U6OMVOFA.mjs} +1 -1
  15. package/dist/chunk-VJLWHQ5B.js +132 -0
  16. package/dist/{chunk-76FQTDEJ.mjs → chunk-W3KWAUKY.mjs} +1 -1
  17. package/dist/{chunk-U7XMCD6Y.js → chunk-XB6S7S3C.js} +3 -3
  18. package/dist/{chunk-BQRUV3SX.mjs → chunk-Z7HN5SJV.mjs} +29 -1
  19. package/dist/executors.js +5 -4
  20. package/dist/executors.mjs +5 -4
  21. package/dist/generators.js +3 -3
  22. package/dist/generators.mjs +2 -2
  23. package/dist/index.d.mts +2 -6
  24. package/dist/index.d.ts +2 -6
  25. package/dist/index.js +23 -144
  26. package/dist/index.mjs +11 -132
  27. package/dist/src/executors/cloudflare-publish/executor.js +5 -4
  28. package/dist/src/executors/cloudflare-publish/executor.mjs +4 -3
  29. package/dist/src/executors/r2-upload-publish/executor.js +4 -3
  30. package/dist/src/executors/r2-upload-publish/executor.mjs +3 -2
  31. package/dist/src/executors/r2-upload-publish/untyped.d.mts +5 -0
  32. package/dist/src/executors/r2-upload-publish/untyped.d.ts +5 -0
  33. package/dist/src/executors/r2-upload-publish/untyped.js +86 -0
  34. package/dist/src/executors/r2-upload-publish/untyped.mjs +86 -0
  35. package/dist/src/executors/serve/executor.js +5 -4
  36. package/dist/src/executors/serve/executor.mjs +3 -2
  37. package/dist/src/generators/init/generator.js +2 -2
  38. package/dist/src/generators/init/generator.mjs +1 -1
  39. package/dist/src/generators/worker/generator.js +3 -3
  40. package/dist/src/generators/worker/generator.mjs +2 -2
  41. package/dist/src/plugins/index.d.mts +6 -0
  42. package/dist/src/plugins/index.d.ts +6 -0
  43. package/dist/src/plugins/index.js +10 -0
  44. package/dist/src/plugins/index.mjs +10 -0
  45. package/package.json +33 -5
  46. package/dist/chunk-XKQ3HGET.js +0 -164
  47. package/dist/tsup.config.d.mts +0 -5
  48. package/dist/tsup.config.d.ts +0 -5
  49. package/dist/tsup.config.js +0 -31
  50. package/dist/tsup.config.mjs +0 -31
@@ -1,11 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLBHXS7REjs = require('../../../chunk-LBHXS7RE.js');
4
- require('../../../chunk-O7L7SGHE.js');
5
- require('../../../chunk-XKQ3HGET.js');
3
+ var _chunkO327KKPUjs = require('../../../chunk-O327KKPU.js');
4
+ require('../../../chunk-KUGKM6MY.js');
5
+ require('../../../chunk-E7ITICBK.js');
6
6
  require('../../../chunk-PGTHXO6M.js');
7
+ require('../../../chunk-FBLD25X4.js');
7
8
  require('../../../chunk-AWKQRM2H.js');
8
9
  require('../../../chunk-MCKGQKYU.js');
9
10
 
10
11
 
11
- exports.default = _chunkLBHXS7REjs.runExecutor;
12
+ exports.default = _chunkO327KKPUjs.runExecutor;
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  runExecutor
3
- } from "../../../chunk-FEGLXQK4.mjs";
4
- import "../../../chunk-37JKGWKW.mjs";
5
- import "../../../chunk-F5RW4AZL.mjs";
3
+ } from "../../../chunk-OL24QIXM.mjs";
4
+ import "../../../chunk-6Z2WUPYH.mjs";
5
+ import "../../../chunk-T6GKRQUF.mjs";
6
6
  import "../../../chunk-5MAMLVMV.mjs";
7
+ import "../../../chunk-CSTZEHUP.mjs";
7
8
  import "../../../chunk-K4H5ZMYA.mjs";
8
9
  import "../../../chunk-5RBVGYWH.mjs";
9
10
  export {
@@ -1,12 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkU7XMCD6Yjs = require('../../../chunk-U7XMCD6Y.js');
3
+ var _chunkXB6S7S3Cjs = require('../../../chunk-XB6S7S3C.js');
4
4
  require('../../../chunk-KUGEZPUO.js');
5
5
  require('../../../chunk-CLCKX6UN.js');
6
- require('../../../chunk-XKQ3HGET.js');
6
+ require('../../../chunk-E7ITICBK.js');
7
7
  require('../../../chunk-PGTHXO6M.js');
8
+ require('../../../chunk-FBLD25X4.js');
8
9
  require('../../../chunk-AWKQRM2H.js');
9
10
  require('../../../chunk-MCKGQKYU.js');
10
11
 
11
12
 
12
- exports.default = _chunkU7XMCD6Yjs.runExecutor;
13
+ exports.default = _chunkXB6S7S3Cjs.runExecutor;
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  runExecutor
3
- } from "../../../chunk-TNVZ6KHS.mjs";
3
+ } from "../../../chunk-U6OMVOFA.mjs";
4
4
  import "../../../chunk-SWYYMID7.mjs";
5
5
  import "../../../chunk-BY7MA3SM.mjs";
6
- import "../../../chunk-F5RW4AZL.mjs";
6
+ import "../../../chunk-T6GKRQUF.mjs";
7
7
  import "../../../chunk-5MAMLVMV.mjs";
8
+ import "../../../chunk-CSTZEHUP.mjs";
8
9
  import "../../../chunk-K4H5ZMYA.mjs";
9
10
  import "../../../chunk-5RBVGYWH.mjs";
10
11
  export {
@@ -0,0 +1,5 @@
1
+ import * as untyped from 'untyped';
2
+
3
+ declare const _default: untyped.SchemaDefinition;
4
+
5
+ export { _default as default };
@@ -0,0 +1,5 @@
1
+ import * as untyped from 'untyped';
2
+
3
+ declare const _default: untyped.SchemaDefinition;
4
+
5
+ export { _default as default };
@@ -0,0 +1,86 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-MCKGQKYU.js');
2
+
3
+ // src/executors/r2-upload-publish/untyped.ts
4
+ var _untyped = require('untyped');
5
+ var untyped_default = _untyped.defineUntypedSchema.call(void 0, {
6
+ $schema: {
7
+ id: "R2UploadPublishExecutorSchema",
8
+ title: "R2 Upload Publish Executor",
9
+ description: "A type definition for the R2 Upload Publish executor schema",
10
+ requires: ["path", "bucketId", "bucketPath"]
11
+ },
12
+ path: {
13
+ $schema: {
14
+ title: "Local Uploads File Path",
15
+ type: "string",
16
+ format: "path",
17
+ description: "The base path to the files that will be uploaded to the R2 bucket"
18
+ }
19
+ },
20
+ registry: {
21
+ $schema: {
22
+ title: "Registry",
23
+ type: "string",
24
+ description: "The registry URL to publish to"
25
+ }
26
+ },
27
+ bucketId: {
28
+ $schema: {
29
+ title: "Bucket ID",
30
+ type: "string",
31
+ description: "The ID of the R2 bucket"
32
+ }
33
+ },
34
+ bucketPath: {
35
+ $schema: {
36
+ title: "Bucket Path",
37
+ type: "string",
38
+ format: "path",
39
+ description: "The path in the R2 bucket to upload files to"
40
+ },
41
+ $default: "/"
42
+ },
43
+ tag: {
44
+ $schema: {
45
+ title: "Tag",
46
+ type: "string",
47
+ description: "The tag to publish with"
48
+ },
49
+ $default: "latest"
50
+ },
51
+ writeMetaJson: {
52
+ $schema: {
53
+ title: "Write Meta JSON",
54
+ type: "boolean",
55
+ description: "Write a `meta.json` file to the upload bucket"
56
+ },
57
+ $default: false
58
+ },
59
+ clean: {
60
+ $schema: {
61
+ title: "Clean",
62
+ type: "boolean",
63
+ description: "Clean the bucket before uploading files"
64
+ },
65
+ $default: false
66
+ },
67
+ verbose: {
68
+ $schema: {
69
+ title: "Verbose",
70
+ type: "boolean",
71
+ description: "Enable verbose logging"
72
+ },
73
+ $default: false
74
+ },
75
+ dryRun: {
76
+ $schema: {
77
+ title: "Dry Run",
78
+ type: "boolean",
79
+ description: "Perform a dry run"
80
+ },
81
+ $default: false
82
+ }
83
+ });
84
+
85
+
86
+ exports.default = untyped_default;
@@ -0,0 +1,86 @@
1
+ import "../../../chunk-5RBVGYWH.mjs";
2
+
3
+ // src/executors/r2-upload-publish/untyped.ts
4
+ import { defineUntypedSchema } from "untyped";
5
+ var untyped_default = defineUntypedSchema({
6
+ $schema: {
7
+ id: "R2UploadPublishExecutorSchema",
8
+ title: "R2 Upload Publish Executor",
9
+ description: "A type definition for the R2 Upload Publish executor schema",
10
+ requires: ["path", "bucketId", "bucketPath"]
11
+ },
12
+ path: {
13
+ $schema: {
14
+ title: "Local Uploads File Path",
15
+ type: "string",
16
+ format: "path",
17
+ description: "The base path to the files that will be uploaded to the R2 bucket"
18
+ }
19
+ },
20
+ registry: {
21
+ $schema: {
22
+ title: "Registry",
23
+ type: "string",
24
+ description: "The registry URL to publish to"
25
+ }
26
+ },
27
+ bucketId: {
28
+ $schema: {
29
+ title: "Bucket ID",
30
+ type: "string",
31
+ description: "The ID of the R2 bucket"
32
+ }
33
+ },
34
+ bucketPath: {
35
+ $schema: {
36
+ title: "Bucket Path",
37
+ type: "string",
38
+ format: "path",
39
+ description: "The path in the R2 bucket to upload files to"
40
+ },
41
+ $default: "/"
42
+ },
43
+ tag: {
44
+ $schema: {
45
+ title: "Tag",
46
+ type: "string",
47
+ description: "The tag to publish with"
48
+ },
49
+ $default: "latest"
50
+ },
51
+ writeMetaJson: {
52
+ $schema: {
53
+ title: "Write Meta JSON",
54
+ type: "boolean",
55
+ description: "Write a `meta.json` file to the upload bucket"
56
+ },
57
+ $default: false
58
+ },
59
+ clean: {
60
+ $schema: {
61
+ title: "Clean",
62
+ type: "boolean",
63
+ description: "Clean the bucket before uploading files"
64
+ },
65
+ $default: false
66
+ },
67
+ verbose: {
68
+ $schema: {
69
+ title: "Verbose",
70
+ type: "boolean",
71
+ description: "Enable verbose logging"
72
+ },
73
+ $default: false
74
+ },
75
+ dryRun: {
76
+ $schema: {
77
+ title: "Dry Run",
78
+ type: "boolean",
79
+ description: "Perform a dry run"
80
+ },
81
+ $default: false
82
+ }
83
+ });
84
+ export {
85
+ untyped_default as default
86
+ };
@@ -1,10 +1,11 @@
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 _chunkO7L7SGHEjs = require('../../../chunk-O7L7SGHE.js');
3
+ var _chunkKUGKM6MYjs = require('../../../chunk-KUGKM6MY.js');
4
4
 
5
5
 
6
- var _chunkXKQ3HGETjs = require('../../../chunk-XKQ3HGET.js');
6
+ var _chunkE7ITICBKjs = require('../../../chunk-E7ITICBK.js');
7
7
  require('../../../chunk-PGTHXO6M.js');
8
+ require('../../../chunk-FBLD25X4.js');
8
9
  require('../../../chunk-AWKQRM2H.js');
9
10
 
10
11
 
@@ -19,7 +20,7 @@ async function* serveExecutor(options, context) {
19
20
  throw new Error("Nx executor context was invalid");
20
21
  }
21
22
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
22
- const wranglerOptions = _chunkXKQ3HGETjs.createCliOptions.call(void 0, { ...options });
23
+ const wranglerOptions = _chunkE7ITICBKjs.createCliOptions.call(void 0, { ...options });
23
24
  const wranglerBin = _chunkMCKGQKYUjs.__require.resolve("wrangler/bin/wrangler");
24
25
  yield* _asynciterable.createAsyncIterable.call(void 0,
25
26
  async ({ done, next, error }) => {
@@ -55,7 +56,7 @@ async function* serveExecutor(options, context) {
55
56
  success: true
56
57
  };
57
58
  }
58
- var executor_default = _chunkO7L7SGHEjs.withRunExecutor.call(void 0,
59
+ var executor_default = _chunkKUGKM6MYjs.withRunExecutor.call(void 0,
59
60
  "Cloudflare Serve executor",
60
61
  serveExecutor,
61
62
  {
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "../../../chunk-37JKGWKW.mjs";
3
+ } from "../../../chunk-6Z2WUPYH.mjs";
4
4
  import {
5
5
  createCliOptions
6
- } from "../../../chunk-F5RW4AZL.mjs";
6
+ } from "../../../chunk-T6GKRQUF.mjs";
7
7
  import "../../../chunk-5MAMLVMV.mjs";
8
+ import "../../../chunk-CSTZEHUP.mjs";
8
9
  import "../../../chunk-K4H5ZMYA.mjs";
9
10
  import {
10
11
  __require
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkJ725S66Wjs = require('../../../chunk-J725S66W.js');
5
+ var _chunkAYBX4RT3js = require('../../../chunk-AYBX4RT3.js');
6
6
  require('../../../chunk-MCKGQKYU.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkJ725S66Wjs.generator_default; exports.initGenerator = _chunkJ725S66Wjs.initGenerator; exports.initSchematic = _chunkJ725S66Wjs.initSchematic;
11
+ exports.default = _chunkAYBX4RT3js.generator_default; exports.initGenerator = _chunkAYBX4RT3js.initGenerator; exports.initSchematic = _chunkAYBX4RT3js.initSchematic;
@@ -2,7 +2,7 @@ import {
2
2
  generator_default,
3
3
  initGenerator,
4
4
  initSchematic
5
- } from "../../../chunk-BQRUV3SX.mjs";
5
+ } from "../../../chunk-Z7HN5SJV.mjs";
6
6
  import "../../../chunk-5RBVGYWH.mjs";
7
7
  export {
8
8
  generator_default as default,
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkKW5NUAMYjs = require('../../../chunk-KW5NUAMY.js');
6
- require('../../../chunk-J725S66W.js');
5
+ var _chunk66HLJNAFjs = require('../../../chunk-66HLJNAF.js');
6
+ require('../../../chunk-AYBX4RT3.js');
7
7
  require('../../../chunk-PGTHXO6M.js');
8
8
  require('../../../chunk-AWKQRM2H.js');
9
9
  require('../../../chunk-MCKGQKYU.js');
@@ -11,4 +11,4 @@ require('../../../chunk-MCKGQKYU.js');
11
11
 
12
12
 
13
13
 
14
- exports.applicationGenerator = _chunkKW5NUAMYjs.applicationGenerator; exports.applicationSchematic = _chunkKW5NUAMYjs.applicationSchematic; exports.default = _chunkKW5NUAMYjs.generator_default;
14
+ exports.applicationGenerator = _chunk66HLJNAFjs.applicationGenerator; exports.applicationSchematic = _chunk66HLJNAFjs.applicationSchematic; exports.default = _chunk66HLJNAFjs.generator_default;
@@ -2,8 +2,8 @@ import {
2
2
  applicationGenerator,
3
3
  applicationSchematic,
4
4
  generator_default
5
- } from "../../../chunk-76FQTDEJ.mjs";
6
- import "../../../chunk-BQRUV3SX.mjs";
5
+ } from "../../../chunk-W3KWAUKY.mjs";
6
+ import "../../../chunk-Z7HN5SJV.mjs";
7
7
  import "../../../chunk-5MAMLVMV.mjs";
8
8
  import "../../../chunk-K4H5ZMYA.mjs";
9
9
  import "../../../chunk-5RBVGYWH.mjs";
@@ -0,0 +1,6 @@
1
+ import { CreateNodesV2 } from '@nx/devkit';
2
+
3
+ declare const name = "storm-software/cloudflare-tools/cloudflare";
4
+ declare const createNodesV2: CreateNodesV2;
5
+
6
+ export { createNodesV2, name };
@@ -0,0 +1,6 @@
1
+ import { CreateNodesV2 } from '@nx/devkit';
2
+
3
+ declare const name = "storm-software/cloudflare-tools/cloudflare";
4
+ declare const createNodesV2: CreateNodesV2;
5
+
6
+ export { createNodesV2, name };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkVJLWHQ5Bjs = require('../../chunk-VJLWHQ5B.js');
5
+ require('../../chunk-FBLD25X4.js');
6
+ require('../../chunk-MCKGQKYU.js');
7
+
8
+
9
+
10
+ exports.createNodesV2 = _chunkVJLWHQ5Bjs.createNodesV2; exports.name = _chunkVJLWHQ5Bjs.name;
@@ -0,0 +1,10 @@
1
+ import {
2
+ createNodesV2,
3
+ name
4
+ } from "../../chunk-E52DON6Y.mjs";
5
+ import "../../chunk-CSTZEHUP.mjs";
6
+ import "../../chunk-5RBVGYWH.mjs";
7
+ export {
8
+ createNodesV2,
9
+ name
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/cloudflare-tools",
3
- "version": "0.71.209",
3
+ "version": "0.71.211",
4
4
  "private": false,
5
5
  "description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
6
6
  "keywords": [
@@ -63,6 +63,20 @@
63
63
  "default": "./dist/executors.js"
64
64
  }
65
65
  },
66
+ "./executors/*": {
67
+ "import": {
68
+ "types": "./dist/src/executors/*.d.mts",
69
+ "default": "./dist/src/executors/*.mjs"
70
+ },
71
+ "require": {
72
+ "types": "./dist/src/executors/*.d.ts",
73
+ "default": "./dist/src/executors/*.js"
74
+ },
75
+ "default": {
76
+ "types": "./dist/src/executors/*.d.ts",
77
+ "default": "./dist/src/executors/*.js"
78
+ }
79
+ },
66
80
  "./generators": {
67
81
  "import": {
68
82
  "types": "./dist/generators.d.mts",
@@ -77,6 +91,20 @@
77
91
  "default": "./dist/generators.js"
78
92
  }
79
93
  },
94
+ "./generators/*": {
95
+ "import": {
96
+ "types": "./dist/src/generators/*.d.mts",
97
+ "default": "./dist/src/generators/*.mjs"
98
+ },
99
+ "require": {
100
+ "types": "./dist/src/generators/*.d.ts",
101
+ "default": "./dist/src/generators/*.js"
102
+ },
103
+ "default": {
104
+ "types": "./dist/src/generators/*.d.ts",
105
+ "default": "./dist/src/generators/*.js"
106
+ }
107
+ },
80
108
  "./utils": {
81
109
  "import": {
82
110
  "types": "./dist/src/utils/index.d.mts",
@@ -116,9 +144,9 @@
116
144
  "@aws-sdk/client-s3": "^3.1068.0",
117
145
  "@aws-sdk/lib-storage": "^3.1068.0",
118
146
  "@smithy/node-http-handler": "^4.7.8",
119
- "@storm-software/config": "1.138.4",
120
- "@storm-software/config-tools": "1.190.67",
121
- "@storm-software/workspace-tools": "1.296.47",
147
+ "@storm-software/config": "^1.138.5",
148
+ "@storm-software/config-tools": "^1.190.68",
149
+ "@storm-software/workspace-tools": "^1.296.48",
122
150
  "defu": "^6.1.7",
123
151
  "glob": "^11.1.0",
124
152
  "mime-types": "^3.0.2",
@@ -143,5 +171,5 @@
143
171
  "publishConfig": { "access": "public" },
144
172
  "executors": "./executors.json",
145
173
  "generators": "./generators.json",
146
- "gitHead": "b8b27381c85870313244941044c8f535009f86a8"
174
+ "gitHead": "4f6c082c1a9d398a63f56327ce355368e3d3d3d5"
147
175
  }
@@ -1,164 +0,0 @@
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; }// ../workspace-tools/src/utils/package-helpers.ts
2
-
3
-
4
-
5
- var _devkit = require('@nx/devkit');
6
-
7
- // ../config-tools/src/utilities/toml.ts
8
- var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
9
- function parseCargoToml(cargoString) {
10
- if (!cargoString) {
11
- throw new Error("Cargo.toml is empty");
12
- }
13
- return _jtoml2.default.parse(cargoString, {
14
- x: { comment: true }
15
- });
16
- }
17
-
18
- // ../workspace-tools/src/utils/package-helpers.ts
19
- var _child_process = require('child_process');
20
- var _fs = require('fs');
21
- var _promises = require('fs/promises');
22
- var _path = require('path');
23
- var _prettier = require('prettier');
24
-
25
- // ../package-constants/src/tags.ts
26
- var ProjectTagConstants = {
27
- Language: {
28
- TAG_ID: "language",
29
- TYPESCRIPT: "typescript",
30
- RUST: "rust"
31
- },
32
- ProjectType: {
33
- TAG_ID: "type",
34
- LIBRARY: "library",
35
- APPLICATION: "application"
36
- },
37
- ProjectLinking: {
38
- TAG_ID: "project-linking",
39
- REFERENCE: "reference",
40
- ALIAS: "alias"
41
- },
42
- DistStyle: {
43
- TAG_ID: "dist-style",
44
- NORMAL: "normal",
45
- CLEAN: "clean"
46
- },
47
- Provider: {
48
- TAG_ID: "provider"
49
- },
50
- Platform: {
51
- TAG_ID: "platform",
52
- NODE: "node",
53
- BROWSER: "browser",
54
- NEUTRAL: "neutral",
55
- WORKER: "worker"
56
- },
57
- Registry: {
58
- TAG_ID: "registry",
59
- CARGO: "cargo",
60
- NPM: "npm",
61
- CONTAINER: "container",
62
- CYCLONE: "cyclone"
63
- },
64
- Plugin: {
65
- TAG_ID: "plugin"
66
- },
67
- Builder: {
68
- TAG_ID: "builder",
69
- TSC: "tsc",
70
- TSUP: "tsup",
71
- TSDOWN: "tsdown",
72
- VITE: "vite",
73
- ROLLDOWN: "rolldown"
74
- }
75
- };
76
- var formatProjectTag = (variant, value) => {
77
- return `${variant}:${value}`;
78
- };
79
- var hasProjectTag = (project, variant) => {
80
- project.tags = _nullishCoalesce(project.tags, () => ( []));
81
- const prefix = formatProjectTag(variant, "");
82
- return project.tags.some(
83
- (tag) => tag.startsWith(prefix) && tag.length > prefix.length
84
- );
85
- };
86
- var getProjectTag = (project, variant) => {
87
- if (!hasProjectTag(project, variant)) {
88
- return void 0;
89
- }
90
- project.tags = _nullishCoalesce(project.tags, () => ( []));
91
- const prefix = formatProjectTag(variant, "");
92
- const tag = project.tags.find((tag2) => tag2.startsWith(prefix));
93
- return _optionalChain([tag, 'optionalAccess', _ => _.replace, 'call', _2 => _2(prefix, "")]);
94
- };
95
- var isEqualProjectTag = (project, variant, value) => {
96
- const tag = getProjectTag(project, variant);
97
- return !!(tag && _optionalChain([tag, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]) === value.toUpperCase());
98
- };
99
-
100
- // ../workspace-tools/src/utils/project-tags.ts
101
- var addProjectTag = (project, variant, value, options = {
102
- overwrite: false
103
- }) => {
104
- project.tags = _nullishCoalesce(project.tags, () => ( []));
105
- if (options.overwrite || !hasProjectTag(project, variant)) {
106
- project.tags = project.tags.filter(
107
- (tag) => !tag.startsWith(formatProjectTag(variant, ""))
108
- );
109
- project.tags.push(formatProjectTag(variant, value));
110
- }
111
- };
112
-
113
- // ../workspace-tools/src/utils/package-helpers.ts
114
- var getPackageInfo = (project) => {
115
- if (isEqualProjectTag(
116
- project,
117
- ProjectTagConstants.Language.TAG_ID,
118
- ProjectTagConstants.Language.RUST
119
- ) && _fs.existsSync.call(void 0, _devkit.joinPathFragments.call(void 0, project.root, "Cargo.toml"))) {
120
- return {
121
- type: "Cargo.toml",
122
- content: parseCargoToml(_devkit.joinPathFragments.call(void 0, project.root, "Cargo.toml"))
123
- };
124
- } else if (isEqualProjectTag(
125
- project,
126
- ProjectTagConstants.Language.TAG_ID,
127
- ProjectTagConstants.Language.TYPESCRIPT
128
- ) && _fs.existsSync.call(void 0, _devkit.joinPathFragments.call(void 0, project.root, "package.json"))) {
129
- return {
130
- type: "package.json",
131
- content: _devkit.readJsonFile.call(void 0,
132
- _devkit.joinPathFragments.call(void 0, project.root, "package.json")
133
- )
134
- };
135
- }
136
- return null;
137
- };
138
-
139
- // ../workspace-tools/src/utils/create-cli-options.ts
140
-
141
- function createCliOptions(obj) {
142
- const args = [];
143
- for (const key in obj) {
144
- const value = obj[key];
145
- if (value) {
146
- const arg = _devkit.names.call(void 0, key).fileName;
147
- if (Array.isArray(value)) {
148
- args.push(
149
- `--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
150
- );
151
- } else {
152
- args.push(`--${arg.toLowerCase()}=${value}`);
153
- }
154
- }
155
- }
156
- return args;
157
- }
158
-
159
-
160
-
161
-
162
-
163
-
164
- exports.ProjectTagConstants = ProjectTagConstants; exports.addProjectTag = addProjectTag; exports.getPackageInfo = getPackageInfo; exports.createCliOptions = createCliOptions;
@@ -1,5 +0,0 @@
1
- import { Options } from 'tsup';
2
-
3
- declare const config: Options;
4
-
5
- export { config as default };
@@ -1,5 +0,0 @@
1
- import { Options } from 'tsup';
2
-
3
- declare const config: Options;
4
-
5
- export { config as default };
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-MCKGQKYU.js');
2
-
3
- // tsup.config.ts
4
- var _tsup = require('tsup');
5
- var config = _tsup.defineConfig.call(void 0, [
6
- {
7
- name: "cloudflare-tools",
8
- target: "node22",
9
- entryPoints: [
10
- "./*.ts",
11
- "./src/utils/*.ts",
12
- "./src/executors/*/executor.ts",
13
- "./src/generators/*/generator.ts",
14
- "./src/generators/plugins/*.ts"
15
- ],
16
- outDir: "dist",
17
- format: ["cjs", "esm"],
18
- platform: "node",
19
- splitting: true,
20
- clean: true,
21
- dts: true,
22
- sourcemap: false,
23
- shims: true,
24
- tsconfig: "./tsconfig.json",
25
- external: ["@storm-software/workspace-tools"]
26
- }
27
- ]);
28
- var tsup_config_default = config;
29
-
30
-
31
- exports.default = tsup_config_default;