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

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-XN5ECVA5.mjs → chunk-C7T5DENI.mjs} +7 -7
  2. package/dist/{chunk-4DCGM2BW.mjs → chunk-DD7QQZZO.mjs} +2 -1
  3. package/dist/chunk-DD7QQZZO.mjs.map +1 -0
  4. package/dist/{chunk-DN5O4FJK.mjs → chunk-HSHHUDHL.mjs} +2 -2
  5. package/dist/{chunk-IOTXDUO3.mjs → chunk-I2VV3JAC.mjs} +8 -4
  6. package/dist/chunk-I2VV3JAC.mjs.map +1 -0
  7. package/dist/{chunk-IIHDYOPJ.mjs → chunk-KFBUUMC7.mjs} +2 -2
  8. package/dist/{chunk-V4AVEU3D.mjs → chunk-PFMBMZP7.mjs} +2 -2
  9. package/dist/{chunk-H3W5RDTS.mjs → chunk-QAITEWX3.mjs} +2 -2
  10. package/dist/{chunk-H3W5RDTS.mjs.map → chunk-QAITEWX3.mjs.map} +1 -1
  11. package/dist/{chunk-STAPBBAB.mjs → chunk-WAFLTUHT.mjs} +6 -6
  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 +1 -1
  57. package/dist/chunk-4DCGM2BW.mjs.map +0 -1
  58. package/dist/chunk-IOTXDUO3.mjs.map +0 -1
  59. /package/dist/{chunk-XN5ECVA5.mjs.map → chunk-C7T5DENI.mjs.map} +0 -0
  60. /package/dist/{chunk-DN5O4FJK.mjs.map → chunk-HSHHUDHL.mjs.map} +0 -0
  61. /package/dist/{chunk-IIHDYOPJ.mjs.map → chunk-KFBUUMC7.mjs.map} +0 -0
  62. /package/dist/{chunk-V4AVEU3D.mjs.map → chunk-PFMBMZP7.mjs.map} +0 -0
  63. /package/dist/{chunk-STAPBBAB.mjs.map → chunk-WAFLTUHT.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-HEOT63FC.mjs";
10
10
  import {
11
11
  build
12
- } from "./chunk-STAPBBAB.mjs";
12
+ } from "./chunk-WAFLTUHT.mjs";
13
13
  import "./chunk-SL6HTIOK.mjs";
14
14
  import "./chunk-4S3ORGFA.mjs";
15
15
  import {
@@ -25,7 +25,7 @@ import {
25
25
  isFarmDocsRequest,
26
26
  loadFarmDocsPage,
27
27
  resolveFarmDocsContentDir
28
- } from "./chunk-DN5O4FJK.mjs";
28
+ } from "./chunk-HSHHUDHL.mjs";
29
29
  import "./chunk-V7RBCSDJ.mjs";
30
30
  import {
31
31
  usePathname,
@@ -104,7 +104,7 @@ import {
104
104
  resolveDeployConfig,
105
105
  resolveDeployOutputPath,
106
106
  resolveMigrationsConfig
107
- } from "./chunk-V4AVEU3D.mjs";
107
+ } from "./chunk-PFMBMZP7.mjs";
108
108
  import {
109
109
  defineConfig,
110
110
  defineFarmConfig
@@ -208,7 +208,7 @@ import {
208
208
  createClientPluginManager,
209
209
  installChunkErrorRecovery,
210
210
  isChunkLoadError
211
- } from "./chunk-IIHDYOPJ.mjs";
211
+ } from "./chunk-KFBUUMC7.mjs";
212
212
  import {
213
213
  analyzeStaticRouteCandidate,
214
214
  collectSSGPages,
@@ -227,7 +227,7 @@ import {
227
227
  parseRouteRenderingDirective,
228
228
  resolveRouteRenderingConfig,
229
229
  resolveRouteRenderingConfigFromFile
230
- } from "./chunk-XN5ECVA5.mjs";
230
+ } from "./chunk-C7T5DENI.mjs";
231
231
  import {
232
232
  APITypeGenerator
233
233
  } from "./chunk-MD4TKIKU.mjs";
@@ -240,7 +240,6 @@ import {
240
240
  resolveFarmLayoutFonts
241
241
  } from "./chunk-6ZXIQSXE.mjs";
242
242
  import "./chunk-V6WE6JSZ.mjs";
243
- import "./chunk-4DCGM2BW.mjs";
244
243
  import "./chunk-3XNTL3FQ.mjs";
