@cloudflare/vitest-plugin 1.0.0 → 1.1.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.
@@ -17,6 +17,11 @@ declare const WorkersPoolOptionsSchema: z.ZodObject<{
17
17
  configPath: z.ZodOptional<z.ZodString>;
18
18
  environment: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strip>>;
20
+ experimental: z.ZodOptional<z.ZodObject<{
21
+ newConfig: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
22
+ configPath: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>]>>;
24
+ }, z.core.$strip>>;
20
25
  }, z.core.$strip>;
21
26
  type CompatibleWorkerOptions = LegacyWorkerOptions & {
22
27
  /** @deprecated Use `cacheAPI` instead. */
@@ -33,6 +38,26 @@ type WorkersPoolOptions = z.input<typeof WorkersPoolOptionsSchema> & {
33
38
  type WorkersPoolOptionsWithDefines = WorkersPoolOptions & {
34
39
  defines?: Record<string, string>;
35
40
  moduleRules?: V4ModuleRule[];
41
+ /**
42
+ * Details of the configuration file these options were resolved from. Set
43
+ * while parsing; not a user-facing option. Undefined when the project
44
+ * configures the Worker entirely through `miniflare` options.
45
+ */
46
+ resolvedConfig?: {
47
+ /** Absolute path of the configuration file. */
48
+ path: string;
49
+ /**
50
+ * Whether that file is a `cloudflare.config.ts` rather than a Wrangler
51
+ * configuration file. Determines how config fields are named in errors.
52
+ */
53
+ newConfig: boolean;
54
+ /**
55
+ * The Worker name declared in the configuration file, before any
56
+ * environment name is appended. Self-referential service, tail and
57
+ * Workflow bindings are written against this name.
58
+ */
59
+ workerName: string | undefined;
60
+ };
36
61
  };
37
62
  //#endregion
38
63
  //#region src/pool/plugin.d.ts
@@ -79,7 +104,7 @@ declare function readD1Migrations(migrationsPath: string): Promise<D1Migration[]
79
104
  //#endregion
80
105
  //#region src/pool/pages.d.ts
81
106
  declare function poolWorkerStarted(): void;
82
- declare function poolWorkerStopped(): void;
107
+ declare function poolWorkerStopped(): boolean;
83
108
  declare function buildPagesASSETSBinding(assetsPath: string): Promise<(request: Request) => Promise<Response>>;
84
109
  //#endregion
85
110
  //#region src/pool/index.d.ts