wrangler 3.78.5 → 3.78.6
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/package.json +3 -3
- package/wrangler-dist/cli.js +39 -10
- package/wrangler-dist/cli.js.map +7 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.78.
|
3
|
+
"version": "3.78.6",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"xxhash-wasm": "^1.0.1",
|
68
68
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
69
69
|
"@cloudflare/workers-shared": "0.5.3",
|
70
|
-
"miniflare": "3.20240909.
|
70
|
+
"miniflare": "3.20240909.4"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@cloudflare/types": "^6.18.4",
|
@@ -154,7 +154,7 @@
|
|
154
154
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
155
155
|
"@cloudflare/cli": "1.1.1",
|
156
156
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
157
|
-
"@cloudflare/pages-shared": "^0.11.
|
157
|
+
"@cloudflare/pages-shared": "^0.11.60",
|
158
158
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
159
159
|
},
|
160
160
|
"peerDependencies": {
|
package/wrangler-dist/cli.js
CHANGED
@@ -152543,9 +152543,9 @@ function getEnvironmentVariableFactory({
|
|
152543
152543
|
}) {
|
152544
152544
|
let hasWarned = false;
|
152545
152545
|
return () => {
|
152546
|
-
if (process.env
|
152546
|
+
if (variableName in process.env) {
|
152547
152547
|
return process.env[variableName];
|
152548
|
-
} else if (deprecatedName && process.env
|
152548
|
+
} else if (deprecatedName && deprecatedName in process.env) {
|
152549
152549
|
if (!hasWarned) {
|
152550
152550
|
hasWarned = true;
|
152551
152551
|
console.warn(
|
@@ -152595,6 +152595,12 @@ var getOutputFilePathFromEnv = getEnvironmentVariableFactory({
|
|
152595
152595
|
var getCIMatchTag = getEnvironmentVariableFactory({
|
152596
152596
|
variableName: "WRANGLER_CI_MATCH_TAG"
|
152597
152597
|
});
|
152598
|
+
var getBuildConditionsFromEnv = getEnvironmentVariableFactory({
|
152599
|
+
variableName: "WRANGLER_BUILD_CONDITIONS"
|
152600
|
+
});
|
152601
|
+
var getBuildPlatformFromEnv = getEnvironmentVariableFactory({
|
152602
|
+
variableName: "WRANGLER_BUILD_PLATFORM"
|
152603
|
+
});
|
152598
152604
|
|
152599
152605
|
// src/utils/log-file.ts
|
152600
152606
|
init_import_meta_url();
|
@@ -152876,7 +152882,7 @@ init_import_meta_url();
|
|
152876
152882
|
init_import_meta_url();
|
152877
152883
|
|
152878
152884
|
// package.json
|
152879
|
-
var version = "3.78.
|
152885
|
+
var version = "3.78.6";
|
152880
152886
|
var package_default = {
|
152881
152887
|
name: "wrangler",
|
152882
152888
|
version,
|
@@ -160608,7 +160614,7 @@ function createModuleCollector(props) {
|
|
160608
160614
|
packageJson,
|
160609
160615
|
args.path.replace(`${packageName}/`, ""),
|
160610
160616
|
{
|
160611
|
-
conditions:
|
160617
|
+
conditions: getBuildConditions()
|
160612
160618
|
}
|
160613
160619
|
);
|
160614
160620
|
if (testResolved) {
|
@@ -160993,7 +160999,25 @@ var COMMON_ESBUILD_OPTIONS = {
|
|
160993
160999
|
target: "es2022",
|
160994
161000
|
loader: { ".js": "jsx", ".mjs": "jsx", ".cjs": "jsx" }
|
160995
161001
|
};
|
160996
|
-
|
161002
|
+
function getBuildConditions() {
|
161003
|
+
const envVar = getBuildConditionsFromEnv();
|
161004
|
+
if (envVar !== void 0) {
|
161005
|
+
return envVar.split(",");
|
161006
|
+
} else {
|
161007
|
+
return ["workerd", "worker", "browser"];
|
161008
|
+
}
|
161009
|
+
}
|
161010
|
+
__name(getBuildConditions, "getBuildConditions");
|
161011
|
+
function getBuildPlatform() {
|
161012
|
+
const platform2 = getBuildPlatformFromEnv();
|
161013
|
+
if (platform2 !== void 0 && !["browser", "node", "neutral"].includes(platform2)) {
|
161014
|
+
throw new UserError(
|
161015
|
+
"Invalid esbuild platform configuration defined in the WRANGLER_BUILD_PLATFORM environment variable.\nValid platform values are: 'browser', 'node' and 'neutral'."
|
161016
|
+
);
|
161017
|
+
}
|
161018
|
+
return platform2;
|
161019
|
+
}
|
161020
|
+
__name(getBuildPlatform, "getBuildPlatform");
|
160997
161021
|
async function bundleWorker(entry, destination, {
|
160998
161022
|
bundle,
|
160999
161023
|
moduleCollector = noopModuleCollector,
|
@@ -161162,7 +161186,8 @@ async function bundleWorker(entry, destination, {
|
|
161162
161186
|
sourceRoot: destination,
|
161163
161187
|
minify,
|
161164
161188
|
metafile: true,
|
161165
|
-
conditions:
|
161189
|
+
conditions: getBuildConditions(),
|
161190
|
+
platform: getBuildPlatform(),
|
161166
161191
|
...{
|
161167
161192
|
define: {
|
161168
161193
|
...defineNavigatorUserAgent ? { "navigator.userAgent": `"Cloudflare-Workers"` } : {},
|
@@ -166736,7 +166761,7 @@ var MAX_UPLOAD_GATEWAY_ERRORS2 = 5;
|
|
166736
166761
|
var syncExperimentalAssets = /* @__PURE__ */ __name(async (accountId, scriptName, assetDirectory) => {
|
166737
166762
|
(0, import_node_assert9.default)(accountId, "Missing accountId");
|
166738
166763
|
logger.info("\u{1F300} Building list of assets...");
|
166739
|
-
const manifest = await
|
166764
|
+
const manifest = await buildAssetManifest(assetDirectory);
|
166740
166765
|
logger.info("\u{1F300} Starting asset upload...");
|
166741
166766
|
const initializeAssetsResponse = await fetchResult(
|
166742
166767
|
`/accounts/${accountId}/workers/scripts/${scriptName}/assets-upload-session`,
|
@@ -166878,7 +166903,7 @@ Assets already uploaded have been saved, so the next attempt will automatically
|
|
166878
166903
|
);
|
166879
166904
|
return completionJwt;
|
166880
166905
|
}, "syncExperimentalAssets");
|
166881
|
-
var
|
166906
|
+
var buildAssetManifest = /* @__PURE__ */ __name(async (dir) => {
|
166882
166907
|
const files = await (0, import_promises8.readdir)(dir, { recursive: true });
|
166883
166908
|
const manifest = {};
|
166884
166909
|
let counter = 0;
|
@@ -166928,7 +166953,7 @@ Ensure all assets in your assets directory "${dir}" conform with the Workers max
|
|
166928
166953
|
})
|
166929
166954
|
);
|
166930
166955
|
return manifest;
|
166931
|
-
}, "
|
166956
|
+
}, "buildAssetManifest");
|
166932
166957
|
var MAX_DIFF_LINES = 100;
|
166933
166958
|
function logAssetUpload(line, diffCount) {
|
166934
166959
|
const level = logger.loggerLevel;
|
@@ -172587,7 +172612,10 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
172587
172612
|
await patchNonVersionedScriptSettings(accountId, scriptName, {
|
172588
172613
|
tail_consumers: worker.tail_consumers,
|
172589
172614
|
logpush: worker.logpush,
|
172590
|
-
observability
|
172615
|
+
// If the user hasn't specified observability assume that they want it disabled if they have it on.
|
172616
|
+
// This is a no-op in the event that they don't have observability enabled, but will remove observability
|
172617
|
+
// if it has been removed from their wrangler.toml
|
172618
|
+
observability: worker.observability ?? { enabled: false }
|
172591
172619
|
});
|
172592
172620
|
const { available_on_subdomain } = await fetchResult(`/accounts/${accountId}/workers/scripts/${scriptName}/subdomain`);
|
172593
172621
|
result = {
|
@@ -218102,3 +218130,4 @@ yargs-parser/build/lib/index.js:
|
|
218102
218130
|
* SPDX-License-Identifier: ISC
|
218103
218131
|
*)
|
218104
218132
|
*/
|
218133
|
+
//# sourceMappingURL=cli.js.map
|