@farm.js/core 0.1.43 → 0.1.45
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-3KDz4hr9.d.mts → agent-mcp-CWI-awqd.d.mts} +1 -1
- package/dist/{agent-mcp-6yRebHk7.d.ts → agent-mcp-EnzWYv_X.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -2
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -1
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/{app-8Db1zR-2.d.ts → app-CAN_2Cqo.d.ts} +4 -4
- package/dist/{app-DlTWv4cn.d.mts → app-DG3dE8v5.d.mts} +4 -4
- package/dist/{app-manifest-TRzS7ZZ9.d.mts → app-manifest-8x5VjZ0L.d.mts} +1 -1
- package/dist/{app-manifest-cO2jkG1F.d.ts → app-manifest-DazjgQya.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{chunk-YBDSTNMH.cjs → chunk-2DZOABRK.cjs} +1 -1
- package/dist/{chunk-OYSGGV6O.mjs → chunk-2NCY6O6Q.mjs} +5 -5
- package/dist/{chunk-AX7S67YV.mjs → chunk-37VKVISD.mjs} +9 -173
- package/dist/chunk-3SAWHWDH.cjs +186 -0
- package/dist/{chunk-RHGK2JEN.cjs → chunk-B6XAA7V6.cjs} +18 -182
- package/dist/{chunk-RQYTOFQM.cjs → chunk-CW6SNEN2.cjs} +2 -2
- package/dist/{chunk-T7J7E63D.cjs → chunk-E22SWCXB.cjs} +2 -2
- package/dist/{chunk-ZYWJIPKQ.mjs → chunk-FDCV5OCT.mjs} +1 -1
- package/dist/{chunk-YGZH4T2X.mjs → chunk-FHQZJJQR.mjs} +1 -1
- package/dist/chunk-GZWHCWLB.mjs +186 -0
- package/dist/{chunk-JDJAPCR2.cjs → chunk-I5IO3ASU.cjs} +92 -90
- package/dist/{chunk-XARSG2TG.mjs → chunk-IOMVXBLZ.mjs} +1 -1
- package/dist/{chunk-VLXNGUKO.mjs → chunk-JVXW76I7.mjs} +1 -1
- package/dist/{chunk-7SCCY6SI.mjs → chunk-K5DHVEXC.mjs} +3 -3
- package/dist/{chunk-BKPXWRTT.cjs → chunk-KVN3YEFF.cjs} +6 -6
- package/dist/{chunk-LVABUXLA.cjs → chunk-LPE3ED4R.cjs} +2 -2
- package/dist/{chunk-NXO75WY4.mjs → chunk-OYZGFRPA.mjs} +1 -1
- package/dist/{chunk-RACQTC7K.cjs → chunk-SIVK2SRR.cjs} +52 -52
- package/dist/{chunk-GVNCWSQV.cjs → chunk-UN4B2TXC.cjs} +4 -4
- package/dist/{chunk-4OCEMK72.mjs → chunk-VR64PHNT.mjs} +10 -8
- package/dist/{chunk-4MRQ5OKQ.mjs → chunk-WWYXIECF.mjs} +1 -1
- package/dist/{chunk-TESO7EFU.mjs → chunk-X6YOWNDZ.mjs} +2 -2
- package/dist/{chunk-VIVQERJ5.cjs → chunk-YAD64RWI.cjs} +57 -57
- package/dist/{chunk-HUMEHX24.cjs → chunk-YN2QEMMO.cjs} +2 -2
- package/dist/{client-plugins-kwQuZcWq.d.ts → client-plugins-BGS0wqzc.d.ts} +16 -15
- package/dist/{client-plugins-Cv0OJtnM.d.mts → client-plugins-nQ0tYt4l.d.mts} +16 -15
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-MLB3JJMC.cjs → devtools-5Q7VRKVH.cjs} +4 -3
- package/dist/{devtools-M22FEFPK.mjs → devtools-LJ4IGYGW.mjs} +3 -2
- package/dist/docs.cjs +5 -4
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +4 -3
- package/dist/{index-DAl0QTZS.d.ts → index-Cy26isrh.d.ts} +1 -1
- package/dist/{index-CQOp8EmB.d.mts → index-y1jgR74U.d.mts} +1 -1
- package/dist/index.cjs +13 -11
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +14 -12
- package/dist/integrations.cjs +5 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +11 -10
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +10 -9
- package/dist/internal/cli-runtime.cjs +5 -4
- package/dist/internal/cli-runtime.mjs +4 -3
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +4 -3
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +5 -11
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +4 -10
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +7 -6
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +6 -5
- package/dist/{production-runtime-5nArjFpn.d.ts → production-runtime-BVMDgHrA.d.ts} +1 -1
- package/dist/{production-runtime-BzsF2z5F.d.mts → production-runtime-ClFA_1KQ.d.mts} +1 -1
- package/dist/{render-plan-B9yQorV4.d.mts → render-plan-CoSovy_O.d.mts} +1 -1
- package/dist/{render-plan-fg6E_HvL.d.ts → render-plan-y2DefWf8.d.ts} +1 -1
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/{request-gz8vFK0n.d.ts → request-aG5Wovm5.d.ts} +1 -1
- package/dist/{request-C4j_g-BH.d.mts → request-cNM09Q7e.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-DamyKVi3.d.ts → route-rendering-B3uQmCWX.d.ts} +1 -1
- package/dist/{route-rendering-iTTOwz1f.d.mts → route-rendering-EyInfsjI.d.mts} +1 -1
- package/dist/{router-OVjDqVo8.d.ts → router-DNUf-Bg1.d.ts} +1 -1
- package/dist/{router-EoSzHlos.d.mts → router-Devibh4r.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-YCDRJME4.cjs → rsc-pipeline-4ZJ6GUVQ.cjs} +5 -4
- package/dist/{rsc-pipeline-LK4K5JFK.mjs → rsc-pipeline-KK6GFDET.mjs} +4 -3
- package/dist/{runtime-DDH4tiuF.d.mts → runtime-9KZb8AI5.d.mts} +1 -1
- package/dist/{runtime-CwiuozLd.d.ts → runtime-CLr9P5kn.d.ts} +1 -1
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +22 -21
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +8 -7
- package/dist/{spa-router-Br4qFCWf.d.mts → spa-router-BIxh4IY-.d.mts} +2 -2
- package/dist/{spa-router-BsWUKH73.d.ts → spa-router-Ds6R_oe-.d.ts} +2 -2
- package/dist/{ssg-Donyfcxy.d.mts → ssg-ByrOVYdM.d.mts} +2 -2
- package/dist/{ssg-Csy2vwpi.d.ts → ssg-XnMHCyEc.d.ts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils-Luk72LXC.d.ts → utils-BN70ueSN.d.ts} +1 -1
- package/dist/{utils-d_k1ZZw0.d.mts → utils-BrjR5xRs.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +7 -6
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +6 -5
- package/package.json +1 -1
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkKNBBQHO2cjs = require('./chunk-KNBBQHO2.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkUS2QVW3Ecjs = require('./chunk-US2QVW3E.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
22
|
+
|
|
23
|
+
// src/integration-middleware-matcher.ts
|
|
24
|
+
function isFarmIntegration(value) {
|
|
25
|
+
return !!value && typeof value === "object" && value.kind === "farm-integration";
|
|
26
|
+
}
|
|
27
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isFarmIntegration, "isFarmIntegration");
|
|
28
|
+
var compiledIntegrationGuards = /* @__PURE__ */ new WeakMap();
|
|
29
|
+
var noMiddlewareContext = {};
|
|
30
|
+
function resolveIntegrationMiddlewareParams(entry, pathname, config) {
|
|
31
|
+
const params = resolveMatcherParams(entry.matcher, pathname);
|
|
32
|
+
if (params || !entry.matcher) return params;
|
|
33
|
+
const routePathname = resolveIntegrationRoutePathname(pathname, config);
|
|
34
|
+
const candidates = [.../* @__PURE__ */ new Set([pathname, ...getIntegrationAPIPathnames(config)(routePathname)])];
|
|
35
|
+
for (const candidate of candidates) {
|
|
36
|
+
if (candidate === pathname) continue;
|
|
37
|
+
const routeParams = resolveMatcherParams(entry.matcher, candidate);
|
|
38
|
+
if (routeParams) return routeParams;
|
|
39
|
+
}
|
|
40
|
+
let compiled = compiledIntegrationGuards.get(entry);
|
|
41
|
+
if (!compiled) {
|
|
42
|
+
compiled = _chunkALPWLT27cjs.compileMiddlewareConfig.call(void 0, {
|
|
43
|
+
matcher: typeof entry.matcher === "string" ? entry.matcher : [...entry.matcher]
|
|
44
|
+
});
|
|
45
|
+
compiledIntegrationGuards.set(entry, compiled);
|
|
46
|
+
}
|
|
47
|
+
for (const candidate of candidates) {
|
|
48
|
+
const result = _chunkALPWLT27cjs.matchesCompiledMiddlewareConfig.call(void 0, candidate, compiled, noMiddlewareContext);
|
|
49
|
+
if (result.matched) return _nullishCoalesce(result.params, () => ( {}));
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationMiddlewareParams, "resolveIntegrationMiddlewareParams");
|
|
54
|
+
function integrationMiddlewareMayHandlePath(integrations, pathname, catchAllProbe) {
|
|
55
|
+
if (!integrations) return false;
|
|
56
|
+
const covers = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (entry) => resolveIntegrationMiddlewareParams(entry, pathname, void 0) !== null, "covers");
|
|
57
|
+
return Object.values(integrations).some(
|
|
58
|
+
(integration) => isFarmIntegration(integration) && (integration.middleware || []).some((entry) => {
|
|
59
|
+
if (catchAllProbe === void 0) return covers(entry);
|
|
60
|
+
if (!entry.matcher) return false;
|
|
61
|
+
const specific = (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).filter(
|
|
62
|
+
(matcher) => resolveIntegrationMiddlewareParams({ matcher }, catchAllProbe, void 0) === null
|
|
63
|
+
);
|
|
64
|
+
return specific.length > 0 && covers({ matcher: specific });
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, integrationMiddlewareMayHandlePath, "integrationMiddlewareMayHandlePath");
|
|
69
|
+
var FARM_INTEGRATION_API_BASE_PATH_KEY = "__farmAPIServerBasePath";
|
|
70
|
+
var integrationAPIPathnames = /* @__PURE__ */ new WeakMap();
|
|
71
|
+
function getIntegrationAPIPathnames(config) {
|
|
72
|
+
if (!config) return (pathname) => [pathname];
|
|
73
|
+
let toPathnames = integrationAPIPathnames.get(config);
|
|
74
|
+
if (!toPathnames) {
|
|
75
|
+
const recorded = config[FARM_INTEGRATION_API_BASE_PATH_KEY];
|
|
76
|
+
const api = config.api;
|
|
77
|
+
const serverBasePath = typeof recorded === "string" ? recorded : typeof _optionalChain([api, 'optionalAccess', _ => _.baseURL]) === "string" && typeof api.basePath === "string" ? _chunkKNBBQHO2cjs.resolveFarmAPIServerBasePath.call(void 0, api) : void 0;
|
|
78
|
+
toPathnames = _chunkKNBBQHO2cjs.createFarmAPIMiddlewarePathnames.call(void 0, serverBasePath);
|
|
79
|
+
integrationAPIPathnames.set(config, toPathnames);
|
|
80
|
+
}
|
|
81
|
+
return toPathnames;
|
|
82
|
+
}
|
|
83
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getIntegrationAPIPathnames, "getIntegrationAPIPathnames");
|
|
84
|
+
function resolveIntegrationRoutePathname(pathname, config) {
|
|
85
|
+
const basePath = typeof _optionalChain([config, 'optionalAccess', _2 => _2.basePath]) === "string" ? config.basePath : void 0;
|
|
86
|
+
let routePathname = basePath ? _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, pathname, basePath) : pathname;
|
|
87
|
+
const i18n = _optionalChain([config, 'optionalAccess', _3 => _3.i18n]);
|
|
88
|
+
if (i18n && Array.isArray(i18n.locales) && i18n.locales.length > 0) {
|
|
89
|
+
routePathname = _chunkBIDYX3SLcjs.resolveFarmLocalePath.call(void 0, routePathname, {
|
|
90
|
+
locales: i18n.locales,
|
|
91
|
+
defaultLocale: i18n.defaultLocale,
|
|
92
|
+
routing: i18n.routing || "prefix-except-default"
|
|
93
|
+
}).pathname;
|
|
94
|
+
}
|
|
95
|
+
return routePathname;
|
|
96
|
+
}
|
|
97
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationRoutePathname, "resolveIntegrationRoutePathname");
|
|
98
|
+
function resolveMatcherParams(matcher, pathname) {
|
|
99
|
+
if (!matcher) {
|
|
100
|
+
return {};
|
|
101
|
+
}
|
|
102
|
+
const list = Array.isArray(matcher) ? matcher : [matcher];
|
|
103
|
+
let canonicalPathname;
|
|
104
|
+
let canonicalSegments;
|
|
105
|
+
for (const item of list) {
|
|
106
|
+
if (item === "/(.*)" || item === "*") {
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
if (item.endsWith("(.*)")) {
|
|
110
|
+
_nullishCoalesce(canonicalPathname, () => ( (canonicalPathname = _chunkUS2QVW3Ecjs.canonicalizeRequestPathname.call(void 0, pathname))));
|
|
111
|
+
const prefix = item.slice(0, -4);
|
|
112
|
+
if (canonicalPathname === prefix || canonicalPathname.startsWith(`${prefix}/`)) {
|
|
113
|
+
return {};
|
|
114
|
+
}
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
_nullishCoalesce(canonicalSegments, () => ( (canonicalSegments = _chunkUS2QVW3Ecjs.canonicalizeRequestPathSegments.call(void 0, pathname))));
|
|
118
|
+
const params = matchPathSegments(splitPath(item), canonicalSegments);
|
|
119
|
+
if (params) {
|
|
120
|
+
return params;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveMatcherParams, "resolveMatcherParams");
|
|
126
|
+
function matchPathSegments(routeSegments, pathSegments) {
|
|
127
|
+
const params = {};
|
|
128
|
+
let routeIndex = 0;
|
|
129
|
+
let pathIndex = 0;
|
|
130
|
+
while (routeIndex < routeSegments.length && pathIndex < pathSegments.length) {
|
|
131
|
+
const routeSegment = routeSegments[routeIndex];
|
|
132
|
+
const pathSegment = pathSegments[pathIndex];
|
|
133
|
+
if (isCatchAllSegment(routeSegment)) {
|
|
134
|
+
params[getSegmentParamName(routeSegment)] = pathSegments.slice(pathIndex);
|
|
135
|
+
return params;
|
|
136
|
+
}
|
|
137
|
+
if (isDynamicSegment(routeSegment)) {
|
|
138
|
+
params[getSegmentParamName(routeSegment)] = pathSegment;
|
|
139
|
+
routeIndex += 1;
|
|
140
|
+
pathIndex += 1;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
if (routeSegment !== pathSegment) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
routeIndex += 1;
|
|
147
|
+
pathIndex += 1;
|
|
148
|
+
}
|
|
149
|
+
if (routeIndex === routeSegments.length && pathIndex === pathSegments.length) {
|
|
150
|
+
return params;
|
|
151
|
+
}
|
|
152
|
+
if (routeIndex === routeSegments.length - 1 && isCatchAllSegment(routeSegments[routeIndex])) {
|
|
153
|
+
params[getSegmentParamName(routeSegments[routeIndex])] = [];
|
|
154
|
+
return params;
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, matchPathSegments, "matchPathSegments");
|
|
159
|
+
function splitPath(value) {
|
|
160
|
+
return value.split("/").filter(Boolean);
|
|
161
|
+
}
|
|
162
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, splitPath, "splitPath");
|
|
163
|
+
function isDynamicSegment(segment) {
|
|
164
|
+
return segment.startsWith("[") && segment.endsWith("]");
|
|
165
|
+
}
|
|
166
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isDynamicSegment, "isDynamicSegment");
|
|
167
|
+
function isCatchAllSegment(segment) {
|
|
168
|
+
return segment.startsWith("[...") && segment.endsWith("]");
|
|
169
|
+
}
|
|
170
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isCatchAllSegment, "isCatchAllSegment");
|
|
171
|
+
function getSegmentParamName(segment) {
|
|
172
|
+
if (isCatchAllSegment(segment)) {
|
|
173
|
+
return segment.slice(4, -1);
|
|
174
|
+
}
|
|
175
|
+
return segment.slice(1, -1);
|
|
176
|
+
}
|
|
177
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getSegmentParamName, "getSegmentParamName");
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
exports.isFarmIntegration = isFarmIntegration; exports.resolveIntegrationMiddlewareParams = resolveIntegrationMiddlewareParams; exports.integrationMiddlewareMayHandlePath = integrationMiddlewareMayHandlePath; exports.FARM_INTEGRATION_API_BASE_PATH_KEY = FARM_INTEGRATION_API_BASE_PATH_KEY; exports.matchPathSegments = matchPathSegments; exports.splitPath = splitPath;
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
var _chunk6QOLZITBcjs = require('./chunk-6QOLZITB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunkG643DQCHcjs = require('./chunk-G643DQCH.cjs');
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
9
|
+
var _chunk3SAWHWDHcjs = require('./chunk-3SAWHWDH.cjs');
|
|
10
10
|
|
|
11
|
-
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
12
11
|
|
|
12
|
+
var _chunkG643DQCHcjs = require('./chunk-G643DQCH.cjs');
|
|
13
13
|
|
|
14
|
-
var _chunk64SBBZDUcjs = require('./chunk-64SBBZDU.cjs');
|
|
15
14
|
|
|
15
|
+
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk64SBBZDUcjs = require('./chunk-64SBBZDU.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -44,16 +44,9 @@ var _chunkNZKJGRB3cjs = require('./chunk-NZKJGRB3.cjs');
|
|
|
44
44
|
var _chunkDVM4FKZLcjs = require('./chunk-DVM4FKZL.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
var _chunkUS2QVW3Ecjs = require('./chunk-US2QVW3E.cjs');
|
|
49
48
|
|
|
50
49
|
|
|
51
|
-
var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
|
|
55
|
-
|
|
56
|
-
|
|
57
50
|
|
|
58
51
|
|
|
59
52
|
|
|
@@ -268,17 +261,13 @@ function defineIntegration(integration) {
|
|
|
268
261
|
};
|
|
269
262
|
}
|
|
270
263
|
_chunkS3JO3N4Hcjs.__name.call(void 0, defineIntegration, "defineIntegration");
|
|
271
|
-
function isFarmIntegration(value) {
|
|
272
|
-
return !!value && typeof value === "object" && value.kind === "farm-integration";
|
|
273
|
-
}
|
|
274
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, isFarmIntegration, "isFarmIntegration");
|
|
275
264
|
function resolveIntegrationPlugins(integrations) {
|
|
276
265
|
if (!integrations) {
|
|
277
266
|
return [];
|
|
278
267
|
}
|
|
279
268
|
const plugins = [];
|
|
280
269
|
for (const [key, integration] of Object.entries(integrations)) {
|
|
281
|
-
if (!integration || !isFarmIntegration(integration)) {
|
|
270
|
+
if (!integration || !_chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration)) {
|
|
282
271
|
continue;
|
|
283
272
|
}
|
|
284
273
|
for (const entry of integration.middleware || []) {
|
|
@@ -365,7 +354,7 @@ function getIntegrationProviders(integrations) {
|
|
|
365
354
|
}
|
|
366
355
|
const providers = [];
|
|
367
356
|
for (const integration of Object.values(integrations)) {
|
|
368
|
-
if (!integration || !isFarmIntegration(integration) || !_optionalChain([integration, 'access', _3 => _3.providers, 'optionalAccess', _4 => _4.length])) {
|
|
357
|
+
if (!integration || !_chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration) || !_optionalChain([integration, 'access', _3 => _3.providers, 'optionalAccess', _4 => _4.length])) {
|
|
369
358
|
continue;
|
|
370
359
|
}
|
|
371
360
|
for (const provider of integration.providers) {
|
|
@@ -393,7 +382,7 @@ function getIntegrationDocumentNavigationMatchers(integrations) {
|
|
|
393
382
|
}
|
|
394
383
|
const matchers = [];
|
|
395
384
|
for (const integration of Object.values(integrations)) {
|
|
396
|
-
if (!integration || !isFarmIntegration(integration) || !_optionalChain([integration, 'access', _5 => _5.documentNavigations, 'optionalAccess', _6 => _6.length])) {
|
|
385
|
+
if (!integration || !_chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration) || !_optionalChain([integration, 'access', _5 => _5.documentNavigations, 'optionalAccess', _6 => _6.length])) {
|
|
397
386
|
continue;
|
|
398
387
|
}
|
|
399
388
|
for (const navigation of integration.documentNavigations) {
|
|
@@ -411,7 +400,7 @@ function getIntegrationSchemas(integrations) {
|
|
|
411
400
|
return {};
|
|
412
401
|
}
|
|
413
402
|
const schemaEntries = Object.entries(integrations).map(([key, integration]) => {
|
|
414
|
-
const schema = integration && isFarmIntegration(integration) ? integration.schema : void 0;
|
|
403
|
+
const schema = integration && _chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration) ? integration.schema : void 0;
|
|
415
404
|
return schema ? [key, schema] : null;
|
|
416
405
|
}).filter((value) => value !== null);
|
|
417
406
|
return Object.fromEntries(schemaEntries);
|
|
@@ -444,7 +433,7 @@ function matchIntegrationRoute(integrations, input) {
|
|
|
444
433
|
}
|
|
445
434
|
const pathSegments = _chunkUS2QVW3Ecjs.canonicalizeRequestPathSegments.call(void 0, input.pathname);
|
|
446
435
|
for (const [key, integration] of Object.entries(integrations)) {
|
|
447
|
-
if (!integration || !isFarmIntegration(integration)) {
|
|
436
|
+
if (!integration || !_chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration)) {
|
|
448
437
|
continue;
|
|
449
438
|
}
|
|
450
439
|
const routes = normalizeIntegrationRoutes(integration.routes || []);
|
|
@@ -452,7 +441,7 @@ function matchIntegrationRoute(integrations, input) {
|
|
|
452
441
|
if (!matchesMethod(route.methods, method)) {
|
|
453
442
|
continue;
|
|
454
443
|
}
|
|
455
|
-
const params = matchPathSegments(route[INTEGRATION_ROUTE_SEGMENTS], pathSegments);
|
|
444
|
+
const params = _chunk3SAWHWDHcjs.matchPathSegments.call(void 0, route[INTEGRATION_ROUTE_SEGMENTS], pathSegments);
|
|
456
445
|
if (!params) {
|
|
457
446
|
continue;
|
|
458
447
|
}
|
|
@@ -871,7 +860,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
871
860
|
}
|
|
872
861
|
}, "createHandlerRequest");
|
|
873
862
|
for (const entry of middleware) {
|
|
874
|
-
const params = resolveIntegrationMiddlewareParams(entry, pathname, context.config);
|
|
863
|
+
const params = _chunk3SAWHWDHcjs.resolveIntegrationMiddlewareParams.call(void 0, entry, pathname, context.config);
|
|
875
864
|
if (!params) {
|
|
876
865
|
continue;
|
|
877
866
|
}
|
|
@@ -972,7 +961,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
972
961
|
}
|
|
973
962
|
}
|
|
974
963
|
for (const route of routes) {
|
|
975
|
-
const params = method && matchesMethod(route.methods, method) ? matchPathSegments(route[INTEGRATION_ROUTE_SEGMENTS], pathSegments) : null;
|
|
964
|
+
const params = method && matchesMethod(route.methods, method) ? _chunk3SAWHWDHcjs.matchPathSegments.call(void 0, route[INTEGRATION_ROUTE_SEGMENTS], pathSegments) : null;
|
|
976
965
|
if (!params) {
|
|
977
966
|
continue;
|
|
978
967
|
}
|
|
@@ -1190,7 +1179,7 @@ function normalizeIntegrationRoutes(routes) {
|
|
|
1190
1179
|
...route,
|
|
1191
1180
|
methods: normalizeIntegrationRouteMethods(route),
|
|
1192
1181
|
input: normalizeIntegrationRouteInputSchemas(route),
|
|
1193
|
-
[INTEGRATION_ROUTE_SEGMENTS]: splitPath(route.path)
|
|
1182
|
+
[INTEGRATION_ROUTE_SEGMENTS]: _chunk3SAWHWDHcjs.splitPath.call(void 0, route.path)
|
|
1194
1183
|
},
|
|
1195
1184
|
specificity: _chunkNO3WWW3Ncjs.getRoutePatternSpecificity.call(void 0, route.path, "api")
|
|
1196
1185
|
};
|
|
@@ -1585,7 +1574,7 @@ async function dispatchIntegrationRequest(runtime, request, options = {}) {
|
|
|
1585
1574
|
const forwardedSetCookies = [];
|
|
1586
1575
|
for (const entry of middleware) {
|
|
1587
1576
|
if (_optionalChain([options, 'access', _26 => _26.ranMiddleware, 'optionalAccess', _27 => _27.has, 'call', _28 => _28(entry)])) continue;
|
|
1588
|
-
const params = resolveIntegrationMiddlewareParams(entry, pathname, runtime.config);
|
|
1577
|
+
const params = _chunk3SAWHWDHcjs.resolveIntegrationMiddlewareParams.call(void 0, entry, pathname, runtime.config);
|
|
1589
1578
|
if (!params) {
|
|
1590
1579
|
continue;
|
|
1591
1580
|
}
|
|
@@ -1678,7 +1667,7 @@ async function dispatchIntegrationRequest(runtime, request, options = {}) {
|
|
|
1678
1667
|
}
|
|
1679
1668
|
}
|
|
1680
1669
|
for (const route of routes) {
|
|
1681
|
-
const params = method && matchesMethod(route.methods, method) ? matchPathSegments(route[INTEGRATION_ROUTE_SEGMENTS], pathSegments) : null;
|
|
1670
|
+
const params = method && matchesMethod(route.methods, method) ? _chunk3SAWHWDHcjs.matchPathSegments.call(void 0, route[INTEGRATION_ROUTE_SEGMENTS], pathSegments) : null;
|
|
1682
1671
|
if (!params) {
|
|
1683
1672
|
continue;
|
|
1684
1673
|
}
|
|
@@ -1839,7 +1828,7 @@ async function dispatchIntegrationRequests(integrations, runtime, request, optio
|
|
|
1839
1828
|
return { response: null, setCookies };
|
|
1840
1829
|
}
|
|
1841
1830
|
for (const integration of Object.values(integrations)) {
|
|
1842
|
-
if (!integration || !isFarmIntegration(integration)) {
|
|
1831
|
+
if (!integration || !_chunk3SAWHWDHcjs.isFarmIntegration.call(void 0, integration)) {
|
|
1843
1832
|
continue;
|
|
1844
1833
|
}
|
|
1845
1834
|
const hasMiddleware = (integration.middleware || []).length > 0;
|
|
@@ -2011,156 +2000,6 @@ function matchesMethod(methods, normalizedMethod) {
|
|
|
2011
2000
|
return methods.some((candidate) => candidate === "ALL" || candidate === normalizedMethod);
|
|
2012
2001
|
}
|
|
2013
2002
|
_chunkS3JO3N4Hcjs.__name.call(void 0, matchesMethod, "matchesMethod");
|
|
2014
|
-
var compiledIntegrationGuards = /* @__PURE__ */ new WeakMap();
|
|
2015
|
-
var noMiddlewareContext = {};
|
|
2016
|
-
function resolveIntegrationMiddlewareParams(entry, pathname, config) {
|
|
2017
|
-
const params = resolveMatcherParams(entry.matcher, pathname);
|
|
2018
|
-
if (params || !entry.matcher) return params;
|
|
2019
|
-
const routePathname = resolveIntegrationRoutePathname(pathname, config);
|
|
2020
|
-
const candidates = [.../* @__PURE__ */ new Set([pathname, ...getIntegrationAPIPathnames(config)(routePathname)])];
|
|
2021
|
-
for (const candidate of candidates) {
|
|
2022
|
-
if (candidate === pathname) continue;
|
|
2023
|
-
const routeParams = resolveMatcherParams(entry.matcher, candidate);
|
|
2024
|
-
if (routeParams) return routeParams;
|
|
2025
|
-
}
|
|
2026
|
-
let compiled = compiledIntegrationGuards.get(entry);
|
|
2027
|
-
if (!compiled) {
|
|
2028
|
-
compiled = _chunkALPWLT27cjs.compileMiddlewareConfig.call(void 0, {
|
|
2029
|
-
matcher: typeof entry.matcher === "string" ? entry.matcher : [...entry.matcher]
|
|
2030
|
-
});
|
|
2031
|
-
compiledIntegrationGuards.set(entry, compiled);
|
|
2032
|
-
}
|
|
2033
|
-
for (const candidate of candidates) {
|
|
2034
|
-
const result = _chunkALPWLT27cjs.matchesCompiledMiddlewareConfig.call(void 0, candidate, compiled, noMiddlewareContext);
|
|
2035
|
-
if (result.matched) return _nullishCoalesce(result.params, () => ( {}));
|
|
2036
|
-
}
|
|
2037
|
-
return null;
|
|
2038
|
-
}
|
|
2039
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationMiddlewareParams, "resolveIntegrationMiddlewareParams");
|
|
2040
|
-
function integrationMiddlewareMayHandlePath(integrations, pathname, catchAllProbe) {
|
|
2041
|
-
if (!integrations) return false;
|
|
2042
|
-
const covers = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (entry) => resolveIntegrationMiddlewareParams(entry, pathname, void 0) !== null, "covers");
|
|
2043
|
-
return Object.values(integrations).some(
|
|
2044
|
-
(integration) => isFarmIntegration(integration) && (integration.middleware || []).some((entry) => {
|
|
2045
|
-
if (catchAllProbe === void 0) return covers(entry);
|
|
2046
|
-
if (!entry.matcher) return false;
|
|
2047
|
-
const specific = (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).filter(
|
|
2048
|
-
(matcher) => resolveIntegrationMiddlewareParams({ matcher }, catchAllProbe, void 0) === null
|
|
2049
|
-
);
|
|
2050
|
-
return specific.length > 0 && covers({ matcher: specific });
|
|
2051
|
-
})
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, integrationMiddlewareMayHandlePath, "integrationMiddlewareMayHandlePath");
|
|
2055
|
-
var FARM_INTEGRATION_API_BASE_PATH_KEY = "__farmAPIServerBasePath";
|
|
2056
|
-
var integrationAPIPathnames = /* @__PURE__ */ new WeakMap();
|
|
2057
|
-
function getIntegrationAPIPathnames(config) {
|
|
2058
|
-
if (!config) return (pathname) => [pathname];
|
|
2059
|
-
let toPathnames = integrationAPIPathnames.get(config);
|
|
2060
|
-
if (!toPathnames) {
|
|
2061
|
-
const recorded = config[FARM_INTEGRATION_API_BASE_PATH_KEY];
|
|
2062
|
-
const api2 = config.api;
|
|
2063
|
-
const serverBasePath = typeof recorded === "string" ? recorded : typeof _optionalChain([api2, 'optionalAccess', _34 => _34.baseURL]) === "string" && typeof api2.basePath === "string" ? _chunkKNBBQHO2cjs.resolveFarmAPIServerBasePath.call(void 0, api2) : void 0;
|
|
2064
|
-
toPathnames = _chunkKNBBQHO2cjs.createFarmAPIMiddlewarePathnames.call(void 0, serverBasePath);
|
|
2065
|
-
integrationAPIPathnames.set(config, toPathnames);
|
|
2066
|
-
}
|
|
2067
|
-
return toPathnames;
|
|
2068
|
-
}
|
|
2069
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, getIntegrationAPIPathnames, "getIntegrationAPIPathnames");
|
|
2070
|
-
function resolveIntegrationRoutePathname(pathname, config) {
|
|
2071
|
-
const basePath = typeof _optionalChain([config, 'optionalAccess', _35 => _35.basePath]) === "string" ? config.basePath : void 0;
|
|
2072
|
-
let routePathname = basePath ? _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, pathname, basePath) : pathname;
|
|
2073
|
-
const i18n = _optionalChain([config, 'optionalAccess', _36 => _36.i18n]);
|
|
2074
|
-
if (i18n && Array.isArray(i18n.locales) && i18n.locales.length > 0) {
|
|
2075
|
-
routePathname = _chunkBIDYX3SLcjs.resolveFarmLocalePath.call(void 0, routePathname, {
|
|
2076
|
-
locales: i18n.locales,
|
|
2077
|
-
defaultLocale: i18n.defaultLocale,
|
|
2078
|
-
routing: i18n.routing || "prefix-except-default"
|
|
2079
|
-
}).pathname;
|
|
2080
|
-
}
|
|
2081
|
-
return routePathname;
|
|
2082
|
-
}
|
|
2083
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationRoutePathname, "resolveIntegrationRoutePathname");
|
|
2084
|
-
function resolveMatcherParams(matcher, pathname) {
|
|
2085
|
-
if (!matcher) {
|
|
2086
|
-
return {};
|
|
2087
|
-
}
|
|
2088
|
-
const list = Array.isArray(matcher) ? matcher : [matcher];
|
|
2089
|
-
let canonicalPathname;
|
|
2090
|
-
let canonicalSegments;
|
|
2091
|
-
for (const item of list) {
|
|
2092
|
-
if (item === "/(.*)" || item === "*") {
|
|
2093
|
-
return {};
|
|
2094
|
-
}
|
|
2095
|
-
if (item.endsWith("(.*)")) {
|
|
2096
|
-
_nullishCoalesce(canonicalPathname, () => ( (canonicalPathname = _chunkUS2QVW3Ecjs.canonicalizeRequestPathname.call(void 0, pathname))));
|
|
2097
|
-
const prefix = item.slice(0, -4);
|
|
2098
|
-
if (canonicalPathname === prefix || canonicalPathname.startsWith(`${prefix}/`)) {
|
|
2099
|
-
return {};
|
|
2100
|
-
}
|
|
2101
|
-
continue;
|
|
2102
|
-
}
|
|
2103
|
-
_nullishCoalesce(canonicalSegments, () => ( (canonicalSegments = _chunkUS2QVW3Ecjs.canonicalizeRequestPathSegments.call(void 0, pathname))));
|
|
2104
|
-
const params = matchPathSegments(splitPath(item), canonicalSegments);
|
|
2105
|
-
if (params) {
|
|
2106
|
-
return params;
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
return null;
|
|
2110
|
-
}
|
|
2111
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveMatcherParams, "resolveMatcherParams");
|
|
2112
|
-
function matchPathSegments(routeSegments, pathSegments) {
|
|
2113
|
-
const params = {};
|
|
2114
|
-
let routeIndex = 0;
|
|
2115
|
-
let pathIndex = 0;
|
|
2116
|
-
while (routeIndex < routeSegments.length && pathIndex < pathSegments.length) {
|
|
2117
|
-
const routeSegment = routeSegments[routeIndex];
|
|
2118
|
-
const pathSegment = pathSegments[pathIndex];
|
|
2119
|
-
if (isCatchAllSegment(routeSegment)) {
|
|
2120
|
-
params[getSegmentParamName(routeSegment)] = pathSegments.slice(pathIndex);
|
|
2121
|
-
return params;
|
|
2122
|
-
}
|
|
2123
|
-
if (isDynamicSegment(routeSegment)) {
|
|
2124
|
-
params[getSegmentParamName(routeSegment)] = pathSegment;
|
|
2125
|
-
routeIndex += 1;
|
|
2126
|
-
pathIndex += 1;
|
|
2127
|
-
continue;
|
|
2128
|
-
}
|
|
2129
|
-
if (routeSegment !== pathSegment) {
|
|
2130
|
-
return null;
|
|
2131
|
-
}
|
|
2132
|
-
routeIndex += 1;
|
|
2133
|
-
pathIndex += 1;
|
|
2134
|
-
}
|
|
2135
|
-
if (routeIndex === routeSegments.length && pathIndex === pathSegments.length) {
|
|
2136
|
-
return params;
|
|
2137
|
-
}
|
|
2138
|
-
if (routeIndex === routeSegments.length - 1 && isCatchAllSegment(routeSegments[routeIndex])) {
|
|
2139
|
-
params[getSegmentParamName(routeSegments[routeIndex])] = [];
|
|
2140
|
-
return params;
|
|
2141
|
-
}
|
|
2142
|
-
return null;
|
|
2143
|
-
}
|
|
2144
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, matchPathSegments, "matchPathSegments");
|
|
2145
|
-
function splitPath(value) {
|
|
2146
|
-
return value.split("/").filter(Boolean);
|
|
2147
|
-
}
|
|
2148
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, splitPath, "splitPath");
|
|
2149
|
-
function isDynamicSegment(segment) {
|
|
2150
|
-
return segment.startsWith("[") && segment.endsWith("]");
|
|
2151
|
-
}
|
|
2152
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, isDynamicSegment, "isDynamicSegment");
|
|
2153
|
-
function isCatchAllSegment(segment) {
|
|
2154
|
-
return segment.startsWith("[...") && segment.endsWith("]");
|
|
2155
|
-
}
|
|
2156
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, isCatchAllSegment, "isCatchAllSegment");
|
|
2157
|
-
function getSegmentParamName(segment) {
|
|
2158
|
-
if (isCatchAllSegment(segment)) {
|
|
2159
|
-
return segment.slice(4, -1);
|
|
2160
|
-
}
|
|
2161
|
-
return segment.slice(1, -1);
|
|
2162
|
-
}
|
|
2163
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, getSegmentParamName, "getSegmentParamName");
|
|
2164
2003
|
function getRequestId(req) {
|
|
2165
2004
|
const headerValue = req.headers["x-request-id"];
|
|
2166
2005
|
if (Array.isArray(headerValue)) {
|
|
@@ -2200,7 +2039,4 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMatcher, "normalizeMatcher");
|
|
|
2200
2039
|
|
|
2201
2040
|
|
|
2202
2041
|
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
exports.FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY; exports.FARM_INTEGRATION_SET_COOKIES_KEY = FARM_INTEGRATION_SET_COOKIES_KEY; exports.forwardIntegrationSetCookies = forwardIntegrationSetCookies; exports.defineIntegrationSchema = defineIntegrationSchema; exports.getFarmIntegrationPluginServerRuntime = getFarmIntegrationPluginServerRuntime; exports.getFarmIntegrationPluginOwner = getFarmIntegrationPluginOwner; exports.createIntegrationRoute = createIntegrationRoute; exports.integrationRoute = integrationRoute; exports.defineIntegration = defineIntegration; exports.isFarmIntegration = isFarmIntegration; exports.resolveIntegrationPlugins = resolveIntegrationPlugins; exports.getIntegrationProviders = getIntegrationProviders; exports.isFarmIntegrationProviderComponentReference = isFarmIntegrationProviderComponentReference; exports.getIntegrationDocumentNavigationMatchers = getIntegrationDocumentNavigationMatchers; exports.getIntegrationSchemas = getIntegrationSchemas; exports.getRegisteredIntegrationRuntime = getRegisteredIntegrationRuntime; exports.getRegisteredIntegrations = getRegisteredIntegrations; exports.getRegisteredIntegrationSchemas = getRegisteredIntegrationSchemas; exports.matchIntegrationRoute = matchIntegrationRoute; exports.matchRegisteredIntegrationRoute = matchRegisteredIntegrationRoute; exports.getRegisteredIntegrationAPIManifest = getRegisteredIntegrationAPIManifest; exports.dispatchIntegrationRequest = dispatchIntegrationRequest; exports.dispatchIntegrationRequests = dispatchIntegrationRequests; exports.integrationMiddlewareMayHandlePath = integrationMiddlewareMayHandlePath; exports.FARM_INTEGRATION_API_BASE_PATH_KEY = FARM_INTEGRATION_API_BASE_PATH_KEY;
|
|
2042
|
+
exports.FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY; exports.FARM_INTEGRATION_SET_COOKIES_KEY = FARM_INTEGRATION_SET_COOKIES_KEY; exports.forwardIntegrationSetCookies = forwardIntegrationSetCookies; exports.defineIntegrationSchema = defineIntegrationSchema; exports.getFarmIntegrationPluginServerRuntime = getFarmIntegrationPluginServerRuntime; exports.getFarmIntegrationPluginOwner = getFarmIntegrationPluginOwner; exports.createIntegrationRoute = createIntegrationRoute; exports.integrationRoute = integrationRoute; exports.defineIntegration = defineIntegration; exports.resolveIntegrationPlugins = resolveIntegrationPlugins; exports.getIntegrationProviders = getIntegrationProviders; exports.isFarmIntegrationProviderComponentReference = isFarmIntegrationProviderComponentReference; exports.getIntegrationDocumentNavigationMatchers = getIntegrationDocumentNavigationMatchers; exports.getIntegrationSchemas = getIntegrationSchemas; exports.getRegisteredIntegrationRuntime = getRegisteredIntegrationRuntime; exports.getRegisteredIntegrations = getRegisteredIntegrations; exports.getRegisteredIntegrationSchemas = getRegisteredIntegrationSchemas; exports.matchIntegrationRoute = matchIntegrationRoute; exports.matchRegisteredIntegrationRoute = matchRegisteredIntegrationRoute; exports.getRegisteredIntegrationAPIManifest = getRegisteredIntegrationAPIManifest; exports.dispatchIntegrationRequest = dispatchIntegrationRequest; exports.dispatchIntegrationRequests = dispatchIntegrationRequests;
|
|
@@ -29,7 +29,7 @@ var _chunk4U5XZDLGcjs = require('./chunk-4U5XZDLG.cjs');
|
|
|
29
29
|
var _chunk6D24SDKOcjs = require('./chunk-6D24SDKO.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkB6XAA7V6cjs = require('./chunk-B6XAA7V6.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -121,7 +121,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, withTimeout, "withTimeout");
|
|
|
121
121
|
var formatSeconds = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`, "formatSeconds");
|
|
122
122
|
function collectSchemaOwners(config) {
|
|
123
123
|
const owners = [];
|
|
124
|
-
const integrationSchemas =
|
|
124
|
+
const integrationSchemas = _chunkB6XAA7V6cjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
125
125
|
let integrationClient;
|
|
126
126
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
127
127
|
owners.push({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkAZBSVLRMcjs = require('./chunk-AZBSVLRM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkLPE3ED4Rcjs = require('./chunk-LPE3ED4R.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkCEDPEDNWcjs = require('./chunk-CEDPEDNW.cjs');
|
|
@@ -105,7 +105,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
105
105
|
server: { environmentName: "rsc" },
|
|
106
106
|
config: {
|
|
107
107
|
preset: options.preset,
|
|
108
|
-
outputDir: options.outputDir &&
|
|
108
|
+
outputDir: options.outputDir && _chunkLPE3ED4Rcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
109
109
|
}
|
|
110
110
|
})
|
|
111
111
|
]
|