@puddle-code/cli 0.3.8 → 0.3.10
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 +7 -5
- package/dist/host-control.mjs +288 -171
- package/dist/index.js +319 -200
- package/dist/public/assets/App-CNB4a07v.js +2 -0
- package/dist/public/assets/Dashboard-v3OproVW.js +1 -0
- package/dist/public/assets/EditorTabClose-DwhahpvS.js +1 -0
- package/dist/public/assets/FindWidget-CVH9U-_P.js +1 -0
- package/dist/public/assets/{LazyTerminal-CdXNqTZt.js → LazyTerminal-CgQryH0p.js} +2 -2
- package/dist/public/assets/{ModelRefcount-HPszadg6.js → ModelRefcount-njA_f4bS.js} +1 -1
- package/dist/public/assets/NewProjectDialog-BT8rR4yn.js +1 -0
- package/dist/public/assets/NotebookWidget-Cwd77EGL.js +7 -0
- package/dist/public/assets/PaneEditorBody-RaUBrZPu.js +303 -0
- package/dist/public/assets/PdfViewer-Bppu4-0-.js +2 -0
- package/dist/public/assets/SettingsDialog-CaHklYzG.js +8 -0
- package/dist/public/assets/{Terminal-CMOPxTVY.js → Terminal-_10Xyj1h.js} +5 -5
- package/dist/public/assets/Workspace-GgVr1uYN.js +20 -0
- package/dist/public/assets/_virtual_notebook-widget-runtime-Dro422xS.js +6966 -0
- package/dist/public/assets/api-i6xNY3bF.js +1 -0
- package/dist/public/assets/auth-GfOuXpIe.js +64 -0
- package/dist/public/assets/{buffer-store-Da5Z0NEV.js → buffer-store-eMnMxbpI.js} +1 -1
- package/dist/public/assets/{button-Chvl9hcE.js → button-BgeBH2Uc.js} +1 -1
- package/dist/public/assets/command-D7m0dmA-.js +1 -0
- package/dist/public/assets/context-DW21k43a.js +1 -0
- package/dist/public/assets/{context-menu-CnmULRW3.js → context-menu-CMWkmDu6.js} +1 -1
- package/dist/public/assets/copy-CGsu8426.js +1 -0
- package/dist/public/assets/dialog-BMWRC2HO.js +41 -0
- package/dist/public/assets/disclosure-CHXbNzgZ.js +1 -0
- package/dist/public/assets/dist-BOS6OKSE.js +1 -0
- package/dist/public/assets/dist-C_x5-hi8.js +1 -0
- package/dist/public/assets/{dist-BCwJL3w9.js → dist-Cde1E3eV.js} +1 -1
- package/dist/public/assets/{dist-DmyIHyF9.js → dist-Ds3438NL.js} +1 -1
- package/dist/public/assets/errors-O9DWXa3f.js +1 -0
- package/dist/public/assets/forward-link-RM7_5Shu.js +1 -0
- package/dist/public/assets/hotkeys-1uTWFYAL.js +1 -0
- package/dist/public/assets/index-CPHfr3MU.css +2 -0
- package/dist/public/assets/{index-BfBbMcnA.js → index-np8JXeG6.js} +3 -3
- package/dist/public/assets/input-CxgRsoVg.js +1 -0
- package/dist/public/assets/jsx-runtime-By8HlURe.js +1 -0
- package/dist/public/assets/{markdown-mermaid-CltyCx0-.js → markdown-mermaid-CNYDlgGt.js} +1 -1
- package/dist/public/assets/media-refresh-store-Bu4kWCGq.js +1 -0
- package/dist/public/assets/notification-delivery-Dfvdt_1U.js +1 -0
- package/dist/public/assets/{popover-CTPDNtFu.js → popover-CCHRaCvX.js} +1 -1
- package/dist/public/assets/preview-kind-DiWpvEc0.js +1 -0
- package/dist/public/assets/protocol-support-BGmIChNK.js +1 -0
- package/dist/public/assets/{jsx-runtime-ffCh33zF.js → react-dom-cJyBB_A4.js} +1 -1
- package/dist/public/assets/{scroll-restoration-hslkZdX5.js → scroll-restoration-OVgiE4G9.js} +1 -1
- package/dist/public/assets/select-Bg0rWqco.js +1 -0
- package/dist/public/assets/selection-actions-D875GPFU.js +1 -0
- package/dist/public/assets/{session-order-B9wDgtkQ.js → session-order-f7QxTbVD.js} +1 -1
- package/dist/public/assets/{switch-CeNFnG6w.js → switch-DhNyUV8C.js} +1 -1
- package/dist/public/assets/use-ui-state-CHqXhyx4.js +1 -0
- package/dist/public/assets/{ws-CT7jDKHs.js → ws-CMPCIzY4.js} +1 -1
- package/dist/public/index.html +5 -4
- package/dist/pudl.js +305 -188
- package/package.json +1 -1
- package/dist/public/assets/App-DldUYF2U.js +0 -2
- package/dist/public/assets/Dashboard-Bjrw6phb.js +0 -1
- package/dist/public/assets/EditorTabClose-BunNsUEz.js +0 -1
- package/dist/public/assets/FindWidget-BSK2PIfO.js +0 -1
- package/dist/public/assets/NewProjectDialog-BCtrjbMj.js +0 -1
- package/dist/public/assets/PaneEditorBody-KksboOhO.js +0 -302
- package/dist/public/assets/PdfViewer-CfWAV5F2.js +0 -2
- package/dist/public/assets/SettingsDialog-LIv4FuS1.js +0 -8
- package/dist/public/assets/Workspace-GWsJrLJW.js +0 -20
- package/dist/public/assets/auth-B4b-NPwe.js +0 -64
- package/dist/public/assets/copy-DD43yC2P.js +0 -1
- package/dist/public/assets/dialog-Bnex_wlx.js +0 -1
- package/dist/public/assets/disclosure-BQ-uiP85.js +0 -1
- package/dist/public/assets/dist-Cg-J2BAP.js +0 -1
- package/dist/public/assets/dist-Rswij5M_.js +0 -1
- package/dist/public/assets/errors-C-GJcBJ-.js +0 -1
- package/dist/public/assets/es2015-CrC2hHeB.js +0 -41
- package/dist/public/assets/index-BxtQ6WUO.css +0 -2
- package/dist/public/assets/input-Dx89yXF4.js +0 -1
- package/dist/public/assets/media-refresh-store-WCjZVi4Y.js +0 -1
- package/dist/public/assets/notification-delivery-vK2Y-rON.js +0 -1
- package/dist/public/assets/preview-kind-CJ9RTgbs.js +0 -1
- package/dist/public/assets/protocol-support-Q_1mBit9.js +0 -1
- package/dist/public/assets/select-iSqC2X51.js +0 -1
- package/dist/public/assets/selection-actions-Cith0Z9x.js +0 -1
- package/dist/public/assets/use-ui-state-xScqhALU.js +0 -1
package/dist/host-control.mjs
CHANGED
|
@@ -3099,42 +3099,42 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3099
3099
|
}
|
|
3100
3100
|
doc.write(`const newResult = {};`);
|
|
3101
3101
|
for (const key of normalized.keys) {
|
|
3102
|
-
const
|
|
3102
|
+
const id2 = ids[key];
|
|
3103
3103
|
const k = esc(key);
|
|
3104
3104
|
const schema = shape[key];
|
|
3105
3105
|
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3106
3106
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3107
|
-
doc.write(`const ${
|
|
3107
|
+
doc.write(`const ${id2} = ${parseStr(key)};`);
|
|
3108
3108
|
if (isOptionalIn && isOptionalOut) {
|
|
3109
3109
|
doc.write(`
|
|
3110
|
-
if (${
|
|
3110
|
+
if (${id2}.issues.length) {
|
|
3111
3111
|
if (${k} in input) {
|
|
3112
|
-
payload.issues = payload.issues.concat(${
|
|
3112
|
+
payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
|
|
3113
3113
|
...iss,
|
|
3114
3114
|
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3115
3115
|
})));
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
3118
|
|
|
3119
|
-
if (${
|
|
3119
|
+
if (${id2}.value === undefined) {
|
|
3120
3120
|
if (${k} in input) {
|
|
3121
3121
|
newResult[${k}] = undefined;
|
|
3122
3122
|
}
|
|
3123
3123
|
} else {
|
|
3124
|
-
newResult[${k}] = ${
|
|
3124
|
+
newResult[${k}] = ${id2}.value;
|
|
3125
3125
|
}
|
|
3126
3126
|
|
|
3127
3127
|
`);
|
|
3128
3128
|
} else if (!isOptionalIn) {
|
|
3129
3129
|
doc.write(`
|
|
3130
|
-
const ${
|
|
3131
|
-
if (${
|
|
3132
|
-
payload.issues = payload.issues.concat(${
|
|
3130
|
+
const ${id2}_present = ${k} in input;
|
|
3131
|
+
if (${id2}.issues.length) {
|
|
3132
|
+
payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
|
|
3133
3133
|
...iss,
|
|
3134
3134
|
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3135
3135
|
})));
|
|
3136
3136
|
}
|
|
3137
|
-
if (!${
|
|
3137
|
+
if (!${id2}_present && !${id2}.issues.length) {
|
|
3138
3138
|
payload.issues.push({
|
|
3139
3139
|
code: "invalid_type",
|
|
3140
3140
|
expected: "nonoptional",
|
|
@@ -3143,30 +3143,30 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3143
3143
|
});
|
|
3144
3144
|
}
|
|
3145
3145
|
|
|
3146
|
-
if (${
|
|
3147
|
-
if (${
|
|
3146
|
+
if (${id2}_present) {
|
|
3147
|
+
if (${id2}.value === undefined) {
|
|
3148
3148
|
newResult[${k}] = undefined;
|
|
3149
3149
|
} else {
|
|
3150
|
-
newResult[${k}] = ${
|
|
3150
|
+
newResult[${k}] = ${id2}.value;
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
3153
|
|
|
3154
3154
|
`);
|
|
3155
3155
|
} else {
|
|
3156
3156
|
doc.write(`
|
|
3157
|
-
if (${
|
|
3158
|
-
payload.issues = payload.issues.concat(${
|
|
3157
|
+
if (${id2}.issues.length) {
|
|
3158
|
+
payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
|
|
3159
3159
|
...iss,
|
|
3160
3160
|
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3161
3161
|
})));
|
|
3162
3162
|
}
|
|
3163
3163
|
|
|
3164
|
-
if (${
|
|
3164
|
+
if (${id2}.value === undefined) {
|
|
3165
3165
|
if (${k} in input) {
|
|
3166
3166
|
newResult[${k}] = undefined;
|
|
3167
3167
|
}
|
|
3168
3168
|
} else {
|
|
3169
|
-
newResult[${k}] = ${
|
|
3169
|
+
newResult[${k}] = ${id2}.value;
|
|
3170
3170
|
}
|
|
3171
3171
|
|
|
3172
3172
|
`);
|
|
@@ -11498,26 +11498,26 @@ function extractDefs(ctx, schema) {
|
|
|
11498
11498
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
11499
11499
|
const idToSchema = /* @__PURE__ */ new Map();
|
|
11500
11500
|
for (const entry of ctx.seen.entries()) {
|
|
11501
|
-
const
|
|
11502
|
-
if (
|
|
11503
|
-
const existing = idToSchema.get(
|
|
11501
|
+
const id2 = ctx.metadataRegistry.get(entry[0])?.id;
|
|
11502
|
+
if (id2) {
|
|
11503
|
+
const existing = idToSchema.get(id2);
|
|
11504
11504
|
if (existing && existing !== entry[0]) {
|
|
11505
|
-
throw new Error(`Duplicate schema id "${
|
|
11505
|
+
throw new Error(`Duplicate schema id "${id2}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
11506
11506
|
}
|
|
11507
|
-
idToSchema.set(
|
|
11507
|
+
idToSchema.set(id2, entry[0]);
|
|
11508
11508
|
}
|
|
11509
11509
|
}
|
|
11510
11510
|
const makeURI = (entry) => {
|
|
11511
11511
|
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
11512
11512
|
if (ctx.external) {
|
|
11513
11513
|
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
11514
|
-
const uriGenerator = ctx.external.uri ?? ((
|
|
11514
|
+
const uriGenerator = ctx.external.uri ?? ((id3) => id3);
|
|
11515
11515
|
if (externalId) {
|
|
11516
11516
|
return { ref: uriGenerator(externalId) };
|
|
11517
11517
|
}
|
|
11518
|
-
const
|
|
11519
|
-
entry[1].defId =
|
|
11520
|
-
return { defId:
|
|
11518
|
+
const id2 = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
11519
|
+
entry[1].defId = id2;
|
|
11520
|
+
return { defId: id2, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id2}` };
|
|
11521
11521
|
}
|
|
11522
11522
|
if (entry[1] === root) {
|
|
11523
11523
|
return { ref: "#" };
|
|
@@ -11565,8 +11565,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11565
11565
|
continue;
|
|
11566
11566
|
}
|
|
11567
11567
|
}
|
|
11568
|
-
const
|
|
11569
|
-
if (
|
|
11568
|
+
const id2 = ctx.metadataRegistry.get(entry[0])?.id;
|
|
11569
|
+
if (id2) {
|
|
11570
11570
|
extractToDef(entry);
|
|
11571
11571
|
continue;
|
|
11572
11572
|
}
|
|
@@ -11662,10 +11662,10 @@ function finalize(ctx, schema) {
|
|
|
11662
11662
|
} else {
|
|
11663
11663
|
}
|
|
11664
11664
|
if (ctx.external?.uri) {
|
|
11665
|
-
const
|
|
11666
|
-
if (!
|
|
11665
|
+
const id2 = ctx.external.registry.get(schema)?.id;
|
|
11666
|
+
if (!id2)
|
|
11667
11667
|
throw new Error("Schema is missing an `id` property");
|
|
11668
|
-
result.$id = ctx.external.uri(
|
|
11668
|
+
result.$id = ctx.external.uri(id2);
|
|
11669
11669
|
}
|
|
11670
11670
|
Object.assign(result, root.def ?? root.schema);
|
|
11671
11671
|
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
@@ -11785,29 +11785,29 @@ var formatMap = {
|
|
|
11785
11785
|
// do not set
|
|
11786
11786
|
};
|
|
11787
11787
|
var stringProcessor = (schema, ctx, _json, _params) => {
|
|
11788
|
-
const
|
|
11789
|
-
|
|
11788
|
+
const json3 = _json;
|
|
11789
|
+
json3.type = "string";
|
|
11790
11790
|
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
11791
11791
|
if (typeof minimum === "number")
|
|
11792
|
-
|
|
11792
|
+
json3.minLength = minimum;
|
|
11793
11793
|
if (typeof maximum === "number")
|
|
11794
|
-
|
|
11794
|
+
json3.maxLength = maximum;
|
|
11795
11795
|
if (format) {
|
|
11796
|
-
|
|
11797
|
-
if (
|
|
11798
|
-
delete
|
|
11796
|
+
json3.format = formatMap[format] ?? format;
|
|
11797
|
+
if (json3.format === "")
|
|
11798
|
+
delete json3.format;
|
|
11799
11799
|
if (format === "time") {
|
|
11800
|
-
delete
|
|
11800
|
+
delete json3.format;
|
|
11801
11801
|
}
|
|
11802
11802
|
}
|
|
11803
11803
|
if (contentEncoding)
|
|
11804
|
-
|
|
11804
|
+
json3.contentEncoding = contentEncoding;
|
|
11805
11805
|
if (patterns && patterns.size > 0) {
|
|
11806
11806
|
const regexes = [...patterns];
|
|
11807
11807
|
if (regexes.length === 1)
|
|
11808
|
-
|
|
11808
|
+
json3.pattern = regexes[0].source;
|
|
11809
11809
|
else if (regexes.length > 1) {
|
|
11810
|
-
|
|
11810
|
+
json3.allOf = [
|
|
11811
11811
|
...regexes.map((regex) => ({
|
|
11812
11812
|
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
11813
11813
|
pattern: regex.source
|
|
@@ -11817,40 +11817,40 @@ var stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
11817
11817
|
}
|
|
11818
11818
|
};
|
|
11819
11819
|
var numberProcessor = (schema, ctx, _json, _params) => {
|
|
11820
|
-
const
|
|
11820
|
+
const json3 = _json;
|
|
11821
11821
|
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
11822
11822
|
if (typeof format === "string" && format.includes("int"))
|
|
11823
|
-
|
|
11823
|
+
json3.type = "integer";
|
|
11824
11824
|
else
|
|
11825
|
-
|
|
11825
|
+
json3.type = "number";
|
|
11826
11826
|
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11827
11827
|
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11828
11828
|
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11829
11829
|
if (exMin) {
|
|
11830
11830
|
if (legacy) {
|
|
11831
|
-
|
|
11832
|
-
|
|
11831
|
+
json3.minimum = exclusiveMinimum;
|
|
11832
|
+
json3.exclusiveMinimum = true;
|
|
11833
11833
|
} else {
|
|
11834
|
-
|
|
11834
|
+
json3.exclusiveMinimum = exclusiveMinimum;
|
|
11835
11835
|
}
|
|
11836
11836
|
} else if (typeof minimum === "number") {
|
|
11837
|
-
|
|
11837
|
+
json3.minimum = minimum;
|
|
11838
11838
|
}
|
|
11839
11839
|
if (exMax) {
|
|
11840
11840
|
if (legacy) {
|
|
11841
|
-
|
|
11842
|
-
|
|
11841
|
+
json3.maximum = exclusiveMaximum;
|
|
11842
|
+
json3.exclusiveMaximum = true;
|
|
11843
11843
|
} else {
|
|
11844
|
-
|
|
11844
|
+
json3.exclusiveMaximum = exclusiveMaximum;
|
|
11845
11845
|
}
|
|
11846
11846
|
} else if (typeof maximum === "number") {
|
|
11847
|
-
|
|
11847
|
+
json3.maximum = maximum;
|
|
11848
11848
|
}
|
|
11849
11849
|
if (typeof multipleOf === "number")
|
|
11850
|
-
|
|
11850
|
+
json3.multipleOf = multipleOf;
|
|
11851
11851
|
};
|
|
11852
|
-
var booleanProcessor = (_schema, _ctx,
|
|
11853
|
-
|
|
11852
|
+
var booleanProcessor = (_schema, _ctx, json3, _params) => {
|
|
11853
|
+
json3.type = "boolean";
|
|
11854
11854
|
};
|
|
11855
11855
|
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
11856
11856
|
if (ctx.unrepresentable === "throw") {
|
|
@@ -11862,13 +11862,13 @@ var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
|
11862
11862
|
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
11863
11863
|
}
|
|
11864
11864
|
};
|
|
11865
|
-
var nullProcessor = (_schema, ctx,
|
|
11865
|
+
var nullProcessor = (_schema, ctx, json3, _params) => {
|
|
11866
11866
|
if (ctx.target === "openapi-3.0") {
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11867
|
+
json3.type = "string";
|
|
11868
|
+
json3.nullable = true;
|
|
11869
|
+
json3.enum = [null];
|
|
11870
11870
|
} else {
|
|
11871
|
-
|
|
11871
|
+
json3.type = "null";
|
|
11872
11872
|
}
|
|
11873
11873
|
};
|
|
11874
11874
|
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
@@ -11881,8 +11881,8 @@ var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
|
11881
11881
|
throw new Error("Void cannot be represented in JSON Schema");
|
|
11882
11882
|
}
|
|
11883
11883
|
};
|
|
11884
|
-
var neverProcessor = (_schema, _ctx,
|
|
11885
|
-
|
|
11884
|
+
var neverProcessor = (_schema, _ctx, json3, _params) => {
|
|
11885
|
+
json3.not = {};
|
|
11886
11886
|
};
|
|
11887
11887
|
var anyProcessor = (_schema, _ctx, _json, _params) => {
|
|
11888
11888
|
};
|
|
@@ -11893,16 +11893,16 @@ var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
|
11893
11893
|
throw new Error("Date cannot be represented in JSON Schema");
|
|
11894
11894
|
}
|
|
11895
11895
|
};
|
|
11896
|
-
var enumProcessor = (schema, _ctx,
|
|
11896
|
+
var enumProcessor = (schema, _ctx, json3, _params) => {
|
|
11897
11897
|
const def = schema._zod.def;
|
|
11898
11898
|
const values = getEnumValues(def.entries);
|
|
11899
11899
|
if (values.every((v) => typeof v === "number"))
|
|
11900
|
-
|
|
11900
|
+
json3.type = "number";
|
|
11901
11901
|
if (values.every((v) => typeof v === "string"))
|
|
11902
|
-
|
|
11903
|
-
|
|
11902
|
+
json3.type = "string";
|
|
11903
|
+
json3.enum = values;
|
|
11904
11904
|
};
|
|
11905
|
-
var literalProcessor = (schema, ctx,
|
|
11905
|
+
var literalProcessor = (schema, ctx, json3, _params) => {
|
|
11906
11906
|
const def = schema._zod.def;
|
|
11907
11907
|
const vals = [];
|
|
11908
11908
|
for (const val of def.values) {
|
|
@@ -11924,22 +11924,22 @@ var literalProcessor = (schema, ctx, json2, _params) => {
|
|
|
11924
11924
|
if (vals.length === 0) {
|
|
11925
11925
|
} else if (vals.length === 1) {
|
|
11926
11926
|
const val = vals[0];
|
|
11927
|
-
|
|
11927
|
+
json3.type = val === null ? "null" : typeof val;
|
|
11928
11928
|
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
11929
|
-
|
|
11929
|
+
json3.enum = [val];
|
|
11930
11930
|
} else {
|
|
11931
|
-
|
|
11931
|
+
json3.const = val;
|
|
11932
11932
|
}
|
|
11933
11933
|
} else {
|
|
11934
11934
|
if (vals.every((v) => typeof v === "number"))
|
|
11935
|
-
|
|
11935
|
+
json3.type = "number";
|
|
11936
11936
|
if (vals.every((v) => typeof v === "string"))
|
|
11937
|
-
|
|
11937
|
+
json3.type = "string";
|
|
11938
11938
|
if (vals.every((v) => typeof v === "boolean"))
|
|
11939
|
-
|
|
11939
|
+
json3.type = "boolean";
|
|
11940
11940
|
if (vals.every((v) => v === null))
|
|
11941
|
-
|
|
11942
|
-
|
|
11941
|
+
json3.type = "null";
|
|
11942
|
+
json3.enum = vals;
|
|
11943
11943
|
}
|
|
11944
11944
|
};
|
|
11945
11945
|
var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
@@ -11947,16 +11947,16 @@ var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
|
11947
11947
|
throw new Error("NaN cannot be represented in JSON Schema");
|
|
11948
11948
|
}
|
|
11949
11949
|
};
|
|
11950
|
-
var templateLiteralProcessor = (schema, _ctx,
|
|
11951
|
-
const _json =
|
|
11950
|
+
var templateLiteralProcessor = (schema, _ctx, json3, _params) => {
|
|
11951
|
+
const _json = json3;
|
|
11952
11952
|
const pattern = schema._zod.pattern;
|
|
11953
11953
|
if (!pattern)
|
|
11954
11954
|
throw new Error("Pattern not found in template literal");
|
|
11955
11955
|
_json.type = "string";
|
|
11956
11956
|
_json.pattern = pattern.source;
|
|
11957
11957
|
};
|
|
11958
|
-
var fileProcessor = (schema, _ctx,
|
|
11959
|
-
const _json =
|
|
11958
|
+
var fileProcessor = (schema, _ctx, json3, _params) => {
|
|
11959
|
+
const _json = json3;
|
|
11960
11960
|
const file2 = {
|
|
11961
11961
|
type: "string",
|
|
11962
11962
|
format: "binary",
|
|
@@ -11979,8 +11979,8 @@ var fileProcessor = (schema, _ctx, json2, _params) => {
|
|
|
11979
11979
|
Object.assign(_json, file2);
|
|
11980
11980
|
}
|
|
11981
11981
|
};
|
|
11982
|
-
var successProcessor = (_schema, _ctx,
|
|
11983
|
-
|
|
11982
|
+
var successProcessor = (_schema, _ctx, json3, _params) => {
|
|
11983
|
+
json3.type = "boolean";
|
|
11984
11984
|
};
|
|
11985
11985
|
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
11986
11986
|
if (ctx.unrepresentable === "throw") {
|
|
@@ -12008,27 +12008,27 @@ var setProcessor = (_schema, ctx, _json, _params) => {
|
|
|
12008
12008
|
}
|
|
12009
12009
|
};
|
|
12010
12010
|
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
12011
|
-
const
|
|
12011
|
+
const json3 = _json;
|
|
12012
12012
|
const def = schema._zod.def;
|
|
12013
12013
|
const { minimum, maximum } = schema._zod.bag;
|
|
12014
12014
|
if (typeof minimum === "number")
|
|
12015
|
-
|
|
12015
|
+
json3.minItems = minimum;
|
|
12016
12016
|
if (typeof maximum === "number")
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12017
|
+
json3.maxItems = maximum;
|
|
12018
|
+
json3.type = "array";
|
|
12019
|
+
json3.items = process2(def.element, ctx, {
|
|
12020
12020
|
...params,
|
|
12021
12021
|
path: [...params.path, "items"]
|
|
12022
12022
|
});
|
|
12023
12023
|
};
|
|
12024
12024
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
12025
|
-
const
|
|
12025
|
+
const json3 = _json;
|
|
12026
12026
|
const def = schema._zod.def;
|
|
12027
|
-
|
|
12028
|
-
|
|
12027
|
+
json3.type = "object";
|
|
12028
|
+
json3.properties = {};
|
|
12029
12029
|
const shape = def.shape;
|
|
12030
12030
|
for (const key in shape) {
|
|
12031
|
-
|
|
12031
|
+
json3.properties[key] = process2(shape[key], ctx, {
|
|
12032
12032
|
...params,
|
|
12033
12033
|
path: [...params.path, "properties", key]
|
|
12034
12034
|
});
|
|
@@ -12043,21 +12043,21 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
12043
12043
|
}
|
|
12044
12044
|
}));
|
|
12045
12045
|
if (requiredKeys.size > 0) {
|
|
12046
|
-
|
|
12046
|
+
json3.required = Array.from(requiredKeys);
|
|
12047
12047
|
}
|
|
12048
12048
|
if (def.catchall?._zod.def.type === "never") {
|
|
12049
|
-
|
|
12049
|
+
json3.additionalProperties = false;
|
|
12050
12050
|
} else if (!def.catchall) {
|
|
12051
12051
|
if (ctx.io === "output")
|
|
12052
|
-
|
|
12052
|
+
json3.additionalProperties = false;
|
|
12053
12053
|
} else if (def.catchall) {
|
|
12054
|
-
|
|
12054
|
+
json3.additionalProperties = process2(def.catchall, ctx, {
|
|
12055
12055
|
...params,
|
|
12056
12056
|
path: [...params.path, "additionalProperties"]
|
|
12057
12057
|
});
|
|
12058
12058
|
}
|
|
12059
12059
|
};
|
|
12060
|
-
var unionProcessor = (schema, ctx,
|
|
12060
|
+
var unionProcessor = (schema, ctx, json3, params) => {
|
|
12061
12061
|
const def = schema._zod.def;
|
|
12062
12062
|
const isExclusive = def.inclusive === false;
|
|
12063
12063
|
const options = def.options.map((x, i) => process2(x, ctx, {
|
|
@@ -12065,12 +12065,12 @@ var unionProcessor = (schema, ctx, json2, params) => {
|
|
|
12065
12065
|
path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
|
|
12066
12066
|
}));
|
|
12067
12067
|
if (isExclusive) {
|
|
12068
|
-
|
|
12068
|
+
json3.oneOf = options;
|
|
12069
12069
|
} else {
|
|
12070
|
-
|
|
12070
|
+
json3.anyOf = options;
|
|
12071
12071
|
}
|
|
12072
12072
|
};
|
|
12073
|
-
var intersectionProcessor = (schema, ctx,
|
|
12073
|
+
var intersectionProcessor = (schema, ctx, json3, params) => {
|
|
12074
12074
|
const def = schema._zod.def;
|
|
12075
12075
|
const a = process2(def.left, ctx, {
|
|
12076
12076
|
...params,
|
|
@@ -12085,12 +12085,12 @@ var intersectionProcessor = (schema, ctx, json2, params) => {
|
|
|
12085
12085
|
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
12086
12086
|
...isSimpleIntersection(b) ? b.allOf : [b]
|
|
12087
12087
|
];
|
|
12088
|
-
|
|
12088
|
+
json3.allOf = allOf;
|
|
12089
12089
|
};
|
|
12090
12090
|
var tupleProcessor = (schema, ctx, _json, params) => {
|
|
12091
|
-
const
|
|
12091
|
+
const json3 = _json;
|
|
12092
12092
|
const def = schema._zod.def;
|
|
12093
|
-
|
|
12093
|
+
json3.type = "array";
|
|
12094
12094
|
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
12095
12095
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
12096
12096
|
const prefixItems = def.items.map((x, i) => process2(x, ctx, {
|
|
@@ -12102,37 +12102,37 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
12102
12102
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
12103
12103
|
}) : null;
|
|
12104
12104
|
if (ctx.target === "draft-2020-12") {
|
|
12105
|
-
|
|
12105
|
+
json3.prefixItems = prefixItems;
|
|
12106
12106
|
if (rest) {
|
|
12107
|
-
|
|
12107
|
+
json3.items = rest;
|
|
12108
12108
|
}
|
|
12109
12109
|
} else if (ctx.target === "openapi-3.0") {
|
|
12110
|
-
|
|
12110
|
+
json3.items = {
|
|
12111
12111
|
anyOf: prefixItems
|
|
12112
12112
|
};
|
|
12113
12113
|
if (rest) {
|
|
12114
|
-
|
|
12114
|
+
json3.items.anyOf.push(rest);
|
|
12115
12115
|
}
|
|
12116
|
-
|
|
12116
|
+
json3.minItems = prefixItems.length;
|
|
12117
12117
|
if (!rest) {
|
|
12118
|
-
|
|
12118
|
+
json3.maxItems = prefixItems.length;
|
|
12119
12119
|
}
|
|
12120
12120
|
} else {
|
|
12121
|
-
|
|
12121
|
+
json3.items = prefixItems;
|
|
12122
12122
|
if (rest) {
|
|
12123
|
-
|
|
12123
|
+
json3.additionalItems = rest;
|
|
12124
12124
|
}
|
|
12125
12125
|
}
|
|
12126
12126
|
const { minimum, maximum } = schema._zod.bag;
|
|
12127
12127
|
if (typeof minimum === "number")
|
|
12128
|
-
|
|
12128
|
+
json3.minItems = minimum;
|
|
12129
12129
|
if (typeof maximum === "number")
|
|
12130
|
-
|
|
12130
|
+
json3.maxItems = maximum;
|
|
12131
12131
|
};
|
|
12132
12132
|
var recordProcessor = (schema, ctx, _json, params) => {
|
|
12133
|
-
const
|
|
12133
|
+
const json3 = _json;
|
|
12134
12134
|
const def = schema._zod.def;
|
|
12135
|
-
|
|
12135
|
+
json3.type = "object";
|
|
12136
12136
|
const keyType = def.keyType;
|
|
12137
12137
|
const keyBag = keyType._zod.bag;
|
|
12138
12138
|
const patterns = keyBag?.patterns;
|
|
@@ -12141,18 +12141,18 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
12141
12141
|
...params,
|
|
12142
12142
|
path: [...params.path, "patternProperties", "*"]
|
|
12143
12143
|
});
|
|
12144
|
-
|
|
12144
|
+
json3.patternProperties = {};
|
|
12145
12145
|
for (const pattern of patterns) {
|
|
12146
|
-
|
|
12146
|
+
json3.patternProperties[pattern.source] = valueSchema;
|
|
12147
12147
|
}
|
|
12148
12148
|
} else {
|
|
12149
12149
|
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
|
|
12150
|
-
|
|
12150
|
+
json3.propertyNames = process2(def.keyType, ctx, {
|
|
12151
12151
|
...params,
|
|
12152
12152
|
path: [...params.path, "propertyNames"]
|
|
12153
12153
|
});
|
|
12154
12154
|
}
|
|
12155
|
-
|
|
12155
|
+
json3.additionalProperties = process2(def.valueType, ctx, {
|
|
12156
12156
|
...params,
|
|
12157
12157
|
path: [...params.path, "additionalProperties"]
|
|
12158
12158
|
});
|
|
@@ -12161,19 +12161,19 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
12161
12161
|
if (keyValues) {
|
|
12162
12162
|
const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
|
|
12163
12163
|
if (validKeyValues.length > 0) {
|
|
12164
|
-
|
|
12164
|
+
json3.required = validKeyValues;
|
|
12165
12165
|
}
|
|
12166
12166
|
}
|
|
12167
12167
|
};
|
|
12168
|
-
var nullableProcessor = (schema, ctx,
|
|
12168
|
+
var nullableProcessor = (schema, ctx, json3, params) => {
|
|
12169
12169
|
const def = schema._zod.def;
|
|
12170
12170
|
const inner = process2(def.innerType, ctx, params);
|
|
12171
12171
|
const seen = ctx.seen.get(schema);
|
|
12172
12172
|
if (ctx.target === "openapi-3.0") {
|
|
12173
12173
|
seen.ref = def.innerType;
|
|
12174
|
-
|
|
12174
|
+
json3.nullable = true;
|
|
12175
12175
|
} else {
|
|
12176
|
-
|
|
12176
|
+
json3.anyOf = [inner, { type: "null" }];
|
|
12177
12177
|
}
|
|
12178
12178
|
};
|
|
12179
12179
|
var nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
@@ -12182,22 +12182,22 @@ var nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
|
12182
12182
|
const seen = ctx.seen.get(schema);
|
|
12183
12183
|
seen.ref = def.innerType;
|
|
12184
12184
|
};
|
|
12185
|
-
var defaultProcessor = (schema, ctx,
|
|
12185
|
+
var defaultProcessor = (schema, ctx, json3, params) => {
|
|
12186
12186
|
const def = schema._zod.def;
|
|
12187
12187
|
process2(def.innerType, ctx, params);
|
|
12188
12188
|
const seen = ctx.seen.get(schema);
|
|
12189
12189
|
seen.ref = def.innerType;
|
|
12190
|
-
|
|
12190
|
+
json3.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
12191
12191
|
};
|
|
12192
|
-
var prefaultProcessor = (schema, ctx,
|
|
12192
|
+
var prefaultProcessor = (schema, ctx, json3, params) => {
|
|
12193
12193
|
const def = schema._zod.def;
|
|
12194
12194
|
process2(def.innerType, ctx, params);
|
|
12195
12195
|
const seen = ctx.seen.get(schema);
|
|
12196
12196
|
seen.ref = def.innerType;
|
|
12197
12197
|
if (ctx.io === "input")
|
|
12198
|
-
|
|
12198
|
+
json3._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
12199
12199
|
};
|
|
12200
|
-
var catchProcessor = (schema, ctx,
|
|
12200
|
+
var catchProcessor = (schema, ctx, json3, params) => {
|
|
12201
12201
|
const def = schema._zod.def;
|
|
12202
12202
|
process2(def.innerType, ctx, params);
|
|
12203
12203
|
const seen = ctx.seen.get(schema);
|
|
@@ -12208,7 +12208,7 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
12208
12208
|
} catch {
|
|
12209
12209
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
12210
12210
|
}
|
|
12211
|
-
|
|
12211
|
+
json3.default = catchValue;
|
|
12212
12212
|
};
|
|
12213
12213
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12214
12214
|
const def = schema._zod.def;
|
|
@@ -12218,12 +12218,12 @@ var pipeProcessor = (schema, ctx, _json, params) => {
|
|
|
12218
12218
|
const seen = ctx.seen.get(schema);
|
|
12219
12219
|
seen.ref = innerType;
|
|
12220
12220
|
};
|
|
12221
|
-
var readonlyProcessor = (schema, ctx,
|
|
12221
|
+
var readonlyProcessor = (schema, ctx, json3, params) => {
|
|
12222
12222
|
const def = schema._zod.def;
|
|
12223
12223
|
process2(def.innerType, ctx, params);
|
|
12224
12224
|
const seen = ctx.seen.get(schema);
|
|
12225
12225
|
seen.ref = def.innerType;
|
|
12226
|
-
|
|
12226
|
+
json3.readOnly = true;
|
|
12227
12227
|
};
|
|
12228
12228
|
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
12229
12229
|
const def = schema._zod.def;
|
|
@@ -12867,7 +12867,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12867
12867
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
12868
12868
|
$ZodString.init(inst, def);
|
|
12869
12869
|
ZodType.init(inst, def);
|
|
12870
|
-
inst._zod.processJSONSchema = (ctx,
|
|
12870
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => stringProcessor(inst, ctx, json3, params);
|
|
12871
12871
|
const bag = inst._zod.bag;
|
|
12872
12872
|
inst.format = bag.format ?? null;
|
|
12873
12873
|
inst.minLength = bag.minimum ?? null;
|
|
@@ -13138,7 +13138,7 @@ function hash(alg, params) {
|
|
|
13138
13138
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
13139
13139
|
$ZodNumber.init(inst, def);
|
|
13140
13140
|
ZodType.init(inst, def);
|
|
13141
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13141
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => numberProcessor(inst, ctx, json3, params);
|
|
13142
13142
|
_installLazyMethods(inst, "ZodNumber", {
|
|
13143
13143
|
gt(value, params) {
|
|
13144
13144
|
return this.check(_gt(value, params));
|
|
@@ -13218,7 +13218,7 @@ function uint32(params) {
|
|
|
13218
13218
|
var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
13219
13219
|
$ZodBoolean.init(inst, def);
|
|
13220
13220
|
ZodType.init(inst, def);
|
|
13221
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13221
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => booleanProcessor(inst, ctx, json3, params);
|
|
13222
13222
|
});
|
|
13223
13223
|
function boolean2(params) {
|
|
13224
13224
|
return _boolean(ZodBoolean, params);
|
|
@@ -13226,7 +13226,7 @@ function boolean2(params) {
|
|
|
13226
13226
|
var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
13227
13227
|
$ZodBigInt.init(inst, def);
|
|
13228
13228
|
ZodType.init(inst, def);
|
|
13229
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13229
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => bigintProcessor(inst, ctx, json3, params);
|
|
13230
13230
|
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
13231
13231
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
13232
13232
|
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
@@ -13261,7 +13261,7 @@ function uint64(params) {
|
|
|
13261
13261
|
var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
13262
13262
|
$ZodSymbol.init(inst, def);
|
|
13263
13263
|
ZodType.init(inst, def);
|
|
13264
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13264
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => symbolProcessor(inst, ctx, json3, params);
|
|
13265
13265
|
});
|
|
13266
13266
|
function symbol(params) {
|
|
13267
13267
|
return _symbol(ZodSymbol, params);
|
|
@@ -13269,7 +13269,7 @@ function symbol(params) {
|
|
|
13269
13269
|
var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
|
|
13270
13270
|
$ZodUndefined.init(inst, def);
|
|
13271
13271
|
ZodType.init(inst, def);
|
|
13272
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13272
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => undefinedProcessor(inst, ctx, json3, params);
|
|
13273
13273
|
});
|
|
13274
13274
|
function _undefined3(params) {
|
|
13275
13275
|
return _undefined2(ZodUndefined, params);
|
|
@@ -13277,7 +13277,7 @@ function _undefined3(params) {
|
|
|
13277
13277
|
var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
13278
13278
|
$ZodNull.init(inst, def);
|
|
13279
13279
|
ZodType.init(inst, def);
|
|
13280
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13280
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => nullProcessor(inst, ctx, json3, params);
|
|
13281
13281
|
});
|
|
13282
13282
|
function _null3(params) {
|
|
13283
13283
|
return _null2(ZodNull, params);
|
|
@@ -13285,7 +13285,7 @@ function _null3(params) {
|
|
|
13285
13285
|
var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
13286
13286
|
$ZodAny.init(inst, def);
|
|
13287
13287
|
ZodType.init(inst, def);
|
|
13288
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13288
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => anyProcessor(inst, ctx, json3, params);
|
|
13289
13289
|
});
|
|
13290
13290
|
function any() {
|
|
13291
13291
|
return _any(ZodAny);
|
|
@@ -13293,7 +13293,7 @@ function any() {
|
|
|
13293
13293
|
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
13294
13294
|
$ZodUnknown.init(inst, def);
|
|
13295
13295
|
ZodType.init(inst, def);
|
|
13296
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13296
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => unknownProcessor(inst, ctx, json3, params);
|
|
13297
13297
|
});
|
|
13298
13298
|
function unknown() {
|
|
13299
13299
|
return _unknown(ZodUnknown);
|
|
@@ -13301,7 +13301,7 @@ function unknown() {
|
|
|
13301
13301
|
var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
13302
13302
|
$ZodNever.init(inst, def);
|
|
13303
13303
|
ZodType.init(inst, def);
|
|
13304
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13304
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => neverProcessor(inst, ctx, json3, params);
|
|
13305
13305
|
});
|
|
13306
13306
|
function never(params) {
|
|
13307
13307
|
return _never(ZodNever, params);
|
|
@@ -13309,7 +13309,7 @@ function never(params) {
|
|
|
13309
13309
|
var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
13310
13310
|
$ZodVoid.init(inst, def);
|
|
13311
13311
|
ZodType.init(inst, def);
|
|
13312
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13312
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => voidProcessor(inst, ctx, json3, params);
|
|
13313
13313
|
});
|
|
13314
13314
|
function _void2(params) {
|
|
13315
13315
|
return _void(ZodVoid, params);
|
|
@@ -13317,7 +13317,7 @@ function _void2(params) {
|
|
|
13317
13317
|
var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
13318
13318
|
$ZodDate.init(inst, def);
|
|
13319
13319
|
ZodType.init(inst, def);
|
|
13320
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13320
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => dateProcessor(inst, ctx, json3, params);
|
|
13321
13321
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
13322
13322
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
13323
13323
|
const c = inst._zod.bag;
|
|
@@ -13330,7 +13330,7 @@ function date3(params) {
|
|
|
13330
13330
|
var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
13331
13331
|
$ZodArray.init(inst, def);
|
|
13332
13332
|
ZodType.init(inst, def);
|
|
13333
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13333
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => arrayProcessor(inst, ctx, json3, params);
|
|
13334
13334
|
inst.element = def.element;
|
|
13335
13335
|
_installLazyMethods(inst, "ZodArray", {
|
|
13336
13336
|
min(n, params) {
|
|
@@ -13360,7 +13360,7 @@ function keyof(schema) {
|
|
|
13360
13360
|
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
13361
13361
|
$ZodObjectJIT.init(inst, def);
|
|
13362
13362
|
ZodType.init(inst, def);
|
|
13363
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13363
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => objectProcessor(inst, ctx, json3, params);
|
|
13364
13364
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13365
13365
|
return def.shape;
|
|
13366
13366
|
});
|
|
@@ -13433,7 +13433,7 @@ function looseObject(shape, params) {
|
|
|
13433
13433
|
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
13434
13434
|
$ZodUnion.init(inst, def);
|
|
13435
13435
|
ZodType.init(inst, def);
|
|
13436
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13436
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor(inst, ctx, json3, params);
|
|
13437
13437
|
inst.options = def.options;
|
|
13438
13438
|
});
|
|
13439
13439
|
function union(options, params) {
|
|
@@ -13446,7 +13446,7 @@ function union(options, params) {
|
|
|
13446
13446
|
var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
|
|
13447
13447
|
ZodUnion.init(inst, def);
|
|
13448
13448
|
$ZodXor.init(inst, def);
|
|
13449
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13449
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor(inst, ctx, json3, params);
|
|
13450
13450
|
inst.options = def.options;
|
|
13451
13451
|
});
|
|
13452
13452
|
function xor(options, params) {
|
|
@@ -13472,7 +13472,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
13472
13472
|
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
13473
13473
|
$ZodIntersection.init(inst, def);
|
|
13474
13474
|
ZodType.init(inst, def);
|
|
13475
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13475
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor(inst, ctx, json3, params);
|
|
13476
13476
|
});
|
|
13477
13477
|
function intersection(left, right) {
|
|
13478
13478
|
return new ZodIntersection({
|
|
@@ -13484,7 +13484,7 @@ function intersection(left, right) {
|
|
|
13484
13484
|
var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
13485
13485
|
$ZodTuple.init(inst, def);
|
|
13486
13486
|
ZodType.init(inst, def);
|
|
13487
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13487
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor(inst, ctx, json3, params);
|
|
13488
13488
|
inst.rest = (rest) => inst.clone({
|
|
13489
13489
|
...inst._zod.def,
|
|
13490
13490
|
rest
|
|
@@ -13504,7 +13504,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
13504
13504
|
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
13505
13505
|
$ZodRecord.init(inst, def);
|
|
13506
13506
|
ZodType.init(inst, def);
|
|
13507
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13507
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => recordProcessor(inst, ctx, json3, params);
|
|
13508
13508
|
inst.keyType = def.keyType;
|
|
13509
13509
|
inst.valueType = def.valueType;
|
|
13510
13510
|
});
|
|
@@ -13546,7 +13546,7 @@ function looseRecord(keyType, valueType, params) {
|
|
|
13546
13546
|
var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
|
|
13547
13547
|
$ZodMap.init(inst, def);
|
|
13548
13548
|
ZodType.init(inst, def);
|
|
13549
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13549
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => mapProcessor(inst, ctx, json3, params);
|
|
13550
13550
|
inst.keyType = def.keyType;
|
|
13551
13551
|
inst.valueType = def.valueType;
|
|
13552
13552
|
inst.min = (...args) => inst.check(_minSize(...args));
|
|
@@ -13565,7 +13565,7 @@ function map(keyType, valueType, params) {
|
|
|
13565
13565
|
var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
|
|
13566
13566
|
$ZodSet.init(inst, def);
|
|
13567
13567
|
ZodType.init(inst, def);
|
|
13568
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13568
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => setProcessor(inst, ctx, json3, params);
|
|
13569
13569
|
inst.min = (...args) => inst.check(_minSize(...args));
|
|
13570
13570
|
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
13571
13571
|
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
@@ -13581,7 +13581,7 @@ function set(valueType, params) {
|
|
|
13581
13581
|
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
13582
13582
|
$ZodEnum.init(inst, def);
|
|
13583
13583
|
ZodType.init(inst, def);
|
|
13584
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13584
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => enumProcessor(inst, ctx, json3, params);
|
|
13585
13585
|
inst.enum = def.entries;
|
|
13586
13586
|
inst.options = Object.values(def.entries);
|
|
13587
13587
|
const keys = new Set(Object.keys(def.entries));
|
|
@@ -13634,7 +13634,7 @@ function nativeEnum(entries, params) {
|
|
|
13634
13634
|
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
13635
13635
|
$ZodLiteral.init(inst, def);
|
|
13636
13636
|
ZodType.init(inst, def);
|
|
13637
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13637
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => literalProcessor(inst, ctx, json3, params);
|
|
13638
13638
|
inst.values = new Set(def.values);
|
|
13639
13639
|
Object.defineProperty(inst, "value", {
|
|
13640
13640
|
get() {
|
|
@@ -13655,7 +13655,7 @@ function literal(value, params) {
|
|
|
13655
13655
|
var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
13656
13656
|
$ZodFile.init(inst, def);
|
|
13657
13657
|
ZodType.init(inst, def);
|
|
13658
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13658
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => fileProcessor(inst, ctx, json3, params);
|
|
13659
13659
|
inst.min = (size, params) => inst.check(_minSize(size, params));
|
|
13660
13660
|
inst.max = (size, params) => inst.check(_maxSize(size, params));
|
|
13661
13661
|
inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
|
|
@@ -13666,7 +13666,7 @@ function file(params) {
|
|
|
13666
13666
|
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
13667
13667
|
$ZodTransform.init(inst, def);
|
|
13668
13668
|
ZodType.init(inst, def);
|
|
13669
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13669
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => transformProcessor(inst, ctx, json3, params);
|
|
13670
13670
|
inst._zod.parse = (payload, _ctx) => {
|
|
13671
13671
|
if (_ctx.direction === "backward") {
|
|
13672
13672
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -13706,7 +13706,7 @@ function transform(fn) {
|
|
|
13706
13706
|
var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
13707
13707
|
$ZodOptional.init(inst, def);
|
|
13708
13708
|
ZodType.init(inst, def);
|
|
13709
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13709
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor(inst, ctx, json3, params);
|
|
13710
13710
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13711
13711
|
});
|
|
13712
13712
|
function optional(innerType) {
|
|
@@ -13718,7 +13718,7 @@ function optional(innerType) {
|
|
|
13718
13718
|
var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
|
|
13719
13719
|
$ZodExactOptional.init(inst, def);
|
|
13720
13720
|
ZodType.init(inst, def);
|
|
13721
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13721
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor(inst, ctx, json3, params);
|
|
13722
13722
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13723
13723
|
});
|
|
13724
13724
|
function exactOptional(innerType) {
|
|
@@ -13730,7 +13730,7 @@ function exactOptional(innerType) {
|
|
|
13730
13730
|
var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
|
|
13731
13731
|
$ZodNullable.init(inst, def);
|
|
13732
13732
|
ZodType.init(inst, def);
|
|
13733
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13733
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => nullableProcessor(inst, ctx, json3, params);
|
|
13734
13734
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13735
13735
|
});
|
|
13736
13736
|
function nullable(innerType) {
|
|
@@ -13745,7 +13745,7 @@ function nullish2(innerType) {
|
|
|
13745
13745
|
var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
|
|
13746
13746
|
$ZodDefault.init(inst, def);
|
|
13747
13747
|
ZodType.init(inst, def);
|
|
13748
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13748
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => defaultProcessor(inst, ctx, json3, params);
|
|
13749
13749
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13750
13750
|
inst.removeDefault = inst.unwrap;
|
|
13751
13751
|
});
|
|
@@ -13761,7 +13761,7 @@ function _default2(innerType, defaultValue) {
|
|
|
13761
13761
|
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
|
|
13762
13762
|
$ZodPrefault.init(inst, def);
|
|
13763
13763
|
ZodType.init(inst, def);
|
|
13764
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13764
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => prefaultProcessor(inst, ctx, json3, params);
|
|
13765
13765
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13766
13766
|
});
|
|
13767
13767
|
function prefault(innerType, defaultValue) {
|
|
@@ -13776,7 +13776,7 @@ function prefault(innerType, defaultValue) {
|
|
|
13776
13776
|
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
|
|
13777
13777
|
$ZodNonOptional.init(inst, def);
|
|
13778
13778
|
ZodType.init(inst, def);
|
|
13779
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13779
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => nonoptionalProcessor(inst, ctx, json3, params);
|
|
13780
13780
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13781
13781
|
});
|
|
13782
13782
|
function nonoptional(innerType, params) {
|
|
@@ -13789,7 +13789,7 @@ function nonoptional(innerType, params) {
|
|
|
13789
13789
|
var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
|
|
13790
13790
|
$ZodSuccess.init(inst, def);
|
|
13791
13791
|
ZodType.init(inst, def);
|
|
13792
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13792
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => successProcessor(inst, ctx, json3, params);
|
|
13793
13793
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13794
13794
|
});
|
|
13795
13795
|
function success(innerType) {
|
|
@@ -13801,7 +13801,7 @@ function success(innerType) {
|
|
|
13801
13801
|
var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
|
|
13802
13802
|
$ZodCatch.init(inst, def);
|
|
13803
13803
|
ZodType.init(inst, def);
|
|
13804
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13804
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => catchProcessor(inst, ctx, json3, params);
|
|
13805
13805
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13806
13806
|
inst.removeCatch = inst.unwrap;
|
|
13807
13807
|
});
|
|
@@ -13815,7 +13815,7 @@ function _catch2(innerType, catchValue) {
|
|
|
13815
13815
|
var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
|
|
13816
13816
|
$ZodNaN.init(inst, def);
|
|
13817
13817
|
ZodType.init(inst, def);
|
|
13818
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13818
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => nanProcessor(inst, ctx, json3, params);
|
|
13819
13819
|
});
|
|
13820
13820
|
function nan(params) {
|
|
13821
13821
|
return _nan(ZodNaN, params);
|
|
@@ -13823,7 +13823,7 @@ function nan(params) {
|
|
|
13823
13823
|
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
13824
13824
|
$ZodPipe.init(inst, def);
|
|
13825
13825
|
ZodType.init(inst, def);
|
|
13826
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13826
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => pipeProcessor(inst, ctx, json3, params);
|
|
13827
13827
|
inst.in = def.in;
|
|
13828
13828
|
inst.out = def.out;
|
|
13829
13829
|
});
|
|
@@ -13865,7 +13865,7 @@ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) =>
|
|
|
13865
13865
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13866
13866
|
$ZodReadonly.init(inst, def);
|
|
13867
13867
|
ZodType.init(inst, def);
|
|
13868
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13868
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => readonlyProcessor(inst, ctx, json3, params);
|
|
13869
13869
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13870
13870
|
});
|
|
13871
13871
|
function readonly(innerType) {
|
|
@@ -13877,7 +13877,7 @@ function readonly(innerType) {
|
|
|
13877
13877
|
var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
|
|
13878
13878
|
$ZodTemplateLiteral.init(inst, def);
|
|
13879
13879
|
ZodType.init(inst, def);
|
|
13880
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13880
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => templateLiteralProcessor(inst, ctx, json3, params);
|
|
13881
13881
|
});
|
|
13882
13882
|
function templateLiteral(parts, params) {
|
|
13883
13883
|
return new ZodTemplateLiteral({
|
|
@@ -13889,7 +13889,7 @@ function templateLiteral(parts, params) {
|
|
|
13889
13889
|
var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
13890
13890
|
$ZodLazy.init(inst, def);
|
|
13891
13891
|
ZodType.init(inst, def);
|
|
13892
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13892
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => lazyProcessor(inst, ctx, json3, params);
|
|
13893
13893
|
inst.unwrap = () => inst._zod.def.getter();
|
|
13894
13894
|
});
|
|
13895
13895
|
function lazy(getter) {
|
|
@@ -13901,7 +13901,7 @@ function lazy(getter) {
|
|
|
13901
13901
|
var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
|
|
13902
13902
|
$ZodPromise.init(inst, def);
|
|
13903
13903
|
ZodType.init(inst, def);
|
|
13904
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13904
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => promiseProcessor(inst, ctx, json3, params);
|
|
13905
13905
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
13906
13906
|
});
|
|
13907
13907
|
function promise(innerType) {
|
|
@@ -13913,7 +13913,7 @@ function promise(innerType) {
|
|
|
13913
13913
|
var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
|
|
13914
13914
|
$ZodFunction.init(inst, def);
|
|
13915
13915
|
ZodType.init(inst, def);
|
|
13916
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13916
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => functionProcessor(inst, ctx, json3, params);
|
|
13917
13917
|
});
|
|
13918
13918
|
function _function(params) {
|
|
13919
13919
|
return new ZodFunction({
|
|
@@ -13925,7 +13925,7 @@ function _function(params) {
|
|
|
13925
13925
|
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
13926
13926
|
$ZodCustom.init(inst, def);
|
|
13927
13927
|
ZodType.init(inst, def);
|
|
13928
|
-
inst._zod.processJSONSchema = (ctx,
|
|
13928
|
+
inst._zod.processJSONSchema = (ctx, json3, params) => customProcessor(inst, ctx, json3, params);
|
|
13929
13929
|
});
|
|
13930
13930
|
function check(fn) {
|
|
13931
13931
|
const ch = new $ZodCheck({
|
|
@@ -16435,6 +16435,123 @@ var puddlangMcpTools = definitions.map(([name, description, schema, readOnlyHint
|
|
|
16435
16435
|
}
|
|
16436
16436
|
}));
|
|
16437
16437
|
|
|
16438
|
+
// ../shared/src/api/notebook-execution.ts
|
|
16439
|
+
var cellId = external_exports.string().min(1).max(128);
|
|
16440
|
+
var cellSource = external_exports.object({ id: cellId, source: external_exports.string().max(1024 * 1024) });
|
|
16441
|
+
var notebookExecuteSchema = external_exports.object({
|
|
16442
|
+
source: compilationFileTargetSchema,
|
|
16443
|
+
cells: external_exports.array(cellSource).min(1).max(2e3),
|
|
16444
|
+
kernel: external_exports.string().min(1).max(256).optional()
|
|
16445
|
+
}).refine(
|
|
16446
|
+
(request) => new Set(request.cells.map((cell) => cell.id)).size === request.cells.length,
|
|
16447
|
+
"Cell ids must be unique"
|
|
16448
|
+
).refine(
|
|
16449
|
+
(request) => request.cells.reduce((length, cell) => length + cell.source.length, 0) <= 1024 * 1024,
|
|
16450
|
+
"Cell sources exceed 1 MiB"
|
|
16451
|
+
);
|
|
16452
|
+
var notebookExecutionCellSchema = cellSource.extend({
|
|
16453
|
+
revision: external_exports.number().int().nonnegative().default(0),
|
|
16454
|
+
state: external_exports.enum(["queued", "running", "succeeded", "failed", "cancelled"]),
|
|
16455
|
+
execution_count: external_exports.number().int().nullable(),
|
|
16456
|
+
outputs: external_exports.array(external_exports.looseObject({ output_type: external_exports.string() })),
|
|
16457
|
+
elapsed_ms: external_exports.number().nonnegative().optional()
|
|
16458
|
+
});
|
|
16459
|
+
var notebookInputSchema = external_exports.object({
|
|
16460
|
+
id: external_exports.string().uuid(),
|
|
16461
|
+
prompt: external_exports.string().max(4096),
|
|
16462
|
+
password: external_exports.boolean()
|
|
16463
|
+
});
|
|
16464
|
+
var notebookExecutionSchema = external_exports.object({
|
|
16465
|
+
id: external_exports.string().uuid(),
|
|
16466
|
+
revision: external_exports.number().int().nonnegative(),
|
|
16467
|
+
state: external_exports.enum(["running", "succeeded", "failed", "cancelled"]),
|
|
16468
|
+
cells: external_exports.array(notebookExecutionCellSchema).max(2e3),
|
|
16469
|
+
input: notebookInputSchema.optional(),
|
|
16470
|
+
error: external_exports.string().max(32768).optional()
|
|
16471
|
+
});
|
|
16472
|
+
var notebookExecutionRequestSchema = external_exports.object({ source: compilationFileTargetSchema });
|
|
16473
|
+
var notebookExecutionResponseSchema = external_exports.object({
|
|
16474
|
+
execution: notebookExecutionSchema.nullable()
|
|
16475
|
+
});
|
|
16476
|
+
var notebookInputReplySchema = external_exports.object({
|
|
16477
|
+
source: compilationFileTargetSchema,
|
|
16478
|
+
run_id: external_exports.string().uuid(),
|
|
16479
|
+
input_id: external_exports.string().uuid(),
|
|
16480
|
+
value: external_exports.string().max(65536)
|
|
16481
|
+
});
|
|
16482
|
+
|
|
16483
|
+
// ../shared/src/api/notebook-intelligence.ts
|
|
16484
|
+
var notebookIntelligenceRequestSchema = external_exports.object({
|
|
16485
|
+
source: compilationFileTargetSchema,
|
|
16486
|
+
kind: external_exports.enum(["complete", "inspect"]),
|
|
16487
|
+
code: external_exports.string().max(65536),
|
|
16488
|
+
/** Jupyter positions count Unicode codepoints, not UTF-16 units. */
|
|
16489
|
+
cursor: external_exports.number().int().nonnegative().max(65536)
|
|
16490
|
+
}).refine((value) => value.cursor <= [...value.code].length, "Cursor is outside the cell");
|
|
16491
|
+
var notebookIntelligenceResponseSchema = external_exports.object({
|
|
16492
|
+
matches: external_exports.array(external_exports.string().max(512)).max(200),
|
|
16493
|
+
start: external_exports.number().int().nonnegative(),
|
|
16494
|
+
end: external_exports.number().int().nonnegative(),
|
|
16495
|
+
documentation: external_exports.string().max(32768)
|
|
16496
|
+
});
|
|
16497
|
+
|
|
16498
|
+
// ../shared/src/api/notebook-widgets.ts
|
|
16499
|
+
var id = external_exports.string().min(1).max(128);
|
|
16500
|
+
var json2 = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
16501
|
+
var binary = external_exports.string().max(2 * 1024 * 1024).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
16502
|
+
var notebookWidgetMessageSchema = external_exports.object({
|
|
16503
|
+
msg_id: id,
|
|
16504
|
+
parent_id: external_exports.string().max(128).default(""),
|
|
16505
|
+
msg_type: external_exports.enum(["comm_open", "comm_msg", "comm_close", "status"]),
|
|
16506
|
+
content: json2,
|
|
16507
|
+
metadata: json2.default({}),
|
|
16508
|
+
buffers: external_exports.array(binary).max(128).default([])
|
|
16509
|
+
});
|
|
16510
|
+
var notebookWidgetStateSchema = external_exports.object({
|
|
16511
|
+
version_major: external_exports.literal(2),
|
|
16512
|
+
version_minor: external_exports.literal(0),
|
|
16513
|
+
state: external_exports.record(
|
|
16514
|
+
id,
|
|
16515
|
+
external_exports.object({
|
|
16516
|
+
model_name: external_exports.string().max(256),
|
|
16517
|
+
model_module: external_exports.string().max(256),
|
|
16518
|
+
model_module_version: external_exports.string().max(128),
|
|
16519
|
+
state: json2,
|
|
16520
|
+
buffers: external_exports.array(
|
|
16521
|
+
external_exports.object({
|
|
16522
|
+
encoding: external_exports.literal("base64"),
|
|
16523
|
+
path: external_exports.array(external_exports.union([external_exports.string().max(256), external_exports.number().int().nonnegative()])).max(64),
|
|
16524
|
+
data: binary
|
|
16525
|
+
})
|
|
16526
|
+
).max(128).optional()
|
|
16527
|
+
})
|
|
16528
|
+
).refine((state) => Object.keys(state).length <= 1024, "Too many widget models")
|
|
16529
|
+
});
|
|
16530
|
+
var notebookWidgetsRequestSchema = external_exports.object({
|
|
16531
|
+
source: compilationFileTargetSchema,
|
|
16532
|
+
generation: external_exports.string().uuid().optional(),
|
|
16533
|
+
after: external_exports.number().int().nonnegative().optional()
|
|
16534
|
+
});
|
|
16535
|
+
var notebookWidgetsResponseSchema = external_exports.object({
|
|
16536
|
+
generation: external_exports.string().uuid().nullable(),
|
|
16537
|
+
revision: external_exports.number().int().nonnegative(),
|
|
16538
|
+
snapshot: notebookWidgetStateSchema.optional(),
|
|
16539
|
+
events: external_exports.array(notebookWidgetMessageSchema).max(256),
|
|
16540
|
+
error: external_exports.string().max(1024).optional()
|
|
16541
|
+
});
|
|
16542
|
+
var notebookWidgetCommSchema = external_exports.object({
|
|
16543
|
+
source: compilationFileTargetSchema,
|
|
16544
|
+
generation: external_exports.string().uuid(),
|
|
16545
|
+
message: notebookWidgetMessageSchema.extend({
|
|
16546
|
+
msg_type: external_exports.enum(["comm_open", "comm_msg", "comm_close"]),
|
|
16547
|
+
content: external_exports.object({
|
|
16548
|
+
comm_id: id,
|
|
16549
|
+
target_name: external_exports.literal("jupyter.widget").optional(),
|
|
16550
|
+
data: json2
|
|
16551
|
+
})
|
|
16552
|
+
})
|
|
16553
|
+
});
|
|
16554
|
+
|
|
16438
16555
|
// ../shared/src/node/security.ts
|
|
16439
16556
|
import { createHash, randomBytes } from "node:crypto";
|
|
16440
16557
|
import {
|