@farm.js/core 0.1.15 → 0.1.17
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/agent-runtime.d.mts +5 -2
- package/dist/agent-runtime.d.ts +5 -2
- package/dist/api/client.cjs +62 -28
- package/dist/api/client.d.mts +3 -2
- package/dist/api/client.d.ts +3 -2
- package/dist/api/client.mjs +3 -3
- package/dist/api/route-manager.cjs +69 -32
- package/dist/api/route-manager.d.mts +5 -2
- package/dist/api/route-manager.d.ts +5 -2
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +65 -29
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +6 -3
- package/dist/{api-client-C8d7BZNp.d.mts → api-client-Cx54IR5g.d.mts} +2 -1
- package/dist/{api-client-BWrEbxfO.d.ts → api-client-DykpaKcY.d.ts} +2 -1
- package/dist/api.cjs +106 -33
- package/dist/api.d.mts +7 -4
- package/dist/api.d.ts +7 -4
- package/dist/api.mjs +8 -8
- package/dist/{app-wIYse61b.d.ts → app-BHY_10Lm.d.ts} +3 -3
- package/dist/{app-B3nVSjen.d.mts → app-BMk0do23.d.mts} +3 -3
- package/dist/app-markdown.d.mts +6 -3
- package/dist/app-markdown.d.ts +6 -3
- package/dist/app-markdown.mjs +3 -3
- package/dist/cache.cjs +62 -28
- package/dist/cache.d.mts +11 -1
- package/dist/cache.d.ts +11 -1
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-FOGLGRDS.mjs → chunk-4OOBRCJX.mjs} +122 -8
- package/dist/{chunk-JRF3C33L.mjs → chunk-56DAX2BE.mjs} +172 -53
- package/dist/{chunk-B76DT5Y6.mjs → chunk-57J3Y7Y3.mjs} +1 -1
- package/dist/{chunk-MOQNHLTS.mjs → chunk-5QOEPUYE.mjs} +5 -2
- package/dist/{chunk-HKLRP3BN.mjs → chunk-5SPPCN5J.mjs} +1 -1
- package/dist/{chunk-LUC2FAGW.mjs → chunk-6VQIKZZO.mjs} +1 -1
- package/dist/{chunk-7ZWL7XOU.mjs → chunk-76DG3LF3.mjs} +1 -1
- package/dist/{chunk-EWDK36MM.mjs → chunk-A72YEUZ3.mjs} +1 -1
- package/dist/{chunk-ZHOIQC6U.mjs → chunk-ATERBVHQ.mjs} +2 -2
- package/dist/{chunk-27JNCYEK.mjs → chunk-EN7WTEAY.mjs} +2 -2
- package/dist/{chunk-IGO2HEV7.mjs → chunk-F6SJAKFJ.mjs} +62 -28
- package/dist/{chunk-GSDIZACQ.mjs → chunk-FG5H2VCJ.mjs} +2 -2
- package/dist/{chunk-LZK5CXDW.mjs → chunk-KLSSO6YD.mjs} +2 -2
- package/dist/{chunk-KUO3GBPK.mjs → chunk-L6V3P73N.mjs} +1 -1
- package/dist/{chunk-FBHGHMOA.mjs → chunk-MVIWBEJF.mjs} +37 -27
- package/dist/{chunk-KTGFMHET.mjs → chunk-N6UROPT7.mjs} +1 -1
- package/dist/{chunk-NDD2YVGU.mjs → chunk-NRVGEI5I.mjs} +10 -3
- package/dist/{chunk-GNTPTTLA.mjs → chunk-QGVJVSNX.mjs} +5 -5
- package/dist/{chunk-6SCB2MXB.mjs → chunk-SXHV42UQ.mjs} +16 -1
- package/dist/{chunk-OWTIOHON.mjs → chunk-SYGGPS4A.mjs} +2 -2
- package/dist/{chunk-NC333MFA.mjs → chunk-TSWW5BVH.mjs} +7 -4
- package/dist/{chunk-LK6FGAQR.mjs → chunk-UDBJCUPA.mjs} +7 -4
- package/dist/{chunk-NJ47VORC.mjs → chunk-UTBVHYS3.mjs} +2 -2
- package/dist/{chunk-76MNRHTS.mjs → chunk-UUYF3CHN.mjs} +2 -2
- package/dist/{chunk-S3QW3BIS.mjs → chunk-WD4YXVLV.mjs} +99 -6
- package/dist/{chunk-W7IVHTOP.mjs → chunk-WD5PNSOB.mjs} +16 -3
- package/dist/{chunk-DPZUDPVJ.mjs → chunk-XP777LRD.mjs} +1 -1
- package/dist/{chunk-KATQ6I56.mjs → chunk-XWAYMDLB.mjs} +1 -1
- package/dist/{chunk-UE75PB52.mjs → chunk-YD4J4XCI.mjs} +1 -1
- package/dist/{chunk-Q3MDL7TM.mjs → chunk-ZCNJKLA2.mjs} +30 -11
- package/dist/{client-plugins-CslwYp3E.d.ts → client-plugins-C089bQhN.d.ts} +16 -4
- package/dist/{client-plugins-C1EgdoJM.d.mts → client-plugins-JXXmZliS.d.mts} +16 -4
- package/dist/client-plugins.d.mts +5 -2
- package/dist/client-plugins.d.ts +5 -2
- package/dist/client.cjs +62 -28
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +6 -6
- package/dist/config.d.mts +5 -2
- package/dist/config.d.ts +5 -2
- package/dist/cron.mjs +2 -2
- package/dist/{devtools-PCGEBRSC.mjs → devtools-UFVTMQX5.mjs} +7 -7
- package/dist/docs.cjs +83 -4
- package/dist/docs.mjs +9 -9
- package/dist/{route-CHBaW55F.d.ts → endpoint-1zA994xL.d.ts} +3 -128
- package/dist/{route-C6UClI1z.d.mts → endpoint-DAc96i93.d.mts} +3 -128
- package/dist/env.cjs +135 -8
- package/dist/env.d.mts +22 -2
- package/dist/env.d.ts +22 -2
- package/dist/env.mjs +4 -1
- package/dist/index.cjs +516 -105
- package/dist/index.d.mts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.mjs +46 -34
- package/dist/integrations.d.mts +5 -2
- package/dist/integrations.d.ts +5 -2
- package/dist/internal/app-markdown-runtime.d.mts +5 -2
- package/dist/internal/app-markdown-runtime.d.ts +5 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +600 -284
- package/dist/internal/build-runtime.d.mts +7 -4
- package/dist/internal/build-runtime.d.ts +7 -4
- package/dist/internal/build-runtime.mjs +23 -23
- package/dist/internal/cli-runtime.cjs +143 -33
- package/dist/internal/cli-runtime.mjs +13 -13
- package/dist/internal/client-error-overlay.cjs +1 -1
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +5 -2
- package/dist/internal/compression-runtime.d.ts +5 -2
- package/dist/internal/config-runtime.cjs +80 -4
- package/dist/internal/config-runtime.d.mts +6 -3
- package/dist/internal/config-runtime.d.ts +6 -3
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/product-telemetry-runtime.cjs +1 -1
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +101 -41
- package/dist/internal/production-runtime.d.mts +11 -8
- package/dist/internal/production-runtime.d.ts +11 -8
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/markdown.cjs +16 -1
- package/dist/markdown.mjs +1 -1
- package/dist/{metadata-BsUcOEXg.d.ts → metadata-BcNJP4fq.d.ts} +1 -1
- package/dist/{metadata-B1bxCPUY.d.mts → metadata-C1Z9vLbb.d.mts} +1 -1
- package/dist/middleware.cjs +10 -3
- package/dist/middleware.d.mts +7 -4
- package/dist/middleware.d.ts +7 -4
- package/dist/middleware.mjs +4 -4
- package/dist/{nitro-ICBP5APY.mjs → nitro-CVZ36JM5.mjs} +8 -5
- package/dist/plugin.cjs +358 -106
- package/dist/plugin.d.mts +5 -2
- package/dist/plugin.d.ts +5 -2
- package/dist/plugin.mjs +19 -19
- package/dist/{production-runtime-BDllolVh.d.mts → production-runtime-jcrTlRTb.d.mts} +1 -1
- package/dist/{production-runtime-CsNn2-zx.d.ts → production-runtime-oKmC0WU-.d.ts} +1 -1
- package/dist/{render-plan-CNUlzylR.d.mts → render-plan-BLIfc4jt.d.mts} +1 -1
- package/dist/{render-plan-EG4hNFjy.d.ts → render-plan-DOB9cV-h.d.ts} +1 -1
- package/dist/renderer-client.cjs +62 -28
- package/dist/renderer-client.d.mts +5 -4
- package/dist/renderer-client.d.ts +5 -4
- package/dist/renderer-client.mjs +3 -3
- package/dist/{request-Blh_f7Z3.d.mts → request-Cr53NRHr.d.mts} +1 -1
- package/dist/{request-DsVSQVfD.d.ts → request-Dt2gNuQD.d.ts} +1 -1
- package/dist/request.d.mts +6 -3
- package/dist/request.d.ts +6 -3
- package/dist/route-B0XrsrFk.d.mts +128 -0
- package/dist/route-DOEpbyWZ.d.ts +128 -0
- package/dist/{route-rendering-hUETRCbM.d.ts → route-rendering-CWYd8Mv1.d.ts} +1 -1
- package/dist/{route-rendering-LT4XSoQK.d.mts → route-rendering-CeFBEAoZ.d.mts} +1 -1
- package/dist/routes.cjs +68 -31
- package/dist/routes.d.mts +5 -3
- package/dist/routes.d.ts +5 -3
- package/dist/routes.mjs +2 -2
- package/dist/server-fn-client.d.mts +3 -2
- package/dist/server-fn-client.d.ts +3 -2
- package/dist/server-fn.cjs +212 -32
- package/dist/server-fn.d.mts +72 -1
- package/dist/server-fn.d.ts +72 -1
- package/dist/server-fn.mjs +13 -2
- package/dist/server-plugins.d.mts +6 -3
- package/dist/server-plugins.d.ts +6 -3
- package/dist/server-query-client.cjs +62 -28
- package/dist/server-query-client.d.mts +1 -0
- package/dist/server-query-client.d.ts +1 -0
- package/dist/server-query-client.mjs +4 -4
- package/dist/server-query.cjs +131 -32
- package/dist/server-query.d.mts +6 -1
- package/dist/server-query.d.ts +6 -1
- package/dist/server-query.mjs +4 -3
- package/dist/server.cjs +393 -84
- package/dist/server.d.mts +9 -8
- package/dist/server.d.ts +9 -8
- package/dist/server.mjs +22 -22
- package/dist/{spa-router-csKR9Ebj.d.mts → spa-router-CQWiYGxS.d.mts} +2 -2
- package/dist/{spa-router-Y_2FSJQK.d.ts → spa-router-Wjiw-8hB.d.ts} +2 -2
- package/dist/testing.cjs +73 -32
- package/dist/testing.d.mts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/testing.mjs +11 -7
- package/dist/{utils-jISOE9SD.d.ts → utils-B0XJmG_b.d.ts} +1 -1
- package/dist/{utils-DR2wfZAn.d.mts → utils-uUxF0K0P.d.mts} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +500 -252
- package/dist/vite.d.mts +5 -2
- package/dist/vite.d.ts +5 -2
- package/dist/vite.mjs +19 -19
- package/dist/workflows.mjs +2 -2
- package/package.json +2 -2
- package/dist/{chunk-VO5SCWF5.mjs → chunk-BNGS6KJ6.mjs} +0 -0
- package/dist/{chunk-MUUZJLCI.mjs → chunk-EGJDUF4Q.mjs} +3 -3
- package/dist/{chunk-4L7SZOHZ.mjs → chunk-YHOCRI4H.mjs} +3 -3
package/dist/index.cjs
CHANGED
|
@@ -7285,8 +7285,16 @@ async function createMarkdownMirrorResponse(options) {
|
|
|
7285
7285
|
if (!hasMarkdownExtension) {
|
|
7286
7286
|
headersOut.set("Vary", "Accept");
|
|
7287
7287
|
}
|
|
7288
|
+
for (const token of pageResponse.headers.get("vary")?.split(",") ?? []) {
|
|
7289
|
+
const name2 = token.trim();
|
|
7290
|
+
if (name2 && name2.toLowerCase() !== "accept") appendHeaderToken(headersOut, "Vary", name2);
|
|
7291
|
+
}
|
|
7292
|
+
const pageCacheControl = pageResponse.headers.get("cache-control");
|
|
7288
7293
|
const cache = target.route?.cache ?? options.config?.cache ?? false;
|
|
7289
|
-
headersOut.set(
|
|
7294
|
+
headersOut.set(
|
|
7295
|
+
"Cache-Control",
|
|
7296
|
+
pageCacheControl && isPrivateCacheControl(pageCacheControl) ? pageCacheControl : createMarkdownCacheHeader(cache)
|
|
7297
|
+
);
|
|
7290
7298
|
return new Response(options.request.method === "HEAD" ? null : markdown, {
|
|
7291
7299
|
status: pageResponse.status,
|
|
7292
7300
|
headers: headersOut
|
|
@@ -7496,6 +7504,12 @@ function isHtmlResponse(response) {
|
|
|
7496
7504
|
const contentType = response.headers.get("content-type") ?? "";
|
|
7497
7505
|
return contentType.includes("text/html");
|
|
7498
7506
|
}
|
|
7507
|
+
function isPrivateCacheControl(value) {
|
|
7508
|
+
return value.split(",").some((directive) => {
|
|
7509
|
+
const name2 = directive.split("=", 1)[0].trim().toLowerCase();
|
|
7510
|
+
return name2 === "private" || name2 === "no-store";
|
|
7511
|
+
});
|
|
7512
|
+
}
|
|
7499
7513
|
function createMarkdownCacheHeader(cache) {
|
|
7500
7514
|
if (cache === false || cache <= 0) {
|
|
7501
7515
|
return "no-store";
|
|
@@ -7653,6 +7667,7 @@ var init_markdown = __esm({
|
|
|
7653
7667
|
__name(findExposedMarkdownRoute, "findExposedMarkdownRoute");
|
|
7654
7668
|
__name(routeMatches, "routeMatches");
|
|
7655
7669
|
__name(isHtmlResponse, "isHtmlResponse");
|
|
7670
|
+
__name(isPrivateCacheControl, "isPrivateCacheControl");
|
|
7656
7671
|
__name(createMarkdownCacheHeader, "createMarkdownCacheHeader");
|
|
7657
7672
|
__name(extractHtmlTitle, "extractHtmlTitle");
|
|
7658
7673
|
__name(extractHtmlBody, "extractHtmlBody");
|
|
@@ -12543,6 +12558,8 @@ var init_cache = __esm({
|
|
|
12543
12558
|
constructor(config = {}) {
|
|
12544
12559
|
this.entries = /* @__PURE__ */ new Map();
|
|
12545
12560
|
this.inflight = /* @__PURE__ */ new Map();
|
|
12561
|
+
/** Local entries by tag, so tag counts and pruning never scan unrelated entries. */
|
|
12562
|
+
this.entriesByTag = /* @__PURE__ */ new Map();
|
|
12546
12563
|
this.invalidatedTagVersions = /* @__PURE__ */ new Map();
|
|
12547
12564
|
this.activeGenerations = /* @__PURE__ */ new Set();
|
|
12548
12565
|
this.version = 0;
|
|
@@ -12561,6 +12578,7 @@ var init_cache = __esm({
|
|
|
12561
12578
|
configure(config = {}) {
|
|
12562
12579
|
this.generation++;
|
|
12563
12580
|
this.entries.clear();
|
|
12581
|
+
this.entriesByTag.clear();
|
|
12564
12582
|
this.inflight.clear();
|
|
12565
12583
|
this.invalidatedTagVersions.clear();
|
|
12566
12584
|
this.activeGenerations.clear();
|
|
@@ -12727,14 +12745,12 @@ var init_cache = __esm({
|
|
|
12727
12745
|
return entry;
|
|
12728
12746
|
}
|
|
12729
12747
|
delete(key) {
|
|
12730
|
-
const deleted = this.
|
|
12731
|
-
if (deleted) this.pruneInvalidatedTagVersions();
|
|
12748
|
+
const deleted = this.deleteLocalEntry(key);
|
|
12732
12749
|
emitFarmEvent({ type: "cache.delete", key, deleted });
|
|
12733
12750
|
return deleted;
|
|
12734
12751
|
}
|
|
12735
12752
|
async deleteAsync(key) {
|
|
12736
|
-
const deleted = this.
|
|
12737
|
-
if (deleted) this.pruneInvalidatedTagVersions();
|
|
12753
|
+
const deleted = this.deleteLocalEntry(key);
|
|
12738
12754
|
if (this.adapter) {
|
|
12739
12755
|
await this.adapter.delete(this.createAdapterKey(key));
|
|
12740
12756
|
}
|
|
@@ -12745,6 +12761,7 @@ var init_cache = __esm({
|
|
|
12745
12761
|
const count = this.entries.size;
|
|
12746
12762
|
this.generation++;
|
|
12747
12763
|
this.entries.clear();
|
|
12764
|
+
this.entriesByTag.clear();
|
|
12748
12765
|
this.inflight.clear();
|
|
12749
12766
|
this.invalidatedTagVersions.clear();
|
|
12750
12767
|
this.activeGenerations.clear();
|
|
@@ -12830,23 +12847,32 @@ var init_cache = __esm({
|
|
|
12830
12847
|
return cached.value;
|
|
12831
12848
|
}
|
|
12832
12849
|
const inflight = this.inflight.get(key);
|
|
12833
|
-
if (inflight) {
|
|
12850
|
+
if (inflight && !this.wasInvalidatedSince(inflight.tags, inflight.startVersion)) {
|
|
12834
12851
|
emitFarmEvent({ type: "cache.dedupe", key });
|
|
12835
|
-
return inflight;
|
|
12852
|
+
return inflight.promise;
|
|
12836
12853
|
}
|
|
12837
12854
|
const tags = Array.from(normalizeCacheOptionsTags(options));
|
|
12838
12855
|
const generation = this.generation;
|
|
12856
|
+
const startVersion = this.version;
|
|
12839
12857
|
const promise = this.fillCacheEntry(key, producer, options, tags, generation).catch((error) => {
|
|
12840
12858
|
emitFarmEvent({ type: "cache.error", key, operation: "set", error });
|
|
12841
12859
|
throw error;
|
|
12842
12860
|
}).finally(() => {
|
|
12843
|
-
if (this.inflight.get(key) === promise) {
|
|
12861
|
+
if (this.inflight.get(key)?.promise === promise) {
|
|
12844
12862
|
this.inflight.delete(key);
|
|
12845
12863
|
}
|
|
12846
12864
|
});
|
|
12847
|
-
this.inflight.set(key, promise);
|
|
12865
|
+
this.inflight.set(key, { promise, tags, startVersion });
|
|
12848
12866
|
return promise;
|
|
12849
12867
|
}
|
|
12868
|
+
/** A fill that started before one of its tags was invalidated cannot satisfy later readers. */
|
|
12869
|
+
wasInvalidatedSince(tags, version2) {
|
|
12870
|
+
for (const tag of tags) {
|
|
12871
|
+
const invalidatedVersion = this.invalidatedTagVersions.get(tag);
|
|
12872
|
+
if (invalidatedVersion !== void 0 && invalidatedVersion > version2) return true;
|
|
12873
|
+
}
|
|
12874
|
+
return false;
|
|
12875
|
+
}
|
|
12850
12876
|
async fillCacheEntry(key, producer, options, tags, generation) {
|
|
12851
12877
|
const adapter = this.adapter;
|
|
12852
12878
|
const namespace = this.namespace;
|
|
@@ -12887,7 +12913,7 @@ var init_cache = __esm({
|
|
|
12887
12913
|
return value;
|
|
12888
12914
|
} finally {
|
|
12889
12915
|
this.activeGenerations.delete(activeGeneration);
|
|
12890
|
-
this.pruneInvalidatedTagVersions();
|
|
12916
|
+
this.pruneInvalidatedTagVersions(activeGeneration.tags);
|
|
12891
12917
|
if (leaseToken && adapter?.releaseLease) {
|
|
12892
12918
|
try {
|
|
12893
12919
|
await adapter.releaseLease(leaseKey, leaseToken);
|
|
@@ -12932,18 +12958,9 @@ var init_cache = __esm({
|
|
|
12932
12958
|
}
|
|
12933
12959
|
return void 0;
|
|
12934
12960
|
}
|
|
12935
|
-
countEntriesForTag(tag) {
|
|
12936
|
-
let count = 0;
|
|
12937
|
-
for (const entry of this.entries.values()) {
|
|
12938
|
-
if (entry.tags.has(tag)) {
|
|
12939
|
-
count++;
|
|
12940
|
-
}
|
|
12941
|
-
}
|
|
12942
|
-
return count;
|
|
12943
|
-
}
|
|
12944
12961
|
countEntriesForTags(tags) {
|
|
12945
12962
|
let count = 0;
|
|
12946
|
-
for (const entry of this.
|
|
12963
|
+
for (const entry of this.entriesByTag.get(tags[0]) ?? []) {
|
|
12947
12964
|
if (tags.every((tag) => entry.tags.has(tag))) {
|
|
12948
12965
|
count++;
|
|
12949
12966
|
}
|
|
@@ -12951,10 +12968,10 @@ var init_cache = __esm({
|
|
|
12951
12968
|
return count;
|
|
12952
12969
|
}
|
|
12953
12970
|
invalidateTag(normalizedTag) {
|
|
12954
|
-
const count = this.
|
|
12971
|
+
const count = this.entriesByTag.get(normalizedTag)?.size ?? 0;
|
|
12955
12972
|
this.invalidatedTagVersions.delete(normalizedTag);
|
|
12956
12973
|
this.invalidatedTagVersions.set(normalizedTag, ++this.version);
|
|
12957
|
-
this.pruneInvalidatedTagVersions();
|
|
12974
|
+
this.pruneInvalidatedTagVersions([normalizedTag]);
|
|
12958
12975
|
return count;
|
|
12959
12976
|
}
|
|
12960
12977
|
toPublicEntry(entry) {
|
|
@@ -12984,19 +13001,51 @@ var init_cache = __esm({
|
|
|
12984
13001
|
this.entries.set(key, entry);
|
|
12985
13002
|
}
|
|
12986
13003
|
storeLocalEntry(entry) {
|
|
12987
|
-
|
|
13004
|
+
const removed = [];
|
|
13005
|
+
const replaced = this.detachLocalEntry(entry.key);
|
|
13006
|
+
if (replaced) removed.push(replaced);
|
|
12988
13007
|
this.entries.set(entry.key, entry);
|
|
13008
|
+
for (const tag of entry.tags) {
|
|
13009
|
+
let tagged = this.entriesByTag.get(tag);
|
|
13010
|
+
if (!tagged) this.entriesByTag.set(tag, tagged = /* @__PURE__ */ new Set());
|
|
13011
|
+
tagged.add(entry);
|
|
13012
|
+
}
|
|
12989
13013
|
while (this.entries.size > this.maxEntries) {
|
|
12990
13014
|
const oldestKey = this.entries.keys().next().value;
|
|
12991
13015
|
if (oldestKey === void 0) break;
|
|
12992
|
-
this.
|
|
13016
|
+
removed.push(this.detachLocalEntry(oldestKey));
|
|
12993
13017
|
}
|
|
12994
|
-
this.pruneInvalidatedTagVersions();
|
|
13018
|
+
for (const removedEntry of removed) this.pruneInvalidatedTagVersions(removedEntry.tags);
|
|
13019
|
+
}
|
|
13020
|
+
deleteLocalEntry(key) {
|
|
13021
|
+
const entry = this.detachLocalEntry(key);
|
|
13022
|
+
if (!entry) return false;
|
|
13023
|
+
this.pruneInvalidatedTagVersions(entry.tags);
|
|
13024
|
+
return true;
|
|
12995
13025
|
}
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13026
|
+
detachLocalEntry(key) {
|
|
13027
|
+
const entry = this.entries.get(key);
|
|
13028
|
+
if (!entry) return void 0;
|
|
13029
|
+
this.entries.delete(key);
|
|
13030
|
+
for (const tag of entry.tags) {
|
|
13031
|
+
const tagged = this.entriesByTag.get(tag);
|
|
13032
|
+
if (!tagged) continue;
|
|
13033
|
+
tagged.delete(entry);
|
|
13034
|
+
if (tagged.size === 0) this.entriesByTag.delete(tag);
|
|
13035
|
+
}
|
|
13036
|
+
return entry;
|
|
13037
|
+
}
|
|
13038
|
+
/**
|
|
13039
|
+
* Drop invalidation versions that no local entry or active fill can be stale against.
|
|
13040
|
+
* Callers pass only the tags whose dependents just changed, so the cost is bounded by
|
|
13041
|
+
* the entries sharing those tags rather than by the whole cache.
|
|
13042
|
+
*/
|
|
13043
|
+
pruneInvalidatedTagVersions(tags) {
|
|
13044
|
+
tags: for (const tag of tags) {
|
|
13045
|
+
const invalidatedVersion = this.invalidatedTagVersions.get(tag);
|
|
13046
|
+
if (invalidatedVersion === void 0) continue;
|
|
13047
|
+
for (const entry of this.entriesByTag.get(tag) ?? []) {
|
|
13048
|
+
if (entry.createdVersion < invalidatedVersion) continue tags;
|
|
13000
13049
|
}
|
|
13001
13050
|
for (const generation of this.activeGenerations) {
|
|
13002
13051
|
if (generation.tags.has(tag) && generation.createdVersion < invalidatedVersion)
|
|
@@ -13394,6 +13443,7 @@ function createProgrammaticPageComponent(route2, rendererRuntime) {
|
|
|
13394
13443
|
}
|
|
13395
13444
|
return rendererRuntime.createElement(...args);
|
|
13396
13445
|
}, "createElement");
|
|
13446
|
+
const markFunctionComponent = /* @__PURE__ */ __name((component) => rendererRuntime?.markFunctionComponent?.(component) ?? component, "markFunctionComponent");
|
|
13397
13447
|
const Component = route2.component;
|
|
13398
13448
|
if (route2.pending) {
|
|
13399
13449
|
const PendingComponent = route2.pending;
|
|
@@ -13415,7 +13465,9 @@ function createProgrammaticPageComponent(route2, rendererRuntime) {
|
|
|
13415
13465
|
throw error;
|
|
13416
13466
|
}
|
|
13417
13467
|
}, "FarmProgrammaticPageContent");
|
|
13418
|
-
const PageContent =
|
|
13468
|
+
const PageContent = markFunctionComponent(
|
|
13469
|
+
FarmProgrammaticPageContent2
|
|
13470
|
+
);
|
|
13419
13471
|
const FarmProgrammaticPage = /* @__PURE__ */ __name(function FarmProgrammaticPage2(props) {
|
|
13420
13472
|
return createElement4(
|
|
13421
13473
|
rendererRuntime.Suspense,
|
|
@@ -13425,7 +13477,7 @@ function createProgrammaticPageComponent(route2, rendererRuntime) {
|
|
|
13425
13477
|
createElement4(PageContent, props)
|
|
13426
13478
|
);
|
|
13427
13479
|
}, "FarmProgrammaticPage");
|
|
13428
|
-
return FarmProgrammaticPage;
|
|
13480
|
+
return markFunctionComponent(FarmProgrammaticPage);
|
|
13429
13481
|
}
|
|
13430
13482
|
const FarmProgrammaticPageContent = /* @__PURE__ */ __name(async function FarmProgrammaticPageContent2(props) {
|
|
13431
13483
|
try {
|
|
@@ -13444,7 +13496,7 @@ function createProgrammaticPageComponent(route2, rendererRuntime) {
|
|
|
13444
13496
|
throw error;
|
|
13445
13497
|
}
|
|
13446
13498
|
}, "FarmProgrammaticPageContent");
|
|
13447
|
-
return FarmProgrammaticPageContent;
|
|
13499
|
+
return markFunctionComponent(FarmProgrammaticPageContent);
|
|
13448
13500
|
}
|
|
13449
13501
|
function readProgrammaticRouteProps(route2, props, resources) {
|
|
13450
13502
|
if (isProgrammaticRoutePropsResolved(props)) {
|
|
@@ -15104,7 +15156,7 @@ function resolveImportedModule(importerPath, specifier, root) {
|
|
|
15104
15156
|
return { path: resolveImportedModuleSourcePath(importerPath, specifier, root), local: true };
|
|
15105
15157
|
}
|
|
15106
15158
|
const aliased = resolveProjectAliasSourcePath(specifier, root);
|
|
15107
|
-
if (aliased
|
|
15159
|
+
if (aliased) return { path: aliased, local: true };
|
|
15108
15160
|
return { path: resolvePackageModuleSourcePath(importerPath, specifier, root), local: false };
|
|
15109
15161
|
}
|
|
15110
15162
|
function resolveProjectAliasSourcePath(specifier, root) {
|
|
@@ -15117,11 +15169,12 @@ function resolveProjectAliasSourcePath(specifier, root) {
|
|
|
15117
15169
|
if (!match || alias.prefix.length > match.alias.prefix.length) match = { alias, captured };
|
|
15118
15170
|
}
|
|
15119
15171
|
if (!match) return void 0;
|
|
15120
|
-
|
|
15172
|
+
const resolved = resolveSourceCandidate(
|
|
15121
15173
|
match.alias.targets.map(
|
|
15122
15174
|
(target) => import_path4.default.normalize(match.alias.wildcard ? target.replace("*", match.captured) : target)
|
|
15123
15175
|
)
|
|
15124
15176
|
);
|
|
15177
|
+
return resolved && /\.d\.[cm]?ts$/.test(resolved) ? null : resolved;
|
|
15125
15178
|
}
|
|
15126
15179
|
function matchProjectImportAlias(alias, specifier) {
|
|
15127
15180
|
if (!alias.wildcard) return specifier === alias.prefix ? "" : null;
|
|
@@ -15841,6 +15894,7 @@ var init_route_manager = __esm({
|
|
|
15841
15894
|
init_static_metadata_image();
|
|
15842
15895
|
init_route_runtime();
|
|
15843
15896
|
init_routing();
|
|
15897
|
+
init_base_path();
|
|
15844
15898
|
init_redirect_query();
|
|
15845
15899
|
init_route_slots();
|
|
15846
15900
|
init_renderer();
|
|
@@ -16822,7 +16876,7 @@ var init_route_manager = __esm({
|
|
|
16822
16876
|
}
|
|
16823
16877
|
toRoutePathname(pathname) {
|
|
16824
16878
|
const i18n = this.getI18nConfig();
|
|
16825
|
-
return i18n ? stripFarmLocaleFromPathname(pathname, i18n) : pathname;
|
|
16879
|
+
return i18n ? stripFarmLocaleFromPathname(pathname, i18n) : stripFarmBasePath(pathname, this.config.basePath);
|
|
16826
16880
|
}
|
|
16827
16881
|
localizeRedirectDestination(destination, locale) {
|
|
16828
16882
|
if (!locale || !destination.startsWith("/") || destination.startsWith("//")) {
|
|
@@ -22038,7 +22092,7 @@ var init_server3 = __esm({
|
|
|
22038
22092
|
var version;
|
|
22039
22093
|
var init_package = __esm({
|
|
22040
22094
|
"package.json"() {
|
|
22041
|
-
version = "0.1.
|
|
22095
|
+
version = "0.1.17";
|
|
22042
22096
|
}
|
|
22043
22097
|
});
|
|
22044
22098
|
|
|
@@ -22947,7 +23001,7 @@ function createPPRRefreshScript() {
|
|
|
22947
23001
|
}
|
|
22948
23002
|
function createPreHydrationClickQueueScript() {
|
|
22949
23003
|
const selector = JSON.stringify(FARM_ISLAND_REPLAYABLE_SELECTOR);
|
|
22950
|
-
return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function hold(event,target,kind){if(queue.some(function(item){return item.target===target}))
|
|
23004
|
+
return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function hold(event,target,kind){if(!queue.some(function(item){return item.target===target})){queue.push({target:target,kind:kind,createdAt:Date.now()});announce(target,kind)}event.preventDefault();event.stopImmediatePropagation()}document.addEventListener("click",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented||event.button!==0||isModified(event))return;var target=closestQueuedTarget(event.target);if(!target||target.closest&&target.closest("a[href]")||inHydrated(target))return;hold(event,target,"click")},true);document.addEventListener("submit",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented)return;var form=event.target;if(!form||form.nodeName!=="FORM"||inHydrated(form))return;hold(event,form,"submit")},true);function observe(event){if(window.__FARM_HYDRATED__)return;var target=event.target;if(!(target&&target.closest)||inHydrated(target))return;announce(target,null)}document.addEventListener("pointerdown",observe,true);document.addEventListener("focusin",observe,true);})();</script>`;
|
|
22951
23005
|
}
|
|
22952
23006
|
function createDocumentFooter(options) {
|
|
22953
23007
|
return `</div>
|
|
@@ -26373,21 +26427,42 @@ function resolveEnv(config, source = getProcessEnv()) {
|
|
|
26373
26427
|
};
|
|
26374
26428
|
return resolved;
|
|
26375
26429
|
}
|
|
26430
|
+
function createBundledEnv(env2, source = getProcessEnv()) {
|
|
26431
|
+
const resolved = normalizeResolvedEnv(env2 ?? {});
|
|
26432
|
+
const server = {};
|
|
26433
|
+
const runtime3 = {};
|
|
26434
|
+
for (const [key, value] of Object.entries(resolved.server)) {
|
|
26435
|
+
const raw = source[key];
|
|
26436
|
+
const type = getRuntimeEnvType(value);
|
|
26437
|
+
if (raw !== void 0 && isSameEnvValue(coerceRuntimeEnvValue(raw, type), value)) {
|
|
26438
|
+
runtime3[key] = type;
|
|
26439
|
+
} else {
|
|
26440
|
+
server[key] = value;
|
|
26441
|
+
}
|
|
26442
|
+
}
|
|
26443
|
+
return {
|
|
26444
|
+
server,
|
|
26445
|
+
public: resolved.public,
|
|
26446
|
+
...Object.keys(runtime3).length > 0 ? { runtime: { server: runtime3 } } : {}
|
|
26447
|
+
};
|
|
26448
|
+
}
|
|
26376
26449
|
function setEnv(env2) {
|
|
26377
|
-
currentEnv =
|
|
26450
|
+
currentEnv = prepareEnv(env2);
|
|
26378
26451
|
if (typeof window === "undefined") {
|
|
26379
26452
|
farmEnvGlobal[FARM_ENV_SYMBOL] = currentEnv;
|
|
26380
26453
|
}
|
|
26381
26454
|
}
|
|
26382
26455
|
function getResolvedEnv() {
|
|
26383
|
-
|
|
26456
|
+
const env2 = getCurrentEnv();
|
|
26457
|
+
if (typeof window === "undefined") readRuntimeServerEnv(env2);
|
|
26458
|
+
return env2;
|
|
26384
26459
|
}
|
|
26385
26460
|
function getEnv(key) {
|
|
26386
|
-
|
|
26461
|
+
const server = getEnvScope("server");
|
|
26387
26462
|
if (key === void 0) {
|
|
26388
|
-
return
|
|
26463
|
+
return server;
|
|
26389
26464
|
}
|
|
26390
|
-
return
|
|
26465
|
+
return readServerEnvKey(server, key);
|
|
26391
26466
|
}
|
|
26392
26467
|
function getPublicEnv(key) {
|
|
26393
26468
|
if (key === void 0) {
|
|
@@ -26428,7 +26503,7 @@ function createEnvProxy(scope) {
|
|
|
26428
26503
|
return void 0;
|
|
26429
26504
|
}
|
|
26430
26505
|
const env2 = getEnvScope(scope);
|
|
26431
|
-
return env2[property];
|
|
26506
|
+
return scope === "server" ? readServerEnvKey(env2, property) : env2[property];
|
|
26432
26507
|
},
|
|
26433
26508
|
ownKeys() {
|
|
26434
26509
|
return Reflect.ownKeys(getEnvScope(scope));
|
|
@@ -26451,10 +26526,90 @@ function createEnvProxy(scope) {
|
|
|
26451
26526
|
);
|
|
26452
26527
|
}
|
|
26453
26528
|
function getEnvScope(scope) {
|
|
26529
|
+
const env2 = getCurrentEnv();
|
|
26454
26530
|
if (scope === "server") {
|
|
26455
26531
|
assertServerEnvAccess();
|
|
26532
|
+
readRuntimeServerEnv(env2);
|
|
26533
|
+
}
|
|
26534
|
+
return env2[scope] || {};
|
|
26535
|
+
}
|
|
26536
|
+
function readServerEnvKey(server, key) {
|
|
26537
|
+
const value = server[key];
|
|
26538
|
+
if (value === void 0) {
|
|
26539
|
+
const state = getCurrentEnv()[FARM_ENV_RUNTIME_SYMBOL];
|
|
26540
|
+
if (state && key in state.pending && !state.warned.has(key)) {
|
|
26541
|
+
state.warned.add(key);
|
|
26542
|
+
console.warn(
|
|
26543
|
+
`[Farm] Server env "${key}" was set when this app was built but is not set where the server runs, so it reads as undefined. Farm reads server env at runtime and does not store it in the build output; set "${key}" in the server's environment.`
|
|
26544
|
+
);
|
|
26545
|
+
}
|
|
26546
|
+
}
|
|
26547
|
+
return value;
|
|
26548
|
+
}
|
|
26549
|
+
function readRuntimeServerEnv(env2) {
|
|
26550
|
+
const state = env2[FARM_ENV_RUNTIME_SYMBOL];
|
|
26551
|
+
if (!state) return;
|
|
26552
|
+
for (const [key, type] of Object.entries(state.pending)) {
|
|
26553
|
+
const raw = readFarmEnvironmentValue(key);
|
|
26554
|
+
if (raw === void 0) continue;
|
|
26555
|
+
env2.server[key] = coerceRuntimeEnvValue(raw, type);
|
|
26556
|
+
delete state.pending[key];
|
|
26557
|
+
}
|
|
26558
|
+
}
|
|
26559
|
+
function getRuntimeEnvType(value) {
|
|
26560
|
+
if (typeof value === "number") return "number";
|
|
26561
|
+
if (typeof value === "boolean") return "boolean";
|
|
26562
|
+
if (value !== null && typeof value === "object" && !(value instanceof Date)) return "json";
|
|
26563
|
+
return "string";
|
|
26564
|
+
}
|
|
26565
|
+
function coerceRuntimeEnvValue(raw, type) {
|
|
26566
|
+
if (type === "number") {
|
|
26567
|
+
const value = Number(raw);
|
|
26568
|
+
return raw.trim() !== "" && Number.isFinite(value) ? value : raw;
|
|
26569
|
+
}
|
|
26570
|
+
if (type === "boolean") {
|
|
26571
|
+
if (/^(true|1)$/i.test(raw.trim())) return true;
|
|
26572
|
+
if (/^(false|0|)$/i.test(raw.trim())) return false;
|
|
26573
|
+
return raw;
|
|
26574
|
+
}
|
|
26575
|
+
if (type === "json") {
|
|
26576
|
+
try {
|
|
26577
|
+
return JSON.parse(raw);
|
|
26578
|
+
} catch {
|
|
26579
|
+
return raw;
|
|
26580
|
+
}
|
|
26456
26581
|
}
|
|
26457
|
-
return
|
|
26582
|
+
return raw;
|
|
26583
|
+
}
|
|
26584
|
+
function isSameEnvValue(left, right) {
|
|
26585
|
+
if (Object.is(left, right)) return true;
|
|
26586
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
26587
|
+
return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((item, index) => isSameEnvValue(item, right[index]));
|
|
26588
|
+
}
|
|
26589
|
+
if (!isPlainObject3(left) || !isPlainObject3(right)) return false;
|
|
26590
|
+
const keys = Object.keys(left);
|
|
26591
|
+
return keys.length === Object.keys(right).length && keys.every(
|
|
26592
|
+
(key) => Object.prototype.hasOwnProperty.call(right, key) && isSameEnvValue(left[key], right[key])
|
|
26593
|
+
);
|
|
26594
|
+
}
|
|
26595
|
+
function isPlainObject3(value) {
|
|
26596
|
+
if (!value || typeof value !== "object") return false;
|
|
26597
|
+
const prototype = Object.getPrototypeOf(value);
|
|
26598
|
+
return prototype === Object.prototype || prototype === null;
|
|
26599
|
+
}
|
|
26600
|
+
function prepareEnv(env2) {
|
|
26601
|
+
const normalized = normalizeResolvedEnv(env2);
|
|
26602
|
+
const runtime3 = env2.runtime?.server;
|
|
26603
|
+
if (!isRecord4(runtime3) || Object.keys(runtime3).length === 0) return normalized;
|
|
26604
|
+
const prepared = { server: { ...normalized.server }, public: normalized.public };
|
|
26605
|
+
Object.defineProperty(prepared, FARM_ENV_RUNTIME_SYMBOL, {
|
|
26606
|
+
value: {
|
|
26607
|
+
pending: { ...runtime3 },
|
|
26608
|
+
warned: /* @__PURE__ */ new Set()
|
|
26609
|
+
},
|
|
26610
|
+
enumerable: false
|
|
26611
|
+
});
|
|
26612
|
+
return prepared;
|
|
26458
26613
|
}
|
|
26459
26614
|
function assertServerEnvAccess() {
|
|
26460
26615
|
if (typeof window !== "undefined") {
|
|
@@ -26483,7 +26638,7 @@ function getCurrentEnv() {
|
|
|
26483
26638
|
function getInjectedEnv() {
|
|
26484
26639
|
try {
|
|
26485
26640
|
if (typeof __FARM_ENV__ !== "undefined" && __FARM_ENV__) {
|
|
26486
|
-
return
|
|
26641
|
+
return prepareEnv(__FARM_ENV__);
|
|
26487
26642
|
}
|
|
26488
26643
|
} catch {
|
|
26489
26644
|
}
|
|
@@ -26513,14 +26668,17 @@ function getProcessEnv() {
|
|
|
26513
26668
|
}
|
|
26514
26669
|
return {};
|
|
26515
26670
|
}
|
|
26516
|
-
var FARM_ENV_SYMBOL, farmEnvGlobal, currentEnv, env, serverEnv, publicEnv;
|
|
26671
|
+
var FARM_ENV_SYMBOL, FARM_ENV_RUNTIME_SYMBOL, farmEnvGlobal, currentEnv, env, serverEnv, publicEnv;
|
|
26517
26672
|
var init_env = __esm({
|
|
26518
26673
|
"src/env.ts"() {
|
|
26519
26674
|
"use strict";
|
|
26675
|
+
init_runtime_env();
|
|
26520
26676
|
FARM_ENV_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env");
|
|
26677
|
+
FARM_ENV_RUNTIME_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env.runtime");
|
|
26521
26678
|
farmEnvGlobal = globalThis;
|
|
26522
26679
|
currentEnv = getInitialEnv();
|
|
26523
26680
|
__name(resolveEnv, "resolveEnv");
|
|
26681
|
+
__name(createBundledEnv, "createBundledEnv");
|
|
26524
26682
|
__name(setEnv, "setEnv");
|
|
26525
26683
|
__name(getResolvedEnv, "getResolvedEnv");
|
|
26526
26684
|
__name(getEnv, "getEnv");
|
|
@@ -26532,6 +26690,13 @@ var init_env = __esm({
|
|
|
26532
26690
|
__name(parseEnvValue, "parseEnvValue");
|
|
26533
26691
|
__name(createEnvProxy, "createEnvProxy");
|
|
26534
26692
|
__name(getEnvScope, "getEnvScope");
|
|
26693
|
+
__name(readServerEnvKey, "readServerEnvKey");
|
|
26694
|
+
__name(readRuntimeServerEnv, "readRuntimeServerEnv");
|
|
26695
|
+
__name(getRuntimeEnvType, "getRuntimeEnvType");
|
|
26696
|
+
__name(coerceRuntimeEnvValue, "coerceRuntimeEnvValue");
|
|
26697
|
+
__name(isSameEnvValue, "isSameEnvValue");
|
|
26698
|
+
__name(isPlainObject3, "isPlainObject");
|
|
26699
|
+
__name(prepareEnv, "prepareEnv");
|
|
26535
26700
|
__name(assertServerEnvAccess, "assertServerEnvAccess");
|
|
26536
26701
|
__name(getInitialEnv, "getInitialEnv");
|
|
26537
26702
|
__name(getCurrentEnv, "getCurrentEnv");
|
|
@@ -27442,7 +27607,7 @@ function createEndpoint(pathOrOptions, optionsOrHandler, maybeHandler) {
|
|
|
27442
27607
|
wrappedHandler
|
|
27443
27608
|
);
|
|
27444
27609
|
endpoint2.__path = path48 || void 0;
|
|
27445
|
-
endpoint2.__method = options.method || "GET";
|
|
27610
|
+
endpoint2.__method = options.method || (path48 ? "GET" : void 0);
|
|
27446
27611
|
endpoint2.__autoPath = !path48;
|
|
27447
27612
|
endpoint2.__handler = wrappedHandler;
|
|
27448
27613
|
endpoint2.__farmInvoke = (ctx) => runEndpointMiddleware(middleware2, ctx, handler, error, options.invalidates);
|
|
@@ -28301,6 +28466,7 @@ var init_runtime2 = __esm({
|
|
|
28301
28466
|
init_response_body();
|
|
28302
28467
|
init_route_shape();
|
|
28303
28468
|
init_route_schema();
|
|
28469
|
+
init_endpoint();
|
|
28304
28470
|
init_plugin_route_runtime();
|
|
28305
28471
|
init_route_pattern2();
|
|
28306
28472
|
init_route_pattern2();
|
|
@@ -29209,7 +29375,7 @@ function parseColonParam(segment) {
|
|
|
29209
29375
|
modifier
|
|
29210
29376
|
};
|
|
29211
29377
|
}
|
|
29212
|
-
function compilePathPattern(pattern) {
|
|
29378
|
+
function compilePathPattern(pattern, trailingSlash = false) {
|
|
29213
29379
|
const params = [];
|
|
29214
29380
|
const segments = pattern.split("/").filter(Boolean);
|
|
29215
29381
|
if (segments.length === 0) {
|
|
@@ -29245,10 +29411,16 @@ function compilePathPattern(pattern) {
|
|
|
29245
29411
|
});
|
|
29246
29412
|
return {
|
|
29247
29413
|
kind: "path",
|
|
29248
|
-
regex: new RegExp(`^${parts.join("")}$`),
|
|
29414
|
+
regex: new RegExp(`^${parts.join("")}${trailingSlash ? "/?" : ""}$`),
|
|
29249
29415
|
params
|
|
29250
29416
|
};
|
|
29251
29417
|
}
|
|
29418
|
+
function compileMatcherPattern(pattern) {
|
|
29419
|
+
if (typeof pattern === "string" && pattern !== "*" && !pattern.endsWith("(.*)")) {
|
|
29420
|
+
return compilePathPattern(pattern, true);
|
|
29421
|
+
}
|
|
29422
|
+
return compilePattern(pattern);
|
|
29423
|
+
}
|
|
29252
29424
|
function compilePattern(pattern) {
|
|
29253
29425
|
if (pattern instanceof RegExp) {
|
|
29254
29426
|
return { kind: "regexp", regex: pattern };
|
|
@@ -29267,7 +29439,7 @@ function compilePattern(pattern) {
|
|
|
29267
29439
|
function compileMiddlewareConfig(config) {
|
|
29268
29440
|
const compiled = {
|
|
29269
29441
|
matcher: config.matcher ? toMatcherList(config.matcher).map(
|
|
29270
|
-
(matcher) => typeof matcher === "function" ? matcher :
|
|
29442
|
+
(matcher) => typeof matcher === "function" ? matcher : compileMatcherPattern(matcher)
|
|
29271
29443
|
) : void 0,
|
|
29272
29444
|
exclude: config.exclude?.map(compilePattern)
|
|
29273
29445
|
};
|
|
@@ -29355,6 +29527,7 @@ var init_matcher = __esm({
|
|
|
29355
29527
|
__name(escapeRegex, "escapeRegex");
|
|
29356
29528
|
__name(parseColonParam, "parseColonParam");
|
|
29357
29529
|
__name(compilePathPattern, "compilePathPattern");
|
|
29530
|
+
__name(compileMatcherPattern, "compileMatcherPattern");
|
|
29358
29531
|
__name(compilePattern, "compilePattern");
|
|
29359
29532
|
__name(compileMiddlewareConfig, "compileMiddlewareConfig");
|
|
29360
29533
|
__name(matchPattern, "matchPattern");
|
|
@@ -32637,6 +32810,66 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
|
|
|
32637
32810
|
}
|
|
32638
32811
|
};
|
|
32639
32812
|
}
|
|
32813
|
+
function mergeExternal(farmValue, userValue) {
|
|
32814
|
+
if (farmValue === void 0) return userValue;
|
|
32815
|
+
if (userValue === void 0) return farmValue;
|
|
32816
|
+
if (farmValue === true || userValue === true) return true;
|
|
32817
|
+
return Array.from(/* @__PURE__ */ new Set([...farmValue, ...userValue]));
|
|
32818
|
+
}
|
|
32819
|
+
function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
|
|
32820
|
+
const {
|
|
32821
|
+
plugins: _plugins,
|
|
32822
|
+
root: _root,
|
|
32823
|
+
base: _base,
|
|
32824
|
+
mode: _mode,
|
|
32825
|
+
appType: _appType,
|
|
32826
|
+
publicDir: _publicDir,
|
|
32827
|
+
build: userBuild = {},
|
|
32828
|
+
css: userCss,
|
|
32829
|
+
define: userDefine,
|
|
32830
|
+
esbuild: userEsbuild,
|
|
32831
|
+
...shared2
|
|
32832
|
+
} = userConfig;
|
|
32833
|
+
const {
|
|
32834
|
+
outDir: _outDir,
|
|
32835
|
+
emptyOutDir: _emptyOutDir,
|
|
32836
|
+
ssr: _ssr,
|
|
32837
|
+
ssrEmitAssets: _ssrEmitAssets,
|
|
32838
|
+
write: _write,
|
|
32839
|
+
lib: _lib,
|
|
32840
|
+
watch: _watch,
|
|
32841
|
+
rollupOptions: userRollupOptions,
|
|
32842
|
+
rolldownOptions: userRolldownOptions,
|
|
32843
|
+
...userBuildOptions
|
|
32844
|
+
} = userBuild;
|
|
32845
|
+
const {
|
|
32846
|
+
input: _input,
|
|
32847
|
+
output: _output,
|
|
32848
|
+
...userBundlerOptions
|
|
32849
|
+
} = {
|
|
32850
|
+
...userRollupOptions,
|
|
32851
|
+
...userRolldownOptions
|
|
32852
|
+
};
|
|
32853
|
+
const merged = mergeFarmViteConfig(farmConfig, shared2);
|
|
32854
|
+
return {
|
|
32855
|
+
...merged,
|
|
32856
|
+
build: {
|
|
32857
|
+
...userBuildOptions,
|
|
32858
|
+
...farmConfig.build,
|
|
32859
|
+
rollupOptions: {
|
|
32860
|
+
...userBundlerOptions,
|
|
32861
|
+
...farmConfig.build?.rollupOptions
|
|
32862
|
+
}
|
|
32863
|
+
},
|
|
32864
|
+
css: farmConfig.css || userCss ? { ...farmConfig.css, ...userCss } : void 0,
|
|
32865
|
+
define: farmConfig.define || userDefine ? { ...userDefine, ...farmConfig.define } : void 0,
|
|
32866
|
+
esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : farmConfig.esbuild ?? userEsbuild,
|
|
32867
|
+
ssr: {
|
|
32868
|
+
...merged.ssr,
|
|
32869
|
+
external: mergeExternal(farmConfig.ssr?.external, userConfig.ssr?.external)
|
|
32870
|
+
}
|
|
32871
|
+
};
|
|
32872
|
+
}
|
|
32640
32873
|
var import_node_path16, FARM_CLIENT_ENTRY_PATTERN, FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE;
|
|
32641
32874
|
var init_vite_config = __esm({
|
|
32642
32875
|
"src/server/vite-config.ts"() {
|
|
@@ -32665,6 +32898,8 @@ var init_vite_config = __esm({
|
|
|
32665
32898
|
__name(mergeNoExternal, "mergeNoExternal");
|
|
32666
32899
|
__name(mergeAlias, "mergeAlias");
|
|
32667
32900
|
__name(mergeFarmViteConfig, "mergeFarmViteConfig");
|
|
32901
|
+
__name(mergeExternal, "mergeExternal");
|
|
32902
|
+
__name(mergeFarmProductionViteConfig, "mergeFarmProductionViteConfig");
|
|
32668
32903
|
}
|
|
32669
32904
|
});
|
|
32670
32905
|
|
|
@@ -34884,6 +35119,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
34884
35119
|
if (!isFarmDocsRequest(docs, request2)) return null;
|
|
34885
35120
|
const page2 = loadPage(contentDir, docs, request2);
|
|
34886
35121
|
if (!page2) return null;
|
|
35122
|
+
const negotiatesAccept = !requestUrl.pathname.endsWith(".md");
|
|
34887
35123
|
if (shouldReturnMarkdown(request2)) {
|
|
34888
35124
|
const origin = new URL(request2.url).origin;
|
|
34889
35125
|
return omitFarmDocsHeadBody(
|
|
@@ -34898,7 +35134,8 @@ function createFarmDocsHandler(docs, options) {
|
|
|
34898
35134
|
status: 200,
|
|
34899
35135
|
headers: {
|
|
34900
35136
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
34901
|
-
"Cache-Control": "public, max-age=60"
|
|
35137
|
+
"Cache-Control": "public, max-age=60",
|
|
35138
|
+
...negotiatesAccept ? { Vary: "Accept" } : {}
|
|
34902
35139
|
}
|
|
34903
35140
|
}
|
|
34904
35141
|
)
|
|
@@ -34928,6 +35165,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
34928
35165
|
headers: {
|
|
34929
35166
|
"Content-Type": "text/html; charset=utf-8",
|
|
34930
35167
|
"Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
|
|
35168
|
+
Vary: "Accept",
|
|
34931
35169
|
...fontPreloadHeader ? { Link: fontPreloadHeader } : {}
|
|
34932
35170
|
}
|
|
34933
35171
|
}
|
|
@@ -39798,7 +40036,7 @@ function getEnvDefines(config, configEnv) {
|
|
|
39798
40036
|
)
|
|
39799
40037
|
};
|
|
39800
40038
|
if (configEnv?.isSsrBuild) {
|
|
39801
|
-
defines.__FARM_ENV__ = JSON.stringify(getFullEnvDefine(config));
|
|
40039
|
+
defines.__FARM_ENV__ = JSON.stringify(createBundledEnv(getFullEnvDefine(config)));
|
|
39802
40040
|
}
|
|
39803
40041
|
return defines;
|
|
39804
40042
|
}
|
|
@@ -40061,8 +40299,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
40061
40299
|
}, "emitPluginError");
|
|
40062
40300
|
farmApp = new FarmApp(
|
|
40063
40301
|
{
|
|
40064
|
-
|
|
40065
|
-
|
|
40302
|
+
...options,
|
|
40303
|
+
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
40066
40304
|
},
|
|
40067
40305
|
server
|
|
40068
40306
|
);
|
|
@@ -40649,7 +40887,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
40649
40887
|
() => middlewareManager.execute(req, res)
|
|
40650
40888
|
);
|
|
40651
40889
|
}, "runAppMiddlewareForContentRoute");
|
|
40652
|
-
|
|
40890
|
+
const openAPIRequestPathname = openAPIManager ? stripFarmBasePath(requestPathname, farmConfig.basePath) : requestPathname;
|
|
40891
|
+
if (openAPIManager && options.openapi?.specRoute && openAPIRequestPathname === options.openapi.specRoute) {
|
|
40653
40892
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
40654
40893
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
40655
40894
|
res.statusCode = 405;
|
|
@@ -40666,7 +40905,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
40666
40905
|
res.end(requestMethod === "HEAD" ? void 0 : body);
|
|
40667
40906
|
return;
|
|
40668
40907
|
}
|
|
40669
|
-
if (openAPIManager &&
|
|
40908
|
+
if (openAPIManager && openAPIRequestPathname === options.openapi?.route) {
|
|
40670
40909
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
40671
40910
|
const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
|
|
40672
40911
|
return docsHandler(req, res);
|
|
@@ -41144,6 +41383,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
41144
41383
|
headers: request2.headers,
|
|
41145
41384
|
signal: request2.signal
|
|
41146
41385
|
});
|
|
41386
|
+
let middlewareMap = /* @__PURE__ */ new Map();
|
|
41387
|
+
let middlewareContext = /* @__PURE__ */ new Map();
|
|
41388
|
+
if (middlewareManager?.hasMiddleware()) {
|
|
41389
|
+
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
41390
|
+
const handled = await runFarmMiddlewareWithNavigation(
|
|
41391
|
+
farmApp.getServerRenderer(),
|
|
41392
|
+
targetRequest,
|
|
41393
|
+
targetNodeRequest,
|
|
41394
|
+
res,
|
|
41395
|
+
() => middlewareManager.execute(targetNodeRequest, res)
|
|
41396
|
+
);
|
|
41397
|
+
if (handled) return;
|
|
41398
|
+
middlewareMap = targetNodeRequest.__FARM_MIDDLEWARE_DATA__ ?? middlewareMap;
|
|
41399
|
+
middlewareContext = targetNodeRequest.__FARM_MIDDLEWARE_CONTEXT__ ?? middlewareContext;
|
|
41400
|
+
}
|
|
41147
41401
|
await farmApp.getServerRenderer().runWithRequestContext(targetRequest, async () => {
|
|
41148
41402
|
const routeManager3 = farmApp.getRouteManager();
|
|
41149
41403
|
if (pm) {
|
|
@@ -41217,7 +41471,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
41217
41471
|
{
|
|
41218
41472
|
params,
|
|
41219
41473
|
searchParams: Promise.resolve(searchParams),
|
|
41220
|
-
path: targetUrl.pathname
|
|
41474
|
+
path: targetUrl.pathname,
|
|
41475
|
+
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
41221
41476
|
},
|
|
41222
41477
|
routeContext
|
|
41223
41478
|
),
|
|
@@ -41305,27 +41560,34 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
41305
41560
|
parseFarmLayoutChainHeader(request2.headers.get("x-farm-layout-chain")),
|
|
41306
41561
|
destinationLayoutPatterns
|
|
41307
41562
|
);
|
|
41308
|
-
const
|
|
41309
|
-
|
|
41310
|
-
|
|
41311
|
-
|
|
41312
|
-
|
|
41313
|
-
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
|
|
41317
|
-
|
|
41318
|
-
|
|
41319
|
-
|
|
41320
|
-
|
|
41321
|
-
|
|
41322
|
-
|
|
41323
|
-
|
|
41324
|
-
|
|
41325
|
-
|
|
41326
|
-
|
|
41327
|
-
|
|
41328
|
-
|
|
41563
|
+
const renderer = farmApp.getServerRenderer();
|
|
41564
|
+
const fragmentHtml = await _runWithMiddlewareData(
|
|
41565
|
+
middlewareMap,
|
|
41566
|
+
() => _runWithMiddlewareContext(
|
|
41567
|
+
middlewareContext,
|
|
41568
|
+
() => renderer.renderNavigationFragment({
|
|
41569
|
+
PageComponent: routeModule.default,
|
|
41570
|
+
LoadingComponent: loadingModule?.default,
|
|
41571
|
+
pageProps: routeProps,
|
|
41572
|
+
params,
|
|
41573
|
+
layouts: layouts.map((layout2, index) => ({
|
|
41574
|
+
pattern: layout2.pattern,
|
|
41575
|
+
module: layoutModules[index]
|
|
41576
|
+
})),
|
|
41577
|
+
layoutStartIndex,
|
|
41578
|
+
slots: routeSlots.map((slot) => ({
|
|
41579
|
+
name: slot.name,
|
|
41580
|
+
ownerPattern: slot.ownerPattern,
|
|
41581
|
+
containerId: slot.containerId,
|
|
41582
|
+
module: slot.renderModule,
|
|
41583
|
+
props: slot.props
|
|
41584
|
+
})),
|
|
41585
|
+
pageShouldHydrate: shouldHydrate,
|
|
41586
|
+
layoutShouldHydrate: shouldHydrateLayout,
|
|
41587
|
+
islandStrategy: hydrationIslandStrategy
|
|
41588
|
+
})
|
|
41589
|
+
)
|
|
41590
|
+
);
|
|
41329
41591
|
const pageData = {
|
|
41330
41592
|
props: {
|
|
41331
41593
|
params: routeProps.params,
|
|
@@ -41335,7 +41597,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
41335
41597
|
...routeProps.__farmCanonicalPath ? {
|
|
41336
41598
|
__farmCanonicalPath: routeProps.__farmCanonicalPath
|
|
41337
41599
|
} : {},
|
|
41338
|
-
...routeProps.__farmRoutePropsResolved ? { __farmRoutePropsResolved: true } : {}
|
|
41600
|
+
...routeProps.__farmRoutePropsResolved ? { __farmRoutePropsResolved: true } : {},
|
|
41601
|
+
// The same serialized shape a full load embeds in __FARM_PROPS__.
|
|
41602
|
+
...middlewareMap.size > 0 ? { middleware: { data: Object.fromEntries(middlewareMap) } } : {}
|
|
41339
41603
|
},
|
|
41340
41604
|
canonicalPath: routeProps.__farmCanonicalPath,
|
|
41341
41605
|
modulePath: toUrlPath(route2.modulePath),
|
|
@@ -42083,6 +42347,24 @@ function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res,
|
|
|
42083
42347
|
}
|
|
42084
42348
|
});
|
|
42085
42349
|
}
|
|
42350
|
+
function createPageDataMiddlewareRequest(req, target) {
|
|
42351
|
+
const targetNodeRequest = Object.create(req);
|
|
42352
|
+
targetNodeRequest.url = `${target.pathname}${target.search}`;
|
|
42353
|
+
targetNodeRequest.originalUrl = targetNodeRequest.url;
|
|
42354
|
+
targetNodeRequest.method = "GET";
|
|
42355
|
+
return targetNodeRequest;
|
|
42356
|
+
}
|
|
42357
|
+
function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
42358
|
+
if (!farmRoot) return viteRoot;
|
|
42359
|
+
if (path38.resolve(farmRoot) === path38.resolve(viteRoot)) return farmRoot;
|
|
42360
|
+
try {
|
|
42361
|
+
if (fs14.realpathSync(farmRoot) === fs14.realpathSync(viteRoot)) {
|
|
42362
|
+
return path38.resolve(viteRoot);
|
|
42363
|
+
}
|
|
42364
|
+
} catch {
|
|
42365
|
+
}
|
|
42366
|
+
return farmRoot;
|
|
42367
|
+
}
|
|
42086
42368
|
function isFarmClientVirtualId(id) {
|
|
42087
42369
|
const pathname = id.split("?", 1)[0];
|
|
42088
42370
|
return pathname === "/@farm/client" || pathname === "/@farm/client.js";
|
|
@@ -42097,16 +42379,18 @@ function generateProgrammaticRouteModule(moduleId, root, renderer = REACT_RENDER
|
|
|
42097
42379
|
return generateProgrammaticApiRouteModule(parsed.routePath, routeFile);
|
|
42098
42380
|
}
|
|
42099
42381
|
return `
|
|
42100
|
-
import {
|
|
42101
|
-
createElement as __farmCreateElement,
|
|
42102
|
-
Suspense as __farmSuspense,
|
|
42103
|
-
} from ${JSON.stringify(renderer.server)};
|
|
42382
|
+
import * as __farmRendererRuntime from ${JSON.stringify(renderer.server)};
|
|
42104
42383
|
import {
|
|
42105
42384
|
createLayoutModuleFromProgrammaticLayout as __farmCreateLayoutRouteModule,
|
|
42106
42385
|
createRouteModuleFromProgrammaticPage as __farmCreatePageRouteModule,
|
|
42107
42386
|
} from "@farm.js/core/routes";
|
|
42108
42387
|
import * as __farmRoutesModule from ${JSON.stringify(routeFile)};
|
|
42109
42388
|
|
|
42389
|
+
const __farmCreateElement = __farmRendererRuntime.createElement;
|
|
42390
|
+
const __farmSuspense = __farmRendererRuntime.Suspense;
|
|
42391
|
+
// Optional hook: only renderers that need it export markFunctionComponent.
|
|
42392
|
+
const __farmMarkFunctionComponent = Reflect.get(__farmRendererRuntime, "markFunctionComponent");
|
|
42393
|
+
|
|
42110
42394
|
const __farmIsRouteDefinition = (value) => (
|
|
42111
42395
|
value &&
|
|
42112
42396
|
typeof value === "object" &&
|
|
@@ -42160,6 +42444,7 @@ const __farmRouteModule = __farmRoute.kind === "layout"
|
|
|
42160
42444
|
: __farmCreatePageRouteModule(__farmRoute, {
|
|
42161
42445
|
createElement: __farmCreateElement,
|
|
42162
42446
|
Suspense: __farmSuspense,
|
|
42447
|
+
markFunctionComponent: __farmMarkFunctionComponent,
|
|
42163
42448
|
});
|
|
42164
42449
|
|
|
42165
42450
|
export const metadata = __farmRouteModule.metadata;
|
|
@@ -43764,6 +44049,11 @@ async function hydrate() {
|
|
|
43764
44049
|
pendingPageHydrationController = hydrationController;
|
|
43765
44050
|
await hydrateFarmIsolatedClientBoundaries(rootContainer, hydrationController.signal);
|
|
43766
44051
|
if (hydrationController.signal.aborted) return;
|
|
44052
|
+
// The rest of the document is static server HTML with nothing to hydrate, so
|
|
44053
|
+
// stop holding its clicks and submits once the load-strategy islands are live.
|
|
44054
|
+
// Deferred islands capture their own interactions, and held targets outside an
|
|
44055
|
+
// island are not replayed into DOM no client code owns.
|
|
44056
|
+
markFarmHydrated();
|
|
43767
44057
|
return;
|
|
43768
44058
|
}` : ""}
|
|
43769
44059
|
if (!shouldHydrate) {
|
|
@@ -44193,6 +44483,7 @@ var fs14, path38, import_node_url11, ALL_TYPE_ARTIFACTS, createEmptyTypeArtifact
|
|
|
44193
44483
|
var init_vite2 = __esm({
|
|
44194
44484
|
"src/vite.ts"() {
|
|
44195
44485
|
"use strict";
|
|
44486
|
+
init_env();
|
|
44196
44487
|
init_app();
|
|
44197
44488
|
init_utils();
|
|
44198
44489
|
init_plugin();
|
|
@@ -44204,9 +44495,11 @@ var init_vite2 = __esm({
|
|
|
44204
44495
|
init_server_path();
|
|
44205
44496
|
init_runtime2();
|
|
44206
44497
|
init_manager();
|
|
44498
|
+
init_server();
|
|
44207
44499
|
init_type_artifacts();
|
|
44208
44500
|
init_routes_shared();
|
|
44209
44501
|
init_markdown();
|
|
44502
|
+
init_base_path();
|
|
44210
44503
|
init_llms_txt();
|
|
44211
44504
|
init_agent_crawlers();
|
|
44212
44505
|
init_app_markdown();
|
|
@@ -44344,6 +44637,8 @@ async function mountFarmDocsSearch() {
|
|
|
44344
44637
|
__name(hasViteAlias, "hasViteAlias");
|
|
44345
44638
|
__name(farmPlugin, "farmPlugin");
|
|
44346
44639
|
__name(runFarmMiddlewareWithNavigation, "runFarmMiddlewareWithNavigation");
|
|
44640
|
+
__name(createPageDataMiddlewareRequest, "createPageDataMiddlewareRequest");
|
|
44641
|
+
__name(resolveDevelopmentRoot, "resolveDevelopmentRoot");
|
|
44347
44642
|
__name(isFarmClientVirtualId, "isFarmClientVirtualId");
|
|
44348
44643
|
__name(generateProgrammaticRouteModule, "generateProgrammaticRouteModule");
|
|
44349
44644
|
__name(generateProgrammaticApiRouteModule, "generateProgrammaticApiRouteModule");
|
|
@@ -45263,7 +45558,7 @@ export const farmRegistry: {
|
|
|
45263
45558
|
clientManifest?: any;
|
|
45264
45559
|
routePaths?: Record<string, string>;
|
|
45265
45560
|
} = {
|
|
45266
|
-
env: ${JSON.stringify(config.env
|
|
45561
|
+
env: ${JSON.stringify(createBundledEnv(config.env), null, 2)},
|
|
45267
45562
|
deploymentId: ${JSON.stringify(config.deploymentId)},
|
|
45268
45563
|
basePath: ${JSON.stringify(config.basePath)},
|
|
45269
45564
|
apiBasePath: ${JSON.stringify(apiBasePath)},
|
|
@@ -45767,7 +46062,7 @@ export default defineEventHandler(async (event: H3Event) => {
|
|
|
45767
46062
|
farmRegistry.apiRouteManager = apiRouteManager;
|
|
45768
46063
|
farmRegistry.routeManager = routeManager;
|
|
45769
46064
|
farmRegistry.serverRenderer = serverRenderer;
|
|
45770
|
-
farmRegistry.env = config.env
|
|
46065
|
+
farmRegistry.env = createBundledEnv(config.env);
|
|
45771
46066
|
farmRegistry.deploymentId = config.deploymentId;
|
|
45772
46067
|
farmRegistry.basePath = config.basePath;
|
|
45773
46068
|
};
|
|
@@ -45832,6 +46127,7 @@ var import_path16;
|
|
|
45832
46127
|
var init_nitro = __esm({
|
|
45833
46128
|
"src/nitro/index.ts"() {
|
|
45834
46129
|
"use strict";
|
|
46130
|
+
init_env();
|
|
45835
46131
|
import_path16 = __toESM(require("path"));
|
|
45836
46132
|
init_workflows();
|
|
45837
46133
|
init_cron();
|
|
@@ -45914,7 +46210,11 @@ __export(src_exports, {
|
|
|
45914
46210
|
ServerActionRequestError: () => ServerActionRequestError,
|
|
45915
46211
|
ServerFnFailure: () => ServerFnFailure,
|
|
45916
46212
|
UnsupportedRateLimitStorageError: () => UnsupportedRateLimitStorageError,
|
|
46213
|
+
_attachServerFunctionDescriptor: () => _attachServerFunctionDescriptor,
|
|
46214
|
+
_describeServerFunction: () => _describeServerFunction,
|
|
46215
|
+
_invokeServerFunction: () => _invokeServerFunction,
|
|
45917
46216
|
_parseServerFnSchema: () => _parseServerFnSchema,
|
|
46217
|
+
_runServerFunctionForCaller: () => _runServerFunctionForCaller,
|
|
45918
46218
|
_runWithAfterNodeResponse: () => _runWithAfterNodeResponse,
|
|
45919
46219
|
_runWithAfterRequest: () => _runWithAfterRequest,
|
|
45920
46220
|
_runWithMiddlewareContext: () => _runWithMiddlewareContext,
|
|
@@ -45960,6 +46260,7 @@ __export(src_exports, {
|
|
|
45960
46260
|
cookies: () => cookies,
|
|
45961
46261
|
createAPIClient: () => createAPIClient,
|
|
45962
46262
|
createApiClients: () => createApiClients,
|
|
46263
|
+
createBundledEnv: () => createBundledEnv,
|
|
45963
46264
|
createClientOnlyFn: () => createClientOnlyFn,
|
|
45964
46265
|
createClientPluginManager: () => createClientPluginManager,
|
|
45965
46266
|
createCompressionPlugin: () => createCompressionPlugin,
|
|
@@ -46022,6 +46323,7 @@ __export(src_exports, {
|
|
|
46022
46323
|
createServerActionRequestErrorResponse: () => createServerActionRequestErrorResponse,
|
|
46023
46324
|
createServerFn: () => createServerFn,
|
|
46024
46325
|
createServerFnTransportError: () => createServerFnTransportError,
|
|
46326
|
+
createServerFunctionDescriptor: () => createServerFunctionDescriptor,
|
|
46025
46327
|
createServerMiddleware: () => createServerMiddleware,
|
|
46026
46328
|
createServerOnlyFn: () => createServerOnlyFn,
|
|
46027
46329
|
createServerQuery: () => createServerQuery,
|
|
@@ -50477,6 +50779,7 @@ init_transport();
|
|
|
50477
50779
|
init_route_manager2();
|
|
50478
50780
|
init_runtime2();
|
|
50479
50781
|
init_response();
|
|
50782
|
+
init_request();
|
|
50480
50783
|
init_route_files();
|
|
50481
50784
|
init_after();
|
|
50482
50785
|
init_server_context();
|
|
@@ -50833,7 +51136,7 @@ function farmApiPlugin(options = {}) {
|
|
|
50833
51136
|
if (currentPathname !== pathname && !matchAPIRouteAtBasePath(apiRoutesCache, currentPathname, basePath)) {
|
|
50834
51137
|
return next();
|
|
50835
51138
|
}
|
|
50836
|
-
const fullUrl =
|
|
51139
|
+
const fullUrl = resolveFarmRequestURL(req);
|
|
50837
51140
|
const headers2 = new Headers();
|
|
50838
51141
|
for (const [key, value] of Object.entries(req.headers)) {
|
|
50839
51142
|
if (value) {
|
|
@@ -52793,8 +53096,74 @@ init_server_action_security();
|
|
|
52793
53096
|
init_request_bridge();
|
|
52794
53097
|
init_cache();
|
|
52795
53098
|
init_server_fn_error();
|
|
53099
|
+
init_navigation_errors();
|
|
52796
53100
|
init_server_fn_error();
|
|
52797
53101
|
var FARM_SERVER_FN_SYMBOL = /* @__PURE__ */ Symbol.for("farm.server-fn");
|
|
53102
|
+
var FARM_SERVER_FUNCTION_DESCRIPTOR = /* @__PURE__ */ Symbol.for("farm.server-function.descriptor");
|
|
53103
|
+
var _ServerFnInputError = class _ServerFnInputError extends Error {
|
|
53104
|
+
constructor(cause) {
|
|
53105
|
+
super("Server function input is invalid");
|
|
53106
|
+
this.cause = cause;
|
|
53107
|
+
}
|
|
53108
|
+
};
|
|
53109
|
+
__name(_ServerFnInputError, "ServerFnInputError");
|
|
53110
|
+
var ServerFnInputError = _ServerFnInputError;
|
|
53111
|
+
function createServerFunctionDescriptor(kind, options, run) {
|
|
53112
|
+
return Object.freeze({
|
|
53113
|
+
kind,
|
|
53114
|
+
input: options.input,
|
|
53115
|
+
output: options.output,
|
|
53116
|
+
mcp: options.mcp === void 0 ? void 0 : Object.freeze({ ...options.mcp }),
|
|
53117
|
+
run
|
|
53118
|
+
});
|
|
53119
|
+
}
|
|
53120
|
+
__name(createServerFunctionDescriptor, "createServerFunctionDescriptor");
|
|
53121
|
+
function _attachServerFunctionDescriptor(target, descriptor) {
|
|
53122
|
+
Object.defineProperty(target, FARM_SERVER_FUNCTION_DESCRIPTOR, {
|
|
53123
|
+
value: descriptor,
|
|
53124
|
+
enumerable: false
|
|
53125
|
+
});
|
|
53126
|
+
}
|
|
53127
|
+
__name(_attachServerFunctionDescriptor, "_attachServerFunctionDescriptor");
|
|
53128
|
+
function getServerFunctionRunner(value) {
|
|
53129
|
+
if (typeof value !== "function") return void 0;
|
|
53130
|
+
return value[FARM_SERVER_FUNCTION_DESCRIPTOR];
|
|
53131
|
+
}
|
|
53132
|
+
__name(getServerFunctionRunner, "getServerFunctionRunner");
|
|
53133
|
+
function _runServerFunctionForCaller(value, input) {
|
|
53134
|
+
const runner = getServerFunctionRunner(value);
|
|
53135
|
+
if (!runner) throw new TypeError("Expected a function created with createServerFn");
|
|
53136
|
+
return runner.run(input);
|
|
53137
|
+
}
|
|
53138
|
+
__name(_runServerFunctionForCaller, "_runServerFunctionForCaller");
|
|
53139
|
+
function _describeServerFunction(value) {
|
|
53140
|
+
const runner = getServerFunctionRunner(value);
|
|
53141
|
+
if (!runner) return void 0;
|
|
53142
|
+
const { kind, input, output, mcp } = runner;
|
|
53143
|
+
return Object.freeze({ kind, input, output, mcp });
|
|
53144
|
+
}
|
|
53145
|
+
__name(_describeServerFunction, "_describeServerFunction");
|
|
53146
|
+
async function _invokeServerFunction(value, input, request2) {
|
|
53147
|
+
const runner = getServerFunctionRunner(value);
|
|
53148
|
+
if (!runner) {
|
|
53149
|
+
throw new TypeError("Expected a function created with createServerFn or createServerQuery");
|
|
53150
|
+
}
|
|
53151
|
+
try {
|
|
53152
|
+
const data = await runWithServerActionRequest(request2, () => runner.run(input));
|
|
53153
|
+
return { ok: true, data };
|
|
53154
|
+
} catch (error) {
|
|
53155
|
+
if (error instanceof ServerFnInputError) {
|
|
53156
|
+
return { ok: false, reason: "input", error: error.cause };
|
|
53157
|
+
}
|
|
53158
|
+
if (isServerFnFailure(error)) return { ok: false, reason: "failure", failure: error };
|
|
53159
|
+
const redirect3 = getFarmRedirectError(error);
|
|
53160
|
+
if (redirect3) {
|
|
53161
|
+
return { ok: false, reason: "redirect", url: redirect3.url, status: redirect3.status };
|
|
53162
|
+
}
|
|
53163
|
+
return { ok: false, reason: "error", error };
|
|
53164
|
+
}
|
|
53165
|
+
}
|
|
53166
|
+
__name(_invokeServerFunction, "_invokeServerFunction");
|
|
52798
53167
|
var UNSAFE_FORM_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
52799
53168
|
function createServerMiddleware(options) {
|
|
52800
53169
|
if (!options || typeof options.handler !== "function") {
|
|
@@ -52818,10 +53187,15 @@ function createServerFn(options) {
|
|
|
52818
53187
|
const middleware2 = resolveServerFnMiddleware(options.middleware);
|
|
52819
53188
|
const errors = normalizeServerFnErrors(options.errors);
|
|
52820
53189
|
const error = createServerFnErrorHandler(errors);
|
|
52821
|
-
const
|
|
53190
|
+
const run = /* @__PURE__ */ __name(async (value, labelInputErrors) => {
|
|
52822
53191
|
const formData = isFormData2(value) ? value : void 0;
|
|
52823
53192
|
const rawInput = formData ? formDataToObject2(formData) : value;
|
|
52824
|
-
|
|
53193
|
+
let input;
|
|
53194
|
+
try {
|
|
53195
|
+
input = await _parseServerFnSchema(options.input, rawInput, "input");
|
|
53196
|
+
} catch (cause) {
|
|
53197
|
+
throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
|
|
53198
|
+
}
|
|
52825
53199
|
const executionContext = getServerActionExecutionContext();
|
|
52826
53200
|
const request2 = executionContext?.request ?? _resolveCurrentRequest();
|
|
52827
53201
|
const signal = executionContext?.signal ?? request2?.signal ?? getServerActionSignal();
|
|
@@ -52847,7 +53221,8 @@ function createServerFn(options) {
|
|
|
52847
53221
|
await applyFarmCacheInvalidationTargets(declaration);
|
|
52848
53222
|
}
|
|
52849
53223
|
return parsedResult;
|
|
52850
|
-
}, "
|
|
53224
|
+
}, "run");
|
|
53225
|
+
const serverFn = /* @__PURE__ */ __name((value) => run(value, false), "serverFn");
|
|
52851
53226
|
Object.defineProperties(serverFn, {
|
|
52852
53227
|
[FARM_SERVER_FN_SYMBOL]: {
|
|
52853
53228
|
value: true,
|
|
@@ -52878,6 +53253,10 @@ function createServerFn(options) {
|
|
|
52878
53253
|
enumerable: false
|
|
52879
53254
|
}
|
|
52880
53255
|
});
|
|
53256
|
+
_attachServerFunctionDescriptor(
|
|
53257
|
+
serverFn,
|
|
53258
|
+
createServerFunctionDescriptor("action", options, (value) => run(value, true))
|
|
53259
|
+
);
|
|
52881
53260
|
return serverFn;
|
|
52882
53261
|
}
|
|
52883
53262
|
__name(createServerFn, "createServerFn");
|
|
@@ -53035,9 +53414,17 @@ async function _parseServerFnSchema(schema, value, contract, owner = "createServ
|
|
|
53035
53414
|
throw new TypeError(`${owner} ${contract} must provide parse, parseAsync, or safeParse`);
|
|
53036
53415
|
}
|
|
53037
53416
|
__name(_parseServerFnSchema, "_parseServerFnSchema");
|
|
53417
|
+
var schemaValidationFailures = /* @__PURE__ */ new WeakSet();
|
|
53418
|
+
function isSchemaValidationFailure(error) {
|
|
53419
|
+
if (!error || typeof error !== "object") return false;
|
|
53420
|
+
return schemaValidationFailures.has(error) || Array.isArray(error.issues);
|
|
53421
|
+
}
|
|
53422
|
+
__name(isSchemaValidationFailure, "isSchemaValidationFailure");
|
|
53038
53423
|
function unwrapSafeParseResult(result) {
|
|
53039
53424
|
if (result && typeof result === "object" && "success" in result && result.success === false) {
|
|
53040
|
-
|
|
53425
|
+
const error = result.error;
|
|
53426
|
+
if (error && typeof error === "object") schemaValidationFailures.add(error);
|
|
53427
|
+
throw error;
|
|
53041
53428
|
}
|
|
53042
53429
|
if (result && typeof result === "object" && "success" in result && result.success === true) {
|
|
53043
53430
|
return result.data;
|
|
@@ -53429,6 +53816,16 @@ function createServerQuery(options) {
|
|
|
53429
53816
|
enumerable: false
|
|
53430
53817
|
}
|
|
53431
53818
|
});
|
|
53819
|
+
_attachServerFunctionDescriptor(
|
|
53820
|
+
query,
|
|
53821
|
+
createServerFunctionDescriptor("query", options, async (value) => {
|
|
53822
|
+
const result = await _runServerFunctionForCaller(
|
|
53823
|
+
execute,
|
|
53824
|
+
value
|
|
53825
|
+
);
|
|
53826
|
+
return result.data;
|
|
53827
|
+
})
|
|
53828
|
+
);
|
|
53432
53829
|
return query;
|
|
53433
53830
|
}
|
|
53434
53831
|
__name(createServerQuery, "createServerQuery");
|
|
@@ -53786,6 +54183,7 @@ init_deployment();
|
|
|
53786
54183
|
init_generate_route_types();
|
|
53787
54184
|
|
|
53788
54185
|
// src/build/index.ts
|
|
54186
|
+
init_env();
|
|
53789
54187
|
init_config4();
|
|
53790
54188
|
var import_path17 = __toESM(require("path"));
|
|
53791
54189
|
var import_node_fs15 = require("fs");
|
|
@@ -53796,6 +54194,7 @@ init_server_path();
|
|
|
53796
54194
|
init_layers();
|
|
53797
54195
|
|
|
53798
54196
|
// src/nitro/universal-build.ts
|
|
54197
|
+
init_env();
|
|
53799
54198
|
init_config4();
|
|
53800
54199
|
|
|
53801
54200
|
// src/nitro/client-css-href.ts
|
|
@@ -55907,7 +56306,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
55907
56306
|
}
|
|
55908
56307
|
}
|
|
55909
56308
|
try {
|
|
55910
|
-
|
|
56309
|
+
const clientViteConfig = {
|
|
55911
56310
|
root,
|
|
55912
56311
|
// Vite otherwise falls back to <root>/public, silently dropping every
|
|
55913
56312
|
// asset in a custom config.publicDir from the production client output.
|
|
@@ -56043,7 +56442,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
56043
56442
|
"@farm.js/core/headers"
|
|
56044
56443
|
]
|
|
56045
56444
|
}
|
|
56046
|
-
}
|
|
56445
|
+
};
|
|
56446
|
+
await viteBuild(mergeFarmProductionViteConfig(clientViteConfig, config.vite));
|
|
56047
56447
|
await mergeBuiltFontCss(outputDir);
|
|
56048
56448
|
await validateClientBuildOutput(root, srcDir, outputDir);
|
|
56049
56449
|
} finally {
|
|
@@ -58389,7 +58789,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
58389
58789
|
"react-dom/server"
|
|
58390
58790
|
];
|
|
58391
58791
|
try {
|
|
58392
|
-
|
|
58792
|
+
const serverViteConfig = {
|
|
58393
58793
|
root,
|
|
58394
58794
|
build: {
|
|
58395
58795
|
target: "esnext",
|
|
@@ -58480,7 +58880,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
58480
58880
|
},
|
|
58481
58881
|
define: {
|
|
58482
58882
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
58483
|
-
__FARM_ENV__: JSON.stringify(config.env
|
|
58883
|
+
__FARM_ENV__: JSON.stringify(createBundledEnv(config.env)),
|
|
58484
58884
|
__FARM_PUBLIC_ENV__: JSON.stringify(config.env?.public || {})
|
|
58485
58885
|
},
|
|
58486
58886
|
plugins: [
|
|
@@ -58550,7 +58950,8 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
58550
58950
|
// Route modules and the renderer adapter must share one runtime instance.
|
|
58551
58951
|
dedupe: [...config.renderer.dedupe || []]
|
|
58552
58952
|
}
|
|
58553
|
-
}
|
|
58953
|
+
};
|
|
58954
|
+
await viteBuild(mergeFarmProductionViteConfig(serverViteConfig, config.vite));
|
|
58554
58955
|
} finally {
|
|
58555
58956
|
if (postcssConfigDir) {
|
|
58556
58957
|
try {
|
|
@@ -60758,7 +61159,7 @@ function hasLocalRequestRoute(request, routePathname) {
|
|
|
60758
61159
|
const pathname = new URL(request.url).pathname;
|
|
60759
61160
|
if (
|
|
60760
61161
|
farmOpenAPIReference &&
|
|
60761
|
-
normalizeRuntimePath(pathname) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
61162
|
+
normalizeRuntimePath(stripFarmBasePath(pathname)) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
60762
61163
|
) {
|
|
60763
61164
|
return true;
|
|
60764
61165
|
}
|
|
@@ -60794,7 +61195,7 @@ function getFarmPluginRequestOptions(request) {
|
|
|
60794
61195
|
const route = { pathname };
|
|
60795
61196
|
if (
|
|
60796
61197
|
farmOpenAPIReference &&
|
|
60797
|
-
normalizeRuntimePath(pathname) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
61198
|
+
normalizeRuntimePath(stripFarmBasePath(pathname)) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
60798
61199
|
) {
|
|
60799
61200
|
return {
|
|
60800
61201
|
kind: "docs",
|
|
@@ -61123,9 +61524,10 @@ async function handleFarmRequest(request, adapterContext) {
|
|
|
61123
61524
|
)` : "handleFarmRequestInContext(request, null, false, Date.now(), adapterContext, requestUrl)"};
|
|
61124
61525
|
${config.md?.enabled ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
|
|
61125
61526
|
if (matchPageRoute(pathname)) {
|
|
61527
|
+
// The Link header advertises the public .md URL, like the head alternate.
|
|
61126
61528
|
return applyMarkdownNegotiationHeaders(response, {
|
|
61127
61529
|
config: farmMarkdownConfig,
|
|
61128
|
-
pathname,
|
|
61530
|
+
pathname: requestUrl.pathname,
|
|
61129
61531
|
});
|
|
61130
61532
|
}` : ""}
|
|
61131
61533
|
return response;
|
|
@@ -61313,7 +61715,7 @@ async function handleFarmRequestInContext(
|
|
|
61313
61715
|
if (
|
|
61314
61716
|
farmOpenAPIReference &&
|
|
61315
61717
|
farmOpenAPIReference.specRoute &&
|
|
61316
|
-
normalizeRuntimePath(pathname) === normalizeRuntimePath(farmOpenAPIReference.specRoute)
|
|
61718
|
+
normalizeRuntimePath(stripFarmBasePath(pathname)) === normalizeRuntimePath(farmOpenAPIReference.specRoute)
|
|
61317
61719
|
) {
|
|
61318
61720
|
const method = request.method.toUpperCase();
|
|
61319
61721
|
const specResponse = method === "GET" || method === "HEAD"
|
|
@@ -61337,7 +61739,7 @@ async function handleFarmRequestInContext(
|
|
|
61337
61739
|
|
|
61338
61740
|
if (
|
|
61339
61741
|
farmOpenAPIReference &&
|
|
61340
|
-
normalizeRuntimePath(pathname) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
61742
|
+
normalizeRuntimePath(stripFarmBasePath(pathname)) === normalizeRuntimePath(farmOpenAPIReference.route)
|
|
61341
61743
|
) {
|
|
61342
61744
|
const method = request.method.toUpperCase();
|
|
61343
61745
|
const response = method === "GET" || method === "HEAD"
|
|
@@ -61875,12 +62277,15 @@ async function handleFarmRequestInContext(
|
|
|
61875
62277
|
const sharedCacheControl = getRouteSharedCacheControl(route, pprCanCache);
|
|
61876
62278
|
const responseHeaders = {
|
|
61877
62279
|
"Content-Type": "text/html; charset=utf-8",
|
|
61878
|
-
"Cache-Control":
|
|
61879
|
-
? "private, no-store"
|
|
61880
|
-
: sharedCacheControl,
|
|
62280
|
+
"Cache-Control": sharedCacheControl,
|
|
61881
62281
|
...(farmFontPreloadHeader ? { "Link": farmFontPreloadHeader } : {}),
|
|
61882
62282
|
...(pprConfig.enabled ? getPPRHeaders(pprCanCache ? "miss" : "bypass", pprConfig) : {}),
|
|
61883
62283
|
};
|
|
62284
|
+
// An error status or a request-scoped render is never shareable, even when
|
|
62285
|
+
// the PPR shell headers would otherwise grant a shared max-age.
|
|
62286
|
+
if (renderedPage.stream || hasRequestScopedRender || !sharedCacheControl) {
|
|
62287
|
+
responseHeaders["Cache-Control"] = "private, no-store";
|
|
62288
|
+
}
|
|
61884
62289
|
const farmI18nSnapshot = getFarmI18nSnapshot();
|
|
61885
62290
|
let html = renderedPage.html;
|
|
61886
62291
|
|
|
@@ -63931,7 +64336,7 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
63931
64336
|
},
|
|
63932
64337
|
define: {
|
|
63933
64338
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
63934
|
-
__FARM_ENV__: JSON.stringify(config.env
|
|
64339
|
+
__FARM_ENV__: JSON.stringify(createBundledEnv(config.env)),
|
|
63935
64340
|
__FARM_PUBLIC_ENV__: JSON.stringify(config.env?.public || {})
|
|
63936
64341
|
},
|
|
63937
64342
|
plugins: [
|
|
@@ -64014,7 +64419,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
64014
64419
|
farmRegistry.apiRouteManager = apiRouteManager;
|
|
64015
64420
|
farmRegistry.routeManager = routeManager;
|
|
64016
64421
|
farmRegistry.serverRenderer = serverRenderer;
|
|
64017
|
-
farmRegistry.env = config.env
|
|
64422
|
+
farmRegistry.env = createBundledEnv(config.env);
|
|
64018
64423
|
const routePaths = {};
|
|
64019
64424
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
64020
64425
|
const bundledPath = entry.modulePath.replace(/.*\/src\/app\//, "").replace(/\.(tsx?|jsx?)$/, ".js");
|
|
@@ -67557,7 +67962,11 @@ __name(cookies, "cookies");
|
|
|
67557
67962
|
ServerActionRequestError,
|
|
67558
67963
|
ServerFnFailure,
|
|
67559
67964
|
UnsupportedRateLimitStorageError,
|
|
67965
|
+
_attachServerFunctionDescriptor,
|
|
67966
|
+
_describeServerFunction,
|
|
67967
|
+
_invokeServerFunction,
|
|
67560
67968
|
_parseServerFnSchema,
|
|
67969
|
+
_runServerFunctionForCaller,
|
|
67561
67970
|
_runWithAfterNodeResponse,
|
|
67562
67971
|
_runWithAfterRequest,
|
|
67563
67972
|
_runWithMiddlewareContext,
|
|
@@ -67603,6 +68012,7 @@ __name(cookies, "cookies");
|
|
|
67603
68012
|
cookies,
|
|
67604
68013
|
createAPIClient,
|
|
67605
68014
|
createApiClients,
|
|
68015
|
+
createBundledEnv,
|
|
67606
68016
|
createClientOnlyFn,
|
|
67607
68017
|
createClientPluginManager,
|
|
67608
68018
|
createCompressionPlugin,
|
|
@@ -67665,6 +68075,7 @@ __name(cookies, "cookies");
|
|
|
67665
68075
|
createServerActionRequestErrorResponse,
|
|
67666
68076
|
createServerFn,
|
|
67667
68077
|
createServerFnTransportError,
|
|
68078
|
+
createServerFunctionDescriptor,
|
|
67668
68079
|
createServerMiddleware,
|
|
67669
68080
|
createServerOnlyFn,
|
|
67670
68081
|
createServerQuery,
|