@storm-software/cloudflare-tools 0.71.210 → 0.71.212
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.
- package/CHANGELOG.md +19 -1
- package/README.md +7 -7
- package/dist/{chunk-MZFOPOSA.mjs → chunk-3Z2F7VN4.mjs} +1 -1
- package/dist/{chunk-2UW4WAHW.js → chunk-6KDWHW2G.js} +29 -1
- package/dist/{chunk-37JKGWKW.mjs → chunk-6Z2WUPYH.mjs} +4 -4
- package/dist/{chunk-F5RW4AZL.mjs → chunk-CSTZEHUP.mjs} +2 -73
- package/dist/chunk-E52DON6Y.mjs +132 -0
- package/dist/{chunk-75CHHXTR.js → chunk-E5RARE7E.js} +2 -2
- package/dist/chunk-E7ITICBK.js +77 -0
- package/dist/chunk-FBLD25X4.js +93 -0
- package/dist/{chunk-O7L7SGHE.js → chunk-KUGKM6MY.js} +5 -5
- package/dist/{chunk-LBHXS7RE.js → chunk-O327KKPU.js} +2 -2
- package/dist/{chunk-FEGLXQK4.mjs → chunk-OL24QIXM.mjs} +1 -1
- package/dist/chunk-T6GKRQUF.mjs +77 -0
- package/dist/{chunk-TNVZ6KHS.mjs → chunk-U6OMVOFA.mjs} +1 -1
- package/dist/{chunk-5KJIDUNK.mjs → chunk-UUTVNCRX.mjs} +29 -1
- package/dist/chunk-VJLWHQ5B.js +132 -0
- package/dist/{chunk-U7XMCD6Y.js → chunk-XB6S7S3C.js} +3 -3
- package/dist/executors.js +5 -4
- package/dist/executors.mjs +5 -4
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.d.mts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +23 -144
- package/dist/index.mjs +11 -132
- package/dist/src/executors/cloudflare-publish/executor.js +5 -4
- package/dist/src/executors/cloudflare-publish/executor.mjs +4 -3
- package/dist/src/executors/r2-upload-publish/executor.js +4 -3
- package/dist/src/executors/r2-upload-publish/executor.mjs +3 -2
- package/dist/src/executors/r2-upload-publish/untyped.d.mts +5 -0
- package/dist/src/executors/r2-upload-publish/untyped.d.ts +5 -0
- package/dist/src/executors/r2-upload-publish/untyped.js +86 -0
- package/dist/src/executors/r2-upload-publish/untyped.mjs +86 -0
- package/dist/src/executors/serve/executor.js +5 -4
- package/dist/src/executors/serve/executor.mjs +3 -2
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +3 -3
- package/dist/src/generators/worker/generator.mjs +2 -2
- package/dist/src/plugins/index.d.mts +6 -0
- package/dist/src/plugins/index.d.ts +6 -0
- package/dist/src/plugins/index.js +10 -0
- package/dist/src/plugins/index.mjs +10 -0
- package/package.json +33 -5
- package/dist/chunk-XKQ3HGET.js +0 -164
- package/dist/tsup.config.d.mts +0 -5
- package/dist/tsup.config.d.ts +0 -5
- package/dist/tsup.config.js +0 -31
- package/dist/tsup.config.mjs +0 -31
package/dist/chunk-XKQ3HGET.js
DELETED
|
@@ -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;
|
package/dist/tsup.config.d.mts
DELETED
package/dist/tsup.config.d.ts
DELETED
package/dist/tsup.config.js
DELETED
|
@@ -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;
|
package/dist/tsup.config.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import "./chunk-5RBVGYWH.mjs";
|
|
2
|
-
|
|
3
|
-
// tsup.config.ts
|
|
4
|
-
import { defineConfig } from "tsup";
|
|
5
|
-
var config = defineConfig([
|
|
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
|
-
export {
|
|
30
|
-
tsup_config_default as default
|
|
31
|
-
};
|