@void/deploy-cloudflare 0.21.0 → 0.21.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/dist/index.d.mts +2 -0
- package/dist/index.mjs +8 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -267,6 +267,8 @@ export declare function stabilizeCloudflareVersionTriggers(options: {
|
|
|
267
267
|
attempts?: number;
|
|
268
268
|
}): Promise<CloudflareTriggerStabilization>;
|
|
269
269
|
type CloudflareVersionActivationOptions = {
|
|
270
|
+
/** Human-readable deployment phases; the caller owns terminal rendering. */
|
|
271
|
+
onProgress?: (message: string) => void;
|
|
270
272
|
/** Reuse an inspected Worker without republishing its domains or other triggers. */
|
|
271
273
|
preserveTriggers?: boolean;
|
|
272
274
|
expectedPreviousVersionId?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1121,6 +1121,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1121
1121
|
ok: false,
|
|
1122
1122
|
reason: "uploader-changed"
|
|
1123
1123
|
};
|
|
1124
|
+
options.onProgress?.("Checking the current Worker deployment...");
|
|
1124
1125
|
const previous = await readCurrentProductionVersion(options, commonArgs);
|
|
1125
1126
|
if (previous.kind === "failed") return {
|
|
1126
1127
|
ok: false,
|
|
@@ -1213,6 +1214,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1213
1214
|
} : versionedPreviousTriggerConfig;
|
|
1214
1215
|
const previousTriggerConfig = triggerConfigWithQueueConsumerCleanup(versionedPreviousTriggerConfigWithTraffic, options.queueConsumerCleanup);
|
|
1215
1216
|
const alias = `void-ready-${Date.now().toString(36)}`;
|
|
1217
|
+
options.onProgress?.("Uploading the Worker and assets...");
|
|
1216
1218
|
const upload = await Promise.resolve(options.runWrangler([
|
|
1217
1219
|
"versions",
|
|
1218
1220
|
"upload",
|
|
@@ -1252,6 +1254,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1252
1254
|
ok: false,
|
|
1253
1255
|
reason: "upload-output-invalid"
|
|
1254
1256
|
};
|
|
1257
|
+
options.onProgress?.("Verifying the uploaded Worker...");
|
|
1255
1258
|
if (inheritanceBaseline) {
|
|
1256
1259
|
const recent = await readRecentCloudflareVersionIds(options, commonArgs);
|
|
1257
1260
|
const previousLatest = inheritanceBaseline.at(-1);
|
|
@@ -1318,6 +1321,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1318
1321
|
};
|
|
1319
1322
|
stagedVersionOverride = true;
|
|
1320
1323
|
}
|
|
1324
|
+
options.onProgress?.("Waiting for the Worker to become ready...");
|
|
1321
1325
|
let ready = await probeReadiness(`${readinessUrl.replace(/\/$/, "")}/__void/ready`, options.workerName, readinessUsesCustomRoute ? void 0 : options.readinessHeaders, authenticatedWorkersDevSubdomain, stagedVersionOverride ? versionId : void 0, options.fetch ?? globalThis.fetch, options.sleep ?? defaultSleep, options.readinessAttempts ?? 6);
|
|
1322
1326
|
if (ready === "access-denied" && !stagedVersionOverride && previous.versionId !== null) {
|
|
1323
1327
|
const stableReadinessUrl = desiredTriggerConfig.workers_dev ? workersDevReadinessUrl(options.workerName, extractWorkersDevSubdomain(readinessUrl) ?? options.workersDevSubdomain) : customRouteReadinessUrl(desiredTriggerConfig.routes);
|
|
@@ -1388,6 +1392,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1388
1392
|
rollback: "not-needed",
|
|
1389
1393
|
triggerRepair: "succeeded"
|
|
1390
1394
|
};
|
|
1395
|
+
options.onProgress?.("Activating the Worker...");
|
|
1391
1396
|
const activate = await deployVersionPercentages(options, commonArgs, [`${versionId}@100`], message);
|
|
1392
1397
|
if (!isCleanCommandExit(activate)) return {
|
|
1393
1398
|
ok: false,
|
|
@@ -1428,6 +1433,7 @@ async function activateCloudflareVersionWithSecretsFile(options) {
|
|
|
1428
1433
|
}
|
|
1429
1434
|
const knownTriggerConfigs = { [versionId]: desiredTriggerConfig };
|
|
1430
1435
|
if (previous.versionId && previousTriggerConfig) knownTriggerConfigs[previous.versionId] = previousTriggerConfig;
|
|
1436
|
+
options.onProgress?.("Updating routes and triggers...");
|
|
1431
1437
|
const triggers = await stabilizeCloudflareVersionTriggers({
|
|
1432
1438
|
runWrangler: options.runWrangler,
|
|
1433
1439
|
workerName: options.workerName,
|
|
@@ -1679,6 +1685,7 @@ async function bootstrapFirstDeployment(options, commonArgs, previousVersionId)
|
|
|
1679
1685
|
ok: false,
|
|
1680
1686
|
reason: "uploader-changed"
|
|
1681
1687
|
};
|
|
1688
|
+
options.onProgress?.("Publishing the first Worker deployment...");
|
|
1682
1689
|
const bootstrap = await Promise.resolve(options.runWrangler([
|
|
1683
1690
|
"deploy",
|
|
1684
1691
|
...commonArgs,
|
|
@@ -1717,6 +1724,7 @@ async function bootstrapFirstDeployment(options, commonArgs, previousVersionId)
|
|
|
1717
1724
|
...versionId ? { versionId } : {}
|
|
1718
1725
|
};
|
|
1719
1726
|
const previewUrl = publishedCloudflareUrl(options.workerName, desiredTriggerConfig, reportedOrConfiguredUrl);
|
|
1727
|
+
options.onProgress?.("Waiting for the Worker to become ready...");
|
|
1720
1728
|
const ready = await probeReadiness(`${previewUrl.replace(/\/$/, "")}/__void/ready`, options.workerName, reportedUrl || desiredTriggerConfig.workers_dev ? options.readinessHeaders : void 0, extractWorkersDevSubdomain(previewUrl), void 0, options.fetch ?? globalThis.fetch, options.sleep ?? defaultSleep, options.readinessAttempts ?? 30, 6e4);
|
|
1721
1729
|
if (ready !== "ready") return {
|
|
1722
1730
|
ok: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@void/deploy-cloudflare",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/voidzero-dev/void.git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@void/deploy-core": "0.21.
|
|
23
|
+
"@void/deploy-core": "0.21.2",
|
|
24
24
|
"jsonc-parser": "3.3.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|