@cloudflare/vite-plugin 2.0.0-rc.4 → 2.0.0-rc.5

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.
@@ -1,5 +1,5 @@
1
- import { S as isRolldown, b as debuglog, x as getOutputDirectory, y as createPlugin } from "./tunnel-DSpiLlEf.mjs";
2
- import { C as virtualPrefix, S as WORKER_ENTRY_PATH_HEADER, _ as IS_ENTRY_WORKER_HEADER, b as VIRTUAL_EXPORT_TYPES, f as additionalModuleRE, g as INIT_PATH, h as GET_EXPORT_TYPES_PATH, m as ENVIRONMENT_NAME_HEADER, v as IS_PARENT_ENVIRONMENT_HEADER, x as VIRTUAL_WORKER_ENTRY, y as UNKNOWN_HOST } from "./debug-BVzLHH7X.mjs";
1
+ import { S as isRolldown, b as debuglog, x as getOutputDirectory, y as createPlugin } from "./tunnel-BczPQL-8.mjs";
2
+ import { C as virtualPrefix, S as WORKER_ENTRY_PATH_HEADER, _ as IS_ENTRY_WORKER_HEADER, b as VIRTUAL_EXPORT_TYPES, f as additionalModuleRE, g as INIT_PATH, h as GET_EXPORT_TYPES_PATH, m as ENVIRONMENT_NAME_HEADER, v as IS_PARENT_ENVIRONMENT_HEADER, x as VIRTUAL_WORKER_ENTRY, y as UNKNOWN_HOST } from "./debug-CPeJINaC.mjs";
3
3
  import { builtinModules } from "node:module";
4
4
  import path, * as path$1 from "node:path";
