@farm.js/core 0.1.0-beta.48 → 0.1.0-beta.49

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 (92) hide show
  1. package/dist/api/route-manager.cjs.map +1 -1
  2. package/dist/api/route-manager.mjs +2 -2
  3. package/dist/api.cjs.map +1 -1
  4. package/dist/api.mjs +3 -3
  5. package/dist/{chunk-TIESOJ7Z.mjs → chunk-BOSVED4K.mjs} +2 -2
  6. package/dist/{chunk-XR7M5VXU.mjs → chunk-DF6GAB63.mjs} +2 -2
  7. package/dist/{chunk-3P63LWDM.mjs → chunk-DWG3W2FN.mjs} +2 -2
  8. package/dist/{chunk-3UUEBVR3.mjs → chunk-ECGXDMBF.mjs} +3 -3
  9. package/dist/{chunk-MP2SDRRB.mjs → chunk-HB3XKQ5X.mjs} +2 -2
  10. package/dist/{chunk-EHUGMAWL.mjs → chunk-LIBL3V6K.mjs} +3 -3
  11. package/dist/{chunk-ECLWCE4H.mjs → chunk-MHE2AMUC.mjs} +2 -2
  12. package/dist/{chunk-GXASWWJU.mjs → chunk-RS5Z5M26.mjs} +5 -2
  13. package/dist/chunk-RS5Z5M26.mjs.map +1 -0
  14. package/dist/{chunk-HEZHCCMF.mjs → chunk-UQ3PDDAK.mjs} +65 -29
  15. package/dist/chunk-UQ3PDDAK.mjs.map +1 -0
  16. package/dist/{chunk-VZKOMD6C.mjs → chunk-VVVDVGAS.mjs} +8 -8
  17. package/dist/{chunk-NKIHYEWC.mjs → chunk-X3JR4G7L.mjs} +2 -2
  18. package/dist/{chunk-NKIHYEWC.mjs.map → chunk-X3JR4G7L.mjs.map} +1 -1
  19. package/dist/{chunk-4E6VRJ6P.mjs → chunk-XY3B4K5E.mjs} +6 -3
  20. package/dist/chunk-XY3B4K5E.mjs.map +1 -0
  21. package/dist/{chunk-U5SPS2HR.mjs → chunk-YB7QPRM4.mjs} +6 -1
  22. package/dist/chunk-YB7QPRM4.mjs.map +1 -0
  23. package/dist/client/lifecycle.mjs +2 -2
  24. package/dist/client-plugins.cjs +1 -1
  25. package/dist/client-plugins.cjs.map +1 -1
  26. package/dist/client-plugins.mjs +2 -2
  27. package/dist/client.cjs +1 -1
  28. package/dist/client.cjs.map +1 -1
  29. package/dist/client.mjs +2 -2
  30. package/dist/cron.cjs +9 -1
  31. package/dist/cron.cjs.map +1 -1
  32. package/dist/cron.mjs +2 -1
  33. package/dist/{devtools-BUFIHBX3.mjs → devtools-S7KR2MMF.mjs} +5 -4
  34. package/dist/{devtools-BUFIHBX3.mjs.map → devtools-S7KR2MMF.mjs.map} +1 -1
  35. package/dist/docs.mjs +5 -4
  36. package/dist/index.cjs +66 -23
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.mts +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.mjs +15 -13
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/internal/build-runtime.cjs +230 -189
  43. package/dist/internal/build-runtime.cjs.map +1 -1
  44. package/dist/internal/build-runtime.d.mts +1 -1
  45. package/dist/internal/build-runtime.d.ts +1 -1
  46. package/dist/internal/build-runtime.mjs +10 -10
  47. package/dist/internal/client-runtime.cjs +1 -1
  48. package/dist/internal/client-runtime.cjs.map +1 -1
  49. package/dist/internal/client-runtime.mjs +2 -2
  50. package/dist/internal/config-runtime.cjs +10 -10
  51. package/dist/internal/config-runtime.cjs.map +1 -1
  52. package/dist/internal/config-runtime.d.mts +1 -1
  53. package/dist/internal/config-runtime.d.ts +1 -1
  54. package/dist/internal/config-runtime.mjs +4 -4
  55. package/dist/middleware.cjs.map +1 -1
  56. package/dist/middleware.mjs +3 -3
  57. package/dist/{nitro-G3BP7E7F.mjs → nitro-VXD26VW2.mjs} +4 -3
  58. package/dist/{nitro-G3BP7E7F.mjs.map → nitro-VXD26VW2.mjs.map} +1 -1
  59. package/dist/plugin.cjs +171 -149
  60. package/dist/plugin.cjs.map +1 -1
  61. package/dist/plugin.mjs +7 -7
  62. package/dist/server.cjs +203 -177
  63. package/dist/server.cjs.map +1 -1
  64. package/dist/server.d.mts +1 -1
  65. package/dist/server.d.ts +1 -1
  66. package/dist/server.mjs +10 -8
  67. package/dist/server.mjs.map +1 -1
  68. package/dist/testing.mjs +2 -2
  69. package/dist/{utils-9OPxcT1T.d.mts → utils--3v-RtD3.d.mts} +7 -1
  70. package/dist/{utils-CIIoLfn9.d.ts → utils-J3ipMElz.d.ts} +7 -1
  71. package/dist/version.cjs +1 -1
  72. package/dist/version.cjs.map +1 -1
  73. package/dist/version.mjs +1 -1
  74. package/dist/vite.cjs +171 -149
  75. package/dist/vite.cjs.map +1 -1
  76. package/dist/vite.mjs +7 -7
  77. package/dist/workflows.cjs +8 -2
  78. package/dist/workflows.cjs.map +1 -1
  79. package/dist/workflows.mjs +2 -1
  80. package/package.json +1 -1
  81. package/dist/chunk-4E6VRJ6P.mjs.map +0 -1
  82. package/dist/chunk-GXASWWJU.mjs.map +0 -1
  83. package/dist/chunk-HEZHCCMF.mjs.map +0 -1
  84. package/dist/chunk-U5SPS2HR.mjs.map +0 -1
  85. /package/dist/{chunk-TIESOJ7Z.mjs.map → chunk-BOSVED4K.mjs.map} +0 -0
  86. /package/dist/{chunk-XR7M5VXU.mjs.map → chunk-DF6GAB63.mjs.map} +0 -0
  87. /package/dist/{chunk-3P63LWDM.mjs.map → chunk-DWG3W2FN.mjs.map} +0 -0
  88. /package/dist/{chunk-3UUEBVR3.mjs.map → chunk-ECGXDMBF.mjs.map} +0 -0
  89. /package/dist/{chunk-MP2SDRRB.mjs.map → chunk-HB3XKQ5X.mjs.map} +0 -0
  90. /package/dist/{chunk-EHUGMAWL.mjs.map → chunk-LIBL3V6K.mjs.map} +0 -0
  91. /package/dist/{chunk-ECLWCE4H.mjs.map → chunk-MHE2AMUC.mjs.map} +0 -0
  92. /package/dist/{chunk-VZKOMD6C.mjs.map → chunk-VVVDVGAS.mjs.map} +0 -0
