@mastra/deployer 1.0.0-beta.7 → 1.0.0-beta.9

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 (111) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{arktype-aI7TBD0R-RMRB5ZNY.cjs → arktype-aI7TBD0R-4YXBEQBG.cjs} +3 -3
  3. package/dist/{arktype-aI7TBD0R-RMRB5ZNY.cjs.map → arktype-aI7TBD0R-4YXBEQBG.cjs.map} +1 -1
  4. package/dist/arktype-aI7TBD0R-OEPFT4G6.js +8 -0
  5. package/dist/{arktype-aI7TBD0R-JG4WETGU.js.map → arktype-aI7TBD0R-OEPFT4G6.js.map} +1 -1
  6. package/dist/build/analyze.cjs +2 -2
  7. package/dist/build/analyze.js +1 -1
  8. package/dist/build/bundler.cjs +3 -3
  9. package/dist/build/bundler.js +1 -1
  10. package/dist/build/index.cjs +10 -10
  11. package/dist/build/index.js +3 -3
  12. package/dist/build/plugins/tsconfig-paths.d.ts +8 -0
  13. package/dist/build/plugins/tsconfig-paths.d.ts.map +1 -1
  14. package/dist/build/shared/extract-mastra-option.d.ts.map +1 -1
  15. package/dist/bundler/index.cjs +2 -2
  16. package/dist/bundler/index.js +1 -1
  17. package/dist/{chunk-IL36YSXF.cjs → chunk-7PLNIFGZ.cjs} +3 -3
  18. package/dist/{chunk-IL36YSXF.cjs.map → chunk-7PLNIFGZ.cjs.map} +1 -1
  19. package/dist/{chunk-N6GC4R2P.cjs → chunk-BFQ2S5UD.cjs} +9 -9
  20. package/dist/{chunk-N6GC4R2P.cjs.map → chunk-BFQ2S5UD.cjs.map} +1 -1
  21. package/dist/chunk-BTNPI4Z7.cjs +4 -0
  22. package/dist/{chunk-4YYZKC2P.cjs.map → chunk-BTNPI4Z7.cjs.map} +1 -1
  23. package/dist/chunk-FBT6QP7J.js +3 -0
  24. package/dist/{chunk-HXYLK6CH.js.map → chunk-FBT6QP7J.js.map} +1 -1
  25. package/dist/{chunk-IR2ZJ7CP.cjs → chunk-GD2TGMBP.cjs} +3 -3
  26. package/dist/{chunk-IR2ZJ7CP.cjs.map → chunk-GD2TGMBP.cjs.map} +1 -1
  27. package/dist/chunk-ID3HN3BH.cjs +16 -0
  28. package/dist/{chunk-BJURVMEW.cjs.map → chunk-ID3HN3BH.cjs.map} +1 -1
  29. package/dist/{chunk-46SXOVGO.js → chunk-MMUE22EL.js} +9 -9
  30. package/dist/{chunk-46SXOVGO.js.map → chunk-MMUE22EL.js.map} +1 -1
  31. package/dist/{chunk-MC37X2IH.cjs → chunk-MUWNMVNL.cjs} +15 -12
  32. package/dist/chunk-MUWNMVNL.cjs.map +1 -0
  33. package/dist/chunk-N5TMJUIR.js +14 -0
  34. package/dist/{chunk-L4SN27ZE.js.map → chunk-N5TMJUIR.js.map} +1 -1
  35. package/dist/{chunk-2NO5NO4J.js → chunk-P4L6VIHY.js} +3 -3
  36. package/dist/{chunk-2NO5NO4J.js.map → chunk-P4L6VIHY.js.map} +1 -1
  37. package/dist/chunk-Q2YGWEXY.js +6 -0
  38. package/dist/{chunk-PDVYEX76.js.map → chunk-Q2YGWEXY.js.map} +1 -1
  39. package/dist/{chunk-7G2FA6KY.js → chunk-RBPCXFN7.js} +4 -4
  40. package/dist/{chunk-7G2FA6KY.js.map → chunk-RBPCXFN7.js.map} +1 -1
  41. package/dist/{chunk-PMRHMMAQ.cjs → chunk-SS22TD6R.cjs} +10 -10
  42. package/dist/{chunk-PMRHMMAQ.cjs.map → chunk-SS22TD6R.cjs.map} +1 -1
  43. package/dist/{chunk-UEFVUIPU.js → chunk-TK2CCU7I.js} +14 -12
  44. package/dist/chunk-TK2CCU7I.js.map +1 -0
  45. package/dist/{chunk-NZ47MQSD.cjs → chunk-TXKETRIN.cjs} +9 -9
  46. package/dist/{chunk-NZ47MQSD.cjs.map → chunk-TXKETRIN.cjs.map} +1 -1
  47. package/dist/{chunk-SRCHVFND.js → chunk-UQZGTSBF.js} +3 -3
  48. package/dist/{chunk-SRCHVFND.js.map → chunk-UQZGTSBF.js.map} +1 -1
  49. package/dist/{chunk-ORHTXAPI.cjs → chunk-X4TNUYQL.cjs} +11 -11
  50. package/dist/{chunk-ORHTXAPI.cjs.map → chunk-X4TNUYQL.cjs.map} +1 -1
  51. package/dist/{chunk-O2KU7J7Q.js → chunk-X5QU7B2W.js} +4 -4
  52. package/dist/{chunk-O2KU7J7Q.js.map → chunk-X5QU7B2W.js.map} +1 -1
  53. package/dist/default-u_dwuiYb-65M4BHAA.js +3 -0
  54. package/dist/{default-u_dwuiYb-MRYQILW4.js.map → default-u_dwuiYb-65M4BHAA.js.map} +1 -1
  55. package/dist/default-u_dwuiYb-PWN6FHC6.cjs +9 -0
  56. package/dist/{default-u_dwuiYb-WPBHZH2R.cjs.map → default-u_dwuiYb-PWN6FHC6.cjs.map} +1 -1
  57. package/dist/effect-QlVUlMFu-2ADPKIDF.cjs +17 -0
  58. package/dist/{effect-QlVUlMFu-N7VAYT2B.cjs.map → effect-QlVUlMFu-2ADPKIDF.cjs.map} +1 -1
  59. package/dist/{effect-QlVUlMFu-NH625H3V.js → effect-QlVUlMFu-FD73M3OO.js} +4 -4
  60. package/dist/{effect-QlVUlMFu-NH625H3V.js.map → effect-QlVUlMFu-FD73M3OO.js.map} +1 -1
  61. package/dist/{esm-T7FR74HN.js → esm-BLVTLTJW.js} +40 -40
  62. package/dist/esm-BLVTLTJW.js.map +1 -0
  63. package/dist/{esm-BZAOWJTI.cjs → esm-E3NUCNVN.cjs} +81 -81
  64. package/dist/esm-E3NUCNVN.cjs.map +1 -0
  65. package/dist/index.cjs +5 -5
  66. package/dist/index.js +2 -2
  67. package/dist/server/index.cjs +1 -1
  68. package/dist/server/index.cjs.map +1 -1
  69. package/dist/server/index.js +1 -1
  70. package/dist/server/index.js.map +1 -1
  71. package/dist/sury-CWZTCd75-K3FHMZF5.cjs +17 -0
  72. package/dist/{sury-CWZTCd75-E5BDQIXB.cjs.map → sury-CWZTCd75-K3FHMZF5.cjs.map} +1 -1
  73. package/dist/{sury-CWZTCd75-HWBNYVQW.js → sury-CWZTCd75-Y2GURJ6K.js} +4 -4
  74. package/dist/{sury-CWZTCd75-HWBNYVQW.js.map → sury-CWZTCd75-Y2GURJ6K.js.map} +1 -1
  75. package/dist/typebox-Dei93FPO-2WP4NOYD.js +8 -0
  76. package/dist/{typebox-Dei93FPO-XXPZXWWK.js.map → typebox-Dei93FPO-2WP4NOYD.js.map} +1 -1
  77. package/dist/{typebox-Dei93FPO-42ICWLXF.cjs → typebox-Dei93FPO-WTXAW2LA.cjs} +3 -3
  78. package/dist/{typebox-Dei93FPO-42ICWLXF.cjs.map → typebox-Dei93FPO-WTXAW2LA.cjs.map} +1 -1
  79. package/dist/valibot--1zFm7rT-HMTCRBB3.cjs +17 -0
  80. package/dist/{valibot--1zFm7rT-ALWQ34TP.cjs.map → valibot--1zFm7rT-HMTCRBB3.cjs.map} +1 -1
  81. package/dist/{valibot--1zFm7rT-W6DSEVCL.js → valibot--1zFm7rT-VGFBTDTW.js} +4 -4
  82. package/dist/{valibot--1zFm7rT-W6DSEVCL.js.map → valibot--1zFm7rT-VGFBTDTW.js.map} +1 -1
  83. package/dist/{valibot-D_HTw1Gn-PN7GEV4F.cjs → valibot-D_HTw1Gn-ILCWWLE4.cjs} +7 -7
  84. package/dist/{valibot-D_HTw1Gn-PN7GEV4F.cjs.map → valibot-D_HTw1Gn-ILCWWLE4.cjs.map} +1 -1
  85. package/dist/{valibot-D_HTw1Gn-LVFT5X5F.js → valibot-D_HTw1Gn-LLCGNU3W.js} +5 -5
  86. package/dist/{valibot-D_HTw1Gn-LVFT5X5F.js.map → valibot-D_HTw1Gn-LLCGNU3W.js.map} +1 -1
  87. package/dist/{zod-Bwrt9trS-UDAV5VDV.js → zod-Bwrt9trS-XCRGYQVE.js} +5 -5
  88. package/dist/{zod-Bwrt9trS-UDAV5VDV.js.map → zod-Bwrt9trS-XCRGYQVE.js.map} +1 -1
  89. package/dist/{zod-Bwrt9trS-C5ATNTZG.cjs → zod-Bwrt9trS-XDMWF3NW.cjs} +7 -7
  90. package/dist/{zod-Bwrt9trS-C5ATNTZG.cjs.map → zod-Bwrt9trS-XDMWF3NW.cjs.map} +1 -1
  91. package/dist/{zod-DSgpEGAE-AVWGGTUD.js → zod-DSgpEGAE-TKBHSSLS.js} +5 -5
  92. package/dist/{zod-DSgpEGAE-AVWGGTUD.js.map → zod-DSgpEGAE-TKBHSSLS.js.map} +1 -1
  93. package/dist/{zod-DSgpEGAE-EH7N2QK7.cjs → zod-DSgpEGAE-ZWQMF6SS.cjs} +7 -7
  94. package/dist/{zod-DSgpEGAE-EH7N2QK7.cjs.map → zod-DSgpEGAE-ZWQMF6SS.cjs.map} +1 -1
  95. package/package.json +6 -5
  96. package/dist/arktype-aI7TBD0R-JG4WETGU.js +0 -8
  97. package/dist/chunk-4YYZKC2P.cjs +0 -4
  98. package/dist/chunk-BJURVMEW.cjs +0 -16
  99. package/dist/chunk-HXYLK6CH.js +0 -3
  100. package/dist/chunk-L4SN27ZE.js +0 -14
  101. package/dist/chunk-MC37X2IH.cjs.map +0 -1
  102. package/dist/chunk-PDVYEX76.js +0 -6
  103. package/dist/chunk-UEFVUIPU.js.map +0 -1
  104. package/dist/default-u_dwuiYb-MRYQILW4.js +0 -3
  105. package/dist/default-u_dwuiYb-WPBHZH2R.cjs +0 -9
  106. package/dist/effect-QlVUlMFu-N7VAYT2B.cjs +0 -17
  107. package/dist/esm-BZAOWJTI.cjs.map +0 -1
  108. package/dist/esm-T7FR74HN.js.map +0 -1
  109. package/dist/sury-CWZTCd75-E5BDQIXB.cjs +0 -17
  110. package/dist/typebox-Dei93FPO-XXPZXWWK.js +0 -8
  111. package/dist/valibot--1zFm7rT-ALWQ34TP.cjs +0 -17
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["builtinModules","resolveFrom","extname","pathToFileURL","resolved","getPackageName","dirname","getInputOptions","pkg","slash","getWorkspaceInformation","analyzeBundle","posix","noopLogger","tsConfigPaths","aliasHono","watch","removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAA,EAA4B;AACnD,EAAA,OACEA,uBAAA,CAAe,QAAA,CAAS,SAAS,CAAA,IACjC,UAAU,UAAA,CAAW,OAAO,CAAA,IAC5BA,uBAAA,CAAe,QAAA,CAAS,SAAA,CAAU,OAAA,CAAQ,QAAA,EAAU,EAAE,CAAC,CAAA;AAE3D;AAEA,SAAS,WAAA,CAAY,IAAY,QAAA,EAAkB;AACjD,EAAA,IAAI;AACF,IAAA,OAAOC,4BAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAGO,SAAS,4BAAA,GAAuC;AACrD,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,iCAAA;AAAA,IACN,SAAA,CAAU,IAAI,QAAA,EAAU;AAEtB,MAAA,IAAI,EAAA,CAAG,WAAW,GAAG,CAAA,IAAK,GAAG,UAAA,CAAW,GAAG,CAAA,IAAK,CAAC,QAAA,EAAU;AACzD,QAAA,OAAO,IAAA;AAAA,MACT;AAEA,MAAA,IAAI,eAAA,CAAgB,EAAE,CAAA,EAAG;AACvB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,EAAA,CAAG,WAAW,GAAG,CAAA,IAAK,GAAG,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,KAAW,CAAA,EAAG;AACpD,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,CAAC,EAAA,CAAG,UAAA,CAAW,GAAG,CAAA,IAAK,GAAG,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,KAAW,CAAA,EAAG;AACrD,QAAA,OAAO,IAAA;AAAA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;AAAA,MACH,MAAA,EAAQ,KAAA;AAAA,MACR,cAAA,EAAgB,YAAA;AAAA,MAChB,cAAA,EAAgB;AAAA;AAClB,GACD,CAAA;AAED,EAAA,OAAO,OAAA;AACT;;;ACjGO,SAAS,4BAAA,CAA6B,QAAsC,MAAA,EAAwB;AACzG,EAAA,OAAOC,kDAAA,CAAiC,MAAA,EAAQ,QAAA,EAAU,MAAM,CAAA;AAClE;;;ACSA,eAAsB,gBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACkC;AAClC,EAAA,MAAM,SAAS,MAAMC,qCAAA;AAAA,IACnB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,4BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-ORHTXAPI.cjs","sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\n\n/**\n * Check if a module is a Node.js builtin module\n * @param specifier - Module specifier\n * @returns True if it's a builtin module\n */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
1
+ {"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["builtinModules","resolveFrom","extname","pathToFileURL","resolved","getPackageName","dirname","getInputOptions","pkg","slash","getWorkspaceInformation","analyzeBundle","posix","noopLogger","tsConfigPaths","aliasHono","watch","removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAA,EAA4B;AACnD,EAAA,OACEA,uBAAA,CAAe,QAAA,CAAS,SAAS,CAAA,IACjC,UAAU,UAAA,CAAW,OAAO,CAAA,IAC5BA,uBAAA,CAAe,QAAA,CAAS,SAAA,CAAU,OAAA,CAAQ,QAAA,EAAU,EAAE,CAAC,CAAA;AAE3D;AAEA,SAAS,WAAA,CAAY,IAAY,QAAA,EAAkB;AACjD,EAAA,IAAI;AACF,IAAA,OAAOC,4BAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;A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4TNUYQL.cjs","sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\n\n/**\n * Check if a module is a Node.js builtin module\n * @param specifier - Module specifier\n * @returns True if it's a builtin module\n */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { getInputOptions } from './chunk-SRCHVFND.js';
2
- import { getWorkspaceInformation, analyzeBundle, tsConfigPaths, aliasHono, extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-UEFVUIPU.js';
1
+ import { getInputOptions } from './chunk-UQZGTSBF.js';
2
+ import { getWorkspaceInformation, analyzeBundle, tsConfigPaths, aliasHono, extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-TK2CCU7I.js';
3
3
  import { slash, getPackageName } from './chunk-5CWPEG6R.js';
4
4
  import { watch } from 'rollup';
5
5
  import { dirname, posix, extname } from 'path';
@@ -165,5 +165,5 @@ async function getServerOptions(entryFile, outputDir, logger) {
165
165
  }
166
166
 
167
167
  export { createWatcher, getInputOptions2 as getInputOptions, getServerOptions };
168
- //# sourceMappingURL=chunk-O2KU7J7Q.js.map
169
- //# sourceMappingURL=chunk-O2KU7J7Q.js.map
168
+ //# sourceMappingURL=chunk-X5QU7B2W.js.map
169
+ //# sourceMappingURL=chunk-X5QU7B2W.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["resolved","getInputOptions","dirname"],"mappings":";;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAA,EAA4B;AACnD,EAAA,OACE,cAAA,CAAe,QAAA,CAAS,SAAS,CAAA,IACjC,UAAU,UAAA,CAAW,OAAO,CAAA,IAC5B,cAAA,CAAe,QAAA,CAAS,SAAA,CAAU,OAAA,CAAQ,QAAA,EAAU,EAAE,CAAC,CAAA;AAE3D;AAEA,SAAS,WAAA,CAAY,IAAY,QAAA,EAAkB;AACjD,EAAA,IAAI;AACF,IAAA,OAAO,WAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAGO,SAAS,4BAAA,GAAuC;AACrD,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,iCAAA;AAAA,IACN,SA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Q,IAAA;AAAA,UACN,aAAA,CAAc;AAAA,YACZ,YAAA,EAAc;AAAA,WACf;AAAA,SACH;AACA,QAAA;AAAA,MACF;AAEA,MAAA,OAAA,CAAQ,KAAK,MAAgB,CAAA;AAAA,IAC/B,CAAC,CAAA;AAED,IAAA,YAAA,CAAa,OAAA,GAAU,OAAA;AACvB,IAAA,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,SAAA,EAAW,CAAA;AAErC,IAAA,YAAA,CAAa,OAAA,CAAQ,IAAA,CAAK,4BAAA,EAA8B,CAAA;AAAA,EAC1D;AAEA,EAAA,OAAO,YAAA;AACT;AAEA,eAAsB,aAAA,CAAc,cAA4B,aAAA,EAA8B;AAC5F,EAAA,MAAM,OAAA,GAAU,MAAM,KAAA,CAAM;AAAA,IAC1B,GAAG,YAAA;AAAA,IACH,MAAA,EAAQ;AAAA,MACN,GAAG,aAAA;AAAA,MACH,MAAA,EAAQ,KAAA;AAAA,MACR,cAAA,EAAgB,YAAA;AAAA,MAChB,cAAA,EAAgB;AAAA;AAClB,GACD,CAAA;AAED,EAAA,OAAO,OAAA;AACT;;;ACjGO,SAAS,4BAAA,CAA6B,QAAsC,MAAA,EAAwB;AACzG,EAAA,OAAO,gCAAA,CAAiC,MAAA,EAAQ,QAAA,EAAU,MAAM,CAAA;AAClE;;;ACSA,eAAsB,gBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACkC;AAClC,EAAA,MAAM,SAAS,MAAM,mBAAA;AAAA,IACnB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,4BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-O2KU7J7Q.js","sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\n\n/**\n * Check if a module is a Node.js builtin module\n * @param specifier - Module specifier\n * @returns True if it's a builtin module\n */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
1
+ {"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["resolved","getInputOptions","dirname"],"mappings":";;;;;;;;;;;AAYA,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OAAO,gCAAA,CAAiC,MAAA,EAAQ,QAAA,EAAU,MAAM,CAAA;AAClE;;;ACSA,eAAsB,gBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACkC;AAClC,EAAA,MAAM,SAAS,MAAM,mBAAA;AAAA,IACnB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,4BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-X5QU7B2W.js","sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\n\n/**\n * Check if a module is a Node.js builtin module\n * @param specifier - Module specifier\n * @returns True if it's a builtin module\n */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { getToOpenAPISchemaFn as default } from './chunk-N5TMJUIR.js';
2
+ //# sourceMappingURL=default-u_dwuiYb-65M4BHAA.js.map
3
+ //# sourceMappingURL=default-u_dwuiYb-65M4BHAA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"default-u_dwuiYb-MRYQILW4.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"default-u_dwuiYb-65M4BHAA.js"}
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var chunkID3HN3BH_cjs = require('./chunk-ID3HN3BH.cjs');
4
+
5
+
6
+
7
+ module.exports = chunkID3HN3BH_cjs.getToOpenAPISchemaFn;
8
+ //# sourceMappingURL=default-u_dwuiYb-PWN6FHC6.cjs.map
9
+ //# sourceMappingURL=default-u_dwuiYb-PWN6FHC6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"default-u_dwuiYb-WPBHZH2R.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"default-u_dwuiYb-PWN6FHC6.cjs"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkTXKETRIN_cjs = require('./chunk-TXKETRIN.cjs');
4
+
5
+ // ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_cc75f961c3fd8a0d9697490b1d116cd2/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js
6
+ async function getToJsonSchemaFn() {
7
+ try {
8
+ const { JSONSchema } = await import('effect');
9
+ return (schema) => JSONSchema.make(schema);
10
+ } catch {
11
+ throw new chunkTXKETRIN_cjs.MissingDependencyError("effect");
12
+ }
13
+ }
14
+
15
+ module.exports = getToJsonSchemaFn;
16
+ //# sourceMappingURL=effect-QlVUlMFu-2ADPKIDF.cjs.map
17
+ //# sourceMappingURL=effect-QlVUlMFu-2ADPKIDF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_e6bb794be17a8db1278efa55a674be65/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":["MissingDependencyError"],"mappings":";;;;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,yCAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-N7VAYT2B.cjs","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_cc75f961c3fd8a0d9697490b1d116cd2/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":["MissingDependencyError"],"mappings":";;;;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,yCAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-2ADPKIDF.cjs","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}
@@ -1,6 +1,6 @@
1
- import { MissingDependencyError } from './chunk-46SXOVGO.js';
1
+ import { MissingDependencyError } from './chunk-MMUE22EL.js';
2
2
 
3
- // ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_e6bb794be17a8db1278efa55a674be65/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js
3
+ // ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_cc75f961c3fd8a0d9697490b1d116cd2/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js
4
4
  async function getToJsonSchemaFn() {
5
5
  try {
6
6
  const { JSONSchema } = await import('effect');
@@ -11,5 +11,5 @@ async function getToJsonSchemaFn() {
11
11
  }
12
12
 
13
13
  export { getToJsonSchemaFn as default };
14
- //# sourceMappingURL=effect-QlVUlMFu-NH625H3V.js.map
15
- //# sourceMappingURL=effect-QlVUlMFu-NH625H3V.js.map
14
+ //# sourceMappingURL=effect-QlVUlMFu-FD73M3OO.js.map
15
+ //# sourceMappingURL=effect-QlVUlMFu-FD73M3OO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_e6bb794be17a8db1278efa55a674be65/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":[],"mappings":";;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAI,uBAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-NH625H3V.js","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.0.0_@types+json-schema@_cc75f961c3fd8a0d9697490b1d116cd2/node_modules/@standard-community/standard-json/dist/effect-QlVUlMFu.js"],"names":[],"mappings":";;;AAGA,eAAe,iBAAA,GAAoB;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,MAAM,OAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAC,MAAA,KAAW,UAAA,CAAW,IAAA,CAAK,MAAM,CAAA;AAAA,EAC3C,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAI,uBAAuB,QAAQ,CAAA;AAAA,EAC3C;AACF","file":"effect-QlVUlMFu-FD73M3OO.js","sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { JSONSchema } = await import('effect');\n return (schema) => JSONSchema.make(schema);\n } catch {\n throw new MissingDependencyError(\"effect\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"]}
@@ -1,6 +1,6 @@
1
- import { ZodFirstPartyTypeKind } from 'zod/v3';
1
+ import { ZodFirstPartyTypeKind } from 'zod';
2
2
 
3
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
3
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
4
4
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
5
5
  var jsonDescription = (jsonSchema, def) => {
6
6
  if (def.description) {
@@ -46,7 +46,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
46
46
  ...options
47
47
  };
48
48
 
49
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js
49
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js
50
50
  var getRefs = (options) => {
51
51
  const _options = getDefaultOptions(options);
52
52
  const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
@@ -67,7 +67,7 @@ var getRefs = (options) => {
67
67
  };
68
68
  };
69
69
 
70
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
70
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
71
71
  function addErrorMessage(res, key, errorMessage, refs) {
72
72
  if (!refs?.errorMessages)
73
73
  return;
@@ -83,7 +83,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
83
83
  addErrorMessage(res, key, errorMessage, refs);
84
84
  }
85
85
 
86
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
86
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
87
87
  var getRelativePath = (pathA, pathB) => {
88
88
  let i = 0;
89
89
  for (; i < pathA.length && i < pathB.length; i++) {
@@ -93,7 +93,7 @@ var getRelativePath = (pathA, pathB) => {
93
93
  return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
94
94
  };
95
95
 
96
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
96
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
97
97
  function parseAnyDef(refs) {
98
98
  if (refs.target !== "openAi") {
99
99
  return {};
@@ -131,7 +131,7 @@ function parseArrayDef(def, refs) {
131
131
  return res;
132
132
  }
133
133
 
134
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
134
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
135
135
  function parseBigintDef(def, refs) {
136
136
  const res = {
137
137
  type: "integer",
@@ -177,24 +177,24 @@ function parseBigintDef(def, refs) {
177
177
  return res;
178
178
  }
179
179
 
180
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
180
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
181
181
  function parseBooleanDef() {
182
182
  return {
183
183
  type: "boolean"
184
184
  };
185
185
  }
186
186
 
187
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
187
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
188
188
  function parseBrandedDef(_def, refs) {
189
189
  return parseDef(_def.type._def, refs);
190
190
  }
191
191
 
192
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
192
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
193
193
  var parseCatchDef = (def, refs) => {
194
194
  return parseDef(def.innerType._def, refs);
195
195
  };
196
196
 
197
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
197
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
198
198
  function parseDateDef(def, refs, overrideDateStrategy) {
199
199
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
200
200
  if (Array.isArray(strategy)) {
@@ -253,7 +253,7 @@ var integerDateParser = (def, refs) => {
253
253
  return res;
254
254
  };
255
255
 
256
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
256
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
257
257
  function parseDefaultDef(_def, refs) {
258
258
  return {
259
259
  ...parseDef(_def.innerType._def, refs),
@@ -261,12 +261,12 @@ function parseDefaultDef(_def, refs) {
261
261
  };
262
262
  }
263
263
 
264
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
264
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
265
265
  function parseEffectsDef(_def, refs) {
266
266
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
267
267
  }
268
268
 
269
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
269
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
270
270
  function parseEnumDef(def) {
271
271
  return {
272
272
  type: "string",
@@ -274,7 +274,7 @@ function parseEnumDef(def) {
274
274
  };
275
275
  }
276
276
 
277
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
277
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
278
278
  var isJsonSchema7AllOfType = (type) => {
279
279
  if ("type" in type && type.type === "string")
280
280
  return false;
@@ -316,7 +316,7 @@ function parseIntersectionDef(def, refs) {
316
316
  } : void 0;
317
317
  }
318
318
 
319
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
319
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
320
320
  function parseLiteralDef(def, refs) {
321
321
  const parsedType = typeof def.value;
322
322
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
@@ -336,7 +336,7 @@ function parseLiteralDef(def, refs) {
336
336
  };
337
337
  }
338
338
 
339
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
339
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
340
340
  var emojiRegex = void 0;
341
341
  var zodPatterns = {
342
342
  /**
@@ -648,7 +648,7 @@ function stringifyRegExpWithFlags(regex, refs) {
648
648
  return pattern;
649
649
  }
650
650
 
651
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
651
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
652
652
  function parseRecordDef(def, refs) {
653
653
  if (refs.target === "openAi") {
654
654
  console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
@@ -700,7 +700,7 @@ function parseRecordDef(def, refs) {
700
700
  return schema;
701
701
  }
702
702
 
703
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
703
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
704
704
  function parseMapDef(def, refs) {
705
705
  if (refs.mapStrategy === "record") {
706
706
  return parseRecordDef(def, refs);
@@ -725,7 +725,7 @@ function parseMapDef(def, refs) {
725
725
  };
726
726
  }
727
727
 
728
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
728
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
729
729
  function parseNativeEnumDef(def) {
730
730
  const object = def.values;
731
731
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -739,7 +739,7 @@ function parseNativeEnumDef(def) {
739
739
  };
740
740
  }
741
741
 
742
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
742
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
743
743
  function parseNeverDef(refs) {
744
744
  return refs.target === "openAi" ? void 0 : {
745
745
  not: parseAnyDef({
@@ -749,7 +749,7 @@ function parseNeverDef(refs) {
749
749
  };
750
750
  }
751
751
 
752
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
752
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
753
753
  function parseNullDef(refs) {
754
754
  return refs.target === "openApi3" ? {
755
755
  enum: ["null"],
@@ -759,7 +759,7 @@ function parseNullDef(refs) {
759
759
  };
760
760
  }
761
761
 
762
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
762
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
763
763
  var primitiveMappings = {
764
764
  ZodString: "string",
765
765
  ZodNumber: "number",
@@ -827,7 +827,7 @@ var asAnyOf = (def, refs) => {
827
827
  return anyOf.length ? { anyOf } : void 0;
828
828
  };
829
829
 
830
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
830
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
831
831
  function parseNullableDef(def, refs) {
832
832
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
833
833
  if (refs.target === "openApi3") {
@@ -859,7 +859,7 @@ function parseNullableDef(def, refs) {
859
859
  return base && { anyOf: [base, { type: "null" }] };
860
860
  }
861
861
 
862
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
862
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
863
863
  function parseNumberDef(def, refs) {
864
864
  const res = {
865
865
  type: "number"
@@ -908,7 +908,7 @@ function parseNumberDef(def, refs) {
908
908
  return res;
909
909
  }
910
910
 
911
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
911
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
912
912
  function parseObjectDef(def, refs) {
913
913
  const forceOptionalIntoNullable = refs.target === "openAi";
914
914
  const result = {
@@ -978,7 +978,7 @@ function safeIsOptional(schema) {
978
978
  }
979
979
  }
980
980
 
981
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
981
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
982
982
  var parseOptionalDef = (def, refs) => {
983
983
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
984
984
  return parseDef(def.innerType._def, refs);
@@ -997,7 +997,7 @@ var parseOptionalDef = (def, refs) => {
997
997
  } : parseAnyDef(refs);
998
998
  };
999
999
 
1000
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
1000
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
1001
1001
  var parsePipelineDef = (def, refs) => {
1002
1002
  if (refs.pipeStrategy === "input") {
1003
1003
  return parseDef(def.in._def, refs);
@@ -1017,12 +1017,12 @@ var parsePipelineDef = (def, refs) => {
1017
1017
  };
1018
1018
  };
1019
1019
 
1020
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
1020
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
1021
1021
  function parsePromiseDef(def, refs) {
1022
1022
  return parseDef(def.type._def, refs);
1023
1023
  }
1024
1024
 
1025
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
1025
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
1026
1026
  function parseSetDef(def, refs) {
1027
1027
  const items = parseDef(def.valueType._def, {
1028
1028
  ...refs,
@@ -1042,7 +1042,7 @@ function parseSetDef(def, refs) {
1042
1042
  return schema;
1043
1043
  }
1044
1044
 
1045
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
1045
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
1046
1046
  function parseTupleDef(def, refs) {
1047
1047
  if (def.rest) {
1048
1048
  return {
@@ -1070,24 +1070,24 @@ function parseTupleDef(def, refs) {
1070
1070
  }
1071
1071
  }
1072
1072
 
1073
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
1073
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
1074
1074
  function parseUndefinedDef(refs) {
1075
1075
  return {
1076
1076
  not: parseAnyDef(refs)
1077
1077
  };
1078
1078
  }
1079
1079
 
1080
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
1080
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
1081
1081
  function parseUnknownDef(refs) {
1082
1082
  return parseAnyDef(refs);
1083
1083
  }
1084
1084
 
1085
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
1085
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
1086
1086
  var parseReadonlyDef = (def, refs) => {
1087
1087
  return parseDef(def.innerType._def, refs);
1088
1088
  };
1089
1089
 
1090
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js
1090
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js
1091
1091
  var selectParser = (def, typeName, refs) => {
1092
1092
  switch (typeName) {
1093
1093
  case ZodFirstPartyTypeKind.ZodString:
@@ -1163,7 +1163,7 @@ var selectParser = (def, typeName, refs) => {
1163
1163
  }
1164
1164
  };
1165
1165
 
1166
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js
1166
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js
1167
1167
  function parseDef(def, refs, forceResolution = false) {
1168
1168
  const seenItem = refs.seen.get(def);
1169
1169
  if (refs.override) {
@@ -1219,7 +1219,7 @@ var addMeta = (def, refs, jsonSchema) => {
1219
1219
  return jsonSchema;
1220
1220
  };
1221
1221
 
1222
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
1222
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
1223
1223
  var zodToJsonSchema = (schema, options) => {
1224
1224
  const refs = getRefs(options);
1225
1225
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
@@ -1281,9 +1281,9 @@ var zodToJsonSchema = (schema, options) => {
1281
1281
  return combined;
1282
1282
  };
1283
1283
 
1284
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js
1284
+ // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js
1285
1285
  var esm_default = zodToJsonSchema;
1286
1286
 
1287
1287
  export { addErrorMessage, esm_default as default, defaultOptions, getDefaultOptions, getRefs, getRelativePath, ignoreOverride, jsonDescription, parseAnyDef, parseArrayDef, parseBigintDef, parseBooleanDef, parseBrandedDef, parseCatchDef, parseDateDef, parseDef, parseDefaultDef, parseEffectsDef, parseEnumDef, parseIntersectionDef, parseLiteralDef, parseMapDef, parseNativeEnumDef, parseNeverDef, parseNullDef, parseNullableDef, parseNumberDef, parseObjectDef, parseOptionalDef, parsePipelineDef, parsePromiseDef, parseReadonlyDef, parseRecordDef, parseSetDef, parseStringDef, parseTupleDef, parseUndefinedDef, parseUnionDef, parseUnknownDef, primitiveMappings, selectParser, setResponseValueAndErrors, zodPatterns, zodToJsonSchema };
1288
- //# sourceMappingURL=esm-T7FR74HN.js.map
1289
- //# sourceMappingURL=esm-T7FR74HN.js.map
1288
+ //# sourceMappingURL=esm-BLVTLTJW.js.map
1289
+ //# sourceMappingURL=esm-BLVTLTJW.js.map