@opentabs-dev/opentabs-plugin-reddit 0.0.87 → 0.0.88
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/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -533,6 +533,7 @@
|
|
|
533
533
|
ZodOptional: () => ZodOptional,
|
|
534
534
|
ZodPipe: () => ZodPipe,
|
|
535
535
|
ZodPrefault: () => ZodPrefault,
|
|
536
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
536
537
|
ZodPromise: () => ZodPromise,
|
|
537
538
|
ZodReadonly: () => ZodReadonly,
|
|
538
539
|
ZodRealError: () => ZodRealError,
|
|
@@ -793,6 +794,7 @@
|
|
|
793
794
|
$ZodOptional: () => $ZodOptional,
|
|
794
795
|
$ZodPipe: () => $ZodPipe,
|
|
795
796
|
$ZodPrefault: () => $ZodPrefault,
|
|
797
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
796
798
|
$ZodPromise: () => $ZodPromise,
|
|
797
799
|
$ZodReadonly: () => $ZodReadonly,
|
|
798
800
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -2738,7 +2740,7 @@
|
|
|
2738
2740
|
var version = {
|
|
2739
2741
|
major: 4,
|
|
2740
2742
|
minor: 4,
|
|
2741
|
-
patch:
|
|
2743
|
+
patch: 3
|
|
2742
2744
|
};
|
|
2743
2745
|
|
|
2744
2746
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -4337,6 +4339,7 @@
|
|
|
4337
4339
|
});
|
|
4338
4340
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
4339
4341
|
$ZodType.init(inst, def);
|
|
4342
|
+
inst._zod.optin = "optional";
|
|
4340
4343
|
inst._zod.parse = (payload, ctx) => {
|
|
4341
4344
|
if (ctx.direction === "backward") {
|
|
4342
4345
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -4346,6 +4349,7 @@
|
|
|
4346
4349
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
4347
4350
|
return output.then((output2) => {
|
|
4348
4351
|
payload.value = output2;
|
|
4352
|
+
payload.fallback = true;
|
|
4349
4353
|
return payload;
|
|
4350
4354
|
});
|
|
4351
4355
|
}
|
|
@@ -4353,11 +4357,12 @@
|
|
|
4353
4357
|
throw new $ZodAsyncError();
|
|
4354
4358
|
}
|
|
4355
4359
|
payload.value = _out;
|
|
4360
|
+
payload.fallback = true;
|
|
4356
4361
|
return payload;
|
|
4357
4362
|
};
|
|
4358
4363
|
});
|
|
4359
4364
|
function handleOptionalResult(result, input) {
|
|
4360
|
-
if (result.issues.length
|
|
4365
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
4361
4366
|
return { issues: [], value: void 0 };
|
|
4362
4367
|
}
|
|
4363
4368
|
return result;
|
|
@@ -4375,10 +4380,11 @@
|
|
|
4375
4380
|
});
|
|
4376
4381
|
inst._zod.parse = (payload, ctx) => {
|
|
4377
4382
|
if (def.innerType._zod.optin === "optional") {
|
|
4383
|
+
const input = payload.value;
|
|
4378
4384
|
const result = def.innerType._zod.run(payload, ctx);
|
|
4379
4385
|
if (result instanceof Promise)
|
|
4380
|
-
return result.then((r) => handleOptionalResult(r,
|
|
4381
|
-
return handleOptionalResult(result,
|
|
4386
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
4387
|
+
return handleOptionalResult(result, input);
|
|
4382
4388
|
}
|
|
4383
4389
|
if (payload.value === void 0) {
|
|
4384
4390
|
return payload;
|
|
@@ -4494,7 +4500,7 @@
|
|
|
4494
4500
|
});
|
|
4495
4501
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
4496
4502
|
$ZodType.init(inst, def);
|
|
4497
|
-
|
|
4503
|
+
inst._zod.optin = "optional";
|
|
4498
4504
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4499
4505
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4500
4506
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -4514,6 +4520,7 @@
|
|
|
4514
4520
|
input: payload.value
|
|
4515
4521
|
});
|
|
4516
4522
|
payload.issues = [];
|
|
4523
|
+
payload.fallback = true;
|
|
4517
4524
|
}
|
|
4518
4525
|
return payload;
|
|
4519
4526
|
});
|
|
@@ -4528,6 +4535,7 @@
|
|
|
4528
4535
|
input: payload.value
|
|
4529
4536
|
});
|
|
4530
4537
|
payload.issues = [];
|
|
4538
|
+
payload.fallback = true;
|
|
4531
4539
|
}
|
|
4532
4540
|
return payload;
|
|
4533
4541
|
};
|
|
@@ -4573,7 +4581,7 @@
|
|
|
4573
4581
|
left.aborted = true;
|
|
4574
4582
|
return left;
|
|
4575
4583
|
}
|
|
4576
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4584
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4577
4585
|
}
|
|
4578
4586
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4579
4587
|
$ZodType.init(inst, def);
|
|
@@ -4625,6 +4633,9 @@
|
|
|
4625
4633
|
}
|
|
4626
4634
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4627
4635
|
}
|
|
4636
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4637
|
+
$ZodPipe.init(inst, def);
|
|
4638
|
+
});
|
|
4628
4639
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4629
4640
|
$ZodType.init(inst, def);
|
|
4630
4641
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -12185,6 +12196,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12185
12196
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
12186
12197
|
}
|
|
12187
12198
|
if (def.type === "pipe") {
|
|
12199
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
12200
|
+
return true;
|
|
12188
12201
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
12189
12202
|
}
|
|
12190
12203
|
if (def.type === "object") {
|
|
@@ -12663,7 +12676,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12663
12676
|
};
|
|
12664
12677
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
12665
12678
|
const def = schema._zod.def;
|
|
12666
|
-
const
|
|
12679
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12680
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
12667
12681
|
process2(innerType, ctx, params);
|
|
12668
12682
|
const seen = ctx.seen.get(schema);
|
|
12669
12683
|
seen.ref = innerType;
|
|
@@ -12897,6 +12911,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12897
12911
|
ZodOptional: () => ZodOptional,
|
|
12898
12912
|
ZodPipe: () => ZodPipe,
|
|
12899
12913
|
ZodPrefault: () => ZodPrefault,
|
|
12914
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12900
12915
|
ZodPromise: () => ZodPromise,
|
|
12901
12916
|
ZodReadonly: () => ZodReadonly,
|
|
12902
12917
|
ZodRecord: () => ZodRecord,
|
|
@@ -14137,10 +14152,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14137
14152
|
if (output instanceof Promise) {
|
|
14138
14153
|
return output.then((output2) => {
|
|
14139
14154
|
payload.value = output2;
|
|
14155
|
+
payload.fallback = true;
|
|
14140
14156
|
return payload;
|
|
14141
14157
|
});
|
|
14142
14158
|
}
|
|
14143
14159
|
payload.value = output;
|
|
14160
|
+
payload.fallback = true;
|
|
14144
14161
|
return payload;
|
|
14145
14162
|
};
|
|
14146
14163
|
});
|
|
@@ -14305,6 +14322,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14305
14322
|
reverseTransform: def.transform
|
|
14306
14323
|
});
|
|
14307
14324
|
}
|
|
14325
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14326
|
+
ZodPipe.init(inst, def);
|
|
14327
|
+
$ZodPreprocess.init(inst, def);
|
|
14328
|
+
});
|
|
14308
14329
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
14309
14330
|
$ZodReadonly.init(inst, def);
|
|
14310
14331
|
ZodType.init(inst, def);
|
|
@@ -14423,7 +14444,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14423
14444
|
return jsonSchema;
|
|
14424
14445
|
}
|
|
14425
14446
|
function preprocess(fn, schema) {
|
|
14426
|
-
return
|
|
14447
|
+
return new ZodPreprocess({
|
|
14448
|
+
type: "pipe",
|
|
14449
|
+
in: transform(fn),
|
|
14450
|
+
out: schema
|
|
14451
|
+
});
|
|
14427
14452
|
}
|
|
14428
14453
|
|
|
14429
14454
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -16047,7 +16072,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16047
16072
|
};
|
|
16048
16073
|
var src_default = new RedditPlugin();
|
|
16049
16074
|
|
|
16050
|
-
// dist/
|
|
16075
|
+
// dist/_adapter_entry_bd91b398-9b85-44bc-b113-aa5aa00a4c04.ts
|
|
16051
16076
|
if (!globalThis.__openTabs) {
|
|
16052
16077
|
globalThis.__openTabs = {};
|
|
16053
16078
|
} else {
|
|
@@ -16265,5 +16290,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16265
16290
|
};
|
|
16266
16291
|
delete src_default.onDeactivate;
|
|
16267
16292
|
}
|
|
16268
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="
|
|
16293
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="e0f60963dce60e8a8a5cd9f67ad7423a81c52f42963e6acbf093cfd9468eacd7";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,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
16269
16294
|
//# sourceMappingURL=adapter.iife.js.map
|