@storm-software/cloudflare-tools 0.55.85 → 0.55.87
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 +24 -0
- package/README.md +1 -1
- package/dist/{chunk-VTHBMY4B.js → chunk-6XDOBG77.js} +39 -28
- package/dist/{chunk-FUE3PSOC.mjs → chunk-CW6SXRL4.mjs} +825 -544
- package/dist/{chunk-VRLPVMXP.mjs → chunk-FABNT5TZ.mjs} +15 -13
- package/dist/{chunk-QQJ225UZ.mjs → chunk-GPAI4NHQ.mjs} +141 -87
- package/dist/{chunk-YNJJF3XM.mjs → chunk-H4XWGL24.mjs} +93 -56
- package/dist/{chunk-IVLCYFXD.js → chunk-HBASMEU5.js} +168 -114
- package/dist/{chunk-6B5PUF7X.js → chunk-HIUZ6UL7.js} +97 -47
- package/dist/{chunk-R7AIVBS7.js → chunk-I4P7DVDN.js} +19 -24
- package/dist/{chunk-KWHACLHR.mjs → chunk-ISGKIYF5.mjs} +92 -42
- package/dist/{chunk-5RE7UZTH.mjs → chunk-L4WFYC7K.mjs} +39 -28
- package/dist/{chunk-PWYTCJYX.js → chunk-LDHIZ5T7.js} +875 -594
- package/dist/{chunk-J5SB6L2L.js → chunk-MCKGQKYU.js} +2 -5
- package/dist/{chunk-DEJ5S46A.mjs → chunk-MV24QW26.mjs} +195 -127
- package/dist/{chunk-V7LBWOVV.js → chunk-PZ5CI56F.js} +196 -128
- package/dist/{chunk-AOEF7EWN.mjs → chunk-QPABB45G.mjs} +19 -24
- package/dist/{chunk-TLFPZXKG.mjs → chunk-QQ22YQSB.mjs} +3 -6
- package/dist/{chunk-QGRENI3O.js → chunk-RIUVF72K.js} +17 -15
- package/dist/{chunk-PKQBY4ZM.js → chunk-X4Y76AIM.js} +26 -20
- package/dist/{chunk-CNGX2WYG.js → chunk-XCEENUJB.js} +93 -58
- package/dist/{chunk-N4KJP2OA.mjs → chunk-YJOYATEB.mjs} +27 -21
- package/dist/executors.js +8 -8
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +6 -6
- package/dist/generators.mjs +5 -5
- package/dist/index.js +41 -49
- package/dist/index.mjs +40 -48
- package/dist/src/executors/cloudflare-publish/executor.js +7 -7
- package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
- package/dist/src/executors/r2-upload-publish/executor.js +7 -7
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.js +49 -50
- package/dist/src/executors/serve/executor.mjs +48 -49
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +6 -6
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +4 -4
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +4 -4
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.js +3 -8
- package/dist/tsup.config.mjs +3 -8
- package/package.json +1 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-TLFPZXKG.mjs";
|
|
4
|
-
|
|
5
1
|
// ../workspace-tools/src/utils/create-cli-options.ts
|
|
6
2
|
import { names } from "@nx/devkit";
|
|
7
3
|
function createCliOptions(obj) {
|
|
@@ -11,7 +7,9 @@ function createCliOptions(obj) {
|
|
|
11
7
|
if (value) {
|
|
12
8
|
const arg = names(key).fileName;
|
|
13
9
|
if (Array.isArray(value)) {
|
|
14
|
-
args.push(
|
|
10
|
+
args.push(
|
|
11
|
+
`--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
|
|
12
|
+
);
|
|
15
13
|
} else {
|
|
16
14
|
args.push(`--${arg.toLowerCase()}=${value}`);
|
|
17
15
|
}
|
|
@@ -19,10 +17,12 @@ function createCliOptions(obj) {
|
|
|
19
17
|
}
|
|
20
18
|
return args;
|
|
21
19
|
}
|
|
22
|
-
__name(createCliOptions, "createCliOptions");
|
|
23
20
|
|
|
24
21
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
25
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
joinPathFragments,
|
|
24
|
+
readJsonFile
|
|
25
|
+
} from "@nx/devkit";
|
|
26
26
|
import { existsSync } from "node:fs";
|
|
27
27
|
|
|
28
28
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
@@ -63,15 +63,17 @@ var ProjectTagConstants = {
|
|
|
63
63
|
TAG_ID: "plugin"
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
var formatProjectTag =
|
|
66
|
+
var formatProjectTag = (variant, value) => {
|
|
67
67
|
return `${variant}:${value}`;
|
|
68
|
-
}
|
|
69
|
-
var hasProjectTag =
|
|
68
|
+
};
|
|
69
|
+
var hasProjectTag = (project, variant) => {
|
|
70
70
|
project.tags = project.tags ?? [];
|
|
71
71
|
const prefix = formatProjectTag(variant, "");
|
|
72
|
-
return project.tags.some(
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
return project.tags.some(
|
|
73
|
+
(tag) => tag.startsWith(prefix) && tag.length > prefix.length
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
var getProjectTag = (project, variant) => {
|
|
75
77
|
if (!hasProjectTag(project, variant)) {
|
|
76
78
|
return void 0;
|
|
77
79
|
}
|
|
@@ -79,20 +81,22 @@ var getProjectTag = /* @__PURE__ */ __name((project, variant) => {
|
|
|
79
81
|
const prefix = formatProjectTag(variant, "");
|
|
80
82
|
const tag = project.tags.find((tag2) => tag2.startsWith(prefix));
|
|
81
83
|
return tag?.replace(prefix, "");
|
|
82
|
-
}
|
|
83
|
-
var isEqualProjectTag =
|
|
84
|
+
};
|
|
85
|
+
var isEqualProjectTag = (project, variant, value) => {
|
|
84
86
|
const tag = getProjectTag(project, variant);
|
|
85
87
|
return !!(tag && tag?.toUpperCase() === value.toUpperCase());
|
|
86
|
-
}
|
|
87
|
-
var addProjectTag =
|
|
88
|
+
};
|
|
89
|
+
var addProjectTag = (project, variant, value, options = {
|
|
88
90
|
overwrite: false
|
|
89
91
|
}) => {
|
|
90
92
|
project.tags = project.tags ?? [];
|
|
91
93
|
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
92
|
-
project.tags = project.tags.filter(
|
|
94
|
+
project.tags = project.tags.filter(
|
|
95
|
+
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
96
|
+
);
|
|
93
97
|
project.tags.push(formatProjectTag(variant, value));
|
|
94
98
|
}
|
|
95
|
-
}
|
|
99
|
+
};
|
|
96
100
|
|
|
97
101
|
// ../workspace-tools/src/utils/toml.ts
|
|
98
102
|
import TOML from "@ltd/j-toml";
|
|
@@ -102,28 +106,35 @@ function parseCargoToml(cargoString) {
|
|
|
102
106
|
throw new Error("Cargo.toml is empty");
|
|
103
107
|
}
|
|
104
108
|
return TOML.parse(cargoString, {
|
|
105
|
-
x: {
|
|
106
|
-
comment: true
|
|
107
|
-
}
|
|
109
|
+
x: { comment: true }
|
|
108
110
|
});
|
|
109
111
|
}
|
|
110
|
-
__name(parseCargoToml, "parseCargoToml");
|
|
111
112
|
|
|
112
113
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
113
|
-
var getPackageInfo =
|
|
114
|
-
if (isEqualProjectTag(
|
|
114
|
+
var getPackageInfo = (project) => {
|
|
115
|
+
if (isEqualProjectTag(
|
|
116
|
+
project,
|
|
117
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
118
|
+
ProjectTagConstants.Language.RUST
|
|
119
|
+
) && existsSync(joinPathFragments(project.root, "Cargo.toml"))) {
|
|
115
120
|
return {
|
|
116
121
|
type: "Cargo.toml",
|
|
117
122
|
content: parseCargoToml(joinPathFragments(project.root, "Cargo.toml"))
|
|
118
123
|
};
|
|
119
|
-
} else if (isEqualProjectTag(
|
|
124
|
+
} else if (isEqualProjectTag(
|
|
125
|
+
project,
|
|
126
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
127
|
+
ProjectTagConstants.Language.TYPESCRIPT
|
|
128
|
+
) && existsSync(joinPathFragments(project.root, "package.json"))) {
|
|
120
129
|
return {
|
|
121
130
|
type: "package.json",
|
|
122
|
-
content: readJsonFile(
|
|
131
|
+
content: readJsonFile(
|
|
132
|
+
joinPathFragments(project.root, "package.json")
|
|
133
|
+
)
|
|
123
134
|
};
|
|
124
135
|
}
|
|
125
136
|
return null;
|
|
126
|
-
}
|
|
137
|
+
};
|
|
127
138
|
|
|
128
139
|
export {
|
|
129
140
|
ProjectTagConstants,
|