@cloudflare/deploy-helpers 0.6.9 → 0.7.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/index.d.mts CHANGED
@@ -972,7 +972,7 @@ type CreatePreviewRequestParams = {
972
972
  };
973
973
  type UpdatePreviewRequestParams = Omit<CreatePreviewRequestParams, "name">;
974
974
  type PreviewRequestOptions = {
975
- ignoreDefaults?: boolean;
975
+ ignoreBaseConfig?: boolean;
976
976
  };
977
977
  type PreviewDefaults = {
978
978
  observability?: Observability;
@@ -1004,10 +1004,10 @@ type PreviewBaseConfigPatch = Partial<Omit<PreviewBaseConfig, "env">> & {
1004
1004
  };
1005
1005
  declare function getPreview(config: Config, accountId: string, workerName: string, previewIdentifier: string): Promise<PreviewResource>;
1006
1006
  declare function createPreview(config: Config, accountId: string, workerName: string, request: CreatePreviewRequestParams, options?: PreviewRequestOptions): Promise<PreviewResource>;
1007
- declare function editPreview(config: Config, accountId: string, workerName: string, previewIdentifier: string, request: UpdatePreviewRequestParams, options?: PreviewRequestOptions): Promise<PreviewResource>;
1007
+ declare function editPreview(config: Config, accountId: string, workerName: string, previewIdentifier: string, request: UpdatePreviewRequestParams): Promise<PreviewResource>;
1008
1008
  declare function deletePreview(config: Config, accountId: string, workerName: string, previewIdentifier: string): Promise<void>;
1009
1009
  declare function getPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, deploymentIdentifier?: string): Promise<DeploymentResource>;
1010
- declare function createPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, request: Partial<CreatePreviewDeploymentRequestParams>, options?: PreviewRequestOptions): Promise<DeploymentResource>;
1010
+ declare function createPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, request: Partial<CreatePreviewDeploymentRequestParams>): Promise<DeploymentResource>;
1011
1011
  declare function patchPreviewDeployment(config: Config, accountId: string, workerName: string, previewIdentifier: string, env: Record<string, Binding | null>, annotations?: {
1012
1012
  "workers/message"?: string;
1013
1013
  "workers/tag"?: string;
@@ -1040,7 +1040,7 @@ type PreviewArgs = {
1040
1040
  tag?: string;
1041
1041
  message?: string;
1042
1042
  json?: boolean;
1043
- ignoreDefaults: boolean;
1043
+ ignoreBaseConfig: boolean;
1044
1044
  workerName?: string;
1045
1045
  "worker-name"?: string;
1046
1046
  };
package/dist/index.mjs CHANGED
@@ -26519,7 +26519,7 @@ async function getPreview(config2, accountId, workerName, previewIdentifier) {
26519
26519
  }
26520
26520
  __name(getPreview, "getPreview");
26521
26521
  async function createPreview(config2, accountId, workerName, request2, options) {
26522
- const queryParams = options?.ignoreDefaults ? new URLSearchParams({ ignore_defaults: "true" }) : void 0;
26522
+ const queryParams = options?.ignoreBaseConfig ? new URLSearchParams({ ignore_base_config: "true" }) : void 0;
26523
26523
  return fetchResult(
26524
26524
  config2,
26525
26525
  `/accounts/${accountId}/workers/workers/${workerName}/previews`,
@@ -26532,8 +26532,7 @@ async function createPreview(config2, accountId, workerName, request2, options)
26532
26532
  );
26533
26533
  }
26534
26534
  __name(createPreview, "createPreview");
26535
- async function editPreview(config2, accountId, workerName, previewIdentifier, request2, options) {
26536
- const queryParams = options?.ignoreDefaults ? new URLSearchParams({ ignore_defaults: "true" }) : void 0;
26535
+ async function editPreview(config2, accountId, workerName, previewIdentifier, request2) {
26537
26536
  return fetchResult(
26538
26537
  config2,
26539
26538
  `/accounts/${accountId}/workers/workers/${workerName}/previews/${encodeURIComponent(
@@ -26543,8 +26542,7 @@ async function editPreview(config2, accountId, workerName, previewIdentifier, re
26543
26542
  method: "PATCH",
26544
26543
  headers: { "Content-Type": "application/json" },
26545
26544
  body: JSON.stringify(request2)
26546
- },
26547
- queryParams
26545
+ }
26548
26546
  );
26549
26547
  }
26550
26548
  __name(editPreview, "editPreview");
@@ -26569,8 +26567,7 @@ async function getPreviewDeployment(config2, accountId, workerName, previewIdent
26569
26567
  );
26570
26568
  }
26571
26569
  __name(getPreviewDeployment, "getPreviewDeployment");
26572
- async function createPreviewDeployment(config2, accountId, workerName, previewIdentifier, request2, options) {
26573
- const queryParams = options?.ignoreDefaults ? new URLSearchParams({ ignore_defaults: "true" }) : void 0;
26570
+ async function createPreviewDeployment(config2, accountId, workerName, previewIdentifier, request2) {
26574
26571
  return fetchResult(
26575
26572
  config2,
26576
26573
  `/accounts/${accountId}/workers/workers/${workerName}/previews/${encodeURIComponent(
@@ -26580,8 +26577,7 @@ async function createPreviewDeployment(config2, accountId, workerName, previewId
26580
26577
  method: "POST",
26581
26578
  headers: { "Content-Type": "application/json" },
26582
26579
  body: JSON.stringify(request2)
26583
- },
26584
- queryParams
26580
+ }
26585
26581
  );
26586
26582
  }
26587
26583
  __name(createPreviewDeployment, "createPreviewDeployment");
@@ -27180,7 +27176,7 @@ async function preview(accountId, args, config2, buildResult, assetsOptions) {
27180
27176
  }
27181
27177
  }
27182
27178
  const previewIdentifier = previewName;
27183
- const ignoreDefaults = args.ignoreDefaults;
27179
+ const ignoreBaseConfig = args.ignoreBaseConfig;
27184
27180
  const fallbackTag = !args.tag && shouldUseCIMetadataFallback() ? getHeadCommitRef() : void 0;
27185
27181
  const fallbackMessage = !args.message && shouldUseCIMetadataFallback() ? getHeadCommitMessage() : void 0;
27186
27182
  let existingPreview = null;
@@ -27204,7 +27200,7 @@ async function preview(accountId, args, config2, buildResult, assetsOptions) {
27204
27200
  accountId,
27205
27201
  workerName,
27206
27202
  { name: previewName, ...assemblePreviewScriptSettings(config2) },
27207
- { ignoreDefaults }
27203
+ { ignoreBaseConfig }
27208
27204
  );
27209
27205
  } else {
27210
27206
  const previewRequest = assemblePreviewScriptSettings(config2);
@@ -27214,8 +27210,7 @@ async function preview(accountId, args, config2, buildResult, assetsOptions) {
27214
27210
  accountId,
27215
27211
  workerName,
27216
27212
  previewIdentifier,
27217
- previewRequest,
27218
- { ignoreDefaults }
27213
+ previewRequest
27219
27214
  );
27220
27215
  } else {
27221
27216
  previewResource = existingPreview;
@@ -27238,8 +27233,7 @@ async function preview(accountId, args, config2, buildResult, assetsOptions) {
27238
27233
  accountId,
27239
27234
  workerName,
27240
27235
  previewResource.id,
27241
- deploymentRequest,
27242
- { ignoreDefaults }
27236
+ deploymentRequest
27243
27237
  );
27244
27238
  if (args.json) {
27245
27239
  logger.log(