@mastra/deployer 1.80.0-alpha.7 → 1.81.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/_types/@internal_core/dist/base/index.d.ts +28 -0
  2. package/dist/_types/@internal_core/dist/index-Diz1p9N7.d.ts +316 -0
  3. package/dist/_types/@internal_core/dist/logger/index.d.ts +2 -0
  4. package/dist/_types/@internal_core/package.json +1 -0
  5. package/dist/_types/@internal_deployer/dist/_types/@internal_core/dist/index-Diz1p9N7.d.ts +316 -0
  6. package/dist/_types/@internal_deployer/dist/_types/@internal_core/dist/logger/index.d.ts +2 -0
  7. package/dist/_types/@internal_deployer/dist/bundler.d.ts +79 -0
  8. package/dist/_types/@internal_deployer/dist/deployer.d.ts +11 -0
  9. package/dist/_types/@internal_deployer/dist/index.d.ts +4 -0
  10. package/dist/_types/@internal_deployer/package.json +1 -0
  11. package/dist/{analyze-CaR5az9N.js → analyze-BZGcfVSL.js} +5 -5
  12. package/dist/analyze-BZGcfVSL.js.map +1 -0
  13. package/dist/{analyze-CcZ2AWV3.cjs → analyze-CtWBhASF.cjs} +14 -14
  14. package/dist/analyze-CtWBhASF.cjs.map +1 -0
  15. package/dist/build/analyze/analyzeEntry.d.ts +1 -1
  16. package/dist/build/analyze/analyzeEntry.d.ts.map +1 -1
  17. package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
  18. package/dist/build/analyze.cjs +1 -1
  19. package/dist/build/analyze.d.ts +4 -4
  20. package/dist/build/analyze.d.ts.map +1 -1
  21. package/dist/build/analyze.js +1 -1
  22. package/dist/build/babel/remove-all-options-except.d.ts +1 -1
  23. package/dist/build/babel/remove-all-options-except.d.ts.map +1 -1
  24. package/dist/build/bundler.cjs +1 -1
  25. package/dist/build/bundler.js +1 -1
  26. package/dist/build/bundlerOptions.d.ts +3 -3
  27. package/dist/build/bundlerOptions.d.ts.map +1 -1
  28. package/dist/build/deployer.d.ts +3 -3
  29. package/dist/build/deployer.d.ts.map +1 -1
  30. package/dist/build/index.cjs +5 -5
  31. package/dist/build/index.js +5 -5
  32. package/dist/build/plugins/esm-shim.d.ts.map +1 -1
  33. package/dist/build/plugins/remove-all-except.d.ts +1 -1
  34. package/dist/build/plugins/remove-all-except.d.ts.map +1 -1
  35. package/dist/build/serverOptions.d.ts +1 -1
  36. package/dist/build/serverOptions.d.ts.map +1 -1
  37. package/dist/build/shared/extract-mastra-option.d.ts +1 -1
  38. package/dist/build/shared/extract-mastra-option.d.ts.map +1 -1
  39. package/dist/{build-CwIzWB-q.js → build-CkZ0xUid.js} +7 -9
  40. package/dist/build-CkZ0xUid.js.map +1 -0
  41. package/dist/{build-BLhyMvzA.cjs → build-D0eiANsp.cjs} +8 -10
  42. package/dist/build-D0eiANsp.cjs.map +1 -0
  43. package/dist/bundler/index.cjs +6 -506
  44. package/dist/bundler/index.d.ts +14 -8
  45. package/dist/bundler/index.d.ts.map +1 -1
  46. package/dist/bundler/index.js +1 -498
  47. package/dist/bundler/workspaceDependencies.d.ts +1 -1
  48. package/dist/bundler/workspaceDependencies.d.ts.map +1 -1
  49. package/dist/bundler-BBi45M7f.cjs +549 -0
  50. package/dist/bundler-BBi45M7f.cjs.map +1 -0
  51. package/dist/bundler-CNgW1Vui.js +516 -0
  52. package/dist/bundler-CNgW1Vui.js.map +1 -0
  53. package/dist/{bundler-D3Ky7WCf.js → bundler-C_LpvgiH.js} +2 -2
  54. package/dist/bundler-C_LpvgiH.js.map +1 -0
  55. package/dist/{bundler-D_3GyN0N.cjs → bundler-Cb7pRVvA.cjs} +5 -5
  56. package/dist/bundler-Cb7pRVvA.cjs.map +1 -0
  57. package/dist/{bundlerOptions-Dgt4ZEo1.cjs → bundlerOptions-BBvSNHFj.cjs} +2 -2
  58. package/dist/bundlerOptions-BBvSNHFj.cjs.map +1 -0
  59. package/dist/{bundlerOptions-BtDsaIgs.js → bundlerOptions-BlUHmPBE.js} +2 -2
  60. package/dist/bundlerOptions-BlUHmPBE.js.map +1 -0
  61. package/dist/deploy/base.d.ts +1 -1
  62. package/dist/deploy/base.d.ts.map +1 -1
  63. package/dist/deploy/log.d.ts +1 -1
  64. package/dist/deploy/log.d.ts.map +1 -1
  65. package/dist/docs/SKILL.md +1 -1
  66. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  67. package/dist/docs/references/docs-deployment-mastra-server.md +3 -1
  68. package/dist/error-BVvc5jcw.js +172 -0
  69. package/dist/error-BVvc5jcw.js.map +1 -0
  70. package/dist/error-CR4whExy.cjs +195 -0
  71. package/dist/error-CR4whExy.cjs.map +1 -0
  72. package/dist/index.cjs +5 -5
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +4 -4
  75. package/dist/index.js.map +1 -1
  76. package/dist/server/handlers/a2a.d.ts +31 -31
  77. package/dist/server/handlers/a2a.d.ts.map +1 -1
  78. package/dist/server/handlers/client.d.ts.map +1 -1
  79. package/dist/server/index.cjs +9 -8
  80. package/dist/server/index.cjs.map +1 -1
  81. package/dist/server/index.js +9 -8
  82. package/dist/server/index.js.map +1 -1
  83. package/dist/services/deps.d.ts +2 -2
  84. package/dist/services/deps.d.ts.map +1 -1
  85. package/dist/services/env.d.ts.map +1 -1
  86. package/dist/services/fs.d.ts.map +1 -1
  87. package/dist/services/index.cjs +1 -1
  88. package/dist/services/index.js +1 -1
  89. package/dist/{services-BJQJLQs9.js → services-CXZJN9er.js} +294 -5
  90. package/dist/services-CXZJN9er.js.map +1 -0
  91. package/dist/{services-Dqx1iouv.cjs → services-CtVt5CJq.cjs} +321 -20
  92. package/dist/services-CtVt5CJq.cjs.map +1 -0
  93. package/dist/validator/validate.d.ts.map +1 -1
  94. package/package.json +14 -12
  95. package/dist/analyze-CaR5az9N.js.map +0 -1
  96. package/dist/analyze-CcZ2AWV3.cjs.map +0 -1
  97. package/dist/build-BLhyMvzA.cjs.map +0 -1
  98. package/dist/build-CwIzWB-q.js.map +0 -1
  99. package/dist/bundler/index.cjs.map +0 -1
  100. package/dist/bundler/index.js.map +0 -1
  101. package/dist/bundler-D3Ky7WCf.js.map +0 -1
  102. package/dist/bundler-D_3GyN0N.cjs.map +0 -1
  103. package/dist/bundlerOptions-BtDsaIgs.js.map +0 -1
  104. package/dist/bundlerOptions-Dgt4ZEo1.cjs.map +0 -1
  105. package/dist/services-BJQJLQs9.js.map +0 -1
  106. package/dist/services-Dqx1iouv.cjs.map +0 -1
