create-cloudflare 2.74.5 → 2.74.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +27 -28
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -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-01";
|
|
111007
111007
|
function constructWranglerConfig(config50) {
|
|
111008
111008
|
const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
|
|
111009
111009
|
const durableObjectClassNames = config50.bindings.filter(
|
|
@@ -119322,7 +119322,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
119322
119322
|
var yargs_default = Yargs;
|
|
119323
119323
|
|
|
119324
119324
|
// package.json
|
|
119325
|
-
var version2 = "2.74.
|
|
119325
|
+
var version2 = "2.74.6";
|
|
119326
119326
|
|
|
119327
119327
|
// src/metrics.ts
|
|
119328
119328
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -123386,7 +123386,7 @@ async function isLoggedIn() {
|
|
|
123386
123386
|
}
|
|
123387
123387
|
async function listAccounts() {
|
|
123388
123388
|
const { accounts = [] } = await cfWhoami();
|
|
123389
|
-
return
|
|
123389
|
+
return accounts;
|
|
123390
123390
|
}
|
|
123391
123391
|
async function login() {
|
|
123392
123392
|
const { npx: npx6 } = detectPackageManager();
|
|
@@ -123402,7 +123402,7 @@ async function login() {
|
|
|
123402
123402
|
}
|
|
123403
123403
|
|
|
123404
123404
|
// src/wrangler/accounts.ts
|
|
123405
|
-
|
|
123405
|
+
async function chooseAccount(ctx) {
|
|
123406
123406
|
const accountIdFromEnv = process.env.CLOUDFLARE_ACCOUNT_ID;
|
|
123407
123407
|
if (accountIdFromEnv) {
|
|
123408
123408
|
updateStatus(`Using CLOUDFLARE_ACCOUNT_ID from the environment`);
|
|
@@ -123412,39 +123412,38 @@ var chooseAccount = async (ctx) => {
|
|
|
123412
123412
|
const s = spinner();
|
|
123413
123413
|
s.start(`Selecting Cloudflare account ${dim("retrieving accounts")}`);
|
|
123414
123414
|
const accounts = usesCfCli(ctx.project.path) ? await listAccounts() : await listAccounts2();
|
|
123415
|
-
|
|
123416
|
-
const numAccounts = Object.keys(accounts).length;
|
|
123417
|
-
if (numAccounts === 0) {
|
|
123415
|
+
if (accounts.length === 0) {
|
|
123418
123416
|
throw new Error(
|
|
123419
123417
|
"Unable to find any accounts to deploy to! Please ensure you're logged in as a user that can deploy Workers."
|
|
123420
123418
|
);
|
|
123421
|
-
}
|
|
123422
|
-
|
|
123423
|
-
|
|
123424
|
-
|
|
123419
|
+
}
|
|
123420
|
+
let account;
|
|
123421
|
+
if (accounts.length === 1) {
|
|
123422
|
+
account = accounts[0];
|
|
123423
|
+
s.stop(`${brandColor("account")} ${dim(account.name)}`);
|
|
123425
123424
|
} else {
|
|
123426
123425
|
s.stop(
|
|
123427
123426
|
`${brandColor("account")} ${dim("more than one account available")}`
|
|
123428
123427
|
);
|
|
123429
|
-
const accountOptions =
|
|
123430
|
-
|
|
123431
|
-
|
|
123432
|
-
|
|
123433
|
-
|
|
123434
|
-
);
|
|
123435
|
-
accountId = await inputPrompt({
|
|
123428
|
+
const accountOptions = accounts.map(({ name: name3, id }) => ({
|
|
123429
|
+
label: `${name3} (${id})`,
|
|
123430
|
+
value: id
|
|
123431
|
+
}));
|
|
123432
|
+
const accountId = await inputPrompt({
|
|
123436
123433
|
type: "select",
|
|
123437
123434
|
question: "Which account do you want to use?",
|
|
123438
123435
|
options: accountOptions,
|
|
123439
123436
|
label: "account",
|
|
123440
123437
|
defaultValue: accountOptions[0].value
|
|
123441
123438
|
});
|
|
123439
|
+
const selectedAccount = accounts.find(({ id }) => id === accountId);
|
|
123440
|
+
if (!selectedAccount) {
|
|
123441
|
+
throw new Error("Unable to find the selected Cloudflare account.");
|
|
123442
|
+
}
|
|
123443
|
+
account = selectedAccount;
|
|
123442
123444
|
}
|
|
123443
|
-
|
|
123444
|
-
|
|
123445
|
-
);
|
|
123446
|
-
ctx.account = { id: accountId, name: accountName };
|
|
123447
|
-
};
|
|
123445
|
+
ctx.account = account;
|
|
123446
|
+
}
|
|
123448
123447
|
var login2 = async (ctx) => {
|
|
123449
123448
|
return reporter.collectAsyncMetrics({
|
|
123450
123449
|
eventPrefix: "c3 login",
|
|
@@ -123486,20 +123485,20 @@ var login2 = async (ctx) => {
|
|
|
123486
123485
|
}
|
|
123487
123486
|
});
|
|
123488
123487
|
};
|
|
123489
|
-
|
|
123488
|
+
async function listAccounts2() {
|
|
123490
123489
|
const { npx: npx6 } = detectPackageManager();
|
|
123491
123490
|
const output2 = await runWranglerCommand([npx6, "wrangler", "whoami"], {
|
|
123492
123491
|
silent: true
|
|
123493
123492
|
});
|
|
123494
|
-
const accounts =
|
|
123493
|
+
const accounts = [];
|
|
123495
123494
|
output2.split("\n").forEach((line) => {
|
|
123496
123495
|
const match = line.match(/│\s+(.+)\s+│\s+(\w{32})\s+│/);
|
|
123497
123496
|
if (match) {
|
|
123498
|
-
accounts
|
|
123497
|
+
accounts.push({ name: match[1].trim(), id: match[2].trim() });
|
|
123499
123498
|
}
|
|
123500
123499
|
});
|
|
123501
123500
|
return accounts;
|
|
123502
|
-
}
|
|
123501
|
+
}
|
|
123503
123502
|
var isLoggedIn2 = async () => {
|
|
123504
123503
|
const { npx: npx6 } = detectPackageManager();
|
|
123505
123504
|
try {
|
|
@@ -124819,7 +124818,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
124819
124818
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
124820
124819
|
|
|
124821
124820
|
// ../wrangler/package.json
|
|
124822
|
-
var version3 = "4.156.
|
|
124821
|
+
var version3 = "4.156.1";
|
|
124823
124822
|
|
|
124824
124823
|
// src/git.ts
|
|
124825
124824
|
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.6",
|
|
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.20261101.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.
|
|
75
|
-
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
74
|
+
"@cloudflare/cli-shared-helpers": "0.3.1",
|
|
76
75
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
77
|
-
"@cloudflare/
|
|
76
|
+
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
77
|
+
"wrangler": "4.156.1",
|
|
78
78
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
79
|
-
"
|
|
79
|
+
"@cloudflare/workers-utils": "0.50.2"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=22.0.0"
|