@mastra/deployer 0.2.6-alpha.1 → 0.2.6-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/dist/_tsup-dts-rollup.d.cts +60 -16
- package/dist/_tsup-dts-rollup.d.ts +60 -16
- package/dist/build/bundler.cjs +3 -3
- package/dist/build/bundler.js +1 -1
- package/dist/build/index.cjs +9 -9
- package/dist/build/index.js +2 -2
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-7GYBZLVN.cjs → chunk-2JXRI3DC.cjs} +3 -3
- package/dist/{chunk-OT6UKL2S.cjs → chunk-AE4CVAPK.cjs} +11 -0
- package/dist/{chunk-PUX2FDGX.js → chunk-C6LYG5EA.js} +1 -1
- package/dist/{chunk-KLVSED7T.js → chunk-DUK5PGPQ.js} +1 -1
- package/dist/{chunk-XEFBJH3T.js → chunk-IKPL4RGG.js} +11 -0
- package/dist/{chunk-NXBTVZHO.cjs → chunk-OE6LAGEI.cjs} +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +490 -2825
- package/dist/server/index.js +398 -2733
- package/dist/templates/instrumentation-template.js +2 -6
- package/package.json +4 -3
|
@@ -216,9 +216,15 @@ export declare function generateHandler_alias_1(c: Context): Promise<Response>;
|
|
|
216
216
|
|
|
217
217
|
export declare function generateSystemPromptHandler(c: Context): Promise<Response>;
|
|
218
218
|
|
|
219
|
-
export declare function getAgentByIdHandler(c: Context): Promise<Response
|
|
219
|
+
export declare function getAgentByIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
220
|
+
name: any;
|
|
221
|
+
instructions: string;
|
|
222
|
+
tools: any;
|
|
223
|
+
provider: string;
|
|
224
|
+
modelId: string;
|
|
225
|
+
}, ContentfulStatusCode, "json">>;
|
|
220
226
|
|
|
221
|
-
export declare function getAgentsHandler(c: Context): Promise<Response
|
|
227
|
+
export declare function getAgentsHandler(c: Context): Promise<Response & TypedResponse<any, ContentfulStatusCode, "json">>;
|
|
222
228
|
|
|
223
229
|
declare function getBundler(inputOptions: NormalizedInputOptions, args?: {
|
|
224
230
|
platform?: 'node' | 'browser';
|
|
@@ -233,7 +239,31 @@ export { getDeployer as getDeployer_alias_1 }
|
|
|
233
239
|
|
|
234
240
|
export declare function getDeployerBundler(entryFile: string): Promise<RollupBuild>;
|
|
235
241
|
|
|
236
|
-
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response
|
|
242
|
+
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
243
|
+
id: string;
|
|
244
|
+
name: any;
|
|
245
|
+
instructions: string;
|
|
246
|
+
evals: {
|
|
247
|
+
input: string;
|
|
248
|
+
output: string;
|
|
249
|
+
result: {
|
|
250
|
+
score: number;
|
|
251
|
+
info?: {
|
|
252
|
+
[x: string]: any;
|
|
253
|
+
} | undefined;
|
|
254
|
+
};
|
|
255
|
+
agentName: string;
|
|
256
|
+
createdAt: string;
|
|
257
|
+
metricName: string;
|
|
258
|
+
instructions: string;
|
|
259
|
+
runId: string;
|
|
260
|
+
globalRunId: string;
|
|
261
|
+
testInfo?: {
|
|
262
|
+
testName?: string | undefined;
|
|
263
|
+
testPath?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
}[];
|
|
266
|
+
}, ContentfulStatusCode, "json">>;
|
|
237
267
|
|
|
238
268
|
declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser'): Promise<InputOptions>;
|
|
239
269
|
export { getInputOptions as getBundlerInputOptions }
|
|
@@ -243,7 +273,31 @@ declare function getInputOptions_2(entryFile: string, platform: 'node' | 'browse
|
|
|
243
273
|
export { getInputOptions_2 as getInputOptions_alias_1 }
|
|
244
274
|
export { getInputOptions_2 as getWatcherInputOptions }
|
|
245
275
|
|
|
246
|
-
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response
|
|
276
|
+
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
277
|
+
id: string;
|
|
278
|
+
name: any;
|
|
279
|
+
instructions: string;
|
|
280
|
+
evals: {
|
|
281
|
+
input: string;
|
|
282
|
+
output: string;
|
|
283
|
+
result: {
|
|
284
|
+
score: number;
|
|
285
|
+
info?: {
|
|
286
|
+
[x: string]: any;
|
|
287
|
+
} | undefined;
|
|
288
|
+
};
|
|
289
|
+
agentName: string;
|
|
290
|
+
createdAt: string;
|
|
291
|
+
metricName: string;
|
|
292
|
+
instructions: string;
|
|
293
|
+
runId: string;
|
|
294
|
+
globalRunId: string;
|
|
295
|
+
testInfo?: {
|
|
296
|
+
testName?: string | undefined;
|
|
297
|
+
testPath?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}[];
|
|
300
|
+
}, ContentfulStatusCode, "json">>;
|
|
247
301
|
|
|
248
302
|
export declare function getLogsByRunIdHandler(c: Context): Promise<Response>;
|
|
249
303
|
|
|
@@ -317,8 +371,6 @@ declare type NormalizedInputOptions = Omit<Partial<InputOptions>, 'plugins' | 'i
|
|
|
317
371
|
external?: (string | RegExp)[];
|
|
318
372
|
};
|
|
319
373
|
|
|
320
|
-
export declare function notFoundHandler(): void;
|
|
321
|
-
|
|
322
374
|
export declare function pino(): {
|
|
323
375
|
name: string;
|
|
324
376
|
resolveId(this: PluginContext, id: string, importee: string | undefined): Promise<{
|
|
@@ -378,15 +430,7 @@ export declare function startAsyncWorkflowHandler(c: Context): Promise<Response>
|
|
|
378
430
|
|
|
379
431
|
export declare function startWorkflowRunHandler(c: Context): Promise<Response>;
|
|
380
432
|
|
|
381
|
-
export declare function storeTelemetryHandler(c: Context): Promise<
|
|
382
|
-
status: string;
|
|
383
|
-
message: string;
|
|
384
|
-
traceCount: any;
|
|
385
|
-
}, 200, "json">) | (Response & TypedResponse< {
|
|
386
|
-
[x: string]: any;
|
|
387
|
-
status: string;
|
|
388
|
-
message: string;
|
|
389
|
-
}, 500, "json">)>;
|
|
433
|
+
export declare function storeTelemetryHandler(c: Context): Promise<Response>;
|
|
390
434
|
|
|
391
435
|
export declare function streamGenerateHandler(c: Context): Promise<Response | undefined>;
|
|
392
436
|
|
|
@@ -415,7 +459,7 @@ declare type Variables = {
|
|
|
415
459
|
playground: boolean;
|
|
416
460
|
};
|
|
417
461
|
|
|
418
|
-
export declare function watchWorkflowHandler(c: Context): Promise<Response>;
|
|
462
|
+
export declare function watchWorkflowHandler(c: Context): Response | Promise<Response>;
|
|
419
463
|
|
|
420
464
|
declare function writeTelemetryConfig(entryFile: string, outputDir: string): Promise<{
|
|
421
465
|
hasCustomConfig: boolean;
|
|
@@ -216,9 +216,15 @@ export declare function generateHandler_alias_1(c: Context): Promise<Response>;
|
|
|
216
216
|
|
|
217
217
|
export declare function generateSystemPromptHandler(c: Context): Promise<Response>;
|
|
218
218
|
|
|
219
|
-
export declare function getAgentByIdHandler(c: Context): Promise<Response
|
|
219
|
+
export declare function getAgentByIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
220
|
+
name: any;
|
|
221
|
+
instructions: string;
|
|
222
|
+
tools: any;
|
|
223
|
+
provider: string;
|
|
224
|
+
modelId: string;
|
|
225
|
+
}, ContentfulStatusCode, "json">>;
|
|
220
226
|
|
|
221
|
-
export declare function getAgentsHandler(c: Context): Promise<Response
|
|
227
|
+
export declare function getAgentsHandler(c: Context): Promise<Response & TypedResponse<any, ContentfulStatusCode, "json">>;
|
|
222
228
|
|
|
223
229
|
declare function getBundler(inputOptions: NormalizedInputOptions, args?: {
|
|
224
230
|
platform?: 'node' | 'browser';
|
|
@@ -233,7 +239,31 @@ export { getDeployer as getDeployer_alias_1 }
|
|
|
233
239
|
|
|
234
240
|
export declare function getDeployerBundler(entryFile: string): Promise<RollupBuild>;
|
|
235
241
|
|
|
236
|
-
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response
|
|
242
|
+
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
243
|
+
id: string;
|
|
244
|
+
name: any;
|
|
245
|
+
instructions: string;
|
|
246
|
+
evals: {
|
|
247
|
+
input: string;
|
|
248
|
+
output: string;
|
|
249
|
+
result: {
|
|
250
|
+
score: number;
|
|
251
|
+
info?: {
|
|
252
|
+
[x: string]: any;
|
|
253
|
+
} | undefined;
|
|
254
|
+
};
|
|
255
|
+
agentName: string;
|
|
256
|
+
createdAt: string;
|
|
257
|
+
metricName: string;
|
|
258
|
+
instructions: string;
|
|
259
|
+
runId: string;
|
|
260
|
+
globalRunId: string;
|
|
261
|
+
testInfo?: {
|
|
262
|
+
testName?: string | undefined;
|
|
263
|
+
testPath?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
}[];
|
|
266
|
+
}, ContentfulStatusCode, "json">>;
|
|
237
267
|
|
|
238
268
|
declare function getInputOptions(entryFile: string, analyzedBundleInfo: Awaited<ReturnType<typeof analyzeBundle>>, platform: 'node' | 'browser'): Promise<InputOptions>;
|
|
239
269
|
export { getInputOptions as getBundlerInputOptions }
|
|
@@ -243,7 +273,31 @@ declare function getInputOptions_2(entryFile: string, platform: 'node' | 'browse
|
|
|
243
273
|
export { getInputOptions_2 as getInputOptions_alias_1 }
|
|
244
274
|
export { getInputOptions_2 as getWatcherInputOptions }
|
|
245
275
|
|
|
246
|
-
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response
|
|
276
|
+
export declare function getLiveEvalsByAgentIdHandler(c: Context): Promise<Response & TypedResponse< {
|
|
277
|
+
id: string;
|
|
278
|
+
name: any;
|
|
279
|
+
instructions: string;
|
|
280
|
+
evals: {
|
|
281
|
+
input: string;
|
|
282
|
+
output: string;
|
|
283
|
+
result: {
|
|
284
|
+
score: number;
|
|
285
|
+
info?: {
|
|
286
|
+
[x: string]: any;
|
|
287
|
+
} | undefined;
|
|
288
|
+
};
|
|
289
|
+
agentName: string;
|
|
290
|
+
createdAt: string;
|
|
291
|
+
metricName: string;
|
|
292
|
+
instructions: string;
|
|
293
|
+
runId: string;
|
|
294
|
+
globalRunId: string;
|
|
295
|
+
testInfo?: {
|
|
296
|
+
testName?: string | undefined;
|
|
297
|
+
testPath?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}[];
|
|
300
|
+
}, ContentfulStatusCode, "json">>;
|
|
247
301
|
|
|
248
302
|
export declare function getLogsByRunIdHandler(c: Context): Promise<Response>;
|
|
249
303
|
|
|
@@ -317,8 +371,6 @@ declare type NormalizedInputOptions = Omit<Partial<InputOptions>, 'plugins' | 'i
|
|
|
317
371
|
external?: (string | RegExp)[];
|
|
318
372
|
};
|
|
319
373
|
|
|
320
|
-
export declare function notFoundHandler(): void;
|
|
321
|
-
|
|
322
374
|
export declare function pino(): {
|
|
323
375
|
name: string;
|
|
324
376
|
resolveId(this: PluginContext, id: string, importee: string | undefined): Promise<{
|
|
@@ -378,15 +430,7 @@ export declare function startAsyncWorkflowHandler(c: Context): Promise<Response>
|
|
|
378
430
|
|
|
379
431
|
export declare function startWorkflowRunHandler(c: Context): Promise<Response>;
|
|
380
432
|
|
|
381
|
-
export declare function storeTelemetryHandler(c: Context): Promise<
|
|
382
|
-
status: string;
|
|
383
|
-
message: string;
|
|
384
|
-
traceCount: any;
|
|
385
|
-
}, 200, "json">) | (Response & TypedResponse< {
|
|
386
|
-
[x: string]: any;
|
|
387
|
-
status: string;
|
|
388
|
-
message: string;
|
|
389
|
-
}, 500, "json">)>;
|
|
433
|
+
export declare function storeTelemetryHandler(c: Context): Promise<Response>;
|
|
390
434
|
|
|
391
435
|
export declare function streamGenerateHandler(c: Context): Promise<Response | undefined>;
|
|
392
436
|
|
|
@@ -415,7 +459,7 @@ declare type Variables = {
|
|
|
415
459
|
playground: boolean;
|
|
416
460
|
};
|
|
417
461
|
|
|
418
|
-
export declare function watchWorkflowHandler(c: Context): Promise<Response>;
|
|
462
|
+
export declare function watchWorkflowHandler(c: Context): Response | Promise<Response>;
|
|
419
463
|
|
|
420
464
|
declare function writeTelemetryConfig(entryFile: string, outputDir: string): Promise<{
|
|
421
465
|
hasCustomConfig: boolean;
|
package/dist/build/bundler.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAE4CVAPK_cjs = require('../chunk-AE4CVAPK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "createBundler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkAE4CVAPK_cjs.createBundler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "getInputOptions", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkAE4CVAPK_cjs.getInputOptions; }
|
|
14
14
|
});
|
package/dist/build/bundler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createBundler, getInputOptions } from '../chunk-
|
|
1
|
+
export { createBundler, getInputOptions } from '../chunk-IKPL4RGG.js';
|
package/dist/build/index.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2JXRI3DC_cjs = require('../chunk-2JXRI3DC.cjs');
|
|
4
4
|
var chunkKFOGAPGX_cjs = require('../chunk-KFOGAPGX.cjs');
|
|
5
5
|
var chunkNWERLYTR_cjs = require('../chunk-NWERLYTR.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkAE4CVAPK_cjs = require('../chunk-AE4CVAPK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "FileService", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk2JXRI3DC_cjs.FileService; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "createWatcher", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk2JXRI3DC_cjs.createWatcher; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "getBundler", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk2JXRI3DC_cjs.getBundler; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "getWatcher", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk2JXRI3DC_cjs.getWatcher; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "getWatcherInputOptions", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk2JXRI3DC_cjs.getInputOptions; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "Deps", {
|
|
31
31
|
enumerable: true,
|
|
@@ -41,9 +41,9 @@ Object.defineProperty(exports, "analyzeBundle", {
|
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "createBundler", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkAE4CVAPK_cjs.createBundler; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "getBundlerInputOptions", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkAE4CVAPK_cjs.getInputOptions; }
|
|
49
49
|
});
|
package/dist/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-
|
|
1
|
+
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-C6LYG5EA.js';
|
|
2
2
|
export { Deps, writeTelemetryConfig } from '../chunk-ZAXXMFXX.js';
|
|
3
3
|
export { analyzeBundle } from '../chunk-UTZ3434D.js';
|
|
4
|
-
export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-
|
|
4
|
+
export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-IKPL4RGG.js';
|
package/dist/bundler/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOE6LAGEI_cjs = require('../chunk-OE6LAGEI.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 chunkOE6LAGEI_cjs.Bundler; }
|
|
10
10
|
});
|
package/dist/bundler/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Bundler } from '../chunk-
|
|
1
|
+
export { Bundler } from '../chunk-DUK5PGPQ.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkNWERLYTR_cjs = require('./chunk-NWERLYTR.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkAE4CVAPK_cjs = require('./chunk-AE4CVAPK.cjs');
|
|
5
5
|
var chunk54KOF3NB_cjs = require('./chunk-54KOF3NB.cjs');
|
|
6
6
|
var alias = require('@rollup/plugin-alias');
|
|
7
7
|
var commonjs = require('@rollup/plugin-commonjs');
|
|
@@ -116,7 +116,7 @@ var FileService = class {
|
|
|
116
116
|
* @returns
|
|
117
117
|
*/
|
|
118
118
|
async copyStarterFile(inputFile, outputFilePath, replaceIfExists) {
|
|
119
|
-
const __filename = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
119
|
+
const __filename = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-2JXRI3DC.cjs', document.baseURI).href)));
|
|
120
120
|
const __dirname = path__default.default.dirname(__filename);
|
|
121
121
|
const filePath = path__default.default.resolve(__dirname, "..", "starter-files", inputFile);
|
|
122
122
|
const fileString = fs2__namespace.default.readFileSync(filePath, "utf8");
|
|
@@ -248,7 +248,7 @@ async function getWatcher(inputOptions, args = {}) {
|
|
|
248
248
|
return watcher;
|
|
249
249
|
}
|
|
250
250
|
async function getInputOptions2(entryFile, platform) {
|
|
251
|
-
const inputOptions = await
|
|
251
|
+
const inputOptions = await chunkAE4CVAPK_cjs.getInputOptions(
|
|
252
252
|
entryFile,
|
|
253
253
|
{
|
|
254
254
|
dependencies: /* @__PURE__ */ new Map(),
|
|
@@ -74,6 +74,17 @@ async function getInputOptions(entryFile, analyzedBundleInfo, platform) {
|
|
|
74
74
|
find: /^\#server$/,
|
|
75
75
|
replacement: url.fileURLToPath(undefined("@mastra/deployer/server")).replaceAll("\\", "/")
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
find: /^\@mastra\/server\/(.*)/,
|
|
79
|
+
replacement: `@mastra/server/$1`,
|
|
80
|
+
customResolver: (id) => {
|
|
81
|
+
if (id.startsWith("@mastra/server")) {
|
|
82
|
+
return {
|
|
83
|
+
id: url.fileURLToPath(undefined(id))
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
77
88
|
{ find: /^\#mastra$/, replacement: normalizedEntryFile }
|
|
78
89
|
]
|
|
79
90
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { aliasHono } from './chunk-UTZ3434D.js';
|
|
2
|
-
import { getInputOptions } from './chunk-
|
|
2
|
+
import { getInputOptions } from './chunk-IKPL4RGG.js';
|
|
3
3
|
import { removeDeployer } from './chunk-WVBUOQT6.js';
|
|
4
4
|
import alias from '@rollup/plugin-alias';
|
|
5
5
|
import commonjs from '@rollup/plugin-commonjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Deps, writeTelemetryConfig } from './chunk-ZAXXMFXX.js';
|
|
2
2
|
import { analyzeBundle } from './chunk-UTZ3434D.js';
|
|
3
|
-
import { createBundler, getInputOptions } from './chunk-
|
|
3
|
+
import { createBundler, getInputOptions } from './chunk-IKPL4RGG.js';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
5
|
import { writeFile, stat } from 'node:fs/promises';
|
|
6
6
|
import { join, dirname } from 'node:path';
|
|
@@ -64,6 +64,17 @@ async function getInputOptions(entryFile, analyzedBundleInfo, platform) {
|
|
|
64
64
|
find: /^\#server$/,
|
|
65
65
|
replacement: fileURLToPath(import.meta.resolve("@mastra/deployer/server")).replaceAll("\\", "/")
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
find: /^\@mastra\/server\/(.*)/,
|
|
69
|
+
replacement: `@mastra/server/$1`,
|
|
70
|
+
customResolver: (id) => {
|
|
71
|
+
if (id.startsWith("@mastra/server")) {
|
|
72
|
+
return {
|
|
73
|
+
id: fileURLToPath(import.meta.resolve(id))
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
67
78
|
{ find: /^\#mastra$/, replacement: normalizedEntryFile }
|
|
68
79
|
]
|
|
69
80
|
}),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkKFOGAPGX_cjs = require('./chunk-KFOGAPGX.cjs');
|
|
4
4
|
var chunkNWERLYTR_cjs = require('./chunk-NWERLYTR.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkAE4CVAPK_cjs = require('./chunk-AE4CVAPK.cjs');
|
|
6
6
|
var fs = require('fs');
|
|
7
7
|
var promises = require('fs/promises');
|
|
8
8
|
var path = require('path');
|
|
@@ -31,7 +31,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
31
31
|
}
|
|
32
32
|
async writeInstrumentationFile(outputDirectory) {
|
|
33
33
|
const instrumentationFile = path.join(outputDirectory, "instrumentation.mjs");
|
|
34
|
-
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-
|
|
34
|
+
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-OE6LAGEI.cjs', document.baseURI).href))));
|
|
35
35
|
await esm.copy(path.join(__dirname, "templates", "instrumentation-template.js"), instrumentationFile);
|
|
36
36
|
}
|
|
37
37
|
async writePackageJson(outputDirectory, dependencies) {
|
|
@@ -70,7 +70,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
createBundler(inputOptions, outputOptions) {
|
|
73
|
-
return
|
|
73
|
+
return chunkAE4CVAPK_cjs.createBundler(inputOptions, outputOptions);
|
|
74
74
|
}
|
|
75
75
|
async analyze(entry, mastraFile, outputDirectory) {
|
|
76
76
|
return await chunkNWERLYTR_cjs.analyzeBundle(entry, mastraFile, path.join(outputDirectory, this.analyzeOutputDir), "node", this.logger);
|
|
@@ -90,7 +90,7 @@ var Bundler = class extends bundler.MastraBundler {
|
|
|
90
90
|
await esm.copy(publicDir, path.join(outputDirectory, this.outputDir));
|
|
91
91
|
}
|
|
92
92
|
async getBundlerOptions(serverFile, mastraEntryFile, analyzedBundleInfo) {
|
|
93
|
-
const inputOptions = await
|
|
93
|
+
const inputOptions = await chunkAE4CVAPK_cjs.getInputOptions(mastraEntryFile, analyzedBundleInfo, "node");
|
|
94
94
|
const isVirtual = serverFile.includes("\n") || fs.existsSync(serverFile);
|
|
95
95
|
if (isVirtual) {
|
|
96
96
|
inputOptions.input = { index: "#entry" };
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk2JXRI3DC_cjs = require('./chunk-2JXRI3DC.cjs');
|
|
4
|
+
var chunkOE6LAGEI_cjs = require('./chunk-OE6LAGEI.cjs');
|
|
5
5
|
var chunkKFOGAPGX_cjs = require('./chunk-KFOGAPGX.cjs');
|
|
6
6
|
var babel = require('@babel/core');
|
|
7
7
|
var rollup = require('rollup');
|
|
@@ -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 chunkOE6LAGEI_cjs.Bundler {
|
|
37
37
|
deps = new chunkKFOGAPGX_cjs.Deps();
|
|
38
38
|
constructor(args) {
|
|
39
39
|
super(args.name, "DEPLOYER");
|
|
@@ -42,7 +42,7 @@ var Deployer = class extends chunkNXBTVZHO_cjs.Bundler {
|
|
|
42
42
|
getEnvFiles() {
|
|
43
43
|
const possibleFiles = [".env.production", ".env.local", ".env"];
|
|
44
44
|
try {
|
|
45
|
-
const fileService = new
|
|
45
|
+
const fileService = new chunk2JXRI3DC_cjs.FileService();
|
|
46
46
|
const envFile = fileService.getFirstExistingFile(possibleFiles);
|
|
47
47
|
return Promise.resolve([envFile]);
|
|
48
48
|
} catch {
|
|
@@ -172,7 +172,7 @@ async function getDeployer(entryFile, outputDir) {
|
|
|
172
172
|
|
|
173
173
|
Object.defineProperty(exports, "FileService", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunk2JXRI3DC_cjs.FileService; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "Deps", {
|
|
178
178
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FileService } from './chunk-
|
|
2
|
-
export { FileService } from './chunk-
|
|
3
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { FileService } from './chunk-C6LYG5EA.js';
|
|
2
|
+
export { FileService } from './chunk-C6LYG5EA.js';
|
|
3
|
+
import { Bundler } from './chunk-DUK5PGPQ.js';
|
|
4
4
|
import { Deps, recursiveRemoveNonReferencedNodes } from './chunk-ZAXXMFXX.js';
|
|
5
5
|
export { Deps, createChildProcessLogger, createPinoStream } from './chunk-ZAXXMFXX.js';
|
|
6
6
|
import * as babel from '@babel/core';
|