@mastra/deployer 1.79.0-alpha.1 → 1.79.0-alpha.11

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 (118) hide show
  1. package/dist/_types/@mastra_hono/dist/browser-stream/index.d.ts +54 -2
  2. package/dist/_types/@mastra_hono/dist/index.d.ts +1 -0
  3. package/dist/{analyze-CcyVW_jJ.cjs → analyze-Cb5JJp7Y.cjs} +178 -31
  4. package/dist/analyze-Cb5JJp7Y.cjs.map +1 -0
  5. package/dist/{analyze-BP0cLyWH.js → analyze-CbVhoukh.js} +175 -28
  6. package/dist/analyze-CbVhoukh.js.map +1 -0
  7. package/dist/{arktype-aI7TBD0R-DCxjN6oF.cjs → arktype-aI7TBD0R-BP9yJr5x.cjs} +2 -2
  8. package/dist/arktype-aI7TBD0R-BP9yJr5x.cjs.map +1 -0
  9. package/dist/{arktype-aI7TBD0R-BGjyzmsj.js → arktype-aI7TBD0R-cgd8o1cq.js} +2 -2
  10. package/dist/arktype-aI7TBD0R-cgd8o1cq.js.map +1 -0
  11. package/dist/build/analyze.cjs +1 -1
  12. package/dist/build/analyze.js +1 -2
  13. package/dist/build/bundler.cjs +1 -1
  14. package/dist/build/bundler.js +1 -2
  15. package/dist/build/fs-routing/discover.d.ts.map +1 -1
  16. package/dist/build/index.cjs +6 -6
  17. package/dist/build/index.js +5 -5
  18. package/dist/build/package-info.d.ts.map +1 -1
  19. package/dist/build/plugins/tsconfig-paths.d.ts +4 -3
  20. package/dist/build/plugins/tsconfig-paths.d.ts.map +1 -1
  21. package/dist/build/shared/extract-mastra-option.d.ts.map +1 -1
  22. package/dist/{build-DGJW5-aB.cjs → build-DGwrw0dD.cjs} +112 -50
  23. package/dist/build-DGwrw0dD.cjs.map +1 -0
  24. package/dist/{build-CNYwIKPG.js → build-qnakIZAs.js} +72 -9
  25. package/dist/build-qnakIZAs.js.map +1 -0
  26. package/dist/bundler/find-workspaces.d.ts +52 -0
  27. package/dist/bundler/find-workspaces.d.ts.map +1 -0
  28. package/dist/bundler/index.cjs +27 -19
  29. package/dist/bundler/index.cjs.map +1 -1
  30. package/dist/bundler/index.d.ts +1 -1
  31. package/dist/bundler/index.d.ts.map +1 -1
  32. package/dist/bundler/index.js +25 -17
  33. package/dist/bundler/index.js.map +1 -1
  34. package/dist/bundler/workspaceDependencies.d.ts.map +1 -1
  35. package/dist/{bundler-DtMHSv5_.js → bundler-BUqyRuGu.js} +78 -69
  36. package/dist/bundler-BUqyRuGu.js.map +1 -0
  37. package/dist/{bundler-CxslAqI_.cjs → bundler-Dpd5nkcu.cjs} +84 -76
  38. package/dist/bundler-Dpd5nkcu.cjs.map +1 -0
  39. package/dist/{bundlerOptions-BtMp_x-T.cjs → bundlerOptions-DHcbcD1a.cjs} +53 -3
  40. package/dist/bundlerOptions-DHcbcD1a.cjs.map +1 -0
  41. package/dist/{bundlerOptions-ID9i-l8I.js → bundlerOptions-DMxva0Sp.js} +50 -2
  42. package/dist/bundlerOptions-DMxva0Sp.js.map +1 -0
  43. package/dist/{core-D3wM1JKp.js → core-75DLMtZL.js} +23 -19
  44. package/dist/core-75DLMtZL.js.map +1 -0
  45. package/dist/{core-QL_X0T4Y.cjs → core-XnTfh3E_.cjs} +23 -19
  46. package/dist/core-XnTfh3E_.cjs.map +1 -0
  47. package/dist/dist-DYm9bBZO.js.map +1 -1
  48. package/dist/dist-twPJIvYf.cjs.map +1 -1
  49. package/dist/docs/SKILL.md +1 -1
  50. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  51. package/dist/{effect-QlVUlMFu-B2nZ842E.cjs → effect-QlVUlMFu-CC0Mpf1v.cjs} +3 -3
  52. package/dist/{effect-QlVUlMFu-B2nZ842E.cjs.map → effect-QlVUlMFu-CC0Mpf1v.cjs.map} +1 -1
  53. package/dist/{effect-QlVUlMFu-DbWuPaWV.js → effect-QlVUlMFu-Cvay38Oi.js} +3 -3
  54. package/dist/{effect-QlVUlMFu-DbWuPaWV.js.map → effect-QlVUlMFu-Cvay38Oi.js.map} +1 -1
  55. package/dist/{esm-D-wYOO-S.js → esm-ClsnEB2d.js} +111 -113
  56. package/dist/{esm-D-wYOO-S.js.map → esm-ClsnEB2d.js.map} +1 -1
  57. package/dist/{esm-Ai6osZ1a.cjs → esm-D74qc_jV.cjs} +111 -113
  58. package/dist/{esm-Ai6osZ1a.cjs.map → esm-D74qc_jV.cjs.map} +1 -1
  59. package/dist/{index-CLddUTqr-BXqo9et4.js → index-CLddUTqr-86A1rnBL.js} +8 -8
  60. package/dist/{index-CLddUTqr-BXqo9et4.js.map → index-CLddUTqr-86A1rnBL.js.map} +1 -1
  61. package/dist/{index-CLddUTqr-DsGkVS-W.cjs → index-CLddUTqr-D0GzVJyg.cjs} +8 -8
  62. package/dist/{index-CLddUTqr-DsGkVS-W.cjs.map → index-CLddUTqr-D0GzVJyg.cjs.map} +1 -1
  63. package/dist/index.cjs +3 -3
  64. package/dist/index.js +3 -3
  65. package/dist/{rolldown-runtime-emK7D4bc.cjs → rolldown-runtime-Gi87jfEt.cjs} +2 -2
  66. package/dist/server/index.cjs +338 -84
  67. package/dist/server/index.cjs.map +1 -1
  68. package/dist/server/index.d.ts.map +1 -1
  69. package/dist/server/index.js +316 -62
  70. package/dist/server/index.js.map +1 -1
  71. package/dist/services/deps.d.ts +13 -1
  72. package/dist/services/deps.d.ts.map +1 -1
  73. package/dist/services/index.cjs +1 -1
  74. package/dist/services/index.js +1 -2
  75. package/dist/{services-DXqmEy8F.js → services-183Omg3U.js} +167 -31
  76. package/dist/services-183Omg3U.js.map +1 -0
  77. package/dist/{services-D_V7afWX.cjs → services-C1jM_6ta.cjs} +180 -31
  78. package/dist/services-C1jM_6ta.cjs.map +1 -0
  79. package/dist/{sury-CWZTCd75-ChXu4j-p.cjs → sury-CWZTCd75-TIJwZAOz.cjs} +3 -3
  80. package/dist/{sury-CWZTCd75-ChXu4j-p.cjs.map → sury-CWZTCd75-TIJwZAOz.cjs.map} +1 -1
  81. package/dist/{sury-CWZTCd75-OKz7uWLi.js → sury-CWZTCd75-r5hgAI0o.js} +3 -3
  82. package/dist/{sury-CWZTCd75-OKz7uWLi.js.map → sury-CWZTCd75-r5hgAI0o.js.map} +1 -1
  83. package/dist/{typebox-Dei93FPO-KTtPU745.cjs → typebox-Dei93FPO-B14DOQQD.cjs} +2 -2
  84. package/dist/typebox-Dei93FPO-B14DOQQD.cjs.map +1 -0
  85. package/dist/{typebox-Dei93FPO-C5ACKU09.js → typebox-Dei93FPO-BCfJ-0cP.js} +2 -2
  86. package/dist/typebox-Dei93FPO-BCfJ-0cP.js.map +1 -0
  87. package/dist/{utils-Bsr_sEcH.cjs → utils-C-gJcJAo.cjs} +4 -4
  88. package/dist/utils-C-gJcJAo.cjs.map +1 -0
  89. package/dist/{valibot--1zFm7rT-BeX3W1HK.cjs → valibot--1zFm7rT-BiQdCU9y.cjs} +3 -3
  90. package/dist/{valibot--1zFm7rT-BeX3W1HK.cjs.map → valibot--1zFm7rT-BiQdCU9y.cjs.map} +1 -1
  91. package/dist/{valibot--1zFm7rT-BuVb-6oJ.js → valibot--1zFm7rT-CU_2XLpq.js} +3 -3
  92. package/dist/{valibot--1zFm7rT-BuVb-6oJ.js.map → valibot--1zFm7rT-CU_2XLpq.js.map} +1 -1
  93. package/dist/validator/custom-resolver.cjs +1 -1
  94. package/dist/validator/custom-resolver.cjs.map +1 -1
  95. package/dist/validator/loader.cjs.map +1 -1
  96. package/dist/validator/loader.js.map +1 -1
  97. package/dist/{zod-Bwrt9trS-D5b1oyiT.js → zod-Bwrt9trS-BurSNK0g.js} +5 -5
  98. package/dist/{zod-Bwrt9trS-D5b1oyiT.js.map → zod-Bwrt9trS-BurSNK0g.js.map} +1 -1
  99. package/dist/{zod-Bwrt9trS-DGQs9DWc.cjs → zod-Bwrt9trS-Kv0hKWrV.cjs} +5 -5
  100. package/dist/{zod-Bwrt9trS-DGQs9DWc.cjs.map → zod-Bwrt9trS-Kv0hKWrV.cjs.map} +1 -1
  101. package/package.json +11 -14
  102. package/dist/analyze-BP0cLyWH.js.map +0 -1
  103. package/dist/analyze-CcyVW_jJ.cjs.map +0 -1
  104. package/dist/arktype-aI7TBD0R-BGjyzmsj.js.map +0 -1
  105. package/dist/arktype-aI7TBD0R-DCxjN6oF.cjs.map +0 -1
  106. package/dist/build-CNYwIKPG.js.map +0 -1
  107. package/dist/build-DGJW5-aB.cjs.map +0 -1
  108. package/dist/bundler-CxslAqI_.cjs.map +0 -1
  109. package/dist/bundler-DtMHSv5_.js.map +0 -1
  110. package/dist/bundlerOptions-BtMp_x-T.cjs.map +0 -1
  111. package/dist/bundlerOptions-ID9i-l8I.js.map +0 -1
  112. package/dist/core-D3wM1JKp.js.map +0 -1
  113. package/dist/core-QL_X0T4Y.cjs.map +0 -1
  114. package/dist/services-DXqmEy8F.js.map +0 -1
  115. package/dist/services-D_V7afWX.cjs.map +0 -1
  116. package/dist/typebox-Dei93FPO-C5ACKU09.js.map +0 -1
  117. package/dist/typebox-Dei93FPO-KTtPU745.cjs.map +0 -1
  118. package/dist/utils-Bsr_sEcH.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-Gi87jfEt.cjs");
2
2
  let fs = require("fs");
3
3
  fs = require_rolldown_runtime.__toESM(fs, 1);
4
4
  let fs_promises = require("fs/promises");
@@ -88,6 +88,119 @@ function createChildProcessLogger({ logger, root }) {
88
88
  }
89
89
  //#endregion
90
90
  //#region src/services/deps.ts
