@farm.js/core 0.1.0-beta.61 → 0.1.0-beta.63

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.
Files changed (63) hide show
  1. package/dist/{chunk-STAPBBAB.mjs → chunk-2OF7I73I.mjs} +6 -6
  2. package/dist/{chunk-IIHDYOPJ.mjs → chunk-5CXJTH45.mjs} +2 -2
  3. package/dist/{chunk-4DCGM2BW.mjs → chunk-DD7QQZZO.mjs} +2 -1
  4. package/dist/chunk-DD7QQZZO.mjs.map +1 -0
  5. package/dist/{chunk-DN5O4FJK.mjs → chunk-HSHHUDHL.mjs} +2 -2
  6. package/dist/{chunk-IOTXDUO3.mjs → chunk-I2VV3JAC.mjs} +8 -4
  7. package/dist/chunk-I2VV3JAC.mjs.map +1 -0
  8. package/dist/{chunk-V4AVEU3D.mjs → chunk-PFMBMZP7.mjs} +2 -2
  9. package/dist/{chunk-H3W5RDTS.mjs → chunk-R2R2SDVA.mjs} +2 -2
  10. package/dist/{chunk-H3W5RDTS.mjs.map → chunk-R2R2SDVA.mjs.map} +1 -1
  11. package/dist/{chunk-XN5ECVA5.mjs → chunk-TC6ECATF.mjs} +7 -7
  12. package/dist/client/lifecycle.mjs +2 -2
  13. package/dist/client-plugins.cjs +1 -1
  14. package/dist/client-plugins.cjs.map +1 -1
  15. package/dist/client-plugins.mjs +2 -2
  16. package/dist/client.cjs +1 -1
  17. package/dist/client.cjs.map +1 -1
  18. package/dist/client.mjs +2 -2
  19. package/dist/{devtools-ICDUIMLX.mjs → devtools-2FEBZ7RN.mjs} +4 -3
  20. package/dist/{devtools-ICDUIMLX.mjs.map → devtools-2FEBZ7RN.mjs.map} +1 -1
  21. package/dist/docs.mjs +4 -3
  22. package/dist/index.cjs +31 -28
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.mjs +8 -8
  25. package/dist/internal/build-runtime.cjs +31 -28
  26. package/dist/internal/build-runtime.cjs.map +1 -1
  27. package/dist/internal/build-runtime.mjs +7 -7
  28. package/dist/internal/client-runtime.cjs +2 -1
  29. package/dist/internal/client-runtime.cjs.map +1 -1
  30. package/dist/internal/client-runtime.mjs +3 -3
  31. package/dist/internal/config-runtime.cjs.map +1 -1
  32. package/dist/internal/config-runtime.mjs +3 -2
  33. package/dist/internal/production-runtime.cjs +1 -0
  34. package/dist/internal/production-runtime.cjs.map +1 -1
  35. package/dist/internal/production-runtime.mjs +3 -3
  36. package/dist/{nitro-NN6F5OUK.mjs → nitro-PXQCWM4D.mjs} +3 -2
  37. package/dist/{nitro-NN6F5OUK.mjs.map → nitro-PXQCWM4D.mjs.map} +1 -1
  38. package/dist/plugin.cjs +33 -23
  39. package/dist/plugin.cjs.map +1 -1
  40. package/dist/plugin.mjs +4 -4
  41. package/dist/server.cjs +33 -23
  42. package/dist/server.cjs.map +1 -1
  43. package/dist/server.mjs +5 -5
  44. package/dist/testing.cjs +1 -0
  45. package/dist/testing.cjs.map +1 -1
  46. package/dist/testing.mjs +1 -1
  47. package/dist/version.cjs +1 -1
  48. package/dist/version.cjs.map +1 -1
  49. package/dist/version.mjs +1 -1
  50. package/dist/vite.cjs +33 -23
  51. package/dist/vite.cjs.map +1 -1
  52. package/dist/vite.mjs +4 -4
  53. package/dist/workflows.cjs +24 -3
  54. package/dist/workflows.cjs.map +1 -1
  55. package/dist/workflows.mjs +2 -1
  56. package/package.json +3 -3
  57. package/dist/chunk-4DCGM2BW.mjs.map +0 -1
  58. package/dist/chunk-IOTXDUO3.mjs.map +0 -1
  59. /package/dist/{chunk-STAPBBAB.mjs.map → chunk-2OF7I73I.mjs.map} +0 -0
  60. /package/dist/{chunk-IIHDYOPJ.mjs.map → chunk-5CXJTH45.mjs.map} +0 -0
  61. /package/dist/{chunk-DN5O4FJK.mjs.map → chunk-HSHHUDHL.mjs.map} +0 -0
  62. /package/dist/{chunk-V4AVEU3D.mjs.map → chunk-PFMBMZP7.mjs.map} +0 -0
  63. /package/dist/{chunk-XN5ECVA5.mjs.map → chunk-TC6ECATF.mjs.map} +0 -0
