@cloudflare/vite-plugin 0.0.0-1bdb96926 → 0.0.0-1be56441d
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.
|
@@ -1985,7 +1985,7 @@ var we = class {
|
|
|
1985
1985
|
this.hasWritten || this.readyAnalytics && (this.hasWritten = true, this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1, this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead)], blobs: [this.data.hostname?.substring(0, 256), this.data.dispatchtype, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] }));
|
|
1986
1986
|
}
|
|
1987
1987
|
};
|
|
1988
|
-
var On = (t4) => ({ invoke_user_worker_ahead_of_assets: t4?.invoke_user_worker_ahead_of_assets ?? false, has_user_worker: t4?.has_user_worker ?? false, account_id: t4?.account_id ?? -1, script_id: t4?.script_id ?? -1 });
|
|
1988
|
+
var On = (t4) => ({ invoke_user_worker_ahead_of_assets: t4?.invoke_user_worker_ahead_of_assets ?? false, has_user_worker: t4?.has_user_worker ?? false, account_id: t4?.account_id ?? -1, script_id: t4?.script_id ?? -1, debug: t4?.debug ?? false });
|
|
1989
1989
|
var Bc = { async fetch(t4, e, n) {
|
|
1990
1990
|
let r, o = false, s = new we(e.ANALYTICS), i = new ue(e.UNSAFE_PERFORMANCE), a = i.now();
|
|
1991
1991
|
try {
|
package/dist/index.js
CHANGED
|
@@ -5784,7 +5784,8 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5784
5784
|
// ../workers-shared/utils/types.ts
|
|
5785
5785
|
var InternalConfigSchema = z.object({
|
|
5786
5786
|
account_id: z.number().optional(),
|
|
5787
|
-
script_id: z.number().optional()
|
|
5787
|
+
script_id: z.number().optional(),
|
|
5788
|
+
debug: z.boolean().optional()
|
|
5788
5789
|
});
|
|
5789
5790
|
var RouterConfigSchema = z.object({
|
|
5790
5791
|
invoke_user_worker_ahead_of_assets: z.boolean().optional(),
|
|
@@ -14429,11 +14430,11 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
14429
14430
|
viteDevServer.httpServer,
|
|
14430
14431
|
"Unexpected error: No Vite HTTP server"
|
|
14431
14432
|
);
|
|
14433
|
+
const inputInspectorPort = await getInputInspectorPortOption(
|
|
14434
|
+
pluginConfig,
|
|
14435
|
+
viteDevServer
|
|
14436
|
+
);
|
|
14432
14437
|
if (!miniflare) {
|
|
14433
|
-
const inputInspectorPort = await getInputInspectorPortOption(
|
|
14434
|
-
pluginConfig,
|
|
14435
|
-
viteDevServer
|
|
14436
|
-
);
|
|
14437
14438
|
miniflare = new Miniflare(
|
|
14438
14439
|
getDevMiniflareOptions(
|
|
14439
14440
|
resolvedPluginConfig,
|
|
@@ -14442,12 +14443,11 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
14442
14443
|
)
|
|
14443
14444
|
);
|
|
14444
14445
|
} else {
|
|
14445
|
-
const resolvedInspectorPort = await getResolvedInspectorPort(pluginConfig);
|
|
14446
14446
|
await miniflare.setOptions(
|
|
14447
14447
|
getDevMiniflareOptions(
|
|
14448
14448
|
resolvedPluginConfig,
|
|
14449
14449
|
viteDevServer,
|
|
14450
|
-
|
|
14450
|
+
inputInspectorPort
|
|
14451
14451
|
)
|
|
14452
14452
|
);
|
|
14453
14453
|
}
|
|
@@ -14830,6 +14830,12 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
14830
14830
|
}
|
|
14831
14831
|
}
|
|
14832
14832
|
async function getInputInspectorPortOption(pluginConfig, viteServer) {
|
|
14833
|
+
if (pluginConfig.inspectorPort === void 0 || pluginConfig.inspectorPort === 0) {
|
|
14834
|
+
const resolvedInspectorPort = await getResolvedInspectorPort(pluginConfig);
|
|
14835
|
+
if (resolvedInspectorPort !== null) {
|
|
14836
|
+
return resolvedInspectorPort;
|
|
14837
|
+
}
|
|
14838
|
+
}
|
|
14833
14839
|
const inputInspectorPort = pluginConfig.inspectorPort ?? await getFirstAvailablePort(DEFAULT_INSPECTOR_PORT);
|
|
14834
14840
|
if (pluginConfig.inspectorPort === void 0 && inputInspectorPort !== DEFAULT_INSPECTOR_PORT) {
|
|
14835
14841
|
viteServer.config.logger.warn(
|
|
@@ -1435,20 +1435,21 @@ async function getWorkerEntryExport(path, entrypoint) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
1437
1437
|
// src/runner-worker/index.ts
|
|
1438
|
+
var IGNORED_KEYS = ["self", "tailStream"];
|
|
1438
1439
|
var WORKER_ENTRYPOINT_KEYS = [
|
|
1439
1440
|
"fetch",
|
|
1441
|
+
"queue",
|
|
1440
1442
|
"tail",
|
|
1443
|
+
"test",
|
|
1441
1444
|
"trace",
|
|
1442
|
-
"scheduled"
|
|
1443
|
-
"queue",
|
|
1444
|
-
"test"
|
|
1445
|
+
"scheduled"
|
|
1445
1446
|
];
|
|
1446
1447
|
var DURABLE_OBJECT_KEYS = [
|
|
1447
|
-
"fetch",
|
|
1448
1448
|
"alarm",
|
|
1449
|
-
"
|
|
1449
|
+
"fetch",
|
|
1450
1450
|
"webSocketClose",
|
|
1451
|
-
"webSocketError"
|
|
1451
|
+
"webSocketError",
|
|
1452
|
+
"webSocketMessage"
|
|
1452
1453
|
];
|
|
1453
1454
|
var WORKFLOW_ENTRYPOINT_KEYS = ["run"];
|
|
1454
1455
|
var entryPath = "";
|
|
@@ -1513,7 +1514,7 @@ function createWorkerEntrypointWrapper(entrypoint) {
|
|
|
1513
1514
|
if (value !== void 0) {
|
|
1514
1515
|
return value;
|
|
1515
1516
|
}
|
|
1516
|
-
if (key === "
|
|
1517
|
+
if (typeof key === "symbol" || IGNORED_KEYS.includes(key) || DURABLE_OBJECT_KEYS.includes(key)) {
|
|
1517
1518
|
return;
|
|
1518
1519
|
}
|
|
1519
1520
|
const property = getWorkerEntrypointRpcProperty.call(
|
|
@@ -1611,7 +1612,7 @@ function createDurableObjectWrapper(className) {
|
|
|
1611
1612
|
if (value !== void 0) {
|
|
1612
1613
|
return value;
|
|
1613
1614
|
}
|
|
1614
|
-
if (key === "
|
|
1615
|
+
if (typeof key === "symbol" || IGNORED_KEYS.includes(key) || WORKER_ENTRYPOINT_KEYS.includes(key)) {
|
|
1615
1616
|
return;
|
|
1616
1617
|
}
|
|
1617
1618
|
const property = getDurableObjectRpcProperty.call(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-1be56441d",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"tinyglobby": "^0.2.12",
|
|
41
41
|
"unenv": "2.0.0-rc.15",
|
|
42
42
|
"ws": "8.18.0",
|
|
43
|
-
"miniflare": "0.0.0-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
43
|
+
"miniflare": "0.0.0-1be56441d",
|
|
44
|
+
"@cloudflare/unenv-preset": "0.0.0-1be56441d",
|
|
45
|
+
"wrangler": "0.0.0-1be56441d"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@cloudflare/workers-types": "^4.
|
|
48
|
+
"@cloudflare/workers-types": "^4.20250424.0",
|
|
49
49
|
"@types/node": "^22.10.1",
|
|
50
50
|
"@types/ws": "^8.5.13",
|
|
51
51
|
"magic-string": "^0.30.12",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"typescript": "^5.7.2",
|
|
55
55
|
"undici": "^5.28.5",
|
|
56
56
|
"vite": "^6.1.0",
|
|
57
|
-
"vitest": "~3.
|
|
58
|
-
"@cloudflare/workers-shared": "0.0.0-1bdb96926",
|
|
57
|
+
"vitest": "~3.1.1",
|
|
59
58
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
59
|
+
"@cloudflare/workers-shared": "0.0.0-1be56441d",
|
|
60
60
|
"@cloudflare/mock-npm-registry": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|