@mastra/deployer 1.0.0-beta.11 → 1.0.0-beta.13

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 (66) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/build/analyze/bundleExternals.d.ts +4 -5
  3. package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
  4. package/dist/build/analyze.cjs +2 -2
  5. package/dist/build/analyze.d.ts +2 -2
  6. package/dist/build/analyze.d.ts.map +1 -1
  7. package/dist/build/analyze.js +1 -1
  8. package/dist/build/bundler.cjs +3 -3
  9. package/dist/build/bundler.d.ts +2 -1
  10. package/dist/build/bundler.d.ts.map +1 -1
  11. package/dist/build/bundler.js +1 -1
  12. package/dist/build/index.cjs +12 -12
  13. package/dist/build/index.js +4 -4
  14. package/dist/build/plugins/node-modules-extension-resolver.d.ts +7 -0
  15. package/dist/build/plugins/node-modules-extension-resolver.d.ts.map +1 -1
  16. package/dist/build/utils.d.ts +6 -0
  17. package/dist/build/utils.d.ts.map +1 -1
  18. package/dist/build/watcher.d.ts.map +1 -1
  19. package/dist/bundler/index.cjs +2 -2
  20. package/dist/bundler/index.d.ts +5 -5
  21. package/dist/bundler/index.d.ts.map +1 -1
  22. package/dist/bundler/index.js +1 -1
  23. package/dist/chunk-24GY667C.cjs +123 -0
  24. package/dist/chunk-24GY667C.cjs.map +1 -0
  25. package/dist/{chunk-PK3AX3KO.cjs → chunk-3GOE3SL2.cjs} +27 -23
  26. package/dist/chunk-3GOE3SL2.cjs.map +1 -0
  27. package/dist/{chunk-NM6R77PX.js → chunk-HHA2Y3AS.js} +7 -3
  28. package/dist/chunk-HHA2Y3AS.js.map +1 -0
  29. package/dist/{chunk-EHZKDGGA.cjs → chunk-KCGBR2X6.cjs} +106 -54
  30. package/dist/chunk-KCGBR2X6.cjs.map +1 -0
  31. package/dist/chunk-LENVOSFH.cjs +261 -0
  32. package/dist/chunk-LENVOSFH.cjs.map +1 -0
  33. package/dist/chunk-R6O3XWXM.js +249 -0
  34. package/dist/chunk-R6O3XWXM.js.map +1 -0
  35. package/dist/{chunk-3KATYU33.js → chunk-RGUNHE4Y.js} +89 -37
  36. package/dist/chunk-RGUNHE4Y.js.map +1 -0
  37. package/dist/{chunk-HFP6WWM5.js → chunk-SRPOHKWH.js} +6 -76
  38. package/dist/chunk-SRPOHKWH.js.map +1 -0
  39. package/dist/{chunk-F2LCS2DV.cjs → chunk-VA2CSOKJ.cjs} +7 -2
  40. package/dist/chunk-VA2CSOKJ.cjs.map +1 -0
  41. package/dist/{chunk-5OGQ7IFB.js → chunk-XTXGU6QF.js} +19 -15
  42. package/dist/chunk-XTXGU6QF.js.map +1 -0
  43. package/dist/index.cjs +5 -5
  44. package/dist/index.js +2 -2
  45. package/dist/server/index.cjs +4 -4
  46. package/dist/server/index.cjs.map +1 -1
  47. package/dist/server/index.js +2 -2
  48. package/dist/server/index.js.map +1 -1
  49. package/dist/validator/custom-resolver.cjs +2 -2
  50. package/dist/validator/custom-resolver.js +1 -1
  51. package/package.json +4 -5
  52. package/dist/chunk-3KATYU33.js.map +0 -1
  53. package/dist/chunk-5OGQ7IFB.js.map +0 -1
  54. package/dist/chunk-EHZKDGGA.cjs.map +0 -1
  55. package/dist/chunk-F2LCS2DV.cjs.map +0 -1
  56. package/dist/chunk-HFP6WWM5.js.map +0 -1
  57. package/dist/chunk-NM6R77PX.js.map +0 -1
  58. package/dist/chunk-PK3AX3KO.cjs.map +0 -1
  59. package/dist/chunk-UG72ONP7.js +0 -147
  60. package/dist/chunk-UG72ONP7.js.map +0 -1
  61. package/dist/chunk-Z33LQHGJ.cjs +0 -196
  62. package/dist/chunk-Z33LQHGJ.cjs.map +0 -1
  63. package/dist/chunk-ZPUTJSEC.cjs +0 -157
  64. package/dist/chunk-ZPUTJSEC.cjs.map +0 -1
  65. package/dist/server/handlers/prompt.d.ts +0 -3
  66. package/dist/server/handlers/prompt.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 1.0.0-beta.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`919a22b`](https://github.com/mastra-ai/mastra/commit/919a22b25876f9ed5891efe5facbe682c30ff497)]:
8
+ - @mastra/core@1.0.0-beta.13
9
+ - @mastra/server@1.0.0-beta.13
10
+
11
+ ## 1.0.0-beta.12
12
+
13
+ ### Patch Changes
14
+
15
+ - Remove deprecated playground-only prompt generation handler (functionality moved to @mastra/server) ([#11074](https://github.com/mastra-ai/mastra/pull/11074))
16
+
17
+ Improve prompt enhancement UX: show toast errors when enhancement fails, disable button when no model has a configured API key, and prevent users from disabling all models in the model list
18
+
19
+ Add missing `/api/agents/:agentId/instructions/enhance` endpoint that was referenced by `@mastra/client-js` and `@mastra/playground-ui`
20
+
21
+ - Allow for `bundler.externals: true` to be set. ([#10218](https://github.com/mastra-ai/mastra/pull/10218))
22
+
23
+ With this configuration during `mastra build` all dependencies (except workspace dependencies) will be treated as "external" and not bundled. Instead they will be added to the `.mastra/output/package.json` file.
24
+
25
+ - Updated dependencies [[`d5ed981`](https://github.com/mastra-ai/mastra/commit/d5ed981c8701c1b8a27a5f35a9a2f7d9244e695f), [`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808), [`932d63d`](https://github.com/mastra-ai/mastra/commit/932d63dd51be9c8bf1e00e3671fe65606c6fb9cd), [`b760b73`](https://github.com/mastra-ai/mastra/commit/b760b731aca7c8a3f041f61d57a7f125ae9cb215), [`695a621`](https://github.com/mastra-ai/mastra/commit/695a621528bdabeb87f83c2277cf2bb084c7f2b4), [`2b459f4`](https://github.com/mastra-ai/mastra/commit/2b459f466fd91688eeb2a44801dc23f7f8a887ab), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`24b76d8`](https://github.com/mastra-ai/mastra/commit/24b76d8e17656269c8ed09a0c038adb9cc2ae95a), [`243a823`](https://github.com/mastra-ai/mastra/commit/243a8239c5906f5c94e4f78b54676793f7510ae3), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`c61fac3`](https://github.com/mastra-ai/mastra/commit/c61fac3add96f0dcce0208c07415279e2537eb62), [`6f14f70`](https://github.com/mastra-ai/mastra/commit/6f14f706ccaaf81b69544b6c1b75ab66a41e5317), [`5118f38`](https://github.com/mastra-ai/mastra/commit/5118f384a70b1166012fde3b901f3227870b1009), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`6375f52`](https://github.com/mastra-ai/mastra/commit/6375f52c219305abef6f2026b4eaf8ac2fa5f1c0), [`4524734`](https://github.com/mastra-ai/mastra/commit/45247343e384717a7c8404296275c56201d6470f), [`2a53598`](https://github.com/mastra-ai/mastra/commit/2a53598c6d8cfeb904a7fc74e57e526d751c8fa6), [`c7cd3c7`](https://github.com/mastra-ai/mastra/commit/c7cd3c7a187d7aaf79e2ca139de328bf609a14b4), [`847c212`](https://github.com/mastra-ai/mastra/commit/847c212caba7df0d6f2fc756b494ac3c75c3720d), [`6f941c4`](https://github.com/mastra-ai/mastra/commit/6f941c438ca5f578619788acc7608fc2e23bd176)]:
26
+ - @mastra/core@1.0.0-beta.12
27
+ - @mastra/server@1.0.0-beta.12
28
+
3
29
  ## 1.0.0-beta.11
4
30
 
5
31
  ### Patch Changes
@@ -1,3 +1,4 @@
1
+ import type { Config } from '@mastra/core/mastra';
1
2
  import { type OutputChunk, type OutputAsset } from 'rollup';
2
3
  import { type WorkspacePackageInfo } from '../../bundler/workspaceDependencies.js';
3
4
  import type { DependencyMetadata } from '../types.js';
@@ -14,6 +15,7 @@ export declare function createVirtualDependencies(depsToOptimize: Map<string, De
14
15
  outputDir: string;
15
16
  bundlerOptions?: {
16
17
  isDev?: boolean;
18
+ externalsPreset?: boolean;
17
19
  };
18
20
  }): {
19
21
  optimizedDependencyEntries: Map<string, VirtualDependency>;
@@ -29,12 +31,9 @@ export declare function createVirtualDependencies(depsToOptimize: Map<string, De
29
31
  * @returns Object containing bundle output and reference map for validation
30
32
  */
31
33
  export declare function bundleExternals(depsToOptimize: Map<string, DependencyMetadata>, outputDir: string, options: {
32
- bundlerOptions?: {
33
- externals?: string[];
34
- transpilePackages?: string[];
34
+ bundlerOptions?: ({
35
35
  isDev?: boolean;
36
- enableEsmShim?: boolean;
37
- } | null;
36
+ } & Config['bundler']) | null;
38
37
  projectRoot?: string;
39
38
  workspaceRoot?: string;
40
39
  workspaceMap?: Map<string, WorkspacePackageInfo>;
@@ -1 +1 @@
1
- {"version":3,"file":"bundleExternals.d.ts","sourceRoot":"","sources":["../../../src/build/analyze/bundleExternals.ts"],"names":[],"mappings":"AAOA,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,WAAW,EAAe,MAAM,QAAQ,CAAC;AAKjF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAWnD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC/C,EACE,WAAW,EACX,aAAa,EACb,SAAS,EACT,cAAc,GACf,EAAE;IAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAChH;IACD,0BAA0B,EAAE,GAAG,CAAC,MAAM,EAAE,iBAA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,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACjE,GACA;IACD,0BAA0B,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3D,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C,CAiEA;AAySD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IACP,cAAc,CAAC,EACX,CAAC;QACC,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GACtB,IAAI,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CAClD;;;;GAoHF"}
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkEHZKDGGA_cjs = require('../chunk-EHZKDGGA.cjs');
3
+ var chunkKCGBR2X6_cjs = require('../chunk-KCGBR2X6.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "analyzeBundle", {
8
8
  enumerable: true,
9
- get: function () { return chunkEHZKDGGA_cjs.analyzeBundle; }
9
+ get: function () { return chunkKCGBR2X6_cjs.analyzeBundle; }
10
10
  });
11
11
  //# sourceMappingURL=analyze.cjs.map
12
12
  //# sourceMappingURL=analyze.cjs.map
@@ -8,13 +8,13 @@ import { type WorkspacePackageInfo } from '../bundler/workspaceDependencies.js';
8
8
  *
9
9
  * This helps identify which dependencies need to be externalized vs bundled.
10
10
  */
11
- export declare function analyzeBundle(entries: string[], mastraEntry: string, { outputDir, projectRoot, isDev, bundlerOptions: _bundlerOptions, }: {
11
+ export declare function analyzeBundle(entries: string[], mastraEntry: string, { outputDir, projectRoot, isDev, bundlerOptions: internalBundlerOptions, }: {
12
12
  outputDir: string;
13
13
  projectRoot: string;
14
14
  platform: 'node' | 'browser';
15
15
  isDev?: boolean;
16
16
  bundlerOptions?: {
17
- enableEsmShim?: boolean;
17
+ externals?: boolean | string[];
18
18
  } | null;
19
19
  }, logger: IMastraLogger): Promise<{
20
20
  externalDependencies: Set<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/build/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASzD,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAmQtG;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EACnB,EACE,SAAS,EACT,WAAW,EACX,KAAa,EACb,cAAc,EAAE,eAAe,GAChC,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,GAAG,IAAI,CAAC;CACV,EACD,MAAM,EAAE,aAAa;;;;GAgHtB"}
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/build/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASzD,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAmQtG;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EACnB,EACE,SAAS,EACT,WAAW,EACX,KAAa,EACb,cAAc,EAAE,sBAAsB,GACvC,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;KAChC,GAAG,IAAI,CAAC;CACV,EACD,MAAM,EAAE,aAAa;;;;GAuJtB"}
@@ -1,3 +1,3 @@
1
- export { analyzeBundle } from '../chunk-3KATYU33.js';
1
+ export { analyzeBundle } from '../chunk-RGUNHE4Y.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 chunkZPUTJSEC_cjs = require('../chunk-ZPUTJSEC.cjs');
3
+ var chunkLENVOSFH_cjs = require('../chunk-LENVOSFH.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createBundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkZPUTJSEC_cjs.createBundler; }
9
+ get: function () { return chunkLENVOSFH_cjs.createBundler; }
10
10
  });
11
11
  Object.defineProperty(exports, "getInputOptions", {
12
12
  enumerable: true,
13
- get: function () { return chunkZPUTJSEC_cjs.getInputOptions; }
13
+ get: function () { return chunkLENVOSFH_cjs.getInputOptions; }
14
14
  });
15
15
  //# sourceMappingURL=bundler.cjs.map
16
16
  //# sourceMappingURL=bundler.cjs.map
@@ -1,11 +1,12 @@
1
1
  import { type InputOptions, type OutputOptions } from 'rollup';
2
2
  import { analyzeBundle } from './analyze/index.js';
3
- export declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser', env: Record<string, string> | undefined, { sourcemap, isDev, projectRoot, workspaceRoot, enableEsmShim, }: {
3
+ export declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser', env: Record<string, string> | undefined, { sourcemap, isDev, projectRoot, workspaceRoot, enableEsmShim, externalsPreset, }: {
4
4
  sourcemap?: boolean;
5
5
  isDev?: boolean;
6
6
  workspaceRoot?: string;
7
7
  projectRoot: string;
8
8
  enableEsmShim?: boolean;
9
+ externalsPreset?: boolean;
9
10
  }): Promise<InputOptions>;
10
11
  export declare function createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
11
12
  dir: string;
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../src/build/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,KAAK,YAAY,EAAE,KAAK,aAAa,EAAe,MAAM,QAAQ,CAAC;AAGpF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAO1C,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,EAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAA2D,EACtF,EACE,SAAiB,EACjB,KAAa,EACb,WAAW,EACX,aAAyB,EACzB,aAAoB,GACrB,EAAE;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GACA,OAAO,CAAC,YAAY,CAAC,CAwHvB;AAED,wBAAsB,aAAa,CACjC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE;;;GAiBxD"}
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../src/build/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,KAAK,YAAY,EAAE,KAAK,aAAa,EAAe,MAAM,QAAQ,CAAC;AAGpF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAQ1C,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,EAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAA2D,EACtF,EACE,SAAiB,EACjB,KAAa,EACb,WAAW,EACX,aAAyB,EACzB,aAAoB,EACpB,eAAuB,GACxB,EAAE;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GACA,OAAO,CAAC,YAAY,CAAC,CAuHvB;AAED,wBAAsB,aAAa,CACjC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE;;;GAiBxD"}
@@ -1,3 +1,3 @@
1
- export { createBundler, getInputOptions } from '../chunk-UG72ONP7.js';
1
+ export { createBundler, getInputOptions } from '../chunk-R6O3XWXM.js';
2
2
  //# sourceMappingURL=bundler.js.map
3
3
  //# sourceMappingURL=bundler.js.map
@@ -1,40 +1,40 @@
1
1
  'use strict';
2
2
 
3
- var chunkZ33LQHGJ_cjs = require('../chunk-Z33LQHGJ.cjs');
4
- var chunkZPUTJSEC_cjs = require('../chunk-ZPUTJSEC.cjs');
5
- var chunkEHZKDGGA_cjs = require('../chunk-EHZKDGGA.cjs');
3
+ var chunk24GY667C_cjs = require('../chunk-24GY667C.cjs');
4
+ var chunkLENVOSFH_cjs = require('../chunk-LENVOSFH.cjs');
5
+ var chunkKCGBR2X6_cjs = require('../chunk-KCGBR2X6.cjs');
6
6
  var chunkJVBCN3RH_cjs = require('../chunk-JVBCN3RH.cjs');
7
- var chunkF2LCS2DV_cjs = require('../chunk-F2LCS2DV.cjs');
7
+ var chunkVA2CSOKJ_cjs = require('../chunk-VA2CSOKJ.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "createWatcher", {
12
12
  enumerable: true,
13
- get: function () { return chunkZ33LQHGJ_cjs.createWatcher; }
13
+ get: function () { return chunk24GY667C_cjs.createWatcher; }
14
14
  });
15
15
  Object.defineProperty(exports, "getServerOptions", {
16
16
  enumerable: true,
17
- get: function () { return chunkZ33LQHGJ_cjs.getServerOptions; }
17
+ get: function () { return chunk24GY667C_cjs.getServerOptions; }
18
18
  });
19
19
  Object.defineProperty(exports, "getWatcherInputOptions", {
20
20
  enumerable: true,
21
- get: function () { return chunkZ33LQHGJ_cjs.getInputOptions; }
21
+ get: function () { return chunk24GY667C_cjs.getInputOptions; }
22
22
  });
23
23
  Object.defineProperty(exports, "createBundler", {
24
24
  enumerable: true,
25
- get: function () { return chunkZPUTJSEC_cjs.createBundler; }
25
+ get: function () { return chunkLENVOSFH_cjs.createBundler; }
26
26
  });
27
27
  Object.defineProperty(exports, "getBundlerInputOptions", {
28
28
  enumerable: true,
29
- get: function () { return chunkZPUTJSEC_cjs.getInputOptions; }
29
+ get: function () { return chunkLENVOSFH_cjs.getInputOptions; }
30
30
  });
31
31
  Object.defineProperty(exports, "analyzeBundle", {
32
32
  enumerable: true,
33
- get: function () { return chunkEHZKDGGA_cjs.analyzeBundle; }
33
+ get: function () { return chunkKCGBR2X6_cjs.analyzeBundle; }
34
34
  });
35
35
  Object.defineProperty(exports, "getBundlerOptions", {
36
36
  enumerable: true,
37
- get: function () { return chunkEHZKDGGA_cjs.getBundlerOptions; }
37
+ get: function () { return chunkKCGBR2X6_cjs.getBundlerOptions; }
38
38
  });
39
39
  Object.defineProperty(exports, "Deps", {
40
40
  enumerable: true,
@@ -46,7 +46,7 @@ Object.defineProperty(exports, "FileService", {
46
46
  });
47
47
  Object.defineProperty(exports, "normalizeStudioBase", {
48
48
  enumerable: true,
49
- get: function () { return chunkF2LCS2DV_cjs.normalizeStudioBase; }
49
+ get: function () { return chunkVA2CSOKJ_cjs.normalizeStudioBase; }
50
50
  });
51
51
  //# sourceMappingURL=index.cjs.map
52
52
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-HFP6WWM5.js';
2
- export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-UG72ONP7.js';
3
- export { analyzeBundle, getBundlerOptions } from '../chunk-3KATYU33.js';
1
+ export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-SRPOHKWH.js';
2
+ export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-R6O3XWXM.js';
3
+ export { analyzeBundle, getBundlerOptions } from '../chunk-RGUNHE4Y.js';
4
4
  export { Deps, FileService } from '../chunk-DPDWM7HQ.js';
5
- export { normalizeStudioBase } from '../chunk-NM6R77PX.js';
5
+ export { normalizeStudioBase } from '../chunk-HHA2Y3AS.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,10 @@
1
1
  import type { Plugin } from 'rollup';
2
+ /**
3
+ * Rollup plugin that resolves module extensions for external dependencies.
4
+ *
5
+ * This plugin handles ESM compatibility for external imports when node-resolve is not used:
6
+ * - Packages WITH exports field (e.g., hono, date-fns): Keep imports as-is or strip redundant extensions
7
+ * - Packages WITHOUT exports field (e.g., lodash): Add .js extension for direct file imports
8
+ */
2
9
  export declare function nodeModulesExtensionResolver(): Plugin;
3
10
  //# sourceMappingURL=node-modules-extension-resolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-modules-extension-resolver.d.ts","sourceRoot":"","sources":["../../../src/build/plugins/node-modules-extension-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA0BrC,wBAAgB,4BAA4B,IAAI,MAAM,CAyErD"}
1
+ {"version":3,"file":"node-modules-extension-resolver.d.ts","sourceRoot":"","sources":["../../../src/build/plugins/node-modules-extension-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAqDrC;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAwFrD"}
@@ -51,4 +51,10 @@ export declare function findNativePackageModule(moduleIds: string[]): string | u
51
51
  * @returns Normalized studioBase path string
52
52
  */
53
53
  export declare function normalizeStudioBase(studioBase: string): string;
54
+ /**
55
+ * Check if a module is a Node.js builtin module
56
+ * @param specifier - Module specifier
57
+ * @returns True if it's a builtin module
58
+ */
59
+ export declare function isBuiltinModule(specifier: string): boolean;
54
60
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/build/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,EAAE,GAAmB,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,QAOxE;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAMzE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,sBAQxC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,UAQjC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAU3D;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAqB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyB9D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/build/utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,EAAE,GAAmB,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,QAOxE;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAMzE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,sBAQxC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,UAQjC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAU3D;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAqB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyB9D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAM1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/build/watcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAU,MAAM,QAAQ,CAAC;AAalE,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,EAAE,SAAiB,EAAE,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,yBAqEpD;AAED,wBAAsB,aAAa,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,2CAY3F"}
1
+ {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/build/watcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAU,MAAM,QAAQ,CAAC;AAalE,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,EAAE,SAAiB,EAAE,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,yBAkEpD;AAED,wBAAsB,aAAa,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,2CAY3F"}
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkPK3AX3KO_cjs = require('../chunk-PK3AX3KO.cjs');
3
+ var chunk3GOE3SL2_cjs = require('../chunk-3GOE3SL2.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Bundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkPK3AX3KO_cjs.Bundler; }
9
+ get: function () { return chunk3GOE3SL2_cjs.Bundler; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -13,9 +13,7 @@ export declare abstract class Bundler extends MastraBundler {
13
13
  write: () => Promise<import("rollup").RollupOutput>;
14
14
  close: () => Promise<void>;
15
15
  }>;
16
- protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string, { enableEsmShim }?: {
17
- enableEsmShim?: boolean;
18
- }): Promise<{
16
+ protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string): Promise<{
19
17
  externalDependencies: Set<string>;
20
18
  dependencies: Map<string, string>;
21
19
  workspaceMap: Map<string, import("./workspaceDependencies").WorkspacePackageInfo>;
@@ -26,16 +24,18 @@ export declare abstract class Bundler extends MastraBundler {
26
24
  rootDir?: string;
27
25
  outputDirectory: string;
28
26
  }): Promise<void>;
29
- protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: (string | string[])[], { enableSourcemap, enableEsmShim }?: {
27
+ protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: (string | string[])[], { enableSourcemap, enableEsmShim, externalsPreset, }?: {
30
28
  enableSourcemap?: boolean;
31
29
  enableEsmShim?: boolean;
30
+ externalsPreset?: boolean;
32
31
  }): Promise<InputOptions>;
33
32
  getAllToolPaths(mastraDir: string, toolsPaths?: (string | string[])[]): (string | string[])[];
34
33
  listToolsInputOptions(toolsPaths: (string | string[])[]): Promise<Record<string, string>>;
35
- protected _bundle(serverFile: string, mastraEntryFile: string, { projectRoot, outputDirectory, enableEsmShim, }: {
34
+ protected _bundle(serverFile: string, mastraEntryFile: string, { projectRoot, outputDirectory, enableEsmShim, externals, }: {
36
35
  projectRoot: string;
37
36
  outputDirectory: string;
38
37
  enableEsmShim?: boolean;
38
+ externals?: boolean | string[];
39
39
  }, toolsPaths?: (string | string[])[], bundleLocation?: string): Promise<void>;
40
40
  lint(_entryFile: string, _outputDirectory: string, toolsPaths: (string | string[])[]): Promise<void>;
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler/index.ts"],"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M,EAAE,UAAU,GAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE;IAuB3F,qBAAqB,CAAC,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE;cAqC7C,OAAO,CACrB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,EACE,WAAW,EACX,eAAe,EACf,aAAoB,EACpB,SAAc,GACf,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;KAAE,EAC5G,UAAU,GAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAO,EACtC,cAAc,GAAE,MAA8C,GAC7D,OAAO,CAAC,IAAI,CAAC;IAkJV,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAO3G"}
@@ -1,3 +1,3 @@
1
- export { Bundler } from '../chunk-5OGQ7IFB.js';
1
+ export { Bundler } from '../chunk-XTXGU6QF.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,123 @@
1
+ 'use strict';
2
+
3
+ var chunkLENVOSFH_cjs = require('./chunk-LENVOSFH.cjs');
4
+ var chunkKCGBR2X6_cjs = require('./chunk-KCGBR2X6.cjs');
5
+ var chunkVA2CSOKJ_cjs = require('./chunk-VA2CSOKJ.cjs');
6
+ var rollup = require('rollup');
7
+ var path = require('path');
8
+ var pkg = require('empathic/package');
9
+ var logger = require('@mastra/core/logger');
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 pkg__namespace = /*#__PURE__*/_interopNamespace(pkg);
30
+
31
+ async function getInputOptions2(entryFile, platform, env, { sourcemap = false } = {}) {
32
+ const closestPkgJson = pkg__namespace.up({ cwd: path.dirname(entryFile) });
33
+ const projectRoot = closestPkgJson ? path.dirname(chunkVA2CSOKJ_cjs.slash(closestPkgJson)) : chunkVA2CSOKJ_cjs.slash(process.cwd());
34
+ const { workspaceMap, workspaceRoot } = await chunkKCGBR2X6_cjs.getWorkspaceInformation({ mastraEntryFile: entryFile });
35
+ const analyzeEntryResult = await chunkKCGBR2X6_cjs.analyzeBundle(
36
+ [entryFile],
37
+ entryFile,
38
+ {
39
+ outputDir: path.posix.join(process.cwd(), ".mastra", ".build"),
40
+ projectRoot: workspaceRoot || process.cwd(),
41
+ platform: "node",
42
+ isDev: true
43
+ },
44
+ logger.noopLogger
45
+ );
46
+ const deps = /* @__PURE__ */ new Map();
47
+ for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {
48
+ const pkgName = chunkVA2CSOKJ_cjs.getPackageName(dep);
49
+ if (pkgName && workspaceMap.has(pkgName)) {
50
+ deps.set(dep, metadata);
51
+ }
52
+ }
53
+ const inputOptions = await chunkLENVOSFH_cjs.getInputOptions(
54
+ entryFile,
55
+ {
56
+ dependencies: deps,
57
+ externalDependencies: /* @__PURE__ */ new Set(),
58
+ workspaceMap
59
+ },
60
+ platform,
61
+ env,
62
+ { sourcemap, isDev: true, workspaceRoot, projectRoot }
63
+ );
64
+ if (Array.isArray(inputOptions.plugins)) {
65
+ const plugins = [];
66
+ inputOptions.plugins.forEach((plugin) => {
67
+ if (plugin?.name === "node-resolve") {
68
+ return;
69
+ }
70
+ if (plugin?.name === "tsconfig-paths") {
71
+ plugins.push(
72
+ chunkKCGBR2X6_cjs.tsConfigPaths({
73
+ localResolve: true
74
+ })
75
+ );
76
+ return;
77
+ }
78
+ plugins.push(plugin);
79
+ });
80
+ inputOptions.plugins = plugins;
81
+ inputOptions.plugins.push(chunkKCGBR2X6_cjs.aliasHono());
82
+ inputOptions.plugins.push(chunkLENVOSFH_cjs.nodeModulesExtensionResolver());
83
+ }
84
+ return inputOptions;
85
+ }
86
+ async function createWatcher(inputOptions, outputOptions) {
87
+ const watcher = await rollup.watch({
88
+ ...inputOptions,
89
+ output: {
90
+ ...outputOptions,
91
+ format: "esm",
92
+ entryFileNames: "[name].mjs",
93
+ chunkFileNames: "[name].mjs"
94
+ }
95
+ });
96
+ return watcher;
97
+ }
98
+
99
+ // src/build/babel/remove-all-options-server.ts
100
+ function removeAllOptionsExceptServer(result, logger) {
101
+ return chunkKCGBR2X6_cjs.removeAllOptionsFromMastraExcept(result, "server", logger);
102
+ }
103
+
104
+ // src/build/serverOptions.ts
105
+ async function getServerOptions(entryFile, outputDir, logger) {
106
+ const result = await chunkKCGBR2X6_cjs.extractMastraOption(
107
+ "server",
108
+ entryFile,
109
+ removeAllOptionsExceptServer,
110
+ outputDir,
111
+ logger
112
+ );
113
+ if (!result) {
114
+ return null;
115
+ }
116
+ return result.getConfig();
117
+ }
118
+
119
+ exports.createWatcher = createWatcher;
120
+ exports.getInputOptions = getInputOptions2;
121
+ exports.getServerOptions = getServerOptions;
122
+ //# sourceMappingURL=chunk-24GY667C.cjs.map
123
+ //# sourceMappingURL=chunk-24GY667C.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["getInputOptions","pkg","dirname","slash","getWorkspaceInformation","analyzeBundle","posix","noopLogger","getPackageName","tsConfigPaths","aliasHono","nodeModulesExtensionResolver","watch","remov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AA,OAAO,OAAA;AACT;;;AC9FO,SAAS,4BAAA,CAA6B,QAAsC,MAAA,EAAwB;AACzG,EAAA,OAAOC,kDAAA,CAAiC,MAAA,EAAQ,QAAA,EAAU,MAAM,CAAA;AAClE;;;ACSA,eAAsB,gBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACkC;AAClC,EAAA,MAAM,SAAS,MAAMC,qCAAA;AAAA,IACnB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,4BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-24GY667C.cjs","sourcesContent":["import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\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 getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkZPUTJSEC_cjs = require('./chunk-ZPUTJSEC.cjs');
4
- var chunkEHZKDGGA_cjs = require('./chunk-EHZKDGGA.cjs');
3
+ var chunkLENVOSFH_cjs = require('./chunk-LENVOSFH.cjs');
4
+ var chunkKCGBR2X6_cjs = require('./chunk-KCGBR2X6.cjs');
5
5
  var chunkJVBCN3RH_cjs = require('./chunk-JVBCN3RH.cjs');
6
- var chunkF2LCS2DV_cjs = require('./chunk-F2LCS2DV.cjs');
6
+ var chunkVA2CSOKJ_cjs = require('./chunk-VA2CSOKJ.cjs');
7
7
  var fs = require('fs');
8
8
  var promises = require('fs/promises');
9
9
  var path = require('path');
@@ -89,19 +89,16 @@ var Bundler = class extends bundler.MastraBundler {
89
89
  );
90
90
  }
91
91
  createBundler(inputOptions, outputOptions) {
92
- return chunkZPUTJSEC_cjs.createBundler(inputOptions, outputOptions);
92
+ return chunkLENVOSFH_cjs.createBundler(inputOptions, outputOptions);
93
93
  }
94
- async analyze(entry, mastraFile, outputDirectory, { enableEsmShim = true } = {}) {
95
- return await chunkEHZKDGGA_cjs.analyzeBundle(
94
+ async analyze(entry, mastraFile, outputDirectory) {
95
+ return await chunkKCGBR2X6_cjs.analyzeBundle(
96
96
  [].concat(entry),
97
97
  mastraFile,
98
98
  {
99
99
  outputDir: path.join(outputDirectory, this.analyzeOutputDir),
100
100
  projectRoot: outputDirectory,
101
- platform: "node",
102
- bundlerOptions: {
103
- enableEsmShim
104
- }
101
+ platform: "node"
105
102
  },
106
103
  this.logger
107
104
  );
@@ -133,18 +130,22 @@ var Bundler = class extends bundler.MastraBundler {
133
130
  return;
134
131
  }
135
132
  }
136
- async getBundlerOptions(serverFile, mastraEntryFile, analyzedBundleInfo, toolsPaths, { enableSourcemap = false, enableEsmShim = true } = {}) {
137
- const { workspaceRoot } = await chunkEHZKDGGA_cjs.getWorkspaceInformation({ mastraEntryFile });
133
+ async getBundlerOptions(serverFile, mastraEntryFile, analyzedBundleInfo, toolsPaths, {
134
+ enableSourcemap = false,
135
+ enableEsmShim = true,
136
+ externalsPreset = false
137
+ } = {}) {
138
+ const { workspaceRoot } = await chunkKCGBR2X6_cjs.getWorkspaceInformation({ mastraEntryFile });
138
139
  const closestPkgJson = pkg__namespace.up({ cwd: path.dirname(mastraEntryFile) });
139
140
  const projectRoot = closestPkgJson ? path.dirname(closestPkgJson) : process.cwd();
140
- const inputOptions = await chunkZPUTJSEC_cjs.getInputOptions(
141
+ const inputOptions = await chunkLENVOSFH_cjs.getInputOptions(
141
142
  mastraEntryFile,
142
143
  analyzedBundleInfo,
143
144
  "node",
144
145
  {
145
146
  "process.env.NODE_ENV": JSON.stringify("production")
146
147
  },
147
- { sourcemap: enableSourcemap, workspaceRoot, projectRoot, enableEsmShim }
148
+ { sourcemap: enableSourcemap, workspaceRoot, projectRoot, enableEsmShim, externalsPreset }
148
149
  );
149
150
  const isVirtual = serverFile.includes("\n") || fs.existsSync(serverFile);
150
151
  const toolsInputOptions = await this.listToolsInputOptions(toolsPaths);
@@ -161,7 +162,7 @@ var Bundler = class extends bundler.MastraBundler {
161
162
  return inputOptions;
162
163
  }
163
164
  getAllToolPaths(mastraDir, toolsPaths = []) {
164
- const normalizedMastraDir = chunkF2LCS2DV_cjs.slash(mastraDir);
165
+ const normalizedMastraDir = chunkVA2CSOKJ_cjs.slash(mastraDir);
165
166
  const defaultToolsPath = path.posix.join(normalizedMastraDir, "tools/**/*.{js,ts}");
166
167
  const defaultToolsIgnorePaths = [
167
168
  `!${path.posix.join(normalizedMastraDir, "tools/**/*.{test,spec}.{js,ts}")}`,
@@ -206,20 +207,23 @@ var Bundler = class extends bundler.MastraBundler {
206
207
  async _bundle(serverFile, mastraEntryFile, {
207
208
  projectRoot,
208
209
  outputDirectory,
209
- enableEsmShim = true
210
+ enableEsmShim = true,
211
+ externals = []
210
212
  }, toolsPaths = [], bundleLocation = path.join(outputDirectory, this.outputDir)) {
211
213
  const analyzeDir = path.join(outputDirectory, this.analyzeOutputDir);
212
214
  let sourcemap = false;
215
+ let externalsPreset = false;
213
216
  try {
214
- const bundlerOptions = await chunkEHZKDGGA_cjs.getBundlerOptions(mastraEntryFile, analyzeDir);
217
+ const bundlerOptions = await chunkKCGBR2X6_cjs.getBundlerOptions(mastraEntryFile, analyzeDir);
215
218
  sourcemap = !!bundlerOptions?.sourcemap;
219
+ externalsPreset = bundlerOptions?.externals === true;
216
220
  } catch (error) {
217
221
  this.logger.debug("Failed to get bundler options, sourcemap will be disabled", { error });
218
222
  }
219
223
  let analyzedBundleInfo;
220
224
  try {
221
225
  const resolvedToolsPaths = await this.listToolsInputOptions(toolsPaths);
222
- analyzedBundleInfo = await chunkEHZKDGGA_cjs.analyzeBundle(
226
+ analyzedBundleInfo = await chunkKCGBR2X6_cjs.analyzeBundle(
223
227
  [serverFile, ...Object.values(resolvedToolsPaths)],
224
228
  mastraEntryFile,
225
229
  {
@@ -227,7 +231,7 @@ var Bundler = class extends bundler.MastraBundler {
227
231
  projectRoot,
228
232
  platform: "node",
229
233
  bundlerOptions: {
230
- enableEsmShim
234
+ externals
231
235
  }
232
236
  },
233
237
  this.logger
@@ -253,7 +257,7 @@ var Bundler = class extends bundler.MastraBundler {
253
257
  if (analyzedBundleInfo.workspaceMap.has(dep)) {
254
258
  continue;
255
259
  }
256
- const rootPath = await chunkEHZKDGGA_cjs.getPackageRootPath(dep);
260
+ const rootPath = await chunkKCGBR2X6_cjs.getPackageRootPath(dep);
257
261
  const pkg2 = await fsExtra.readJSON(`${rootPath}/package.json`);
258
262
  dependenciesToInstall.set(dep, pkg2.version || "latest");
259
263
  } catch {
@@ -268,7 +272,7 @@ var Bundler = class extends bundler.MastraBundler {
268
272
  mastraEntryFile,
269
273
  analyzedBundleInfo,
270
274
  toolsPaths,
271
- { enableSourcemap: sourcemap, enableEsmShim }
275
+ { enableSourcemap: sourcemap, enableEsmShim, externalsPreset }
272
276
  );
273
277
  const bundler = await this.createBundler(
274
278
  {
@@ -339,5 +343,5 @@ export const tools = [${toolsExports.join(", ")}]`
339
343
  };
340
344
 
341
345
  exports.Bundler = Bundler;
342
- //# sourceMappingURL=chunk-PK3AX3KO.cjs.map
343
- //# sourceMappingURL=chunk-PK3AX3KO.cjs.map
346
+ //# sourceMappingURL=chunk-3GOE3SL2.cjs.map
347
+ //# sourceMappingURL=chunk-3GOE3SL2.cjs.map