@@ -1,507 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("../rolldown-runtime-Bc0pwXKd.cjs");
3
- const require_analyze = require("../analyze-CcZ2AWV3.cjs");
4
- const require_utils = require("../utils-CDNA_ewa.cjs");
5
- const require_services = require("../services-Dqx1iouv.cjs");
6
- const require_bundler = require("../bundler-D_3GyN0N.cjs");
7
- const require_bundlerOptions = require("../bundlerOptions-Dgt4ZEo1.cjs");
8
- let fs = require("fs");
9
- let fs_promises = require("fs/promises");
10
- let path = require("path");
11
- let _mastra_core_bundler = require("@mastra/core/bundler");
12
- let _mastra_core_error = require("@mastra/core/error");
13
- let _rollup_plugin_virtual = require("@rollup/plugin-virtual");
14
- _rollup_plugin_virtual = require_rolldown_runtime.__toESM(_rollup_plugin_virtual, 1);
15
- let empathic_package = require("empathic/package");
16
- empathic_package = require_rolldown_runtime.__toESM(empathic_package, 1);
17
- let fs_extra_esm = require("fs-extra/esm");
18
- fs_extra_esm = require_rolldown_runtime.__toESM(fs_extra_esm, 1);
19
- let tinyglobby = require("tinyglobby");
20
- // src/bundler/index.ts
21
- const IS_DEFAULT = Symbol("IS_DEFAULT");
22
- const NPM_ALIAS_PREFIX = "npm:";
23
- /** Characters a registry range or dist tag can contain. Protocols need `:`, git shorthand needs `/` or `#`. */
24
- const REGISTRY_SPEC_PATTERN = /^[A-Za-z0-9.+_^~><=*|!\s-]+$/;
25
- const PACKAGE_NAME_PATTERN = /^(?:@[A-Za-z0-9._-]+\/)?[A-Za-z0-9._-]+$/;
26
- const TARBALL_SUFFIX_PATTERN = /\.(?:tgz|tar\.gz|tar)$/i;
27
- /** npm reads a value starting like this as a path, whatever follows. A bare `~` is a semver range. */
28
- const FILE_SPEC_PREFIX_PATTERN = /^(?:\.|~[/\\]|[/\\]|[A-Za-z]:[/\\])/;
29
- /** A range admitting any published version: `*`, `x`, `>=0`, and any union containing one. */
30
- const UNBOUNDED_RANGE_PATTERN = /(?:^|\|\||\s)\s*(?:[*xX]|>=?\s*0(?:\.0)*(?:\.0)*)\s*(?:$|\|\|)/;
31
- const toStringRecord = (value) => {
32
- if (!value || typeof value !== "object" || Array.isArray(value)) return {};
33
- return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"));
34
- };
35
- /**
36
- * True when a specifier is something the isolated install in `.mastra/output` can resolve from the
37
- * registry: a semver range, a dist tag, a wildcard, or an npm alias whose target is a registry
38
- * package and range.
39
- *
40
- * This is an allowlist rather than a denylist of known protocols, so an unfamiliar protocol is
41
- * rejected without this code having to know it exists. The output directory is not a workspace, has
42
- * no catalog definitions and has a different relative-path base, so `catalog:`, `workspace:`,
43
- * `file:`, `link:` and git specifiers are all either uninstallable there or point somewhere else.
44
- */
45
- const isRegistryVersionSpec = (spec) => {
46
- if (FILE_SPEC_PREFIX_PATTERN.test(spec) || TARBALL_SUFFIX_PATTERN.test(spec)) return false;
47
- if (spec.startsWith(NPM_ALIAS_PREFIX)) {
48
- const alias = spec.slice(4);
49
- const rangeSeparator = alias.lastIndexOf("@");
50
- const name = rangeSeparator > 0 ? alias.slice(0, rangeSeparator) : alias;
51
- const range = rangeSeparator > 0 ? alias.slice(rangeSeparator + 1) : "*";
52
- return PACKAGE_NAME_PATTERN.test(name) && isRegistryVersionSpec(range);
53
- }
54
- return REGISTRY_SPEC_PATTERN.test(spec);
55
- };
56
- /**
57
- * True when a specifier names a version the output install can be held to.
58
- *
59
- * A range admitting anything (`*`, `latest`, `>=0`, an alias with no range) is looser than the
60
- * version already resolved, so writing it would let a later install pull something the bundle was
61
- * never analyzed against.
62
- */
63
- const isBoundedVersionSpec = (spec) => {
64
- const range = spec.startsWith(NPM_ALIAS_PREFIX) ? (() => {
65
- const alias = spec.slice(4);
66
- const rangeSeparator = alias.lastIndexOf("@");
67
- return rangeSeparator > 0 ? alias.slice(rangeSeparator + 1) : "";
68
- })() : spec;
69
- return /\d/.test(range) && !UNBOUNDED_RANGE_PATTERN.test(range);
70
- };
71
- const readManifest = async (manifestPath) => {
72
- if (!manifestPath) return;
73
- try {
74
- const manifest = await (0, fs_extra_esm.readJSON)(manifestPath);
75
- return manifest && typeof manifest === "object" ? manifest : void 0;
76
- } catch {
77
- return;
78
- }
79
- };
80
- /** Collect the package names a manifest's resolution fields pin, ignoring their values. */
81
- const collectManifestPinnedNames = (manifest, pinned) => {
82
- const pnpmSection = manifest?.pnpm;
83
- const records = [
84
- manifest?.overrides,
85
- manifest?.resolutions,
86
- pnpmSection && typeof pnpmSection === "object" ? pnpmSection.overrides : void 0
87
- ];
88
- for (const record of records) if (record && typeof record === "object" && !Array.isArray(record)) for (const key of Object.keys(record)) pinned.add(key);
89
- };
90
- /**
91
- * Collect the names under a top-level `overrides:` block in `pnpm-workspace.yaml`.
92
- *
93
- * pnpm moved overrides out of `package.json` into this file, so a workspace on a current pnpm keeps
94
- * them only here. Reading names off the indented block avoids a YAML dependency, the same tradeoff
95
- * `copyPnpmWorkspaceSettings` already makes for the top-level keys it copies.
96
- */
97
- const collectPnpmWorkspacePinnedNames = (source, pinned) => {
98
- const lines = source.split(/\r?\n/);
99
- let insideOverrides = false;
100
- for (const line of lines) {
101
- if (/^\S/.test(line)) {
102
- insideOverrides = /^overrides:\s*$/.test(line);
103
- continue;
104
- }
105
- if (!insideOverrides) continue;
106
- const key = /^\s+(?:'([^']+)'|"([^"]+)"|([^'"\s:][^:]*?))\s*:/.exec(line);
107
- if (key) pinned.add((key[1] ?? key[2] ?? key[3] ?? "").trim());
108
- }
109
- };
110
- /**
111
- * Read the constraints the source app declared.
112
- *
113
- * `dependencies` come from the manifest at `projectRoot`, the package the build was invoked for and
114
- * whose directory receives the output, falling back to the manifest above the entry file. Anchoring
115
- * on `projectRoot` rather than the entry file keeps the answer deterministic when the entry handed
116
- * to the bundler is a generated wrapper rather than the app's own source file.
117
- *
118
- * Resolution-field names are collected from both that manifest and the workspace root, including the
119
- * root `pnpm-workspace.yaml`, because a name pinned anywhere means the resolved version may have been
120
- * chosen deliberately rather than hoisted by accident.
121
- */
122
- const getSourceDependencyConstraints = async ({ projectRoot, mastraEntryFile, workspaceRoot }) => {
123
- const manifestPaths = [empathic_package.up({ cwd: projectRoot }), empathic_package.up({ cwd: (0, path.dirname)(mastraEntryFile) })].filter((entry, index, entries) => !!entry && entries.indexOf(entry) === index);
124
- if (workspaceRoot) manifestPaths.push((0, path.join)(workspaceRoot, "package.json"));
125
- const pinnedByResolutionField = /* @__PURE__ */ new Set();
126
- let dependencies;
127
- for (const manifestPath of manifestPaths) {
128
- const manifest = await readManifest(manifestPath);
129
- if (!manifest) continue;
130
- dependencies ??= toStringRecord(manifest.dependencies);
131
- collectManifestPinnedNames(manifest, pinnedByResolutionField);
132
- }
133
- if (workspaceRoot) try {
134
- collectPnpmWorkspacePinnedNames(await (0, fs_promises.readFile)((0, path.join)(workspaceRoot, "pnpm-workspace.yaml"), "utf-8"), pinnedByResolutionField);
135
- } catch {}
136
- return {
137
- dependencies: dependencies ?? {},
138
- pinnedByResolutionField
139
- };
140
- };
141
- const findDeclaredConstraint = (constraints, dependencyName) => {
142
- const names = [dependencyName, require_utils.getPackageName(dependencyName)].filter((name, index, all) => !!name && all.indexOf(name) === index);
143
- for (const name of names) if (constraints.pinnedByResolutionField.has(name)) return;
144
- for (const name of names) {
145
- const declared = (constraints.dependencies[name] ?? "").trim();
146
- if (declared && isBoundedVersionSpec(declared) && isRegistryVersionSpec(declared)) return declared;
147
- }
148
- };
149
- /**
150
- * Prefer the constraint the app declared over the version resolved from `node_modules`.
151
- *
152
- * The resolved version is whatever the install happened to hoist, so an app declaring `zod: ^4.3.6`
153
- * next to a hoisted `zod@3.25.76` gets the hoisted version written into the output manifest and the
154
- * isolated install then locks it in.
155
- */
156
- const applySourceDependencyRange = (dependencyName, dependencyInfo, constraints) => {
157
- const declared = findDeclaredConstraint(constraints, dependencyName);
158
- if (!declared) return dependencyInfo;
159
- if (declared.startsWith(NPM_ALIAS_PREFIX)) return {
160
- ...dependencyInfo,
161
- packageSpec: declared
162
- };
163
- if (dependencyInfo.packageSpec) return dependencyInfo;
164
- return {
165
- ...dependencyInfo,
166
- version: declared
167
- };
168
- };
169
- async function toolIdForEntry(relativeEntryFile) {
170
- const digest = Buffer.from(await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(relativeEntryFile))).toString("hex");
171
- return `${digest.slice(0, 8)}-${digest.slice(8, 12)}-${digest.slice(12, 16)}-${digest.slice(16, 20)}-${digest.slice(20, 32)}`;
172
- }
173
- var Bundler = class extends _mastra_core_bundler.MastraBundler {
174
- analyzeOutputDir = ".build";
175
- outputDir = "output";
176
- platform = "node";
177
- defaultExternalsPreset = false;
178
- constructor(name, component = "BUNDLER") {
179
- super({
180
- name,
181
- component
182
- });
183
- }
184
- async prepare(outputDirectory) {
185
- await (0, fs_extra_esm.emptyDir)(outputDirectory);
186
- await (0, fs_extra_esm.ensureDir)((0, path.join)(outputDirectory, this.analyzeOutputDir));
187
- await (0, fs_extra_esm.ensureDir)((0, path.join)(outputDirectory, this.outputDir));
188
- }
189
- async writePackageJson(outputDirectory, dependencies, resolutions) {
190
- this.logger.debug("Writing project's package.json");
191
- await (0, fs_extra_esm.ensureDir)(outputDirectory);
192
- const pkgPath = (0, path.join)(outputDirectory, "package.json");
193
- const dependenciesMap = /* @__PURE__ */ new Map();
194
- for (const [key, value] of dependencies.entries()) {
195
- const dependencyValue = typeof value === "string" ? value : value.packageSpec ?? value.version ?? "latest";
196
- if (key.startsWith("@")) {
197
- const pkgChunks = key.split("/");
198
- dependenciesMap.set(`${pkgChunks[0]}/${pkgChunks[1]}`, dependencyValue);
199
- } else {
200
- const pkgName = key.split("/")[0] || key;
201
- dependenciesMap.set(pkgName, dependencyValue);
202
- }
203
- }
204
- await (0, fs_promises.writeFile)(pkgPath, JSON.stringify({
205
- name: "server",
206
- version: "1.0.0",
207
- private: true,
208
- type: "module",
209
- main: "index.mjs",
210
- scripts: { start: "node ./index.mjs" },
211
- dependencies: Object.fromEntries(dependenciesMap.entries()),
212
- ...Object.keys(resolutions ?? {}).length > 0 && { resolutions }
213
- }, null, 2));
214
- }
215
- createBundler(inputOptions, outputOptions) {
216
- return require_bundler.createBundler(inputOptions, outputOptions);
217
- }
218
- async getUserBundlerOptions(mastraEntryFile, outputDirectory) {
219
- const defaultBundlerOptions = {
220
- externals: [],
221
- sourcemap: false,
222
- transpilePackages: [],
223
- [IS_DEFAULT]: true
224
- };
225
- try {
226
- return await require_bundlerOptions.getBundlerOptions(mastraEntryFile, outputDirectory) ?? defaultBundlerOptions;
227
- } catch (error) {
228
- this.logger.debug("Failed to get bundler options, sourcemap will be disabled", { error });
229
- }
230
- return defaultBundlerOptions;
231
- }
232
- async analyze(entry, mastraFile, outputDirectory) {
233
- return await require_analyze.analyzeBundle([].concat(entry), mastraFile, {
234
- outputDir: (0, path.join)(outputDirectory, this.analyzeOutputDir),
235
- projectRoot: outputDirectory,
236
- platform: this.platform
237
- }, this.logger);
238
- }
239
- pnpmNodeLinker;
240
- getAdditionalEntries() {
241
- return {};
242
- }
243
- async installDependencies(outputDirectory, rootDir = process.cwd(), pnpmOverrides, pnpmWorkspaceSettings) {
244
- const deps = new require_services.DepsService(rootDir);
245
- deps.__setLogger(this.logger);
246
- const installOptions = {
247
- dir: (0, path.join)(outputDirectory, this.outputDir),
248
- pnpmOverrides,
249
- pnpmNodeLinker: this.pnpmNodeLinker,
250
- pnpmWorkspaceSettings
251
- };
252
- this.logger.info("Updating dependency lockfile and installing dependencies");
253
- await deps.install(installOptions);
254
- this.logger.info("Done updating dependency lockfile and installing dependencies");
255
- }
256
- async copyPublic(mastraDir, outputDirectory) {
257
- const publicDir = (0, path.join)(mastraDir, "public");
258
- try {
259
- await (0, fs_promises.stat)(publicDir);
260
- } catch {
261
- return;
262
- }
263
- await (0, fs_extra_esm.copy)(publicDir, (0, path.join)(outputDirectory, this.outputDir));
264
- }
265
- async copyDOTNPMRC({ rootDir = process.cwd(), outputDirectory }) {
266
- const sourceDotNpmRcPath = (0, path.join)(rootDir, ".npmrc");
267
- const targetDotNpmRcPath = (0, path.join)(outputDirectory, this.outputDir, ".npmrc");
268
- try {
269
- await (0, fs_promises.stat)(sourceDotNpmRcPath);
270
- await (0, fs_extra_esm.copy)(sourceDotNpmRcPath, targetDotNpmRcPath);
271
- } catch {}
272
- }
273
- /**
274
- * Writes the `mastra-project.json` deployment marker for Software Factory
275
- * projects after public assets have been copied. Verifies that the Factory
276
- * SPA (`factory/index.html`) exists in the output before emitting the marker.
277
- */
278
- async writeFactoryMarker(outputDirectory) {
279
- const outputDir = (0, path.join)(outputDirectory, this.outputDir);
280
- const factoryIndex = (0, path.join)(outputDir, "factory", "index.html");
281
- if (!(0, fs.existsSync)(factoryIndex)) throw new _mastra_core_error.MastraError({
282
- id: "DEPLOYER_BUNDLER_FACTORY_UI_MISSING",
283
- text: "Software Factory project detected but factory/index.html was not found after copying the prebuilt Factory UI.",
284
- domain: _mastra_core_error.ErrorDomain.DEPLOYER,
285
- category: _mastra_core_error.ErrorCategory.SYSTEM
286
- });
287
- await (0, fs_promises.writeFile)((0, path.join)(outputDir, "mastra-project.json"), JSON.stringify({
288
- schemaVersion: 1,
289
- projectType: "factory",
290
- assets: { ui: "factory" }
291
- }, null, 2));
292
- this.logger.info("Wrote mastra-project.json for Software Factory project");
293
- }
294
- async getBundlerOptions(serverFile, mastraEntryFile, analyzedBundleInfo, toolsPaths, { enableSourcemap, enableMinify, enableEsmShim, externals, externalsPreset, alias }, additionalEntries, projectRoot) {
295
- const { workspaceRoot } = await require_analyze.getWorkspaceInformation({ mastraEntryFile });
296
- const inputOptions = await require_bundler.getInputOptions(mastraEntryFile, analyzedBundleInfo, this.platform, { "process.env.NODE_ENV": JSON.stringify("production") }, {
297
- sourcemap: enableSourcemap,
298
- minify: enableMinify,
299
- workspaceRoot,
300
- projectRoot,
301
- enableEsmShim,
302
- externalsPreset: externals === true || !!externalsPreset,
303
- explicitExternals: Array.isArray(externals) ? externals : [],
304
- alias
305
- });
306
- const toolsInputOptions = await this.listToolsInputOptions(toolsPaths, projectRoot);
307
- const entryInputs = {};
308
- const virtualEntries = {};
309
- const entries = {
310
- index: serverFile,
311
- ...additionalEntries
312
- };
313
- for (const [name, entry] of Object.entries(entries)) if (entry.includes("\n") || !(0, fs.existsSync)(entry)) {
314
- const virtualId = name === "index" ? "#entry" : `#entry-${name}`;
315
- entryInputs[name] = virtualId;
316
- virtualEntries[virtualId] = entry;
317
- } else entryInputs[name] = entry;
318
- inputOptions.input = {
319
- ...entryInputs,
320
- ...toolsInputOptions
321
- };
322
- if (Object.keys(virtualEntries).length > 0) {
323
- if (Array.isArray(inputOptions.plugins)) inputOptions.plugins.unshift((0, _rollup_plugin_virtual.default)(virtualEntries));
324
- else inputOptions.plugins = [(0, _rollup_plugin_virtual.default)(virtualEntries)];
325
- }
326
- return inputOptions;
327
- }
328
- getAllToolPaths(mastraDir, toolsPaths = []) {
329
- const normalizedMastraDir = require_utils.slash(mastraDir);
330
- const defaultPaths = [path.posix.join(normalizedMastraDir, "tools/**/*.{js,ts}"), ...[`!${path.posix.join(normalizedMastraDir, "tools/**/*.{test,spec}.{js,ts}")}`, `!${path.posix.join(normalizedMastraDir, "tools/**/__tests__/**")}`]];
331
- if (toolsPaths.length === 0) return [defaultPaths];
332
- return [...toolsPaths, defaultPaths];
333
- }
334
- async listToolsInputOptions(toolsPaths, projectRoot = process.cwd()) {
335
- const entries = /* @__PURE__ */ new Map();
336
- for (const toolPath of toolsPaths) {
337
- const expandedPaths = await (0, tinyglobby.glob)(toolPath, {
338
- absolute: true,
339
- expandDirectories: false
340
- });
341
- for (const path$1 of expandedPaths) if (await fs_extra_esm.default.pathExists(path$1)) {
342
- const entryFile = new require_services.FileService().getFirstExistingFile([
343
- (0, path.join)(path$1, "index.ts"),
344
- (0, path.join)(path$1, "index.js"),
345
- path$1
346
- ]);
347
- if (!entryFile || (await (0, fs_promises.stat)(entryFile)).isDirectory()) {
348
- this.logger.warn("No entry file found, skipping", { path: path$1 });
349
- continue;
350
- }
351
- const normalizedEntryFile = entryFile.replaceAll("\\", "/");
352
- const relativeEntryFile = (0, path.relative)(projectRoot, entryFile).replaceAll("\\", "/");
353
- entries.set(relativeEntryFile, normalizedEntryFile);
354
- } else this.logger.warn("Tool path does not exist, skipping", { path: path$1 });
355
- }
356
- return Object.fromEntries(await Promise.all([...entries.entries()].sort(([first], [second]) => first < second ? -1 : first > second ? 1 : 0).map(async ([relativeEntryFile, entryFile]) => [`tools/${await toolIdForEntry(relativeEntryFile)}`, entryFile])));
357
- }
358
- async _bundle(serverFile, mastraEntryFile, { projectRoot, outputDirectory, enableEsmShim = true, alias = {} }, toolsPaths = [], bundleLocation = (0, path.join)(outputDirectory, this.outputDir)) {
359
- const analyzeDir = (0, path.join)(outputDirectory, this.analyzeOutputDir);
360
- const additionalEntries = this.getAdditionalEntries();
361
- const closestPkgJson = empathic_package.up({ cwd: (0, path.dirname)(mastraEntryFile) });
362
- const entryProjectRoot = closestPkgJson ? (0, path.dirname)(closestPkgJson) : projectRoot;
363
- const bundlerOptions = await this.getUserBundlerOptions(mastraEntryFile, outputDirectory);
364
- const resolvedAlias = Object.fromEntries(Object.entries(alias).map(([specifier, target]) => [specifier, target.startsWith(".") ? (0, path.resolve)(projectRoot, target) : target]));
365
- const internalBundlerOptions = {
366
- enableSourcemap: !!bundlerOptions.sourcemap,
367
- enableMinify: !!bundlerOptions.minify,
368
- externals: bundlerOptions.externals ?? [],
369
- externalsPreset: this.defaultExternalsPreset && bundlerOptions.externals !== false,
370
- enableEsmShim,
371
- alias: resolvedAlias,
372
- dynamicPackages: bundlerOptions.dynamicPackages
373
- };
374
- let analyzedBundleInfo;
375
- try {
376
- const resolvedToolsPaths = await this.listToolsInputOptions(toolsPaths, entryProjectRoot);
377
- analyzedBundleInfo = await require_analyze.analyzeBundle([
378
- serverFile,
379
- ...Object.values(additionalEntries),
380
- ...Object.values(resolvedToolsPaths)
381
- ], mastraEntryFile, {
382
- outputDir: analyzeDir,
383
- projectRoot: entryProjectRoot,
384
- platform: this.platform,
385
- bundlerOptions: internalBundlerOptions
386
- }, this.logger);
387
- } catch (error) {
388
- const message = error instanceof Error ? error.message : String(error);
389
- if (error instanceof _mastra_core_error.MastraError) throw error;
390
- throw new _mastra_core_error.MastraError({
391
- id: "DEPLOYER_BUNDLER_ANALYZE_FAILED",
392
- text: `Failed to analyze Mastra application: ${message}`,
393
- domain: _mastra_core_error.ErrorDomain.DEPLOYER,
394
- category: _mastra_core_error.ErrorCategory.SYSTEM
395
- }, error);
396
- }
397
- const { workspaceRoot } = await require_analyze.getWorkspaceInformation({
398
- dir: projectRoot,
399
- mastraEntryFile
400
- });
401
- const sourceDependencyConstraints = await getSourceDependencyConstraints({
402
- projectRoot: entryProjectRoot,
403
- mastraEntryFile,
404
- workspaceRoot
405
- });
406
- const dependenciesToInstall = /* @__PURE__ */ new Map();
407
- for (const [dep, depInfo] of analyzedBundleInfo.externalDependencies) {
408
- if (analyzedBundleInfo.workspaceMap.has(dep) || !require_utils.isBareModuleSpecifier(dep)) continue;
409
- dependenciesToInstall.set(dep, applySourceDependencyRange(dep, depInfo, sourceDependencyConstraints));
410
- }
411
- const initialWorkspaceDependencies = /* @__PURE__ */ new Set();
412
- for (const dep of [...analyzedBundleInfo.dependencies.keys(), ...analyzedBundleInfo.externalDependencies.keys()]) {
413
- const pkgName = require_utils.getPackageName(dep);
414
- if (pkgName && analyzedBundleInfo.workspaceMap.has(pkgName)) initialWorkspaceDependencies.add(pkgName);
415
- }
416
- const transitiveWorkspaceDependencies = await require_analyze.collectTransitiveWorkspaceDependencies({
417
- workspaceMap: analyzedBundleInfo.workspaceMap,
418
- initialDependencies: initialWorkspaceDependencies,
419
- logger: this.logger
420
- });
421
- for (const [dep, packageSpec] of Object.entries(transitiveWorkspaceDependencies.resolutions)) dependenciesToInstall.set(dep, {
422
- version: analyzedBundleInfo.workspaceMap.get(dep)?.version,
423
- packageSpec
424
- });
425
- try {
426
- await this.writePackageJson((0, path.join)(outputDirectory, this.outputDir), dependenciesToInstall, transitiveWorkspaceDependencies.resolutions);
427
- if (transitiveWorkspaceDependencies.usedWorkspacePackages.size > 0) await require_analyze.packWorkspaceDependencies({
428
- workspaceMap: analyzedBundleInfo.workspaceMap,
429
- usedWorkspacePackages: transitiveWorkspaceDependencies.usedWorkspacePackages,
430
- bundleOutputDir: (0, path.join)(outputDirectory, this.outputDir),
431
- logger: this.logger
432
- });
433
- this.logger.info("Bundling Mastra application");
434
- const inputOptions = await this.getBundlerOptions(serverFile, mastraEntryFile, analyzedBundleInfo, toolsPaths, internalBundlerOptions, additionalEntries, entryProjectRoot);
435
- const unresolvedWorkspaceImports = [];
436
- await (await this.createBundler({
437
- ...inputOptions,
438
- logLevel: inputOptions.logLevel === "silent" ? "warn" : inputOptions.logLevel,
439
- onwarn: (warning) => {
440
- const unresolvedWorkspaceDep = require_bundler.getUnresolvedWorkspaceImport(warning, analyzedBundleInfo.workspaceMap);
441
- if (unresolvedWorkspaceDep) unresolvedWorkspaceImports.push({ source: unresolvedWorkspaceDep });
442
- if (warning.code === "CIRCULAR_DEPENDENCY") {
443
- if (warning.ids?.[0]?.includes("node_modules")) return;
444
- this.logger.warn("Circular dependency found", { dependency: warning.message.replace("Circular dependency: ", "") });
445
- }
446
- }
447
- }, {
448
- dir: bundleLocation,
449
- manualChunks: { mastra: ["#mastra"] },
450
- sourcemap: internalBundlerOptions.enableSourcemap
451
- })).write();
452
- if (unresolvedWorkspaceImports.length > 0) {
453
- const importList = unresolvedWorkspaceImports.map((i) => ` - ${i.source}`).join("\n");
454
- throw new _mastra_core_error.MastraError({
455
- id: "DEPLOYER_BUNDLER_UNRESOLVED_WORKSPACE_IMPORT",
456
- text: `Workspace imports could not be resolved during bundling:\n${importList}\n\nThis means the analyzer did not capture these workspace subpath imports during the analysis phase. Try adding the package as a direct dependency of the app, or check the workspace configuration.`,
457
- domain: _mastra_core_error.ErrorDomain.DEPLOYER,
458
- category: _mastra_core_error.ErrorCategory.SYSTEM
459
- });
460
- }
461
- const toolImports = [];
462
- const toolsExports = [];
463
- Array.from(Object.keys(inputOptions.input || {})).filter((key) => key.startsWith("tools/")).forEach((key, index) => {
464
- const toolExport = `tool${index}`;
465
- toolImports.push(`import * as ${toolExport} from './${key}.mjs';`);
466
- toolsExports.push(toolExport);
467
- });
468
- await (0, fs_promises.writeFile)((0, path.join)(bundleLocation, "tools.mjs"), `${toolImports.join("\n")}
469
-
470
- export const tools = [${toolsExports.join(", ")}]`);
471
- this.logger.info("Bundling Mastra done");
472
- this.logger.info("Copying public files");
473
- await this.copyPublic((0, path.dirname)(mastraEntryFile), outputDirectory);
474
- this.logger.info("Done copying public files");
475
- if (analyzedBundleInfo.projectType === "factory") await this.writeFactoryMarker(outputDirectory);
476
- this.logger.info("Copying .npmrc file");
477
- await this.copyDOTNPMRC({
478
- outputDirectory,
479
- rootDir: projectRoot
480
- });
481
- this.logger.info("Done copying .npmrc file");
482
- if (require_utils.shouldSkipInstall()) this.logger.info("Skipping dependency installation (MASTRA_BUILD_SKIP_INSTALL set)");
483
- else await this.installDependencies(outputDirectory, projectRoot, transitiveWorkspaceDependencies.resolutions, bundlerOptions.pnpmWorkspaceSettings);
484
- } catch (error) {
485
- if (error instanceof _mastra_core_error.MastraError && (error.id === "DEPLOYER_BUNDLER_FACTORY_UI_MISSING" || error.id === "DEPLOYER_PNPM_IGNORED_BUILDS")) throw error;
486
- const message = error instanceof Error ? error.message : String(error);
487
- throw new _mastra_core_error.MastraError({
488
- id: "DEPLOYER_BUNDLER_BUNDLE_STAGE_FAILED",
489
- text: `Failed during bundler bundle stage: ${message}`,
490
- domain: _mastra_core_error.ErrorDomain.DEPLOYER,
491
- category: _mastra_core_error.ErrorCategory.SYSTEM
492
- }, error);
493
- }
494
- }
495
- async lint(_entryFile, outputDirectory, toolsPaths) {
496
- const toolsInputOptions = await this.listToolsInputOptions(toolsPaths, (0, path.dirname)(outputDirectory));
497
- const toolsLength = Object.keys(toolsInputOptions).length;
498
- if (toolsLength > 0) this.logger.info("Found tools", { count: toolsLength });
499
- }
500
- };
501
- exports.Bundler = Bundler;
502
- exports.IS_DEFAULT = IS_DEFAULT;
503
- exports.applySourceDependencyRange = applySourceDependencyRange;
504
- exports.getSourceDependencyConstraints = getSourceDependencyConstraints;
505
- exports.isRegistryVersionSpec = isRegistryVersionSpec;
506
-
507
- //# sourceMappingURL=index.cjs.map
2
+ const require_bundler = require("../bundler-BBi45M7f.cjs");
3
+ exports.Bundler = require_bundler.Bundler;
4
+ exports.IS_DEFAULT = require_bundler.IS_DEFAULT;
5
+ exports.applySourceDependencyRange = require_bundler.applySourceDependencyRange;
6
+ exports.getSourceDependencyConstraints = require_bundler.getSourceDependencyConstraints;
7
+ exports.isRegistryVersionSpec = require_bundler.isRegistryVersionSpec;
@@ -1,5 +1,5 @@
1
- import { MastraBundler } from '@mastra/core/bundler';
2
- import type { Config } from '@mastra/core/mastra';
1
+ import { MastraBase } from '../_types/@internal_core/dist/base/index.js';
2
+ import type { BundlerConfig, IBundler } from '../_types/@internal_deployer/dist/index.js';
3
3
  import type { InputOptions, OutputOptions } from 'rollup';
