@mastra/deployer 1.50.0-alpha.0 → 1.50.0-alpha.2
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.
- package/CHANGELOG.md +31 -0
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/bundler.cjs +5 -5
- package/dist/build/bundler.js +1 -1
- package/dist/build/fs-routing/codegen.d.ts +16 -2
- package/dist/build/fs-routing/codegen.d.ts.map +1 -1
- package/dist/build/fs-routing/discover.d.ts +20 -0
- package/dist/build/fs-routing/discover.d.ts.map +1 -1
- package/dist/build/fs-routing/prepare.d.ts +13 -10
- package/dist/build/fs-routing/prepare.d.ts.map +1 -1
- package/dist/build/index.cjs +32 -20
- package/dist/build/index.d.ts +4 -4
- package/dist/build/index.d.ts.map +1 -1
- package/dist/build/index.js +5 -5
- package/dist/build/utils.d.ts +7 -0
- package/dist/build/utils.d.ts.map +1 -1
- package/dist/bundler/index.cjs +3 -3
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-N5CQWHN3.cjs → chunk-2GJY6H6M.cjs} +11 -11
- package/dist/{chunk-N5CQWHN3.cjs.map → chunk-2GJY6H6M.cjs.map} +1 -1
- package/dist/{chunk-FHLWDI5H.js → chunk-6ARGMWNC.js} +3 -3
- package/dist/{chunk-FHLWDI5H.js.map → chunk-6ARGMWNC.js.map} +1 -1
- package/dist/{chunk-3GTT2N4V.cjs → chunk-FR6IK3FQ.cjs} +14 -14
- package/dist/{chunk-3GTT2N4V.cjs.map → chunk-FR6IK3FQ.cjs.map} +1 -1
- package/dist/{chunk-ULWJZHTN.js → chunk-I7PL3OZ7.js} +6 -6
- package/dist/{chunk-ULWJZHTN.js.map → chunk-I7PL3OZ7.js.map} +1 -1
- package/dist/{chunk-VNJLLLQN.cjs → chunk-ILNCPWNL.cjs} +7 -7
- package/dist/{chunk-VNJLLLQN.cjs.map → chunk-ILNCPWNL.cjs.map} +1 -1
- package/dist/{chunk-7YI2AEFO.cjs → chunk-JZRFRUGM.cjs} +6 -2
- package/dist/chunk-JZRFRUGM.cjs.map +1 -0
- package/dist/{chunk-4MVAT24Z.js → chunk-LJBNHINW.js} +4 -4
- package/dist/{chunk-4MVAT24Z.js.map → chunk-LJBNHINW.js.map} +1 -1
- package/dist/{chunk-CCBU3OII.js → chunk-UA2DJWFT.js} +3 -3
- package/dist/{chunk-CCBU3OII.js.map → chunk-UA2DJWFT.js.map} +1 -1
- package/dist/{chunk-YG455MPH.js → chunk-UBCDMTQL.js} +88 -16
- package/dist/chunk-UBCDMTQL.js.map +1 -0
- package/dist/{chunk-ANDDGKY5.js → chunk-WP65JQAT.js} +6 -3
- package/dist/chunk-WP65JQAT.js.map +1 -0
- package/dist/{chunk-EU74XSTG.cjs → chunk-XSAPBEYT.cjs} +105 -31
- package/dist/chunk-XSAPBEYT.cjs.map +1 -0
- package/dist/{chunk-IMPHNLMW.cjs → chunk-YWKYOGOS.cjs} +52 -52
- package/dist/{chunk-IMPHNLMW.cjs.map → chunk-YWKYOGOS.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +18 -14
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +15 -11
- package/dist/server/index.js.map +1 -1
- package/dist/server/welcome.d.ts.map +1 -1
- package/dist/validator/custom-resolver.cjs +3 -3
- package/dist/validator/custom-resolver.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-7YI2AEFO.cjs.map +0 -1
- package/dist/chunk-ANDDGKY5.js.map +0 -1
- package/dist/chunk-EU74XSTG.cjs.map +0 -1
- package/dist/chunk-YG455MPH.js.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-deployer
|
|
|
3
3
|
description: Documentation for @mastra/deployer. Use when working with @mastra/deployer APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/deployer"
|
|
6
|
-
version: "1.50.0-alpha.
|
|
6
|
+
version: "1.50.0-alpha.2"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkFR6IK3FQ_cjs = require('./chunk-FR6IK3FQ.cjs');
|
|
4
|
+
var chunkILNCPWNL_cjs = require('./chunk-ILNCPWNL.cjs');
|
|
5
5
|
var chunkVKAFARW6_cjs = require('./chunk-VKAFARW6.cjs');
|
|
6
6
|
|
|
7
7
|
// src/deploy/base.ts
|
|
8
|
-
var Deployer = class extends
|
|
8
|
+
var Deployer = class extends chunkFR6IK3FQ_cjs.Bundler {
|
|
9
9
|
deps = new chunkVKAFARW6_cjs.DepsService();
|
|
10
10
|
constructor(args) {
|
|
11
11
|
super(args.name, "DEPLOYER");
|
|
@@ -25,7 +25,7 @@ var Deployer = class extends chunk3GTT2N4V_cjs.Bundler {
|
|
|
25
25
|
|
|
26
26
|
// src/build/deployer.ts
|
|
27
27
|
async function getDeployer(entryFile, outputDir, logger) {
|
|
28
|
-
const result = await
|
|
28
|
+
const result = await chunkILNCPWNL_cjs.extractMastraOption("deployer", entryFile, outputDir, logger);
|
|
29
29
|
if (!result) {
|
|
30
30
|
return null;
|
|
31
31
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
2
|
-
import { extractMastraOption } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-I7PL3OZ7.js';
|
|
2
|
+
import { extractMastraOption } from './chunk-UA2DJWFT.js';
|
|
3
3
|
import { DepsService, FileService } from './chunk-ZL66GDLP.js';
|
|
4
4
|
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-ZL66GDLP.js';
|
|
5
5
|
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJZRFRUGM_cjs = require('../chunk-JZRFRUGM.cjs');
|
|
4
4
|
var promises = require('fs/promises');
|
|
5
5
|
var https = require('https');
|
|
6
6
|
var path = require('path');
|
|
@@ -3679,8 +3679,15 @@ async function rootHandler(c) {
|
|
|
3679
3679
|
}
|
|
3680
3680
|
|
|
3681
3681
|
// src/server/welcome.ts
|
|
3682
|
+
function trimSlashes(value) {
|
|
3683
|
+
let start = 0;
|
|
3684
|
+
let end = value.length;
|
|
3685
|
+
while (start < end && value[start] === "/") start++;
|
|
3686
|
+
while (end > start && value[end - 1] === "/") end--;
|
|
3687
|
+
return value.slice(start, end);
|
|
3688
|
+
}
|
|
3682
3689
|
function welcomeHtml(apiPrefix = "/api") {
|
|
3683
|
-
const prefix = "/" + apiPrefix
|
|
3690
|
+
const prefix = "/" + trimSlashes(apiPrefix);
|
|
3684
3691
|
const prefixNoSlash = prefix.slice(1);
|
|
3685
3692
|
return `
|
|
3686
3693
|
<!doctype html>
|
|
@@ -4329,7 +4336,7 @@ async function createHonoServer(mastra, options = {
|
|
|
4329
4336
|
);
|
|
4330
4337
|
}
|
|
4331
4338
|
const serverOptions = mastra.getServer();
|
|
4332
|
-
const studioBasePath =
|
|
4339
|
+
const studioBasePath = chunkJZRFRUGM_cjs.normalizeStudioBase(serverOptions?.studioBase ?? "/");
|
|
4333
4340
|
if (options?.studio) {
|
|
4334
4341
|
app.get(
|
|
4335
4342
|
`${studioBasePath}/refresh-events`,
|
|
@@ -4408,28 +4415,25 @@ async function createHonoServer(mastra, options = {
|
|
|
4408
4415
|
const platformProjectId = process.env.MASTRA_PLATFORM_PROJECT_ID || "";
|
|
4409
4416
|
const platformObservabilityEndpoint = process.env.MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT || "";
|
|
4410
4417
|
const requestContextPresets = process.env.MASTRA_REQUEST_CONTEXT_PRESETS || "";
|
|
4411
|
-
const escapeForHtml = (json) => {
|
|
4412
|
-
return json.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
4413
|
-
};
|
|
4414
4418
|
const autoDetectUrl = process.env.MASTRA_AUTO_DETECT_URL === "true";
|
|
4415
|
-
indexHtml =
|
|
4419
|
+
indexHtml = chunkJZRFRUGM_cjs.injectStudioHtmlConfig(indexHtml, {
|
|
4416
4420
|
host: `'${studioHost}'`,
|
|
4417
4421
|
port: `'${studioPort}'`,
|
|
4418
4422
|
protocol: `'${studioProtocol}'`,
|
|
4419
4423
|
apiPrefix: `'${serverOptions?.apiPrefix ?? "/api"}'`,
|
|
4420
4424
|
basePath: studioBasePath,
|
|
4421
4425
|
hideCloudCta: `'${hideCloudCta}'`,
|
|
4422
|
-
cloudApiEndpoint: `'${cloudApiEndpoint}'`,
|
|
4426
|
+
cloudApiEndpoint: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(cloudApiEndpoint)}'`,
|
|
4423
4427
|
experimentalFeatures: `'${experimentalFeatures}'`,
|
|
4424
4428
|
templates: `'${templatesEnabled}'`,
|
|
4425
|
-
telemetryDisabled: `'${process.env.MASTRA_TELEMETRY_DISABLED ?? ""}'`,
|
|
4426
|
-
requestContextPresets: `'${
|
|
4429
|
+
telemetryDisabled: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(process.env.MASTRA_TELEMETRY_DISABLED ?? "")}'`,
|
|
4430
|
+
requestContextPresets: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(requestContextPresets)}'`,
|
|
4427
4431
|
experimentalUI: `'${experimentalUI}'`,
|
|
4428
4432
|
agentSignals: `'${agentSignals}'`,
|
|
4429
4433
|
signalsUI: `'${signalsUI}'`,
|
|
4430
|
-
organizationId: `'${
|
|
4431
|
-
platformProjectId: `'${
|
|
4432
|
-
platformObservabilityEndpoint: `'${
|
|
4434
|
+
organizationId: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(organizationId)}'`,
|
|
4435
|
+
platformProjectId: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(platformProjectId)}'`,
|
|
4436
|
+
platformObservabilityEndpoint: `'${chunkJZRFRUGM_cjs.escapeStudioHtmlValue(platformObservabilityEndpoint)}'`,
|
|
4433
4437
|
autoDetectUrl: `'${autoDetectUrl}'`
|
|
4434
4438
|
});
|
|
4435
4439
|
return c.newResponse(indexHtml, 200, { "Content-Type": "text/html" });
|
|
@@ -4487,7 +4491,7 @@ async function createNodeServer(mastra, options = { tools: {} }) {
|
|
|
4487
4491
|
const logger2 = mastra.getLogger();
|
|
4488
4492
|
logger2.info("Mastra API running", { url: `${protocol}://${host}:${port}${apiPrefix}` });
|
|
4489
4493
|
if (options?.studio) {
|
|
4490
|
-
const studioBasePath =
|
|
4494
|
+
const studioBasePath = chunkJZRFRUGM_cjs.normalizeStudioBase(serverOptions?.studioBase ?? "/");
|
|
4491
4495
|
const studioUrl = `${studioProtocol}://${studioHost}:${studioPort}${studioBasePath}`;
|
|
4492
4496
|
logger2.info("Studio available", { url: studioUrl });
|
|
4493
4497
|
}
|