245
244
  import {
246
245
  createEnvTypeDeclarations,
@@ -309,7 +308,8 @@ import {
309
308
  prepareFarmWorkflowsForNitro,
310
309
  resolveWorkflowsConfig,
311
310
  runFarmWorkflowModule
312
- } from "./chunk-IOTXDUO3.mjs";
311
+ } from "./chunk-I2VV3JAC.mjs";
312
+ import "./chunk-DD7QQZZO.mjs";
313
313
  import {
314
314
  DEFAULT_FARM_CRON_SECRET_ENV,
315
315
  FARM_CRON_MANIFEST,
@@ -569,7 +569,7 @@ import {
569
569
  runWithFarmSpan
570
570
  } from "./chunk-7ZMKVETU.mjs";
571
571
  import "./chunk-FXG2PS27.mjs";
572
- import "./chunk-H3W5RDTS.mjs";
572
+ import "./chunk-QAITEWX3.mjs";
573
573
  import {
574
574
  createCompressionPlugin,
575
575
  createEnvPlugin,
@@ -3248,6 +3248,31 @@ var init_markdown = __esm({
3248
3248
  }
3249
3249
  });
3250
3250
 
3251
+ // src/search-params.ts
3252
+ function searchParamsToObject(searchParams) {
3253
+ const output = {};
3254
+ searchParams.forEach((value, key) => {
3255
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return;
3256
+ const existing = output[key];
3257
+ if (existing !== void 0) {
3258
+ if (Array.isArray(existing)) {
3259
+ existing.push(value);
3260
+ } else {
3261
+ output[key] = [existing, value];
3262
+ }
3263
+ } else {
3264
+ output[key] = value;
3265
+ }
3266
+ });
3267
+ return output;
3268
+ }
3269
+ var init_search_params = __esm({
3270
+ "src/search-params.ts"() {
3271
+ "use strict";
3272
+ __name(searchParamsToObject, "searchParamsToObject");
3273
+ }
3274
+ });
3275
+
3251
3276
  // src/utils.ts
3252
3277
  function parseRoutePath(filePath) {
3253
3278
  const segments = [];
@@ -3793,7 +3818,8 @@ import { H3 } from "h3";
3793
3818
  import { runTask } from "nitro/runtime";
3794
3819
  import {
3795
3820
  createFarmRequestBodyErrorResponse,
3796
- readFarmRequestBody
3821
+ readFarmRequestBody,
3822
+ searchParamsToObject
3797
3823
  } from "@farm.js/core/internal/production-runtime";
3798
3824
 
3799
3825
  const route = ${JSON.stringify(config.route)};
@@ -3838,7 +3864,7 @@ function verifySecret(event) {
3838
3864
 
3839
3865
  async function readPayload(event) {
3840
3866
  if (event.req.method === "GET" || event.req.method === "HEAD") {
3841
- return Object.fromEntries(event.url.searchParams.entries());
3867
+ return searchParamsToObject(event.url.searchParams);
3842
3868
  }
3843
3869
  const bytes = await readFarmRequestBody(event.req, bodySizeLimit);
3844
3870
  const text = new TextDecoder().decode(bytes);
@@ -3900,7 +3926,7 @@ function toWorkflowMetadata(workflow) {
3900
3926
  async function readWorkflowPayload(request, bodySizeLimit) {
3901
3927
  const url = new URL(request.url);
3902
3928
  if (request.method === "GET" || request.method === "HEAD") {
3903
- return Object.fromEntries(url.searchParams.entries());
3929
+ return searchParamsToObject(url.searchParams);
3904
3930
  }
3905
3931
  const bytes = await readFarmRequestBody(request, bodySizeLimit);
3906
3932
  const text2 = new TextDecoder().decode(bytes);
@@ -3944,6 +3970,7 @@ var init_workflows = __esm({
3944
3970
  "src/workflows.ts"() {
3945
3971
  "use strict";
3946
3972
  init_server_http();
3973
+ init_search_params();
3947
3974
  init_decode();
3948
3975
  init_utils();
3949
3976
  DEFAULT_FARM_WORKFLOW_DIRS = ["src/jobs", "src/workflows", "src/cron"];
@@ -12184,30 +12211,6 @@ var init_metadata = __esm({
12184
12211
  }
12185
12212
  });
12186
12213
 
12187
- // src/search-params.ts
12188
- function searchParamsToObject(searchParams) {
12189
- const output = {};
12190
- searchParams.forEach((value, key) => {
12191
- const existing = output[key];
12192
- if (existing !== void 0) {
12193
- if (Array.isArray(existing)) {
12194
- existing.push(value);
12195
- } else {
12196
- output[key] = [existing, value];
12197
- }
12198
- } else {
12199
- output[key] = value;
12200
- }
12201
- });
12202
- return output;
12203
- }
12204
- var init_search_params = __esm({
12205
- "src/search-params.ts"() {
12206
- "use strict";
12207
- __name(searchParamsToObject, "searchParamsToObject");
12208
- }
12209
- });
12210
-
12211
12214
  // src/deferred.ts
12212
12215
  function isDeferred(value) {
12213
12216
  return Boolean(
@@ -15192,7 +15195,7 @@ var init_server3 = __esm({
15192
15195
  var version;
15193
15196
  var init_package = __esm({
15194
15197
  "package.json"() {
15195
- version = "0.1.0-beta.61";
15198
+ version = "0.1.0-beta.62";
15196
15199
  }
15197
15200
  });
15198
15201