@mastra/deployer 0.23.3 → 0.24.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/build/analyze/analyzeEntry.d.ts +2 -1
  3. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -1
  4. package/dist/build/analyze/constants.d.ts.map +1 -1
  5. package/dist/build/analyze.cjs +2 -2
  6. package/dist/build/analyze.js +1 -1
  7. package/dist/build/bundler.cjs +3 -3
  8. package/dist/build/bundler.js +1 -1
  9. package/dist/build/index.cjs +12 -12
  10. package/dist/build/index.js +4 -4
  11. package/dist/bundler/index.cjs +2 -2
  12. package/dist/bundler/index.js +1 -1
  13. package/dist/{chunk-HPIEW72C.cjs → chunk-AJX72IGP.cjs} +5 -5
  14. package/dist/{chunk-HPIEW72C.cjs.map → chunk-AJX72IGP.cjs.map} +1 -1
  15. package/dist/{chunk-BS2NS3OF.js → chunk-B2Q76NIL.js} +3 -3
  16. package/dist/{chunk-BS2NS3OF.js.map → chunk-B2Q76NIL.js.map} +1 -1
  17. package/dist/{chunk-S5UMATJZ.js → chunk-CVRN2K4O.js} +21 -11
  18. package/dist/chunk-CVRN2K4O.js.map +1 -0
  19. package/dist/{chunk-X4PRG273.js → chunk-FD5X42ZU.js} +4 -4
  20. package/dist/{chunk-X4PRG273.js.map → chunk-FD5X42ZU.js.map} +1 -1
  21. package/dist/{chunk-WVZENB5V.cjs → chunk-IAEJ3C3J.cjs} +21 -11
  22. package/dist/chunk-IAEJ3C3J.cjs.map +1 -0
  23. package/dist/{chunk-NMOPG6KM.cjs → chunk-NSINCI76.cjs} +9 -9
  24. package/dist/{chunk-NMOPG6KM.cjs.map → chunk-NSINCI76.cjs.map} +1 -1
  25. package/dist/{chunk-7TQIPPJV.cjs → chunk-OART5HV7.cjs} +15 -15
  26. package/dist/{chunk-7TQIPPJV.cjs.map → chunk-OART5HV7.cjs.map} +1 -1
  27. package/dist/{chunk-BTSMIAV6.js → chunk-VDRZB7JQ.js} +5 -5
  28. package/dist/{chunk-BTSMIAV6.js.map → chunk-VDRZB7JQ.js.map} +1 -1
  29. package/dist/{chunk-F54BDKO2.js → chunk-XHLN6E4D.js} +3 -3
  30. package/dist/{chunk-F54BDKO2.js.map → chunk-XHLN6E4D.js.map} +1 -1
  31. package/dist/{chunk-OVVFXLQK.cjs → chunk-Z546LAA6.cjs} +14 -14
  32. package/dist/{chunk-OVVFXLQK.cjs.map → chunk-Z546LAA6.cjs.map} +1 -1
  33. package/dist/index.cjs +5 -5
  34. package/dist/index.js +2 -2
  35. package/dist/server/handlers/auth/defaults.d.ts.map +1 -1
  36. package/dist/server/handlers/routes/agents/handlers.d.ts +1 -10
  37. package/dist/server/handlers/routes/agents/handlers.d.ts.map +1 -1
  38. package/dist/server/handlers/routes/agents/router.d.ts.map +1 -1
  39. package/dist/server/handlers/routes/memory/handlers.d.ts.map +1 -1
  40. package/dist/server/handlers/utils.d.ts +0 -7
  41. package/dist/server/handlers/utils.d.ts.map +1 -1
  42. package/dist/server/index.cjs +267 -248
  43. package/dist/server/index.cjs.map +1 -1
  44. package/dist/server/index.d.ts.map +1 -1
  45. package/dist/server/index.js +268 -249
  46. package/dist/server/index.js.map +1 -1
  47. package/package.json +7 -7
  48. package/dist/chunk-S5UMATJZ.js.map +0 -1
  49. package/dist/chunk-WVZENB5V.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Update peer dependencies to match core package version bump (0.23.4) ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
