@cloudflare/vite-plugin 1.67.0 → 1.68.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.
- package/dist/{chunk-U6NEESU5-BNOI_hHb.mjs → chunk-U6NEESU5-WjWnfQLn.mjs} +1 -1
- package/dist/index.mjs +13188 -42436
- package/dist/{open-PCXX3ZDZ-DUQ96mXV.mjs → open-PCXX3ZDZ-EfkqB6zS.mjs} +19 -19
- package/dist/{package-DBBTubFu.mjs → package-D99cfNuP.mjs} +7 -7
- package/package.json +9 -9
- package/dist/chunk-U6NEESU5-tZvB0U5x.mjs +0 -43
- package/dist/open-PCXX3ZDZ-JRHaGBZK.mjs +0 -530
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as __name } from "./chunk-U6NEESU5-
|
|
1
|
+
import { r as __name } from "./chunk-U6NEESU5-WjWnfQLn.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs2 from "node:fs";
|
|
4
4
|
import path__default from "node:path";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
|
-
import
|
|
7
|
+
import process5 from "node:process";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
import { Buffer } from "node:buffer";
|
|
10
|
-
import
|
|
10
|
+
import fs4, { constants as constants$1 } from "node:fs/promises";
|
|
11
11
|
import childProcess, { execFile } from "node:child_process";
|
|
12
12
|
|
|
13
|
-
//#region ../../node_modules/.pnpm/@cloudflare+workers-utils@0.
|
|
13
|
+
//#region ../../node_modules/.pnpm/@cloudflare+workers-utils@0.51.1_vitest@5.0.4_@opentelemetry+api@1.9.1_@types+node@22.1_c9b039e4a760058050f2dc3711b5575a/node_modules/@cloudflare/workers-utils/dist/open-PCXX3ZDZ.mjs
|
|
14
14
|
createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
|
|
15
15
|
var isDockerCached;
|
|
16
16
|
function hasDockerEnv() {
|
|
@@ -50,7 +50,7 @@ function isInsideContainer() {
|
|
|
50
50
|
}
|
|
51
51
|
__name(isInsideContainer, "isInsideContainer");
|
|
52
52
|
var isWsl = /* @__PURE__ */ __name(() => {
|
|
53
|
-
if (
|
|
53
|
+
if (process5.platform !== "linux") return false;
|
|
54
54
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
55
55
|
if (isInsideContainer()) return false;
|
|
56
56
|
return true;
|
|
@@ -61,9 +61,9 @@ var isWsl = /* @__PURE__ */ __name(() => {
|
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
63
|
}, "isWsl");
|
|
64
|
-
var is_wsl_default =
|
|
64
|
+
var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
65
65
|
var execFile$1 = promisify(childProcess.execFile);
|
|
66
|
-
var powerShellPath = /* @__PURE__ */ __name(() => `${
|
|
66
|
+
var powerShellPath = /* @__PURE__ */ __name(() => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`, "powerShellPath");
|
|
67
67
|
var executePowerShell = /* @__PURE__ */ __name(async (command, options = {}) => {
|
|
68
68
|
const { powerShellPath: psPath,...execFileOptions } = options;
|
|
69
69
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -99,11 +99,11 @@ var wslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
|
99
99
|
const configFilePath = "/etc/wsl.conf";
|
|
100
100
|
let isConfigFileExists = false;
|
|
101
101
|
try {
|
|
102
|
-
await
|
|
102
|
+
await fs4.access(configFilePath, constants$1.F_OK);
|
|
103
103
|
isConfigFileExists = true;
|
|
104
104
|
} catch {}
|
|
105
105
|
if (!isConfigFileExists) return defaultMountPoint;
|
|
106
|
-
const parsedMountPoint = parseMountPointFromConfig(await
|
|
106
|
+
const parsedMountPoint = parseMountPointFromConfig(await fs4.readFile(configFilePath, { encoding: "utf8" }));
|
|
107
107
|
if (parsedMountPoint === void 0) return defaultMountPoint;
|
|
108
108
|
mountPoint = parsedMountPoint;
|
|
109
109
|
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
@@ -118,7 +118,7 @@ var canAccessPowerShell = /* @__PURE__ */ __name(async () => {
|
|
|
118
118
|
canAccessPowerShellPromise ??= (async () => {
|
|
119
119
|
try {
|
|
120
120
|
const psPath = await powerShellPath2();
|
|
121
|
-
await
|
|
121
|
+
await fs4.access(psPath, constants$1.X_OK);
|
|
122
122
|
return true;
|
|
123
123
|
} catch {
|
|
124
124
|
return false;
|
|
@@ -163,7 +163,7 @@ function defineLazyProperty(object, propertyName, valueGetter) {
|
|
|
163
163
|
__name(defineLazyProperty, "defineLazyProperty");
|
|
164
164
|
var execFileAsync = promisify(execFile);
|
|
165
165
|
async function defaultBrowserId() {
|
|
166
|
-
if (
|
|
166
|
+
if (process5.platform !== "darwin") throw new Error("macOS only");
|
|
167
167
|
const { stdout: stdout$1 } = await execFileAsync("defaults", [
|
|
168
168
|
"read",
|
|
169
169
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -176,7 +176,7 @@ async function defaultBrowserId() {
|
|
|
176
176
|
__name(defaultBrowserId, "defaultBrowserId");
|
|
177
177
|
var execFileAsync2 = promisify(execFile);
|
|
178
178
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
179
|
-
if (
|
|
179
|
+
if (process5.platform !== "darwin") throw new Error("macOS only");
|
|
180
180
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
181
181
|
const execOptions = {};
|
|
182
182
|
if (signal) execOptions.signal = signal;
|
|
@@ -284,14 +284,14 @@ __name(defaultBrowser, "defaultBrowser");
|
|
|
284
284
|
var execFileAsync4 = promisify(execFile);
|
|
285
285
|
var titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase()), "titleize");
|
|
286
286
|
async function defaultBrowser2() {
|
|
287
|
-
if (
|
|
287
|
+
if (process5.platform === "darwin") {
|
|
288
288
|
const id = await defaultBrowserId();
|
|
289
289
|
return {
|
|
290
290
|
name: await bundleName(id),
|
|
291
291
|
id
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
if (
|
|
294
|
+
if (process5.platform === "linux") {
|
|
295
295
|
const { stdout: stdout$1 } = await execFileAsync4("xdg-mime", [
|
|
296
296
|
"query",
|
|
297
297
|
"default",
|
|
@@ -303,15 +303,15 @@ async function defaultBrowser2() {
|
|
|
303
303
|
id
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
if (
|
|
306
|
+
if (process5.platform === "win32") return defaultBrowser();
|
|
307
307
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
308
308
|
}
|
|
309
309
|
__name(defaultBrowser2, "defaultBrowser");
|
|
310
|
-
var is_in_ssh_default = Boolean(
|
|
310
|
+
var is_in_ssh_default = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);
|
|
311
311
|
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
312
312
|
var __dirname$1 = import.meta.url ? path__default.dirname(fileURLToPath(import.meta.url)) : "";
|
|
313
313
|
var localXdgOpenPath = path__default.join(__dirname$1, "xdg-open");
|
|
314
|
-
var { platform, arch: arch$1 } =
|
|
314
|
+
var { platform, arch: arch$1 } = process5;
|
|
315
315
|
var tryEachApp = /* @__PURE__ */ __name(async (apps2, opener) => {
|
|
316
316
|
if (apps2.length === 0) return;
|
|
317
317
|
const errors = [];
|
|
@@ -421,10 +421,10 @@ var baseOpen = /* @__PURE__ */ __name(async (options) => {
|
|
|
421
421
|
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
422
422
|
let exeLocalXdgOpen = false;
|
|
423
423
|
try {
|
|
424
|
-
await
|
|
424
|
+
await fs4.access(localXdgOpenPath, constants$1.X_OK);
|
|
425
425
|
exeLocalXdgOpen = true;
|
|
426
426
|
} catch {}
|
|
427
|
-
command =
|
|
427
|
+
command = process5.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
428
428
|
}
|
|
429
429
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
430
430
|
if (!options.wait) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@cloudflare/vite-plugin",
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.68.0",
|
|
5
5
|
description: "Cloudflare plugin for Vite",
|
|
6
6
|
keywords: [
|
|
7
7
|
"cloudflare",
|
|
@@ -39,19 +39,19 @@ var package_default = {
|
|
|
39
39
|
},
|
|
40
40
|
dependencies: {
|
|
41
41
|
"@cloudflare/unenv-preset": "2.16.2",
|
|
42
|
-
"miniflare": "5.
|
|
42
|
+
"miniflare": "5.20261103.0-beta",
|
|
43
43
|
"unenv": "2.0.0-rc.24",
|
|
44
|
-
"wrangler": "4.
|
|
44
|
+
"wrangler": "4.157.0",
|
|
45
45
|
"ws": "8.22.0"
|
|
46
46
|
},
|
|
47
47
|
devDependencies: {
|
|
48
|
-
"@cloudflare/containers-shared": "0.23.
|
|
48
|
+
"@cloudflare/containers-shared": "0.23.8",
|
|
49
49
|
"@cloudflare/mock-npm-registry": "workspace:*",
|
|
50
50
|
"@cloudflare/remote-bindings": "workspace:*",
|
|
51
51
|
"@cloudflare/workers-shared": "workspace:*",
|
|
52
52
|
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
53
|
-
"@cloudflare/workers-types": "5.
|
|
54
|
-
"@cloudflare/workers-utils": "0.
|
|
53
|
+
"@cloudflare/workers-types": "5.20261103.1",
|
|
54
|
+
"@cloudflare/workers-utils": "0.51.1",
|
|
55
55
|
"@remix-run/node-fetch-server": "1.0.0",
|
|
56
56
|
"@types/node": "22.15.17",
|
|
57
57
|
"@types/semver": "7.8.0",
|
|
@@ -75,7 +75,7 @@ var package_default = {
|
|
|
75
75
|
},
|
|
76
76
|
peerDependencies: {
|
|
77
77
|
"vite": "^6.1.0 || ^7.0.0 || ^8.0.0",
|
|
78
|
-
"wrangler": "^4.
|
|
78
|
+
"wrangler": "^4.157.0"
|
|
79
79
|
},
|
|
80
80
|
"workers-sdk": { "prerelease": true }
|
|
81
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.68.0",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@cloudflare/unenv-preset": "2.16.2",
|
|
40
|
-
"miniflare": "5.
|
|
40
|
+
"miniflare": "5.20261103.0-beta",
|
|
41
41
|
"unenv": "2.0.0-rc.24",
|
|
42
|
-
"wrangler": "4.
|
|
42
|
+
"wrangler": "4.157.0",
|
|
43
43
|
"ws": "8.22.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@cloudflare/containers-shared": "0.23.
|
|
47
|
-
"@cloudflare/workers-types": "5.
|
|
48
|
-
"@cloudflare/workers-utils": "0.
|
|
46
|
+
"@cloudflare/containers-shared": "0.23.8",
|
|
47
|
+
"@cloudflare/workers-types": "5.20261103.1",
|
|
48
|
+
"@cloudflare/workers-utils": "0.51.1",
|
|
49
49
|
"@remix-run/node-fetch-server": "1.0.0",
|
|
50
50
|
"@types/node": "22.15.17",
|
|
51
51
|
"@types/semver": "7.8.0",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"vite-legacy": "npm:vite@7.1.12",
|
|
68
68
|
"vitest": "5.0.4",
|
|
69
69
|
"@cloudflare/remote-bindings": "0.0.47",
|
|
70
|
-
"@cloudflare/workers-shared": "0.20.1",
|
|
71
70
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
72
|
-
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
71
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
72
|
+
"@cloudflare/workers-shared": "0.20.1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"vite": "^6.1.0 || ^7.0.0 || ^8.0.0",
|
|
76
|
-
"wrangler": "^4.
|
|
76
|
+
"wrangler": "^4.157.0"
|
|
77
77
|
},
|
|
78
78
|
"workers-sdk": {
|
|
79
79
|
"prerelease": true
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@cloudflare+workers-utils@0.49.0_vitest@5.0.4_@opentelemetry+api@1.9.1_@types+node@22.1_3c613f03524917535e61300eec21dcfa/node_modules/@cloudflare/workers-utils/dist/chunk-U6NEESU5.mjs
|
|
4
|
-
const require$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
|
|
5
|
-
var __create = Object.create;
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __name = (target, value) => __defProp(target, "name", {
|
|
12
|
-
value,
|
|
13
|
-
configurable: true
|
|
14
|
-
});
|
|
15
|
-
var __require = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b] }) : x)(function(x) {
|
|
16
|
-
if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
|
|
17
|
-
throw Error("Dynamic require of \"" + x + "\" is not supported");
|
|
18
|
-
});
|
|
19
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
20
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
21
|
-
};
|
|
22
|
-
var __export = (target, all) => {
|
|
23
|
-
for (var name in all) __defProp(target, name, {
|
|
24
|
-
get: all[name],
|
|
25
|
-
enumerable: true
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
31
|
-
get: () => from[key],
|
|
32
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
38
|
-
value: mod,
|
|
39
|
-
enumerable: true
|
|
40
|
-
}) : target, mod));
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { __toESM as a, __require as i, __export as n, __name as r, __commonJS as t };
|