@farm.js/core 0.1.0-beta.13 → 0.1.0-beta.16
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/api/route-manager.cjs.map +1 -1
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.cjs.map +1 -1
- package/dist/api/runtime.mjs +1 -1
- package/dist/api.cjs +18 -10
- package/dist/api.cjs.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-B232I2GP.mjs → chunk-3HIVDX7J.mjs} +12 -1
- package/dist/chunk-3HIVDX7J.mjs.map +1 -0
- package/dist/{chunk-JDEOUK5V.mjs → chunk-6YXKHAFU.mjs} +3 -3
- package/dist/{chunk-VSDZEB5M.mjs → chunk-AN3PQVKH.mjs} +14 -16
- package/dist/{chunk-VSDZEB5M.mjs.map → chunk-AN3PQVKH.mjs.map} +1 -1
- package/dist/{chunk-Z5CQMP54.mjs → chunk-ARRYKOI5.mjs} +2 -2
- package/dist/{chunk-KLA67WKG.mjs → chunk-B3FFOIWS.mjs} +2 -2
- package/dist/{chunk-3WIRO3N7.mjs → chunk-BWJC5ZOD.mjs} +2 -2
- package/dist/{chunk-3WIRO3N7.mjs.map → chunk-BWJC5ZOD.mjs.map} +1 -1
- package/dist/{chunk-PFE6GMNE.mjs → chunk-HMRFYJK6.mjs} +19 -11
- package/dist/chunk-HMRFYJK6.mjs.map +1 -0
- package/dist/{chunk-32W4QEJP.mjs → chunk-KFTGPFRD.mjs} +1 -1
- package/dist/chunk-KFTGPFRD.mjs.map +1 -0
- package/dist/{chunk-Z3YG4OZT.mjs → chunk-OSWV5IJB.mjs} +140 -41
- package/dist/chunk-OSWV5IJB.mjs.map +1 -0
- package/dist/{chunk-OPHK6OJN.mjs → chunk-SLDBGSC3.mjs} +2 -2
- package/dist/{chunk-L2PE36GQ.mjs → chunk-T2KL7VEL.mjs} +3 -3
- package/dist/{chunk-WDU6QXNK.mjs → chunk-UCYWGN2P.mjs} +1 -1
- package/dist/chunk-UCYWGN2P.mjs.map +1 -0
- package/dist/{chunk-65A7QIKI.mjs → chunk-UMVLB3PN.mjs} +3 -3
- package/dist/chunk-UMVLB3PN.mjs.map +1 -0
- package/dist/{chunk-VY2UYN5R.mjs → chunk-VPCFICID.mjs} +82 -3
- package/dist/chunk-VPCFICID.mjs.map +1 -0
- package/dist/{chunk-H3TE3LOV.mjs → chunk-XMFTIVJH.mjs} +2 -2
- package/dist/{chunk-UB5UOSHB.mjs → chunk-ZVMV3THA.mjs} +71 -2
- package/dist/chunk-ZVMV3THA.mjs.map +1 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/deployment.cjs +12 -0
- package/dist/deployment.cjs.map +1 -1
- package/dist/deployment.mjs +3 -1
- package/dist/{devtools-GAZ7F3KL.mjs → devtools-E4YNCY5J.mjs} +4 -4
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.mjs +4 -4
- package/dist/index.cjs +332 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +28 -16
- package/dist/index.mjs.map +1 -1
- package/dist/internal/build-runtime.cjs +159 -46
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.mjs +11 -11
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.mjs +3 -3
- package/dist/plugin.cjs +141 -34
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.mjs +8 -8
- package/dist/server-action-security.cjs +23 -1
- package/dist/server-action-security.cjs.map +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/server-fn-client.cjs.map +1 -1
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs +140 -3
- package/dist/server-fn.cjs.map +1 -1
- package/dist/server-fn.mjs +14 -3
- package/dist/server-query.cjs +99 -1
- package/dist/server-query.cjs.map +1 -1
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +260 -37
- package/dist/server.cjs.map +1 -1
- package/dist/server.mjs +11 -11
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.mjs +3 -3
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +142 -35
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +8 -8
- package/package.json +1 -1
- package/types/client.d.ts +115 -4
- package/dist/chunk-32W4QEJP.mjs.map +0 -1
- package/dist/chunk-65A7QIKI.mjs.map +0 -1
- package/dist/chunk-B232I2GP.mjs.map +0 -1
- package/dist/chunk-PFE6GMNE.mjs.map +0 -1
- package/dist/chunk-UB5UOSHB.mjs.map +0 -1
- package/dist/chunk-VY2UYN5R.mjs.map +0 -1
- package/dist/chunk-WDU6QXNK.mjs.map +0 -1
- package/dist/chunk-Z3YG4OZT.mjs.map +0 -1
- /package/dist/{chunk-JDEOUK5V.mjs.map → chunk-6YXKHAFU.mjs.map} +0 -0
- /package/dist/{chunk-Z5CQMP54.mjs.map → chunk-ARRYKOI5.mjs.map} +0 -0
- /package/dist/{chunk-KLA67WKG.mjs.map → chunk-B3FFOIWS.mjs.map} +0 -0
- /package/dist/{chunk-OPHK6OJN.mjs.map → chunk-SLDBGSC3.mjs.map} +0 -0
- /package/dist/{chunk-L2PE36GQ.mjs.map → chunk-T2KL7VEL.mjs.map} +0 -0
- /package/dist/{chunk-H3TE3LOV.mjs.map → chunk-XMFTIVJH.mjs.map} +0 -0
- /package/dist/{devtools-GAZ7F3KL.mjs.map → devtools-E4YNCY5J.mjs.map} +0 -0
package/dist/testing.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithServerActionRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZVMV3THA.mjs";
|
|
4
|
+
import "./chunk-ARRYKOI5.mjs";
|
|
5
5
|
import "./chunk-2ED5Q2GH.mjs";
|
|
6
6
|
import "./chunk-GN72QAIH.mjs";
|
|
7
7
|
import "./chunk-FQYDHKKU.mjs";
|
|
@@ -17,7 +17,7 @@ import "./chunk-J4FNJ5IU.mjs";
|
|
|
17
17
|
import {
|
|
18
18
|
invokeAPIRouteEndpoint,
|
|
19
19
|
matchAPIRoute
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HMRFYJK6.mjs";
|
|
21
21
|
import "./chunk-RHIFZZUI.mjs";
|
|
22
22
|
import "./chunk-LM2YNO4U.mjs";
|
|
23
23
|
import "./chunk-44ZCFSKE.mjs";
|
package/dist/version.cjs
CHANGED
package/dist/version.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts","../package.json"],"sourcesContent":["import { version } from \"../package.json\";\n\nexport const FARM_VERSION = version;\n","{\n \"name\": \"@farm.js/core\",\n \"version\": \"0.1.0-beta.13\",\n \"description\": \"Core Farm.js framework for modern integrated apps\",\n \"keywords\": [\n \"@farm.js/core\",\n \"framework\",\n \"react\",\n \"rsc\",\n \"server-components\",\n \"ssr\",\n \"vite\"\n ],\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/farming-labs/farm.js\",\n \"directory\": \"packages/farm\"\n },\n \"files\": [\n \"dist\",\n \"types\"\n ],\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"middleware\": [\n \"./types/middleware.d.ts\",\n \"./dist/middleware.d.ts\"\n ],\n \"version\": [\n \"./dist/version.d.ts\"\n ],\n \"router\": [\n \"./dist/router.d.ts\"\n ],\n \"routes\": [\n \"./dist/routes.d.ts\"\n ],\n \"storage\": [\n \"./dist/storage.d.ts\"\n ],\n \"integrations\": [\n \"./dist/integrations.d.ts\"\n ],\n \"cache\": [\n \"./dist/cache.d.ts\"\n ],\n \"deferred\": [\n \"./dist/deferred.d.ts\"\n ],\n \"after\": [\n \"./dist/after.d.ts\"\n ],\n \"navigation\": [\n \"./dist/navigation.d.ts\"\n ],\n \"headers\": [\n \"./dist/headers.d.ts\"\n ],\n \"docs\": [\n \"./dist/docs.d.ts\"\n ],\n \"markdown\": [\n \"./dist/markdown.d.ts\"\n ],\n \"app-markdown\": [\n \"./dist/app-markdown.d.ts\"\n ],\n \"observability\": [\n \"./dist/observability.d.ts\"\n ],\n \"workflows\": [\n \"./dist/workflows.d.ts\"\n ],\n \"cron\": [\n \"./dist/cron.d.ts\"\n ],\n \"server-fn\": [\n \"./dist/server-fn.d.ts\"\n ],\n \"server-fn/client\": [\n \"./dist/server-fn-client.d.ts\"\n ],\n \"server-action-security\": [\n \"./dist/server-action-security.d.ts\"\n ],\n \"deployment\": [\n \"./dist/deployment.d.ts\"\n ],\n \"env\": [\n \"./dist/env.d.ts\"\n ],\n \"env-types\": [\n \"./dist/env-types.d.ts\"\n ],\n \"environment\": [\n \"./dist/environment.d.ts\"\n ],\n \"environment/vite\": [\n \"./dist/environment/vite.d.ts\"\n ],\n \"font\": [\n \"./dist/font.d.ts\"\n ],\n \"testing\": [\n \"./dist/testing.d.ts\"\n ],\n \"agent-runtime\": [\n \"./dist/agent-runtime.d.ts\"\n ],\n \"image\": [\n \"./types/image.d.ts\",\n \"./dist/image.d.ts\"\n ],\n \"image/server\": [\n \"./dist/image/server.d.ts\"\n ],\n \"image/sharp\": [\n \"./dist/image/sharp.d.ts\"\n ],\n \"i18n\": [\n \"./dist/i18n/index.d.ts\"\n ],\n \"i18n/server\": [\n \"./dist/i18n/server.d.ts\"\n ],\n \"i18n/client\": [\n \"./dist/i18n/client.d.ts\"\n ],\n \"internal/production-runtime\": [\n \"./dist/internal/production-runtime.d.ts\"\n ],\n \"internal/metadata-image-runtime\": [\n \"./dist/internal/metadata-image-runtime.d.ts\"\n ],\n \"internal/client-runtime\": [\n \"./dist/internal/client-runtime.d.ts\"\n ],\n \"internal/build-runtime\": [\n \"./dist/internal/build-runtime.d.ts\"\n ],\n \"internal/config-runtime\": [\n \"./dist/internal/config-runtime.d.ts\"\n ],\n \"internal/production-node-env\": [\n \"./dist/internal/production-node-env.d.ts\"\n ],\n \"config\": [\n \"./dist/config.d.ts\"\n ],\n \"api\": [\n \"./types/api.d.ts\",\n \"./dist/api.d.ts\"\n ],\n \"api/route-manager\": [\n \"./dist/api/route-manager.d.ts\"\n ],\n \"api/runtime\": [\n \"./dist/api/runtime.d.ts\"\n ],\n \"request\": [\n \"./dist/request.d.ts\"\n ],\n \"client\": [\n \"./types/client.d.ts\",\n \"./dist/client.d.ts\"\n ],\n \"server\": [\n \"./dist/server.d.ts\"\n ],\n \"vite\": [\n \"./dist/vite.d.ts\"\n ],\n \"plugin\": [\n \"./dist/plugin.d.ts\"\n ],\n \"query\": [\n \"./dist/query/index.d.ts\"\n ],\n \"*\": [\n \"./dist/*.d.ts\"\n ]\n }\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.cjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./version\": {\n \"types\": \"./dist/version.d.ts\",\n \"import\": \"./dist/version.mjs\",\n \"require\": \"./dist/version.cjs\"\n },\n \"./config\": {\n \"types\": \"./dist/config.d.ts\",\n \"import\": \"./dist/config.mjs\",\n \"require\": \"./dist/config.cjs\"\n },\n \"./server\": {\n \"types\": \"./dist/server.d.ts\",\n \"import\": \"./dist/server.mjs\",\n \"require\": \"./dist/server.cjs\"\n },\n \"./client\": {\n \"types\": \"./types/client.d.ts\",\n \"import\": \"./dist/client.mjs\",\n \"require\": \"./dist/client.cjs\"\n },\n \"./storage\": {\n \"types\": \"./dist/storage.d.ts\",\n \"import\": \"./dist/storage.mjs\",\n \"require\": \"./dist/storage.cjs\"\n },\n \"./integrations\": {\n \"types\": \"./dist/integrations.d.ts\",\n \"import\": \"./dist/integrations.mjs\",\n \"require\": \"./dist/integrations.cjs\"\n },\n \"./cache\": {\n \"types\": \"./dist/cache.d.ts\",\n \"import\": \"./dist/cache.mjs\",\n \"require\": \"./dist/cache.cjs\"\n },\n \"./deferred\": {\n \"types\": \"./dist/deferred.d.ts\",\n \"import\": \"./dist/deferred.mjs\",\n \"require\": \"./dist/deferred.cjs\"\n },\n \"./after\": {\n \"types\": \"./dist/after.d.ts\",\n \"import\": \"./dist/after.mjs\",\n \"require\": \"./dist/after.cjs\"\n },\n \"./navigation\": {\n \"types\": \"./dist/navigation.d.ts\",\n \"import\": \"./dist/navigation.mjs\",\n \"require\": \"./dist/navigation.cjs\"\n },\n \"./headers\": {\n \"types\": \"./dist/headers.d.ts\",\n \"import\": \"./dist/headers.mjs\",\n \"require\": \"./dist/headers.cjs\"\n },\n \"./docs\": {\n \"types\": \"./dist/docs.d.ts\",\n \"import\": \"./dist/docs.mjs\",\n \"require\": \"./dist/docs.cjs\"\n },\n \"./markdown\": {\n \"types\": \"./dist/markdown.d.ts\",\n \"import\": \"./dist/markdown.mjs\",\n \"require\": \"./dist/markdown.cjs\"\n },\n \"./app-markdown\": {\n \"types\": \"./dist/app-markdown.d.ts\",\n \"import\": \"./dist/app-markdown.mjs\",\n \"require\": \"./dist/app-markdown.cjs\"\n },\n \"./observability\": {\n \"types\": \"./dist/observability.d.ts\",\n \"import\": \"./dist/observability.mjs\",\n \"require\": \"./dist/observability.cjs\"\n },\n \"./workflows\": {\n \"types\": \"./dist/workflows.d.ts\",\n \"import\": \"./dist/workflows.mjs\",\n \"require\": \"./dist/workflows.cjs\"\n },\n \"./cron\": {\n \"types\": \"./dist/cron.d.ts\",\n \"import\": \"./dist/cron.mjs\",\n \"require\": \"./dist/cron.cjs\"\n },\n \"./server-fn\": {\n \"types\": \"./dist/server-fn.d.ts\",\n \"import\": \"./dist/server-fn.mjs\",\n \"require\": \"./dist/server-fn.cjs\"\n },\n \"./server-fn/client\": {\n \"types\": \"./dist/server-fn-client.d.ts\",\n \"import\": \"./dist/server-fn-client.mjs\",\n \"require\": \"./dist/server-fn-client.cjs\"\n },\n \"./server-query\": {\n \"types\": \"./dist/server-query.d.ts\",\n \"import\": \"./dist/server-query.mjs\",\n \"require\": \"./dist/server-query.cjs\"\n },\n \"./server-query/client\": {\n \"types\": \"./dist/server-query-client.d.ts\",\n \"import\": \"./dist/server-query-client.mjs\",\n \"require\": \"./dist/server-query-client.cjs\"\n },\n \"./server-action-security\": {\n \"types\": \"./dist/server-action-security.d.ts\",\n \"import\": \"./dist/server-action-security.mjs\",\n \"require\": \"./dist/server-action-security.cjs\"\n },\n \"./deployment\": {\n \"types\": \"./dist/deployment.d.ts\",\n \"import\": \"./dist/deployment.mjs\",\n \"require\": \"./dist/deployment.cjs\"\n },\n \"./env\": {\n \"types\": \"./dist/env.d.ts\",\n \"import\": \"./dist/env.mjs\",\n \"require\": \"./dist/env.cjs\"\n },\n \"./env-types\": {\n \"types\": \"./dist/env-types.d.ts\",\n \"import\": \"./dist/env-types.mjs\",\n \"require\": \"./dist/env-types.cjs\"\n },\n \"./environment\": {\n \"types\": \"./dist/environment.d.ts\",\n \"import\": \"./dist/environment.mjs\",\n \"require\": \"./dist/environment.cjs\"\n },\n \"./environment/vite\": {\n \"types\": \"./dist/environment/vite.d.ts\",\n \"import\": \"./dist/environment/vite.mjs\",\n \"require\": \"./dist/environment/vite.cjs\"\n },\n \"./font\": {\n \"types\": \"./dist/font.d.ts\",\n \"import\": \"./dist/font.mjs\",\n \"require\": \"./dist/font.cjs\"\n },\n \"./vite\": {\n \"types\": \"./dist/vite.d.ts\",\n \"import\": \"./dist/vite.mjs\",\n \"require\": \"./dist/vite.cjs\"\n },\n \"./plugin\": {\n \"types\": \"./dist/plugin.d.ts\",\n \"import\": \"./dist/plugin.mjs\",\n \"require\": \"./dist/plugin.cjs\"\n },\n \"./plugin/server\": {\n \"types\": \"./dist/server-plugins.d.ts\",\n \"import\": \"./dist/server-plugins.mjs\",\n \"require\": \"./dist/server-plugins.cjs\"\n },\n \"./plugin/client\": {\n \"types\": \"./dist/client-plugins.d.ts\",\n \"import\": \"./dist/client-plugins.mjs\",\n \"require\": \"./dist/client-plugins.cjs\"\n },\n \"./query\": {\n \"types\": \"./dist/query/index.d.ts\",\n \"import\": \"./dist/query/index.mjs\",\n \"require\": \"./dist/query/index.cjs\"\n },\n \"./query/parsers\": {\n \"types\": \"./dist/query/parsers.d.ts\",\n \"import\": \"./dist/query/parsers.mjs\",\n \"require\": \"./dist/query/parsers.cjs\"\n },\n \"./query/client\": {\n \"types\": \"./dist/query/client.d.ts\",\n \"import\": \"./dist/query/client.mjs\",\n \"require\": \"./dist/query/client.cjs\"\n },\n \"./query/server\": {\n \"types\": \"./dist/query/server.d.ts\",\n \"import\": \"./dist/query/server.mjs\",\n \"require\": \"./dist/query/server.cjs\"\n },\n \"./middleware\": {\n \"types\": \"./dist/middleware.d.ts\",\n \"import\": \"./dist/middleware.mjs\",\n \"require\": \"./dist/middleware.cjs\"\n },\n \"./api\": {\n \"types\": \"./dist/api.d.ts\",\n \"import\": \"./dist/api.mjs\",\n \"require\": \"./dist/api.cjs\"\n },\n \"./api/route-manager\": {\n \"types\": \"./dist/api/route-manager.d.ts\",\n \"import\": \"./dist/api/route-manager.mjs\",\n \"require\": \"./dist/api/route-manager.cjs\"\n },\n \"./api/runtime\": {\n \"types\": \"./dist/api/runtime.d.ts\",\n \"import\": \"./dist/api/runtime.mjs\",\n \"require\": \"./dist/api/runtime.cjs\"\n },\n \"./request\": {\n \"types\": \"./dist/request.d.ts\",\n \"import\": \"./dist/request.mjs\",\n \"require\": \"./dist/request.cjs\"\n },\n \"./router\": {\n \"types\": \"./dist/router.d.ts\",\n \"import\": \"./dist/router.mjs\",\n \"require\": \"./dist/router.cjs\"\n },\n \"./routes\": {\n \"types\": \"./dist/routes.d.ts\",\n \"import\": \"./dist/routes.mjs\",\n \"require\": \"./dist/routes.cjs\"\n },\n \"./testing\": {\n \"types\": \"./dist/testing.d.ts\",\n \"import\": \"./dist/testing.mjs\",\n \"require\": \"./dist/testing.cjs\"\n },\n \"./agent-runtime\": {\n \"types\": \"./dist/agent-runtime.d.ts\",\n \"import\": \"./dist/agent-runtime.mjs\",\n \"require\": \"./dist/agent-runtime.cjs\"\n },\n \"./image\": {\n \"types\": \"./types/image.d.ts\",\n \"import\": \"./dist/image.mjs\",\n \"require\": \"./dist/image.cjs\"\n },\n \"./image/server\": {\n \"types\": \"./dist/image/server.d.ts\",\n \"import\": \"./dist/image/server.mjs\",\n \"require\": \"./dist/image/server.cjs\"\n },\n \"./image/sharp\": {\n \"types\": \"./dist/image/sharp.d.ts\",\n \"import\": \"./dist/image/sharp.mjs\",\n \"require\": \"./dist/image/sharp.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.mjs\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./i18n/server\": {\n \"types\": \"./dist/i18n/server.d.ts\",\n \"import\": \"./dist/i18n/server.mjs\",\n \"require\": \"./dist/i18n/server.cjs\"\n },\n \"./i18n/client\": {\n \"types\": \"./dist/i18n/client.d.ts\",\n \"import\": \"./dist/i18n/client.mjs\",\n \"require\": \"./dist/i18n/client.cjs\"\n },\n \"./internal/production-runtime\": {\n \"types\": \"./dist/internal/production-runtime.d.ts\",\n \"import\": \"./dist/internal/production-runtime.mjs\",\n \"require\": \"./dist/internal/production-runtime.cjs\"\n },\n \"./internal/metadata-image-runtime\": {\n \"types\": \"./dist/internal/metadata-image-runtime.d.ts\",\n \"import\": \"./dist/internal/metadata-image-runtime.mjs\",\n \"require\": \"./dist/internal/metadata-image-runtime.cjs\"\n },\n \"./internal/client-runtime\": {\n \"types\": \"./dist/internal/client-runtime.d.ts\",\n \"import\": \"./dist/internal/client-runtime.mjs\",\n \"require\": \"./dist/internal/client-runtime.cjs\"\n },\n \"./internal/build-runtime\": {\n \"types\": \"./dist/internal/build-runtime.d.ts\",\n \"import\": \"./dist/internal/build-runtime.mjs\",\n \"require\": \"./dist/internal/build-runtime.cjs\"\n },\n \"./internal/config-runtime\": {\n \"types\": \"./dist/internal/config-runtime.d.ts\",\n \"import\": \"./dist/internal/config-runtime.mjs\",\n \"require\": \"./dist/internal/config-runtime.cjs\"\n },\n \"./internal/production-node-env\": {\n \"types\": \"./dist/internal/production-node-env.d.ts\",\n \"import\": \"./dist/internal/production-node-env.mjs\",\n \"require\": \"./dist/internal/production-node-env.cjs\"\n }\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:runtime\": \"tsup --config tsup.runtime.config.ts\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:coverage\": \"vitest --coverage\",\n \"lint\": \"biome lint .\",\n \"lint:fix\": \"biome lint --write .\",\n \"format\": \"biome format --write .\",\n \"type-check\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\"\n },\n \"dependencies\": {\n \"@farming-labs/docs\": \"^0.2.44\",\n \"@farming-labs/orm\": \"0.0.62\",\n \"@farming-labs/orm-runtime\": \"0.0.62\",\n \"@formatjs/icu-messageformat-parser\": \"3.5.15\",\n \"@mdx-js/mdx\": \"^3.1.1\",\n \"@scalar/api-reference\": \"^1.38.1\",\n \"@scalar/openapi-parser\": \"^0.22.3\",\n \"@tailwindcss/vite\": \"4.1.18\",\n \"@vercel/og\": \"0.11.1\",\n \"@vitejs/plugin-react\": \"^4.2.1\",\n \"better-call\": \"^1.0.19\",\n \"db0\": \"^0.3.4\",\n \"esbuild\": \"^0.28.0\",\n \"fast-glob\": \"^3.3.2\",\n \"h3\": \"2.0.1-rc.5\",\n \"image-size\": \"^2.0.2\",\n \"intl-messageformat\": \"11.2.12\",\n \"marked\": \"^12.0.2\",\n \"nitro\": \"3.0.1-alpha.0\",\n \"pg\": \"^8.20.0\",\n \"picocolors\": \"^1.0.0\",\n \"remark-gfm\": \"^4.0.1\",\n \"sirv\": \"^2.0.4\",\n \"sugar-high\": \"^0.9.5\",\n \"supports-color\": \"^10.2.2\",\n \"tailwindcss\": \"4.1.18\",\n \"unstorage\": \"^2.0.0-alpha.3\",\n \"vite\": \"^5.0.10\",\n \"zod\": \"^4.1.12\"\n },\n \"devDependencies\": {\n \"@clerk/react\": \"^6.1.0\",\n \"@types/react\": \"^18.2.45\",\n \"@types/react-dom\": \"^18.2.18\",\n \"@vitest/coverage-v8\": \"^1.1.0\",\n \"jsdom\": \"^25.0.0\",\n \"react\": \"19.2.8\",\n \"react-dom\": \"19.2.8\",\n \"tsup\": \"^8.3.5\",\n \"typescript\": \"^5.3.3\",\n \"vitest\": \"^1.1.0\"\n },\n \"peerDependencies\": {\n \"react\": \"^18.2.0 || ^19.0.0\",\n \"react-dom\": \"^18.2.0 || ^19.0.0\"\n },\n \"optionalDependencies\": {\n \"rolldown\": \"1.2.0\",\n \"sharp\": \"^0.34.5\",\n \"vite-rolldown\": \"npm:vite@8.1.5\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEE,cAAW;;;ADAN,IAAM,eAAe;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/version.ts","../package.json"],"sourcesContent":["import { version } from \"../package.json\";\n\nexport const FARM_VERSION = version;\n","{\n \"name\": \"@farm.js/core\",\n \"version\": \"0.1.0-beta.16\",\n \"description\": \"Core Farm.js framework for modern integrated apps\",\n \"keywords\": [\n \"@farm.js/core\",\n \"framework\",\n \"react\",\n \"rsc\",\n \"server-components\",\n \"ssr\",\n \"vite\"\n ],\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/farming-labs/farm.js\",\n \"directory\": \"packages/farm\"\n },\n \"files\": [\n \"dist\",\n \"types\"\n ],\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"middleware\": [\n \"./types/middleware.d.ts\",\n \"./dist/middleware.d.ts\"\n ],\n \"version\": [\n \"./dist/version.d.ts\"\n ],\n \"router\": [\n \"./dist/router.d.ts\"\n ],\n \"routes\": [\n \"./dist/routes.d.ts\"\n ],\n \"storage\": [\n \"./dist/storage.d.ts\"\n ],\n \"integrations\": [\n \"./dist/integrations.d.ts\"\n ],\n \"cache\": [\n \"./dist/cache.d.ts\"\n ],\n \"deferred\": [\n \"./dist/deferred.d.ts\"\n ],\n \"after\": [\n \"./dist/after.d.ts\"\n ],\n \"navigation\": [\n \"./dist/navigation.d.ts\"\n ],\n \"headers\": [\n \"./dist/headers.d.ts\"\n ],\n \"docs\": [\n \"./dist/docs.d.ts\"\n ],\n \"markdown\": [\n \"./dist/markdown.d.ts\"\n ],\n \"app-markdown\": [\n \"./dist/app-markdown.d.ts\"\n ],\n \"observability\": [\n \"./dist/observability.d.ts\"\n ],\n \"workflows\": [\n \"./dist/workflows.d.ts\"\n ],\n \"cron\": [\n \"./dist/cron.d.ts\"\n ],\n \"server-fn\": [\n \"./dist/server-fn.d.ts\"\n ],\n \"server-fn/client\": [\n \"./dist/server-fn-client.d.ts\"\n ],\n \"server-action-security\": [\n \"./dist/server-action-security.d.ts\"\n ],\n \"deployment\": [\n \"./dist/deployment.d.ts\"\n ],\n \"env\": [\n \"./dist/env.d.ts\"\n ],\n \"env-types\": [\n \"./dist/env-types.d.ts\"\n ],\n \"environment\": [\n \"./dist/environment.d.ts\"\n ],\n \"environment/vite\": [\n \"./dist/environment/vite.d.ts\"\n ],\n \"font\": [\n \"./dist/font.d.ts\"\n ],\n \"testing\": [\n \"./dist/testing.d.ts\"\n ],\n \"agent-runtime\": [\n \"./dist/agent-runtime.d.ts\"\n ],\n \"image\": [\n \"./types/image.d.ts\",\n \"./dist/image.d.ts\"\n ],\n \"image/server\": [\n \"./dist/image/server.d.ts\"\n ],\n \"image/sharp\": [\n \"./dist/image/sharp.d.ts\"\n ],\n \"i18n\": [\n \"./dist/i18n/index.d.ts\"\n ],\n \"i18n/server\": [\n \"./dist/i18n/server.d.ts\"\n ],\n \"i18n/client\": [\n \"./dist/i18n/client.d.ts\"\n ],\n \"internal/production-runtime\": [\n \"./dist/internal/production-runtime.d.ts\"\n ],\n \"internal/metadata-image-runtime\": [\n \"./dist/internal/metadata-image-runtime.d.ts\"\n ],\n \"internal/client-runtime\": [\n \"./dist/internal/client-runtime.d.ts\"\n ],\n \"internal/build-runtime\": [\n \"./dist/internal/build-runtime.d.ts\"\n ],\n \"internal/config-runtime\": [\n \"./dist/internal/config-runtime.d.ts\"\n ],\n \"internal/production-node-env\": [\n \"./dist/internal/production-node-env.d.ts\"\n ],\n \"config\": [\n \"./dist/config.d.ts\"\n ],\n \"api\": [\n \"./types/api.d.ts\",\n \"./dist/api.d.ts\"\n ],\n \"api/route-manager\": [\n \"./dist/api/route-manager.d.ts\"\n ],\n \"api/runtime\": [\n \"./dist/api/runtime.d.ts\"\n ],\n \"request\": [\n \"./dist/request.d.ts\"\n ],\n \"client\": [\n \"./types/client.d.ts\",\n \"./dist/client.d.ts\"\n ],\n \"server\": [\n \"./dist/server.d.ts\"\n ],\n \"vite\": [\n \"./dist/vite.d.ts\"\n ],\n \"plugin\": [\n \"./dist/plugin.d.ts\"\n ],\n \"query\": [\n \"./dist/query/index.d.ts\"\n ],\n \"*\": [\n \"./dist/*.d.ts\"\n ]\n }\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.cjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./version\": {\n \"types\": \"./dist/version.d.ts\",\n \"import\": \"./dist/version.mjs\",\n \"require\": \"./dist/version.cjs\"\n },\n \"./config\": {\n \"types\": \"./dist/config.d.ts\",\n \"import\": \"./dist/config.mjs\",\n \"require\": \"./dist/config.cjs\"\n },\n \"./server\": {\n \"types\": \"./dist/server.d.ts\",\n \"import\": \"./dist/server.mjs\",\n \"require\": \"./dist/server.cjs\"\n },\n \"./client\": {\n \"types\": \"./types/client.d.ts\",\n \"import\": \"./dist/client.mjs\",\n \"require\": \"./dist/client.cjs\"\n },\n \"./storage\": {\n \"types\": \"./dist/storage.d.ts\",\n \"import\": \"./dist/storage.mjs\",\n \"require\": \"./dist/storage.cjs\"\n },\n \"./integrations\": {\n \"types\": \"./dist/integrations.d.ts\",\n \"import\": \"./dist/integrations.mjs\",\n \"require\": \"./dist/integrations.cjs\"\n },\n \"./cache\": {\n \"types\": \"./dist/cache.d.ts\",\n \"import\": \"./dist/cache.mjs\",\n \"require\": \"./dist/cache.cjs\"\n },\n \"./deferred\": {\n \"types\": \"./dist/deferred.d.ts\",\n \"import\": \"./dist/deferred.mjs\",\n \"require\": \"./dist/deferred.cjs\"\n },\n \"./after\": {\n \"types\": \"./dist/after.d.ts\",\n \"import\": \"./dist/after.mjs\",\n \"require\": \"./dist/after.cjs\"\n },\n \"./navigation\": {\n \"types\": \"./dist/navigation.d.ts\",\n \"import\": \"./dist/navigation.mjs\",\n \"require\": \"./dist/navigation.cjs\"\n },\n \"./headers\": {\n \"types\": \"./dist/headers.d.ts\",\n \"import\": \"./dist/headers.mjs\",\n \"require\": \"./dist/headers.cjs\"\n },\n \"./docs\": {\n \"types\": \"./dist/docs.d.ts\",\n \"import\": \"./dist/docs.mjs\",\n \"require\": \"./dist/docs.cjs\"\n },\n \"./markdown\": {\n \"types\": \"./dist/markdown.d.ts\",\n \"import\": \"./dist/markdown.mjs\",\n \"require\": \"./dist/markdown.cjs\"\n },\n \"./app-markdown\": {\n \"types\": \"./dist/app-markdown.d.ts\",\n \"import\": \"./dist/app-markdown.mjs\",\n \"require\": \"./dist/app-markdown.cjs\"\n },\n \"./observability\": {\n \"types\": \"./dist/observability.d.ts\",\n \"import\": \"./dist/observability.mjs\",\n \"require\": \"./dist/observability.cjs\"\n },\n \"./workflows\": {\n \"types\": \"./dist/workflows.d.ts\",\n \"import\": \"./dist/workflows.mjs\",\n \"require\": \"./dist/workflows.cjs\"\n },\n \"./cron\": {\n \"types\": \"./dist/cron.d.ts\",\n \"import\": \"./dist/cron.mjs\",\n \"require\": \"./dist/cron.cjs\"\n },\n \"./server-fn\": {\n \"types\": \"./dist/server-fn.d.ts\",\n \"import\": \"./dist/server-fn.mjs\",\n \"require\": \"./dist/server-fn.cjs\"\n },\n \"./server-fn/client\": {\n \"types\": \"./dist/server-fn-client.d.ts\",\n \"import\": \"./dist/server-fn-client.mjs\",\n \"require\": \"./dist/server-fn-client.cjs\"\n },\n \"./server-query\": {\n \"types\": \"./dist/server-query.d.ts\",\n \"import\": \"./dist/server-query.mjs\",\n \"require\": \"./dist/server-query.cjs\"\n },\n \"./server-query/client\": {\n \"types\": \"./dist/server-query-client.d.ts\",\n \"import\": \"./dist/server-query-client.mjs\",\n \"require\": \"./dist/server-query-client.cjs\"\n },\n \"./server-action-security\": {\n \"types\": \"./dist/server-action-security.d.ts\",\n \"import\": \"./dist/server-action-security.mjs\",\n \"require\": \"./dist/server-action-security.cjs\"\n },\n \"./deployment\": {\n \"types\": \"./dist/deployment.d.ts\",\n \"import\": \"./dist/deployment.mjs\",\n \"require\": \"./dist/deployment.cjs\"\n },\n \"./env\": {\n \"types\": \"./dist/env.d.ts\",\n \"import\": \"./dist/env.mjs\",\n \"require\": \"./dist/env.cjs\"\n },\n \"./env-types\": {\n \"types\": \"./dist/env-types.d.ts\",\n \"import\": \"./dist/env-types.mjs\",\n \"require\": \"./dist/env-types.cjs\"\n },\n \"./environment\": {\n \"types\": \"./dist/environment.d.ts\",\n \"import\": \"./dist/environment.mjs\",\n \"require\": \"./dist/environment.cjs\"\n },\n \"./environment/vite\": {\n \"types\": \"./dist/environment/vite.d.ts\",\n \"import\": \"./dist/environment/vite.mjs\",\n \"require\": \"./dist/environment/vite.cjs\"\n },\n \"./font\": {\n \"types\": \"./dist/font.d.ts\",\n \"import\": \"./dist/font.mjs\",\n \"require\": \"./dist/font.cjs\"\n },\n \"./vite\": {\n \"types\": \"./dist/vite.d.ts\",\n \"import\": \"./dist/vite.mjs\",\n \"require\": \"./dist/vite.cjs\"\n },\n \"./plugin\": {\n \"types\": \"./dist/plugin.d.ts\",\n \"import\": \"./dist/plugin.mjs\",\n \"require\": \"./dist/plugin.cjs\"\n },\n \"./plugin/server\": {\n \"types\": \"./dist/server-plugins.d.ts\",\n \"import\": \"./dist/server-plugins.mjs\",\n \"require\": \"./dist/server-plugins.cjs\"\n },\n \"./plugin/client\": {\n \"types\": \"./dist/client-plugins.d.ts\",\n \"import\": \"./dist/client-plugins.mjs\",\n \"require\": \"./dist/client-plugins.cjs\"\n },\n \"./query\": {\n \"types\": \"./dist/query/index.d.ts\",\n \"import\": \"./dist/query/index.mjs\",\n \"require\": \"./dist/query/index.cjs\"\n },\n \"./query/parsers\": {\n \"types\": \"./dist/query/parsers.d.ts\",\n \"import\": \"./dist/query/parsers.mjs\",\n \"require\": \"./dist/query/parsers.cjs\"\n },\n \"./query/client\": {\n \"types\": \"./dist/query/client.d.ts\",\n \"import\": \"./dist/query/client.mjs\",\n \"require\": \"./dist/query/client.cjs\"\n },\n \"./query/server\": {\n \"types\": \"./dist/query/server.d.ts\",\n \"import\": \"./dist/query/server.mjs\",\n \"require\": \"./dist/query/server.cjs\"\n },\n \"./middleware\": {\n \"types\": \"./dist/middleware.d.ts\",\n \"import\": \"./dist/middleware.mjs\",\n \"require\": \"./dist/middleware.cjs\"\n },\n \"./api\": {\n \"types\": \"./dist/api.d.ts\",\n \"import\": \"./dist/api.mjs\",\n \"require\": \"./dist/api.cjs\"\n },\n \"./api/route-manager\": {\n \"types\": \"./dist/api/route-manager.d.ts\",\n \"import\": \"./dist/api/route-manager.mjs\",\n \"require\": \"./dist/api/route-manager.cjs\"\n },\n \"./api/runtime\": {\n \"types\": \"./dist/api/runtime.d.ts\",\n \"import\": \"./dist/api/runtime.mjs\",\n \"require\": \"./dist/api/runtime.cjs\"\n },\n \"./request\": {\n \"types\": \"./dist/request.d.ts\",\n \"import\": \"./dist/request.mjs\",\n \"require\": \"./dist/request.cjs\"\n },\n \"./router\": {\n \"types\": \"./dist/router.d.ts\",\n \"import\": \"./dist/router.mjs\",\n \"require\": \"./dist/router.cjs\"\n },\n \"./routes\": {\n \"types\": \"./dist/routes.d.ts\",\n \"import\": \"./dist/routes.mjs\",\n \"require\": \"./dist/routes.cjs\"\n },\n \"./testing\": {\n \"types\": \"./dist/testing.d.ts\",\n \"import\": \"./dist/testing.mjs\",\n \"require\": \"./dist/testing.cjs\"\n },\n \"./agent-runtime\": {\n \"types\": \"./dist/agent-runtime.d.ts\",\n \"import\": \"./dist/agent-runtime.mjs\",\n \"require\": \"./dist/agent-runtime.cjs\"\n },\n \"./image\": {\n \"types\": \"./types/image.d.ts\",\n \"import\": \"./dist/image.mjs\",\n \"require\": \"./dist/image.cjs\"\n },\n \"./image/server\": {\n \"types\": \"./dist/image/server.d.ts\",\n \"import\": \"./dist/image/server.mjs\",\n \"require\": \"./dist/image/server.cjs\"\n },\n \"./image/sharp\": {\n \"types\": \"./dist/image/sharp.d.ts\",\n \"import\": \"./dist/image/sharp.mjs\",\n \"require\": \"./dist/image/sharp.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.mjs\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./i18n/server\": {\n \"types\": \"./dist/i18n/server.d.ts\",\n \"import\": \"./dist/i18n/server.mjs\",\n \"require\": \"./dist/i18n/server.cjs\"\n },\n \"./i18n/client\": {\n \"types\": \"./dist/i18n/client.d.ts\",\n \"import\": \"./dist/i18n/client.mjs\",\n \"require\": \"./dist/i18n/client.cjs\"\n },\n \"./internal/production-runtime\": {\n \"types\": \"./dist/internal/production-runtime.d.ts\",\n \"import\": \"./dist/internal/production-runtime.mjs\",\n \"require\": \"./dist/internal/production-runtime.cjs\"\n },\n \"./internal/metadata-image-runtime\": {\n \"types\": \"./dist/internal/metadata-image-runtime.d.ts\",\n \"import\": \"./dist/internal/metadata-image-runtime.mjs\",\n \"require\": \"./dist/internal/metadata-image-runtime.cjs\"\n },\n \"./internal/client-runtime\": {\n \"types\": \"./dist/internal/client-runtime.d.ts\",\n \"import\": \"./dist/internal/client-runtime.mjs\",\n \"require\": \"./dist/internal/client-runtime.cjs\"\n },\n \"./internal/build-runtime\": {\n \"types\": \"./dist/internal/build-runtime.d.ts\",\n \"import\": \"./dist/internal/build-runtime.mjs\",\n \"require\": \"./dist/internal/build-runtime.cjs\"\n },\n \"./internal/config-runtime\": {\n \"types\": \"./dist/internal/config-runtime.d.ts\",\n \"import\": \"./dist/internal/config-runtime.mjs\",\n \"require\": \"./dist/internal/config-runtime.cjs\"\n },\n \"./internal/production-node-env\": {\n \"types\": \"./dist/internal/production-node-env.d.ts\",\n \"import\": \"./dist/internal/production-node-env.mjs\",\n \"require\": \"./dist/internal/production-node-env.cjs\"\n }\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"build:runtime\": \"tsup --config tsup.runtime.config.ts\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:coverage\": \"vitest --coverage\",\n \"lint\": \"biome lint .\",\n \"lint:fix\": \"biome lint --write .\",\n \"format\": \"biome format --write .\",\n \"type-check\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\"\n },\n \"dependencies\": {\n \"@farming-labs/docs\": \"^0.2.44\",\n \"@farming-labs/orm\": \"0.0.62\",\n \"@farming-labs/orm-runtime\": \"0.0.62\",\n \"@formatjs/icu-messageformat-parser\": \"3.5.15\",\n \"@mdx-js/mdx\": \"^3.1.1\",\n \"@scalar/api-reference\": \"^1.38.1\",\n \"@scalar/openapi-parser\": \"^0.22.3\",\n \"@tailwindcss/vite\": \"4.1.18\",\n \"@vercel/og\": \"0.11.1\",\n \"@vitejs/plugin-react\": \"^4.2.1\",\n \"better-call\": \"^1.0.19\",\n \"db0\": \"^0.3.4\",\n \"esbuild\": \"^0.28.0\",\n \"fast-glob\": \"^3.3.2\",\n \"h3\": \"2.0.1-rc.5\",\n \"image-size\": \"^2.0.2\",\n \"intl-messageformat\": \"11.2.12\",\n \"marked\": \"^12.0.2\",\n \"nitro\": \"3.0.1-alpha.0\",\n \"pg\": \"^8.20.0\",\n \"picocolors\": \"^1.0.0\",\n \"remark-gfm\": \"^4.0.1\",\n \"sirv\": \"^2.0.4\",\n \"sugar-high\": \"^0.9.5\",\n \"supports-color\": \"^10.2.2\",\n \"tailwindcss\": \"4.1.18\",\n \"unstorage\": \"^2.0.0-alpha.3\",\n \"vite\": \"^5.0.10\",\n \"zod\": \"^4.1.12\"\n },\n \"devDependencies\": {\n \"@clerk/react\": \"^6.1.0\",\n \"@types/react\": \"^18.2.45\",\n \"@types/react-dom\": \"^18.2.18\",\n \"@vitest/coverage-v8\": \"^1.1.0\",\n \"jsdom\": \"^25.0.0\",\n \"react\": \"19.2.8\",\n \"react-dom\": \"19.2.8\",\n \"tsup\": \"^8.3.5\",\n \"typescript\": \"^5.3.3\",\n \"vitest\": \"^1.1.0\"\n },\n \"peerDependencies\": {\n \"react\": \"^18.2.0 || ^19.0.0\",\n \"react-dom\": \"^18.2.0 || ^19.0.0\"\n },\n \"optionalDependencies\": {\n \"rolldown\": \"1.2.0\",\n \"sharp\": \"^0.34.5\",\n \"vite-rolldown\": \"npm:vite@8.1.5\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEE,cAAW;;;ADAN,IAAM,eAAe;","names":[]}
|
package/dist/version.mjs
CHANGED
package/dist/vite.cjs
CHANGED
|
@@ -1845,6 +1845,13 @@ var init_cache_invalidation = __esm({
|
|
|
1845
1845
|
}
|
|
1846
1846
|
});
|
|
1847
1847
|
|
|
1848
|
+
// src/server-fn-error.ts
|
|
1849
|
+
var init_server_fn_error = __esm({
|
|
1850
|
+
"src/server-fn-error.ts"() {
|
|
1851
|
+
"use strict";
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
|
|
1848
1855
|
// src/server-action-security.ts
|
|
1849
1856
|
function resolveServerActionsConfig(config) {
|
|
1850
1857
|
const allowedOrigins = (config?.allowedOrigins ?? []).map(normalizeAllowedOriginPattern);
|
|
@@ -1938,6 +1945,7 @@ var init_server_action_security = __esm({
|
|
|
1938
1945
|
"use strict";
|
|
1939
1946
|
import_node_async_hooks = require("async_hooks");
|
|
1940
1947
|
init_cache_invalidation();
|
|
1948
|
+
init_server_fn_error();
|
|
1941
1949
|
DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT = 1e6;
|
|
1942
1950
|
SERVER_ACTION_STORAGE_KEY = /* @__PURE__ */ Symbol.for("farm.serverActionStorage");
|
|
1943
1951
|
__name(resolveServerActionsConfig, "resolveServerActionsConfig");
|
|
@@ -21321,6 +21329,15 @@ function routePatternToRouteLiteral(pattern) {
|
|
|
21321
21329
|
return JSON.stringify(pattern);
|
|
21322
21330
|
}
|
|
21323
21331
|
__name(routePatternToRouteLiteral, "routePatternToRouteLiteral");
|
|
21332
|
+
function renderTypeUnion(values) {
|
|
21333
|
+
return values.length <= 1 ? values[0] || "never" : `
|
|
21334
|
+
| ${values.join("\n | ")}`;
|
|
21335
|
+
}
|
|
21336
|
+
__name(renderTypeUnion, "renderTypeUnion");
|
|
21337
|
+
function renderTypeAlias(name, value) {
|
|
21338
|
+
return `export type ${name} =${value.startsWith("\n") ? "" : " "}${value};`;
|
|
21339
|
+
}
|
|
21340
|
+
__name(renderTypeAlias, "renderTypeAlias");
|
|
21324
21341
|
function createRoutePattern(route) {
|
|
21325
21342
|
if (route.segments.length === 0) return "/";
|
|
21326
21343
|
return "/" + route.segments.map((seg) => {
|
|
@@ -21346,39 +21363,48 @@ async function createRouteTypeDeclarations(options, outPath) {
|
|
|
21346
21363
|
const { root, srcDir = "src", extraRoutes = [], suppressLintOnLink = false } = options;
|
|
21347
21364
|
const sourceRoots = options.sourceRoots ?? [{ name: "project", root, srcDir, layer: false }];
|
|
21348
21365
|
const patterns = /* @__PURE__ */ new Set();
|
|
21366
|
+
const routeModulePatterns = /* @__PURE__ */ new Set();
|
|
21349
21367
|
const glob = await import("fast-glob");
|
|
21350
21368
|
for (const source of sourceRoots) {
|
|
21351
21369
|
const appDir = path14.join(source.root, source.srcDir, "app");
|
|
21352
21370
|
if (fs5.existsSync(appDir)) {
|
|
21353
|
-
const
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21371
|
+
const routeModuleFiles = await glob.default(
|
|
21372
|
+
"**/{page,layout,loading,error}.{ts,tsx,js,jsx,md,mdx}",
|
|
21373
|
+
{
|
|
21374
|
+
cwd: appDir,
|
|
21375
|
+
absolute: false
|
|
21376
|
+
}
|
|
21377
|
+
);
|
|
21378
|
+
for (const file of routeModuleFiles) {
|
|
21358
21379
|
if (parseRouteSlotFile(file)) continue;
|
|
21359
21380
|
const route = parseRoutePath(file);
|
|
21381
|
+
const pattern = createRoutePattern(route);
|
|
21382
|
+
routeModulePatterns.add(pattern);
|
|
21360
21383
|
if (route.type === "page") {
|
|
21361
|
-
const pattern = createRoutePattern(route);
|
|
21362
21384
|
patterns.add(pattern);
|
|
21363
21385
|
}
|
|
21364
21386
|
}
|
|
21365
21387
|
}
|
|
21366
21388
|
for (const route of await discoverProgrammaticRoutePaths(source.root, source.srcDir)) {
|
|
21367
21389
|
patterns.add(route);
|
|
21390
|
+
routeModulePatterns.add(route);
|
|
21368
21391
|
}
|
|
21369
21392
|
}
|
|
21370
21393
|
for (const route of extraRoutes) {
|
|
21371
21394
|
if (route.startsWith("/")) {
|
|
21372
21395
|
patterns.add(route);
|
|
21396
|
+
routeModulePatterns.add(route);
|
|
21373
21397
|
}
|
|
21374
21398
|
}
|
|
21375
21399
|
const sortedPatterns = Array.from(patterns).sort();
|
|
21376
21400
|
const typeLiterals = Array.from(new Set(sortedPatterns.flatMap(routePatternToTsTypeLiterals)));
|
|
21377
21401
|
const patternLiterals = sortedPatterns.map(routePatternToRouteLiteral);
|
|
21378
|
-
const
|
|
21379
|
-
const
|
|
21402
|
+
const routeModulePatternLiterals = Array.from(routeModulePatterns).sort().map(routePatternToRouteLiteral);
|
|
21403
|
+
const routePathType = suppressLintOnLink ? "string" : renderTypeUnion(typeLiterals);
|
|
21404
|
+
const routePatternType = suppressLintOnLink ? "string" : renderTypeUnion(patternLiterals);
|
|
21405
|
+
const routeModulePatternType = renderTypeUnion(routeModulePatternLiterals);
|
|
21380
21406
|
const routeTypesImportPath = `./${path14.basename(outPath).replace(/\.d\.ts$/, "")}`;
|
|
21381
|
-
const
|
|
21407
|
+
const linkAugmentationBlock = suppressLintOnLink ? "" : `
|
|
21382
21408
|
declare module "@farm.js/core/client" {
|
|
21383
21409
|
interface LinkDefaultRoute {
|
|
21384
21410
|
_: import(${JSON.stringify(routeTypesImportPath)}).RoutePath;
|
|
@@ -21402,14 +21428,25 @@ declare module "@farm.js/core/dist/client.js" {
|
|
|
21402
21428
|
pattern: import(${JSON.stringify(routeTypesImportPath)}).RoutePattern;
|
|
21403
21429
|
}
|
|
21404
21430
|
}
|
|
21431
|
+
`;
|
|
21432
|
+
const routeModuleAugmentationBlock = `
|
|
21433
|
+
declare global {
|
|
21434
|
+
namespace FarmJS {
|
|
21435
|
+
interface RouteRegistry {
|
|
21436
|
+
pattern: import(${JSON.stringify(routeTypesImportPath)}).RouteModulePattern;
|
|
21437
|
+
}
|
|
21438
|
+
}
|
|
21439
|
+
}
|
|
21405
21440
|
`;
|
|
21406
21441
|
const content = `/**
|
|
21407
21442
|
* Auto-generated route types from src/app.
|
|
21408
|
-
* Link href
|
|
21443
|
+
* Link href and route component props are typed automatically from generated declarations.
|
|
21444
|
+
* Regenerated on dev start and when routes change.
|
|
21409
21445
|
* Set suppressLintOnLink: true in farm.config.ts to accept any string on Link href.
|
|
21410
21446
|
*/
|
|
21411
|
-
|
|
21412
|
-
|
|
21447
|
+
${renderTypeAlias("RoutePath", routePathType)}
|
|
21448
|
+
${renderTypeAlias("RoutePattern", routePatternType)}
|
|
21449
|
+
${renderTypeAlias("RouteModulePattern", routeModulePatternType)}${linkAugmentationBlock}${routeModuleAugmentationBlock}
|
|
21413
21450
|
`;
|
|
21414
21451
|
return content;
|
|
21415
21452
|
}
|
|
@@ -21691,7 +21728,8 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
21691
21728
|
const sourceRoots = getFarmSourceRoots({ root, srcDir, layers: options.layers });
|
|
21692
21729
|
const appDirs = getFarmAppDirectories({ root, srcDir, layers: options.layers });
|
|
21693
21730
|
const result = {
|
|
21694
|
-
apiRoutes: []
|
|
21731
|
+
apiRoutes: [],
|
|
21732
|
+
stalePaths: []
|
|
21695
21733
|
};
|
|
21696
21734
|
const unifiedTypesPath = (0, import_path8.join)(root, srcDir, "farm.d.ts");
|
|
21697
21735
|
const shouldRefreshUnifiedTypes = shouldGenerateRoutes && !options.routeTypesOutFile || shouldGenerateEnv && !options.envTypesOutFile || shouldGenerateI18n && !options.i18nTypesOutFile;
|
|
@@ -21707,22 +21745,29 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
21707
21745
|
unifiedSections.push(await createRouteTypeDeclarations(routeOptions, unifiedTypesPath));
|
|
21708
21746
|
result.routeTypesPath = unifiedTypesPath;
|
|
21709
21747
|
} else if (shouldGenerateRoutes) {
|
|
21710
|
-
|
|
21748
|
+
const routeOptions = {
|
|
21711
21749
|
root,
|
|
21712
21750
|
srcDir,
|
|
21713
21751
|
outFile: options.routeTypesOutFile,
|
|
21714
21752
|
extraRoutes: options.extraRoutes || [],
|
|
21715
21753
|
suppressLintOnLink: options.suppressLintOnLink,
|
|
21716
21754
|
sourceRoots
|
|
21717
|
-
}
|
|
21755
|
+
};
|
|
21756
|
+
if (options.check) {
|
|
21757
|
+
const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
|
|
21758
|
+
const content = await createRouteTypeDeclarations(routeOptions, routeTypesPath);
|
|
21759
|
+
checkGeneratedFile(routeTypesPath, content, result.stalePaths);
|
|
21760
|
+
result.routeTypesPath = routeTypesPath;
|
|
21761
|
+
} else {
|
|
21762
|
+
result.routeTypesPath = await generateRouteTypes(routeOptions);
|
|
21763
|
+
}
|
|
21718
21764
|
}
|
|
21719
21765
|
if (shouldGenerateApi) {
|
|
21720
21766
|
const generator = new APITypeGenerator(appDirs);
|
|
21721
21767
|
const apiRoutes = generator.scanAPIRoutes();
|
|
21722
21768
|
const apiTypesPath = options.apiTypesOutFile ? (0, import_path8.resolve)(root, options.apiTypesOutFile) : (0, import_path8.join)(root, srcDir, "lib", "api.generated.ts");
|
|
21723
21769
|
const content = generator.generateAPIRouter(apiRoutes, { outFile: apiTypesPath });
|
|
21724
|
-
(
|
|
21725
|
-
writeFileIfChanged(apiTypesPath, content);
|
|
21770
|
+
writeOrCheckGeneratedFile(apiTypesPath, content, options.check, result.stalePaths);
|
|
21726
21771
|
result.apiTypesPath = apiTypesPath;
|
|
21727
21772
|
result.apiRoutes = apiRoutes;
|
|
21728
21773
|
}
|
|
@@ -21740,36 +21785,63 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
21740
21785
|
);
|
|
21741
21786
|
result.envTypesPath = unifiedTypesPath;
|
|
21742
21787
|
} else if (shouldGenerateEnv) {
|
|
21743
|
-
|
|
21788
|
+
const envOptions = {
|
|
21744
21789
|
root,
|
|
21745
21790
|
srcDir,
|
|
21746
21791
|
outFile: options.envTypesOutFile,
|
|
21747
21792
|
configPath: options.configPath,
|
|
21748
21793
|
layerConfigPaths: (options.layers ?? []).map((layer) => layer.configFile).filter((configFile) => Boolean(configFile))
|
|
21749
|
-
}
|
|
21794
|
+
};
|
|
21795
|
+
if (options.check) {
|
|
21796
|
+
const envTypesPath = resolveGeneratedPath(root, srcDir, options.envTypesOutFile);
|
|
21797
|
+
checkGeneratedFile(
|
|
21798
|
+
envTypesPath,
|
|
21799
|
+
createEnvTypeDeclarations(envOptions, envTypesPath),
|
|
21800
|
+
result.stalePaths
|
|
21801
|
+
);
|
|
21802
|
+
result.envTypesPath = envTypesPath;
|
|
21803
|
+
} else {
|
|
21804
|
+
result.envTypesPath = await generateEnvTypes(envOptions);
|
|
21805
|
+
}
|
|
21750
21806
|
}
|
|
21751
21807
|
if (shouldGenerateImages && options.imageTypesOutFile) {
|
|
21752
|
-
|
|
21753
|
-
|
|
21754
|
-
|
|
21755
|
-
|
|
21756
|
-
}
|
|
21808
|
+
const imageTypesPath = resolveGeneratedPath(root, srcDir, options.imageTypesOutFile, false);
|
|
21809
|
+
if (options.check) {
|
|
21810
|
+
checkGeneratedFile(imageTypesPath, createFarmImageTypeDeclarations(), result.stalePaths);
|
|
21811
|
+
result.imageTypesPath = imageTypesPath;
|
|
21812
|
+
} else {
|
|
21813
|
+
result.imageTypesPath = generateFarmImageTypes({
|
|
21814
|
+
root,
|
|
21815
|
+
srcDir,
|
|
21816
|
+
outFile: options.imageTypesOutFile
|
|
21817
|
+
});
|
|
21818
|
+
}
|
|
21757
21819
|
}
|
|
21758
21820
|
if (shouldRefreshUnifiedTypes && options.i18nConfig?.enabled && !options.i18nTypesOutFile) {
|
|
21759
21821
|
const { signatures } = await readFarmI18nCatalogs(options.i18nConfig);
|
|
21760
21822
|
unifiedSections.push(renderFarmI18nTypes(options.i18nConfig.locales, signatures));
|
|
21761
21823
|
result.i18nTypesPath = unifiedTypesPath;
|
|
21762
21824
|
} else if (shouldGenerateI18n && options.i18nConfig) {
|
|
21763
|
-
|
|
21764
|
-
root,
|
|
21765
|
-
|
|
21766
|
-
|
|
21767
|
-
|
|
21768
|
-
|
|
21825
|
+
if (options.check) {
|
|
21826
|
+
const i18nTypesPath = resolveGeneratedPath(root, srcDir, options.i18nTypesOutFile, false);
|
|
21827
|
+
const { signatures } = await readFarmI18nCatalogs(options.i18nConfig);
|
|
21828
|
+
checkGeneratedFile(
|
|
21829
|
+
i18nTypesPath,
|
|
21830
|
+
renderFarmI18nTypes(options.i18nConfig.locales, signatures),
|
|
21831
|
+
result.stalePaths
|
|
21832
|
+
);
|
|
21833
|
+
result.i18nTypesPath = i18nTypesPath;
|
|
21834
|
+
} else {
|
|
21835
|
+
result.i18nTypesPath = await generateFarmI18nTypes({
|
|
21836
|
+
root,
|
|
21837
|
+
srcDir,
|
|
21838
|
+
config: options.i18nConfig,
|
|
21839
|
+
outFile: options.i18nTypesOutFile
|
|
21840
|
+
});
|
|
21841
|
+
}
|
|
21769
21842
|
}
|
|
21770
21843
|
if (shouldRefreshUnifiedTypes) {
|
|
21771
|
-
(
|
|
21772
|
-
writeFileIfChanged(
|
|
21844
|
+
writeOrCheckGeneratedFile(
|
|
21773
21845
|
unifiedTypesPath,
|
|
21774
21846
|
`/**
|
|
21775
21847
|
* Generated by Farm.js. Do not edit.
|
|
@@ -21778,14 +21850,41 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
21778
21850
|
|
|
21779
21851
|
import "@farm.js/core/image";
|
|
21780
21852
|
|
|
21781
|
-
${unifiedSections.join("\n")}
|
|
21853
|
+
${unifiedSections.map((section) => section.trimEnd()).join("\n\n")}
|
|
21854
|
+
`,
|
|
21855
|
+
options.check,
|
|
21856
|
+
result.stalePaths
|
|
21782
21857
|
);
|
|
21783
21858
|
result.typesPath = unifiedTypesPath;
|
|
21784
|
-
|
|
21859
|
+
if (options.check) {
|
|
21860
|
+
collectLegacyTypeArtifacts(root, srcDir, result.stalePaths);
|
|
21861
|
+
} else {
|
|
21862
|
+
removeLegacyTypeArtifacts(root, srcDir);
|
|
21863
|
+
}
|
|
21785
21864
|
}
|
|
21786
21865
|
return result;
|
|
21787
21866
|
}
|
|
21788
21867
|
__name(generateFarmTypeArtifacts, "generateFarmTypeArtifacts");
|
|
21868
|
+
function resolveGeneratedPath(root, srcDir, outFile, relativeToSrc = true) {
|
|
21869
|
+
if ((0, import_path8.isAbsolute)(outFile)) return (0, import_path8.resolve)(outFile);
|
|
21870
|
+
return (0, import_path8.resolve)(root, relativeToSrc ? (0, import_path8.join)(srcDir, outFile) : outFile);
|
|
21871
|
+
}
|
|
21872
|
+
__name(resolveGeneratedPath, "resolveGeneratedPath");
|
|
21873
|
+
function writeOrCheckGeneratedFile(filePath, content, check, stalePaths) {
|
|
21874
|
+
if (check) {
|
|
21875
|
+
checkGeneratedFile(filePath, content, stalePaths);
|
|
21876
|
+
return;
|
|
21877
|
+
}
|
|
21878
|
+
(0, import_fs4.mkdirSync)((0, import_path8.dirname)(filePath), { recursive: true });
|
|
21879
|
+
writeFileIfChanged(filePath, content);
|
|
21880
|
+
}
|
|
21881
|
+
__name(writeOrCheckGeneratedFile, "writeOrCheckGeneratedFile");
|
|
21882
|
+
function checkGeneratedFile(filePath, content, stalePaths) {
|
|
21883
|
+
if (!(0, import_fs4.existsSync)(filePath) || (0, import_fs4.readFileSync)(filePath, "utf8") !== content) {
|
|
21884
|
+
stalePaths.push(filePath);
|
|
21885
|
+
}
|
|
21886
|
+
}
|
|
21887
|
+
__name(checkGeneratedFile, "checkGeneratedFile");
|
|
21789
21888
|
var LEGACY_TYPE_ARTIFACTS = [
|
|
21790
21889
|
["farm-routes.d.ts", "Auto-generated route types"],
|
|
21791
21890
|
["farm-env.d.ts", "Auto-generated env types"],
|
|
@@ -21803,6 +21902,14 @@ function removeLegacyTypeArtifacts(root, srcDir) {
|
|
|
21803
21902
|
}
|
|
21804
21903
|
}
|
|
21805
21904
|
__name(removeLegacyTypeArtifacts, "removeLegacyTypeArtifacts");
|
|
21905
|
+
function collectLegacyTypeArtifacts(root, srcDir, stalePaths) {
|
|
21906
|
+
for (const [fileName, marker] of LEGACY_TYPE_ARTIFACTS) {
|
|
21907
|
+
const filePath = (0, import_path8.join)(root, srcDir, fileName);
|
|
21908
|
+
if (!(0, import_fs4.existsSync)(filePath)) continue;
|
|
21909
|
+
if ((0, import_fs4.readFileSync)(filePath, "utf8").includes(marker)) stalePaths.push(filePath);
|
|
21910
|
+
}
|
|
21911
|
+
}
|
|
21912
|
+
__name(collectLegacyTypeArtifacts, "collectLegacyTypeArtifacts");
|
|
21806
21913
|
|
|
21807
21914
|
// src/vite.ts
|
|
21808
21915
|
init_markdown();
|
|
@@ -22158,7 +22265,7 @@ function transformError(id, message) {
|
|
|
22158
22265
|
__name(transformError, "transformError");
|
|
22159
22266
|
|
|
22160
22267
|
// package.json
|
|
22161
|
-
var version = "0.1.0-beta.
|
|
22268
|
+
var version = "0.1.0-beta.16";
|
|
22162
22269
|
|
|
22163
22270
|
// src/version.ts
|
|
22164
22271
|
var FARM_VERSION = version;
|