8
+
9
+ ### Patch Changes
10
+
11
+ - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
12
+
13
+ - Improve analyze recursion in bundler when using monorepos ([#9520](https://github.com/mastra-ai/mastra/pull/9520))
14
+
15
+ - Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
16
+
17
+ - Make sure external deps are built with side-effects. Fixes an issue with reflect-metadata #7328 ([#9733](https://github.com/mastra-ai/mastra/pull/9733))
18
+
19
+ - Remove unused /model-providers API ([#9554](https://github.com/mastra-ai/mastra/pull/9554))
20
+
21
+ - Fix undefined runtimeContext using memory from playground ([#9548](https://github.com/mastra-ai/mastra/pull/9548))
22
+
23
+ - Add readable-streams to global externals, not compatible with CJS compilation ([#9738](https://github.com/mastra-ai/mastra/pull/9738))
24
+
25
+ - fix: add /api route to default public routes to allow unauthenticated ([#9731](https://github.com/mastra-ai/mastra/pull/9731))
26
+ access
27
+
28
+ The /api route was returning 401 instead of 200 because it was being caught
29
+ by the /api/_ protected pattern. Adding it to the default public routes
30
+ ensures the root API endpoint is accessible without authentication while
31
+ keeping /api/_ routes protected.
32
+
33
+ - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`6d7e90d`](https://github.com/mastra-ai/mastra/commit/6d7e90db09713e6250f4d6c3d3cff1b4740e50f9), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`f78b908`](https://github.com/mastra-ai/mastra/commit/f78b9080e11af765969b36b4a619761056030840), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`186b29b`](https://github.com/mastra-ai/mastra/commit/186b29bd51ac1dcc24ad3825fdb7207a6d6391a6), [`e365eda`](https://github.com/mastra-ai/mastra/commit/e365eda45795b43707310531cac1e2ce4e5a0712)]:
34
+ - @mastra/server@0.24.0
35
+ - @mastra/core@0.24.0
36
+
37
+ ## 0.24.0-alpha.0
38
+
39
+ ### Minor Changes
40
+
41
+ - Update peer dependencies to match core package version bump (0.23.4) ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
42
+
43
+ ### Patch Changes
44
+
45
+ - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
46
+
47
+ - Improve analyze recursion in bundler when using monorepos ([#9520](https://github.com/mastra-ai/mastra/pull/9520))
48
+
49
+ - Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
50
+
51
+ - Make sure external deps are built with side-effects. Fixes an issue with reflect-metadata #7328 ([#9733](https://github.com/mastra-ai/mastra/pull/9733))
52
+
53
+ - Remove unused /model-providers API ([#9554](https://github.com/mastra-ai/mastra/pull/9554))
54
+
55
+ - Fix undefined runtimeContext using memory from playground ([#9548](https://github.com/mastra-ai/mastra/pull/9548))
56
+
57
+ - Add readable-streams to global externals, not compatible with CJS compilation ([#9738](https://github.com/mastra-ai/mastra/pull/9738))
58
+
59
+ - fix: add /api route to default public routes to allow unauthenticated ([#9731](https://github.com/mastra-ai/mastra/pull/9731))
60
+ access
61
+
62
+ The /api route was returning 401 instead of 200 because it was being caught
63
+ by the /api/_ protected pattern. Adding it to the default public routes
64
+ ensures the root API endpoint is accessible without authentication while
65
+ keeping /api/_ routes protected.
66
+
67
+ - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`6d7e90d`](https://github.com/mastra-ai/mastra/commit/6d7e90db09713e6250f4d6c3d3cff1b4740e50f9), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`f78b908`](https://github.com/mastra-ai/mastra/commit/f78b9080e11af765969b36b4a619761056030840), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`186b29b`](https://github.com/mastra-ai/mastra/commit/186b29bd51ac1dcc24ad3825fdb7207a6d6391a6), [`e365eda`](https://github.com/mastra-ai/mastra/commit/e365eda45795b43707310531cac1e2ce4e5a0712)]:
68
+ - @mastra/server@0.24.0-alpha.0
69
+ - @mastra/core@0.24.0-alpha.0
70
+
3
71
  ## 0.23.3
4
72
 
5
73
  ### Patch Changes
@@ -18,11 +18,12 @@ import type { DependencyMetadata } from '../types.js';
18
18
  export declare function analyzeEntry({ entry, isVirtualFile, }: {
19
19
  entry: string;
20
20
  isVirtualFile: boolean;
21
- }, mastraEntry: string, { logger, sourcemapEnabled, workspaceMap, projectRoot, }: {
21
+ }, mastraEntry: string, { logger, sourcemapEnabled, workspaceMap, projectRoot, initialDepsToOptimize, }: {
22
22
  logger: IMastraLogger;
23
23
  sourcemapEnabled: boolean;
24
24
  workspaceMap: Map<string, WorkspacePackageInfo>;
25
25
  projectRoot: string;
26
+ initialDepsToOptimize?: Map<string, DependencyMetadata>;
26
27
  }): Promise<{
27
28
  dependencies: Map<string, DependencyMetadata>;
28
29
  output: {
@@ -1 +1 @@
1
- {"version":3,"file":"analyzeEntry.d.ts","sourceRoot":"","sources":["../../../src/build/analyze/analyzeEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKrE,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAO/E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA8LnD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,EACE,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB,EACD,WAAW,EAAE,MAAM,EACnB,EACE,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;CACrB,GACA,OAAO,CAAC;IACT,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC9C,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;KACvB,CAAC;CACH,CAAC,CA4BD"}
1
+ {"version":3,"file":"analyzeEntry.d.ts","sourceRoot":"","sources":["../../../src/build/analyze/analyzeEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKrE,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAO/E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA+LnD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,EACE,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB,EACD,WAAW,EAAE,MAAM,EACnB,EACE,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,qBAAiC,GAClC,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACzD,GACA,OAAO,CAAC;IACT,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC9C,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;KACvB,CAAC;CACH,CAAC,CAkCD"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/build/analyze/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAa,CAAC;AAEzC,eAAO,MAAM,gBAAgB,UAS5B,CAAC;AACF,eAAO,MAAM,oBAAoB,UAAkD,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/build/analyze/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAa,CAAC;AAEzC,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AACF,eAAO,MAAM,oBAAoB,UAAkD,CAAC"}
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkWVZENB5V_cjs = require('../chunk-WVZENB5V.cjs');
3
+ var chunkIAEJ3C3J_cjs = require('../chunk-IAEJ3C3J.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "analyzeBundle", {
8
8
  enumerable: true,
9
- get: function () { return chunkWVZENB5V_cjs.analyzeBundle; }
9
+ get: function () { return chunkIAEJ3C3J_cjs.analyzeBundle; }
10
10
  });
11
11
  //# sourceMappingURL=analyze.cjs.map
12
12
  //# sourceMappingURL=analyze.cjs.map
@@ -1,3 +1,3 @@
1
- export { analyzeBundle } from '../chunk-S5UMATJZ.js';
1
+ export { analyzeBundle } from '../chunk-CVRN2K4O.js';
2
2
  //# sourceMappingURL=analyze.js.map
3
3
  //# sourceMappingURL=analyze.js.map
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkNMOPG6KM_cjs = require('../chunk-NMOPG6KM.cjs');
3
+ var chunkNSINCI76_cjs = require('../chunk-NSINCI76.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createBundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkNMOPG6KM_cjs.createBundler; }
9
+ get: function () { return chunkNSINCI76_cjs.createBundler; }
10
10
  });
11
11
  Object.defineProperty(exports, "getInputOptions", {
12
12
  enumerable: true,
13
- get: function () { return chunkNMOPG6KM_cjs.getInputOptions; }
13
+ get: function () { return chunkNSINCI76_cjs.getInputOptions; }
14
14
  });
15
15
  //# sourceMappingURL=bundler.cjs.map
16
16
  //# sourceMappingURL=bundler.cjs.map
@@ -1,3 +1,3 @@
1
- export { createBundler, getInputOptions } from '../chunk-F54BDKO2.js';
1
+ export { createBundler, getInputOptions } from '../chunk-XHLN6E4D.js';
2
2
  //# sourceMappingURL=bundler.js.map
3
3
  //# sourceMappingURL=bundler.js.map
@@ -1,44 +1,44 @@
1
1
  'use strict';
2
2
 
3
- var chunkOVVFXLQK_cjs = require('../chunk-OVVFXLQK.cjs');
4
- var chunkHPIEW72C_cjs = require('../chunk-HPIEW72C.cjs');
5
- var chunkNMOPG6KM_cjs = require('../chunk-NMOPG6KM.cjs');
6
- var chunkWVZENB5V_cjs = require('../chunk-WVZENB5V.cjs');
3
+ var chunkZ546LAA6_cjs = require('../chunk-Z546LAA6.cjs');
4
+ var chunkAJX72IGP_cjs = require('../chunk-AJX72IGP.cjs');
5
+ var chunkNSINCI76_cjs = require('../chunk-NSINCI76.cjs');
6
+ var chunkIAEJ3C3J_cjs = require('../chunk-IAEJ3C3J.cjs');
7
7
  var chunk3JYRSECU_cjs = require('../chunk-3JYRSECU.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "createWatcher", {
12
12
  enumerable: true,
13
- get: function () { return chunkOVVFXLQK_cjs.createWatcher; }
13
+ get: function () { return chunkZ546LAA6_cjs.createWatcher; }
14
14
  });
15
15
  Object.defineProperty(exports, "getServerOptions", {
16
16
  enumerable: true,
17
- get: function () { return chunkOVVFXLQK_cjs.getServerOptions; }
17
+ get: function () { return chunkZ546LAA6_cjs.getServerOptions; }
18
18
  });
19
19
  Object.defineProperty(exports, "getWatcherInputOptions", {
20
20
  enumerable: true,
21
- get: function () { return chunkOVVFXLQK_cjs.getInputOptions; }
21
+ get: function () { return chunkZ546LAA6_cjs.getInputOptions; }
22
22
  });
23
23
  Object.defineProperty(exports, "writeTelemetryConfig", {
24
24
  enumerable: true,
25
- get: function () { return chunkHPIEW72C_cjs.writeTelemetryConfig; }
25
+ get: function () { return chunkAJX72IGP_cjs.writeTelemetryConfig; }
26
26
  });
27
27
  Object.defineProperty(exports, "createBundler", {
28
28
  enumerable: true,
29
- get: function () { return chunkNMOPG6KM_cjs.createBundler; }
29
+ get: function () { return chunkNSINCI76_cjs.createBundler; }
30
30
  });
31
31
  Object.defineProperty(exports, "getBundlerInputOptions", {
32
32
  enumerable: true,
33
- get: function () { return chunkNMOPG6KM_cjs.getInputOptions; }
33
+ get: function () { return chunkNSINCI76_cjs.getInputOptions; }
34
34
  });
35
35
  Object.defineProperty(exports, "analyzeBundle", {
36
36
  enumerable: true,
37
- get: function () { return chunkWVZENB5V_cjs.analyzeBundle; }
37
+ get: function () { return chunkIAEJ3C3J_cjs.analyzeBundle; }
38
38
  });
39
39
  Object.defineProperty(exports, "getBundlerOptions", {
40
40
  enumerable: true,
41
- get: function () { return chunkWVZENB5V_cjs.getBundlerOptions; }
41
+ get: function () { return chunkIAEJ3C3J_cjs.getBundlerOptions; }
42
42
  });
43
43
  Object.defineProperty(exports, "Deps", {
44
44
  enumerable: true,
@@ -1,7 +1,7 @@
1
- export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-X4PRG273.js';
2
- export { writeTelemetryConfig } from '../chunk-BS2NS3OF.js';
3
- export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-F54BDKO2.js';
4
- export { analyzeBundle, getBundlerOptions } from '../chunk-S5UMATJZ.js';
1
+ export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-FD5X42ZU.js';
2
+ export { writeTelemetryConfig } from '../chunk-B2Q76NIL.js';
3
+ export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-XHLN6E4D.js';
4
+ export { analyzeBundle, getBundlerOptions } from '../chunk-CVRN2K4O.js';
5
5
  export { Deps, FileService } from '../chunk-5QFG6SCM.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunk7TQIPPJV_cjs = require('../chunk-7TQIPPJV.cjs');
3
+ var chunkOART5HV7_cjs = require('../chunk-OART5HV7.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Bundler", {
8
8
  enumerable: true,
9
- get: function () { return chunk7TQIPPJV_cjs.Bundler; }
9
+ get: function () { return chunkOART5HV7_cjs.Bundler; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { Bundler } from '../chunk-BTSMIAV6.js';
1
+ export { Bundler } from '../chunk-VDRZB7JQ.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkWVZENB5V_cjs = require('./chunk-WVZENB5V.cjs');
3
+ var chunkIAEJ3C3J_cjs = require('./chunk-IAEJ3C3J.cjs');
4
4
 
5
5
  // src/build/babel/remove-all-options-telemetry.ts
6
6
  function removeAllOptionsExceptTelemetry(result, logger) {
7
- return chunkWVZENB5V_cjs.removeAllOptionsFromMastraExcept(result, "telemetry", logger);
7
+ return chunkIAEJ3C3J_cjs.removeAllOptionsFromMastraExcept(result, "telemetry", logger);
8
8
  }
9
9
 
10
10
  // src/build/telemetry.ts
11
11
  async function writeTelemetryConfig(entryFile, outputDir, logger) {
12
- const result = await chunkWVZENB5V_cjs.extractMastraOption(
12
+ const result = await chunkIAEJ3C3J_cjs.extractMastraOption(
13
13
  "telemetry",
14
14
  entryFile,
15
15
  removeAllOptionsExceptTelemetry,
@@ -24,5 +24,5 @@ async function writeTelemetryConfig(entryFile, outputDir, logger) {
24
24
  }
25
25
 
26
26
  exports.writeTelemetryConfig = writeTelemetryConfig;
27
- //# sourceMappingURL=chunk-HPIEW72C.cjs.map
28
- //# sourceMappingURL=chunk-HPIEW72C.cjs.map
27
+ //# sourceMappingURL=chunk-AJX72IGP.cjs.map
28
+ //# sourceMappingURL=chunk-AJX72IGP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/build/babel/remove-all-options-telemetry.ts","../src/build/telemetry.ts"],"names":["removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;AAGO,SAAS,+BAAA,CAAgC,QAAsC,MAAA,EAAwB;AAC5G,EAAA,OAAOA,kDAAA,CAAiC,MAAA,EAAQ,WAAA,EAAa,MAAM,CAAA;AACrE;;;ACSA,eAAsB,oBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACoD;AACpD,EAAA,MAAM,SAAS,MAAMC,qCAAA;AAAA,IACnB,WAAA;AAAA,IACA,SAAA;AAAA,IACA,+BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAA,CAAO,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,UAAA,CAAW,IAAI,CAAC,CAAA;AAEvF,EAAA,OAAO,EAAE,sBAAsB,SAAA,EAAU;AAC3C","file":"chunk-HPIEW72C.cjs","sourcesContent":["import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptTelemetry(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'telemetry', logger);\n}\n","import { removeAllOptionsExceptTelemetry } from './babel/remove-all-options-telemetry';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getTelemetryBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('telemetry', entryFile, removeAllOptionsExceptTelemetry, result);\n}\n\nexport async function writeTelemetryConfig(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{ externalDependencies: string[] } | null> {\n const result = await extractMastraOption<Config['telemetry']>(\n 'telemetry',\n entryFile,\n removeAllOptionsExceptTelemetry,\n outputDir,\n logger,\n );\n\n if (!result) {\n return null;\n }\n\n const externals = result.bundleOutput.output[0].imports.filter(x => !x.startsWith('./'));\n\n return { externalDependencies: externals };\n}\n"]}
1
+ {"version":3,"sources":["../src/build/babel/remove-all-options-telemetry.ts","../src/build/telemetry.ts"],"names":["removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;AAGO,SAAS,+BAAA,CAAgC,QAAsC,MAAA,EAAwB;AAC5G,EAAA,OAAOA,kDAAA,CAAiC,MAAA,EAAQ,WAAA,EAAa,MAAM,CAAA;AACrE;;;ACSA,eAAsB,oBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACoD;AACpD,EAAA,MAAM,SAAS,MAAMC,qCAAA;AAAA,IACnB,WAAA;AAAA,IACA,SAAA;AAAA,IACA,+BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAA,CAAO,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,UAAA,CAAW,IAAI,CAAC,CAAA;AAEvF,EAAA,OAAO,EAAE,sBAAsB,SAAA,EAAU;AAC3C","file":"chunk-AJX72IGP.cjs","sourcesContent":["import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptTelemetry(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'telemetry', logger);\n}\n","import { removeAllOptionsExceptTelemetry } from './babel/remove-all-options-telemetry';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getTelemetryBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('telemetry', entryFile, removeAllOptionsExceptTelemetry, result);\n}\n\nexport async function writeTelemetryConfig(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{ externalDependencies: string[] } | null> {\n const result = await extractMastraOption<Config['telemetry']>(\n 'telemetry',\n entryFile,\n removeAllOptionsExceptTelemetry,\n outputDir,\n logger,\n );\n\n if (!result) {\n return null;\n }\n\n const externals = result.bundleOutput.output[0].imports.filter(x => !x.startsWith('./'));\n\n return { externalDependencies: externals };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-S5UMATJZ.js';
1
+ import { extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-CVRN2K4O.js';
2
2
 
3
3
  // src/build/babel/remove-all-options-telemetry.ts
4
4
  function removeAllOptionsExceptTelemetry(result, logger) {
@@ -22,5 +22,5 @@ async function writeTelemetryConfig(entryFile, outputDir, logger) {
22
22
  }
23
23
 
24
24
  export { writeTelemetryConfig };
25
- //# sourceMappingURL=chunk-BS2NS3OF.js.map
26
- //# sourceMappingURL=chunk-BS2NS3OF.js.map
25
+ //# sourceMappingURL=chunk-B2Q76NIL.js.map
26
+ //# sourceMappingURL=chunk-B2Q76NIL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/build/babel/remove-all-options-telemetry.ts","../src/build/telemetry.ts"],"names":[],"mappings":";;;AAGO,SAAS,+BAAA,CAAgC,QAAsC,MAAA,EAAwB;AAC5G,EAAA,OAAO,gCAAA,CAAiC,MAAA,EAAQ,WAAA,EAAa,MAAM,CAAA;AACrE;;;ACSA,eAAsB,oBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACoD;AACpD,EAAA,MAAM,SAAS,MAAM,mBAAA;AAAA,IACnB,WAAA;AAAA,IACA,SAAA;AAAA,IACA,+BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAA,CAAO,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,UAAA,CAAW,IAAI,CAAC,CAAA;AAEvF,EAAA,OAAO,EAAE,sBAAsB,SAAA,EAAU;AAC3C","file":"chunk-BS2NS3OF.js","sourcesContent":["import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptTelemetry(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'telemetry', logger);\n}\n","import { removeAllOptionsExceptTelemetry } from './babel/remove-all-options-telemetry';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getTelemetryBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('telemetry', entryFile, removeAllOptionsExceptTelemetry, result);\n}\n\nexport async function writeTelemetryConfig(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{ externalDependencies: string[] } | null> {\n const result = await extractMastraOption<Config['telemetry']>(\n 'telemetry',\n entryFile,\n removeAllOptionsExceptTelemetry,\n outputDir,\n logger,\n );\n\n if (!result) {\n return null;\n }\n\n const externals = result.bundleOutput.output[0].imports.filter(x => !x.startsWith('./'));\n\n return { externalDependencies: externals };\n}\n"]}
1
+ {"version":3,"sources":["../src/build/babel/remove-all-options-telemetry.ts","../src/build/telemetry.ts"],"names":[],"mappings":";;;AAGO,SAAS,+BAAA,CAAgC,QAAsC,MAAA,EAAwB;AAC5G,EAAA,OAAO,gCAAA,CAAiC,MAAA,EAAQ,WAAA,EAAa,MAAM,CAAA;AACrE;;;ACSA,eAAsB,oBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACoD;AACpD,EAAA,MAAM,SAAS,MAAM,mBAAA;AAAA,IACnB,WAAA;AAAA,IACA,SAAA;AAAA,IACA,+BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAA,CAAO,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,UAAA,CAAW,IAAI,CAAC,CAAA;AAEvF,EAAA,OAAO,EAAE,sBAAsB,SAAA,EAAU;AAC3C","file":"chunk-B2Q76NIL.js","sourcesContent":["import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptTelemetry(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'telemetry', logger);\n}\n","import { removeAllOptionsExceptTelemetry } from './babel/remove-all-options-telemetry';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getTelemetryBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('telemetry', entryFile, removeAllOptionsExceptTelemetry, result);\n}\n\nexport async function writeTelemetryConfig(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<{ externalDependencies: string[] } | null> {\n const result = await extractMastraOption<Config['telemetry']>(\n 'telemetry',\n entryFile,\n removeAllOptionsExceptTelemetry,\n outputDir,\n logger,\n );\n\n if (!result) {\n return null;\n }\n\n const externals = result.bundleOutput.output[0].imports.filter(x => !x.startsWith('./'));\n\n return { externalDependencies: externals };\n}\n"]}
@@ -615,7 +615,8 @@ var GLOBAL_EXTERNALS = [
615
615
  "libsql",
616
616
  "#tools",
617
617
  "typescript",
618
- "undici"
618
+ "undici",
619
+ "readable-stream"
619
620
  ];
620
621
  var DEPRECATED_EXTERNALS = ["fastembed", "nodemailer", "jsdom", "sqlite3"];
621
622
 
@@ -664,7 +665,7 @@ function getInputPlugins({ entry, isVirtualFile }, mastraEntry, { sourcemapEnabl
664
665
  );
665
666
  return plugins;
666
667
  }
667
- async function captureDependenciesToOptimize(output, workspaceMap, projectRoot, {
668
+ async function captureDependenciesToOptimize(output, workspaceMap, projectRoot, initialDepsToOptimize, {
668
669
  logger
669
670
  }) {
670
671
  const depsToOptimize = /* @__PURE__ */ new Map();
@@ -712,7 +713,8 @@ async function captureDependenciesToOptimize(output, workspaceMap, projectRoot,
712
713
  workspaceMap,
713
714
  projectRoot,
714
715
  logger: noopLogger,
715
- sourcemapEnabled: false
716
+ sourcemapEnabled: false,
717
+ initialDepsToOptimize: depsToOptimize
716
718
  });
717
719
  if (!analysis?.dependencies) {
718
720
  continue;
@@ -732,7 +734,7 @@ async function captureDependenciesToOptimize(output, workspaceMap, projectRoot,
732
734
  await checkTransitiveDependencies(internalMap, maxDepth, currentDepth + 1);
733
735
  }
734
736
  }
735
- await checkTransitiveDependencies(/* @__PURE__ */ new Map());
737
+ await checkTransitiveDependencies(initialDepsToOptimize);
736
738
  const dynamicImports = output.dynamicImports.filter((d) => !DEPS_TO_IGNORE.includes(d));
737
739
  if (dynamicImports.length) {
738
740
  for (const dynamicImport of dynamicImports) {
@@ -750,7 +752,9 @@ async function analyzeEntry({
750
752
  logger,
751
753
  sourcemapEnabled,
752
754
  workspaceMap,
753
- projectRoot
755
+ projectRoot,
756
+ initialDepsToOptimize = /* @__PURE__ */ new Map()
757
+ // used to avoid infinite recursion
754
758
  }) {
755
759
  const optimizerBundler = await rollup({
756
760
  logLevel: process.env.MASTRA_BUNDLER_DEBUG === "true" ? "debug" : "silent",
@@ -765,9 +769,15 @@ async function analyzeEntry({
765
769
  inlineDynamicImports: true
766
770
  });
767
771
  await optimizerBundler.close();
768
- const depsToOptimize = await captureDependenciesToOptimize(output[0], workspaceMap, projectRoot, {
769
- logger
770
- });
772
+ const depsToOptimize = await captureDependenciesToOptimize(
773
+ output[0],
774
+ workspaceMap,
775
+ projectRoot,
776
+ initialDepsToOptimize,
777
+ {
778
+ logger
779
+ }
780
+ );
771
781
  return {
772
782
  dependencies: depsToOptimize,
773
783
  output: {
@@ -978,7 +988,7 @@ async function buildExternalDependencies(virtualDependencies, {
978
988
  {}
979
989
  ),
980
990
  external: externals,
981
- treeshake: "smallest",
991
+ treeshake: "safest",
982
992
  plugins: getInputPlugins2(virtualDependencies, {
983
993
  transpilePackages: packagesToTranspile,
984
994
  workspaceMap,
@@ -1296,5 +1306,5 @@ If you think your configuration is valid, please open an issue.`);
1296
1306
  }
1297
1307
 
1298
1308
  export { aliasHono, analyzeBundle, esbuild, extractMastraOption, getBundlerOptions, getPackageName, getPackageRootPath, getWorkspaceInformation, removeAllOptionsFromMastraExcept, removeDeployer2 as removeDeployer, slash, tsConfigPaths };
1299
- //# sourceMappingURL=chunk-S5UMATJZ.js.map
1300
- //# sourceMappingURL=chunk-S5UMATJZ.js.map
1309
+ //# sourceMappingURL=chunk-CVRN2K4O.js.map
1310
+ //# sourceMappingURL=chunk-CVRN2K4O.js.map