@mastra/deployer 0.16.4-alpha.2 → 0.17.0-alpha.3

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 (87) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/build/analyze/analyzeEntry.d.ts +33 -0
  3. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -0
  4. package/dist/build/analyze/bundleExternals.d.ts +44 -0
  5. package/dist/build/analyze/bundleExternals.d.ts.map +1 -0
  6. package/dist/build/analyze/constants.d.ts +4 -0
  7. package/dist/build/analyze/constants.d.ts.map +1 -0
  8. package/dist/build/analyze.cjs +2 -6
  9. package/dist/build/analyze.d.ts +9 -24
  10. package/dist/build/analyze.d.ts.map +1 -1
  11. package/dist/build/analyze.js +1 -1
  12. package/dist/build/bundler.cjs +3 -3
  13. package/dist/build/bundler.d.ts +4 -3
  14. package/dist/build/bundler.d.ts.map +1 -1
  15. package/dist/build/bundler.js +1 -1
  16. package/dist/build/index.cjs +12 -12
  17. package/dist/build/index.d.ts +1 -1
  18. package/dist/build/index.js +4 -4
  19. package/dist/build/plugins/pino.d.ts.map +1 -1
  20. package/dist/build/watcher.d.ts +1 -2
  21. package/dist/build/watcher.d.ts.map +1 -1
  22. package/dist/bundler/index.cjs +2 -2
  23. package/dist/bundler/index.d.ts +9 -3
  24. package/dist/bundler/index.d.ts.map +1 -1
  25. package/dist/bundler/index.js +1 -1
  26. package/dist/bundler/workspaceDependencies.d.ts +21 -7
  27. package/dist/bundler/workspaceDependencies.d.ts.map +1 -1
  28. package/dist/{chunk-OUS376P4.cjs → chunk-2JXD2KJI.cjs} +72 -31
  29. package/dist/chunk-2JXD2KJI.cjs.map +1 -0
  30. package/dist/{chunk-PX6ZHD5K.cjs → chunk-4SIOF7ZD.cjs} +5 -5
  31. package/dist/{chunk-PX6ZHD5K.cjs.map → chunk-4SIOF7ZD.cjs.map} +1 -1
  32. package/dist/{chunk-LL2SXZRQ.js → chunk-J3J7AMBG.js} +3 -3
  33. package/dist/{chunk-LL2SXZRQ.js.map → chunk-J3J7AMBG.js.map} +1 -1
  34. package/dist/{chunk-T4L3WY7M.cjs → chunk-M54YPGM4.cjs} +582 -408
  35. package/dist/chunk-M54YPGM4.cjs.map +1 -0
  36. package/dist/{chunk-4CAKOUIN.js → chunk-MIQJS7XN.js} +30 -42
  37. package/dist/chunk-MIQJS7XN.js.map +1 -0
  38. package/dist/{chunk-O7OB4KG5.js → chunk-RZAGSFAM.js} +43 -21
  39. package/dist/chunk-RZAGSFAM.js.map +1 -0
  40. package/dist/{chunk-LN4WTW4C.js → chunk-TWABWFKL.js} +11 -16
  41. package/dist/chunk-TWABWFKL.js.map +1 -0
  42. package/dist/{chunk-ZQJDMTCN.cjs → chunk-YHISSTZJ.cjs} +55 -47
  43. package/dist/chunk-YHISSTZJ.cjs.map +1 -0
  44. package/dist/{chunk-5ZHIZCMJ.js → chunk-YJOKHEUC.js} +575 -401
  45. package/dist/chunk-YJOKHEUC.js.map +1 -0
  46. package/dist/{chunk-JOCAZKZ5.cjs → chunk-YKVNJVGJ.cjs} +15 -20
  47. package/dist/chunk-YKVNJVGJ.cjs.map +1 -0
  48. package/dist/index.cjs +5 -5
  49. package/dist/index.js +2 -2
  50. package/dist/server/handlers/root.d.ts +1 -1
  51. package/dist/server/handlers/root.d.ts.map +1 -1
  52. package/dist/server/index.cjs +154 -8
  53. package/dist/server/index.cjs.map +1 -1
  54. package/dist/server/index.d.ts.map +1 -1
  55. package/dist/server/index.js +135 -8
  56. package/dist/server/index.js.map +1 -1
  57. package/package.json +11 -10
  58. package/dist/build/__fixtures__/no-bundler.d.ts +0 -5
  59. package/dist/build/__fixtures__/no-bundler.d.ts.map +0 -1
  60. package/dist/build/__fixtures__/no-server.d.ts +0 -5
  61. package/dist/build/__fixtures__/no-server.d.ts.map +0 -1
  62. package/dist/build/__fixtures__/no-telemetry.d.ts +0 -5
  63. package/dist/build/__fixtures__/no-telemetry.d.ts.map +0 -1
  64. package/dist/build/plugins/__fixtures__/basic-with-bundler.d.ts +0 -5
  65. package/dist/build/plugins/__fixtures__/basic-with-bundler.d.ts.map +0 -1
  66. package/dist/build/plugins/__fixtures__/basic-with-const.d.ts +0 -5
  67. package/dist/build/plugins/__fixtures__/basic-with-const.d.ts.map +0 -1
  68. package/dist/build/plugins/__fixtures__/basic-with-function.d.ts +0 -5
  69. package/dist/build/plugins/__fixtures__/basic-with-function.d.ts.map +0 -1
  70. package/dist/build/plugins/__fixtures__/basic-with-import.d.ts +0 -5
  71. package/dist/build/plugins/__fixtures__/basic-with-import.d.ts.map +0 -1
  72. package/dist/build/plugins/__fixtures__/basic-with-json.d.ts +0 -3
  73. package/dist/build/plugins/__fixtures__/basic-with-json.d.ts.map +0 -1
  74. package/dist/build/plugins/__fixtures__/basic.d.ts +0 -5
  75. package/dist/build/plugins/__fixtures__/basic.d.ts.map +0 -1
  76. package/dist/build/plugins/__fixtures__/empty-mastra.d.ts +0 -3
  77. package/dist/build/plugins/__fixtures__/empty-mastra.d.ts.map +0 -1
  78. package/dist/build/plugins/__fixtures__/mastra-with-extra-code.d.ts +0 -13
  79. package/dist/build/plugins/__fixtures__/mastra-with-extra-code.d.ts.map +0 -1
  80. package/dist/chunk-4CAKOUIN.js.map +0 -1
  81. package/dist/chunk-5ZHIZCMJ.js.map +0 -1
  82. package/dist/chunk-JOCAZKZ5.cjs.map +0 -1
  83. package/dist/chunk-LN4WTW4C.js.map +0 -1
  84. package/dist/chunk-O7OB4KG5.js.map +0 -1
  85. package/dist/chunk-OUS376P4.cjs.map +0 -1
  86. package/dist/chunk-T4L3WY7M.cjs.map +0 -1
  87. package/dist/chunk-ZQJDMTCN.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.17.0-alpha.3
