@mastra/deployer 0.2.6-alpha.8 → 0.2.6-alpha.9
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/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-P4LQ4S7A.js → chunk-SQP5ULJ5.js} +1 -1
- package/dist/{chunk-3WUUJPZW.cjs → chunk-XBEPXRKN.cjs} +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/templates/instrumentation-template.js +24 -14
- package/package.json +3 -3
package/dist/bundler/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXBEPXRKN_cjs = require('../chunk-XBEPXRKN.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 chunkXBEPXRKN_cjs.Bundler; }
|
|
10
10
|
});
|
package/dist/bundler/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Bundler } from '../chunk-
|
|
1
|
+
export { Bundler } from '../chunk-SQP5ULJ5.js';
|
|
@@ -117,7 +117,7 @@ var Bundler = class extends MastraBundler {
|
|
|
117
117
|
dependenciesToInstall.set(dep, "latest");
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
if (analyzedBundleInfo.externalDependencies.has("@mastra/memory")) {
|
|
120
|
+
if (analyzedBundleInfo.externalDependencies.has("@mastra/memory") || analyzedBundleInfo.dependencies.has("@mastra/memory")) {
|
|
121
121
|
dependenciesToInstall.set("fastembed", "latest");
|
|
122
122
|
}
|
|
123
123
|
await this.writePackageJson(join(outputDirectory, this.outputDir), dependenciesToInstall);
|
|
@@ -32,7 +32,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
32
32
|
}
|
|
33
33
|
async writeInstrumentationFile(outputDirectory) {
|
|
34
34
|
const instrumentationFile = path.join(outputDirectory, "instrumentation.mjs");
|
|
35
|
-
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-
|
|
35
|
+
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-XBEPXRKN.cjs', document.baseURI).href))));
|
|
36
36
|
await esm.copy(path.join(__dirname, "templates", "instrumentation-template.js"), instrumentationFile);
|
|
37
37
|
}
|
|
38
38
|
async writePackageJson(outputDirectory, dependencies) {
|
|
@@ -125,7 +125,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
125
125
|
dependenciesToInstall.set(dep, "latest");
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
if (analyzedBundleInfo.externalDependencies.has("@mastra/memory")) {
|
|
128
|
+
if (analyzedBundleInfo.externalDependencies.has("@mastra/memory") || analyzedBundleInfo.dependencies.has("@mastra/memory")) {
|
|
129
129
|
dependenciesToInstall.set("fastembed", "latest");
|
|
130
130
|
}
|
|
131
131
|
await this.writePackageJson(path.join(outputDirectory, this.outputDir), dependenciesToInstall);
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXBEPXRKN_cjs = require('./chunk-XBEPXRKN.cjs');
|
|
4
4
|
var chunk2ZPQX6BX_cjs = require('./chunk-2ZPQX6BX.cjs');
|
|
5
5
|
var chunkNCROGJGB_cjs = require('./chunk-NCROGJGB.cjs');
|
|
6
6
|
var chunkVFZVVUQE_cjs = require('./chunk-VFZVVUQE.cjs');
|
|
@@ -34,7 +34,7 @@ var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
|
|
|
34
34
|
var commonjs__default = /*#__PURE__*/_interopDefault(commonjs);
|
|
35
35
|
|
|
36
36
|
// src/deploy/base.ts
|
|
37
|
-
var Deployer = class extends
|
|
37
|
+
var Deployer = class extends chunkXBEPXRKN_cjs.Bundler {
|
|
38
38
|
deps = new chunkVFZVVUQE_cjs.DepsService();
|
|
39
39
|
constructor(args) {
|
|
40
40
|
super(args.name, "DEPLOYER");
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-SQP5ULJ5.js';
|
|
2
2
|
import { recursiveRemoveNonReferencedNodes } from './chunk-4AYFLP6G.js';
|
|
3
3
|
import { FileService } from './chunk-DYQ225MJ.js';
|
|
4
4
|
export { FileService } from './chunk-DYQ225MJ.js';
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AlwaysOffSampler,
|
|
10
10
|
OTLPHttpExporter,
|
|
11
11
|
OTLPGrpcExporter,
|
|
12
|
+
CompositeExporter,
|
|
12
13
|
} from '@mastra/core/telemetry/otel-vendor';
|
|
13
14
|
import { telemetry } from './telemetry-config.mjs';
|
|
14
15
|
|
|
@@ -36,36 +37,45 @@ function getSampler(config) {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
async function
|
|
40
|
+
async function getExporters(config) {
|
|
41
|
+
const exporters = [];
|
|
42
|
+
|
|
43
|
+
// Add local exporter by default
|
|
44
|
+
if (!config.disableLocalExport) {
|
|
45
|
+
exporters.push(new OTLPHttpExporter({
|
|
46
|
+
url: `http://localhost:${process.env.PORT ?? 4111}/api/telemetry`,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
if (config.export?.type === 'otlp') {
|
|
41
51
|
if (config.export?.protocol === 'grpc') {
|
|
42
|
-
|
|
52
|
+
exporters.push(new OTLPGrpcExporter({
|
|
43
53
|
url: config.export.endpoint,
|
|
44
54
|
headers: config.export.headers,
|
|
45
|
-
});
|
|
55
|
+
}));
|
|
56
|
+
} else {
|
|
57
|
+
exporters.push(new OTLPHttpExporter({
|
|
58
|
+
url: config.export.endpoint,
|
|
59
|
+
headers: config.export.headers,
|
|
60
|
+
}));
|
|
46
61
|
}
|
|
47
|
-
return new OTLPHttpExporter({
|
|
48
|
-
url: config.export.endpoint,
|
|
49
|
-
headers: config.export.headers,
|
|
50
|
-
});
|
|
51
62
|
} else if (config.export?.type === 'custom') {
|
|
52
|
-
|
|
53
|
-
} else {
|
|
54
|
-
return new OTLPHttpExporter({
|
|
55
|
-
url: `http://localhost:${process.env.PORT ?? 4111}/api/telemetry`,
|
|
56
|
-
});
|
|
63
|
+
exporters.push(config.export.exporter);
|
|
57
64
|
}
|
|
65
|
+
|
|
66
|
+
return exporters
|
|
58
67
|
}
|
|
59
68
|
|
|
60
69
|
const sampler = getSampler(telemetry);
|
|
61
|
-
const
|
|
70
|
+
const exporters = await getExporters(telemetry);
|
|
71
|
+
const compositeExporter = new CompositeExporter(exporters);
|
|
62
72
|
|
|
63
73
|
const sdk = new NodeSDK({
|
|
64
74
|
resource: new Resource({
|
|
65
75
|
[ATTR_SERVICE_NAME]: telemetry.serviceName || 'default-service',
|
|
66
76
|
}),
|
|
67
77
|
sampler,
|
|
68
|
-
traceExporter:
|
|
78
|
+
traceExporter: compositeExporter,
|
|
69
79
|
instrumentations: [getNodeAutoInstrumentations()],
|
|
70
80
|
});
|
|
71
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.2.6-alpha.
|
|
3
|
+
"version": "0.2.6-alpha.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
106
106
|
"typescript-paths": "^1.5.1",
|
|
107
107
|
"zod": "^3.24.2",
|
|
108
|
-
"@mastra/core": "^0.8.0-alpha.
|
|
109
|
-
"@mastra/server": "^0.0.1-alpha.
|
|
108
|
+
"@mastra/core": "^0.8.0-alpha.7",
|
|
109
|
+
"@mastra/server": "^0.0.1-alpha.5"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@hono/node-server": "^1.13.8",
|