@mastra/deployer 1.52.0-alpha.11 → 1.52.0-alpha.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 (40) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/build/analyze.cjs +2 -2
  3. package/dist/build/analyze.d.ts +1 -0
  4. package/dist/build/analyze.d.ts.map +1 -1
  5. package/dist/build/analyze.js +1 -1
  6. package/dist/build/analyzeEntryProjectType.d.ts +12 -0
  7. package/dist/build/analyzeEntryProjectType.d.ts.map +1 -0
  8. package/dist/build/babel/check-config-export.d.ts +1 -0
  9. package/dist/build/babel/check-config-export.d.ts.map +1 -1
  10. package/dist/build/index.cjs +27 -23
  11. package/dist/build/index.d.ts +1 -0
  12. package/dist/build/index.d.ts.map +1 -1
  13. package/dist/build/index.js +3 -3
  14. package/dist/bundler/index.cjs +3 -3
  15. package/dist/bundler/index.d.ts +7 -0
  16. package/dist/bundler/index.d.ts.map +1 -1
  17. package/dist/bundler/index.js +1 -1
  18. package/dist/{chunk-EPALJ45Z.js → chunk-FAMWV7SW.js} +20 -8
  19. package/dist/chunk-FAMWV7SW.js.map +1 -0
  20. package/dist/{chunk-SYWSF3OR.cjs → chunk-LQS6ER47.cjs} +32 -7
  21. package/dist/chunk-LQS6ER47.cjs.map +1 -0
  22. package/dist/{chunk-3XJRELIX.js → chunk-QOVY44KF.js} +16 -5
  23. package/dist/chunk-QOVY44KF.js.map +1 -0
  24. package/dist/{chunk-4ZFC5V33.js → chunk-RMK7DBLQ.js} +29 -4
  25. package/dist/chunk-RMK7DBLQ.js.map +1 -0
  26. package/dist/{chunk-5ODCZKB7.cjs → chunk-S442I43F.cjs} +18 -6
  27. package/dist/chunk-S442I43F.cjs.map +1 -0
  28. package/dist/{chunk-YAIYFXQ6.cjs → chunk-SCK7B2XJ.cjs} +19 -6
  29. package/dist/chunk-SCK7B2XJ.cjs.map +1 -0
  30. package/dist/docs/SKILL.md +1 -1
  31. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  32. package/dist/index.cjs +2 -2
  33. package/dist/index.js +1 -1
  34. package/package.json +5 -5
  35. package/dist/chunk-3XJRELIX.js.map +0 -1
  36. package/dist/chunk-4ZFC5V33.js.map +0 -1
  37. package/dist/chunk-5ODCZKB7.cjs.map +0 -1
  38. package/dist/chunk-EPALJ45Z.js.map +0 -1
  39. package/dist/chunk-SYWSF3OR.cjs.map +0 -1
  40. package/dist/chunk-YAIYFXQ6.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 1.52.0-alpha.13
