@farm.js/core 0.1.41 → 0.1.43
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-BOqIxJLI.d.mts → agent-mcp-3KDz4hr9.d.mts} +1 -1
- package/dist/{agent-mcp-D0eZKfci.d.ts → agent-mcp-6yRebHk7.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -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.cjs +2 -2
- package/dist/api.d.mts +8 -3
- package/dist/api.d.ts +8 -3
- package/dist/api.mjs +1 -1
- package/dist/{app-DM8e1z3G.d.ts → app-8Db1zR-2.d.ts} +8 -4
- package/dist/{app-CzTSMJaf.d.mts → app-DlTWv4cn.d.mts} +8 -4
- package/dist/app-manifest-TRzS7ZZ9.d.mts +120 -0
- package/dist/app-manifest-cO2jkG1F.d.ts +120 -0
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{chunk-ECKF2BAM.cjs → chunk-2GVF3C2F.cjs} +255 -42
- package/dist/chunk-2NXO5SBY.mjs +57 -0
- package/dist/chunk-3BROEWFY.cjs +39 -0
- package/dist/{chunk-ENOBPDKZ.mjs → chunk-4MRQ5OKQ.mjs} +14 -9
- package/dist/{chunk-R65GCA6A.mjs → chunk-4OCEMK72.mjs} +260 -49
- package/dist/{chunk-6PKXK4TY.mjs → chunk-53ZV6K65.mjs} +1 -1
- package/dist/{chunk-LYIZHJTK.cjs → chunk-5LPHJZSI.cjs} +14 -14
- package/dist/chunk-5NIWBWDD.mjs +97 -0
- package/dist/{chunk-NRDBW4MP.mjs → chunk-7IQQIPRZ.mjs} +10 -0
- package/dist/{chunk-FJGIVDA5.mjs → chunk-7SCCY6SI.mjs} +80 -177
- package/dist/chunk-APDGOKKE.cjs +148 -0
- package/dist/chunk-AZBSVLRM.cjs +132 -0
- package/dist/{chunk-PN676AZF.cjs → chunk-BKPXWRTT.cjs} +6 -6
- package/dist/chunk-CEDPEDNW.cjs +98 -0
- package/dist/chunk-D5RFPV2H.mjs +148 -0
- package/dist/{chunk-BYQVROIP.mjs → chunk-DMRPN25V.mjs} +69 -0
- package/dist/{chunk-724JLMS4.mjs → chunk-F646BZ4Y.mjs} +4 -2
- package/dist/{chunk-C5KVWHIH.cjs → chunk-G2Z5DGMS.cjs} +5 -3
- package/dist/{chunk-L6HYACBE.cjs → chunk-GVNCWSQV.cjs} +145 -127
- package/dist/{chunk-24SP5TGU.mjs → chunk-H4LXPWI2.mjs} +2 -2
- package/dist/chunk-H7BLEEAE.cjs +57 -0
- package/dist/{chunk-JOTUZIM4.cjs → chunk-HUMEHX24.cjs} +2 -2
- package/dist/{chunk-BD3D7EZV.cjs → chunk-IXFOBGLQ.cjs} +9 -3
- package/dist/{chunk-3TB5QGUW.cjs → chunk-JAXDRRRC.cjs} +70 -1
- package/dist/{chunk-32TZ3QTP.cjs → chunk-JDJAPCR2.cjs} +421 -210
- package/dist/{chunk-MHN4UR5U.cjs → chunk-KFZZFZ7J.cjs} +7 -7
- package/dist/chunk-LRJRXXQZ.cjs +109 -0
- package/dist/{chunk-EX4MKHXN.cjs → chunk-LVABUXLA.cjs} +22 -17
- package/dist/{chunk-HCSVR4YZ.mjs → chunk-M3BXTWJM.mjs} +18 -0
- package/dist/{chunk-PYHPXPSW.mjs → chunk-NXO75WY4.mjs} +1 -1
- package/dist/{chunk-BGGWKZ2V.mjs → chunk-OYSGGV6O.mjs} +137 -167
- package/dist/{chunk-JR4QCLJY.cjs → chunk-PDU4P2IC.cjs} +19 -1
- package/dist/chunk-PJEHUSHA.mjs +229 -0
- package/dist/chunk-QGH2RQVF.mjs +132 -0
- package/dist/{chunk-YWMZUGIS.mjs → chunk-R3ZFQJEF.mjs} +247 -34
- package/dist/{chunk-ROQ4C4LJ.cjs → chunk-RACQTC7K.cjs} +274 -371
- package/dist/{chunk-WSOBCAYO.cjs → chunk-RQYTOFQM.cjs} +23 -23
- package/dist/chunk-S34OBRMZ.mjs +109 -0
- package/dist/{chunk-TS4JHGUJ.mjs → chunk-S3ZEMCE6.mjs} +9 -3
- package/dist/{chunk-WWFTAUFG.cjs → chunk-SBH2JLLF.cjs} +12 -2
- package/dist/{chunk-YSLWRWWP.cjs → chunk-SKK6UF5P.cjs} +200 -46
- package/dist/chunk-T7J7E63D.cjs +144 -0
- package/dist/{chunk-SVPGWJZF.mjs → chunk-TESO7EFU.mjs} +125 -107
- package/dist/{chunk-OQ4YXWH4.cjs → chunk-VIVQERJ5.cjs} +320 -351
- package/dist/{chunk-JIYYX7WU.mjs → chunk-VLXNGUKO.mjs} +1 -1
- package/dist/{chunk-OFZUJMCU.mjs → chunk-WPJQN64R.mjs} +195 -41
- package/dist/chunk-XARSG2TG.mjs +144 -0
- package/dist/chunk-XUGFRFD2.mjs +39 -0
- package/dist/{chunk-EH3464KF.cjs → chunk-YBDSTNMH.cjs} +1 -1
- package/dist/{chunk-VLPII2JJ.mjs → chunk-YGZH4T2X.mjs} +1 -1
- package/dist/chunk-YKUEJ3MG.cjs +229 -0
- package/dist/{chunk-4C7KTKX7.mjs → chunk-ZYWJIPKQ.mjs} +1 -1
- package/dist/{client-plugins-CkYwvDJ0.d.mts → client-plugins-Cv0OJtnM.d.mts} +98 -7
- package/dist/{client-plugins-DfeKd0sD.d.ts → client-plugins-kwQuZcWq.d.ts} +98 -7
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +4 -3
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +3 -2
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-N3QLRIQU.mjs → devtools-M22FEFPK.mjs} +4 -4
- package/dist/{devtools-2YHAJYH6.cjs → devtools-MLB3JJMC.cjs} +5 -5
- package/dist/docs.cjs +6 -6
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +5 -5
- package/dist/index-CQOp8EmB.d.mts +48 -0
- package/dist/index-DAl0QTZS.d.ts +48 -0
- package/dist/index.cjs +41 -24
- package/dist/index.d.mts +15 -14
- package/dist/index.d.ts +15 -14
- package/dist/index.mjs +46 -29
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- 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 +29 -15
- package/dist/internal/build-runtime.d.mts +12 -16
- package/dist/internal/build-runtime.d.ts +12 -16
- package/dist/internal/build-runtime.mjs +28 -14
- package/dist/internal/cli-runtime.cjs +23 -11
- package/dist/internal/cli-runtime.mjs +23 -11
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -1
- package/dist/internal/client-runtime.d.mts +1 -0
- package/dist/internal/client-runtime.d.ts +1 -0
- package/dist/internal/client-runtime.mjs +4 -0
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +5 -5
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/form-actions-client.cjs +18 -0
- package/dist/internal/form-actions-client.d.mts +5 -0
- package/dist/internal/form-actions-client.d.ts +5 -0
- package/dist/internal/form-actions-client.mjs +18 -0
- package/dist/internal/form-actions.cjs +18 -0
- package/dist/internal/form-actions.d.mts +14 -0
- package/dist/internal/form-actions.d.ts +14 -0
- package/dist/internal/form-actions.mjs +18 -0
- package/dist/internal/island-codec.cjs +22 -0
- package/dist/internal/island-codec.d.mts +29 -0
- package/dist/internal/island-codec.d.ts +29 -0
- package/dist/internal/island-codec.mjs +22 -0
- package/dist/internal/island-value-store.cjs +13 -0
- package/dist/internal/island-value-store.d.mts +6 -0
- package/dist/internal/island-value-store.d.ts +6 -0
- package/dist/internal/island-value-store.mjs +13 -0
- package/dist/internal/islands-runtime.cjs +77 -0
- package/dist/internal/islands-runtime.d.mts +57 -0
- package/dist/internal/islands-runtime.d.ts +57 -0
- package/dist/internal/islands-runtime.mjs +77 -0
- package/dist/internal/islands-server.cjs +19 -0
- package/dist/internal/islands-server.d.mts +3 -0
- package/dist/internal/islands-server.d.ts +3 -0
- package/dist/internal/islands-server.mjs +19 -0
- package/dist/internal/islx-client.cjs +5 -0
- package/dist/internal/islx-client.d.mts +2 -0
- package/dist/internal/islx-client.d.ts +2 -0
- package/dist/internal/islx-client.mjs +3 -0
- package/dist/internal/islx-react.cjs +4 -0
- package/dist/internal/islx-react.d.mts +1 -0
- package/dist/internal/islx-react.d.ts +1 -0
- package/dist/internal/islx-react.mjs +2 -0
- package/dist/internal/islx-server.cjs +5 -0
- package/dist/internal/islx-server.d.mts +2 -0
- package/dist/internal/islx-server.d.ts +2 -0
- package/dist/internal/islx-server.mjs +3 -0
- package/dist/internal/isolated-boundary.cjs +4 -3
- package/dist/internal/isolated-boundary.d.mts +13 -1
- package/dist/internal/isolated-boundary.d.ts +13 -1
- package/dist/internal/isolated-boundary.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 +24 -7
- package/dist/internal/production-runtime.d.mts +20 -127
- package/dist/internal/production-runtime.d.ts +20 -127
- package/dist/internal/production-runtime.mjs +24 -7
- package/dist/internal/server-tree.cjs +6 -3
- package/dist/internal/server-tree.d.mts +25 -2
- package/dist/internal/server-tree.d.ts +25 -2
- package/dist/internal/server-tree.mjs +7 -4
- package/dist/island-value-protocol-BRayRghM.d.mts +12 -0
- package/dist/island-value-protocol-BRayRghM.d.ts +12 -0
- 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.cjs +5 -4
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +4 -3
- package/dist/og.d.mts +5 -0
- package/dist/og.d.ts +5 -0
- package/dist/plugin.cjs +18 -12
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +17 -11
- package/dist/{production-runtime-DFC7pgbp.d.ts → production-runtime-5nArjFpn.d.ts} +1 -1
- package/dist/{production-runtime-BTkXQdYy.d.mts → production-runtime-BzsF2z5F.d.mts} +1 -1
- package/dist/query/client.cjs +6 -5
- package/dist/query/client.mjs +2 -1
- package/dist/{render-plan-5rFeWmk7.d.mts → render-plan-B9yQorV4.d.mts} +4 -2
- package/dist/{render-plan-BoAK9xFC.d.ts → render-plan-fg6E_HvL.d.ts} +4 -2
- package/dist/renderer/react/server.cjs +7 -6
- package/dist/renderer/react/server.d.mts +3 -1
- package/dist/renderer/react/server.d.ts +3 -1
- package/dist/renderer/react/server.mjs +5 -4
- package/dist/renderer-client.cjs +5 -4
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +2 -1
- package/dist/renderer.d.mts +3 -1
- package/dist/renderer.d.ts +3 -1
- package/dist/{request-BxBWigtl.d.mts → request-C4j_g-BH.d.mts} +1 -1
- package/dist/{request-fciwmd3n.d.ts → request-gz8vFK0n.d.ts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-BLZT0IP0.d.ts → route-rendering-DamyKVi3.d.ts} +1 -1
- package/dist/{route-rendering-BCM1QzEf.d.mts → route-rendering-iTTOwz1f.d.mts} +1 -1
- package/dist/{router-DyZJWc1_.d.mts → router-EoSzHlos.d.mts} +1 -1
- package/dist/{router-CkheNX3-.d.ts → router-OVjDqVo8.d.ts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/rsc-pipeline-LK4K5JFK.mjs +77 -0
- package/dist/rsc-pipeline-YCDRJME4.cjs +77 -0
- package/dist/{runtime-DfU4sKa5.d.ts → runtime-CwiuozLd.d.ts} +1 -1
- package/dist/{runtime-wexvUN5J.d.mts → runtime-DDH4tiuF.d.mts} +1 -1
- package/dist/{schema-dev-notice-5JPE67AI.cjs → schema-dev-notice-77ZL23PL.cjs} +4 -4
- package/dist/{schema-dev-notice-WLPZ6WKU.mjs → schema-dev-notice-BLXOS6U2.mjs} +2 -2
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +56 -38
- package/dist/server.d.mts +15 -10
- package/dist/server.d.ts +15 -10
- package/dist/server.mjs +36 -18
- package/dist/{spa-router-DgsMXqfX.d.mts → spa-router-Br4qFCWf.d.mts} +8 -3
- package/dist/{spa-router-CcejECnG.d.ts → spa-router-BsWUKH73.d.ts} +8 -3
- package/dist/{ssg-1FGaFISl.d.ts → ssg-Csy2vwpi.d.ts} +2 -2
- package/dist/{ssg-Bg4bMMhM.d.mts → ssg-Donyfcxy.d.mts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils-Dxbh6Hgj.d.ts → utils-Luk72LXC.d.ts} +1 -1
- package/dist/{utils-8wtTYiH4.d.mts → utils-d_k1ZZw0.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +18 -12
- package/dist/vite.d.mts +6 -4
- package/dist/vite.d.ts +6 -4
- package/dist/vite.mjs +17 -11
- package/package.json +53 -1
- package/dist/{chunk-35WS7P2V.mjs → chunk-26CXZR6L.mjs} +3 -3
- package/dist/{chunk-QEILRWVV.cjs → chunk-3XEMGDBF.cjs} +2 -2
- package/dist/{chunk-BPOTSHDO.cjs → chunk-IOAUK4OI.cjs} +2 -2
- package/dist/{chunk-BYR3RQPB.mjs → chunk-T76H22WI.mjs} +4 -4
|
@@ -17,7 +17,7 @@ var _chunkFXFKIJDAcjs = require('./chunk-FXFKIJDA.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkIOAUK4OIcjs = require('./chunk-IOAUK4OI.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -43,7 +43,7 @@ function collectSchemaDependencies(owners) {
|
|
|
43
43
|
for (const owner of owners) {
|
|
44
44
|
try {
|
|
45
45
|
known.set(owner.name, _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
46
|
-
for (const model of
|
|
46
|
+
for (const model of _chunkIOAUK4OIcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
47
47
|
creators.set(model.modelName.toLowerCase(), owner.name);
|
|
48
48
|
claimedKeys.set(model.modelKey, owner.name);
|
|
49
49
|
}
|
|
@@ -67,7 +67,7 @@ function collectSchemaDependencies(owners) {
|
|
|
67
67
|
if (creator && creator !== owner.name) needs.add(creator);
|
|
68
68
|
}, "add");
|
|
69
69
|
try {
|
|
70
|
-
for (const model of
|
|
70
|
+
for (const model of _chunkIOAUK4OIcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
71
71
|
for (const field of Object.values(model.model.fields)) {
|
|
72
72
|
if (field.reference) add(referencedTable(owner.name, field.reference.model));
|
|
73
73
|
}
|
|
@@ -131,7 +131,7 @@ function collectSchemaOwners(config) {
|
|
|
131
131
|
resolveClient: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient = _chunkFXFKIJDAcjs.resolveIntegrationOrmRuntimeClient.call(void 0, { config: resolved })))), "resolveClient")
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
for (const declaration of
|
|
134
|
+
for (const declaration of _chunkIOAUK4OIcjs.findSchemaTableOwners.call(void 0, config)) {
|
|
135
135
|
if (owners.some((owner) => owner.name === declaration.name)) continue;
|
|
136
136
|
owners.push({
|
|
137
137
|
name: declaration.name,
|
|
@@ -161,7 +161,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
161
161
|
if (candidate === void 0 || candidate === null) continue;
|
|
162
162
|
let adapter;
|
|
163
163
|
try {
|
|
164
|
-
adapter =
|
|
164
|
+
adapter = _chunkIOAUK4OIcjs.createSchemaExecutor.call(void 0, candidate, owner);
|
|
165
165
|
} catch (e3) {
|
|
166
166
|
continue;
|
|
167
167
|
}
|
|
@@ -181,7 +181,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
181
181
|
return void 0;
|
|
182
182
|
}
|
|
183
183
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveSchemaExecutor, "resolveSchemaExecutor");
|
|
184
|
-
var describeReferencedTable = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (database, table) =>
|
|
184
|
+
var describeReferencedTable = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (database, table) => _chunkIOAUK4OIcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, table), "describeReferencedTable");
|
|
185
185
|
async function checkSchema(config, options = {}) {
|
|
186
186
|
const timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( DEFAULT_TIMEOUT_MS));
|
|
187
187
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
@@ -215,7 +215,7 @@ async function checkSchema(config, options = {}) {
|
|
|
215
215
|
for (const owner of owners) {
|
|
216
216
|
try {
|
|
217
217
|
knownModels.set(owner.name, _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
218
|
-
ownedModels.set(owner.name,
|
|
218
|
+
ownedModels.set(owner.name, _chunkIOAUK4OIcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]]));
|
|
219
219
|
} catch (error) {
|
|
220
220
|
issues.push({
|
|
221
221
|
severity: "error",
|
|
@@ -371,9 +371,9 @@ async function checkSchema(config, options = {}) {
|
|
|
371
371
|
const database = databases.get(owner.name);
|
|
372
372
|
if (!models || !database) continue;
|
|
373
373
|
try {
|
|
374
|
-
const crossOwner = await
|
|
374
|
+
const crossOwner = await _chunkIOAUK4OIcjs.planCrossOwnerReferences.call(void 0,
|
|
375
375
|
owner,
|
|
376
|
-
|
|
376
|
+
_chunkIOAUK4OIcjs.findSchemaTableOwners.call(void 0, config),
|
|
377
377
|
database.dialect,
|
|
378
378
|
database.executor
|
|
379
379
|
);
|
|
@@ -386,7 +386,7 @@ async function checkSchema(config, options = {}) {
|
|
|
386
386
|
onDelete: reference.onDelete
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await
|
|
389
|
+
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await _chunkIOAUK4OIcjs.planOwnerSchemaSteps.call(void 0, {
|
|
390
390
|
owner: owner.name,
|
|
391
391
|
schema: owner.schema,
|
|
392
392
|
steps: owner.migrations,
|
|
@@ -401,15 +401,15 @@ async function checkSchema(config, options = {}) {
|
|
|
401
401
|
const plan = await checkOwnerTables(
|
|
402
402
|
owner,
|
|
403
403
|
// What a pending rename will produce is not missing yet.
|
|
404
|
-
|
|
404
|
+
_chunkIOAUK4OIcjs.withoutRenameTargets.call(void 0, models, stepPlan),
|
|
405
405
|
database.dialect,
|
|
406
406
|
database.executor,
|
|
407
407
|
issues
|
|
408
408
|
);
|
|
409
409
|
const pending = plan.statements.length + (_nullishCoalesce(_optionalChain([plan, 'access', _32 => _32.upgrades, 'optionalAccess', _33 => _33.length]), () => ( 0)));
|
|
410
|
-
const state = pending > 0 ? await
|
|
411
|
-
const changes = state ?
|
|
412
|
-
if (state && changes &&
|
|
410
|
+
const state = pending > 0 ? await _chunkIOAUK4OIcjs.readSchemaState.call(void 0, database.executor, database.dialect, owner.name) : void 0;
|
|
411
|
+
const changes = state ? _chunkIOAUK4OIcjs.diffSchemaSnapshots.call(void 0, state.snapshot, _chunkIOAUK4OIcjs.createSchemaSnapshot.call(void 0, models)) : void 0;
|
|
412
|
+
if (state && changes && _chunkIOAUK4OIcjs.hasSchemaChanges.call(void 0, changes)) {
|
|
413
413
|
const versions = state.version && owner.version && state.version !== owner.version ? `upgraded ${state.version} \u2192 ${owner.version}` : "changed since it was last migrated";
|
|
414
414
|
issues.push({
|
|
415
415
|
severity: "warning",
|
|
@@ -446,7 +446,7 @@ async function checkSchema(config, options = {}) {
|
|
|
446
446
|
}
|
|
447
447
|
_chunkS3JO3N4Hcjs.__name.call(void 0, checkSchema, "checkSchema");
|
|
448
448
|
async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
449
|
-
const plan = await
|
|
449
|
+
const plan = await _chunkIOAUK4OIcjs.planSchemaMigration.call(void 0, models, dialect, executor);
|
|
450
450
|
const present = /* @__PURE__ */ new Set([
|
|
451
451
|
...plan.upToDate,
|
|
452
452
|
...plan.drift.map((drift) => drift.table),
|
|
@@ -527,7 +527,7 @@ async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
|
527
527
|
table: key.table,
|
|
528
528
|
column: key.column,
|
|
529
529
|
message: `"${key.table}.${key.column}" has no foreign key to "${key.referencedTable}.${key.referencedColumn}", which ${owner.name} could have.`,
|
|
530
|
-
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${
|
|
530
|
+
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${_chunkIOAUK4OIcjs.describeForeignKeyApproval.call(void 0, { owner: owner.name, modelKey: key.modelKey })}\` in farm.config, then run \`farm ${owner.name} migrate --apply\`. Rows that point at nothing are checked first.`
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
return plan;
|
|
@@ -611,9 +611,9 @@ async function checkReferences(owner, models, database, databases, resolveTarget
|
|
|
611
611
|
continue;
|
|
612
612
|
}
|
|
613
613
|
if (database.dialect === "sqlite" || dialect === "sqlite") continue;
|
|
614
|
-
const expected =
|
|
615
|
-
const mine =
|
|
616
|
-
const theirs =
|
|
614
|
+
const expected = _chunkIOAUK4OIcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
615
|
+
const mine = _chunkIOAUK4OIcjs.columnTypeFamily.call(void 0, expected);
|
|
616
|
+
const theirs = _chunkIOAUK4OIcjs.columnTypeFamily.call(void 0, column.type);
|
|
617
617
|
if (mine && theirs && mine !== theirs) {
|
|
618
618
|
issues.push({
|
|
619
619
|
severity: "warning",
|
|
@@ -632,7 +632,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, checkReferences, "checkReferences");
|
|
|
632
632
|
async function checkExtensions(owner, extensions, databaseForTable, ownDatabase, allowExtend, issues) {
|
|
633
633
|
for (const extension of extensions) {
|
|
634
634
|
const database = _nullishCoalesce(databaseForTable(extension.table), () => ( ownDatabase));
|
|
635
|
-
const table = await
|
|
635
|
+
const table = await _chunkIOAUK4OIcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, extension.table);
|
|
636
636
|
const columns = extension.fields.map(({ field }) => field.name);
|
|
637
637
|
if (!table) {
|
|
638
638
|
issues.push({
|
|
@@ -664,9 +664,9 @@ async function checkExtensions(owner, extensions, databaseForTable, ownDatabase,
|
|
|
664
664
|
continue;
|
|
665
665
|
}
|
|
666
666
|
if (database.dialect === "sqlite") continue;
|
|
667
|
-
const expected =
|
|
668
|
-
const mine =
|
|
669
|
-
const theirs =
|
|
667
|
+
const expected = _chunkIOAUK4OIcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
668
|
+
const mine = _chunkIOAUK4OIcjs.columnTypeFamily.call(void 0, expected);
|
|
669
|
+
const theirs = _chunkIOAUK4OIcjs.columnTypeFamily.call(void 0, existing.type);
|
|
670
670
|
if (mine && theirs && mine !== theirs) {
|
|
671
671
|
issues.push({
|
|
672
672
|
severity: "warning",
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatOptionalPeerInstallHint,
|
|
3
|
+
isMissingPackageError
|
|
4
|
+
} from "./chunk-YOZYCI6Z.mjs";
|
|
5
|
+
import {
|
|
6
|
+
logger
|
|
7
|
+
} from "./chunk-KI3MESHB.mjs";
|
|
8
|
+
import {
|
|
9
|
+
__name
|
|
10
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
11
|
+
|
|
12
|
+
// src/build/tailwind.ts
|
|
13
|
+
import path from "path";
|
|
14
|
+
|
|
15
|
+
// src/build/vite-plugin-compat.ts
|
|
16
|
+
function adaptTailwindVitePlugin(pluginOption, builder) {
|
|
17
|
+
if (builder !== "rolldown") return pluginOption;
|
|
18
|
+
return adaptPluginOption(pluginOption);
|
|
19
|
+
}
|
|
20
|
+
__name(adaptTailwindVitePlugin, "adaptTailwindVitePlugin");
|
|
21
|
+
function adaptPluginOption(pluginOption) {
|
|
22
|
+
if (Array.isArray(pluginOption)) return pluginOption.map(adaptPluginOption);
|
|
23
|
+
if (!pluginOption || typeof pluginOption !== "object") return pluginOption;
|
|
24
|
+
const plugin = pluginOption;
|
|
25
|
+
if (!plugin.name?.startsWith("@tailwindcss/vite:generate:")) return pluginOption;
|
|
26
|
+
if (isVitePluginHook(plugin.transform)) {
|
|
27
|
+
return {
|
|
28
|
+
...plugin,
|
|
29
|
+
transform: withVite5TransformContext(plugin.transform)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (plugin.transform && typeof plugin.transform === "object" && "handler" in plugin.transform && isVitePluginHook(plugin.transform.handler)) {
|
|
33
|
+
return {
|
|
34
|
+
...plugin,
|
|
35
|
+
transform: {
|
|
36
|
+
...plugin.transform,
|
|
37
|
+
handler: withVite5TransformContext(plugin.transform.handler)
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return pluginOption;
|
|
42
|
+
}
|
|
43
|
+
__name(adaptPluginOption, "adaptPluginOption");
|
|
44
|
+
function isVitePluginHook(value) {
|
|
45
|
+
return typeof value === "function";
|
|
46
|
+
}
|
|
47
|
+
__name(isVitePluginHook, "isVitePluginHook");
|
|
48
|
+
function withVite5TransformContext(handler) {
|
|
49
|
+
return function(...args) {
|
|
50
|
+
const context = new Proxy(this, {
|
|
51
|
+
get(target, property, receiver) {
|
|
52
|
+
if (property === "environment") return void 0;
|
|
53
|
+
return Reflect.get(target, property, receiver);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return handler.apply(context, args);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
__name(withVite5TransformContext, "withVite5TransformContext");
|
|
60
|
+
|
|
61
|
+
// src/build/tailwind.ts
|
|
62
|
+
var TAILWIND_CSS_IMPORT = /@import\s+["']tailwindcss["']/;
|
|
63
|
+
var TAILWIND_VITE_INSTALL_HINT = formatOptionalPeerInstallHint(
|
|
64
|
+
"@tailwindcss/vite",
|
|
65
|
+
"enable built-in Tailwind CSS support",
|
|
66
|
+
{ dev: true }
|
|
67
|
+
);
|
|
68
|
+
var warnedMissingTailwind = false;
|
|
69
|
+
async function loadTailwindVitePlugin(options = {}, importTailwind = () => import("@tailwindcss/vite")) {
|
|
70
|
+
try {
|
|
71
|
+
const tailwindVite = (await importTailwind()).default;
|
|
72
|
+
const plugin = options.builder ? adaptTailwindVitePlugin(tailwindVite(), options.builder) : tailwindVite();
|
|
73
|
+
if (options.announce) logger.info("\u{1F4E6} Enabled built-in Tailwind support (@tailwindcss/vite)");
|
|
74
|
+
return plugin;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (isMissingPackageError(error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
|
|
77
|
+
logger.warn(
|
|
78
|
+
`Tailwind plugin auto-enable failed${options.label ? ` ${options.label}` : ""}; continuing without it: ${error.message}`
|
|
79
|
+
);
|
|
80
|
+
return void 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
__name(loadTailwindVitePlugin, "loadTailwindVitePlugin");
|
|
84
|
+
function createMissingTailwindPlugin() {
|
|
85
|
+
let root = process.cwd();
|
|
86
|
+
return {
|
|
87
|
+
name: "farm:tailwind-missing",
|
|
88
|
+
enforce: "pre",
|
|
89
|
+
configResolved(config) {
|
|
90
|
+
root = config.root;
|
|
91
|
+
},
|
|
92
|
+
transform(code, id) {
|
|
93
|
+
if (warnedMissingTailwind || !/\.css(?:\?.*)?$/.test(id) || !TAILWIND_CSS_IMPORT.test(code)) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
warnedMissingTailwind = true;
|
|
97
|
+
const file = path.relative(root, id.split("?", 1)[0]).replace(/\\/g, "/");
|
|
98
|
+
logger.warn(
|
|
99
|
+
`${file} imports Tailwind CSS, but @tailwindcss/vite is not installed; continuing without Tailwind. ${TAILWIND_VITE_INSTALL_HINT}`
|
|
100
|
+
);
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
__name(createMissingTailwindPlugin, "createMissingTailwindPlugin");
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
loadTailwindVitePlugin
|
|
109
|
+
};
|
|
@@ -18,6 +18,9 @@ import {
|
|
|
18
18
|
renderMetadataHead,
|
|
19
19
|
resolveMetadataTitle
|
|
20
20
|
} from "./chunk-73WX6PRY.mjs";
|
|
21
|
+
import {
|
|
22
|
+
getFarmIslandValueHeaders
|
|
23
|
+
} from "./chunk-2NXO5SBY.mjs";
|
|
21
24
|
import {
|
|
22
25
|
createFarmDeploymentMismatchError,
|
|
23
26
|
createFarmDeploymentRequestHeaders,
|
|
@@ -300,7 +303,8 @@ var _SPARouter = class _SPARouter {
|
|
|
300
303
|
replace,
|
|
301
304
|
scroll,
|
|
302
305
|
state,
|
|
303
|
-
url
|
|
306
|
+
url,
|
|
307
|
+
refresh
|
|
304
308
|
}) : Promise.resolve()
|
|
305
309
|
);
|
|
306
310
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
@@ -527,7 +531,7 @@ var _SPARouter = class _SPARouter {
|
|
|
527
531
|
this.updateDocumentMetadata(options.pageData.metadata);
|
|
528
532
|
_hydrateFarmI18n(options.pageData.i18n);
|
|
529
533
|
if (this.onNavigate) {
|
|
530
|
-
await this.onNavigate(options.pageData);
|
|
534
|
+
await this.onNavigate(options.pageData, { refresh: options.refresh === true });
|
|
531
535
|
}
|
|
532
536
|
if (options.scroll) {
|
|
533
537
|
if (options.url.hash) {
|
|
@@ -629,7 +633,9 @@ var _SPARouter = class _SPARouter {
|
|
|
629
633
|
Accept: "application/x-farm-deferred+json, application/json",
|
|
630
634
|
"X-Farm-SPA": "1",
|
|
631
635
|
...activeLayoutChain ? { "X-Farm-Layout-Chain": activeLayoutChain } : {},
|
|
632
|
-
...interceptFrom ? { "X-Farm-Intercept-From": interceptFrom } : {}
|
|
636
|
+
...interceptFrom ? { "X-Farm-Intercept-From": interceptFrom } : {},
|
|
637
|
+
// Islands mode: the server leaves out island values this browser holds.
|
|
638
|
+
...getFarmIslandValueHeaders()
|
|
633
639
|
})
|
|
634
640
|
});
|
|
635
641
|
if (isFarmDeploymentMismatchResponse(response, this.options.deploymentId)) {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
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
3
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
4
|
|
|
5
|
+
// src/client/action-reference.ts
|
|
6
|
+
var ACTION_IDS_KEY = /* @__PURE__ */ Symbol.for("farm.form-actions.ids");
|
|
7
|
+
function getFarmActionId(value) {
|
|
8
|
+
if (typeof value !== "function") return void 0;
|
|
9
|
+
const scope = globalThis;
|
|
10
|
+
return _optionalChain([scope, 'access', _ => _[ACTION_IDS_KEY], 'optionalAccess', _2 => _2.get, 'call', _3 => _3(value)]);
|
|
11
|
+
}
|
|
12
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getFarmActionId, "getFarmActionId");
|
|
13
|
+
|
|
5
14
|
// src/client/client-reference.ts
|
|
6
15
|
var CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("farm.isolated-hydration.client-reference");
|
|
7
16
|
function markFarmClientReference(boundary, reference) {
|
|
@@ -42,4 +51,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, updateFarmServerTreeModule, "updateFarmSer
|
|
|
42
51
|
|
|
43
52
|
|
|
44
53
|
|
|
45
|
-
|
|
54
|
+
|
|
55
|
+
exports.getFarmActionId = getFarmActionId; exports.markFarmClientReference = markFarmClientReference; exports.getFarmClientReference = getFarmClientReference; exports.subscribeFarmServerTreeUpdates = subscribeFarmServerTreeUpdates; exports.updateFarmServerTreeModule = updateFarmServerTreeModule;
|