wrangler 4.156.1 → 4.156.2
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/config-schema.json +6 -6
- package/package.json +19 -19
- package/wrangler-dist/cli.d.ts +5 -6
- package/wrangler-dist/cli.js +859 -738
package/wrangler-dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ var path29 = require('path');
|
|
|
5
5
|
var nodeModule = require('module');
|
|
6
6
|
var Url = require('url');
|
|
7
7
|
var os7 = require('os');
|
|
8
|
-
var
|
|
8
|
+
var assert39 = require('assert');
|
|
9
9
|
var process17 = require('process');
|
|
10
10
|
var tty = require('tty');
|
|
11
11
|
var util = require('util');
|
|
@@ -58,7 +58,7 @@ var path29__namespace = /*#__PURE__*/_interopNamespace(path29);
|
|
|
58
58
|
var nodeModule__namespace = /*#__PURE__*/_interopNamespace(nodeModule);
|
|
59
59
|
var Url__default = /*#__PURE__*/_interopDefault(Url);
|
|
60
60
|
var os7__namespace = /*#__PURE__*/_interopNamespace(os7);
|
|
61
|
-
var
|
|
61
|
+
var assert39__default = /*#__PURE__*/_interopDefault(assert39);
|
|
62
62
|
var process17__default = /*#__PURE__*/_interopDefault(process17);
|
|
63
63
|
var tty__default = /*#__PURE__*/_interopDefault(tty);
|
|
64
64
|
var util__namespace = /*#__PURE__*/_interopNamespace(util);
|
|
@@ -186,7 +186,7 @@ var init_MultipartBody = __esm({
|
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
// ../workers-utils/src/config/environment.ts
|
|
189
|
-
var ARTIFACTS_EVENT_TYPES, WORKFLOW_JURISDICTIONS;
|
|
189
|
+
var ARTIFACTS_EVENT_TYPES, WORKFLOW_JURISDICTIONS, DEFAULT_MODULE_RULES;
|
|
190
190
|
var init_environment = __esm({
|
|
191
191
|
"../workers-utils/src/config/environment.ts"() {
|
|
192
192
|
init_import_meta_url();
|
|
@@ -202,6 +202,11 @@ var init_environment = __esm({
|
|
|
202
202
|
"cf.artifacts.repo.token.revoked"
|
|
203
203
|
];
|
|
204
204
|
WORKFLOW_JURISDICTIONS = ["eu", "fedramp", "us"];
|
|
205
|
+
DEFAULT_MODULE_RULES = [
|
|
206
|
+
{ type: "Text", globs: ["**/*.txt", "**/*.html", "**/*.sql"] },
|
|
207
|
+
{ type: "Data", globs: ["**/*.bin"] },
|
|
208
|
+
{ type: "CompiledWasm", globs: ["**/*.wasm", "**/*.wasm?module"] }
|
|
209
|
+
];
|
|
205
210
|
}
|
|
206
211
|
});
|
|
207
212
|
|
|
@@ -25960,7 +25965,7 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
|
|
|
25960
25965
|
);
|
|
25961
25966
|
}
|
|
25962
25967
|
const envName = args.env ?? getCloudflareEnv();
|
|
25963
|
-
|
|
25968
|
+
assert39__default.default(envName === void 0 || typeof envName === "string");
|
|
25964
25969
|
let activeEnv = topLevelEnv;
|
|
25965
25970
|
if (envName) {
|
|
25966
25971
|
if (isRedirectedConfig2) {
|
|
@@ -26163,7 +26168,7 @@ function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
|
|
|
26163
26168
|
}
|
|
26164
26169
|
}
|
|
26165
26170
|
function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
26166
|
-
|
|
26171
|
+
assert39__default.default(typeof args === "object" && args !== null && !Array.isArray(args));
|
|
26167
26172
|
const {
|
|
26168
26173
|
localProtocol: localProtocolArg,
|
|
26169
26174
|
upstreamProtocol: upstreamProtocolArg,
|
|
@@ -26171,17 +26176,17 @@ function normalizeAndValidateDev(diagnostics, rawDev, args) {
|
|
|
26171
26176
|
enableContainers: enableContainersArg,
|
|
26172
26177
|
generateTypes: generateTypesArg
|
|
26173
26178
|
} = args;
|
|
26174
|
-
|
|
26179
|
+
assert39__default.default(
|
|
26175
26180
|
localProtocolArg === void 0 || localProtocolArg === "http" || localProtocolArg === "https"
|
|
26176
26181
|
);
|
|
26177
|
-
|
|
26182
|
+
assert39__default.default(
|
|
26178
26183
|
upstreamProtocolArg === void 0 || upstreamProtocolArg === "http" || upstreamProtocolArg === "https"
|
|
26179
26184
|
);
|
|
26180
|
-
|
|
26181
|
-
|
|
26185
|
+
assert39__default.default(remoteArg === void 0 || typeof remoteArg === "boolean");
|
|
26186
|
+
assert39__default.default(
|
|
26182
26187
|
enableContainersArg === void 0 || typeof enableContainersArg === "boolean"
|
|
26183
26188
|
);
|
|
26184
|
-
|
|
26189
|
+
assert39__default.default(
|
|
26185
26190
|
generateTypesArg === void 0 || typeof generateTypesArg === "boolean"
|
|
26186
26191
|
);
|
|
26187
26192
|
const {
|
|
@@ -33014,7 +33019,7 @@ var DEFAULT_COMPAT_DATE;
|
|
|
33014
33019
|
var init_default_compat_date = __esm({
|
|
33015
33020
|
"../workers-utils/src/default-compat-date.ts"() {
|
|
33016
33021
|
init_import_meta_url();
|
|
33017
|
-
DEFAULT_COMPAT_DATE = "2026-11-
|
|
33022
|
+
DEFAULT_COMPAT_DATE = "2026-11-02";
|
|
33018
33023
|
}
|
|
33019
33024
|
});
|
|
33020
33025
|
|
|
@@ -34791,12 +34796,100 @@ var init_print_bindings = __esm({
|
|
|
34791
34796
|
function isNodejsCompatDefaultOn(compatibilityDate) {
|
|
34792
34797
|
return compatibilityDate !== void 0 && compatibilityDate >= NODEJS_COMPAT_DEFAULT_ON_DATE;
|
|
34793
34798
|
}
|
|
34794
|
-
|
|
34799
|
+
function resolveNodejsCompat(compatibilityDate, compatibilityFlags) {
|
|
34800
|
+
const isDefaultOn = isNodejsCompatDefaultOn(compatibilityDate);
|
|
34801
|
+
const isNodejsCompatEnabled = compatibilityFlags.includes("nodejs_compat") || isDefaultOn && !compatibilityFlags.includes("no_nodejs_compat");
|
|
34802
|
+
const isNodejsCompatV2Enabled = compatibilityFlags.includes("nodejs_compat_v2") || !compatibilityFlags.includes("no_nodejs_compat_v2") && (isDefaultOn || isNodejsCompatEnabled && compatibilityDate >= NODEJS_COMPAT_V2_SWITCH_OVER_DATE);
|
|
34803
|
+
return { isNodejsCompatEnabled, isNodejsCompatV2Enabled };
|
|
34804
|
+
}
|
|
34805
|
+
var NODEJS_COMPAT_DEFAULT_ON_DATE, NODEJS_COMPAT_V2_SWITCH_OVER_DATE;
|
|
34795
34806
|
var init_compatibility_date = __esm({
|
|
34796
34807
|
"../workers-utils/src/compatibility-date.ts"() {
|
|
34797
34808
|
init_import_meta_url();
|
|
34798
34809
|
NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
|
|
34799
34810
|
__name(isNodejsCompatDefaultOn, "isNodejsCompatDefaultOn");
|
|
34811
|
+
NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
|
|
34812
|
+
__name(resolveNodejsCompat, "resolveNodejsCompat");
|
|
34813
|
+
}
|
|
34814
|
+
});
|
|
34815
|
+
|
|
34816
|
+
// ../workers-utils/src/node-compat.ts
|
|
34817
|
+
function getNodeCompat(compatibilityDate = "2000-01-01", compatibilityFlags) {
|
|
34818
|
+
const {
|
|
34819
|
+
hasNodejsAlsFlag,
|
|
34820
|
+
hasNodejsCompatFlag,
|
|
34821
|
+
hasNoNodejsCompatFlag,
|
|
34822
|
+
hasNodejsCompatV2Flag,
|
|
34823
|
+
hasNoNodejsCompatV2Flag,
|
|
34824
|
+
hasExperimentalNodejsCompatV2Flag
|
|
34825
|
+
} = parseNodeCompatibilityFlags(compatibilityFlags);
|
|
34826
|
+
const { isNodejsCompatEnabled, isNodejsCompatV2Enabled } = resolveNodejsCompat(compatibilityDate, compatibilityFlags);
|
|
34827
|
+
let mode = null;
|
|
34828
|
+
if (isNodejsCompatV2Enabled) {
|
|
34829
|
+
mode = "v2";
|
|
34830
|
+
} else if (isNodejsCompatEnabled) {
|
|
34831
|
+
mode = "v1";
|
|
34832
|
+
} else if (hasNodejsAlsFlag) {
|
|
34833
|
+
mode = "als";
|
|
34834
|
+
}
|
|
34835
|
+
return {
|
|
34836
|
+
mode,
|
|
34837
|
+
// Whether workerd will enable the `nodejs_compat`/`nodejs_compat_v2`
|
|
34838
|
+
// features, accounting for both the flags and the compatibility date.
|
|
34839
|
+
isNodejsCompatEnabled,
|
|
34840
|
+
isNodejsCompatV2Enabled,
|
|
34841
|
+
// Whether each flag was explicitly specified.
|
|
34842
|
+
hasNodejsAlsFlag,
|
|
34843
|
+
hasNodejsCompatFlag,
|
|
34844
|
+
hasNoNodejsCompatFlag,
|
|
34845
|
+
hasNodejsCompatV2Flag,
|
|
34846
|
+
hasNoNodejsCompatV2Flag,
|
|
34847
|
+
hasExperimentalNodejsCompatV2Flag
|
|
34848
|
+
};
|
|
34849
|
+
}
|
|
34850
|
+
function parseNodeCompatibilityFlags(compatibilityFlags) {
|
|
34851
|
+
return {
|
|
34852
|
+
hasNodejsAlsFlag: compatibilityFlags.includes("nodejs_als"),
|
|
34853
|
+
hasNodejsCompatFlag: compatibilityFlags.includes("nodejs_compat"),
|
|
34854
|
+
hasNoNodejsCompatFlag: compatibilityFlags.includes("no_nodejs_compat"),
|
|
34855
|
+
hasNodejsCompatV2Flag: compatibilityFlags.includes("nodejs_compat_v2"),
|
|
34856
|
+
hasNoNodejsCompatV2Flag: compatibilityFlags.includes("no_nodejs_compat_v2"),
|
|
34857
|
+
hasExperimentalNodejsCompatV2Flag: compatibilityFlags.includes(
|
|
34858
|
+
"experimental:nodejs_compat_v2"
|
|
34859
|
+
)
|
|
34860
|
+
};
|
|
34861
|
+
}
|
|
34862
|
+
var init_node_compat = __esm({
|
|
34863
|
+
"../workers-utils/src/node-compat.ts"() {
|
|
34864
|
+
init_import_meta_url();
|
|
34865
|
+
init_compatibility_date();
|
|
34866
|
+
__name(getNodeCompat, "getNodeCompat");
|
|
34867
|
+
__name(parseNodeCompatibilityFlags, "parseNodeCompatibilityFlags");
|
|
34868
|
+
}
|
|
34869
|
+
});
|
|
34870
|
+
function getFreshSourceMapSupport() {
|
|
34871
|
+
const realRequire = nodeModule.createRequire(import_meta_url || __filename);
|
|
34872
|
+
const resolvedSupportPath = realRequire.resolve(
|
|
34873
|
+
"@cspotcode/source-map-support"
|
|
34874
|
+
);
|
|
34875
|
+
const originalSymbolFor = Symbol.for;
|
|
34876
|
+
const originalSupport = realRequire.cache[resolvedSupportPath];
|
|
34877
|
+
try {
|
|
34878
|
+
Symbol.for = (key) => {
|
|
34879
|
+
assert39__default.default.strictEqual(key, "source-map-support/sharedData");
|
|
34880
|
+
return Symbol(key);
|
|
34881
|
+
};
|
|
34882
|
+
delete realRequire.cache[resolvedSupportPath];
|
|
34883
|
+
return realRequire(resolvedSupportPath);
|
|
34884
|
+
} finally {
|
|
34885
|
+
Symbol.for = originalSymbolFor;
|
|
34886
|
+
realRequire.cache[resolvedSupportPath] = originalSupport;
|
|
34887
|
+
}
|
|
34888
|
+
}
|
|
34889
|
+
var init_sourcemap = __esm({
|
|
34890
|
+
"../workers-utils/src/sourcemap.ts"() {
|
|
34891
|
+
init_import_meta_url();
|
|
34892
|
+
__name(getFreshSourceMapSupport, "getFreshSourceMapSupport");
|
|
34800
34893
|
}
|
|
34801
34894
|
});
|
|
34802
34895
|
|
|
@@ -36806,7 +36899,7 @@ var require_tree = __commonJS({
|
|
|
36806
36899
|
var require_util = __commonJS({
|
|
36807
36900
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/util.js"(exports2, module2) {
|
|
36808
36901
|
init_import_meta_url();
|
|
36809
|
-
var
|
|
36902
|
+
var assert72 = __require("assert");
|
|
36810
36903
|
var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols();
|
|
36811
36904
|
var { IncomingMessage } = __require("http");
|
|
36812
36905
|
var stream2 = __require("stream");
|
|
@@ -36827,7 +36920,7 @@ var require_util = __commonJS({
|
|
|
36827
36920
|
this[kBodyUsed] = false;
|
|
36828
36921
|
}
|
|
36829
36922
|
async *[Symbol.asyncIterator]() {
|
|
36830
|
-
|
|
36923
|
+
assert72(!this[kBodyUsed], "disturbed");
|
|
36831
36924
|
this[kBodyUsed] = true;
|
|
36832
36925
|
yield* this[kBody];
|
|
36833
36926
|
}
|
|
@@ -36839,7 +36932,7 @@ var require_util = __commonJS({
|
|
|
36839
36932
|
if (isStream(body)) {
|
|
36840
36933
|
if (bodyLength(body) === 0) {
|
|
36841
36934
|
body.on("data", function() {
|
|
36842
|
-
|
|
36935
|
+
assert72(false);
|
|
36843
36936
|
});
|
|
36844
36937
|
}
|
|
36845
36938
|
if (typeof body.readableDidRead !== "boolean") {
|
|
@@ -36959,7 +37052,7 @@ var require_util = __commonJS({
|
|
|
36959
37052
|
function getHostname(host) {
|
|
36960
37053
|
if (host[0] === "[") {
|
|
36961
37054
|
const idx2 = host.indexOf("]");
|
|
36962
|
-
|
|
37055
|
+
assert72(idx2 !== -1);
|
|
36963
37056
|
return host.substring(1, idx2);
|
|
36964
37057
|
}
|
|
36965
37058
|
const idx = host.indexOf(":");
|
|
@@ -36971,7 +37064,7 @@ var require_util = __commonJS({
|
|
|
36971
37064
|
if (!host) {
|
|
36972
37065
|
return null;
|
|
36973
37066
|
}
|
|
36974
|
-
|
|
37067
|
+
assert72(typeof host === "string");
|
|
36975
37068
|
const servername = getHostname(host);
|
|
36976
37069
|
if (net3.isIP(servername)) {
|
|
36977
37070
|
return "";
|
|
@@ -37529,7 +37622,7 @@ var require_util = __commonJS({
|
|
|
37529
37622
|
function errorRequest(client, request4, err) {
|
|
37530
37623
|
try {
|
|
37531
37624
|
request4.onError(err);
|
|
37532
|
-
|
|
37625
|
+
assert72(request4.aborted);
|
|
37533
37626
|
} catch (err2) {
|
|
37534
37627
|
client.emit("error", err2);
|
|
37535
37628
|
}
|
|
@@ -37935,7 +38028,7 @@ var require_request = __commonJS({
|
|
|
37935
38028
|
InvalidArgumentError,
|
|
37936
38029
|
NotSupportedError
|
|
37937
38030
|
} = require_errors();
|
|
37938
|
-
var
|
|
38031
|
+
var assert72 = __require("assert");
|
|
37939
38032
|
var {
|
|
37940
38033
|
isValidHTTPToken,
|
|
37941
38034
|
isValidHeaderValue,
|
|
@@ -38137,8 +38230,8 @@ var require_request = __commonJS({
|
|
|
38137
38230
|
}
|
|
38138
38231
|
}
|
|
38139
38232
|
onConnect(abort) {
|
|
38140
|
-
|
|
38141
|
-
|
|
38233
|
+
assert72(!this.aborted);
|
|
38234
|
+
assert72(!this.completed);
|
|
38142
38235
|
if (this.error) {
|
|
38143
38236
|
abort(this.error);
|
|
38144
38237
|
} else {
|
|
@@ -38150,8 +38243,8 @@ var require_request = __commonJS({
|
|
|
38150
38243
|
return this[kHandler].onResponseStarted?.();
|
|
38151
38244
|
}
|
|
38152
38245
|
onHeaders(statusCode, headers, resume, statusText) {
|
|
38153
|
-
|
|
38154
|
-
|
|
38246
|
+
assert72(!this.aborted);
|
|
38247
|
+
assert72(!this.completed);
|
|
38155
38248
|
if (channels.headers.hasSubscribers) {
|
|
38156
38249
|
channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
|
|
38157
38250
|
}
|
|
@@ -38162,8 +38255,8 @@ var require_request = __commonJS({
|
|
|
38162
38255
|
}
|
|
38163
38256
|
}
|
|
38164
38257
|
onData(chunk) {
|
|
38165
|
-
|
|
38166
|
-
|
|
38258
|
+
assert72(!this.aborted);
|
|
38259
|
+
assert72(!this.completed);
|
|
38167
38260
|
if (channels.bodyChunkReceived.hasSubscribers) {
|
|
38168
38261
|
channels.bodyChunkReceived.publish({ request: this, chunk });
|
|
38169
38262
|
}
|
|
@@ -38182,8 +38275,8 @@ var require_request = __commonJS({
|
|
|
38182
38275
|
*/
|
|
38183
38276
|
onUpgrade(statusCode, headers, socket, statusText = "") {
|
|
38184
38277
|
this.onFinally();
|
|
38185
|
-
|
|
38186
|
-
|
|
38278
|
+
assert72(!this.aborted);
|
|
38279
|
+
assert72(!this.completed);
|
|
38187
38280
|
if (channels.headers.hasSubscribers) {
|
|
38188
38281
|
channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
|
|
38189
38282
|
}
|
|
@@ -38198,8 +38291,8 @@ var require_request = __commonJS({
|
|
|
38198
38291
|
}
|
|
38199
38292
|
onComplete(trailers) {
|
|
38200
38293
|
this.onFinally();
|
|
38201
|
-
|
|
38202
|
-
|
|
38294
|
+
assert72(!this.aborted);
|
|
38295
|
+
assert72(!this.completed);
|
|
38203
38296
|
this.completed = true;
|
|
38204
38297
|
if (channels.trailers.hasSubscribers) {
|
|
38205
38298
|
channels.trailers.publish({ request: this, trailers });
|
|
@@ -38725,7 +38818,7 @@ var require_connect = __commonJS({
|
|
|
38725
38818
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/connect.js"(exports2, module2) {
|
|
38726
38819
|
init_import_meta_url();
|
|
38727
38820
|
var net3 = __require("net");
|
|
38728
|
-
var
|
|
38821
|
+
var assert72 = __require("assert");
|
|
38729
38822
|
var util2 = require_util();
|
|
38730
38823
|
var { InvalidArgumentError } = require_errors();
|
|
38731
38824
|
var tls;
|
|
@@ -38792,7 +38885,7 @@ var require_connect = __commonJS({
|
|
|
38792
38885
|
}
|
|
38793
38886
|
servername = servername || options.servername || util2.getServerName(host) || null;
|
|
38794
38887
|
const sessionKey = servername || hostname4;
|
|
38795
|
-
|
|
38888
|
+
assert72(sessionKey);
|
|
38796
38889
|
const session = customSession || sessionCache.get(sessionKey) || null;
|
|
38797
38890
|
port = port || 443;
|
|
38798
38891
|
socket = tls.connect({
|
|
@@ -38812,7 +38905,7 @@ var require_connect = __commonJS({
|
|
|
38812
38905
|
sessionCache.set(sessionKey, session2);
|
|
38813
38906
|
});
|
|
38814
38907
|
} else {
|
|
38815
|
-
|
|
38908
|
+
assert72(!httpSocket, "httpSocket can only be sent on TLS update");
|
|
38816
38909
|
port = port || 80;
|
|
38817
38910
|
socket = net3.connect({
|
|
38818
38911
|
highWaterMark: 64 * 1024,
|
|
@@ -39812,7 +39905,7 @@ var require_encoding = __commonJS({
|
|
|
39812
39905
|
var require_infra = __commonJS({
|
|
39813
39906
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/infra/index.js"(exports2, module2) {
|
|
39814
39907
|
init_import_meta_url();
|
|
39815
|
-
var
|
|
39908
|
+
var assert72 = __require("assert");
|
|
39816
39909
|
var { utf8DecodeBytes } = require_encoding();
|
|
39817
39910
|
function collectASequenceOfCodePoints(condition, input2, position) {
|
|
39818
39911
|
let result = "";
|
|
@@ -39888,7 +39981,7 @@ var require_infra = __commonJS({
|
|
|
39888
39981
|
__name(isomorphicDecode, "isomorphicDecode");
|
|
39889
39982
|
var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
|
|
39890
39983
|
function isomorphicEncode(input2) {
|
|
39891
|
-
|
|
39984
|
+
assert72(!invalidIsomorphicEncodeValueRegex.test(input2));
|
|
39892
39985
|
return input2;
|
|
39893
39986
|
}
|
|
39894
39987
|
__name(isomorphicEncode, "isomorphicEncode");
|
|
@@ -39917,7 +40010,7 @@ var require_infra = __commonJS({
|
|
|
39917
40010
|
if (result === void 0) {
|
|
39918
40011
|
throw new TypeError("Value is not JSON serializable");
|
|
39919
40012
|
}
|
|
39920
|
-
|
|
40013
|
+
assert72(typeof result === "string");
|
|
39921
40014
|
return result;
|
|
39922
40015
|
}
|
|
39923
40016
|
__name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString");
|
|
@@ -39941,14 +40034,14 @@ var require_infra = __commonJS({
|
|
|
39941
40034
|
var require_data_url = __commonJS({
|
|
39942
40035
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) {
|
|
39943
40036
|
init_import_meta_url();
|
|
39944
|
-
var
|
|
40037
|
+
var assert72 = __require("assert");
|
|
39945
40038
|
var { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require_infra();
|
|
39946
40039
|
var encoder2 = new TextEncoder();
|
|
39947
40040
|
var HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u;
|
|
39948
40041
|
var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/u;
|
|
39949
40042
|
var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;
|
|
39950
40043
|
function dataURLProcessor(dataURL) {
|
|
39951
|
-
|
|
40044
|
+
assert72(dataURL.protocol === "data:");
|
|
39952
40045
|
let input2 = URLSerializer(dataURL, true);
|
|
39953
40046
|
input2 = input2.slice(5);
|
|
39954
40047
|
const position = { position: 0 };
|
|
@@ -40120,7 +40213,7 @@ var require_data_url = __commonJS({
|
|
|
40120
40213
|
function collectAnHTTPQuotedString(input2, position, extractValue2 = false) {
|
|
40121
40214
|
const positionStart = position.position;
|
|
40122
40215
|
let value = "";
|
|
40123
|
-
|
|
40216
|
+
assert72(input2[position.position] === '"');
|
|
40124
40217
|
position.position++;
|
|
40125
40218
|
while (true) {
|
|
40126
40219
|
value += collectASequenceOfCodePoints(
|
|
@@ -40141,7 +40234,7 @@ var require_data_url = __commonJS({
|
|
|
40141
40234
|
value += input2[position.position];
|
|
40142
40235
|
position.position++;
|
|
40143
40236
|
} else {
|
|
40144
|
-
|
|
40237
|
+
assert72(quoteOrBackslash === '"');
|
|
40145
40238
|
break;
|
|
40146
40239
|
}
|
|
40147
40240
|
}
|
|
@@ -40152,7 +40245,7 @@ var require_data_url = __commonJS({
|
|
|
40152
40245
|
}
|
|
40153
40246
|
__name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString");
|
|
40154
40247
|
function serializeAMimeType(mimeType) {
|
|
40155
|
-
|
|
40248
|
+
assert72(mimeType !== "failure");
|
|
40156
40249
|
const { parameters, essence } = mimeType;
|
|
40157
40250
|
let serialization = essence;
|
|
40158
40251
|
for (let [name2, value] of parameters.entries()) {
|
|
@@ -40340,7 +40433,7 @@ var require_runtime_features = __commonJS({
|
|
|
40340
40433
|
var require_webidl = __commonJS({
|
|
40341
40434
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/webidl/index.js"(exports2, module2) {
|
|
40342
40435
|
init_import_meta_url();
|
|
40343
|
-
var
|
|
40436
|
+
var assert72 = __require("assert");
|
|
40344
40437
|
var { types: types14, inspect: inspect5 } = __require("util");
|
|
40345
40438
|
var { runtimeFeatures } = require_runtime_features();
|
|
40346
40439
|
var UNDEFINED = 1;
|
|
@@ -40696,7 +40789,7 @@ var require_webidl = __commonJS({
|
|
|
40696
40789
|
offset = jsBufferSource.byteOffset;
|
|
40697
40790
|
length = jsBufferSource.byteLength;
|
|
40698
40791
|
} else {
|
|
40699
|
-
|
|
40792
|
+
assert72(types14.isAnyArrayBuffer(jsBufferSource));
|
|
40700
40793
|
length = jsBufferSource.byteLength;
|
|
40701
40794
|
}
|
|
40702
40795
|
if (jsArrayBuffer.detached) {
|
|
@@ -40949,7 +41042,7 @@ var require_util2 = __commonJS({
|
|
|
40949
41042
|
var { collectAnHTTPQuotedString, parseMIMEType } = require_data_url();
|
|
40950
41043
|
var { performance: performance2 } = __require("perf_hooks");
|
|
40951
41044
|
var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util();
|
|
40952
|
-
var
|
|
41045
|
+
var assert72 = __require("assert");
|
|
40953
41046
|
var { isUint8Array } = __require("util/types");
|
|
40954
41047
|
var { webidl } = require_webidl();
|
|
40955
41048
|
var { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require_infra();
|
|
@@ -41152,7 +41245,7 @@ var require_util2 = __commonJS({
|
|
|
41152
41245
|
__name(clonePolicyContainer, "clonePolicyContainer");
|
|
41153
41246
|
function determineRequestsReferrer(request4) {
|
|
41154
41247
|
const policy = request4.referrerPolicy;
|
|
41155
|
-
|
|
41248
|
+
assert72(policy);
|
|
41156
41249
|
let referrerSource = null;
|
|
41157
41250
|
if (request4.referrer === "client") {
|
|
41158
41251
|
const globalOrigin = getGlobalOrigin();
|
|
@@ -41216,7 +41309,7 @@ var require_util2 = __commonJS({
|
|
|
41216
41309
|
}
|
|
41217
41310
|
__name(determineRequestsReferrer, "determineRequestsReferrer");
|
|
41218
41311
|
function stripURLForReferrer(url4, originOnly = false) {
|
|
41219
|
-
|
|
41312
|
+
assert72(webidl.is.URL(url4));
|
|
41220
41313
|
url4 = new URL(url4);
|
|
41221
41314
|
if (urlIsLocal(url4)) {
|
|
41222
41315
|
return "no-referrer";
|
|
@@ -41480,7 +41573,7 @@ var require_util2 = __commonJS({
|
|
|
41480
41573
|
}
|
|
41481
41574
|
__name(readAllBytes, "readAllBytes");
|
|
41482
41575
|
function urlIsLocal(url4) {
|
|
41483
|
-
|
|
41576
|
+
assert72("protocol" in url4);
|
|
41484
41577
|
const protocol = url4.protocol;
|
|
41485
41578
|
return protocol === "about:" || protocol === "blob:" || protocol === "data:";
|
|
41486
41579
|
}
|
|
@@ -41490,7 +41583,7 @@ var require_util2 = __commonJS({
|
|
|
41490
41583
|
}
|
|
41491
41584
|
__name(urlHasHttpsScheme, "urlHasHttpsScheme");
|
|
41492
41585
|
function urlIsHttpHttpsScheme(url4) {
|
|
41493
|
-
|
|
41586
|
+
assert72("protocol" in url4);
|
|
41494
41587
|
const protocol = url4.protocol;
|
|
41495
41588
|
return protocol === "http:" || protocol === "https:";
|
|
41496
41589
|
}
|
|
@@ -41663,7 +41756,7 @@ var require_util2 = __commonJS({
|
|
|
41663
41756
|
continue;
|
|
41664
41757
|
}
|
|
41665
41758
|
} else {
|
|
41666
|
-
|
|
41759
|
+
assert72(input2.charCodeAt(position.position) === 44);
|
|
41667
41760
|
position.position++;
|
|
41668
41761
|
}
|
|
41669
41762
|
}
|
|
@@ -41938,7 +42031,7 @@ var require_formdata_parser = __commonJS({
|
|
|
41938
42031
|
var { HTTP_TOKEN_CODEPOINTS } = require_data_url();
|
|
41939
42032
|
var { makeEntry } = require_formdata();
|
|
41940
42033
|
var { webidl } = require_webidl();
|
|
41941
|
-
var
|
|
42034
|
+
var assert72 = __require("assert");
|
|
41942
42035
|
var { isomorphicDecode } = require_infra();
|
|
41943
42036
|
var dd = Buffer.from("--");
|
|
41944
42037
|
var decoder2 = new TextDecoder();
|
|
@@ -41967,7 +42060,7 @@ var require_formdata_parser = __commonJS({
|
|
|
41967
42060
|
}
|
|
41968
42061
|
__name(validateBoundary, "validateBoundary");
|
|
41969
42062
|
function multipartFormDataParser(input2, mimeType) {
|
|
41970
|
-
|
|
42063
|
+
assert72(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
|
|
41971
42064
|
const boundaryString = mimeType.parameters.get("boundary");
|
|
41972
42065
|
if (boundaryString === void 0) {
|
|
41973
42066
|
throw parsingError("missing boundary in content-type header");
|
|
@@ -42023,8 +42116,8 @@ var require_formdata_parser = __commonJS({
|
|
|
42023
42116
|
} else {
|
|
42024
42117
|
value = decoderIgnoreBOM.decode(Buffer.from(body));
|
|
42025
42118
|
}
|
|
42026
|
-
|
|
42027
|
-
|
|
42119
|
+
assert72(webidl.is.USVString(name2));
|
|
42120
|
+
assert72(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
|
|
42028
42121
|
entryList.push(makeEntry(name2, value, filename));
|
|
42029
42122
|
}
|
|
42030
42123
|
}
|
|
@@ -42305,7 +42398,7 @@ var require_body = __commonJS({
|
|
|
42305
42398
|
} = require_util2();
|
|
42306
42399
|
var { FormData: FormData14, setFormDataState } = require_formdata();
|
|
42307
42400
|
var { webidl } = require_webidl();
|
|
42308
|
-
var
|
|
42401
|
+
var assert72 = __require("assert");
|
|
42309
42402
|
var { isErrored, isDisturbed } = __require("stream");
|
|
42310
42403
|
var { isUint8Array } = __require("util/types");
|
|
42311
42404
|
var { serializeAMimeType } = require_data_url();
|
|
@@ -42344,7 +42437,7 @@ var require_body = __commonJS({
|
|
|
42344
42437
|
type: "bytes"
|
|
42345
42438
|
});
|
|
42346
42439
|
}
|
|
42347
|
-
|
|
42440
|
+
assert72(webidl.is.ReadableStream(stream2));
|
|
42348
42441
|
let action = null;
|
|
42349
42442
|
let source = null;
|
|
42350
42443
|
let length = null;
|
|
@@ -42452,8 +42545,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
42452
42545
|
__name(extractBody, "extractBody");
|
|
42453
42546
|
function safelyExtractBody(object2, keepalive = false) {
|
|
42454
42547
|
if (webidl.is.ReadableStream(object2)) {
|
|
42455
|
-
|
|
42456
|
-
|
|
42548
|
+
assert72(!util2.isDisturbed(object2), "The body has already been consumed.");
|
|
42549
|
+
assert72(!object2.locked, "The stream is locked.");
|
|
42457
42550
|
}
|
|
42458
42551
|
return extractBody(object2, keepalive);
|
|
42459
42552
|
}
|
|
@@ -42587,7 +42680,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
42587
42680
|
var require_client_h1 = __commonJS({
|
|
42588
42681
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) {
|
|
42589
42682
|
init_import_meta_url();
|
|
42590
|
-
var
|
|
42683
|
+
var assert72 = __require("assert");
|
|
42591
42684
|
var util2 = require_util();
|
|
42592
42685
|
var { channels } = require_diagnostics();
|
|
42593
42686
|
var timers = require_timers();
|
|
@@ -42688,7 +42781,7 @@ var require_client_h1 = __commonJS({
|
|
|
42688
42781
|
* @returns {number}
|
|
42689
42782
|
*/
|
|
42690
42783
|
wasm_on_status: /* @__PURE__ */ __name((p8, at4, len) => {
|
|
42691
|
-
|
|
42784
|
+
assert72(currentParser.ptr === p8);
|
|
42692
42785
|
const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
42693
42786
|
return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
42694
42787
|
}, "wasm_on_status"),
|
|
@@ -42697,7 +42790,7 @@ var require_client_h1 = __commonJS({
|
|
|
42697
42790
|
* @returns {number}
|
|
42698
42791
|
*/
|
|
42699
42792
|
wasm_on_message_begin: /* @__PURE__ */ __name((p8) => {
|
|
42700
|
-
|
|
42793
|
+
assert72(currentParser.ptr === p8);
|
|
42701
42794
|
return currentParser.onMessageBegin();
|
|
42702
42795
|
}, "wasm_on_message_begin"),
|
|
42703
42796
|
/**
|
|
@@ -42707,7 +42800,7 @@ var require_client_h1 = __commonJS({
|
|
|
42707
42800
|
* @returns {number}
|
|
42708
42801
|
*/
|
|
42709
42802
|
wasm_on_header_field: /* @__PURE__ */ __name((p8, at4, len) => {
|
|
42710
|
-
|
|
42803
|
+
assert72(currentParser.ptr === p8);
|
|
42711
42804
|
const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
42712
42805
|
return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
42713
42806
|
}, "wasm_on_header_field"),
|
|
@@ -42718,7 +42811,7 @@ var require_client_h1 = __commonJS({
|
|
|
42718
42811
|
* @returns {number}
|
|
42719
42812
|
*/
|
|
42720
42813
|
wasm_on_header_value: /* @__PURE__ */ __name((p8, at4, len) => {
|
|
42721
|
-
|
|
42814
|
+
assert72(currentParser.ptr === p8);
|
|
42722
42815
|
const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
42723
42816
|
return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
42724
42817
|
}, "wasm_on_header_value"),
|
|
@@ -42730,7 +42823,7 @@ var require_client_h1 = __commonJS({
|
|
|
42730
42823
|
* @returns {number}
|
|
42731
42824
|
*/
|
|
42732
42825
|
wasm_on_headers_complete: /* @__PURE__ */ __name((p8, statusCode, upgrade, shouldKeepAlive) => {
|
|
42733
|
-
|
|
42826
|
+
assert72(currentParser.ptr === p8);
|
|
42734
42827
|
return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1);
|
|
42735
42828
|
}, "wasm_on_headers_complete"),
|
|
42736
42829
|
/**
|
|
@@ -42740,7 +42833,7 @@ var require_client_h1 = __commonJS({
|
|
|
42740
42833
|
* @returns {number}
|
|
42741
42834
|
*/
|
|
42742
42835
|
wasm_on_body: /* @__PURE__ */ __name((p8, at4, len) => {
|
|
42743
|
-
|
|
42836
|
+
assert72(currentParser.ptr === p8);
|
|
42744
42837
|
const start = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
42745
42838
|
return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len));
|
|
42746
42839
|
}, "wasm_on_body"),
|
|
@@ -42749,7 +42842,7 @@ var require_client_h1 = __commonJS({
|
|
|
42749
42842
|
* @returns {number}
|
|
42750
42843
|
*/
|
|
42751
42844
|
wasm_on_message_complete: /* @__PURE__ */ __name((p8) => {
|
|
42752
|
-
|
|
42845
|
+
assert72(currentParser.ptr === p8);
|
|
42753
42846
|
return currentParser.onMessageComplete();
|
|
42754
42847
|
}, "wasm_on_message_complete")
|
|
42755
42848
|
}
|
|
@@ -42825,10 +42918,10 @@ var require_client_h1 = __commonJS({
|
|
|
42825
42918
|
if (this.socket.destroyed || !this.paused) {
|
|
42826
42919
|
return;
|
|
42827
42920
|
}
|
|
42828
|
-
|
|
42829
|
-
|
|
42921
|
+
assert72(this.ptr != null);
|
|
42922
|
+
assert72(currentParser === null);
|
|
42830
42923
|
this.llhttp.llhttp_resume(this.ptr);
|
|
42831
|
-
|
|
42924
|
+
assert72(this.timeoutType === TIMEOUT_BODY);
|
|
42832
42925
|
if (this.timeout) {
|
|
42833
42926
|
if (this.timeout.refresh) {
|
|
42834
42927
|
this.timeout.refresh();
|
|
@@ -42851,9 +42944,9 @@ var require_client_h1 = __commonJS({
|
|
|
42851
42944
|
* @param {Buffer} chunk
|
|
42852
42945
|
*/
|
|
42853
42946
|
execute(chunk) {
|
|
42854
|
-
|
|
42855
|
-
|
|
42856
|
-
|
|
42947
|
+
assert72(currentParser === null);
|
|
42948
|
+
assert72(this.ptr != null);
|
|
42949
|
+
assert72(!this.paused);
|
|
42857
42950
|
const { socket, llhttp } = this;
|
|
42858
42951
|
if (chunk.length > currentBufferSize) {
|
|
42859
42952
|
if (currentBufferPtr) {
|
|
@@ -42889,9 +42982,9 @@ var require_client_h1 = __commonJS({
|
|
|
42889
42982
|
}
|
|
42890
42983
|
}
|
|
42891
42984
|
finish() {
|
|
42892
|
-
|
|
42893
|
-
|
|
42894
|
-
|
|
42985
|
+
assert72(currentParser === null);
|
|
42986
|
+
assert72(this.ptr != null);
|
|
42987
|
+
assert72(!this.paused);
|
|
42895
42988
|
const { llhttp } = this;
|
|
42896
42989
|
let ret;
|
|
42897
42990
|
try {
|
|
@@ -42923,8 +43016,8 @@ var require_client_h1 = __commonJS({
|
|
|
42923
43016
|
return new HTTPParserError(message, constants4.ERROR[ret], data);
|
|
42924
43017
|
}
|
|
42925
43018
|
destroy() {
|
|
42926
|
-
|
|
42927
|
-
|
|
43019
|
+
assert72(currentParser === null);
|
|
43020
|
+
assert72(this.ptr != null);
|
|
42928
43021
|
this.llhttp.llhttp_free(this.ptr);
|
|
42929
43022
|
this.ptr = null;
|
|
42930
43023
|
this.timeout && timers.clearTimeout(this.timeout);
|
|
@@ -43014,14 +43107,14 @@ var require_client_h1 = __commonJS({
|
|
|
43014
43107
|
*/
|
|
43015
43108
|
onUpgrade(head) {
|
|
43016
43109
|
const { upgrade, client, socket, headers, statusCode, statusText } = this;
|
|
43017
|
-
|
|
43018
|
-
|
|
43019
|
-
|
|
43020
|
-
|
|
43021
|
-
|
|
43110
|
+
assert72(upgrade);
|
|
43111
|
+
assert72(client[kSocket] === socket);
|
|
43112
|
+
assert72(!socket.destroyed);
|
|
43113
|
+
assert72(!this.paused);
|
|
43114
|
+
assert72((headers.length & 1) === 0);
|
|
43022
43115
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
43023
|
-
|
|
43024
|
-
|
|
43116
|
+
assert72(request4);
|
|
43117
|
+
assert72(request4.upgrade || request4.method === "CONNECT");
|
|
43025
43118
|
this.statusCode = 0;
|
|
43026
43119
|
this.statusText = "";
|
|
43027
43120
|
this.shouldKeepAlive = false;
|
|
@@ -43064,8 +43157,8 @@ var require_client_h1 = __commonJS({
|
|
|
43064
43157
|
if (!request4) {
|
|
43065
43158
|
return -1;
|
|
43066
43159
|
}
|
|
43067
|
-
|
|
43068
|
-
|
|
43160
|
+
assert72(!this.upgrade);
|
|
43161
|
+
assert72(this.statusCode < 200);
|
|
43069
43162
|
if (statusCode === 100) {
|
|
43070
43163
|
util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket)));
|
|
43071
43164
|
return -1;
|
|
@@ -43074,7 +43167,7 @@ var require_client_h1 = __commonJS({
|
|
|
43074
43167
|
util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket)));
|
|
43075
43168
|
return -1;
|
|
43076
43169
|
}
|
|
43077
|
-
|
|
43170
|
+
assert72(this.timeoutType === TIMEOUT_HEADERS);
|
|
43078
43171
|
this.statusCode = statusCode;
|
|
43079
43172
|
this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD.
|
|
43080
43173
|
request4.method === "HEAD" && !socket[kReset2] && this.connection.toLowerCase() === "keep-alive";
|
|
@@ -43087,16 +43180,16 @@ var require_client_h1 = __commonJS({
|
|
|
43087
43180
|
}
|
|
43088
43181
|
}
|
|
43089
43182
|
if (request4.method === "CONNECT") {
|
|
43090
|
-
|
|
43183
|
+
assert72(client[kRunning] === 1);
|
|
43091
43184
|
this.upgrade = true;
|
|
43092
43185
|
return 2;
|
|
43093
43186
|
}
|
|
43094
43187
|
if (upgrade) {
|
|
43095
|
-
|
|
43188
|
+
assert72(client[kRunning] === 1);
|
|
43096
43189
|
this.upgrade = true;
|
|
43097
43190
|
return 2;
|
|
43098
43191
|
}
|
|
43099
|
-
|
|
43192
|
+
assert72((this.headers.length & 1) === 0);
|
|
43100
43193
|
this.headers = [];
|
|
43101
43194
|
this.headersSize = 0;
|
|
43102
43195
|
if (this.shouldKeepAlive && client[kPipelining]) {
|
|
@@ -43143,14 +43236,14 @@ var require_client_h1 = __commonJS({
|
|
|
43143
43236
|
return -1;
|
|
43144
43237
|
}
|
|
43145
43238
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
43146
|
-
|
|
43147
|
-
|
|
43239
|
+
assert72(request4);
|
|
43240
|
+
assert72(this.timeoutType === TIMEOUT_BODY);
|
|
43148
43241
|
if (this.timeout) {
|
|
43149
43242
|
if (this.timeout.refresh) {
|
|
43150
43243
|
this.timeout.refresh();
|
|
43151
43244
|
}
|
|
43152
43245
|
}
|
|
43153
|
-
|
|
43246
|
+
assert72(statusCode >= 200);
|
|
43154
43247
|
if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
|
|
43155
43248
|
util2.destroy(socket, new ResponseExceededMaxSizeError());
|
|
43156
43249
|
return -1;
|
|
@@ -43172,10 +43265,10 @@ var require_client_h1 = __commonJS({
|
|
|
43172
43265
|
if (upgrade) {
|
|
43173
43266
|
return 0;
|
|
43174
43267
|
}
|
|
43175
|
-
|
|
43176
|
-
|
|
43268
|
+
assert72(statusCode >= 100);
|
|
43269
|
+
assert72((this.headers.length & 1) === 0);
|
|
43177
43270
|
const request4 = client[kQueue][client[kRunningIdx]];
|
|
43178
|
-
|
|
43271
|
+
assert72(request4);
|
|
43179
43272
|
this.statusCode = 0;
|
|
43180
43273
|
this.statusText = "";
|
|
43181
43274
|
this.bytesRead = 0;
|
|
@@ -43195,7 +43288,7 @@ var require_client_h1 = __commonJS({
|
|
|
43195
43288
|
client[kQueue][client[kRunningIdx]++] = null;
|
|
43196
43289
|
socket[kSocketUsed] = client[kPending] === 0;
|
|
43197
43290
|
if (socket[kWriting]) {
|
|
43198
|
-
|
|
43291
|
+
assert72(client[kRunning] === 0);
|
|
43199
43292
|
util2.destroy(socket, new InformationalError("reset"));
|
|
43200
43293
|
return constants4.ERROR.PAUSED;
|
|
43201
43294
|
} else if (!shouldKeepAlive) {
|
|
@@ -43220,7 +43313,7 @@ var require_client_h1 = __commonJS({
|
|
|
43220
43313
|
const { socket, timeoutType, client, paused } = parser2;
|
|
43221
43314
|
if (timeoutType === TIMEOUT_HEADERS) {
|
|
43222
43315
|
if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
|
|
43223
|
-
|
|
43316
|
+
assert72(!paused, "cannot be paused while waiting for headers");
|
|
43224
43317
|
util2.destroy(socket, new HeadersTimeoutError());
|
|
43225
43318
|
}
|
|
43226
43319
|
} else if (timeoutType === TIMEOUT_BODY) {
|
|
@@ -43228,7 +43321,7 @@ var require_client_h1 = __commonJS({
|
|
|
43228
43321
|
util2.destroy(socket, new BodyTimeoutError());
|
|
43229
43322
|
}
|
|
43230
43323
|
} else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
|
|
43231
|
-
|
|
43324
|
+
assert72(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
|
|
43232
43325
|
util2.destroy(socket, new InformationalError("socket idle timeout"));
|
|
43233
43326
|
}
|
|
43234
43327
|
}
|
|
@@ -43354,7 +43447,7 @@ var require_client_h1 = __commonJS({
|
|
|
43354
43447
|
client[kSocket] = null;
|
|
43355
43448
|
client[kHTTPContext] = null;
|
|
43356
43449
|
if (client.destroyed) {
|
|
43357
|
-
|
|
43450
|
+
assert72(client[kPending] === 0);
|
|
43358
43451
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
43359
43452
|
for (let i8 = 0; i8 < requests.length; i8++) {
|
|
43360
43453
|
const request4 = requests[i8];
|
|
@@ -43366,7 +43459,7 @@ var require_client_h1 = __commonJS({
|
|
|
43366
43459
|
util2.errorRequest(client, request4, err);
|
|
43367
43460
|
}
|
|
43368
43461
|
client[kPendingIdx] = client[kRunningIdx];
|
|
43369
|
-
|
|
43462
|
+
assert72(client[kRunning] === 0);
|
|
43370
43463
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
43371
43464
|
client[kResume]();
|
|
43372
43465
|
}
|
|
@@ -43576,13 +43669,13 @@ upgrade: ${upgrade}\r
|
|
|
43576
43669
|
} else if (util2.isIterable(body)) {
|
|
43577
43670
|
writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload);
|
|
43578
43671
|
} else {
|
|
43579
|
-
|
|
43672
|
+
assert72(false);
|
|
43580
43673
|
}
|
|
43581
43674
|
return true;
|
|
43582
43675
|
}
|
|
43583
43676
|
__name(writeH1, "writeH1");
|
|
43584
43677
|
function writeStream(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
43585
|
-
|
|
43678
|
+
assert72(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
|
43586
43679
|
let finished = false;
|
|
43587
43680
|
const writer = new AsyncWriter({ abort, socket, request: request4, contentLength, client, expectsPayload, header });
|
|
43588
43681
|
const onData = /* @__PURE__ */ __name(function(chunk) {
|
|
@@ -43619,7 +43712,7 @@ upgrade: ${upgrade}\r
|
|
|
43619
43712
|
return;
|
|
43620
43713
|
}
|
|
43621
43714
|
finished = true;
|
|
43622
|
-
|
|
43715
|
+
assert72(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
|
|
43623
43716
|
socket.off("drain", onDrain).off("error", onFinished);
|
|
43624
43717
|
body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose);
|
|
43625
43718
|
if (!err) {
|
|
@@ -43659,12 +43752,12 @@ upgrade: ${upgrade}\r
|
|
|
43659
43752
|
\r
|
|
43660
43753
|
`, "latin1");
|
|
43661
43754
|
} else {
|
|
43662
|
-
|
|
43755
|
+
assert72(contentLength === null, "no body must not have content length");
|
|
43663
43756
|
socket.write(`${header}\r
|
|
43664
43757
|
`, "latin1");
|
|
43665
43758
|
}
|
|
43666
43759
|
} else if (util2.isBuffer(body)) {
|
|
43667
|
-
|
|
43760
|
+
assert72(contentLength === body.byteLength, "buffer body must have content length");
|
|
43668
43761
|
socket.cork();
|
|
43669
43762
|
socket.write(`${header}content-length: ${contentLength}\r
|
|
43670
43763
|
\r
|
|
@@ -43684,7 +43777,7 @@ upgrade: ${upgrade}\r
|
|
|
43684
43777
|
}
|
|
43685
43778
|
__name(writeBuffer, "writeBuffer");
|
|
43686
43779
|
async function writeBlob(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
43687
|
-
|
|
43780
|
+
assert72(contentLength === body.size, "blob body must have content length");
|
|
43688
43781
|
try {
|
|
43689
43782
|
if (contentLength != null && contentLength !== body.size) {
|
|
43690
43783
|
throw new RequestContentLengthMismatchError();
|
|
@@ -43708,7 +43801,7 @@ upgrade: ${upgrade}\r
|
|
|
43708
43801
|
}
|
|
43709
43802
|
__name(writeBlob, "writeBlob");
|
|
43710
43803
|
async function writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
|
|
43711
|
-
|
|
43804
|
+
assert72(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
|
43712
43805
|
let callback2 = null;
|
|
43713
43806
|
function onDrain() {
|
|
43714
43807
|
if (callback2) {
|
|
@@ -43719,7 +43812,7 @@ upgrade: ${upgrade}\r
|
|
|
43719
43812
|
}
|
|
43720
43813
|
__name(onDrain, "onDrain");
|
|
43721
43814
|
const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve38, reject) => {
|
|
43722
|
-
|
|
43815
|
+
assert72(callback2 === null);
|
|
43723
43816
|
if (socket[kError]) {
|
|
43724
43817
|
reject(socket[kError]);
|
|
43725
43818
|
} else {
|
|
@@ -43872,7 +43965,7 @@ ${len.toString(16)}\r
|
|
|
43872
43965
|
const { socket, client, abort } = this;
|
|
43873
43966
|
socket[kWriting] = false;
|
|
43874
43967
|
if (err) {
|
|
43875
|
-
|
|
43968
|
+
assert72(client[kRunning] <= 1, "pipeline should only contain this request");
|
|
43876
43969
|
abort(err);
|
|
43877
43970
|
}
|
|
43878
43971
|
}
|
|
@@ -43885,7 +43978,7 @@ ${len.toString(16)}\r
|
|
|
43885
43978
|
var require_client_h2 = __commonJS({
|
|
43886
43979
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) {
|
|
43887
43980
|
init_import_meta_url();
|
|
43888
|
-
var
|
|
43981
|
+
var assert72 = __require("assert");
|
|
43889
43982
|
var { pipeline: pipeline2 } = __require("stream");
|
|
43890
43983
|
var util2 = require_util();
|
|
43891
43984
|
var {
|
|
@@ -44167,7 +44260,7 @@ var require_client_h2 = __commonJS({
|
|
|
44167
44260
|
}
|
|
44168
44261
|
client[kPendingIdx] = client[kRunningIdx];
|
|
44169
44262
|
}
|
|
44170
|
-
|
|
44263
|
+
assert72(client[kRunning] === 0);
|
|
44171
44264
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
44172
44265
|
client.emit("connectionError", client[kUrl], [client], err);
|
|
44173
44266
|
client[kResume]();
|
|
@@ -44184,7 +44277,7 @@ var require_client_h2 = __commonJS({
|
|
|
44184
44277
|
state3.ping.interval = null;
|
|
44185
44278
|
}
|
|
44186
44279
|
if (client.destroyed) {
|
|
44187
|
-
|
|
44280
|
+
assert72(client[kPending] === 0);
|
|
44188
44281
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
44189
44282
|
for (let i8 = 0; i8 < requests.length; i8++) {
|
|
44190
44283
|
const request4 = requests[i8];
|
|
@@ -44204,7 +44297,7 @@ var require_client_h2 = __commonJS({
|
|
|
44204
44297
|
this[kHTTP2Session].destroy(err);
|
|
44205
44298
|
}
|
|
44206
44299
|
client[kPendingIdx] = client[kRunningIdx];
|
|
44207
|
-
|
|
44300
|
+
assert72(client[kRunning] === 0);
|
|
44208
44301
|
client.emit("disconnect", client[kUrl], [client], err);
|
|
44209
44302
|
client[kResume]();
|
|
44210
44303
|
}
|
|
@@ -44379,7 +44472,7 @@ var require_client_h2 = __commonJS({
|
|
|
44379
44472
|
process.emitWarning(new RequestContentLengthMismatchError());
|
|
44380
44473
|
}
|
|
44381
44474
|
if (contentLength != null) {
|
|
44382
|
-
|
|
44475
|
+
assert72(body || contentLength === 0, "no body must not have content length");
|
|
44383
44476
|
headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`;
|
|
44384
44477
|
}
|
|
44385
44478
|
session.ref();
|
|
@@ -44551,7 +44644,7 @@ var require_client_h2 = __commonJS({
|
|
|
44551
44644
|
expectsPayload
|
|
44552
44645
|
);
|
|
44553
44646
|
} else {
|
|
44554
|
-
|
|
44647
|
+
assert72(false);
|
|
44555
44648
|
}
|
|
44556
44649
|
}
|
|
44557
44650
|
}
|
|
@@ -44559,7 +44652,7 @@ var require_client_h2 = __commonJS({
|
|
|
44559
44652
|
function writeBuffer(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
44560
44653
|
try {
|
|
44561
44654
|
if (body != null && util2.isBuffer(body)) {
|
|
44562
|
-
|
|
44655
|
+
assert72(contentLength === body.byteLength, "buffer body must have content length");
|
|
44563
44656
|
h2stream.cork();
|
|
44564
44657
|
h2stream.write(body);
|
|
44565
44658
|
h2stream.uncork();
|
|
@@ -44577,7 +44670,7 @@ var require_client_h2 = __commonJS({
|
|
|
44577
44670
|
}
|
|
44578
44671
|
__name(writeBuffer, "writeBuffer");
|
|
44579
44672
|
function writeStream(abort, socket, expectsPayload, h2stream, body, client, request4, contentLength) {
|
|
44580
|
-
|
|
44673
|
+
assert72(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
|
44581
44674
|
const pipe2 = pipeline2(
|
|
44582
44675
|
body,
|
|
44583
44676
|
h2stream,
|
|
@@ -44603,7 +44696,7 @@ var require_client_h2 = __commonJS({
|
|
|
44603
44696
|
}
|
|
44604
44697
|
__name(writeStream, "writeStream");
|
|
44605
44698
|
async function writeBlob(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
44606
|
-
|
|
44699
|
+
assert72(contentLength === body.size, "blob body must have content length");
|
|
44607
44700
|
try {
|
|
44608
44701
|
if (contentLength != null && contentLength !== body.size) {
|
|
44609
44702
|
throw new RequestContentLengthMismatchError();
|
|
@@ -44625,7 +44718,7 @@ var require_client_h2 = __commonJS({
|
|
|
44625
44718
|
}
|
|
44626
44719
|
__name(writeBlob, "writeBlob");
|
|
44627
44720
|
async function writeIterable(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
|
|
44628
|
-
|
|
44721
|
+
assert72(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
|
44629
44722
|
let callback2 = null;
|
|
44630
44723
|
function onDrain() {
|
|
44631
44724
|
if (callback2) {
|
|
@@ -44636,7 +44729,7 @@ var require_client_h2 = __commonJS({
|
|
|
44636
44729
|
}
|
|
44637
44730
|
__name(onDrain, "onDrain");
|
|
44638
44731
|
const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve38, reject) => {
|
|
44639
|
-
|
|
44732
|
+
assert72(callback2 === null);
|
|
44640
44733
|
if (socket[kError]) {
|
|
44641
44734
|
reject(socket[kError]);
|
|
44642
44735
|
} else {
|
|
@@ -44676,7 +44769,7 @@ var require_client_h2 = __commonJS({
|
|
|
44676
44769
|
var require_client = __commonJS({
|
|
44677
44770
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/dispatcher/client.js"(exports2, module2) {
|
|
44678
44771
|
init_import_meta_url();
|
|
44679
|
-
var
|
|
44772
|
+
var assert72 = __require("assert");
|
|
44680
44773
|
var net3 = __require("net");
|
|
44681
44774
|
var http6 = __require("http");
|
|
44682
44775
|
var util2 = require_util();
|
|
@@ -44997,7 +45090,7 @@ var require_client = __commonJS({
|
|
|
44997
45090
|
};
|
|
44998
45091
|
function onError(client, err) {
|
|
44999
45092
|
if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
|
|
45000
|
-
|
|
45093
|
+
assert72(client[kPendingIdx] === client[kRunningIdx]);
|
|
45001
45094
|
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
45002
45095
|
for (let i8 = 0; i8 < requests.length; i8++) {
|
|
45003
45096
|
const request4 = requests[i8];
|
|
@@ -45005,19 +45098,19 @@ var require_client = __commonJS({
|
|
|
45005
45098
|
util2.errorRequest(client, request4, err);
|
|
45006
45099
|
}
|
|
45007
45100
|
}
|
|
45008
|
-
|
|
45101
|
+
assert72(client[kSize] === 0);
|
|
45009
45102
|
}
|
|
45010
45103
|
}
|
|
45011
45104
|
__name(onError, "onError");
|
|
45012
45105
|
function connect(client) {
|
|
45013
|
-
|
|
45014
|
-
|
|
45106
|
+
assert72(!client[kConnecting]);
|
|
45107
|
+
assert72(!client[kHTTPContext]);
|
|
45015
45108
|
let { host, hostname: hostname4, protocol, port } = client[kUrl];
|
|
45016
45109
|
if (hostname4[0] === "[") {
|
|
45017
45110
|
const idx = hostname4.indexOf("]");
|
|
45018
|
-
|
|
45111
|
+
assert72(idx !== -1);
|
|
45019
45112
|
const ip = hostname4.substring(1, idx);
|
|
45020
|
-
|
|
45113
|
+
assert72(net3.isIPv6(ip));
|
|
45021
45114
|
hostname4 = ip;
|
|
45022
45115
|
}
|
|
45023
45116
|
client[kConnecting] = true;
|
|
@@ -45054,7 +45147,7 @@ var require_client = __commonJS({
|
|
|
45054
45147
|
client[kResume]();
|
|
45055
45148
|
return;
|
|
45056
45149
|
}
|
|
45057
|
-
|
|
45150
|
+
assert72(socket);
|
|
45058
45151
|
try {
|
|
45059
45152
|
client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket);
|
|
45060
45153
|
} catch (err2) {
|
|
@@ -45113,7 +45206,7 @@ var require_client = __commonJS({
|
|
|
45113
45206
|
});
|
|
45114
45207
|
}
|
|
45115
45208
|
if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
|
|
45116
|
-
|
|
45209
|
+
assert72(client[kRunning] === 0);
|
|
45117
45210
|
while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
|
|
45118
45211
|
const request4 = client[kQueue][client[kPendingIdx]++];
|
|
45119
45212
|
util2.errorRequest(client, request4, err);
|
|
@@ -45146,7 +45239,7 @@ var require_client = __commonJS({
|
|
|
45146
45239
|
function _resume(client, sync) {
|
|
45147
45240
|
while (true) {
|
|
45148
45241
|
if (client.destroyed) {
|
|
45149
|
-
|
|
45242
|
+
assert72(client[kPending] === 0);
|
|
45150
45243
|
return;
|
|
45151
45244
|
}
|
|
45152
45245
|
if (client[kClosedResolve] && !client[kSize]) {
|
|
@@ -47097,7 +47190,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
47097
47190
|
var require_retry_handler = __commonJS({
|
|
47098
47191
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) {
|
|
47099
47192
|
init_import_meta_url();
|
|
47100
|
-
var
|
|
47193
|
+
var assert72 = __require("assert");
|
|
47101
47194
|
var { kRetryHandlerDefaultRetry } = require_symbols();
|
|
47102
47195
|
var { RequestRetryError } = require_errors();
|
|
47103
47196
|
var WrapHandler = require_wrap_handler();
|
|
@@ -47291,7 +47384,7 @@ var require_retry_handler = __commonJS({
|
|
|
47291
47384
|
if (this.end == null && this.opts.method !== "HEAD") {
|
|
47292
47385
|
const contentLength = headers["content-length"];
|
|
47293
47386
|
this.end = contentLength != null ? Number(contentLength) - 1 : null;
|
|
47294
|
-
|
|
47387
|
+
assert72(
|
|
47295
47388
|
this.end == null || Number.isFinite(this.end),
|
|
47296
47389
|
"invalid content-length"
|
|
47297
47390
|
);
|
|
@@ -47402,11 +47495,11 @@ var require_retry_handler = __commonJS({
|
|
|
47402
47495
|
}
|
|
47403
47496
|
validatePartialResponseContentLength(headers, range2, statusCode, this.retryCount);
|
|
47404
47497
|
const { start, size, end = size ? size - 1 : null } = range2;
|
|
47405
|
-
|
|
47498
|
+
assert72(
|
|
47406
47499
|
start != null && Number.isFinite(start),
|
|
47407
47500
|
"content-range mismatch"
|
|
47408
47501
|
);
|
|
47409
|
-
|
|
47502
|
+
assert72(end != null && Number.isFinite(end), "invalid content-length");
|
|
47410
47503
|
this.start = start;
|
|
47411
47504
|
this.end = end;
|
|
47412
47505
|
}
|
|
@@ -47414,8 +47507,8 @@ var require_retry_handler = __commonJS({
|
|
|
47414
47507
|
const contentLength = headers["content-length"];
|
|
47415
47508
|
this.end = contentLength != null ? Number(contentLength) - 1 : null;
|
|
47416
47509
|
}
|
|
47417
|
-
|
|
47418
|
-
|
|
47510
|
+
assert72(Number.isFinite(this.start));
|
|
47511
|
+
assert72(
|
|
47419
47512
|
this.end == null || Number.isFinite(this.end),
|
|
47420
47513
|
"invalid content-length"
|
|
47421
47514
|
);
|
|
@@ -47596,7 +47689,7 @@ var require_h2c_client = __commonJS({
|
|
|
47596
47689
|
var require_readable = __commonJS({
|
|
47597
47690
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/api/readable.js"(exports2, module2) {
|
|
47598
47691
|
init_import_meta_url();
|
|
47599
|
-
var
|
|
47692
|
+
var assert72 = __require("assert");
|
|
47600
47693
|
var { Readable: Readable13 } = __require("stream");
|
|
47601
47694
|
var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors();
|
|
47602
47695
|
var util2 = require_util();
|
|
@@ -47793,7 +47886,7 @@ var require_readable = __commonJS({
|
|
|
47793
47886
|
this[kBody] = ReadableStreamFrom(this);
|
|
47794
47887
|
if (this[kConsume]) {
|
|
47795
47888
|
this[kBody].getReader();
|
|
47796
|
-
|
|
47889
|
+
assert72(this[kBody].locked);
|
|
47797
47890
|
}
|
|
47798
47891
|
}
|
|
47799
47892
|
return this[kBody];
|
|
@@ -47864,7 +47957,7 @@ var require_readable = __commonJS({
|
|
|
47864
47957
|
}
|
|
47865
47958
|
__name(isUnusable, "isUnusable");
|
|
47866
47959
|
function consume(stream2, type) {
|
|
47867
|
-
|
|
47960
|
+
assert72(!stream2[kConsume]);
|
|
47868
47961
|
return new Promise((resolve38, reject) => {
|
|
47869
47962
|
if (isUnusable(stream2)) {
|
|
47870
47963
|
const rState = stream2._readableState;
|
|
@@ -48010,7 +48103,7 @@ var require_readable = __commonJS({
|
|
|
48010
48103
|
var require_api_request = __commonJS({
|
|
48011
48104
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/api/api-request.js"(exports2, module2) {
|
|
48012
48105
|
init_import_meta_url();
|
|
48013
|
-
var
|
|
48106
|
+
var assert72 = __require("assert");
|
|
48014
48107
|
var { AsyncResource } = __require("async_hooks");
|
|
48015
48108
|
var { Readable: Readable13 } = require_readable();
|
|
48016
48109
|
var { InvalidArgumentError, RequestAbortedError } = require_errors();
|
|
@@ -48081,7 +48174,7 @@ var require_api_request = __commonJS({
|
|
|
48081
48174
|
abort(this.reason);
|
|
48082
48175
|
return;
|
|
48083
48176
|
}
|
|
48084
|
-
|
|
48177
|
+
assert72(this.callback);
|
|
48085
48178
|
this.abort = abort;
|
|
48086
48179
|
this.context = context2;
|
|
48087
48180
|
}
|
|
@@ -48248,7 +48341,7 @@ var require_abort_signal = __commonJS({
|
|
|
48248
48341
|
var require_api_stream = __commonJS({
|
|
48249
48342
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/api/api-stream.js"(exports2, module2) {
|
|
48250
48343
|
init_import_meta_url();
|
|
48251
|
-
var
|
|
48344
|
+
var assert72 = __require("assert");
|
|
48252
48345
|
var { finished } = __require("stream");
|
|
48253
48346
|
var { AsyncResource } = __require("async_hooks");
|
|
48254
48347
|
var { InvalidArgumentError, InvalidReturnValueError } = require_errors();
|
|
@@ -48311,7 +48404,7 @@ var require_api_stream = __commonJS({
|
|
|
48311
48404
|
abort(this.reason);
|
|
48312
48405
|
return;
|
|
48313
48406
|
}
|
|
48314
|
-
|
|
48407
|
+
assert72(this.callback);
|
|
48315
48408
|
this.abort = abort;
|
|
48316
48409
|
this.context = context2;
|
|
48317
48410
|
}
|
|
@@ -48419,7 +48512,7 @@ var require_api_pipeline = __commonJS({
|
|
|
48419
48512
|
Duplex: Duplex2,
|
|
48420
48513
|
PassThrough: PassThrough4
|
|
48421
48514
|
} = __require("stream");
|
|
48422
|
-
var
|
|
48515
|
+
var assert72 = __require("assert");
|
|
48423
48516
|
var { AsyncResource } = __require("async_hooks");
|
|
48424
48517
|
var {
|
|
48425
48518
|
InvalidArgumentError,
|
|
@@ -48543,7 +48636,7 @@ var require_api_pipeline = __commonJS({
|
|
|
48543
48636
|
abort(this.reason);
|
|
48544
48637
|
return;
|
|
48545
48638
|
}
|
|
48546
|
-
|
|
48639
|
+
assert72(!res, "pipeline cannot be retried");
|
|
48547
48640
|
this.abort = abort;
|
|
48548
48641
|
this.context = context2;
|
|
48549
48642
|
}
|
|
@@ -48628,7 +48721,7 @@ var require_api_upgrade = __commonJS({
|
|
|
48628
48721
|
init_import_meta_url();
|
|
48629
48722
|
var { InvalidArgumentError, SocketError } = require_errors();
|
|
48630
48723
|
var { AsyncResource } = __require("async_hooks");
|
|
48631
|
-
var
|
|
48724
|
+
var assert72 = __require("assert");
|
|
48632
48725
|
var util2 = require_util();
|
|
48633
48726
|
var { kHTTP2Stream } = require_symbols();
|
|
48634
48727
|
var { addSignal, removeSignal } = require_abort_signal();
|
|
@@ -48660,7 +48753,7 @@ var require_api_upgrade = __commonJS({
|
|
|
48660
48753
|
abort(this.reason);
|
|
48661
48754
|
return;
|
|
48662
48755
|
}
|
|
48663
|
-
|
|
48756
|
+
assert72(this.callback);
|
|
48664
48757
|
this.abort = abort;
|
|
48665
48758
|
this.context = null;
|
|
48666
48759
|
}
|
|
@@ -48668,7 +48761,7 @@ var require_api_upgrade = __commonJS({
|
|
|
48668
48761
|
throw new SocketError("bad upgrade", null);
|
|
48669
48762
|
}
|
|
48670
48763
|
onUpgrade(statusCode, rawHeaders, socket) {
|
|
48671
|
-
|
|
48764
|
+
assert72(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101);
|
|
48672
48765
|
const { callback: callback2, opaque, context: context2 } = this;
|
|
48673
48766
|
removeSignal(this);
|
|
48674
48767
|
this.callback = null;
|
|
@@ -48724,7 +48817,7 @@ var require_api_upgrade = __commonJS({
|
|
|
48724
48817
|
var require_api_connect = __commonJS({
|
|
48725
48818
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/api/api-connect.js"(exports2, module2) {
|
|
48726
48819
|
init_import_meta_url();
|
|
48727
|
-
var
|
|
48820
|
+
var assert72 = __require("assert");
|
|
48728
48821
|
var { AsyncResource } = __require("async_hooks");
|
|
48729
48822
|
var { InvalidArgumentError, SocketError } = require_errors();
|
|
48730
48823
|
var util2 = require_util();
|
|
@@ -48756,7 +48849,7 @@ var require_api_connect = __commonJS({
|
|
|
48756
48849
|
abort(this.reason);
|
|
48757
48850
|
return;
|
|
48758
48851
|
}
|
|
48759
|
-
|
|
48852
|
+
assert72(this.callback);
|
|
48760
48853
|
this.abort = abort;
|
|
48761
48854
|
this.context = context2;
|
|
48762
48855
|
}
|
|
@@ -50858,7 +50951,7 @@ var require_global2 = __commonJS({
|
|
|
50858
50951
|
var require_decorator_handler = __commonJS({
|
|
50859
50952
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/handler/decorator-handler.js"(exports2, module2) {
|
|
50860
50953
|
init_import_meta_url();
|
|
50861
|
-
var
|
|
50954
|
+
var assert72 = __require("assert");
|
|
50862
50955
|
var WrapHandler = require_wrap_handler();
|
|
50863
50956
|
module2.exports = class DecoratorHandler {
|
|
50864
50957
|
static {
|
|
@@ -50878,25 +50971,25 @@ var require_decorator_handler = __commonJS({
|
|
|
50878
50971
|
this.#handler.onRequestStart?.(...args);
|
|
50879
50972
|
}
|
|
50880
50973
|
onRequestUpgrade(...args) {
|
|
50881
|
-
|
|
50882
|
-
|
|
50974
|
+
assert72(!this.#onCompleteCalled);
|
|
50975
|
+
assert72(!this.#onErrorCalled);
|
|
50883
50976
|
return this.#handler.onRequestUpgrade?.(...args);
|
|
50884
50977
|
}
|
|
50885
50978
|
onResponseStart(...args) {
|
|
50886
|
-
|
|
50887
|
-
|
|
50888
|
-
|
|
50979
|
+
assert72(!this.#onCompleteCalled);
|
|
50980
|
+
assert72(!this.#onErrorCalled);
|
|
50981
|
+
assert72(!this.#onResponseStartCalled);
|
|
50889
50982
|
this.#onResponseStartCalled = true;
|
|
50890
50983
|
return this.#handler.onResponseStart?.(...args);
|
|
50891
50984
|
}
|
|
50892
50985
|
onResponseData(...args) {
|
|
50893
|
-
|
|
50894
|
-
|
|
50986
|
+
assert72(!this.#onCompleteCalled);
|
|
50987
|
+
assert72(!this.#onErrorCalled);
|
|
50895
50988
|
return this.#handler.onResponseData?.(...args);
|
|
50896
50989
|
}
|
|
50897
50990
|
onResponseEnd(...args) {
|
|
50898
|
-
|
|
50899
|
-
|
|
50991
|
+
assert72(!this.#onCompleteCalled);
|
|
50992
|
+
assert72(!this.#onErrorCalled);
|
|
50900
50993
|
this.#onCompleteCalled = true;
|
|
50901
50994
|
return this.#handler.onResponseEnd?.(...args);
|
|
50902
50995
|
}
|
|
@@ -50919,7 +51012,7 @@ var require_redirect_handler = __commonJS({
|
|
|
50919
51012
|
init_import_meta_url();
|
|
50920
51013
|
var util2 = require_util();
|
|
50921
51014
|
var { kBodyUsed, kRedirectCacheControl } = require_symbols();
|
|
50922
|
-
var
|
|
51015
|
+
var assert72 = __require("assert");
|
|
50923
51016
|
var { InvalidArgumentError } = require_errors();
|
|
50924
51017
|
var EE = __require("events");
|
|
50925
51018
|
var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
|
|
@@ -50935,7 +51028,7 @@ var require_redirect_handler = __commonJS({
|
|
|
50935
51028
|
this[kBodyUsed] = false;
|
|
50936
51029
|
}
|
|
50937
51030
|
async *[Symbol.asyncIterator]() {
|
|
50938
|
-
|
|
51031
|
+
assert72(!this[kBodyUsed], "disturbed");
|
|
50939
51032
|
this[kBodyUsed] = true;
|
|
50940
51033
|
yield* this[kBody];
|
|
50941
51034
|
}
|
|
@@ -50969,7 +51062,7 @@ var require_redirect_handler = __commonJS({
|
|
|
50969
51062
|
if (util2.isStream(this.opts.body)) {
|
|
50970
51063
|
if (util2.bodyLength(this.opts.body) === 0) {
|
|
50971
51064
|
this.opts.body.on("data", function() {
|
|
50972
|
-
|
|
51065
|
+
assert72(false);
|
|
50973
51066
|
});
|
|
50974
51067
|
}
|
|
50975
51068
|
if (typeof this.opts.body.readableDidRead !== "boolean") {
|
|
@@ -51076,7 +51169,7 @@ var require_redirect_handler = __commonJS({
|
|
|
51076
51169
|
}
|
|
51077
51170
|
}
|
|
51078
51171
|
} else {
|
|
51079
|
-
|
|
51172
|
+
assert72(headers == null, "headers must be an object or an array");
|
|
51080
51173
|
}
|
|
51081
51174
|
return ret;
|
|
51082
51175
|
}
|
|
@@ -53557,7 +53650,7 @@ var require_memory_cache_store = __commonJS({
|
|
|
53557
53650
|
var require_cache_revalidation_handler = __commonJS({
|
|
53558
53651
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports2, module2) {
|
|
53559
53652
|
init_import_meta_url();
|
|
53560
|
-
var
|
|
53653
|
+
var assert72 = __require("assert");
|
|
53561
53654
|
var CacheRevalidationHandler = class {
|
|
53562
53655
|
static {
|
|
53563
53656
|
__name(this, "CacheRevalidationHandler");
|
|
@@ -53597,7 +53690,7 @@ var require_cache_revalidation_handler = __commonJS({
|
|
|
53597
53690
|
this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
|
|
53598
53691
|
}
|
|
53599
53692
|
onResponseStart(controller, statusCode, headers, statusMessage) {
|
|
53600
|
-
|
|
53693
|
+
assert72(this.#callback != null);
|
|
53601
53694
|
this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
|
|
53602
53695
|
this.#callback(this.#successful, this.#context, statusCode, headers);
|
|
53603
53696
|
this.#callback = null;
|
|
@@ -53647,7 +53740,7 @@ var require_cache_revalidation_handler = __commonJS({
|
|
|
53647
53740
|
var require_cache2 = __commonJS({
|
|
53648
53741
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/interceptor/cache.js"(exports2, module2) {
|
|
53649
53742
|
init_import_meta_url();
|
|
53650
|
-
var
|
|
53743
|
+
var assert72 = __require("assert");
|
|
53651
53744
|
var { Readable: Readable13 } = __require("stream");
|
|
53652
53745
|
var util2 = require_util();
|
|
53653
53746
|
var CacheHandler = require_cache_handler();
|
|
@@ -53832,8 +53925,8 @@ var require_cache2 = __commonJS({
|
|
|
53832
53925
|
__name(handleUncachedResponse, "handleUncachedResponse");
|
|
53833
53926
|
function sendCachedValue(handler, opts, result, age, context2, isStale2) {
|
|
53834
53927
|
const stream2 = util2.isStream(result.body) ? result.body : Readable13.from(result.body ?? []);
|
|
53835
|
-
|
|
53836
|
-
|
|
53928
|
+
assert72(!stream2.destroyed, "stream should not be destroyed");
|
|
53929
|
+
assert72(!stream2.readableDidRead, "stream should not be readableDidRead");
|
|
53837
53930
|
const controller = {
|
|
53838
53931
|
resume() {
|
|
53839
53932
|
stream2.resume();
|
|
@@ -55420,7 +55513,7 @@ var require_headers = __commonJS({
|
|
|
55420
55513
|
isValidHeaderValue
|
|
55421
55514
|
} = require_util2();
|
|
55422
55515
|
var { webidl } = require_webidl();
|
|
55423
|
-
var
|
|
55516
|
+
var assert72 = __require("assert");
|
|
55424
55517
|
var util2 = __require("util");
|
|
55425
55518
|
function isHTTPWhiteSpaceCharCode(code) {
|
|
55426
55519
|
return code === 10 || code === 13 || code === 9 || code === 32;
|
|
@@ -55645,11 +55738,11 @@ var require_headers = __commonJS({
|
|
|
55645
55738
|
const iterator = this.headersMap[Symbol.iterator]();
|
|
55646
55739
|
const firstValue = iterator.next().value;
|
|
55647
55740
|
array2[0] = [firstValue[0], firstValue[1].value];
|
|
55648
|
-
|
|
55741
|
+
assert72(firstValue[1].value !== null);
|
|
55649
55742
|
for (let i8 = 1, j8 = 0, right2 = 0, left2 = 0, pivot = 0, x7, value; i8 < size; ++i8) {
|
|
55650
55743
|
value = iterator.next().value;
|
|
55651
55744
|
x7 = array2[i8] = [value[0], value[1].value];
|
|
55652
|
-
|
|
55745
|
+
assert72(x7[1] !== null);
|
|
55653
55746
|
left2 = 0;
|
|
55654
55747
|
right2 = i8;
|
|
55655
55748
|
while (left2 < right2) {
|
|
@@ -55676,7 +55769,7 @@ var require_headers = __commonJS({
|
|
|
55676
55769
|
let i8 = 0;
|
|
55677
55770
|
for (const { 0: name2, 1: { value } } of this.headersMap) {
|
|
55678
55771
|
array2[i8++] = [name2, value];
|
|
55679
|
-
|
|
55772
|
+
assert72(value !== null);
|
|
55680
55773
|
}
|
|
55681
55774
|
return array2.sort(compareHeaderName);
|
|
55682
55775
|
}
|
|
@@ -55904,7 +55997,7 @@ var require_response = __commonJS({
|
|
|
55904
55997
|
var { webidl } = require_webidl();
|
|
55905
55998
|
var { URLSerializer } = require_data_url();
|
|
55906
55999
|
var { kConstruct } = require_symbols();
|
|
55907
|
-
var
|
|
56000
|
+
var assert72 = __require("assert");
|
|
55908
56001
|
var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra();
|
|
55909
56002
|
var textEncoder = new TextEncoder("utf-8");
|
|
55910
56003
|
var Response14 = class _Response {
|
|
@@ -56168,7 +56261,7 @@ var require_response = __commonJS({
|
|
|
56168
56261
|
return p8 in state3 ? state3[p8] : target[p8];
|
|
56169
56262
|
},
|
|
56170
56263
|
set(target, p8, value) {
|
|
56171
|
-
|
|
56264
|
+
assert72(!(p8 in state3));
|
|
56172
56265
|
target[p8] = value;
|
|
56173
56266
|
return true;
|
|
56174
56267
|
}
|
|
@@ -56203,12 +56296,12 @@ var require_response = __commonJS({
|
|
|
56203
56296
|
body: null
|
|
56204
56297
|
});
|
|
56205
56298
|
} else {
|
|
56206
|
-
|
|
56299
|
+
assert72(false);
|
|
56207
56300
|
}
|
|
56208
56301
|
}
|
|
56209
56302
|
__name(filterResponse, "filterResponse");
|
|
56210
56303
|
function makeAppropriateNetworkError(fetchParams, err = null) {
|
|
56211
|
-
|
|
56304
|
+
assert72(isCancelled(fetchParams));
|
|
56212
56305
|
return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
|
|
56213
56306
|
}
|
|
56214
56307
|
__name(makeAppropriateNetworkError, "makeAppropriateNetworkError");
|
|
@@ -56342,7 +56435,7 @@ var require_request2 = __commonJS({
|
|
|
56342
56435
|
var { webidl } = require_webidl();
|
|
56343
56436
|
var { URLSerializer } = require_data_url();
|
|
56344
56437
|
var { kConstruct } = require_symbols();
|
|
56345
|
-
var
|
|
56438
|
+
var assert72 = __require("assert");
|
|
56346
56439
|
var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("events");
|
|
56347
56440
|
var kAbortController = Symbol("abortController");
|
|
56348
56441
|
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
|
@@ -56422,7 +56515,7 @@ var require_request2 = __commonJS({
|
|
|
56422
56515
|
request4 = makeRequest({ urlList: [parsedURL] });
|
|
56423
56516
|
fallbackMode = "cors";
|
|
56424
56517
|
} else {
|
|
56425
|
-
|
|
56518
|
+
assert72(webidl.is.Request(input2));
|
|
56426
56519
|
request4 = input2.#state;
|
|
56427
56520
|
signal = input2.#signal;
|
|
56428
56521
|
this.#dispatcher = init4.dispatcher || input2.#dispatcher;
|
|
@@ -57082,7 +57175,7 @@ var require_request2 = __commonJS({
|
|
|
57082
57175
|
var require_subresource_integrity = __commonJS({
|
|
57083
57176
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports2, module2) {
|
|
57084
57177
|
init_import_meta_url();
|
|
57085
|
-
var
|
|
57178
|
+
var assert72 = __require("assert");
|
|
57086
57179
|
var { runtimeFeatures } = require_runtime_features();
|
|
57087
57180
|
var { asciiLowercase } = require_infra();
|
|
57088
57181
|
var validSRIHashAlgorithmTokenSet = /* @__PURE__ */ new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]);
|
|
@@ -57128,7 +57221,7 @@ var require_subresource_integrity = __commonJS({
|
|
|
57128
57221
|
const result = [];
|
|
57129
57222
|
let strongest = null;
|
|
57130
57223
|
for (const item of metadataList) {
|
|
57131
|
-
|
|
57224
|
+
assert72(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token");
|
|
57132
57225
|
if (result.length === 0) {
|
|
57133
57226
|
result.push(item);
|
|
57134
57227
|
strongest = item;
|
|
@@ -57268,7 +57361,7 @@ var require_fetch = __commonJS({
|
|
|
57268
57361
|
includesCredentials,
|
|
57269
57362
|
isTraversableNavigable
|
|
57270
57363
|
} = require_util2();
|
|
57271
|
-
var
|
|
57364
|
+
var assert72 = __require("assert");
|
|
57272
57365
|
var { safelyExtractBody, extractBody } = require_body();
|
|
57273
57366
|
var {
|
|
57274
57367
|
redirectStatusSet,
|
|
@@ -57355,7 +57448,7 @@ var require_fetch = __commonJS({
|
|
|
57355
57448
|
requestObject.signal,
|
|
57356
57449
|
() => {
|
|
57357
57450
|
locallyAborted = true;
|
|
57358
|
-
|
|
57451
|
+
assert72(controller != null);
|
|
57359
57452
|
controller.abort(requestObject.signal.reason);
|
|
57360
57453
|
const realResponse = responseObject?.deref();
|
|
57361
57454
|
abortFetch(p8, request4, realResponse, requestObject.signal.reason, controller.controller);
|
|
@@ -57461,7 +57554,7 @@ var require_fetch = __commonJS({
|
|
|
57461
57554
|
requestObject = null
|
|
57462
57555
|
// Keep alive to prevent AbortController GC, see #4627
|
|
57463
57556
|
}) {
|
|
57464
|
-
|
|
57557
|
+
assert72(dispatcher);
|
|
57465
57558
|
let taskDestination = null;
|
|
57466
57559
|
let crossOriginIsolatedCapability = false;
|
|
57467
57560
|
if (request4.client != null) {
|
|
@@ -57486,7 +57579,7 @@ var require_fetch = __commonJS({
|
|
|
57486
57579
|
// Keep requestObject alive to prevent its AbortController from being GC'd
|
|
57487
57580
|
requestObject
|
|
57488
57581
|
};
|
|
57489
|
-
|
|
57582
|
+
assert72(!request4.body || request4.body.stream);
|
|
57490
57583
|
if (request4.window === "client") {
|
|
57491
57584
|
request4.window = request4.client?.globalObject?.constructor?.name === "Window" ? request4.client : "no-window";
|
|
57492
57585
|
}
|
|
@@ -57574,7 +57667,7 @@ var require_fetch = __commonJS({
|
|
|
57574
57667
|
} else if (request4.responseTainting === "opaque") {
|
|
57575
57668
|
response = filterResponse(response, "opaque");
|
|
57576
57669
|
} else {
|
|
57577
|
-
|
|
57670
|
+
assert72(false);
|
|
57578
57671
|
}
|
|
57579
57672
|
}
|
|
57580
57673
|
let internalResponse = response.status === 0 ? response : response.internalResponse;
|
|
@@ -57807,7 +57900,7 @@ var require_fetch = __commonJS({
|
|
|
57807
57900
|
} else if (request4.redirect === "follow") {
|
|
57808
57901
|
response = await httpRedirectFetch(fetchParams, response);
|
|
57809
57902
|
} else {
|
|
57810
|
-
|
|
57903
|
+
assert72(false);
|
|
57811
57904
|
}
|
|
57812
57905
|
}
|
|
57813
57906
|
response.timingInfo = timingInfo;
|
|
@@ -57861,7 +57954,7 @@ var require_fetch = __commonJS({
|
|
|
57861
57954
|
request4.headersList.delete("host", true);
|
|
57862
57955
|
}
|
|
57863
57956
|
if (request4.body != null) {
|
|
57864
|
-
|
|
57957
|
+
assert72(request4.body.source != null);
|
|
57865
57958
|
request4.body = safelyExtractBody(request4.body.source)[0];
|
|
57866
57959
|
}
|
|
57867
57960
|
const timingInfo = fetchParams.timingInfo;
|
|
@@ -58013,7 +58106,7 @@ var require_fetch = __commonJS({
|
|
|
58013
58106
|
}
|
|
58014
58107
|
__name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch");
|
|
58015
58108
|
async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) {
|
|
58016
|
-
|
|
58109
|
+
assert72(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
|
|
58017
58110
|
fetchParams.controller.connection = {
|
|
58018
58111
|
abort: null,
|
|
58019
58112
|
destroyed: false,
|
|
@@ -58367,7 +58460,7 @@ var require_fetch = __commonJS({
|
|
|
58367
58460
|
var require_util3 = __commonJS({
|
|
58368
58461
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/cache/util.js"(exports2, module2) {
|
|
58369
58462
|
init_import_meta_url();
|
|
58370
|
-
var
|
|
58463
|
+
var assert72 = __require("assert");
|
|
58371
58464
|
var { URLSerializer } = require_data_url();
|
|
58372
58465
|
var { isValidHeaderName } = require_util2();
|
|
58373
58466
|
function urlEquals(A5, B4, excludeFragment = false) {
|
|
@@ -58377,7 +58470,7 @@ var require_util3 = __commonJS({
|
|
|
58377
58470
|
}
|
|
58378
58471
|
__name(urlEquals, "urlEquals");
|
|
58379
58472
|
function getFieldValues(header) {
|
|
58380
|
-
|
|
58473
|
+
assert72(header !== null);
|
|
58381
58474
|
const values = [];
|
|
58382
58475
|
for (let value of header.split(",")) {
|
|
58383
58476
|
value = value.trim();
|
|
@@ -58399,7 +58492,7 @@ var require_util3 = __commonJS({
|
|
|
58399
58492
|
var require_cache3 = __commonJS({
|
|
58400
58493
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/cache/cache.js"(exports2, module2) {
|
|
58401
58494
|
init_import_meta_url();
|
|
58402
|
-
var
|
|
58495
|
+
var assert72 = __require("assert");
|
|
58403
58496
|
var { kConstruct } = require_symbols();
|
|
58404
58497
|
var { urlEquals, getFieldValues } = require_util3();
|
|
58405
58498
|
var { kEnumerableProperty, isDisturbed } = require_util();
|
|
@@ -58652,7 +58745,7 @@ var require_cache3 = __commonJS({
|
|
|
58652
58745
|
return false;
|
|
58653
58746
|
}
|
|
58654
58747
|
} else {
|
|
58655
|
-
|
|
58748
|
+
assert72(typeof request4 === "string");
|
|
58656
58749
|
r10 = getRequestState(new Request8(request4));
|
|
58657
58750
|
}
|
|
58658
58751
|
const operations = [];
|
|
@@ -58763,7 +58856,7 @@ var require_cache3 = __commonJS({
|
|
|
58763
58856
|
}
|
|
58764
58857
|
for (const requestResponse of requestResponses) {
|
|
58765
58858
|
const idx = cache5.indexOf(requestResponse);
|
|
58766
|
-
|
|
58859
|
+
assert72(idx !== -1);
|
|
58767
58860
|
cache5.splice(idx, 1);
|
|
58768
58861
|
}
|
|
58769
58862
|
} else if (operation.type === "put") {
|
|
@@ -58795,7 +58888,7 @@ var require_cache3 = __commonJS({
|
|
|
58795
58888
|
requestResponses = this.#queryCache(operation.request);
|
|
58796
58889
|
for (const requestResponse of requestResponses) {
|
|
58797
58890
|
const idx = cache5.indexOf(requestResponse);
|
|
58798
|
-
|
|
58891
|
+
assert72(idx !== -1);
|
|
58799
58892
|
cache5.splice(idx, 1);
|
|
58800
58893
|
}
|
|
58801
58894
|
cache5.push([operation.request, operation.response]);
|
|
@@ -59301,7 +59394,7 @@ var require_parse = __commonJS({
|
|
|
59301
59394
|
var { collectASequenceOfCodePointsFast } = require_infra();
|
|
59302
59395
|
var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4();
|
|
59303
59396
|
var { isCTLExcludingHtab } = require_util4();
|
|
59304
|
-
var
|
|
59397
|
+
var assert72 = __require("assert");
|
|
59305
59398
|
function parseSetCookie(header) {
|
|
59306
59399
|
if (isCTLExcludingHtab(header)) {
|
|
59307
59400
|
return null;
|
|
@@ -59345,7 +59438,7 @@ var require_parse = __commonJS({
|
|
|
59345
59438
|
if (unparsedAttributes.length === 0) {
|
|
59346
59439
|
return cookieAttributeList;
|
|
59347
59440
|
}
|
|
59348
|
-
|
|
59441
|
+
assert72(unparsedAttributes[0] === ";");
|
|
59349
59442
|
unparsedAttributes = unparsedAttributes.slice(1);
|
|
59350
59443
|
let cookieAv = "";
|
|
59351
59444
|
if (unparsedAttributes.includes(";")) {
|
|
@@ -60220,7 +60313,7 @@ var require_connection = __commonJS({
|
|
|
60220
60313
|
var { Headers: Headers7, getHeadersList } = require_headers();
|
|
60221
60314
|
var { getDecodeSplit } = require_util2();
|
|
60222
60315
|
var { WebsocketFrameSend } = require_frame();
|
|
60223
|
-
var
|
|
60316
|
+
var assert72 = __require("assert");
|
|
60224
60317
|
var { runtimeFeatures } = require_runtime_features();
|
|
60225
60318
|
var crypto8 = runtimeFeatures.has("crypto") ? __require("crypto") : null;
|
|
60226
60319
|
var warningEmitted2 = false;
|
|
@@ -60326,7 +60419,7 @@ var require_connection = __commonJS({
|
|
|
60326
60419
|
if (reason.length !== 0 && code === null) {
|
|
60327
60420
|
code = 1e3;
|
|
60328
60421
|
}
|
|
60329
|
-
|
|
60422
|
+
assert72(code === null || Number.isInteger(code));
|
|
60330
60423
|
if (code === null && reason.length === 0) {
|
|
60331
60424
|
frame.frameData = emptyBuffer;
|
|
60332
60425
|
} else if (code !== null && reason === null) {
|
|
@@ -60464,7 +60557,7 @@ var require_receiver = __commonJS({
|
|
|
60464
60557
|
"../../node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) {
|
|
60465
60558
|
init_import_meta_url();
|
|
60466
60559
|
var { Writable: Writable6 } = __require("stream");
|
|
60467
|
-
var
|
|
60560
|
+
var assert72 = __require("assert");
|
|
60468
60561
|
var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5();
|
|
60469
60562
|
var {
|
|
60470
60563
|
isValidStatusCode,
|
|
@@ -60760,7 +60853,7 @@ var require_receiver = __commonJS({
|
|
|
60760
60853
|
return output2;
|
|
60761
60854
|
}
|
|
60762
60855
|
parseCloseBody(data) {
|
|
60763
|
-
|
|
60856
|
+
assert72(data.length !== 1);
|
|
60764
60857
|
let code;
|
|
60765
60858
|
if (data.length >= 2) {
|
|
60766
60859
|
code = data.readUInt16BE(0);
|
|
@@ -62807,9 +62900,9 @@ function logHeaders(headers, logger7) {
|
|
|
62807
62900
|
);
|
|
62808
62901
|
}
|
|
62809
62902
|
async function performApiFetchBase(complianceConfig, resource, init4 = {}, userAgent, logger7, queryParams, abortSignal, credentials) {
|
|
62810
|
-
|
|
62903
|
+
assert39__default.default(credentials, "credentials are required for performApiFetch");
|
|
62811
62904
|
const method = init4.method ?? "GET";
|
|
62812
|
-
|
|
62905
|
+
assert39__default.default(
|
|
62813
62906
|
resource.startsWith("/"),
|
|
62814
62907
|
`CF API fetch - resource path must start with a "/" but got "${resource}"`
|
|
62815
62908
|
);
|
|
@@ -65416,7 +65509,7 @@ var init_zod_format = __esm({
|
|
|
65416
65509
|
}
|
|
65417
65510
|
});
|
|
65418
65511
|
function toUrlPath(filePath) {
|
|
65419
|
-
|
|
65512
|
+
assert39__default.default(
|
|
65420
65513
|
!/^[a-z]:/i.test(filePath),
|
|
65421
65514
|
"Tried to convert a Windows file path with a drive to a URL path."
|
|
65422
65515
|
);
|
|
@@ -66347,6 +66440,323 @@ var init_d1_migrations = __esm({
|
|
|
66347
66440
|
}
|
|
66348
66441
|
});
|
|
66349
66442
|
|
|
66443
|
+
// ../workers-utils/src/d1-trimmer.ts
|
|
66444
|
+
function trimSqlQuery(sql) {
|
|
66445
|
+
if (!mayContainTransaction(sql)) {
|
|
66446
|
+
return sql;
|
|
66447
|
+
}
|
|
66448
|
+
const trimmedSql = sql.replace("BEGIN TRANSACTION;", "").replace("COMMIT;", "");
|
|
66449
|
+
if (mayContainTransaction(trimmedSql)) {
|
|
66450
|
+
throw new UserError(
|
|
66451
|
+
"Wrangler could not process the provided SQL file, as it contains several transactions.\nD1 runs your SQL in a transaction for you.\nPlease export an SQL file from your SQLite database and try again.",
|
|
66452
|
+
{
|
|
66453
|
+
telemetryMessage: "d1 execute sql file contains multiple transactions"
|
|
66454
|
+
}
|
|
66455
|
+
);
|
|
66456
|
+
}
|
|
66457
|
+
return trimmedSql;
|
|
66458
|
+
}
|
|
66459
|
+
function mayContainTransaction(sql) {
|
|
66460
|
+
return sql.includes("BEGIN TRANSACTION");
|
|
66461
|
+
}
|
|
66462
|
+
var init_d1_trimmer = __esm({
|
|
66463
|
+
"../workers-utils/src/d1-trimmer.ts"() {
|
|
66464
|
+
init_import_meta_url();
|
|
66465
|
+
init_errors();
|
|
66466
|
+
__name(trimSqlQuery, "trimSqlQuery");
|
|
66467
|
+
__name(mayContainTransaction, "mayContainTransaction");
|
|
66468
|
+
}
|
|
66469
|
+
});
|
|
66470
|
+
|
|
66471
|
+
// ../workers-utils/src/d1-splitter.ts
|
|
66472
|
+
function mayContainMultipleStatements(sql) {
|
|
66473
|
+
const trimmed = sql.trimEnd();
|
|
66474
|
+
const semiColonIndex = trimmed.indexOf(";");
|
|
66475
|
+
return semiColonIndex !== -1 && semiColonIndex !== trimmed.length - 1;
|
|
66476
|
+
}
|
|
66477
|
+
function splitSqlQuery(sql) {
|
|
66478
|
+
const trimmedSql = trimSqlQuery(sql);
|
|
66479
|
+
if (!mayContainMultipleStatements(trimmedSql)) {
|
|
66480
|
+
return [trimmedSql];
|
|
66481
|
+
}
|
|
66482
|
+
const split = splitSqlIntoStatements(trimmedSql);
|
|
66483
|
+
if (split.length === 0) {
|
|
66484
|
+
return [trimmedSql];
|
|
66485
|
+
} else {
|
|
66486
|
+
return split;
|
|
66487
|
+
}
|
|
66488
|
+
}
|
|
66489
|
+
function normalizeSqlLineEndings(sql) {
|
|
66490
|
+
let normalized = "";
|
|
66491
|
+
let quoteEnd;
|
|
66492
|
+
let inLineComment = false;
|
|
66493
|
+
let inBlockComment = false;
|
|
66494
|
+
for (let index = 0; index < sql.length; index++) {
|
|
66495
|
+
const char = sql[index];
|
|
66496
|
+
const nextChar = sql[index + 1];
|
|
66497
|
+
if (quoteEnd !== void 0) {
|
|
66498
|
+
normalized += char;
|
|
66499
|
+
if (char === quoteEnd) {
|
|
66500
|
+
if (nextChar === quoteEnd) {
|
|
66501
|
+
normalized += nextChar;
|
|
66502
|
+
index++;
|
|
66503
|
+
} else {
|
|
66504
|
+
quoteEnd = void 0;
|
|
66505
|
+
}
|
|
66506
|
+
}
|
|
66507
|
+
continue;
|
|
66508
|
+
}
|
|
66509
|
+
if (inLineComment) {
|
|
66510
|
+
if (char === "\r" && nextChar === "\n") {
|
|
66511
|
+
normalized += "\n";
|
|
66512
|
+
index++;
|
|
66513
|
+
inLineComment = false;
|
|
66514
|
+
} else {
|
|
66515
|
+
normalized += char;
|
|
66516
|
+
inLineComment = char !== "\n";
|
|
66517
|
+
}
|
|
66518
|
+
continue;
|
|
66519
|
+
}
|
|
66520
|
+
if (inBlockComment) {
|
|
66521
|
+
if (char === "\r" && nextChar === "\n") {
|
|
66522
|
+
normalized += "\n";
|
|
66523
|
+
index++;
|
|
66524
|
+
} else {
|
|
66525
|
+
normalized += char;
|
|
66526
|
+
if (char === "*" && nextChar === "/") {
|
|
66527
|
+
normalized += nextChar;
|
|
66528
|
+
index++;
|
|
66529
|
+
inBlockComment = false;
|
|
66530
|
+
}
|
|
66531
|
+
}
|
|
66532
|
+
continue;
|
|
66533
|
+
}
|
|
66534
|
+
if (char === "-" && nextChar === "-") {
|
|
66535
|
+
normalized += "--";
|
|
66536
|
+
index++;
|
|
66537
|
+
inLineComment = true;
|
|
66538
|
+
continue;
|
|
66539
|
+
}
|
|
66540
|
+
if (char === "/" && nextChar === "*") {
|
|
66541
|
+
normalized += "/*";
|
|
66542
|
+
index++;
|
|
66543
|
+
inBlockComment = true;
|
|
66544
|
+
continue;
|
|
66545
|
+
}
|
|
66546
|
+
if (char === "'" || char === '"' || char === "`") {
|
|
66547
|
+
normalized += char;
|
|
66548
|
+
quoteEnd = char;
|
|
66549
|
+
continue;
|
|
66550
|
+
}
|
|
66551
|
+
if (char === "[") {
|
|
66552
|
+
normalized += char;
|
|
66553
|
+
quoteEnd = "]";
|
|
66554
|
+
continue;
|
|
66555
|
+
}
|
|
66556
|
+
if (char === "\r" && nextChar === "\n") {
|
|
66557
|
+
normalized += "\n";
|
|
66558
|
+
index++;
|
|
66559
|
+
continue;
|
|
66560
|
+
}
|
|
66561
|
+
normalized += char;
|
|
66562
|
+
}
|
|
66563
|
+
return normalized;
|
|
66564
|
+
}
|
|
66565
|
+
function splitSqlIntoStatements(sql) {
|
|
66566
|
+
const statements = [];
|
|
66567
|
+
let start = 0;
|
|
66568
|
+
while (start < sql.length) {
|
|
66569
|
+
const { end, hasUsefulToken } = findCompleteStatementEnd(sql, start);
|
|
66570
|
+
if (end === void 0) {
|
|
66571
|
+
if (hasUsefulToken) {
|
|
66572
|
+
statements.push(sql.slice(start).trim());
|
|
66573
|
+
}
|
|
66574
|
+
break;
|
|
66575
|
+
}
|
|
66576
|
+
const statement = sql.slice(start, end - 1).trim();
|
|
66577
|
+
if (hasUsefulToken && statement.length > 0) {
|
|
66578
|
+
statements.push(statement);
|
|
66579
|
+
}
|
|
66580
|
+
start = end;
|
|
66581
|
+
}
|
|
66582
|
+
return statements;
|
|
66583
|
+
}
|
|
66584
|
+
function findCompleteStatementEnd(sql, start) {
|
|
66585
|
+
let state3 = "INVALID";
|
|
66586
|
+
let hasUsefulToken = false;
|
|
66587
|
+
for (let index = start; index < sql.length; index++) {
|
|
66588
|
+
const char = sql[index];
|
|
66589
|
+
let token;
|
|
66590
|
+
if (char === ";") {
|
|
66591
|
+
token = "tkSEMI";
|
|
66592
|
+
} else if (char === " " || char === "\r" || char === " " || char === "\n" || char === "\f") {
|
|
66593
|
+
token = "tkWS";
|
|
66594
|
+
} else if (char === "/" && sql[index + 1] === "*") {
|
|
66595
|
+
const end = sql.indexOf("*/", index + 2);
|
|
66596
|
+
if (end === -1) {
|
|
66597
|
+
return { end: void 0, hasUsefulToken };
|
|
66598
|
+
}
|
|
66599
|
+
index = end + 1;
|
|
66600
|
+
token = "tkWS";
|
|
66601
|
+
} else if (char === "-" && sql[index + 1] === "-") {
|
|
66602
|
+
const end = sql.indexOf("\n", index + 2);
|
|
66603
|
+
if (end === -1) {
|
|
66604
|
+
return { end: void 0, hasUsefulToken };
|
|
66605
|
+
}
|
|
66606
|
+
index = end;
|
|
66607
|
+
token = "tkWS";
|
|
66608
|
+
} else if (char === "[") {
|
|
66609
|
+
const end = sql.indexOf("]", index + 1);
|
|
66610
|
+
if (end === -1) {
|
|
66611
|
+
return { end: void 0, hasUsefulToken: true };
|
|
66612
|
+
}
|
|
66613
|
+
index = end;
|
|
66614
|
+
token = "tkOTHER";
|
|
66615
|
+
} else if (char === "'" || char === '"' || char === "`") {
|
|
66616
|
+
const end = sql.indexOf(char, index + 1);
|
|
66617
|
+
if (end === -1) {
|
|
66618
|
+
return { end: void 0, hasUsefulToken: true };
|
|
66619
|
+
}
|
|
66620
|
+
index = end;
|
|
66621
|
+
token = "tkOTHER";
|
|
66622
|
+
} else if (isIdentifierChar(char)) {
|
|
66623
|
+
const identifierStart = index;
|
|
66624
|
+
while (index + 1 < sql.length && isIdentifierChar(sql[index + 1])) {
|
|
66625
|
+
index++;
|
|
66626
|
+
}
|
|
66627
|
+
token = classifyIdentifier(sql.slice(identifierStart, index + 1));
|
|
66628
|
+
} else {
|
|
66629
|
+
token = "tkOTHER";
|
|
66630
|
+
}
|
|
66631
|
+
hasUsefulToken ||= token !== "tkSEMI" && token !== "tkWS";
|
|
66632
|
+
state3 = getNextState(state3, token);
|
|
66633
|
+
if (state3 === "START") {
|
|
66634
|
+
return { end: index + 1, hasUsefulToken };
|
|
66635
|
+
}
|
|
66636
|
+
}
|
|
66637
|
+
return { end: void 0, hasUsefulToken };
|
|
66638
|
+
}
|
|
66639
|
+
function getNextState(state3, token) {
|
|
66640
|
+
return transitions[state3][token];
|
|
66641
|
+
}
|
|
66642
|
+
function isIdentifierChar(char) {
|
|
66643
|
+
return /[A-Za-z0-9_$\u0080-\uffff]/.test(char);
|
|
66644
|
+
}
|
|
66645
|
+
function classifyIdentifier(identifier) {
|
|
66646
|
+
switch (identifier.toLowerCase()) {
|
|
66647
|
+
case "explain":
|
|
66648
|
+
return "tkEXPLAIN";
|
|
66649
|
+
case "create":
|
|
66650
|
+
return "tkCREATE";
|
|
66651
|
+
case "temp":
|
|
66652
|
+
case "temporary":
|
|
66653
|
+
return "tkTEMP";
|
|
66654
|
+
case "trigger":
|
|
66655
|
+
return "tkTRIGGER";
|
|
66656
|
+
case "end":
|
|
66657
|
+
return "tkEND";
|
|
66658
|
+
default:
|
|
66659
|
+
return "tkOTHER";
|
|
66660
|
+
}
|
|
66661
|
+
}
|
|
66662
|
+
var transitions;
|
|
66663
|
+
var init_d1_splitter = __esm({
|
|
66664
|
+
"../workers-utils/src/d1-splitter.ts"() {
|
|
66665
|
+
init_import_meta_url();
|
|
66666
|
+
init_d1_trimmer();
|
|
66667
|
+
__name(mayContainMultipleStatements, "mayContainMultipleStatements");
|
|
66668
|
+
__name(splitSqlQuery, "splitSqlQuery");
|
|
66669
|
+
__name(normalizeSqlLineEndings, "normalizeSqlLineEndings");
|
|
66670
|
+
__name(splitSqlIntoStatements, "splitSqlIntoStatements");
|
|
66671
|
+
transitions = {
|
|
66672
|
+
INVALID: {
|
|
66673
|
+
tkSEMI: "START",
|
|
66674
|
+
tkWS: "INVALID",
|
|
66675
|
+
tkOTHER: "NORMAL",
|
|
66676
|
+
tkEXPLAIN: "EXPLAIN",
|
|
66677
|
+
tkCREATE: "CREATE",
|
|
66678
|
+
tkTEMP: "NORMAL",
|
|
66679
|
+
tkTRIGGER: "NORMAL",
|
|
66680
|
+
tkEND: "NORMAL"
|
|
66681
|
+
},
|
|
66682
|
+
START: {
|
|
66683
|
+
tkSEMI: "START",
|
|
66684
|
+
tkWS: "START",
|
|
66685
|
+
tkOTHER: "NORMAL",
|
|
66686
|
+
tkEXPLAIN: "EXPLAIN",
|
|
66687
|
+
tkCREATE: "CREATE",
|
|
66688
|
+
tkTEMP: "NORMAL",
|
|
66689
|
+
tkTRIGGER: "NORMAL",
|
|
66690
|
+
tkEND: "NORMAL"
|
|
66691
|
+
},
|
|
66692
|
+
NORMAL: {
|
|
66693
|
+
tkSEMI: "START",
|
|
66694
|
+
tkWS: "NORMAL",
|
|
66695
|
+
tkOTHER: "NORMAL",
|
|
66696
|
+
tkEXPLAIN: "NORMAL",
|
|
66697
|
+
tkCREATE: "NORMAL",
|
|
66698
|
+
tkTEMP: "NORMAL",
|
|
66699
|
+
tkTRIGGER: "NORMAL",
|
|
66700
|
+
tkEND: "NORMAL"
|
|
66701
|
+
},
|
|
66702
|
+
EXPLAIN: {
|
|
66703
|
+
tkSEMI: "START",
|
|
66704
|
+
tkWS: "EXPLAIN",
|
|
66705
|
+
tkOTHER: "EXPLAIN",
|
|
66706
|
+
tkEXPLAIN: "NORMAL",
|
|
66707
|
+
tkCREATE: "CREATE",
|
|
66708
|
+
tkTEMP: "NORMAL",
|
|
66709
|
+
tkTRIGGER: "NORMAL",
|
|
66710
|
+
tkEND: "NORMAL"
|
|
66711
|
+
},
|
|
66712
|
+
CREATE: {
|
|
66713
|
+
tkSEMI: "START",
|
|
66714
|
+
tkWS: "CREATE",
|
|
66715
|
+
tkOTHER: "NORMAL",
|
|
66716
|
+
tkEXPLAIN: "NORMAL",
|
|
66717
|
+
tkCREATE: "NORMAL",
|
|
66718
|
+
tkTEMP: "CREATE",
|
|
66719
|
+
tkTRIGGER: "TRIGGER",
|
|
66720
|
+
tkEND: "NORMAL"
|
|
66721
|
+
},
|
|
66722
|
+
TRIGGER: {
|
|
66723
|
+
tkSEMI: "SEMI",
|
|
66724
|
+
tkWS: "TRIGGER",
|
|
66725
|
+
tkOTHER: "TRIGGER",
|
|
66726
|
+
tkEXPLAIN: "TRIGGER",
|
|
66727
|
+
tkCREATE: "TRIGGER",
|
|
66728
|
+
tkTEMP: "TRIGGER",
|
|
66729
|
+
tkTRIGGER: "TRIGGER",
|
|
66730
|
+
tkEND: "TRIGGER"
|
|
66731
|
+
},
|
|
66732
|
+
SEMI: {
|
|
66733
|
+
tkSEMI: "SEMI",
|
|
66734
|
+
tkWS: "SEMI",
|
|
66735
|
+
tkOTHER: "TRIGGER",
|
|
66736
|
+
tkEXPLAIN: "TRIGGER",
|
|
66737
|
+
tkCREATE: "TRIGGER",
|
|
66738
|
+
tkTEMP: "TRIGGER",
|
|
66739
|
+
tkTRIGGER: "TRIGGER",
|
|
66740
|
+
tkEND: "END"
|
|
66741
|
+
},
|
|
66742
|
+
END: {
|
|
66743
|
+
tkSEMI: "START",
|
|
66744
|
+
tkWS: "END",
|
|
66745
|
+
tkOTHER: "TRIGGER",
|
|
66746
|
+
tkEXPLAIN: "TRIGGER",
|
|
66747
|
+
tkCREATE: "TRIGGER",
|
|
66748
|
+
tkTEMP: "TRIGGER",
|
|
66749
|
+
tkTRIGGER: "TRIGGER",
|
|
66750
|
+
tkEND: "TRIGGER"
|
|
66751
|
+
}
|
|
66752
|
+
};
|
|
66753
|
+
__name(findCompleteStatementEnd, "findCompleteStatementEnd");
|
|
66754
|
+
__name(getNextState, "getNextState");
|
|
66755
|
+
__name(isIdentifierChar, "isIdentifierChar");
|
|
66756
|
+
__name(classifyIdentifier, "classifyIdentifier");
|
|
66757
|
+
}
|
|
66758
|
+
});
|
|
66759
|
+
|
|
66350
66760
|
// ../workers-utils/src/index.ts
|
|
66351
66761
|
var friendlyBindingNames2;
|
|
66352
66762
|
var init_src = __esm({
|
|
@@ -66400,6 +66810,7 @@ var init_src = __esm({
|
|
|
66400
66810
|
init_zod_format();
|
|
66401
66811
|
init_url_path();
|
|
66402
66812
|
init_d1_migrations();
|
|
66813
|
+
init_d1_splitter();
|
|
66403
66814
|
friendlyBindingNames2 = friendlyBindingNames;
|
|
66404
66815
|
}
|
|
66405
66816
|
});
|
|
@@ -68120,8 +68531,8 @@ var init_esm2 = __esm({
|
|
|
68120
68531
|
mainFilename = __dirname3.substring(0, __dirname3.lastIndexOf("node_modules"));
|
|
68121
68532
|
esm_default2 = {
|
|
68122
68533
|
assert: {
|
|
68123
|
-
notStrictEqual:
|
|
68124
|
-
strictEqual:
|
|
68534
|
+
notStrictEqual: assert39.notStrictEqual,
|
|
68535
|
+
strictEqual: assert39.strictEqual
|
|
68125
68536
|
},
|
|
68126
68537
|
cliui: ui,
|
|
68127
68538
|
findUp: sync_default,
|
|
@@ -68193,7 +68604,7 @@ var name, version2;
|
|
|
68193
68604
|
var init_package = __esm({
|
|
68194
68605
|
"package.json"() {
|
|
68195
68606
|
name = "wrangler";
|
|
68196
|
-
version2 = "4.156.
|
|
68607
|
+
version2 = "4.156.2";
|
|
68197
68608
|
}
|
|
68198
68609
|
});
|
|
68199
68610
|
|
|
@@ -130689,7 +131100,7 @@ function isReturningFromAuthServer(query, state3, logger7) {
|
|
|
130689
131100
|
if (!code) {
|
|
130690
131101
|
return false;
|
|
130691
131102
|
}
|
|
130692
|
-
|
|
131103
|
+
assert39__default.default(!Array.isArray(code));
|
|
130693
131104
|
state3.authorizationCode = code;
|
|
130694
131105
|
state3.hasAuthCodeBeenExchangedForAccessToken = false;
|
|
130695
131106
|
return true;
|
|
@@ -130963,7 +131374,7 @@ async function getOauthToken(options, state3, ctx, generators) {
|
|
|
130963
131374
|
if (error64 || closeErr) {
|
|
130964
131375
|
reject(error64 || closeErr);
|
|
130965
131376
|
} else {
|
|
130966
|
-
|
|
131377
|
+
assert39__default.default(token);
|
|
130967
131378
|
resolve38(token);
|
|
130968
131379
|
}
|
|
130969
131380
|
});
|
|
@@ -130976,7 +131387,7 @@ async function getOauthToken(options, state3, ctx, generators) {
|
|
|
130976
131387
|
}
|
|
130977
131388
|
__name(renderErrorPage, "renderErrorPage");
|
|
130978
131389
|
__name2(renderErrorPage, "renderErrorPage");
|
|
130979
|
-
|
|
131390
|
+
assert39__default.default(req.url, "This request doesn't have a URL");
|
|
130980
131391
|
const { pathname, query } = Url__default.default.parse(req.url, true);
|
|
130981
131392
|
if (req.method !== "GET") {
|
|
130982
131393
|
return res.end("OK");
|
|
@@ -143976,7 +144387,7 @@ var require_signal_exit = __commonJS({
|
|
|
143976
144387
|
};
|
|
143977
144388
|
};
|
|
143978
144389
|
} else {
|
|
143979
|
-
|
|
144390
|
+
assert72 = __require("assert");
|
|
143980
144391
|
signals2 = require_signals();
|
|
143981
144392
|
isWin = /^win/i.test(process18.platform);
|
|
143982
144393
|
EE = __require("events");
|
|
@@ -143999,7 +144410,7 @@ var require_signal_exit = __commonJS({
|
|
|
143999
144410
|
return function() {
|
|
144000
144411
|
};
|
|
144001
144412
|
}
|
|
144002
|
-
|
|
144413
|
+
assert72.equal(typeof cb2, "function", "a callback must be provided for exit handler");
|
|
144003
144414
|
if (loaded === false) {
|
|
144004
144415
|
load2();
|
|
144005
144416
|
}
|
|
@@ -144105,7 +144516,7 @@ var require_signal_exit = __commonJS({
|
|
|
144105
144516
|
}
|
|
144106
144517
|
}, "processEmit");
|
|
144107
144518
|
}
|
|
144108
|
-
var
|
|
144519
|
+
var assert72;
|
|
144109
144520
|
var signals2;
|
|
144110
144521
|
var isWin;
|
|
144111
144522
|
var EE;
|
|
@@ -146927,7 +147338,7 @@ function requiresObservabilityMigration(app, observability) {
|
|
|
146927
147338
|
}
|
|
146928
147339
|
function buildLegacyObservabilityMigrationPatch(app) {
|
|
146929
147340
|
const observability = app.configuration.observability;
|
|
146930
|
-
|
|
147341
|
+
assert39__default.default(observability?.logs?.enabled === true);
|
|
146931
147342
|
return { logs: observability.logs };
|
|
146932
147343
|
}
|
|
146933
147344
|
function migrateLegacyObservabilityState(app, observability) {
|
|
@@ -156406,17 +156817,12 @@ Add \`fallthrough = true\` to rule to allow next rule to be used or \`fallthroug
|
|
|
156406
156817
|
rulesToRemove.forEach((rule) => rules.splice(rules.indexOf(rule), 1));
|
|
156407
156818
|
return { rules, removedRules: rulesToRemove };
|
|
156408
156819
|
}
|
|
156409
|
-
var DEFAULT_MODULE_RULES;
|
|
156410
156820
|
var init_rules13 = __esm({
|
|
156411
156821
|
"src/deployment-bundle/rules.ts"() {
|
|
156412
156822
|
init_import_meta_url();
|
|
156823
|
+
init_src();
|
|
156413
156824
|
init_logger2();
|
|
156414
156825
|
__name(isJavaScriptModuleRule, "isJavaScriptModuleRule");
|
|
156415
|
-
DEFAULT_MODULE_RULES = [
|
|
156416
|
-
{ type: "Text", globs: ["**/*.txt", "**/*.html", "**/*.sql"] },
|
|
156417
|
-
{ type: "Data", globs: ["**/*.bin"] },
|
|
156418
|
-
{ type: "CompiledWasm", globs: ["**/*.wasm", "**/*.wasm?module"] }
|
|
156419
|
-
];
|
|
156420
156826
|
__name(parseRules, "parseRules");
|
|
156421
156827
|
}
|
|
156422
156828
|
});
|
|
@@ -156899,7 +157305,7 @@ function createModuleCollector(props) {
|
|
|
156899
157305
|
)}". This will stop working in the future. Replace references to "${args.path}" with "./${args.path}";`
|
|
156900
157306
|
);
|
|
156901
157307
|
const cleanedPath = stripQueryString(args.path);
|
|
156902
|
-
|
|
157308
|
+
assert39__default.default(props.wrangler1xLegacyModuleReferences);
|
|
156903
157309
|
const filePath = path29__namespace.default.join(
|
|
156904
157310
|
props.wrangler1xLegacyModuleReferences.rootDirectory,
|
|
156905
157311
|
cleanedPath
|
|
@@ -164816,6 +165222,30 @@ var init_owned_workflows = __esm({
|
|
|
164816
165222
|
}
|
|
164817
165223
|
});
|
|
164818
165224
|
|
|
165225
|
+
// ../deploy-helpers/src/shared/partition-routes.ts
|
|
165226
|
+
function partitionRoutes(routes) {
|
|
165227
|
+
const routesOnly = [];
|
|
165228
|
+
const customDomainsOnly = [];
|
|
165229
|
+
for (const route of routes) {
|
|
165230
|
+
if (isCustomDomainRoute(route)) {
|
|
165231
|
+
customDomainsOnly.push(route);
|
|
165232
|
+
} else {
|
|
165233
|
+
routesOnly.push(route);
|
|
165234
|
+
}
|
|
165235
|
+
}
|
|
165236
|
+
return { routesOnly, customDomainsOnly };
|
|
165237
|
+
}
|
|
165238
|
+
function isCustomDomainRoute(route) {
|
|
165239
|
+
return typeof route !== "string" && route.custom_domain === true;
|
|
165240
|
+
}
|
|
165241
|
+
var init_partition_routes = __esm({
|
|
165242
|
+
"../deploy-helpers/src/shared/partition-routes.ts"() {
|
|
165243
|
+
init_import_meta_url();
|
|
165244
|
+
__name(partitionRoutes, "partitionRoutes");
|
|
165245
|
+
__name(isCustomDomainRoute, "isCustomDomainRoute");
|
|
165246
|
+
}
|
|
165247
|
+
});
|
|
165248
|
+
|
|
164819
165249
|
// ../deploy-helpers/src/deploy/helpers/worker-not-found-error.ts
|
|
164820
165250
|
function isWorkerNotFoundError(error64) {
|
|
164821
165251
|
return typeof error64 === "object" && error64 !== null && "code" in error64 && (error64.code === WORKER_NOT_FOUND_ERR_CODE || error64.code === WORKER_LEGACY_ENVIRONMENT_NOT_FOUND_ERR_CODE);
|
|
@@ -166176,7 +166606,7 @@ async function triggersDeploy(props) {
|
|
|
166176
166606
|
return;
|
|
166177
166607
|
}
|
|
166178
166608
|
const { accountId } = props;
|
|
166179
|
-
|
|
166609
|
+
assert39__default.default(accountId);
|
|
166180
166610
|
if (props.validated !== true) {
|
|
166181
166611
|
await ensureQueuesExistByConfig(
|
|
166182
166612
|
config2,
|
|
@@ -166186,15 +166616,7 @@ async function triggersDeploy(props) {
|
|
|
166186
166616
|
props.queueCreateCommand
|
|
166187
166617
|
);
|
|
166188
166618
|
}
|
|
166189
|
-
const routesOnly =
|
|
166190
|
-
const customDomainsOnly = [];
|
|
166191
|
-
for (const route of routes) {
|
|
166192
|
-
if (typeof route !== "string" && route.custom_domain) {
|
|
166193
|
-
customDomainsOnly.push(route);
|
|
166194
|
-
} else {
|
|
166195
|
-
routesOnly.push(route);
|
|
166196
|
-
}
|
|
166197
|
-
}
|
|
166619
|
+
const { routesOnly, customDomainsOnly } = partitionRoutes(routes);
|
|
166198
166620
|
const start = Date.now();
|
|
166199
166621
|
const workerUrl = `/accounts/${accountId}/workers/scripts/${scriptName}`;
|
|
166200
166622
|
const uploadMs = Date.now() - start;
|
|
@@ -166800,6 +167222,7 @@ var init_deploy = __esm({
|
|
|
166800
167222
|
init_error_codes();
|
|
166801
167223
|
init_owned_workflows();
|
|
166802
167224
|
init_context();
|
|
167225
|
+
init_partition_routes();
|
|
166803
167226
|
init_email_routing2();
|
|
166804
167227
|
init_publish_routes();
|
|
166805
167228
|
init_queue_consumers();
|
|
@@ -168912,7 +169335,7 @@ var init_assets5 = __esm({
|
|
|
168912
169335
|
MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
|
|
168913
169336
|
MAX_DIFF_LINES = 100;
|
|
168914
169337
|
syncAssets = /* @__PURE__ */ __name(async (complianceConfig, accountId, assetDirectory, scriptName, dispatchNamespace) => {
|
|
168915
|
-
|
|
169338
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
168916
169339
|
logger.info("\u{1F300} Building list of assets...");
|
|
168917
169340
|
const manifest = await buildAssetManifest(assetDirectory);
|
|
168918
169341
|
const url4 = dispatchNamespace ? `/accounts/${accountId}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/assets-upload-session` : `/accounts/${accountId}/workers/scripts/${scriptName}/assets-upload-session`;
|
|
@@ -169635,7 +170058,7 @@ function getContainerMetadata(containers, preparedContainerImages = {}, options
|
|
|
169635
170058
|
return containers?.map((container) => {
|
|
169636
170059
|
if (isDurableObjectContainerApp(container)) {
|
|
169637
170060
|
const className = managedClasses.get(container.name);
|
|
169638
|
-
|
|
170061
|
+
assert39__default.default(className, "managed container class should have been resolved");
|
|
169639
170062
|
const configuredImages = Object.keys(container.images ?? {});
|
|
169640
170063
|
const images = preparedContainerImages[className];
|
|
169641
170064
|
if (configuredImages.length > 0 && images === void 0 && !options.allowUnprepared) {
|
|
@@ -170407,7 +170830,7 @@ function createWorkerUploadForm(worker, bindings2, options) {
|
|
|
170407
170830
|
const manifestModuleName = "__STATIC_CONTENT_MANIFEST";
|
|
170408
170831
|
const hasManifest = modules?.some(({ name: name2 }) => name2 === manifestModuleName);
|
|
170409
170832
|
if (hasManifest && main2.type === "esm") {
|
|
170410
|
-
|
|
170833
|
+
assert39__default.default(modules !== void 0);
|
|
170411
170834
|
const subDirs = new Set(
|
|
170412
170835
|
modules.map((module2) => path29__namespace.default.posix.dirname(module2.name))
|
|
170413
170836
|
);
|
|
@@ -170836,7 +171259,7 @@ async function pushOrResolveImage(config2, container, imageName, imageConfig, bu
|
|
|
170836
171259
|
if (dryRun) {
|
|
170837
171260
|
return imageConfig.image;
|
|
170838
171261
|
}
|
|
170839
|
-
|
|
171262
|
+
assert39__default.default(accountId, "Expected accountId to resolve container image name");
|
|
170840
171263
|
return resolveImageName(accountId, imageConfig.image, config2);
|
|
170841
171264
|
}
|
|
170842
171265
|
const builtImage = getBuiltImage(container, imageName, builtImages);
|
|
@@ -170922,7 +171345,7 @@ async function prepareDurableObjectContainerApplications(config2, durableObjectC
|
|
|
170922
171345
|
config2.exports
|
|
170923
171346
|
);
|
|
170924
171347
|
if (!dryRun) {
|
|
170925
|
-
|
|
171348
|
+
assert39__default.default(accountId, "Expected accountId to prepare container applications");
|
|
170926
171349
|
const storageByClass = getDurableObjectClassNameToUseSQLiteMap(
|
|
170927
171350
|
config2.migrations,
|
|
170928
171351
|
config2.exports
|
|
@@ -170947,9 +171370,9 @@ async function prepareDurableObjectContainerApplications(config2, durableObjectC
|
|
|
170947
171370
|
}
|
|
170948
171371
|
}
|
|
170949
171372
|
if (!dryRun && requireExistingImageLessApplications) {
|
|
170950
|
-
|
|
170951
|
-
|
|
170952
|
-
|
|
171373
|
+
assert39__default.default(accountId);
|
|
171374
|
+
assert39__default.default(deployCommand2, "Expected deploy command for versions upload");
|
|
171375
|
+
assert39__default.default(
|
|
170953
171376
|
versionsUploadCommand2,
|
|
170954
171377
|
"Expected versions upload command for versions upload"
|
|
170955
171378
|
);
|
|
@@ -171115,7 +171538,7 @@ var init_environments = __esm({
|
|
|
171115
171538
|
});
|
|
171116
171539
|
async function getMigrationsToUpload(scriptName, props) {
|
|
171117
171540
|
const { config: config2, accountId } = props;
|
|
171118
|
-
|
|
171541
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
171119
171542
|
let migrations;
|
|
171120
171543
|
if (config2.migrations.length > 0) {
|
|
171121
171544
|
let script;
|
|
@@ -176322,7 +176745,7 @@ async function provisionBindings(bindings2, accountId, scriptName, autoCreate, c
|
|
|
176322
176745
|
options.d1DeleteCommand
|
|
176323
176746
|
);
|
|
176324
176747
|
if (pendingResources.length > 0) {
|
|
176325
|
-
|
|
176748
|
+
assert39__default.default(
|
|
176326
176749
|
configPath,
|
|
176327
176750
|
"Provisioning resources is not possible without a config file"
|
|
176328
176751
|
);
|
|
@@ -176397,7 +176820,7 @@ async function provisionBindings(bindings2, accountId, scriptName, autoCreate, c
|
|
|
176397
176820
|
}
|
|
176398
176821
|
}
|
|
176399
176822
|
if (config2.userConfigPath && config2.userConfigPath !== config2.configPath) {
|
|
176400
|
-
|
|
176823
|
+
assert39__default.default(config2.configPath);
|
|
176401
176824
|
try {
|
|
176402
176825
|
writeProvisionedIdsToConfig(config2.configPath, resolvedResources);
|
|
176403
176826
|
} catch (error64) {
|
|
@@ -176835,7 +177258,7 @@ var init_provision_bindings = __esm({
|
|
|
176835
177258
|
);
|
|
176836
177259
|
}
|
|
176837
177260
|
async isConnectedToExistingResource() {
|
|
176838
|
-
|
|
177261
|
+
assert39__default.default(typeof this.binding.bucket_name !== "symbol");
|
|
176839
177262
|
if (!this.binding.bucket_name) {
|
|
176840
177263
|
return false;
|
|
176841
177264
|
}
|
|
@@ -176882,7 +177305,7 @@ var init_provision_bindings = __esm({
|
|
|
176882
177305
|
);
|
|
176883
177306
|
}
|
|
176884
177307
|
async isConnectedToExistingResource() {
|
|
176885
|
-
|
|
177308
|
+
assert39__default.default(typeof this.binding.namespace !== "symbol");
|
|
176886
177309
|
if (!this.binding.namespace) {
|
|
176887
177310
|
return false;
|
|
176888
177311
|
}
|
|
@@ -176925,7 +177348,7 @@ var init_provision_bindings = __esm({
|
|
|
176925
177348
|
);
|
|
176926
177349
|
}
|
|
176927
177350
|
async isConnectedToExistingResource() {
|
|
176928
|
-
|
|
177351
|
+
assert39__default.default(typeof this.binding.namespace !== "symbol");
|
|
176929
177352
|
if (!this.binding.namespace) {
|
|
176930
177353
|
return false;
|
|
176931
177354
|
}
|
|
@@ -176980,7 +177403,7 @@ var init_provision_bindings = __esm({
|
|
|
176980
177403
|
return true;
|
|
176981
177404
|
}
|
|
176982
177405
|
async isConnectedToExistingResource() {
|
|
176983
|
-
|
|
177406
|
+
assert39__default.default(typeof this.binding.queue_name !== "symbol");
|
|
176984
177407
|
if (!this.binding.queue_name) {
|
|
176985
177408
|
return false;
|
|
176986
177409
|
}
|
|
@@ -177036,7 +177459,7 @@ var init_provision_bindings = __esm({
|
|
|
177036
177459
|
return true;
|
|
177037
177460
|
}
|
|
177038
177461
|
async isConnectedToExistingResource() {
|
|
177039
|
-
|
|
177462
|
+
assert39__default.default(typeof this.binding.namespace !== "symbol");
|
|
177040
177463
|
if (!this.binding.namespace) {
|
|
177041
177464
|
return false;
|
|
177042
177465
|
}
|
|
@@ -177165,7 +177588,7 @@ var init_provision_bindings = __esm({
|
|
|
177165
177588
|
return false;
|
|
177166
177589
|
}
|
|
177167
177590
|
async isConnectedToExistingResource() {
|
|
177168
|
-
|
|
177591
|
+
assert39__default.default(typeof this.binding.database_name !== "symbol");
|
|
177169
177592
|
if (!this.binding.database_name) {
|
|
177170
177593
|
return false;
|
|
177171
177594
|
}
|
|
@@ -177934,7 +178357,7 @@ function getSourceMappingPrepareStackTrace(retrieveSourceMap) {
|
|
|
177934
178357
|
if (sourceMappingPrepareStackTrace !== void 0) {
|
|
177935
178358
|
return sourceMappingPrepareStackTrace;
|
|
177936
178359
|
}
|
|
177937
|
-
const support =
|
|
178360
|
+
const support = getFreshSourceMapSupport();
|
|
177938
178361
|
const originalPrepareStackTrace = Error.prepareStackTrace;
|
|
177939
178362
|
support.install({
|
|
177940
178363
|
environment: "node",
|
|
@@ -177951,7 +178374,7 @@ function getSourceMappingPrepareStackTrace(retrieveSourceMap) {
|
|
|
177951
178374
|
}
|
|
177952
178375
|
});
|
|
177953
178376
|
sourceMappingPrepareStackTrace = Error.prepareStackTrace;
|
|
177954
|
-
|
|
178377
|
+
assert39__default.default(sourceMappingPrepareStackTrace !== void 0);
|
|
177955
178378
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
177956
178379
|
return sourceMappingPrepareStackTrace;
|
|
177957
178380
|
}
|
|
@@ -178012,7 +178435,7 @@ function getSourceMappedString(value, retrieveSourceMap) {
|
|
|
178012
178435
|
}
|
|
178013
178436
|
const callSiteLine = callSiteLines[i8][0];
|
|
178014
178437
|
const callSiteAtIndex = callSiteLine.indexOf("at");
|
|
178015
|
-
|
|
178438
|
+
assert39__default.default(callSiteAtIndex !== -1);
|
|
178016
178439
|
const callSiteLineLeftPad = callSiteLine.substring(0, callSiteAtIndex);
|
|
178017
178440
|
value = value.replace(
|
|
178018
178441
|
callSiteLine,
|
|
@@ -178064,10 +178487,11 @@ function lineMatchToCallSite(lineMatch) {
|
|
|
178064
178487
|
});
|
|
178065
178488
|
}
|
|
178066
178489
|
var sourceMappingPrepareStackTrace, retrieveSourceMapOverride, placeholderError, CALL_SITE_REGEXP, CallSite;
|
|
178067
|
-
var
|
|
178490
|
+
var init_sourcemap2 = __esm({
|
|
178068
178491
|
"../deploy-helpers/src/deploy/helpers/sourcemap.ts"() {
|
|
178069
178492
|
init_import_meta_url();
|
|
178070
178493
|
init_workers_shared();
|
|
178494
|
+
init_sourcemap();
|
|
178071
178495
|
init_context();
|
|
178072
178496
|
__name(maybeRetrieveFileSourceMap, "maybeRetrieveFileSourceMap");
|
|
178073
178497
|
__name(getSourceMappingPrepareStackTrace, "getSourceMappingPrepareStackTrace");
|
|
@@ -178649,10 +179073,10 @@ var require_difflib = __commonJS({
|
|
|
178649
179073
|
"../../node_modules/.pnpm/@ewoudenberg+difflib@0.1.0/node_modules/@ewoudenberg/difflib/lib/difflib.js"(exports2) {
|
|
178650
179074
|
init_import_meta_url();
|
|
178651
179075
|
(function() {
|
|
178652
|
-
var Differ, Heap, IS_CHARACTER_JUNK, IS_LINE_JUNK, SequenceMatcher, _any2, _arrayCmp, _calculateRatio, _countLeading, _formatRangeContext, _formatRangeUnified, _has,
|
|
179076
|
+
var Differ, Heap, IS_CHARACTER_JUNK, IS_LINE_JUNK, SequenceMatcher, _any2, _arrayCmp, _calculateRatio, _countLeading, _formatRangeContext, _formatRangeUnified, _has, assert72, contextDiff, floor, getCloseMatches, max, min, ndiff, restore, unifiedDiff2, indexOf = [].indexOf;
|
|
178653
179077
|
({ floor, max, min } = Math);
|
|
178654
179078
|
Heap = require_heap2();
|
|
178655
|
-
|
|
179079
|
+
assert72 = __require("assert");
|
|
178656
179080
|
_calculateRatio = /* @__PURE__ */ __name(function(matches, length) {
|
|
178657
179081
|
if (length) {
|
|
178658
179082
|
return 2 * matches / length;
|
|
@@ -179223,7 +179647,7 @@ var require_difflib = __commonJS({
|
|
|
179223
179647
|
}
|
|
179224
179648
|
_plainReplace(a8, alo, ahi, b11, blo, bhi) {
|
|
179225
179649
|
var first, g7, l8, len, len1, line, lines, m7, ref, second;
|
|
179226
|
-
|
|
179650
|
+
assert72(alo < ahi && blo < bhi);
|
|
179227
179651
|
if (bhi - blo < ahi - alo) {
|
|
179228
179652
|
first = this._dump("+", b11, blo, bhi);
|
|
179229
179653
|
second = this._dump("-", a8, alo, ahi);
|
|
@@ -181123,10 +181547,10 @@ function populateConfigPatch(diff, patchObj, targetEnvironment) {
|
|
|
181123
181547
|
return;
|
|
181124
181548
|
}
|
|
181125
181549
|
if (Array.isArray(diff)) {
|
|
181126
|
-
|
|
181550
|
+
assert39__default.default(Array.isArray(patchObj));
|
|
181127
181551
|
return populateConfigPatchArray(diff, patchObj);
|
|
181128
181552
|
}
|
|
181129
|
-
|
|
181553
|
+
assert39__default.default(!Array.isArray(patchObj));
|
|
181130
181554
|
return populateConfigPatchObject(diff, patchObj, targetEnvironment);
|
|
181131
181555
|
}
|
|
181132
181556
|
function populateConfigPatchArray(diff, patchArray) {
|
|
@@ -181295,7 +181719,10 @@ var init_deploy_confirm = __esm({
|
|
|
181295
181719
|
});
|
|
181296
181720
|
|
|
181297
181721
|
// ../deploy-helpers/src/deploy/helpers/download-worker-config.ts
|
|
181298
|
-
async function fetchWorkerConfig(complianceConfig, accountId, workerName, environment) {
|
|
181722
|
+
async function fetchWorkerConfig(complianceConfig, accountId, workerName, environment, localRoutes) {
|
|
181723
|
+
const partitionedRoutes = localRoutes === void 0 ? void 0 : partitionRoutes(localRoutes);
|
|
181724
|
+
const fetchRoutes = partitionedRoutes === void 0 || partitionedRoutes.routesOnly.length > 0;
|
|
181725
|
+
const fetchCustomDomains = partitionedRoutes === void 0 || partitionedRoutes.customDomainsOnly.length > 0;
|
|
181299
181726
|
const [
|
|
181300
181727
|
bindings2,
|
|
181301
181728
|
routes,
|
|
@@ -181308,14 +181735,14 @@ async function fetchWorkerConfig(complianceConfig, accountId, workerName, enviro
|
|
|
181308
181735
|
complianceConfig,
|
|
181309
181736
|
`/accounts/${accountId}/workers/services/${workerName}/environments/${environment}/bindings`
|
|
181310
181737
|
),
|
|
181311
|
-
fetchResult(
|
|
181738
|
+
fetchRoutes ? fetchResult(
|
|
181312
181739
|
complianceConfig,
|
|
181313
181740
|
`/accounts/${accountId}/workers/services/${workerName}/environments/${environment}/routes?show_zonename=true`
|
|
181314
|
-
),
|
|
181315
|
-
fetchResult(
|
|
181741
|
+
) : Promise.resolve([]),
|
|
181742
|
+
fetchCustomDomains ? fetchResult(
|
|
181316
181743
|
complianceConfig,
|
|
181317
181744
|
`/accounts/${accountId}/workers/domains/records?page=0&per_page=5&service=${workerName}&environment=${environment}`
|
|
181318
|
-
),
|
|
181745
|
+
) : Promise.resolve([]),
|
|
181319
181746
|
fetchResult(
|
|
181320
181747
|
complianceConfig,
|
|
181321
181748
|
`/accounts/${accountId}/workers/services/${workerName}/environments/${environment}/subdomain`
|
|
@@ -181343,7 +181770,7 @@ async function fetchWorkerConfig(complianceConfig, accountId, workerName, enviro
|
|
|
181343
181770
|
cronTriggers
|
|
181344
181771
|
};
|
|
181345
181772
|
}
|
|
181346
|
-
async function downloadWorkerConfig(complianceConfig, workerName, environment, entrypoint, accountId) {
|
|
181773
|
+
async function downloadWorkerConfig(complianceConfig, workerName, environment, entrypoint, accountId, localRoutes) {
|
|
181347
181774
|
const {
|
|
181348
181775
|
bindings: bindings2,
|
|
181349
181776
|
routes,
|
|
@@ -181355,7 +181782,8 @@ async function downloadWorkerConfig(complianceConfig, workerName, environment, e
|
|
|
181355
181782
|
complianceConfig,
|
|
181356
181783
|
accountId,
|
|
181357
181784
|
workerName,
|
|
181358
|
-
environment
|
|
181785
|
+
environment,
|
|
181786
|
+
localRoutes
|
|
181359
181787
|
);
|
|
181360
181788
|
return constructWranglerConfig({
|
|
181361
181789
|
name: workerName,
|
|
@@ -181381,6 +181809,7 @@ var init_download_worker_config = __esm({
|
|
|
181381
181809
|
init_import_meta_url();
|
|
181382
181810
|
init_src();
|
|
181383
181811
|
init_context();
|
|
181812
|
+
init_partition_routes();
|
|
181384
181813
|
__name(fetchWorkerConfig, "fetchWorkerConfig");
|
|
181385
181814
|
__name(downloadWorkerConfig, "downloadWorkerConfig");
|
|
181386
181815
|
}
|
|
@@ -181656,7 +182085,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
|
181656
182085
|
props.routes
|
|
181657
182086
|
).workers_dev;
|
|
181658
182087
|
validateRoutes2(props.routes, props.assetsOptions, workersDevEnabled);
|
|
181659
|
-
|
|
182088
|
+
assert39__default.default(
|
|
181660
182089
|
!config2.site || config2.site.bucket,
|
|
181661
182090
|
"A [site] definition requires a `bucket` field with a path to the site's assets directory."
|
|
181662
182091
|
);
|
|
@@ -181722,12 +182151,14 @@ async function preUploadApiChecks(props, config2, queueCreateCommand2) {
|
|
|
181722
182151
|
);
|
|
181723
182152
|
}
|
|
181724
182153
|
if (script.last_deployed_from === "dash") {
|
|
182154
|
+
const localRoutes = props.command === "deploy" ? props.routes : [];
|
|
181725
182155
|
const remoteWorkerConfig = await downloadWorkerConfig(
|
|
181726
182156
|
config2,
|
|
181727
182157
|
name2,
|
|
181728
182158
|
serviceMetaData.default_environment.environment,
|
|
181729
182159
|
props.entry.file,
|
|
181730
|
-
accountId
|
|
182160
|
+
accountId,
|
|
182161
|
+
localRoutes
|
|
181731
182162
|
);
|
|
181732
182163
|
const configForDiff = props.command === "deploy" ? {
|
|
181733
182164
|
...config2,
|
|
@@ -182111,7 +182542,7 @@ async function deployWorker(props, config2, buildResult, options) {
|
|
|
182111
182542
|
unsafeMetadata: config2.unsafe?.metadata
|
|
182112
182543
|
});
|
|
182113
182544
|
} else {
|
|
182114
|
-
|
|
182545
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
182115
182546
|
let provisionBindingsResult;
|
|
182116
182547
|
if (assetsOptions?.routerConfig.has_user_worker === false) {
|
|
182117
182548
|
logger.debug("skipping provisioning on assets-only project");
|
|
@@ -182343,7 +182774,7 @@ async function deployWorker(props, config2, buildResult, options) {
|
|
|
182343
182774
|
const uploadMs = Date.now() - start;
|
|
182344
182775
|
logger.log("Uploaded", workerName, formatTime(uploadMs));
|
|
182345
182776
|
if (shouldDeployContainers) {
|
|
182346
|
-
|
|
182777
|
+
assert39__default.default(versionId && accountId);
|
|
182347
182778
|
initContainersSharedContext({
|
|
182348
182779
|
logger,
|
|
182349
182780
|
fetchPagedListResult,
|
|
@@ -182355,7 +182786,7 @@ async function deployWorker(props, config2, buildResult, options) {
|
|
|
182355
182786
|
const builtImage = builtContainerImages.find(
|
|
182356
182787
|
(image) => image.container === container
|
|
182357
182788
|
);
|
|
182358
|
-
|
|
182789
|
+
assert39__default.default(
|
|
182359
182790
|
builtImage,
|
|
182360
182791
|
"Expected container image to be built before upload"
|
|
182361
182792
|
);
|
|
@@ -182391,7 +182822,7 @@ async function deployWorker(props, config2, buildResult, options) {
|
|
|
182391
182822
|
);
|
|
182392
182823
|
}
|
|
182393
182824
|
if (!skipContainerChanges && durableObjectContainerConfig.length > 0) {
|
|
182394
|
-
|
|
182825
|
+
assert39__default.default(versionId && accountId);
|
|
182395
182826
|
try {
|
|
182396
182827
|
await deployDurableObjectContainerApplications(
|
|
182397
182828
|
config2,
|
|
@@ -182417,7 +182848,7 @@ async function deployWorker(props, config2, buildResult, options) {
|
|
|
182417
182848
|
deployWfpUserWorker(props.dispatchNamespace, versionId);
|
|
182418
182849
|
return { versionId, workerTag, assetUploadStats, bundleSize };
|
|
182419
182850
|
}
|
|
182420
|
-
|
|
182851
|
+
assert39__default.default(accountId);
|
|
182421
182852
|
const targets = await triggersDeploy({
|
|
182422
182853
|
config: config2,
|
|
182423
182854
|
accountId,
|
|
@@ -182472,7 +182903,7 @@ var init_deploy2 = __esm({
|
|
|
182472
182903
|
init_placement();
|
|
182473
182904
|
init_provision_bindings();
|
|
182474
182905
|
init_secrets_validation();
|
|
182475
|
-
|
|
182906
|
+
init_sourcemap2();
|
|
182476
182907
|
init_validate_worker_props();
|
|
182477
182908
|
init_versions_api();
|
|
182478
182909
|
init_workers_sites_bindings();
|
|
@@ -182664,7 +183095,7 @@ async function uploadWorkerVersion(props, config2, buildResult, options) {
|
|
|
182664
183095
|
unsafeMetadata: config2.unsafe?.metadata
|
|
182665
183096
|
});
|
|
182666
183097
|
} else {
|
|
182667
|
-
|
|
183098
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
182668
183099
|
let provisionBindingsResult;
|
|
182669
183100
|
if (assetsOptions?.routerConfig.has_user_worker === false) {
|
|
182670
183101
|
logger.debug("skipping provisioning on assets-only project");
|
|
@@ -182785,9 +183216,9 @@ async function uploadWorkerVersion(props, config2, buildResult, options) {
|
|
|
182785
183216
|
logger.log(`--dry-run: exiting now.`);
|
|
182786
183217
|
return { versionId, workerTag, bundleSize };
|
|
182787
183218
|
}
|
|
182788
|
-
|
|
183219
|
+
assert39__default.default(accountId);
|
|
182789
183220
|
if (!hasDurableObjectExports(config2.exports) && durableObjectContainerConfig.length > 0) {
|
|
182790
|
-
|
|
183221
|
+
assert39__default.default(versionId);
|
|
182791
183222
|
await deployDurableObjectContainerApplications(
|
|
182792
183223
|
config2,
|
|
182793
183224
|
durableObjectContainerConfig.filter(
|
|
@@ -182867,7 +183298,7 @@ var init_versions_upload = __esm({
|
|
|
182867
183298
|
init_placement();
|
|
182868
183299
|
init_provision_bindings();
|
|
182869
183300
|
init_secrets_validation();
|
|
182870
|
-
|
|
183301
|
+
init_sourcemap2();
|
|
182871
183302
|
init_validate_worker_props();
|
|
182872
183303
|
init_versions_api();
|
|
182873
183304
|
__name(versionsUpload, "versionsUpload");
|
|
@@ -182987,6 +183418,8 @@ var init_preview_alias = __esm({
|
|
|
182987
183418
|
__name(generatePreviewAlias, "generatePreviewAlias");
|
|
182988
183419
|
}
|
|
182989
183420
|
});
|
|
183421
|
+
|
|
183422
|
+
// ../deploy-helpers/src/deploy/helpers/node-compat.ts
|
|
182990
183423
|
function validateNodeCompatMode(compatibilityDateStr = "2000-01-01", compatibilityFlags, {
|
|
182991
183424
|
noBundle = void 0
|
|
182992
183425
|
}) {
|
|
@@ -182995,7 +183428,7 @@ function validateNodeCompatMode(compatibilityDateStr = "2000-01-01", compatibili
|
|
|
182995
183428
|
hasNodejsCompatFlag,
|
|
182996
183429
|
hasNodejsCompatV2Flag,
|
|
182997
183430
|
hasExperimentalNodejsCompatV2Flag
|
|
182998
|
-
} =
|
|
183431
|
+
} = getNodeCompat(compatibilityDateStr, compatibilityFlags);
|
|
182999
183432
|
if (hasExperimentalNodejsCompatV2Flag) {
|
|
183000
183433
|
throw new UserError(
|
|
183001
183434
|
"The `experimental:` prefix on `nodejs_compat_v2` is no longer valid. Please remove it and try again.",
|
|
@@ -183015,10 +183448,11 @@ function validateNodeCompatMode(compatibilityDateStr = "2000-01-01", compatibili
|
|
|
183015
183448
|
}
|
|
183016
183449
|
return mode;
|
|
183017
183450
|
}
|
|
183018
|
-
var
|
|
183451
|
+
var init_node_compat2 = __esm({
|
|
183019
183452
|
"../deploy-helpers/src/deploy/helpers/node-compat.ts"() {
|
|
183020
183453
|
init_import_meta_url();
|
|
183021
183454
|
init_src();
|
|
183455
|
+
init_node_compat();
|
|
183022
183456
|
init_context();
|
|
183023
183457
|
__name(validateNodeCompatMode, "validateNodeCompatMode");
|
|
183024
183458
|
}
|
|
@@ -183844,7 +184278,7 @@ async function prepareContainersForPreview(config2, workerName, previewSlug, opt
|
|
|
183844
184278
|
}
|
|
183845
184279
|
return { scopedContainerConfig, normalisedContainerConfig };
|
|
183846
184280
|
}
|
|
183847
|
-
function
|
|
184281
|
+
function isCustomDomainRoute2(route) {
|
|
183848
184282
|
return typeof route === "object" && route.custom_domain === true;
|
|
183849
184283
|
}
|
|
183850
184284
|
function formatPreviewConfigUpdate(config2, update) {
|
|
@@ -183858,8 +184292,8 @@ function formatPreviewConfigUpdate(config2, update) {
|
|
|
183858
184292
|
).trimEnd();
|
|
183859
184293
|
}
|
|
183860
184294
|
function formatNoActivePreviewUrlsMessage(config2, deployCommand2 = "your deploy command", previewCommand2 = "the preview command") {
|
|
183861
|
-
const customDomainRouteEntries = (config2.routes ?? []).filter(
|
|
183862
|
-
if (config2.route &&
|
|
184295
|
+
const customDomainRouteEntries = (config2.routes ?? []).filter(isCustomDomainRoute2).map((route) => ({ route, singular: false }));
|
|
184296
|
+
if (config2.route && isCustomDomainRoute2(config2.route)) {
|
|
183863
184297
|
customDomainRouteEntries.push({ route: config2.route, singular: true });
|
|
183864
184298
|
}
|
|
183865
184299
|
const customDomainRouteEntry = customDomainRouteEntries.find(
|
|
@@ -184182,7 +184616,7 @@ function formatPreviewDeploymentSummary(config2, previewResource, deployment, is
|
|
|
184182
184616
|
function getPreviewCustomDomainHostnames(config2) {
|
|
184183
184617
|
const routes = config2.routes ?? (config2.route ? [config2.route] : []);
|
|
184184
184618
|
return routes.filter(
|
|
184185
|
-
(route) =>
|
|
184619
|
+
(route) => isCustomDomainRoute2(route) && route.previews_enabled === true
|
|
184186
184620
|
).map((route) => normalizeHostname(route.pattern));
|
|
184187
184621
|
}
|
|
184188
184622
|
function normalizeHostname(hostname4) {
|
|
@@ -184501,7 +184935,7 @@ var init_preview2 = __esm({
|
|
|
184501
184935
|
__name(getPreviewExports, "getPreviewExports");
|
|
184502
184936
|
__name(prepareContainersForPreview, "prepareContainersForPreview");
|
|
184503
184937
|
NO_ACTIVE_PREVIEW_URLS_MESSAGE = "Note: This Preview deployment has no active URLs.";
|
|
184504
|
-
__name(
|
|
184938
|
+
__name(isCustomDomainRoute2, "isCustomDomainRoute");
|
|
184505
184939
|
__name(formatPreviewConfigUpdate, "formatPreviewConfigUpdate");
|
|
184506
184940
|
__name(formatNoActivePreviewUrlsMessage, "formatNoActivePreviewUrlsMessage");
|
|
184507
184941
|
__name(getPreviewMigrationsToUpload, "getPreviewMigrationsToUpload");
|
|
@@ -184603,9 +185037,9 @@ var init_src3 = __esm({
|
|
|
184603
185037
|
init_deploy_wfp();
|
|
184604
185038
|
init_deploy_confirm();
|
|
184605
185039
|
init_preview_alias();
|
|
184606
|
-
|
|
185040
|
+
init_sourcemap2();
|
|
184607
185041
|
init_bundle_reporter();
|
|
184608
|
-
|
|
185042
|
+
init_node_compat2();
|
|
184609
185043
|
init_validate_routes();
|
|
184610
185044
|
init_environments();
|
|
184611
185045
|
init_friendly_validator_errors();
|
|
@@ -184636,7 +185070,7 @@ var init_src3 = __esm({
|
|
|
184636
185070
|
});
|
|
184637
185071
|
|
|
184638
185072
|
// src/sourcemap.ts
|
|
184639
|
-
var
|
|
185073
|
+
var init_sourcemap3 = __esm({
|
|
184640
185074
|
"src/sourcemap.ts"() {
|
|
184641
185075
|
init_import_meta_url();
|
|
184642
185076
|
init_src3();
|
|
@@ -185049,7 +185483,7 @@ function buildMiniflareBindingOptions(config2, remoteProxyConnectionString) {
|
|
|
185049
185483
|
(b11) => isUnsafeServiceBindingWithDevCfg(b11[1])
|
|
185050
185484
|
);
|
|
185051
185485
|
for (const [name2, unsafeBinding] of unsafeBindingsWithLocalDev) {
|
|
185052
|
-
|
|
185486
|
+
assert39__default.default(isUnsafeServiceBindingWithDevCfg(unsafeBinding));
|
|
185053
185487
|
const {
|
|
185054
185488
|
type,
|
|
185055
185489
|
dev: {
|
|
@@ -185490,7 +185924,7 @@ var init_miniflare = __esm({
|
|
|
185490
185924
|
init_source_url();
|
|
185491
185925
|
init_logger2();
|
|
185492
185926
|
init_metrics2();
|
|
185493
|
-
|
|
185927
|
+
init_sourcemap3();
|
|
185494
185928
|
init_update_check2();
|
|
185495
185929
|
init_class_names_sqlite();
|
|
185496
185930
|
EXTERNAL_SERVICE_WORKER_NAME = "__WRANGLER_EXTERNAL_DURABLE_OBJECTS_WORKER";
|
|
@@ -185664,8 +186098,8 @@ function createDeferred(previousDeferred) {
|
|
|
185664
186098
|
resolve38 = _resolve;
|
|
185665
186099
|
reject = _reject;
|
|
185666
186100
|
});
|
|
185667
|
-
|
|
185668
|
-
|
|
186101
|
+
assert39__default.default(resolve38);
|
|
186102
|
+
assert39__default.default(reject);
|
|
185669
186103
|
previousDeferred?.resolve(newPromise);
|
|
185670
186104
|
return {
|
|
185671
186105
|
promise: newPromise,
|
|
@@ -186820,8 +187254,8 @@ function createDeferred2(previousDeferred) {
|
|
|
186820
187254
|
resolve38 = _resolve;
|
|
186821
187255
|
reject = _reject;
|
|
186822
187256
|
});
|
|
186823
|
-
|
|
186824
|
-
|
|
187257
|
+
assert39__default.default(resolve38);
|
|
187258
|
+
assert39__default.default(reject);
|
|
186825
187259
|
previousDeferred?.resolve(newPromise);
|
|
186826
187260
|
return {
|
|
186827
187261
|
promise: newPromise,
|
|
@@ -186929,7 +187363,7 @@ function isAbortError(err) {
|
|
|
186929
187363
|
return legacyAbortErroCheck || abortErrorCheck;
|
|
186930
187364
|
}
|
|
186931
187365
|
function handlePreviewSessionUploadError(err, accountId) {
|
|
186932
|
-
|
|
187366
|
+
assert39__default.default(err && typeof err === "object");
|
|
186933
187367
|
if (!isAbortError(err)) {
|
|
186934
187368
|
if ("code" in err && err.code === 10049) {
|
|
186935
187369
|
logger4.log("Preview token expired, fetching a new one");
|
|
@@ -186939,7 +187373,7 @@ function handlePreviewSessionUploadError(err, accountId) {
|
|
|
186939
187373
|
return false;
|
|
186940
187374
|
}
|
|
186941
187375
|
function handlePreviewSessionCreationError(err, accountId) {
|
|
186942
|
-
|
|
187376
|
+
assert39__default.default(err && typeof err === "object");
|
|
186943
187377
|
if (handleUserFriendlyError(err, accountId)) return;
|
|
186944
187378
|
if ("cause" in err && err.cause?.code === "ENOTFOUND") logger4.error(`Could not access \`${err.cause.hostname}\`. Make sure the domain is set up to be proxied by Cloudflare.
|
|
186945
187379
|
For more details, refer to https://developers.cloudflare.com/workers/configuration/routing/routes/#set-up-a-route`);
|
|
@@ -187165,7 +187599,7 @@ async function maybeStartOrUpdateRemoteProxySession(workerConfigObject, preExist
|
|
|
187165
187599
|
}
|
|
187166
187600
|
function deepStrictEqual(source, target) {
|
|
187167
187601
|
try {
|
|
187168
|
-
|
|
187602
|
+
assert39__default.default.deepStrictEqual(source, target);
|
|
187169
187603
|
return true;
|
|
187170
187604
|
} catch {
|
|
187171
187605
|
return false;
|
|
@@ -187184,7 +187618,7 @@ var init_dist14 = __esm({
|
|
|
187184
187618
|
init_wrapper();
|
|
187185
187619
|
init_create_worker_upload_form();
|
|
187186
187620
|
import_undici14 = __toESM(require_undici(), 1);
|
|
187187
|
-
version3 = "0.0.
|
|
187621
|
+
version3 = "0.0.58";
|
|
187188
187622
|
NoDefaultValueProvided2 = class extends UserError {
|
|
187189
187623
|
static {
|
|
187190
187624
|
__name(this, "NoDefaultValueProvided");
|
|
@@ -187222,7 +187656,7 @@ var init_dist14 = __esm({
|
|
|
187222
187656
|
}
|
|
187223
187657
|
createProxyWorker() {
|
|
187224
187658
|
if (this._torndown || this.proxyWorker) return;
|
|
187225
|
-
|
|
187659
|
+
assert39__default.default(this.latestConfig !== void 0);
|
|
187226
187660
|
const proxyWorker = new miniflare.Miniflare(miniflare.convertV4MiniflareOptions({
|
|
187227
187661
|
host: this.latestConfig.server.hostname,
|
|
187228
187662
|
port: this.latestConfig.server.port,
|
|
@@ -187258,7 +187692,7 @@ var init_dist14 = __esm({
|
|
|
187258
187692
|
}));
|
|
187259
187693
|
this.proxyWorker = proxyWorker;
|
|
187260
187694
|
proxyWorker.ready.then((url4) => {
|
|
187261
|
-
|
|
187695
|
+
assert39__default.default(url4);
|
|
187262
187696
|
this.emitReadyEvent(proxyWorker, url4);
|
|
187263
187697
|
}).catch((error64) => {
|
|
187264
187698
|
if (this._torndown) return;
|
|
@@ -188645,11 +189079,11 @@ function hasOverlappingRules(routes) {
|
|
|
188645
189079
|
const endingSplatRoutes = routes.filter((route) => route.endsWith("/*"));
|
|
188646
189080
|
for (let i8 = 0; i8 < endingSplatRoutes.length; i8++) {
|
|
188647
189081
|
const crrRoute = endingSplatRoutes[i8];
|
|
188648
|
-
|
|
189082
|
+
assert39__default.default(crrRoute);
|
|
188649
189083
|
const crrRouteTrimmed = crrRoute.substring(0, crrRoute.length - 1);
|
|
188650
189084
|
for (let j8 = 0; j8 < routes.length; j8++) {
|
|
188651
189085
|
const nextRoute = routes[j8];
|
|
188652
|
-
|
|
189086
|
+
assert39__default.default(nextRoute);
|
|
188653
189087
|
if (nextRoute !== crrRoute && nextRoute.startsWith(crrRouteTrimmed)) {
|
|
188654
189088
|
return true;
|
|
188655
189089
|
}
|
|
@@ -188900,8 +189334,8 @@ function readConfig(args, options = {}) {
|
|
|
188900
189334
|
redirected
|
|
188901
189335
|
} = exports.experimental_readRawConfig(args, options);
|
|
188902
189336
|
if (redirected) {
|
|
188903
|
-
|
|
188904
|
-
|
|
189337
|
+
assert39__default.default(configPath, "Redirected config found without a configPath");
|
|
189338
|
+
assert39__default.default(
|
|
188905
189339
|
deployConfigPath,
|
|
188906
189340
|
"Redirected config found without a deployConfigPath"
|
|
188907
189341
|
);
|
|
@@ -188936,8 +189370,8 @@ function readPagesConfig(args, options = {}) {
|
|
|
188936
189370
|
try {
|
|
188937
189371
|
({ rawConfig, configPath, userConfigPath, deployConfigPath, redirected } = exports.experimental_readRawConfig(args, options));
|
|
188938
189372
|
if (redirected) {
|
|
188939
|
-
|
|
188940
|
-
|
|
189373
|
+
assert39__default.default(configPath, "Redirected config found without a configPath");
|
|
189374
|
+
assert39__default.default(
|
|
188941
189375
|
deployConfigPath,
|
|
188942
189376
|
"Redirected config found without a deployConfigPath"
|
|
188943
189377
|
);
|
|
@@ -190834,7 +191268,7 @@ var init_paths = __esm({
|
|
|
190834
191268
|
function dedent3(strings, ...values) {
|
|
190835
191269
|
const raw = String.raw({ raw: strings }, ...values);
|
|
190836
191270
|
let lines = raw.split("\n");
|
|
190837
|
-
|
|
191271
|
+
assert39__default.default(lines.length > 0);
|
|
190838
191272
|
if (lines[lines.length - 1].trim() === "") {
|
|
190839
191273
|
lines = lines.slice(0, lines.length - 1);
|
|
190840
191274
|
}
|
|
@@ -190981,12 +191415,12 @@ function getEntryPointFromMetafile(entryFile, metafile) {
|
|
|
190981
191415
|
);
|
|
190982
191416
|
if (entryPoints.length !== 1) {
|
|
190983
191417
|
const entryPointList = entryPoints.map(([_input, output2]) => output2.entryPoint).join("\n");
|
|
190984
|
-
|
|
191418
|
+
assert39__default.default(
|
|
190985
191419
|
entryPoints.length > 0,
|
|
190986
191420
|
`Cannot find entry-point "${entryFile}" in generated bundle.
|
|
190987
191421
|
${entryPointList}`
|
|
190988
191422
|
);
|
|
190989
|
-
|
|
191423
|
+
assert39__default.default(
|
|
190990
191424
|
entryPoints.length < 2,
|
|
190991
191425
|
`More than one entry-point found for generated bundle.
|
|
190992
191426
|
${entryPointList}`
|
|
@@ -191237,7 +191671,7 @@ function handleNodeJSGlobals(build5, inject, polyfill2) {
|
|
|
191237
191671
|
);
|
|
191238
191672
|
}
|
|
191239
191673
|
const moduleInjects = injectsByModule.get(module2);
|
|
191240
|
-
|
|
191674
|
+
assert39__default.default(moduleInjects);
|
|
191241
191675
|
moduleInjects.push({ injectedName, exportName, importName });
|
|
191242
191676
|
}
|
|
191243
191677
|
build5.initialOptions.inject = [
|
|
@@ -191252,9 +191686,9 @@ function handleNodeJSGlobals(build5, inject, polyfill2) {
|
|
|
191252
191686
|
}));
|
|
191253
191687
|
build5.onLoad({ filter: UNENV_VIRTUAL_MODULE_RE }, ({ path: path111 }) => {
|
|
191254
191688
|
const module2 = virtualModulePathToSpecifier.get(path111);
|
|
191255
|
-
|
|
191689
|
+
assert39__default.default(module2, `Expected ${path111} to be mapped to a module specifier`);
|
|
191256
191690
|
const injects = injectsByModule.get(module2);
|
|
191257
|
-
|
|
191691
|
+
assert39__default.default(injects, `Expected ${module2} to inject values`);
|
|
191258
191692
|
const imports = injects.map(
|
|
191259
191693
|
({ exportName, importName }) => importName === exportName ? exportName : `${exportName} as ${importName}`
|
|
191260
191694
|
);
|
|
@@ -193269,7 +193703,7 @@ var init_dev = __esm({
|
|
|
193269
193703
|
...args,
|
|
193270
193704
|
showLocalExplorerAgentHint
|
|
193271
193705
|
});
|
|
193272
|
-
|
|
193706
|
+
assert39__default.default(devInstance.devEnv !== void 0);
|
|
193273
193707
|
await events__default.default.once(devInstance.devEnv, "teardown");
|
|
193274
193708
|
await Promise.all(devInstance.secondary.map((d9) => d9.teardown()));
|
|
193275
193709
|
devInstance.unregisterHotKeys?.();
|
|
@@ -193416,7 +193850,7 @@ function runBuild({
|
|
|
193416
193850
|
async function updateBundle() {
|
|
193417
193851
|
const newAdditionalModules = await getAdditionalModules();
|
|
193418
193852
|
setBundle((previousBundle) => {
|
|
193419
|
-
|
|
193853
|
+
assert39__default.default(
|
|
193420
193854
|
previousBundle,
|
|
193421
193855
|
"Rebuild triggered with no previous build available"
|
|
193422
193856
|
);
|
|
@@ -193755,7 +194189,7 @@ var init_BundlerController = __esm({
|
|
|
193755
194189
|
}
|
|
193756
194190
|
}
|
|
193757
194191
|
}
|
|
193758
|
-
|
|
194192
|
+
assert39__default.default(this.#tmpDir);
|
|
193759
194193
|
if (!config2.build?.bundle) {
|
|
193760
194194
|
const destinationDir = this.#tmpDir.path;
|
|
193761
194195
|
fs14.writeFileSync(
|
|
@@ -193880,7 +194314,7 @@ var init_BundlerController = __esm({
|
|
|
193880
194314
|
return;
|
|
193881
194315
|
}
|
|
193882
194316
|
const pathsToWatch = config2.build.custom.watch;
|
|
193883
|
-
|
|
194317
|
+
assert39__default.default(pathsToWatch, "config.build.custom.watch");
|
|
193884
194318
|
if (config2.dev.watch === false) {
|
|
193885
194319
|
await this.#scheduleCustomBuild(
|
|
193886
194320
|
config2,
|
|
@@ -193934,7 +194368,7 @@ var init_BundlerController = __esm({
|
|
|
193934
194368
|
if (config2.build?.custom?.command) {
|
|
193935
194369
|
return;
|
|
193936
194370
|
}
|
|
193937
|
-
|
|
194371
|
+
assert39__default.default(this.#tmpDir);
|
|
193938
194372
|
const entry = {
|
|
193939
194373
|
file: config2.entrypoint,
|
|
193940
194374
|
projectRoot: config2.projectRoot,
|
|
@@ -194633,10 +195067,10 @@ var init_CommandRegistry = __esm({
|
|
|
194633
195067
|
* console.log(subtree); // Output: empty Map if 'wrangler hello' has no further subcommands
|
|
194634
195068
|
*/
|
|
194635
195069
|
#resolveDefinitionNode(node3) {
|
|
194636
|
-
|
|
195070
|
+
assert39__default.default(node3.definition);
|
|
194637
195071
|
const chain2 = this.#resolveDefinitionChain(node3.definition);
|
|
194638
195072
|
const resolvedDef = chain2.find((def) => def.type !== "alias");
|
|
194639
|
-
|
|
195073
|
+
assert39__default.default(resolvedDef);
|
|
194640
195074
|
const { subtree } = node3.definition.type !== "alias" ? node3 : this.#findNodeFor(resolvedDef.command) ?? node3;
|
|
194641
195075
|
const definition = {
|
|
194642
195076
|
// take all properties from the resolved alias
|
|
@@ -204132,7 +204566,7 @@ var init_commands2 = __esm({
|
|
|
204132
204566
|
"",
|
|
204133
204567
|
(api) => api.list()
|
|
204134
204568
|
)).map((key) => {
|
|
204135
|
-
|
|
204569
|
+
assert39__default.default(key.metadata, "metadata is always present in API list response");
|
|
204136
204570
|
return {
|
|
204137
204571
|
id: key.metadata.uuid,
|
|
204138
204572
|
store_id: args.storeId,
|
|
@@ -205603,8 +206037,8 @@ var init_config7 = __esm({
|
|
|
205603
206037
|
if (isDurableObjectContainerApp(container)) {
|
|
205604
206038
|
continue;
|
|
205605
206039
|
}
|
|
205606
|
-
|
|
205607
|
-
|
|
206040
|
+
assert39__default.default(container.name, "container name should have been set by validation");
|
|
206041
|
+
assert39__default.default(
|
|
205608
206042
|
container.image,
|
|
205609
206043
|
"container image should have been set by validation"
|
|
205610
206044
|
);
|
|
@@ -205716,12 +206150,12 @@ var init_config7 = __esm({
|
|
|
205716
206150
|
}
|
|
205717
206151
|
const maybeDockerfile = isDockerfile(container.image, config2.configPath);
|
|
205718
206152
|
if (maybeDockerfile) {
|
|
205719
|
-
|
|
206153
|
+
assert39__default.default(
|
|
205720
206154
|
path29__namespace.default.isAbsolute(container.image),
|
|
205721
206155
|
"Dockerfile path should be absolute"
|
|
205722
206156
|
);
|
|
205723
206157
|
const imageBuildContext = container.image_build_context ?? path29.dirname(container.image);
|
|
205724
|
-
|
|
206158
|
+
assert39__default.default(
|
|
205725
206159
|
path29__namespace.default.isAbsolute(imageBuildContext),
|
|
205726
206160
|
"resolved image_build_context should be defined"
|
|
205727
206161
|
);
|
|
@@ -205935,7 +206369,7 @@ var init_entry = __esm({
|
|
|
205935
206369
|
});
|
|
205936
206370
|
|
|
205937
206371
|
// src/deployment-bundle/node-compat.ts
|
|
205938
|
-
var
|
|
206372
|
+
var init_node_compat3 = __esm({
|
|
205939
206373
|
"src/deployment-bundle/node-compat.ts"() {
|
|
205940
206374
|
init_import_meta_url();
|
|
205941
206375
|
init_src3();
|
|
@@ -209443,6 +209877,8 @@ var init_runtime2 = __esm({
|
|
|
209443
209877
|
__name(generateRuntimeTypes2, "generateRuntimeTypes");
|
|
209444
209878
|
}
|
|
209445
209879
|
});
|
|
209880
|
+
|
|
209881
|
+
// src/process-env.ts
|
|
209446
209882
|
function isProcessEnvPopulated(compatibility_date, compatibility_flags = []) {
|
|
209447
209883
|
if (compatibility_flags.includes("nodejs_compat_populate_process_env") && compatibility_flags.includes("nodejs_compat_do_not_populate_process_env")) {
|
|
209448
209884
|
throw new UserError(
|
|
@@ -209452,7 +209888,7 @@ function isProcessEnvPopulated(compatibility_date, compatibility_flags = []) {
|
|
|
209452
209888
|
}
|
|
209453
209889
|
);
|
|
209454
209890
|
}
|
|
209455
|
-
const { isNodejsCompatEnabled } =
|
|
209891
|
+
const { isNodejsCompatEnabled } = getNodeCompat(
|
|
209456
209892
|
compatibility_date,
|
|
209457
209893
|
compatibility_flags
|
|
209458
209894
|
);
|
|
@@ -209468,6 +209904,7 @@ var init_process_env = __esm({
|
|
|
209468
209904
|
"src/process-env.ts"() {
|
|
209469
209905
|
init_import_meta_url();
|
|
209470
209906
|
init_src();
|
|
209907
|
+
init_node_compat();
|
|
209471
209908
|
__name(isProcessEnvPopulated, "isProcessEnvPopulated");
|
|
209472
209909
|
}
|
|
209473
209910
|
});
|
|
@@ -209689,7 +210126,7 @@ async function generateR2ServiceToken(accountId, bucketName, pipelineName) {
|
|
|
209689
210126
|
const timeoutPromise = timersPromises.setTimeout(12e4, "timeout", { signal });
|
|
209690
210127
|
const serverPromise = new Promise((resolve38, reject) => {
|
|
209691
210128
|
const server = http__namespace.default.createServer(async (request4, response) => {
|
|
209692
|
-
|
|
210129
|
+
assert39__default.default(request4.url, "This request doesn't have a URL");
|
|
209693
210130
|
if (request4.method !== "GET") {
|
|
209694
210131
|
response.writeHead(405);
|
|
209695
210132
|
response.end("Method not allowed.");
|
|
@@ -212834,6 +213271,7 @@ var init_type_generation = __esm({
|
|
|
212834
213271
|
init_import_meta_url();
|
|
212835
213272
|
init_src5();
|
|
212836
213273
|
init_src();
|
|
213274
|
+
init_node_compat();
|
|
212837
213275
|
init_source();
|
|
212838
213276
|
init_find();
|
|
212839
213277
|
import_glob_to_regexp3 = __toESM(require_glob_to_regexp());
|
|
@@ -212993,7 +213431,7 @@ var init_type_generation = __esm({
|
|
|
212993
213431
|
const configPath = config2.configPath;
|
|
212994
213432
|
const tsconfigPath = config2.tsconfig ?? path29.join(path29.dirname(configPath), "tsconfig.json");
|
|
212995
213433
|
const tsconfigTypes = readTsconfigTypes(tsconfigPath);
|
|
212996
|
-
const { mode } =
|
|
213434
|
+
const { mode } = getNodeCompat(
|
|
212997
213435
|
config2.compatibility_date,
|
|
212998
213436
|
config2.compatibility_flags
|
|
212999
213437
|
);
|
|
@@ -213806,7 +214244,7 @@ async function resolveDevConfig(config2, input2) {
|
|
|
213806
214244
|
);
|
|
213807
214245
|
if (input2.dev?.remote) {
|
|
213808
214246
|
const { accountId } = await auth2();
|
|
213809
|
-
|
|
214247
|
+
assert39__default.default(accountId, "Account ID must be provided for remote dev");
|
|
213810
214248
|
await getZoneIdForPreview(config2, { host, routes, accountId });
|
|
213811
214249
|
}
|
|
213812
214250
|
const initialIp = input2.dev?.server?.hostname ?? config2.dev.ip;
|
|
@@ -214165,7 +214603,7 @@ var init_ConfigController = __esm({
|
|
|
214165
214603
|
init_containers3();
|
|
214166
214604
|
init_config7();
|
|
214167
214605
|
init_entry();
|
|
214168
|
-
|
|
214606
|
+
init_node_compat3();
|
|
214169
214607
|
init_dev();
|
|
214170
214608
|
init_class_names_sqlite();
|
|
214171
214609
|
init_get_local_persistence_path();
|
|
@@ -214219,7 +214657,7 @@ var init_ConfigController = __esm({
|
|
|
214219
214657
|
return;
|
|
214220
214658
|
}
|
|
214221
214659
|
logger2.debug(`${path29__namespace.default.basename(changedPath)} changed...`);
|
|
214222
|
-
|
|
214660
|
+
assert39__default.default(
|
|
214223
214661
|
this.latestInput,
|
|
214224
214662
|
"Cannot be watching config without having first set an input"
|
|
214225
214663
|
);
|
|
@@ -214244,7 +214682,7 @@ var init_ConfigController = __esm({
|
|
|
214244
214682
|
}
|
|
214245
214683
|
patch(input2) {
|
|
214246
214684
|
logger2.debug("patching config");
|
|
214247
|
-
|
|
214685
|
+
assert39__default.default(
|
|
214248
214686
|
this.latestInput,
|
|
214249
214687
|
"Cannot call updateConfig without previously calling setConfig"
|
|
214250
214688
|
);
|
|
@@ -214436,7 +214874,7 @@ function maybeGetSourceMappingURL(sourcePath) {
|
|
|
214436
214874
|
return;
|
|
214437
214875
|
}
|
|
214438
214876
|
const sourceMappingURLMatch = source.substring(sourceMappingURLIndex).match(/^\/\/# sourceMappingURL=(.+)/);
|
|
214439
|
-
|
|
214877
|
+
assert39__default.default(sourceMappingURLMatch !== null);
|
|
214440
214878
|
const sourceMappingURLSpecifier = sourceMappingURLMatch[1];
|
|
214441
214879
|
const sourceURL = Url.pathToFileURL(sourcePath);
|
|
214442
214880
|
try {
|
|
@@ -214609,7 +215047,7 @@ var init_inspect = __esm({
|
|
|
214609
215047
|
init_open();
|
|
214610
215048
|
init_bundle_allowed_paths();
|
|
214611
215049
|
init_logger2();
|
|
214612
|
-
|
|
215050
|
+
init_sourcemap3();
|
|
214613
215051
|
mapConsoleAPIMessageTypeToConsoleMethod = {
|
|
214614
215052
|
log: "log",
|
|
214615
215053
|
debug: "debug",
|
|
@@ -214750,7 +215188,7 @@ var init_ProxyController = __esm({
|
|
|
214750
215188
|
init_miniflare();
|
|
214751
215189
|
init_https_options();
|
|
214752
215190
|
init_logger2();
|
|
214753
|
-
|
|
215191
|
+
init_sourcemap3();
|
|
214754
215192
|
init_is_bun();
|
|
214755
215193
|
init_BaseController();
|
|
214756
215194
|
init_events7();
|
|
@@ -214771,7 +215209,7 @@ var init_ProxyController = __esm({
|
|
|
214771
215209
|
if (this._torndown) {
|
|
214772
215210
|
return;
|
|
214773
215211
|
}
|
|
214774
|
-
|
|
215212
|
+
assert39__default.default(this.latestConfig !== void 0);
|
|
214775
215213
|
const cert = this.latestConfig.dev?.server?.secure || this.inspectorEnabled && this.latestConfig.dev?.inspector && this.latestConfig.dev?.inspector?.secure ? validateHttpsOptions(
|
|
214776
215214
|
this.latestConfig.dev.server?.httpsKeyPath,
|
|
214777
215215
|
this.latestConfig.dev.server?.httpsCertPath
|
|
@@ -214836,7 +215274,7 @@ var init_ProxyController = __esm({
|
|
|
214836
215274
|
handleStructuredLogs
|
|
214837
215275
|
};
|
|
214838
215276
|
if (this.inspectorEnabled) {
|
|
214839
|
-
|
|
215277
|
+
assert39__default.default(this.latestConfig.dev?.inspector);
|
|
214840
215278
|
proxyWorkerOptions.workers.push({
|
|
214841
215279
|
name: "InspectorProxyWorker",
|
|
214842
215280
|
compatibilityDate: "2023-12-18",
|
|
@@ -214903,7 +215341,7 @@ var init_ProxyController = __esm({
|
|
|
214903
215341
|
inspectorUrl
|
|
214904
215342
|
]);
|
|
214905
215343
|
}).then(([url4, inspectorUrl]) => {
|
|
214906
|
-
|
|
215344
|
+
assert39__default.default(url4);
|
|
214907
215345
|
this.emitReadyEvent(proxyWorker, url4, inspectorUrl);
|
|
214908
215346
|
}).catch((error64) => {
|
|
214909
215347
|
if (this._torndown) {
|
|
@@ -214920,7 +215358,7 @@ var init_ProxyController = __esm({
|
|
|
214920
215358
|
if (this._torndown) {
|
|
214921
215359
|
return;
|
|
214922
215360
|
}
|
|
214923
|
-
|
|
215361
|
+
assert39__default.default(
|
|
214924
215362
|
this.latestConfig?.dev.inspector !== false,
|
|
214925
215363
|
"Trying to reconnect with inspector proxy worker when inspector is disabled"
|
|
214926
215364
|
);
|
|
@@ -214931,7 +215369,7 @@ var init_ProxyController = __esm({
|
|
|
214931
215369
|
this.inspectorProxyWorkerWebSocket = createDeferred();
|
|
214932
215370
|
let webSocket = null;
|
|
214933
215371
|
try {
|
|
214934
|
-
|
|
215372
|
+
assert39__default.default(this.proxyWorker);
|
|
214935
215373
|
const inspectorProxyWorkerUrl = await this.proxyWorker.unsafeGetDirectURL(
|
|
214936
215374
|
"InspectorProxyWorker"
|
|
214937
215375
|
);
|
|
@@ -214951,12 +215389,12 @@ var init_ProxyController = __esm({
|
|
|
214951
215389
|
this.emitErrorEvent("Could not connect to InspectorProxyWorker", error64);
|
|
214952
215390
|
return;
|
|
214953
215391
|
}
|
|
214954
|
-
|
|
215392
|
+
assert39__default.default(
|
|
214955
215393
|
webSocket,
|
|
214956
215394
|
"Expected webSocket on response from inspectorProxyWorker"
|
|
214957
215395
|
);
|
|
214958
215396
|
webSocket.addEventListener("message", (event) => {
|
|
214959
|
-
|
|
215397
|
+
assert39__default.default(typeof event.data === "string");
|
|
214960
215398
|
this.onInspectorProxyWorkerMessage(JSON.parse(event.data));
|
|
214961
215399
|
});
|
|
214962
215400
|
webSocket.addEventListener("close", () => {
|
|
@@ -215011,13 +215449,13 @@ var init_ProxyController = __esm({
|
|
|
215011
215449
|
if (this._torndown) {
|
|
215012
215450
|
return;
|
|
215013
215451
|
}
|
|
215014
|
-
|
|
215452
|
+
assert39__default.default(
|
|
215015
215453
|
this.latestConfig?.dev.inspector !== false,
|
|
215016
215454
|
"Trying to send message to inspector proxy worker when inspector is disabled"
|
|
215017
215455
|
);
|
|
215018
215456
|
try {
|
|
215019
215457
|
const websocket = await this.reconnectInspectorProxyWorker();
|
|
215020
|
-
|
|
215458
|
+
assert39__default.default(websocket);
|
|
215021
215459
|
websocket.send(JSON.stringify(message));
|
|
215022
215460
|
} catch (cause) {
|
|
215023
215461
|
if (this._torndown) {
|
|
@@ -215097,7 +215535,7 @@ var init_ProxyController = __esm({
|
|
|
215097
215535
|
}
|
|
215098
215536
|
}
|
|
215099
215537
|
onInspectorProxyWorkerMessage(message) {
|
|
215100
|
-
|
|
215538
|
+
assert39__default.default(
|
|
215101
215539
|
this.latestConfig?.dev.inspector !== false,
|
|
215102
215540
|
"Trying to handle inspector message when inspector is disabled"
|
|
215103
215541
|
);
|
|
@@ -215127,7 +215565,7 @@ var init_ProxyController = __esm({
|
|
|
215127
215565
|
}
|
|
215128
215566
|
}
|
|
215129
215567
|
async onInspectorProxyWorkerRequest(message) {
|
|
215130
|
-
|
|
215568
|
+
assert39__default.default(
|
|
215131
215569
|
this.latestConfig?.dev.inspector !== false,
|
|
215132
215570
|
"Trying to handle inspector request when inspector is disabled"
|
|
215133
215571
|
);
|
|
@@ -215148,8 +215586,8 @@ var init_ProxyController = __esm({
|
|
|
215148
215586
|
logger2.debug("[InspectorProxyWorker]", ...message.args);
|
|
215149
215587
|
break;
|
|
215150
215588
|
case "load-network-resource": {
|
|
215151
|
-
|
|
215152
|
-
|
|
215589
|
+
assert39__default.default(this.latestConfig !== void 0);
|
|
215590
|
+
assert39__default.default(this.latestBundle !== void 0);
|
|
215153
215591
|
let maybeContents;
|
|
215154
215592
|
if (message.url.startsWith("wrangler-file:")) {
|
|
215155
215593
|
maybeContents = maybeHandleNetworkLoadResource(
|
|
@@ -221194,7 +221632,7 @@ async function getKVNamespaceId({ namespace, preview: preview2, binding, "namesp
|
|
|
221194
221632
|
return { namespaceId: nsId, displayName: formatDisplayName(nsId) };
|
|
221195
221633
|
} else if (previewIsDefined) {
|
|
221196
221634
|
if (getFlag("RESOURCES_PROVISION")) {
|
|
221197
|
-
|
|
221635
|
+
assert39__default.default(binding);
|
|
221198
221636
|
const nsId = await getIdFromSettings(config2, binding, isLocal2);
|
|
221199
221637
|
return { namespaceId: nsId, displayName: formatDisplayName(nsId) };
|
|
221200
221638
|
}
|
|
@@ -221206,10 +221644,10 @@ async function getKVNamespaceId({ namespace, preview: preview2, binding, "namesp
|
|
|
221206
221644
|
const bindingHasOnlyOneId = configNamespace.id && !configNamespace.preview_id || !configNamespace.id && configNamespace.preview_id;
|
|
221207
221645
|
if (bindingHasOnlyOneId) {
|
|
221208
221646
|
const nsId = configNamespace.id || configNamespace.preview_id;
|
|
221209
|
-
|
|
221647
|
+
assert39__default.default(nsId);
|
|
221210
221648
|
return { namespaceId: nsId, displayName: formatDisplayName(nsId) };
|
|
221211
221649
|
} else if (getFlag("RESOURCES_PROVISION") && !configNamespace.id && !configNamespace.preview_id) {
|
|
221212
|
-
|
|
221650
|
+
assert39__default.default(binding);
|
|
221213
221651
|
const nsId = await getIdFromSettings(config2, binding, isLocal2);
|
|
221214
221652
|
return { namespaceId: nsId, displayName: formatDisplayName(nsId) };
|
|
221215
221653
|
} else {
|
|
@@ -221333,7 +221771,7 @@ async function syncWorkersSite(complianceConfig, accountId, scriptName, siteAsse
|
|
|
221333
221771
|
logger2.log("(Note: doing a dry run, not uploading or deleting anything.)");
|
|
221334
221772
|
return { manifest: void 0, namespace: void 0 };
|
|
221335
221773
|
}
|
|
221336
|
-
|
|
221774
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
221337
221775
|
const title = `__${scriptName}-workers_sites_assets${preview2 ? "_preview" : ""}`;
|
|
221338
221776
|
const { id: namespace } = await createKVNamespaceIfNotAlreadyExisting(
|
|
221339
221777
|
complianceConfig,
|
|
@@ -222636,7 +223074,7 @@ async function listDeploymentsAndChoose(deployments, args = {}) {
|
|
|
222636
223074
|
label: "deployment"
|
|
222637
223075
|
});
|
|
222638
223076
|
const chosenDeployment = deployments.find((d9) => d9.id === deployment);
|
|
222639
|
-
|
|
223077
|
+
assert39__default.default(chosenDeployment);
|
|
222640
223078
|
return chosenDeployment;
|
|
222641
223079
|
}
|
|
222642
223080
|
async function pickDeployment(deploymentIdPrefix) {
|
|
@@ -223249,7 +223687,7 @@ async function getLocation2(args, options = {}) {
|
|
|
223249
223687
|
const pops = locationToPops[location];
|
|
223250
223688
|
if (pops.length === 1) {
|
|
223251
223689
|
const pop = pops.pop();
|
|
223252
|
-
|
|
223690
|
+
assert39__default.default(pop);
|
|
223253
223691
|
return pop.location;
|
|
223254
223692
|
}
|
|
223255
223693
|
const chosenPop = await inputPrompt({
|
|
@@ -226702,7 +227140,7 @@ var init_t_DYl0qC9V = __esm({
|
|
|
226702
227140
|
this.complete(n10);
|
|
226703
227141
|
}
|
|
226704
227142
|
setup(a8, o8, s8) {
|
|
226705
|
-
switch (
|
|
227143
|
+
switch (assert39__default.default(s8 === `zsh` || s8 === `bash` || s8 === `fish` || s8 === `powershell`, `Unsupported shell`), s8) {
|
|
226706
227144
|
case `zsh`: {
|
|
226707
227145
|
let e11 = t5(a8, o8);
|
|
226708
227146
|
console.log(e11);
|
|
@@ -238869,323 +239307,6 @@ var require_md5_file = __commonJS({
|
|
|
238869
239307
|
module2.exports.sync = md5FileSync;
|
|
238870
239308
|
}
|
|
238871
239309
|
});
|
|
238872
|
-
|
|
238873
|
-
// src/d1/trimmer.ts
|
|
238874
|
-
function trimSqlQuery(sql) {
|
|
238875
|
-
if (!mayContainTransaction(sql)) {
|
|
238876
|
-
return sql;
|
|
238877
|
-
}
|
|
238878
|
-
const trimmedSql = sql.replace("BEGIN TRANSACTION;", "").replace("COMMIT;", "");
|
|
238879
|
-
if (mayContainTransaction(trimmedSql)) {
|
|
238880
|
-
throw new UserError(
|
|
238881
|
-
"Wrangler could not process the provided SQL file, as it contains several transactions.\nD1 runs your SQL in a transaction for you.\nPlease export an SQL file from your SQLite database and try again.",
|
|
238882
|
-
{
|
|
238883
|
-
telemetryMessage: "d1 execute sql file contains multiple transactions"
|
|
238884
|
-
}
|
|
238885
|
-
);
|
|
238886
|
-
}
|
|
238887
|
-
return trimmedSql;
|
|
238888
|
-
}
|
|
238889
|
-
function mayContainTransaction(sql) {
|
|
238890
|
-
return sql.includes("BEGIN TRANSACTION");
|
|
238891
|
-
}
|
|
238892
|
-
var init_trimmer = __esm({
|
|
238893
|
-
"src/d1/trimmer.ts"() {
|
|
238894
|
-
init_import_meta_url();
|
|
238895
|
-
init_src();
|
|
238896
|
-
__name(trimSqlQuery, "trimSqlQuery");
|
|
238897
|
-
__name(mayContainTransaction, "mayContainTransaction");
|
|
238898
|
-
}
|
|
238899
|
-
});
|
|
238900
|
-
|
|
238901
|
-
// src/d1/splitter.ts
|
|
238902
|
-
function mayContainMultipleStatements(sql) {
|
|
238903
|
-
const trimmed = sql.trimEnd();
|
|
238904
|
-
const semiColonIndex = trimmed.indexOf(";");
|
|
238905
|
-
return semiColonIndex !== -1 && semiColonIndex !== trimmed.length - 1;
|
|
238906
|
-
}
|
|
238907
|
-
function splitSqlQuery(sql) {
|
|
238908
|
-
const trimmedSql = trimSqlQuery(sql);
|
|
238909
|
-
if (!mayContainMultipleStatements(trimmedSql)) {
|
|
238910
|
-
return [trimmedSql];
|
|
238911
|
-
}
|
|
238912
|
-
const split = splitSqlIntoStatements(trimmedSql);
|
|
238913
|
-
if (split.length === 0) {
|
|
238914
|
-
return [trimmedSql];
|
|
238915
|
-
} else {
|
|
238916
|
-
return split;
|
|
238917
|
-
}
|
|
238918
|
-
}
|
|
238919
|
-
function normalizeSqlLineEndings(sql) {
|
|
238920
|
-
let normalized = "";
|
|
238921
|
-
let quoteEnd;
|
|
238922
|
-
let inLineComment = false;
|
|
238923
|
-
let inBlockComment = false;
|
|
238924
|
-
for (let index = 0; index < sql.length; index++) {
|
|
238925
|
-
const char = sql[index];
|
|
238926
|
-
const nextChar = sql[index + 1];
|
|
238927
|
-
if (quoteEnd !== void 0) {
|
|
238928
|
-
normalized += char;
|
|
238929
|
-
if (char === quoteEnd) {
|
|
238930
|
-
if (nextChar === quoteEnd) {
|
|
238931
|
-
normalized += nextChar;
|
|
238932
|
-
index++;
|
|
238933
|
-
} else {
|
|
238934
|
-
quoteEnd = void 0;
|
|
238935
|
-
}
|
|
238936
|
-
}
|
|
238937
|
-
continue;
|
|
238938
|
-
}
|
|
238939
|
-
if (inLineComment) {
|
|
238940
|
-
if (char === "\r" && nextChar === "\n") {
|
|
238941
|
-
normalized += "\n";
|
|
238942
|
-
index++;
|
|
238943
|
-
inLineComment = false;
|
|
238944
|
-
} else {
|
|
238945
|
-
normalized += char;
|
|
238946
|
-
inLineComment = char !== "\n";
|
|
238947
|
-
}
|
|
238948
|
-
continue;
|
|
238949
|
-
}
|
|
238950
|
-
if (inBlockComment) {
|
|
238951
|
-
if (char === "\r" && nextChar === "\n") {
|
|
238952
|
-
normalized += "\n";
|
|
238953
|
-
index++;
|
|
238954
|
-
} else {
|
|
238955
|
-
normalized += char;
|
|
238956
|
-
if (char === "*" && nextChar === "/") {
|
|
238957
|
-
normalized += nextChar;
|
|
238958
|
-
index++;
|
|
238959
|
-
inBlockComment = false;
|
|
238960
|
-
}
|
|
238961
|
-
}
|
|
238962
|
-
continue;
|
|
238963
|
-
}
|
|
238964
|
-
if (char === "-" && nextChar === "-") {
|
|
238965
|
-
normalized += "--";
|
|
238966
|
-
index++;
|
|
238967
|
-
inLineComment = true;
|
|
238968
|
-
continue;
|
|
238969
|
-
}
|
|
238970
|
-
if (char === "/" && nextChar === "*") {
|
|
238971
|
-
normalized += "/*";
|
|
238972
|
-
index++;
|
|
238973
|
-
inBlockComment = true;
|
|
238974
|
-
continue;
|
|
238975
|
-
}
|
|
238976
|
-
if (char === "'" || char === '"' || char === "`") {
|
|
238977
|
-
normalized += char;
|
|
238978
|
-
quoteEnd = char;
|
|
238979
|
-
continue;
|
|
238980
|
-
}
|
|
238981
|
-
if (char === "[") {
|
|
238982
|
-
normalized += char;
|
|
238983
|
-
quoteEnd = "]";
|
|
238984
|
-
continue;
|
|
238985
|
-
}
|
|
238986
|
-
if (char === "\r" && nextChar === "\n") {
|
|
238987
|
-
normalized += "\n";
|
|
238988
|
-
index++;
|
|
238989
|
-
continue;
|
|
238990
|
-
}
|
|
238991
|
-
normalized += char;
|
|
238992
|
-
}
|
|
238993
|
-
return normalized;
|
|
238994
|
-
}
|
|
238995
|
-
function splitSqlIntoStatements(sql) {
|
|
238996
|
-
const statements = [];
|
|
238997
|
-
let start = 0;
|
|
238998
|
-
while (start < sql.length) {
|
|
238999
|
-
const { end, hasUsefulToken } = findCompleteStatementEnd(sql, start);
|
|
239000
|
-
if (end === void 0) {
|
|
239001
|
-
if (hasUsefulToken) {
|
|
239002
|
-
statements.push(sql.slice(start).trim());
|
|
239003
|
-
}
|
|
239004
|
-
break;
|
|
239005
|
-
}
|
|
239006
|
-
const statement = sql.slice(start, end - 1).trim();
|
|
239007
|
-
if (hasUsefulToken && statement.length > 0) {
|
|
239008
|
-
statements.push(statement);
|
|
239009
|
-
}
|
|
239010
|
-
start = end;
|
|
239011
|
-
}
|
|
239012
|
-
return statements;
|
|
239013
|
-
}
|
|
239014
|
-
function findCompleteStatementEnd(sql, start) {
|
|
239015
|
-
let state3 = "INVALID";
|
|
239016
|
-
let hasUsefulToken = false;
|
|
239017
|
-
for (let index = start; index < sql.length; index++) {
|
|
239018
|
-
const char = sql[index];
|
|
239019
|
-
let token;
|
|
239020
|
-
if (char === ";") {
|
|
239021
|
-
token = "tkSEMI";
|
|
239022
|
-
} else if (char === " " || char === "\r" || char === " " || char === "\n" || char === "\f") {
|
|
239023
|
-
token = "tkWS";
|
|
239024
|
-
} else if (char === "/" && sql[index + 1] === "*") {
|
|
239025
|
-
const end = sql.indexOf("*/", index + 2);
|
|
239026
|
-
if (end === -1) {
|
|
239027
|
-
return { end: void 0, hasUsefulToken };
|
|
239028
|
-
}
|
|
239029
|
-
index = end + 1;
|
|
239030
|
-
token = "tkWS";
|
|
239031
|
-
} else if (char === "-" && sql[index + 1] === "-") {
|
|
239032
|
-
const end = sql.indexOf("\n", index + 2);
|
|
239033
|
-
if (end === -1) {
|
|
239034
|
-
return { end: void 0, hasUsefulToken };
|
|
239035
|
-
}
|
|
239036
|
-
index = end;
|
|
239037
|
-
token = "tkWS";
|
|
239038
|
-
} else if (char === "[") {
|
|
239039
|
-
const end = sql.indexOf("]", index + 1);
|
|
239040
|
-
if (end === -1) {
|
|
239041
|
-
return { end: void 0, hasUsefulToken: true };
|
|
239042
|
-
}
|
|
239043
|
-
index = end;
|
|
239044
|
-
token = "tkOTHER";
|
|
239045
|
-
} else if (char === "'" || char === '"' || char === "`") {
|
|
239046
|
-
const end = sql.indexOf(char, index + 1);
|
|
239047
|
-
if (end === -1) {
|
|
239048
|
-
return { end: void 0, hasUsefulToken: true };
|
|
239049
|
-
}
|
|
239050
|
-
index = end;
|
|
239051
|
-
token = "tkOTHER";
|
|
239052
|
-
} else if (isIdentifierChar(char)) {
|
|
239053
|
-
const identifierStart = index;
|
|
239054
|
-
while (index + 1 < sql.length && isIdentifierChar(sql[index + 1])) {
|
|
239055
|
-
index++;
|
|
239056
|
-
}
|
|
239057
|
-
token = classifyIdentifier(sql.slice(identifierStart, index + 1));
|
|
239058
|
-
} else {
|
|
239059
|
-
token = "tkOTHER";
|
|
239060
|
-
}
|
|
239061
|
-
hasUsefulToken ||= token !== "tkSEMI" && token !== "tkWS";
|
|
239062
|
-
state3 = getNextState(state3, token);
|
|
239063
|
-
if (state3 === "START") {
|
|
239064
|
-
return { end: index + 1, hasUsefulToken };
|
|
239065
|
-
}
|
|
239066
|
-
}
|
|
239067
|
-
return { end: void 0, hasUsefulToken };
|
|
239068
|
-
}
|
|
239069
|
-
function getNextState(state3, token) {
|
|
239070
|
-
return transitions[state3][token];
|
|
239071
|
-
}
|
|
239072
|
-
function isIdentifierChar(char) {
|
|
239073
|
-
return /[A-Za-z0-9_$\u0080-\uffff]/.test(char);
|
|
239074
|
-
}
|
|
239075
|
-
function classifyIdentifier(identifier) {
|
|
239076
|
-
switch (identifier.toLowerCase()) {
|
|
239077
|
-
case "explain":
|
|
239078
|
-
return "tkEXPLAIN";
|
|
239079
|
-
case "create":
|
|
239080
|
-
return "tkCREATE";
|
|
239081
|
-
case "temp":
|
|
239082
|
-
case "temporary":
|
|
239083
|
-
return "tkTEMP";
|
|
239084
|
-
case "trigger":
|
|
239085
|
-
return "tkTRIGGER";
|
|
239086
|
-
case "end":
|
|
239087
|
-
return "tkEND";
|
|
239088
|
-
default:
|
|
239089
|
-
return "tkOTHER";
|
|
239090
|
-
}
|
|
239091
|
-
}
|
|
239092
|
-
var transitions;
|
|
239093
|
-
var init_splitter = __esm({
|
|
239094
|
-
"src/d1/splitter.ts"() {
|
|
239095
|
-
init_import_meta_url();
|
|
239096
|
-
init_trimmer();
|
|
239097
|
-
__name(mayContainMultipleStatements, "mayContainMultipleStatements");
|
|
239098
|
-
__name(splitSqlQuery, "splitSqlQuery");
|
|
239099
|
-
__name(normalizeSqlLineEndings, "normalizeSqlLineEndings");
|
|
239100
|
-
__name(splitSqlIntoStatements, "splitSqlIntoStatements");
|
|
239101
|
-
transitions = {
|
|
239102
|
-
INVALID: {
|
|
239103
|
-
tkSEMI: "START",
|
|
239104
|
-
tkWS: "INVALID",
|
|
239105
|
-
tkOTHER: "NORMAL",
|
|
239106
|
-
tkEXPLAIN: "EXPLAIN",
|
|
239107
|
-
tkCREATE: "CREATE",
|
|
239108
|
-
tkTEMP: "NORMAL",
|
|
239109
|
-
tkTRIGGER: "NORMAL",
|
|
239110
|
-
tkEND: "NORMAL"
|
|
239111
|
-
},
|
|
239112
|
-
START: {
|
|
239113
|
-
tkSEMI: "START",
|
|
239114
|
-
tkWS: "START",
|
|
239115
|
-
tkOTHER: "NORMAL",
|
|
239116
|
-
tkEXPLAIN: "EXPLAIN",
|
|
239117
|
-
tkCREATE: "CREATE",
|
|
239118
|
-
tkTEMP: "NORMAL",
|
|
239119
|
-
tkTRIGGER: "NORMAL",
|
|
239120
|
-
tkEND: "NORMAL"
|
|
239121
|
-
},
|
|
239122
|
-
NORMAL: {
|
|
239123
|
-
tkSEMI: "START",
|
|
239124
|
-
tkWS: "NORMAL",
|
|
239125
|
-
tkOTHER: "NORMAL",
|
|
239126
|
-
tkEXPLAIN: "NORMAL",
|
|
239127
|
-
tkCREATE: "NORMAL",
|
|
239128
|
-
tkTEMP: "NORMAL",
|
|
239129
|
-
tkTRIGGER: "NORMAL",
|
|
239130
|
-
tkEND: "NORMAL"
|
|
239131
|
-
},
|
|
239132
|
-
EXPLAIN: {
|
|
239133
|
-
tkSEMI: "START",
|
|
239134
|
-
tkWS: "EXPLAIN",
|
|
239135
|
-
tkOTHER: "EXPLAIN",
|
|
239136
|
-
tkEXPLAIN: "NORMAL",
|
|
239137
|
-
tkCREATE: "CREATE",
|
|
239138
|
-
tkTEMP: "NORMAL",
|
|
239139
|
-
tkTRIGGER: "NORMAL",
|
|
239140
|
-
tkEND: "NORMAL"
|
|
239141
|
-
},
|
|
239142
|
-
CREATE: {
|
|
239143
|
-
tkSEMI: "START",
|
|
239144
|
-
tkWS: "CREATE",
|
|
239145
|
-
tkOTHER: "NORMAL",
|
|
239146
|
-
tkEXPLAIN: "NORMAL",
|
|
239147
|
-
tkCREATE: "NORMAL",
|
|
239148
|
-
tkTEMP: "CREATE",
|
|
239149
|
-
tkTRIGGER: "TRIGGER",
|
|
239150
|
-
tkEND: "NORMAL"
|
|
239151
|
-
},
|
|
239152
|
-
TRIGGER: {
|
|
239153
|
-
tkSEMI: "SEMI",
|
|
239154
|
-
tkWS: "TRIGGER",
|
|
239155
|
-
tkOTHER: "TRIGGER",
|
|
239156
|
-
tkEXPLAIN: "TRIGGER",
|
|
239157
|
-
tkCREATE: "TRIGGER",
|
|
239158
|
-
tkTEMP: "TRIGGER",
|
|
239159
|
-
tkTRIGGER: "TRIGGER",
|
|
239160
|
-
tkEND: "TRIGGER"
|
|
239161
|
-
},
|
|
239162
|
-
SEMI: {
|
|
239163
|
-
tkSEMI: "SEMI",
|
|
239164
|
-
tkWS: "SEMI",
|
|
239165
|
-
tkOTHER: "TRIGGER",
|
|
239166
|
-
tkEXPLAIN: "TRIGGER",
|
|
239167
|
-
tkCREATE: "TRIGGER",
|
|
239168
|
-
tkTEMP: "TRIGGER",
|
|
239169
|
-
tkTRIGGER: "TRIGGER",
|
|
239170
|
-
tkEND: "END"
|
|
239171
|
-
},
|
|
239172
|
-
END: {
|
|
239173
|
-
tkSEMI: "START",
|
|
239174
|
-
tkWS: "END",
|
|
239175
|
-
tkOTHER: "TRIGGER",
|
|
239176
|
-
tkEXPLAIN: "TRIGGER",
|
|
239177
|
-
tkCREATE: "TRIGGER",
|
|
239178
|
-
tkTEMP: "TRIGGER",
|
|
239179
|
-
tkTRIGGER: "TRIGGER",
|
|
239180
|
-
tkEND: "TRIGGER"
|
|
239181
|
-
}
|
|
239182
|
-
};
|
|
239183
|
-
__name(findCompleteStatementEnd, "findCompleteStatementEnd");
|
|
239184
|
-
__name(getNextState, "getNextState");
|
|
239185
|
-
__name(isIdentifierChar, "isIdentifierChar");
|
|
239186
|
-
__name(classifyIdentifier, "classifyIdentifier");
|
|
239187
|
-
}
|
|
239188
|
-
});
|
|
239189
239310
|
async function executeSql({
|
|
239190
239311
|
local,
|
|
239191
239312
|
remote,
|
|
@@ -239304,7 +239425,7 @@ async function executeLocally({
|
|
|
239304
239425
|
} finally {
|
|
239305
239426
|
await mf.dispose();
|
|
239306
239427
|
}
|
|
239307
|
-
|
|
239428
|
+
assert39__default.default(Array.isArray(results));
|
|
239308
239429
|
const allResults = results.map((result) => ({
|
|
239309
239430
|
results: (result.results ?? []).map(
|
|
239310
239431
|
(row) => Object.fromEntries(
|
|
@@ -239587,7 +239708,6 @@ var init_execute = __esm({
|
|
|
239587
239708
|
init_logger2();
|
|
239588
239709
|
init_paths();
|
|
239589
239710
|
init_user3();
|
|
239590
|
-
init_splitter();
|
|
239591
239711
|
init_utils8();
|
|
239592
239712
|
d1ExecuteCommand = createCommand({
|
|
239593
239713
|
metadata: {
|
|
@@ -241678,7 +241798,7 @@ var init_delete6 = __esm({
|
|
|
241678
241798
|
logger2.log(`--dry-run: exiting now.`);
|
|
241679
241799
|
return;
|
|
241680
241800
|
}
|
|
241681
|
-
|
|
241801
|
+
assert39__default.default(accountId, "Missing accountId");
|
|
241682
241802
|
const confirmed = args.force || await confirm2(
|
|
241683
241803
|
`Are you sure you want to delete ${scriptName}? This action cannot be undone.`
|
|
241684
241804
|
);
|
|
@@ -253062,13 +253182,13 @@ var require_esprima2 = __commonJS({
|
|
|
253062
253182
|
/***/
|
|
253063
253183
|
function(module3, exports3) {
|
|
253064
253184
|
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
253065
|
-
function
|
|
253185
|
+
function assert72(condition, message) {
|
|
253066
253186
|
if (!condition) {
|
|
253067
253187
|
throw new Error("ASSERT: " + message);
|
|
253068
253188
|
}
|
|
253069
253189
|
}
|
|
253070
|
-
__name(
|
|
253071
|
-
exports3.assert =
|
|
253190
|
+
__name(assert72, "assert");
|
|
253191
|
+
exports3.assert = assert72;
|
|
253072
253192
|
},
|
|
253073
253193
|
/* 10 */
|
|
253074
253194
|
/***/
|
|
@@ -266789,12 +266909,12 @@ var require_lib5 = __commonJS({
|
|
|
266789
266909
|
return x7;
|
|
266790
266910
|
}
|
|
266791
266911
|
__name(nonNull, "nonNull");
|
|
266792
|
-
function
|
|
266912
|
+
function assert72(x7) {
|
|
266793
266913
|
if (!x7) {
|
|
266794
266914
|
throw new Error("Assert fail");
|
|
266795
266915
|
}
|
|
266796
266916
|
}
|
|
266797
|
-
__name(
|
|
266917
|
+
__name(assert72, "assert");
|
|
266798
266918
|
var TSErrors = ParseErrorEnum`typescript`({
|
|
266799
266919
|
AbstractMethodHasImplementation: /* @__PURE__ */ __name(({
|
|
266800
266920
|
methodName
|
|
@@ -267822,7 +267942,7 @@ var require_lib5 = __commonJS({
|
|
|
267822
267942
|
return this.finishNode(t14, "TSTypeAnnotation");
|
|
267823
267943
|
}
|
|
267824
267944
|
tsParseType() {
|
|
267825
|
-
|
|
267945
|
+
assert72(this.state.inType);
|
|
267826
267946
|
const type = this.tsParseNonConditionalType();
|
|
267827
267947
|
if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) {
|
|
267828
267948
|
return type;
|
|
@@ -268870,7 +268990,7 @@ var require_lib5 = __commonJS({
|
|
|
268870
268990
|
return arrow.node;
|
|
268871
268991
|
}
|
|
268872
268992
|
if (!jsx2) {
|
|
268873
|
-
|
|
268993
|
+
assert72(!this.hasPlugin("jsx"));
|
|
268874
268994
|
typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state3);
|
|
268875
268995
|
if (!typeCast.error) return typeCast.node;
|
|
268876
268996
|
}
|
|
@@ -273625,7 +273745,7 @@ var init_framework_class = __esm({
|
|
|
273625
273745
|
supportsMode = false;
|
|
273626
273746
|
#frameworkVersion;
|
|
273627
273747
|
get frameworkVersion() {
|
|
273628
|
-
|
|
273748
|
+
assert39__default.default(
|
|
273629
273749
|
this.#frameworkVersion,
|
|
273630
273750
|
`The version for ${JSON.stringify(this.name)} is unexpectedly missing`
|
|
273631
273751
|
);
|
|
@@ -273657,7 +273777,7 @@ var init_framework_class = __esm({
|
|
|
273657
273777
|
frameworkPackageInfo.name,
|
|
273658
273778
|
projectPath
|
|
273659
273779
|
);
|
|
273660
|
-
|
|
273780
|
+
assert39__default.default(
|
|
273661
273781
|
frameworkVersion,
|
|
273662
273782
|
`Unable to detect the version of the \`${frameworkPackageInfo.name}\` package`
|
|
273663
273783
|
);
|
|
@@ -274486,7 +274606,7 @@ var init_packages3 = __esm({
|
|
|
274486
274606
|
const pkgJsonPath = path29__namespace.default.join(cwd2, "package.json");
|
|
274487
274607
|
const pkgJson = parsePackageJSON(readFileSync(pkgJsonPath), pkgJsonPath);
|
|
274488
274608
|
const deps = config2.dev ? pkgJson.devDependencies : pkgJson.dependencies;
|
|
274489
|
-
|
|
274609
|
+
assert39__default.default(deps, "dependencies should be defined");
|
|
274490
274610
|
for (const pkg of packages) {
|
|
274491
274611
|
const versionMarker = pkg.lastIndexOf("@");
|
|
274492
274612
|
if (versionMarker > 0) {
|
|
@@ -274513,7 +274633,7 @@ async function updateAngularJson(projectName, angularJson, frameworkVersion) {
|
|
|
274513
274633
|
const architectSection = angularJson.projects[projectName].architect;
|
|
274514
274634
|
architectSection.build.options.outputPath = "dist";
|
|
274515
274635
|
architectSection.build.options.outputMode = "server";
|
|
274516
|
-
|
|
274636
|
+
assert39__default.default(architectSection.build.options.ssr);
|
|
274517
274637
|
if (typeof architectSection.build.options.ssr === "boolean") {
|
|
274518
274638
|
architectSection.build.options.ssr = {};
|
|
274519
274639
|
}
|
|
@@ -275502,13 +275622,13 @@ function transformReactRouterConfig(projectPath, viteEnvironmentKey) {
|
|
|
275502
275622
|
}`
|
|
275503
275623
|
);
|
|
275504
275624
|
}
|
|
275505
|
-
|
|
275625
|
+
assert39__default.default(node3.type === "ObjectExpression");
|
|
275506
275626
|
const futureKey = node3.properties.findIndex(
|
|
275507
275627
|
(p8) => p8.type === "ObjectProperty" && p8.key.type === "Identifier" && p8.key.name === "future" && p8.value.type === "ObjectExpression"
|
|
275508
275628
|
);
|
|
275509
275629
|
if (futureKey !== -1) {
|
|
275510
275630
|
const future = node3.properties[futureKey];
|
|
275511
|
-
|
|
275631
|
+
assert39__default.default(
|
|
275512
275632
|
future.type === "ObjectProperty" && future.value.type === "ObjectExpression"
|
|
275513
275633
|
);
|
|
275514
275634
|
const viteEnvironment = future.value.properties.findIndex(
|
|
@@ -275516,7 +275636,7 @@ function transformReactRouterConfig(projectPath, viteEnvironmentKey) {
|
|
|
275516
275636
|
);
|
|
275517
275637
|
if (viteEnvironment !== -1) {
|
|
275518
275638
|
const prop = future.value.properties[viteEnvironment];
|
|
275519
|
-
|
|
275639
|
+
assert39__default.default(
|
|
275520
275640
|
prop.type === "ObjectProperty" && prop.value.type === "BooleanLiteral"
|
|
275521
275641
|
);
|
|
275522
275642
|
prop.value.value = true;
|
|
@@ -276050,7 +276170,7 @@ function addVikePhotonToVikeConfigExportObject(n10, programNode) {
|
|
|
276050
276170
|
);
|
|
276051
276171
|
configObject.properties.push(configTargetProp);
|
|
276052
276172
|
}
|
|
276053
|
-
|
|
276173
|
+
assert39__default.default(configTargetProp && t7.ArrayExpression.check(configTargetProp.value));
|
|
276054
276174
|
const vikePhotonLocalName = getVikePhotonImportLocalName(programNode) ?? "vikePhoton";
|
|
276055
276175
|
if (!configTargetProp.value.elements.some(
|
|
276056
276176
|
(el) => el?.type === "Identifier" && el.name === vikePhotonLocalName
|
|
@@ -276342,15 +276462,15 @@ async function updateWakuConfig(projectPath) {
|
|
|
276342
276462
|
return this.traverse(n10);
|
|
276343
276463
|
}
|
|
276344
276464
|
const config2 = n10.node.arguments[0];
|
|
276345
|
-
|
|
276465
|
+
assert39__default.default(t8.ObjectExpression.check(config2));
|
|
276346
276466
|
const viteConfig = config2.properties.find(
|
|
276347
276467
|
(prop) => isViteProp(prop)
|
|
276348
276468
|
)?.value;
|
|
276349
|
-
|
|
276469
|
+
assert39__default.default(t8.ObjectExpression.check(viteConfig));
|
|
276350
276470
|
const pluginsProp = viteConfig.properties.find(
|
|
276351
276471
|
(prop) => isPluginsProp2(prop)
|
|
276352
276472
|
);
|
|
276353
|
-
|
|
276473
|
+
assert39__default.default(pluginsProp && t8.ArrayExpression.check(pluginsProp.value));
|
|
276354
276474
|
if (!pluginsProp.value.elements.some(
|
|
276355
276475
|
(el) => el?.type === "CallExpression" && el.callee.type === "Identifier" && el.callee.name === "cloudflare"
|
|
276356
276476
|
)) {
|
|
@@ -276682,13 +276802,13 @@ function getFrameworkPackageInfo(frameworkId, target) {
|
|
|
276682
276802
|
const targetedFramework = getAllKnownFrameworks(target).find(
|
|
276683
276803
|
(framework) => framework.id === frameworkId
|
|
276684
276804
|
);
|
|
276685
|
-
|
|
276805
|
+
assert39__default.default(
|
|
276686
276806
|
targetedFramework,
|
|
276687
276807
|
`Could not determine framework package info for ${JSON.stringify(
|
|
276688
276808
|
frameworkId
|
|
276689
276809
|
)}`
|
|
276690
276810
|
);
|
|
276691
|
-
|
|
276811
|
+
assert39__default.default(
|
|
276692
276812
|
targetedFramework.supported,
|
|
276693
276813
|
`Framework unexpectedly not supported ${JSON.stringify(frameworkId)}`
|
|
276694
276814
|
);
|
|
@@ -276758,7 +276878,7 @@ function isFrameworkSupported(frameworkId, target = "cf") {
|
|
|
276758
276878
|
const targetedFramework = getAllFrameworksInfos(target).find(
|
|
276759
276879
|
(framework) => framework.id === frameworkId
|
|
276760
276880
|
);
|
|
276761
|
-
|
|
276881
|
+
assert39__default.default(
|
|
276762
276882
|
targetedFramework,
|
|
276763
276883
|
`Unexpected unknown framework id: ${JSON.stringify(frameworkId)}`
|
|
276764
276884
|
);
|
|
@@ -296456,7 +296576,7 @@ var init_framework_detection = __esm({
|
|
|
296456
296576
|
}
|
|
296457
296577
|
});
|
|
296458
296578
|
function assertNonConfigured(details) {
|
|
296459
|
-
|
|
296579
|
+
assert39__default.default(
|
|
296460
296580
|
details.configured === false,
|
|
296461
296581
|
"Error: expected the current project not to be already configured"
|
|
296462
296582
|
);
|
|
@@ -296910,7 +297030,7 @@ async function runAutoConfig(autoConfigDetails, autoConfigOptions) {
|
|
|
296910
297030
|
);
|
|
296911
297031
|
}
|
|
296912
297032
|
}
|
|
296913
|
-
|
|
297033
|
+
assert39__default.default(
|
|
296914
297034
|
autoConfigDetails.outputDir,
|
|
296915
297035
|
"The Output Directory is unexpectedly missing"
|
|
296916
297036
|
);
|
|
@@ -297786,7 +297906,7 @@ async function maybeDelegateToOpenNextDeployCommand(projectRoot) {
|
|
|
297786
297906
|
"OpenNext project detected, calling `opennextjs-cloudflare deploy`"
|
|
297787
297907
|
);
|
|
297788
297908
|
const deployArgIdx = process.argv.findIndex((arg) => arg === "deploy");
|
|
297789
|
-
|
|
297909
|
+
assert39__default.default(deployArgIdx !== -1, "Could not find `deploy` argument");
|
|
297790
297910
|
const deployArguments = process.argv.slice(deployArgIdx + 1);
|
|
297791
297911
|
const { npx } = await getPackageManager();
|
|
297792
297912
|
await runCommand2(
|
|
@@ -298287,8 +298407,8 @@ async function runSearch(searchTerm) {
|
|
|
298287
298407
|
hitsPerPage: "1",
|
|
298288
298408
|
getRankingInfo: "0"
|
|
298289
298409
|
});
|
|
298290
|
-
|
|
298291
|
-
|
|
298410
|
+
assert39__default.default(id, "Missing Algolia App ID");
|
|
298411
|
+
assert39__default.default(key, "Missing Algolia Key");
|
|
298292
298412
|
const searchResp = await (0, import_undici25.fetch)(
|
|
298293
298413
|
`https://${id}-dsn.algolia.net/1/indexes/${index}/query`,
|
|
298294
298414
|
{
|
|
@@ -303734,7 +303854,7 @@ function getOriginFromArgs(allowPartialOrigin, args) {
|
|
|
303734
303854
|
};
|
|
303735
303855
|
}
|
|
303736
303856
|
if (!allowPartialOrigin) {
|
|
303737
|
-
|
|
303857
|
+
assert39__default.default(args.originScheme, "Expected --origin-scheme to be set");
|
|
303738
303858
|
if (!args.database) {
|
|
303739
303859
|
throw new UserError(
|
|
303740
303860
|
"Missing required option --database. Specify the name of the database on the origin server, e.g. --database=mydb. Alternatively, use --connection-string to provide all origin details at once.",
|
|
@@ -305585,7 +305705,7 @@ This action is irreversible and will permanently delete all data in the KV names
|
|
|
305585
305705
|
}
|
|
305586
305706
|
namespaceId = namespace.id;
|
|
305587
305707
|
}
|
|
305588
|
-
|
|
305708
|
+
assert39.strict(namespaceId, "namespaceId should be defined");
|
|
305589
305709
|
logger2.log(`Renaming KV namespace ${namespaceId} to "${args.newName}".`);
|
|
305590
305710
|
const updatedNamespace = await updateKVNamespace(
|
|
305591
305711
|
config2,
|
|
@@ -305698,7 +305818,7 @@ This action is irreversible and will permanently delete all data in the KV names
|
|
|
305698
305818
|
localMode
|
|
305699
305819
|
);
|
|
305700
305820
|
const value = args.path ? readFileSyncToBuffer(args.path) : args.value;
|
|
305701
|
-
|
|
305821
|
+
assert39.strict(value);
|
|
305702
305822
|
const metadataLog = metadata3 ? ` with metadata "${JSON.stringify(metadata3)}"` : "";
|
|
305703
305823
|
if (args.path) {
|
|
305704
305824
|
logger2.log(
|
|
@@ -307404,7 +307524,7 @@ var init_build4 = __esm({
|
|
|
307404
307524
|
init_create_command();
|
|
307405
307525
|
init_bundle();
|
|
307406
307526
|
init_find_additional_modules();
|
|
307407
|
-
|
|
307527
|
+
init_node_compat3();
|
|
307408
307528
|
init_logger2();
|
|
307409
307529
|
init_metrics2();
|
|
307410
307530
|
init_navigator_user_agent();
|
|
@@ -308779,7 +308899,7 @@ var init_deploy4 = __esm({
|
|
|
308779
308899
|
init_cfetch2();
|
|
308780
308900
|
init_config6();
|
|
308781
308901
|
init_bundle();
|
|
308782
|
-
|
|
308902
|
+
init_node_compat3();
|
|
308783
308903
|
init_logger2();
|
|
308784
308904
|
init_navigator_user_agent();
|
|
308785
308905
|
init_buildFunctions();
|
|
@@ -311792,7 +311912,7 @@ var init_dev2 = __esm({
|
|
|
311792
311912
|
init_build_failures();
|
|
311793
311913
|
init_bundle();
|
|
311794
311914
|
init_alias_external();
|
|
311795
|
-
|
|
311915
|
+
init_node_compat3();
|
|
311796
311916
|
init_start_dev();
|
|
311797
311917
|
init_experimental_flags();
|
|
311798
311918
|
init_logger2();
|
|
@@ -361489,13 +361609,13 @@ ${ZERO_WIDTH_SPACE} Message: ${version7.annotations?.["workers/message"]
|
|
|
361489
361609
|
},
|
|
361490
361610
|
renderers: {
|
|
361491
361611
|
submit({ value: versionIds }) {
|
|
361492
|
-
|
|
361612
|
+
assert39__default.default(Array.isArray(versionIds));
|
|
361493
361613
|
const label = brandColor2(
|
|
361494
361614
|
`${versionIds.length} Worker Version(s) selected`
|
|
361495
361615
|
);
|
|
361496
361616
|
const versions2 = versionIds?.map((versionId, i8) => {
|
|
361497
361617
|
const version7 = versionCache.get(versionId);
|
|
361498
|
-
|
|
361618
|
+
assert39__default.default(version7);
|
|
361499
361619
|
return `${grayBar}
|
|
361500
361620
|
${leftT} ${white2(` Worker Version ${i8 + 1}: `, version7.id)}
|
|
361501
361621
|
${grayBar} ${gray(" Created: ", version7.metadata.created_on)}
|
|
@@ -362333,7 +362453,7 @@ var init_list32 = __esm({
|
|
|
362333
362453
|
const formattedDeployments = deployments.map((deployment) => {
|
|
362334
362454
|
const formattedVersions = deployment.versions.map((traffic) => {
|
|
362335
362455
|
const version7 = versionCache.get(traffic.version_id);
|
|
362336
|
-
|
|
362456
|
+
assert39__default.default(version7);
|
|
362337
362457
|
const percentage = brandColor2(`(${traffic.percentage}%)`);
|
|
362338
362458
|
const details = formatLabelledValues(
|
|
362339
362459
|
{
|
|
@@ -362442,7 +362562,7 @@ var init_status3 = __esm({
|
|
|
362442
362562
|
);
|
|
362443
362563
|
const formattedVersions = latestDeployment.versions.map((traffic) => {
|
|
362444
362564
|
const version7 = versionCache.get(traffic.version_id);
|
|
362445
|
-
|
|
362565
|
+
assert39__default.default(version7);
|
|
362446
362566
|
const percentage = brandColor2(`(${traffic.percentage}%)`);
|
|
362447
362567
|
const details = formatLabelledValues(
|
|
362448
362568
|
{
|
|
@@ -371251,7 +371371,7 @@ Error: ${errorMessage}
|
|
|
371251
371371
|
if (e11.cause instanceof ApiError) {
|
|
371252
371372
|
logger2.error(e11.cause);
|
|
371253
371373
|
} else {
|
|
371254
|
-
|
|
371374
|
+
assert39__default.default(isAuthenticationError2(e11));
|
|
371255
371375
|
logger2.error(e11);
|
|
371256
371376
|
}
|
|
371257
371377
|
const envAuth = getAuthFromEnv2();
|
|
@@ -371392,7 +371512,7 @@ var init_bundle_reporter2 = __esm({
|
|
|
371392
371512
|
}
|
|
371393
371513
|
});
|
|
371394
371514
|
function handlePreviewSessionUploadError2(err, accountId) {
|
|
371395
|
-
|
|
371515
|
+
assert39__default.default(err && typeof err === "object");
|
|
371396
371516
|
if (!isAbortError2(err)) {
|
|
371397
371517
|
if ("code" in err && err.code === 10049) {
|
|
371398
371518
|
logger2.log("Preview token expired, fetching a new one");
|
|
@@ -371404,7 +371524,7 @@ function handlePreviewSessionUploadError2(err, accountId) {
|
|
|
371404
371524
|
return false;
|
|
371405
371525
|
}
|
|
371406
371526
|
function handlePreviewSessionCreationError2(err, accountId) {
|
|
371407
|
-
|
|
371527
|
+
assert39__default.default(err && typeof err === "object");
|
|
371408
371528
|
if (isAuthenticationError2(err)) {
|
|
371409
371529
|
throw new RemoteSessionAuthenticationError2(err);
|
|
371410
371530
|
} else if ("code" in err && err.code === 10063) {
|
|
@@ -371893,7 +372013,7 @@ var init_RemoteRuntimeController = __esm({
|
|
|
371893
372013
|
if (!config2.dev?.auth) {
|
|
371894
372014
|
throw new MissingConfigError("config.dev.auth");
|
|
371895
372015
|
}
|
|
371896
|
-
|
|
372016
|
+
assert39__default.default(config2.dev.auth);
|
|
371897
372017
|
const auth2 = await unwrapHook(config2.dev.auth);
|
|
371898
372018
|
this.#latestConfig = config2;
|
|
371899
372019
|
this.#latestBundle = bundle;
|
|
@@ -371930,7 +372050,7 @@ var init_RemoteRuntimeController = __esm({
|
|
|
371930
372050
|
const abortSignal = this.#abortController.signal;
|
|
371931
372051
|
const shouldRetry = /* @__PURE__ */ __name(() => bundleId === this.#currentBundleId && !abortSignal.aborted && !this.tearingDown, "shouldRetry");
|
|
371932
372052
|
try {
|
|
371933
|
-
|
|
372053
|
+
assert39__default.default(this.#latestConfig.dev.auth);
|
|
371934
372054
|
const auth2 = await unwrapHook(this.#latestConfig.dev.auth);
|
|
371935
372055
|
this.#session = await this.#getPreviewSession(
|
|
371936
372056
|
this.#latestConfig,
|
|
@@ -372048,7 +372168,7 @@ function createWorkerObject(devEnv) {
|
|
|
372048
372168
|
return devEnv.proxy.ready.promise.then((ev) => ev.inspectorUrl);
|
|
372049
372169
|
},
|
|
372050
372170
|
get config() {
|
|
372051
|
-
|
|
372171
|
+
assert39__default.default(devEnv.config.latestConfig);
|
|
372052
372172
|
return devEnv.config.latestConfig;
|
|
372053
372173
|
},
|
|
372054
372174
|
async setConfig(config2, throwErrors) {
|
|
@@ -372063,7 +372183,7 @@ function createWorkerObject(devEnv) {
|
|
|
372063
372183
|
return proxyWorker.dispatchFetch(...args);
|
|
372064
372184
|
},
|
|
372065
372185
|
async queue(...args) {
|
|
372066
|
-
|
|
372186
|
+
assert39__default.default(
|
|
372067
372187
|
this.config.name,
|
|
372068
372188
|
"Worker name must be defined to use `Worker.queue()`"
|
|
372069
372189
|
);
|
|
@@ -372072,7 +372192,7 @@ function createWorkerObject(devEnv) {
|
|
|
372072
372192
|
return w8.queue(...args);
|
|
372073
372193
|
},
|
|
372074
372194
|
async scheduled(...args) {
|
|
372075
|
-
|
|
372195
|
+
assert39__default.default(
|
|
372076
372196
|
this.config.name,
|
|
372077
372197
|
"Worker name must be defined to use `Worker.scheduled()`"
|
|
372078
372198
|
);
|
|
@@ -372742,7 +372862,7 @@ var init_LocalRuntimeController = __esm({
|
|
|
372742
372862
|
if (!this.containerImageTagsSeen.size) {
|
|
372743
372863
|
return;
|
|
372744
372864
|
}
|
|
372745
|
-
|
|
372865
|
+
assert39__default.default(
|
|
372746
372866
|
this.dockerPath,
|
|
372747
372867
|
"Docker path should have been set if containers are enabled"
|
|
372748
372868
|
);
|
|
@@ -372857,7 +372977,7 @@ var init_MultiworkerRuntimeController = __esm({
|
|
|
372857
372977
|
}
|
|
372858
372978
|
#mergedMfOptions() {
|
|
372859
372979
|
const primary = [...this.#options.values()].find((o8) => o8.primary);
|
|
372860
|
-
|
|
372980
|
+
assert39__default.default(primary !== void 0);
|
|
372861
372981
|
const secondary = [...this.#options.values()].filter((o8) => !o8.primary);
|
|
372862
372982
|
const containerEngine = [...this.#options.values()].map((o8) => o8.options.containerEngine).find((engine) => engine !== void 0);
|
|
372863
372983
|
return {
|
|
@@ -377147,12 +377267,12 @@ var init_assets7 = __esm({
|
|
|
377147
377267
|
* by the `fetch()` function before calling `dispatcher.dispatch()`.
|
|
377148
377268
|
*/
|
|
377149
377269
|
static reinstateHostHeader(headers, host) {
|
|
377150
|
-
|
|
377151
|
-
|
|
377270
|
+
assert39__default.default(headers, "Expected all proxy requests to contain headers.");
|
|
377271
|
+
assert39__default.default(
|
|
377152
377272
|
!Array.isArray(headers),
|
|
377153
377273
|
"Expected proxy request headers to be a hash object"
|
|
377154
377274
|
);
|
|
377155
|
-
|
|
377275
|
+
assert39__default.default(
|
|
377156
377276
|
Object.keys(headers).every((h7) => h7.toLowerCase() !== "host"),
|
|
377157
377277
|
"Expected Host header to have been deleted."
|
|
377158
377278
|
);
|
|
@@ -377182,7 +377302,7 @@ async function startDev(args) {
|
|
|
377182
377302
|
unregisterHotKeys?.();
|
|
377183
377303
|
accountId = await requireAuth(config2);
|
|
377184
377304
|
if (hotkeysDisplayed) {
|
|
377185
|
-
|
|
377305
|
+
assert39__default.default(devEnv !== void 0);
|
|
377186
377306
|
unregisterHotKeys = registerDevHotKeys(
|
|
377187
377307
|
Array.isArray(devEnv) ? devEnv : [devEnv],
|
|
377188
377308
|
args,
|
|
@@ -377467,7 +377587,7 @@ var init_start_dev = __esm({
|
|
|
377467
377587
|
init_binding_utils2();
|
|
377468
377588
|
init_MultiworkerRuntimeController();
|
|
377469
377589
|
init_NoOpProxyController();
|
|
377470
|
-
|
|
377590
|
+
init_node_compat3();
|
|
377471
377591
|
init_hotkeys();
|
|
377472
377592
|
init_is_non_interactive_turborepo();
|
|
377473
377593
|
init_logger2();
|
|
@@ -378146,7 +378266,7 @@ function createTestHarness(options) {
|
|
|
378146
378266
|
if (startPromise) {
|
|
378147
378267
|
return await startPromise;
|
|
378148
378268
|
}
|
|
378149
|
-
|
|
378269
|
+
assert39__default.default(
|
|
378150
378270
|
serverSession,
|
|
378151
378271
|
"Server has not been started. Start it with server.listen() before calling this method."
|
|
378152
378272
|
);
|
|
@@ -378156,7 +378276,7 @@ function createTestHarness(options) {
|
|
|
378156
378276
|
function resolveWorkerName2(session, workerName) {
|
|
378157
378277
|
if (workerName === void 0) {
|
|
378158
378278
|
const primaryWorkerName = session.primaryDevEnv.config.latestConfig?.name;
|
|
378159
|
-
|
|
378279
|
+
assert39__default.default(
|
|
378160
378280
|
primaryWorkerName,
|
|
378161
378281
|
"Primary Worker name is not available. Add a Worker `name` or call server.getWorker(name)."
|
|
378162
378282
|
);
|
|
@@ -378177,7 +378297,7 @@ function createTestHarness(options) {
|
|
|
378177
378297
|
const workerConfig = session.devEnvs.find(
|
|
378178
378298
|
(devEnv) => devEnv.config.latestConfig?.name === workerName
|
|
378179
378299
|
)?.config.latestWranglerConfig;
|
|
378180
|
-
|
|
378300
|
+
assert39__default.default(
|
|
378181
378301
|
workerConfig,
|
|
378182
378302
|
`Worker ${JSON.stringify(workerName)} config is not available.`
|
|
378183
378303
|
);
|
|
@@ -378336,7 +378456,7 @@ function createTestHarness(options) {
|
|
|
378336
378456
|
__name(isErrorEvent4, "isErrorEvent");
|
|
378337
378457
|
async function getRuntimeMiniflare(session) {
|
|
378338
378458
|
const miniflare = session.primaryDevEnv.runtimes[0].mf;
|
|
378339
|
-
|
|
378459
|
+
assert39__default.default(miniflare, "Worker runtime is not available.");
|
|
378340
378460
|
return miniflare;
|
|
378341
378461
|
}
|
|
378342
378462
|
__name(getRuntimeMiniflare, "getRuntimeMiniflare");
|
|
@@ -378344,7 +378464,7 @@ function createTestHarness(options) {
|
|
|
378344
378464
|
const devEnv = session.devEnvs.find(
|
|
378345
378465
|
(d9) => d9.config.latestConfig?.name === workerName
|
|
378346
378466
|
);
|
|
378347
|
-
|
|
378467
|
+
assert39__default.default(
|
|
378348
378468
|
devEnv,
|
|
378349
378469
|
`Worker ${JSON.stringify(workerName)} config is not available.`
|
|
378350
378470
|
);
|
|
@@ -378406,7 +378526,7 @@ function createTestHarness(options) {
|
|
|
378406
378526
|
async fetch(input2, init4) {
|
|
378407
378527
|
const session = await resolveSession();
|
|
378408
378528
|
const miniflare = session.primaryDevEnv.proxy.proxyWorker;
|
|
378409
|
-
|
|
378529
|
+
assert39__default.default(
|
|
378410
378530
|
miniflare,
|
|
378411
378531
|
"The proxy worker is not available yet. Did you call server.listen()?"
|
|
378412
378532
|
);
|
|
@@ -378538,11 +378658,11 @@ function createTestHarness(options) {
|
|
|
378538
378658
|
const miniflare = await getRuntimeMiniflare(session);
|
|
378539
378659
|
const workerName = resolveWorkerName2(session, name2);
|
|
378540
378660
|
const workerConfig = getWorkerDevEnv(session, workerName).config.latestWranglerConfig;
|
|
378541
|
-
|
|
378661
|
+
assert39__default.default(
|
|
378542
378662
|
workerConfig,
|
|
378543
378663
|
`Worker ${JSON.stringify(workerName)} config is not available.`
|
|
378544
378664
|
);
|
|
378545
|
-
|
|
378665
|
+
assert39__default.default(
|
|
378546
378666
|
workerConfig.configPath,
|
|
378547
378667
|
`Worker ${JSON.stringify(workerName)} config path is not available.`
|
|
378548
378668
|
);
|
|
@@ -378688,7 +378808,7 @@ function createTestHarness(options) {
|
|
|
378688
378808
|
async update(updateInput) {
|
|
378689
378809
|
let nextOptions;
|
|
378690
378810
|
if (typeof updateInput === "function") {
|
|
378691
|
-
|
|
378811
|
+
assert39__default.default(
|
|
378692
378812
|
currentOptions,
|
|
378693
378813
|
"Cannot update test harness options with a function before options have been configured. Pass options to createTestHarness() or call server.update(options) first."
|
|
378694
378814
|
);
|
|
@@ -378723,7 +378843,7 @@ function createTestHarness(options) {
|
|
|
378723
378843
|
},
|
|
378724
378844
|
async reset() {
|
|
378725
378845
|
const session = await resolveSession();
|
|
378726
|
-
|
|
378846
|
+
assert39__default.default(
|
|
378727
378847
|
initialOptions,
|
|
378728
378848
|
"Server has not been started. Start it with server.listen() before calling this method."
|
|
378729
378849
|
);
|
|
@@ -378749,9 +378869,8 @@ var init_test_harness = __esm({
|
|
|
378749
378869
|
init_introspection();
|
|
378750
378870
|
init_config6();
|
|
378751
378871
|
init_helpers6();
|
|
378752
|
-
init_splitter();
|
|
378753
378872
|
init_utils8();
|
|
378754
|
-
|
|
378873
|
+
init_node_compat3();
|
|
378755
378874
|
init_class_names_sqlite();
|
|
378756
378875
|
init_logger2();
|
|
378757
378876
|
init_user3();
|
|
@@ -379082,7 +379201,6 @@ var init_platform = __esm({
|
|
|
379082
379201
|
init_assets6();
|
|
379083
379202
|
init_config6();
|
|
379084
379203
|
init_entry();
|
|
379085
|
-
init_rules13();
|
|
379086
379204
|
init_dev();
|
|
379087
379205
|
init_class_names_sqlite();
|
|
379088
379206
|
init_miniflare();
|
|
@@ -379365,7 +379483,6 @@ function parseBuildArgs(argv) {
|
|
|
379365
379483
|
__name(parseBuildArgs, "parseBuildArgs");
|
|
379366
379484
|
|
|
379367
379485
|
// src/cli.ts
|
|
379368
|
-
init_splitter();
|
|
379369
379486
|
init_src();
|
|
379370
379487
|
init_src();
|
|
379371
379488
|
init_experimental_commands_api();
|
|
@@ -379377,6 +379494,10 @@ if (typeof vitest === "undefined" && __require.main === module) {
|
|
|
379377
379494
|
process17__default.default.exit(exitCode);
|
|
379378
379495
|
});
|
|
379379
379496
|
}
|
|
379497
|
+
function unstable_splitSqlQuery(sql) {
|
|
379498
|
+
return splitSqlQuery(sql);
|
|
379499
|
+
}
|
|
379500
|
+
__name(unstable_splitSqlQuery, "unstable_splitSqlQuery");
|
|
379380
379501
|
var unstable_generateASSETSBinding = (
|
|
379381
379502
|
/* eslint-disable-next-line @typescript-eslint/no-require-imports --
|
|
379382
379503
|
We `require` instead of `import`ing here to avoid polluting the main
|
|
@@ -380048,5 +380169,5 @@ exports.unstable_getVarsForDev = getVarsForDev;
|
|
|
380048
380169
|
exports.unstable_printBindings = printBindings;
|
|
380049
380170
|
exports.unstable_readConfig = readConfig;
|
|
380050
380171
|
exports.unstable_resolveNamedTunnel = resolveNamedTunnel2;
|
|
380051
|
-
exports.unstable_splitSqlQuery =
|
|
380172
|
+
exports.unstable_splitSqlQuery = unstable_splitSqlQuery;
|
|
380052
380173
|
exports.unstable_startWorker = startWorker;
|