@mastra/deployer 0.1.0-alpha.39 → 0.1.0-alpha.41

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.1.0-alpha.41
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b96376: fix pino of being null
8
+
9
+ ## 0.1.0-alpha.40
10
+
11
+ ### Patch Changes
12
+
13
+ - 8329f1a: Add debug env
14
+
3
15
  ## 0.1.0-alpha.39
4
16
 
5
17
  ### Patch Changes
@@ -1,2 +1,2 @@
1
- export { analyzeBundle } from '../chunk-L2SCZHP4.js';
1
+ export { analyzeBundle } from '../chunk-WXH2HMQ2.js';
2
2
  import '../chunk-YNXJO2XU.js';
@@ -1,2 +1,2 @@
1
- export { createBundler, getInputOptions } from '../chunk-ODEOQDHZ.js';
1
+ export { createBundler, getInputOptions } from '../chunk-RCYKCEGL.js';
2
2
  import '../chunk-YNXJO2XU.js';
@@ -1,5 +1,5 @@
1
- export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-DKKDXWES.js';
1
+ export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-JG3X44WH.js';
2
2
  export { Deps } from '../chunk-Q3WKR6OZ.js';
3
- export { analyzeBundle } from '../chunk-L2SCZHP4.js';
4
- export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-ODEOQDHZ.js';
3
+ export { analyzeBundle } from '../chunk-WXH2HMQ2.js';
4
+ export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-RCYKCEGL.js';
5
5
  import '../chunk-YNXJO2XU.js';
@@ -1,5 +1,5 @@
1
- export { Bundler } from '../chunk-E3NXSEZQ.js';
1
+ export { Bundler } from '../chunk-EDV35Q7R.js';
2
2
  import '../chunk-Q3WKR6OZ.js';
3
- import '../chunk-L2SCZHP4.js';
4
- import '../chunk-ODEOQDHZ.js';
3
+ import '../chunk-WXH2HMQ2.js';
4
+ import '../chunk-RCYKCEGL.js';
5
5
  import '../chunk-YNXJO2XU.js';
@@ -1,6 +1,6 @@
1
1
  import { Deps } from './chunk-Q3WKR6OZ.js';
2
- import { analyzeBundle } from './chunk-L2SCZHP4.js';
3
- import { createBundler, getInputOptions } from './chunk-ODEOQDHZ.js';
2
+ import { analyzeBundle } from './chunk-WXH2HMQ2.js';
3
+ import { createBundler, getInputOptions } from './chunk-RCYKCEGL.js';
4
4
  import { MastraBundler } from '@mastra/core/bundler';
5
5
  import virtual from '@rollup/plugin-virtual';
6
6
  import { ensureDir } from 'fs-extra';
@@ -1,5 +1,5 @@
1
- import { aliasHono } from './chunk-L2SCZHP4.js';
2
- import { getInputOptions, telemetryFix, libSqlFix } from './chunk-ODEOQDHZ.js';
1
+ import { aliasHono } from './chunk-WXH2HMQ2.js';
2
+ import { getInputOptions, telemetryFix, libSqlFix } from './chunk-RCYKCEGL.js';
3
3
  import { removeDeployer } from './chunk-YNXJO2XU.js';
4
4
  import alias from '@rollup/plugin-alias';
5
5
  import commonjs from '@rollup/plugin-commonjs';
@@ -160,7 +160,7 @@ async function getInputOptions(entryFile, analyzedBundleInfo, platform2) {
160
160
  browser: true
161
161
  });
162
162
  return {
163
- logLevel: "silent",
163
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === "true" ? "debug" : "silent",
164
164
  treeshake: true,
165
165
  preserveSymlinks: true,
166
166
  external: Array.from(analyzedBundleInfo.externalDependencies),
@@ -52,20 +52,22 @@ function pino() {
52
52
  async resolveId(id, importee) {
53
53
  if (id === "pino") {
54
54
  const resolvedPino = await this.resolve(id, importee);
55
- await Promise.all(
56
- workerFiles.map(async (file) => {
57
- const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
58
- if (!resolvedEntry) {
59
- return null;
60
- }
61
- const reference = this.emitFile({
62
- type: "chunk",
63
- id: resolvedEntry.id,
64
- name: `${file.file}`
65
- });
66
- fileReferences.set(file.id, reference);
67
- })
68
- );
55
+ if (resolvedPino) {
56
+ await Promise.all(
57
+ workerFiles.map(async (file) => {
58
+ const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
59
+ if (!resolvedEntry) {
60
+ return null;
61
+ }
62
+ const reference = this.emitFile({
63
+ type: "chunk",
64
+ id: resolvedEntry.id,
65
+ name: `${file.file}`
66
+ });
67
+ fileReferences.set(file.id, reference);
68
+ })
69
+ );
70
+ }
69
71
  }
70
72
  },
71
73
  renderChunk(code, chunk) {
@@ -108,7 +110,7 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
108
110
  entry = "#entry";
109
111
  }
110
112
  const optimizerBundler = await rollup({
111
- logLevel: "silent",
113
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === "true" ? "debug" : "silent",
112
114
  input: isVirtualFile ? "#entry" : entry,
113
115
  treeshake: true,
114
116
  preserveSymlinks: true,
@@ -150,7 +152,6 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
150
152
  depsToOptimize.delete(dep);
151
153
  }
152
154
  }
153
- depsToOptimize.set("@hono/node-server", ["serve"]);
154
155
  return depsToOptimize;
155
156
  }
156
157
  async function bundleExternals(depsToOptimize, outputDir, logger) {
@@ -169,7 +170,7 @@ async function bundleExternals(depsToOptimize, outputDir, logger) {
169
170
  });
170
171
  }
