zodvex 0.7.2-beta.0 → 0.7.2
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/cli/index.js +85 -36
- package/dist/cli/index.js.map +1 -1
- package/dist/codegen/index.js +64 -29
- package/dist/codegen/index.js.map +1 -1
- package/dist/core/index.js +13 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/meta.d.ts +11 -0
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/zx.d.ts +14 -0
- package/dist/internal/zx.d.ts.map +1 -1
- package/dist/legacy/index.js +13 -2
- package/dist/legacy/index.js.map +1 -1
- package/dist/mini/index.js +15 -4
- package/dist/mini/index.js.map +1 -1
- package/dist/mini/server/index.js +13 -2
- package/dist/mini/server/index.js.map +1 -1
- package/dist/public/cli/commands.d.ts +12 -1
- package/dist/public/cli/commands.d.ts.map +1 -1
- package/dist/public/codegen/discover.d.ts +7 -9
- package/dist/public/codegen/discover.d.ts.map +1 -1
- package/dist/public/codegen/generate.d.ts.map +1 -1
- package/dist/public/mini/zx.d.ts +2 -0
- package/dist/public/mini/zx.d.ts.map +1 -1
- package/dist/server/index.js +13 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
- package/src/internal/meta.ts +26 -0
- package/src/internal/zx.ts +18 -2
- package/src/public/cli/commands.ts +37 -15
- package/src/public/codegen/discover.ts +8 -26
- package/src/public/codegen/generate.ts +93 -36
- package/src/public/mini/zx.ts +3 -2
|
@@ -605,6 +605,15 @@ function readMeta(target) {
|
|
|
605
605
|
}
|
|
606
606
|
return target[META_KEY];
|
|
607
607
|
}
|
|
608
|
+
var CODEC_BRAND_KEY = "__zodvexCodecBrand";
|
|
609
|
+
function attachCodecBrand(target, brand) {
|
|
610
|
+
Object.defineProperty(target, CODEC_BRAND_KEY, {
|
|
611
|
+
value: brand,
|
|
612
|
+
enumerable: false,
|
|
613
|
+
writable: false,
|
|
614
|
+
configurable: false
|
|
615
|
+
});
|
|
616
|
+
}
|
|
608
617
|
function containsNativeZodDate(schema) {
|
|
609
618
|
if (schema instanceof $ZodDate) return true;
|
|
610
619
|
if (schema instanceof $ZodCodec) return false;
|
|
@@ -2013,8 +2022,10 @@ function id(tableName) {
|
|
|
2013
2022
|
branded._tableName = tableName;
|
|
2014
2023
|
return branded;
|
|
2015
2024
|
}
|
|
2016
|
-
function codec(wire, runtime, transforms) {
|
|
2017
|
-
|
|
2025
|
+
function codec(wire, runtime, transforms, opts) {
|
|
2026
|
+
const built = zodvexCodec(wire, runtime, transforms);
|
|
2027
|
+
if (opts?.brand) attachCodecBrand(built, opts.brand);
|
|
2028
|
+
return built;
|
|
2018
2029
|
}
|
|
2019
2030
|
function sharedWeakMap(name) {
|
|
2020
2031
|
const key = /* @__PURE__ */ Symbol.for(`zodvex.zx.cache.${name}`);
|