create-cloudflare 2.70.0 → 2.70.1
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 +147 -92
- package/package.json +7 -7
- package/templates/angular/pages/c3.ts +1 -1
- package/templates/angular/workers/c3.ts +1 -1
package/dist/cli.js
CHANGED
|
@@ -74415,11 +74415,6 @@ var stderr = process.stderr;
|
|
|
74415
74415
|
// ../cli/dist/check-macos-version.mjs
|
|
74416
74416
|
var import_node_os3 = __toESM(require("node:os"), 1);
|
|
74417
74417
|
|
|
74418
|
-
// ../workers-utils/dist/chunk-OZQVB3L3.mjs
|
|
74419
|
-
var SERVICE_TAG_PREFIX = "cf:service=";
|
|
74420
|
-
var ENVIRONMENT_TAG_PREFIX = "cf:environment=";
|
|
74421
|
-
var PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
|
|
74422
|
-
|
|
74423
74418
|
// ../workers-utils/dist/chunk-DCOBXSFB.mjs
|
|
74424
74419
|
var __create2 = Object.create;
|
|
74425
74420
|
var __defProp2 = Object.defineProperty;
|
|
@@ -74459,7 +74454,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
|
|
|
74459
74454
|
mod
|
|
74460
74455
|
));
|
|
74461
74456
|
|
|
74462
|
-
// ../workers-utils/dist/chunk-
|
|
74457
|
+
// ../workers-utils/dist/chunk-J6D57QVQ.mjs
|
|
74463
74458
|
var import_node_assert = __toESM(require("node:assert"), 1);
|
|
74464
74459
|
function isCompatDate(str) {
|
|
74465
74460
|
return /^\d{4}-\d{2}-\d{2}$/.test(str);
|
|
@@ -74754,9 +74749,9 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
74754
74749
|
}
|
|
74755
74750
|
];
|
|
74756
74751
|
break;
|
|
74757
|
-
case "
|
|
74752
|
+
case "websearch":
|
|
74758
74753
|
{
|
|
74759
|
-
configObj.
|
|
74754
|
+
configObj.websearch = {
|
|
74760
74755
|
binding: binding.name
|
|
74761
74756
|
};
|
|
74762
74757
|
}
|
|
@@ -74889,7 +74884,7 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
74889
74884
|
}, {});
|
|
74890
74885
|
}
|
|
74891
74886
|
__name(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
|
|
74892
|
-
function
|
|
74887
|
+
function constructWranglerConfig(config49) {
|
|
74893
74888
|
const mappedBindings = mapWorkerMetadataBindings(config49.bindings);
|
|
74894
74889
|
const durableObjectClassNames = config49.bindings.filter(
|
|
74895
74890
|
(binding) => binding.type === "durable_object_namespace" && binding.script_name === config49.name
|
|
@@ -74937,45 +74932,9 @@ function convertWorkerToWranglerConfig(config49) {
|
|
|
74937
74932
|
...mappedBindings
|
|
74938
74933
|
};
|
|
74939
74934
|
}
|
|
74940
|
-
__name(convertWorkerToWranglerConfig, "convertWorkerToWranglerConfig");
|
|
74941
|
-
function constructWranglerConfig(workerOrWorkers) {
|
|
74942
|
-
let workers;
|
|
74943
|
-
if (Array.isArray(workerOrWorkers)) {
|
|
74944
|
-
workers = workerOrWorkers;
|
|
74945
|
-
} else {
|
|
74946
|
-
workers = [workerOrWorkers];
|
|
74947
|
-
}
|
|
74948
|
-
const topLevelEnv = workers.find(
|
|
74949
|
-
(w2) => !w2.tags?.some((t2) => t2.startsWith(ENVIRONMENT_TAG_PREFIX))
|
|
74950
|
-
);
|
|
74951
|
-
const workerName = topLevelEnv?.name ?? workers[0].name;
|
|
74952
|
-
const entrypoint = topLevelEnv?.entrypoint ?? workers[0].entrypoint;
|
|
74953
|
-
let combinedConfig;
|
|
74954
|
-
if (topLevelEnv) {
|
|
74955
|
-
combinedConfig = convertWorkerToWranglerConfig(topLevelEnv);
|
|
74956
|
-
} else {
|
|
74957
|
-
combinedConfig = {
|
|
74958
|
-
name: workerName,
|
|
74959
|
-
main: entrypoint
|
|
74960
|
-
};
|
|
74961
|
-
}
|
|
74962
|
-
for (const env3 of workers) {
|
|
74963
|
-
const serviceTag = env3.tags?.find(
|
|
74964
|
-
(t2) => t2 === `${SERVICE_TAG_PREFIX}${workerName}`
|
|
74965
|
-
);
|
|
74966
|
-
const envTag = env3.tags?.find((t2) => t2.startsWith(ENVIRONMENT_TAG_PREFIX));
|
|
74967
|
-
if (serviceTag !== `${SERVICE_TAG_PREFIX}${workerName}` || envTag === void 0) {
|
|
74968
|
-
continue;
|
|
74969
|
-
}
|
|
74970
|
-
const [_2, envName] = envTag.split("=");
|
|
74971
|
-
combinedConfig.env ??= {};
|
|
74972
|
-
combinedConfig.env[envName] = convertWorkerToWranglerConfig(env3);
|
|
74973
|
-
}
|
|
74974
|
-
return combinedConfig;
|
|
74975
|
-
}
|
|
74976
74935
|
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
74977
74936
|
|
|
74978
|
-
// ../workers-utils/dist/chunk-
|
|
74937
|
+
// ../workers-utils/dist/chunk-ULVYGN52.mjs
|
|
74979
74938
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
74980
74939
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
74981
74940
|
var UserError = class extends Error {
|
|
@@ -77596,6 +77555,7 @@ function removeBOMAndValidate(buffer, file2) {
|
|
|
77596
77555
|
return content;
|
|
77597
77556
|
}
|
|
77598
77557
|
__name(removeBOMAndValidate, "removeBOMAndValidate");
|
|
77558
|
+
var PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
|
|
77599
77559
|
function absolute(input, root) {
|
|
77600
77560
|
return (0, import_node_path.isAbsolute)(input) ? input : (0, import_node_path.resolve)(root || ".", input);
|
|
77601
77561
|
}
|
|
@@ -77840,6 +77800,7 @@ var import_node_crypto = require("node:crypto");
|
|
|
77840
77800
|
var import_undici = __toESM(require_undici(), 1);
|
|
77841
77801
|
var import_node_url = require("node:url");
|
|
77842
77802
|
var timersPromises = __toESM(require("node:timers/promises"), 1);
|
|
77803
|
+
var import_promises = require("node:timers/promises");
|
|
77843
77804
|
var require_XDGAppPaths = __commonJS2({
|
|
77844
77805
|
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
|
|
77845
77806
|
exports2.__esModule = true;
|
|
@@ -79688,7 +79649,7 @@ var defaultWranglerConfig = {
|
|
|
79688
79649
|
vectorize: [],
|
|
79689
79650
|
ai_search_namespaces: [],
|
|
79690
79651
|
ai_search: [],
|
|
79691
|
-
|
|
79652
|
+
websearch: void 0,
|
|
79692
79653
|
agent_memory: [],
|
|
79693
79654
|
hyperdrive: [],
|
|
79694
79655
|
workflows: [],
|
|
@@ -84293,7 +84254,7 @@ var friendlyBindingNames = {
|
|
|
84293
84254
|
vectorize: "Vectorize Index",
|
|
84294
84255
|
ai_search_namespaces: "AI Search Namespace",
|
|
84295
84256
|
ai_search: "AI Search Instance",
|
|
84296
|
-
|
|
84257
|
+
websearch: "Web Search",
|
|
84297
84258
|
agent_memory: "Agent Memory",
|
|
84298
84259
|
hyperdrive: "Hyperdrive Config",
|
|
84299
84260
|
r2_buckets: "R2 Bucket",
|
|
@@ -84347,7 +84308,7 @@ var bindingTypeFriendlyNames = {
|
|
|
84347
84308
|
vectorize: "Vectorize Index",
|
|
84348
84309
|
ai_search_namespace: "AI Search Namespace",
|
|
84349
84310
|
ai_search: "AI Search Instance",
|
|
84350
|
-
|
|
84311
|
+
websearch: "Web Search",
|
|
84351
84312
|
agent_memory: "Agent Memory",
|
|
84352
84313
|
hyperdrive: "Hyperdrive Config",
|
|
84353
84314
|
service: "Worker",
|
|
@@ -85019,8 +84980,8 @@ function normalizeAndValidateRoute(diagnostics, topLevelEnv, rawEnv) {
|
|
|
85019
84980
|
);
|
|
85020
84981
|
}
|
|
85021
84982
|
__name(normalizeAndValidateRoute, "normalizeAndValidateRoute");
|
|
85022
|
-
function validateRoutes(diagnostics, topLevelEnv, rawEnv) {
|
|
85023
|
-
|
|
84983
|
+
function validateRoutes(diagnostics, topLevelEnv, rawEnv, envName) {
|
|
84984
|
+
const result = inheritable(
|
|
85024
84985
|
diagnostics,
|
|
85025
84986
|
topLevelEnv,
|
|
85026
84987
|
rawEnv,
|
|
@@ -85028,6 +84989,18 @@ function validateRoutes(diagnostics, topLevelEnv, rawEnv) {
|
|
|
85028
84989
|
all(isRouteArray, isMutuallyExclusiveWith(rawEnv, "route")),
|
|
85029
84990
|
void 0
|
|
85030
84991
|
);
|
|
84992
|
+
if (topLevelEnv !== void 0 && envName !== void 0 && rawEnv.routes === void 0) {
|
|
84993
|
+
const customDomainRoutes = topLevelEnv.routes?.filter(
|
|
84994
|
+
(r2) => typeof r2 === "object" && r2 !== null && r2.custom_domain === true
|
|
84995
|
+
);
|
|
84996
|
+
if (customDomainRoutes && customDomainRoutes.length > 0) {
|
|
84997
|
+
const customDomains = customDomainRoutes.map((r2) => r2.pattern).join(", ");
|
|
84998
|
+
diagnostics.warnings.push(
|
|
84999
|
+
`The "env.${envName}" environment inherits the top-level \`routes\` configuration, which includes the custom domain(s): ${customDomains}. Deploying this environment will reassign these custom domains away from the top-level Worker. Add \`"routes": []\` to "env.${envName}" to prevent inheritance, or copy the route configuration from the top level to hide this warning.`
|
|
85000
|
+
);
|
|
85001
|
+
}
|
|
85002
|
+
}
|
|
85003
|
+
return result;
|
|
85031
85004
|
}
|
|
85032
85005
|
__name(validateRoutes, "validateRoutes");
|
|
85033
85006
|
function normalizeAndValidatePlacement(diagnostics, topLevelEnv, rawEnv) {
|
|
@@ -85243,7 +85216,12 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
85243
85216
|
void 0,
|
|
85244
85217
|
void 0
|
|
85245
85218
|
);
|
|
85246
|
-
const routes = validateRoutes(
|
|
85219
|
+
const routes = validateRoutes(
|
|
85220
|
+
diagnostics,
|
|
85221
|
+
topLevelEnv,
|
|
85222
|
+
rawEnv,
|
|
85223
|
+
topLevelEnv === void 0 ? void 0 : envName
|
|
85224
|
+
);
|
|
85247
85225
|
const workers_dev = inheritable(
|
|
85248
85226
|
diagnostics,
|
|
85249
85227
|
topLevelEnv,
|
|
@@ -85543,13 +85521,13 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
85543
85521
|
validateBindingArray(envName, validateAISearchBinding),
|
|
85544
85522
|
[]
|
|
85545
85523
|
),
|
|
85546
|
-
|
|
85524
|
+
websearch: notInheritable(
|
|
85547
85525
|
diagnostics,
|
|
85548
85526
|
topLevelEnv,
|
|
85549
85527
|
rawConfig,
|
|
85550
85528
|
rawEnv,
|
|
85551
85529
|
envName,
|
|
85552
|
-
"
|
|
85530
|
+
"websearch",
|
|
85553
85531
|
validateNamedSimpleBinding(envName),
|
|
85554
85532
|
void 0
|
|
85555
85533
|
),
|
|
@@ -86646,7 +86624,7 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
|
|
|
86646
86624
|
"ai",
|
|
86647
86625
|
"ai_search_namespace",
|
|
86648
86626
|
"ai_search",
|
|
86649
|
-
"
|
|
86627
|
+
"websearch",
|
|
86650
86628
|
"agent_memory",
|
|
86651
86629
|
"kv_namespace",
|
|
86652
86630
|
"durable_object_namespace",
|
|
@@ -87457,12 +87435,21 @@ var validateD1Binding = /* @__PURE__ */ __name((diagnostics, field, value) => {
|
|
|
87457
87435
|
if (!isRemoteValid(value, field, diagnostics)) {
|
|
87458
87436
|
isValid2 = false;
|
|
87459
87437
|
}
|
|
87438
|
+
if (!isOptionalProperty(value, "migrations_pattern", "string")) {
|
|
87439
|
+
diagnostics.errors.push(
|
|
87440
|
+
`"${field}" bindings should, optionally, have a string "migrations_pattern" field but got ${JSON.stringify(
|
|
87441
|
+
value
|
|
87442
|
+
)}.`
|
|
87443
|
+
);
|
|
87444
|
+
isValid2 = false;
|
|
87445
|
+
}
|
|
87460
87446
|
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
87461
87447
|
"binding",
|
|
87462
87448
|
"database_id",
|
|
87463
87449
|
"database_internal_env",
|
|
87464
87450
|
"database_name",
|
|
87465
87451
|
"migrations_dir",
|
|
87452
|
+
"migrations_pattern",
|
|
87466
87453
|
"migrations_table",
|
|
87467
87454
|
"preview_database_id",
|
|
87468
87455
|
"remote"
|
|
@@ -89054,7 +89041,7 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
89054
89041
|
flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89055
89042
|
vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89056
89043
|
vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89057
|
-
|
|
89044
|
+
websearch: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
89058
89045
|
agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
|
|
89059
89046
|
};
|
|
89060
89047
|
function getBindingLocalSupport(type) {
|
|
@@ -90370,6 +90357,74 @@ async function fetchLatestNpmVersion(name3, version3) {
|
|
|
90370
90357
|
return { status: "update-available", latest: result.latest };
|
|
90371
90358
|
}
|
|
90372
90359
|
__name(fetchLatestNpmVersion, "fetchLatestNpmVersion");
|
|
90360
|
+
var MAX_ATTEMPTS = 3;
|
|
90361
|
+
async function retryOnAPIFailure(action, logger, backoff = 0, attempts = MAX_ATTEMPTS, abortSignal) {
|
|
90362
|
+
try {
|
|
90363
|
+
return await action();
|
|
90364
|
+
} catch (err) {
|
|
90365
|
+
if (err instanceof APIError) {
|
|
90366
|
+
if (!err.isRetryable()) {
|
|
90367
|
+
throw err;
|
|
90368
|
+
}
|
|
90369
|
+
} else if (err instanceof DOMException && err.name === "TimeoutError") ;
|
|
90370
|
+
else if (!(err instanceof TypeError)) {
|
|
90371
|
+
throw err;
|
|
90372
|
+
}
|
|
90373
|
+
logger.debug(`Retrying API call after error...`);
|
|
90374
|
+
logger.debug(err);
|
|
90375
|
+
if (attempts <= 1) {
|
|
90376
|
+
throw err;
|
|
90377
|
+
}
|
|
90378
|
+
await (0, import_promises.setTimeout)(backoff, void 0, { signal: abortSignal });
|
|
90379
|
+
return retryOnAPIFailure(
|
|
90380
|
+
action,
|
|
90381
|
+
logger,
|
|
90382
|
+
backoff + 1e3,
|
|
90383
|
+
attempts - 1,
|
|
90384
|
+
abortSignal
|
|
90385
|
+
);
|
|
90386
|
+
}
|
|
90387
|
+
}
|
|
90388
|
+
__name(retryOnAPIFailure, "retryOnAPIFailure");
|
|
90389
|
+
function formatTime(duration) {
|
|
90390
|
+
return `(${(duration / 1e3).toFixed(2)} sec)`;
|
|
90391
|
+
}
|
|
90392
|
+
__name(formatTime, "formatTime");
|
|
90393
|
+
function getHostFromRoute(route) {
|
|
90394
|
+
let host;
|
|
90395
|
+
if (typeof route === "string") {
|
|
90396
|
+
host = getHostFromUrl(route);
|
|
90397
|
+
} else if (typeof route === "object") {
|
|
90398
|
+
host = getHostFromUrl(route.pattern);
|
|
90399
|
+
if (host === void 0 && "zone_name" in route) {
|
|
90400
|
+
host = getHostFromUrl(route.zone_name);
|
|
90401
|
+
}
|
|
90402
|
+
}
|
|
90403
|
+
return host;
|
|
90404
|
+
}
|
|
90405
|
+
__name(getHostFromRoute, "getHostFromRoute");
|
|
90406
|
+
function getZoneFromRoute(route) {
|
|
90407
|
+
if (typeof route === "object" && "zone_name" in route && route.zone_name) {
|
|
90408
|
+
return route.zone_name;
|
|
90409
|
+
}
|
|
90410
|
+
return getHostFromRoute(route);
|
|
90411
|
+
}
|
|
90412
|
+
__name(getZoneFromRoute, "getZoneFromRoute");
|
|
90413
|
+
function getHostFromUrl(urlLike) {
|
|
90414
|
+
if (urlLike.startsWith("*/") || urlLike.startsWith("http://*/") || urlLike.startsWith("https://*/")) {
|
|
90415
|
+
return void 0;
|
|
90416
|
+
}
|
|
90417
|
+
urlLike = urlLike.replace(/\*(\.)?/g, "");
|
|
90418
|
+
if (!(urlLike.startsWith("http://") || urlLike.startsWith("https://"))) {
|
|
90419
|
+
urlLike = "http://" + urlLike;
|
|
90420
|
+
}
|
|
90421
|
+
try {
|
|
90422
|
+
return new URL(urlLike).host;
|
|
90423
|
+
} catch {
|
|
90424
|
+
return void 0;
|
|
90425
|
+
}
|
|
90426
|
+
}
|
|
90427
|
+
__name(getHostFromUrl, "getHostFromUrl");
|
|
90373
90428
|
|
|
90374
90429
|
// ../cli/dist/check-macos-version.mjs
|
|
90375
90430
|
var import_ci_info = __toESM(require_ci_info(), 1);
|
|
@@ -97337,11 +97392,11 @@ var Yargs = YargsFactory(esm_default2);
|
|
|
97337
97392
|
var yargs_default = Yargs;
|
|
97338
97393
|
|
|
97339
97394
|
// package.json
|
|
97340
|
-
var version = "2.70.
|
|
97395
|
+
var version = "2.70.1";
|
|
97341
97396
|
|
|
97342
97397
|
// src/metrics.ts
|
|
97343
97398
|
var import_node_async_hooks = require("node:async_hooks");
|
|
97344
|
-
var
|
|
97399
|
+
var import_promises2 = require("node:timers/promises");
|
|
97345
97400
|
|
|
97346
97401
|
// src/helpers/metrics-config.ts
|
|
97347
97402
|
var import_node_crypto2 = require("node:crypto");
|
|
@@ -97684,7 +97739,7 @@ function createReporter() {
|
|
|
97684
97739
|
async function collectAsyncMetrics(options) {
|
|
97685
97740
|
const cancelDeferred = promiseWithResolvers();
|
|
97686
97741
|
const cancel2 = async (signal) => {
|
|
97687
|
-
await (0,
|
|
97742
|
+
await (0, import_promises2.setTimeout)(10);
|
|
97688
97743
|
cancelDeferred.reject(new CancelError(`Operation cancelled`, signal));
|
|
97689
97744
|
};
|
|
97690
97745
|
const tracker = !options.disableTelemetry ? createTracker(options.eventPrefix, options.props) : null;
|
|
@@ -97787,7 +97842,7 @@ var runTelemetryCommand = (action) => {
|
|
|
97787
97842
|
|
|
97788
97843
|
// src/templates.ts
|
|
97789
97844
|
var import_node_fs18 = require("node:fs");
|
|
97790
|
-
var
|
|
97845
|
+
var import_promises7 = require("node:fs/promises");
|
|
97791
97846
|
var import_node_os7 = require("node:os");
|
|
97792
97847
|
var import_node_path19 = require("node:path");
|
|
97793
97848
|
var import_deepmerge = __toESM(require_cjs());
|
|
@@ -97803,7 +97858,7 @@ var import_node_path8 = __toESM(require("node:path"));
|
|
|
97803
97858
|
// ../cli/dist/packages.mjs
|
|
97804
97859
|
var import_node_path7 = __toESM(require("node:path"), 1);
|
|
97805
97860
|
var import_node_assert4 = __toESM(require("node:assert"), 1);
|
|
97806
|
-
var
|
|
97861
|
+
var import_promises3 = require("node:fs/promises");
|
|
97807
97862
|
var installPackages = async (packageManager, packages, config49 = {}) => {
|
|
97808
97863
|
const { force, dev, startText, doneText } = config49;
|
|
97809
97864
|
const isWorkspaceRoot = config49.isWorkspaceRoot ?? false;
|
|
@@ -97876,7 +97931,7 @@ var installPackages = async (packageManager, packages, config49 = {}) => {
|
|
|
97876
97931
|
if (pkgVersion !== "latest") deps[pkgName] = pkgVersion;
|
|
97877
97932
|
}
|
|
97878
97933
|
}
|
|
97879
|
-
await (0,
|
|
97934
|
+
await (0, import_promises3.writeFile)(pkgJsonPath, JSON.stringify(pkgJson, null, 2));
|
|
97880
97935
|
}
|
|
97881
97936
|
};
|
|
97882
97937
|
function getWorkspaceInstallRootFlag(packageManager, isWorkspaceRoot) {
|
|
@@ -97933,12 +97988,12 @@ var import_node_process13 = __toESM(require("node:process"), 1);
|
|
|
97933
97988
|
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
97934
97989
|
var import_node_url2 = require("node:url");
|
|
97935
97990
|
var import_node_child_process8 = __toESM(require("node:child_process"), 1);
|
|
97936
|
-
var
|
|
97991
|
+
var import_promises5 = __toESM(require("node:fs/promises"), 1);
|
|
97937
97992
|
|
|
97938
97993
|
// ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
|
|
97939
97994
|
var import_node_util3 = require("node:util");
|
|
97940
97995
|
var import_node_child_process3 = __toESM(require("node:child_process"), 1);
|
|
97941
|
-
var
|
|
97996
|
+
var import_promises4 = __toESM(require("node:fs/promises"), 1);
|
|
97942
97997
|
|
|
97943
97998
|
// ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
|
|
97944
97999
|
var import_node_process7 = __toESM(require("node:process"), 1);
|
|
@@ -98070,14 +98125,14 @@ var wslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
|
98070
98125
|
const configFilePath = "/etc/wsl.conf";
|
|
98071
98126
|
let isConfigFileExists = false;
|
|
98072
98127
|
try {
|
|
98073
|
-
await
|
|
98128
|
+
await import_promises4.default.access(configFilePath, import_promises4.constants.F_OK);
|
|
98074
98129
|
isConfigFileExists = true;
|
|
98075
98130
|
} catch {
|
|
98076
98131
|
}
|
|
98077
98132
|
if (!isConfigFileExists) {
|
|
98078
98133
|
return defaultMountPoint;
|
|
98079
98134
|
}
|
|
98080
|
-
const configContent = await
|
|
98135
|
+
const configContent = await import_promises4.default.readFile(configFilePath, { encoding: "utf8" });
|
|
98081
98136
|
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
98082
98137
|
if (parsedMountPoint === void 0) {
|
|
98083
98138
|
return defaultMountPoint;
|
|
@@ -98097,7 +98152,7 @@ var canAccessPowerShell = async () => {
|
|
|
98097
98152
|
canAccessPowerShellPromise ??= (async () => {
|
|
98098
98153
|
try {
|
|
98099
98154
|
const psPath = await powerShellPath2();
|
|
98100
|
-
await
|
|
98155
|
+
await import_promises4.default.access(psPath, import_promises4.constants.X_OK);
|
|
98101
98156
|
return true;
|
|
98102
98157
|
} catch {
|
|
98103
98158
|
return false;
|
|
@@ -98411,7 +98466,7 @@ var baseOpen = async (options) => {
|
|
|
98411
98466
|
const isBundled = !__dirname3 || __dirname3 === "/";
|
|
98412
98467
|
let exeLocalXdgOpen = false;
|
|
98413
98468
|
try {
|
|
98414
|
-
await
|
|
98469
|
+
await import_promises5.default.access(localXdgOpenPath, import_promises5.constants.X_OK);
|
|
98415
98470
|
exeLocalXdgOpen = true;
|
|
98416
98471
|
} catch {
|
|
98417
98472
|
}
|
|
@@ -99555,15 +99610,15 @@ __name2(getPropertyName, "getPropertyName");
|
|
|
99555
99610
|
var package_default = {
|
|
99556
99611
|
name: "frameworks_clis_info",
|
|
99557
99612
|
dependencies: {
|
|
99558
|
-
"@angular/create": "
|
|
99559
|
-
"@tanstack/cli": "0.
|
|
99560
|
-
"create-analog": "2.
|
|
99613
|
+
"@angular/create": "22.0.0",
|
|
99614
|
+
"@tanstack/cli": "0.69.1",
|
|
99615
|
+
"create-analog": "2.6.0",
|
|
99561
99616
|
"create-astro": "5.0.6",
|
|
99562
99617
|
"create-docusaurus": "3.10.1",
|
|
99563
99618
|
"create-hono": "0.19.4",
|
|
99564
|
-
"create-next-app": "16.2.
|
|
99619
|
+
"create-next-app": "16.2.7",
|
|
99565
99620
|
"create-qwik": "1.20.0",
|
|
99566
|
-
"create-react-router": "7.
|
|
99621
|
+
"create-react-router": "7.17.0",
|
|
99567
99622
|
"create-rwsdk": "3.1.3",
|
|
99568
99623
|
"create-solid": "0.7.0",
|
|
99569
99624
|
"create-vike": "0.0.627",
|
|
@@ -99572,7 +99627,7 @@ var package_default = {
|
|
|
99572
99627
|
"create-waku": "0.12.5-1.0.0-alpha.10-0",
|
|
99573
99628
|
gatsby: "5.16.1",
|
|
99574
99629
|
nuxi: "3.35.2",
|
|
99575
|
-
sv: "0.15.
|
|
99630
|
+
sv: "0.15.4"
|
|
99576
99631
|
},
|
|
99577
99632
|
info: [
|
|
99578
99633
|
"This package.json is only used to keep track of the frameworks cli dependencies",
|
|
@@ -99760,7 +99815,7 @@ function updateAngularJson(ctx) {
|
|
|
99760
99815
|
const architectSection = angularJson.projects[ctx.project.name].architect;
|
|
99761
99816
|
architectSection.build.options.outputPath = "dist";
|
|
99762
99817
|
architectSection.build.options.outputMode = "server";
|
|
99763
|
-
architectSection.build.options.ssr.
|
|
99818
|
+
architectSection.build.options.ssr.platform = "neutral";
|
|
99764
99819
|
architectSection.build.options.assets.push("src/_routes.json");
|
|
99765
99820
|
writeFile3((0, import_node_path13.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
99766
99821
|
s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
|
|
@@ -99846,7 +99901,7 @@ function updateAngularJson2(ctx) {
|
|
|
99846
99901
|
const architectSection = angularJson.projects[ctx.project.name].architect;
|
|
99847
99902
|
architectSection.build.options.outputPath = "dist";
|
|
99848
99903
|
architectSection.build.options.outputMode = "server";
|
|
99849
|
-
architectSection.build.options.ssr.
|
|
99904
|
+
architectSection.build.options.ssr.platform = "neutral";
|
|
99850
99905
|
writeFile3((0, import_node_path14.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
99851
99906
|
s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
|
|
99852
99907
|
}
|
|
@@ -100683,7 +100738,7 @@ var c3_default28 = config25;
|
|
|
100683
100738
|
|
|
100684
100739
|
// templates/pre-existing/c3.ts
|
|
100685
100740
|
var import_node_fs14 = require("node:fs");
|
|
100686
|
-
var
|
|
100741
|
+
var import_promises6 = require("node:fs/promises");
|
|
100687
100742
|
var import_node_os6 = require("node:os");
|
|
100688
100743
|
var import_node_path15 = require("node:path");
|
|
100689
100744
|
|
|
@@ -100815,7 +100870,7 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
100815
100870
|
}
|
|
100816
100871
|
);
|
|
100817
100872
|
}
|
|
100818
|
-
const tempdir = await (0,
|
|
100873
|
+
const tempdir = await (0, import_promises6.mkdtemp)((0, import_node_path15.join)((0, import_node_os6.tmpdir)(), "c3-wrangler-init--from-dash-"));
|
|
100819
100874
|
await runCommand(
|
|
100820
100875
|
[
|
|
100821
100876
|
...dlx,
|
|
@@ -100837,7 +100892,7 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
100837
100892
|
)}`
|
|
100838
100893
|
}
|
|
100839
100894
|
);
|
|
100840
|
-
await (0,
|
|
100895
|
+
await (0, import_promises6.cp)(
|
|
100841
100896
|
(0, import_node_path15.join)(tempdir, ctx.args.existingScript, "src"),
|
|
100842
100897
|
(0, import_node_path15.join)(ctx.project.path, "src"),
|
|
100843
100898
|
{ recursive: true }
|
|
@@ -100847,7 +100902,7 @@ async function copyExistingWorkerFiles(ctx) {
|
|
|
100847
100902
|
for (const configFile of configFiles) {
|
|
100848
100903
|
const sourcePath = (0, import_node_path15.join)(tempdir, ctx.args.existingScript, configFile);
|
|
100849
100904
|
if ((0, import_node_fs14.existsSync)(sourcePath)) {
|
|
100850
|
-
await (0,
|
|
100905
|
+
await (0, import_promises6.cp)(sourcePath, (0, import_node_path15.join)(ctx.project.path, configFile));
|
|
100851
100906
|
configFileCopied = true;
|
|
100852
100907
|
break;
|
|
100853
100908
|
}
|
|
@@ -102049,7 +102104,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
|
|
|
102049
102104
|
var import_node_assert6 = __toESM(require("node:assert"));
|
|
102050
102105
|
|
|
102051
102106
|
// ../wrangler/package.json
|
|
102052
|
-
var version2 = "4.
|
|
102107
|
+
var version2 = "4.99.0";
|
|
102053
102108
|
|
|
102054
102109
|
// src/git.ts
|
|
102055
102110
|
var offerGit = async (ctx) => {
|
|
@@ -102773,10 +102828,10 @@ async function copyTemplateFiles(ctx) {
|
|
|
102773
102828
|
const destdir = (0, import_node_path19.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
|
|
102774
102829
|
const s = spinner();
|
|
102775
102830
|
s.start(`Copying template files`);
|
|
102776
|
-
await (0,
|
|
102831
|
+
await (0, import_promises7.cp)(srcdir, destdir, { recursive: true, force: true });
|
|
102777
102832
|
const dummyGitIgnorePath = (0, import_node_path19.join)(destdir, "__dot__gitignore");
|
|
102778
102833
|
if ((0, import_node_fs18.existsSync)(dummyGitIgnorePath)) {
|
|
102779
|
-
await (0,
|
|
102834
|
+
await (0, import_promises7.rename)(dummyGitIgnorePath, (0, import_node_path19.join)(destdir, ".gitignore"));
|
|
102780
102835
|
}
|
|
102781
102836
|
s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
|
|
102782
102837
|
}
|
|
@@ -102885,7 +102940,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
|
|
|
102885
102940
|
force: true,
|
|
102886
102941
|
mode: options.mode
|
|
102887
102942
|
});
|
|
102888
|
-
const tmpDir = options.intoFolder ?? await (0,
|
|
102943
|
+
const tmpDir = options.intoFolder ?? await (0, import_promises7.mkdtemp)((0, import_node_path19.join)((0, import_node_os7.tmpdir)(), "c3-template"));
|
|
102889
102944
|
await emitter.clone(tmpDir);
|
|
102890
102945
|
return tmpDir;
|
|
102891
102946
|
} catch {
|
|
@@ -103311,12 +103366,12 @@ var processArgument = async (args, key, promptConfig) => {
|
|
|
103311
103366
|
};
|
|
103312
103367
|
|
|
103313
103368
|
// src/deploy.ts
|
|
103314
|
-
var
|
|
103369
|
+
var import_promises9 = require("node:fs/promises");
|
|
103315
103370
|
var import_node_os8 = require("node:os");
|
|
103316
103371
|
var import_node_path21 = require("node:path");
|
|
103317
103372
|
|
|
103318
103373
|
// src/helpers/poll.ts
|
|
103319
|
-
var
|
|
103374
|
+
var import_promises8 = require("node:timers/promises");
|
|
103320
103375
|
var import_dns2 = __toESM(require_dns22());
|
|
103321
103376
|
var import_undici4 = __toESM(require_undici());
|
|
103322
103377
|
var TIMEOUT_MS = 1e3 * 60 * 5;
|
|
@@ -103326,7 +103381,7 @@ var poll = async (url) => {
|
|
|
103326
103381
|
const domain = new URL(url).host;
|
|
103327
103382
|
const s = spinner();
|
|
103328
103383
|
s.start("Waiting for DNS to propagate. This might take a few minutes.");
|
|
103329
|
-
await (0,
|
|
103384
|
+
await (0, import_promises8.setTimeout)(1e4);
|
|
103330
103385
|
await pollDns(domain, start, s);
|
|
103331
103386
|
if (await pollHttp(url, start, s)) {
|
|
103332
103387
|
return true;
|
|
@@ -103347,7 +103402,7 @@ var pollDns = async (domain, start, s) => {
|
|
|
103347
103402
|
s.stop(`${brandColor("DNS propagation")} ${dim("complete")}.`);
|
|
103348
103403
|
return;
|
|
103349
103404
|
}
|
|
103350
|
-
await (0,
|
|
103405
|
+
await (0, import_promises8.setTimeout)(POLL_INTERVAL_MS);
|
|
103351
103406
|
}
|
|
103352
103407
|
};
|
|
103353
103408
|
var pollHttp = async (url, start, s) => {
|
|
@@ -103372,7 +103427,7 @@ var pollHttp = async (url, start, s) => {
|
|
|
103372
103427
|
throw e;
|
|
103373
103428
|
}
|
|
103374
103429
|
}
|
|
103375
|
-
await (0,
|
|
103430
|
+
await (0, import_promises8.setTimeout)(POLL_INTERVAL_MS);
|
|
103376
103431
|
}
|
|
103377
103432
|
};
|
|
103378
103433
|
var isDomainResolvable = async (domain) => {
|
|
@@ -103731,7 +103786,7 @@ var runDeploy = async (ctx) => {
|
|
|
103731
103786
|
] : []
|
|
103732
103787
|
];
|
|
103733
103788
|
const outputFile = (0, import_node_path21.join)(
|
|
103734
|
-
await (0,
|
|
103789
|
+
await (0, import_promises9.mkdtemp)((0, import_node_path21.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
|
|
103735
103790
|
"output.json"
|
|
103736
103791
|
);
|
|
103737
103792
|
await runCommand(deployCmd, {
|
|
@@ -104204,7 +104259,7 @@ var renderValues = (values) => {
|
|
|
104204
104259
|
};
|
|
104205
104260
|
|
|
104206
104261
|
// src/helpers/retry.ts
|
|
104207
|
-
var
|
|
104262
|
+
var import_promises10 = require("node:timers/promises");
|
|
104208
104263
|
var retry = async (config49, fn) => {
|
|
104209
104264
|
let { times } = config49;
|
|
104210
104265
|
let error2 = null;
|
|
@@ -104217,7 +104272,7 @@ var retry = async (config49, fn) => {
|
|
|
104217
104272
|
if (config49.exitCondition?.(e)) {
|
|
104218
104273
|
break;
|
|
104219
104274
|
}
|
|
104220
|
-
await (0,
|
|
104275
|
+
await (0, import_promises10.setTimeout)(config49.sleepMs ?? 1e3);
|
|
104221
104276
|
}
|
|
104222
104277
|
}
|
|
104223
104278
|
throw error2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.70.
|
|
3
|
+
"version": "2.70.1",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/parser": "^7.21.3",
|
|
32
32
|
"@babel/types": "^7.21.4",
|
|
33
33
|
"@clack/prompts": "^1.2.0",
|
|
34
|
-
"@cloudflare/workers-types": "^4.
|
|
34
|
+
"@cloudflare/workers-types": "^4.20260609.1",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
37
37
|
"@types/deepmerge": "^2.2.0",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"wrap-ansi": "^9.0.0",
|
|
73
73
|
"xdg-app-paths": "^8.3.0",
|
|
74
74
|
"yargs": "^17.7.2",
|
|
75
|
-
"@cloudflare/cli-shared-helpers": "0.1.
|
|
76
|
-
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
77
|
-
"@cloudflare/vite-plugin": "1.39.2",
|
|
75
|
+
"@cloudflare/cli-shared-helpers": "0.1.7",
|
|
78
76
|
"@cloudflare/codemod": "1.1.0",
|
|
77
|
+
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
78
|
+
"@cloudflare/vite-plugin": "1.40.1",
|
|
79
79
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
80
|
-
"@cloudflare/workers-utils": "0.
|
|
81
|
-
"wrangler": "4.
|
|
80
|
+
"@cloudflare/workers-utils": "0.23.0",
|
|
81
|
+
"wrangler": "4.99.0"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=22.0.0"
|
|
@@ -77,7 +77,7 @@ function updateAngularJson(ctx: C3Context) {
|
|
|
77
77
|
const architectSection = angularJson.projects[ctx.project.name].architect;
|
|
78
78
|
architectSection.build.options.outputPath = "dist";
|
|
79
79
|
architectSection.build.options.outputMode = "server";
|
|
80
|
-
architectSection.build.options.ssr.
|
|
80
|
+
architectSection.build.options.ssr.platform = "neutral";
|
|
81
81
|
architectSection.build.options.assets.push("src/_routes.json");
|
|
82
82
|
|
|
83
83
|
writeFile(resolve("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
@@ -76,7 +76,7 @@ function updateAngularJson(ctx: C3Context) {
|
|
|
76
76
|
const architectSection = angularJson.projects[ctx.project.name].architect;
|
|
77
77
|
architectSection.build.options.outputPath = "dist";
|
|
78
78
|
architectSection.build.options.outputMode = "server";
|
|
79
|
-
architectSection.build.options.ssr.
|
|
79
|
+
architectSection.build.options.ssr.platform = "neutral";
|
|
80
80
|
|
|
81
81
|
writeFile(resolve("angular.json"), JSON.stringify(angularJson, null, 2));
|
|
82
82
|
s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
|