@farm.js/core 0.1.75 → 0.1.76
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-mcp.d-Djvao5eV.d.ts → agent-mcp.d-Cftp2kFv.d.ts} +1 -1
- package/dist/{agent-mcp.d-wA13pwmS.d.mts → agent-mcp.d-D0FMmqi0.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +7 -5
- package/dist/agent-runtime.d.ts +7 -5
- package/dist/agent-runtime.mjs +1 -1
- package/dist/analyzer-KFJGYJS7.cjs +16 -0
- package/dist/{analyzer-LJHMFCDW.mjs → analyzer-NLQKPN74.mjs} +2 -2
- package/dist/api/node.d.mts +9 -7
- package/dist/api/node.d.ts +9 -7
- package/dist/api/route-manager.d.mts +9 -7
- package/dist/api/route-manager.d.ts +9 -7
- package/dist/api/runtime.d.mts +8 -6
- package/dist/api/runtime.d.ts +8 -6
- package/dist/api.d.mts +10 -8
- package/dist/api.d.ts +10 -8
- package/dist/{app-manifest.d-BukcP_EV.d.ts → app-manifest.d-7PmA_9hm.d.ts} +1 -1
- package/dist/{app-manifest.d-DIuqSi9k.d.mts → app-manifest.d-cpOw_sV5.d.mts} +1 -1
- package/dist/app-markdown.d.mts +8 -6
- package/dist/app-markdown.d.ts +8 -6
- package/dist/{app.d-YVuFb10p.d.mts → app.d-DUZvwnFF.d.mts} +5 -4
- package/dist/{app.d-BQqmM6Gy.d.ts → app.d-wOkxXre8.d.ts} +5 -4
- package/dist/{chunk-A5F55ZFA.mjs → chunk-2GZZVIXY.mjs} +1 -1
- package/dist/{chunk-4BS3HSY7.cjs → chunk-2JEXQAIR.cjs} +2 -2
- package/dist/{chunk-OZARLCYQ.cjs → chunk-2WKGQCAV.cjs} +162 -162
- package/dist/{chunk-B4CWYGCG.mjs → chunk-3OYFMOBY.mjs} +1 -1
- package/dist/{chunk-GNY7BO7R.mjs → chunk-5EEQNZLU.mjs} +2 -2
- package/dist/{chunk-XGDI4OUB.cjs → chunk-6ZFGWB75.cjs} +13 -1
- package/dist/{chunk-6MATGOEF.mjs → chunk-A2VFKOQL.mjs} +1 -1
- package/dist/{chunk-YL7BKHYE.cjs → chunk-BBRSPKFI.cjs} +277 -265
- package/dist/{chunk-BNTRXJL4.cjs → chunk-BYJPBJ4E.cjs} +3 -3
- package/dist/{chunk-4ZSZI6XL.cjs → chunk-CCQZDOQR.cjs} +8 -8
- package/dist/{chunk-OFIFRB62.mjs → chunk-CKBBKRBO.mjs} +34 -18
- package/dist/{chunk-IK33N2AN.cjs → chunk-DTNWLRRF.cjs} +144 -128
- package/dist/{chunk-BUC3FDYC.cjs → chunk-DVW6SKHA.cjs} +2 -2
- package/dist/{chunk-MFU7SXAB.mjs → chunk-E77ZKNPN.mjs} +1 -1
- package/dist/{chunk-YCNKS6SD.mjs → chunk-GP5BWTO7.mjs} +2 -2
- package/dist/{chunk-HT2SZKXG.mjs → chunk-H76C5AOU.mjs} +12 -0
- package/dist/{chunk-ZV76IQG7.cjs → chunk-HKGU2X4I.cjs} +2 -2
- package/dist/{chunk-4T2RB4JA.mjs → chunk-JL6XHQZF.mjs} +3 -3
- package/dist/{chunk-HV2WZFUW.mjs → chunk-MOS2N377.mjs} +1 -1
- package/dist/{chunk-IDOUCM2X.mjs → chunk-O225GNEU.mjs} +53 -41
- package/dist/{chunk-NPGXX7HN.cjs → chunk-PSNYVBWC.cjs} +3 -3
- package/dist/{chunk-WHCNJVYU.cjs → chunk-PXXG5BID.cjs} +3 -3
- package/dist/{chunk-TJVUTGED.mjs → chunk-Q4X3MX4J.mjs} +201 -3
- package/dist/{chunk-TFEODQLG.mjs → chunk-Q7JMHO5U.mjs} +2 -2
- package/dist/{chunk-JNZDTE75.cjs → chunk-QP4GYVRR.cjs} +6 -6
- package/dist/{chunk-HVJ7IACB.cjs → chunk-QTDIOZV6.cjs} +2 -2
- package/dist/{chunk-YSTKSZD2.mjs → chunk-SGQXJVFX.mjs} +1 -1
- package/dist/{chunk-KPYQ32BA.cjs → chunk-TMVVBK5S.cjs} +2 -2
- package/dist/{chunk-JMYXO572.cjs → chunk-UBXNTZCY.cjs} +205 -7
- package/dist/{chunk-2NQ3S2SJ.mjs → chunk-VDJ3CLBR.mjs} +1 -1
- package/dist/{chunk-WJ5CCQBM.cjs → chunk-WILPJVQE.cjs} +4 -4
- package/dist/{chunk-PBQGIA27.cjs → chunk-WJDMH3E7.cjs} +4 -4
- package/dist/{chunk-ZPCZWEU3.cjs → chunk-WMJQNVKX.cjs} +2 -2
- package/dist/{chunk-H7QY7ZE4.mjs → chunk-X3HUT4JU.mjs} +1 -1
- package/dist/{chunk-IVBDRAOR.cjs → chunk-XLOORES5.cjs} +1 -1
- package/dist/{chunk-QGYHE6VJ.mjs → chunk-YHE7HH2I.mjs} +19 -19
- package/dist/{chunk-4MU4QCX4.mjs → chunk-YONTMPZ6.mjs} +1 -1
- package/dist/{chunk-GLF44JKY.mjs → chunk-YQXJY7E7.mjs} +1 -1
- package/dist/cli-runtime.d-D84CwyPI.d.ts +535 -0
- package/dist/cli-runtime.d-OQY2pgwK.d.mts +535 -0
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-CZ1NpHAY.d.ts → client-component.d-Bf8jZqW7.d.ts} +2 -137
- package/dist/{client-component.d-BeqVuqy2.d.mts → client-component.d-Bh6CfC5z.d.mts} +2 -137
- package/dist/{client-plugins.d-D9kWC0QB.d.ts → client-plugins.d-DuujrC8d.d.ts} +4 -4
- package/dist/{client-plugins.d-ChceYO9t.d.mts → client-plugins.d-r3K2oQ6w.d.mts} +4 -4
- package/dist/client-plugins.d.mts +7 -5
- package/dist/client-plugins.d.ts +7 -5
- package/dist/client.d.mts +12 -10
- package/dist/client.d.ts +12 -10
- package/dist/config.d.mts +7 -5
- package/dist/config.d.ts +7 -5
- package/dist/desktop.d.mts +8 -6
- package/dist/desktop.d.ts +8 -6
- package/dist/{devtools-T5I2WHRX.cjs → devtools-3WZIZ7KK.cjs} +3 -3
- package/dist/{devtools-B3W3DLPG.mjs → devtools-MBZPUH3U.mjs} +2 -2
- package/dist/docs.cjs +4 -4
- package/dist/docs.d.mts +10 -65
- package/dist/docs.d.ts +10 -65
- package/dist/docs.mjs +3 -3
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/handler.d-Bd5lRSvb.d.ts +62 -0
- package/dist/handler.d-SRH-AKzf.d.mts +62 -0
- package/dist/{headers.d-BawakaPv.d.mts → headers.d-CHHvyaIG.d.mts} +1 -1
- package/dist/{headers.d-Aux4JVnm.d.ts → headers.d-D-OvGikv.d.ts} +1 -1
- package/dist/index.cjs +22 -20
- package/dist/index.d-BOPsgMlI.d.mts +16 -0
- package/dist/index.d-BiUtYJUG.d.ts +16 -0
- package/dist/index.d.mts +39 -556
- package/dist/index.d.ts +39 -556
- package/dist/index.mjs +21 -19
- package/dist/integrations/orm.cjs +3 -3
- package/dist/integrations/orm.d.mts +6 -4
- package/dist/integrations/orm.d.ts +6 -4
- package/dist/integrations/orm.mjs +2 -2
- package/dist/integrations.cjs +2 -2
- package/dist/integrations.d.mts +7 -5
- package/dist/integrations.d.ts +7 -5
- package/dist/integrations.mjs +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +8 -6
- package/dist/internal/app-markdown-runtime.d.ts +8 -6
- package/dist/internal/build-runtime.cjs +19 -19
- package/dist/internal/build-runtime.d.mts +10 -7
- package/dist/internal/build-runtime.d.ts +10 -7
- package/dist/internal/build-runtime.mjs +18 -18
- package/dist/internal/cli-runtime.cjs +11 -6
- package/dist/internal/cli-runtime.d.mts +45 -0
- package/dist/internal/cli-runtime.d.ts +45 -0
- package/dist/internal/cli-runtime.mjs +10 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +11 -9
- package/dist/internal/client-runtime.d.ts +11 -9
- package/dist/internal/compression-runtime.d.mts +7 -5
- package/dist/internal/compression-runtime.d.ts +7 -5
- package/dist/internal/config-runtime.cjs +4 -4
- package/dist/internal/config-runtime.d.mts +9 -7
- package/dist/internal/config-runtime.d.ts +9 -7
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +7 -7
- package/dist/internal/production-runtime.d.mts +16 -14
- package/dist/internal/production-runtime.d.ts +16 -14
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/internal/start-manifest.d.mts +7 -5
- package/dist/internal/start-manifest.d.ts +7 -5
- package/dist/{lifecycle.d-OtGWAvJT.d.mts → lifecycle.d-VzcXyEyn.d.mts} +1 -1
- package/dist/{lifecycle.d-OtGWAvJT.d.ts → lifecycle.d-VzcXyEyn.d.ts} +1 -1
- package/dist/markdown.d.mts +7 -5
- package/dist/markdown.d.ts +7 -5
- package/dist/middleware.d.mts +7 -5
- package/dist/middleware.d.ts +7 -5
- package/dist/{mount.d-Ca8eb9GB.d.ts → mount.d-C2yq0Zzz.d.ts} +1 -1
- package/dist/{mount.d-BomEt2kV.d.mts → mount.d-vq1HTq5u.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DJCC2jXF.d.ts → navigation-delegate.d-D7xIin3i.d.ts} +1 -1
- package/dist/{navigation-delegate.d-B1ujRkYo.d.mts → navigation-delegate.d-DS2Sqm7E.d.mts} +1 -1
- package/dist/navigation.d.mts +10 -8
- package/dist/navigation.d.ts +10 -8
- package/dist/{plugin-FD4S2QEJ.mjs → plugin-6CHZBFJD.mjs} +1 -1
- package/dist/{plugin-5BNPYCER.cjs → plugin-YXPIS3XX.cjs} +2 -2
- package/dist/plugin.cjs +12 -12
- package/dist/plugin.d.mts +11 -8
- package/dist/plugin.d.ts +11 -8
- package/dist/plugin.mjs +11 -11
- package/dist/{render-plan.d-BxRbaxYA.d.ts → render-plan.d-BCq0nfdw.d.ts} +1 -1
- package/dist/{render-plan.d-CFod_Zf-.d.mts → render-plan.d-X6KqerAM.d.mts} +1 -1
- package/dist/renderer-client.d.mts +10 -8
- package/dist/renderer-client.d.ts +10 -8
- package/dist/{request.d-DG4TeXMM.d.mts → request.d-Be9rWboC.d.mts} +1 -1
- package/dist/{request.d-DRQgaXGG.d.ts → request.d-CPdq2_kC.d.ts} +1 -1
- package/dist/request.d.mts +8 -6
- package/dist/request.d.ts +8 -6
- package/dist/{route-rendering.d-BXtZKgqu.d.mts → route-rendering.d-CIPli7Ve.d.mts} +1 -1
- package/dist/{route-rendering.d-Db07UNVG.d.ts → route-rendering.d-CKB5GhQr.d.ts} +1 -1
- package/dist/{router.d-BC3hyjf0.d.ts → router.d-CvrbOXzF.d.ts} +1 -1
- package/dist/{router.d-B61kXqxJ.d.mts → router.d-VxTgLGxN.d.mts} +1 -1
- package/dist/routes.d.mts +7 -5
- package/dist/routes.d.ts +7 -5
- package/dist/{rsc-pipeline-LJ7YCGY6.mjs → rsc-pipeline-FPE4OL57.mjs} +4 -4
- package/dist/{rsc-pipeline-VENBFYXW.cjs → rsc-pipeline-TPHK74VE.cjs} +5 -5
- package/dist/{runtime-4DWUXZHS.mjs → runtime-45BD33OJ.mjs} +3 -3
- package/dist/{runtime-UNDTYGQS.cjs → runtime-UBG657UC.cjs} +5 -5
- package/dist/{runtime.d-Cl6EBGmC.d.mts → runtime.d-Cn1jiDNI.d.mts} +1 -1
- package/dist/{runtime.d-SC95yDzr.d.ts → runtime.d-Ps54JWpo.d.ts} +1 -1
- package/dist/{schema.d-Dny9pnrm.d.mts → schema.d-BM-uVGpx.d.mts} +1 -1
- package/dist/{schema.d-Dny9pnrm.d.ts → schema.d-BM-uVGpx.d.ts} +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/{index.d-r1MLpgeE.d.ts → server-components-status.d-Dhtbs5lC.d.ts} +2 -15
- package/dist/{index.d-Ccq42CPU.d.mts → server-components-status.d-DnmipSb3.d.mts} +2 -15
- package/dist/server-plugins.d.mts +9 -7
- package/dist/server-plugins.d.ts +9 -7
- package/dist/server.cjs +37 -35
- package/dist/server.d.mts +17 -14
- package/dist/server.d.ts +17 -14
- package/dist/server.mjs +16 -14
- package/dist/session-ACVUJ5XV.cjs +23 -0
- package/dist/{session-QZXZOPR2.mjs → session-ASQTJNBK.mjs} +2 -2
- package/dist/{spa-router.d-DrlXgDqY.d.mts → spa-router.d-DXm5J9rM.d.mts} +4 -4
- package/dist/{spa-router.d-DwM02Mwd.d.ts → spa-router.d-cppVufl2.d.ts} +4 -4
- package/dist/ssg.d-CI5OFl8H.d.ts +138 -0
- package/dist/ssg.d-Duzy1wQc.d.mts +138 -0
- package/dist/storage.cjs +4 -2
- package/dist/storage.d.mts +14 -4
- package/dist/storage.d.ts +14 -4
- package/dist/storage.mjs +3 -1
- package/dist/testing.d.mts +7 -5
- package/dist/testing.d.ts +7 -5
- package/dist/{types.d-BnIqOn9w.d.mts → types.d-D5cY6XjK.d.mts} +43 -2
- package/dist/{types.d-BnIqOn9w.d.ts → types.d-D5cY6XjK.d.ts} +43 -2
- package/dist/{utils.d-CHzxAshz.d.mts → utils.d-CNI-I8ZV.d.mts} +1 -1
- package/dist/{utils.d-C6KXz3uB.d.ts → utils.d-D3dfy8zh.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +12 -12
- package/dist/vite.d.mts +12 -9
- package/dist/vite.d.ts +12 -9
- package/dist/vite.mjs +11 -11
- package/package.json +10 -3
- package/dist/analyzer-23GCBYFI.cjs +0 -16
- package/dist/session-2Q72D4QV.cjs +0 -23
- /package/dist/{chunk-PMU4U2W2.cjs → chunk-22T75EML.cjs} +0 -0
- /package/dist/{chunk-5O3SK3ZC.mjs → chunk-6MNDFNZW.mjs} +0 -0
- /package/dist/{chunk-Z5ZZAGIH.mjs → chunk-LSHUCNIF.mjs} +0 -0
- /package/dist/{chunk-6DBBMQWT.cjs → chunk-OWO7KDZ3.cjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIntegrationOrmRuntimeClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YONTMPZ6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
collectSchemaModels,
|
|
6
6
|
columnTypeFamily,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-UTUS6JUH.mjs";
|
|
26
26
|
import {
|
|
27
27
|
getIntegrationSchemas
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6MNDFNZW.mjs";
|
|
29
29
|
import {
|
|
30
30
|
resolveSchemaModels
|
|
31
31
|
} from "./chunk-F3N52U7S.mjs";
|
|
@@ -21,7 +21,7 @@ var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
|
21
21
|
var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkXLOORES5cjs = require('./chunk-XLOORES5.cjs');
|
|
25
25
|
|
|
26
26
|
// src/environment-vite.ts
|
|
27
27
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -878,7 +878,7 @@ function usePackageScanCacheFile(file) {
|
|
|
878
878
|
const stored = /* @__PURE__ */ new Map();
|
|
879
879
|
try {
|
|
880
880
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
881
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
881
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkXLOORES5cjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
882
882
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
883
883
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
884
884
|
}
|
|
@@ -907,7 +907,7 @@ function persistPackageScanCache() {
|
|
|
907
907
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
908
908
|
_fs2.default.writeFileSync(
|
|
909
909
|
temporary,
|
|
910
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
910
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkXLOORES5cjs.FARM_VERSION, scans })
|
|
911
911
|
);
|
|
912
912
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
913
913
|
cache2.dirty = false;
|
|
@@ -2207,7 +2207,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
const contents = JSON.stringify({
|
|
2209
2209
|
schema: SCHEMA_VERSION,
|
|
2210
|
-
farm:
|
|
2210
|
+
farm: _chunkXLOORES5cjs.FARM_VERSION,
|
|
2211
2211
|
paths,
|
|
2212
2212
|
entries
|
|
2213
2213
|
});
|
|
@@ -2247,7 +2247,7 @@ function readStoredCache(file) {
|
|
|
2247
2247
|
} catch (e37) {
|
|
2248
2248
|
return null;
|
|
2249
2249
|
}
|
|
2250
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2250
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkXLOORES5cjs.FARM_VERSION) {
|
|
2251
2251
|
return null;
|
|
2252
2252
|
}
|
|
2253
2253
|
const { paths, entries } = value;
|
|
@@ -2258,7 +2258,7 @@ function readStoredCache(file) {
|
|
|
2258
2258
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2259
2259
|
if (usable.length > 0) valid[key] = usable;
|
|
2260
2260
|
}
|
|
2261
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2261
|
+
return { schema: SCHEMA_VERSION, farm: _chunkXLOORES5cjs.FARM_VERSION, paths, entries: valid };
|
|
2262
2262
|
}
|
|
2263
2263
|
function isRecord(value) {
|
|
2264
2264
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkOWO7KDZ3cjs = require('./chunk-OWO7KDZ3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -284,7 +284,7 @@ function isArrayIndex(key) {
|
|
|
284
284
|
// src/plugin-server-runtime.ts
|
|
285
285
|
function hasFarmServerRuntimePlugins(plugins) {
|
|
286
286
|
return (plugins || []).some((plugin) => {
|
|
287
|
-
if (
|
|
287
|
+
if (_chunkOWO7KDZ3cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
288
288
|
return Boolean(
|
|
289
289
|
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
290
290
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXLOORES5cjs = require('./chunk-XLOORES5.cjs');
|
|
4
4
|
|
|
5
5
|
// src/deployment-environment.ts
|
|
6
6
|
function isFarmProductionDeploymentEnvironment(env = process.env) {
|
|
@@ -90,7 +90,7 @@ function createFarmProductionSiteReporter(options) {
|
|
|
90
90
|
schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
|
|
91
91
|
eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
|
|
92
92
|
packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
|
|
93
|
-
packageVersion: sanitizeDetail(
|
|
93
|
+
packageVersion: sanitizeDetail(_chunkXLOORES5cjs.FARM_VERSION, "unknown"),
|
|
94
94
|
renderer: sanitizeDetail(options.renderer, "custom"),
|
|
95
95
|
deployTarget: sanitizeDetail(options.deployTarget, "custom")
|
|
96
96
|
};
|
|
@@ -1,4 +1,173 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/storage/
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/storage/managed-sqlite.ts
|
|
2
|
+
function managedSqliteName(mount, managed) {
|
|
3
|
+
const name = managed === true ? mount : managed && typeof managed === "object" && "name" in managed ? managed.name : void 0;
|
|
4
|
+
if (typeof name !== "string" || !/^[a-z][a-z0-9-]{0,62}$/.test(name))
|
|
5
|
+
throw new TypeError(
|
|
6
|
+
"Use a managed SQLite name of 1\u201363 lowercase letters, digits, or hyphens starting with a letter."
|
|
7
|
+
);
|
|
8
|
+
return name;
|
|
9
|
+
}
|
|
10
|
+
function secureUrl(value) {
|
|
11
|
+
const url = new URL(value);
|
|
12
|
+
const local = url.hostname === "localhost" || url.hostname.endsWith(".localhost") || url.hostname === "127.0.0.1" || url.hostname === "[::1]";
|
|
13
|
+
if (!(url.protocol === "https:" || local && url.protocol === "http:") || url.username || url.password || url.search || url.hash)
|
|
14
|
+
throw new Error("Use HTTPS or a loopback URL for Farm managed SQLite.");
|
|
15
|
+
return url;
|
|
16
|
+
}
|
|
17
|
+
async function requestSqliteResource(name, operation) {
|
|
18
|
+
const key = process.env.FARMJS_API_KEY;
|
|
19
|
+
if (!key) throw new Error("Set FARMJS_API_KEY on the server to access managed SQLite.");
|
|
20
|
+
const base = secureUrl(process.env.FARMJS_API_URL || "https://app.farmjs.dev");
|
|
21
|
+
const headers = new Headers({
|
|
22
|
+
authorization: "Bearer " + key,
|
|
23
|
+
"content-type": "application/json"
|
|
24
|
+
});
|
|
25
|
+
if (process.env.FARMJS_PROJECT_ID) headers.set("x-farm-project", process.env.FARMJS_PROJECT_ID);
|
|
26
|
+
const environment = process.env.FARMJS_ENVIRONMENT;
|
|
27
|
+
if (environment)
|
|
28
|
+
headers.set("x-farm-environment", environment === "preview" ? "staging" : environment);
|
|
29
|
+
const response = await fetch(new URL("/api/storage/sqlite/" + operation, base), {
|
|
30
|
+
method: operation === "token" ? "POST" : "PUT",
|
|
31
|
+
headers,
|
|
32
|
+
body: JSON.stringify({ name }),
|
|
33
|
+
redirect: "error",
|
|
34
|
+
signal: AbortSignal.timeout(15e3)
|
|
35
|
+
});
|
|
36
|
+
const result = await response.json();
|
|
37
|
+
if (!response.ok)
|
|
38
|
+
throw new Error(
|
|
39
|
+
typeof _optionalChain([result, 'optionalAccess', _ => _.message]) === "string" ? result.message : "Farm SQLite request failed (HTTP " + response.status + ")."
|
|
40
|
+
);
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
async function credential(name) {
|
|
44
|
+
const result = await requestSqliteResource(name, "token");
|
|
45
|
+
if (!result || typeof result.url !== "string" || typeof result.token !== "string" || !result.token || !Number.isFinite(Date.parse(result.expiresAt)) || Date.parse(result.expiresAt) <= Date.now())
|
|
46
|
+
throw new Error("Farm returned an invalid SQLite credential. Check the Infra service.");
|
|
47
|
+
return {
|
|
48
|
+
url: secureUrl(result.url).href,
|
|
49
|
+
token: result.token,
|
|
50
|
+
expires: Date.parse(result.expiresAt)
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async function connect(name, loadClient) {
|
|
54
|
+
const [{ createClient }, initial] = await Promise.all([loadClient(), credential(name)]);
|
|
55
|
+
let current = initial;
|
|
56
|
+
let refreshing;
|
|
57
|
+
return createClient({
|
|
58
|
+
url: current.url,
|
|
59
|
+
fetch: async (request) => {
|
|
60
|
+
if (new URL(request.url).origin !== new URL(initial.url).origin)
|
|
61
|
+
throw new Error("The database endpoint changed. Reconnect the managed SQLite mount.");
|
|
62
|
+
if (current.expires - Date.now() < 3e4) {
|
|
63
|
+
_nullishCoalesce(refreshing, () => ( (refreshing = credential(name).finally(() => {
|
|
64
|
+
refreshing = void 0;
|
|
65
|
+
}))));
|
|
66
|
+
const renewed = await refreshing;
|
|
67
|
+
if (renewed.url !== initial.url)
|
|
68
|
+
throw new Error("The SQLite resource changed. Reconnect the mount.");
|
|
69
|
+
current = renewed;
|
|
70
|
+
}
|
|
71
|
+
const headers = new Headers(request.headers);
|
|
72
|
+
headers.set("authorization", "Bearer " + current.token);
|
|
73
|
+
return fetch(request, { headers, redirect: "error" });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
var databaseAccessor = /* @__PURE__ */ Symbol.for("farmjs.storage.managedDatabase");
|
|
78
|
+
function managedSqliteDriver(name, loadClient) {
|
|
79
|
+
let pending;
|
|
80
|
+
let initialized;
|
|
81
|
+
let closed = false;
|
|
82
|
+
function client() {
|
|
83
|
+
if (closed) throw new Error("The managed SQLite mount has been disposed.");
|
|
84
|
+
return _nullishCoalesce(pending, () => ( (pending = connect(name, loadClient).catch((error) => {
|
|
85
|
+
pending = void 0;
|
|
86
|
+
throw error;
|
|
87
|
+
}))));
|
|
88
|
+
}
|
|
89
|
+
function kv() {
|
|
90
|
+
return _nullishCoalesce(initialized, () => ( (initialized = client().then(async (db) => {
|
|
91
|
+
await db.execute(
|
|
92
|
+
"CREATE TABLE IF NOT EXISTS _farm_kv (key TEXT PRIMARY KEY, value TEXT NOT NULL)"
|
|
93
|
+
);
|
|
94
|
+
return db;
|
|
95
|
+
}).catch((error) => {
|
|
96
|
+
initialized = void 0;
|
|
97
|
+
throw error;
|
|
98
|
+
}))));
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
name: "farm-managed-sqlite",
|
|
102
|
+
[databaseAccessor]: client,
|
|
103
|
+
async hasItem(key) {
|
|
104
|
+
return (await (await kv()).execute({ sql: "SELECT 1 FROM _farm_kv WHERE key=?", args: [key] })).rows.length > 0;
|
|
105
|
+
},
|
|
106
|
+
async getItem(key) {
|
|
107
|
+
const { rows } = await (await kv()).execute({ sql: "SELECT value FROM _farm_kv WHERE key=?", args: [key] });
|
|
108
|
+
return _nullishCoalesce(_optionalChain([rows, 'access', _2 => _2[0], 'optionalAccess', _3 => _3.value]), () => ( null));
|
|
109
|
+
},
|
|
110
|
+
async getKeys(base = "") {
|
|
111
|
+
const { rows } = await (await kv()).execute({
|
|
112
|
+
sql: "SELECT key FROM _farm_kv WHERE instr(key,?)=1 ORDER BY key",
|
|
113
|
+
args: [base]
|
|
114
|
+
});
|
|
115
|
+
return rows.map((row) => String(row.key));
|
|
116
|
+
},
|
|
117
|
+
async setItem(key, value) {
|
|
118
|
+
await (await kv()).execute({
|
|
119
|
+
sql: "INSERT INTO _farm_kv(key,value) VALUES (?,?) ON CONFLICT(key) DO UPDATE SET value=excluded.value",
|
|
120
|
+
args: [key, value]
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
async removeItem(key) {
|
|
124
|
+
await (await kv()).execute({ sql: "DELETE FROM _farm_kv WHERE key=?", args: [key] });
|
|
125
|
+
},
|
|
126
|
+
async clear(base = "") {
|
|
127
|
+
await (await kv()).execute({ sql: "DELETE FROM _farm_kv WHERE instr(key,?)=1", args: [base] });
|
|
128
|
+
},
|
|
129
|
+
async dispose() {
|
|
130
|
+
closed = true;
|
|
131
|
+
await _asyncOptionalChain([(await pending), 'optionalAccess', async _4 => _4.close, 'call', async _5 => _5()]);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function sqlAdapter(client, tx) {
|
|
136
|
+
return {
|
|
137
|
+
dialect: "sqlite",
|
|
138
|
+
async query(sql, params) {
|
|
139
|
+
const result = await (_nullishCoalesce(tx, () => ( client))).execute({ sql, args: params });
|
|
140
|
+
return {
|
|
141
|
+
rows: result.rows,
|
|
142
|
+
affectedRows: result.rowsAffected,
|
|
143
|
+
insertId: result.lastInsertRowid
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
async transaction(run) {
|
|
147
|
+
if (tx) throw new Error("Nested managed SQLite transactions are unsupported.");
|
|
148
|
+
const transaction = await client.transaction("write");
|
|
149
|
+
try {
|
|
150
|
+
const value = await run(sqlAdapter(client, transaction));
|
|
151
|
+
await transaction.commit();
|
|
152
|
+
return value;
|
|
153
|
+
} catch (error) {
|
|
154
|
+
if (!transaction.closed) await transaction.rollback();
|
|
155
|
+
throw error;
|
|
156
|
+
} finally {
|
|
157
|
+
transaction.close();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
async function managedOrm(client, schema) {
|
|
163
|
+
const [{ createOrm }, { createSqlDriverFromAdapter }] = await Promise.all([
|
|
164
|
+
import("@farming-labs/orm"),
|
|
165
|
+
import("@farming-labs/orm-sql")
|
|
166
|
+
]);
|
|
167
|
+
return createOrm({ schema, driver: createSqlDriverFromAdapter(sqlAdapter(client)) });
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// src/storage/index.ts
|
|
2
171
|
var _unstorage = require('unstorage');
|
|
3
172
|
var _memory = require('unstorage/drivers/memory'); var _memory2 = _interopRequireDefault(_memory);
|
|
4
173
|
var STORAGE_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.modules");
|
|
@@ -6,7 +175,7 @@ function getRegisteredStorageModules() {
|
|
|
6
175
|
return globalThis[STORAGE_MODULES_KEY];
|
|
7
176
|
}
|
|
8
177
|
var loadModule = (specifier) => {
|
|
9
|
-
const registered = _optionalChain([getRegisteredStorageModules, 'call',
|
|
178
|
+
const registered = _optionalChain([getRegisteredStorageModules, 'call', _6 => _6(), 'optionalAccess', _7 => _7[specifier]]);
|
|
10
179
|
return registered ? registered() : import(
|
|
11
180
|
/* @vite-ignore */
|
|
12
181
|
specifier
|
|
@@ -159,11 +328,18 @@ async function loadDatabaseDriver(config) {
|
|
|
159
328
|
}
|
|
160
329
|
};
|
|
161
330
|
}
|
|
162
|
-
async function resolveDriver(config) {
|
|
331
|
+
async function resolveDriver(config, mount) {
|
|
163
332
|
if (config && isStorageClient(config)) {
|
|
164
333
|
return config.resolveDriver();
|
|
165
334
|
}
|
|
166
|
-
|
|
335
|
+
if (_optionalChain([config, 'optionalAccess', _8 => _8.driver]) === "farm-managed-sqlite") {
|
|
336
|
+
if (!mount) throw new TypeError("Register managed SQLite in storage.mounts.");
|
|
337
|
+
return managedSqliteDriver(
|
|
338
|
+
managedSqliteName(mount, config.managed),
|
|
339
|
+
() => loadModule("@libsql/client/http")
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _9 => _9.driver]), () => ( "memory"));
|
|
167
343
|
if (typeof driverInput === "function") {
|
|
168
344
|
return await driverInput();
|
|
169
345
|
}
|
|
@@ -274,6 +450,12 @@ function localStorage(options = {}) {
|
|
|
274
450
|
});
|
|
275
451
|
}
|
|
276
452
|
function sqliteStorage(options) {
|
|
453
|
+
if ("managed" in options) {
|
|
454
|
+
if (Object.keys(options).some((key) => key !== "managed"))
|
|
455
|
+
throw new TypeError("Supply only managed when Farm provisions SQLite.");
|
|
456
|
+
if (options.managed !== true) managedSqliteName("", options.managed);
|
|
457
|
+
return { driver: "farm-managed-sqlite", managed: options.managed };
|
|
458
|
+
}
|
|
277
459
|
return createStorageClient({
|
|
278
460
|
driver: "sqlite",
|
|
279
461
|
...options
|
|
@@ -368,7 +550,9 @@ function collectDriverModules(config, modules) {
|
|
|
368
550
|
const source = config;
|
|
369
551
|
const driver = source.driver;
|
|
370
552
|
if (typeof driver === "string") {
|
|
371
|
-
if (
|
|
553
|
+
if (driver === "farm-managed-sqlite") {
|
|
554
|
+
modules.add("@libsql/client/http");
|
|
555
|
+
} else if (isDatabaseDriverName(driver)) {
|
|
372
556
|
modules.add("db0");
|
|
373
557
|
modules.add(DATABASE_CONNECTORS[driver].module);
|
|
374
558
|
modules.add("unstorage/drivers/db0");
|
|
@@ -392,7 +576,7 @@ async function mountNamespaces(storage, mounts) {
|
|
|
392
576
|
return;
|
|
393
577
|
}
|
|
394
578
|
for (const [base, config] of Object.entries(mounts)) {
|
|
395
|
-
storage.mount(normalizeMountKey(base), await resolveDriver(config));
|
|
579
|
+
storage.mount(normalizeMountKey(base), await resolveDriver(config, base));
|
|
396
580
|
}
|
|
397
581
|
}
|
|
398
582
|
async function createFarmStorage(config = {}) {
|
|
@@ -436,6 +620,17 @@ async function initStorage(config = {}) {
|
|
|
436
620
|
}
|
|
437
621
|
return globalStorage;
|
|
438
622
|
}
|
|
623
|
+
async function getDatabase(name, options) {
|
|
624
|
+
const key = normalizeMountKey(name);
|
|
625
|
+
const mount = getActiveGlobalStorage().getMount(key);
|
|
626
|
+
const driver = mount.driver;
|
|
627
|
+
if (!key || normalizeMountKey(mount.base) !== key || !driver[databaseAccessor])
|
|
628
|
+
throw new TypeError(
|
|
629
|
+
"Configure a managed SQLite mount named " + JSON.stringify(name) + " before calling getDatabase()."
|
|
630
|
+
);
|
|
631
|
+
const client = await driver[databaseAccessor]();
|
|
632
|
+
return options ? managedOrm(client, options.schema) : client;
|
|
633
|
+
}
|
|
439
634
|
function getStorage(namespace) {
|
|
440
635
|
globalStorage = getActiveGlobalStorage();
|
|
441
636
|
const base = normalizeMountKey(namespace);
|
|
@@ -528,4 +723,7 @@ async function disposeStorage() {
|
|
|
528
723
|
|
|
529
724
|
|
|
530
725
|
|
|
531
|
-
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
exports.managedSqliteName = managedSqliteName; exports.requestSqliteResource = requestSqliteResource; exports._registerFarmStorageModules = _registerFarmStorageModules; exports.defineStorageClient = defineStorageClient; exports.createStorageClient = createStorageClient; exports.driverStorage = driverStorage; exports.databaseStorage = databaseStorage; exports.memoryStorage = memoryStorage; exports.localStorage = localStorage; exports.sqliteStorage = sqliteStorage; exports.mysqlStorage = mysqlStorage; exports.mysql2Storage = mysql2Storage; exports.postgresStorage = postgresStorage; exports.pgStorage = pgStorage; exports.pgliteStorage = pgliteStorage; exports.planetscaleStorage = planetscaleStorage; exports.libsqlStorage = libsqlStorage; exports.redisStorage = redisStorage; exports.s3Storage = s3Storage; exports.mongodbStorage = mongodbStorage; exports.upstashStorage = upstashStorage; exports.netlifyBlobsStorage = netlifyBlobsStorage; exports.vercelKVStorage = vercelKVStorage; exports.vercelBlobStorage = vercelBlobStorage; exports._collectFarmStorageModules = _collectFarmStorageModules; exports.createFarmStorage = createFarmStorage; exports.resolveStorageRuntimeClient = resolveStorageRuntimeClient; exports.initStorage = initStorage; exports.getDatabase = getDatabase; exports.getStorage = getStorage; exports.disposeStorage = disposeStorage;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkTMVVBK5Scjs = require('./chunk-TMVVBK5S.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
29
29
|
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkXLOORES5cjs = require('./chunk-XLOORES5.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -288,7 +288,7 @@ function createFarmAppManifest(input, registered = []) {
|
|
|
288
288
|
return {
|
|
289
289
|
schemaVersion: 1,
|
|
290
290
|
app: app ? {
|
|
291
|
-
...app.version ? { farm:
|
|
291
|
+
...app.version ? { farm: _chunkXLOORES5cjs.FARM_VERSION } : {},
|
|
292
292
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
293
293
|
basePath: input.basePath,
|
|
294
294
|
...app.build ? { build: input.build } : {}
|
|
@@ -319,7 +319,7 @@ function resolveFarmSiteUrl() {
|
|
|
319
319
|
asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
|
|
320
320
|
];
|
|
321
321
|
for (const candidate of candidates) {
|
|
322
|
-
const origin = candidate ?
|
|
322
|
+
const origin = candidate ? _chunkTMVVBK5Scjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
|
|
323
323
|
if (origin) return origin;
|
|
324
324
|
}
|
|
325
325
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDVW6SKHAcjs = require('./chunk-DVW6SKHA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ var _chunkGDM3ZD2Ocjs = require('./chunk-GDM3ZD2O.cjs');
|
|
|
25
25
|
var _chunk2LHZD3OPcjs = require('./chunk-2LHZD3OP.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkOWO7KDZ3cjs = require('./chunk-OWO7KDZ3.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -117,14 +117,14 @@ async function withTimeout(work, timeoutMs) {
|
|
|
117
117
|
var formatSeconds = (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`;
|
|
118
118
|
function collectSchemaOwners(config) {
|
|
119
119
|
const owners = [];
|
|
120
|
-
const integrationSchemas =
|
|
120
|
+
const integrationSchemas = _chunkOWO7KDZ3cjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
121
121
|
let integrationClient;
|
|
122
122
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
123
123
|
owners.push({
|
|
124
124
|
name,
|
|
125
125
|
kind: "integration",
|
|
126
126
|
schema,
|
|
127
|
-
resolveClient: (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient =
|
|
127
|
+
resolveClient: (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient = _chunkDVW6SKHAcjs.resolveIntegrationOrmRuntimeClient.call(void 0, { config: resolved }))))
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
for (const declaration of _chunkGDM3ZD2Ocjs.findSchemaTableOwners.call(void 0, config)) {
|
|
@@ -18,7 +18,7 @@ var _chunk6D3CJFNUcjs = require('./chunk-6D3CJFNU.cjs');
|
|
|
18
18
|
var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkPSNYVBWCcjs = require('./chunk-PSNYVBWC.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -593,7 +593,7 @@ async function resolveAPIContext(options) {
|
|
|
593
593
|
config: options.config,
|
|
594
594
|
configPath: options.configPath
|
|
595
595
|
}));
|
|
596
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
596
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkPSNYVBWCcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
597
597
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _28 => _28.guardedPaths]), () => ( [])));
|
|
598
598
|
return {
|
|
599
599
|
root,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
} from "./chunk-KQH2COEJ.mjs";
|
|
29
29
|
import {
|
|
30
30
|
FARM_MOBILE_SESSION_PLUGIN
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3OYFMOBY.mjs";
|
|
32
32
|
import {
|
|
33
33
|
collectFarmNativeServerFns,
|
|
34
34
|
findFarmNativeScreenFiles
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MOS2N377.mjs";
|
|
36
36
|
import {
|
|
37
37
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
38
38
|
compileFarmDocsAdapterEdgeManifest,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
hasFarmDocsRuntimeAdapter,
|
|
42
42
|
listFarmDocsAdapterPages,
|
|
43
43
|
listFarmDocsPagePaths
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-YQXJY7E7.mjs";
|
|
45
45
|
import {
|
|
46
46
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
47
47
|
createFarmDocsHandler,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
} from "./chunk-URQW27KO.mjs";
|
|
66
66
|
import {
|
|
67
67
|
FARM_PRERENDER_ENV
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-VDJ3CLBR.mjs";
|
|
69
69
|
import {
|
|
70
70
|
loadFarmDocsEngine
|
|
71
71
|
} from "./chunk-LRPPXKCX.mjs";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
getDeployTargetForPreset,
|
|
75
75
|
hasCustomFarmRouteContext,
|
|
76
76
|
resolveDeployOutputPath
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-GP5BWTO7.mjs";
|
|
78
78
|
import {
|
|
79
79
|
resolveFarmInstrumentationFile
|
|
80
80
|
} from "./chunk-57QAQU4F.mjs";
|
|
@@ -116,17 +116,17 @@ import {
|
|
|
116
116
|
resolveFarmNotFoundComponentPath,
|
|
117
117
|
resolveFarmRouteRootStrategy,
|
|
118
118
|
toBakedMarkdownSourcePath
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-CKBBKRBO.mjs";
|
|
120
120
|
import {
|
|
121
121
|
TAILWIND_CSS_BROWSER_TARGET,
|
|
122
122
|
generateFarmClientPluginEntryCode,
|
|
123
123
|
hasFarmServerRuntimePlugins,
|
|
124
124
|
includesTailwindVitePlugin,
|
|
125
125
|
loadTailwindVitePlugin
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-E77ZKNPN.mjs";
|
|
127
127
|
import {
|
|
128
128
|
PluginManager
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-LSHUCNIF.mjs";
|
|
130
130
|
import {
|
|
131
131
|
generateFarmTypeArtifacts,
|
|
132
132
|
readRouteRenderingDirectiveFromFile,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
layoutsCanCoverSamePage,
|
|
146
146
|
routeBoundaryCoversDirectory,
|
|
147
147
|
stripRouteGroups
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-H76C5AOU.mjs";
|
|
149
149
|
import {
|
|
150
150
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
151
151
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
listFarmBuiltInRoutePaths,
|
|
160
160
|
resolveFarmApiCatalogInput,
|
|
161
161
|
resolveFarmAppManifestInput
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-5EEQNZLU.mjs";
|
|
163
163
|
import {
|
|
164
164
|
FARM_DEFAULT_MCP_PATH,
|
|
165
165
|
createFarmDefaultMCPServer,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
} from "./chunk-JA6RML7C.mjs";
|
|
168
168
|
import {
|
|
169
169
|
isFarmPreviewDeploymentEnvironment
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-SGQXJVFX.mjs";
|
|
171
171
|
import {
|
|
172
172
|
FARM_NATIVE_SERVER_FN_PLUGIN
|
|
173
173
|
} from "./chunk-L4RTTTVE.mjs";
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
withFarmSourceSnapshot,
|
|
189
189
|
withFarmSourceSnapshotOf,
|
|
190
190
|
withPackageClientBoundaryCache
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-2GZZVIXY.mjs";
|
|
192
192
|
import {
|
|
193
193
|
generateFarmDocsAdapterClientRuntime,
|
|
194
194
|
getFarmDocsAdapterConfigModule
|
|
@@ -257,13 +257,13 @@ import {
|
|
|
257
257
|
import {
|
|
258
258
|
getFarmIntegrationPluginServerRuntime,
|
|
259
259
|
getIntegrationProviders
|
|
260
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-6MNDFNZW.mjs";
|
|
261
261
|
import {
|
|
262
262
|
FARM_INTEGRATION_API_BASE_PATH_KEY
|
|
263
263
|
} from "./chunk-CZOXZ6WQ.mjs";
|
|
264
264
|
import {
|
|
265
265
|
_collectFarmStorageModules
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-Q4X3MX4J.mjs";
|
|
267
267
|
import {
|
|
268
268
|
appendMiddlewareDirectory,
|
|
269
269
|
appendMiddlewareRoutePath,
|
|
@@ -299,7 +299,7 @@ import {
|
|
|
299
299
|
} from "./chunk-2I6PUKWJ.mjs";
|
|
300
300
|
import {
|
|
301
301
|
FARM_VERSION
|
|
302
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-X3HUT4JU.mjs";
|
|
303
303
|
import {
|
|
304
304
|
FARM_VIDEO_PLAYER_PATH
|
|
305
305
|
} from "./chunk-AG27TI6Q.mjs";
|
|
@@ -3054,7 +3054,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3054
3054
|
if (!mobile) await removeFarmMobileClientManifest(path16.dirname(outputDir));
|
|
3055
3055
|
const viteBuild = productionVite.build;
|
|
3056
3056
|
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.mjs");
|
|
3057
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
3057
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-6CHZBFJD.mjs");
|
|
3058
3058
|
const fs5 = await import("fs/promises");
|
|
3059
3059
|
const pluginManager = new PluginManager2({
|
|
3060
3060
|
config,
|
|
@@ -6764,7 +6764,7 @@ void hydrate();
|
|
|
6764
6764
|
async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime, sourceSnapshot) {
|
|
6765
6765
|
const viteBuild = productionVite.build;
|
|
6766
6766
|
const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.mjs");
|
|
6767
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
6767
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-6CHZBFJD.mjs");
|
|
6768
6768
|
const fs5 = await import("fs/promises");
|
|
6769
6769
|
const pluginManager = new PluginManager2({
|
|
6770
6770
|
config,
|
|
@@ -15038,7 +15038,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
15038
15038
|
farmPlugin,
|
|
15039
15039
|
farmServerOnlyEntriesPlugin
|
|
15040
15040
|
} = await import("./vite.mjs");
|
|
15041
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
15041
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-6CHZBFJD.mjs");
|
|
15042
15042
|
const pluginManager = new PluginManager2({
|
|
15043
15043
|
config,
|
|
15044
15044
|
isDev: false,
|
|
@@ -15066,7 +15066,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
15066
15066
|
}
|
|
15067
15067
|
async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
15068
15068
|
const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.mjs");
|
|
15069
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
15069
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-6CHZBFJD.mjs");
|
|
15070
15070
|
const pluginManager = new PluginManager2({
|
|
15071
15071
|
config,
|
|
15072
15072
|
isDev: false,
|