4
+
5
+ ### Minor Changes
6
+
7
+ - Added automatic detection of Software Factory projects from the Mastra entry's imports. When a Factory entry is detected, the bundler writes a `mastra-project.json` manifest to `.mastra/output/` identifying the project type and UI asset location. Also exposed an `analyzeEntryProjectType` helper for pre-build classification. ([#19948](https://github.com/mastra-ai/mastra/pull/19948))
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies:
12
+ - @mastra/core@1.52.0-alpha.13
13
+ - @mastra/server@1.52.0-alpha.13
14
+
15
+ ## 1.52.0-alpha.12
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`d7385ad`](https://github.com/mastra-ai/mastra/commit/d7385ad9e88f9e4f33d15c0ec0bfebedde0cbc2e), [`3d6e539`](https://github.com/mastra-ai/mastra/commit/3d6e539272eb2ea0407034605ee1906b3be06b39), [`35865a5`](https://github.com/mastra-ai/mastra/commit/35865a53e194aa9634d6a70a97010e7a6b9d58b1), [`70687f7`](https://github.com/mastra-ai/mastra/commit/70687f7e495a322a02070b4a67cb0c77a5ca91ec), [`3d6e539`](https://github.com/mastra-ai/mastra/commit/3d6e539272eb2ea0407034605ee1906b3be06b39)]:
20
+ - @mastra/core@1.52.0-alpha.12
21
+ - @mastra/server@1.52.0-alpha.12
22
+
3
23
  ## 1.52.0-alpha.11
4
24
 
5
25
  ### Patch Changes
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkYAIYFXQ6_cjs = require('../chunk-YAIYFXQ6.cjs');
3
+ var chunkSCK7B2XJ_cjs = require('../chunk-SCK7B2XJ.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "analyzeBundle", {
8
8
  enumerable: true,
9
- get: function () { return chunkYAIYFXQ6_cjs.analyzeBundle; }
9
+ get: function () { return chunkSCK7B2XJ_cjs.analyzeBundle; }
10
10
  });
11
11
  //# sourceMappingURL=analyze.cjs.map
12
12
  //# sourceMappingURL=analyze.cjs.map
