@mastra/deployer 1.11.0-alpha.2 → 1.12.0-alpha.0
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 +29 -0
- package/dist/build/index.cjs +9 -9
- package/dist/build/index.js +1 -1
- package/dist/bundler/index.cjs +3 -3
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-UNOJKELA.cjs → chunk-MEHKYO3L.cjs} +3 -7
- package/dist/chunk-MEHKYO3L.cjs.map +1 -0
- package/dist/{chunk-OKV47D7L.js → chunk-USX4L64H.js} +3 -7
- package/dist/chunk-USX4L64H.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/server/index.cjs +81 -13
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +81 -13
- package/dist/server/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-OKV47D7L.js.map +0 -1
- package/dist/chunk-UNOJKELA.cjs.map +0 -1
package/dist/server/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { __commonJS as __commonJS$2, require_token_error as require_token_error$
|
|
|
6
6
|
import { e } from '../chunk-Y4EKJFDF.js';
|
|
7
7
|
import { __export, __commonJS, __toESM as __toESM$2 } from '../chunk-J6I5L5KJ.js';
|
|
8
8
|
import { normalizeStudioBase, injectStudioHtmlConfig } from '../chunk-XN3FKMO6.js';
|
|
9
|
+
import { __require } from '../chunk-VUNV25KB.js';
|
|
9
10
|
import { mkdtemp, rm, readFile, writeFile, mkdir, copyFile, readdir, stat } from 'fs/promises';
|
|
10
11
|
import * as https from 'https';
|
|
11
12
|
import { join, resolve as resolve$1, dirname, extname, basename, isAbsolute, relative } from 'path';
|
|
@@ -1084,14 +1085,20 @@ function toStandardSchema(schema) {
|
|
|
1084
1085
|
return new AiSdkSchemaWrapper(schema);
|
|
1085
1086
|
}
|
|
1086
1087
|
|
|
1087
|
-
// ../schema-compat/dist/chunk-
|
|
1088
|
+
// ../schema-compat/dist/chunk-7D4SUZUM.js
|
|
1088
1089
|
var __create = Object.create;
|
|
1089
1090
|
var __defProp = Object.defineProperty;
|
|
1090
1091
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1091
1092
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1092
1093
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1093
1094
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1094
|
-
var
|
|
1095
|
+
var __require2 = /* @__PURE__ */ ((x) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
1096
|
+
get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
|
|
1097
|
+
}) : x)(function(x) {
|
|
1098
|
+
if (typeof __require !== "undefined") return __require.apply(this, arguments);
|
|
1099
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
1100
|
+
});
|
|
1101
|
+
var __commonJS5 = (cb, mod) => function __require22() {
|
|
1095
1102
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1096
1103
|
};
|
|
1097
1104
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -1111,7 +1118,7 @@ var __toESM5 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
1111
1118
|
mod
|
|
1112
1119
|
));
|
|
1113
1120
|
|
|
1114
|
-
// ../schema-compat/dist/chunk-
|
|
1121
|
+
// ../schema-compat/dist/chunk-ZJOSDYYG.js
|
|
1115
1122
|
var require_json_schema_traverse = __commonJS5({
|
|
1116
1123
|
"../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports$1, module) {
|
|
1117
1124
|
var traverse2 = module.exports = function(schema, opts, cb) {
|
|
@@ -1198,7 +1205,7 @@ var require_json_schema_traverse = __commonJS5({
|
|
|
1198
1205
|
}
|
|
1199
1206
|
});
|
|
1200
1207
|
|
|
1201
|
-
// ../schema-compat/dist/chunk-
|
|
1208
|
+
// ../schema-compat/dist/chunk-VJDHNYOU.js
|
|
1202
1209
|
var require_code = __commonJS5({
|
|
1203
1210
|
"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js"(exports$1) {
|
|
1204
1211
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
@@ -7511,7 +7518,7 @@ function toStandardSchema2(schema, options) {
|
|
|
7511
7518
|
return new JsonSchemaWrapper(schema, options);
|
|
7512
7519
|
}
|
|
7513
7520
|
|
|
7514
|
-
// ../schema-compat/dist/chunk-
|
|
7521
|
+
// ../schema-compat/dist/chunk-URB7FX4A.js
|
|
7515
7522
|
var import_json_schema_traverse2 = __toESM5(require_json_schema_traverse());
|
|
7516
7523
|
var TARGET_MAP = {
|
|
7517
7524
|
"draft-07": "jsonSchema7",
|
|
@@ -7565,6 +7572,61 @@ function toStandardSchema3(zodSchema5) {
|
|
|
7565
7572
|
});
|
|
7566
7573
|
return wrapper;
|
|
7567
7574
|
}
|
|
7575
|
+
var SUPPORTED_TARGETS = /* @__PURE__ */ new Set(["draft-07", "draft-04", "draft-2020-12"]);
|
|
7576
|
+
function convertToJsonSchema2(zodSchema5, options, adapterOptions) {
|
|
7577
|
+
const toJSONSchema2 = getToJSONSchema();
|
|
7578
|
+
if (!toJSONSchema2) {
|
|
7579
|
+
throw new Error("z.toJSONSchema is not available. Ensure zod >= 3.25.0 is installed.");
|
|
7580
|
+
}
|
|
7581
|
+
const target = SUPPORTED_TARGETS.has(options.target) ? options.target : "draft-07";
|
|
7582
|
+
const jsonSchemaOptions = {
|
|
7583
|
+
target
|
|
7584
|
+
};
|
|
7585
|
+
if (adapterOptions.unrepresentable) {
|
|
7586
|
+
jsonSchemaOptions.unrepresentable = adapterOptions.unrepresentable;
|
|
7587
|
+
}
|
|
7588
|
+
if (adapterOptions.override) {
|
|
7589
|
+
jsonSchemaOptions.override = adapterOptions.override;
|
|
7590
|
+
}
|
|
7591
|
+
return toJSONSchema2(zodSchema5, jsonSchemaOptions);
|
|
7592
|
+
}
|
|
7593
|
+
var _toJSONSchema = null;
|
|
7594
|
+
var _toJSONSchemaResolved = false;
|
|
7595
|
+
function getToJSONSchema() {
|
|
7596
|
+
if (_toJSONSchemaResolved) {
|
|
7597
|
+
return _toJSONSchema;
|
|
7598
|
+
}
|
|
7599
|
+
try {
|
|
7600
|
+
const zv4 = __require2("zod/v4");
|
|
7601
|
+
_toJSONSchema = typeof zv4.toJSONSchema === "function" ? zv4.toJSONSchema : null;
|
|
7602
|
+
} catch {
|
|
7603
|
+
_toJSONSchema = null;
|
|
7604
|
+
}
|
|
7605
|
+
_toJSONSchemaResolved = true;
|
|
7606
|
+
return _toJSONSchema;
|
|
7607
|
+
}
|
|
7608
|
+
function toStandardSchema4(zodSchema5, adapterOptions = {}) {
|
|
7609
|
+
const wrapper = Object.create(zodSchema5);
|
|
7610
|
+
const existingStandard = zodSchema5["~standard"];
|
|
7611
|
+
const jsonSchemaConverter = {
|
|
7612
|
+
input: (options) => {
|
|
7613
|
+
return convertToJsonSchema2(zodSchema5, options, adapterOptions);
|
|
7614
|
+
},
|
|
7615
|
+
output: (options) => {
|
|
7616
|
+
return convertToJsonSchema2(zodSchema5, options, adapterOptions);
|
|
7617
|
+
}
|
|
7618
|
+
};
|
|
7619
|
+
Object.defineProperty(wrapper, "~standard", {
|
|
7620
|
+
value: {
|
|
7621
|
+
...existingStandard,
|
|
7622
|
+
jsonSchema: jsonSchemaConverter
|
|
7623
|
+
},
|
|
7624
|
+
writable: false,
|
|
7625
|
+
enumerable: true,
|
|
7626
|
+
configurable: false
|
|
7627
|
+
});
|
|
7628
|
+
return wrapper;
|
|
7629
|
+
}
|
|
7568
7630
|
function jsonSchemaOverride(ctx) {
|
|
7569
7631
|
const zodSchema5 = ctx.zodSchema;
|
|
7570
7632
|
if (ctx.jsonSchema.type === "object" && ctx.jsonSchema.properties !== void 0 && !ctx.jsonSchema.additionalProperties) {
|
|
@@ -7605,10 +7667,16 @@ function isZodV3(schema) {
|
|
|
7605
7667
|
}
|
|
7606
7668
|
return schema instanceof z3.ZodType;
|
|
7607
7669
|
}
|
|
7608
|
-
function
|
|
7670
|
+
function toStandardSchema5(schema) {
|
|
7609
7671
|
if (isStandardSchemaWithJSON(schema)) {
|
|
7610
7672
|
return schema;
|
|
7611
7673
|
}
|
|
7674
|
+
if (isZodV4(schema)) {
|
|
7675
|
+
return toStandardSchema4(schema, {
|
|
7676
|
+
unrepresentable: JSON_SCHEMA_LIBRARY_OPTIONS.unrepresentable,
|
|
7677
|
+
override: JSON_SCHEMA_LIBRARY_OPTIONS.override
|
|
7678
|
+
});
|
|
7679
|
+
}
|
|
7612
7680
|
if (isZodV3(schema)) {
|
|
7613
7681
|
return toStandardSchema3(schema);
|
|
7614
7682
|
}
|
|
@@ -8436,7 +8504,7 @@ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(Super
|
|
|
8436
8504
|
var stringify = SuperJSON.stringify;
|
|
8437
8505
|
function schemaToJsonSchema(schema) {
|
|
8438
8506
|
if (!schema) return void 0;
|
|
8439
|
-
const standardSchema2 =
|
|
8507
|
+
const standardSchema2 = toStandardSchema5(schema);
|
|
8440
8508
|
return standardSchemaToJSONSchema(standardSchema2);
|
|
8441
8509
|
}
|
|
8442
8510
|
function normalizeRoutePath(path) {
|
|
@@ -8459,7 +8527,7 @@ function normalizeRoutePath(path) {
|
|
|
8459
8527
|
function looksLikeProcessorStepSchema(schema) {
|
|
8460
8528
|
if (!schema) return false;
|
|
8461
8529
|
try {
|
|
8462
|
-
const jsonSchema5 = standardSchemaToJSONSchema(
|
|
8530
|
+
const jsonSchema5 = standardSchemaToJSONSchema(toStandardSchema5(schema));
|
|
8463
8531
|
if (!jsonSchema5) return false;
|
|
8464
8532
|
const variants = jsonSchema5.anyOf || jsonSchema5.oneOf;
|
|
8465
8533
|
if (!variants || !Array.isArray(variants)) return false;
|
|
@@ -9211,7 +9279,7 @@ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
|
9211
9279
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
9212
9280
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
9213
9281
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
9214
|
-
var __commonJS6 = (cb, mod) => function
|
|
9282
|
+
var __commonJS6 = (cb, mod) => function __require22() {
|
|
9215
9283
|
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9216
9284
|
};
|
|
9217
9285
|
var __copyProps2 = (to, from, except, desc) => {
|
|
@@ -12822,7 +12890,7 @@ function schemaToJsonSchema2(schema) {
|
|
|
12822
12890
|
const standardSchema2 = toStandardSchema$1(schema);
|
|
12823
12891
|
return standardSchemaToJSONSchema(standardSchema2);
|
|
12824
12892
|
}
|
|
12825
|
-
function
|
|
12893
|
+
function convertToJsonSchema3(spec) {
|
|
12826
12894
|
const converted = {
|
|
12827
12895
|
summary: spec.summary,
|
|
12828
12896
|
description: spec.description,
|
|
@@ -12892,7 +12960,7 @@ function generateOpenAPIDocument(routes, info) {
|
|
|
12892
12960
|
if (!paths[openapiPath]) {
|
|
12893
12961
|
paths[openapiPath] = {};
|
|
12894
12962
|
}
|
|
12895
|
-
paths[openapiPath][route.method.toLowerCase()] =
|
|
12963
|
+
paths[openapiPath][route.method.toLowerCase()] = convertToJsonSchema3(route.openapi);
|
|
12896
12964
|
});
|
|
12897
12965
|
return {
|
|
12898
12966
|
openapi: "3.1.0",
|
|
@@ -27687,7 +27755,7 @@ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
|
27687
27755
|
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
27688
27756
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
27689
27757
|
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
27690
|
-
var __commonJS32 = (cb, mod) => function
|
|
27758
|
+
var __commonJS32 = (cb, mod) => function __require22() {
|
|
27691
27759
|
return mod || (0, cb[__getOwnPropNames3(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27692
27760
|
};
|
|
27693
27761
|
var __copyProps3 = (to, from, except, desc) => {
|
|
@@ -43586,7 +43654,7 @@ ${workingMemory}`;
|
|
|
43586
43654
|
if (isStandardSchemaWithJSON(schema)) {
|
|
43587
43655
|
convertedSchema = schema["~standard"].jsonSchema.output({ target: "draft-07" });
|
|
43588
43656
|
} else {
|
|
43589
|
-
const standardSchema2 =
|
|
43657
|
+
const standardSchema2 = toStandardSchema5(schema);
|
|
43590
43658
|
convertedSchema = standardSchema2["~standard"].jsonSchema.output({ target: "draft-07" });
|
|
43591
43659
|
}
|
|
43592
43660
|
return { format: "json", content: JSON.stringify(convertedSchema) };
|