package/dist/index.cjs CHANGED
@@ -263,6 +263,9 @@ function toRootRelativeUrlPath(absolutePath, projectRoot) {
263
263
  }
264
264
  return void 0;
265
265
  }
266
+ function toPosixPath(filePath) {
267
+ return filePath.replace(/\\/g, "/");
268
+ }
266
269
  function toViteModuleId(filePath, root) {
267
270
  if (!import_path.default.isAbsolute(filePath)) return filePath;
268
271
  const relativePath2 = import_path.default.relative(root, filePath);
@@ -312,6 +315,7 @@ var init_utils = __esm({
312
315
  __name(matchRoute, "matchRoute");
313
316
  __name(resolveAppPath, "resolveAppPath");
314
317
  __name(toRootRelativeUrlPath, "toRootRelativeUrlPath");
318
+ __name(toPosixPath, "toPosixPath");
315
319
  __name(toViteModuleId, "toViteModuleId");
316
320
  __name(fileExists, "fileExists");
317
321
  __name(globFiles, "globFiles");
@@ -4011,14 +4015,14 @@ async function prepareFarmWorkflowsForNitro(config) {
4011
4015
  const tasks = {};
4012
4016
  const scheduledTasks = createScheduledTasks(workflows);
4013
4017
  for (const workflow of workflows) {
4014
- const wrapperPath = path38.join(generatedDir, `${safeFileName(workflow.id)}.mjs`);
4018
+ const wrapperPath = toPosixPath(path38.join(generatedDir, `${safeFileName(workflow.id)}.mjs`));
4015
4019
  await fs13.writeFile(wrapperPath, createNitroTaskWrapper(workflow), "utf8");
4016
4020
  tasks[workflow.id] = {
4017
4021
  handler: wrapperPath,
4018
4022
  description: workflow.description || `Farm workflow ${workflow.id}`
4019
4023
  };
4020
4024
  }
4021
- const handlerPath = path38.join(generatedDir, "http-handler.mjs");
4025
+ const handlerPath = toPosixPath(path38.join(generatedDir, "http-handler.mjs"));
4022
4026
  await fs13.writeFile(
4023
4027
  handlerPath,
4024
4028
  createNitroWorkflowHTTPHandler(
@@ -4377,6 +4381,7 @@ var init_workflows = __esm({
4377
4381
  "src/workflows.ts"() {
4378
4382
  "use strict";
4379
4383
  init_server_http();
4384
+ init_utils();
4380
4385
  DEFAULT_FARM_WORKFLOW_DIRS = ["src/jobs", "src/workflows", "src/cron"];
4381
4386
  DEFAULT_FARM_WORKFLOW_ROUTE = "/api/_farm/workflows";
4382
4387
  DEFAULT_FARM_WORKFLOW_SECRET_ENV = "CRON_SECRET";
@@ -4464,7 +4469,7 @@ async function prepareFarmCronForNitro(config) {
4464
4469
  const tasks = {};
4465
4470
  for (const job of cron.jobs) {
4466
4471
  const taskName = getFarmCronTaskName(job.name);
4467
- const wrapperPath = path38.join(generatedDir, `${safeFileName2(job.name)}.mjs`);
4472
+ const wrapperPath = toPosixPath(path38.join(generatedDir, `${safeFileName2(job.name)}.mjs`));
4468
4473
  await fs13.writeFile(wrapperPath, createNitroCronTaskWrapper(job, cron.secretEnv), "utf8");
4469
4474
  tasks[taskName] = {
4470
4475
  handler: wrapperPath,
@@ -4731,6 +4736,7 @@ var DEFAULT_FARM_CRON_SECRET_ENV, FARM_CRON_MANIFEST, CRON_FIELD_RANGES;
4731
4736
  var init_cron = __esm({
4732
4737
  "src/cron.ts"() {
4733
4738
  "use strict";
4739
+ init_utils();
4734
4740
  DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
4735
4741
  FARM_CRON_MANIFEST = "cron-manifest.json";
4736
4742
  CRON_FIELD_RANGES = [
@@ -15249,7 +15255,7 @@ var init_server3 = __esm({
15249
15255
  var version;
15250
15256
  var init_package = __esm({
15251
15257
  "package.json"() {
15252
- version = "0.1.0-beta.48";
15258
+ version = "0.1.0-beta.49";
15253
15259
  }
15254
15260
  });
15255
15261
 
@@ -34332,6 +34338,7 @@ __export(src_exports, {
34332
34338
  storageCacheAdapter: () => storageCacheAdapter,
34333
34339
  titleFromMarkdown: () => titleFromMarkdown,
34334
34340
  toFormData: () => toFormData,
34341
+ toPosixPath: () => toPosixPath,
34335
34342
  toRootRelativeUrlPath: () => toRootRelativeUrlPath,
34336
34343
  toViteModuleId: () => toViteModuleId,
34337
34344
  toggleTheme: () => toggleTheme,
@@ -42491,6 +42498,10 @@ function generateFarmDocsRuntimeConfigExpression(docs) {
42491
42498
  : ${JSON.stringify(docs)}`;
42492
42499
  }
42493
42500
  __name(generateFarmDocsRuntimeConfigExpression, "generateFarmDocsRuntimeConfigExpression");
42501
+ function toVirtualEntryImportSpecifier(modulePath) {
42502
+ return JSON.stringify(modulePath.replace(/\\/g, "/"));
42503
+ }
42504
+ __name(toVirtualEntryImportSpecifier, "toVirtualEntryImportSpecifier");
42494
42505
  function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, notFoundPath, instrumentationPath, config, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, preset, i18nCatalogs) {
42495
42506
  const hasPluginRuntime = hasRuntimeIntegrationConfig || hasConfiguredRuntimePlugins;
42496
42507
  const adapterOwnsDocsRuntime = Boolean(
@@ -42507,7 +42518,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42507
42518
  const apiRegistrations = [];
42508
42519
  apiRoutes.forEach((route2, index) => {
42509
42520
  const varName = `apiRoute${index}`;
42510
- apiImports.push(`import * as ${varName} from "${route2.filePath}";`);
42521
+ apiImports.push(
42522
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(route2.filePath)};`
42523
+ );
42511
42524
  apiRegistrations.push(`
42512
42525
  {
42513
42526
  path: ${JSON.stringify(route2.path)},
@@ -42540,7 +42553,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42540
42553
  }`);
42541
42554
  return;
42542
42555
  }
42543
- pageImports.push(`import * as ${varName} from "${route2.modulePath}";`);
42556
+ pageImports.push(
42557
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(route2.modulePath)};`
42558
+ );
42544
42559
  const clientMetadata = getClientModuleMetadata(route2.modulePath, config.root);
42545
42560
  pageRegistrations.push(`
42546
42561
  {
@@ -42559,7 +42574,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42559
42574
  layoutRoutes.forEach((layout2, index) => {
42560
42575
  const varName = `layoutRoute${index}`;
42561
42576
  const clientMetadata = getClientModuleMetadata(layout2.modulePath, config.root);
42562
- layoutImports.push(`import * as ${varName} from "${layout2.modulePath}";`);
42577
+ layoutImports.push(
42578
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(layout2.modulePath)};`
42579
+ );
42563
42580
  layoutRegistrations.push(`
42564
42581
  {
42565
42582
  pattern: ${JSON.stringify(layout2.pattern)},
@@ -42572,7 +42589,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42572
42589
  const routeSlotRegistrations = [];
42573
42590
  routeSlots.forEach((slot, index) => {
42574
42591
  const varName = `routeSlot${index}`;
42575
- routeSlotImports.push(`import * as ${varName} from "${slot.modulePath}";`);
42592
+ routeSlotImports.push(
42593
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(slot.modulePath)};`
42594
+ );
42576
42595
  routeSlotRegistrations.push(`
42577
42596
  {
42578
42597
  name: ${JSON.stringify(slot.name)},
@@ -42588,7 +42607,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42588
42607
  const errorRegistrations = [];
42589
42608
  errorRoutes.forEach((errorRoute, index) => {
42590
42609
  const varName = `errorRoute${index}`;
42591
- errorImports.push(`import * as ${varName} from "${errorRoute.modulePath}";`);
42610
+ errorImports.push(
42611
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
42612
+ );
42592
42613
  errorRegistrations.push(`
42593
42614
  {
42594
42615
  pattern: ${JSON.stringify(errorRoute.pattern)},
@@ -42598,9 +42619,11 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42598
42619
  const metadataImageImports = [];
42599
42620
  const metadataImageRegistrations = [];
42600
42621
  metadataImageRoutes.forEach((image, index) => {
42601
- if (image.sourceType === "module") {
42622
+ if (image.sourceType === "module" && image.modulePath) {
42602
42623
  const varName = `metadataImageRoute${index}`;
42603
- metadataImageImports.push(`import * as ${varName} from "${image.modulePath}";`);
42624
+ metadataImageImports.push(
42625
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(image.modulePath)};`
42626
+ );
42604
42627
  metadataImageRegistrations.push(`
42605
42628
  {
42606
42629
  pattern: ${JSON.stringify(image.pattern)},
@@ -42617,7 +42640,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42617
42640
  const applicationMetadataRegistrations = [];
42618
42641
  applicationMetadataRoutes.forEach((metadata, index) => {
42619
42642
  const varName = `applicationMetadataRoute${index}`;
42620
- applicationMetadataImports.push(`import * as ${varName} from "${metadata.modulePath}";`);
42643
+ applicationMetadataImports.push(
42644
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(metadata.modulePath)};`
42645
+ );
42621
42646
  applicationMetadataRegistrations.push(`
42622
42647
  {
42623
42648
  pattern: ${JSON.stringify(metadata.pattern)},
@@ -42630,7 +42655,9 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42630
42655
  const middlewareRegistrations = [];
42631
42656
  middlewareRoutes.forEach((middlewareRoute, index) => {
42632
42657
  const varName = `fileMiddleware${index}`;
42633
- middlewareImports.push(`import * as ${varName} from "${middlewareRoute.filePath}";`);
42658
+ middlewareImports.push(
42659
+ `import * as ${varName} from ${toVirtualEntryImportSpecifier(middlewareRoute.filePath)};`
42660
+ );
42634
42661
  middlewareRegistrations.push(`
42635
42662
  {
42636
42663
  path: ${JSON.stringify(middlewareRoute.path)},
@@ -42638,7 +42665,7 @@ import * as ReactDOMServer from "react-dom/server";` : `import React, * as React
42638
42665
  module: ${varName},
42639
42666
  }`);
42640
42667
  });
42641
- const notFoundImport = notFoundPath ? `import * as CustomNotFound from "${notFoundPath}";` : "";
42668
+ const notFoundImport = notFoundPath ? `import * as CustomNotFound from ${toVirtualEntryImportSpecifier(notFoundPath)};` : "";
42642
42669
  const apiRouteHelpersImport = apiRoutes.length > 0 ? `import { invokeAPIRouteEndpoint, matchAPIRoute } from "@farm.js/core/api/runtime";` : "";
42643
42670
  const productionRuntimeImport = `import {
42644
42671
  _runWithAfterRequest,
@@ -42697,10 +42724,10 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
42697
42724
  const markdownHandlerImport = config.md?.enabled ? `import { applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse } from "@farm.js/core/markdown";` : "";
42698
42725
  const appMarkdownImport = hasMarkdownPages ? `import { createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse } from "@farm.js/core/app-markdown";` : "const createFarmMarkdownSourceResponse = null;";
42699
42726
  const mdxComponentsPath = typeof config.mdx?.components === "string" ? import_path13.default.isAbsolute(config.mdx.components) ? config.mdx.components : import_path13.default.join(config.root, config.mdx.components) : null;
42700
- const mdxComponentsImport = mdxComponentsPath ? `import * as FarmMdxComponentsModule from "${mdxComponentsPath.replace(/\\/g, "/")}";` : "";
42727
+ const mdxComponentsImport = mdxComponentsPath ? `import * as FarmMdxComponentsModule from ${toVirtualEntryImportSpecifier(mdxComponentsPath)};` : "";
42701
42728
  const layerConfigPaths = (config.layers || []).map((layer) => layer.configFile).filter((configFile) => Boolean(configFile)).filter((configFile) => configFile !== configModulePath);
42702
42729
  const layerConfigImports = layerConfigPaths.map(
42703
- (configFile, index) => `import * as FarmLayerConfigModule${index} from "${configFile.replace(/\\/g, "/")}";`
42730
+ (configFile, index) => `import * as FarmLayerConfigModule${index} from ${toVirtualEntryImportSpecifier(configFile)};`
42704
42731
  ).join("\n");
42705
42732
  const layerConfigValues = layerConfigPaths.map(
42706
42733
  (_configFile, index) => `(FarmLayerConfigModule${index}.default || FarmLayerConfigModule${index})`
@@ -42712,9 +42739,9 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
42712
42739
  ])
42713
42740
  );
42714
42741
  const integrationRuntimeImport = integrationRuntimeExports.length ? `import { ${integrationRuntimeExports.join(", ")} } from "@farm.js/core/integrations";` : "";
42715
- const instrumentationImport = instrumentationPath ? `import * as FarmInstrumentationModule from "${instrumentationPath.replace(/\\/g, "/")}";` : "";
42742
+ const instrumentationImport = instrumentationPath ? `import * as FarmInstrumentationModule from ${toVirtualEntryImportSpecifier(instrumentationPath)};` : "";
42716
42743
  const integrationImports = `
42717
- ${configModulePath ? `import * as FarmUserConfigModule from "${configModulePath}";` : ""}
42744
+ ${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
42718
42745
  ${layerConfigImports}
42719
42746
  ${integrationRuntimeImport}
42720
42747
  `;
@@ -45881,7 +45908,7 @@ export default async function farmNitroEventHandler(event) {
45881
45908
  ] : [],
45882
45909
  {
45883
45910
  route: "/**",
45884
- handler: nitroEntryPath
45911
+ handler: toPosixPath(nitroEntryPath)
45885
45912
  }
45886
45913
  ],
45887
45914
  routeRules: {
@@ -46129,6 +46156,20 @@ async function registerPrebuiltSSRPackageImport(serverDir, ssrEntryFile, fs13) {
46129
46156
  `);
46130
46157
  }
46131
46158
  __name(registerPrebuiltSSRPackageImport, "registerPrebuiltSSRPackageImport");
46159
+ async function moveVercelOutputPath(src, dest, fs13) {
46160
+ try {
46161
+ await fs13.rename(src, dest);
46162
+ return;
46163
+ } catch (error) {
46164
+ const code = error?.code;
46165
+ if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
46166
+ throw error;
46167
+ }
46168
+ }
46169
+ await fs13.cp(src, dest, { recursive: true, force: true });
46170
+ await fs13.rm(src, { recursive: true, force: true });
46171
+ }
46172
+ __name(moveVercelOutputPath, "moveVercelOutputPath");
46132
46173
  async function postProcessVercelOutput(root, outputDir, fs13, config, farmWorkflows, routeRuntimeManifest) {
46133
46174
  const serverDir = import_path13.default.join(outputDir, "server");
46134
46175
  const functionsDir = import_path13.default.join(outputDir, "functions");
@@ -46140,12 +46181,13 @@ async function postProcessVercelOutput(root, outputDir, fs13, config, farmWorkfl
46140
46181
  for (const file of serverContents) {
46141
46182
  const src = import_path13.default.join(serverDir, file);
46142
46183
  const dest = import_path13.default.join(nitroFuncDir, file);
46143
- await fs13.rename(src, dest);
46184
+ await moveVercelOutputPath(src, dest, fs13);
46144
46185
  }
46145
- await fs13.rmdir(serverDir);
46186
+ await fs13.rm(serverDir, { recursive: true, force: true });
46146
46187
  try {
46147
- await fs13.rename(publicDir, staticDir);
46148
- } catch {
46188
+ await moveVercelOutputPath(publicDir, staticDir, fs13);
46189
+ } catch (error) {
46190
+ if (error?.code !== "ENOENT") throw error;
46149
46191
  }
46150
46192
  await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs13);
46151
46193
  await copyPrismaClientForVercel(root, nitroFuncDir, fs13);
@@ -50418,6 +50460,7 @@ __name(decodeCookiePart, "decodeCookiePart");
50418
50460
  storageCacheAdapter,
50419
50461
  titleFromMarkdown,
50420
50462
  toFormData,
50463
+ toPosixPath,
50421
50464
  toRootRelativeUrlPath,
50422
50465
  toViteModuleId,
50423
50466
  toggleTheme,