@depup/cloudflare__vite-plugin 1.55.0-depup.1 → 1.56.0-depup.1

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/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/cloudflare__vite-plugin
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@cloudflare/vite-plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin) @ 1.55.0 |
17
- | Processed | 2026-09-18 |
16
+ | Original | [@cloudflare/vite-plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin) @ 1.56.0 |
17
+ | Processed | 2026-09-19 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 2 |
20
20
 
@@ -22,7 +22,7 @@ npm install @depup/cloudflare__vite-plugin
22
22
 
23
23
  | Dependency | From | To |
24
24
  |------------|------|-----|
25
- | workerd | 1.20260917.1 | ^1.20260918.1 |
25
+ | workerd | 1.20260918.1 | ^1.20260919.1 |
26
26
  | ws | 8.21.0 | ^8.21.3 |
27
27
 
28
28
  ---
package/changes.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "bumped": {
3
3
  "workerd": {
4
- "from": "1.20260917.1",
5
- "to": "^1.20260918.1"
4
+ "from": "1.20260918.1",
5
+ "to": "^1.20260919.1"
6
6
  },
7
7
  "ws": {
8
8
  "from": "8.21.0",
9
9
  "to": "^8.21.3"
10
10
  }
11
11
  },
12
- "timestamp": "2026-09-18T08:11:09.552Z",
12
+ "timestamp": "2026-09-19T08:10:20.477Z",
13
13
  "totalUpdated": 2
14
14
  }
package/dist/cf-vite.mjs CHANGED
@@ -7,6 +7,7 @@ import { createBuilder, createServer } from "vite";
7
7
  * delegate uses to force the experimental Build Output Specification on by default.
8
8
  */
9
9
  const FORCE_BUILD_OUTPUT_ENV_VAR = "CLOUDFLARE_VITE_FORCE_BUILD_OUTPUT";
10
+ const PREVIEW_BUILD_ENV_VAR = "CLOUDFLARE_VITE_PREVIEW_BUILD";
10
11
 
11
12
  //#endregion
12
13
  //#region src/cf-vite.ts
@@ -38,7 +39,7 @@ const FORCE_BUILD_OUTPUT_ENV_VAR = "CLOUDFLARE_VITE_FORCE_BUILD_OUTPUT";
38
39
  * `build` runs Vite's full multi-environment app build via
39
40
  * `createBuilder().buildApp()` (NOT the legacy single-environment
40
41
  * `build()` helper, which would skip the plugin's worker builds). It
41
- * accepts only `--mode` (the other shared flags don't apply to a build).
42
+ * accepts `--mode` and the internal `--preview` build context flag.
42
43
  *
43
44
  * Exit codes: 0 graceful, 2 unknown verb / parse error, 130 SIGINT,
44
45
  * 143 SIGTERM.
@@ -84,7 +85,10 @@ function parseBuildArgs(argv) {
84
85
  try {
85
86
  parsed = parseArgs({
86
87
  args: argv,
87
- options: { mode: { type: "string" } },
88
+ options: {
89
+ mode: { type: "string" },
90
+ preview: { type: "boolean" }
91
+ },
88
92
  strict: true,
89
93
  allowPositionals: false
90
94
  });
@@ -93,6 +97,7 @@ function parseBuildArgs(argv) {
93
97
  }
94
98
  const out = {};
95
99
  if (parsed.values.mode !== void 0) out.mode = parsed.values.mode;
100
+ if (parsed.values.preview !== void 0) out.preview = parsed.values.preview;
96
101
  return out;
97
102
  }
98
103
  async function main() {
@@ -153,6 +158,7 @@ async function runBuild(userArgv) {
153
158
  }
154
159
  throw err;
155
160
  }
161
+ process.env[PREVIEW_BUILD_ENV_VAR] = args.preview === true ? "true" : "false";
156
162
  const inlineConfig = {};
157
163
  if (args.mode !== void 0) inlineConfig.mode = args.mode;
158
164
  await (await createBuilder(inlineConfig)).buildApp();
@@ -1,6 +1,6 @@
1
1
  import { Pipeline, PipelineRecord } from "cloudflare:pipelines";
2
2
 
3
- //#region ../config/dist/public-Mr8YPLNL.d.mts
3
+ //#region ../config/dist/public-CFsFemEv.d.mts
4
4
 
5
5
  //#region src/inference.d.ts
6
6
  /**
@@ -213,6 +213,7 @@ type Json = string | number | boolean | null | Json[] | {
213
213
  //#endregion
214
214
  //#region src/definition.d.ts
215
215
  interface ConfigContext {
216
+ isPreview: boolean;
216
217
  /**
217
218
  * The mode the config is being evaluated in.
218
219
  * Set via the `--mode` CLI flag.
@@ -615,6 +616,25 @@ type ContainerImage = {
615
616
  */
616
617
  reference: string;
617
618
  };
619
+ /** Application-wide observability settings shared by all Containers. */
620
+ interface ContainerObservabilityConfig {
621
+ /** Whether observability is enabled. */
622
+ enabled?: boolean;
623
+ logs?: {
624
+ /** Whether log collection is enabled. */
625
+ enabled?: boolean;
626
+ };
627
+ }
628
+ /** Observability settings for a standard Container application. */
629
+ type StandardContainerObservabilityConfig = ContainerObservabilityConfig & ({
630
+ /** Percentage of Container instances targeted for observability. */
631
+ targetInstancePercentage?: number;
632
+ targetInstanceCount?: never;
633
+ } | {
634
+ targetInstancePercentage?: never;
635
+ /** Number of Container instances targeted for observability. */
636
+ targetInstanceCount?: number;
637
+ });
618
638
  /** Fields shared by all Container application configurations. */
619
639
  interface BaseContainerConfig {
620
640
  /**
@@ -631,23 +651,6 @@ interface BaseContainerConfig {
631
651
  * Object's `exports` entry via its `container` field.
632
652
  */
633
653
  name: string;
634
- /** Configures observability for Container instances. */
635
- observability?: {
636
- /** Whether observability is enabled. */
637
- enabled?: boolean;
638
- logs?: {
639
- /** Whether log collection is enabled. */
640
- enabled?: boolean;
641
- };
642
- } & ({
643
- /** Percentage of Container instances targeted for observability. */
644
- targetInstancePercentage?: number;
645
- targetInstanceCount?: never;
646
- } | {
647
- targetInstancePercentage?: never;
648
- /** Number of Container instances targeted for observability. */
649
- targetInstanceCount?: number;
650
- });
651
654
  /**
652
655
  * Passed through without client-side validation or transformation.
653
656
  *
@@ -657,6 +660,8 @@ interface BaseContainerConfig {
657
660
  }
658
661
  /** A Container application managed with a standard scheduling policy. */
659
662
  interface StandardContainerConfig extends BaseContainerConfig {
663
+ /** Configures observability and optional targeting for Container instances. */
664
+ observability?: StandardContainerObservabilityConfig;
660
665
  /** The image to build or deploy. */
661
666
  image: ContainerImage;
662
667
  /**
@@ -761,6 +766,11 @@ interface StandardContainerConfig extends BaseContainerConfig {
761
766
  /** A Container application managed by a Durable Object. */
762
767
  interface DurableObjectContainerConfig extends BaseContainerConfig {
763
768
  schedulingPolicy: "durable-object";
769
+ /**
770
+ * Configures application-wide observability. Instance targeting is not
771
+ * supported for Durable Object-managed Containers.
772
+ */
773
+ observability?: ContainerObservabilityConfig;
764
774
  /** Named images that the Durable Object can start. */
765
775
  images?: Record<string, ContainerImage>;
766
776
  }