@opentabs-dev/opentabs-plugin-prescript-test 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter.iife.js +35 -10
- package/dist/adapter.iife.js.map +3 -3
- package/dist/pre-script.iife.js +1 -1
- package/dist/pre-script.iife.js.map +1 -1
- package/dist/tools.json +2 -2
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
ZodOptional: () => ZodOptional,
|
|
230
230
|
ZodPipe: () => ZodPipe,
|
|
231
231
|
ZodPrefault: () => ZodPrefault,
|
|
232
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
232
233
|
ZodPromise: () => ZodPromise,
|
|
233
234
|
ZodReadonly: () => ZodReadonly,
|
|
234
235
|
ZodRealError: () => ZodRealError,
|
|
@@ -489,6 +490,7 @@
|
|
|
489
490
|
$ZodOptional: () => $ZodOptional,
|
|
490
491
|
$ZodPipe: () => $ZodPipe,
|
|
491
492
|
$ZodPrefault: () => $ZodPrefault,
|
|
493
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
492
494
|
$ZodPromise: () => $ZodPromise,
|
|
493
495
|
$ZodReadonly: () => $ZodReadonly,
|
|
494
496
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -2434,7 +2436,7 @@
|
|
|
2434
2436
|
var version = {
|
|
2435
2437
|
major: 4,
|
|
2436
2438
|
minor: 4,
|
|
2437
|
-
patch:
|
|
2439
|
+
patch: 3
|
|
2438
2440
|
};
|
|
2439
2441
|
|
|
2440
2442
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -4033,6 +4035,7 @@
|
|
|
4033
4035
|
});
|
|
4034
4036
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
4035
4037
|
$ZodType.init(inst, def);
|
|
4038
|
+
inst._zod.optin = "optional";
|
|
4036
4039
|
inst._zod.parse = (payload, ctx) => {
|
|
4037
4040
|
if (ctx.direction === "backward") {
|
|
4038
4041
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -4042,6 +4045,7 @@
|
|
|
4042
4045
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
4043
4046
|
return output.then((output2) => {
|
|
4044
4047
|
payload.value = output2;
|
|
4048
|
+
payload.fallback = true;
|
|
4045
4049
|
return payload;
|
|
4046
4050
|
});
|
|
4047
4051
|
}
|
|
@@ -4049,11 +4053,12 @@
|
|
|
4049
4053
|
throw new $ZodAsyncError();
|
|
4050
4054
|
}
|
|
4051
4055
|
payload.value = _out;
|
|
4056
|
+
payload.fallback = true;
|
|
4052
4057
|
return payload;
|
|
4053
4058
|
};
|
|
4054
4059
|
});
|
|
4055
4060
|
function handleOptionalResult(result, input) {
|
|
4056
|
-
if (result.issues.length
|
|
4061
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
4057
4062
|
return { issues: [], value: void 0 };
|
|
4058
4063
|
}
|
|
4059
4064
|
return result;
|
|
@@ -4071,10 +4076,11 @@
|
|
|
4071
4076
|
});
|
|
4072
4077
|
inst._zod.parse = (payload, ctx) => {
|
|
4073
4078
|
if (def.innerType._zod.optin === "optional") {
|
|
4079
|
+
const input = payload.value;
|
|
4074
4080
|
const result = def.innerType._zod.run(payload, ctx);
|
|
4075
4081
|
if (result instanceof Promise)
|
|
4076
|
-
return result.then((r) => handleOptionalResult(r,
|
|
4077
|
-
return handleOptionalResult(result,
|
|
4082
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
4083
|
+
return handleOptionalResult(result, input);
|
|
4078
4084
|
}
|
|
4079
4085
|
if (payload.value === void 0) {
|
|
4080
4086
|
return payload;
|
|
@@ -4190,7 +4196,7 @@
|
|
|
4190
4196
|
});
|
|
4191
4197
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
4192
4198
|
$ZodType.init(inst, def);
|
|
4193
|
-
|
|
4199
|
+
inst._zod.optin = "optional";
|
|
4194
4200
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4195
4201
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4196
4202
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4210,6 +4216,7 @@
|
|
|
4210
4216
|
input: payload.value
|
|
4211
4217
|
});
|
|
4212
4218
|
payload.issues = [];
|
|
4219
|
+
payload.fallback = true;
|
|
4213
4220
|
}
|
|
4214
4221
|
return payload;
|
|
4215
4222
|
});
|
|
@@ -4224,6 +4231,7 @@
|
|
|
4224
4231
|
input: payload.value
|
|
4225
4232
|
});
|
|
4226
4233
|
payload.issues = [];
|
|
4234
|
+
payload.fallback = true;
|
|
4227
4235
|
}
|
|
4228
4236
|
return payload;
|
|
4229
4237
|
};
|
|
@@ -4269,7 +4277,7 @@
|
|
|
4269
4277
|
left.aborted = true;
|
|
4270
4278
|
return left;
|
|
4271
4279
|
}
|
|
4272
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4280
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4273
4281
|
}
|
|
4274
4282
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4275
4283
|
$ZodType.init(inst, def);
|
|
@@ -4321,6 +4329,9 @@
|
|
|
4321
4329
|
}
|
|
4322
4330
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4323
4331
|
}
|
|
4332
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4333
|
+
$ZodPipe.init(inst, def);
|
|
4334
|
+
});
|
|
4324
4335
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4325
4336
|
$ZodType.init(inst, def);
|
|
4326
4337
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -11881,6 +11892,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11881
11892
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11882
11893
|
}
|
|
11883
11894
|
if (def.type === "pipe") {
|
|
11895
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11896
|
+
return true;
|
|
11884
11897
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11885
11898
|
}
|
|
11886
11899
|
if (def.type === "object") {
|
|
@@ -12359,7 +12372,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12359
12372
|
};
|
|
12360
12373
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12361
12374
|
const def = schema._zod.def;
|
|
12362
|
-
const
|
|
12375
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12376
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
12363
12377
|
process2(innerType, ctx, params);
|
|
12364
12378
|
const seen = ctx.seen.get(schema);
|
|
12365
12379
|
seen.ref = innerType;
|
|
@@ -12593,6 +12607,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12593
12607
|
ZodOptional: () => ZodOptional,
|
|
12594
12608
|
ZodPipe: () => ZodPipe,
|
|
12595
12609
|
ZodPrefault: () => ZodPrefault,
|
|
12610
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12596
12611
|
ZodPromise: () => ZodPromise,
|
|
12597
12612
|
ZodReadonly: () => ZodReadonly,
|
|
12598
12613
|
ZodRecord: () => ZodRecord,
|
|
@@ -13833,10 +13848,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13833
13848
|
if (output instanceof Promise) {
|
|
13834
13849
|
return output.then((output2) => {
|
|
13835
13850
|
payload.value = output2;
|
|
13851
|
+
payload.fallback = true;
|
|
13836
13852
|
return payload;
|
|
13837
13853
|
});
|
|
13838
13854
|
}
|
|
13839
13855
|
payload.value = output;
|
|
13856
|
+
payload.fallback = true;
|
|
13840
13857
|
return payload;
|
|
13841
13858
|
};
|
|
13842
13859
|
});
|
|
@@ -14001,6 +14018,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14001
14018
|
reverseTransform: def.transform
|
|
14002
14019
|
});
|
|
14003
14020
|
}
|
|
14021
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14022
|
+
ZodPipe.init(inst, def);
|
|
14023
|
+
$ZodPreprocess.init(inst, def);
|
|
14024
|
+
});
|
|
14004
14025
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
14005
14026
|
$ZodReadonly.init(inst, def);
|
|
14006
14027
|
ZodType.init(inst, def);
|
|
@@ -14119,7 +14140,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14119
14140
|
return jsonSchema;
|
|
14120
14141
|
}
|
|
14121
14142
|
function preprocess(fn, schema) {
|
|
14122
|
-
return
|
|
14143
|
+
return new ZodPreprocess({
|
|
14144
|
+
type: "pipe",
|
|
14145
|
+
in: transform(fn),
|
|
14146
|
+
out: schema
|
|
14147
|
+
});
|
|
14123
14148
|
}
|
|
14124
14149
|
|
|
14125
14150
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -14693,7 +14718,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14693
14718
|
};
|
|
14694
14719
|
var src_default = new PreScriptTestPlugin();
|
|
14695
14720
|
|
|
14696
|
-
// dist/
|
|
14721
|
+
// dist/_adapter_entry_53dfdfc0-b27f-431f-86c3-2ff7c781713c.ts
|
|
14697
14722
|
if (!globalThis.__openTabs) {
|
|
14698
14723
|
globalThis.__openTabs = {};
|
|
14699
14724
|
} else {
|
|
@@ -14911,5 +14936,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14911
14936
|
};
|
|
14912
14937
|
delete src_default.onDeactivate;
|
|
14913
14938
|
}
|
|
14914
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["prescript-test"]){var a=o.adapters["prescript-test"];a.__adapterHash="
|
|
14939
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["prescript-test"]){var a=o.adapters["prescript-test"];a.__adapterHash="66dc1247602ab60d7deaae5bea304f05a0ec651fec8f742c7eeefd00bbdff9ed";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"prescript-test",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
14915
14940
|
//# sourceMappingURL=adapter.iife.js.map
|