@@ -17,6 +17,7 @@ export declare function analyzeBundle(entries: string[], mastraEntry: string, {
17
17
  isDev?: boolean;
18
18
  bundlerOptions?: Pick<BundlerOptions, 'externals' | 'enableSourcemap' | 'dynamicPackages'> | null;
19
19
  }, logger: IMastraLogger): Promise<{
20
+ projectType?: string | undefined;
20
21
  externalDependencies: Map<string, ExternalDependencyInfo>;
21
22
  dependencies: Map<string, string>;
22
23
  workspaceMap: Map<string, WorkspacePackageInfo>;
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/build/analyze.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAQ7E,OAAO,KAAK,EAAE,cAAc,EAAsB,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAS1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkV/C;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EACnB,EACE,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAa,EACb,cAAc,GACf,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,iBAAiB,GAAG,iBAAiB,CAAC,GAAG,IAAI,CAAC;CACnG,EACD,MAAM,EAAE,aAAa;;;;GA8PtB"}
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/build/analyze.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAQ7E,OAAO,KAAK,EAAE,cAAc,EAAsB,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAS1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkV/C;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EACnB,EACE,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAa,EACb,cAAc,GACf,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,iBAAiB,GAAG,iBAAiB,CAAC,GAAG,IAAI,CAAC;CACnG,EACD,MAAM,EAAE,aAAa;;;;;GA6PtB"}
@@ -1,3 +1,3 @@
1
- export { analyzeBundle } from '../chunk-EPALJ45Z.js';
1
+ export { analyzeBundle } from '../chunk-FAMWV7SW.js';
2
2
  //# sourceMappingURL=analyze.js.map
3
3
  //# sourceMappingURL=analyze.js.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Lightweight entry analysis that returns the detected project type by running
3
+ * only the Babel check-config-export plugin on the Mastra entry file. This is
4
+ * intentionally cheaper than `analyzeBundle` and is used by the CLI before
5
+ * `prepare()` clears `.mastra` to decide whether Factory-specific assets
6
+ * should be copied.
7
+ *
8
+ * Returns `'factory'` when the entry imports `MastraFactory` and
9
+ * constructs it, or `undefined` for ordinary Mastra projects.
10
+ */
11
+ export declare function analyzeEntryProjectType(mastraEntry: string): Promise<string | undefined>;
12
+ //# sourceMappingURL=analyzeEntryProjectType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyzeEntryProjectType.d.ts","sourceRoot":"","sources":["../../src/build/analyzeEntryProjectType.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW9F"}
@@ -1,5 +1,6 @@
1
1
  import type { PluginObject } from '@babel/core';
2
2
  export declare function checkConfigExport(result: {
3
3
  hasValidConfig: boolean;
4
+ projectType?: string;
4
5
  }): PluginObject;
5
6
  //# sourceMappingURL=check-config-export.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-config-export.d.ts","sourceRoot":"","sources":["../../../src/build/babel/check-config-export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,CAmDnF"}
1
+ {"version":3,"file":"check-config-export.d.ts","sourceRoot":"","sources":["../../../src/build/babel/check-config-export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAwEzG"}
@@ -1,57 +1,61 @@
1
1
  'use strict';
2
2
 
3
- var chunk5ODCZKB7_cjs = require('../chunk-5ODCZKB7.cjs');
3
+ var chunkS442I43F_cjs = require('../chunk-S442I43F.cjs');
4
4
  var chunk36AWZH7Z_cjs = require('../chunk-36AWZH7Z.cjs');
5
- var chunkYAIYFXQ6_cjs = require('../chunk-YAIYFXQ6.cjs');
6
- var chunk3XIMK24X_cjs = require('../chunk-3XIMK24X.cjs');
5
+ var chunkSCK7B2XJ_cjs = require('../chunk-SCK7B2XJ.cjs');
7
6
  var chunkFKKJQUGR_cjs = require('../chunk-FKKJQUGR.cjs');
7
+ var chunk3XIMK24X_cjs = require('../chunk-3XIMK24X.cjs');
8
8
  var chunkJZRFRUGM_cjs = require('../chunk-JZRFRUGM.cjs');
9
9
 
10
10
 
11
11
 
12
+ Object.defineProperty(exports, "analyzeEntryProjectType", {
13
+ enumerable: true,
14
+ get: function () { return chunkS442I43F_cjs.analyzeEntryProjectType; }
15
+ });
12
16
  Object.defineProperty(exports, "createWatcher", {
13
17
  enumerable: true,
14
- get: function () { return chunk5ODCZKB7_cjs.createWatcher; }
18
+ get: function () { return chunkS442I43F_cjs.createWatcher; }
15
19
  });
16
20
  Object.defineProperty(exports, "discoverFsAgents", {
17
21
  enumerable: true,
18
- get: function () { return chunk5ODCZKB7_cjs.discoverFsAgents; }
22
+ get: function () { return chunkS442I43F_cjs.discoverFsAgents; }
19
23
  });
20
24
  Object.defineProperty(exports, "discoverFsSingleton", {
21
25
  enumerable: true,
22
- get: function () { return chunk5ODCZKB7_cjs.discoverFsSingleton; }
26
+ get: function () { return chunkS442I43F_cjs.discoverFsSingleton; }
23
27
  });
24
28
  Object.defineProperty(exports, "discoverFsWorkflows", {
25
29
  enumerable: true,
26
- get: function () { return chunk5ODCZKB7_cjs.discoverFsWorkflows; }
30
+ get: function () { return chunkS442I43F_cjs.discoverFsWorkflows; }
27
31
  });
28
32
  Object.defineProperty(exports, "generateFsAgentsModule", {
29
33
  enumerable: true,
30
- get: function () { return chunk5ODCZKB7_cjs.generateFsAgentsModule; }
34
+ get: function () { return chunkS442I43F_cjs.generateFsAgentsModule; }
31
35
  });
32
36
  Object.defineProperty(exports, "generateFsWorkflowsCodegen", {
33
37
  enumerable: true,
34
- get: function () { return chunk5ODCZKB7_cjs.generateFsWorkflowsCodegen; }
38
+ get: function () { return chunkS442I43F_cjs.generateFsWorkflowsCodegen; }
35
39
  });
36
40
  Object.defineProperty(exports, "getServerOptions", {
37
41
  enumerable: true,
38
- get: function () { return chunk5ODCZKB7_cjs.getServerOptions; }
42
+ get: function () { return chunkS442I43F_cjs.getServerOptions; }
39
43
  });
40
44
  Object.defineProperty(exports, "getWatcherInputOptions", {
41
45
  enumerable: true,
42
- get: function () { return chunk5ODCZKB7_cjs.getInputOptions; }
46
+ get: function () { return chunkS442I43F_cjs.getInputOptions; }
43
47
  });
44
48
  Object.defineProperty(exports, "mirrorFsAgentWorkspaces", {
45
49
  enumerable: true,
46
- get: function () { return chunk5ODCZKB7_cjs.mirrorFsAgentWorkspaces; }
50
+ get: function () { return chunkS442I43F_cjs.mirrorFsAgentWorkspaces; }
47
51
  });
48
52
  Object.defineProperty(exports, "prepareFsAgentsEntry", {
49
53
  enumerable: true,
50
- get: function () { return chunk5ODCZKB7_cjs.prepareFsAgentsEntry; }
54
+ get: function () { return chunkS442I43F_cjs.prepareFsAgentsEntry; }
51
55
  });
52
56
  Object.defineProperty(exports, "writeFsAgentsEntry", {
53
57
  enumerable: true,
54
- get: function () { return chunk5ODCZKB7_cjs.writeFsAgentsEntry; }
58
+ get: function () { return chunkS442I43F_cjs.writeFsAgentsEntry; }
55
59
  });
56
60
  Object.defineProperty(exports, "getBundlerOptions", {
57
61
  enumerable: true,
@@ -59,15 +63,7 @@ Object.defineProperty(exports, "getBundlerOptions", {
59
63
  });
60
64
  Object.defineProperty(exports, "analyzeBundle", {
61
65
  enumerable: true,
62
- get: function () { return chunkYAIYFXQ6_cjs.analyzeBundle; }
63
- });
64
- Object.defineProperty(exports, "createBundler", {
65
- enumerable: true,
66
- get: function () { return chunk3XIMK24X_cjs.createBundler; }
67
- });
68
- Object.defineProperty(exports, "getBundlerInputOptions", {
69
- enumerable: true,
70
- get: function () { return chunk3XIMK24X_cjs.getInputOptions; }
66
+ get: function () { return chunkSCK7B2XJ_cjs.analyzeBundle; }
71
67
  });
72
68
  Object.defineProperty(exports, "Deps", {
73
69
  enumerable: true,
@@ -77,6 +73,14 @@ Object.defineProperty(exports, "FileService", {
77
73
  enumerable: true,
78
74
  get: function () { return chunkFKKJQUGR_cjs.FileService; }
79
75
  });
76
+ Object.defineProperty(exports, "createBundler", {
77
+ enumerable: true,
78
+ get: function () { return chunk3XIMK24X_cjs.createBundler; }
79
+ });
80
+ Object.defineProperty(exports, "getBundlerInputOptions", {
81
+ enumerable: true,
82
+ get: function () { return chunk3XIMK24X_cjs.getInputOptions; }
83
+ });
80
84
  Object.defineProperty(exports, "detectRuntime", {
81
85
  enumerable: true,
82
86
  get: function () { return chunkJZRFRUGM_cjs.detectRuntime; }
@@ -1,6 +1,7 @@
1
1
  export { createBundler, getInputOptions as getBundlerInputOptions } from './bundler.js';
2
2
  export { createWatcher, getInputOptions as getWatcherInputOptions } from './watcher.js';
3
3
  export { analyzeBundle } from './analyze/index.js';
4
+ export { analyzeEntryProjectType } from './analyzeEntryProjectType.js';
4
5
  export { FileService } from '../services/fs.js';
5
6
  export { Deps } from '../services/deps.js';
6
7
  export { getServerOptions } from './serverOptions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,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E,mBAAmB,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC5G,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnG,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,8 +1,8 @@
1
- export { createWatcher, discoverFsAgents, discoverFsSingleton, discoverFsWorkflows, generateFsAgentsModule, generateFsWorkflowsCodegen, getServerOptions, getInputOptions as getWatcherInputOptions, mirrorFsAgentWorkspaces, prepareFsAgentsEntry, writeFsAgentsEntry } from '../chunk-3XJRELIX.js';
1
+ export { analyzeEntryProjectType, createWatcher, discoverFsAgents, discoverFsSingleton, discoverFsWorkflows, generateFsAgentsModule, generateFsWorkflowsCodegen, getServerOptions, getInputOptions as getWatcherInputOptions, mirrorFsAgentWorkspaces, prepareFsAgentsEntry, writeFsAgentsEntry } from '../chunk-QOVY44KF.js';
2
2
  export { getBundlerOptions } from '../chunk-E5SBYHQK.js';
3
- export { analyzeBundle } from '../chunk-EPALJ45Z.js';
4
- export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-5PORNUPF.js';
3
+ export { analyzeBundle } from '../chunk-FAMWV7SW.js';
5
4
  export { Deps, FileService } from '../chunk-YUBKHO52.js';
5
+ export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-5PORNUPF.js';
6
6
  export { detectRuntime, escapeStudioHtmlValue, injectStudioHtmlConfig, normalizeStudioBase } from '../chunk-WP65JQAT.js';
7
7
  //# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkSYWSF3OR_cjs = require('../chunk-SYWSF3OR.cjs');
3
+ var chunkLQS6ER47_cjs = require('../chunk-LQS6ER47.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Bundler", {
8
8
  enumerable: true,
9
- get: function () { return chunkSYWSF3OR_cjs.Bundler; }
9
+ get: function () { return chunkLQS6ER47_cjs.Bundler; }
10
10
  });
11
11
  Object.defineProperty(exports, "IS_DEFAULT", {
12
12
  enumerable: true,
13
- get: function () { return chunkSYWSF3OR_cjs.IS_DEFAULT; }
13
+ get: function () { return chunkLQS6ER47_cjs.IS_DEFAULT; }
14
14
  });
15
15
  //# sourceMappingURL=index.cjs.map
16
16
  //# sourceMappingURL=index.cjs.map
@@ -22,6 +22,7 @@ export declare abstract class Bundler extends MastraBundler {
22
22
  }>;
23
23
  protected getUserBundlerOptions(mastraEntryFile: string, outputDirectory: string): Promise<NonNullable<Config['bundler']>>;
24
24
  protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string): Promise<{
25
+ projectType?: string | undefined;
25
26
  externalDependencies: Map<string, ExternalDependencyInfo>;
26
27
  dependencies: Map<string, string>;
27
28
  workspaceMap: Map<string, import("./workspaceDependencies").WorkspacePackageInfo>;
@@ -42,6 +43,12 @@ export declare abstract class Bundler extends MastraBundler {
42
43
  rootDir?: string;
43
44
  outputDirectory: string;
44
45
  }): Promise<void>;
46
+ /**
47
+ * Writes the `mastra-project.json` deployment marker for Software Factory
48
+ * projects after public assets have been copied. Verifies that the Factory
49
+ * SPA (`factory/index.html`) exists in the output before emitting the marker.
50
+ */
51
+ protected writeFactoryMarker(outputDirectory: string): Promise<void>;
45
52
  protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: (string | string[])[], { enableSourcemap, enableEsmShim, externals }: BundlerOptions): Promise<InputOptions>;
46
53
  getAllToolPaths(mastraDir: string, toolsPaths?: (string | string[])[]): (string | string[])[];
47
54
  listToolsInputOptions(toolsPaths: (string | string[])[]): Promise<Record<string, string>>;
@@ -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;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,UAAU,eAAuB,CAAC;AAE/C,8BAAsB,OAAQ,SAAQ,aAAa;IACjD,SAAS,CAAC,gBAAgB,SAAY;IACtC,SAAS,CAAC,SAAS,SAAY;IAC/B,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAU;gBAEjC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,SAAS,GAAG,UAAsB;IAIjE,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/C,gBAAgB,CACpB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAAC,EAC1D,WAAW,CAAC,EAAE,MAAM,CAAC,M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SAAS,EAAE,MAAM,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,GACrB,EAAE;QACD,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,EACD,UAAU,GAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAO,EACtC,cAAc,GAAE,MAA8C,GAC7D,OAAO,CAAC,IAAI,CAAC;IAiJV,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, IS_DEFAULT } from '../chunk-4ZFC5V33.js';
1
+ export { Bundler, IS_DEFAULT } from '../chunk-RMK7DBLQ.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@ import { existsSync } from 'fs';
4
4
  import { readFile, writeFile } from 'fs/promises';
5
5
  import * as path from 'path';
6
6
  import { dirname, join, relative, isAbsolute, basename as basename$1 } from 'path';
7
- import { transformAsync, transformSync, types } from '@babel/core';
7
+ import { types, transformAsync, transformSync } from '@babel/core';
8
8
  import { MastraBaseError, ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';
9
9
  import * as pkg from 'empathic/package';
10
10
  import { createWorkspacesCache, findWorkspaces, findWorkspacesRoot } from 'find-workspaces';
@@ -936,8 +936,21 @@ async function bundleExternals(depsToOptimize, outputDir, options) {
936
936
  }
937
937
  function checkConfigExport(result) {
938
938
  const mastraVars = /* @__PURE__ */ new Set();
939
+ const factoryBindings = /* @__PURE__ */ new Set();
939
940
  return {
940
941
  visitor: {
942
+ ImportDeclaration(path2) {
943
+ for (const spec of path2.node.specifiers) {
944
+ if (types.isImportSpecifier(spec) && types.isIdentifier(spec.imported, { name: "MastraFactory" }) && types.isIdentifier(spec.local)) {
945
+ factoryBindings.add(spec.local.name);
946
+ }
947
+ }
948
+ },
949
+ NewExpression(path2) {
950
+ if (types.isIdentifier(path2.node.callee) && factoryBindings.has(path2.node.callee.name)) {
951
+ result.projectType = "factory";
952
+ }
953
+ },
941
954
  ExportNamedDeclaration(path2) {
942
955
  const decl = path2.node.declaration;
943
956
  if (types.isVariableDeclaration(decl)) {
@@ -1316,9 +1329,7 @@ async function analyzeBundle(entries, mastraEntry, {
1316
1329
  bundlerOptions
1317
1330
  }, logger) {
1318
1331
  const mastraConfig = await readFile(mastraEntry, "utf-8");
1319
- const mastraConfigResult = {
1320
- hasValidConfig: false
1321
- };
1332
+ const mastraConfigResult = { hasValidConfig: false };
1322
1333
  await transformAsync(mastraConfig, {
1323
1334
  filename: mastraEntry,
1324
1335
  presets: [import.meta.resolve("@babel/preset-typescript")],
@@ -1497,10 +1508,11 @@ async function analyzeBundle(entries, mastraEntry, {
1497
1508
  }
1498
1509
  return {
1499
1510
  ...result,
1500
- externalDependencies: mergedExternalDeps
1511
+ externalDependencies: mergedExternalDeps,
1512
+ ...mastraConfigResult.projectType ? { projectType: mastraConfigResult.projectType } : {}
1501
1513
  };
1502
1514
  }
1503
1515
 
1504
- export { aliasHono, analyzeBundle, getWorkspaceInformation };
1505
- //# sourceMappingURL=chunk-EPALJ45Z.js.map
1506
- //# sourceMappingURL=chunk-EPALJ45Z.js.map
1516
+ export { aliasHono, analyzeBundle, checkConfigExport, getWorkspaceInformation };
1517
+ //# sourceMappingURL=chunk-FAMWV7SW.js.map
1518
+ //# sourceMappingURL=chunk-FAMWV7SW.js.map