@farm.js/core 0.1.42 → 0.1.44
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-ssVy_tea.d.mts → agent-mcp-CWI-awqd.d.mts} +1 -1
- package/dist/{agent-mcp-SSD6L3VZ.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.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-KjFzdCqy.d.ts → app-CAN_2Cqo.d.ts} +8 -4
- package/dist/{app-1h3lVT4a.d.mts → app-DG3dE8v5.d.mts} +8 -4
- package/dist/{app-manifest-D3RkVNuS.d.mts → app-manifest-8x5VjZ0L.d.mts} +1 -1
- package/dist/{app-manifest-DaW8-tvX.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-ECKF2BAM.cjs → chunk-2GVF3C2F.cjs} +255 -42
- package/dist/{chunk-TUL355PH.mjs → chunk-2MKTHHEU.mjs} +136 -161
- package/dist/chunk-2NXO5SBY.mjs +57 -0
- package/dist/{chunk-AX7S67YV.mjs → chunk-37VKVISD.mjs} +9 -173
- package/dist/chunk-3BROEWFY.cjs +39 -0
- package/dist/chunk-3SAWHWDH.cjs +186 -0
- package/dist/{chunk-AHFRQMRX.cjs → chunk-3YJMBQ27.cjs} +1 -1
- package/dist/{chunk-6PKXK4TY.mjs → chunk-53ZV6K65.mjs} +1 -1
- package/dist/{chunk-JG3MEQUH.cjs → chunk-5GBL2LKD.cjs} +430 -217
- 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-TCJ4A4A2.cjs → chunk-AI3WVJNP.cjs} +324 -350
- package/dist/chunk-APDGOKKE.cjs +148 -0
- package/dist/chunk-AZBSVLRM.cjs +132 -0
- package/dist/{chunk-RHGK2JEN.cjs → chunk-B6XAA7V6.cjs} +18 -182
- package/dist/chunk-CEDPEDNW.cjs +98 -0
- package/dist/{chunk-WSOBCAYO.cjs → chunk-CW6SNEN2.cjs} +25 -25
- package/dist/chunk-D5RFPV2H.mjs +148 -0
- package/dist/chunk-E22SWCXB.cjs +144 -0
- package/dist/{chunk-375K2ZVU.mjs → chunk-ERA5RP3L.mjs} +263 -50
- package/dist/{chunk-724JLMS4.mjs → chunk-F646BZ4Y.mjs} +4 -2
- package/dist/{chunk-C5KVWHIH.cjs → chunk-G2Z5DGMS.cjs} +5 -3
- package/dist/{chunk-ZATTDMBW.cjs → chunk-GA6JM4L6.cjs} +279 -376
- package/dist/chunk-GZWHCWLB.mjs +186 -0
- package/dist/{chunk-24SP5TGU.mjs → chunk-H4LXPWI2.mjs} +2 -2
- package/dist/chunk-H7BLEEAE.cjs +57 -0
- package/dist/chunk-IOMVXBLZ.mjs +144 -0
- package/dist/{chunk-BD3D7EZV.cjs → chunk-IXFOBGLQ.cjs} +9 -3
- package/dist/{chunk-JIYYX7WU.mjs → chunk-JVXW76I7.mjs} +2 -2
- package/dist/{chunk-MHN4UR5U.cjs → chunk-KFZZFZ7J.cjs} +7 -7
- package/dist/{chunk-BXJ5HJTJ.cjs → chunk-LPE3ED4R.cjs} +17 -13
- package/dist/chunk-LRJRXXQZ.cjs +109 -0
- package/dist/{chunk-HCSVR4YZ.mjs → chunk-M3BXTWJM.mjs} +18 -0
- package/dist/{chunk-2JZHQDUY.mjs → chunk-OYZGFRPA.mjs} +1 -1
- package/dist/{chunk-JR4QCLJY.cjs → chunk-PDU4P2IC.cjs} +19 -1
- package/dist/chunk-PJEHUSHA.mjs +229 -0
- package/dist/{chunk-QTEJGB5A.mjs → chunk-QGFKXYC7.mjs} +80 -177
- package/dist/chunk-QGH2RQVF.mjs +132 -0
- package/dist/{chunk-YWMZUGIS.mjs → chunk-R3ZFQJEF.mjs} +247 -34
- package/dist/{chunk-U2UC7UGP.mjs → chunk-R4J2UOV4.mjs} +1 -1
- 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-ZS6HDNOM.cjs → chunk-T44ECMEP.cjs} +6 -6
- package/dist/{chunk-OFZUJMCU.mjs → chunk-WPJQN64R.mjs} +195 -41
- package/dist/{chunk-NU25TRIO.mjs → chunk-WWYXIECF.mjs} +12 -8
- package/dist/{chunk-7YHSD3Z6.cjs → chunk-XPSGGECF.cjs} +85 -31
- package/dist/chunk-XUGFRFD2.mjs +39 -0
- package/dist/{chunk-IVQY6UTY.mjs → chunk-XUHIRBXY.mjs} +1 -1
- package/dist/{chunk-PIZXONIS.mjs → chunk-YFLBG2W3.mjs} +56 -2
- package/dist/chunk-YKUEJ3MG.cjs +229 -0
- package/dist/{chunk-QKZMB7LY.cjs → chunk-YN2QEMMO.cjs} +2 -2
- package/dist/{client-plugins-DIem0I0W.d.ts → client-plugins-BGS0wqzc.d.ts} +36 -16
- package/dist/{client-plugins-C9Py_50W.d.mts → client-plugins-nQ0tYt4l.d.mts} +36 -16
- 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-2RY3EKHL.cjs → devtools-5Q7VRKVH.cjs} +6 -5
- package/dist/{devtools-Q3LBNUJ7.mjs → devtools-LJ4IGYGW.mjs} +5 -4
- package/dist/docs.cjs +7 -6
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +6 -5
- package/dist/index-Cy26isrh.d.ts +48 -0
- package/dist/index-y1jgR74U.d.mts +48 -0
- package/dist/index.cjs +44 -25
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +51 -32
- 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 +30 -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 +29 -14
- package/dist/internal/cli-runtime.cjs +24 -11
- package/dist/internal/cli-runtime.mjs +24 -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 +6 -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 +5 -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 -13
- package/dist/internal/production-runtime.d.mts +20 -10
- package/dist/internal/production-runtime.d.ts +20 -10
- package/dist/internal/production-runtime.mjs +24 -13
- 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 +19 -12
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +18 -11
- package/dist/{production-runtime-bjjWq-DA.d.ts → production-runtime-BVMDgHrA.d.ts} +1 -1
- package/dist/{production-runtime-CHFKIgpW.d.mts → production-runtime-ClFA_1KQ.d.mts} +1 -1
- package/dist/query/client.cjs +6 -5
- package/dist/query/client.mjs +2 -1
- package/dist/{render-plan-DOHg6wdO.d.mts → render-plan-CoSovy_O.d.mts} +4 -2
- package/dist/{render-plan-B2UndB4x.d.ts → render-plan-y2DefWf8.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-DVNXRQrI.d.ts → request-aG5Wovm5.d.ts} +1 -1
- package/dist/{request-DQcGfdgQ.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-B_6fj-GG.d.ts → route-rendering-B3uQmCWX.d.ts} +1 -1
- package/dist/{route-rendering-CEX4mFn-.d.mts → route-rendering-EyInfsjI.d.mts} +1 -1
- package/dist/{router-CHEMHm1P.d.ts → router-DNUf-Bg1.d.ts} +1 -1
- package/dist/{router-CKHPBKXX.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-4ZJ6GUVQ.cjs +78 -0
- package/dist/rsc-pipeline-KK6GFDET.mjs +78 -0
- package/dist/{runtime-jj8TKNsy.d.mts → runtime-9KZb8AI5.d.mts} +1 -1
- package/dist/{runtime-Br2ZDTAv.d.ts → runtime-CLr9P5kn.d.ts} +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 +57 -38
- package/dist/server.d.mts +15 -10
- package/dist/server.d.ts +15 -10
- package/dist/server.mjs +37 -18
- package/dist/{spa-router-BEvS9Erj.d.mts → spa-router-BIxh4IY-.d.mts} +8 -3
- package/dist/{spa-router-DmCuH5B7.d.ts → spa-router-Ds6R_oe-.d.ts} +8 -3
- package/dist/{ssg-57v6cZcW.d.mts → ssg-ByrOVYdM.d.mts} +2 -2
- package/dist/{ssg-gT093ETk.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-CCTKvR-P.d.ts → utils-BN70ueSN.d.ts} +1 -1
- package/dist/{utils-raHHQVyL.d.mts → utils-BrjR5xRs.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +19 -12
- package/dist/vite.d.mts +6 -4
- package/dist/vite.d.ts +6 -4
- package/dist/vite.mjs +18 -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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _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 _chunkLYLEZIG3cjs = require('./chunk-LYLEZIG3.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
11
|
+
|
|
12
|
+
// src/build/tailwind.ts
|
|
13
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, 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 (!_optionalChain([plugin, 'access', _ => _.name, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("@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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, adaptPluginOption, "adaptPluginOption");
|
|
44
|
+
function isVitePluginHook(value) {
|
|
45
|
+
return typeof value === "function";
|
|
46
|
+
}
|
|
47
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, 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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, withVite5TransformContext, "withVite5TransformContext");
|
|
60
|
+
|
|
61
|
+
// src/build/tailwind.ts
|
|
62
|
+
var TAILWIND_CSS_IMPORT = /@import\s+["']tailwindcss["']/;
|
|
63
|
+
var TAILWIND_VITE_INSTALL_HINT = _chunkLYLEZIG3cjs.formatOptionalPeerInstallHint.call(void 0,
|
|
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) _chunk5QIKR7RRcjs.logger.info("\u{1F4E6} Enabled built-in Tailwind support (@tailwindcss/vite)");
|
|
74
|
+
return plugin;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (_chunkLYLEZIG3cjs.isMissingPackageError.call(void 0, error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
|
|
77
|
+
_chunk5QIKR7RRcjs.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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, 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 = _path2.default.relative(root, id.split("?", 1)[0]).replace(/\\/g, "/");
|
|
98
|
+
_chunk5QIKR7RRcjs.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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createMissingTailwindPlugin, "createMissingTailwindPlugin");
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
exports.loadTailwindVitePlugin = loadTailwindVitePlugin;
|
|
@@ -2,6 +2,22 @@ import {
|
|
|
2
2
|
__name
|
|
3
3
|
} from "./chunk-LPEX4YW6.mjs";
|
|
4
4
|
|
|
5
|
+
// src/server-components-mode.ts
|
|
6
|
+
function resolveFarmServerComponentsMode(value) {
|
|
7
|
+
if (value === void 0 || value === null || value === false) return void 0;
|
|
8
|
+
if (value === true) return "rsc";
|
|
9
|
+
const mode = typeof value === "object" ? value.mode : void 0;
|
|
10
|
+
if (mode === "rsc" || mode === "islands") return mode;
|
|
11
|
+
throw new TypeError(
|
|
12
|
+
'experimental.serverComponents must be true, false, { mode: "rsc" } or { mode: "islands" }.'
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
__name(resolveFarmServerComponentsMode, "resolveFarmServerComponentsMode");
|
|
16
|
+
function isExplicitFarmServerComponentsMode(value) {
|
|
17
|
+
return typeof value === "object" && value !== null;
|
|
18
|
+
}
|
|
19
|
+
__name(isExplicitFarmServerComponentsMode, "isExplicitFarmServerComponentsMode");
|
|
20
|
+
|
|
5
21
|
// src/dev-indicators.ts
|
|
6
22
|
function resolveFarmDevIndicatorsConfig(config, mode = "development") {
|
|
7
23
|
return {
|
|
@@ -440,6 +456,8 @@ function validateFarmAuthConfig(config) {
|
|
|
440
456
|
__name(validateFarmAuthConfig, "validateFarmAuthConfig");
|
|
441
457
|
|
|
442
458
|
export {
|
|
459
|
+
resolveFarmServerComponentsMode,
|
|
460
|
+
isExplicitFarmServerComponentsMode,
|
|
443
461
|
setFarmProjectSourceDir,
|
|
444
462
|
getFarmProjectSourceDir,
|
|
445
463
|
resolveFarmDevIndicatorsConfig,
|
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
4
|
|
|
5
|
+
// src/server-components-mode.ts
|
|
6
|
+
function resolveFarmServerComponentsMode(value) {
|
|
7
|
+
if (value === void 0 || value === null || value === false) return void 0;
|
|
8
|
+
if (value === true) return "rsc";
|
|
9
|
+
const mode = typeof value === "object" ? value.mode : void 0;
|
|
10
|
+
if (mode === "rsc" || mode === "islands") return mode;
|
|
11
|
+
throw new TypeError(
|
|
12
|
+
'experimental.serverComponents must be true, false, { mode: "rsc" } or { mode: "islands" }.'
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmServerComponentsMode, "resolveFarmServerComponentsMode");
|
|
16
|
+
function isExplicitFarmServerComponentsMode(value) {
|
|
17
|
+
return typeof value === "object" && value !== null;
|
|
18
|
+
}
|
|
19
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isExplicitFarmServerComponentsMode, "isExplicitFarmServerComponentsMode");
|
|
20
|
+
|
|
5
21
|
// src/dev-indicators.ts
|
|
6
22
|
function resolveFarmDevIndicatorsConfig(config, mode = "development") {
|
|
7
23
|
return {
|
|
@@ -446,4 +462,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, validateFarmAuthConfig, "validateFarmAuthC
|
|
|
446
462
|
|
|
447
463
|
|
|
448
464
|
|
|
449
|
-
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
exports.resolveFarmServerComponentsMode = resolveFarmServerComponentsMode; exports.isExplicitFarmServerComponentsMode = isExplicitFarmServerComponentsMode; exports.setFarmProjectSourceDir = setFarmProjectSourceDir; exports.getFarmProjectSourceDir = getFarmProjectSourceDir; exports.resolveFarmDevIndicatorsConfig = resolveFarmDevIndicatorsConfig; exports.generateFarmDevIndicatorsClientRuntime = generateFarmDevIndicatorsClientRuntime; exports.resolveFarmAuthConfig = resolveFarmAuthConfig; exports.resolveFarmAuthIntegration = resolveFarmAuthIntegration;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ACTION_TAG,
|
|
3
|
+
FARM_OBJECT_TAG,
|
|
4
|
+
FARM_REFERENCE_TAG,
|
|
5
|
+
FARM_SLOT_TAG,
|
|
6
|
+
FARM_TAG,
|
|
7
|
+
FARM_TAG_VALUE,
|
|
8
|
+
getFarmTag
|
|
9
|
+
} from "./chunk-2NXO5SBY.mjs";
|
|
10
|
+
import {
|
|
11
|
+
__name
|
|
12
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
13
|
+
|
|
14
|
+
// src/client/island-codec.ts
|
|
15
|
+
var TYPED_ARRAYS = {
|
|
16
|
+
Int8Array,
|
|
17
|
+
Uint8Array,
|
|
18
|
+
Uint8ClampedArray,
|
|
19
|
+
Int16Array,
|
|
20
|
+
Uint16Array,
|
|
21
|
+
Int32Array,
|
|
22
|
+
Uint32Array,
|
|
23
|
+
Float32Array,
|
|
24
|
+
Float64Array,
|
|
25
|
+
BigInt64Array,
|
|
26
|
+
BigUint64Array
|
|
27
|
+
};
|
|
28
|
+
function toBase64(bytes) {
|
|
29
|
+
let binary = "";
|
|
30
|
+
for (let index = 0; index < bytes.length; index += 32768) {
|
|
31
|
+
binary += String.fromCharCode(...bytes.subarray(index, index + 32768));
|
|
32
|
+
}
|
|
33
|
+
return btoa(binary);
|
|
34
|
+
}
|
|
35
|
+
__name(toBase64, "toBase64");
|
|
36
|
+
function fromBase64(base64) {
|
|
37
|
+
const binary = atob(base64);
|
|
38
|
+
const bytes = new Uint8Array(binary.length);
|
|
39
|
+
for (let index = 0; index < binary.length; index++) bytes[index] = binary.charCodeAt(index);
|
|
40
|
+
return bytes;
|
|
41
|
+
}
|
|
42
|
+
__name(fromBase64, "fromBase64");
|
|
43
|
+
function farmTagged(tag, value) {
|
|
44
|
+
return value === void 0 ? { [FARM_TAG]: tag } : { [FARM_TAG]: tag, [FARM_TAG_VALUE]: value };
|
|
45
|
+
}
|
|
46
|
+
__name(farmTagged, "farmTagged");
|
|
47
|
+
function needsFarmObjectTag(object) {
|
|
48
|
+
return Object.prototype.hasOwnProperty.call(object, FARM_TAG);
|
|
49
|
+
}
|
|
50
|
+
__name(needsFarmObjectTag, "needsFarmObjectTag");
|
|
51
|
+
function encodeFarmLeaf(value) {
|
|
52
|
+
switch (typeof value) {
|
|
53
|
+
case "undefined":
|
|
54
|
+
return farmTagged("u");
|
|
55
|
+
case "bigint":
|
|
56
|
+
return farmTagged("B", value.toString());
|
|
57
|
+
case "number":
|
|
58
|
+
if (Number.isNaN(value)) return farmTagged("n", "NaN");
|
|
59
|
+
if (value === Infinity) return farmTagged("n", "Infinity");
|
|
60
|
+
if (value === -Infinity) return farmTagged("n", "-Infinity");
|
|
61
|
+
if (Object.is(value, -0)) return farmTagged("n", "-0");
|
|
62
|
+
return void 0;
|
|
63
|
+
case "object":
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
return void 0;
|
|
67
|
+
}
|
|
68
|
+
if (value === null) return void 0;
|
|
69
|
+
if (value instanceof Date) {
|
|
70
|
+
return farmTagged("D", Number.isNaN(value.getTime()) ? null : value.toISOString());
|
|
71
|
+
}
|
|
72
|
+
if (typeof URL === "function" && value instanceof URL) return farmTagged("U", value.href);
|
|
73
|
+
if (value instanceof RegExp) return farmTagged("R", [value.source, value.flags]);
|
|
74
|
+
if (value instanceof ArrayBuffer) {
|
|
75
|
+
return farmTagged("Y", ["ArrayBuffer", toBase64(new Uint8Array(value))]);
|
|
76
|
+
}
|
|
77
|
+
if (ArrayBuffer.isView(value)) {
|
|
78
|
+
const name = value instanceof DataView ? "DataView" : value.constructor.name;
|
|
79
|
+
if (name !== "DataView" && !(name in TYPED_ARRAYS)) return void 0;
|
|
80
|
+
const bytes = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
81
|
+
return farmTagged("Y", [name, toBase64(bytes)]);
|
|
82
|
+
}
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
85
|
+
__name(encodeFarmLeaf, "encodeFarmLeaf");
|
|
86
|
+
var NOT_A_FARM_MARKER = /* @__PURE__ */ Symbol.for("farm.codec.not-a-marker");
|
|
87
|
+
function farmPlainObject(entries) {
|
|
88
|
+
const object = {};
|
|
89
|
+
for (const [key, value] of entries) {
|
|
90
|
+
Object.defineProperty(object, key, {
|
|
91
|
+
value,
|
|
92
|
+
enumerable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
configurable: true
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return object;
|
|
98
|
+
}
|
|
99
|
+
__name(farmPlainObject, "farmPlainObject");
|
|
100
|
+
function decodeFarmTagged(object, decodeChild) {
|
|
101
|
+
const tag = object[FARM_TAG];
|
|
102
|
+
const data = object[FARM_TAG_VALUE];
|
|
103
|
+
switch (tag) {
|
|
104
|
+
case FARM_REFERENCE_TAG:
|
|
105
|
+
case FARM_SLOT_TAG:
|
|
106
|
+
case FARM_ACTION_TAG:
|
|
107
|
+
return NOT_A_FARM_MARKER;
|
|
108
|
+
case FARM_OBJECT_TAG:
|
|
109
|
+
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
110
|
+
return farmPlainObject(
|
|
111
|
+
Object.entries(data).map(([key, value]) => [key, decodeChild(value)])
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
case "u":
|
|
116
|
+
return void 0;
|
|
117
|
+
case "n":
|
|
118
|
+
if (data === "NaN") return Number.NaN;
|
|
119
|
+
if (data === "Infinity") return Infinity;
|
|
120
|
+
if (data === "-Infinity") return -Infinity;
|
|
121
|
+
if (data === "-0") return -0;
|
|
122
|
+
break;
|
|
123
|
+
case "B":
|
|
124
|
+
if (typeof data === "string" && /^-?\d+$/.test(data)) return BigInt(data);
|
|
125
|
+
break;
|
|
126
|
+
case "D":
|
|
127
|
+
if (data === null) return new Date(Number.NaN);
|
|
128
|
+
if (typeof data === "string") return new Date(data);
|
|
129
|
+
break;
|
|
130
|
+
case "U":
|
|
131
|
+
if (typeof data === "string") return new URL(data);
|
|
132
|
+
break;
|
|
133
|
+
case "R":
|
|
134
|
+
if (Array.isArray(data) && typeof data[0] === "string" && typeof data[1] === "string") {
|
|
135
|
+
return new RegExp(data[0], data[1]);
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
case "Y": {
|
|
139
|
+
if (!Array.isArray(data) || typeof data[0] !== "string" || typeof data[1] !== "string") break;
|
|
140
|
+
const bytes = fromBase64(data[1]);
|
|
141
|
+
if (data[0] === "ArrayBuffer") return bytes.buffer;
|
|
142
|
+
if (data[0] === "DataView") return new DataView(bytes.buffer);
|
|
143
|
+
const TypedArray = Object.prototype.hasOwnProperty.call(TYPED_ARRAYS, data[0]) ? TYPED_ARRAYS[data[0]] : void 0;
|
|
144
|
+
if (!TypedArray || bytes.byteLength % TypedArray.BYTES_PER_ELEMENT !== 0) break;
|
|
145
|
+
return new TypedArray(
|
|
146
|
+
bytes.buffer,
|
|
147
|
+
0,
|
|
148
|
+
bytes.byteLength / TypedArray.BYTES_PER_ELEMENT
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
case "M":
|
|
152
|
+
if (Array.isArray(data) && data.every((entry) => Array.isArray(entry) && entry.length === 2)) {
|
|
153
|
+
return new Map(data.map(([key, value]) => [decodeChild(key), decodeChild(value)]));
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case "S":
|
|
157
|
+
if (Array.isArray(data)) return new Set(data.map(decodeChild));
|
|
158
|
+
break;
|
|
159
|
+
default:
|
|
160
|
+
throw new TypeError(`unknown ${JSON.stringify(tag)} tag`);
|
|
161
|
+
}
|
|
162
|
+
throw new TypeError(`malformed ${JSON.stringify(tag)} tag`);
|
|
163
|
+
}
|
|
164
|
+
__name(decodeFarmTagged, "decodeFarmTagged");
|
|
165
|
+
function encodeFarmJson(value, seen = /* @__PURE__ */ new Set()) {
|
|
166
|
+
const leaf = encodeFarmLeaf(value);
|
|
167
|
+
if (leaf) return leaf;
|
|
168
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return value;
|
|
169
|
+
if (typeof value === "number") return value;
|
|
170
|
+
if (typeof value !== "object") throw new TypeError(`${typeof value} values are not serializable`);
|
|
171
|
+
if (seen.has(value)) throw new TypeError("circular values are not serializable");
|
|
172
|
+
seen.add(value);
|
|
173
|
+
try {
|
|
174
|
+
if (Array.isArray(value)) return value.map((entry) => encodeFarmJson(entry, seen));
|
|
175
|
+
if (value instanceof Map) {
|
|
176
|
+
return farmTagged(
|
|
177
|
+
"M",
|
|
178
|
+
Array.from(value, ([key, entry]) => [
|
|
179
|
+
encodeFarmJson(key, seen),
|
|
180
|
+
encodeFarmJson(entry, seen)
|
|
181
|
+
])
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
if (value instanceof Set) {
|
|
185
|
+
return farmTagged(
|
|
186
|
+
"S",
|
|
187
|
+
Array.from(value, (entry) => encodeFarmJson(entry, seen))
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
const prototype = Object.getPrototypeOf(value);
|
|
191
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
192
|
+
throw new TypeError("class instances are not serializable");
|
|
193
|
+
}
|
|
194
|
+
const encoded = Object.fromEntries(
|
|
195
|
+
Object.entries(value).map(([key, entry]) => [key, encodeFarmJson(entry, seen)])
|
|
196
|
+
);
|
|
197
|
+
return needsFarmObjectTag(value) ? farmTagged(FARM_OBJECT_TAG, encoded) : encoded;
|
|
198
|
+
} finally {
|
|
199
|
+
seen.delete(value);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
__name(encodeFarmJson, "encodeFarmJson");
|
|
203
|
+
function decodeFarmJson(value) {
|
|
204
|
+
if (Array.isArray(value)) return value.map(decodeFarmJson);
|
|
205
|
+
if (!value || typeof value !== "object") return value;
|
|
206
|
+
if (getFarmTag(value) !== void 0) {
|
|
207
|
+
const decoded = decodeFarmTagged(value, decodeFarmJson);
|
|
208
|
+
if (decoded === NOT_A_FARM_MARKER) {
|
|
209
|
+
throw new TypeError(
|
|
210
|
+
`a ${JSON.stringify(value[FARM_TAG])} reference is not allowed here`
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
return decoded;
|
|
214
|
+
}
|
|
215
|
+
if (needsFarmObjectTag(value)) throw new TypeError('malformed "$" tag');
|
|
216
|
+
return farmPlainObject(Object.entries(value).map(([key, entry]) => [key, decodeFarmJson(entry)]));
|
|
217
|
+
}
|
|
218
|
+
__name(decodeFarmJson, "decodeFarmJson");
|
|
219
|
+
|
|
220
|
+
export {
|
|
221
|
+
farmTagged,
|
|
222
|
+
needsFarmObjectTag,
|
|
223
|
+
encodeFarmLeaf,
|
|
224
|
+
NOT_A_FARM_MARKER,
|
|
225
|
+
farmPlainObject,
|
|
226
|
+
decodeFarmTagged,
|
|
227
|
+
encodeFarmJson,
|
|
228
|
+
decodeFarmJson
|
|
229
|
+
};
|