171
172
  const bundler = await rollup({
172
- logLevel: "silent",
173
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === "true" ? "debug" : "silent",
173
174
  input: Array.from(virtualDependencies.entries()).reduce(
174
175
  (acc, [dep, virtualDep]) => {
175
176
  acc[virtualDep.name] = `#virtual-${dep}`;
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { FileService } from './chunk-DKKDXWES.js';
2
- export { FileService, getBundler, getWatcher } from './chunk-DKKDXWES.js';
3
- import { Bundler } from './chunk-E3NXSEZQ.js';
1
+ import { FileService } from './chunk-JG3X44WH.js';
2
+ export { FileService, getBundler, getWatcher } from './chunk-JG3X44WH.js';
3
+ import { Bundler } from './chunk-EDV35Q7R.js';
4
4
  import { Deps } from './chunk-Q3WKR6OZ.js';
5
5
  export { Deps, createChildProcessLogger, createPinoStream } from './chunk-Q3WKR6OZ.js';
6
- import './chunk-L2SCZHP4.js';
7
- import './chunk-ODEOQDHZ.js';
6
+ import './chunk-WXH2HMQ2.js';
7
+ import './chunk-RCYKCEGL.js';
8
8
  import './chunk-YNXJO2XU.js';
9
9
  import '@mastra/core/deployer';
10
10
  import * as babel from '@babel/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.1.0-alpha.39",
3
+ "version": "0.1.0-alpha.41",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -41,7 +41,7 @@ async function analyze(
41
41
  }
42
42
 
43
43
  const optimizerBundler = await rollup({
44
- logLevel: 'silent',
44
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === 'true' ? 'debug' : 'silent',
45
45
  input: isVirtualFile ? '#entry' : entry,
46
46
  treeshake: true,
47
47
  preserveSymlinks: true,
@@ -87,8 +87,6 @@ async function analyze(
87
87
  }
88
88
  }
89
89
 
90
- // todo fix, coulds should add it itself but somehow doesnt
91
- depsToOptimize.set('@hono/node-server', ['serve']);
92
90
  return depsToOptimize;
93
91
  }
94
92
 
@@ -121,7 +119,7 @@ async function bundleExternals(depsToOptimize: Map<string, string[]>, outputDir:
121
119
  }
122
120
 
123
121
  const bundler = await rollup({
124
- logLevel: 'silent',
122
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === 'true' ? 'debug' : 'silent',
125
123
  input: Array.from(virtualDependencies.entries()).reduce(
126
124
  (acc, [dep, virtualDep]) => {
127
125
  acc[virtualDep.name] = `#virtual-${dep}`;
@@ -30,7 +30,7 @@ export async function getInputOptions(
30
30
  });
31
31
 
32
32
  return {
33
- logLevel: 'silent',
33
+ logLevel: process.env.MASTRA_BUNDLER_DEBUG === 'true' ? 'debug' : 'silent',
34
34
  treeshake: true,
35
35
  preserveSymlinks: true,
36
36
  external: Array.from(analyzedBundleInfo.externalDependencies),
@@ -32,23 +32,25 @@ export function pino() {
32
32
  // resolve pino first
33
33
  const resolvedPino = await this.resolve(id, importee);
34
34
 
35
- await Promise.all(
36
- workerFiles.map(async file => {
37
- const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
35
+ if (resolvedPino) {
36
+ await Promise.all(
37
+ workerFiles.map(async file => {
38
+ const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
38
39
 
39
- if (!resolvedEntry) {
40
- return null;
41
- }
40
+ if (!resolvedEntry) {
41
+ return null;
42
+ }
42
43
 
43
- const reference = this.emitFile({
44
- type: 'chunk',
45
- id: resolvedEntry.id,
46
- name: `${file.file}`,
47
- });
44
+ const reference = this.emitFile({
45
+ type: 'chunk',
46
+ id: resolvedEntry.id,
47
+ name: `${file.file}`,
48
+ });
48
49
 
49
- fileReferences.set(file.id, reference);
50
- }),
51
- );
50
+ fileReferences.set(file.id, reference);
51
+ }),
52
+ );
53
+ }
52
54
  }
53
55
  },
54
56
  renderChunk(code, chunk) {