@cloudflare/vite-plugin 2.0.0-rc.2 → 2.0.0-rc.4
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 +12 -0
- package/dist/agent-hint-D03l5fox.mjs +460 -0
- package/dist/cloudflare-environment-_xlj7RBY.mjs +6996 -0
- package/dist/debug-BVzLHH7X.mjs +14127 -0
- package/dist/dev-C-9gh1jS.mjs +132 -0
- package/dist/index.d.mts +26 -14
- package/dist/index.mjs +1222 -72175
- package/dist/misc-variables-6mf5dDi6-D3ykvtRq.mjs +487 -0
- package/dist/{package-ymw0HTMv.mjs → package-BZsg_Rvi.mjs} +1 -1
- package/dist/preview-D_Sx3x7l.mjs +45 -0
- package/dist/request-handler-DoB8hTSz.mjs +263 -0
- package/dist/rolldown-runtime-kJ_i4yPo.mjs +26 -0
- package/dist/shortcuts-BYJZiV3c.mjs +656 -0
- package/dist/tunnel-DSpiLlEf.mjs +47436 -0
- package/dist/websockets-BJtLbshN.mjs +2484 -0
- package/dist/workers/runner-worker/index.js +15 -11
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DurableObject, WorkerEntrypoint, WorkflowEntrypoint } from "cloudflare:workers";
|
|
1
|
+
import { DurableObject, WorkerEntrypoint, WorkflowEntrypoint, waitUntil } from "cloudflare:workers";
|
|
2
2
|
import { ModuleRunner, ssrDynamicImportKey, ssrModuleExportsKey } from "vite/module-runner";
|
|
3
3
|
//#region src/shared.ts
|
|
4
4
|
const UNKNOWN_HOST = "http://localhost";
|
|
@@ -92,16 +92,20 @@ const callbackResults = /* @__PURE__ */ new Map();
|
|
|
92
92
|
* since both run in the same V8 isolate). Only a numeric ID crosses the RPC
|
|
93
93
|
* boundary.
|
|
94
94
|
*/
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
function runInRunnerObject(env, callback) {
|
|
96
|
+
const operation = (async () => {
|
|
97
|
+
const id = nextCallbackId++;
|
|
98
|
+
pendingCallbacks.set(id, callback);
|
|
99
|
+
try {
|
|
100
|
+
await env.__VITE_RUNNER_OBJECT__.get("singleton").executeCallback(id);
|
|
101
|
+
return callbackResults.get(id);
|
|
102
|
+
} finally {
|
|
103
|
+
pendingCallbacks.delete(id);
|
|
104
|
+
callbackResults.delete(id);
|
|
105
|
+
}
|
|
106
|
+
})();
|
|
107
|
+
waitUntil(operation);
|
|
108
|
+
return operation;
|
|
105
109
|
}
|
|
106
110
|
/**
|
|
107
111
|
* Durable Object that provides an IoContext for module evaluation and handles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.4",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"unenv": "2.0.0-rc.24",
|
|
40
40
|
"ws": "8.21.0",
|
|
41
|
-
"@cloudflare/build-output-utils": "1.0.0-rc.
|
|
42
|
-
"@cloudflare/
|
|
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",
|
|
43
44
|
"@cloudflare/unenv-preset": "2.16.2",
|
|
44
|
-
"
|
|
45
|
-
"miniflare": "5.20261118.0-beta"
|
|
45
|
+
"miniflare": "5.20261123.0-beta"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@cloudflare/workers-types": "^5.
|
|
48
|
+
"@cloudflare/workers-types": "^5.20261123.1",
|
|
49
49
|
"@remix-run/node-fetch-server": "^1.0.0",
|
|
50
50
|
"@types/node": "22.15.17",
|
|
51
51
|
"@types/semver": "^7.5.1",
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
"tinyglobby": "0.2.16",
|
|
62
62
|
"tree-kill": "1.2.2",
|
|
63
63
|
"tsdown": "0.22.14",
|
|
64
|
-
"typescript": "
|
|
64
|
+
"typescript": "6.0.3",
|
|
65
65
|
"vite": "8.3.4",
|
|
66
66
|
"vite-legacy": "npm:vite@7.1.12",
|
|
67
67
|
"vitest": "5.0.4",
|
|
68
|
-
"@cloudflare/
|
|
68
|
+
"@cloudflare/cli-shared-helpers": "0.3.13",
|
|
69
|
+
"@cloudflare/containers-shared": "0.27.2",
|
|
69
70
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
70
|
-
"@cloudflare/remote-bindings": "0.0.
|
|
71
|
-
"@cloudflare/workers-auth": "0.18.
|
|
71
|
+
"@cloudflare/remote-bindings": "0.0.70",
|
|
72
|
+
"@cloudflare/workers-auth": "0.18.7",
|
|
72
73
|
"@cloudflare/workers-shared": "0.20.3",
|
|
73
74
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
74
|
-
"@cloudflare/workers-utils": "0.
|
|
75
|
-
"@cloudflare/cli-shared-helpers": "0.3.11"
|
|
75
|
+
"@cloudflare/workers-utils": "0.57.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"vite": "^7.0.0 || ^8.0.0"
|