create-cloudflare 2.74.11 → 2.74.12
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 +84 -40
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -111064,7 +111064,7 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
111064
111064
|
// TODO: Miniflare currently ignores `remote: true` on queues, tracked in #13727.
|
|
111065
111065
|
queue: "local-and-remote",
|
|
111066
111066
|
flagship: "local-and-remote",
|
|
111067
|
-
artifacts: "
|
|
111067
|
+
artifacts: "local-and-remote",
|
|
111068
111068
|
analytics_engine: "local-and-remote",
|
|
111069
111069
|
vectorize: "remote",
|
|
111070
111070
|
mtls_certificate: "remote",
|
|
@@ -111094,32 +111094,17 @@ function resolveBindingRemote(type, remote, { remoteBindingsDisabled = false } =
|
|
|
111094
111094
|
return true;
|
|
111095
111095
|
case "local-only":
|
|
111096
111096
|
return false;
|
|
111097
|
-
case "remote-default-with-local-opt-in":
|
|
111098
|
-
return !remoteBindingsDisabled && remote !== false;
|
|
111099
111097
|
case "local-and-remote":
|
|
111100
111098
|
case "remote":
|
|
111101
111099
|
return !remoteBindingsDisabled && remote === true;
|
|
111102
111100
|
}
|
|
111103
111101
|
}
|
|
111104
111102
|
__name(resolveBindingRemote, "resolveBindingRemote");
|
|
111105
|
-
function validateBindingRemoteSetting(type, remote, warn2
|
|
111106
|
-
binding,
|
|
111107
|
-
remoteBindingsDisabled = false,
|
|
111108
|
-
configFormat: configFormat2 = "wrangler"
|
|
111109
|
-
} = {}) {
|
|
111110
|
-
const remoteSetting = /* @__PURE__ */ __name((value) => configFormat2 === "cloudflare-config" ? `\`dev: { remote: ${value} }\`` : `\`remote: ${value}\``, "remoteSetting");
|
|
111103
|
+
function validateBindingRemoteSetting(type, remote, warn2) {
|
|
111111
111104
|
const support = getBindingLocalSupport(type);
|
|
111112
111105
|
switch (support) {
|
|
111113
111106
|
case "local-and-remote":
|
|
111114
111107
|
return;
|
|
111115
|
-
case "remote-default-with-local-opt-in":
|
|
111116
|
-
if (remote === void 0 && !remoteBindingsDisabled) {
|
|
111117
|
-
const subject = binding === void 0 ? `${getBindingTypeFriendlyName(type)} bindings use` : `${getBindingTypeFriendlyName(type)} binding ${binding} uses`;
|
|
111118
|
-
warn2(
|
|
111119
|
-
`${subject} the deployed resource. Set ${remoteSetting(false)} to use the local simulator, or ${remoteSetting(true)} to silence this warning.`
|
|
111120
|
-
);
|
|
111121
|
-
}
|
|
111122
|
-
return;
|
|
111123
111108
|
case "local-only":
|
|
111124
111109
|
if (remote === true) {
|
|
111125
111110
|
throw new UserError(
|
|
@@ -111163,6 +111148,24 @@ function validateBindingRemoteSetting(type, remote, warn2, {
|
|
|
111163
111148
|
}
|
|
111164
111149
|
}
|
|
111165
111150
|
__name(validateBindingRemoteSetting, "validateBindingRemoteSetting");
|
|
111151
|
+
function createArtifactsLocalDefaultWarner(configFormat2) {
|
|
111152
|
+
const remoteSetting = /* @__PURE__ */ __name((value) => configFormat2 === "cloudflare-config" ? `\`dev: { remote: ${value} }\`` : `\`remote: ${value}\``, "remoteSetting");
|
|
111153
|
+
const warned = /* @__PURE__ */ new Set();
|
|
111154
|
+
return ({ id, bindings }, warn2) => {
|
|
111155
|
+
for (const { name: name3, remote, worker } of bindings) {
|
|
111156
|
+
const key = JSON.stringify([id, worker ?? null, name3]);
|
|
111157
|
+
if (remote !== void 0 || warned.has(key)) {
|
|
111158
|
+
continue;
|
|
111159
|
+
}
|
|
111160
|
+
warned.add(key);
|
|
111161
|
+
const subject = worker === void 0 ? name3 : `${name3} in Worker ${worker}`;
|
|
111162
|
+
warn2(
|
|
111163
|
+
`Artifacts binding ${subject} uses the local simulator by default. Set ${remoteSetting(true)} to use deployed repos, or ${remoteSetting(false)} to silence this warning.`
|
|
111164
|
+
);
|
|
111165
|
+
}
|
|
111166
|
+
};
|
|
111167
|
+
}
|
|
111168
|
+
__name(createArtifactsLocalDefaultWarner, "createArtifactsLocalDefaultWarner");
|
|
111166
111169
|
var supportedPagesConfigFields = [
|
|
111167
111170
|
"pages_build_output_dir",
|
|
111168
111171
|
"name",
|
|
@@ -111335,14 +111338,10 @@ function getInstalledPackageVersion(packageName, projectPath, opts = {}) {
|
|
|
111335
111338
|
return void 0;
|
|
111336
111339
|
}
|
|
111337
111340
|
const lastDir = opts.stopAtProjectPath === true ? projectPath : void 0;
|
|
111338
|
-
const
|
|
111339
|
-
if (!
|
|
111341
|
+
const packageJson = findPackageRootManifest(packagePath, lastDir);
|
|
111342
|
+
if (!packageJson) {
|
|
111340
111343
|
return void 0;
|
|
111341
111344
|
}
|
|
111342
|
-
const packageJson = parsePackageJSON(
|
|
111343
|
-
readFileSync(packageJsonPath),
|
|
111344
|
-
packageJsonPath
|
|
111345
|
-
);
|
|
111346
111345
|
if (packageJson.name !== packageName) {
|
|
111347
111346
|
const bundledVersion = packageJson.bundledVersions?.[packageName];
|
|
111348
111347
|
if (bundledVersion !== void 0) {
|
|
@@ -111354,29 +111353,27 @@ function getInstalledPackageVersion(packageName, projectPath, opts = {}) {
|
|
|
111354
111353
|
}
|
|
111355
111354
|
}
|
|
111356
111355
|
__name(getInstalledPackageVersion, "getInstalledPackageVersion");
|
|
111357
|
-
function
|
|
111356
|
+
function findPackageRootManifest(startDir, lastDir) {
|
|
111358
111357
|
let dir2 = startDir;
|
|
111359
|
-
const root = import_node_path5.default.parse(dir2).root;
|
|
111360
111358
|
while (true) {
|
|
111361
|
-
const
|
|
111362
|
-
|
|
111363
|
-
|
|
111364
|
-
|
|
111359
|
+
const packageJsonPath = import_node_path5.default.join(dir2, "package.json");
|
|
111360
|
+
if ((0, import_node_fs4.statSync)(packageJsonPath, { throwIfNoEntry: false })?.isFile()) {
|
|
111361
|
+
const packageJson = parsePackageJSON(
|
|
111362
|
+
readFileSync(packageJsonPath),
|
|
111363
|
+
packageJsonPath
|
|
111364
|
+
);
|
|
111365
|
+
if (packageJson.name !== void 0) {
|
|
111366
|
+
return packageJson.version !== void 0 ? packageJson : void 0;
|
|
111365
111367
|
}
|
|
111366
|
-
} catch {
|
|
111367
|
-
}
|
|
111368
|
-
if (lastDir !== void 0 && dir2 === lastDir) {
|
|
111369
|
-
break;
|
|
111370
111368
|
}
|
|
111371
111369
|
const parent = import_node_path5.default.dirname(dir2);
|
|
111372
|
-
if (parent === dir2 ||
|
|
111373
|
-
|
|
111370
|
+
if (dir2 === lastDir || parent === dir2 || import_node_path5.default.basename(parent) === "node_modules" || import_node_path5.default.basename(parent).startsWith("@") && import_node_path5.default.basename(import_node_path5.default.dirname(parent)) === "node_modules") {
|
|
111371
|
+
return void 0;
|
|
111374
111372
|
}
|
|
111375
111373
|
dir2 = parent;
|
|
111376
111374
|
}
|
|
111377
|
-
return void 0;
|
|
111378
111375
|
}
|
|
111379
|
-
__name(
|
|
111376
|
+
__name(findPackageRootManifest, "findPackageRootManifest");
|
|
111380
111377
|
function mapWorkerMetadataBindings(bindings) {
|
|
111381
111378
|
return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
|
|
111382
111379
|
switch (binding.type) {
|
|
@@ -111794,7 +111791,7 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
111794
111791
|
}, {});
|
|
111795
111792
|
}
|
|
111796
111793
|
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
111797
|
-
var DEFAULT_COMPAT_DATE = "2026-11-
|
|
111794
|
+
var DEFAULT_COMPAT_DATE = "2026-11-13";
|
|
111798
111795
|
function constructWranglerConfig(config50) {
|
|
111799
111796
|
const mappedBindings = mapWorkerMetadataBindings(config50.bindings);
|
|
111800
111797
|
const durableObjectClassNames = config50.bindings.filter(
|
|
@@ -113451,6 +113448,53 @@ function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
|
|
|
113451
113448
|
};
|
|
113452
113449
|
}
|
|
113453
113450
|
__name(getWranglerTmpDir, "getWranglerTmpDir");
|
|
113451
|
+
var MetricsRegistry = class {
|
|
113452
|
+
static {
|
|
113453
|
+
__name(this, "MetricsRegistry");
|
|
113454
|
+
}
|
|
113455
|
+
counters = [];
|
|
113456
|
+
/**
|
|
113457
|
+
* Create and register a new counter metric.
|
|
113458
|
+
*
|
|
113459
|
+
* @param name - The metric name (e.g. "service_request_total")
|
|
113460
|
+
* @param help - A human-readable description of the metric
|
|
113461
|
+
* @returns A Counter that can be incremented
|
|
113462
|
+
*/
|
|
113463
|
+
createCounter(name3, help) {
|
|
113464
|
+
const entry = { name: name3, help, value: 0 };
|
|
113465
|
+
this.counters.push(entry);
|
|
113466
|
+
return {
|
|
113467
|
+
inc: /* @__PURE__ */ __name(() => {
|
|
113468
|
+
entry.value++;
|
|
113469
|
+
}, "inc"),
|
|
113470
|
+
add: /* @__PURE__ */ __name((amount) => {
|
|
113471
|
+
if (amount < 0) {
|
|
113472
|
+
throw new Error("Counter value cannot decrease");
|
|
113473
|
+
}
|
|
113474
|
+
entry.value += amount;
|
|
113475
|
+
}, "add")
|
|
113476
|
+
};
|
|
113477
|
+
}
|
|
113478
|
+
/**
|
|
113479
|
+
* Serialize all registered metrics in Prometheus text exposition format.
|
|
113480
|
+
*
|
|
113481
|
+
* @see https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format
|
|
113482
|
+
*/
|
|
113483
|
+
metrics() {
|
|
113484
|
+
return this.counters.map((c2) => {
|
|
113485
|
+
let result = "";
|
|
113486
|
+
if (c2.help.length > 0) {
|
|
113487
|
+
result += `# HELP ${c2.name} ${c2.help}
|
|
113488
|
+
`;
|
|
113489
|
+
}
|
|
113490
|
+
result += `# TYPE ${c2.name} counter
|
|
113491
|
+
`;
|
|
113492
|
+
result += `${c2.name} ${c2.value}
|
|
113493
|
+
`;
|
|
113494
|
+
return result;
|
|
113495
|
+
}).join("");
|
|
113496
|
+
}
|
|
113497
|
+
};
|
|
113454
113498
|
function buildDetailedError(message, ...extra) {
|
|
113455
113499
|
return new ParseError({
|
|
113456
113500
|
text: message,
|
|
@@ -120424,7 +120468,7 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
120424
120468
|
var yargs_default = Yargs;
|
|
120425
120469
|
|
|
120426
120470
|
// package.json
|
|
120427
|
-
var version2 = "2.74.
|
|
120471
|
+
var version2 = "2.74.12";
|
|
120428
120472
|
|
|
120429
120473
|
// src/metrics.ts
|
|
120430
120474
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -125921,7 +125965,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
125921
125965
|
var import_node_assert7 = __toESM(require("node:assert"));
|
|
125922
125966
|
|
|
125923
125967
|
// ../wrangler/package.json
|
|
125924
|
-
var version3 = "4.
|
|
125968
|
+
var version3 = "4.162.0";
|
|
125925
125969
|
|
|
125926
125970
|
// src/git.ts
|
|
125927
125971
|
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.12",
|
|
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.20261113.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/mock-npm-registry": "0.0.0",
|
|
74
|
+
"@cloudflare/cli-shared-helpers": "0.3.8",
|
|
76
75
|
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
77
76
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
78
|
-
"@cloudflare/
|
|
79
|
-
"
|
|
77
|
+
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
78
|
+
"@cloudflare/workers-utils": "0.54.0",
|
|
79
|
+
"wrangler": "4.162.0"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=22.0.0"
|