fumapress 0.1.21 → 0.1.23
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/lib/cli/index.mjs +1 -1
- package/dist/waku/public/assets/Icon-DLjCXBap.js +1 -0
- package/dist/waku/public/assets/{Icon-D30p-2dq.js → Icon-uimJ5tpe.js} +1 -1
- package/dist/waku/public/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/public/assets/{_root-BWh8XBln.js → _root-DcSLRIv8.js} +2 -2
- package/dist/waku/public/assets/{algolia-B1uhfuD6.js → algolia-akct_lCZ.js} +1 -1
- package/dist/waku/public/assets/{chevron-right-DmP6Xa1g.js → chevron-right-DJ6X4mXo.js} +1 -1
- package/dist/waku/public/assets/{client-BSFjekJY.js → client-DU5zOesq.js} +1 -1
- package/dist/waku/public/assets/{collapsible-B2rvGry7.js → collapsible-Bqzit3JO.js} +1 -1
- package/dist/waku/public/assets/{core-C4jOG9I2.js → core-BfOvCGca.js} +1 -1
- package/dist/waku/public/assets/{i18n-V4QzeUbV.js → i18n-BU0Gqrrh.js} +1 -1
- package/dist/waku/public/assets/{index-xXa72sZS.js → index-C3-lsDRv.js} +1 -1
- package/dist/waku/public/assets/{index-NB9D4S1v.js → index-CCR9ecA8.js} +1 -1
- package/dist/waku/public/assets/{index-DW9Fo86a.js → index-CWwHJATE.js} +1 -1
- package/dist/waku/public/assets/{index-BQZmdbam.js → index-CY9LswMc.js} +1 -1
- package/dist/waku/public/assets/{index-CYJW3hzB.js → index-Cae1bXCh.js} +1 -1
- package/dist/waku/public/assets/{index-Bojr-xLv.js → index-CkzHlXhF.js} +1 -1
- package/dist/waku/public/assets/{index-B-5ouVG_.js → index-DOC-_zsC.js} +1 -1
- package/dist/waku/public/assets/{index-B65N5043.js → index-DOsFxkYv.js} +1 -1
- package/dist/waku/public/assets/{index-DHENdpwd.js → index-DhgWLnXf.js} +1 -1
- package/dist/waku/public/assets/index-E12FLc8f.js +1 -0
- package/dist/waku/public/assets/{index-OFfnl8sH.js → index-Po1UZSgL.js} +3 -3
- package/dist/waku/public/assets/{index-2HLUYgxN.js → index-T_b7wuyJ.js} +5 -5
- package/dist/waku/public/assets/{index-CBSxJfFU.js → index-yiM3u0f9.js} +1 -1
- package/dist/waku/public/assets/{index-Bonlu0LX.js → index-zSjxh5o9.js} +1 -1
- package/dist/waku/public/assets/{link-item-BlYkot48.js → link-item-CAVxr8-m.js} +1 -1
- package/dist/waku/public/assets/{merge-refs-BIez66Kl.js → merge-refs-B7SuKGTI.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-CazpSeQ0.js → orama-cloud-D6HIyrrx.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-legacy-CINWERV2.js → orama-cloud-legacy-AQ__GML5.js} +1 -1
- package/dist/waku/public/assets/{orama-static-DwfVMMmc.js → orama-static-CyMYfAPj.js} +1 -1
- package/dist/waku/public/assets/{page-actions--VStSULV.js → page-actions-CcyvVvdr.js} +1 -1
- package/dist/waku/public/assets/{proxy-CWSxKwWP.js → proxy-DdABrE5r.js} +1 -1
- package/dist/waku/public/assets/{search-D1WUBd3N.js → search-AdRfsIll.js} +1 -1
- package/dist/waku/public/assets/{search-default-B2jTK1EC.js → search-default-B4NAC8AJ.js} +3 -3
- package/dist/waku/public/assets/{use-copy-button-BO3GBlwZ.js → use-copy-button-auHqSfgW.js} +1 -1
- package/dist/waku/public/assets/{x-CB1cQ-bo.js → x-Blg1xIpd.js} +1 -1
- package/dist/waku/server/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/assets/{_...slugs_-8lFegkVB.js → _...slugs_-DF1SYPMg.js} +32 -30
- package/dist/waku/server/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/server/assets/{_root-B7AMftRI.js → _root-BiaZL9xf.js} +1 -1
- package/dist/waku/server/assets/{ai-C1Bf8DXZ.js → ai-vEEzbqB8.js} +2 -2
- package/dist/waku/server/assets/{chat-CN1qUeN-.js → chat-DOZ_Cx8A.js} +202 -12
- package/dist/waku/server/assets/{image.webp-PNGidV2r.js → image.webp-BW_97iH9.js} +1 -1
- package/dist/waku/server/assets/{img-C2Ne7ke5.js → img-B-t2xy2h.js} +1 -1
- package/dist/waku/server/assets/{index-CtEJq0xW.js → index--w0er2WH.js} +5 -5
- package/dist/waku/server/assets/{index-AIo6cWfN.js → index-BK2ZBQW1.js} +132 -54
- package/dist/waku/server/assets/{index-dpJ5KyUl.js → index-BXqq5kje.js} +1 -1
- package/dist/waku/server/assets/{index-D6orYQqE.js → index-CoHTzFHF.js} +1 -1
- package/dist/waku/server/assets/{index-QgPg52ej.js → index-D32Kgl7D.js} +1 -1
- package/dist/waku/server/assets/{index-BtnFj3IN.js → index-DShTeblm.js} +1 -1
- package/dist/waku/server/assets/{index-DFPuXyRR.js → index-DWNJLNyX.js} +1 -1
- package/dist/waku/server/assets/{index-6LQQnOj9.js → index-eAdvdAYz.js} +1 -1
- package/dist/waku/server/assets/{search-BuYfcIgW.js → search-BHsWHDmx.js} +2 -2
- package/dist/waku/server/assets/{server-entry-inner-DrYrCg3c.js → server-entry-inner-CYeTE9pH.js} +230 -189
- package/dist/waku/server/assets/{token-BJQ71htz.js → token-Dc4bIZyb.js} +3 -3
- package/dist/waku/server/assets/{token-util-BdUbceAe.js → token-util-BDWFgKKT.js} +16 -16
- package/dist/waku/server/assets/{token-util-WrcienE5.js → token-util-yHc1UlLV.js} +2 -2
- package/dist/waku/server/build.js +1 -1
- package/dist/waku/server/index.js +1 -1
- package/dist/waku/server/ssr/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/ssr/assets/{Icon-BkWS2wcn.js → Icon-CjkqongL.js} +2 -2
- package/dist/waku/server/ssr/assets/{core-CLB7CUo5.js → core-Ru16gShL.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-CKMvBRnq.js → index-BFvm1zbH.js} +4 -4
- package/dist/waku/server/ssr/assets/{index-BggSP1CG.js → index-CTD5LS21.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-F8Xj3Sj4.js → index-DR2zqaC5.js} +1 -1
- package/dist/waku/server/ssr/index.js +12 -13
- package/package.json +15 -15
- package/dist/waku/public/assets/Icon-C79MpmBL.js +0 -1
- package/dist/waku/public/assets/_root-CzUOgPm2.css +0 -1
- package/dist/waku/public/assets/index-B7lX48CB.js +0 -1
- package/dist/waku/server/assets/_root-CzUOgPm2.css +0 -1
package/dist/waku/server/assets/{server-entry-inner-DrYrCg3c.js → server-entry-inner-CYeTE9pH.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import require$$0, { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
|
|
1
|
+
import require$$0$1, { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import require$$2$1, { createServer } from "http";
|
|
4
|
-
import { Http2ServerRequest } from "http2";
|
|
5
|
-
import require$$0$
|
|
4
|
+
import { Http2ServerRequest, constants as constants$3 } from "http2";
|
|
5
|
+
import require$$0$4, { Readable } from "stream";
|
|
6
6
|
import crypto from "crypto";
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import * as require$$0 from "fs";
|
|
8
|
+
import require$$0__default, { existsSync, statSync, createReadStream, stat, realpathSync, realpath, readdirSync, readdir } from "fs";
|
|
9
|
+
import { join, sep, basename as basename$1, dirname as dirname$1, resolve, normalize, relative, posix, isAbsolute } from "path";
|
|
10
10
|
import { versions } from "process";
|
|
11
11
|
import assetsManifest from "../__vite_rsc_assets_manifest.js";
|
|
12
12
|
import { buildMetadata } from "../__waku_build_metadata.js";
|
|
13
|
-
import require$$0$
|
|
13
|
+
import require$$0$5 from "events";
|
|
14
14
|
import require$$1$1 from "https";
|
|
15
15
|
import require$$3 from "net";
|
|
16
16
|
import require$$4 from "tls";
|
|
17
17
|
import require$$7, { fileURLToPath } from "url";
|
|
18
|
-
import require$$0$
|
|
19
|
-
import require$$0$
|
|
18
|
+
import require$$0$2 from "zlib";
|
|
19
|
+
import require$$0$3 from "buffer";
|
|
20
20
|
import { STATUS_CODES } from "node:http";
|
|
21
21
|
import { watch } from "chokidar";
|
|
22
22
|
import fs from "node:fs/promises";
|
|
@@ -74,7 +74,7 @@ function removeReferenceCacheTag(id2) {
|
|
|
74
74
|
}
|
|
75
75
|
function setInternalRequire() {
|
|
76
76
|
globalThis.__vite_rsc_require__ = (id2) => {
|
|
77
|
-
if (id2.startsWith(
|
|
77
|
+
if (id2.startsWith("$$server:")) {
|
|
78
78
|
id2 = id2.slice(9);
|
|
79
79
|
return globalThis.__vite_rsc_server_require__(id2);
|
|
80
80
|
}
|
|
@@ -573,7 +573,7 @@ var hasRequiredReactServerDomWebpackServer_edge_production;
|
|
|
573
573
|
function requireReactServerDomWebpackServer_edge_production() {
|
|
574
574
|
if (hasRequiredReactServerDomWebpackServer_edge_production) return reactServerDomWebpackServer_edge_production;
|
|
575
575
|
hasRequiredReactServerDomWebpackServer_edge_production = 1;
|
|
576
|
-
const __viteRscAsyncHooks = require$$0;
|
|
576
|
+
const __viteRscAsyncHooks = require$$0$1;
|
|
577
577
|
globalThis.AsyncLocalStorage = __viteRscAsyncHooks.AsyncLocalStorage;
|
|
578
578
|
var ReactDOM = requireReactDom_reactServer(), React = requireReact_reactServer(), REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
|
|
579
579
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
@@ -3280,7 +3280,7 @@ function setRequireModule(options2) {
|
|
|
3280
3280
|
return options2.load(removeReferenceCacheTag(id2));
|
|
3281
3281
|
};
|
|
3282
3282
|
globalThis.__vite_rsc_server_require__ = memoize(async (id2) => {
|
|
3283
|
-
if (id2.startsWith(
|
|
3283
|
+
if (id2.startsWith("$$decode-client:")) {
|
|
3284
3284
|
id2 = id2.slice(SERVER_DECODE_CLIENT_PREFIX.length);
|
|
3285
3285
|
id2 = removeReferenceCacheTag(id2);
|
|
3286
3286
|
const target = {};
|
|
@@ -5006,9 +5006,7 @@ function createFromReadableStream(stream2, options2 = {}) {
|
|
|
5006
5006
|
function registerClientReference(proxy, id2, name) {
|
|
5007
5007
|
return server_edgeExports.registerClientReference(proxy, id2, name);
|
|
5008
5008
|
}
|
|
5009
|
-
|
|
5010
|
-
return server_edgeExports.decodeReply(body, createServerManifest(), options2);
|
|
5011
|
-
}
|
|
5009
|
+
const decodeReply = (body, options2) => server_edgeExports.decodeReply(body, createServerManifest(), options2);
|
|
5012
5010
|
function decodeAction(body) {
|
|
5013
5011
|
return server_edgeExports.decodeAction(body, createServerManifest());
|
|
5014
5012
|
}
|
|
@@ -5105,21 +5103,21 @@ const getErrorInfo = (err) => {
|
|
|
5105
5103
|
return null;
|
|
5106
5104
|
};
|
|
5107
5105
|
const joinPath$2 = (...paths) => {
|
|
5108
|
-
const
|
|
5106
|
+
const isAbsolute2 = paths[0]?.startsWith("/");
|
|
5109
5107
|
const items = [].concat(...paths.map((path2) => path2.split("/")));
|
|
5110
5108
|
const stack = [];
|
|
5111
5109
|
for (const item of items) {
|
|
5112
5110
|
if (item === "..") {
|
|
5113
5111
|
if (stack.length && stack[stack.length - 1] !== "..") {
|
|
5114
5112
|
stack.pop();
|
|
5115
|
-
} else if (!
|
|
5113
|
+
} else if (!isAbsolute2) {
|
|
5116
5114
|
stack.push("..");
|
|
5117
5115
|
}
|
|
5118
5116
|
} else if (item && item !== ".") {
|
|
5119
5117
|
stack.push(item);
|
|
5120
5118
|
}
|
|
5121
5119
|
}
|
|
5122
|
-
return (
|
|
5120
|
+
return (isAbsolute2 ? "/" : "") + stack.join("/") || ".";
|
|
5123
5121
|
};
|
|
5124
5122
|
const SLUG_PATTERN = /^(.*?)\[([^\]]+)\](.*)$/;
|
|
5125
5123
|
const parsePathWithSlug = (path2) => path2.split("/").filter(Boolean).map((name) => {
|
|
@@ -5953,10 +5951,10 @@ const getGrouplessPath = (path2) => {
|
|
|
5953
5951
|
};
|
|
5954
5952
|
const Children = /* @__PURE__ */ registerClientReference((() => {
|
|
5955
5953
|
throw new Error('It is not possible to invoke a client function from the server: "Children"');
|
|
5956
|
-
}), "
|
|
5954
|
+
}), "1601f02684b7", "Children");
|
|
5957
5955
|
const Slot = /* @__PURE__ */ registerClientReference((() => {
|
|
5958
5956
|
throw new Error('It is not possible to invoke a client function from the server: "Slot"');
|
|
5959
|
-
}), "
|
|
5957
|
+
}), "1601f02684b7", "Slot");
|
|
5960
5958
|
const METHODS$1 = [
|
|
5961
5959
|
"GET",
|
|
5962
5960
|
"HEAD",
|
|
@@ -6977,6 +6975,50 @@ if (typeof global.crypto === "undefined") {
|
|
|
6977
6975
|
global.crypto = crypto;
|
|
6978
6976
|
}
|
|
6979
6977
|
var outgoingEnded = /* @__PURE__ */ Symbol("outgoingEnded");
|
|
6978
|
+
var incomingDraining = /* @__PURE__ */ Symbol("incomingDraining");
|
|
6979
|
+
var DRAIN_TIMEOUT_MS = 500;
|
|
6980
|
+
var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
|
|
6981
|
+
var drainIncoming = (incoming) => {
|
|
6982
|
+
const incomingWithDrainState = incoming;
|
|
6983
|
+
if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
|
|
6984
|
+
return;
|
|
6985
|
+
}
|
|
6986
|
+
incomingWithDrainState[incomingDraining] = true;
|
|
6987
|
+
if (incoming instanceof Http2ServerRequest) {
|
|
6988
|
+
try {
|
|
6989
|
+
;
|
|
6990
|
+
incoming.stream?.close?.(constants$3.NGHTTP2_NO_ERROR);
|
|
6991
|
+
} catch {
|
|
6992
|
+
}
|
|
6993
|
+
return;
|
|
6994
|
+
}
|
|
6995
|
+
let bytesRead = 0;
|
|
6996
|
+
const cleanup = () => {
|
|
6997
|
+
clearTimeout(timer);
|
|
6998
|
+
incoming.off("data", onData);
|
|
6999
|
+
incoming.off("end", cleanup);
|
|
7000
|
+
incoming.off("error", cleanup);
|
|
7001
|
+
};
|
|
7002
|
+
const forceClose = () => {
|
|
7003
|
+
cleanup();
|
|
7004
|
+
const socket = incoming.socket;
|
|
7005
|
+
if (socket && !socket.destroyed) {
|
|
7006
|
+
socket.destroySoon();
|
|
7007
|
+
}
|
|
7008
|
+
};
|
|
7009
|
+
const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
|
|
7010
|
+
timer.unref?.();
|
|
7011
|
+
const onData = (chunk) => {
|
|
7012
|
+
bytesRead += chunk.length;
|
|
7013
|
+
if (bytesRead > MAX_DRAIN_BYTES) {
|
|
7014
|
+
forceClose();
|
|
7015
|
+
}
|
|
7016
|
+
};
|
|
7017
|
+
incoming.on("data", onData);
|
|
7018
|
+
incoming.on("end", cleanup);
|
|
7019
|
+
incoming.on("error", cleanup);
|
|
7020
|
+
incoming.resume();
|
|
7021
|
+
};
|
|
6980
7022
|
var handleRequestError = () => new Response(null, {
|
|
6981
7023
|
status: 400
|
|
6982
7024
|
});
|
|
@@ -7145,14 +7187,18 @@ var getRequestListener = (fetchCallback, options2 = {}) => {
|
|
|
7145
7187
|
setTimeout(() => {
|
|
7146
7188
|
if (!incomingEnded) {
|
|
7147
7189
|
setTimeout(() => {
|
|
7148
|
-
incoming
|
|
7149
|
-
outgoing.destroy();
|
|
7190
|
+
drainIncoming(incoming);
|
|
7150
7191
|
});
|
|
7151
7192
|
}
|
|
7152
7193
|
});
|
|
7153
7194
|
}
|
|
7154
7195
|
};
|
|
7155
7196
|
}
|
|
7197
|
+
outgoing.on("finish", () => {
|
|
7198
|
+
if (!incomingEnded) {
|
|
7199
|
+
drainIncoming(incoming);
|
|
7200
|
+
}
|
|
7201
|
+
});
|
|
7156
7202
|
}
|
|
7157
7203
|
outgoing.on("close", () => {
|
|
7158
7204
|
const abortController = req[abortControllerKey];
|
|
@@ -7167,7 +7213,7 @@ var getRequestListener = (fetchCallback, options2 = {}) => {
|
|
|
7167
7213
|
setTimeout(() => {
|
|
7168
7214
|
if (!incomingEnded) {
|
|
7169
7215
|
setTimeout(() => {
|
|
7170
|
-
incoming
|
|
7216
|
+
drainIncoming(incoming);
|
|
7171
7217
|
});
|
|
7172
7218
|
}
|
|
7173
7219
|
});
|
|
@@ -7362,7 +7408,7 @@ var serveStatic = (options2 = { root: "" }) => {
|
|
|
7362
7408
|
} else {
|
|
7363
7409
|
try {
|
|
7364
7410
|
filename = tryDecodeURI$1(c.req.path);
|
|
7365
|
-
if (/(?:^|[\/\\])
|
|
7411
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
|
|
7366
7412
|
throw new Error();
|
|
7367
7413
|
}
|
|
7368
7414
|
} catch {
|
|
@@ -8596,7 +8642,7 @@ var Hono$1 = class _Hono {
|
|
|
8596
8642
|
}
|
|
8597
8643
|
}
|
|
8598
8644
|
}
|
|
8599
|
-
const
|
|
8645
|
+
const getOptions2 = optionHandler ? (c) => {
|
|
8600
8646
|
const options22 = optionHandler(c);
|
|
8601
8647
|
return Array.isArray(options22) ? options22 : [options22];
|
|
8602
8648
|
} : (c) => {
|
|
@@ -8617,7 +8663,7 @@ var Hono$1 = class _Hono {
|
|
|
8617
8663
|
};
|
|
8618
8664
|
})();
|
|
8619
8665
|
const handler = async (c, next) => {
|
|
8620
|
-
const res = await applicationHandler(replaceRequest(c.req.raw), ...
|
|
8666
|
+
const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions2(c));
|
|
8621
8667
|
if (res) {
|
|
8622
8668
|
return res;
|
|
8623
8669
|
}
|
|
@@ -9319,7 +9365,7 @@ var hasRequiredPermessageDeflate;
|
|
|
9319
9365
|
function requirePermessageDeflate() {
|
|
9320
9366
|
if (hasRequiredPermessageDeflate) return permessageDeflate;
|
|
9321
9367
|
hasRequiredPermessageDeflate = 1;
|
|
9322
|
-
const zlib = require$$0$
|
|
9368
|
+
const zlib = require$$0$2;
|
|
9323
9369
|
const bufferUtil2 = requireBufferUtil();
|
|
9324
9370
|
const Limiter = requireLimiter();
|
|
9325
9371
|
const { kStatusCode } = requireConstants$1();
|
|
@@ -9708,7 +9754,7 @@ var hasRequiredValidation;
|
|
|
9708
9754
|
function requireValidation() {
|
|
9709
9755
|
if (hasRequiredValidation) return validation.exports;
|
|
9710
9756
|
hasRequiredValidation = 1;
|
|
9711
|
-
const { isUtf8 } = require$$0$
|
|
9757
|
+
const { isUtf8 } = require$$0$3;
|
|
9712
9758
|
const { hasBlob } = requireConstants$1();
|
|
9713
9759
|
const tokenChars = [
|
|
9714
9760
|
0,
|
|
@@ -9909,7 +9955,7 @@ var hasRequiredReceiver;
|
|
|
9909
9955
|
function requireReceiver() {
|
|
9910
9956
|
if (hasRequiredReceiver) return receiver;
|
|
9911
9957
|
hasRequiredReceiver = 1;
|
|
9912
|
-
const { Writable } = require$$0$
|
|
9958
|
+
const { Writable } = require$$0$4;
|
|
9913
9959
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
9914
9960
|
const {
|
|
9915
9961
|
BINARY_TYPES,
|
|
@@ -10501,7 +10547,7 @@ var hasRequiredSender;
|
|
|
10501
10547
|
function requireSender() {
|
|
10502
10548
|
if (hasRequiredSender) return sender;
|
|
10503
10549
|
hasRequiredSender = 1;
|
|
10504
|
-
const { Duplex } = require$$0$
|
|
10550
|
+
const { Duplex } = require$$0$4;
|
|
10505
10551
|
const { randomFillSync } = crypto;
|
|
10506
10552
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
10507
10553
|
const { EMPTY_BUFFER, kWebSocket, NOOP } = requireConstants$1();
|
|
@@ -11371,13 +11417,13 @@ var hasRequiredWebsocket;
|
|
|
11371
11417
|
function requireWebsocket() {
|
|
11372
11418
|
if (hasRequiredWebsocket) return websocket;
|
|
11373
11419
|
hasRequiredWebsocket = 1;
|
|
11374
|
-
const EventEmitter = require$$0$
|
|
11420
|
+
const EventEmitter = require$$0$5;
|
|
11375
11421
|
const https = require$$1$1;
|
|
11376
11422
|
const http = require$$2$1;
|
|
11377
11423
|
const net = require$$3;
|
|
11378
11424
|
const tls = require$$4;
|
|
11379
11425
|
const { randomBytes, createHash } = crypto;
|
|
11380
|
-
const { Duplex, Readable: Readable2 } = require$$0$
|
|
11426
|
+
const { Duplex, Readable: Readable2 } = require$$0$4;
|
|
11381
11427
|
const { URL: URL2 } = require$$7;
|
|
11382
11428
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
11383
11429
|
const Receiver = requireReceiver();
|
|
@@ -12258,7 +12304,7 @@ function requireStream() {
|
|
|
12258
12304
|
if (hasRequiredStream) return stream;
|
|
12259
12305
|
hasRequiredStream = 1;
|
|
12260
12306
|
requireWebsocket();
|
|
12261
|
-
const { Duplex } = require$$0$
|
|
12307
|
+
const { Duplex } = require$$0$4;
|
|
12262
12308
|
function emitClose(stream2) {
|
|
12263
12309
|
stream2.emit("close");
|
|
12264
12310
|
}
|
|
@@ -12404,9 +12450,9 @@ var hasRequiredWebsocketServer;
|
|
|
12404
12450
|
function requireWebsocketServer() {
|
|
12405
12451
|
if (hasRequiredWebsocketServer) return websocketServer;
|
|
12406
12452
|
hasRequiredWebsocketServer = 1;
|
|
12407
|
-
const EventEmitter = require$$0$
|
|
12453
|
+
const EventEmitter = require$$0$5;
|
|
12408
12454
|
const http = require$$2$1;
|
|
12409
|
-
const { Duplex } = require$$0$
|
|
12455
|
+
const { Duplex } = require$$0$4;
|
|
12410
12456
|
const { createHash } = crypto;
|
|
12411
12457
|
const extension2 = requireExtension();
|
|
12412
12458
|
const PerMessageDeflate = requirePermessageDeflate();
|
|
@@ -27338,10 +27384,10 @@ const resolveSymlinksAsync = function(path2, state, callback$1) {
|
|
|
27338
27384
|
queue.enqueue();
|
|
27339
27385
|
fs2.realpath(path2, (error2, resolvedPath) => {
|
|
27340
27386
|
if (error2) return queue.dequeue(suppressErrors ? null : error2, state);
|
|
27341
|
-
fs2.stat(resolvedPath, (error$12,
|
|
27387
|
+
fs2.stat(resolvedPath, (error$12, stat2) => {
|
|
27342
27388
|
if (error$12) return queue.dequeue(suppressErrors ? null : error$12, state);
|
|
27343
|
-
if (
|
|
27344
|
-
callback$1(
|
|
27389
|
+
if (stat2.isDirectory() && isRecursive(path2, resolvedPath, state)) return queue.dequeue(null, state);
|
|
27390
|
+
callback$1(stat2, resolvedPath);
|
|
27345
27391
|
queue.dequeue(null, state);
|
|
27346
27392
|
});
|
|
27347
27393
|
});
|
|
@@ -27351,9 +27397,9 @@ const resolveSymlinks = function(path2, state, callback$1) {
|
|
|
27351
27397
|
queue.enqueue();
|
|
27352
27398
|
try {
|
|
27353
27399
|
const resolvedPath = fs2.realpathSync(path2);
|
|
27354
|
-
const
|
|
27355
|
-
if (
|
|
27356
|
-
callback$1(
|
|
27400
|
+
const stat2 = fs2.statSync(resolvedPath);
|
|
27401
|
+
if (stat2.isDirectory() && isRecursive(path2, resolvedPath, state)) return;
|
|
27402
|
+
callback$1(stat2, resolvedPath);
|
|
27357
27403
|
} catch (e) {
|
|
27358
27404
|
if (!suppressErrors) throw e;
|
|
27359
27405
|
}
|
|
@@ -27519,7 +27565,7 @@ var Walker = class {
|
|
|
27519
27565
|
symlinks: /* @__PURE__ */ new Map(),
|
|
27520
27566
|
visited: [""].slice(0, 0),
|
|
27521
27567
|
controller: new Aborter(),
|
|
27522
|
-
fs: options2.fs ||
|
|
27568
|
+
fs: options2.fs || require$$0
|
|
27523
27569
|
};
|
|
27524
27570
|
this.joinPath = build$7(this.root, options2);
|
|
27525
27571
|
this.pushDirectory = build$6(this.root, options2);
|
|
@@ -27550,8 +27596,8 @@ var Walker = class {
|
|
|
27550
27596
|
this.walkDirectory(this.state, path2, path2, depth - 1, this.walk);
|
|
27551
27597
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
27552
27598
|
let path2 = joinPathWithBasePath(entry.name, directoryPath);
|
|
27553
|
-
this.resolveSymlink(path2, this.state, (
|
|
27554
|
-
if (
|
|
27599
|
+
this.resolveSymlink(path2, this.state, (stat2, resolvedPath) => {
|
|
27600
|
+
if (stat2.isDirectory()) {
|
|
27555
27601
|
resolvedPath = normalizePath$1(resolvedPath, this.state.options);
|
|
27556
27602
|
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path2 + pathSeparator)) return;
|
|
27557
27603
|
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path2 + pathSeparator, depth - 1, this.walk);
|
|
@@ -29481,36 +29527,36 @@ function requirePicomatch() {
|
|
|
29481
29527
|
var picomatchExports = /* @__PURE__ */ requirePicomatch();
|
|
29482
29528
|
const picomatch = /* @__PURE__ */ getDefaultExportFromCjs(picomatchExports);
|
|
29483
29529
|
const isReadonlyArray = Array.isArray;
|
|
29530
|
+
const BACKSLASHES = /\\/g;
|
|
29484
29531
|
const isWin = process.platform === "win32";
|
|
29485
29532
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
29486
29533
|
function getPartialMatcher(patterns, options2 = {}) {
|
|
29487
29534
|
const patternsCount = patterns.length;
|
|
29488
29535
|
const patternsParts = Array(patternsCount);
|
|
29489
29536
|
const matchers = Array(patternsCount);
|
|
29490
|
-
|
|
29491
|
-
for (
|
|
29537
|
+
let i, j;
|
|
29538
|
+
for (i = 0; i < patternsCount; i++) {
|
|
29492
29539
|
const parts = splitPattern(patterns[i]);
|
|
29493
29540
|
patternsParts[i] = parts;
|
|
29494
29541
|
const partsCount = parts.length;
|
|
29495
29542
|
const partMatchers = Array(partsCount);
|
|
29496
|
-
for (
|
|
29543
|
+
for (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options2);
|
|
29497
29544
|
matchers[i] = partMatchers;
|
|
29498
29545
|
}
|
|
29499
29546
|
return (input) => {
|
|
29500
29547
|
const inputParts = input.split("/");
|
|
29501
29548
|
if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
29502
|
-
for (
|
|
29549
|
+
for (i = 0; i < patternsCount; i++) {
|
|
29503
29550
|
const patternParts = patternsParts[i];
|
|
29504
29551
|
const matcher = matchers[i];
|
|
29505
29552
|
const inputPatternCount = inputParts.length;
|
|
29506
29553
|
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
29507
|
-
|
|
29554
|
+
j = 0;
|
|
29508
29555
|
while (j < minParts) {
|
|
29509
29556
|
const part = patternParts[j];
|
|
29510
29557
|
if (part.includes("/")) return true;
|
|
29511
|
-
|
|
29512
|
-
if (!
|
|
29513
|
-
if (globstarEnabled && part === "**") return true;
|
|
29558
|
+
if (!matcher[j](inputParts[j])) break;
|
|
29559
|
+
if (!options2.noglobstar && part === "**") return true;
|
|
29514
29560
|
j++;
|
|
29515
29561
|
}
|
|
29516
29562
|
if (j === inputPatternCount) return true;
|
|
@@ -29523,7 +29569,7 @@ const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
|
|
|
29523
29569
|
function buildFormat(cwd, root, absolute) {
|
|
29524
29570
|
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
29525
29571
|
if (absolute) {
|
|
29526
|
-
const start =
|
|
29572
|
+
const start = cwd.length + +!isRoot(cwd);
|
|
29527
29573
|
return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
|
|
29528
29574
|
}
|
|
29529
29575
|
const prefix2 = root.slice(cwd.length + 1);
|
|
@@ -29544,20 +29590,19 @@ function buildRelative(cwd, root) {
|
|
|
29544
29590
|
}
|
|
29545
29591
|
return (p) => {
|
|
29546
29592
|
const result = posix.relative(cwd, `${root}/${p}`);
|
|
29547
|
-
|
|
29548
|
-
return result || ".";
|
|
29593
|
+
return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
|
|
29549
29594
|
};
|
|
29550
29595
|
}
|
|
29551
29596
|
const splitPatternOptions = { parts: true };
|
|
29552
|
-
function splitPattern(
|
|
29597
|
+
function splitPattern(path2) {
|
|
29553
29598
|
var _result$parts;
|
|
29554
|
-
const result = picomatch.scan(
|
|
29555
|
-
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [
|
|
29599
|
+
const result = picomatch.scan(path2, splitPatternOptions);
|
|
29600
|
+
return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path2];
|
|
29556
29601
|
}
|
|
29557
29602
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = new RegExp("(?<!\\\\)([()[\\]{}*?|]|^!|[!+@](?=\\()|\\\\(?![()[\\]{}!*+?@|]))", "g");
|
|
29558
29603
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = new RegExp("(?<!\\\\)([()[\\]{}]|^!|[!+@](?=\\())", "g");
|
|
29559
|
-
const escapePosixPath = (
|
|
29560
|
-
const escapeWin32Path = (
|
|
29604
|
+
const escapePosixPath = (path2) => path2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
29605
|
+
const escapeWin32Path = (path2) => path2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
29561
29606
|
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
|
29562
29607
|
function isDynamicPattern(pattern, options2) {
|
|
29563
29608
|
const scan = picomatch.scan(pattern);
|
|
@@ -29566,28 +29611,31 @@ function isDynamicPattern(pattern, options2) {
|
|
|
29566
29611
|
function log(...tasks) {
|
|
29567
29612
|
console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
|
|
29568
29613
|
}
|
|
29614
|
+
function ensureStringArray(value) {
|
|
29615
|
+
return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
|
|
29616
|
+
}
|
|
29569
29617
|
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
29570
29618
|
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
29571
|
-
|
|
29572
|
-
|
|
29619
|
+
function normalizePattern(pattern, opts, props, isIgnore) {
|
|
29620
|
+
var _PARENT_DIRECTORY$exe;
|
|
29621
|
+
const cwd = opts.cwd;
|
|
29573
29622
|
let result = pattern;
|
|
29574
|
-
if (pattern.
|
|
29575
|
-
if (
|
|
29623
|
+
if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
|
|
29624
|
+
if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
|
|
29576
29625
|
const escapedCwd = escapePath(cwd);
|
|
29577
|
-
|
|
29578
|
-
|
|
29579
|
-
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
|
29626
|
+
result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
29627
|
+
const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
|
|
29580
29628
|
const parts = splitPattern(result);
|
|
29581
|
-
if (
|
|
29582
|
-
const n = (
|
|
29629
|
+
if (parentDir) {
|
|
29630
|
+
const n = (parentDir.length + 1) / 3;
|
|
29583
29631
|
let i = 0;
|
|
29584
29632
|
const cwdParts = escapedCwd.split("/");
|
|
29585
29633
|
while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
|
|
29586
29634
|
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
29587
29635
|
i++;
|
|
29588
29636
|
}
|
|
29589
|
-
const potentialRoot = posix.join(cwd,
|
|
29590
|
-
if (
|
|
29637
|
+
const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
|
|
29638
|
+
if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
|
|
29591
29639
|
props.root = potentialRoot;
|
|
29592
29640
|
props.depthOffset = -n + i;
|
|
29593
29641
|
}
|
|
@@ -29603,7 +29651,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
29603
29651
|
newCommonPath.pop();
|
|
29604
29652
|
break;
|
|
29605
29653
|
}
|
|
29606
|
-
if (part !== props.commonPath[i] || isDynamicPattern(part)
|
|
29654
|
+
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
|
|
29607
29655
|
newCommonPath.push(part);
|
|
29608
29656
|
}
|
|
29609
29657
|
props.depthOffset = newCommonPath.length;
|
|
@@ -29612,136 +29660,126 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
29612
29660
|
}
|
|
29613
29661
|
return result;
|
|
29614
29662
|
}
|
|
29615
|
-
function processPatterns(
|
|
29616
|
-
if (typeof patterns === "string") patterns = [patterns];
|
|
29617
|
-
if (typeof ignore2 === "string") ignore2 = [ignore2];
|
|
29663
|
+
function processPatterns(options2, patterns, props) {
|
|
29618
29664
|
const matchPatterns = [];
|
|
29619
29665
|
const ignorePatterns = [];
|
|
29620
|
-
for (const pattern of
|
|
29666
|
+
for (const pattern of options2.ignore) {
|
|
29621
29667
|
if (!pattern) continue;
|
|
29622
|
-
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern,
|
|
29668
|
+
if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options2, props, true));
|
|
29623
29669
|
}
|
|
29624
29670
|
for (const pattern of patterns) {
|
|
29625
29671
|
if (!pattern) continue;
|
|
29626
|
-
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern,
|
|
29627
|
-
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1),
|
|
29672
|
+
if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options2, props, false));
|
|
29673
|
+
else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options2, props, true));
|
|
29628
29674
|
}
|
|
29629
29675
|
return {
|
|
29630
29676
|
match: matchPatterns,
|
|
29631
29677
|
ignore: ignorePatterns
|
|
29632
29678
|
};
|
|
29633
29679
|
}
|
|
29634
|
-
function
|
|
29635
|
-
|
|
29636
|
-
const path$12 = paths[i];
|
|
29637
|
-
paths[i] = relative2(path$12);
|
|
29638
|
-
}
|
|
29639
|
-
return paths;
|
|
29640
|
-
}
|
|
29641
|
-
function normalizeCwd(cwd) {
|
|
29642
|
-
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
|
29643
|
-
if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
|
|
29644
|
-
return path$1.resolve(cwd).replace(BACKSLASHES, "/");
|
|
29645
|
-
}
|
|
29646
|
-
function getCrawler(patterns, inputOptions = {}) {
|
|
29647
|
-
const options2 = process.env.TINYGLOBBY_DEBUG ? {
|
|
29648
|
-
...inputOptions,
|
|
29649
|
-
debug: true
|
|
29650
|
-
} : inputOptions;
|
|
29651
|
-
const cwd = normalizeCwd(options2.cwd);
|
|
29652
|
-
if (options2.debug) log("globbing with:", {
|
|
29653
|
-
patterns,
|
|
29654
|
-
options: options2,
|
|
29655
|
-
cwd
|
|
29656
|
-
});
|
|
29657
|
-
if (Array.isArray(patterns) && patterns.length === 0) return [{
|
|
29658
|
-
sync: () => [],
|
|
29659
|
-
withPromise: async () => []
|
|
29660
|
-
}, false];
|
|
29680
|
+
function buildCrawler(options2, patterns) {
|
|
29681
|
+
const cwd = options2.cwd;
|
|
29661
29682
|
const props = {
|
|
29662
29683
|
root: cwd,
|
|
29663
|
-
commonPath: null,
|
|
29664
29684
|
depthOffset: 0
|
|
29665
29685
|
};
|
|
29666
|
-
const processed = processPatterns(
|
|
29667
|
-
...options2,
|
|
29668
|
-
patterns
|
|
29669
|
-
}, cwd, props);
|
|
29686
|
+
const processed = processPatterns(options2, patterns, props);
|
|
29670
29687
|
if (options2.debug) log("internal processing patterns:", processed);
|
|
29688
|
+
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options2;
|
|
29689
|
+
const root = props.root.replace(BACKSLASHES, "");
|
|
29671
29690
|
const matchOptions = {
|
|
29672
|
-
dot
|
|
29691
|
+
dot,
|
|
29673
29692
|
nobrace: options2.braceExpansion === false,
|
|
29674
|
-
nocase:
|
|
29693
|
+
nocase: !caseSensitiveMatch,
|
|
29675
29694
|
noextglob: options2.extglob === false,
|
|
29676
29695
|
noglobstar: options2.globstar === false,
|
|
29677
29696
|
posix: true
|
|
29678
29697
|
};
|
|
29679
|
-
const matcher = picomatch(processed.match,
|
|
29680
|
-
...matchOptions,
|
|
29681
|
-
ignore: processed.ignore
|
|
29682
|
-
});
|
|
29698
|
+
const matcher = picomatch(processed.match, matchOptions);
|
|
29683
29699
|
const ignore2 = picomatch(processed.ignore, matchOptions);
|
|
29684
29700
|
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
29685
|
-
const format = buildFormat(cwd,
|
|
29686
|
-
const
|
|
29687
|
-
const
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29701
|
+
const format = buildFormat(cwd, root, absolute);
|
|
29702
|
+
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
|
|
29703
|
+
const excludePredicate = (_, p) => {
|
|
29704
|
+
const relativePath = excludeFormatter(p, true);
|
|
29705
|
+
return relativePath !== "." && !partialMatcher(relativePath) || ignore2(relativePath);
|
|
29706
|
+
};
|
|
29707
|
+
let maxDepth;
|
|
29708
|
+
if (options2.deep !== void 0) maxDepth = Math.round(options2.deep - props.depthOffset);
|
|
29709
|
+
const crawler = new Builder({
|
|
29710
|
+
filters: [debug ? (p, isDirectory) => {
|
|
29711
|
+
const path2 = format(p, isDirectory);
|
|
29712
|
+
const matches = matcher(path2) && !ignore2(path2);
|
|
29713
|
+
if (matches) log(`matched ${path2}`);
|
|
29692
29714
|
return matches;
|
|
29693
|
-
} : (p, isDirectory) =>
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29715
|
+
} : (p, isDirectory) => {
|
|
29716
|
+
const path2 = format(p, isDirectory);
|
|
29717
|
+
return matcher(path2) && !ignore2(path2);
|
|
29718
|
+
}],
|
|
29719
|
+
exclude: debug ? (_, p) => {
|
|
29720
|
+
const skipped = excludePredicate(_, p);
|
|
29721
|
+
log(`${skipped ? "skipped" : "crawling"} ${p}`);
|
|
29699
29722
|
return skipped;
|
|
29700
|
-
} :
|
|
29701
|
-
|
|
29702
|
-
return relativePath !== "." && !partialMatcher(relativePath) || ignore2(relativePath);
|
|
29703
|
-
},
|
|
29704
|
-
fs: options2.fs ? {
|
|
29705
|
-
readdir: options2.fs.readdir || nativeFs__default.readdir,
|
|
29706
|
-
readdirSync: options2.fs.readdirSync || nativeFs__default.readdirSync,
|
|
29707
|
-
realpath: options2.fs.realpath || nativeFs__default.realpath,
|
|
29708
|
-
realpathSync: options2.fs.realpathSync || nativeFs__default.realpathSync,
|
|
29709
|
-
stat: options2.fs.stat || nativeFs__default.stat,
|
|
29710
|
-
statSync: options2.fs.statSync || nativeFs__default.statSync
|
|
29711
|
-
} : void 0,
|
|
29723
|
+
} : excludePredicate,
|
|
29724
|
+
fs: options2.fs,
|
|
29712
29725
|
pathSeparator: "/",
|
|
29713
|
-
relativePaths:
|
|
29714
|
-
|
|
29726
|
+
relativePaths: !absolute,
|
|
29727
|
+
resolvePaths: absolute,
|
|
29728
|
+
includeBasePath: absolute,
|
|
29729
|
+
resolveSymlinks: followSymbolicLinks,
|
|
29730
|
+
excludeSymlinks: !followSymbolicLinks,
|
|
29731
|
+
excludeFiles: onlyDirectories,
|
|
29732
|
+
includeDirs: onlyDirectories || !options2.onlyFiles,
|
|
29733
|
+
maxDepth,
|
|
29715
29734
|
signal: options2.signal
|
|
29735
|
+
}).crawl(root);
|
|
29736
|
+
if (options2.debug) log("internal properties:", {
|
|
29737
|
+
...props,
|
|
29738
|
+
root
|
|
29739
|
+
});
|
|
29740
|
+
return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
|
|
29741
|
+
}
|
|
29742
|
+
function formatPaths(paths, mapper) {
|
|
29743
|
+
if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
|
|
29744
|
+
return paths;
|
|
29745
|
+
}
|
|
29746
|
+
const defaultOptions = {
|
|
29747
|
+
caseSensitiveMatch: true,
|
|
29748
|
+
cwd: process.cwd(),
|
|
29749
|
+
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
29750
|
+
expandDirectories: true,
|
|
29751
|
+
followSymbolicLinks: true,
|
|
29752
|
+
onlyFiles: true
|
|
29753
|
+
};
|
|
29754
|
+
function getOptions(options2) {
|
|
29755
|
+
const opts = {
|
|
29756
|
+
...defaultOptions,
|
|
29757
|
+
...options2
|
|
29716
29758
|
};
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
}
|
|
29727
|
-
if (
|
|
29728
|
-
|
|
29729
|
-
|
|
29730
|
-
|
|
29731
|
-
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
const
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29739
|
-
const
|
|
29740
|
-
|
|
29741
|
-
const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
|
|
29742
|
-
const [crawler, relative2] = getCrawler(patterns, opts);
|
|
29743
|
-
if (!relative2) return crawler.withPromise();
|
|
29744
|
-
return formatPaths(await crawler.withPromise(), relative2);
|
|
29759
|
+
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd)).replace(BACKSLASHES, "/");
|
|
29760
|
+
opts.ignore = ensureStringArray(opts.ignore);
|
|
29761
|
+
opts.fs && (opts.fs = {
|
|
29762
|
+
readdir: opts.fs.readdir || readdir,
|
|
29763
|
+
readdirSync: opts.fs.readdirSync || readdirSync,
|
|
29764
|
+
realpath: opts.fs.realpath || realpath,
|
|
29765
|
+
realpathSync: opts.fs.realpathSync || realpathSync,
|
|
29766
|
+
stat: opts.fs.stat || stat,
|
|
29767
|
+
statSync: opts.fs.statSync || statSync
|
|
29768
|
+
});
|
|
29769
|
+
if (opts.debug) log("globbing with options:", opts);
|
|
29770
|
+
return opts;
|
|
29771
|
+
}
|
|
29772
|
+
function getCrawler(globInput, inputOptions = {}) {
|
|
29773
|
+
var _ref;
|
|
29774
|
+
if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
29775
|
+
const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
|
|
29776
|
+
const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
|
|
29777
|
+
const options2 = getOptions(isModern ? inputOptions : globInput);
|
|
29778
|
+
return patterns.length > 0 ? buildCrawler(options2, patterns) : [];
|
|
29779
|
+
}
|
|
29780
|
+
async function glob(globInput, options2) {
|
|
29781
|
+
const [crawler, relative2] = getCrawler(globInput, options2);
|
|
29782
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative2) : [];
|
|
29745
29783
|
}
|
|
29746
29784
|
const DefaultConfigPatterns = ["fumapress.config.{js,jsx,ts,tsx}"];
|
|
29747
29785
|
async function findConfigPath() {
|
|
@@ -33174,7 +33212,7 @@ var hasRequiredGrayMatter;
|
|
|
33174
33212
|
function requireGrayMatter() {
|
|
33175
33213
|
if (hasRequiredGrayMatter) return grayMatter$1;
|
|
33176
33214
|
hasRequiredGrayMatter = 1;
|
|
33177
|
-
const fs2 =
|
|
33215
|
+
const fs2 = require$$0__default;
|
|
33178
33216
|
const sections = requireSectionMatter();
|
|
33179
33217
|
const defaults2 = requireDefaults();
|
|
33180
33218
|
const stringify2 = requireStringify();
|
|
@@ -33909,7 +33947,7 @@ var PageTreeBuilder = class {
|
|
|
33909
33947
|
collapsible: metadata.collapsible,
|
|
33910
33948
|
children: [],
|
|
33911
33949
|
$id: this.generateId(folderPath),
|
|
33912
|
-
$ref: !this.ctx.noRef && meta2 ?
|
|
33950
|
+
$ref: !this.ctx.noRef && meta2 ? metaPath : void 0
|
|
33913
33951
|
};
|
|
33914
33952
|
this.pathToNode.set(folderPath, node);
|
|
33915
33953
|
this.unfinished.add(node);
|
|
@@ -33959,7 +33997,7 @@ var PageTreeBuilder = class {
|
|
|
33959
33997
|
description,
|
|
33960
33998
|
icon,
|
|
33961
33999
|
url: this.ctx.getUrl(page.slugs, this.ctx.locale),
|
|
33962
|
-
$ref: !this.ctx.noRef ?
|
|
34000
|
+
$ref: !this.ctx.noRef ? path2 : void 0
|
|
33963
34001
|
};
|
|
33964
34002
|
for (const transformer of this.transformers) {
|
|
33965
34003
|
if (!transformer.file) continue;
|
|
@@ -33971,8 +34009,11 @@ var PageTreeBuilder = class {
|
|
|
33971
34009
|
root(id2 = "root", path2 = "") {
|
|
33972
34010
|
const folder = this.folder(path2);
|
|
33973
34011
|
let root = {
|
|
34012
|
+
type: "root",
|
|
34013
|
+
$ref: folder?.$ref,
|
|
33974
34014
|
$id: this.generateId(id2),
|
|
33975
34015
|
name: folder?.name || "Docs",
|
|
34016
|
+
description: folder?.description,
|
|
33976
34017
|
children: folder ? folder.children : []
|
|
33977
34018
|
};
|
|
33978
34019
|
for (const transformer of this.transformers) {
|
|
@@ -34087,7 +34128,7 @@ function loader(...args) {
|
|
|
34087
34128
|
getPageByHref(href, { dir = "", language = i18n?.defaultLanguage } = {}) {
|
|
34088
34129
|
const [value, hash2] = href.split("#", 2);
|
|
34089
34130
|
let target;
|
|
34090
|
-
if (value.startsWith("./")) {
|
|
34131
|
+
if (value.startsWith("./") || value.startsWith("../")) {
|
|
34091
34132
|
const path2 = joinPath(dir, value);
|
|
34092
34133
|
target = indexer.getPage(path2, language);
|
|
34093
34134
|
} else target = this.getPages(language).find((item) => item.url === value);
|
|
@@ -34097,7 +34138,7 @@ function loader(...args) {
|
|
|
34097
34138
|
};
|
|
34098
34139
|
},
|
|
34099
34140
|
resolveHref(href, parent) {
|
|
34100
|
-
if (href.startsWith("./")) {
|
|
34141
|
+
if (href.startsWith("./") || href.startsWith("../")) {
|
|
34101
34142
|
const target = this.getPageByHref(href, {
|
|
34102
34143
|
dir: path.dirname(parent.path),
|
|
34103
34144
|
language: parent.locale
|
|
@@ -34122,12 +34163,12 @@ function loader(...args) {
|
|
|
34122
34163
|
return indexer.getPageBySlugs(slugs, language);
|
|
34123
34164
|
},
|
|
34124
34165
|
getNodeMeta(node, language = i18n?.defaultLanguage) {
|
|
34125
|
-
const ref = node.$ref
|
|
34166
|
+
const ref = node.$ref;
|
|
34126
34167
|
if (!ref) return;
|
|
34127
34168
|
return indexer.getMeta(ref, language);
|
|
34128
34169
|
},
|
|
34129
34170
|
getNodePage(node, language = i18n?.defaultLanguage) {
|
|
34130
|
-
const ref = node.$ref
|
|
34171
|
+
const ref = node.$ref;
|
|
34131
34172
|
if (!ref) return;
|
|
34132
34173
|
return indexer.getPage(ref, language);
|
|
34133
34174
|
},
|
|
@@ -52954,12 +52995,12 @@ async function initHotReload(clients) {
|
|
|
52954
52995
|
const serverEntry = adapter(
|
|
52955
52996
|
fsRouter(
|
|
52956
52997
|
/* @__PURE__ */ Object.assign({
|
|
52957
|
-
"./[...slugs].tsx": () => import("./_...slugs_-
|
|
52958
|
-
"./_api/api/chat.ts": () => import("./chat-
|
|
52959
|
-
"./_api/api/search.ts": () => import("./search-
|
|
52960
|
-
"./_api/img.ts": () => import("./img-
|
|
52961
|
-
"./_api/og/[...slugs]/image.webp.tsx": () => import("./image.webp-
|
|
52962
|
-
"./_root.tsx": () => import("./_root-
|
|
52998
|
+
"./[...slugs].tsx": () => import("./_...slugs_-DF1SYPMg.js").then((n) => n._),
|
|
52999
|
+
"./_api/api/chat.ts": () => import("./chat-DOZ_Cx8A.js").then((n) => n.c),
|
|
53000
|
+
"./_api/api/search.ts": () => import("./search-BHsWHDmx.js"),
|
|
53001
|
+
"./_api/img.ts": () => import("./img-B-t2xy2h.js"),
|
|
53002
|
+
"./_api/og/[...slugs]/image.webp.tsx": () => import("./image.webp-BW_97iH9.js"),
|
|
53003
|
+
"./_root.tsx": () => import("./_root-BiaZL9xf.js")
|
|
52963
53004
|
})
|
|
52964
53005
|
),
|
|
52965
53006
|
{
|
|
@@ -52967,7 +53008,7 @@ const serverEntry = adapter(
|
|
|
52967
53008
|
}
|
|
52968
53009
|
);
|
|
52969
53010
|
export {
|
|
52970
|
-
|
|
53011
|
+
lazy as A,
|
|
52971
53012
|
_null$1 as B,
|
|
52972
53013
|
CircleCheck as C,
|
|
52973
53014
|
revalidable as D,
|
|
@@ -53008,7 +53049,7 @@ export {
|
|
|
53008
53049
|
unknown as u,
|
|
53009
53050
|
string$1 as v,
|
|
53010
53051
|
union as w,
|
|
53011
|
-
|
|
53012
|
-
|
|
53013
|
-
|
|
53052
|
+
boolean$1 as x,
|
|
53053
|
+
_instanceof as y,
|
|
53054
|
+
custom as z
|
|
53014
53055
|
};
|