@mastra/deployer 0.1.4 → 0.1.5-alpha.2
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +22 -0
- package/dist/_tsup-dts-rollup.d.ts +0 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/index.d.ts +2 -2
- package/dist/build/index.js +2 -2
- package/dist/bundler/index.js +2 -2
- package/dist/{chunk-2S4LOARP.js → chunk-BTUQ6UBB.js} +1 -1
- package/dist/{chunk-S6JYNXAW.js → chunk-IHPQAB7O.js} +1 -1
- package/dist/{chunk-Z3IHWUWI.js → chunk-SESHBX76.js} +15 -10
- package/dist/index.d.ts +0 -2
- package/dist/index.js +4 -4
- package/dist/server/index.js +1 -1
- package/package.json +2 -2
- package/src/build/analyze.ts +17 -11
- package/src/index.ts +1 -1
- package/src/server/handlers/agents.ts +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/deployer@0.1.
|
|
2
|
+
> @mastra/deployer@0.1.5-alpha.2 build /home/runner/work/mastra/mastra/packages/deployer
|
|
3
3
|
> tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts --format esm --clean --experimental-dts --treeshake --publicDir
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/build/analyze.ts, src/build/bundler.ts, src/build/index.ts, src/bundler/index.ts, src/server/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.3.6
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 18431ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 7935ms
|
|
15
15
|
[34mCLI[39m Cleaning output folder
|
|
16
16
|
[34mESM[39m Build start
|
|
17
|
-
[32mESM[39m [1mdist/index.js [22m[32m3.
|
|
17
|
+
[32mESM[39m [1mdist/index.js [22m[32m3.70 KB[39m
|
|
18
18
|
[32mESM[39m [1mdist/build/analyze.js [22m[32m85.00 B[39m
|
|
19
19
|
[32mESM[39m [1mdist/build/bundler.js [22m[32m102.00 B[39m
|
|
20
20
|
[32mESM[39m [1mdist/build/index.js [22m[32m383.00 B[39m
|
|
21
|
+
[32mESM[39m [1mdist/chunk-BTUQ6UBB.js [22m[32m7.41 KB[39m
|
|
21
22
|
[32mESM[39m [1mdist/bundler/index.js [22m[32m172.00 B[39m
|
|
22
|
-
[32mESM[39m [1mdist/chunk-
|
|
23
|
-
[32mESM[39m [1mdist/chunk-AXS5WSIK.js [22m[32m8.23 KB[39m
|
|
24
|
-
[32mESM[39m [1mdist/chunk-Z3IHWUWI.js [22m[32m8.13 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/chunk-YNXJO2XU.js [22m[32m2.08 KB[39m
|
|
26
|
-
[32mESM[39m [1mdist/chunk-2S4LOARP.js [22m[32m7.41 KB[39m
|
|
23
|
+
[32mESM[39m [1mdist/chunk-IHPQAB7O.js [22m[32m4.40 KB[39m
|
|
27
24
|
[32mESM[39m [1mdist/chunk-KXS4XYEJ.js [22m[32m7.20 KB[39m
|
|
28
|
-
[32mESM[39m [1mdist/
|
|
29
|
-
[32mESM[39m
|
|
25
|
+
[32mESM[39m [1mdist/chunk-SESHBX76.js [22m[32m8.25 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/chunk-YNXJO2XU.js [22m[32m2.08 KB[39m
|
|
27
|
+
[32mESM[39m [1mdist/chunk-AXS5WSIK.js [22m[32m8.23 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/server/index.js [22m[32m148.19 KB[39m
|
|
29
|
+
[32mESM[39m ⚡️ Build success in 2619ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.1.5-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6cb63e0]
|
|
8
|
+
- @mastra/core@0.4.2-alpha.1
|
|
9
|
+
|
|
10
|
+
## 0.1.5-alpha.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 2d68431: Fix mastra server error processing
|
|
15
|
+
|
|
16
|
+
## 0.1.5-alpha.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- e4ee56c: Enable \* imports in analyze bundle
|
|
21
|
+
- Updated dependencies [7fceae1]
|
|
22
|
+
- Updated dependencies [f626fbb]
|
|
23
|
+
- @mastra/core@0.4.2-alpha.0
|
|
24
|
+
|
|
3
25
|
## 0.1.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -220,7 +220,6 @@ declare function getBundler(inputOptions: NormalizedInputOptions, args?: {
|
|
|
220
220
|
}): Promise<RollupBuild>;
|
|
221
221
|
export { getBundler }
|
|
222
222
|
export { getBundler as getBundler_alias_1 }
|
|
223
|
-
export { getBundler as getBundler_alias_2 }
|
|
224
223
|
|
|
225
224
|
declare function getDeployer(entryFile: string, outputDir: string): Promise<MastraDeployer>;
|
|
226
225
|
export { getDeployer }
|
|
@@ -266,7 +265,6 @@ declare function getWatcher(inputOptions: NormalizedInputOptions, args?: {
|
|
|
266
265
|
}): Promise<RollupWatcher>;
|
|
267
266
|
export { getWatcher }
|
|
268
267
|
export { getWatcher as getWatcher_alias_1 }
|
|
269
|
-
export { getWatcher as getWatcher_alias_2 }
|
|
270
268
|
|
|
271
269
|
export declare function getWorkflowByIdHandler(c: Context): Promise<Response>;
|
|
272
270
|
|
package/dist/build/analyze.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { analyzeBundle } from '../chunk-
|
|
1
|
+
export { analyzeBundle } from '../chunk-SESHBX76.js';
|
|
2
2
|
import '../chunk-YNXJO2XU.js';
|
package/dist/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { getBundler_alias_1 as getBundler } from '../_tsup-dts-rollup.js';
|
|
2
|
+
export { getWatcher_alias_1 as getWatcher } from '../_tsup-dts-rollup.js';
|
|
3
3
|
export { createBundler_alias_1 as createBundler } from '../_tsup-dts-rollup.js';
|
|
4
4
|
export { getBundlerInputOptions } from '../_tsup-dts-rollup.js';
|
|
5
5
|
export { createWatcher } from '../_tsup-dts-rollup.js';
|
package/dist/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-
|
|
1
|
+
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-BTUQ6UBB.js';
|
|
2
2
|
export { Deps, writeTelemetryConfig } from '../chunk-AXS5WSIK.js';
|
|
3
|
-
export { analyzeBundle } from '../chunk-
|
|
3
|
+
export { analyzeBundle } from '../chunk-SESHBX76.js';
|
|
4
4
|
export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-KXS4XYEJ.js';
|
|
5
5
|
import '../chunk-YNXJO2XU.js';
|
package/dist/bundler/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aliasHono } from './chunk-
|
|
1
|
+
import { aliasHono } from './chunk-SESHBX76.js';
|
|
2
2
|
import { getInputOptions, telemetryFix, libSqlFix } from './chunk-KXS4XYEJ.js';
|
|
3
3
|
import { removeDeployer } from './chunk-YNXJO2XU.js';
|
|
4
4
|
import alias from '@rollup/plugin-alias';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Deps, writeTelemetryConfig } from './chunk-AXS5WSIK.js';
|
|
2
|
-
import { analyzeBundle } from './chunk-
|
|
2
|
+
import { analyzeBundle } from './chunk-SESHBX76.js';
|
|
3
3
|
import { createBundler, getInputOptions } from './chunk-KXS4XYEJ.js';
|
|
4
4
|
import { MastraBundler } from '@mastra/core/bundler';
|
|
5
5
|
import virtual from '@rollup/plugin-virtual';
|
|
@@ -164,17 +164,22 @@ async function bundleExternals(depsToOptimize, outputDir, logger) {
|
|
|
164
164
|
for (const [dep, exports] of depsToOptimize.entries()) {
|
|
165
165
|
const name = dep.replaceAll("/", "-");
|
|
166
166
|
reverseVirtualReferenceMap.set(name, dep);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
167
|
+
const virtualFile = [];
|
|
168
|
+
let exportStringBuilder = [];
|
|
169
|
+
for (const local of exports) {
|
|
170
|
+
if (local === "*") {
|
|
171
|
+
virtualFile.push(`export * from '${dep}';`);
|
|
172
|
+
} else {
|
|
173
|
+
exportStringBuilder.push(local);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (exportStringBuilder.length > 0) {
|
|
177
|
+
virtualFile.push(`export { ${exportStringBuilder.join(", ")} } from '${dep}';`);
|
|
177
178
|
}
|
|
179
|
+
virtualDependencies.set(dep, {
|
|
180
|
+
name,
|
|
181
|
+
virtual: virtualFile.join("\n")
|
|
182
|
+
});
|
|
178
183
|
}
|
|
179
184
|
const bundler = await rollup({
|
|
180
185
|
logLevel: process.env.MASTRA_BUNDLER_DEBUG === "true" ? "debug" : "silent",
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FileService } from './chunk-
|
|
2
|
-
export { FileService
|
|
3
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { FileService } from './chunk-BTUQ6UBB.js';
|
|
2
|
+
export { FileService } from './chunk-BTUQ6UBB.js';
|
|
3
|
+
import { Bundler } from './chunk-IHPQAB7O.js';
|
|
4
4
|
import { Deps } from './chunk-AXS5WSIK.js';
|
|
5
5
|
export { Deps, createChildProcessLogger, createPinoStream } from './chunk-AXS5WSIK.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-SESHBX76.js';
|
|
7
7
|
import './chunk-KXS4XYEJ.js';
|
|
8
8
|
import './chunk-YNXJO2XU.js';
|
|
9
9
|
import * as babel from '@babel/core';
|
package/dist/server/index.js
CHANGED
|
@@ -2926,7 +2926,7 @@ async function streamGenerateHandler(c2) {
|
|
|
2926
2926
|
sendUsage: true,
|
|
2927
2927
|
sendReasoning: true,
|
|
2928
2928
|
getErrorMessage: (error) => {
|
|
2929
|
-
return `An error occurred while processing your request. ${error}`;
|
|
2929
|
+
return `An error occurred while processing your request. ${error instanceof Error ? error.message : JSON.stringify(error)}`;
|
|
2930
2930
|
}
|
|
2931
2931
|
});
|
|
2932
2932
|
return streamResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
53
53
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
54
54
|
"zod": "^3.24.1",
|
|
55
|
-
"@mastra/core": "^0.4.1"
|
|
55
|
+
"@mastra/core": "^0.4.2-alpha.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@hono/node-server": "^1.13.7",
|
package/src/build/analyze.ts
CHANGED
|
@@ -113,18 +113,24 @@ async function bundleExternals(depsToOptimize: Map<string, string[]>, outputDir:
|
|
|
113
113
|
const name = dep.replaceAll('/', '-');
|
|
114
114
|
reverseVirtualReferenceMap.set(name, dep);
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
116
|
+
const virtualFile: string[] = [];
|
|
117
|
+
let exportStringBuilder = [];
|
|
118
|
+
for (const local of exports) {
|
|
119
|
+
if (local === '*') {
|
|
120
|
+
virtualFile.push(`export * from '${dep}';`);
|
|
121
|
+
} else {
|
|
122
|
+
exportStringBuilder.push(local);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (exportStringBuilder.length > 0) {
|
|
127
|
+
virtualFile.push(`export { ${exportStringBuilder.join(', ')} } from '${dep}';`);
|
|
127
128
|
}
|
|
129
|
+
|
|
130
|
+
virtualDependencies.set(dep, {
|
|
131
|
+
name,
|
|
132
|
+
virtual: virtualFile.join('\n'),
|
|
133
|
+
});
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
const bundler = await rollup({
|
package/src/index.ts
CHANGED
|
@@ -162,12 +162,12 @@ export async function streamGenerateHandler(c: Context): Promise<Response | unde
|
|
|
162
162
|
const streamResponse = output
|
|
163
163
|
? streamResult.toTextStreamResponse()
|
|
164
164
|
: streamResult.toDataStreamResponse({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
sendUsage: true,
|
|
166
|
+
sendReasoning: true,
|
|
167
|
+
getErrorMessage: (error: any) => {
|
|
168
|
+
return `An error occurred while processing your request. ${error instanceof Error ? error.message : JSON.stringify(error)}`;
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
171
|
|
|
172
172
|
return streamResponse;
|
|
173
173
|
} catch (error) {
|