91
+ /** Version used to pack private workspace packages whose package.json has no `version`. */
92
+ const WORKSPACE_PLACEHOLDER_VERSION = "0.0.0";
93
+ async function writeManifestAtomically(manifestPath, contents, inFlight) {
94
+ const tmpPath = `${manifestPath}.${process.pid}.${Date.now()}.tmp`;
95
+ inFlight?.add(tmpPath);
96
+ try {
97
+ const { mode } = await fs_promises.default.stat(manifestPath);
98
+ await fs_promises.default.writeFile(tmpPath, contents, { mode });
99
+ await fs_promises.default.chmod(tmpPath, mode);
100
+ await fs_promises.default.rename(tmpPath, manifestPath);
101
+ } catch (error) {
102
+ await fs_promises.default.rm(tmpPath, { force: true });
103
+ throw error;
104
+ } finally {
105
+ inFlight?.delete(tmpPath);
106
+ }
107
+ }
108
+ /**
109
+ * Package managers refuse to pack a manifest without a version, and pnpm/bun also
110
+ * resolve `workspace:` ranges from the dependency's manifest. So every versionless
111
+ * package in `dirs` gets the placeholder version for the whole of `operation`, and
112
+ * the original manifests are restored afterwards — also on SIGINT/SIGTERM.
113
+ */
114
+ async function withPlaceholderVersions(dirs, operation) {
115
+ const acquired = [];
116
+ try {
117
+ for (const dir of new Set(dirs.map((dir) => path.default.resolve(dir)))) {
118
+ const manifestPath = path.default.join(dir, "package.json");
119
+ let lease = placeholderLeases.get(manifestPath);
120
+ while (lease?.releasing) {
121
+ await lease.releasing.catch(() => {});
122
+ lease = placeholderLeases.get(manifestPath);
123
+ }
124
+ if (lease) lease.refs++;
125
+ else {
126
+ lease = {
127
+ refs: 1,
128
+ injected: false,
129
+ ready: Promise.resolve()
130
+ };
131
+ lease.ready = injectPlaceholderVersion(manifestPath, lease);
132
+ placeholderLeases.set(manifestPath, lease);
133
+ installSignalHandlers();
134
+ }
135
+ acquired.push(manifestPath);
136
+ await lease.ready;
137
+ }
138
+ return await operation();
139
+ } finally {
140
+ try {
141
+ for (const manifestPath of acquired) await releasePlaceholderVersion(manifestPath);
142
+ } finally {
143
+ if (placeholderLeases.size === 0) removeSignalHandlers();
144
+ }
145
+ }
146
+ }
147
+ const placeholderLeases = /* @__PURE__ */ new Map();
148
+ const inFlightTmpPaths = /* @__PURE__ */ new Set();
149
+ async function injectPlaceholderVersion(manifestPath, lease) {
150
+ const original = await fs_promises.default.readFile(manifestPath, "utf-8").catch(() => void 0);
151
+ if (original === void 0) return;
152
+ let manifest;
153
+ try {
154
+ manifest = JSON.parse(original);
155
+ } catch (error) {
156
+ throw new Error(`Failed to parse ${manifestPath}: ${error.message}`, { cause: error });
157
+ }
158
+ if (manifest.version) return;
159
+ lease.original = original;
160
+ lease.injected = true;
161
+ await writeManifestAtomically(manifestPath, JSON.stringify({
162
+ ...manifest,
163
+ version: WORKSPACE_PLACEHOLDER_VERSION
164
+ }, null, 2) + "\n", inFlightTmpPaths);
165
+ }
166
+ async function releasePlaceholderVersion(manifestPath) {
167
+ const lease = placeholderLeases.get(manifestPath);
168
+ if (--lease.refs > 0) return;
169
+ lease.releasing = (async () => {
170
+ await lease.ready.catch(() => {});
171
+ try {
172
+ if (lease.injected) {
173
+ await writeManifestAtomically(manifestPath, lease.original, inFlightTmpPaths);
174
+ lease.injected = false;
175
+ }
176
+ } finally {
177
+ placeholderLeases.delete(manifestPath);
178
+ }
179
+ })();
180
+ await lease.releasing;
181
+ }
182
+ function restorePlaceholderVersionsSync() {
183
+ for (const tmpPath of inFlightTmpPaths) fs.default.rmSync(tmpPath, { force: true });
184
+ inFlightTmpPaths.clear();
185
+ for (const [manifestPath, lease] of placeholderLeases) if (lease.injected) {
186
+ fs.default.writeFileSync(manifestPath, lease.original);
187
+ lease.injected = false;
188
+ }
189
+ }
190
+ function onPlaceholderSignal(signal) {
191
+ restorePlaceholderVersionsSync();
192
+ removeSignalHandlers();
193
+ process.kill(process.pid, signal);
194
+ }
195
+ function installSignalHandlers() {
196
+ if (process.listeners("SIGINT").includes(onPlaceholderSignal)) return;
197
+ process.once("SIGINT", onPlaceholderSignal);
198
+ process.once("SIGTERM", onPlaceholderSignal);
199
+ }
200
+ function removeSignalHandlers() {
201
+ process.off("SIGINT", onPlaceholderSignal);
202
+ process.off("SIGTERM", onPlaceholderSignal);
203
+ }
91
204
  const PNPM_PATCHES_DIR = "pnpm-patches";
92
205
  const BUN_PATCHES_DIR = "bun-patches";
