@cloudflare/vite-plugin 1.32.1 → 1.32.3
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/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import * as wrangler from "wrangler";
|
|
|
10
10
|
import * as util$1 from "node:util";
|
|
11
11
|
import { format, inspect, promisify } from "node:util";
|
|
12
12
|
import * as vite from "vite";
|
|
13
|
-
import { version } from "vite";
|
|
13
|
+
import { normalizePath, version } from "vite";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
15
15
|
import { getCloudflarePreset, nonPrefixedNodeModules } from "@cloudflare/unenv-preset";
|
|
16
16
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -3159,13 +3159,13 @@ var require_OSPaths = __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node
|
|
|
3159
3159
|
function Adapt(adapter_) {
|
|
3160
3160
|
var env$1 = adapter_.env, os2 = adapter_.os, path4 = adapter_.path;
|
|
3161
3161
|
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
3162
|
-
function normalizePath$
|
|
3162
|
+
function normalizePath$2(path_) {
|
|
3163
3163
|
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
|
|
3164
3164
|
}
|
|
3165
|
-
__name(normalizePath$
|
|
3165
|
+
__name(normalizePath$2, "normalizePath");
|
|
3166
3166
|
function home() {
|
|
3167
3167
|
return isWinOS ? (/* @__PURE__ */ __name(function() {
|
|
3168
|
-
return normalizePath$
|
|
3168
|
+
return normalizePath$2([
|
|
3169
3169
|
typeof os2.homedir === "function" ? os2.homedir() : void 0,
|
|
3170
3170
|
env$1.get("USERPROFILE"),
|
|
3171
3171
|
env$1.get("HOME"),
|
|
@@ -3174,7 +3174,7 @@ var require_OSPaths = __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node
|
|
|
3174
3174
|
return !isEmpty(v);
|
|
3175
3175
|
}));
|
|
3176
3176
|
}, "windows"))() : (/* @__PURE__ */ __name(function() {
|
|
3177
|
-
return normalizePath$
|
|
3177
|
+
return normalizePath$2((typeof os2.homedir === "function" ? os2.homedir() : void 0) || env$1.get("HOME"));
|
|
3178
3178
|
}, "posix"))();
|
|
3179
3179
|
}
|
|
3180
3180
|
__name(home, "home");
|
|
@@ -3184,7 +3184,7 @@ var require_OSPaths = __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node
|
|
|
3184
3184
|
}
|
|
3185
3185
|
__name(joinPathToBase, "joinPathToBase");
|
|
3186
3186
|
function posix$1() {
|
|
3187
|
-
return normalizePath$
|
|
3187
|
+
return normalizePath$2([
|
|
3188
3188
|
typeof os2.tmpdir === "function" ? os2.tmpdir() : void 0,
|
|
3189
3189
|
env$1.get("TMPDIR"),
|
|
3190
3190
|
env$1.get("TEMP"),
|
|
@@ -3229,7 +3229,7 @@ var require_OSPaths = __commonJS({ "../../node_modules/.pnpm/os-paths@7.4.0/node
|
|
|
3229
3229
|
].find(function(v2) {
|
|
3230
3230
|
return v2 && !isEmpty(v2());
|
|
3231
3231
|
});
|
|
3232
|
-
return v && normalizePath$
|
|
3232
|
+
return v && normalizePath$2(v()) || fallback;
|
|
3233
3233
|
}
|
|
3234
3234
|
__name(windows, "windows");
|
|
3235
3235
|
return isWinOS ? windows() : posix$1();
|
|
@@ -25725,16 +25725,16 @@ const configPlugin = createPlugin("config", (ctx) => {
|
|
|
25725
25725
|
}
|
|
25726
25726
|
return {
|
|
25727
25727
|
appType: "custom",
|
|
25728
|
-
server: { fs: { deny: [
|
|
25729
|
-
|
|
25730
|
-
|
|
25731
|
-
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
],
|
|
25728
|
+
server: { fs: { deny: [...[
|
|
25729
|
+
".env",
|
|
25730
|
+
".env.*",
|
|
25731
|
+
"*.{crt,pem}",
|
|
25732
|
+
"**/.git/**",
|
|
25733
|
+
"vite.config.*",
|
|
25735
25734
|
".dev.vars",
|
|
25736
|
-
".dev.vars.*"
|
|
25737
|
-
|
|
25735
|
+
".dev.vars.*",
|
|
25736
|
+
"**/.wrangler/**"
|
|
25737
|
+
], ...Array.from(ctx.resolvedPluginConfig.configPaths, (configPath) => normalizePath(configPath))] } },
|
|
25738
25738
|
environments: getEnvironmentsConfig(ctx, userConfig, env$1.mode),
|
|
25739
25739
|
builder: { buildApp: userConfig.builder?.buildApp ?? createBuildApp(ctx.resolvedPluginConfig) }
|
|
25740
25740
|
};
|
|
@@ -27238,15 +27238,15 @@ var require_utils$1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/f
|
|
|
27238
27238
|
return path$1.replace(SLASHES_REGEX, separator);
|
|
27239
27239
|
}
|
|
27240
27240
|
exports.convertSlashes = convertSlashes;
|
|
27241
|
-
function normalizePath(path$1, options) {
|
|
27242
|
-
const { resolvePaths, normalizePath: normalizePath$
|
|
27241
|
+
function normalizePath$1(path$1, options) {
|
|
27242
|
+
const { resolvePaths, normalizePath: normalizePath$2, pathSeparator } = options;
|
|
27243
27243
|
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
|
|
27244
27244
|
if (resolvePaths) path$1 = (0, path_1$4.resolve)(path$1);
|
|
27245
|
-
if (normalizePath$
|
|
27245
|
+
if (normalizePath$2 || pathNeedsCleaning) path$1 = cleanPath(path$1);
|
|
27246
27246
|
if (path$1 === ".") return "";
|
|
27247
27247
|
return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
|
|
27248
27248
|
}
|
|
27249
|
-
exports.normalizePath = normalizePath;
|
|
27249
|
+
exports.normalizePath = normalizePath$1;
|
|
27250
27250
|
}) });
|
|
27251
27251
|
|
|
27252
27252
|
//#endregion
|