@mastra/deployer 0.3.2-alpha.4 → 0.3.2-alpha.6
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/dist/_tsup-dts-rollup.d.cts +1 -0
- package/dist/_tsup-dts-rollup.d.ts +1 -0
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-OV2EMRTY.js → chunk-37LFSIVL.js} +7 -0
- package/dist/{chunk-GO4WLOL7.cjs → chunk-FA7LXQU6.cjs} +8 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/server/index.cjs +19 -14
- package/dist/server/index.js +19 -14
- package/package.json +3 -3
|
@@ -85,6 +85,7 @@ export declare abstract class Bundler extends MastraBundler {
|
|
|
85
85
|
protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: string[]): Promise<InputOptions>;
|
|
86
86
|
getToolsInputOptions(toolsPaths: string[]): Promise<Record<string, string>>;
|
|
87
87
|
protected _bundle(serverFile: string, mastraEntryFile: string, outputDirectory: string, toolsPaths?: string[], bundleLocation?: string): Promise<void>;
|
|
88
|
+
lint(_entryFile: string, _outputDirectory: string, toolsPaths: string[]): Promise<void>;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
|
@@ -85,6 +85,7 @@ export declare abstract class Bundler extends MastraBundler {
|
|
|
85
85
|
protected getBundlerOptions(serverFile: string, mastraEntryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, toolsPaths: string[]): Promise<InputOptions>;
|
|
86
86
|
getToolsInputOptions(toolsPaths: string[]): Promise<Record<string, string>>;
|
|
87
87
|
protected _bundle(serverFile: string, mastraEntryFile: string, outputDirectory: string, toolsPaths?: string[], bundleLocation?: string): Promise<void>;
|
|
88
|
+
lint(_entryFile: string, _outputDirectory: string, toolsPaths: string[]): Promise<void>;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
package/dist/bundler/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFA7LXQU6_cjs = require('../chunk-FA7LXQU6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Bundler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkFA7LXQU6_cjs.Bundler; }
|
|
10
10
|
});
|
package/dist/bundler/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Bundler } from '../chunk-
|
|
1
|
+
export { Bundler } from '../chunk-37LFSIVL.js';
|
|
@@ -304,6 +304,13 @@ var Bundler = class extends MastraBundler {
|
|
|
304
304
|
await this.installDependencies(outputDirectory);
|
|
305
305
|
this.logger.info("Done installing dependencies");
|
|
306
306
|
}
|
|
307
|
+
async lint(_entryFile, _outputDirectory, toolsPaths) {
|
|
308
|
+
const toolsInputOptions = await this.getToolsInputOptions(toolsPaths);
|
|
309
|
+
const toolsLength = Object.keys(toolsInputOptions).length;
|
|
310
|
+
if (toolsLength > 0) {
|
|
311
|
+
this.logger.info(`Found ${toolsLength} ${toolsLength === 1 ? "tool" : "tools"}`);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
307
314
|
};
|
|
308
315
|
|
|
309
316
|
export { Bundler };
|
|
@@ -130,7 +130,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
130
130
|
}
|
|
131
131
|
async writeInstrumentationFile(outputDirectory) {
|
|
132
132
|
const instrumentationFile = path.join(outputDirectory, "instrumentation.mjs");
|
|
133
|
-
const __dirname = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
133
|
+
const __dirname = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-FA7LXQU6.cjs', document.baseURI).href))));
|
|
134
134
|
await fsExtra.copy(path.join(__dirname, "templates", "instrumentation-template.js"), instrumentationFile);
|
|
135
135
|
}
|
|
136
136
|
async writePackageJson(outputDirectory, dependencies, resolutions) {
|
|
@@ -314,6 +314,13 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
314
314
|
await this.installDependencies(outputDirectory);
|
|
315
315
|
this.logger.info("Done installing dependencies");
|
|
316
316
|
}
|
|
317
|
+
async lint(_entryFile, _outputDirectory, toolsPaths) {
|
|
318
|
+
const toolsInputOptions = await this.getToolsInputOptions(toolsPaths);
|
|
319
|
+
const toolsLength = Object.keys(toolsInputOptions).length;
|
|
320
|
+
if (toolsLength > 0) {
|
|
321
|
+
this.logger.info(`Found ${toolsLength} ${toolsLength === 1 ? "tool" : "tools"}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
317
324
|
};
|
|
318
325
|
|
|
319
326
|
exports.Bundler = Bundler;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFA7LXQU6_cjs = require('./chunk-FA7LXQU6.cjs');
|
|
4
4
|
var chunk3R6WDRBB_cjs = require('./chunk-3R6WDRBB.cjs');
|
|
5
5
|
var chunk4VC5Z4YR_cjs = require('./chunk-4VC5Z4YR.cjs');
|
|
6
6
|
var babel = require('@babel/core');
|
|
@@ -33,7 +33,7 @@ var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
|
|
|
33
33
|
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
34
34
|
|
|
35
35
|
// src/deploy/base.ts
|
|
36
|
-
var Deployer = class extends
|
|
36
|
+
var Deployer = class extends chunkFA7LXQU6_cjs.Bundler {
|
|
37
37
|
deps = new chunk4VC5Z4YR_cjs.DepsService();
|
|
38
38
|
constructor(args) {
|
|
39
39
|
super(args.name, "DEPLOYER");
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-37LFSIVL.js';
|
|
2
2
|
import { recursiveRemoveNonReferencedNodes } from './chunk-TUMXQX4H.js';
|
|
3
3
|
import { DepsService, FileService } from './chunk-UV4RQQ3R.js';
|
|
4
4
|
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-UV4RQQ3R.js';
|
package/dist/server/index.cjs
CHANGED
|
@@ -2052,20 +2052,25 @@ var html2 = `
|
|
|
2052
2052
|
async function createHonoServer(mastra, options = {}) {
|
|
2053
2053
|
const app = new hono.Hono();
|
|
2054
2054
|
const server = mastra.getServer();
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
mastraToolsPaths
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2055
|
+
let tools = {};
|
|
2056
|
+
try {
|
|
2057
|
+
const toolsPath = "./tools.mjs";
|
|
2058
|
+
const mastraToolsPaths = (await import(toolsPath)).tools;
|
|
2059
|
+
const toolImports = mastraToolsPaths ? await Promise.all(
|
|
2060
|
+
// @ts-ignore
|
|
2061
|
+
mastraToolsPaths.map(async (toolPath) => {
|
|
2062
|
+
return import(toolPath);
|
|
2063
|
+
})
|
|
2064
|
+
) : [];
|
|
2065
|
+
tools = toolImports.reduce((acc, toolModule) => {
|
|
2066
|
+
Object.entries(toolModule).forEach(([key, tool]) => {
|
|
2067
|
+
acc[key] = tool;
|
|
2068
|
+
});
|
|
2069
|
+
return acc;
|
|
2070
|
+
}, {});
|
|
2071
|
+
} catch {
|
|
2072
|
+
console.error("Failed to import tools");
|
|
2073
|
+
}
|
|
2069
2074
|
app.use("*", async function setTelemetryInfo(c2, next) {
|
|
2070
2075
|
const requestId = c2.req.header("x-request-id") ?? crypto.randomUUID();
|
|
2071
2076
|
const span = core.Telemetry.getActiveSpan();
|
package/dist/server/index.js
CHANGED
|
@@ -2046,20 +2046,25 @@ var html2 = `
|
|
|
2046
2046
|
async function createHonoServer(mastra, options = {}) {
|
|
2047
2047
|
const app = new Hono();
|
|
2048
2048
|
const server = mastra.getServer();
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
mastraToolsPaths
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2049
|
+
let tools = {};
|
|
2050
|
+
try {
|
|
2051
|
+
const toolsPath = "./tools.mjs";
|
|
2052
|
+
const mastraToolsPaths = (await import(toolsPath)).tools;
|
|
2053
|
+
const toolImports = mastraToolsPaths ? await Promise.all(
|
|
2054
|
+
// @ts-ignore
|
|
2055
|
+
mastraToolsPaths.map(async (toolPath) => {
|
|
2056
|
+
return import(toolPath);
|
|
2057
|
+
})
|
|
2058
|
+
) : [];
|
|
2059
|
+
tools = toolImports.reduce((acc, toolModule) => {
|
|
2060
|
+
Object.entries(toolModule).forEach(([key, tool]) => {
|
|
2061
|
+
acc[key] = tool;
|
|
2062
|
+
});
|
|
2063
|
+
return acc;
|
|
2064
|
+
}, {});
|
|
2065
|
+
} catch {
|
|
2066
|
+
console.error("Failed to import tools");
|
|
2067
|
+
}
|
|
2063
2068
|
app.use("*", async function setTelemetryInfo(c2, next) {
|
|
2064
2069
|
const requestId = c2.req.header("x-request-id") ?? randomUUID();
|
|
2065
2070
|
const span = Telemetry.getActiveSpan();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.3.2-alpha.
|
|
3
|
+
"version": "0.3.2-alpha.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
108
108
|
"typescript-paths": "^1.5.1",
|
|
109
109
|
"zod": "^3.24.2",
|
|
110
|
-
"@mastra/core": "^0.9.2-alpha.
|
|
111
|
-
"@mastra/server": "^2.0.2-alpha.
|
|
110
|
+
"@mastra/core": "^0.9.2-alpha.6",
|
|
111
|
+
"@mastra/server": "^2.0.2-alpha.6"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@hono/node-server": "^1.13.8",
|