4
4
  import { analyzeBundle } from '../build/analyze/index.js';
5
5
  import type { ExternalDependencyInfo, InternalBundlerOptions } from '../build/types.js';
@@ -56,12 +56,18 @@ export declare const getSourceDependencyConstraints: ({ projectRoot, mastraEntry
56
56
  * isolated install then locks it in.
57
57
  */
58
58
  export declare const applySourceDependencyRange: (dependencyName: string, dependencyInfo: ExternalDependencyInfo, constraints: SourceDependencyConstraints) => ExternalDependencyInfo;
59
- export declare abstract class Bundler extends MastraBundler {
59
+ export declare abstract class Bundler extends MastraBase implements IBundler {
60
60
  protected analyzeOutputDir: string;
61
61
  protected outputDir: string;
62
62
  protected platform: BundlerPlatform;
63
63
  protected defaultExternalsPreset: boolean;
64
64
  constructor(name: string, component?: 'BUNDLER' | 'DEPLOYER');
65
+ loadEnvVars(): Promise<Map<string, string>>;
66
+ abstract getEnvFiles(): Promise<string[]>;
67
+ abstract bundle(entryFile: string, outputDirectory: string, { toolsPaths, projectRoot }: {
68
+ toolsPaths: (string | string[])[];
69
+ projectRoot: string;
70
+ }): Promise<void>;
65
71
  prepare(outputDirectory: string): Promise<void>;
66
72
  writePackageJson(outputDirectory: string, dependencies: Map<string, string | ExternalDependencyInfo>, resolutions?: Record<string, string>): Promise<void>;
67
73
  protected createBundler(inputOptions: InputOptions, outputOptions: Partial<OutputOptions> & {
@@ -70,19 +76,19 @@ export declare abstract class Bundler extends MastraBundler {
70
76
  write: () => Promise<import("rollup").RollupOutput>;
71
77
  close: () => Promise<void>;
72
78
  }>;
73
- protected getUserBundlerOptions(mastraEntryFile: string, outputDirectory: string): Promise<NonNullable<Config['bundler']>>;
79
+ protected getUserBundlerOptions(mastraEntryFile: string, outputDirectory: string): Promise<BundlerConfig>;
74
80
  protected analyze(entry: string | string[], mastraFile: string, outputDirectory: string): Promise<{
75
- projectType?: string | undefined;
81
+ dependencies: Map<string, string>;
82
+ workspaceMap: Map<string, import("./workspaceDependencies").WorkspacePackageInfo>;
76
83
  externalDependencies: Map<string, ExternalDependencyInfo>;
77
84
  depsToOptimize: Map<string, import("../build/types").DependencyMetadata>;
78
85
  workspaceRoot: string | undefined;
79
86
  outputDir: string;
80
- dependencies: Map<string, string>;
81
- workspaceMap: Map<string, import("./workspaceDependencies").WorkspacePackageInfo>;
87
+ projectType?: string | undefined;
82
88
  }>;
83
89
  protected pnpmNodeLinker?: 'hoisted';
84
90
  protected getAdditionalEntries(): Record<string, string>;
85
- protected installDependencies(outputDirectory: string, rootDir?: string, pnpmOverrides?: Record<string, string>, pnpmWorkspaceSettings?: NonNullable<Config['bundler']>['pnpmWorkspaceSettings']): Promise<void>;
91
+ protected installDependencies(outputDirectory: string, rootDir?: string, pnpmOverrides?: Record<string, string>, pnpmWorkspaceSettings?: BundlerConfig['pnpmWorkspaceSettings']): Promise<void>;
86
92
  protected copyPublic(mastraDir: string, outputDirectory: string): Promise<void>;
87
93
  protected copyDOTNPMRC({ rootDir, outputDirectory, }: {
88
94
  rootDir?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler/index.ts"],"names":[],"mappings":"AAGA,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,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUtD,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,UAAU,eAAuB,CAAC;AAY/C;;;;;;;;GAQG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,uBAAuB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAYF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,OAgBpD,CAAC;AAiFF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,GAAU,kDAIlD;IACD,WAAW,EAAE,MAAM,C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