@cloudflare/deploy-helpers 0.28.0 → 0.29.0
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/{context-DOE6X8vr.d.mts → context-B9S8CBD7.d.mts} +5 -3
- package/dist/context.d.mts +1 -1
- package/dist/context.mjs +2 -2
- package/dist/{create-worker-upload-form-BlSu1EfR.mjs → create-worker-upload-form-DhzLEfNO.mjs} +2 -1
- package/dist/create-worker-upload-form.mjs +1 -1
- package/dist/index.d.mts +11 -17
- package/dist/index.mjs +13131 -13455
- package/dist/startup-profile.mjs +1 -1
- package/package.json +10 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BuiltContainerImage, BuiltImage, ContainerNormalizedConfig } from "@cloudflare/containers-shared";
|
|
2
|
-
import { CfModule, CfModuleType, CfWorkerSourceMap,
|
|
2
|
+
import { CfModule, CfModuleType, CfWorkerSourceMap, Entry, FetchKVGetValueFetcher, FetchListResultFetcher, FetchPagedListResultFetcher, FetchResultFetcher, LegacyAssetPaths, Logger, ValidatedAssetsOptions } from "@cloudflare/workers-utils";
|
|
3
|
+
import { Config, ContainerApp, DurableObjectCodeUpdateStrategy, Route } from "@cloudflare/workers-utils/config";
|
|
3
4
|
//#region src/shared/types.d.ts
|
|
4
5
|
/** API, logging, and prompt implementations supplied by the consumer. */
|
|
5
6
|
type DeployHelpersContext = {
|
|
@@ -174,6 +175,7 @@ type TriggerProps = {
|
|
|
174
175
|
routes: Route[];
|
|
175
176
|
firstDeploy: boolean;
|
|
176
177
|
dryRun: boolean;
|
|
178
|
+
showDiff?: boolean;
|
|
177
179
|
validated: boolean;
|
|
178
180
|
queueCreateCommand: (queueName: string) => string;
|
|
179
181
|
workersDevConfigFieldName: string;
|
|
@@ -186,8 +188,8 @@ type TriggerProps = {
|
|
|
186
188
|
/**
|
|
187
189
|
* Module-level context globals for deploy-helpers.
|
|
188
190
|
*
|
|
189
|
-
* These are typed as non-nullable but are
|
|
190
|
-
* is called. Consumers must import the live binding directly (e.g. `import { logger }`)
|
|
191
|
+
* These are typed as non-nullable but are
|
|
192
|
+
* undefined until initDeployHelpersContext() is called. Consumers must import the live binding directly (e.g. `import { logger }`)
|
|
191
193
|
* and NOT destructure or cache the value at module-load time, otherwise they will
|
|
192
194
|
* capture `undefined` before init runs.
|
|
193
195
|
*
|
package/dist/context.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as fetchResult, c as prompt, i as fetchPagedListResult, l as select, n as fetchKVGetValue, o as initDeployHelpersContext, r as fetchListResult, s as logger, t as confirm } from "./context-
|
|
1
|
+
import { a as fetchResult, c as prompt, i as fetchPagedListResult, l as select, n as fetchKVGetValue, o as initDeployHelpersContext, r as fetchListResult, s as logger, t as confirm } from "./context-B9S8CBD7.mjs";
|
|
2
2
|
export { confirm, fetchKVGetValue, fetchListResult, fetchPagedListResult, fetchResult, initDeployHelpersContext, logger, prompt, select };
|
package/dist/context.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import "./rolldown-runtime-BMUeFane.mjs";
|
|
|
3
3
|
/**
|
|
4
4
|
* Module-level context globals for deploy-helpers.
|
|
5
5
|
*
|
|
6
|
-
* These are typed as non-nullable but are
|
|
7
|
-
* is called. Consumers must import the live binding directly (e.g. `import { logger }`)
|
|
6
|
+
* These are typed as non-nullable but are
|
|
7
|
+
* undefined until initDeployHelpersContext() is called. Consumers must import the live binding directly (e.g. `import { logger }`)
|
|
8
8
|
* and NOT destructure or cache the value at module-load time, otherwise they will
|
|
9
9
|
* capture `undefined` before init runs.
|
|
10
10
|
*
|
package/dist/{create-worker-upload-form-BlSu1EfR.mjs → create-worker-upload-form-DhzLEfNO.mjs}
RENAMED
|
@@ -2,7 +2,8 @@ import "./rolldown-runtime-BMUeFane.mjs";
|
|
|
2
2
|
import assert from "node:assert";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import path, { resolve } from "node:path";
|
|
5
|
-
import { INHERIT_SYMBOL, UserError
|
|
5
|
+
import { INHERIT_SYMBOL, UserError } from "@cloudflare/workers-utils";
|
|
6
|
+
import { extractBindingsOfType, isUnsafeBindingType } from "@cloudflare/workers-utils/config";
|
|
6
7
|
import { FormData } from "undici";
|
|
7
8
|
import { spawnSync } from "node:child_process";
|
|
8
9
|
import { sync } from "command-exists";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createWorkerUploadForm, n as fromMimeType, r as moduleTypeMimeType } from "./create-worker-upload-form-
|
|
1
|
+
export { t as createWorkerUploadForm, n as fromMimeType, r as moduleTypeMimeType } from "./create-worker-upload-form-DhzLEfNO.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createWorkerUploadForm, fromMimeType, moduleTypeMimeType } from "./create-worker-upload-form.mjs";
|
|
2
|
-
import { _ as TriggerProps, d as ContainerDeployConfig, f as ContainerlessConfig, g as TriggerDeployment, h as SharedDeployVersionsProps, m as DeployProps, o as initDeployHelpersContext, p as DeployHelpersContext, u as BuiltDurableObjectContainerImage, v as VersionsUploadProps, y as WorkerBuildResult } from "./context-
|
|
2
|
+
import { _ as TriggerProps, d as ContainerDeployConfig, f as ContainerlessConfig, g as TriggerDeployment, h as SharedDeployVersionsProps, m as DeployProps, o as initDeployHelpersContext, p as DeployHelpersContext, u as BuiltDurableObjectContainerImage, v as VersionsUploadProps, y as WorkerBuildResult } from "./context-B9S8CBD7.mjs";
|
|
3
3
|
import { ContainerNormalizedConfig } from "@cloudflare/containers-shared";
|
|
4
|
-
import { AssetsOptions, Binding as Binding$1,
|
|
4
|
+
import { AssetsOptions, Binding as Binding$1, CfCapnp, CfModule, CfPlacement, CfScriptFormat, CfUserLimits, CfWorkerInit, ComplianceConfig, ExportsReconciliationErrorDetail, ExportsReconciliationResult, Json, LegacyAssetPaths, ParseError, StartDevWorkerInput, WorkerMetadataBinding } from "@cloudflare/workers-utils";
|
|
5
|
+
import { CacheOptions, Config, CustomDomainRoute, DurableObjectContainerApp, NonDirectoryAssetsDirError, NonExistentAssetsDirError, Observability, PreviewsConfig, RawConfig, ResolvedDurableObjectContainerApp, Route, StreamingTailConsumer, TailConsumer, ZoneIdRoute, ZoneNameRoute, getAssetsOptions as getAssetsOptions$1, validateAssetsOptions } from "@cloudflare/workers-utils/config";
|
|
5
6
|
import { FormData } from "undici";
|
|
7
|
+
import { createFileHasher } from "@cloudflare/workers-utils/asset-hash";
|
|
6
8
|
import { NodeJSCompatMode } from "@cloudflare/workers-utils/node-compat";
|
|
7
9
|
import { ParsedBuildOutputContainerConfig, ParsedBuildOutputRootConfig, ParsedBuildOutputWorkerConfig } from "@cloudflare/config";
|
|
8
10
|
import Protocol$1 from "devtools-protocol";
|
|
@@ -34,7 +36,10 @@ type AssetsUploadResult = {
|
|
|
34
36
|
declare const syncAssets: (complianceConfig: ComplianceConfig, accountId: string | undefined, assetDirectory: string, scriptName: string, dispatchNamespace?: string) => Promise<AssetsUploadResult>;
|
|
35
37
|
declare function getEdgeKvUploadConcurrency(jwt: string): number;
|
|
36
38
|
declare const buildAssetManifest: (dir: string) => Promise<AssetManifest>;
|
|
37
|
-
|
|
39
|
+
/** Resolve asset options using the deployment caller's logger. */
|
|
40
|
+
declare function resolveAssetOptions(props: Pick<SharedDeployVersionsProps, "assetsDir" | "main">, config: Config): AssetsOptions | undefined;
|
|
41
|
+
/** Validate and resolve asset options using the deployment caller's logger. */
|
|
42
|
+
declare function getAssetsOptions(options: Parameters<typeof getAssetsOptions$1>[0]): AssetsOptions | undefined;
|
|
38
43
|
//#endregion
|
|
39
44
|
//#region src/deploy/deploy.d.ts
|
|
40
45
|
/**
|
|
@@ -807,8 +812,8 @@ declare function fetchWorkerConfig(complianceConfig: ComplianceConfig, accountId
|
|
|
807
812
|
compatibility_flags: string[];
|
|
808
813
|
last_deployed_from?: "wrangler" | "dash" | "api";
|
|
809
814
|
placement_mode?: "smart";
|
|
810
|
-
tail_consumers?: import("@cloudflare/workers-utils").TailConsumer[];
|
|
811
|
-
observability?: import("@cloudflare/workers-utils").Observability;
|
|
815
|
+
tail_consumers?: import("@cloudflare/workers-utils/config").TailConsumer[];
|
|
816
|
+
observability?: import("@cloudflare/workers-utils/config").Observability;
|
|
812
817
|
};
|
|
813
818
|
};
|
|
814
819
|
cronTriggers: CronTriggersRes;
|
|
@@ -999,17 +1004,6 @@ declare function checkRemoteSecretsOverride(config: Config, scriptName: string,
|
|
|
999
1004
|
declare function confirmLatestDeploymentOverwrite(config: Config, accountId: string, scriptName: string, deployCommand: string, versionsDeployCommand: string): Promise<boolean>;
|
|
1000
1005
|
declare function printVersions(versions: ApiVersion[], traffic: Map<VersionId, Percentage>): void;
|
|
1001
1006
|
//#endregion
|
|
1002
|
-
//#region src/deploy/helpers/hash.d.ts
|
|
1003
|
-
/**
|
|
1004
|
-
* Initialize a reusable hasher for asset manifest hashes.
|
|
1005
|
-
*
|
|
1006
|
-
* Finish WASM initialization before reading any assets, then hash each file
|
|
1007
|
-
* synchronously so concurrent callers only retain one file's contents at a time.
|
|
1008
|
-
*
|
|
1009
|
-
* @returns A function that hashes a file's base64 contents and extension.
|
|
1010
|
-
*/
|
|
1011
|
-
declare function createFileHasher(): Promise<(filepath: string) => string>;
|
|
1012
|
-
//#endregion
|
|
1013
1007
|
//#region src/deploy/helpers/jwt.d.ts
|
|
1014
1008
|
declare const decodeJwtPayload: (token: string) => any;
|
|
1015
1009
|
declare const isJwtExpired: (token: string) => boolean | undefined;
|
|
@@ -1472,4 +1466,4 @@ type DrawConnectedChildBoxOptions = {
|
|
|
1472
1466
|
*/
|
|
1473
1467
|
declare function drawConnectedChildBox(contentLines: string[], options?: DrawConnectedChildBoxOptions): string;
|
|
1474
1468
|
//#endregion
|
|
1475
|
-
export { ACTOR_BINDING_DEPENDS_ON_EXPORT_CODE, ApiDeployment, ApiVersion, AssetManifest, AssetUploadStats, AssetsUploadResult, Binding, BuiltDurableObjectContainerImage, BulkInputNullableResult, BulkInputResult, BundleSize, Consumer, ConsumerSettings, ContainerDeployConfig, ContainerlessConfig, CreatePreviewDeploymentRequestParams, CreatePreviewRequestParams, CustomDomain, CustomDomainChangeset, DeployHelpersContext, type DeployOptions, DeployProps, DeploymentResource, DurableObjectContainerApplication, EXPORTS_RECONCILIATION_ERROR_CODE, EnvBindings, INCONSISTENT_EXPORTS_ACROSS_VERSIONS_CODE, INVALID_INHERIT_BINDING_CODE, JsonLike, NO_ACTIVE_PREVIEW_URLS_MESSAGE, NoInputError, NonVersionedScriptSettings, PREVIEW_DOMAIN_PROVISIONING_NOTE, PackageDependency, Percentage, PostQueueBody, PostQueueResponse, PostTypedConsumerBody, PreparedContainerImages, PreviewArgs, PreviewAssetsOptions, PreviewBaseConfig, PreviewBaseConfigPatch, PreviewBuildOutput, PreviewBuildOutputRootConfig, PreviewDeleteArgs, PreviewDeploymentModule, PreviewOptions, PreviewRequestOptions, PreviewResource, PreviewResult, Producer, ProvisionBindingsResult, PullRequestMetadata, PurgeQueueBody, PurgeQueueResponse, QueueJurisdiction, QueueResponse, QueueSettings, RetrieveSourceMapFunction, RouteObject, ScriptReference, Settings, SharedDeployVersionsProps, TriggerDeployment, TriggerProps, TypedConsumerResponse, UpdatePreviewRequestParams, VersionCache, VersionId, VersionedDurableObjectContainerApplication, type VersionsUploadOptions, VersionsUploadProps, WORKER_LEGACY_ENVIRONMENT_NOT_FOUND_ERR_CODE, WORKER_NOT_FOUND_ERR_CODE, WORKFLOW_CRON_REQUIRES_PAID_PLAN_CODE, WORKFLOW_JURISDICTION_IMMUTABLE_CODE, WORKFLOW_NOT_FOUND_CODE, WorkerBuildResult, WorkerSubdomain, Workflow, WorkflowConflict, Zone, ZoneIdCache, addRequiredSecretsInheritBindings, addWorkersSitesBindings, applyServiceAndEnvironmentTags, assemblePreviewScriptSettings, assertPreviewBuildOutputRootConfig, buildAssetManifest, checkRemoteSecretsOverride, checkWorkflowConflicts, collectPackageDependencies, confirmLatestDeploymentOverwrite, createDeployment, createDurableObjectContainerApplication, createFileHasher, createPreview, createPreviewDeployment, createPreviewDeploymentForm, createPreviewParentWorker, createTruncatedAlias, createWorkerUploadForm, decodeJwtPayload, deletePreview, deletePullConsumer, deleteWorkerConsumer, deploy, deployDurableObjectContainerApplications, deployVersionedDurableObjectContainerApplications, deployWfpUserWorker, diagnoseScriptSizeError, diagnoseStartupError, diffJsonObjects, downloadWorkerConfig, drawBox, drawConnectedChildBox, editPreview, ensureQueuesExistByConfig, extractBuildOutputBindings, extractConfigBindings, fetchDeployableVersions, fetchDeploymentVersions, fetchLatestDeployment, fetchLatestDeployments, fetchSecrets, fetchVersion, fetchVersions, fetchWorkerConfig, formatAlignedRows, formatBindings, formatNoActivePreviewUrlsMessage, fromMimeType, generatePreviewAlias, getBindingValue, getBranchName, getCommitSha, getConfigPatch, getDeployConfirmFunction, getEdgeKvUploadConcurrency, getHeadCommitMessage, getHeadCommitRef, getMigrationsToUpload, getPreview, getPreviewBaseConfig, getPreviewDeployment, getPreviewOwnedContainerClassNames, getPullRequestMetadata, getQueue, getRemoteConfigDiff, getRepositoryUrl, getSettings, getSize, getSourceMappedStack, getSourceMappedString, getSubdomainValues, getSubdomainValuesAPIMock, getVersionedDurableObjectContainerApplications, getWorkerSubdomain, getWorkersDevSubdomain, getWorkersDevSubdomainIfAccessible, getZoneForRoute, getZoneIdFromHost, handleMissingSecretsError, handleUnsafeCapnp, hasDefinedEnvironments, helpIfErrorIsSizeOrScriptStartup, initDeployHelpersContext, isExportsReconciliationErrorDetails, isJwtExpired, isModifiedDiffValue, isNonDestructive, isWorkerNotFoundError, listConsumers, listQueues, maybeRetrieveFileSourceMap, moduleTypeMimeType, padToVisibleWidth, parseBulkInputToObject, parseConfigPlacement, patchNonVersionedScriptSettings, patchPreviewBaseConfig, patchPreviewDeployment, postConsumer, prepareDurableObjectContainerApplications, preview, previewBuildOutput, previewContainerAppName, previewDelete, printBundleSize, printVersions, provisionBindings, publishCustomDomains, publishRoutes, putConsumer, putConsumerById, renderBindingDependsOnExportError, renderD1DatabaseLimitError, renderExportsReconciliationError, renderExportsReconciliationSuccess, renderInconsistentExportsAcrossVersionsError, renderRoute, renderWorkersDevDefaultWarning, resolveAssetOptions, resolveDoLifecyclePayload, resolveExportsUploadPayload, resolveVersionedDurableObjectContainerApplications, resolveWorkerName, sanitizeBranchName, shouldUseCIMetadataFallback, stripAnsi, syncAssets, tagsAreEqual, triggersDeploy, updateQueueConsumers, validateEventTriggerTargets, validateFileSecrets, validateImageLessContainerApplicationsForUpload, validateNodeCompatMode, validateRoutes, verifyWorkerMatchesCITag, versionsUpload, visibleLength, warnOnErrorUpdatingServiceAndEnvironmentTags, workerNotFoundErrorMessage };
|
|
1469
|
+
export { ACTOR_BINDING_DEPENDS_ON_EXPORT_CODE, ApiDeployment, ApiVersion, AssetManifest, AssetUploadStats, AssetsUploadResult, Binding, BuiltDurableObjectContainerImage, BulkInputNullableResult, BulkInputResult, BundleSize, Consumer, ConsumerSettings, ContainerDeployConfig, ContainerlessConfig, CreatePreviewDeploymentRequestParams, CreatePreviewRequestParams, CustomDomain, CustomDomainChangeset, DeployHelpersContext, type DeployOptions, DeployProps, DeploymentResource, DurableObjectContainerApplication, EXPORTS_RECONCILIATION_ERROR_CODE, EnvBindings, INCONSISTENT_EXPORTS_ACROSS_VERSIONS_CODE, INVALID_INHERIT_BINDING_CODE, JsonLike, NO_ACTIVE_PREVIEW_URLS_MESSAGE, NoInputError, NonDirectoryAssetsDirError, NonExistentAssetsDirError, NonVersionedScriptSettings, PREVIEW_DOMAIN_PROVISIONING_NOTE, PackageDependency, Percentage, PostQueueBody, PostQueueResponse, PostTypedConsumerBody, PreparedContainerImages, PreviewArgs, PreviewAssetsOptions, PreviewBaseConfig, PreviewBaseConfigPatch, PreviewBuildOutput, PreviewBuildOutputRootConfig, PreviewDeleteArgs, PreviewDeploymentModule, PreviewOptions, PreviewRequestOptions, PreviewResource, PreviewResult, Producer, ProvisionBindingsResult, PullRequestMetadata, PurgeQueueBody, PurgeQueueResponse, QueueJurisdiction, QueueResponse, QueueSettings, RetrieveSourceMapFunction, RouteObject, ScriptReference, Settings, SharedDeployVersionsProps, TriggerDeployment, TriggerProps, TypedConsumerResponse, UpdatePreviewRequestParams, VersionCache, VersionId, VersionedDurableObjectContainerApplication, type VersionsUploadOptions, VersionsUploadProps, WORKER_LEGACY_ENVIRONMENT_NOT_FOUND_ERR_CODE, WORKER_NOT_FOUND_ERR_CODE, WORKFLOW_CRON_REQUIRES_PAID_PLAN_CODE, WORKFLOW_JURISDICTION_IMMUTABLE_CODE, WORKFLOW_NOT_FOUND_CODE, WorkerBuildResult, WorkerSubdomain, Workflow, WorkflowConflict, Zone, ZoneIdCache, addRequiredSecretsInheritBindings, addWorkersSitesBindings, applyServiceAndEnvironmentTags, assemblePreviewScriptSettings, assertPreviewBuildOutputRootConfig, buildAssetManifest, checkRemoteSecretsOverride, checkWorkflowConflicts, collectPackageDependencies, confirmLatestDeploymentOverwrite, createDeployment, createDurableObjectContainerApplication, createFileHasher, createPreview, createPreviewDeployment, createPreviewDeploymentForm, createPreviewParentWorker, createTruncatedAlias, createWorkerUploadForm, decodeJwtPayload, deletePreview, deletePullConsumer, deleteWorkerConsumer, deploy, deployDurableObjectContainerApplications, deployVersionedDurableObjectContainerApplications, deployWfpUserWorker, diagnoseScriptSizeError, diagnoseStartupError, diffJsonObjects, downloadWorkerConfig, drawBox, drawConnectedChildBox, editPreview, ensureQueuesExistByConfig, extractBuildOutputBindings, extractConfigBindings, fetchDeployableVersions, fetchDeploymentVersions, fetchLatestDeployment, fetchLatestDeployments, fetchSecrets, fetchVersion, fetchVersions, fetchWorkerConfig, formatAlignedRows, formatBindings, formatNoActivePreviewUrlsMessage, fromMimeType, generatePreviewAlias, getAssetsOptions, getBindingValue, getBranchName, getCommitSha, getConfigPatch, getDeployConfirmFunction, getEdgeKvUploadConcurrency, getHeadCommitMessage, getHeadCommitRef, getMigrationsToUpload, getPreview, getPreviewBaseConfig, getPreviewDeployment, getPreviewOwnedContainerClassNames, getPullRequestMetadata, getQueue, getRemoteConfigDiff, getRepositoryUrl, getSettings, getSize, getSourceMappedStack, getSourceMappedString, getSubdomainValues, getSubdomainValuesAPIMock, getVersionedDurableObjectContainerApplications, getWorkerSubdomain, getWorkersDevSubdomain, getWorkersDevSubdomainIfAccessible, getZoneForRoute, getZoneIdFromHost, handleMissingSecretsError, handleUnsafeCapnp, hasDefinedEnvironments, helpIfErrorIsSizeOrScriptStartup, initDeployHelpersContext, isExportsReconciliationErrorDetails, isJwtExpired, isModifiedDiffValue, isNonDestructive, isWorkerNotFoundError, listConsumers, listQueues, maybeRetrieveFileSourceMap, moduleTypeMimeType, padToVisibleWidth, parseBulkInputToObject, parseConfigPlacement, patchNonVersionedScriptSettings, patchPreviewBaseConfig, patchPreviewDeployment, postConsumer, prepareDurableObjectContainerApplications, preview, previewBuildOutput, previewContainerAppName, previewDelete, printBundleSize, printVersions, provisionBindings, publishCustomDomains, publishRoutes, putConsumer, putConsumerById, renderBindingDependsOnExportError, renderD1DatabaseLimitError, renderExportsReconciliationError, renderExportsReconciliationSuccess, renderInconsistentExportsAcrossVersionsError, renderRoute, renderWorkersDevDefaultWarning, resolveAssetOptions, resolveDoLifecyclePayload, resolveExportsUploadPayload, resolveVersionedDurableObjectContainerApplications, resolveWorkerName, sanitizeBranchName, shouldUseCIMetadataFallback, stripAnsi, syncAssets, tagsAreEqual, triggersDeploy, updateQueueConsumers, validateAssetsOptions, validateEventTriggerTargets, validateFileSecrets, validateImageLessContainerApplicationsForUpload, validateNodeCompatMode, validateRoutes, verifyWorkerMatchesCITag, versionsUpload, visibleLength, warnOnErrorUpdatingServiceAndEnvironmentTags, workerNotFoundErrorMessage };
|