@cloudflare/vitest-plugin 1.1.12 → 1.1.13

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.
@@ -2802,8 +2802,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
2802
2802
  __name$3(formatConfigSnippet, "formatConfigSnippet");
2803
2803
 
2804
2804
  //#endregion
2805
- //#region ../workers-utils/dist/chunk-2OPNWQJ5.mjs
2806
- var DEFAULT_COMPAT_DATE = "2026-09-17";
2805
+ //#region ../workers-utils/dist/chunk-S6ZAI5DC.mjs
2806
+ var DEFAULT_COMPAT_DATE = "2026-09-18";
2807
2807
  function assertNever(_value) {}
2808
2808
  __name$3(assertNever, "assertNever");
2809
2809
  function mapWorkerMetadataBindings(bindings) {
@@ -44583,6 +44583,7 @@ var BINDING_LOCAL_SUPPORT = {
44583
44583
  pipeline: "local-and-remote",
44584
44584
  service: "local-and-remote",
44585
44585
  queue: "local-and-remote",
44586
+ flagship: "local-and-remote",
44586
44587
  vectorize: "remote",
44587
44588
  mtls_certificate: "remote",
44588
44589
  dispatch_namespace: "remote",
@@ -44591,7 +44592,6 @@ var BINDING_LOCAL_SUPPORT = {
44591
44592
  ai_search_namespace: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44592
44593
  media: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44593
44594
  artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44594
- flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44595
44595
  vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44596
44596
  vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
44597
44597
  agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
@@ -45306,12 +45306,12 @@ function printBindings(bindings, options) {
45306
45306
  mode: getMode({ isSimulatedLocally: true })
45307
45307
  };
45308
45308
  }));
