@mastra/deployer 1.52.0-alpha.9 → 1.52.1-alpha.0
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/CHANGELOG.md +94 -0
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.d.ts +1 -0
- package/dist/build/analyze.d.ts.map +1 -1
- package/dist/build/analyze.js +1 -1
- package/dist/build/analyzeEntryProjectType.d.ts +12 -0
- package/dist/build/analyzeEntryProjectType.d.ts.map +1 -0
- package/dist/build/babel/check-config-export.d.ts +1 -0
- package/dist/build/babel/check-config-export.d.ts.map +1 -1
- package/dist/build/babel/remove-all-options-except.d.ts +2 -2
- package/dist/build/babel/remove-all-options-except.d.ts.map +1 -1
- package/dist/build/babel/remove-deployer.d.ts +3 -3
- package/dist/build/babel/remove-deployer.d.ts.map +1 -1
- package/dist/build/babel/remove-non-referenced-nodes.d.ts +2 -2
- package/dist/build/babel/remove-non-referenced-nodes.d.ts.map +1 -1
- package/dist/build/bundler.cjs +5 -5
- package/dist/build/bundler.js +1 -1
- package/dist/build/index.cjs +23 -19
- package/dist/build/index.d.ts +1 -0
- package/dist/build/index.d.ts.map +1 -1
- package/dist/build/index.js +4 -4
- package/dist/build/plugins/remove-all-except.d.ts.map +1 -1
- package/dist/build/plugins/remove-deployer.d.ts.map +1 -1
- package/dist/bundler/index.cjs +3 -3
- package/dist/bundler/index.d.ts +7 -0
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-4XMRN3U4.cjs → chunk-36AWZH7Z.cjs} +26 -47
- package/dist/chunk-36AWZH7Z.cjs.map +1 -0
- package/dist/{chunk-7CT7DAME.cjs → chunk-3XIMK24X.cjs} +13 -33
- package/dist/chunk-3XIMK24X.cjs.map +1 -0
- package/dist/{chunk-HPYZGYQL.js → chunk-5PORNUPF.js} +13 -14
- package/dist/chunk-5PORNUPF.js.map +1 -0
- package/dist/{chunk-QGBVR3DR.cjs → chunk-7BCMZXLF.cjs} +39 -11
- package/dist/chunk-7BCMZXLF.cjs.map +1 -0
- package/dist/{chunk-H6J5QQ45.js → chunk-B6MAUTLE.js} +18 -7
- package/dist/chunk-B6MAUTLE.js.map +1 -0
- package/dist/{chunk-PXUWQC3X.js → chunk-E5SBYHQK.js} +22 -24
- package/dist/chunk-E5SBYHQK.js.map +1 -0
- package/dist/{chunk-GPKHP7J7.cjs → chunk-EJVFMOG5.cjs} +24 -12
- package/dist/chunk-EJVFMOG5.cjs.map +1 -0
- package/dist/{chunk-XOP6IB66.cjs → chunk-GRTBDDCI.cjs} +58 -51
- package/dist/chunk-GRTBDDCI.cjs.map +1 -0
- package/dist/{chunk-72CHYUGH.js → chunk-ODUZW57J.js} +33 -5
- package/dist/chunk-ODUZW57J.js.map +1 -0
- package/dist/{chunk-CBK2CAL4.js → chunk-YMXE5MTP.js} +23 -17
- package/dist/chunk-YMXE5MTP.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/dist/server/handlers/agent-learning.d.ts +3 -0
- package/dist/server/handlers/agent-learning.d.ts.map +1 -0
- package/dist/server/index.cjs +59 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +57 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-4XMRN3U4.cjs.map +0 -1
- package/dist/chunk-72CHYUGH.js.map +0 -1
- package/dist/chunk-7CT7DAME.cjs.map +0 -1
- package/dist/chunk-CBK2CAL4.js.map +0 -1
- package/dist/chunk-GPKHP7J7.cjs.map +0 -1
- package/dist/chunk-H6J5QQ45.js.map +0 -1
- package/dist/chunk-HPYZGYQL.js.map +0 -1
- package/dist/chunk-PXUWQC3X.js.map +0 -1
- package/dist/chunk-QGBVR3DR.cjs.map +0 -1
- package/dist/chunk-XOP6IB66.cjs.map +0 -1
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3XIMK24X_cjs = require('./chunk-3XIMK24X.cjs');
|
|
4
4
|
var url = require('url');
|
|
5
5
|
var rollupPlugin = require('@optimize-lodash/rollup-plugin');
|
|
6
6
|
var commonjs = require('@rollup/plugin-commonjs');
|
|
7
7
|
var json = require('@rollup/plugin-json');
|
|
8
8
|
var rollup = require('rollup');
|
|
9
|
-
var
|
|
9
|
+
var core = require('@babel/core');
|
|
10
10
|
|
|
11
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
|
|
13
|
-
function _interopNamespace(e) {
|
|
14
|
-
if (e && e.__esModule) return e;
|
|
15
|
-
var n = Object.create(null);
|
|
16
|
-
if (e) {
|
|
17
|
-
Object.keys(e).forEach(function (k) {
|
|
18
|
-
if (k !== 'default') {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return e[k]; }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
n.default = e;
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
13
|
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
32
14
|
var json__default = /*#__PURE__*/_interopDefault(json);
|
|
33
|
-
var babel__namespace = /*#__PURE__*/_interopNamespace(babel);
|
|
34
15
|
|
|
35
16
|
function removeAllOptionsFromMastraExcept(result, option, logger) {
|
|
36
|
-
const t = babel__namespace.types;
|
|
37
17
|
return {
|
|
38
18
|
name: "remove-all-except-" + option + "-config",
|
|
39
19
|
visitor: {
|
|
@@ -52,40 +32,40 @@ function removeAllOptionsFromMastraExcept(result, option, logger) {
|
|
|
52
32
|
}
|
|
53
33
|
},
|
|
54
34
|
NewExpression(path, state) {
|
|
55
|
-
const varDeclaratorPath = path.findParent((path2) =>
|
|
35
|
+
const varDeclaratorPath = path.findParent((path2) => core.types.isVariableDeclarator(path2.node));
|
|
56
36
|
if (!varDeclaratorPath) {
|
|
57
37
|
return;
|
|
58
38
|
}
|
|
59
39
|
const parentNode = path.parentPath.node;
|
|
60
|
-
if (!
|
|
40
|
+
if (!core.types.isVariableDeclarator(parentNode) || !core.types.isIdentifier(parentNode.id) || parentNode.id.name !== "mastra") {
|
|
61
41
|
return;
|
|
62
42
|
}
|
|
63
|
-
let mastraArgs =
|
|
64
|
-
if (
|
|
43
|
+
let mastraArgs = core.types.objectExpression([]);
|
|
44
|
+
if (core.types.isObjectExpression(path.node.arguments[0])) {
|
|
65
45
|
mastraArgs = path.node.arguments[0];
|
|
66
46
|
}
|
|
67
47
|
let configProperty = mastraArgs.properties.find(
|
|
68
|
-
(prop) =>
|
|
48
|
+
(prop) => core.types.isObjectProperty(prop) && core.types.isIdentifier(prop.key) && prop.key.name === option
|
|
69
49
|
);
|
|
70
|
-
let configValue =
|
|
50
|
+
let configValue = core.types.objectExpression([]);
|
|
71
51
|
const programPath = path.scope.getProgramParent().path;
|
|
72
52
|
if (!programPath) {
|
|
73
53
|
return;
|
|
74
54
|
}
|
|
75
|
-
if (configProperty &&
|
|
55
|
+
if (configProperty && core.types.isObjectProperty(configProperty) && core.types.isExpression(configProperty.value)) {
|
|
76
56
|
result.hasCustomConfig = true;
|
|
77
57
|
configValue = configProperty.value;
|
|
78
|
-
if (
|
|
58
|
+
if (core.types.isIdentifier(configProperty.value) && configProperty.value.name === option) {
|
|
79
59
|
const configBinding = state.file.scope.getBinding(option);
|
|
80
|
-
if (configBinding &&
|
|
60
|
+
if (configBinding && core.types.isVariableDeclarator(configBinding.path.node)) {
|
|
81
61
|
const id = path.scope.generateUidIdentifier(option);
|
|
82
|
-
configBinding.path.replaceWith(
|
|
62
|
+
configBinding.path.replaceWith(core.types.variableDeclarator(id, configBinding.path.node.init));
|
|
83
63
|
configValue = id;
|
|
84
64
|
}
|
|
85
65
|
}
|
|
86
66
|
}
|
|
87
|
-
const exportDeclaration =
|
|
88
|
-
|
|
67
|
+
const exportDeclaration = core.types.exportNamedDeclaration(
|
|
68
|
+
core.types.variableDeclaration("const", [core.types.variableDeclarator(core.types.identifier(option), configValue)]),
|
|
89
69
|
[]
|
|
90
70
|
);
|
|
91
71
|
programPath.node.body.push(exportDeclaration);
|
|
@@ -102,8 +82,8 @@ function removeAllOptionsFromMastraExcept(result, option, logger) {
|
|
|
102
82
|
details: "Please make sure your entry file looks like this:\nexport const mastra = new Mastra({\n <option>: <value>\n})"
|
|
103
83
|
});
|
|
104
84
|
}
|
|
105
|
-
const fallbackExportDeclaration =
|
|
106
|
-
|
|
85
|
+
const fallbackExportDeclaration = core.types.exportNamedDeclaration(
|
|
86
|
+
core.types.variableDeclaration("const", [core.types.variableDeclarator(core.types.identifier(option), core.types.objectExpression([]))]),
|
|
107
87
|
[]
|
|
108
88
|
);
|
|
109
89
|
path.node.body.push(fallbackExportDeclaration);
|
|
@@ -122,7 +102,7 @@ function removeAllOptionsFromMastraExceptPlugin(mastraEntry, name, result, optio
|
|
|
122
102
|
if (id !== mastraEntry) {
|
|
123
103
|
return;
|
|
124
104
|
}
|
|
125
|
-
return
|
|
105
|
+
return core.transformAsync(code, {
|
|
126
106
|
babelrc: false,
|
|
127
107
|
configFile: false,
|
|
128
108
|
filename: id,
|
|
@@ -136,7 +116,6 @@ function removeAllOptionsFromMastraExceptPlugin(mastraEntry, name, result, optio
|
|
|
136
116
|
};
|
|
137
117
|
}
|
|
138
118
|
function removeNonReferencedNodes() {
|
|
139
|
-
const t = babel__namespace.types;
|
|
140
119
|
return {
|
|
141
120
|
name: "remove-non-referenced-nodes",
|
|
142
121
|
visitor: {
|
|
@@ -149,7 +128,7 @@ function removeNonReferencedNodes() {
|
|
|
149
128
|
}
|
|
150
129
|
if (childPath.isVariableDeclaration()) {
|
|
151
130
|
return childPath.node.declarations.some((decl) => {
|
|
152
|
-
if (!
|
|
131
|
+
if (!core.types.isIdentifier(decl.id)) {
|
|
153
132
|
return false;
|
|
154
133
|
}
|
|
155
134
|
const name = decl.id.name;
|
|
@@ -158,7 +137,7 @@ function removeNonReferencedNodes() {
|
|
|
158
137
|
});
|
|
159
138
|
}
|
|
160
139
|
if (childPath.isFunctionDeclaration() || childPath.isClassDeclaration()) {
|
|
161
|
-
if (!
|
|
140
|
+
if (!core.types.isIdentifier(childPath.node.id)) {
|
|
162
141
|
return false;
|
|
163
142
|
}
|
|
164
143
|
const name = childPath.node.id.name;
|
|
@@ -185,7 +164,7 @@ function removeNonReferencedNodes() {
|
|
|
185
164
|
|
|
186
165
|
// src/build/plugins/remove-unused-references.ts
|
|
187
166
|
async function recursiveRemoveNonReferencedNodes(code) {
|
|
188
|
-
const result = await
|
|
167
|
+
const result = await core.transformAsync(code, {
|
|
189
168
|
babelrc: false,
|
|
190
169
|
configFile: false,
|
|
191
170
|
plugins: [removeNonReferencedNodes]
|
|
@@ -208,9 +187,9 @@ function extractMastraOptionBundler(name, entryFile, result, logger) {
|
|
|
208
187
|
},
|
|
209
188
|
treeshake: "smallest",
|
|
210
189
|
plugins: [
|
|
211
|
-
|
|
190
|
+
chunk3XIMK24X_cjs.tsConfigPaths(),
|
|
212
191
|
// transpile typescript to something we understand
|
|
213
|
-
|
|
192
|
+
chunk3XIMK24X_cjs.esbuild(),
|
|
214
193
|
rollupPlugin.optimizeLodashImports({
|
|
215
194
|
include: "**/*.{js,ts,mjs,cjs}"
|
|
216
195
|
}),
|
|
@@ -223,7 +202,7 @@ function extractMastraOptionBundler(name, entryFile, result, logger) {
|
|
|
223
202
|
json__default.default(),
|
|
224
203
|
removeAllOptionsFromMastraExceptPlugin(entryFile, name, result, { logger }),
|
|
225
204
|
// let esbuild remove all unused imports
|
|
226
|
-
|
|
205
|
+
chunk3XIMK24X_cjs.esbuild(),
|
|
227
206
|
{
|
|
228
207
|
name: "cleanup",
|
|
229
208
|
transform(code, id) {
|
|
@@ -234,7 +213,7 @@ function extractMastraOptionBundler(name, entryFile, result, logger) {
|
|
|
234
213
|
}
|
|
235
214
|
},
|
|
236
215
|
// let esbuild remove it once more
|
|
237
|
-
|
|
216
|
+
chunk3XIMK24X_cjs.esbuild()
|
|
238
217
|
]
|
|
239
218
|
});
|
|
240
219
|
}
|
|
@@ -269,5 +248,5 @@ async function getBundlerOptions(entryFile, outputDir, logger) {
|
|
|
269
248
|
|
|
270
249
|
exports.extractMastraOption = extractMastraOption;
|
|
271
250
|
exports.getBundlerOptions = getBundlerOptions;
|
|
272
|
-
//# sourceMappingURL=chunk-
|
|
273
|
-
//# sourceMappingURL=chunk-
|
|
251
|
+
//# sourceMappingURL=chunk-36AWZH7Z.cjs.map
|
|
252
|
+
//# sourceMappingURL=chunk-36AWZH7Z.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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"],"names":["path","t","transformAsync","result","rollup","tsConfigPaths","esbuild","optimizeLodashImports","commonjs","json","pathToFileURL"],"mappings":";;;;;;;;;;;;;;;AAKO,SAAS,gCAAA,CACd,MAAA,EACA,MAAA,EACA,MAAA,EACc;AACd,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,uBAAuB,MAAA,GAAS,SAAA;AAAA,IACtC,OAAA,EAAS;AAAA,MACP,sBAAA,EAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,QAKtB,KAAK,IAAA,EAAM;AACT,UAAA,IAAI,IAAA,CAAK,KAAK,WAAA,EAAa;AACzB,YAAA,MAAM,CAAC,WAAW,CAAA,GAAI,KAAK,WAAA,CAAY,IAAA,CAAK,KAAK,WAAW,CAAA;AAG5D,YAAA,WAAA,CAAY,IAAA,EAAK;AAAA,UACnB,CAAA,MAAO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OAAA,CAAQ,KAAA,CAAM;AAAA,IACjC,GAAA,EAAK,SAAA;AAAA,IACL,MAAA,EAAQ,IAAA;AAAA,IACR,cAAA,EAAgB;AAAA,GACjB,CAAA;AAED,EAAA,IAAI,OAAO,eAAA,EAAiB;AAC1B,IAAA,MAAM,UAAA,GAAa,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,IAAI,CAAA,WAAA,CAAA;AAEvC,IAAA,OAAO;AAAA,MACL,YAAA,EAAc,MAAA;AAAA,MACd,SAAA,EAAW,MAAM,OAAOI,iBAAA,CAAc,UAAU,CAAA,CAAE,IAAA,CAAA,CAAM,IAAA,CAAK,CAAA,CAAA,KAAK,CAAA,CAAE,IAAI,CAAoB;AAAA,KAC9F;AAAA,EACF;AAEA,EAAA,OAAO,IAAA;AACT;;;AC9EA,eAAsB,iBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACmC;AACnC,EAAA,MAAM,SAAS,MAAM,mBAAA,CAAoB,SAAA,EAAW,SAAA,EAAW,WAAW,MAAM,CAAA;AAEhF,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-36AWZH7Z.cjs","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 { 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 { rollup } from 'rollup';\nimport type { 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';\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 // 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"]}
|
|
@@ -15,30 +15,12 @@ var promises = require('fs/promises');
|
|
|
15
15
|
var fs = require('fs');
|
|
16
16
|
var esm = require('fs-extra/esm');
|
|
17
17
|
var localPkg = require('local-pkg');
|
|
18
|
-
var
|
|
18
|
+
var core = require('@babel/core');
|
|
19
19
|
var stripJsonComments = require('strip-json-comments');
|
|
20
20
|
var typescriptPaths = require('typescript-paths');
|
|
21
21
|
|
|
22
22
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
23
|
|
|
24
|
-
function _interopNamespace(e) {
|
|
25
|
-
if (e && e.__esModule) return e;
|
|
26
|
-
var n = Object.create(null);
|
|
27
|
-
if (e) {
|
|
28
|
-
Object.keys(e).forEach(function (k) {
|
|
29
|
-
if (k !== 'default') {
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
31
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return e[k]; }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
n.default = e;
|
|
39
|
-
return Object.freeze(n);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
24
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
43
25
|
var alias__default = /*#__PURE__*/_interopDefault(alias);
|
|
44
26
|
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
@@ -47,7 +29,6 @@ var nodeResolve__default = /*#__PURE__*/_interopDefault(nodeResolve);
|
|
|
47
29
|
var originalEsbuild__default = /*#__PURE__*/_interopDefault(originalEsbuild);
|
|
48
30
|
var originalEsmShim__default = /*#__PURE__*/_interopDefault(originalEsmShim);
|
|
49
31
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
50
|
-
var babel__namespace = /*#__PURE__*/_interopNamespace(babel);
|
|
51
32
|
var stripJsonComments__default = /*#__PURE__*/_interopDefault(stripJsonComments);
|
|
52
33
|
|
|
53
34
|
function esbuild(options = {}) {
|
|
@@ -370,14 +351,13 @@ function protocolExternalResolver({ exclude = ["node:"] } = {}) {
|
|
|
370
351
|
};
|
|
371
352
|
}
|
|
372
353
|
function removeDeployer() {
|
|
373
|
-
const t = babel__namespace.types;
|
|
374
354
|
function removeDeployerFromObject(objectExpr, scope) {
|
|
375
355
|
const deployerProp = objectExpr.properties.find(
|
|
376
|
-
(prop) =>
|
|
356
|
+
(prop) => core.types.isObjectProperty(prop) && core.types.isIdentifier(prop.key) && prop.key.name === "deployer"
|
|
377
357
|
);
|
|
378
358
|
if (deployerProp) {
|
|
379
359
|
objectExpr.properties = objectExpr.properties.filter((prop) => prop !== deployerProp);
|
|
380
|
-
if (
|
|
360
|
+
if (core.types.isIdentifier(deployerProp.value)) {
|
|
381
361
|
const deployerBinding = scope.getBinding(deployerProp.value.name);
|
|
382
362
|
if (deployerBinding) {
|
|
383
363
|
deployerBinding.path?.parentPath?.remove();
|
|
@@ -390,18 +370,18 @@ function removeDeployer() {
|
|
|
390
370
|
name: "remove-deployer",
|
|
391
371
|
visitor: {
|
|
392
372
|
NewExpression(path2, state) {
|
|
393
|
-
const varDeclaratorPath = path2.findParent((path3) =>
|
|
373
|
+
const varDeclaratorPath = path2.findParent((path3) => core.types.isVariableDeclarator(path3.node));
|
|
394
374
|
if (!varDeclaratorPath) {
|
|
395
375
|
return;
|
|
396
376
|
}
|
|
397
377
|
const parentNode = path2.parentPath.node;
|
|
398
|
-
if (!
|
|
378
|
+
if (!core.types.isVariableDeclarator(parentNode) || !core.types.isIdentifier(parentNode.id) || parentNode.id.name !== "mastra") {
|
|
399
379
|
return;
|
|
400
380
|
}
|
|
401
381
|
if (!state.hasReplaced) {
|
|
402
382
|
state.hasReplaced = true;
|
|
403
|
-
const newMastraObj =
|
|
404
|
-
if (
|
|
383
|
+
const newMastraObj = core.types.cloneNode(path2.node);
|
|
384
|
+
if (core.types.isObjectExpression(newMastraObj.arguments[0]) && newMastraObj.arguments[0].properties?.length) {
|
|
405
385
|
const objectArg = newMastraObj.arguments[0];
|
|
406
386
|
let foundDeployer = false;
|
|
407
387
|
const directDeployer = removeDeployerFromObject(objectArg, state.file.scope);
|
|
@@ -409,11 +389,11 @@ function removeDeployer() {
|
|
|
409
389
|
foundDeployer = true;
|
|
410
390
|
}
|
|
411
391
|
for (const prop of objectArg.properties) {
|
|
412
|
-
if (
|
|
392
|
+
if (core.types.isSpreadElement(prop) && core.types.isIdentifier(prop.argument)) {
|
|
413
393
|
const spreadBinding = state.file.scope.getBinding(prop.argument.name);
|
|
414
|
-
if (spreadBinding?.path &&
|
|
394
|
+
if (spreadBinding?.path && core.types.isVariableDeclarator(spreadBinding.path.node)) {
|
|
415
395
|
const init = spreadBinding.path.node.init;
|
|
416
|
-
if (
|
|
396
|
+
if (core.types.isObjectExpression(init)) {
|
|
417
397
|
const spreadDeployer = removeDeployerFromObject(init, state.file.scope);
|
|
418
398
|
if (spreadDeployer) {
|
|
419
399
|
foundDeployer = true;
|
|
@@ -440,7 +420,7 @@ function removeDeployer2(mastraEntry, options) {
|
|
|
440
420
|
if (id !== mastraEntry) {
|
|
441
421
|
return;
|
|
442
422
|
}
|
|
443
|
-
return
|
|
423
|
+
return core.transformAsync(code, {
|
|
444
424
|
babelrc: false,
|
|
445
425
|
configFile: false,
|
|
446
426
|
filename: id,
|
|
@@ -781,5 +761,5 @@ exports.protocolExternalResolver = protocolExternalResolver;
|
|
|
781
761
|
exports.removeDeployer = removeDeployer2;
|
|
782
762
|
exports.subpathExternalsResolver = subpathExternalsResolver;
|
|
783
763
|
exports.tsConfigPaths = tsConfigPaths;
|
|
784
|
-
//# sourceMappingURL=chunk-
|
|
785
|
-
//# sourceMappingURL=chunk-
|
|
764
|
+
//# sourceMappingURL=chunk-3XIMK24X.cjs.map
|
|
765
|
+
//# sourceMappingURL=chunk-3XIMK24X.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/build/plugins/esbuild.ts","../src/build/plugins/esm-shim.ts","../src/build/plugins/local-storage-detector.ts","../src/build/package-info.ts","../src/build/plugins/node-modules-extension-resolver.ts","../src/build/plugins/protocol-external-resolver.ts","../src/build/babel/remove-deployer.ts","../src/build/plugins/remove-deployer.ts","../src/build/plugins/subpath-externals-resolver.ts","../src/build/plugins/tsconfig-paths.ts","../src/build/bundler.ts"],"names":["originalEsbuild","originalEsmShim","fileURLToPath","statSync","dirname","pathToFileURL","getPackageInfo","readJSON","getPackageName","readFile","join","nodeResolve","isBareModuleSpecifier","isExternalProtocolImport","isAbsolute","t","path","removeDeployer","transformAsync","isDependencyPartOfPackage","fs","stripJsonComments","tsConfigPath","createHandler","normalize","resolved","slash","alias","getNodeResolveOptions","optimizeLodashImports","commonjs","json","rollup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,SAAS,OAAA,CAAQ,OAAA,GAAiD,EAAC,EAAG;AAC3E,EAAA,OAAOA,gCAAA,CAAgB;AAAA,IACrB,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU,MAAA;AAAA,IACV,MAAA,EAAQ,KAAA;AAAA,IACR,GAAG;AAAA,GACJ,CAAA;AACH;ACJA,IAAM,wBAAA,GAA2B,gCAAA;AACjC,IAAM,uBAAA,GAA0B,+BAAA;AAYzB,SAAS,OAAA,GAAkB;AAChC,EAAA,MAAM,WAAWC,gCAAA,EAAgB;AAEjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,UAAA;AAAA,IACN,WAAA,CAAY,IAAA,EAAM,KAAA,EAAO,IAAA,EAAM,IAAA,EAAM;AAEnC,MAAA,MAAM,WAAA,GAAc,IAAA,CAAK,QAAA,CAAS,YAAY,CAAA;AAC9C,MAAA,MAAM,UAAA,GAAa,IAAA,CAAK,QAAA,CAAS,WAAW,CAAA;AAI5C,MAAA,MAAM,oBAAA,GAAuB,WAAA,IAAe,wBAAA,CAAyB,IAAA,CAAK,IAAI,CAAA;AAC9E,MAAA,MAAM,mBAAA,GAAsB,UAAA,IAAc,uBAAA,CAAwB,IAAA,CAAK,IAAI,CAAA;AAE3E,MAAA,IAAI,wBAAwB,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AM;AACX,MAAA,OAAO,QAAQ,KAAA,EAAM;AAAA,IACvB;AAAA,GACF;AACF","file":"chunk-3XIMK24X.cjs","sourcesContent":["import originalEsbuild from 'rollup-plugin-esbuild';\n\nexport function esbuild(options: Parameters<typeof originalEsbuild>[0] = {}) {\n return originalEsbuild({\n target: 'node20',\n platform: 'node',\n minify: false,\n ...options,\n });\n}\n","import originalEsmShim from '@rollup/plugin-esm-shim';\nimport type { Plugin } from 'rollup';\n\n// Regex to detect DECLARATIONS of __filename, __dirname\n// Using non-capturing group (?:) for slightly better performance\nconst FilenameDeclarationRegex = /(?:const|let|var)\\s+__filename/;\nconst DirnameDeclarationRegex = /(?:const|let|var)\\s+__dirname/;\n\n/**\n * Custom ESM shim plugin wrapper that respects user-declared __filename/__dirname variables.\n *\n * The original @rollup/plugin-esm-shim would inject shims even when users had already declared\n * their own __filename/__dirname, causing \"Identifier '__filename' has already been declared\" errors.\n *\n * This wrapper checks if the user has already declared these variables and skips the shim injection\n * if so. If either variable is declared, we skip the shim entirely since the original plugin injects\n * both together and we assume users who declare one will also handle the other if needed.\n */\nexport function esmShim(): Plugin {\n const original = originalEsmShim();\n\n return {\n name: 'esm-shim',\n renderChunk(code, chunk, opts, meta) {\n // Fast path: use includes() first to avoid regex if identifiers aren't present\n const hasFilename = code.includes('__filename');\n const hasDirname = code.includes('__dirname');\n\n // If user declared either __filename or __dirname, skip shim injection entirely\n // since the original plugin injects both together\n const userDeclaredFilename = hasFilename && FilenameDeclarationRegex.test(code);\n const userDeclaredDirname = hasDirname && DirnameDeclarationRegex.test(code);\n\n if (userDeclaredFilename || userDeclaredDirname) {\n return null;\n }\n\n // Otherwise, delegate to the original plugin\n if (typeof original.renderChunk === 'function') {\n return original.renderChunk.call(this, code, chunk, opts, meta);\n }\n\n return null;\n },\n };\n}\n\nexport default esmShim;\n","import type { Plugin } from 'rollup';\n\n/**\n * Connection-string-shaped patterns that resolve to the build host and will\n * never work inside the deploy container.\n */\nconst LOCAL_HOST_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [\n {\n pattern: /\\bfile:\\.{1,2}\\/[^\\s'\"`]+\\.(?:db|sqlite)\\b/gi,\n hint: 'LibSQL/SQLite file path relative to the build host',\n },\n {\n pattern: /\\b(?:postgres(?:ql)?|mysql|mongodb|redis|libsql):\\/\\/[^/\\s'\"`]*localhost\\b/gi,\n hint: 'localhost in a connection string',\n },\n {\n pattern: /\\b(?:postgres(?:ql)?|mysql|mongodb|redis|libsql):\\/\\/[^/\\s'\"`]*127\\.0\\.0\\.1\\b/g,\n hint: '127.0.0.1 in a connection string',\n },\n];\n\nexport interface LocalStorageDetection {\n value: string;\n hint: string;\n module: string;\n /**\n * Name of the env var that guards this literal at runtime, when the\n * literal is the fallback arm of a `process.env.X || literal` (or `??`)\n * expression. The CLI preflight uses this to suppress or soften the\n * error when the guarding var is present in the deploy env.\n */\n guardedBy?: string;\n}\n\n/**\n * Unified preflight metadata emitted as `preflight-metadata.json`.\n * Superset of the legacy `preflight-local-paths.json` (which stays emitted\n * for one release so older CLIs keep working with newer deployers).\n */\nexport interface PreflightMetadata {\n version: 1;\n localPaths: LocalStorageDetection[];\n userEnvRefs: string[];\n}\n\n/**\n * Everything under `.mastra/.build/` is deployer-generated pre-bundled\n * dependency code (`@mastra__*.mjs` shims and their shared `chunk-*.mjs`\n * files), never user-authored. These preserve JSDoc examples from the\n * original library source (e.g. `LibSQLStore({ url: 'file:./data.db' })`)\n * which would otherwise trip the host-local detector, and their env var\n * reads are library refs that must not count as user references.\n */\nconst MASTRA_BUILD_DIR = /[\\\\/]\\.mastra[\\\\/]\\.build[\\\\/]/;\n\nconst PROCESS_ENV_DOT = /\\bprocess\\.env\\.([A-Z_][A-Z0-9_]*)\\b/g;\nconst PROCESS_ENV_BRACKET = /\\bprocess\\.env\\[['\"]([A-Z_][A-Z0-9_]*)['\"]\\]/g;\n\n/** Names of the metadata assets emitted into the output dir. */\n// TODO(preflight-metadata): stop emitting the legacy file in the next minor\n// after @mastra/deployer 1.50 — every CLI released alongside 1.50+ reads\n// preflight-metadata.json. Also remove the legacy fallback in the CLI's\n// deploy-preflight.ts at the same time.\nconst LEGACY_LOCAL_PATHS_FILE = 'preflight-local-paths.json';\nconst PREFLIGHT_METADATA_FILE = 'preflight-metadata.json';\n\ninterface ModuleMatch {\n value: string;\n hint: string;\n guardedBy?: string;\n}\n\nfunction collectEnvRefs(code: string): Set<string> {\n const refs = new Set<string>();\n for (const m of code.matchAll(PROCESS_ENV_DOT)) refs.add(m[1]!);\n for (const m of code.matchAll(PROCESS_ENV_BRACKET)) refs.add(m[1]!);\n return refs;\n}\n\n/* ------------------------------------------------------------------ */\n/* AST guard analysis */\n/* ------------------------------------------------------------------ */\n\ninterface AstNode {\n type: string;\n [key: string]: unknown;\n}\n\nfunction isAstNode(v: unknown): v is AstNode {\n return typeof v === 'object' && v !== null && typeof (v as AstNode).type === 'string';\n}\n\nfunction walkAst(node: AstNode, visit: (node: AstNode) => void): void {\n visit(node);\n for (const value of Object.values(node)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n if (isAstNode(item)) walkAst(item, visit);\n }\n } else if (isAstNode(value)) {\n walkAst(value, visit);\n }\n }\n}\n\n/** Find the first `process.env.X` / `process.env['X']` read inside an expression. */\nfunction findFirstEnvRef(node: AstNode): string | undefined {\n let found: string | undefined;\n walkAst(node, n => {\n if (found !== undefined) return;\n if (n.type !== 'MemberExpression') return;\n const object = n.object as AstNode | undefined;\n if (\n !object ||\n object.type !== 'MemberExpression' ||\n (object.object as AstNode | undefined)?.type !== 'Identifier' ||\n ((object.object as AstNode).name as string) !== 'process' ||\n (object.property as AstNode | undefined)?.type !== 'Identifier' ||\n ((object.property as AstNode).name as string) !== 'env'\n ) {\n return;\n }\n const property = n.property as AstNode | undefined;\n if (property?.type === 'Identifier' && !n.computed) {\n found = property.name as string;\n } else if (property?.type === 'Literal' && typeof property.value === 'string') {\n found = property.value;\n }\n });\n return found;\n}\n\n/**\n * Parse a module and figure out, for each detected local-path value, whether\n * every string literal containing it is the fallback arm of a\n * `process.env.X || <literal>` / `??` expression. Returns a map from\n * detected value to guarding env var name. Values with any unguarded\n * occurrence (or inconsistent guards) are absent — the CLI then errors as\n * before, which is the safe default.\n */\nfunction findGuardedValues(ast: AstNode, values: Set<string>): Map<string, string> {\n const stringLiterals: AstNode[] = [];\n const guardedLiterals = new Map<AstNode, string>();\n\n walkAst(ast, node => {\n if (node.type === 'Literal' && typeof node.value === 'string') {\n stringLiterals.push(node);\n return;\n }\n if (node.type === 'LogicalExpression' && (node.operator === '||' || node.operator === '??')) {\n const right = node.right as AstNode | undefined;\n if (right?.type === 'Literal' && typeof right.value === 'string') {\n const envName = findFirstEnvRef(node.left as AstNode);\n if (envName) guardedLiterals.set(right, envName);\n }\n }\n });\n\n const result = new Map<string, string>();\n for (const value of values) {\n const containing = stringLiterals.filter(lit => (lit.value as string).includes(value));\n if (containing.length === 0) continue;\n const guards = containing.map(lit => guardedLiterals.get(lit));\n const first = guards[0];\n if (first !== undefined && guards.every(g => g === first)) {\n result.set(value, first);\n }\n }\n return result;\n}\n\n/**\n * Rollup plugin that detects host-local storage URLs (e.g. `file:./mastra.db`,\n * `postgres://localhost`) in **user source modules** during bundling, and\n * collects the env vars user code reads via `process.env.X`.\n *\n * Only modules outside `node_modules` (and the deployer's own\n * `.mastra/.build/` pre-bundled files) are inspected, so library code\n * (like Agent Builder prompt templates or JSDoc examples in `@mastra/core`)\n * is naturally excluded. When `rootDir` is given, modules outside it are\n * also excluded — symlinked dependencies (pnpm `link:`/`file:`) resolve to\n * real paths that never contain `node_modules`. Tree-shaken modules are\n * excluded via\n * `generateBundle` — only modules that actually contribute rendered code to\n * the output are reported.\n *\n * When a detected literal is the fallback arm of a `process.env.X || literal`\n * expression, `guardedBy: \"X\"` is recorded so the CLI preflight can apply\n * deploy-time env context instead of hard-erroring on a dead fallback.\n *\n * Two assets are emitted into the output directory for the CLI preflight:\n * - `preflight-metadata.json` — unified metadata (local paths + user env refs)\n * - `preflight-local-paths.json` — legacy shape, kept for one release so an\n * older globally-installed CLI paired with a newer project-local deployer\n * doesn't lose the LOCAL_STORAGE_PATH check.\n */\nexport function localStorageDetector(rootDir?: string): Plugin {\n const userModuleMatches = new Map<string, ModuleMatch[]>();\n const userModuleEnvRefs = new Map<string, Set<string>>();\n let normalizedRoot: string | undefined;\n if (rootDir) {\n let root = rootDir.replace(/\\\\/g, '/');\n while (root.endsWith('/')) root = root.slice(0, -1);\n normalizedRoot = root + '/';\n }\n\n return {\n name: 'mastra-local-storage-detector',\n\n transform(_code, id) {\n if (id.includes('node_modules')) return null;\n if (MASTRA_BUILD_DIR.test(id)) return null;\n // Modules outside the project/workspace root are dependencies resolved\n // through symlinks (pnpm `link:`, `file:`, monorepo dev setups) whose\n // real path escapes `node_modules` — library code, not user code.\n if (normalizedRoot && !id.replace(/\\\\/g, '/').startsWith(normalizedRoot)) return null;\n\n const refs = collectEnvRefs(_code);\n if (refs.size > 0) {\n userModuleEnvRefs.set(id, refs);\n }\n\n const matches: ModuleMatch[] = [];\n for (const { pattern, hint } of LOCAL_HOST_PATTERNS) {\n const re = new RegExp(pattern.source, pattern.flags.includes('g') ? pattern.flags : pattern.flags + 'g');\n for (const m of _code.matchAll(re)) {\n matches.push({ value: m[0], hint });\n }\n }\n\n if (matches.length > 0) {\n // Best-effort structural pass: a parse failure (or a non-Rollup test\n // context without `this.parse`) simply means no `guardedBy`, which\n // preserves the previous always-error behavior.\n try {\n const ast = this.parse(_code) as unknown as AstNode;\n const guarded = findGuardedValues(ast, new Set(matches.map(m => m.value)));\n for (const match of matches) {\n const guardedBy = guarded.get(match.value);\n if (guardedBy) match.guardedBy = guardedBy;\n }\n } catch {\n // ignore — fall back to unguarded detections\n }\n\n userModuleMatches.set(id, matches);\n }\n\n return null;\n },\n\n generateBundle(_, bundle) {\n const detections: LocalStorageDetection[] = [];\n const seen = new Set<string>();\n const userEnvRefs = new Set<string>();\n\n for (const chunk of Object.values(bundle)) {\n if (chunk.type !== 'chunk') continue;\n\n for (const [moduleId, moduleInfo] of Object.entries(chunk.modules)) {\n if (moduleInfo.renderedLength === 0) continue;\n\n for (const ref of userModuleEnvRefs.get(moduleId) ?? []) {\n userEnvRefs.add(ref);\n }\n\n const matches = userModuleMatches.get(moduleId);\n if (!matches) continue;\n\n for (const { value, hint, guardedBy } of matches) {\n const key = `${hint}::${value}`;\n if (seen.has(key)) continue;\n seen.add(key);\n\n detections.push({ value, hint, module: moduleId, ...(guardedBy ? { guardedBy } : {}) });\n }\n }\n }\n\n const metadata: PreflightMetadata = {\n version: 1,\n localPaths: detections,\n userEnvRefs: [...userEnvRefs].sort(),\n };\n\n this.emitFile({\n type: 'asset',\n fileName: PREFLIGHT_METADATA_FILE,\n source: JSON.stringify(metadata),\n });\n\n // Legacy asset — shape unchanged (no `guardedBy`) for older CLIs.\n this.emitFile({\n type: 'asset',\n fileName: LEGACY_LOCAL_PATHS_FILE,\n source: JSON.stringify(detections.map(({ value, hint, module }) => ({ value, hint, module }))),\n });\n },\n };\n}\n","/**\n * Note: This function depends on local-pkg and should only be used at build-time.\n * It is in a separate file to avoid including local-pkg in runtime code.\n */\n\nimport { statSync } from 'node:fs';\nimport { dirname } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport { readJSON } from 'fs-extra/esm';\nimport { getPackageInfo } from 'local-pkg';\nimport { getPackageName } from './utils';\n\n/**\n * Normalize a resolution base path to a directory file URL.\n *\n * Callers often pass a module file path (e.g. a rollup module id like\n * `node_modules/@mastra/core/dist/chunk-XYZ.js`) as the parent path. mlly (used by local-pkg)\n * also treats each resolution base as a directory candidate (`<base>/_index.js`), which makes it\n * try to read `<file>/package.json`. That fails with ENOTDIR, which mlly does not tolerate\n * (only ENOENT) and local-pkg then logs the raw error to the console. Using the file's directory\n * as the base avoids this while resolving identically.\n */\nfunction toParentDirectoryUrl(parentPath: string): string {\n let fsPath = parentPath.startsWith('file://') ? fileURLToPath(parentPath) : parentPath;\n\n try {\n if (statSync(fsPath).isFile()) {\n fsPath = dirname(fsPath);\n }\n } catch {\n // non-existent paths are used as-is\n }\n\n return pathToFileURL(fsPath).href;\n}\n\n/**\n * Get package root path\n */\nexport async function getPackageRootPath(packageName: string, parentPath?: string): Promise<string | null> {\n let rootPath: string | null;\n\n try {\n let options: { paths?: string[] } | undefined = undefined;\n if (parentPath) {\n options = {\n paths: [toParentDirectoryUrl(parentPath)],\n };\n }\n\n const pkg = await getPackageInfo(packageName, options);\n rootPath = pkg?.rootPath ?? null;\n } catch {\n rootPath = null;\n }\n\n return rootPath;\n}\n\nasync function readPackageMetadata(\n rootPath: string,\n requestedPackageName: string | null,\n): Promise<{ rootPath: string; version?: string; packageSpec?: string }> {\n try {\n const pkgJson = await readJSON(`${rootPath}/package.json`);\n const version = pkgJson.version;\n const actualPackageName = pkgJson.name;\n const packageSpec =\n version && actualPackageName && requestedPackageName && requestedPackageName !== actualPackageName\n ? `npm:${actualPackageName}@${version}`\n : undefined;\n\n return { rootPath, version, packageSpec };\n } catch {\n return { rootPath };\n }\n}\n\nexport async function getPackageMetadata(\n packageName: string,\n parentPath?: string,\n): Promise<{ rootPath: string | null; version?: string; packageSpec?: string }> {\n const requestedPackageName = getPackageName(packageName);\n const packageNames = [...new Set([packageName, requestedPackageName].filter(Boolean) as string[])];\n let firstRootPath: string | null = null;\n\n for (const name of packageNames) {\n const rootPath = await getPackageRootPath(name, parentPath);\n firstRootPath ??= rootPath;\n if (!rootPath) {\n continue;\n }\n\n const metadata = await readPackageMetadata(rootPath, requestedPackageName ?? null);\n if (metadata.version || metadata.packageSpec) {\n return metadata;\n }\n }\n\n return { rootPath: firstRootPath };\n}\n","import { readFile } from 'node:fs/promises';\nimport { join, isAbsolute } from 'node:path';\nimport nodeResolve from '@rollup/plugin-node-resolve';\nimport type { Plugin } from 'rollup';\nimport type { PackageJson } from 'type-fest';\nimport { getPackageRootPath } from '../package-info';\nimport { getPackageName, isExternalProtocolImport, isBareModuleSpecifier } from '../utils';\n\n/**\n * Check if a package has an exports field in its package.json.\n * Results are cached to avoid repeated filesystem reads.\n */\nasync function getPackageJSON(pkgName: string, importer: string): Promise<PackageJson> {\n const pkgRoot = await getPackageRootPath(pkgName, importer);\n if (!pkgRoot) {\n throw new Error(`Package ${pkgName} not found`);\n }\n\n const pkgJSON = JSON.parse(await readFile(join(pkgRoot, 'package.json'), 'utf-8')) as PackageJson;\n return pkgJSON;\n}\n\n/**\n * Rollup plugin that resolves module extensions for external dependencies.\n *\n * This plugin handles ESM compatibility for external imports when node-resolve is not used:\n * - Packages WITH exports field (e.g., hono, date-fns): Keep imports as-is or strip redundant extensions\n * - Packages WITHOUT exports field (e.g., lodash): Add .js extension for direct file imports\n */\nexport function nodeModulesExtensionResolver(): Plugin {\n // Create a single instance of node-resolve to reuse\n const nodeResolvePlugin = nodeResolve();\n\n return {\n name: 'node-modules-extension-resolver',\n async resolveId(id, importer, options) {\n // Only bare package imports are relevant here.\n if (!importer || !isBareModuleSpecifier(id) || isExternalProtocolImport(id) || isAbsolute(id)) {\n return null;\n }\n\n // Skip direct package imports (e.g., 'lodash', '@mastra/core')\n const parts = id.split('/');\n const isScoped = id.startsWith('@');\n if ((isScoped && parts.length === 2) || (!isScoped && parts.length === 1)) {\n return null;\n }\n\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n try {\n const packageJSON = await getPackageJSON(pkgName, importer);\n // if it has exports, node should be able to rsolve it, if not the exports map is wrong.\n if (!!packageJSON.exports) {\n return null;\n }\n\n const packageRoot = await getPackageRootPath(pkgName, importer);\n // @ts-expect-error - handle is part of resolveId signature\n const nodeResolved = await nodeResolvePlugin.resolveId?.handler?.call(this, id, importer, options);\n // if we cannot resolve it, it's not a valid import so we let node handle it\n if (!nodeResolved?.id) {\n return null;\n }\n\n let filePath = nodeResolved.id;\n if (nodeResolved.resolvedBy === 'commonjs--resolver') {\n filePath = filePath.substring(1).split('?')[0];\n }\n\n const resolvedImportPath = filePath.replace(packageRoot, pkgName);\n\n return {\n id: resolvedImportPath,\n external: true,\n };\n } catch (err) {\n console.error(err);\n return null;\n }\n },\n };\n}\n","import type { Plugin } from 'rollup';\nimport { isExternalProtocolImport } from '../utils';\n\nexport function protocolExternalResolver({ exclude = ['node:'] }: { exclude?: readonly string[] } = {}): Plugin {\n return {\n name: 'protocol-external-resolver',\n resolveId(id) {\n if (!isExternalProtocolImport(id, exclude)) {\n return null;\n }\n\n return {\n id,\n external: true,\n };\n },\n } satisfies Plugin;\n}\n","import { types as t } from '@babel/core';\nimport type { NodePath, PluginObject, PluginPass } from '@babel/core';\n\ninterface RemoveDeployerState extends PluginPass {\n hasReplaced?: boolean;\n}\n\nexport function removeDeployer(): PluginObject<RemoveDeployerState> {\n // Helper to remove deployer property from an object and clean up its binding\n function removeDeployerFromObject(\n objectExpr: t.ObjectExpression,\n scope: { getBinding: (name: string) => { path?: NodePath } | undefined },\n ): t.ObjectProperty | undefined {\n const deployerProp = objectExpr.properties.find(\n prop => t.isObjectProperty(prop) && t.isIdentifier(prop.key) && prop.key.name === 'deployer',\n ) as t.ObjectProperty | undefined;\n\n if (deployerProp) {\n objectExpr.properties = objectExpr.properties.filter(prop => prop !== deployerProp);\n\n // Clean up the deployer binding if it's a reference\n if (t.isIdentifier(deployerProp.value)) {\n const deployerBinding = scope.getBinding(deployerProp.value.name);\n if (deployerBinding) {\n deployerBinding.path?.parentPath?.remove();\n }\n }\n }\n\n return deployerProp;\n }\n\n return {\n name: 'remove-deployer',\n visitor: {\n NewExpression(path, state: RemoveDeployerState) {\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 if (!state.hasReplaced) {\n state.hasReplaced = true;\n const newMastraObj = t.cloneNode(path.node);\n if (t.isObjectExpression(newMastraObj.arguments[0]) && newMastraObj.arguments[0].properties?.length) {\n const objectArg = newMastraObj.arguments[0];\n let foundDeployer = false;\n\n // First, check for direct deployer property\n const directDeployer = removeDeployerFromObject(objectArg, state.file.scope);\n if (directDeployer) {\n foundDeployer = true;\n }\n\n // Then, check spread elements for deployer properties\n for (const prop of objectArg.properties) {\n if (t.isSpreadElement(prop) && t.isIdentifier(prop.argument)) {\n const spreadBinding = state.file.scope.getBinding(prop.argument.name);\n if (spreadBinding?.path && t.isVariableDeclarator(spreadBinding.path.node)) {\n const init = spreadBinding.path.node.init;\n if (t.isObjectExpression(init)) {\n const spreadDeployer = removeDeployerFromObject(init, state.file.scope);\n if (spreadDeployer) {\n foundDeployer = true;\n }\n }\n }\n }\n }\n\n if (foundDeployer) {\n path.replaceWith(newMastraObj);\n }\n }\n }\n },\n },\n } as PluginObject<RemoveDeployerState>;\n}\n","import { transformAsync } from '@babel/core';\nimport type { Plugin, SourceMapInput } from 'rollup';\n\nimport { removeDeployer as removeDeployerBabelPlugin } from '../babel/remove-deployer';\n\nexport function removeDeployer(mastraEntry: string, options?: { sourcemap?: boolean }): Plugin {\n return {\n name: 'remove-deployer',\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: [removeDeployerBabelPlugin],\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 type { Plugin } from 'rollup';\nimport { isDependencyPartOfPackage } from '../utils';\n\nexport function subpathExternalsResolver(externals: string[]): Plugin {\n return {\n name: 'subpath-externals-resolver',\n resolveId(id) {\n if (id.startsWith('.') || id.startsWith('/')) {\n return null;\n }\n\n const isPartOfExternals = externals.some(external => isDependencyPartOfPackage(id, external));\n if (isPartOfExternals) {\n return {\n id,\n external: true,\n };\n }\n },\n } satisfies Plugin;\n}\n","import fs from 'node:fs';\nimport path, { normalize } from 'node:path';\nimport type { Plugin } from 'rollup';\nimport stripJsonComments from 'strip-json-comments';\nimport type { RegisterOptions } from 'typescript-paths';\nimport { createHandler } from 'typescript-paths';\n\nconst PLUGIN_NAME = 'tsconfig-paths';\nconst JS_IMPORT_SOURCE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx'];\n\nexport type PluginOptions = Omit<RegisterOptions, 'loggerID'> & { localResolve?: boolean };\n\n/**\n * Check if a tsconfig file has path mappings configured.\n * Exported for testing purposes.\n *\n * @param tsConfigPath - Path to the tsconfig.json file\n * @returns true if the tsconfig has paths configured or extends another config, false otherwise\n */\nexport function hasPaths(tsConfigPath: string): boolean {\n try {\n const content = fs.readFileSync(tsConfigPath, 'utf8');\n const config = JSON.parse(stripJsonComments(content));\n return !!(\n (config.compilerOptions?.paths && Object.keys(config.compilerOptions.paths).length > 0) ||\n (typeof config.extends === 'string' && config.extends.length > 0) ||\n (Array.isArray(config.extends) && config.extends.length > 0)\n );\n } catch {\n return false;\n }\n}\n\nexport function tsConfigPaths({ tsConfigPath, respectCoreModule, localResolve }: PluginOptions = {}): Plugin {\n const handlerCache = new Map<string, ReturnType<typeof createHandler>>();\n\n function resolveJsImportToSourceFile(moduleName: string): string {\n if (fs.existsSync(moduleName)) {\n return moduleName;\n }\n\n const parsed = path.parse(moduleName);\n if (parsed.ext !== '.js') {\n return moduleName;\n }\n\n for (const extension of JS_IMPORT_SOURCE_EXTENSIONS) {\n const candidate = path.join(parsed.dir, `${parsed.name}${extension}`);\n if (fs.existsSync(candidate)) {\n return candidate;\n }\n }\n\n return moduleName;\n }\n\n // Find tsconfig.json file starting from a directory and walking up\n function findTsConfigForFile(filePath: string): string | null {\n let currentDir = path.dirname(filePath);\n const root = path.parse(currentDir).root;\n\n while (currentDir !== root) {\n const tsConfigPath = path.join(currentDir, 'tsconfig.json');\n\n if (fs.existsSync(tsConfigPath)) {\n // Check if this tsconfig has path mappings\n if (hasPaths(tsConfigPath)) {\n return tsConfigPath;\n }\n }\n\n // Also check for tsconfig.base.json (common in NX)\n const tsConfigBasePath = path.join(currentDir, 'tsconfig.base.json');\n if (fs.existsSync(tsConfigBasePath)) {\n if (hasPaths(tsConfigBasePath)) {\n return tsConfigBasePath;\n }\n }\n\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n }\n\n // Get or create handler for a specific tsconfig file\n function getHandlerForFile(filePath: string): ReturnType<typeof createHandler> | null {\n // If a specific tsConfigPath was provided, use it\n if (tsConfigPath && typeof tsConfigPath === 'string') {\n if (!handlerCache.has(tsConfigPath)) {\n handlerCache.set(\n tsConfigPath,\n createHandler({\n log: () => {},\n tsConfigPath,\n respectCoreModule,\n falllback: moduleName => fs.existsSync(moduleName),\n }),\n );\n }\n return handlerCache.get(tsConfigPath)!;\n }\n\n // Find appropriate tsconfig for this file\n const configPath = findTsConfigForFile(filePath);\n if (!configPath) {\n return null;\n }\n\n // Cache handlers to avoid recreation\n if (!handlerCache.has(configPath)) {\n handlerCache.set(\n configPath,\n createHandler({\n log: () => {},\n tsConfigPath: configPath,\n respectCoreModule,\n falllback: moduleName => fs.existsSync(moduleName),\n }),\n );\n }\n\n return handlerCache.get(configPath)!;\n }\n\n // Simple alias resolution using dynamic handler\n function resolveAlias(request: string, importer: string): string | null | undefined {\n // Get the appropriate handler for this file\n const dynamicHandler = getHandlerForFile(importer);\n if (!dynamicHandler) {\n return null;\n }\n\n const resolved = dynamicHandler(request, normalize(importer));\n return resolved;\n }\n\n return {\n name: PLUGIN_NAME,\n resolveId: {\n order: 'pre',\n async handler(request, importer, options) {\n if (!importer || request.startsWith('\\0') || importer.charCodeAt(0) === 0) {\n return null;\n }\n\n // Convert relative paths to absolute to ensure proper tsconfig path resolution\n // This allows path aliases to work regardless of how the importer path is provided\n if (!path.isAbsolute(importer)) {\n importer = path.resolve(process.cwd(), importer);\n }\n\n const moduleName = resolveAlias(request, importer);\n // No tsconfig alias found, so we need to resolve it normally\n if (!moduleName) {\n const resolved = await this.resolve(request, importer, { skipSelf: true, ...options });\n if (!resolved) {\n return null;\n }\n\n // If localResolve is true, we need to check if the importer has been resolved by the tsconfig-paths plugin\n // if so, we need to resolve the request from the importer instead of the root and mark it as external\n if (localResolve) {\n const importerInfo = this.getModuleInfo(importer);\n const importerPluginMeta = importerInfo?.meta?.[PLUGIN_NAME];\n\n if (!request.startsWith('./') && !request.startsWith('../') && importerPluginMeta?.resolved) {\n return {\n ...resolved,\n external: !request.startsWith('hono/') && request !== 'hono',\n };\n }\n }\n\n return {\n ...resolved,\n meta: {\n ...(resolved.meta || {}),\n },\n };\n }\n\n const resolvedModuleName = resolveJsImportToSourceFile(moduleName);\n\n // When a module does not have an extension, we need to resolve it to a file\n if (!path.extname(resolvedModuleName)) {\n const resolved = await this.resolve(resolvedModuleName, importer, { skipSelf: true, ...options });\n\n if (!resolved) {\n return null;\n }\n\n return {\n ...resolved,\n meta: {\n ...resolved.meta,\n [PLUGIN_NAME]: {\n resolved: true,\n },\n },\n };\n }\n\n // Always pass through bundler's resolution to ensure proper path normalization\n const resolved = await this.resolve(resolvedModuleName, importer, { skipSelf: true, ...options });\n\n if (!resolved) {\n return null;\n }\n\n return {\n ...resolved,\n meta: {\n ...resolved.meta,\n [PLUGIN_NAME]: {\n resolved: true,\n },\n },\n };\n },\n },\n } satisfies Plugin;\n}\n","import { join } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport { optimizeLodashImports } from '@optimize-lodash/rollup-plugin';\nimport alias from '@rollup/plugin-alias';\nimport commonjs from '@rollup/plugin-commonjs';\nimport json from '@rollup/plugin-json';\nimport nodeResolve from '@rollup/plugin-node-resolve';\nimport { rollup } from 'rollup';\nimport type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport type { analyzeBundle } from './analyze';\nimport { esbuild } from './plugins/esbuild';\nimport { esmShim } from './plugins/esm-shim';\nimport { localStorageDetector } from './plugins/local-storage-detector';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { protocolExternalResolver } from './plugins/protocol-external-resolver';\nimport { removeDeployer } from './plugins/remove-deployer';\nimport { subpathExternalsResolver } from './plugins/subpath-externals-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { getNodeResolveOptions, slash } from './utils';\nimport type { BundlerPlatform } from './utils';\n\nexport function mastraInternalAliasPlugin(entryFile: string): Plugin {\n const normalizedEntryFile = slash(entryFile);\n\n return alias({\n entries: [\n {\n find: /^\\#server$/,\n replacement: slash(fileURLToPath(import.meta.resolve('@mastra/deployer/server'))),\n },\n {\n find: /^\\@mastra\\/server\\/(.*)/,\n replacement: `@mastra/server/$1`,\n customResolver: id => {\n if (id.startsWith('@mastra/server')) {\n return {\n id: fileURLToPath(import.meta.resolve(id)),\n };\n }\n },\n },\n { find: /^\\#mastra$/, replacement: normalizedEntryFile },\n ],\n });\n}\n\nexport function mastraToolsAliasPlugin(): Plugin {\n return {\n name: 'tools-rewriter',\n resolveId(id: string) {\n if (id === '#tools') {\n return {\n id: './tools.mjs',\n external: true,\n };\n }\n },\n };\n}\n\nexport async function getInputOptions(\n entryFile: string,\n analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>,\n platform: BundlerPlatform,\n env: Record<string, string> = { 'process.env.NODE_ENV': JSON.stringify('production') },\n {\n sourcemap = false,\n isDev = false,\n projectRoot,\n workspaceRoot = undefined,\n enableEsmShim = true,\n externalsPreset = false,\n }: {\n sourcemap?: boolean;\n isDev?: boolean;\n workspaceRoot?: string;\n projectRoot: string;\n enableEsmShim?: boolean;\n externalsPreset?: boolean;\n },\n): Promise<InputOptions> {\n const nodeResolvePlugin = nodeResolve(getNodeResolveOptions(platform));\n\n const externalsCopy = new Set<string>(analyzedBundleInfo.externalDependencies.keys());\n const externals = externalsPreset ? [] : Array.from(externalsCopy);\n\n return {\n logLevel: process.env.MASTRA_BUNDLER_DEBUG === 'true' ? 'debug' : 'silent',\n treeshake: 'smallest',\n preserveSymlinks: true,\n external: externals,\n plugins: [\n protocolExternalResolver(),\n subpathExternalsResolver(externals),\n {\n name: 'alias-optimized-deps',\n resolveId(id: string) {\n if (!analyzedBundleInfo.dependencies.has(id)) {\n return null;\n }\n\n const filename = analyzedBundleInfo.dependencies.get(id)!;\n const absolutePath = join(workspaceRoot || projectRoot, filename);\n\n // During `mastra dev` we want to keep deps as external\n if (isDev) {\n return {\n id: process.platform === 'win32' ? pathToFileURL(absolutePath).href : absolutePath,\n external: true,\n };\n }\n\n // For production builds return the absolute path as-is so Rollup can handle itself\n return {\n id: absolutePath,\n external: false,\n };\n },\n } satisfies Plugin,\n mastraInternalAliasPlugin(entryFile),\n tsConfigPaths(),\n mastraToolsAliasPlugin(),\n esbuild({\n platform,\n define: env,\n }),\n optimizeLodashImports({\n include: '**/*.{js,ts,mjs,cjs}',\n }),\n externalsPreset\n ? null\n : commonjs({\n extensions: ['.js', '.ts'],\n transformMixedEsModules: true,\n esmExternals(id) {\n return externals.includes(id);\n },\n }),\n enableEsmShim ? esmShim() : undefined,\n externalsPreset ? nodeModulesExtensionResolver() : nodeResolvePlugin,\n // for debugging\n // {\n // name: 'logger',\n // //@ts-expect-error\n // resolveId(id, ...args) {\n // console.log({ id, args });\n // },\n // // @ts-expect-error\n // transform(code, id) {\n // if (code.includes('class Duplexify ')) {\n // console.log({ duplex: id });\n // }\n // },\n // },\n json(),\n localStorageDetector(workspaceRoot || projectRoot),\n removeDeployer(entryFile, { sourcemap }),\n // treeshake unused imports\n esbuild({\n include: entryFile,\n platform,\n }),\n ].filter(Boolean),\n } satisfies InputOptions;\n}\n\nexport async function createBundler(\n inputOptions: InputOptions,\n outputOptions: Partial<OutputOptions> & { dir: string },\n) {\n const bundler = await rollup(inputOptions);\n\n return {\n write: () => {\n return bundler.write({\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n });\n },\n close: () => {\n return bundler.close();\n },\n };\n}\n"]}
|
|
@@ -13,7 +13,7 @@ import { readFile } from 'fs/promises';
|
|
|
13
13
|
import fs, { statSync } from 'fs';
|
|
14
14
|
import { readJSON } from 'fs-extra/esm';
|
|
15
15
|
import { getPackageInfo } from 'local-pkg';
|
|
16
|
-
import
|
|
16
|
+
import { transformAsync, types } from '@babel/core';
|
|
17
17
|
import stripJsonComments from 'strip-json-comments';
|
|
18
18
|
import { createHandler } from 'typescript-paths';
|
|
19
19
|
|
|
@@ -337,14 +337,13 @@ function protocolExternalResolver({ exclude = ["node:"] } = {}) {
|
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
function removeDeployer() {
|
|
340
|
-
const t = babel.types;
|
|
341
340
|
function removeDeployerFromObject(objectExpr, scope) {
|
|
342
341
|
const deployerProp = objectExpr.properties.find(
|
|
343
|
-
(prop) =>
|
|
342
|
+
(prop) => types.isObjectProperty(prop) && types.isIdentifier(prop.key) && prop.key.name === "deployer"
|
|
344
343
|
);
|
|
345
344
|
if (deployerProp) {
|
|
346
345
|
objectExpr.properties = objectExpr.properties.filter((prop) => prop !== deployerProp);
|
|
347
|
-
if (
|
|
346
|
+
if (types.isIdentifier(deployerProp.value)) {
|
|
348
347
|
const deployerBinding = scope.getBinding(deployerProp.value.name);
|
|
349
348
|
if (deployerBinding) {
|
|
350
349
|
deployerBinding.path?.parentPath?.remove();
|
|
@@ -357,18 +356,18 @@ function removeDeployer() {
|
|
|
357
356
|
name: "remove-deployer",
|
|
358
357
|
visitor: {
|
|
359
358
|
NewExpression(path2, state) {
|
|
360
|
-
const varDeclaratorPath = path2.findParent((path3) =>
|
|
359
|
+
const varDeclaratorPath = path2.findParent((path3) => types.isVariableDeclarator(path3.node));
|
|
361
360
|
if (!varDeclaratorPath) {
|
|
362
361
|
return;
|
|
363
362
|
}
|
|
364
363
|
const parentNode = path2.parentPath.node;
|
|
365
|
-
if (!
|
|
364
|
+
if (!types.isVariableDeclarator(parentNode) || !types.isIdentifier(parentNode.id) || parentNode.id.name !== "mastra") {
|
|
366
365
|
return;
|
|
367
366
|
}
|
|
368
367
|
if (!state.hasReplaced) {
|
|
369
368
|
state.hasReplaced = true;
|
|
370
|
-
const newMastraObj =
|
|
371
|
-
if (
|
|
369
|
+
const newMastraObj = types.cloneNode(path2.node);
|
|
370
|
+
if (types.isObjectExpression(newMastraObj.arguments[0]) && newMastraObj.arguments[0].properties?.length) {
|
|
372
371
|
const objectArg = newMastraObj.arguments[0];
|
|
373
372
|
let foundDeployer = false;
|
|
374
373
|
const directDeployer = removeDeployerFromObject(objectArg, state.file.scope);
|
|
@@ -376,11 +375,11 @@ function removeDeployer() {
|
|
|
376
375
|
foundDeployer = true;
|
|
377
376
|
}
|
|
378
377
|
for (const prop of objectArg.properties) {
|
|
379
|
-
if (
|
|
378
|
+
if (types.isSpreadElement(prop) && types.isIdentifier(prop.argument)) {
|
|
380
379
|
const spreadBinding = state.file.scope.getBinding(prop.argument.name);
|
|
381
|
-
if (spreadBinding?.path &&
|
|
380
|
+
if (spreadBinding?.path && types.isVariableDeclarator(spreadBinding.path.node)) {
|
|
382
381
|
const init = spreadBinding.path.node.init;
|
|
383
|
-
if (
|
|
382
|
+
if (types.isObjectExpression(init)) {
|
|
384
383
|
const spreadDeployer = removeDeployerFromObject(init, state.file.scope);
|
|
385
384
|
if (spreadDeployer) {
|
|
386
385
|
foundDeployer = true;
|
|
@@ -407,7 +406,7 @@ function removeDeployer2(mastraEntry, options) {
|
|
|
407
406
|
if (id !== mastraEntry) {
|
|
408
407
|
return;
|
|
409
408
|
}
|
|
410
|
-
return
|
|
409
|
+
return transformAsync(code, {
|
|
411
410
|
babelrc: false,
|
|
412
411
|
configFile: false,
|
|
413
412
|
filename: id,
|
|
@@ -736,5 +735,5 @@ async function createBundler(inputOptions, outputOptions) {
|
|
|
736
735
|
}
|
|
737
736
|
|
|
738
737
|
export { createBundler, esbuild, esmShim, getInputOptions, getPackageMetadata, getPackageRootPath, mastraInternalAliasPlugin, mastraToolsAliasPlugin, nodeModulesExtensionResolver, protocolExternalResolver, removeDeployer2 as removeDeployer, subpathExternalsResolver, tsConfigPaths };
|
|
739
|
-
//# sourceMappingURL=chunk-
|
|
740
|
-
//# sourceMappingURL=chunk-
|
|
738
|
+
//# sourceMappingURL=chunk-5PORNUPF.js.map
|
|
739
|
+
//# sourceMappingURL=chunk-5PORNUPF.js.map
|