4
+
5
+ ### Minor Changes
6
+
7
+ - The `IBundler` and subsequently the `IDeployer` interface changed, making the third argument of `bundle()` an object. ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
8
+
9
+ ```diff
10
+ - bundle(entryFile: string, outputDirectory: string, toolsPaths: (string | string[])[]): Promise<void>;
11
+ + bundle(entryFile: string, outputDirectory: string, options: { toolsPaths: (string | string[])[]; projectRoot: string }): Promise<void>;
12
+ ```
13
+
14
+ If you're just using the deployer inside `src/mastra/index.ts` you're safe to upgrade, no changes needed.
15
+
16
+ - Improved workspace dependency resolution during development and builds. This makes the build process more reliable when working with monorepos and workspace packages, reducing potential bundling errors and improving development experience. ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
17
+
18
+ ### Patch Changes
19
+
20
+ - dependencies updates: ([#6887](https://github.com/mastra-ai/mastra/pull/6887))
21
+ - Updated dependency [`@babel/core@^7.28.4` ↗︎](https://www.npmjs.com/package/@babel/core/v/7.28.4) (from `^7.28.0`, in `dependencies`)
22
+
23
+ - dependencies updates: ([#7538](https://github.com/mastra-ai/mastra/pull/7538))
24
+ - Updated dependency [`esbuild@^0.25.9` ↗︎](https://www.npmjs.com/package/esbuild/v/0.25.9) (from `^0.25.8`, in `dependencies`)
25
+
26
+ - dependencies updates: ([#7803](https://github.com/mastra-ai/mastra/pull/7803))
27
+ - Updated dependency [`rollup@~4.50.1` ↗︎](https://www.npmjs.com/package/rollup/v/4.50.1) (from `~4.50.0`, in `dependencies`)
28
+
29
+ - Improve default /api route by giving helpful information ([#7826](https://github.com/mastra-ai/mastra/pull/7826))
30
+
31
+ - Add support for running the Mastra dev server over HTTPS for local development. ([#7871](https://github.com/mastra-ai/mastra/pull/7871))
32
+ - Add `--https` flag for `mastra dev`. This automatically creates a local key and certificate for you.
33
+ - Alternatively, you can provide your own key and cert through `server.https`:
34
+
35
+ ```ts
36
+ // src/mastra/index.ts
37
+ import { Mastra } from '@mastra/core/mastra';
38
+ import fs from 'node:fs';
39
+
40
+ export const mastra = new Mastra({
41
+ server: {
42
+ https: {
43
+ key: fs.readFileSync('path/to/key.pem'),
44
+ cert: fs.readFileSync('path/to/cert.pem'),
45
+ },
46
+ },
47
+ });
48
+ ```
49
+
50
+ - Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`3779975`](https://github.com/mastra-ai/mastra/commit/3779975a1ea301c9077ea2d595e5506699c900a6), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
51
+ - @mastra/core@0.17.0-alpha.3
52
+ - @mastra/server@0.17.0-alpha.3
53
+
3
54
  ## 0.16.4-alpha.2
4
55
 
5
56
  ### Patch Changes
@@ -0,0 +1,33 @@
1
+ import { type IMastraLogger } from '@mastra/core/logger';
2
+ import { type SourceMap } from 'rollup';
3
+ import { type WorkspacePackageInfo } from '../../bundler/workspaceDependencies.js';
4
+ import type { DependencyMetadata } from '../types.js';
5
+ /**
6
+ * Analyzes the entry file to identify external dependencies and their imports. This allows us to treeshake all code that is not used.
7
+ *
8
+ * @param entryConfig - Configuration object for the entry file
9
+ * @param entryConfig.entry - The entry file path or content
10
+ * @param entryConfig.isVirtualFile - Whether the entry is a virtual file (content string) or a file path
11
+ * @param mastraEntry - The mastra entry point
12
+ * @param options - Configuration options for the analysis
13
+ * @param options.logger - Logger instance for debugging
14
+ * @param options.sourcemapEnabled - Whether sourcemaps are enabled
15
+ * @param options.workspaceMap - Map of workspace packages
16
+ * @returns A promise that resolves to an object containing the analyzed dependencies and generated output
17
+ */
18
+ export declare function analyzeEntry({ entry, isVirtualFile, }: {
19
+ entry: string;
20
+ isVirtualFile: boolean;
21
+ }, mastraEntry: string, { logger, sourcemapEnabled, workspaceMap, projectRoot, }: {
22
+ logger: IMastraLogger;
23
+ sourcemapEnabled: boolean;
24
+ workspaceMap: Map<string, WorkspacePackageInfo>;
25
+ projectRoot: string;
26
+ }): Promise<{
27
+ dependencies: Map<string, DependencyMetadata>;
28
+ output: {
29
+ code: string;
30
+ map: SourceMap | null;
31
+ };
32
+ }>;
33
+ //# sourceMappingURL=analyzeEntry.d.ts.map
@@ -0,0 +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;AAiLnD;;;;;;;;;;;;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"}
@@ -0,0 +1,44 @@
1
+ import { type OutputChunk, type OutputAsset } from 'rollup';
2
+ import { type WorkspacePackageInfo } from '../../bundler/workspaceDependencies.js';
3
+ import type { DependencyMetadata } from '../types.js';
4
+ type VirtualDependency = {
5
+ name: string;
6
+ virtual: string;
7
+ };
8
+ /**
9
+ * Creates virtual dependency modules for optimized bundling by generating virtual entry points for each dependency with their specific exports and handling workspace package path resolution.
10
+ */
11
+ export declare function createVirtualDependencies(depsToOptimize: Map<string, DependencyMetadata>, { projectRoot, workspaceRoot, outputDir }: {
12
+ workspaceRoot: string | null;
13
+ projectRoot: string;
14
+ outputDir: string;
15
+ }): {
16
+ optimizedDependencyEntries: Map<string, VirtualDependency>;
17
+ fileNameToDependencyMap: Map<string, string>;
18
+ };
19
+ /**
20
+ * Bundles vendor dependencies identified in the analysis step.
21
+ * Creates virtual modules for each dependency and bundles them using rollup.
22
+ *
23
+ * @param depsToOptimize - Map of dependencies to optimize with their metadata (exported bindings, rootPath, isWorkspace)
24
+ * @param outputDir - Directory where bundled files will be written
25
+ * @param logger - Logger instance for debugging
26
+ * @returns Object containing bundle output and reference map for validation
27
+ */
28
+ export declare function bundleExternals(depsToOptimize: Map<string, DependencyMetadata>, outputDir: string, options: {
29
+ bundlerOptions?: {
30
+ externals?: string[];
31
+ transpilePackages?: string[];
32
+ isDev?: boolean;
33
+ enableEsmShim?: boolean;
34
+ } | null;
35
+ projectRoot?: string;
36
+ workspaceRoot?: string;
37
+ workspaceMap?: Map<string, WorkspacePackageInfo>;
38
+ }): Promise<{
39
+ output: [OutputChunk, ...(OutputAsset | OutputChunk)[]];
40
+ fileNameToDependencyMap: Map<string, string>;
41
+ usedExternals: Record<string, Record<string, string>>;
42
+ }>;
43
+ export {};
44
+ //# sourceMappingURL=bundleExternals.d.ts.map
@@ -0,0 +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;AAIpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC/C,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE;IAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClH;IACD,0BAA0B,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3D,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C,CA+DA;AA6JD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IACP,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,GAAG,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;;;;GA4EF"}
@@ -0,0 +1,4 @@
1
+ export declare const DEPS_TO_IGNORE: string[];
2
+ export declare const GLOBAL_EXTERNALS: string[];
3
+ export declare const DEPRECATED_EXTERNALS: string[];
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +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,UAAsE,CAAC;AACpG,eAAO,MAAM,oBAAoB,UAAkD,CAAC"}
@@ -1,16 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkT4L3WY7M_cjs = require('../chunk-T4L3WY7M.cjs');
3
+ var chunkM54YPGM4_cjs = require('../chunk-M54YPGM4.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "analyzeBundle", {
8
8
  enumerable: true,
9
- get: function () { return chunkT4L3WY7M_cjs.analyzeBundle; }
10
- });
11
- Object.defineProperty(exports, "bundleExternals", {
12
- enumerable: true,
13
- get: function () { return chunkT4L3WY7M_cjs.bundleExternals; }
9
+ get: function () { return chunkM54YPGM4_cjs.analyzeBundle; }
14
10
  });
15
11
  //# sourceMappingURL=analyze.cjs.map
16
12
  //# sourceMappingURL=analyze.cjs.map
@@ -1,28 +1,5 @@
1
1
  import type { IMastraLogger } from '@mastra/core/logger';
2
- import { type OutputAsset, type OutputChunk } from 'rollup';
3
2
  import { type WorkspacePackageInfo } from '../bundler/workspaceDependencies.js';
4
- import type { DependencyMetadata } from './types.js';
5
- /**
6
- * Bundles vendor dependencies identified in the analysis step.
7
- * Creates virtual modules for each dependency and bundles them using rollup.
8
- *
9
- * @param depsToOptimize - Map of dependencies to optimize with their metadata (exported bindings, rootPath, isWorkspace)
10
- * @param outputDir - Directory where bundled files will be written
11
- * @param logger - Logger instance for debugging
12
- * @returns Object containing bundle output and reference map for validation
13
- */
14
- export declare function bundleExternals(depsToOptimize: Map<string, DependencyMetadata>, outputDir: string, logger: IMastraLogger, bundlerOptions?: {
15
- externals?: string[];
16
- transpilePackages?: string[];
17
- isDev?: boolean;
18
- }, meta?: {
19
- workspaceRoot?: string;
20
- workspaceMap?: Map<string, WorkspacePackageInfo>;
21
- }): Promise<{
22
- output: [OutputChunk, ...(OutputAsset | OutputChunk)[]];
23
- reverseVirtualReferenceMap: Map<string, string>;
24
- usedExternals: Record<string, Record<string, string>>;
25
- }>;
26
3
  /**
27
4
  * Main bundle analysis function that orchestrates the three-step process:
28
5
  * 1. Analyze dependencies
@@ -31,7 +8,15 @@ export declare function bundleExternals(depsToOptimize: Map<string, DependencyMe
31
8
  *
32
9
  * This helps identify which dependencies need to be externalized vs bundled.
33
10
  */
34
- export declare function analyzeBundle(entries: string[], mastraEntry: string, outputDir: string, platform: 'node' | 'browser', logger: IMastraLogger, sourcemapEnabled?: boolean): Promise<{
11
+ export declare function analyzeBundle(entries: string[], mastraEntry: string, { outputDir, projectRoot, isDev, bundlerOptions: _bundlerOptions, }: {
12
+ outputDir: string;
13
+ projectRoot: string;
14
+ platform: 'node' | 'browser';
15
+ isDev?: boolean;
16
+ bundlerOptions?: {
17
+ enableEsmShim?: boolean;
18
+ } | null;
19
+ }, logger: IMastraLogger): Promise<{
35
20
  invalidChunks: Set<string>;
36
21
  dependencies: Map<string, string>;
37
22
  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;AAUzD,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,WAAW,EAAe,MAAM,QAAQ,CAAC;AAYjF,O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AC;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;;;;;GAsGtB"}
@@ -1,3 +1,3 @@
1
- export { analyzeBundle, bundleExternals } from '../chunk-5ZHIZCMJ.js';
1
+ export { analyzeBundle } from '../chunk-YJOKHEUC.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 chunkJOCAZKZ5_cjs = require('../chunk-JOCAZKZ5.cjs');
3
+ var chunkYKVNJVGJ_cjs = require('../chunk-YKVNJVGJ.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createBundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkJOCAZKZ5_cjs.createBundler; }
9
+ get: function () { return chunkYKVNJVGJ_cjs.createBundler; }
10
10
  });
11
11
  Object.defineProperty(exports, "getInputOptions", {
12
12
  enumerable: true,
13
- get: function () { return chunkJOCAZKZ5_cjs.getInputOptions; }
13
+ get: function () { return chunkYKVNJVGJ_cjs.getInputOptions; }
14
14
  });
15
15
  //# sourceMappingURL=bundler.cjs.map
16
16
  //# sourceMappingURL=bundler.cjs.map
@@ -1,10 +1,11 @@
1
1
  import { type InputOptions, type OutputOptions } from 'rollup';
2
- import { analyzeBundle } from './analyze.js';
3
- export declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser', env?: Record<string, string>, { sourcemap, enableEsmShim, isDev, workspaceRoot, }?: {
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, }: {
4
4
  sourcemap?: boolean;
5
- enableEsmShim?: boolean;
6
5
  isDev?: boolean;
7
6
  workspaceRoot?: string;
7
+ projectRoot: string;
8
+ enableEsmShim?: boolean;
8
9
  }): Promise<InputOptions>;
9
10
  export declare function createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
10
11
  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;AAK1C,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,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA4D,EACtF,EACE,SAAiB,EACjB,aAAoB,EACpB,KAAa,EACb,aAAyB,GAC1B,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GAChG,OAAO,CAAC,YAAY,CAAC,CAsIvB;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;AAK1C,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,CA+HvB;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-LN4WTW4C.js';
1
+ export { createBundler, getInputOptions } from '../chunk-TWABWFKL.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 chunkZQJDMTCN_cjs = require('../chunk-ZQJDMTCN.cjs');
4
- var chunkPX6ZHD5K_cjs = require('../chunk-PX6ZHD5K.cjs');
5
- var chunkJOCAZKZ5_cjs = require('../chunk-JOCAZKZ5.cjs');
6
- var chunkT4L3WY7M_cjs = require('../chunk-T4L3WY7M.cjs');
3
+ var chunkYHISSTZJ_cjs = require('../chunk-YHISSTZJ.cjs');
4
+ var chunk4SIOF7ZD_cjs = require('../chunk-4SIOF7ZD.cjs');
5
+ var chunkYKVNJVGJ_cjs = require('../chunk-YKVNJVGJ.cjs');
6
+ var chunkM54YPGM4_cjs = require('../chunk-M54YPGM4.cjs');
7
7
  var chunkHR2HOA5D_cjs = require('../chunk-HR2HOA5D.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "createWatcher", {
12
12
  enumerable: true,
13
- get: function () { return chunkZQJDMTCN_cjs.createWatcher; }
13
+ get: function () { return chunkYHISSTZJ_cjs.createWatcher; }
14
14
  });
15
15
  Object.defineProperty(exports, "getServerOptions", {
16
16
  enumerable: true,
17
- get: function () { return chunkZQJDMTCN_cjs.getServerOptions; }
17
+ get: function () { return chunkYHISSTZJ_cjs.getServerOptions; }
18
18
  });
19
19
  Object.defineProperty(exports, "getWatcherInputOptions", {
20
20
  enumerable: true,
21
- get: function () { return chunkZQJDMTCN_cjs.getInputOptions; }
21
+ get: function () { return chunkYHISSTZJ_cjs.getInputOptions; }
22
22
  });
23
23
  Object.defineProperty(exports, "writeTelemetryConfig", {
24
24
  enumerable: true,
25
- get: function () { return chunkPX6ZHD5K_cjs.writeTelemetryConfig; }
25
+ get: function () { return chunk4SIOF7ZD_cjs.writeTelemetryConfig; }
26
26
  });
27
27
  Object.defineProperty(exports, "createBundler", {
28
28
  enumerable: true,
29
- get: function () { return chunkJOCAZKZ5_cjs.createBundler; }
29
+ get: function () { return chunkYKVNJVGJ_cjs.createBundler; }
30
30
  });
31
31
  Object.defineProperty(exports, "getBundlerInputOptions", {
32
32
  enumerable: true,
33
- get: function () { return chunkJOCAZKZ5_cjs.getInputOptions; }
33
+ get: function () { return chunkYKVNJVGJ_cjs.getInputOptions; }
34
34
  });
35
35
  Object.defineProperty(exports, "analyzeBundle", {
36
36
  enumerable: true,
37
- get: function () { return chunkT4L3WY7M_cjs.analyzeBundle; }
37
+ get: function () { return chunkM54YPGM4_cjs.analyzeBundle; }
38
38
  });
39
39
  Object.defineProperty(exports, "getBundlerOptions", {
40
40
  enumerable: true,
41
- get: function () { return chunkT4L3WY7M_cjs.getBundlerOptions; }
41
+ get: function () { return chunkM54YPGM4_cjs.getBundlerOptions; }
42
42
  });
43
43
  Object.defineProperty(exports, "Deps", {
44
44
  enumerable: true,
@@ -1,6 +1,6 @@
1
1
  export { createBundler, getInputOptions as getBundlerInputOptions } from './bundler.js';
2
2
  export { createWatcher, getInputOptions as getWatcherInputOptions } from './watcher.js';
3
- export { analyzeBundle } from './analyze.js';
3
+ export { analyzeBundle } from './analyze/index.js';
4
4
  export { FileService } from '../services/fs.js';
5
5
  export { Deps } from '../services/deps.js';
6
6
  export { writeTelemetryConfig } from './telemetry.js';
@@ -1,7 +1,7 @@
1
- export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-4CAKOUIN.js';
2
- export { writeTelemetryConfig } from '../chunk-LL2SXZRQ.js';
3
- export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-LN4WTW4C.js';
4
- export { analyzeBundle, getBundlerOptions } from '../chunk-5ZHIZCMJ.js';
1
+ export { createWatcher, getServerOptions, getInputOptions as getWatcherInputOptions } from '../chunk-MIQJS7XN.js';
2
+ export { writeTelemetryConfig } from '../chunk-J3J7AMBG.js';
3
+ export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-TWABWFKL.js';
4
+ export { analyzeBundle, getBundlerOptions } from '../chunk-YJOKHEUC.js';
5
5
  export { Deps, FileService } from '../chunk-YOULDYHE.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pino.d.ts","sourceRoot":"","sources":["../../../src/build/plugins/pino.ts"],"names":[],"mappings":"AAGA,wBAAgB,IAAI;;;;;;;;;;;EAmGnB"}
1
+ {"version":3,"file":"pino.d.ts","sourceRoot":"","sources":["../../../src/build/plugins/pino.ts"],"names":[],"mappings":"AAGA,wBAAgB,IAAI;;;;;;;;;;;EAkGnB"}
@@ -1,7 +1,6 @@
1
1
  import type { InputOptions, OutputOptions } from 'rollup';
2
- export declare function getInputOptions(entryFile: string, platform: 'node' | 'browser', env?: Record<string, string>, { sourcemap, transpilePackages }?: {
2
+ export declare function getInputOptions(entryFile: string, platform: 'node' | 'browser', env?: Record<string, string>, { sourcemap }?: {
3
3
  sourcemap?: boolean;
4
- transpilePackages?: string[];
5
4
  }): Promise<InputOptions>;
6
5
  export declare function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<import("rollup").RollupWatcher>;
7
6
  //# sourceMappingURL=watcher.d.ts.map
@@ -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,iBAAsB,EAAE,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,yBAqF1G;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;AAclE,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,yBAsEpD;AAED,wBAAsB,aAAa,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,2CAY3F"}
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkOUS376P4_cjs = require('../chunk-OUS376P4.cjs');
3
+ var chunk2JXD2KJI_cjs = require('../chunk-2JXD2KJI.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Bundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkOUS376P4_cjs.Bundler; }
9
+ get: function () { return chunk2JXD2KJI_cjs.Bundler; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { MastraBundler } from '@mastra/core/bundler';
2
2
  import type { InputOptions, OutputOptions } from 'rollup';
3
- import { analyzeBundle } from '../build/analyze.js';
3
+ import { analyzeBundle } from '../build/analyze/index.js';
4
4
  export declare abstract class Bundler extends MastraBundler {
5
5
  protected analyzeOutputDir: string;
6
6
  protected outputDir: string;
@@ -14,7 +14,9 @@ export declare abstract class Bundler extends MastraBundler {
14
14
  write: () => Promise<import("rollup").RollupOutput>;
15
15
  close: () => Promise<void>;
16
16
  }>;
17
- protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string): Promise<{
17
+ protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string, { enableEsmShim }?: {
18
+ enableEsmShim?: boolean;
19
+ }): Promise<{
18
20
  invalidChunks: Set<string>;
19
21
  dependencies: Map<string, string>;
20
22
  externalDependencies: Set<string>;
@@ -31,7 +33,11 @@ export declare abstract class Bundler extends MastraBundler {
31
33
  enableEsmShim?: boolean;
32
34
  }): Promise<InputOptions>;
33
35
  getToolsInputOptions(toolsPaths: (string | string[])[]): Promise<Record<string, string>>;
34
- protected _bundle(serverFile: string, mastraEntryFile: string, outputDirectory: string, toolsPaths?: (string | string[])[], bundleLocation?: string): Promise<void>;
36
+ protected _bundle(serverFile: string, mastraEntryFile: string, { projectRoot, outputDirectory, enableEsmShim, }: {
37
+ projectRoot: string;
38
+ outputDirectory: string;
39
+ enableEsmShim?: boolean;
40
+ }, toolsPaths?: (string | string[])[], bundleLocation?: string): Promise<void>;
35
41
  lint(_entryFile: string, _outputDirectory: string, toolsPaths: (string | string[])[]): Promise<void>;
36
42
  }
37
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKrD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUjD,8BAAsB,OAAQ,SAAQ,aAAa;IACjD,SAAS,CAAC,gBAAgB,SAAY;IACtC,SAAS,CAAC,SAAS,SAAY;gBAEnB,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,SAAS,GAAG,UAAsB;IAIjE,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/C,wBAAwB,CAAC,eAAe,EAAE,MAAM,EAAE,yBAAyB,CAAC,EAAE,MAAM;IAWpF,gBAAgB,CACpB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA0DtC,SAAS,CAAC,aAAa,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;;;;cAI3F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;;;;;;cAU7E,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,SAAgB;cAOpE,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;cAYrD,YAAY,CAAC,EA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BAAoB,CAAC,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE;cAmC5C,OAAO,CACrB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,EACE,WAAW,EACX,eAAe,EACf,aAAoB,GACrB,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,EAC5E,UAAU,GAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAO,EACtC,cAAc,GAAE,MAA8C,GAC7D,OAAO,CAAC,IAAI,CAAC;IAsOV,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-O7OB4KG5.js';
1
+ export { Bundler } from '../chunk-RZAGSFAM.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -9,14 +9,28 @@ type TransitiveDependencyResult = {
9
9
  usedWorkspacePackages: Set<string>;
10
10
  };
11
11
  /**
12
- * Creates a map of workspace packages with their metadata for dependency resolution
13
- * @returns Map of package names to their location, dependencies and version
12
+ * A utility function around find-workspaces to get information about:
13
+ * - Which workspace packages are available in the project
14
+ * - What is the workspace root location
15
+ * - Is the current package a workspace package
16
+ *
17
+ * Because `findWorkspacesRoot` only traverses up until it finds workspace information, but doesn't check if the current package is even part of the workspace. We rather want to return `null` for these cases because in other code paths we use `workspaceRoot || projectRoot` to determine the root of the project.
18
+ *
19
+ * @params dir - The directory to start searching from (default: `process.cwd()`)
20
+ * @params location - The location of the current package (usually the directory containing the package.json)
14
21
  */
15
- export declare const createWorkspacePackageMap: () => Promise<Map<string, {
16
- location: string;
17
- dependencies: Record<string, string> | undefined;
18
- version: string | undefined;
19
- }>>;
22
+ export declare function getWorkspaceInformation({ dir, mastraEntryFile, }: {
23
+ dir?: string;
24
+ mastraEntryFile: string;
25
+ }): Promise<{
26
+ workspaceMap: Map<string, {
27
+ location: string;
28
+ dependencies: Record<string, string> | undefined;
29
+ version: string | undefined;
30
+ }>;
31
+ workspaceRoot: string | undefined;
32
+ isWorkspacePackage: boolean;
33
+ }>;
20
34
  /**
21
35
  * Collects all transitive workspace dependencies and their TGZ paths
22
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceDependencies.d.ts","sourceRoot":"","sources":["../../src/bundler/workspaceDependencies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;GAerC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sCAAsC,GAAI,gDAIpD;IACD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAChD,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC;CACvB,KAAG,0BAyCH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAU,mEAK7C;IACD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM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