package/dist/plugin.mjs CHANGED
@@ -6,13 +6,12 @@ import {
6
6
  import "./chunk-RQ633A5I.mjs";
7
7
  import {
8
8
  farmPlugin
9
- } from "./chunk-XN5ECVA5.mjs";
9
+ } from "./chunk-TC6ECATF.mjs";
10
10
  import "./chunk-MD4TKIKU.mjs";
11
11
  import "./chunk-ZVDDKVZY.mjs";
12
12
  import "./chunk-AMZZCRQ7.mjs";
13
13
  import "./chunk-6ZXIQSXE.mjs";
14
14
  import "./chunk-V6WE6JSZ.mjs";
15
- import "./chunk-4DCGM2BW.mjs";
16
15
  import "./chunk-3XNTL3FQ.mjs";
17
16
  import "./chunk-CGIXMLSY.mjs";
18
17
  import "./chunk-USWZZUEH.mjs";
@@ -27,7 +26,8 @@ import "./chunk-GY2STC2S.mjs";
27
26
  import "./chunk-JHCNZLFT.mjs";
28
27
  import "./chunk-A5VG2BDG.mjs";
29
28
  import "./chunk-7FBJLMQH.mjs";
30
- import "./chunk-IOTXDUO3.mjs";
29
+ import "./chunk-I2VV3JAC.mjs";
30
+ import "./chunk-DD7QQZZO.mjs";
31
31
  import "./chunk-RS5Z5M26.mjs";
32
32
  import "./chunk-WORFTBLU.mjs";
33
33
  import "./chunk-7HO6AEOP.mjs";
@@ -64,7 +64,7 @@ import "./chunk-RBRLLZL5.mjs";
64
64
  import "./chunk-WZ5QFROO.mjs";
65
65
  import "./chunk-7ZMKVETU.mjs";
66
66
  import "./chunk-FXG2PS27.mjs";
67
- import "./chunk-H3W5RDTS.mjs";
67
+ import "./chunk-R2R2SDVA.mjs";
68
68
  import "./chunk-CGILA3WO.mjs";
69
69
  export {
70
70
  FarmRuntimeShutdownError,
package/dist/server.cjs CHANGED
@@ -617,6 +617,31 @@ var init_server_http = __esm({
617
617
  }
618
618
  });
619
619
 
620
+ // src/search-params.ts
621
+ function searchParamsToObject(searchParams) {
622
+ const output = {};
623
+ searchParams.forEach((value, key) => {
624
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return;
625
+ const existing = output[key];
626
+ if (existing !== void 0) {
627
+ if (Array.isArray(existing)) {
628
+ existing.push(value);
629
+ } else {
630
+ output[key] = [existing, value];
631
+ }
632
+ } else {
633
+ output[key] = value;
634
+ }
635
+ });
636
+ return output;
637
+ }
638
+ var init_search_params = __esm({
639
+ "src/search-params.ts"() {
640
+ "use strict";
641
+ __name(searchParamsToObject, "searchParamsToObject");
642
+ }
643
+ });
644
+
620
645
  // src/utils/decode.ts
