Files
SnowLuma/.pnpm-store/v11/files/b1/59bc46701dc56de0624d050bd22fbe847c20b09eaed3b6f44381a58008e13116c1f7e17ea8724d283e8d74fe4c9b410ec3e8301aad54f0365f992af7662466
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

18 lines
753 B
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/middleware/serve-static/path.ts
/**
* `defaultJoin` does not support Windows paths and always uses `/` separators.
* If you need Windows path support, please use `join` exported from `node:path` etc. instead.
*/
const defaultJoin = (...paths) => {
let result = paths.filter((p) => p !== "").join("/");
result = result.replace(/(?<=\/)\/+/g, "");
const segments = result.split("/");
const resolved = [];
for (const segment of segments) if (segment === ".." && resolved.length > 0 && resolved.at(-1) !== "..") resolved.pop();
else if (segment !== ".") resolved.push(segment);
return resolved.join("/") || ".";
};
//#endregion
exports.defaultJoin = defaultJoin;