create-cloudflare 2.74.5 → 2.74.7
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/dist/cli.js +394 -95
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -61519,7 +61519,7 @@ var require_lib = __commonJS({
|
|
|
61519
61519
|
}
|
|
61520
61520
|
return isInAstralSet(code2, astralIdentifierStartCodes);
|
|
61521
61521
|
}
|
|
61522
|
-
function
|
|
61522
|
+
function isIdentifierChar2(code2) {
|
|
61523
61523
|
if (code2 < 48) return code2 === 36;
|
|
61524
61524
|
if (code2 < 58) return true;
|
|
61525
61525
|
if (code2 < 65) return false;
|
|
@@ -63201,7 +63201,7 @@ var require_lib = __commonJS({
|
|
|
63201
63201
|
if (mods.includes(char)) {
|
|
63202
63202
|
this.raise(Errors.DuplicateRegExpFlags, nextPos());
|
|
63203
63203
|
}
|
|
63204
|
-
} else if (
|
|
63204
|
+
} else if (isIdentifierChar2(cp3) || cp3 === 92) {
|
|
63205
63205
|
this.raise(Errors.MalformedRegExpFlags, nextPos());
|
|
63206
63206
|
} else {
|
|
63207
63207
|
break;
|
|
@@ -63389,13 +63389,13 @@ var require_lib = __commonJS({
|
|
|
63389
63389
|
}
|
|
63390
63390
|
while (this.state.pos < this.length) {
|
|
63391
63391
|
const ch = this.codePointAtPos(this.state.pos);
|
|
63392
|
-
if (
|
|
63392
|
+
if (isIdentifierChar2(ch)) {
|
|
63393
63393
|
this.state.pos += ch <= 65535 ? 1 : 2;
|
|
63394
63394
|
} else if (ch === 92) {
|
|
63395
63395
|
this.state.containsEsc = true;
|
|
63396
63396
|
word += this.input.slice(chunkStart, this.state.pos);
|
|
63397
63397
|
const escStart = this.state.curPosition();
|
|
63398
|
-
const identifierCheck = this.state.pos === start ? isIdentifierStart :
|
|
63398
|
+
const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar2;
|
|
63399
63399
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
63400
63400
|
this.raise(Errors.MissingUnicodeEscape, this.state.curPosition());
|
|
63401
63401
|
chunkStart = this.state.pos - 1;
|
|
@@ -63727,7 +63727,7 @@ var require_lib = __commonJS({
|
|
|
63727
63727
|
const nameEnd = nameStart + name3.length;
|
|
63728
63728
|
if (this.input.slice(nameStart, nameEnd) === name3) {
|
|
63729
63729
|
const nextCh = this.input.charCodeAt(nameEnd);
|
|
63730
|
-
return !(
|
|
63730
|
+
return !(isIdentifierChar2(nextCh) || (nextCh & 64512) === 55296);
|
|
63731
63731
|
}
|
|
63732
63732
|
return false;
|
|
63733
63733
|
}
|
|
@@ -66775,7 +66775,7 @@ var require_lib = __commonJS({
|
|
|
66775
66775
|
const start = this.state.pos;
|
|
66776
66776
|
do {
|
|
66777
66777
|
ch = this.input.charCodeAt(++this.state.pos);
|
|
66778
|
-
} while (
|
|
66778
|
+
} while (isIdentifierChar2(ch) || ch === 45);
|
|
66779
66779
|
this.finishToken(141, this.input.slice(start, this.state.pos));
|
|
66780
66780
|
}
|
|
66781
66781
|
jsxParseIdentifier() {
|
|
@@ -72329,7 +72329,7 @@ var require_lib = __commonJS({
|
|
|
72329
72329
|
keywordRelationalOperator.lastIndex = pos;
|
|
72330
72330
|
if (keywordRelationalOperator.test(this.input)) {
|
|
72331
72331
|
const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);
|
|
72332
|
-
if (!
|
|
72332
|
+
if (!isIdentifierChar2(endCh) && endCh !== 92) {
|
|
72333
72333
|
return false;
|
|
72334
72334
|
}
|
|
72335
72335
|
}
|
|
@@ -78138,11 +78138,55 @@ var import_node_path6 = require("node:path");
|
|
|
78138
78138
|
// ../workers-utils/dist/index.mjs
|
|
78139
78139
|
var import_node_module13 = require("node:module");
|
|
78140
78140
|
|
|
78141
|
-
// ../workers-utils/dist/chunk-
|
|
78141
|
+
// ../workers-utils/dist/chunk-2Q77CKVU.mjs
|
|
78142
78142
|
var import_node_module4 = require("node:module");
|
|
78143
78143
|
init_chunk_U6NEESU5();
|
|
78144
|
+
var import_node_assert = __toESM(require("node:assert"), 1);
|
|
78144
78145
|
var import_meta4 = {};
|
|
78145
78146
|
(0, import_node_module4.createRequire)(import_meta4.url || (typeof __filename === "string" ? __filename : "/"));
|
|
78147
|
+
function isCompatDate(str) {
|
|
78148
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
78149
|
+
}
|
|
78150
|
+
__name(isCompatDate, "isCompatDate");
|
|
78151
|
+
function formatCompatibilityDate(date5) {
|
|
78152
|
+
const compatDate = date5.toISOString().slice(0, 10);
|
|
78153
|
+
(0, import_node_assert.default)(isCompatDate(compatDate));
|
|
78154
|
+
return compatDate;
|
|
78155
|
+
}
|
|
78156
|
+
__name(formatCompatibilityDate, "formatCompatibilityDate");
|
|
78157
|
+
function getTodaysCompatDate() {
|
|
78158
|
+
return formatCompatibilityDate(/* @__PURE__ */ new Date());
|
|
78159
|
+
}
|
|
78160
|
+
__name(getTodaysCompatDate, "getTodaysCompatDate");
|
|
78161
|
+
var NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
|
|
78162
|
+
function isNodejsCompatDefaultOn(compatibilityDate) {
|
|
78163
|
+
return compatibilityDate !== void 0 && compatibilityDate >= NODEJS_COMPAT_DEFAULT_ON_DATE;
|
|
78164
|
+
}
|
|
78165
|
+
__name(isNodejsCompatDefaultOn, "isNodejsCompatDefaultOn");
|
|
78166
|
+
var NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
|
|
78167
|
+
function resolveNodejsCompat(compatibilityDate, compatibilityFlags) {
|
|
78168
|
+
const isDefaultOn = isNodejsCompatDefaultOn(compatibilityDate);
|
|
78169
|
+
const isNodejsCompatEnabled = compatibilityFlags.includes("nodejs_compat") || isDefaultOn && !compatibilityFlags.includes("no_nodejs_compat");
|
|
78170
|
+
const isNodejsCompatV2Enabled = compatibilityFlags.includes("nodejs_compat_v2") || !compatibilityFlags.includes("no_nodejs_compat_v2") && (isDefaultOn || isNodejsCompatEnabled && compatibilityDate >= NODEJS_COMPAT_V2_SWITCH_OVER_DATE);
|
|
78171
|
+
return { isNodejsCompatEnabled, isNodejsCompatV2Enabled };
|
|
78172
|
+
}
|
|
78173
|
+
__name(resolveNodejsCompat, "resolveNodejsCompat");
|
|
78174
|
+
function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags) {
|
|
78175
|
+
if (!isNodejsCompatDefaultOn(compatibilityDate)) {
|
|
78176
|
+
return compatibilityFlags;
|
|
78177
|
+
}
|
|
78178
|
+
const redundantFlags = ["nodejs_compat", "nodejs_compat_v2"].filter(
|
|
78179
|
+
(flag) => !compatibilityFlags.includes(`no_${flag}`)
|
|
78180
|
+
);
|
|
78181
|
+
return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
|
|
78182
|
+
}
|
|
78183
|
+
__name(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
|
|
78184
|
+
|
|
78185
|
+
// ../workers-utils/dist/chunk-XEBMRQST.mjs
|
|
78186
|
+
var import_node_module5 = require("node:module");
|
|
78187
|
+
init_chunk_U6NEESU5();
|
|
78188
|
+
var import_meta5 = {};
|
|
78189
|
+
(0, import_node_module5.createRequire)(import_meta5.url || (typeof __filename === "string" ? __filename : "/"));
|
|
78146
78190
|
var external_exports = {};
|
|
78147
78191
|
__export2(external_exports, {
|
|
78148
78192
|
$brand: () => $brand,
|
|
@@ -78727,7 +78771,7 @@ __export2(util_exports, {
|
|
|
78727
78771
|
NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
|
|
78728
78772
|
aborted: () => aborted,
|
|
78729
78773
|
allowsEval: () => allowsEval,
|
|
78730
|
-
assert: () =>
|
|
78774
|
+
assert: () => assert2,
|
|
78731
78775
|
assertEqual: () => assertEqual,
|
|
78732
78776
|
assertIs: () => assertIs,
|
|
78733
78777
|
assertNever: () => assertNever,
|
|
@@ -78817,9 +78861,9 @@ function assertNever(_x) {
|
|
|
78817
78861
|
throw new Error("Unexpected value in exhaustive check");
|
|
78818
78862
|
}
|
|
78819
78863
|
__name(assertNever, "assertNever");
|
|
78820
|
-
function
|
|
78864
|
+
function assert2(_) {
|
|
78821
78865
|
}
|
|
78822
|
-
__name(
|
|
78866
|
+
__name(assert2, "assert");
|
|
78823
78867
|
function getEnumValues(entries) {
|
|
78824
78868
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
78825
78869
|
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -98329,13 +98373,13 @@ function formatZodError(error62) {
|
|
|
98329
98373
|
__name(formatZodError, "formatZodError");
|
|
98330
98374
|
|
|
98331
98375
|
// ../workers-utils/dist/chunk-AAQI36FL.mjs
|
|
98332
|
-
var
|
|
98376
|
+
var import_node_module7 = require("node:module");
|
|
98333
98377
|
|
|
98334
98378
|
// ../workers-utils/dist/chunk-M3RITKR3.mjs
|
|
98335
|
-
var
|
|
98379
|
+
var import_node_module6 = require("node:module");
|
|
98336
98380
|
init_chunk_U6NEESU5();
|
|
98337
|
-
var
|
|
98338
|
-
(0,
|
|
98381
|
+
var import_meta6 = {};
|
|
98382
|
+
(0, import_node_module6.createRequire)(import_meta6.url || (typeof __filename === "string" ? __filename : "/"));
|
|
98339
98383
|
function dedent(templ) {
|
|
98340
98384
|
var values = [];
|
|
98341
98385
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -98381,8 +98425,8 @@ var esm_default = dedent;
|
|
|
98381
98425
|
init_chunk_U6NEESU5();
|
|
98382
98426
|
var import_node_fs = require("node:fs");
|
|
98383
98427
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
98384
|
-
var
|
|
98385
|
-
(0,
|
|
98428
|
+
var import_meta7 = {};
|
|
98429
|
+
(0, import_node_module7.createRequire)(import_meta7.url || (typeof __filename === "string" ? __filename : "/"));
|
|
98386
98430
|
function hasKnownExportType(entry) {
|
|
98387
98431
|
const type = entry?.type;
|
|
98388
98432
|
return type === "durable-object" || type === "worker" || type === "workflow";
|
|
@@ -101452,50 +101496,6 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
|
|
|
101452
101496
|
}
|
|
101453
101497
|
__name(formatConfigSnippet, "formatConfigSnippet");
|
|
101454
101498
|
|
|
101455
|
-
// ../workers-utils/dist/chunk-2Q77CKVU.mjs
|
|
101456
|
-
var import_node_module7 = require("node:module");
|
|
101457
|
-
init_chunk_U6NEESU5();
|
|
101458
|
-
var import_node_assert = __toESM(require("node:assert"), 1);
|
|
101459
|
-
var import_meta7 = {};
|
|
101460
|
-
(0, import_node_module7.createRequire)(import_meta7.url || (typeof __filename === "string" ? __filename : "/"));
|
|
101461
|
-
function isCompatDate(str) {
|
|
101462
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
101463
|
-
}
|
|
101464
|
-
__name(isCompatDate, "isCompatDate");
|
|
101465
|
-
function formatCompatibilityDate(date5) {
|
|
101466
|
-
const compatDate = date5.toISOString().slice(0, 10);
|
|
101467
|
-
(0, import_node_assert.default)(isCompatDate(compatDate));
|
|
101468
|
-
return compatDate;
|
|
101469
|
-
}
|
|
101470
|
-
__name(formatCompatibilityDate, "formatCompatibilityDate");
|
|
101471
|
-
function getTodaysCompatDate() {
|
|
101472
|
-
return formatCompatibilityDate(/* @__PURE__ */ new Date());
|
|
101473
|
-
}
|
|
101474
|
-
__name(getTodaysCompatDate, "getTodaysCompatDate");
|
|
101475
|
-
var NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
|
|
101476
|
-
function isNodejsCompatDefaultOn(compatibilityDate) {
|
|
101477
|
-
return compatibilityDate !== void 0 && compatibilityDate >= NODEJS_COMPAT_DEFAULT_ON_DATE;
|
|
101478
|
-
}
|
|
101479
|
-
__name(isNodejsCompatDefaultOn, "isNodejsCompatDefaultOn");
|
|
101480
|
-
var NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
|
|
101481
|
-
function resolveNodejsCompat(compatibilityDate, compatibilityFlags) {
|
|
101482
|
-
const isDefaultOn = isNodejsCompatDefaultOn(compatibilityDate);
|
|
101483
|
-
const isNodejsCompatEnabled = compatibilityFlags.includes("nodejs_compat") || isDefaultOn && !compatibilityFlags.includes("no_nodejs_compat");
|
|
101484
|
-
const isNodejsCompatV2Enabled = compatibilityFlags.includes("nodejs_compat_v2") || !compatibilityFlags.includes("no_nodejs_compat_v2") && (isDefaultOn || isNodejsCompatEnabled && compatibilityDate >= NODEJS_COMPAT_V2_SWITCH_OVER_DATE);
|
|
101485
|
-
return { isNodejsCompatEnabled, isNodejsCompatV2Enabled };
|
|
101486
|
-
}
|
|
101487
|
-
__name(resolveNodejsCompat, "resolveNodejsCompat");
|
|
101488
|
-
function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags) {
|
|
101489
|
-
if (!isNodejsCompatDefaultOn(compatibilityDate)) {
|
|
101490
|
-
return compatibilityFlags;
|
|
101491
|
-
}
|
|
101492
|
-
const redundantFlags = ["nodejs_compat", "nodejs_compat_v2"].filter(
|
|
101493
|
-
(flag) => !compatibilityFlags.includes(`no_${flag}`)
|
|
101494
|
-
);
|
|
101495
|
-
return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
|
|
101496
|
-
}
|
|
101497
|
-
__name(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
|
|
101498
|
-
|
|
101499
101499
|
// ../workers-utils/dist/chunk-FR75DWDU.mjs
|
|
101500
101500
|
var import_node_module11 = require("node:module");
|
|
101501
101501
|
|
|
@@ -111003,7 +111003,7 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
111003
111003
|
}, {});
|
|
111004
111004
|
}
|
|
111005
111005
|
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
111006
|
-
var DEFAULT_COMPAT_DATE = "2026-
|
|
111006
|
+
var DEFAULT_COMPAT_DATE = "2026-11-02";
|
|
111007
111007
|
function constructWranglerConfig(config50) {
|
|
111008
111008
|
const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
|
|
111009
111009
|
const durableObjectClassNames = config50.bindings.filter(
|
|
@@ -114429,6 +114429,306 @@ function leadingMigrationNumber(relativePath) {
|
|
|
114429
114429
|
return parseInt(firstSegment.split("_")[0], 10);
|
|
114430
114430
|
}
|
|
114431
114431
|
__name(leadingMigrationNumber, "leadingMigrationNumber");
|
|
114432
|
+
function trimSqlQuery(sql) {
|
|
114433
|
+
if (!mayContainTransaction(sql)) {
|
|
114434
|
+
return sql;
|
|
114435
|
+
}
|
|
114436
|
+
const trimmedSql = sql.replace("BEGIN TRANSACTION;", "").replace("COMMIT;", "");
|
|
114437
|
+
if (mayContainTransaction(trimmedSql)) {
|
|
114438
|
+
throw new UserError(
|
|
114439
|
+
"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.",
|
|
114440
|
+
{
|
|
114441
|
+
telemetryMessage: "d1 execute sql file contains multiple transactions"
|
|
114442
|
+
}
|
|
114443
|
+
);
|
|
114444
|
+
}
|
|
114445
|
+
return trimmedSql;
|
|
114446
|
+
}
|
|
114447
|
+
__name(trimSqlQuery, "trimSqlQuery");
|
|
114448
|
+
function mayContainTransaction(sql) {
|
|
114449
|
+
return sql.includes("BEGIN TRANSACTION");
|
|
114450
|
+
}
|
|
114451
|
+
__name(mayContainTransaction, "mayContainTransaction");
|
|
114452
|
+
function mayContainMultipleStatements(sql) {
|
|
114453
|
+
const trimmed = sql.trimEnd();
|
|
114454
|
+
const semiColonIndex = trimmed.indexOf(";");
|
|
114455
|
+
return semiColonIndex !== -1 && semiColonIndex !== trimmed.length - 1;
|
|
114456
|
+
}
|
|
114457
|
+
__name(mayContainMultipleStatements, "mayContainMultipleStatements");
|
|
114458
|
+
function splitSqlQuery(sql) {
|
|
114459
|
+
const trimmedSql = trimSqlQuery(sql);
|
|
114460
|
+
if (!mayContainMultipleStatements(trimmedSql)) {
|
|
114461
|
+
return [trimmedSql];
|
|
114462
|
+
}
|
|
114463
|
+
const split = splitSqlIntoStatements(trimmedSql);
|
|
114464
|
+
if (split.length === 0) {
|
|
114465
|
+
return [trimmedSql];
|
|
114466
|
+
} else {
|
|
114467
|
+
return split;
|
|
114468
|
+
}
|
|
114469
|
+
}
|
|
114470
|
+
__name(splitSqlQuery, "splitSqlQuery");
|
|
114471
|
+
function normalizeSqlLineEndings(sql) {
|
|
114472
|
+
let normalized = "";
|
|
114473
|
+
let quoteEnd;
|
|
114474
|
+
let inLineComment = false;
|
|
114475
|
+
let inBlockComment = false;
|
|
114476
|
+
for (let index = 0; index < sql.length; index++) {
|
|
114477
|
+
const char = sql[index];
|
|
114478
|
+
const nextChar = sql[index + 1];
|
|
114479
|
+
if (quoteEnd !== void 0) {
|
|
114480
|
+
normalized += char;
|
|
114481
|
+
if (char === quoteEnd) {
|
|
114482
|
+
if (nextChar === quoteEnd) {
|
|
114483
|
+
normalized += nextChar;
|
|
114484
|
+
index++;
|
|
114485
|
+
} else {
|
|
114486
|
+
quoteEnd = void 0;
|
|
114487
|
+
}
|
|
114488
|
+
}
|
|
114489
|
+
continue;
|
|
114490
|
+
}
|
|
114491
|
+
if (inLineComment) {
|
|
114492
|
+
if (char === "\r" && nextChar === "\n") {
|
|
114493
|
+
normalized += "\n";
|
|
114494
|
+
index++;
|
|
114495
|
+
inLineComment = false;
|
|
114496
|
+
} else {
|
|
114497
|
+
normalized += char;
|
|
114498
|
+
inLineComment = char !== "\n";
|
|
114499
|
+
}
|
|
114500
|
+
continue;
|
|
114501
|
+
}
|
|
114502
|
+
if (inBlockComment) {
|
|
114503
|
+
if (char === "\r" && nextChar === "\n") {
|
|
114504
|
+
normalized += "\n";
|
|
114505
|
+
index++;
|
|
114506
|
+
} else {
|
|
114507
|
+
normalized += char;
|
|
114508
|
+
if (char === "*" && nextChar === "/") {
|
|
114509
|
+
normalized += nextChar;
|
|
114510
|
+
index++;
|
|
114511
|
+
inBlockComment = false;
|
|
114512
|
+
}
|
|
114513
|
+
}
|
|
114514
|
+
continue;
|
|
114515
|
+
}
|
|
114516
|
+
if (char === "-" && nextChar === "-") {
|
|
114517
|
+
normalized += "--";
|
|
114518
|
+
index++;
|
|
114519
|
+
inLineComment = true;
|
|
114520
|
+
continue;
|
|
114521
|
+
}
|
|
114522
|
+
if (char === "/" && nextChar === "*") {
|
|
114523
|
+
normalized += "/*";
|
|
114524
|
+
index++;
|
|
114525
|
+
inBlockComment = true;
|
|
114526
|
+
continue;
|
|
114527
|
+
}
|
|
114528
|
+
if (char === "'" || char === '"' || char === "`") {
|
|
114529
|
+
normalized += char;
|
|
114530
|
+
quoteEnd = char;
|
|
114531
|
+
continue;
|
|
114532
|
+
}
|
|
114533
|
+
if (char === "[") {
|
|
114534
|
+
normalized += char;
|
|
114535
|
+
quoteEnd = "]";
|
|
114536
|
+
continue;
|
|
114537
|
+
}
|
|
114538
|
+
if (char === "\r" && nextChar === "\n") {
|
|
114539
|
+
normalized += "\n";
|
|
114540
|
+
index++;
|
|
114541
|
+
continue;
|
|
114542
|
+
}
|
|
114543
|
+
normalized += char;
|
|
114544
|
+
}
|
|
114545
|
+
return normalized;
|
|
114546
|
+
}
|
|
114547
|
+
__name(normalizeSqlLineEndings, "normalizeSqlLineEndings");
|
|
114548
|
+
function splitSqlIntoStatements(sql) {
|
|
114549
|
+
const statements = [];
|
|
114550
|
+
let start = 0;
|
|
114551
|
+
while (start < sql.length) {
|
|
114552
|
+
const { end, hasUsefulToken } = findCompleteStatementEnd(sql, start);
|
|
114553
|
+
if (end === void 0) {
|
|
114554
|
+
if (hasUsefulToken) {
|
|
114555
|
+
statements.push(sql.slice(start).trim());
|
|
114556
|
+
}
|
|
114557
|
+
break;
|
|
114558
|
+
}
|
|
114559
|
+
const statement = sql.slice(start, end - 1).trim();
|
|
114560
|
+
if (hasUsefulToken && statement.length > 0) {
|
|
114561
|
+
statements.push(statement);
|
|
114562
|
+
}
|
|
114563
|
+
start = end;
|
|
114564
|
+
}
|
|
114565
|
+
return statements;
|
|
114566
|
+
}
|
|
114567
|
+
__name(splitSqlIntoStatements, "splitSqlIntoStatements");
|
|
114568
|
+
var transitions = {
|
|
114569
|
+
INVALID: {
|
|
114570
|
+
tkSEMI: "START",
|
|
114571
|
+
tkWS: "INVALID",
|
|
114572
|
+
tkOTHER: "NORMAL",
|
|
114573
|
+
tkEXPLAIN: "EXPLAIN",
|
|
114574
|
+
tkCREATE: "CREATE",
|
|
114575
|
+
tkTEMP: "NORMAL",
|
|
114576
|
+
tkTRIGGER: "NORMAL",
|
|
114577
|
+
tkEND: "NORMAL"
|
|
114578
|
+
},
|
|
114579
|
+
START: {
|
|
114580
|
+
tkSEMI: "START",
|
|
114581
|
+
tkWS: "START",
|
|
114582
|
+
tkOTHER: "NORMAL",
|
|
114583
|
+
tkEXPLAIN: "EXPLAIN",
|
|
114584
|
+
tkCREATE: "CREATE",
|
|
114585
|
+
tkTEMP: "NORMAL",
|
|
114586
|
+
tkTRIGGER: "NORMAL",
|
|
114587
|
+
tkEND: "NORMAL"
|
|
114588
|
+
},
|
|
114589
|
+
NORMAL: {
|
|
114590
|
+
tkSEMI: "START",
|
|
114591
|
+
tkWS: "NORMAL",
|
|
114592
|
+
tkOTHER: "NORMAL",
|
|
114593
|
+
tkEXPLAIN: "NORMAL",
|
|
114594
|
+
tkCREATE: "NORMAL",
|
|
114595
|
+
tkTEMP: "NORMAL",
|
|
114596
|
+
tkTRIGGER: "NORMAL",
|
|
114597
|
+
tkEND: "NORMAL"
|
|
114598
|
+
},
|
|
114599
|
+
EXPLAIN: {
|
|
114600
|
+
tkSEMI: "START",
|
|
114601
|
+
tkWS: "EXPLAIN",
|
|
114602
|
+
tkOTHER: "EXPLAIN",
|
|
114603
|
+
tkEXPLAIN: "NORMAL",
|
|
114604
|
+
tkCREATE: "CREATE",
|
|
114605
|
+
tkTEMP: "NORMAL",
|
|
114606
|
+
tkTRIGGER: "NORMAL",
|
|
114607
|
+
tkEND: "NORMAL"
|
|
114608
|
+
},
|
|
114609
|
+
CREATE: {
|
|
114610
|
+
tkSEMI: "START",
|
|
114611
|
+
tkWS: "CREATE",
|
|
114612
|
+
tkOTHER: "NORMAL",
|
|
114613
|
+
tkEXPLAIN: "NORMAL",
|
|
114614
|
+
tkCREATE: "NORMAL",
|
|
114615
|
+
tkTEMP: "CREATE",
|
|
114616
|
+
tkTRIGGER: "TRIGGER",
|
|
114617
|
+
tkEND: "NORMAL"
|
|
114618
|
+
},
|
|
114619
|
+
TRIGGER: {
|
|
114620
|
+
tkSEMI: "SEMI",
|
|
114621
|
+
tkWS: "TRIGGER",
|
|
114622
|
+
tkOTHER: "TRIGGER",
|
|
114623
|
+
tkEXPLAIN: "TRIGGER",
|
|
114624
|
+
tkCREATE: "TRIGGER",
|
|
114625
|
+
tkTEMP: "TRIGGER",
|
|
114626
|
+
tkTRIGGER: "TRIGGER",
|
|
114627
|
+
tkEND: "TRIGGER"
|
|
114628
|
+
},
|
|
114629
|
+
SEMI: {
|
|
114630
|
+
tkSEMI: "SEMI",
|
|
114631
|
+
tkWS: "SEMI",
|
|
114632
|
+
tkOTHER: "TRIGGER",
|
|
114633
|
+
tkEXPLAIN: "TRIGGER",
|
|
114634
|
+
tkCREATE: "TRIGGER",
|
|
114635
|
+
tkTEMP: "TRIGGER",
|
|
114636
|
+
tkTRIGGER: "TRIGGER",
|
|
114637
|
+
tkEND: "END"
|
|
114638
|
+
},
|
|
114639
|
+
END: {
|
|
114640
|
+
tkSEMI: "START",
|
|
114641
|
+
tkWS: "END",
|
|
114642
|
+
tkOTHER: "TRIGGER",
|
|
114643
|
+
tkEXPLAIN: "TRIGGER",
|
|
114644
|
+
tkCREATE: "TRIGGER",
|
|
114645
|
+
tkTEMP: "TRIGGER",
|
|
114646
|
+
tkTRIGGER: "TRIGGER",
|
|
114647
|
+
tkEND: "TRIGGER"
|
|
114648
|
+
}
|
|
114649
|
+
};
|
|
114650
|
+
function findCompleteStatementEnd(sql, start) {
|
|
114651
|
+
let state = "INVALID";
|
|
114652
|
+
let hasUsefulToken = false;
|
|
114653
|
+
for (let index = start; index < sql.length; index++) {
|
|
114654
|
+
const char = sql[index];
|
|
114655
|
+
let token;
|
|
114656
|
+
if (char === ";") {
|
|
114657
|
+
token = "tkSEMI";
|
|
114658
|
+
} else if (char === " " || char === "\r" || char === " " || char === "\n" || char === "\f") {
|
|
114659
|
+
token = "tkWS";
|
|
114660
|
+
} else if (char === "/" && sql[index + 1] === "*") {
|
|
114661
|
+
const end = sql.indexOf("*/", index + 2);
|
|
114662
|
+
if (end === -1) {
|
|
114663
|
+
return { end: void 0, hasUsefulToken };
|
|
114664
|
+
}
|
|
114665
|
+
index = end + 1;
|
|
114666
|
+
token = "tkWS";
|
|
114667
|
+
} else if (char === "-" && sql[index + 1] === "-") {
|
|
114668
|
+
const end = sql.indexOf("\n", index + 2);
|
|
114669
|
+
if (end === -1) {
|
|
114670
|
+
return { end: void 0, hasUsefulToken };
|
|
114671
|
+
}
|
|
114672
|
+
index = end;
|
|
114673
|
+
token = "tkWS";
|
|
114674
|
+
} else if (char === "[") {
|
|
114675
|
+
const end = sql.indexOf("]", index + 1);
|
|
114676
|
+
if (end === -1) {
|
|
114677
|
+
return { end: void 0, hasUsefulToken: true };
|
|
114678
|
+
}
|
|
114679
|
+
index = end;
|
|
114680
|
+
token = "tkOTHER";
|
|
114681
|
+
} else if (char === "'" || char === '"' || char === "`") {
|
|
114682
|
+
const end = sql.indexOf(char, index + 1);
|
|
114683
|
+
if (end === -1) {
|
|
114684
|
+
return { end: void 0, hasUsefulToken: true };
|
|
114685
|
+
}
|
|
114686
|
+
index = end;
|
|
114687
|
+
token = "tkOTHER";
|
|
114688
|
+
} else if (isIdentifierChar(char)) {
|
|
114689
|
+
const identifierStart = index;
|
|
114690
|
+
while (index + 1 < sql.length && isIdentifierChar(sql[index + 1])) {
|
|
114691
|
+
index++;
|
|
114692
|
+
}
|
|
114693
|
+
token = classifyIdentifier(sql.slice(identifierStart, index + 1));
|
|
114694
|
+
} else {
|
|
114695
|
+
token = "tkOTHER";
|
|
114696
|
+
}
|
|
114697
|
+
hasUsefulToken ||= token !== "tkSEMI" && token !== "tkWS";
|
|
114698
|
+
state = getNextState(state, token);
|
|
114699
|
+
if (state === "START") {
|
|
114700
|
+
return { end: index + 1, hasUsefulToken };
|
|
114701
|
+
}
|
|
114702
|
+
}
|
|
114703
|
+
return { end: void 0, hasUsefulToken };
|
|
114704
|
+
}
|
|
114705
|
+
__name(findCompleteStatementEnd, "findCompleteStatementEnd");
|
|
114706
|
+
function getNextState(state, token) {
|
|
114707
|
+
return transitions[state][token];
|
|
114708
|
+
}
|
|
114709
|
+
__name(getNextState, "getNextState");
|
|
114710
|
+
function isIdentifierChar(char) {
|
|
114711
|
+
return /[A-Za-z0-9_$\u0080-\uffff]/.test(char);
|
|
114712
|
+
}
|
|
114713
|
+
__name(isIdentifierChar, "isIdentifierChar");
|
|
114714
|
+
function classifyIdentifier(identifier) {
|
|
114715
|
+
switch (identifier.toLowerCase()) {
|
|
114716
|
+
case "explain":
|
|
114717
|
+
return "tkEXPLAIN";
|
|
114718
|
+
case "create":
|
|
114719
|
+
return "tkCREATE";
|
|
114720
|
+
case "temp":
|
|
114721
|
+
case "temporary":
|
|
114722
|
+
return "tkTEMP";
|
|
114723
|
+
case "trigger":
|
|
114724
|
+
return "tkTRIGGER";
|
|
114725
|
+
case "end":
|
|
114726
|
+
return "tkEND";
|
|
114727
|
+
default:
|
|
114728
|
+
return "tkOTHER";
|
|
114729
|
+
}
|
|
114730
|
+
}
|
|
114731
|
+
__name(classifyIdentifier, "classifyIdentifier");
|
|
114432
114732
|
|
|
114433
114733
|
// ../cli/dist/gitignore.mjs
|
|
114434
114734
|
function maybeAppendWranglerToGitIgnoreLikeFile(filePath, { additionalEntries = [], requireEnvWildcard = false } = {}) {
|
|
@@ -119322,7 +119622,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
119322
119622
|
var yargs_default = Yargs;
|
|
119323
119623
|
|
|
119324
119624
|
// package.json
|
|
119325
|
-
var version2 = "2.74.
|
|
119625
|
+
var version2 = "2.74.7";
|
|
119326
119626
|
|
|
119327
119627
|
// src/metrics.ts
|
|
119328
119628
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -122034,20 +122334,20 @@ var import_semver3 = __toESM(require_semver2());
|
|
|
122034
122334
|
var package_default = {
|
|
122035
122335
|
name: "frameworks_clis_info",
|
|
122036
122336
|
dependencies: {
|
|
122037
|
-
"@angular/create": "22.2.
|
|
122337
|
+
"@angular/create": "22.2.5",
|
|
122038
122338
|
"@tanstack/cli": "0.72.0",
|
|
122039
|
-
"create-analog": "2.9.
|
|
122339
|
+
"create-analog": "2.9.3",
|
|
122040
122340
|
"create-astro": "5.3.1",
|
|
122041
122341
|
"create-docusaurus": "3.10.2",
|
|
122042
122342
|
"create-hono": "0.19.5",
|
|
122043
122343
|
"create-next-app": "16.4.3",
|
|
122044
|
-
"create-qwik": "1.20.
|
|
122045
|
-
"create-react-router": "8.5.
|
|
122344
|
+
"create-qwik": "1.20.3",
|
|
122345
|
+
"create-react-router": "8.5.1",
|
|
122046
122346
|
"create-rwsdk": "3.1.3",
|
|
122047
122347
|
"create-solid": "0.12.0",
|
|
122048
|
-
"create-vike": "0.0.
|
|
122348
|
+
"create-vike": "0.0.690",
|
|
122049
122349
|
"create-vinext-app": "1.1.0",
|
|
122050
|
-
"create-vite": "9.3.
|
|
122350
|
+
"create-vite": "9.3.3",
|
|
122051
122351
|
"create-vue": "3.24.0",
|
|
122052
122352
|
"create-waku": "0.12.5-1.0.0-alpha.10-0",
|
|
122053
122353
|
gatsby: "5.16.1",
|
|
@@ -123386,7 +123686,7 @@ async function isLoggedIn() {
|
|
|
123386
123686
|
}
|
|
123387
123687
|
async function listAccounts() {
|
|
123388
123688
|
const { accounts = [] } = await cfWhoami();
|
|
123389
|
-
return
|
|
123689
|
+
return accounts;
|
|
123390
123690
|
}
|
|
123391
123691
|
async function login() {
|
|
123392
123692
|
const { npx: npx6 } = detectPackageManager();
|
|
@@ -123402,7 +123702,7 @@ async function login() {
|
|
|
123402
123702
|
}
|
|
123403
123703
|
|
|
123404
123704
|
// src/wrangler/accounts.ts
|
|
123405
|
-
|
|
123705
|
+
async function chooseAccount(ctx) {
|
|
123406
123706
|
const accountIdFromEnv = process.env.CLOUDFLARE_ACCOUNT_ID;
|
|
123407
123707
|
if (accountIdFromEnv) {
|
|
123408
123708
|
updateStatus(`Using CLOUDFLARE_ACCOUNT_ID from the environment`);
|
|
@@ -123412,39 +123712,38 @@ var chooseAccount = async (ctx) => {
|
|
|
123412
123712
|
const s = spinner();
|
|
123413
123713
|
s.start(`Selecting Cloudflare account ${dim("retrieving accounts")}`);
|
|
123414
123714
|
const accounts = usesCfCli(ctx.project.path) ? await listAccounts() : await listAccounts2();
|
|
123415
|
-
|
|
123416
|
-
const numAccounts = Object.keys(accounts).length;
|
|
123417
|
-
if (numAccounts === 0) {
|
|
123715
|
+
if (accounts.length === 0) {
|
|
123418
123716
|
throw new Error(
|
|
123419
123717
|
"Unable to find any accounts to deploy to! Please ensure you're logged in as a user that can deploy Workers."
|
|
123420
123718
|
);
|
|
123421
|
-
}
|
|
123422
|
-
|
|
123423
|
-
|
|
123424
|
-
|
|
123719
|
+
}
|
|
123720
|
+
let account;
|
|
123721
|
+
if (accounts.length === 1) {
|
|
123722
|
+
account = accounts[0];
|
|
123723
|
+
s.stop(`${brandColor("account")} ${dim(account.name)}`);
|
|
123425
123724
|
} else {
|
|
123426
123725
|
s.stop(
|
|
123427
123726
|
`${brandColor("account")} ${dim("more than one account available")}`
|
|
123428
123727
|
);
|
|
123429
|
-
const accountOptions =
|
|
123430
|
-
|
|
123431
|
-
|
|
123432
|
-
|
|
123433
|
-
|
|
123434
|
-
);
|
|
123435
|
-
accountId = await inputPrompt({
|
|
123728
|
+
const accountOptions = accounts.map(({ name: name3, id }) => ({
|
|
123729
|
+
label: `${name3} (${id})`,
|
|
123730
|
+
value: id
|
|
123731
|
+
}));
|
|
123732
|
+
const accountId = await inputPrompt({
|
|
123436
123733
|
type: "select",
|
|
123437
123734
|
question: "Which account do you want to use?",
|
|
123438
123735
|
options: accountOptions,
|
|
123439
123736
|
label: "account",
|
|
123440
123737
|
defaultValue: accountOptions[0].value
|
|
123441
123738
|
});
|
|
123739
|
+
const selectedAccount = accounts.find(({ id }) => id === accountId);
|
|
123740
|
+
if (!selectedAccount) {
|
|
123741
|
+
throw new Error("Unable to find the selected Cloudflare account.");
|
|
123742
|
+
}
|
|
123743
|
+
account = selectedAccount;
|
|
123442
123744
|
}
|
|
123443
|
-
|
|
123444
|
-
|
|
123445
|
-
);
|
|
123446
|
-
ctx.account = { id: accountId, name: accountName };
|
|
123447
|
-
};
|
|
123745
|
+
ctx.account = account;
|
|
123746
|
+
}
|
|
123448
123747
|
var login2 = async (ctx) => {
|
|
123449
123748
|
return reporter.collectAsyncMetrics({
|
|
123450
123749
|
eventPrefix: "c3 login",
|
|
@@ -123486,20 +123785,20 @@ var login2 = async (ctx) => {
|
|
|
123486
123785
|
}
|
|
123487
123786
|
});
|
|
123488
123787
|
};
|
|
123489
|
-
|
|
123788
|
+
async function listAccounts2() {
|
|
123490
123789
|
const { npx: npx6 } = detectPackageManager();
|
|
123491
123790
|
const output2 = await runWranglerCommand([npx6, "wrangler", "whoami"], {
|
|
123492
123791
|
silent: true
|
|
123493
123792
|
});
|
|
123494
|
-
const accounts =
|
|
123793
|
+
const accounts = [];
|
|
123495
123794
|
output2.split("\n").forEach((line) => {
|
|
123496
123795
|
const match = line.match(/│\s+(.+)\s+│\s+(\w{32})\s+│/);
|
|
123497
123796
|
if (match) {
|
|
123498
|
-
accounts
|
|
123797
|
+
accounts.push({ name: match[1].trim(), id: match[2].trim() });
|
|
123499
123798
|
}
|
|
123500
123799
|
});
|
|
123501
123800
|
return accounts;
|
|
123502
|
-
}
|
|
123801
|
+
}
|
|
123503
123802
|
var isLoggedIn2 = async () => {
|
|
123504
123803
|
const { npx: npx6 } = detectPackageManager();
|
|
123505
123804
|
try {
|
|
@@ -124819,7 +125118,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
124819
125118
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
124820
125119
|
|
|
124821
125120
|
// ../wrangler/package.json
|
|
124822
|
-
var version3 = "4.156.
|
|
125121
|
+
var version3 = "4.156.2";
|
|
124823
125122
|
|
|
124824
125123
|
// src/git.ts
|
|
124825
125124
|
var offerGit = async (ctx) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.74.
|
|
3
|
+
"version": "2.74.7",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/types": "^7.21.4",
|
|
33
33
|
"@clack/prompts": "^1.2.0",
|
|
34
34
|
"@cloudflare/vite-plugin": "npm:@cloudflare/vite-plugin@1.63.2",
|
|
35
|
-
"@cloudflare/workers-types": "^5.
|
|
35
|
+
"@cloudflare/workers-types": "^5.20261102.1",
|
|
36
36
|
"@types/command-exists": "^1.2.0",
|
|
37
37
|
"@types/cross-spawn": "^6.0.2",
|
|
38
38
|
"@types/deepmerge": "^2.2.0",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"which-pm-runs": "^1.1.0",
|
|
72
72
|
"wrap-ansi": "^9.0.0",
|
|
73
73
|
"yargs": "^17.7.2",
|
|
74
|
-
"@cloudflare/cli-shared-helpers": "0.3.
|
|
74
|
+
"@cloudflare/cli-shared-helpers": "0.3.2",
|
|
75
75
|
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
76
76
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
77
|
-
"@cloudflare/workers-utils": "0.50.1",
|
|
78
77
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
79
|
-
"
|
|
78
|
+
"@cloudflare/workers-utils": "0.51.0",
|
|
79
|
+
"wrangler": "4.156.2"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=22.0.0"
|