@mastra/deployer 1.80.0-alpha.3 → 1.80.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{analyze-jJAydlIl.cjs → analyze-DkUevkqw.cjs} +19 -33
- package/dist/analyze-DkUevkqw.cjs.map +1 -0
- package/dist/{analyze-DhTwbIGn.js → analyze-N_10x6cl.js} +18 -32
- package/dist/analyze-N_10x6cl.js.map +1 -0
- package/dist/arktype-aI7TBD0R-CA70n59_.cjs +7 -0
- package/dist/{arktype-aI7TBD0R-LEyxmA2b.cjs.map → arktype-aI7TBD0R-CA70n59_.cjs.map} +1 -1
- package/dist/arktype-aI7TBD0R-cDMJgbIj.js +7 -0
- package/dist/{arktype-aI7TBD0R-CrIkuKY8.js.map → arktype-aI7TBD0R-cDMJgbIj.js.map} +1 -1
- package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
- package/dist/build/analyze.cjs +1 -1
- package/dist/build/analyze.js +1 -1
- package/dist/build/bundler.cjs +1 -1
- package/dist/build/bundler.js +1 -1
- package/dist/build/index.cjs +6 -6
- package/dist/build/index.js +6 -6
- package/dist/build/plugins/tsconfig-paths.d.ts.map +1 -1
- package/dist/{build-ClcuWPJW.cjs → build-28_5Hdpz.cjs} +16 -25
- package/dist/build-28_5Hdpz.cjs.map +1 -0
- package/dist/{build-Ch38BMkf.js → build-C9-UsBG6.js} +15 -24
- package/dist/build-C9-UsBG6.js.map +1 -0
- package/dist/bundler/index.cjs +8 -11
- package/dist/bundler/index.cjs.map +1 -1
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/index.js +7 -10
- package/dist/bundler/index.js.map +1 -1
- package/dist/{bundler-Xbu98oe6.js → bundler-D3Ky7WCf.js} +15 -27
- package/dist/{bundler-Xbu98oe6.js.map → bundler-D3Ky7WCf.js.map} +1 -1
- package/dist/{bundler-3xwX-u2Y.cjs → bundler-D_3GyN0N.cjs} +16 -28
- package/dist/{bundler-3xwX-u2Y.cjs.map → bundler-D_3GyN0N.cjs.map} +1 -1
- package/dist/{bundlerOptions-lxkzE0Jg.js → bundlerOptions-BtDsaIgs.js} +9 -15
- package/dist/{bundlerOptions-lxkzE0Jg.js.map → bundlerOptions-BtDsaIgs.js.map} +1 -1
- package/dist/{bundlerOptions-DVHKdYsv.cjs → bundlerOptions-Dgt4ZEo1.cjs} +10 -16
- package/dist/{bundlerOptions-DVHKdYsv.cjs.map → bundlerOptions-Dgt4ZEo1.cjs.map} +1 -1
- package/dist/{core-75DLMtZL.js → core-DM6JYCRs.js} +7 -13
- package/dist/{core-75DLMtZL.js.map → core-DM6JYCRs.js.map} +1 -1
- package/dist/{core-XnTfh3E_.cjs → core-Dw6oRE58.cjs} +7 -13
- package/dist/{core-XnTfh3E_.cjs.map → core-Dw6oRE58.cjs.map} +1 -1
- package/dist/{dist-IbfljCaD.cjs → dist-4VwpGp6C.cjs} +2 -3
- package/dist/{dist-IbfljCaD.cjs.map → dist-4VwpGp6C.cjs.map} +1 -1
- package/dist/{dist-CQdaZ_Cj.js → dist-CId9bb_J.js} +2 -3
- package/dist/{dist-CQdaZ_Cj.js.map → dist-CId9bb_J.js.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-deployment-mastra-server.md +2 -0
- package/dist/docs/references/docs-deployment-monorepo.md +2 -0
- package/dist/docs/references/reference-deployer.md +6 -3
- package/dist/effect-QlVUlMFu-AhgmGdMj.cjs +13 -0
- package/dist/{effect-QlVUlMFu-D_Bo06-a.cjs.map → effect-QlVUlMFu-AhgmGdMj.cjs.map} +1 -1
- package/dist/effect-QlVUlMFu-BUdj03Tb.js +13 -0
- package/dist/{effect-QlVUlMFu-CgfR_0ad.js.map → effect-QlVUlMFu-BUdj03Tb.js.map} +1 -1
- package/dist/{esm-ClsnEB2d.js → esm-CTYQPwZr.js} +45 -89
- package/dist/{esm-ClsnEB2d.js.map → esm-CTYQPwZr.js.map} +1 -1
- package/dist/{esm-D74qc_jV.cjs → esm-DCHnJS63.cjs} +45 -89
- package/dist/{esm-D74qc_jV.cjs.map → esm-DCHnJS63.cjs.map} +1 -1
- package/dist/{index-CLddUTqr-CgjYL5XV.cjs → index-CLddUTqr-CeV0aeBL.cjs} +9 -11
- package/dist/{index-CLddUTqr-CgjYL5XV.cjs.map → index-CLddUTqr-CeV0aeBL.cjs.map} +1 -1
- package/dist/{index-CLddUTqr-73bY0Z8P.js → index-CLddUTqr-FaVhUOQu.js} +9 -11
- package/dist/{index-CLddUTqr-73bY0Z8P.js.map → index-CLddUTqr-FaVhUOQu.js.map} +1 -1
- package/dist/index.cjs +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/{rolldown-runtime-Gi87jfEt.cjs → rolldown-runtime-Bc0pwXKd.cjs} +1 -2
- package/dist/server/index.cjs +27 -49
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +26 -48
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.cjs +1 -1
- package/dist/services/index.js +1 -1
- package/dist/{services-DahfG_xq.js → services-BJQJLQs9.js} +5 -9
- package/dist/{services-DahfG_xq.js.map → services-BJQJLQs9.js.map} +1 -1
- package/dist/{services-CCa8HFrE.cjs → services-Dqx1iouv.cjs} +6 -10
- package/dist/{services-CCa8HFrE.cjs.map → services-Dqx1iouv.cjs.map} +1 -1
- package/dist/sury-CWZTCd75-CEZXDAeW.cjs +13 -0
- package/dist/{sury-CWZTCd75-BmWsp9y9.cjs.map → sury-CWZTCd75-CEZXDAeW.cjs.map} +1 -1
- package/dist/sury-CWZTCd75-DOXpSi96.js +13 -0
- package/dist/{sury-CWZTCd75-DiZVb8bZ.js.map → sury-CWZTCd75-DOXpSi96.js.map} +1 -1
- package/dist/typebox-Dei93FPO-BOIkUnIO.js +7 -0
- package/dist/{typebox-Dei93FPO-CwpAqpd5.js.map → typebox-Dei93FPO-BOIkUnIO.js.map} +1 -1
- package/dist/typebox-Dei93FPO-Br8qsfny.cjs +7 -0
- package/dist/{typebox-Dei93FPO-Dv_TSG2I.cjs.map → typebox-Dei93FPO-Br8qsfny.cjs.map} +1 -1
- package/dist/{utils-Bl3Lm7SI.js → utils-C8gwr-ur.js} +2 -3
- package/dist/{utils-Bl3Lm7SI.js.map → utils-C8gwr-ur.js.map} +1 -1
- package/dist/{utils-C-gJcJAo.cjs → utils-CDNA_ewa.cjs} +2 -3
- package/dist/{utils-C-gJcJAo.cjs.map → utils-CDNA_ewa.cjs.map} +1 -1
- package/dist/valibot--1zFm7rT-B84p7SXG.cjs +13 -0
- package/dist/{valibot--1zFm7rT-YckVXzoz.cjs.map → valibot--1zFm7rT-B84p7SXG.cjs.map} +1 -1
- package/dist/valibot--1zFm7rT-BD4syL2V.js +13 -0
- package/dist/{valibot--1zFm7rT-BfSX2bry.js.map → valibot--1zFm7rT-BD4syL2V.js.map} +1 -1
- package/dist/validator/custom-resolver.cjs +2 -3
- package/dist/validator/custom-resolver.js +2 -3
- package/dist/validator/loader.cjs +1 -2
- package/dist/validator/loader.js +1 -2
- package/dist/validator/validate.d.ts.map +1 -1
- package/dist/zod-Bwrt9trS-0iZO7FLc.js +22 -0
- package/dist/{zod-Bwrt9trS-CO1V3tYt.js.map → zod-Bwrt9trS-0iZO7FLc.js.map} +1 -1
- package/dist/{zod-Bwrt9trS-CdR6J7TM.cjs → zod-Bwrt9trS-BoI5Bg-K.cjs} +5 -6
- package/dist/{zod-Bwrt9trS-CdR6J7TM.cjs.map → zod-Bwrt9trS-BoI5Bg-K.cjs.map} +1 -1
- package/package.json +27 -27
- package/dist/analyze-DhTwbIGn.js.map +0 -1
- package/dist/analyze-jJAydlIl.cjs.map +0 -1
- package/dist/arktype-aI7TBD0R-CrIkuKY8.js +0 -8
- package/dist/arktype-aI7TBD0R-LEyxmA2b.cjs +0 -8
- package/dist/build-Ch38BMkf.js.map +0 -1
- package/dist/build-ClcuWPJW.cjs.map +0 -1
- package/dist/effect-QlVUlMFu-CgfR_0ad.js +0 -14
- package/dist/effect-QlVUlMFu-D_Bo06-a.cjs +0 -14
- package/dist/sury-CWZTCd75-BmWsp9y9.cjs +0 -14
- package/dist/sury-CWZTCd75-DiZVb8bZ.js +0 -14
- package/dist/typebox-Dei93FPO-CwpAqpd5.js +0 -8
- package/dist/typebox-Dei93FPO-Dv_TSG2I.cjs +0 -8
- package/dist/valibot--1zFm7rT-BfSX2bry.js +0 -14
- package/dist/valibot--1zFm7rT-YckVXzoz.cjs +0 -14
- package/dist/zod-Bwrt9trS-CO1V3tYt.js +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_utils = require("./utils-
|
|
3
|
-
const require_bundler = require("./bundler-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Bc0pwXKd.cjs");
|
|
2
|
+
const require_utils = require("./utils-CDNA_ewa.cjs");
|
|
3
|
+
const require_bundler = require("./bundler-D_3GyN0N.cjs");
|
|
4
4
|
let fs = require("fs");
|
|
5
5
|
let path = require("path");
|
|
6
6
|
let empathic_package = require("empathic/package");
|
|
@@ -15,7 +15,7 @@ let rollup = require("rollup");
|
|
|
15
15
|
let _optimize_lodash_rollup_plugin = require("@optimize-lodash/rollup-plugin");
|
|
16
16
|
let _rollup_plugin_node_resolve = require("@rollup/plugin-node-resolve");
|
|
17
17
|
_rollup_plugin_node_resolve = require_rolldown_runtime.__toESM(_rollup_plugin_node_resolve, 1);
|
|
18
|
-
|
|
18
|
+
// src/build/babel/remove-all-options-except.ts
|
|
19
19
|
function removeAllOptionsFromMastraExcept(result, option, logger) {
|
|
20
20
|
return {
|
|
21
21
|
name: "remove-all-except-" + option + "-config",
|
|
@@ -64,8 +64,7 @@ function removeAllOptionsFromMastraExcept(result, option, logger) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
//#region src/build/plugins/remove-all-except.ts
|
|
67
|
+
// src/build/plugins/remove-all-except.ts
|
|
69
68
|
function removeAllOptionsFromMastraExceptPlugin(mastraEntry, name, result, options) {
|
|
70
69
|
return {
|
|
71
70
|
name: `remove-${name}`,
|
|
@@ -84,8 +83,7 @@ function removeAllOptionsFromMastraExceptPlugin(mastraEntry, name, result, optio
|
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
|
-
|
|
88
|
-
//#region src/build/babel/remove-non-referenced-nodes.ts
|
|
86
|
+
// src/build/babel/remove-non-referenced-nodes.ts
|
|
89
87
|
function removeNonReferencedNodes() {
|
|
90
88
|
return {
|
|
91
89
|
name: "remove-non-referenced-nodes",
|
|
@@ -116,8 +114,7 @@ function removeNonReferencedNodes() {
|
|
|
116
114
|
} }
|
|
117
115
|
};
|
|
118
116
|
}
|
|
119
|
-
|
|
120
|
-
//#region src/build/plugins/remove-unused-references.ts
|
|
117
|
+
// src/build/plugins/remove-unused-references.ts
|
|
121
118
|
async function recursiveRemoveNonReferencedNodes(code) {
|
|
122
119
|
const result = await (0, _babel_core.transformAsync)(code, {
|
|
123
120
|
babelrc: false,
|
|
@@ -130,8 +127,7 @@ async function recursiveRemoveNonReferencedNodes(code) {
|
|
|
130
127
|
map: result.map
|
|
131
128
|
};
|
|
132
129
|
}
|
|
133
|
-
|
|
134
|
-
//#region src/build/shared/extract-mastra-option.ts
|
|
130
|
+
// src/build/shared/extract-mastra-option.ts
|
|
135
131
|
const TS_SOURCE = /\.tsx?$/;
|
|
136
132
|
const NODE_MODULES = `${path.sep}node_modules${path.sep}`;
|
|
137
133
|
/**
|
|
@@ -220,14 +216,12 @@ async function extractMastraOption(name, entryFile, outputDir, logger) {
|
|
|
220
216
|
}
|
|
221
217
|
return null;
|
|
222
218
|
}
|
|
223
|
-
|
|
224
|
-
//#region src/build/bundlerOptions.ts
|
|
219
|
+
// src/build/bundlerOptions.ts
|
|
225
220
|
async function getBundlerOptions(entryFile, outputDir, logger) {
|
|
226
221
|
const result = await extractMastraOption("bundler", entryFile, outputDir, logger);
|
|
227
222
|
if (!result) return null;
|
|
228
223
|
return result.getConfig();
|
|
229
224
|
}
|
|
230
|
-
//#endregion
|
|
231
225
|
Object.defineProperty(exports, "extractMastraOption", {
|
|
232
226
|
enumerable: true,
|
|
233
227
|
get: function() {
|
|
@@ -241,4 +235,4 @@ Object.defineProperty(exports, "getBundlerOptions", {
|
|
|
241
235
|
}
|
|
242
236
|
});
|
|
243
237
|
|
|
244
|
-
//# sourceMappingURL=bundlerOptions-
|
|
238
|
+
//# sourceMappingURL=bundlerOptions-Dgt4ZEo1.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerOptions-DVHKdYsv.cjs","names":["t","transformAsync","t","transformAsync","sep","pkg","dirname","realpathSync","isAbsolute","nodeResolve","getNodeResolveOptions","isBareModuleSpecifier","pathToFileURL","tsConfigPaths","esbuild","optimizeLodashImports","commonjs","json"],"sources":["../src/build/babel/remove-all-options-except.ts","../src/build/plugins/remove-all-except.ts","../src/build/babel/remove-non-referenced-nodes.ts","../src/build/plugins/remove-unused-references.ts","../src/build/shared/extract-mastra-option.ts","../src/build/bundlerOptions.ts"],"sourcesContent":["import { types as t } from '@babel/core';\nimport type { NodePath, PluginObject, types } from '@babel/core';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\n\nexport function removeAllOptionsFromMastraExcept(\n result: { hasCustomConfig: boolean },\n option: keyof MastraConfig,\n logger?: IMastraLogger,\n): PluginObject {\n return {\n name: 'remove-all-except-' + option + '-config',\n visitor: {\n ExportNamedDeclaration: {\n // remove all exports, but keep the underlying declarations — the\n // extracted option may reference them (e.g. `export const deployer = ...`\n // used as `new Mastra({ deployer })`). Unreferenced declarations are\n // dropped by the cleanup pass afterwards.\n exit(path) {\n if (path.node.declaration) {\n const [declaration] = path.replaceWith(path.node.declaration);\n // Already traversed — don't requeue, or the NewExpression visitor\n // would append the extracted export a second time.\n declaration.skip();\n } else {\n path.remove();\n }\n },\n },\n\n NewExpression(path, state) {\n // is a variable declaration\n const varDeclaratorPath = path.findParent(path => t.isVariableDeclarator(path.node));\n if (!varDeclaratorPath) {\n return;\n }\n\n const parentNode = path.parentPath.node;\n // check if it's a const of mastra\n if (!t.isVariableDeclarator(parentNode) || !t.isIdentifier(parentNode.id) || parentNode.id.name !== 'mastra') {\n return;\n }\n\n let mastraArgs = t.objectExpression([]);\n if (t.isObjectExpression(path.node.arguments[0])) {\n mastraArgs = path.node.arguments[0];\n }\n\n // Find the config property, skipping SpreadElement nodes\n let configProperty = mastraArgs.properties.find(\n prop => t.isObjectProperty(prop) && t.isIdentifier(prop.key) && prop.key.name === option,\n );\n let configValue: types.Expression = t.objectExpression([]);\n\n const programPath = path.scope.getProgramParent().path as NodePath<types.Program> | undefined;\n if (!programPath) {\n return;\n }\n\n if (configProperty && t.isObjectProperty(configProperty) && t.isExpression(configProperty.value)) {\n result.hasCustomConfig = true;\n configValue = configProperty.value;\n\n if (t.isIdentifier(configProperty.value) && configProperty.value.name === option) {\n const configBinding = state.file.scope.getBinding(option)!;\n\n if (configBinding && t.isVariableDeclarator(configBinding.path.node)) {\n const id = path.scope.generateUidIdentifier(option);\n\n configBinding.path.replaceWith(t.variableDeclarator(id, configBinding.path.node.init!));\n configValue = id;\n }\n }\n }\n\n // add the deployer export\n const exportDeclaration = t.exportNamedDeclaration(\n t.variableDeclaration('const', [t.variableDeclarator(t.identifier(option), configValue)]),\n [],\n );\n\n programPath.node.body.push(exportDeclaration);\n },\n\n Program: {\n exit(path) {\n // Add a fallback export if no mastra configuration was found\n const hasExport = path.node.body.some(\n node => node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration',\n );\n\n if (!hasExport) {\n if (logger) {\n logger.warn('Mastra config could not be extracted', {\n option,\n details:\n 'Please make sure your entry file looks like this:\\nexport const mastra = new Mastra({\\n <option>: <value>\\n})',\n });\n }\n\n const fallbackExportDeclaration = t.exportNamedDeclaration(\n t.variableDeclaration('const', [t.variableDeclarator(t.identifier(option), t.objectExpression([]))]),\n [],\n );\n path.node.body.push(fallbackExportDeclaration);\n }\n },\n },\n },\n } satisfies PluginObject;\n}\n","import { transformAsync } from '@babel/core';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\nimport type { Plugin, SourceMapInput } from 'rollup';\nimport { removeAllOptionsFromMastraExcept } from '../babel/remove-all-options-except';\n\nexport function removeAllOptionsFromMastraExceptPlugin(\n mastraEntry: string,\n name: keyof MastraConfig,\n result: { hasCustomConfig: boolean },\n options?: { sourcemap?: boolean; logger?: IMastraLogger },\n): Plugin {\n return {\n name: `remove-${name}`,\n transform(code, id) {\n if (id !== mastraEntry) {\n return;\n }\n\n return transformAsync(code, {\n babelrc: false,\n configFile: false,\n filename: id,\n plugins: [() => removeAllOptionsFromMastraExcept(result, name, options?.logger)],\n sourceMaps: options?.sourcemap,\n }).then(result => ({\n code: result!.code!,\n map: result!.map! as SourceMapInput,\n }));\n },\n } satisfies Plugin;\n}\n","import { types as t } from '@babel/core';\nimport type { PluginObject } from '@babel/core';\n\nexport function removeNonReferencedNodes() {\n return {\n name: 'remove-non-referenced-nodes',\n visitor: {\n Program(path) {\n // Get the scope information\n const scope = path.scope;\n\n // Filter body to keep only referenced nodes\n const currentBody = path.get('body');\n const filteredBody = currentBody.filter(childPath => {\n if (childPath.isExportDeclaration()) {\n return true;\n }\n\n // For variable declarations, check if any declared variables are referenced\n if (childPath.isVariableDeclaration()) {\n return childPath.node.declarations.some(decl => {\n if (!t.isIdentifier(decl.id)) {\n return false;\n }\n\n const name = decl.id.name;\n const binding = scope.getBinding(name);\n // Keep if it has references or is exported\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n });\n }\n\n // For function/class declarations, check if they're referenced\n if (childPath.isFunctionDeclaration() || childPath.isClassDeclaration()) {\n if (!t.isIdentifier(childPath.node.id)) {\n return false;\n }\n\n const name = childPath.node.id.name;\n const binding = scope.getBinding(name);\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n }\n\n // For imports, check if any imported items are referenced\n if (childPath.isImportDeclaration()) {\n return childPath.node.specifiers.some(specifier => {\n const importedName = specifier.local.name;\n const binding = scope.getBinding(importedName);\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n });\n }\n\n // Default to keeping other node types\n return false;\n });\n\n // Replace the program body with filtered nodes\n path.set(\n 'body',\n filteredBody.map(p => p.node),\n );\n },\n },\n } as PluginObject;\n}\n","import { transformAsync } from '@babel/core';\nimport { removeNonReferencedNodes } from '../babel/remove-non-referenced-nodes';\n\nexport async function recursiveRemoveNonReferencedNodes(code: string): Promise<{ code: string; map: any }> {\n const result = await transformAsync(code, {\n babelrc: false,\n configFile: false,\n plugins: [removeNonReferencedNodes],\n });\n\n // keep looping until the code is not changed\n if (result && result.code! !== code) {\n return recursiveRemoveNonReferencedNodes(result!.code!);\n }\n\n return {\n code: result!.code!,\n map: result!.map!,\n };\n}\n","import { realpathSync } from 'node:fs';\nimport { dirname, isAbsolute, sep } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\nimport { optimizeLodashImports } from '@optimize-lodash/rollup-plugin';\nimport commonjs from '@rollup/plugin-commonjs';\nimport json from '@rollup/plugin-json';\nimport nodeResolve from '@rollup/plugin-node-resolve';\nimport * as pkg from 'empathic/package';\nimport { rollup } from 'rollup';\nimport type { Plugin, RollupOutput } from 'rollup';\nimport { esbuild } from '../plugins/esbuild';\nimport { removeAllOptionsFromMastraExceptPlugin } from '../plugins/remove-all-except';\nimport { recursiveRemoveNonReferencedNodes } from '../plugins/remove-unused-references';\nimport { tsConfigPaths } from '../plugins/tsconfig-paths';\nimport { getNodeResolveOptions, isBareModuleSpecifier } from '../utils';\n\nconst TS_SOURCE = /\\.tsx?$/;\nconst NODE_MODULES = `${sep}node_modules${sep}`;\n\n/**\n * Packages outside node_modules, such as workspace packages, may ship raw TypeScript (e.g. `exports` pointing to\n * `src/index.ts`), which Node cannot load from the extracted config. Inline those so esbuild transpiles them. Bare\n * imports made from inlined sources stay external but are pinned to the file they resolve to from that source: the\n * extracted config lives in `.mastra/output` and can't see the package's own `node_modules` (e.g. pnpm isolated\n * installs). The app's own imports keep resolving by name.\n */\nfunction typescriptSourcesResolver(entryFile: string): Plugin {\n const appPackageJson = pkg.up({ cwd: dirname(entryFile) });\n const appDir = appPackageJson ? dirname(appPackageJson) : dirname(entryFile);\n // App files keep the entry's path, files resolved by node-resolve are real paths\n const appRoots = [appDir + sep, realpathSync(appDir) + sep];\n const isInlinedSource = (file: string) =>\n isAbsolute(file) && !file.includes(NODE_MODULES) && !appRoots.some(root => file.startsWith(root));\n\n const resolver = nodeResolve({\n ...getNodeResolveOptions('node'),\n extensions: ['.mjs', '.js', '.json', '.node', '.ts', '.tsx'],\n });\n const resolveHook = resolver.resolveId!;\n const resolve = typeof resolveHook === 'function' ? resolveHook : resolveHook.handler;\n\n return {\n ...resolver,\n name: 'typescript-sources-resolver',\n async resolveId(id, importer, options) {\n if (!importer || !isBareModuleSpecifier(id)) {\n return null;\n }\n\n const resolved = await resolve.call(this, id, importer, options);\n if (!resolved || typeof resolved !== 'object' || resolved.external) {\n return null;\n }\n\n if (TS_SOURCE.test(resolved.id) && !resolved.id.includes(NODE_MODULES)) {\n return resolved.id;\n }\n\n return isInlinedSource(importer) ? { id: pathToFileURL(resolved.id).href, external: true } : null;\n },\n };\n}\n\nexport function extractMastraOptionBundler(\n name: keyof MastraConfig,\n entryFile: string,\n result: {\n hasCustomConfig: boolean;\n },\n logger?: IMastraLogger,\n) {\n return rollup({\n logLevel: 'silent',\n input: {\n [`${name}-config`]: entryFile,\n },\n treeshake: 'smallest',\n plugins: [\n tsConfigPaths(),\n typescriptSourcesResolver(entryFile),\n // transpile typescript to something we understand\n esbuild(),\n optimizeLodashImports({\n include: '**/*.{js,ts,mjs,cjs}',\n }),\n commonjs({\n extensions: ['.js', '.ts'],\n strictRequires: 'strict',\n transformMixedEsModules: true,\n ignoreTryCatch: false,\n }),\n json(),\n removeAllOptionsFromMastraExceptPlugin(entryFile, name, result, { logger }),\n // let esbuild remove all unused imports\n esbuild(),\n {\n name: 'cleanup',\n transform(code, id) {\n if (id !== entryFile) {\n return;\n }\n\n return recursiveRemoveNonReferencedNodes(code);\n },\n },\n // let esbuild remove it once more\n esbuild(),\n ],\n });\n}\n\nexport async function extractMastraOption<T extends keyof MastraConfig>(\n name: T,\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{\n bundleOutput: RollupOutput;\n getConfig: () => Promise<MastraConfig[T]>;\n} | null> {\n const result = {\n hasCustomConfig: false,\n };\n\n const bundler = await extractMastraOptionBundler(name, entryFile, result, logger);\n\n const output = await bundler.write({\n dir: outputDir,\n format: 'es',\n entryFileNames: '[name].mjs',\n });\n\n if (result.hasCustomConfig) {\n const configPath = `${outputDir}/${name}-config.mjs`;\n\n return {\n bundleOutput: output,\n getConfig: () => import(pathToFileURL(configPath).href).then(m => m[name] as MastraConfig[T]),\n };\n }\n\n return null;\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getBundlerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('bundler', entryFile, result);\n}\n\nexport async function getBundlerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['bundler'] | null> {\n const result = await extractMastraOption('bundler', entryFile, outputDir, logger);\n\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,SAAgB,iCACd,QACA,QACA,QACc;CACd,OAAO;EACL,MAAM,uBAAuB,SAAS;EACtC,SAAS;GACP,wBAAwB,EAKtB,KAA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version":3,"file":"bundlerOptions-Dgt4ZEo1.cjs","names":["t","transformAsync","t","transformAsync","sep","pkg","dirname","realpathSync","isAbsolute","nodeResolve","getNodeResolveOptions","isBareModuleSpecifier","pathToFileURL","tsConfigPaths","esbuild","optimizeLodashImports","commonjs","json"],"sources":["../src/build/babel/remove-all-options-except.ts","../src/build/plugins/remove-all-except.ts","../src/build/babel/remove-non-referenced-nodes.ts","../src/build/plugins/remove-unused-references.ts","../src/build/shared/extract-mastra-option.ts","../src/build/bundlerOptions.ts"],"sourcesContent":["import { types as t } from '@babel/core';\nimport type { NodePath, PluginObject, types } from '@babel/core';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\n\nexport function removeAllOptionsFromMastraExcept(\n result: { hasCustomConfig: boolean },\n option: keyof MastraConfig,\n logger?: IMastraLogger,\n): PluginObject {\n return {\n name: 'remove-all-except-' + option + '-config',\n visitor: {\n ExportNamedDeclaration: {\n // remove all exports, but keep the underlying declarations — the\n // extracted option may reference them (e.g. `export const deployer = ...`\n // used as `new Mastra({ deployer })`). Unreferenced declarations are\n // dropped by the cleanup pass afterwards.\n exit(path) {\n if (path.node.declaration) {\n const [declaration] = path.replaceWith(path.node.declaration);\n // Already traversed — don't requeue, or the NewExpression visitor\n // would append the extracted export a second time.\n declaration.skip();\n } else {\n path.remove();\n }\n },\n },\n\n NewExpression(path, state) {\n // is a variable declaration\n const varDeclaratorPath = path.findParent(path => t.isVariableDeclarator(path.node));\n if (!varDeclaratorPath) {\n return;\n }\n\n const parentNode = path.parentPath.node;\n // check if it's a const of mastra\n if (!t.isVariableDeclarator(parentNode) || !t.isIdentifier(parentNode.id) || parentNode.id.name !== 'mastra') {\n return;\n }\n\n let mastraArgs = t.objectExpression([]);\n if (t.isObjectExpression(path.node.arguments[0])) {\n mastraArgs = path.node.arguments[0];\n }\n\n // Find the config property, skipping SpreadElement nodes\n let configProperty = mastraArgs.properties.find(\n prop => t.isObjectProperty(prop) && t.isIdentifier(prop.key) && prop.key.name === option,\n );\n let configValue: types.Expression = t.objectExpression([]);\n\n const programPath = path.scope.getProgramParent().path as NodePath<types.Program> | undefined;\n if (!programPath) {\n return;\n }\n\n if (configProperty && t.isObjectProperty(configProperty) && t.isExpression(configProperty.value)) {\n result.hasCustomConfig = true;\n configValue = configProperty.value;\n\n if (t.isIdentifier(configProperty.value) && configProperty.value.name === option) {\n const configBinding = state.file.scope.getBinding(option)!;\n\n if (configBinding && t.isVariableDeclarator(configBinding.path.node)) {\n const id = path.scope.generateUidIdentifier(option);\n\n configBinding.path.replaceWith(t.variableDeclarator(id, configBinding.path.node.init!));\n configValue = id;\n }\n }\n }\n\n // add the deployer export\n const exportDeclaration = t.exportNamedDeclaration(\n t.variableDeclaration('const', [t.variableDeclarator(t.identifier(option), configValue)]),\n [],\n );\n\n programPath.node.body.push(exportDeclaration);\n },\n\n Program: {\n exit(path) {\n // Add a fallback export if no mastra configuration was found\n const hasExport = path.node.body.some(\n node => node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration',\n );\n\n if (!hasExport) {\n if (logger) {\n logger.warn('Mastra config could not be extracted', {\n option,\n details:\n 'Please make sure your entry file looks like this:\\nexport const mastra = new Mastra({\\n <option>: <value>\\n})',\n });\n }\n\n const fallbackExportDeclaration = t.exportNamedDeclaration(\n t.variableDeclaration('const', [t.variableDeclarator(t.identifier(option), t.objectExpression([]))]),\n [],\n );\n path.node.body.push(fallbackExportDeclaration);\n }\n },\n },\n },\n } satisfies PluginObject;\n}\n","import { transformAsync } from '@babel/core';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\nimport type { Plugin, SourceMapInput } from 'rollup';\nimport { removeAllOptionsFromMastraExcept } from '../babel/remove-all-options-except';\n\nexport function removeAllOptionsFromMastraExceptPlugin(\n mastraEntry: string,\n name: keyof MastraConfig,\n result: { hasCustomConfig: boolean },\n options?: { sourcemap?: boolean; logger?: IMastraLogger },\n): Plugin {\n return {\n name: `remove-${name}`,\n transform(code, id) {\n if (id !== mastraEntry) {\n return;\n }\n\n return transformAsync(code, {\n babelrc: false,\n configFile: false,\n filename: id,\n plugins: [() => removeAllOptionsFromMastraExcept(result, name, options?.logger)],\n sourceMaps: options?.sourcemap,\n }).then(result => ({\n code: result!.code!,\n map: result!.map! as SourceMapInput,\n }));\n },\n } satisfies Plugin;\n}\n","import { types as t } from '@babel/core';\nimport type { PluginObject } from '@babel/core';\n\nexport function removeNonReferencedNodes() {\n return {\n name: 'remove-non-referenced-nodes',\n visitor: {\n Program(path) {\n // Get the scope information\n const scope = path.scope;\n\n // Filter body to keep only referenced nodes\n const currentBody = path.get('body');\n const filteredBody = currentBody.filter(childPath => {\n if (childPath.isExportDeclaration()) {\n return true;\n }\n\n // For variable declarations, check if any declared variables are referenced\n if (childPath.isVariableDeclaration()) {\n return childPath.node.declarations.some(decl => {\n if (!t.isIdentifier(decl.id)) {\n return false;\n }\n\n const name = decl.id.name;\n const binding = scope.getBinding(name);\n // Keep if it has references or is exported\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n });\n }\n\n // For function/class declarations, check if they're referenced\n if (childPath.isFunctionDeclaration() || childPath.isClassDeclaration()) {\n if (!t.isIdentifier(childPath.node.id)) {\n return false;\n }\n\n const name = childPath.node.id.name;\n const binding = scope.getBinding(name);\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n }\n\n // For imports, check if any imported items are referenced\n if (childPath.isImportDeclaration()) {\n return childPath.node.specifiers.some(specifier => {\n const importedName = specifier.local.name;\n const binding = scope.getBinding(importedName);\n return binding && (binding.referenced || binding.referencePaths.length > 0);\n });\n }\n\n // Default to keeping other node types\n return false;\n });\n\n // Replace the program body with filtered nodes\n path.set(\n 'body',\n filteredBody.map(p => p.node),\n );\n },\n },\n } as PluginObject;\n}\n","import { transformAsync } from '@babel/core';\nimport { removeNonReferencedNodes } from '../babel/remove-non-referenced-nodes';\n\nexport async function recursiveRemoveNonReferencedNodes(code: string): Promise<{ code: string; map: any }> {\n const result = await transformAsync(code, {\n babelrc: false,\n configFile: false,\n plugins: [removeNonReferencedNodes],\n });\n\n // keep looping until the code is not changed\n if (result && result.code! !== code) {\n return recursiveRemoveNonReferencedNodes(result!.code!);\n }\n\n return {\n code: result!.code!,\n map: result!.map!,\n };\n}\n","import { realpathSync } from 'node:fs';\nimport { dirname, isAbsolute, sep } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config as MastraConfig } from '@mastra/core/mastra';\nimport { optimizeLodashImports } from '@optimize-lodash/rollup-plugin';\nimport commonjs from '@rollup/plugin-commonjs';\nimport json from '@rollup/plugin-json';\nimport nodeResolve from '@rollup/plugin-node-resolve';\nimport * as pkg from 'empathic/package';\nimport { rollup } from 'rollup';\nimport type { Plugin, RollupOutput } from 'rollup';\nimport { esbuild } from '../plugins/esbuild';\nimport { removeAllOptionsFromMastraExceptPlugin } from '../plugins/remove-all-except';\nimport { recursiveRemoveNonReferencedNodes } from '../plugins/remove-unused-references';\nimport { tsConfigPaths } from '../plugins/tsconfig-paths';\nimport { getNodeResolveOptions, isBareModuleSpecifier } from '../utils';\n\nconst TS_SOURCE = /\\.tsx?$/;\nconst NODE_MODULES = `${sep}node_modules${sep}`;\n\n/**\n * Packages outside node_modules, such as workspace packages, may ship raw TypeScript (e.g. `exports` pointing to\n * `src/index.ts`), which Node cannot load from the extracted config. Inline those so esbuild transpiles them. Bare\n * imports made from inlined sources stay external but are pinned to the file they resolve to from that source: the\n * extracted config lives in `.mastra/output` and can't see the package's own `node_modules` (e.g. pnpm isolated\n * installs). The app's own imports keep resolving by name.\n */\nfunction typescriptSourcesResolver(entryFile: string): Plugin {\n const appPackageJson = pkg.up({ cwd: dirname(entryFile) });\n const appDir = appPackageJson ? dirname(appPackageJson) : dirname(entryFile);\n // App files keep the entry's path, files resolved by node-resolve are real paths\n const appRoots = [appDir + sep, realpathSync(appDir) + sep];\n const isInlinedSource = (file: string) =>\n isAbsolute(file) && !file.includes(NODE_MODULES) && !appRoots.some(root => file.startsWith(root));\n\n const resolver = nodeResolve({\n ...getNodeResolveOptions('node'),\n extensions: ['.mjs', '.js', '.json', '.node', '.ts', '.tsx'],\n });\n const resolveHook = resolver.resolveId!;\n const resolve = typeof resolveHook === 'function' ? resolveHook : resolveHook.handler;\n\n return {\n ...resolver,\n name: 'typescript-sources-resolver',\n async resolveId(id, importer, options) {\n if (!importer || !isBareModuleSpecifier(id)) {\n return null;\n }\n\n const resolved = await resolve.call(this, id, importer, options);\n if (!resolved || typeof resolved !== 'object' || resolved.external) {\n return null;\n }\n\n if (TS_SOURCE.test(resolved.id) && !resolved.id.includes(NODE_MODULES)) {\n return resolved.id;\n }\n\n return isInlinedSource(importer) ? { id: pathToFileURL(resolved.id).href, external: true } : null;\n },\n };\n}\n\nexport function extractMastraOptionBundler(\n name: keyof MastraConfig,\n entryFile: string,\n result: {\n hasCustomConfig: boolean;\n },\n logger?: IMastraLogger,\n) {\n return rollup({\n logLevel: 'silent',\n input: {\n [`${name}-config`]: entryFile,\n },\n treeshake: 'smallest',\n plugins: [\n tsConfigPaths(),\n typescriptSourcesResolver(entryFile),\n // transpile typescript to something we understand\n esbuild(),\n optimizeLodashImports({\n include: '**/*.{js,ts,mjs,cjs}',\n }),\n commonjs({\n extensions: ['.js', '.ts'],\n strictRequires: 'strict',\n transformMixedEsModules: true,\n ignoreTryCatch: false,\n }),\n json(),\n removeAllOptionsFromMastraExceptPlugin(entryFile, name, result, { logger }),\n // let esbuild remove all unused imports\n esbuild(),\n {\n name: 'cleanup',\n transform(code, id) {\n if (id !== entryFile) {\n return;\n }\n\n return recursiveRemoveNonReferencedNodes(code);\n },\n },\n // let esbuild remove it once more\n esbuild(),\n ],\n });\n}\n\nexport async function extractMastraOption<T extends keyof MastraConfig>(\n name: T,\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{\n bundleOutput: RollupOutput;\n getConfig: () => Promise<MastraConfig[T]>;\n} | null> {\n const result = {\n hasCustomConfig: false,\n };\n\n const bundler = await extractMastraOptionBundler(name, entryFile, result, logger);\n\n const output = await bundler.write({\n dir: outputDir,\n format: 'es',\n entryFileNames: '[name].mjs',\n });\n\n if (result.hasCustomConfig) {\n const configPath = `${outputDir}/${name}-config.mjs`;\n\n return {\n bundleOutput: output,\n getConfig: () => import(pathToFileURL(configPath).href).then(m => m[name] as MastraConfig[T]),\n };\n }\n\n return null;\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\n\nexport function getBundlerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('bundler', entryFile, result);\n}\n\nexport async function getBundlerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['bundler'] | null> {\n const result = await extractMastraOption('bundler', entryFile, outputDir, logger);\n\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,SAAgB,iCACd,QACA,QACA,QACc;CACd,OAAO;EACL,MAAM,uBAAuB,SAAS;EACtC,SAAS;GACP,wBAAwB,EAKtB,KAAK,MAAM;IACT,IAAI,KAAK,KAAK,aAAa;KACzB,MAAM,CAAC,eAAe,KAAK,YAAY,KAAK,KAAK,WAAW;KAG5D,YAAY,KAAK;IACnB,OACE,KAAK,OAAO;GAEhB,EACF;GAEA,cAAc,MAAM,OAAO;IAGzB,IAAI,CADsB,KAAK,YAAW,SAAQA,YAAAA,MAAE,qBAAqB,KAAK,IAAI,CAC7D,GACnB;IAGF,MAAM,aAAa,KAAK,WAAW;IAEnC,IAAI,CAACA,YAAAA,MAAE,qBAAqB,UAAU,KAAK,CAACA,YAAAA,MAAE,aAAa,WAAW,EAAE,KAAK,WAAW,GAAG,SAAS,UAClG;IAGF,IAAI,aAAaA,YAAAA,M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,EAAE,OAAO,CAAC;GAE1EH,gBAAAA,QAAQ;GACR;IACE,MAAM;IACN,UAAU,MAAM,IAAI;KAClB,IAAI,OAAO,WACT;KAGF,OAAO,kCAAkC,IAAI;IAC/C;GACF;GAEAA,gBAAAA,QAAQ;EACV;CACF,CAAC;AACH;AAEA,eAAsB,oBACpB,MACA,WACA,WACA,QAIQ;CACR,MAAM,SAAS,EACb,iBAAiB,MACnB;CAIA,MAAM,SAAS,OAAM,MAFC,2BAA2B,MAAM,WAAW,QAAQ,MAAM,EAAA,CAEnD,MAAM;EACjC,KAAK;EACL,QAAQ;EACR,gBAAgB;CAClB,CAAC;CAED,IAAI,OAAO,iBAAiB;EAC1B,MAAM,aAAa,GAAG,UAAU,GAAG,KAAK;EAExC,OAAO;GACL,cAAc;GACd,iBAAiB,QAAA,GAAOF,IAAAA,cAAAA,CAAc,UAAU,CAAC,CAAC,KAAK,CAAC,MAAK,MAAK,EAAE,KAAwB;EAC9F;CACF;CAEA,OAAO;AACT;;ACnIA,eAAsB,kBACpB,WACA,WACA,QACmC;CACnC,MAAM,SAAS,MAAM,oBAAoB,WAAW,WAAW,WAAW,MAAM;CAEhF,IAAI,CAAC,QACH,OAAO;CAGT,OAAO,OAAO,UAAU;AAC1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/util.js
|
|
2
2
|
function getEnumValues(entries) {
|
|
3
3
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
4
4
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -23,18 +23,15 @@ const BIGINT_FORMAT_RANGES = {
|
|
|
23
23
|
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
|
|
24
24
|
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/regexes.js
|
|
26
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/regexes.js
|
|
28
27
|
const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
29
28
|
const base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
|
|
30
29
|
const integer = /^-?\d+$/;
|
|
31
30
|
const number = /^-?\d+(?:\.\d+)?$/;
|
|
32
|
-
|
|
33
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/schemas.js
|
|
31
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/schemas.js
|
|
34
32
|
const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
35
33
|
const base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
36
|
-
|
|
37
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/registries.js
|
|
34
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/registries.js
|
|
38
35
|
var _a;
|
|
39
36
|
var $ZodRegistry = class {
|
|
40
37
|
constructor() {
|
|
@@ -80,8 +77,7 @@ function registry() {
|
|
|
80
77
|
}
|
|
81
78
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
82
79
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
83
|
-
|
|
84
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/to-json-schema.js
|
|
80
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/to-json-schema.js
|
|
85
81
|
function assignProps(target, ...sources) {
|
|
86
82
|
for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
|
|
87
83
|
return target;
|
|
@@ -511,8 +507,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
511
507
|
extractDefs(ctx, schema);
|
|
512
508
|
return finalize(ctx, schema);
|
|
513
509
|
};
|
|
514
|
-
|
|
515
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/json-schema-processors.js
|
|
510
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/json-schema-processors.js
|
|
516
511
|
const narrowMin = (agg, key, value) => {
|
|
517
512
|
if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
|
|
518
513
|
};
|
|
@@ -1157,7 +1152,6 @@ function toJSONSchema(input, params) {
|
|
|
1157
1152
|
extractDefs(ctx, input);
|
|
1158
1153
|
return finalize(ctx, input);
|
|
1159
1154
|
}
|
|
1160
|
-
//#endregion
|
|
1161
1155
|
export { toJSONSchema };
|
|
1162
1156
|
|
|
1163
|
-
//# sourceMappingURL=core-
|
|
1157
|
+
//# sourceMappingURL=core-DM6JYCRs.js.map
|