@mastra/deployer 0.21.2-alpha.0 → 0.22.0-alpha.1
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 +20 -0
- package/dist/build/analyze/bundleExternals.d.ts.map +1 -1
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/bundler.cjs +3 -3
- package/dist/build/bundler.js +1 -1
- package/dist/build/index.cjs +12 -12
- package/dist/build/index.js +4 -4
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-CEXVMFUD.js → chunk-BJHDR4SR.js} +5 -3
- package/dist/{chunk-CEXVMFUD.js.map → chunk-BJHDR4SR.js.map} +1 -1
- package/dist/{chunk-WIQEFIRX.cjs → chunk-CA6AZTUU.cjs} +5 -5
- package/dist/{chunk-WIQEFIRX.cjs.map → chunk-CA6AZTUU.cjs.map} +1 -1
- package/dist/{chunk-465ZVXAK.js → chunk-DVNT3PD3.js} +5 -5
- package/dist/{chunk-465ZVXAK.js.map → chunk-DVNT3PD3.js.map} +1 -1
- package/dist/{chunk-LGC3GUMR.cjs → chunk-EQZIOQE6.cjs} +15 -15
- package/dist/{chunk-LGC3GUMR.cjs.map → chunk-EQZIOQE6.cjs.map} +1 -1
- package/dist/{chunk-WAWEQ3DP.js → chunk-FUCT2436.js} +3 -3
- package/dist/{chunk-WAWEQ3DP.js.map → chunk-FUCT2436.js.map} +1 -1
- package/dist/{chunk-HMMDNIEQ.cjs → chunk-HLER5GBH.cjs} +9 -9
- package/dist/{chunk-HMMDNIEQ.cjs.map → chunk-HLER5GBH.cjs.map} +1 -1
- package/dist/{chunk-CKUCDCGI.js → chunk-PADCXECT.js} +4 -4
- package/dist/{chunk-CKUCDCGI.js.map → chunk-PADCXECT.js.map} +1 -1
- package/dist/{chunk-MCDDO4WY.cjs → chunk-VBZ7BDBX.cjs} +5 -3
- package/dist/{chunk-MCDDO4WY.cjs.map → chunk-VBZ7BDBX.cjs.map} +1 -1
- package/dist/{chunk-SBTEIZ3B.js → chunk-W6I7EZT3.js} +3 -3
- package/dist/{chunk-SBTEIZ3B.js.map → chunk-W6I7EZT3.js.map} +1 -1
- package/dist/{chunk-OYO2MJED.cjs → chunk-WMR25CFY.cjs} +14 -14
- package/dist/{chunk-OYO2MJED.cjs.map → chunk-WMR25CFY.cjs.map} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.js +2 -2
- package/dist/server/handlers/a2a.d.ts +1 -1
- package/dist/server/handlers/routes/agents/handlers.d.ts +4 -4
- package/dist/server/handlers/routes/scores/handlers.d.ts +111 -111
- package/dist/server/handlers/routes/workflows/handlers.d.ts +2 -0
- package/dist/server/handlers/routes/workflows/handlers.d.ts.map +1 -1
- package/dist/server/handlers/routes/workflows/router.d.ts.map +1 -1
- package/dist/server/index.cjs +122 -30
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +123 -31
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkHLER5GBH_cjs = require('./chunk-HLER5GBH.cjs');
|
|
4
|
+
var chunkVBZ7BDBX_cjs = require('./chunk-VBZ7BDBX.cjs');
|
|
5
5
|
var rollup = require('rollup');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var pkg = require('empathic/package');
|
|
@@ -80,7 +80,7 @@ function nodeModulesExtensionResolver() {
|
|
|
80
80
|
for (const ext of [".mjs", ".js", ".cjs"]) {
|
|
81
81
|
const resolved2 = safeResolve(id + ext, importer);
|
|
82
82
|
if (resolved2) {
|
|
83
|
-
const pkgName =
|
|
83
|
+
const pkgName = chunkVBZ7BDBX_cjs.getPackageName(id);
|
|
84
84
|
if (!pkgName) {
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
@@ -102,9 +102,9 @@ function nodeModulesExtensionResolver() {
|
|
|
102
102
|
}
|
|
103
103
|
async function getInputOptions2(entryFile, platform, env, { sourcemap = false } = {}) {
|
|
104
104
|
const closestPkgJson = pkg__namespace.up({ cwd: path.dirname(entryFile) });
|
|
105
|
-
const projectRoot = closestPkgJson ? path.dirname(
|
|
106
|
-
const { workspaceMap, workspaceRoot } = await
|
|
107
|
-
const analyzeEntryResult = await
|
|
105
|
+
const projectRoot = closestPkgJson ? path.dirname(chunkVBZ7BDBX_cjs.slash(closestPkgJson)) : chunkVBZ7BDBX_cjs.slash(process.cwd());
|
|
106
|
+
const { workspaceMap, workspaceRoot } = await chunkVBZ7BDBX_cjs.getWorkspaceInformation({ mastraEntryFile: entryFile });
|
|
107
|
+
const analyzeEntryResult = await chunkVBZ7BDBX_cjs.analyzeBundle(
|
|
108
108
|
[entryFile],
|
|
109
109
|
entryFile,
|
|
110
110
|
{
|
|
@@ -117,12 +117,12 @@ async function getInputOptions2(entryFile, platform, env, { sourcemap = false }
|
|
|
117
117
|
);
|
|
118
118
|
const deps = /* @__PURE__ */ new Map();
|
|
119
119
|
for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {
|
|
120
|
-
const pkgName =
|
|
120
|
+
const pkgName = chunkVBZ7BDBX_cjs.getPackageName(dep);
|
|
121
121
|
if (pkgName && workspaceMap.has(pkgName)) {
|
|
122
122
|
deps.set(dep, metadata);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
const inputOptions = await
|
|
125
|
+
const inputOptions = await chunkHLER5GBH_cjs.getInputOptions(
|
|
126
126
|
entryFile,
|
|
127
127
|
{
|
|
128
128
|
dependencies: deps,
|
|
@@ -141,7 +141,7 @@ async function getInputOptions2(entryFile, platform, env, { sourcemap = false }
|
|
|
141
141
|
}
|
|
142
142
|
if (plugin?.name === "tsconfig-paths") {
|
|
143
143
|
plugins.push(
|
|
144
|
-
|
|
144
|
+
chunkVBZ7BDBX_cjs.tsConfigPaths({
|
|
145
145
|
localResolve: true
|
|
146
146
|
})
|
|
147
147
|
);
|
|
@@ -150,7 +150,7 @@ async function getInputOptions2(entryFile, platform, env, { sourcemap = false }
|
|
|
150
150
|
plugins.push(plugin);
|
|
151
151
|
});
|
|
152
152
|
inputOptions.plugins = plugins;
|
|
153
|
-
inputOptions.plugins.push(
|
|
153
|
+
inputOptions.plugins.push(chunkVBZ7BDBX_cjs.aliasHono());
|
|
154
154
|
inputOptions.plugins.push(nodeModulesExtensionResolver());
|
|
155
155
|
}
|
|
156
156
|
return inputOptions;
|
|
@@ -170,12 +170,12 @@ async function createWatcher(inputOptions, outputOptions) {
|
|
|
170
170
|
|
|
171
171
|
// src/build/babel/remove-all-options-server.ts
|
|
172
172
|
function removeAllOptionsExceptServer(result, logger) {
|
|
173
|
-
return
|
|
173
|
+
return chunkVBZ7BDBX_cjs.removeAllOptionsFromMastraExcept(result, "server", logger);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
// src/build/serverOptions.ts
|
|
177
177
|
async function getServerOptions(entryFile, outputDir, logger) {
|
|
178
|
-
const result = await
|
|
178
|
+
const result = await chunkVBZ7BDBX_cjs.extractMastraOption(
|
|
179
179
|
"server",
|
|
180
180
|
entryFile,
|
|
181
181
|
removeAllOptionsExceptServer,
|
|
@@ -191,5 +191,5 @@ async function getServerOptions(entryFile, outputDir, logger) {
|
|
|
191
191
|
exports.createWatcher = createWatcher;
|
|
192
192
|
exports.getInputOptions = getInputOptions2;
|
|
193
193
|
exports.getServerOptions = getServerOptions;
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-WMR25CFY.cjs.map
|
|
195
|
+
//# sourceMappingURL=chunk-WMR25CFY.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["builtinModules","resolveFrom","extname","pathToFileURL","resolved","getPackageName","dirname","getInputOptions","pkg","slash","getWorkspaceInformation","analyzeBundle","posix","noopLogger","tsConfigPaths","aliasHono","watch","removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAA,EAA4B;AACnD,EAAA,OACEA,uBAAA,CAAe,QAAA,CAAS,SAAS,CAAA,IACjC,UAAU,UAAA,CAAW,OAAO,CAAA,IAC5BA,uBAAA,CAAe,QAAA,CAAS,SAAA,CAAU,OAAA,CAAQ,QAAA,EAAU,EAAE,CAAC,CAAA;AAE3D;AAEA,SAAS,WAAA,CAAY,IAAY,QAAA,EAAkB;AACjD,EAAA,IAAI;AACF,IAAA,OAAOC,4BAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAGO,SAAS,4BAAA,GAAuC;AACrD,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,iCAAA;AAAA,IACN,SAAA,CAAU,IAAI,QAAA,EAAU;AAEtB,MAAA,IAAI,EAAA,CAAG,WAAW,GAAG,CAAA,IAAK,GAAG,UAAA,CAAW,GAAG,CAAA,IAAK,CAAC,QAAA,EAAU;AACzD,QAAA,OAAO,IAAA;AAAA,MACT;AAEA,MAAA,IAAI,eAAA,CAAgB,EAAE,CAAA,EAAG;AACvB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,EAAA,CAAG,WAAW,GAAG,CAAA,IAAK,GAAG,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,KAAW,CAAA,EAAG;AACpD,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,CAAC,EAAA,CAAG,UAAA,CAAW,GAAG,CAAA,IAAK,GAAG,KAAA,CAAM,GAAG,CAAA,CAAE,MAAA,KAAW,CAAA,EAAG;AACrD,QAAA,OAAO,IAAA;AAAA,MACT;AAEA,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MAAA,EAAQ,KAAA;AAAA,MACR,cAAA,EAAgB,YAAA;AAAA,MAChB,cAAA,EAAgB;AAAA;AAClB,GACD,CAAA;AAED,EAAA,OAAO,OAAA;AACT;;;ACjGO,SAAS,4BAAA,CAA6B,QAAsC,MAAA,EAAwB;AACzG,EAAA,OAAOC,kDAAA,CAAiC,MAAA,EAAQ,QAAA,EAAU,MAAM,CAAA;AAClE;;;ACSA,eAAsB,gBAAA,CACpB,SAAA,EACA,SAAA,EACA,MAAA,EACkC;AAClC,EAAA,MAAM,SAAS,MAAMC,qCAAA;AAAA,IACnB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,4BAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,OAAO,SAAA,EAAU;AAC1B","file":"chunk-OYO2MJED.cjs","sourcesContent":["import { dirname, extname } from 'path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\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 */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/build/plugins/node-modules-extension-resolver.ts","../src/build/watcher.ts","../src/build/babel/remove-all-options-server.ts","../src/build/serverOptions.ts"],"names":["builtinModules","resolveFrom","extname","pathToFileURL","resolved","getPackageName","dirname","getInputOptions","pkg","slash","getWorkspaceInformation","analyzeBundle","posix","noopLogger","tsConfigPaths","aliasHono","watch","removeAllOptionsFromMastraExcept","extractMastraOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAA,EAA4B;AACnD,EAAA,OACEA,uBAAA,CAAe,QAAA,CAAS,SAAS,CAAA,IACjC,UAAU,UAAA,CAAW,OAAO,CAAA,IAC5BA,uBAAA,CAAe,QAAA,CAAS,SAAA,CAAU,OAAA,CAAQ,QAAA,EAAU,EAAE,CAAC,CAAA;AAE3D;AAEA,SAAS,WAAA,CAAY,IAAY,QAAA,EAAkB;AACjD,EAAA,IAAI;AACF,IAAA,OAAOC,4BAAA,CAAY,UAAU,EAAE,CAAA;AAAA,EACjC,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;AAGO,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js","sourcesContent":["import { dirname, extname } from 'path';\nimport { pathToFileURL } from 'node:url';\nimport resolveFrom from 'resolve-from';\nimport type { Plugin } from 'rollup';\nimport { builtinModules } from 'node:module';\nimport { getPackageName } from '../utils';\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 */\nfunction isBuiltinModule(specifier: string): boolean {\n return (\n builtinModules.includes(specifier) ||\n specifier.startsWith('node:') ||\n builtinModules.includes(specifier.replace(/^node:/, ''))\n );\n}\n\nfunction safeResolve(id: string, importer: string) {\n try {\n return resolveFrom(importer, id);\n } catch {\n return null;\n }\n}\n\n// we only need this for dev, so we can resolve the js extension of the module as we do not use node-resolve\nexport function nodeModulesExtensionResolver(): Plugin {\n return {\n name: 'node-modules-extension-resolver',\n resolveId(id, importer) {\n // if is relative, skip\n if (id.startsWith('.') || id.startsWith('/') || !importer) {\n return null;\n }\n\n if (isBuiltinModule(id)) {\n return null;\n }\n\n // if it's a scoped direct import skip\n if (id.startsWith('@') && id.split('/').length === 2) {\n return null;\n }\n\n // if it's a direct import, skip\n if (!id.startsWith('@') && id.split('/').length === 1) {\n return null;\n }\n\n const foundExt = extname(id);\n if (foundExt) {\n return null;\n }\n\n try {\n // if we cannot resolve it, it means it's a legacy module\n const resolved = import.meta.resolve(id);\n\n if (!extname(resolved)) {\n throw new Error(`Cannot resolve ${id} from ${importer}`);\n }\n\n return null;\n } catch (e) {\n // try to do a node like resolve first\n const resolved = safeResolve(id, importer);\n if (resolved) {\n return {\n id: pathToFileURL(resolved).href,\n external: true,\n };\n }\n\n for (const ext of ['.mjs', '.js', '.cjs']) {\n const resolved = safeResolve(id + ext, importer);\n if (resolved) {\n const pkgName = getPackageName(id);\n if (!pkgName) {\n return null;\n }\n\n const pkgJsonPath = safeResolve(`${pkgName}/package.json`, importer);\n if (!pkgJsonPath) {\n return null;\n }\n\n const newImportWithExtension = resolved.replace(dirname(pkgJsonPath), pkgName);\n\n return {\n id: pathToFileURL(newImportWithExtension).href,\n external: true,\n };\n }\n }\n }\n\n return null;\n },\n } satisfies Plugin;\n}\n","import type { InputOptions, OutputOptions, Plugin } from 'rollup';\nimport { watch } from 'rollup';\nimport { dirname, posix } from 'node:path';\nimport * as pkg from 'empathic/package';\nimport { getInputOptions as getBundlerInputOptions } from './bundler';\nimport { aliasHono } from './plugins/hono-alias';\nimport { nodeModulesExtensionResolver } from './plugins/node-modules-extension-resolver';\nimport { tsConfigPaths } from './plugins/tsconfig-paths';\nimport { noopLogger } from '@mastra/core/logger';\nimport { getWorkspaceInformation } from '../bundler/workspaceDependencies';\nimport { analyzeBundle } from './analyze';\nimport { getPackageName, slash } from './utils';\n\nexport async function getInputOptions(\n entryFile: string,\n platform: 'node' | 'browser',\n env?: Record<string, string>,\n { sourcemap = false }: { sourcemap?: boolean } = {},\n) {\n const closestPkgJson = pkg.up({ cwd: dirname(entryFile) });\n const projectRoot = closestPkgJson ? dirname(slash(closestPkgJson)) : slash(process.cwd());\n const { workspaceMap, workspaceRoot } = await getWorkspaceInformation({ mastraEntryFile: entryFile });\n\n const analyzeEntryResult = await analyzeBundle(\n [entryFile],\n entryFile,\n {\n outputDir: posix.join(process.cwd(), '.mastra', '.build'),\n projectRoot: workspaceRoot || process.cwd(),\n platform: 'node',\n isDev: true,\n },\n noopLogger,\n );\n\n const deps = /* @__PURE__ */ new Map();\n for (const [dep, metadata] of analyzeEntryResult.dependencies.entries()) {\n const pkgName = getPackageName(dep);\n if (pkgName && workspaceMap.has(pkgName)) {\n deps.set(dep, metadata);\n }\n }\n\n // In `analyzeBundle` we output this file and we want to use that instead of the original entry file\n //const analyzedEntryFile = posix.join(process.cwd(), '.mastra', '.build', 'entry-0.mjs');\n\n const inputOptions = await getBundlerInputOptions(\n entryFile,\n {\n dependencies: deps,\n externalDependencies: new Set(),\n workspaceMap,\n },\n platform,\n env,\n { sourcemap, isDev: true, workspaceRoot, projectRoot },\n );\n\n if (Array.isArray(inputOptions.plugins)) {\n // filter out node-resolve plugin so all node_modules are external\n // and tsconfig-paths plugin as we are injection a custom one\n const plugins = [] as Plugin[];\n inputOptions.plugins.forEach(plugin => {\n if ((plugin as Plugin | undefined)?.name === 'node-resolve') {\n return;\n }\n\n if ((plugin as Plugin | undefined)?.name === 'tsconfig-paths') {\n plugins.push(\n tsConfigPaths({\n localResolve: true,\n }),\n );\n return;\n }\n\n plugins.push(plugin as Plugin);\n });\n\n inputOptions.plugins = plugins;\n inputOptions.plugins.push(aliasHono());\n // fixes imports like lodash/fp/get\n inputOptions.plugins.push(nodeModulesExtensionResolver());\n }\n\n return inputOptions;\n}\n\nexport async function createWatcher(inputOptions: InputOptions, outputOptions: OutputOptions) {\n const watcher = await watch({\n ...inputOptions,\n output: {\n ...outputOptions,\n format: 'esm',\n entryFileNames: '[name].mjs',\n chunkFileNames: '[name].mjs',\n },\n });\n\n return watcher;\n}\n","import { removeAllOptionsFromMastraExcept } from './remove-all-options-except';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function removeAllOptionsExceptServer(result: { hasCustomConfig: boolean }, logger?: IMastraLogger) {\n return removeAllOptionsFromMastraExcept(result, 'server', logger);\n}\n","import { removeAllOptionsExceptServer } from './babel/remove-all-options-server';\nimport type { Config } from '@mastra/core/mastra';\nimport { extractMastraOption, extractMastraOptionBundler } from './shared/extract-mastra-option';\nimport type { IMastraLogger } from '@mastra/core/logger';\n\nexport function getServerOptionsBundler(\n entryFile: string,\n result: {\n hasCustomConfig: false;\n },\n) {\n return extractMastraOptionBundler('server', entryFile, removeAllOptionsExceptServer, result);\n}\n\nexport async function getServerOptions(\n entryFile: string,\n outputDir: string,\n logger?: IMastraLogger,\n): Promise<Config['server'] | null> {\n const result = await extractMastraOption<Config['server']>(\n 'server',\n entryFile,\n removeAllOptionsExceptServer,\n outputDir,\n logger,\n );\n if (!result) {\n return null;\n }\n\n return result.getConfig();\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkEQZIOQE6_cjs = require('./chunk-EQZIOQE6.cjs');
|
|
4
|
+
var chunkVBZ7BDBX_cjs = require('./chunk-VBZ7BDBX.cjs');
|
|
5
5
|
var chunk3JYRSECU_cjs = require('./chunk-3JYRSECU.cjs');
|
|
6
6
|
|
|
7
7
|
// src/deploy/base.ts
|
|
8
|
-
var Deployer = class extends
|
|
8
|
+
var Deployer = class extends chunkEQZIOQE6_cjs.Bundler {
|
|
9
9
|
deps = new chunk3JYRSECU_cjs.DepsService();
|
|
10
10
|
constructor(args) {
|
|
11
11
|
super(args.name, "DEPLOYER");
|
|
@@ -25,12 +25,12 @@ var Deployer = class extends chunkLGC3GUMR_cjs.Bundler {
|
|
|
25
25
|
|
|
26
26
|
// src/build/babel/remove-all-options-deployer.ts
|
|
27
27
|
function removeAllOptionsExceptDeployer(result, logger) {
|
|
28
|
-
return
|
|
28
|
+
return chunkVBZ7BDBX_cjs.removeAllOptionsFromMastraExcept(result, "deployer", logger);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// src/build/deployer.ts
|
|
32
32
|
async function getDeployer(entryFile, outputDir, logger) {
|
|
33
|
-
const result = await
|
|
33
|
+
const result = await chunkVBZ7BDBX_cjs.extractMastraOption(
|
|
34
34
|
"deployer",
|
|
35
35
|
entryFile,
|
|
36
36
|
removeAllOptionsExceptDeployer,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
2
|
-
import { extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-DVNT3PD3.js';
|
|
2
|
+
import { extractMastraOption, removeAllOptionsFromMastraExcept } from './chunk-BJHDR4SR.js';
|
|
3
3
|
import { DepsService, FileService } from './chunk-5QFG6SCM.js';
|
|
4
4
|
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-5QFG6SCM.js';
|
|
5
5
|
|
|
@@ -4,7 +4,7 @@ export declare function getAgentCardByIdHandler(c: Context): Promise<Response &
|
|
|
4
4
|
extensions?: {
|
|
5
5
|
description?: string | undefined;
|
|
6
6
|
params?: {
|
|
7
|
-
[x: string]:
|
|
7
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
8
8
|
} | undefined;
|
|
9
9
|
required?: boolean | undefined;
|
|
10
10
|
uri: string;
|
|
@@ -93,10 +93,10 @@ export declare function getAgentsHandler(c: Context): Promise<Response & import(
|
|
|
93
93
|
};
|
|
94
94
|
}[] | undefined;
|
|
95
95
|
defaultGenerateOptions?: {
|
|
96
|
-
[x: string]:
|
|
96
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
97
97
|
} | undefined;
|
|
98
98
|
defaultStreamOptions?: {
|
|
99
|
-
[x: string]:
|
|
99
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
100
100
|
} | undefined;
|
|
101
101
|
};
|
|
102
102
|
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
|
|
@@ -192,10 +192,10 @@ export declare function getAgentByIdHandler(c: Context): Promise<Response & impo
|
|
|
192
192
|
};
|
|
193
193
|
}[] | undefined;
|
|
194
194
|
defaultGenerateOptions?: {
|
|
195
|
-
[x: string]:
|
|
195
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
196
196
|
} | undefined;
|
|
197
197
|
defaultStreamOptions?: {
|
|
198
|
-
[x: string]:
|
|
198
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
199
199
|
} | undefined;
|
|
200
200
|
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
|
|
201
201
|
export declare function getEvalsByAgentIdHandler(c: Context): Promise<Response & import("hono").TypedResponse<{
|
|
@@ -13,23 +13,23 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
13
13
|
readonly defaultObjectGenerationMode: "tool" | "json" | undefined;
|
|
14
14
|
readonly supportsImageUrls?: boolean | undefined;
|
|
15
15
|
readonly supportsStructuredOutputs?: boolean | undefined;
|
|
16
|
-
supportsUrl?:
|
|
17
|
-
doGenerate:
|
|
18
|
-
doStream:
|
|
16
|
+
supportsUrl?: undefined;
|
|
17
|
+
doGenerate: never;
|
|
18
|
+
doStream: never;
|
|
19
19
|
} | {
|
|
20
20
|
readonly specificationVersion: "v2";
|
|
21
21
|
readonly provider: string;
|
|
22
22
|
readonly modelId: string;
|
|
23
23
|
supportedUrls: {
|
|
24
24
|
[x: string]: {
|
|
25
|
-
exec:
|
|
26
|
-
test:
|
|
25
|
+
exec: never;
|
|
26
|
+
test: never;
|
|
27
27
|
readonly source: string;
|
|
28
28
|
readonly global: boolean;
|
|
29
29
|
readonly ignoreCase: boolean;
|
|
30
30
|
readonly multiline: boolean;
|
|
31
31
|
lastIndex: number;
|
|
32
|
-
compile:
|
|
32
|
+
compile: never;
|
|
33
33
|
readonly flags: string;
|
|
34
34
|
readonly sticky: boolean;
|
|
35
35
|
readonly unicode: boolean;
|
|
@@ -37,10 +37,10 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
37
37
|
readonly hasIndices: boolean;
|
|
38
38
|
}[];
|
|
39
39
|
} | {
|
|
40
|
-
then:
|
|
40
|
+
then: never;
|
|
41
41
|
};
|
|
42
|
-
doGenerate:
|
|
43
|
-
doStream:
|
|
42
|
+
doGenerate: never;
|
|
43
|
+
doStream: never;
|
|
44
44
|
} | {
|
|
45
45
|
id: `${string}/${string}`;
|
|
46
46
|
url?: string | undefined;
|
|
@@ -65,7 +65,7 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
65
65
|
readonly _output: any;
|
|
66
66
|
readonly _input: any;
|
|
67
67
|
readonly _def: {
|
|
68
|
-
errorMap?:
|
|
68
|
+
errorMap?: undefined;
|
|
69
69
|
description?: string | undefined | undefined;
|
|
70
70
|
};
|
|
71
71
|
readonly description: string | undefined;
|
|
@@ -77,34 +77,34 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
77
77
|
readonly output: any;
|
|
78
78
|
} | undefined;
|
|
79
79
|
};
|
|
80
|
-
_parse:
|
|
81
|
-
_getType:
|
|
82
|
-
_getOrReturnCtx:
|
|
83
|
-
_processInputParams:
|
|
84
|
-
_parseSync:
|
|
85
|
-
_parseAsync:
|
|
86
|
-
parse:
|
|
87
|
-
safeParse:
|
|
88
|
-
parseAsync:
|
|
89
|
-
safeParseAsync:
|
|
90
|
-
spa:
|
|
91
|
-
refine:
|
|
92
|
-
refinement:
|
|
93
|
-
_refinement:
|
|
94
|
-
superRefine:
|
|
95
|
-
or:
|
|
96
|
-
and:
|
|
97
|
-
transform:
|
|
98
|
-
brand:
|
|
99
|
-
describe:
|
|
100
|
-
pipe:
|
|
80
|
+
_parse: never;
|
|
81
|
+
_getType: never;
|
|
82
|
+
_getOrReturnCtx: never;
|
|
83
|
+
_processInputParams: never;
|
|
84
|
+
_parseSync: never;
|
|
85
|
+
_parseAsync: never;
|
|
86
|
+
parse: never;
|
|
87
|
+
safeParse: never;
|
|
88
|
+
parseAsync: never;
|
|
89
|
+
safeParseAsync: never;
|
|
90
|
+
spa: never;
|
|
91
|
+
refine: never;
|
|
92
|
+
refinement: never;
|
|
93
|
+
_refinement: never;
|
|
94
|
+
superRefine: never;
|
|
95
|
+
or: never;
|
|
96
|
+
and: never;
|
|
97
|
+
transform: never;
|
|
98
|
+
brand: never;
|
|
99
|
+
describe: never;
|
|
100
|
+
pipe: never;
|
|
101
101
|
};
|
|
102
102
|
output: {
|
|
103
103
|
readonly _type: any;
|
|
104
104
|
readonly _output: any;
|
|
105
105
|
readonly _input: any;
|
|
106
106
|
readonly _def: {
|
|
107
|
-
errorMap?:
|
|
107
|
+
errorMap?: undefined;
|
|
108
108
|
description?: string | undefined | undefined;
|
|
109
109
|
};
|
|
110
110
|
readonly description: string | undefined;
|
|
@@ -116,27 +116,27 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
116
116
|
readonly output: any;
|
|
117
117
|
} | undefined;
|
|
118
118
|
};
|
|
119
|
-
_parse:
|
|
120
|
-
_getType:
|
|
121
|
-
_getOrReturnCtx:
|
|
122
|
-
_processInputParams:
|
|
123
|
-
_parseSync:
|
|
124
|
-
_parseAsync:
|
|
125
|
-
parse:
|
|
126
|
-
safeParse:
|
|
127
|
-
parseAsync:
|
|
128
|
-
safeParseAsync:
|
|
129
|
-
spa:
|
|
130
|
-
refine:
|
|
131
|
-
refinement:
|
|
132
|
-
_refinement:
|
|
133
|
-
superRefine:
|
|
134
|
-
or:
|
|
135
|
-
and:
|
|
136
|
-
transform:
|
|
137
|
-
brand:
|
|
138
|
-
describe:
|
|
139
|
-
pipe:
|
|
119
|
+
_parse: never;
|
|
120
|
+
_getType: never;
|
|
121
|
+
_getOrReturnCtx: never;
|
|
122
|
+
_processInputParams: never;
|
|
123
|
+
_parseSync: never;
|
|
124
|
+
_parseAsync: never;
|
|
125
|
+
parse: never;
|
|
126
|
+
safeParse: never;
|
|
127
|
+
parseAsync: never;
|
|
128
|
+
safeParseAsync: never;
|
|
129
|
+
spa: never;
|
|
130
|
+
refine: never;
|
|
131
|
+
refinement: never;
|
|
132
|
+
_refinement: never;
|
|
133
|
+
superRefine: never;
|
|
134
|
+
or: never;
|
|
135
|
+
and: never;
|
|
136
|
+
transform: never;
|
|
137
|
+
brand: never;
|
|
138
|
+
describe: never;
|
|
139
|
+
pipe: never;
|
|
140
140
|
};
|
|
141
141
|
} | undefined;
|
|
142
142
|
};
|
|
@@ -146,7 +146,7 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
146
146
|
readonly _output: any;
|
|
147
147
|
readonly _input: any;
|
|
148
148
|
readonly _def: {
|
|
149
|
-
errorMap?:
|
|
149
|
+
errorMap?: undefined;
|
|
150
150
|
description?: string | undefined | undefined;
|
|
151
151
|
};
|
|
152
152
|
readonly description: string | undefined;
|
|
@@ -158,34 +158,34 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
158
158
|
readonly output: any;
|
|
159
159
|
} | undefined;
|
|
160
160
|
};
|
|
161
|
-
_parse:
|
|
162
|
-
_getType:
|
|
163
|
-
_getOrReturnCtx:
|
|
164
|
-
_processInputParams:
|
|
165
|
-
_parseSync:
|
|
166
|
-
_parseAsync:
|
|
167
|
-
parse:
|
|
168
|
-
safeParse:
|
|
169
|
-
parseAsync:
|
|
170
|
-
safeParseAsync:
|
|
171
|
-
spa:
|
|
172
|
-
refine:
|
|
173
|
-
refinement:
|
|
174
|
-
_refinement:
|
|
175
|
-
superRefine:
|
|
176
|
-
or:
|
|
177
|
-
and:
|
|
178
|
-
transform:
|
|
179
|
-
brand:
|
|
180
|
-
describe:
|
|
181
|
-
pipe:
|
|
161
|
+
_parse: never;
|
|
162
|
+
_getType: never;
|
|
163
|
+
_getOrReturnCtx: never;
|
|
164
|
+
_processInputParams: never;
|
|
165
|
+
_parseSync: never;
|
|
166
|
+
_parseAsync: never;
|
|
167
|
+
parse: never;
|
|
168
|
+
safeParse: never;
|
|
169
|
+
parseAsync: never;
|
|
170
|
+
safeParseAsync: never;
|
|
171
|
+
spa: never;
|
|
172
|
+
refine: never;
|
|
173
|
+
refinement: never;
|
|
174
|
+
_refinement: never;
|
|
175
|
+
superRefine: never;
|
|
176
|
+
or: never;
|
|
177
|
+
and: never;
|
|
178
|
+
transform: never;
|
|
179
|
+
brand: never;
|
|
180
|
+
describe: never;
|
|
181
|
+
pipe: never;
|
|
182
182
|
};
|
|
183
183
|
output: {
|
|
184
184
|
readonly _type: any;
|
|
185
185
|
readonly _output: any;
|
|
186
186
|
readonly _input: any;
|
|
187
187
|
readonly _def: {
|
|
188
|
-
errorMap?:
|
|
188
|
+
errorMap?: undefined;
|
|
189
189
|
description?: string | undefined | undefined;
|
|
190
190
|
};
|
|
191
191
|
readonly description: string | undefined;
|
|
@@ -197,27 +197,27 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
197
197
|
readonly output: any;
|
|
198
198
|
} | undefined;
|
|
199
199
|
};
|
|
200
|
-
_parse:
|
|
201
|
-
_getType:
|
|
202
|
-
_getOrReturnCtx:
|
|
203
|
-
_processInputParams:
|
|
204
|
-
_parseSync:
|
|
205
|
-
_parseAsync:
|
|
206
|
-
parse:
|
|
207
|
-
safeParse:
|
|
208
|
-
parseAsync:
|
|
209
|
-
safeParseAsync:
|
|
210
|
-
spa:
|
|
211
|
-
refine:
|
|
212
|
-
refinement:
|
|
213
|
-
_refinement:
|
|
214
|
-
superRefine:
|
|
215
|
-
or:
|
|
216
|
-
and:
|
|
217
|
-
transform:
|
|
218
|
-
brand:
|
|
219
|
-
describe:
|
|
220
|
-
pipe:
|
|
200
|
+
_parse: never;
|
|
201
|
+
_getType: never;
|
|
202
|
+
_getOrReturnCtx: never;
|
|
203
|
+
_processInputParams: never;
|
|
204
|
+
_parseSync: never;
|
|
205
|
+
_parseAsync: never;
|
|
206
|
+
parse: never;
|
|
207
|
+
safeParse: never;
|
|
208
|
+
parseAsync: never;
|
|
209
|
+
safeParseAsync: never;
|
|
210
|
+
spa: never;
|
|
211
|
+
refine: never;
|
|
212
|
+
refinement: never;
|
|
213
|
+
_refinement: never;
|
|
214
|
+
superRefine: never;
|
|
215
|
+
or: never;
|
|
216
|
+
and: never;
|
|
217
|
+
transform: never;
|
|
218
|
+
brand: never;
|
|
219
|
+
describe: never;
|
|
220
|
+
pipe: never;
|
|
221
221
|
};
|
|
222
222
|
} | undefined;
|
|
223
223
|
readonly name: any;
|
|
@@ -230,23 +230,23 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
230
230
|
readonly defaultObjectGenerationMode: "tool" | "json" | undefined;
|
|
231
231
|
readonly supportsImageUrls?: boolean | undefined;
|
|
232
232
|
readonly supportsStructuredOutputs?: boolean | undefined;
|
|
233
|
-
supportsUrl?:
|
|
234
|
-
doGenerate:
|
|
235
|
-
doStream:
|
|
233
|
+
supportsUrl?: undefined;
|
|
234
|
+
doGenerate: never;
|
|
235
|
+
doStream: never;
|
|
236
236
|
} | {
|
|
237
237
|
readonly specificationVersion: "v2";
|
|
238
238
|
readonly provider: string;
|
|
239
239
|
readonly modelId: string;
|
|
240
240
|
supportedUrls: {
|
|
241
241
|
[x: string]: {
|
|
242
|
-
exec:
|
|
243
|
-
test:
|
|
242
|
+
exec: never;
|
|
243
|
+
test: never;
|
|
244
244
|
readonly source: string;
|
|
245
245
|
readonly global: boolean;
|
|
246
246
|
readonly ignoreCase: boolean;
|
|
247
247
|
readonly multiline: boolean;
|
|
248
248
|
lastIndex: number;
|
|
249
|
-
compile:
|
|
249
|
+
compile: never;
|
|
250
250
|
readonly flags: string;
|
|
251
251
|
readonly sticky: boolean;
|
|
252
252
|
readonly unicode: boolean;
|
|
@@ -254,10 +254,10 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
254
254
|
readonly hasIndices: boolean;
|
|
255
255
|
}[];
|
|
256
256
|
} | {
|
|
257
|
-
then:
|
|
257
|
+
then: never;
|
|
258
258
|
};
|
|
259
|
-
doGenerate:
|
|
260
|
-
doStream:
|
|
259
|
+
doGenerate: never;
|
|
260
|
+
doStream: never;
|
|
261
261
|
} | {
|
|
262
262
|
id: `${string}/${string}`;
|
|
263
263
|
url?: string | undefined;
|
|
@@ -276,11 +276,11 @@ export declare function getScorerHandler(c: Context): Promise<Response & import(
|
|
|
276
276
|
};
|
|
277
277
|
instructions: string;
|
|
278
278
|
} | undefined;
|
|
279
|
-
preprocess:
|
|
280
|
-
analyze:
|
|
281
|
-
generateScore:
|
|
282
|
-
generateReason:
|
|
283
|
-
run:
|
|
279
|
+
preprocess: never;
|
|
280
|
+
analyze: never;
|
|
281
|
+
generateScore: never;
|
|
282
|
+
generateReason: never;
|
|
283
|
+
run: never;
|
|
284
284
|
};
|
|
285
285
|
sampling?: {
|
|
286
286
|
type: "none";
|
|
@@ -9,6 +9,8 @@ export declare function streamWorkflowHandler(c: Context): Promise<Response>;
|
|
|
9
9
|
export declare function observeStreamWorkflowHandler(c: Context): Promise<Response>;
|
|
10
10
|
export declare function streamVNextWorkflowHandler(c: Context): Promise<Response>;
|
|
11
11
|
export declare function observeStreamVNextWorkflowHandler(c: Context): Promise<Response>;
|
|
12
|
+
export declare function streamLegacyWorkflowHandler(c: Context): Promise<Response>;
|
|
13
|
+
export declare function observeStreamLegacyWorkflowHandler(c: Context): Promise<Response>;
|
|
12
14
|
export declare function resumeStreamWorkflowHandler(c: Context): Promise<Response>;
|
|
13
15
|
export declare function resumeAsyncWorkflowHandler(c: Context): Promise<Response>;
|
|
14
16
|
export declare function resumeWorkflowHandler(c: Context): Promise<Response>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/workflows/handlers.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAMpC,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,OAAO,qBAYnD;AAED,wBAAsB,sBAAsB,CAAC,CAAC,EAAE,OAAO,qBActD;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,qBAgBxD;AAED,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,OAAO,qBAqBzD;AAED,wBAAsB,uBAAuB,CAAC,CAAC,EAAE,OAAO,qBAqBvD;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,gCA4C9C;AAED,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/workflows/handlers.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAMpC,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,OAAO,qBAYnD;AAED,wBAAsB,sBAAsB,CAAC,CAAC,EAAE,OAAO,qBActD;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,qBAgBxD;AAED,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,OAAO,qBAqBzD;AAED,wBAAsB,uBAAuB,CAAC,CAAC,EAAE,OAAO,qBAqBvD;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,gCA4C9C;AAED,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,OAAO,qBAErD;AAED,wBAAsB,4BAA4B,CAAC,CAAC,EAAE,OAAO,qBAE5D;AAED,wBAAsB,0BAA0B,CAAC,CAAC,EAAE,OAAO,qBA8C1D;AAED,wBAAsB,iCAAiC,CAAC,CAAC,EAAE,OAAO,qBAwCjE;AAED,wBAAsB,2BAA2B,CAAC,CAAC,EAAE,OAAO,qBA8C3D;AAED,wBAAsB,kCAAkC,CAAC,CAAC,EAAE,OAAO,qBA6ClE;AAED,wBAAsB,2BAA2B,CAAC,CAAC,EAAE,OAAO,qBA6C3D;AAED,wBAAsB,0BAA0B,CAAC,CAAC,EAAE,OAAO,qBAyB1D;AAED,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,OAAO,qBAyBrD;AAED,wBAAsB,sBAAsB,CAAC,CAAC,EAAE,OAAO,qBAmBtD;AAED,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,OAAO,qBAezD;AAED,wBAAsB,oCAAoC,CAAC,CAAC,EAAE,OAAO,qBAepE;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,qBAgBxD;AAED,wBAAsB,2BAA2B,CAAC,CAAC,EAAE,OAAO,qBAmB3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/workflows/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAiCvD,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/server/handlers/routes/workflows/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAiCvD,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,8EA+kCjE"}
|