5
5
  import fs, { realpathSync, statSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import { r as __toESM$1, t as __commonJSMin$1 } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
2
  import { i as __toESM$2, t as __commonJSMin$2 } from "./rolldown-runtime-BMUeFane-CwDF_oX0.mjs";
3
3
  import { S as UserError, a as getCloudflareApiBaseUrl, l as getComplianceRegionSubdomain, n as COMPLIANCE_REGION_CONFIG_UNKNOWN } from "./misc-variables-6mf5dDi6-D3ykvtRq.mjs";
4
- import { I as sanitizeHeaders, L as addCustomApiHeaders, c as require_picocolors, l as toApiComplianceRegion, o as getPorts, s as portNumbers, v as cleanUrl, y as createPlugin, z as DEFAULT_MODULE_RULES } from "./tunnel-DSpiLlEf.mjs";
4
+ import { I as sanitizeHeaders, L as addCustomApiHeaders, c as require_picocolors, l as toApiComplianceRegion, o as getPorts, s as portNumbers, v as cleanUrl, y as createPlugin, z as DEFAULT_MODULE_RULES } from "./tunnel-BczPQL-8.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import * as path$1 from "node:path";
7
7
  import path, { relative } from "node:path";
@@ -1,10 +1,10 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
2
  import { _ as getDockerPath } from "./misc-variables-6mf5dDi6-D3ykvtRq.mjs";
3
- import { b as debuglog, c as require_picocolors, d as assertIsNotPreview, h as getCurrentWorkerNameToExportTypesMap, m as compareWorkerNameToExportTypesMaps, p as compareExportTypes } from "./tunnel-DSpiLlEf.mjs";
4
- import { a as initRunners } from "./cloudflare-environment-_xlj7RBY.mjs";
5
- import { u as prepareContainerImagesForCfConfig, y as UNKNOWN_HOST } from "./debug-BVzLHH7X.mjs";
6
- import { n as getDevMiniflareOptions, t as handleWebSocket } from "./websockets-BJtLbshN.mjs";
7
- import { a as kRequestType, createRequestHandler, r as ROUTER_WORKER_NAME, resolveRequestTarget, t as ASSET_WORKER_NAME } from "./request-handler-DoB8hTSz.mjs";
3
+ import { b as debuglog, c as require_picocolors, d as assertIsNotPreview, h as getCurrentWorkerNameToExportTypesMap, m as compareWorkerNameToExportTypesMaps, p as compareExportTypes } from "./tunnel-BczPQL-8.mjs";
4
+ import { a as initRunners } from "./cloudflare-environment-1VsQlOBY.mjs";
5
+ import { u as prepareContainerImagesForCfConfig, y as UNKNOWN_HOST } from "./debug-CPeJINaC.mjs";
6
+ import { n as getDevMiniflareOptions, t as handleWebSocket } from "./websockets-DUMj2fpZ.mjs";
7
+ import { a as kRequestType, createRequestHandler, r as ROUTER_WORKER_NAME, resolveRequestTarget, t as ASSET_WORKER_NAME } from "./request-handler-BBxibu2n.mjs";
8
8
  import assert from "node:assert";
9
9
  import { CoreHeaders, buildPublicUrl } from "miniflare";
10
10
  //#region ../workers-shared/asset-worker/src/utils/rules-engine.ts
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { n as __require, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
2
  import { t as __commonJSMin$1 } from "./rolldown-runtime-BMUeFane-CwDF_oX0.mjs";
3
3
  import { _ as getDockerPath } from "./misc-variables-6mf5dDi6-D3ykvtRq.mjs";
4
- import { A as getWorkerNameFromProject, C as satisfiesMinimumViteVersion, K as prettifyError, R as DEFAULT_COMPAT_DATE, S as isRolldown, T as PACKAGE_INFO, b as debuglog, c as require_picocolors, d as assertIsNotPreview, f as assertIsPreview, i as tunnelPlugin, u as PluginContext, v as cleanUrl, x as getOutputDirectory, y as createPlugin } from "./tunnel-DSpiLlEf.mjs";
5
- import { c as assertHasNodeJsCompat, d as isNodeAlsModule, f as nodeBuiltinsRE, h as virtualModulesPlugin, i as createCloudflareEnvironmentOptions, l as hasNodeJsAls, m as virtualClientFallbackPlugin, n as applyWorkerEsbuildSupported, o as NodeJsCompat, p as VIRTUAL_CLIENT_FALLBACK_ENTRY, r as cloudflareBuiltInModules, s as NodeJsCompatWarnings, t as MAIN_ENTRY_NAME, u as hasNodeJsCompat } from "./cloudflare-environment-_xlj7RBY.mjs";
6
- import { T as hasAssetsConfigChanged, a as buildAndWriteContainerOutput, n as addDebugToVitePrintUrls, p as additionalModulesPlugin, r as getDebugPathHtml, t as DEBUG_PATH } from "./debug-BVzLHH7X.mjs";
4
+ import { A as getWorkerNameFromProject, C as satisfiesMinimumViteVersion, K as prettifyError, R as DEFAULT_COMPAT_DATE, S as isRolldown, T as PACKAGE_INFO, b as debuglog, c as require_picocolors, d as assertIsNotPreview, f as assertIsPreview, i as tunnelPlugin, u as PluginContext, v as cleanUrl, x as getOutputDirectory, y as createPlugin } from "./tunnel-BczPQL-8.mjs";
5
+ import { c as assertHasNodeJsCompat, d as isNodeAlsModule, f as nodeBuiltinsRE, h as virtualModulesPlugin, i as createCloudflareEnvironmentOptions, l as hasNodeJsAls, m as virtualClientFallbackPlugin, n as applyWorkerEsbuildSupported, o as NodeJsCompat, p as VIRTUAL_CLIENT_FALLBACK_ENTRY, r as cloudflareBuiltInModules, s as NodeJsCompatWarnings, t as MAIN_ENTRY_NAME, u as hasNodeJsCompat } from "./cloudflare-environment-1VsQlOBY.mjs";
6
+ import { T as hasAssetsConfigChanged, a as buildAndWriteContainerOutput, n as addDebugToVitePrintUrls, p as additionalModulesPlugin, r as getDebugPathHtml, t as DEBUG_PATH } from "./debug-CPeJINaC.mjs";
7
7
  import { builtinModules } from "node:module";
8
8
  import * as path$1 from "node:path";
9
9
  import * as fs$2 from "node:fs";
@@ -1508,11 +1508,11 @@ const rscPlugin = createPlugin("rsc", () => {
1508
1508
  //#endregion
1509
1509
  //#region src/plugins/runtime.ts
1510
1510
  const devPlugin = createPlugin("dev", (ctx) => ({ async configureServer(viteDevServer) {
1511
- const { configureDevServer } = await import("./dev-C-9gh1jS.mjs");
1511
+ const { configureDevServer } = await import("./dev-DNaG-ije.mjs");
1512
1512
  return configureDevServer(ctx, viteDevServer);
1513
1513
  } }));
1514
1514
  const previewPlugin = createPlugin("preview", (ctx) => ({ async configurePreviewServer(vitePreviewServer) {
1515
- const { configurePreviewServer } = await import("./preview-D_Sx3x7l.mjs");
1515
+ const { configurePreviewServer } = await import("./preview-Dy_2X8R4.mjs");
1516
1516
  return configurePreviewServer(ctx, vitePreviewServer);
1517
1517
  } }));
1518
1518
  const shortcutsPlugin = createPlugin("shortcuts", (ctx) => {
@@ -1521,13 +1521,13 @@ const shortcutsPlugin = createPlugin("shortcuts", (ctx) => {
1521
1521
  async configureServer(viteDevServer) {
1522
1522
  if (!isCustomShortcutsSupported) return;
1523
1523
  assertIsNotPreview(ctx);
1524
- const { addShortcuts } = await import("./shortcuts-BYJZiV3c.mjs");
1524
+ const { addShortcuts } = await import("./shortcuts-BbJ3uPyY.mjs");
1525
1525
  addShortcuts(viteDevServer, ctx);
1526
1526
  },
1527
1527
  async configurePreviewServer(vitePreviewServer) {
1528
1528
  if (!isCustomShortcutsSupported) return;
1529
1529
  assertIsPreview(ctx);
1530
- const { addShortcuts } = await import("./shortcuts-BYJZiV3c.mjs");
1530
+ const { addShortcuts } = await import("./shortcuts-BbJ3uPyY.mjs");
1531
1531
  addShortcuts(vitePreviewServer, ctx);
1532
1532
  }
1533
1533
  };
@@ -1561,7 +1561,7 @@ const triggerHandlersPlugin = createPlugin("trigger-handlers", (ctx) => {
1561
1561
  async configureServer(viteDevServer) {
1562
1562
  const entryWorkerConfig = ctx.entryWorkerConfig;
1563
1563
  if (!entryWorkerConfig) return;
1564
- const [{ CoreHeaders }, { createRequestHandler }] = await Promise.all([import("miniflare"), import("./request-handler-DoB8hTSz.mjs")]);
1564
+ const [{ CoreHeaders }, { createRequestHandler }] = await Promise.all([import("miniflare"), import("./request-handler-BBxibu2n.mjs")]);
1565
1565
  const entryWorkerName = entryWorkerConfig.name;
1566
1566
  const requestHandler = createRequestHandler((request) => {
1567
1567
  request.headers.set(CoreHeaders.ROUTE_OVERRIDE, entryWorkerName);
@@ -1,7 +1,7 @@
1
1
  //#region package.json
2
2
  var package_default = {
3
3
  name: "@cloudflare/vite-plugin",
4
- version: "2.0.0-rc.4",
4
+ version: "2.0.0-rc.5",
5
5
  description: "Cloudflare plugin for Vite",
6
6
  keywords: [
7
7
  "cloudflare",
@@ -1,9 +1,9 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
2
  import { _ as getDockerPath } from "./misc-variables-6mf5dDi6-D3ykvtRq.mjs";
3
- import { c as require_picocolors, f as assertIsPreview } from "./tunnel-DSpiLlEf.mjs";
4
- import { u as prepareContainerImagesForCfConfig } from "./debug-BVzLHH7X.mjs";
5
- import { r as getPreviewMiniflareOptions, t as handleWebSocket } from "./websockets-BJtLbshN.mjs";
6
- import { createRequestHandler } from "./request-handler-DoB8hTSz.mjs";
3
+ import { c as require_picocolors, f as assertIsPreview } from "./tunnel-BczPQL-8.mjs";
4
+ import { u as prepareContainerImagesForCfConfig } from "./debug-CPeJINaC.mjs";
5
+ import { r as getPreviewMiniflareOptions, t as handleWebSocket } from "./websockets-DUMj2fpZ.mjs";
6
+ import { createRequestHandler } from "./request-handler-BBxibu2n.mjs";
7
7
  import { buildPublicUrl } from "miniflare";
8
8
  //#region src/plugins/preview.ts
9
9
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
@@ -1,4 +1,4 @@
1
- import { a as warnIfQuickTunnelSseResponse } from "./tunnel-DSpiLlEf.mjs";
1
+ import { a as warnIfQuickTunnelSseResponse } from "./tunnel-BczPQL-8.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { CoreHeaders, Request as Request$1, Response as Response$1, parseForwardedProto } from "miniflare";
4
4
  //#region src/constants.ts
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
- import { M as printBindings, V as convertConfigToBindings, c as require_picocolors, n as isTunnelOpen, r as toggleTunnel, t as extendTunnelExpiry } from "./tunnel-DSpiLlEf.mjs";
2
+ import { M as printBindings, V as convertConfigToBindings, c as require_picocolors, n as isTunnelOpen, r as toggleTunnel, t as extendTunnelExpiry } from "./tunnel-BczPQL-8.mjs";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
@@ -44403,8 +44403,6 @@ const CF_CLIENT_REGISTERED_SCOPES = [
44403
44403
  "zone.write"
44404
44404
  ];
44405
44405
  const CF_UNGRANTABLE_SCOPE_SET = /* @__PURE__ */ new Set([
44406
- "billing:read",
44407
- "billing:write",
44408
44406
  "email_routing:read",
44409
44407
  "email_sending:read",
44410
44408
  "notebook-managed:read",
@@ -1,8 +1,8 @@
1
1
  import { n as __require, t as __commonJSMin } from "./rolldown-runtime-kJ_i4yPo.mjs";
2
2
  import { S as UserError, _ as getDockerPath, d as getLocalExplorerUseViteAllowedHostsFromEnv, f as getLocalObservabilityEnabledFromEnv, l as getComplianceRegionSubdomain, r as getBrowserRenderingHeadfulFromEnv, u as getLocalExplorerEnabledFromEnv } from "./misc-variables-6mf5dDi6-D3ykvtRq.mjs";
3
- import { B as assertNever, C as satisfiesMinimumViteVersion, D as getAuthFromEnv, E as getAccessHeaders, F as chalk, G as resolveBindingRemote, H as createArtifactsLocalDefaultWarner, J as INHERIT_SYMBOL, N as retryOnAPIFailure, O as fetchLatestNpmVersion, P as require_undici, U as extractBindingsOfType, W as isUnsafeBindingType, X as parseJSON, Y as ParseError, _ as getRemoteBindingsAuth, b as debuglog, g as createLogger, j as getWorkerZone, k as fetchResultBase, l as toApiComplianceRegion, q as APIError, w as withTrailingSlash } from "./tunnel-DSpiLlEf.mjs";
4
- import { c as createMiniflareExports, d as resolveDockerHost, f as additionalModuleRE, i as getInputInspectorPort, l as generateContainerBuildId, m as ENVIRONMENT_NAME_HEADER, o as createContainerDevPlanForCfConfig, s as createContainerPreviewPlanForCfConfig, w as getAssetsConfig } from "./debug-BVzLHH7X.mjs";
5
- import { a as kRequestType, createHeadersForIncomingMessage, getForwardedProto, i as VITE_PROXY_WORKER_NAME, n as PROXY_SHARED_SECRET, r as ROUTER_WORKER_NAME, resolveRequestTarget, t as ASSET_WORKER_NAME } from "./request-handler-DoB8hTSz.mjs";
3
+ import { B as assertNever, C as satisfiesMinimumViteVersion, D as getAuthFromEnv, E as getAccessHeaders, F as chalk, G as resolveBindingRemote, H as createArtifactsLocalDefaultWarner, J as INHERIT_SYMBOL, N as retryOnAPIFailure, O as fetchLatestNpmVersion, P as require_undici, U as extractBindingsOfType, W as isUnsafeBindingType, X as parseJSON, Y as ParseError, _ as getRemoteBindingsAuth, b as debuglog, g as createLogger, j as getWorkerZone, k as fetchResultBase, l as toApiComplianceRegion, q as APIError, w as withTrailingSlash } from "./tunnel-BczPQL-8.mjs";
4
+ import { c as createMiniflareExports, d as resolveDockerHost, f as additionalModuleRE, i as getInputInspectorPort, l as generateContainerBuildId, m as ENVIRONMENT_NAME_HEADER, o as createContainerDevPlanForCfConfig, s as createContainerPreviewPlanForCfConfig, w as getAssetsConfig } from "./debug-CPeJINaC.mjs";
5
+ import { a as kRequestType, createHeadersForIncomingMessage, getForwardedProto, i as VITE_PROXY_WORKER_NAME, n as PROXY_SHARED_SECRET, r as ROUTER_WORKER_NAME, resolveRequestTarget, t as ASSET_WORKER_NAME } from "./request-handler-BBxibu2n.mjs";
6
6
  import * as path$1 from "node:path";
7
7
  import path, { resolve } from "node:path";
8
8
  import { readFileSync } from "node:fs";
@@ -1118,7 +1118,7 @@ var ProxyControllerLogger = class extends Log {
1118
1118
  super.log(message);
1119
1119
  }
1120
1120
  };
1121
- var version = "0.0.70";
1121
+ var version = "0.0.71";
1122
1122
  const TRACE_VERSION = "trace-v1";
1123
1123
  /**
1124
1124
  * Maximum time (ms) to wait for an individual preview API request before
@@ -1858,7 +1858,7 @@ let updateCheckPromise;
1858
1858
  function checkForNpmUpdate() {
1859
1859
  return updateCheckPromise ??= (async () => {
1860
1860
  try {
1861
- const pkg = (await import("./package-BZsg_Rvi.mjs")).default;
1861
+ const pkg = (await import("./package-DOmBI0W4.mjs")).default;
1862
1862
  return fetchLatestNpmVersion(pkg.name, pkg.version);
1863
1863
  } catch {
1864
1864
  return { status: "failed" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/vite-plugin",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.5",
4
4
  "description": "Cloudflare plugin for Vite",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -39,10 +39,10 @@
39
39
  "unenv": "2.0.0-rc.24",
40
40
  "ws": "8.21.0",
41
41
  "@cloudflare/build-output-utils": "1.0.0-rc.4",
42
- "@cloudflare/runtime-types": "0.1.33",
43
- "@cloudflare/config": "1.0.0-rc.4",
42
+ "miniflare": "5.20261123.1-beta",
44
43
  "@cloudflare/unenv-preset": "2.16.2",
45
- "miniflare": "5.20261123.0-beta"
44
+ "@cloudflare/runtime-types": "0.1.34",
45
+ "@cloudflare/config": "1.0.0-rc.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@cloudflare/workers-types": "^5.20261123.1",
@@ -68,11 +68,11 @@
68
68
  "@cloudflare/cli-shared-helpers": "0.3.13",
69
69
  "@cloudflare/containers-shared": "0.27.2",
70
70
  "@cloudflare/mock-npm-registry": "0.0.0",
71
- "@cloudflare/remote-bindings": "0.0.70",
72
- "@cloudflare/workers-auth": "0.18.7",
73
71
  "@cloudflare/workers-shared": "0.20.3",
72
+ "@cloudflare/workers-auth": "0.18.8",
74
73
  "@cloudflare/workers-tsconfig": "0.0.0",
75
- "@cloudflare/workers-utils": "0.57.0"
74
+ "@cloudflare/workers-utils": "0.57.0",
75
+ "@cloudflare/remote-bindings": "0.0.71"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "vite": "^7.0.0 || ^8.0.0"