@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.
@@ -1,29 +1,29 @@
1
1
 
2
- > @mastra/deployer@0.1.4 build /home/runner/work/mastra/mastra/packages/deployer
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
  CLI 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
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.3.6
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 10930ms
9
+ TSC ⚡️ Build success in 18431ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.7.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.ts
14
- DTS ⚡️ Build success in 4842ms
14
+ DTS ⚡️ Build success in 7935ms
15
15
  CLI Cleaning output folder
16
16
  ESM Build start
17
- ESM dist/index.js 3.72 KB
17
+ ESM dist/index.js 3.70 KB
18
18
  ESM dist/build/analyze.js 85.00 B
19
19
  ESM dist/build/bundler.js 102.00 B
20
20
  ESM dist/build/index.js 383.00 B
21
+ ESM dist/chunk-BTUQ6UBB.js 7.41 KB
21
22
  ESM dist/bundler/index.js 172.00 B
22
- ESM dist/chunk-S6JYNXAW.js 4.40 KB
23
- ESM dist/chunk-AXS5WSIK.js 8.23 KB
24
- ESM dist/chunk-Z3IHWUWI.js 8.13 KB
25
- ESM dist/chunk-YNXJO2XU.js 2.08 KB
26
- ESM dist/chunk-2S4LOARP.js 7.41 KB
23
+ ESM dist/chunk-IHPQAB7O.js 4.40 KB
27
24
  ESM dist/chunk-KXS4XYEJ.js 7.20 KB
28
- ESM dist/server/index.js 148.14 KB
29
- ESM ⚡️ Build success in 1544ms
25
+ ESM dist/chunk-SESHBX76.js 8.25 KB
26
+ ESM dist/chunk-YNXJO2XU.js 2.08 KB
27
+ ESM dist/chunk-AXS5WSIK.js 8.23 KB
28
+ ESM dist/server/index.js 148.19 KB
29
+ ESM ⚡️ 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
 
@@ -1,2 +1,2 @@
1
- export { analyzeBundle } from '../chunk-Z3IHWUWI.js';
1
+ export { analyzeBundle } from '../chunk-SESHBX76.js';
2
2
  import '../chunk-YNXJO2XU.js';
@@ -1,5 +1,5 @@
1
- export { getBundler_alias_2 as getBundler } from '../_tsup-dts-rollup.js';
2
- export { getWatcher_alias_2 as getWatcher } from '../_tsup-dts-rollup.js';
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';
@@ -1,5 +1,5 @@
1
- export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-2S4LOARP.js';
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-Z3IHWUWI.js';
3
+ export { analyzeBundle } from '../chunk-SESHBX76.js';
4
4
  export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-KXS4XYEJ.js';
5
5
  import '../chunk-YNXJO2XU.js';
@@ -1,5 +1,5 @@
1
- export { Bundler } from '../chunk-S6JYNXAW.js';
1
+ export { Bundler } from '../chunk-IHPQAB7O.js';
2
2
  import '../chunk-AXS5WSIK.js';
3
- import '../chunk-Z3IHWUWI.js';
3
+ import '../chunk-SESHBX76.js';
4
4
  import '../chunk-KXS4XYEJ.js';
5
5
  import '../chunk-YNXJO2XU.js';
@@ -1,4 +1,4 @@
1
- import { aliasHono } from './chunk-Z3IHWUWI.js';
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-Z3IHWUWI.js';
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
- if (dep === "@mastra/core/telemetry" && exports.length === 1 && exports[0] === "*") {
168
- virtualDependencies.set(dep, {
169
- name,
170
- virtual: `export * as telemetry from '${dep}';`
171
- });
172
- } else {
173
- virtualDependencies.set(dep, {
174
- name,
175
- virtual: `export { ${exports.join(", ")} } from '${dep}';`
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
@@ -1,5 +1,3 @@
1
- export { getBundler } from './_tsup-dts-rollup.js';
2
- export { getWatcher } from './_tsup-dts-rollup.js';
3
1
  export { Deps } from './_tsup-dts-rollup.js';
4
2
  export { FileService } from './_tsup-dts-rollup.js';
5
3
  export { getDeployer } from './_tsup-dts-rollup.js';
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { FileService } from './chunk-2S4LOARP.js';
2
- export { FileService, getBundler, getWatcher } from './chunk-2S4LOARP.js';
3
- import { Bundler } from './chunk-S6JYNXAW.js';
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-Z3IHWUWI.js';
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';
@@ -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.4",
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",
@@ -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
- // temporary fix for * import of telemetry, move ast checks???
117
- if (dep === '@mastra/core/telemetry' && exports.length === 1 && exports[0] === '*') {
118
- virtualDependencies.set(dep, {
119
- name,
120
- virtual: `export * as telemetry from '${dep}';`,
121
- });
122
- } else {
123
- virtualDependencies.set(dep, {
124
- name,
125
- virtual: `export { ${exports.join(', ')} } from '${dep}';`,
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
@@ -1,3 +1,3 @@
1
1
  export * from './deploy';
2
- export { getBundler, getWatcher, Deps, FileService } from './build';
2
+ export { Deps, FileService } from './build';
3
3
  export { getDeployer } from './build/deployer';
@@ -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
- sendUsage: true,
166
- sendReasoning: true,
167
- getErrorMessage: (error: any) => {
168
- return `An error occurred while processing your request. ${error}`;
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) {