93
206
  const PNPM_CONFIG_KEYS_TO_COPY = /* @__PURE__ */ new Set([
@@ -102,6 +215,20 @@ const PNPM_CONFIG_KEYS_TO_COPY = /* @__PURE__ */ new Set([
102
215
  "trustPolicyIgnoreAfter",
103
216
  "supportedArchitectures"
104
217
  ]);
218
+ const PNPM_EXPLICIT_SETTING_KEYS = new Set([...PNPM_CONFIG_KEYS_TO_COPY, "blockExoticSubdeps"].filter((key) => key !== "supportedArchitectures" && key !== "neverBuiltDependencies"));
219
+ function serializePnpmWorkspaceSettings(settings) {
220
+ return Object.entries(settings ?? {}).filter(([, value]) => value !== void 0).map(([key, value]) => {
221
+ if (!PNPM_EXPLICIT_SETTING_KEYS.has(key)) throw new _mastra_core_error.MastraError({
222
+ id: "DEPLOYER_INVALID_PNPM_WORKSPACE_SETTING",
223
+ domain: _mastra_core_error.ErrorDomain.DEPLOYER,
224
+ category: _mastra_core_error.ErrorCategory.USER,
225
+ text: `pnpm workspace setting ${JSON.stringify(key)} isn't supported in bundler.pnpmWorkspaceSettings. Supported settings: ${[...PNPM_EXPLICIT_SETTING_KEYS].join(", ")}.`
226
+ });
227
+ const block = (0, yaml.stringify)({ [key]: value }).trimEnd();
228
+ validatePnpmBuildApprovals(key, block);
229
+ return block;
230
+ });
231
+ }
105
232
  function getTopLevelYamlKey(line) {
106
233
  return /^(?!\s)([\w-]+):/.exec(line)?.[1];
107
234
  }
@@ -165,6 +292,7 @@ function parsePnpmPatchedDependencies(source) {
165
292
  function copyPnpmWorkspaceSettings(source, options = {}) {
166
293
  const hasArchitecture = Boolean(options.os?.length || options.cpu?.length || options.libc?.length);
167
294
  const lines = source.split(/\r?\n/);
295
+ const customBlocks = serializePnpmWorkspaceSettings(options.pnpmWorkspaceSettings);
168
296
  const blocks = [];
169
297
  for (let index = 0; index < lines.length;) {
170
298
  const key = getTopLevelYamlKey(lines[index] ?? "");
@@ -175,7 +303,7 @@ function copyPnpmWorkspaceSettings(source, options = {}) {
175
303
  const start = index;
176
304
  index += 1;
177
305
  while (index < lines.length && !getTopLevelYamlKey(lines[index] ?? "")) index += 1;
178
- if (!PNPM_CONFIG_KEYS_TO_COPY.has(key) || key === "supportedArchitectures" && hasArchitecture) continue;
306
+ if (!PNPM_CONFIG_KEYS_TO_COPY.has(key) || options.pnpmWorkspaceSettings?.[key] !== void 0 || key === "supportedArchitectures" && hasArchitecture) continue;
179
307
  const block = lines.slice(start, index).join("\n").trimEnd();
180
308
  if (block) {
181
309
  validatePnpmBuildApprovals(key, block);
@@ -195,7 +323,11 @@ function copyPnpmWorkspaceSettings(source, options = {}) {
195
323
  blocks.push("allowUnusedPatches: true");
196
324
  }
197
325
  if (options.pnpmNodeLinker) blocks.push(`nodeLinker: ${options.pnpmNodeLinker}`);
198
- return ["packages:\n - '.'", ...blocks].join("\n\n") + "\n";
326
+ return [
327
+ "packages:\n - '.'",
328
+ ...blocks,
329
+ ...customBlocks
330
+ ].join("\n\n") + "\n";
199
331
  }
200
332
  const SAFE_PACKAGE_VERSION = /^[0-9A-Za-z.+-]+$/;
201
333
  /**
@@ -264,19 +396,21 @@ var Deps = class extends _mastra_core_base.MastraBase {
264
396
  });
265
397
  let packCmd = "pack";
266
398
  let destinationFlag = `--pack-destination ${destination}`;
267
- if (this.packageManager === "yarn") if (this.lockFile && await isYarnClassicLockfile(this.lockFile.path)) {
268
- if (!SAFE_PACKAGE_VERSION.test(version)) throw new _mastra_core_error.MastraError({
269
- id: "DEPLOYER_INVALID_WORKSPACE_PACKAGE_VERSION",
270
- domain: _mastra_core_error.ErrorDomain.DEPLOYER,
271
- category: _mastra_core_error.ErrorCategory.USER,
272
- details: {
273
- dir,
274
- version: String(version)
275
- },
276
- text: `Invalid version ${JSON.stringify(version)} in workspace package at ${dir}`
277
- });
278
- destinationFlag = `--filename ${destination}/${sanitizedName}-${version}.tgz`;
279
- } else destinationFlag = `--out ${destination}/${sanitizedName}-%v.tgz`;
399
+ if (this.packageManager === "yarn") {
400
+ if (this.lockFile && await isYarnClassicLockfile(this.lockFile.path)) {
401
+ if (!SAFE_PACKAGE_VERSION.test(version)) throw new _mastra_core_error.MastraError({
402
+ id: "DEPLOYER_INVALID_WORKSPACE_PACKAGE_VERSION",
403
+ domain: _mastra_core_error.ErrorDomain.DEPLOYER,
404
+ category: _mastra_core_error.ErrorCategory.USER,
405
+ details: {
406
+ dir,
407
+ version: String(version)
408
+ },
409
+ text: `Invalid version ${JSON.stringify(version)} in workspace package at ${dir}`
410
+ });
411
+ destinationFlag = `--filename ${destination}/${sanitizedName}-${version}.tgz`;
412
+ } else destinationFlag = `--out ${destination}/${sanitizedName}-%v.tgz`;
413
+ }
280
414
  if (this.packageManager === "bun") {
281
415
  packCmd = "pm pack";
282
416
  destinationFlag = `--destination ${destination}`;
@@ -445,13 +579,15 @@ var Deps = class extends _mastra_core_base.MastraBase {
445
579
  default: return cmd;
446
580
  }
447
581
  }
448
- async install({ dir = this.rootDir, architecture, pnpmOverrides, pnpmNodeLinker } = {}) {
582
+ async install({ dir = this.rootDir, architecture, pnpmOverrides, pnpmNodeLinker, pnpmWorkspaceSettings } = {}) {
449
583
  const pm = this.packageManager;
450
584
  let yarnClassic = false;
451
585
  if (this.lockFile) {
452
586
  const destination = path.default.join(dir, this.lockFile.filename);
453
- if (path.default.resolve(this.lockFile.path) !== path.default.resolve(destination)) if (pm === "bun" && fs.default.existsSync(path.default.join(dir, "package.json")) && Object.values((await (0, fs_extra_esm.readJSON)(path.default.join(dir, "package.json"))).resolutions ?? {}).some((spec) => spec.startsWith("file:./workspace-module/"))) await fs_promises.default.rm(destination, { force: true });
454
- else await fs_promises.default.copyFile(this.lockFile.path, destination);
587
+ if (path.default.resolve(this.lockFile.path) !== path.default.resolve(destination)) {
588
+ if (pm === "bun" && fs.default.existsSync(path.default.join(dir, "package.json")) && Object.values((await (0, fs_extra_esm.readJSON)(path.default.join(dir, "package.json"))).resolutions ?? {}).some((spec) => spec.startsWith("file:./workspace-module/"))) await fs_promises.default.rm(destination, { force: true });
589
+ else await fs_promises.default.copyFile(this.lockFile.path, destination);
590
+ }
455
591
  if (pm === "yarn") yarnClassic = await isYarnClassicLockfile(destination);
456
592
  }
457
593
  const installCommand = this.getPackageManagerCommand(pm, "install", { yarnClassic });
@@ -461,7 +597,8 @@ var Deps = class extends _mastra_core_base.MastraBase {
461
597
  await this.writePnpmConfig(dir, {
462
598
  ...architecture,
463
599
  pnpmOverrides,
464
- pnpmNodeLinker
600
+ pnpmNodeLinker,
601
+ pnpmWorkspaceSettings
465
602
  });
466
603
  break;
467
604
  case "yarn":
@@ -472,10 +609,7 @@ var Deps = class extends _mastra_core_base.MastraBase {
472
609
  case "bun":
473
610
  await this.copyBunPatchesToOutput(dir);
474
611
  break;
475
- case "npm":
476
- if (architecture) args = this.getNpmArgs(architecture);
477
- break;
478
- default:
612
+ case "npm": if (architecture) args = this.getNpmArgs(architecture);
479
613
  }
480
614
  const cpLogger = createChildProcessLogger({
481
615
  logger: this.logger,
@@ -532,14 +666,17 @@ var Deps = class extends _mastra_core_base.MastraBase {
532
666
  }
533
667
  async getProjectName() {
534
668
  try {
535
- return (await (0, fs_extra_esm.readJSON)(path.default.join(this.rootDir, "package.json"))).name;
669
+ const packageJsonPath = path.default.join(this.rootDir, "package.json");
670
+ return (await (0, fs_extra_esm.readJSON)(packageJsonPath)).name;
536
671
  } catch (err) {
537
672
  throw err;
538
673
  }
539
674
  }
540
675
  async getPackageVersion() {
541
- const __dirname = (0, path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
542
- return (await (0, fs_extra_esm.readJSON)(path.default.join(__dirname, "..", "..", "package.json"))).version;
676
+ const __filename$2 = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
677
+ const __dirname$2 = (0, path.dirname)(__filename$2);
678
+ const pkgJsonPath = path.default.join(__dirname$2, "..", "..", "package.json");
679
+ return (await (0, fs_extra_esm.readJSON)(pkgJsonPath)).version;
543
680
  }
544
681
  async addScriptsToPackageJson(scripts) {
545
682
  const packageJson = await (0, fs_extra_esm.readJSON)("package.json");
@@ -621,9 +758,9 @@ var FileService = class {
621
758
  * @returns
622
759
  */
623
760
  async copyStarterFile(inputFile, outputFilePath, replaceIfExists) {
624
- const __filename = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
625
- const __dirname = path.default.dirname(__filename);
626
- const filePath = path.default.resolve(__dirname, "..", "starter-files", inputFile);
761
+ const __filename$1 = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
762
+ const __dirname$1 = path.default.dirname(__filename$1);
763
+ const filePath = path.default.resolve(__dirname$1, "..", "starter-files", inputFile);
627
764
  const fileString = fs.default.readFileSync(filePath, "utf8");
628
765
  if (fs.default.existsSync(outputFilePath) && !replaceIfExists) {
629
766
  console.info(`${outputFilePath} already exists`);
@@ -690,6 +827,12 @@ Object.defineProperty(exports, "FileService", {
690
827
  return FileService;
691
828
  }
692
829
  });
830
+ Object.defineProperty(exports, "WORKSPACE_PLACEHOLDER_VERSION", {
831
+ enumerable: true,
832
+ get: function() {
833
+ return WORKSPACE_PLACEHOLDER_VERSION;
834
+ }
835
+ });
693
836
  Object.defineProperty(exports, "createChildProcessLogger", {
694
837
  enumerable: true,
695
838
  get: function() {
@@ -702,5 +845,11 @@ Object.defineProperty(exports, "createPinoStream", {
702
845
  return createPinoStream;
703
846
  }
704
847
  });
848
+ Object.defineProperty(exports, "withPlaceholderVersions", {
849
+ enumerable: true,
850
+ get: function() {
851
+ return withPlaceholderVersions;
852
+ }
853
+ });
705
854
 
706
- //# sourceMappingURL=services-D_V7afWX.cjs.map
855
+ //# sourceMappingURL=services-C1jM_6ta.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services-C1jM_6ta.cjs","names":["Writable","spawn","fsPromises","MastraError","ErrorDomain","ErrorCategory","stringify","parse","MastraBase","readJSON","writeJSON","ensureFile","__filename","fileURLToPath","__dirname","dirname","__filename","fileURLToPath","__dirname","fsExtra"],"sources":["../src/deploy/log.ts","../src/services/deps.ts","../src/services/env.ts","../src/services/fs.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport { Writable } from 'node:stream';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport const createPinoStream = (logger: IMastraLogger) => {\n return new Writable({\n write(chunk, _encoding, callback) {\n // Convert Buffer/string to string and trim whitespace\n const line = chunk.toString().trim();\n\n if (line) {\n console.info(line);\n // Log each line through Pino\n logger.info(line);\n }\n\n callback();\n },\n });\n};\n\n/**\n * Args are joined into a shell command (`shell: true` is required for package\n * manager shims on Windows), so only allow characters that appear in package\n * specifiers and CLI flags — never shell metacharacters (CodeQL\n * js/shell-command-constructed-from-input).\n */\nconst SAFE_SHELL_ARG = /^[\\w@%+=:,./^~-]*$/;\n\nexport function createChildProcessLogger({ logger, root }: { logger: IMastraLogger; root: string }) {\n const pinoStream = createPinoStream(logger);\n return async ({ cmd, args, env }: { cmd: string; args: string[]; env: Record<string, string> }) => {\n try {\n for (const arg of args) {\n if (!SAFE_SHELL_ARG.test(arg)) {\n throw new Error(`Refusing to pass unsafe argument to shell command: ${JSON.stringify(arg)}`);\n }\n }\n const subprocess = spawn(cmd, args, {\n cwd: root,\n shell: true,\n env,\n // No stdin for the child process — it doesn't need interactive input\n stdio: ['ignore', 'pipe', 'pipe'],\n });\n\n let stdout = '';\n let stderr = '';\n subprocess.stdout?.on('data', chunk => {\n stdout += chunk.toString();\n });\n subprocess.stderr?.on('data', chunk => {\n stderr += chunk.toString();\n });\n\n // Pipe stdout and stderr through the logging stream.\n // { end: false } prevents the first stream to close from ending pinoStream\n // while the other may still be writing.\n subprocess.stdout?.pipe(pinoStream, { end: false });\n subprocess.stderr?.pipe(pinoStream, { end: false });\n\n // Wait for the process to complete\n return new Promise((resolve, reject) => {\n subprocess.on('close', code => {\n pinoStream.end();\n if (code === 0) {\n resolve({ success: true, stdout, stderr });\n } else {\n reject(Object.assign(new Error(`Process exited with code ${code}`), { stdout, stderr }));\n }\n });\n\n subprocess.on('error', error => {\n pinoStream.end();\n logger.error('Process failed', { error });\n reject(error);\n });\n });\n } catch (error) {\n console.error(error);\n logger.error('Process failed', { error });\n pinoStream.end();\n return { success: false, error };\n }\n };\n}\n","import fs from 'node:fs';\nimport fsPromises from 'node:fs/promises';\nimport path, { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { MastraBase } from '@mastra/core/base';\nimport type { BundlerConfig } from '@mastra/core/bundler';\nimport { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';\nimport { readJSON, writeJSON, ensureFile } from 'fs-extra/esm';\nimport type { PackageJson } from 'type-fest';\nimport { parse, stringify } from 'yaml';\n\nimport { createChildProcessLogger } from '../deploy/log.js';\n\ntype PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';\n\n/** Version used to pack private workspace packages whose package.json has no `version`. */\nexport const WORKSPACE_PLACEHOLDER_VERSION = '0.0.0';\n\n// Write via temp file + rename so an interrupted write never leaves a truncated manifest.\nasync function writeManifestAtomically(manifestPath: string, contents: string, inFlight?: Set<string>) {\n const tmpPath = `${manifestPath}.${process.pid}.${Date.now()}.tmp`;\n inFlight?.add(tmpPath);\n try {\n const { mode } = await fsPromises.stat(manifestPath);\n await fsPromises.writeFile(tmpPath, contents, { mode });\n await fsPromises.chmod(tmpPath, mode);\n await fsPromises.rename(tmpPath, manifestPath);\n } catch (error) {\n await fsPromises.rm(tmpPath, { force: true });\n throw error;\n } finally {\n inFlight?.delete(tmpPath);\n }\n}\n\n/**\n * Package managers refuse to pack a manifest without a version, and pnpm/bun also\n * resolve `workspace:` ranges from the dependency's manifest. So every versionless\n * package in `dirs` gets the placeholder version for the whole of `operation`, and\n * the original manifests are restored afterwards — also on SIGINT/SIGTERM.\n */\nexport async function withPlaceholderVersions<T>(dirs: string[], operation: () => Promise<T>): Promise<T> {\n const acquired: string[] = [];\n try {\n for (const dir of new Set(dirs.map(dir => path.resolve(dir)))) {\n const manifestPath = path.join(dir, 'package.json');\n let lease = placeholderLeases.get(manifestPath);\n // A lease whose last owner is restoring it can't be joined; wait and start a fresh one.\n while (lease?.releasing) {\n await lease.releasing.catch(() => {});\n lease = placeholderLeases.get(manifestPath);\n }\n if (lease) {\n lease.refs++;\n } else {\n lease = { refs: 1, injected: false, ready: Promise.resolve() };\n lease.ready = injectPlaceholderVersion(manifestPath, lease);\n placeholderLeases.set(manifestPath, lease);\n installSignalHandlers();\n }\n acquired.push(manifestPath);\n await lease.ready;\n }\n return await operation();\n } finally {\n try {\n for (const manifestPath of acquired) {\n await releasePlaceholderVersion(manifestPath);\n }\n } finally {\n if (placeholderLeases.size === 0) {\n removeSignalHandlers();\n }\n }\n }\n}\n\ninterface PlaceholderLease {\n refs: number;\n original?: string;\n injected: boolean;\n ready: Promise<void>;\n releasing?: Promise<void>;\n}\n\n// Shared across calls so one bundle can't restore a manifest another is still packing.\nconst placeholderLeases = new Map<string, PlaceholderLease>();\nconst inFlightTmpPaths = new Set<string>();\n\nasync function injectPlaceholderVersion(manifestPath: string, lease: PlaceholderLease) {\n const original = await fsPromises.readFile(manifestPath, 'utf-8').catch(() => undefined);\n if (original === undefined) return;\n let manifest: PackageJson;\n try {\n manifest = JSON.parse(original) as PackageJson;\n } catch (error) {\n throw new Error(`Failed to parse ${manifestPath}: ${(error as Error).message}`, { cause: error });\n }\n if (manifest.version) return;\n lease.original = original;\n // Mark before writing so a signal mid-write still restores this manifest.\n lease.injected = true;\n await writeManifestAtomically(\n manifestPath,\n JSON.stringify({ ...manifest, version: WORKSPACE_PLACEHOLDER_VERSION }, null, 2) + '\\n',\n inFlightTmpPaths,\n );\n}\n\nasync function releasePlaceholderVersion(manifestPath: string) {\n const lease = placeholderLeases.get(manifestPath)!;\n if (--lease.refs > 0) return;\n lease.releasing = (async () => {\n await lease.ready.catch(() => {});\n try {\n if (lease.injected) {\n await writeManifestAtomically(manifestPath, lease.original!, inFlightTmpPaths);\n lease.injected = false;\n }\n } finally {\n placeholderLeases.delete(manifestPath);\n }\n })();\n await lease.releasing;\n}\n\nfunction restorePlaceholderVersionsSync() {\n // Removing in-flight temp files keeps them out of later tarballs and makes any\n // pending rename fail instead of overwriting the restored manifest.\n for (const tmpPath of inFlightTmpPaths) {\n fs.rmSync(tmpPath, { force: true });\n }\n inFlightTmpPaths.clear();\n for (const [manifestPath, lease] of placeholderLeases) {\n if (lease.injected) {\n fs.writeFileSync(manifestPath, lease.original!);\n lease.injected = false;\n }\n }\n}\n\nfunction onPlaceholderSignal(signal: NodeJS.Signals) {\n restorePlaceholderVersionsSync();\n removeSignalHandlers();\n process.kill(process.pid, signal);\n}\n\nfunction installSignalHandlers() {\n if (process.listeners('SIGINT').includes(onPlaceholderSignal)) return;\n process.once('SIGINT', onPlaceholderSignal);\n process.once('SIGTERM', onPlaceholderSignal);\n}\n\nfunction removeSignalHandlers() {\n process.off('SIGINT', onPlaceholderSignal);\n process.off('SIGTERM', onPlaceholderSignal);\n}\n\ninterface LockFileInfo {\n path: string;\n filename: string;\n packageManager: PackageManager;\n}\n\ninterface ArchitectureOptions {\n os?: string[];\n cpu?: string[];\n libc?: string[];\n}\n\ninterface InstallOptions extends ArchitectureOptions {\n pnpmWorkspaceSettings?: BundlerConfig['pnpmWorkspaceSettings'];\n pnpmOverrides?: Record<string, string>;\n pnpmNodeLinker?: 'hoisted';\n /** Patch key -> path relative to the output directory. */\n patchedDependencies?: Record<string, string>;\n}\n\nconst PNPM_PATCHES_DIR = 'pnpm-patches';\nconst BUN_PATCHES_DIR = 'bun-patches';\n\nconst PNPM_CONFIG_KEYS_TO_COPY = new Set([\n 'allowBuilds',\n 'onlyBuiltDependencies',\n 'ignoredBuiltDependencies',\n 'neverBuiltDependencies',\n 'minimumReleaseAge',\n 'minimumReleaseAgeExclude',\n 'trustPolicy',\n 'trustPolicyExclude',\n 'trustPolicyIgnoreAfter',\n 'supportedArchitectures',\n]);\n\n// supportedArchitectures is generated from deployer architecture targets, so it can't be set explicitly.\n// neverBuiltDependencies switches pnpm 10 into deny-list mode, which runs every build script it doesn't name.\nconst PNPM_EXPLICIT_SETTING_KEYS = new Set(\n [...PNPM_CONFIG_KEYS_TO_COPY, 'blockExoticSubdeps'].filter(\n key => key !== 'supportedArchitectures' && key !== 'neverBuiltDependencies',\n ),\n);\n\nfunction serializePnpmWorkspaceSettings(settings: BundlerConfig['pnpmWorkspaceSettings']) {\n // Untyped JS configs can pass undefined; treat it as omitted so the copied source setting survives.\n const definedSettings = Object.entries(settings ?? {}).filter(([, value]) => value !== undefined);\n return definedSettings.map(([key, value]) => {\n if (!PNPM_EXPLICIT_SETTING_KEYS.has(key)) {\n throw new MastraError({\n id: 'DEPLOYER_INVALID_PNPM_WORKSPACE_SETTING',\n domain: ErrorDomain.DEPLOYER,\n category: ErrorCategory.USER,\n text: `pnpm workspace setting ${JSON.stringify(key)} isn't supported in bundler.pnpmWorkspaceSettings. Supported settings: ${[...PNPM_EXPLICIT_SETTING_KEYS].join(', ')}.`,\n });\n }\n const block = stringify({ [key]: value }).trimEnd();\n validatePnpmBuildApprovals(key, block);\n return block;\n });\n}\n\nfunction getTopLevelYamlKey(line: string) {\n const match = /^(?!\\s)([\\w-]+):/.exec(line);\n return match?.[1];\n}\n\nconst PNPM_IGNORED_BUILDS_ERROR = 'ERR_PNPM_IGNORED_BUILDS';\n\nexport function getPnpmIgnoredBuildPackages(output: string): string[] {\n const match = new RegExp(`\\\\[?${PNPM_IGNORED_BUILDS_ERROR}\\\\]?[^\\\\n]*Ignored build scripts:\\\\s*([^\\\\n]+)`).exec(\n output,\n );\n if (!match?.[1]) return [];\n\n return match[1]\n .split(',')\n .map(specifier => specifier.trim())\n .filter(Boolean)\n .map(specifier => {\n if (specifier.startsWith('@')) {\n const versionSeparator = specifier.indexOf('@', 1);\n return versionSeparator === -1 ? specifier : specifier.slice(0, versionSeparator);\n }\n return specifier.split('@', 1)[0]!;\n });\n}\n\nfunction validatePnpmBuildApprovals(key: string, block: string): void {\n if (key !== 'allowBuilds' && key !== 'onlyBuiltDependencies') return;\n\n let value: unknown;\n try {\n value = (parse(block) as Record<string, unknown>)[key];\n } catch (error) {\n throw new MastraError(\n {\n id: 'DEPLOYER_INVALID_PNPM_BUILD_APPROVAL_CONFIG',\n domain: ErrorDomain.DEPLOYER,\n category: ErrorCategory.USER,\n details: { key },\n text: `Invalid pnpm ${key} configuration`,\n },\n error,\n );\n }\n\n const invalidEntries =\n key === 'allowBuilds'\n ? value && typeof value === 'object' && !Array.isArray(value)\n ? Object.entries(value).filter(\n ([dependency, approval]) => dependency.trim().length === 0 || typeof approval !== 'boolean',\n )\n : [[key, value]]\n : Array.isArray(value) &&\n value.every(dependency => typeof dependency === 'string' && dependency.trim().length > 0)\n ? []\n : [[key, value]];\n\n if (invalidEntries.length === 0) return;\n const invalidEntryNames = invalidEntries.map(([entry]) => entry).join(', ');\n\n throw new MastraError({\n id: 'DEPLOYER_INVALID_PNPM_BUILD_APPROVAL_CONFIG',\n domain: ErrorDomain.DEPLOYER,\n category: ErrorCategory.USER,\n details: { key, invalidEntries: invalidEntryNames },\n text: `Invalid pnpm ${key} entries: ${invalidEntryNames}`,\n });\n}\n\n/**\n * Reads the `patchedDependencies` map from a pnpm workspace file. Paths are returned as declared,\n * i.e. relative to the workspace root. Returns an empty map for absent or unusable declarations.\n */\nexport function parsePnpmPatchedDependencies(source: string): Record<string, string> {\n let parsed: unknown;\n try {\n parsed = parse(source);\n } catch {\n return {};\n }\n\n const patched = (parsed as { patchedDependencies?: unknown } | null)?.patchedDependencies;\n if (!patched || typeof patched !== 'object' || Array.isArray(patched)) {\n return {};\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(patched as Record<string, unknown>)) {\n if (typeof value === 'string' && value.trim() && key.trim()) {\n result[key] = value.trim();\n }\n }\n\n return result;\n}\n\nexport function copyPnpmWorkspaceSettings(source: string, options: InstallOptions = {}) {\n const hasArchitecture = Boolean(options.os?.length || options.cpu?.length || options.libc?.length);\n const lines = source.split(/\\r?\\n/);\n const customBlocks = serializePnpmWorkspaceSettings(options.pnpmWorkspaceSettings);\n const blocks: string[] = [];\n\n for (let index = 0; index < lines.length;) {\n const key = getTopLevelYamlKey(lines[index] ?? '');\n if (!key) {\n index += 1;\n continue;\n }\n\n const start = index;\n index += 1;\n while (index < lines.length && !getTopLevelYamlKey(lines[index] ?? '')) {\n index += 1;\n }\n\n if (\n !PNPM_CONFIG_KEYS_TO_COPY.has(key) ||\n options.pnpmWorkspaceSettings?.[key] !== undefined ||\n (key === 'supportedArchitectures' && hasArchitecture)\n ) {\n continue;\n }\n\n const block = lines.slice(start, index).join('\\n').trimEnd();\n if (block) {\n validatePnpmBuildApprovals(key, block);\n blocks.push(block);\n }\n }\n\n if (hasArchitecture) {\n const architectureBlock = ['supportedArchitectures:'];\n if (options.os?.length) {\n architectureBlock.push(` os: ${JSON.stringify(options.os)}`);\n }\n if (options.cpu?.length) {\n architectureBlock.push(` cpu: ${JSON.stringify(options.cpu)}`);\n }\n if (options.libc?.length) {\n architectureBlock.push(` libc: ${JSON.stringify(options.libc)}`);\n }\n blocks.push(architectureBlock.join('\\n'));\n }\n\n if (options.pnpmOverrides && Object.keys(options.pnpmOverrides).length > 0) {\n blocks.push(\n [\n 'overrides:',\n ...Object.entries(options.pnpmOverrides).map(\n ([key, value]) => ` ${JSON.stringify(key)}: ${JSON.stringify(value)}`,\n ),\n ].join('\\n'),\n );\n }\n\n if (options.patchedDependencies && Object.keys(options.patchedDependencies).length > 0) {\n blocks.push(\n [\n 'patchedDependencies:',\n ...Object.entries(options.patchedDependencies).map(\n ([key, value]) => ` ${JSON.stringify(key)}: ${JSON.stringify(value)}`,\n ),\n ].join('\\n'),\n );\n // The bundled output only installs runtime dependencies, so patches declared for\n // dev-only or bundled-away packages are legitimately unused here.\n blocks.push('allowUnusedPatches: true');\n }\n\n if (options.pnpmNodeLinker) {\n blocks.push(`nodeLinker: ${options.pnpmNodeLinker}`);\n }\n\n return [\"packages:\\n - '.'\", ...blocks, ...customBlocks].join('\\n\\n') + '\\n';\n}\n\n// Semver characters only; versions are interpolated into a shell command.\nconst SAFE_PACKAGE_VERSION = /^[0-9A-Za-z.+-]+$/;\n\n/**\n * Yarn classic writes `# yarn lockfile v1` within the first two lines; Berry lockfiles never contain it.\n * Only the head of the file is read so large monorepo lockfiles are never loaded into memory.\n */\nasync function isYarnClassicLockfile(lockfilePath: string): Promise<boolean> {\n const handle = await fsPromises.open(lockfilePath, 'r');\n try {\n const buffer = Buffer.alloc(512);\n const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);\n return /^# yarn lockfile v1\\r?$/m.test(buffer.toString('utf-8', 0, bytesRead));\n } finally {\n await handle.close();\n }\n}\n\nexport class Deps extends MastraBase {\n private packageManager: PackageManager;\n private rootDir: string;\n private lockFile: LockFileInfo | null;\n\n constructor(rootDir = process.cwd()) {\n super({ component: 'DEPLOYER', name: 'DEPS' });\n\n this.rootDir = rootDir;\n this.lockFile = this.findLockFile(rootDir);\n this.packageManager = this.lockFile?.packageManager ?? 'npm';\n }\n\n private findLockFile(dir: string): LockFileInfo | null {\n const lockFiles: Array<{ filename: string; packageManager: PackageManager }> = [\n { filename: 'pnpm-lock.yaml', packageManager: 'pnpm' },\n { filename: 'package-lock.json', packageManager: 'npm' },\n { filename: 'yarn.lock', packageManager: 'yarn' },\n { filename: 'bun.lock', packageManager: 'bun' },\n ];\n for (const lockFile of lockFiles) {\n const lockFilePath = path.join(dir, lockFile.filename);\n if (fs.existsSync(lockFilePath)) {\n return { ...lockFile, path: lockFilePath };\n }\n }\n const parentDir = path.resolve(dir, '..');\n if (parentDir !== dir) {\n return this.findLockFile(parentDir);\n }\n return null;\n }\n\n public getWorkspaceDependencyPath({ pkgName, version }: { pkgName: string; version: string }) {\n return `file:./workspace-module/${pkgName}-${version}.tgz`;\n }\n\n public async pack({\n dir,\n destination,\n sanitizedName,\n version,\n }: {\n dir: string;\n destination: string;\n sanitizedName: string;\n version: string;\n }) {\n const cpLogger = createChildProcessLogger({\n logger: this.logger,\n root: dir,\n });\n\n let packCmd = 'pack';\n let destinationFlag = `--pack-destination ${destination}`;\n if (this.packageManager === 'yarn') {\n if (this.lockFile && (await isYarnClassicLockfile(this.lockFile.path))) {\n if (!SAFE_PACKAGE_VERSION.test(version)) {\n throw new MastraError({\n id: 'DEPLOYER_INVALID_WORKSPACE_PACKAGE_VERSION',\n domain: ErrorDomain.DEPLOYER,\n category: ErrorCategory.USER,\n details: { dir, version: String(version) },\n text: `Invalid version ${JSON.stringify(version)} in workspace package at ${dir}`,\n });\n }\n // Yarn classic has no --out/%v; --filename takes the full output path.\n destinationFlag = `--filename ${destination}/${sanitizedName}-${version}.tgz`;\n } else {\n // %s includes an '@' at the start of packages names with an '@'\n // so we need to use our sanitizedName instead.\n destinationFlag = `--out ${destination}/${sanitizedName}-%v.tgz`;\n }\n }\n if (this.packageManager === 'bun') {\n // bun uses `pm pack` instead of `pack`\n packCmd = 'pm pack';\n // bun uses --destination instead of --pack-destination\n destinationFlag = `--destination ${destination}`;\n }\n\n return cpLogger({\n cmd: `${this.packageManager} ${packCmd} ${destinationFlag}`,\n args: [],\n env: {\n PATH: process.env.PATH!,\n },\n });\n }\n\n private findPnpmWorkspaceFile(dir: string): string | null {\n const workspaceYamlPath = path.join(dir, 'pnpm-workspace.yaml');\n if (fs.existsSync(workspaceYamlPath)) {\n return workspaceYamlPath;\n }\n\n const parentDir = path.resolve(dir, '..');\n if (parentDir !== dir) {\n return this.findPnpmWorkspaceFile(parentDir);\n }\n\n return null;\n }\n\n private async writePnpmConfig(dir: string, options: InstallOptions = {}) {\n const sourceWorkspaceYamlPath = this.findPnpmWorkspaceFile(this.rootDir);\n const sourceWorkspaceYaml = sourceWorkspaceYamlPath\n ? await fsPromises.readFile(sourceWorkspaceYamlPath, 'utf-8')\n : '';\n\n const patchedDependencies = sourceWorkspaceYamlPath\n ? await this.copyPnpmPatches(sourceWorkspaceYaml, path.dirname(sourceWorkspaceYamlPath), dir)\n : undefined;\n\n await fsPromises.writeFile(\n path.join(dir, 'pnpm-workspace.yaml'),\n copyPnpmWorkspaceSettings(sourceWorkspaceYaml, { ...options, patchedDependencies }),\n 'utf-8',\n );\n }\n\n /**\n * Resolves a declared patch path against the source workspace and verifies that, once symlinks\n * are followed, it still resolves inside the workspace. Returns the real path to copy from, or\n * `undefined` when the patch escapes the workspace or its file cannot be resolved.\n */\n private async resolvePatchSource(\n resolvedWorkspaceRoot: string,\n declaredPath: string,\n { key, label }: { key: string; label: string },\n ): Promise<string | undefined> {\n const sourcePath = path.resolve(resolvedWorkspaceRoot, declaredPath);\n if (!sourcePath.startsWith(`${resolvedWorkspaceRoot}${path.sep}`)) {\n this.logger.warn(`Skipping ${label} patch for \"${key}\": patch file is outside the workspace at ${sourcePath}`);\n return undefined;\n }\n\n // A patch path can stay lexically under the workspace while traversing a symlink whose target\n // lives outside it. copyFile follows symlinks, so compare the resolved real paths before copying.\n let realWorkspaceRoot: string;\n let realSourcePath: string;\n try {\n [realWorkspaceRoot, realSourcePath] = await Promise.all([\n fsPromises.realpath(resolvedWorkspaceRoot),\n fsPromises.realpath(sourcePath),\n ]);\n } catch {\n this.logger.warn(`Skipping ${label} patch for \"${key}\": patch file not found at ${sourcePath}`);\n return undefined;\n }\n\n if (!realSourcePath.startsWith(`${realWorkspaceRoot}${path.sep}`)) {\n this.logger.warn(\n `Skipping ${label} patch for \"${key}\": patch file is outside the workspace at ${realSourcePath}`,\n );\n return undefined;\n }\n\n return realSourcePath;\n }\n\n /**\n * Copies the patch files declared by the source workspace into the output directory and returns\n * the patch map rewritten to output-relative paths, so the patches survive the output install.\n */\n private async copyPnpmPatches(\n sourceWorkspaceYaml: string,\n sourceWorkspaceRoot: string,\n dir: string,\n ): Promise<Record<string, string>> {\n const declared = parsePnpmPatchedDependencies(sourceWorkspaceYaml);\n const rewritten: Record<string, string> = {};\n const usedFileNames = new Set<string>();\n const resolvedWorkspaceRoot = path.resolve(sourceWorkspaceRoot);\n\n for (const [key, declaredPath] of Object.entries(declared)) {\n const sourcePath = await this.resolvePatchSource(resolvedWorkspaceRoot, declaredPath, {\n key,\n label: 'pnpm',\n });\n if (!sourcePath) continue;\n\n let fileName = path.basename(sourcePath);\n if (usedFileNames.has(fileName)) {\n fileName = `${key.replace(/[^a-zA-Z0-9._-]/g, '_')}-${fileName}`;\n }\n usedFileNames.add(fileName);\n\n await fsPromises.mkdir(path.join(dir, PNPM_PATCHES_DIR), { recursive: true });\n await fsPromises.copyFile(sourcePath, path.join(dir, PNPM_PATCHES_DIR, fileName));\n rewritten[key] = `${PNPM_PATCHES_DIR}/${fileName}`;\n }\n\n return rewritten;\n }\n\n /**\n * Writes the `.yarnrc.yml` for the bundled output, recording the supported architectures so the\n * output install only resolves optional native binaries that match the deployment target.\n */\n private async writeYarnConfig(dir: string, options: ArchitectureOptions) {\n const yarnrcPath = path.join(dir, '.yarnrc.yml');\n const config = {\n supportedArchitectures: {\n cpu: options.cpu || [],\n os: options.os || [],\n libc: options.libc || [],\n },\n };\n\n await fsPromises.writeFile(\n yarnrcPath,\n `supportedArchitectures:\\n${Object.entries(config.supportedArchitectures)\n .map(([key, value]) => ` ${key}: ${JSON.stringify(value)}`)\n .join('\\n')}`,\n );\n }\n\n /**\n * Copies the source workspace's `.yarn/patches/` directory (Yarn Berry) into the output\n * directory so patches survive the output install. Yarn auto-discovers patches from this\n * directory and applies them per the lockfile references.\n */\n private async copyYarnPatches(dir: string): Promise<void> {\n const sourcePatchesDir = path.join(this.rootDir, '.yarn', 'patches');\n if (!fs.existsSync(sourcePatchesDir)) return;\n\n const outputPatchesDir = path.join(dir, '.yarn', 'patches');\n await fsPromises.cp(sourcePatchesDir, outputPatchesDir, { recursive: true, errorOnExist: false });\n }\n\n /**\n * Copies the patch files referenced by the source workspace's `patchedDependencies` in\n * package.json into the output directory and returns the map rewritten to output-relative\n * paths, so bun patches survive the output install.\n */\n private async copyBunPatches(\n declared: Record<string, string>,\n sourceRoot: string,\n dir: string,\n ): Promise<Record<string, string>> {\n const rewritten: Record<string, string> = {};\n const usedFileNames = new Set<string>();\n const resolvedRoot = path.resolve(sourceRoot);\n\n for (const [key, declaredPath] of Object.entries(declared)) {\n const sourcePath = await this.resolvePatchSource(resolvedRoot, declaredPath, {\n key,\n label: 'bun',\n });\n if (!sourcePath) continue;\n\n let fileName = path.basename(sourcePath);\n if (usedFileNames.has(fileName)) {\n fileName = `${key.replace(/[^a-zA-Z0-9._-]/g, '_')}-${fileName}`;\n }\n usedFileNames.add(fileName);\n\n await fsPromises.mkdir(path.join(dir, BUN_PATCHES_DIR), { recursive: true });\n await fsPromises.copyFile(sourcePath, path.join(dir, BUN_PATCHES_DIR, fileName));\n rewritten[key] = `${BUN_PATCHES_DIR}/${fileName}`;\n }\n\n return rewritten;\n }\n\n /**\n * Reads `patchedDependencies` from the source package.json, copies the referenced patch\n * files into the output directory, and writes the output-relative patch map into the\n * output's package.json so `bun install` preserves patches in the bundled output.\n */\n private async copyBunPatchesToOutput(dir: string): Promise<void> {\n const sourcePackageJsonPath = path.join(this.rootDir, 'package.json');\n if (!fs.existsSync(sourcePackageJsonPath)) return;\n\n const sourcePkg = await readJSON(sourcePackageJsonPath);\n const patchedDeps = sourcePkg.patchedDependencies as Record<string, string> | undefined;\n if (!patchedDeps || Object.keys(patchedDeps).length === 0) return;\n\n const rewritten = await this.copyBunPatches(patchedDeps, this.rootDir, dir);\n if (Object.keys(rewritten).length === 0) return;\n\n const outputPackageJsonPath = path.join(dir, 'package.json');\n let outputPkg: Record<string, unknown>;\n try {\n outputPkg = (await readJSON(outputPackageJsonPath)) as Record<string, unknown>;\n } catch {\n outputPkg = {};\n }\n outputPkg.patchedDependencies = rewritten;\n await writeJSON(outputPackageJsonPath, outputPkg, { spaces: 2 });\n }\n\n private getNpmArgs(options: ArchitectureOptions): string[] {\n const args: string[] = [];\n if (options.cpu) args.push(`--cpu=${options.cpu.join(',')}`);\n if (options.os) args.push(`--os=${options.os.join(',')}`);\n if (options.libc) args.push(`--libc=${options.libc.join(',')}`);\n return args;\n }\n\n /**\n * Depending on whether we want to install or add a package, this function returns the appropriate commands.\n * All package managers support both commands (e.g. npm install has an alias on \"add\")\n */\n private getPackageManagerCommand(\n pm: PackageManager,\n type: 'install' | 'add',\n { yarnClassic = false }: { yarnClassic?: boolean } = {},\n ): string {\n const cmd = type === 'install' ? 'install' : 'add';\n\n switch (pm) {\n case 'npm':\n return `${cmd} --audit=false --fund=false --loglevel=error --progress=false --update-notifier=false`;\n case 'yarn':\n return type === 'install' && !yarnClassic ? `${cmd} --no-immutable` : cmd;\n case 'pnpm':\n return type === 'install' ? `${cmd} --no-frozen-lockfile --loglevel=error` : `${cmd} --loglevel=error`;\n default:\n return cmd;\n }\n }\n\n public async install({\n dir = this.rootDir,\n architecture,\n pnpmOverrides,\n pnpmNodeLinker,\n pnpmWorkspaceSettings,\n }: {\n dir?: string;\n architecture?: ArchitectureOptions;\n pnpmOverrides?: Record<string, string>;\n pnpmNodeLinker?: 'hoisted';\n pnpmWorkspaceSettings?: BundlerConfig['pnpmWorkspaceSettings'];\n } = {}) {\n const pm = this.packageManager;\n let yarnClassic = false;\n if (this.lockFile) {\n const destination = path.join(dir, this.lockFile.filename);\n if (path.resolve(this.lockFile.path) !== path.resolve(destination)) {\n const packedBunWorkspaces =\n pm === 'bun' &&\n fs.existsSync(path.join(dir, 'package.json')) &&\n Object.values(\n ((await readJSON(path.join(dir, 'package.json'))) as { resolutions?: Record<string, string> })\n .resolutions ?? {},\n ).some(spec => spec.startsWith('file:./workspace-module/'));\n\n if (packedBunWorkspaces) {\n // Bun cannot reuse the source workspace lockfile with packed tarballs; removing its workspace entries\n // makes Bun ignore it and regenerate the lockfile anyway. Start with a clean lockfile instead.\n await fsPromises.rm(destination, { force: true });\n } else {\n await fsPromises.copyFile(this.lockFile.path, destination);\n }\n }\n\n if (pm === 'yarn') {\n yarnClassic = await isYarnClassicLockfile(destination);\n }\n }\n\n const installCommand = this.getPackageManagerCommand(pm, 'install', { yarnClassic });\n let args: string[] = [];\n\n switch (pm) {\n case 'pnpm':\n await this.writePnpmConfig(dir, { ...architecture, pnpmOverrides, pnpmNodeLinker, pnpmWorkspaceSettings });\n break;\n case 'yarn':\n // similar to --ignore-workspace but for yarn\n await ensureFile(path.join(dir, 'yarn.lock'));\n if (architecture) {\n await this.writeYarnConfig(dir, architecture);\n }\n await this.copyYarnPatches(dir);\n break;\n case 'bun':\n await this.copyBunPatchesToOutput(dir);\n break;\n case 'npm':\n if (architecture) {\n args = this.getNpmArgs(architecture);\n }\n break;\n default:\n // Do nothing\n }\n\n const cpLogger = createChildProcessLogger({\n logger: this.logger,\n root: dir,\n });\n\n try {\n return await cpLogger({\n cmd: `${pm} ${installCommand}`,\n args,\n env: process.env as Record<string, string>,\n });\n } catch (error) {\n if (pm !== 'pnpm') throw error;\n\n const processOutput =\n error && typeof error === 'object'\n ? `${'stdout' in error ? String(error.stdout) : ''}\\n${'stderr' in error ? String(error.stderr) : ''}`\n : '';\n const ignoredPackages = getPnpmIgnoredBuildPackages(processOutput);\n if (ignoredPackages.length === 0) throw error;\n\n throw new MastraError(\n {\n id: 'DEPLOYER_PNPM_IGNORED_BUILDS',\n domain: ErrorDomain.DEPLOYER,\n category: ErrorCategory.USER,\n details: { packageNames: ignoredPackages.join(', ') },\n text: `pnpm blocked build scripts for: ${ignoredPackages.join(', ')}. Add these packages to allowBuilds in pnpm-workspace.yaml and retry the build.`,\n },\n error,\n );\n }\n }\n\n public async installPackages(packages: string[]) {\n const pm = this.packageManager;\n const installCommand = this.getPackageManagerCommand(pm, 'add');\n\n const env: Record<string, string> = {\n PATH: process.env.PATH!,\n };\n\n if (process.env.npm_config_registry) {\n env.npm_config_registry = process.env.npm_config_registry;\n }\n\n const cpLogger = createChildProcessLogger({\n logger: this.logger,\n root: '',\n });\n\n return cpLogger({\n cmd: `${pm} ${installCommand}`,\n args: packages,\n env,\n });\n }\n\n public async checkDependencies(dependencies: string[]): Promise<string> {\n try {\n const packageJsonPath = path.join(this.rootDir, 'package.json');\n\n try {\n await fsPromises.access(packageJsonPath);\n } catch {\n return 'No package.json file found in the current directory';\n }\n\n const packageJson = await readJSON(packageJsonPath);\n for (const dependency of dependencies) {\n if (!packageJson.dependencies || !packageJson.dependencies[dependency]) {\n return `Please install ${dependency} before running this command (${this.packageManager} install ${dependency})`;\n }\n }\n\n return 'ok';\n } catch (err) {\n console.error(err);\n return 'Could not check dependencies';\n }\n }\n\n public async getProjectName() {\n try {\n const packageJsonPath = path.join(this.rootDir, 'package.json');\n const pkg = await readJSON(packageJsonPath);\n return pkg.name;\n } catch (err) {\n throw err;\n }\n }\n\n public async getPackageVersion() {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = dirname(__filename);\n const pkgJsonPath = path.join(__dirname, '..', '..', 'package.json');\n\n const content = (await readJSON(pkgJsonPath)) as PackageJson;\n return content.version;\n }\n\n public async addScriptsToPackageJson(scripts: Record<string, string>) {\n const packageJson = await readJSON('package.json');\n packageJson.scripts = {\n ...packageJson.scripts,\n ...scripts,\n };\n await writeJSON('package.json', packageJson, { spaces: 2 });\n }\n}\n\nexport class DepsService extends Deps {}\n","import * as fs from 'node:fs';\n\nexport abstract class EnvService {\n abstract getEnvValue(key: string): Promise<string | null>;\n abstract setEnvValue(key: string, value: string): Promise<void>;\n}\n\nexport class FileEnvService extends EnvService {\n private filePath: string;\n\n constructor(filePath: string) {\n super();\n this.filePath = filePath;\n }\n\n private readFile(filePath: string): Promise<string> {\n return new Promise((resolve, reject) => {\n fs.readFile(filePath, 'utf8', (err: NodeJS.ErrnoException | null, data: string) => {\n if (err) reject(err);\n else resolve(data);\n });\n });\n }\n\n private writeFile({ filePath, data }: { filePath: string; data: string }): Promise<void> {\n return new Promise((resolve, reject) => {\n fs.writeFile(filePath, data, 'utf8', (err: NodeJS.ErrnoException | null) => {\n if (err) reject(err);\n else resolve();\n });\n });\n }\n\n private async updateEnvData({\n key,\n value,\n filePath = this.filePath,\n data,\n }: {\n key: string;\n value: string;\n filePath?: string;\n data: string;\n }): Promise<string> {\n const regex = new RegExp(`^${key}=.*$`, 'm');\n if (data.match(regex)) {\n // Use a replacement function so `$` sequences in the value (e.g. `$&`,\n // `$$`) are written literally instead of being interpreted as\n // String.prototype.replace special patterns.\n data = data.replace(regex, () => `${key}=${value}`);\n } else {\n data += `\\n${key}=${value}`;\n }\n await this.writeFile({ filePath, data });\n console.info(`${key} set to ${value} in ENV file.`);\n return data;\n }\n\n async getEnvValue(key: string): Promise<string | null> {\n try {\n const data = await this.readFile(this.filePath);\n const regex = new RegExp(`^${key}=(.*)$`, 'm');\n const match = data.match(regex);\n return match?.[1] || null;\n } catch (err) {\n console.error(`Error reading ENV value: ${err}`);\n return null;\n }\n }\n\n async setEnvValue(key: string, value: string): Promise<void> {\n try {\n const data = await this.readFile(this.filePath);\n await this.updateEnvData({ key, value, data });\n } catch (err) {\n console.error(`Error writing ENV value: ${err}`);\n }\n }\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport fsExtra from 'fs-extra/esm';\n\nimport { FileEnvService } from './env.js';\n\nexport class FileService {\n /**\n *\n * @param inputFile the file in the starter files directory to copy\n * @param outputFilePath the destination path\n * @param replaceIfExists flag to replace if it exists\n * @returns\n */\n public async copyStarterFile(inputFile: string, outputFilePath: string, replaceIfExists?: boolean) {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n const filePath = path.resolve(__dirname, '..', 'starter-files', inputFile);\n const fileString = fs.readFileSync(filePath, 'utf8');\n\n if (fs.existsSync(outputFilePath) && !replaceIfExists) {\n console.info(`${outputFilePath} already exists`);\n return false;\n }\n\n await fsExtra.outputFile(outputFilePath, fileString);\n\n return true;\n }\n\n public async setupEnvFile({ dbUrl }: { dbUrl: string }) {\n const envPath = path.join(process.cwd(), '.env.development');\n\n await fsExtra.ensureFile(envPath);\n\n const fileEnvService = new FileEnvService(envPath);\n await fileEnvService.setEnvValue('DB_URL', dbUrl);\n }\n\n public getFirstExistingFile(files: string[]): string {\n for (const f of files) {\n if (fs.existsSync(f)) {\n return f;\n }\n }\n\n throw new Error('Missing required file, checked the following paths: ' + files.join(', '));\n }\n\n /**\n * Returns every existing file from the provided array in the same order.\n * Callers supply files from the lowest to highest precedence so later dotenv\n * files override earlier values when the bundler loads them.\n */\n public getExistingFiles(files: string[]): string[] {\n return files.filter(file => fs.existsSync(file));\n }\n\n /**\n * Returns the first existing file from the provided array, or undefined if none exist\n * @param files array of file paths to check\n * @returns the first existing file path or undefined\n */\n public getFirstExistingFileOrUndefined(files: string[]): string | undefined {\n for (const f of files) {\n if (fs.existsSync(f)) {\n return f;\n }\n }\n\n return undefined;\n }\n\n public replaceValuesInFile({\n filePath,\n replacements,\n }: {\n filePath: string;\n replacements: { search: string; replace: string }[];\n }) {\n let fileContent = fs.readFileSync(filePath, 'utf8');\n replacements.forEach(({ search, replace }) => {\n fileContent = fileContent.replaceAll(search, replace);\n });\n\n fs.writeFileSync(filePath, fileContent);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAa,oBAAoB,WAA0B;CACzD,OAAO,IAAIA,OAAAA,SAAS,EAClB,MAAM,OAAO,WAAW,UAAU;EAEhC,MAAM,OAAO,MAAM,SAAS,CAAC,CAAC,KAAK;EAEnC,IAAI,MAAM;GACR,QAAQ,KAAK,IAAI;GAEjB,OAAO,KAAK,IAAI;EAClB;EAEA,SAAS;CACX,EACF,CAAC;AACH;;;;;;;AAQA,MAAM,iBAAiB;AAEvB,SAAgB,yBAAyB,EAAE,QAAQ,QAAiD;CAClG,MAAM,aAAa,iBAAiB,MAAM;CAC1C,OAAO,OAAO,EAAE,KAAK,MAAM,UAAwE;EACjG,IAAI;GACF,KAAK,MAAM,OAAO,MAChB,IAAI,CAAC,eAAe,KAAK,GAAG,GAC1B,MAAM,IAAI,MAAM,sDAAsD,KAAK,UAAU,GAAG,GAAG;GAG/F,MAAM,cAAA,GAAaC,cAAAA,MAAAA,CAAM,KAAK,MAAM;IAClC,KAAK;IACL,OAAO;IACP;IAEA,OAAO;KAAC;KAAU;KAAQ;IAAM;GAClC,CAAC;GAED,IAAI,SAAS;GACb,IAAI,SAAS;GACb,WAAW,QAAQ,GAAG,SAAQ,UAAS;IACrC,UAAU,MAAM,SAAS;GAC3B,CAAC;GACD,WAAW,QAAQ,GAAG,SAAQ,UAA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AAG,cAAc,UAAU,WAAW;CACxC;AACF"}
@@ -1,5 +1,5 @@
1
- const require_index_CLddUTqr = require("./index-CLddUTqr-DsGkVS-W.cjs");
2
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js
1
+ const require_index_CLddUTqr = require("./index-CLddUTqr-D0GzVJyg.cjs");
2
+ //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js
3
3
  async function getToJsonSchemaFn() {
4
4
  try {
5
5
  const { toJSONSchema } = await import("sury");
@@ -11,4 +11,4 @@ async function getToJsonSchemaFn() {
11
11
  //#endregion
12
12
  exports.default = getToJsonSchemaFn;
13
13
 
14
- //# sourceMappingURL=sury-CWZTCd75-ChXu4j-p.cjs.map
14
+ //# sourceMappingURL=sury-CWZTCd75-TIJwZAOz.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sury-CWZTCd75-ChXu4j-p.cjs","names":["MissingDependencyError"],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJSONSchema } = await import('sury');\n return toJSONSchema;\n } catch {\n throw new MissingDependencyError(\"sury\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAM,OAAO;EACtC,OAAO;CACT,QAAQ;EACN,MAAM,IAAIA,uBAAAA,uBAAuB,MAAM;CACzC;AACF"}
1
+ {"version":3,"file":"sury-CWZTCd75-TIJwZAOz.cjs","names":["MissingDependencyError"],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJSONSchema } = await import('sury');\n return toJSONSchema;\n } catch {\n throw new MissingDependencyError(\"sury\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAM,OAAO;EACtC,OAAO;CACT,QAAQ;EACN,MAAM,IAAIA,uBAAAA,uBAAuB,MAAM;CACzC;AACF"}
@@ -1,5 +1,5 @@
1
- import { t as MissingDependencyError } from "./index-CLddUTqr-BXqo9et4.js";
2
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js
1
+ import { t as MissingDependencyError } from "./index-CLddUTqr-86A1rnBL.js";
2
+ //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js
3
3
  async function getToJsonSchemaFn() {
4
4
  try {
5
5
  const { toJSONSchema } = await import("sury");
@@ -11,4 +11,4 @@ async function getToJsonSchemaFn() {
11
11
  //#endregion
12
12
  export { getToJsonSchemaFn as default };
13
13
 
14
- //# sourceMappingURL=sury-CWZTCd75-OKz7uWLi.js.map
14
+ //# sourceMappingURL=sury-CWZTCd75-r5hgAI0o.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sury-CWZTCd75-OKz7uWLi.js","names":[],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJSONSchema } = await import('sury');\n return toJSONSchema;\n } catch {\n throw new MissingDependencyError(\"sury\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAM,OAAO;EACtC,OAAO;CACT,QAAQ;EACN,MAAM,IAAI,uBAAuB,MAAM;CACzC;AACF"}
1
+ {"version":3,"file":"sury-CWZTCd75-r5hgAI0o.js","names":[],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/sury-CWZTCd75.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJSONSchema } = await import('sury');\n return toJSONSchema;\n } catch {\n throw new MissingDependencyError(\"sury\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAM,OAAO;EACtC,OAAO;CACT,QAAQ;EACN,MAAM,IAAI,uBAAuB,MAAM;CACzC;AACF"}
@@ -1,8 +1,8 @@
1
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js
1
+ //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js
2
2
  function getToJsonSchemaFn() {
3
3
  return (schema) => JSON.parse(JSON.stringify(schema.Type()));
4
4
  }
5
5
  //#endregion
6
6
  exports.default = getToJsonSchemaFn;
7
7
 
8
- //# sourceMappingURL=typebox-Dei93FPO-KTtPU745.cjs.map
8
+ //# sourceMappingURL=typebox-Dei93FPO-B14DOQQD.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typebox-Dei93FPO-B14DOQQD.cjs","names":[],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js"],"sourcesContent":["function getToJsonSchemaFn() {\n return (schema) => JSON.parse(JSON.stringify(schema.Type()));\n}\n\nexport { getToJsonSchemaFn as default };\n"],"ignoreList":[0],"mappings":";AAAA,SAAS,oBAAoB;CAC3B,QAAQ,WAAW,KAAK,MAAM,KAAK,UAAU,OAAO,KAAK,CAAC,CAAC;AAC7D"}
@@ -1,8 +1,8 @@
1
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js
1
+ //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js
2
2
  function getToJsonSchemaFn() {
3
3
  return (schema) => JSON.parse(JSON.stringify(schema.Type()));
4
4
  }
5
5
  //#endregion
6
6
  export { getToJsonSchemaFn as default };
7
7
 
8
- //# sourceMappingURL=typebox-Dei93FPO-C5ACKU09.js.map
8
+ //# sourceMappingURL=typebox-Dei93FPO-BCfJ-0cP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typebox-Dei93FPO-BCfJ-0cP.js","names":[],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/typebox-Dei93FPO.js"],"sourcesContent":["function getToJsonSchemaFn() {\n return (schema) => JSON.parse(JSON.stringify(schema.Type()));\n}\n\nexport { getToJsonSchemaFn as default };\n"],"ignoreList":[0],"mappings":";AAAA,SAAS,oBAAoB;CAC3B,QAAQ,WAAW,KAAK,MAAM,KAAK,UAAU,OAAO,KAAK,CAAC,CAAC;AAC7D"}
@@ -99,9 +99,9 @@ function getCompiledDepCachePath(rootPath, packageName) {
99
99
  * slash('C:\\Users\\user\\code\\mastra') // 'C:/Users/user/code/mastra'
100
100
  * ```
101
101
  */
102
- function slash(path$1) {
103
- if (path$1.startsWith("\\\\?\\")) return path$1;
104
- return path$1.replaceAll("\\", "/");
102
+ function slash(path) {
103
+ if (path.startsWith("\\\\?\\")) return path;
104
+ return path.replaceAll("\\", "/");
105
105
  }
106
106
  /**
107
107
  * Make a Rollup-safe name: pathless, POSIX, and without parent/absolute segments
@@ -282,4 +282,4 @@ Object.defineProperty(exports, "slash", {
282
282
  }
283
283
  });
284
284
 
285
- //# sourceMappingURL=utils-Bsr_sEcH.cjs.map
285
+ //# sourceMappingURL=utils-C-gJcJAo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-C-gJcJAo.cjs","names":["join","relative","basename","builtinModules"],"sources":["../src/build/utils.ts"],"sourcesContent":["import { execSync } from 'node:child_process';\nimport { existsSync, mkdirSync } from 'node:fs';\nimport { builtinModules } from 'node:module';\nimport { basename, join, relative } from 'node:path';\nimport type { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';\n\n/** The detected JavaScript runtime environment */\nexport type RuntimePlatform = 'node' | 'bun';\n\n/**\n * The esbuild/bundler platform setting.\n * - 'node': Assumes Node.js environment, externalizes built-in modules\n * - 'browser': Assumes browser environment, polyfills Node APIs\n * - 'neutral': Runtime-agnostic, preserves all globals as-is (used for Bun)\n */\nexport type BundlerPlatform = 'node' | 'browser' | 'neutral';\n\n/**\n * Get nodeResolve plugin options based on the target platform.\n *\n * For 'browser' platform (e.g., Cloudflare Workers), uses browser-compatible\n * export conditions so packages like the Cloudflare SDK resolve to their\n * web runtime instead of Node.js-specific code.\n *\n * For 'node' and 'neutral' (Bun) platforms, uses Node.js module resolution.\n */\nexport function getNodeResolveOptions(platform: BundlerPlatform): RollupNodeResolveOptions {\n if (platform === 'browser') {\n return {\n preferBuiltins: false,\n browser: true,\n exportConditions: ['browser', 'worker', 'default'],\n };\n }\n return {\n preferBuiltins: true,\n exportConditions: ['node'],\n };\n}\n\n/**\n * Detect the current JavaScript runtime environment.\n *\n * This is used by the bundler to determine the appropriate esbuild platform\n * setting. When running under Bun, we need to use 'neutral' platform to\n * preserve Bun-specific globals (like Bun.s3).\n */\nexport function detectRuntime(): RuntimePlatform {\n if (process.versions?.bun) {\n return 'bun';\n }\n return 'node';\n}\n\n/**\n * Whether the deployer should skip installing dependencies (and lockfile\n * generation) in the build output directory. Enabled by setting\n * MASTRA_BUILD_SKIP_INSTALL to \"true\" or \"1\". Useful for hermetic build\n * systems (e.g. Bazel) that supply node_modules externally and run in a\n * network-less sandbox where the output install would be redundant and fatal.\n */\nexport function shouldSkipInstall(): boolean {\n const value = process.env.MASTRA_BUILD_SKIP_INSTALL;\n return value === 'true' || value === '1';\n}\n\nexport function upsertMastraDir({ dir = process.cwd() }: { dir?: string }) {\n const dirPath = join(dir, '.mastra');\n\n if (!existsSync(dirPath)) {\n mkdirSync(dirPath, { recursive: true });\n execSync(`echo \".mastra\" >> .gitignore`);\n }\n}\n\nexport function isDependencyPartOfPackage(dep: string, packageName: string) {\n if (dep === packageName) {\n return true;\n }\n\n return dep.startsWith(`${packageName}/`);\n}\n\n/**\n * Get the package name from a module ID\n */\nexport function getPackageName(id: string) {\n const parts = id.split('/');\n\n if (id.startsWith('@')) {\n return parts.slice(0, 2).join('/');\n }\n\n return parts[0];\n}\n\n/**\n * Check if an import specifier uses a protocol scheme rather than a package name.\n * Examples: `cloudflare:workers`, `data:text/javascript,...`, `node:fs`.\n */\nexport function hasImportProtocol(specifier: string): boolean {\n // Avoid treating Windows absolute paths like `C:\\foo` as protocol imports.\n if (/^[A-Za-z]:[\\\\/]/.test(specifier)) {\n return false;\n }\n\n return /^[A-Za-z][A-Za-z\\d+.-]*:/.test(specifier);\n}\n\nconst DEFAULT_PROTOCOL_IMPORT_EXCLUDE_LIST = ['node:'] as const;\n\n/**\n * Check if a specifier uses a non-builtin protocol that should be preserved at\n * runtime instead of being treated as an installable dependency.\n */\nexport function isExternalProtocolImport(\n specifier: string,\n excludeList: readonly string[] = DEFAULT_PROTOCOL_IMPORT_EXCLUDE_LIST,\n): boolean {\n if (!hasImportProtocol(specifier)) {\n return false;\n }\n\n return !excludeList.some(prefix => specifier.startsWith(prefix));\n}\n\nfunction isRelativeImportSpecifier(specifier: string): boolean {\n return specifier === '.' || specifier === '..' || specifier.startsWith('./') || specifier.startsWith('../');\n}\n\nfunction isAbsolutePathSpecifier(specifier: string): boolean {\n return specifier.startsWith('/') || specifier.startsWith('\\\\\\\\') || /^[A-Za-z]:[\\\\/]/.test(specifier);\n}\n\n/**\n * During `mastra dev` we are compiling TS files to JS (inside workspaces) so that users can just their workspace packages.\n * We store these compiled files inside `node_modules/.cache` for each workspace package.\n */\nexport function getCompiledDepCachePath(rootPath: string, packageName: string) {\n return slash(join(rootPath, 'node_modules', '.cache', packageName));\n}\n\n/**\n * Convert windows backslashes to posix slashes\n *\n * @example\n * ```ts\n * slash('C:\\\\Users\\\\user\\\\code\\\\mastra') // 'C:/Users/user/code/mastra'\n * ```\n */\nexport function slash(path: string) {\n const isExtendedLengthPath = path.startsWith('\\\\\\\\?\\\\');\n\n if (isExtendedLengthPath) {\n return path;\n }\n\n return path.replaceAll('\\\\', '/');\n}\n\n/**\n * Make a Rollup-safe name: pathless, POSIX, and without parent/absolute segments\n */\nexport function rollupSafeName(name: string, rootDir: string) {\n const rel = relative(rootDir, name);\n let entry = slash(rel);\n entry = entry.replace(/^(\\.\\.\\/)+/, '');\n entry = entry.replace(/^\\/+/, '');\n entry = entry.replace(/^[A-Za-z]:\\//, '');\n if (!entry) {\n entry = slash(basename(name));\n }\n return entry;\n}\n\n/**\n * Native binding loaders and infrastructure packages that should be ignored when identifying the actual package that requires native bindings\n */\nconst NATIVE_BINDING_LOADERS = [\n 'node-gyp-build',\n 'prebuild-install',\n 'bindings',\n 'node-addon-api',\n 'node-pre-gyp',\n 'nan', // Native Abstractions for Node.js\n] as const;\n\n/**\n * Finds the first real package from node_modules that likely contains native bindings, filtering out virtual modules and native binding loader infrastructure.\n *\n * @param moduleIds - Array of module IDs from a Rollup chunk\n * @returns The module ID of the actual native package, or undefined if not found\n *\n * @example\n * const moduleIds = [\n * '\\x00/path/node_modules/bcrypt/bcrypt.js?commonjs-module',\n * '/path/node_modules/node-gyp-build/index.js',\n * '/path/node_modules/bcrypt/bcrypt.js',\n * ];\n * findNativePackageModule(moduleIds); // Returns '/path/node_modules/bcrypt/bcrypt.js'\n */\nexport function findNativePackageModule(moduleIds: string[]): string | undefined {\n return moduleIds.find(id => {\n // Skip virtual modules (Rollup plugin-generated)\n if (id.startsWith('\\x00')) {\n return false;\n }\n\n // Must be from node_modules\n if (!id.includes('/node_modules/')) {\n return false;\n }\n\n // Skip native binding loader infrastructure\n for (const loader of NATIVE_BINDING_LOADERS) {\n if (id.includes(`/${loader}/`) || id.includes(`/${loader}@`)) {\n return false;\n }\n }\n\n return true;\n });\n}\n\n/**\n * Ensures that server.studioBase is normalized:\n * - Adds leading slash if missing (e.g., 'admin' → '/admin')\n * - Removes trailing slashes (e.g., '/admin/' → '/admin')\n * - Normalizes multiple slashes to single slash (e.g., '//api' → '/api')\n * - Returns empty string for root paths ('/' or '')\n *\n * @param studioBase - The studioBase path to normalize\n * @returns Normalized studioBase path string\n * @throws Error if path contains invalid characters ('..', '?', '#')\n */\nexport function normalizeStudioBase(studioBase: string): string {\n studioBase = studioBase.trim();\n\n // Validate: no path traversal, no query params, no special chars\n if (studioBase.includes('..') || studioBase.includes('?') || studioBase.includes('#')) {\n throw new Error(`Invalid base path: \"${studioBase}\". Base path cannot contain '..', '?', or '#'`);\n }\n\n // Normalize multiple slashes to single slash\n studioBase = studioBase.replace(/\\/+/g, '/');\n\n // Handle default value cases\n if (studioBase === '/' || studioBase === '') {\n return '';\n }\n\n // Remove trailing slash\n if (studioBase.endsWith('/')) {\n studioBase = studioBase.slice(0, -1);\n }\n\n // Add leading slash if missing\n if (!studioBase.startsWith('/')) {\n studioBase = `/${studioBase}`;\n }\n\n return studioBase;\n}\n\n/**\n * Configuration values for Studio's index.html placeholder injection.\n *\n * Each value is the **exact JavaScript expression** that replaces the\n * corresponding `'%%PLACEHOLDER%%'` token (including surrounding quotes).\n *\n * For literal strings pass `\"'value'\"` (quoted).\n * For runtime expressions pass the raw JS, e.g. `\"window.location.hostname\"`.\n */\nexport interface StudioInjectionConfig {\n host: string;\n port: string;\n protocol: string;\n apiPrefix: string;\n basePath: string;\n hideCloudCta: string;\n cloudApiEndpoint: string;\n experimentalFeatures: string;\n templates: string;\n telemetryDisabled: string;\n requestContextPresets: string;\n experimentalUI: string;\n agentSignals: string;\n signalsUI: string;\n organizationId: string;\n platformProjectId: string;\n platformObservabilityEndpoint: string;\n autoDetectUrl?: string;\n devServerInstanceId?: string;\n}\n\n/**\n * Replace all `%%MASTRA_*%%` placeholders in the Studio `index.html` with the\n * supplied configuration values.\n *\n * The `<base href>` tag and the `window.MASTRA_STUDIO_BASE_PATH` assignment\n * use `basePath` as a plain string (no surrounding quotes), while all other\n * placeholders replace `'%%TOKEN%%'` (with surrounding single-quotes in the\n * source HTML) with the provided expression verbatim.\n */\nexport function injectStudioHtmlConfig(html: string, config: StudioInjectionConfig): string {\n // `String.prototype.replace`/`replaceAll` treat `$` sequences ($$, $&, $`,\n // $', $n) in the replacement string as special patterns. Config values are\n // dynamic (e.g. request context presets), so use a replacement function to\n // insert them verbatim.\n const replace = (token: string, value: string) => {\n html = html.replace(token, () => value);\n };\n\n replace(`'%%MASTRA_DEV_SERVER_INSTANCE_ID%%'`, config.devServerInstanceId ?? \"''\");\n replace(`'%%MASTRA_SERVER_HOST%%'`, config.host);\n replace(`'%%MASTRA_SERVER_PORT%%'`, config.port);\n replace(`'%%MASTRA_SERVER_PROTOCOL%%'`, config.protocol);\n replace(`'%%MASTRA_API_PREFIX%%'`, config.apiPrefix);\n replace(`'%%MASTRA_HIDE_CLOUD_CTA%%'`, config.hideCloudCta);\n replace(`'%%MASTRA_CLOUD_API_ENDPOINT%%'`, config.cloudApiEndpoint);\n replace(`'%%MASTRA_EXPERIMENTAL_FEATURES%%'`, config.experimentalFeatures);\n replace(`'%%MASTRA_TEMPLATES%%'`, config.templates);\n replace(`'%%MASTRA_TELEMETRY_DISABLED%%'`, config.telemetryDisabled);\n replace(`'%%MASTRA_REQUEST_CONTEXT_PRESETS%%'`, config.requestContextPresets);\n replace(`'%%MASTRA_EXPERIMENTAL_UI%%'`, config.experimentalUI);\n replace(`'%%MASTRA_AGENT_SIGNALS%%'`, config.agentSignals);\n replace(`'%%MASTRA_SIGNALS_UI%%'`, config.signalsUI);\n replace(`'%%MASTRA_ORGANIZATION_ID%%'`, config.organizationId);\n replace(`'%%MASTRA_PLATFORM_PROJECT_ID%%'`, config.platformProjectId);\n replace(`'%%MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT%%'`, config.platformObservabilityEndpoint);\n if (config.autoDetectUrl) {\n replace(`'%%MASTRA_AUTO_DETECT_URL%%'`, config.autoDetectUrl);\n }\n html = html.replaceAll('%%MASTRA_STUDIO_BASE_PATH%%', () => config.basePath);\n\n return html;\n}\n\n/**\n * Escape a dynamic value for embedding inside a single-quoted JavaScript\n * string literal in the Studio `index.html` (e.g. `window.X = '<value>'`).\n * Without it, an env-derived value containing `'` or `</script>` breaks out\n * of the literal and corrupts (or injects into) the served page.\n */\nexport function escapeStudioHtmlValue(value: string): string {\n return value\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/</g, '\\\\u003c')\n .replace(/>/g, '\\\\u003e')\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029');\n}\n\n/**\n * Check if a module is a Node.js builtin module\n * @param specifier - Module specifier\n * @returns True if it's a builtin module\n */\nexport function isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\n/**\n * Check whether a module specifier is a bare module import rather than a path,\n * virtual module, or Node builtin.\n */\nexport function isBareModuleSpecifier(specifier: string): boolean {\n if (!specifier || specifier.startsWith('#')) {\n return false;\n }\n\n if (isRelativeImportSpecifier(specifier) || isAbsolutePathSpecifier(specifier)) {\n return false;\n }\n\n if (isBuiltinModule(specifier)) {\n return false;\n }\n\n if (isExternalProtocolImport(specifier)) {\n return false;\n }\n\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BA,SAAgB,sBAAsB,UAAqD;CACzF,IAAI,aAAa,WACf,OAAO;EACL,gBAAgB;EAChB,SAAS;EACT,kBAAkB;GAAC;GAAW;GAAU;EAAS;CACnD;CAEF,OAAO;EACL,gBAAgB;EAChB,kBAAkB,CAAC,MAAM;CAC3B;AACF;;;;;;;;AASA,S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iB;CACnE,QAAQ,wCAAwC,OAAO,qBAAqB;CAC5E,QAAQ,gCAAgC,OAAO,cAAc;CAC7D,QAAQ,8BAA8B,OAAO,YAAY;CACzD,QAAQ,2BAA2B,OAAO,SAAS;CACnD,QAAQ,gCAAgC,OAAO,cAAc;CAC7D,QAAQ,oCAAoC,OAAO,iBAAiB;CACpE,QAAQ,gDAAgD,OAAO,6BAA6B;CAC5F,IAAI,OAAO,eACT,QAAQ,gCAAgC,OAAO,aAAa;CAE9D,OAAO,KAAK,WAAW,qCAAqC,OAAO,QAAQ;CAE3E,OAAO;AACT;;;;;;;AAQA,SAAgB,sBAAsB,OAAuB;CAC3D,OAAO,MACJ,QAAQ,OAAO,MAAM,CAAC,CACtB,QAAQ,MAAM,KAAK,CAAC,CACpB,QAAQ,OAAO,KAAK,CAAC,CACrB,QAAQ,OAAO,KAAK,CAAC,CACrB,QAAQ,MAAM,SAAS,CAAC,CACxB,QAAQ,MAAM,SAAS,CAAC,CACxB,QAAQ,WAAW,SAAS,CAAC,CAC7B,QAAQ,WAAW,SAAS;AACjC;;;;;;AAOA,SAAgB,gBAAgB,WAA4B;CAC1D,OACEC,SAAAA,eAAe,SAAS,SAAS,KACjC,UAAU,WAAW,OAAO,KAC5BA,SAAAA,eAAe,SAAS,UAAU,QAAQ,UAAU,EAAE,CAAC;AAE3D;;;;;AAMA,SAAgB,sBAAsB,WAA4B;CAChE,IAAI,CAAC,aAAa,UAAU,WAAW,GAAG,GACxC,OAAO;CAGT,IAAI,0BAA0B,SAAS,KAAK,wBAAwB,SAAS,GAC3E,OAAO;CAGT,IAAI,gBAAgB,SAAS,GAC3B,OAAO;CAGT,IAAI,yBAAyB,SAAS,GACpC,OAAO;CAGT,OAAO;AACT"}
@@ -1,5 +1,5 @@
1
- const require_index_CLddUTqr = require("./index-CLddUTqr-DsGkVS-W.cjs");
2
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/valibot--1zFm7rT.js
1
+ const require_index_CLddUTqr = require("./index-CLddUTqr-D0GzVJyg.cjs");
2
+ //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/valibot--1zFm7rT.js
3
3
  async function getToJsonSchemaFn() {
4
4
  try {
5
5
  const { toJsonSchema } = await Promise.resolve().then(() => require("./dist-twPJIvYf.cjs"));
@@ -11,4 +11,4 @@ async function getToJsonSchemaFn() {
11
11
  //#endregion
12
12
  exports.default = getToJsonSchemaFn;
13
13
 
14
- //# sourceMappingURL=valibot--1zFm7rT-BeX3W1HK.cjs.map
14
+ //# sourceMappingURL=valibot--1zFm7rT-BiQdCU9y.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"valibot--1zFm7rT-BeX3W1HK.cjs","names":["MissingDependencyError"],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/51aed048de3b19fc603080fe95a6465a0f7208b9be56abfbffac914316d9d07e/node_modules/@standard-community/standard-json/dist/valibot--1zFm7rT.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJsonSchema } = await import('@valibot/to-json-schema');\n return toJsonSchema;\n } catch {\n throw new MissingDependencyError(\"@valibot/to-json-schema\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAC/B,OAAO;CACT,QAAQ;EACN,MAAM,IAAIA,uBAAAA,uBAAuB,yBAAyB;CAC5D;AACF"}
1
+ {"version":3,"file":"valibot--1zFm7rT-BiQdCU9y.cjs","names":["MissingDependencyError"],"sources":["../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@standard-community/standard-json/0.3.5/ac64b21b225adb3ad3012ab2f9eb19098705e52e435f5917b031a4235585ba33/node_modules/@standard-community/standard-json/dist/valibot--1zFm7rT.js"],"sourcesContent":["import { M as MissingDependencyError } from './index-CLddUTqr.js';\nimport 'quansync';\n\nasync function getToJsonSchemaFn() {\n try {\n const { toJsonSchema } = await import('@valibot/to-json-schema');\n return toJsonSchema;\n } catch {\n throw new MissingDependencyError(\"@valibot/to-json-schema\");\n }\n}\n\nexport { getToJsonSchemaFn as default };\n"],"ignoreList":[0],"mappings":";;AAGA,eAAe,oBAAoB;CACjC,IAAI;EACF,MAAM,EAAE,iBAAiB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAC/B,OAAO;CACT,QAAQ;EACN,MAAM,IAAIA,uBAAAA,uBAAuB,yBAAyB;CAC5D;AACF"}