@mastra/deployer 0.10.0 → 0.10.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/dist/_tsup-dts-rollup.d.cts +13 -1
- package/dist/_tsup-dts-rollup.d.ts +13 -1
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/index.cjs +12 -8
- package/dist/build/index.d.cts +1 -0
- package/dist/build/index.d.ts +1 -0
- package/dist/build/index.js +3 -3
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-U5VNUAES.js → chunk-5ZQI6XPC.js} +1 -2
- package/dist/chunk-O3VM5GJZ.js +99 -0
- package/dist/{chunk-HHZDRBPV.cjs → chunk-OJY5LJPT.cjs} +258 -8
- package/dist/{chunk-YU2QBGOU.js → chunk-SC6Y2LQ4.js} +2 -2
- package/dist/{chunk-BQAYAQTU.cjs → chunk-U7N6PH2I.cjs} +6 -6
- package/dist/{chunk-EHPJDSR3.js → chunk-W46BY5GT.js} +237 -8
- package/dist/chunk-WK63QOD5.cjs +125 -0
- package/dist/{chunk-WHD7NHLX.cjs → chunk-YHCVXGZM.cjs} +4 -5
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-3R6WDRBB.cjs +0 -255
- package/dist/chunk-TUMXQX4H.js +0 -228
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tsConfigPaths, removeDeployer } from './chunk-WVBUOQT6.js';
|
|
2
|
-
import
|
|
2
|
+
import commonjs2 from '@rollup/plugin-commonjs';
|
|
3
3
|
import json from '@rollup/plugin-json';
|
|
4
4
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
5
5
|
import virtual from '@rollup/plugin-virtual';
|
|
@@ -11,6 +11,8 @@ import { builtinModules } from 'node:module';
|
|
|
11
11
|
import { join, dirname } from 'node:path';
|
|
12
12
|
import { spawn as spawn$1 } from 'node:child_process';
|
|
13
13
|
import { writeFile } from 'node:fs/promises';
|
|
14
|
+
import * as babel from '@babel/core';
|
|
15
|
+
import babel__default from '@babel/core';
|
|
14
16
|
|
|
15
17
|
function isNodeBuiltin(dep) {
|
|
16
18
|
const [pkg] = dep.split("/");
|
|
@@ -65,6 +67,230 @@ function validate(file) {
|
|
|
65
67
|
}
|
|
66
68
|
);
|
|
67
69
|
}
|
|
70
|
+
function removeAllOptionsFromMastraExcept(result, option) {
|
|
71
|
+
const t = babel__default.types;
|
|
72
|
+
return {
|
|
73
|
+
name: "remove-all-except-" + option + "-config",
|
|
74
|
+
visitor: {
|
|
75
|
+
ExportNamedDeclaration: {
|
|
76
|
+
// remove all exports
|
|
77
|
+
exit(path) {
|
|
78
|
+
path.remove();
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
NewExpression(path, state) {
|
|
82
|
+
const varDeclaratorPath = path.findParent((path2) => t.isVariableDeclarator(path2.node));
|
|
83
|
+
if (!varDeclaratorPath) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const parentNode = path.parentPath.node;
|
|
87
|
+
if (!t.isVariableDeclarator(parentNode) || !t.isIdentifier(parentNode.id) || parentNode.id.name !== "mastra") {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
let mastraArgs = t.objectExpression([]);
|
|
91
|
+
if (t.isObjectExpression(path.node.arguments[0])) {
|
|
92
|
+
mastraArgs = path.node.arguments[0];
|
|
93
|
+
}
|
|
94
|
+
let telemetry = mastraArgs.properties.find(
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
(prop) => prop.key.name === option
|
|
97
|
+
);
|
|
98
|
+
let telemetryValue = t.objectExpression([]);
|
|
99
|
+
const programPath = path.scope.getProgramParent().path;
|
|
100
|
+
if (!programPath) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (telemetry && t.isObjectProperty(telemetry) && t.isExpression(telemetry.value)) {
|
|
104
|
+
result.hasCustomConfig = true;
|
|
105
|
+
telemetryValue = telemetry.value;
|
|
106
|
+
if (t.isIdentifier(telemetry.value) && telemetry.value.name === option) {
|
|
107
|
+
const telemetryBinding = state.file.scope.getBinding(option);
|
|
108
|
+
if (telemetryBinding && t.isVariableDeclarator(telemetryBinding.path.node)) {
|
|
109
|
+
const id = path.scope.generateUidIdentifier(option);
|
|
110
|
+
telemetryBinding.path.replaceWith(t.variableDeclarator(id, telemetryBinding.path.node.init));
|
|
111
|
+
telemetryValue = id;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const exportDeclaration = t.exportNamedDeclaration(
|
|
116
|
+
t.variableDeclaration("const", [t.variableDeclarator(t.identifier(option), telemetryValue)]),
|
|
117
|
+
[]
|
|
118
|
+
);
|
|
119
|
+
programPath.node.body.push(exportDeclaration);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// src/build/babel/remove-all-options-bundler.ts
|
|
126
|
+
function removeAllOptionsExceptBundler(result) {
|
|
127
|
+
return removeAllOptionsFromMastraExcept(result, "bundler");
|
|
128
|
+
}
|
|
129
|
+
function removeNonReferencedNodes() {
|
|
130
|
+
const t = babel__default.types;
|
|
131
|
+
return {
|
|
132
|
+
name: "remove-non-referenced-nodes",
|
|
133
|
+
visitor: {
|
|
134
|
+
Program(path) {
|
|
135
|
+
const scope = path.scope;
|
|
136
|
+
const currentBody = path.get("body");
|
|
137
|
+
const filteredBody = currentBody.filter((childPath) => {
|
|
138
|
+
if (childPath.isExportDeclaration()) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
if (childPath.isVariableDeclaration()) {
|
|
142
|
+
return childPath.node.declarations.some((decl) => {
|
|
143
|
+
if (!t.isIdentifier(decl.id)) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
const name = decl.id.name;
|
|
147
|
+
const binding = scope.getBinding(name);
|
|
148
|
+
return binding && (binding.referenced || binding.referencePaths.length > 0);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
if (childPath.isFunctionDeclaration() || childPath.isClassDeclaration()) {
|
|
152
|
+
if (!t.isIdentifier(childPath.node.id)) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const name = childPath.node.id.name;
|
|
156
|
+
const binding = scope.getBinding(name);
|
|
157
|
+
return binding && (binding.referenced || binding.referencePaths.length > 0);
|
|
158
|
+
}
|
|
159
|
+
if (childPath.isImportDeclaration()) {
|
|
160
|
+
return childPath.node.specifiers.some((specifier) => {
|
|
161
|
+
const importedName = specifier.local.name;
|
|
162
|
+
const binding = scope.getBinding(importedName);
|
|
163
|
+
return binding && (binding.referenced || binding.referencePaths.length > 0);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
});
|
|
168
|
+
path.set(
|
|
169
|
+
"body",
|
|
170
|
+
filteredBody.map((p) => p.node)
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/build/plugins/remove-unused-references.ts
|
|
178
|
+
function recursiveRemoveNonReferencedNodes(code) {
|
|
179
|
+
return new Promise(async (resolve, reject) => {
|
|
180
|
+
babel.transform(
|
|
181
|
+
code,
|
|
182
|
+
{
|
|
183
|
+
babelrc: false,
|
|
184
|
+
configFile: false,
|
|
185
|
+
plugins: [removeNonReferencedNodes()]
|
|
186
|
+
},
|
|
187
|
+
(err, result) => {
|
|
188
|
+
if (err) {
|
|
189
|
+
return reject(err);
|
|
190
|
+
}
|
|
191
|
+
if (result && result.code !== code) {
|
|
192
|
+
return recursiveRemoveNonReferencedNodes(result.code).then(resolve, reject);
|
|
193
|
+
}
|
|
194
|
+
resolve({
|
|
195
|
+
code: result.code,
|
|
196
|
+
map: result.map
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/build/bundlerOptions.ts
|
|
204
|
+
function getBundlerOptionsBundler(entryFile, result) {
|
|
205
|
+
return rollup({
|
|
206
|
+
logLevel: "silent",
|
|
207
|
+
input: {
|
|
208
|
+
"bundler-config": entryFile
|
|
209
|
+
},
|
|
210
|
+
treeshake: "smallest",
|
|
211
|
+
plugins: [
|
|
212
|
+
tsConfigPaths(),
|
|
213
|
+
// transpile typescript to something we understand
|
|
214
|
+
esbuild({
|
|
215
|
+
target: "node20",
|
|
216
|
+
platform: "node",
|
|
217
|
+
minify: false
|
|
218
|
+
}),
|
|
219
|
+
commonjs2({
|
|
220
|
+
extensions: [".js", ".ts"],
|
|
221
|
+
strictRequires: "strict",
|
|
222
|
+
transformMixedEsModules: true,
|
|
223
|
+
ignoreTryCatch: false
|
|
224
|
+
}),
|
|
225
|
+
{
|
|
226
|
+
name: "get-bundler-config",
|
|
227
|
+
transform(code, id) {
|
|
228
|
+
if (id !== entryFile) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
return new Promise((resolve, reject) => {
|
|
232
|
+
babel.transform(
|
|
233
|
+
code,
|
|
234
|
+
{
|
|
235
|
+
babelrc: false,
|
|
236
|
+
configFile: false,
|
|
237
|
+
filename: id,
|
|
238
|
+
plugins: [removeAllOptionsExceptBundler(result)]
|
|
239
|
+
},
|
|
240
|
+
(err, result2) => {
|
|
241
|
+
if (err) {
|
|
242
|
+
return reject(err);
|
|
243
|
+
}
|
|
244
|
+
resolve({
|
|
245
|
+
code: result2.code,
|
|
246
|
+
map: result2.map
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
// let esbuild remove all unused imports
|
|
254
|
+
esbuild({
|
|
255
|
+
target: "node20",
|
|
256
|
+
platform: "node",
|
|
257
|
+
minify: false
|
|
258
|
+
}),
|
|
259
|
+
{
|
|
260
|
+
name: "cleanup",
|
|
261
|
+
transform(code, id) {
|
|
262
|
+
if (id !== entryFile) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
return recursiveRemoveNonReferencedNodes(code);
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
// let esbuild remove all unused imports
|
|
269
|
+
esbuild({
|
|
270
|
+
target: "node20",
|
|
271
|
+
platform: "node",
|
|
272
|
+
minify: false
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
async function getBundlerOptions(entryFile, outputDir) {
|
|
278
|
+
const result = {
|
|
279
|
+
hasCustomConfig: false
|
|
280
|
+
};
|
|
281
|
+
const bundle = await getBundlerOptionsBundler(entryFile, result);
|
|
282
|
+
await bundle.write({
|
|
283
|
+
dir: outputDir,
|
|
284
|
+
format: "es",
|
|
285
|
+
entryFileNames: "[name].mjs"
|
|
286
|
+
});
|
|
287
|
+
if (result.hasCustomConfig) {
|
|
288
|
+
return (await import(`file:${outputDir}/bundler-config.mjs`)).bundler;
|
|
289
|
+
}
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// src/build/analyze.ts
|
|
68
294
|
var globalExternals = [
|
|
69
295
|
"pino",
|
|
70
296
|
"pino-pretty",
|
|
@@ -136,7 +362,7 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
|
|
|
136
362
|
platform,
|
|
137
363
|
minify: false
|
|
138
364
|
}),
|
|
139
|
-
|
|
365
|
+
commonjs2({
|
|
140
366
|
strictRequires: "debug",
|
|
141
367
|
ignoreTryCatch: false,
|
|
142
368
|
transformMixedEsModules: true,
|
|
@@ -173,11 +399,12 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
|
|
|
173
399
|
}
|
|
174
400
|
return depsToOptimize;
|
|
175
401
|
}
|
|
176
|
-
async function bundleExternals(depsToOptimize, outputDir, logger) {
|
|
402
|
+
async function bundleExternals(depsToOptimize, outputDir, logger, customExternals) {
|
|
177
403
|
logger.info("Optimizing dependencies...");
|
|
178
404
|
logger.debug(
|
|
179
405
|
`${Array.from(depsToOptimize.keys()).map((key) => `- ${key}`).join("\n")}`
|
|
180
406
|
);
|
|
407
|
+
const allExternals = [...globalExternals, ...customExternals || []];
|
|
181
408
|
const reverseVirtualReferenceMap = /* @__PURE__ */ new Map();
|
|
182
409
|
const virtualDependencies = /* @__PURE__ */ new Map();
|
|
183
410
|
for (const [dep, exports] of depsToOptimize.entries()) {
|
|
@@ -213,7 +440,7 @@ async function bundleExternals(depsToOptimize, outputDir, logger) {
|
|
|
213
440
|
),
|
|
214
441
|
// this dependency breaks the build, so we need to exclude it
|
|
215
442
|
// TODO actually fix this so we don't need to exclude it
|
|
216
|
-
external:
|
|
443
|
+
external: allExternals,
|
|
217
444
|
treeshake: "smallest",
|
|
218
445
|
plugins: [
|
|
219
446
|
virtual(
|
|
@@ -225,7 +452,7 @@ async function bundleExternals(depsToOptimize, outputDir, logger) {
|
|
|
225
452
|
{}
|
|
226
453
|
)
|
|
227
454
|
),
|
|
228
|
-
|
|
455
|
+
commonjs2({
|
|
229
456
|
strictRequires: "strict",
|
|
230
457
|
transformMixedEsModules: true,
|
|
231
458
|
ignoreTryCatch: false
|
|
@@ -250,7 +477,7 @@ async function bundleExternals(depsToOptimize, outputDir, logger) {
|
|
|
250
477
|
const moduleResolveMap = {};
|
|
251
478
|
const filteredChunks = output.filter((o) => o.type === "chunk");
|
|
252
479
|
for (const o of filteredChunks.filter((o2) => o2.isEntry || o2.isDynamicEntry)) {
|
|
253
|
-
for (const external of
|
|
480
|
+
for (const external of allExternals) {
|
|
254
481
|
const importer = findExternalImporter(o, external, filteredChunks);
|
|
255
482
|
if (importer) {
|
|
256
483
|
const fullPath = join(outputDir, importer.fileName);
|
|
@@ -309,13 +536,15 @@ async function validateOutput({
|
|
|
309
536
|
async function analyzeBundle(entry, mastraEntry, outputDir, platform, logger) {
|
|
310
537
|
const isVirtualFile = entry.includes("\n") || !existsSync(entry);
|
|
311
538
|
const depsToOptimize = await analyze(entry, mastraEntry, isVirtualFile, platform, logger);
|
|
539
|
+
const customExternals = (await getBundlerOptions(mastraEntry, outputDir))?.externals;
|
|
312
540
|
const { output, reverseVirtualReferenceMap, usedExternals } = await bundleExternals(
|
|
313
541
|
depsToOptimize,
|
|
314
542
|
outputDir,
|
|
315
|
-
logger
|
|
543
|
+
logger,
|
|
544
|
+
customExternals
|
|
316
545
|
);
|
|
317
546
|
const result = await validateOutput({ output, reverseVirtualReferenceMap, usedExternals, outputDir }, logger);
|
|
318
547
|
return result;
|
|
319
548
|
}
|
|
320
549
|
|
|
321
|
-
export { aliasHono, analyzeBundle };
|
|
550
|
+
export { aliasHono, analyzeBundle, getBundlerOptions, recursiveRemoveNonReferencedNodes, removeAllOptionsFromMastraExcept };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
|
|
4
|
+
var babel = require('@babel/core');
|
|
5
|
+
var rollup = require('rollup');
|
|
6
|
+
var esbuild = require('rollup-plugin-esbuild');
|
|
7
|
+
var commonjs = require('@rollup/plugin-commonjs');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var babel__namespace = /*#__PURE__*/_interopNamespace(babel);
|
|
30
|
+
var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
|
|
31
|
+
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
32
|
+
|
|
33
|
+
// src/build/babel/remove-all-options-telemetry.ts
|
|
34
|
+
function removeAllOptionsExceptTelemetry(result) {
|
|
35
|
+
return chunkOJY5LJPT_cjs.removeAllOptionsFromMastraExcept(result, "telemetry");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/build/telemetry.ts
|
|
39
|
+
function getTelemetryBundler(entryFile, result) {
|
|
40
|
+
return rollup.rollup({
|
|
41
|
+
logLevel: "silent",
|
|
42
|
+
input: {
|
|
43
|
+
"telemetry-config": entryFile
|
|
44
|
+
},
|
|
45
|
+
treeshake: "smallest",
|
|
46
|
+
plugins: [
|
|
47
|
+
// transpile typescript to something we understand
|
|
48
|
+
esbuild__default.default({
|
|
49
|
+
target: "node20",
|
|
50
|
+
platform: "node",
|
|
51
|
+
minify: false
|
|
52
|
+
}),
|
|
53
|
+
commonjs__default.default({
|
|
54
|
+
extensions: [".js", ".ts"],
|
|
55
|
+
strictRequires: "strict",
|
|
56
|
+
transformMixedEsModules: true,
|
|
57
|
+
ignoreTryCatch: false
|
|
58
|
+
}),
|
|
59
|
+
{
|
|
60
|
+
name: "get-telemetry-config",
|
|
61
|
+
transform(code, id) {
|
|
62
|
+
if (id !== entryFile) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
return new Promise((resolve, reject) => {
|
|
66
|
+
babel__namespace.transform(
|
|
67
|
+
code,
|
|
68
|
+
{
|
|
69
|
+
babelrc: false,
|
|
70
|
+
configFile: false,
|
|
71
|
+
filename: id,
|
|
72
|
+
plugins: [removeAllOptionsExceptTelemetry(result)]
|
|
73
|
+
},
|
|
74
|
+
(err, result2) => {
|
|
75
|
+
if (err) {
|
|
76
|
+
return reject(err);
|
|
77
|
+
}
|
|
78
|
+
resolve({
|
|
79
|
+
code: result2.code,
|
|
80
|
+
map: result2.map
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
// let esbuild remove all unused imports
|
|
88
|
+
esbuild__default.default({
|
|
89
|
+
target: "node20",
|
|
90
|
+
platform: "node",
|
|
91
|
+
minify: false
|
|
92
|
+
}),
|
|
93
|
+
{
|
|
94
|
+
name: "cleanup",
|
|
95
|
+
transform(code, id) {
|
|
96
|
+
if (id !== entryFile) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
// let esbuild remove all unused imports
|
|
103
|
+
esbuild__default.default({
|
|
104
|
+
target: "node20",
|
|
105
|
+
platform: "node",
|
|
106
|
+
minify: false
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function writeTelemetryConfig(entryFile, outputDir) {
|
|
112
|
+
const result = {
|
|
113
|
+
hasCustomConfig: false
|
|
114
|
+
};
|
|
115
|
+
const bundle = await getTelemetryBundler(entryFile, result);
|
|
116
|
+
const { output } = await bundle.write({
|
|
117
|
+
dir: outputDir,
|
|
118
|
+
format: "es",
|
|
119
|
+
entryFileNames: "[name].mjs"
|
|
120
|
+
});
|
|
121
|
+
const externals = output[0].imports.filter((x) => !x.startsWith("./"));
|
|
122
|
+
return { ...result, externalDependencies: externals };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
exports.writeTelemetryConfig = writeTelemetryConfig;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkHHZDRBPV_cjs = require('./chunk-HHZDRBPV.cjs');
|
|
3
|
+
var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
|
|
5
4
|
var chunkIMGVLBV7_cjs = require('./chunk-IMGVLBV7.cjs');
|
|
6
5
|
var chunk54KOF3NB_cjs = require('./chunk-54KOF3NB.cjs');
|
|
7
6
|
var rollup = require('rollup');
|
|
@@ -49,7 +48,7 @@ async function getInputOptions2(entryFile, platform, env) {
|
|
|
49
48
|
// @ts-ignore
|
|
50
49
|
(plugin) => !plugin || !plugin?.name || plugin.name !== "node-resolve"
|
|
51
50
|
);
|
|
52
|
-
inputOptions.plugins.push(
|
|
51
|
+
inputOptions.plugins.push(chunkOJY5LJPT_cjs.aliasHono());
|
|
53
52
|
}
|
|
54
53
|
return inputOptions;
|
|
55
54
|
}
|
|
@@ -68,7 +67,7 @@ async function createWatcher(inputOptions, outputOptions) {
|
|
|
68
67
|
|
|
69
68
|
// src/build/babel/remove-all-options-server.ts
|
|
70
69
|
function removeAllOptionsExceptServer(result) {
|
|
71
|
-
return
|
|
70
|
+
return chunkOJY5LJPT_cjs.removeAllOptionsFromMastraExcept(result, "server");
|
|
72
71
|
}
|
|
73
72
|
function getServerOptionsBundler(entryFile, result) {
|
|
74
73
|
return rollup.rollup({
|
|
@@ -131,7 +130,7 @@ function getServerOptionsBundler(entryFile, result) {
|
|
|
131
130
|
if (id !== entryFile) {
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
134
|
-
return
|
|
133
|
+
return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
|
|
135
134
|
}
|
|
136
135
|
},
|
|
137
136
|
// let esbuild remove all unused imports
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkU7N6PH2I_cjs = require('./chunk-U7N6PH2I.cjs');
|
|
4
|
+
var chunkOJY5LJPT_cjs = require('./chunk-OJY5LJPT.cjs');
|
|
5
5
|
var chunk4VC5Z4YR_cjs = require('./chunk-4VC5Z4YR.cjs');
|
|
6
6
|
var babel = require('@babel/core');
|
|
7
7
|
var rollup = require('rollup');
|
|
@@ -33,7 +33,7 @@ var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
|
|
|
33
33
|
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
34
34
|
|
|
35
35
|
// src/deploy/base.ts
|
|
36
|
-
var Deployer = class extends
|
|
36
|
+
var Deployer = class extends chunkU7N6PH2I_cjs.Bundler {
|
|
37
37
|
deps = new chunk4VC5Z4YR_cjs.DepsService();
|
|
38
38
|
constructor(args) {
|
|
39
39
|
super(args.name, "DEPLOYER");
|
|
@@ -148,7 +148,7 @@ function getDeployerBundler(entryFile, result) {
|
|
|
148
148
|
if (id !== entryFile) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
return
|
|
151
|
+
return chunkOJY5LJPT_cjs.recursiveRemoveNonReferencedNodes(code);
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
// let esbuild remove all unused imports
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
2
|
-
import { recursiveRemoveNonReferencedNodes } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-SC6Y2LQ4.js';
|
|
2
|
+
import { recursiveRemoveNonReferencedNodes } from './chunk-W46BY5GT.js';
|
|
3
3
|
import { DepsService, FileService } from './chunk-UV4RQQ3R.js';
|
|
4
4
|
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-UV4RQQ3R.js';
|
|
5
5
|
import * as babel from '@babel/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.10.0",
|
|
3
|
+
"version": "0.10.1-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
"typescript": "^5.8.2",
|
|
128
128
|
"vitest": "^2.1.9",
|
|
129
129
|
"@internal/lint": "0.0.6",
|
|
130
|
-
"@mastra/
|
|
131
|
-
"@mastra/
|
|
130
|
+
"@mastra/mcp": "^0.10.0",
|
|
131
|
+
"@mastra/core": "0.10.1-alpha.0"
|
|
132
132
|
},
|
|
133
133
|
"peerDependencies": {
|
|
134
134
|
"@mastra/core": "^0.10.0"
|