621
646
  function decodeRouteSegment(segment) {
622
647
  try {
@@ -1205,7 +1230,8 @@ import { H3 } from "h3";
1205
1230
  import { runTask } from "nitro/runtime";
1206
1231
  import {
1207
1232
  createFarmRequestBodyErrorResponse,
1208
- readFarmRequestBody
1233
+ readFarmRequestBody,
1234
+ searchParamsToObject
1209
1235
  } from "@farm.js/core/internal/production-runtime";
1210
1236
 
1211
1237
  const route = ${JSON.stringify(config.route)};
@@ -1250,7 +1276,7 @@ function verifySecret(event) {
1250
1276
 
1251
1277
  async function readPayload(event) {
1252
1278
  if (event.req.method === "GET" || event.req.method === "HEAD") {
1253
- return Object.fromEntries(event.url.searchParams.entries());
1279
+ return searchParamsToObject(event.url.searchParams);
1254
1280
  }
1255
1281
  const bytes = await readFarmRequestBody(event.req, bodySizeLimit);
1256
1282
  const text = new TextDecoder().decode(bytes);
@@ -1312,7 +1338,7 @@ function toWorkflowMetadata(workflow) {
1312
1338
  async function readWorkflowPayload(request, bodySizeLimit) {
1313
1339
  const url = new URL(request.url);
1314
1340
  if (request.method === "GET" || request.method === "HEAD") {
1315
- return Object.fromEntries(url.searchParams.entries());
1341
+ return searchParamsToObject(url.searchParams);
1316
1342
  }
1317
1343
  const bytes = await readFarmRequestBody(request, bodySizeLimit);
1318
1344
  const text2 = new TextDecoder().decode(bytes);
@@ -1356,6 +1382,7 @@ var init_workflows = __esm({
1356
1382
  "src/workflows.ts"() {
1357
1383
  "use strict";
1358
1384
  init_server_http();
1385
+ init_search_params();
1359
1386
  init_decode();
1360
1387
  init_utils();
1361
1388
  DEFAULT_FARM_WORKFLOW_DIRS = ["src/jobs", "src/workflows", "src/cron"];
@@ -18642,25 +18669,7 @@ __name(escapeAttribute, "escapeAttribute");
18642
18669
 
18643
18670
  // src/server/renderer.ts
18644
18671
  init_route_context();
18645
-
18646
- // src/search-params.ts
18647
- function searchParamsToObject(searchParams) {
18648
- const output = {};
18649
- searchParams.forEach((value, key) => {
18650
- const existing = output[key];
18651
- if (existing !== void 0) {
18652
- if (Array.isArray(existing)) {
18653
- existing.push(value);
18654
- } else {
18655
- output[key] = [existing, value];
18656
- }
18657
- } else {
18658
- output[key] = value;
18659
- }
18660
- });
18661
- return output;
18662
- }
18663
- __name(searchParamsToObject, "searchParamsToObject");
18672
+ init_search_params();
18664
18673
 
18665
18674
  // src/deferred.ts
18666
18675
  var FARM_DEFERRED_CONTENT_TYPE = "application/x-farm-deferred+json";
@@ -21558,7 +21567,7 @@ _setFarmThemeServerSnapshotResolver(() => {
21558
21567
  });
21559
21568
 
21560
21569
  // package.json
21561
- var version = "0.1.0-beta.61";
21570
+ var version = "0.1.0-beta.63";
21562
21571
 
21563
21572
  // src/version.ts
21564
21573
  var FARM_VERSION = version;
@@ -26927,6 +26936,7 @@ ${FARM_DARK_VARIANT}
26927
26936
  __name(createFarmThemeCssPlugin, "createFarmThemeCssPlugin");
26928
26937
 
26929
26938
  // src/vite.ts
26939
+ init_search_params();
26930
26940
  init_observability();
26931
26941
  init_renderer();
26932
26942