45309
- if (flagship.length > 0) output.push(...flagship.map(({ binding, app_id }) => {
45309
+ if (flagship.length > 0) output.push(...flagship.map(({ binding, app_id, remote }) => {
45310
45310
  return {
45311
45311
  name: binding,
45312
45312
  type: getBindingTypeFriendlyName("flagship"),
45313
45313
  value: app_id,
45314
- mode: getMode({ isSimulatedLocally: !context.remoteBindingsDisabled ? false : void 0 })
45314
+ mode: getMode({ isSimulatedLocally: context.remoteBindingsDisabled || !remote })
45315
45315
  };
45316
45316
  }));
45317
45317
  if (services.length > 0) output.push(...services.map(({ binding, service, entrypoint, remote, dev }) => {
@@ -61073,7 +61073,7 @@ __name$1(createWorkerUploadForm, "createWorkerUploadForm");
61073
61073
  //#endregion
61074
61074
  //#region ../remote-bindings/dist/index.mjs
61075
61075
  var import_undici = require_undici();
61076
- var version = "0.0.27";
61076
+ var version = "0.0.28";
61077
61077
  var NoDefaultValueProvided = class extends UserError$1 {
61078
61078
  constructor() {
61079
61079
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
@@ -62299,14 +62299,14 @@ const ContainerObservabilityBaseSchema = z$1.strictObject({
62299
62299
  enabled: z$1.boolean().optional(),
62300
62300
  logs: z$1.strictObject({ enabled: z$1.boolean().optional() }).optional()
62301
62301
  });
62302
- const ContainerObservabilitySchema = z$1.union([ContainerObservabilityBaseSchema.extend({ targetInstancePercentage: z$1.number().min(0).max(100).optional() }), ContainerObservabilityBaseSchema.extend({ targetInstanceCount: z$1.number().int().nonnegative().optional() })]);
62302
+ const StandardContainerObservabilitySchema = z$1.union([ContainerObservabilityBaseSchema.extend({ targetInstancePercentage: z$1.number().min(0).max(100).optional() }), ContainerObservabilityBaseSchema.extend({ targetInstanceCount: z$1.number().int().nonnegative().optional() })]);
62303
62303
  const BaseContainerSchema = z$1.strictObject({
62304
62304
  type: z$1.literal("container"),
62305
62305
  name: z$1.string().min(1),
62306
- observability: ContainerObservabilitySchema.optional(),
62307
62306
  unsafe: z$1.record(z$1.string(), z$1.unknown()).optional()
62308
62307
  });
62309
62308
  const StandardContainerBaseSchema = BaseContainerSchema.extend({
62309
+ observability: StandardContainerObservabilitySchema.optional(),
62310
62310
  maxInstances: z$1.number().int().nonnegative().default(20),
62311
62311
  instanceType: z$1.union([z$1.enum([
62312
62312
  "basic",
@@ -62353,7 +62353,10 @@ const StandardContainerBaseSchema = BaseContainerSchema.extend({
62353
62353
  activeGracePeriod: z$1.number().nonnegative().optional()
62354
62354
  }).optional()
62355
62355
  });
62356
- const DurableObjectContainerBaseSchema = BaseContainerSchema.extend({ schedulingPolicy: z$1.literal("durable-object") });
62356
+ const DurableObjectContainerBaseSchema = BaseContainerSchema.extend({
62357
+ schedulingPolicy: z$1.literal("durable-object"),
62358
+ observability: ContainerObservabilityBaseSchema.optional()
62359
+ });
62357
62360
  /**
62358
62361
  * Input Container schema — validates user-authored `cloudflare.config.ts`
62359
62362
  * Container exports. Dockerfiles are built by the consuming build tool.
@@ -62541,9 +62544,12 @@ const InputSettingsSchema = z$1.strictObject({
62541
62544
  });
62542
62545
  /**
62543
62546
  * Output settings schema — the shape of the top-level `config.json` in the
62544
- * Build Output Specification. Adds the `mode` the build was produced in.
62547
+ * Build Output Specification. Adds the build mode and Preview intent.
62545
62548
  */
62546
- const OutputSettingsSchema = InputSettingsSchema.extend({ mode: z$1.string().optional() });
62549
+ const OutputSettingsSchema = InputSettingsSchema.extend({
62550
+ isPreview: z$1.boolean().optional(),
62551
+ mode: z$1.string().optional()
62552
+ });
62547
62553
  const DEFAULT_EXPORT_NAME = "default";
62548
62554
  const SETTINGS_EXPORT_NAME = "settings";
62549
62555
  const SUPPORTED_EXPORT_TYPES = new Set([
@@ -62756,10 +62762,14 @@ function convertToWranglerConfig(workerConfig, settingsConfig, containerExports
62756
62762
  return result;
62757
62763
  }
62758
62764
  function convertContainer(container) {
62759
- if (container.schedulingPolicy === "durable-object") throw new UserError("Durable Object-managed Containers are not currently supported by `convertToWranglerConfig()`.", { telemetryMessage: false });
62760
62765
  const converted = { name: container.name };
62761
62766
  if (container.observability !== void 0) converted.observability = convertContainerObservability(container.observability);
62762
62767
  if (container.unsafe !== void 0) converted.unsafe = container.unsafe;
62768
+ if (container.schedulingPolicy === "durable-object") {
62769
+ converted.scheduling_policy = "durable_object";
62770
+ if (container.images !== void 0) converted.images = Object.fromEntries(Object.entries(container.images).map(([name, image]) => [name, convertDurableObjectContainerImage(image)]));
62771
+ return converted;
62772
+ }
62763
62773
  converted.image = "dockerfile" in container.image ? container.image.dockerfile : container.image.reference;
62764
62774
  converted.max_instances = container.maxInstances;
62765
62775
  if ("dockerfile" in container.image) {
@@ -62788,6 +62798,13 @@ function convertContainer(container) {
62788
62798
  }
62789
62799
  return converted;
62790
62800
  }
62801
+ function convertDurableObjectContainerImage(image) {
62802
+ if ("reference" in image) return { image: image.reference };
62803
+ const converted = { dockerfile: image.dockerfile };
62804
+ if (image.buildContext !== void 0) converted.build_context = image.buildContext;
62805
+ if (image.buildVars !== void 0) converted.build_vars = image.buildVars;
62806
+ return converted;
62807
+ }
62791
62808
  function convertContainerObservability(observability) {
62792
62809
  const converted = {};
62793
62810
  if (observability.enabled !== void 0) converted.enabled = observability.enabled;
@@ -63701,7 +63718,10 @@ const NEW_CONFIG_FILENAME = "cloudflare.config.ts";
63701
63718
  */
63702
63719
  async function loadNewConfig(configPath, mode) {
63703
63720
  if (!existsSync(configPath)) throw new TypeError(`\`experimental.newConfig\` is enabled but no \`${NEW_CONFIG_FILENAME}\` was found at ${configPath}.`);
63704
- const { result } = await loadAndValidateConfig(configPath, { mode });
63721
+ const { result } = await loadAndValidateConfig(configPath, {
63722
+ isPreview: false,
63723
+ mode
63724
+ });
63705
63725
  if (!result.success) throw new TypeError(`Invalid \`${NEW_CONFIG_FILENAME}\`:\n${result.error.message}`);
63706
63726
  const worker = result.data.default?.type === "worker" ? result.data.default : void 0;
63707
63727
  if (worker === void 0) throw new TypeError(`\`${NEW_CONFIG_FILENAME}\` must have a default worker export.`);