@oxog/vld 1.3.1 → 1.5.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 +333 -284
- package/README.md +13 -12
- package/dist/cli/benchmark.d.ts +15 -0
- package/dist/cli/benchmark.d.ts.map +1 -0
- package/dist/cli/benchmark.js +248 -0
- package/dist/cli/benchmark.js.map +1 -0
- package/dist/cli/bin.d.ts +8 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +35 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/commands/benchmark.d.ts +11 -0
- package/dist/cli/commands/benchmark.d.ts.map +1 -0
- package/dist/cli/commands/benchmark.js +204 -0
- package/dist/cli/commands/benchmark.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +11 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +157 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/generate.d.ts +14 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +233 -0
- package/dist/cli/generate.js.map +1 -0
- package/dist/cli/index.d.ts +59 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +182 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/validate.d.ts +15 -0
- package/dist/cli/validate.d.ts.map +1 -0
- package/dist/cli/validate.js +162 -0
- package/dist/cli/validate.js.map +1 -0
- package/dist/codecs/index.d.ts.map +1 -1
- package/dist/codecs/index.js +29 -10
- package/dist/codecs/index.js.map +1 -1
- package/dist/coercion/bigint.js +1 -1
- package/dist/coercion/boolean.d.ts.map +1 -1
- package/dist/coercion/boolean.js +24 -32
- package/dist/coercion/boolean.js.map +1 -1
- package/dist/coercion/date.js +2 -2
- package/dist/coercion/date.js.map +1 -1
- package/dist/coercion/number.d.ts.map +1 -1
- package/dist/coercion/number.js +20 -4
- package/dist/coercion/number.js.map +1 -1
- package/dist/coercion/string.d.ts.map +1 -1
- package/dist/coercion/string.js +9 -73
- package/dist/coercion/string.js.map +1 -1
- package/dist/compat/emitter.d.ts +73 -0
- package/dist/compat/emitter.d.ts.map +1 -0
- package/dist/compat/emitter.js +179 -0
- package/dist/compat/emitter.js.map +1 -0
- package/dist/compat/index.d.ts +15 -0
- package/dist/compat/index.d.ts.map +1 -0
- package/dist/compat/index.js +14 -0
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/result.d.ts +128 -0
- package/dist/compat/result.d.ts.map +1 -0
- package/dist/compat/result.js +169 -0
- package/dist/compat/result.js.map +1 -0
- package/dist/errors.d.ts +58 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +97 -9
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +140 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +8 -0
- package/dist/events.js.map +1 -0
- package/dist/guards.d.ts +143 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +238 -0
- package/dist/guards.js.map +1 -0
- package/dist/index.d.ts +606 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -6
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +29 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +402 -0
- package/dist/kernel.js.map +1 -0
- package/dist/locales/af.d.ts.map +1 -1
- package/dist/locales/af.js +18 -1
- package/dist/locales/af.js.map +1 -1
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +18 -1
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/backup-en.d.ts +3 -0
- package/dist/locales/backup-en.d.ts.map +1 -0
- package/dist/locales/backup-en.js +105 -0
- package/dist/locales/backup-en.js.map +1 -0
- package/dist/locales/bn.d.ts.map +1 -1
- package/dist/locales/bn.js +18 -1
- package/dist/locales/bn.js.map +1 -1
- package/dist/locales/da.d.ts.map +1 -1
- package/dist/locales/da.js +18 -1
- package/dist/locales/da.js.map +1 -1
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +18 -1
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/en.js +18 -1
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es-MX.d.ts.map +1 -1
- package/dist/locales/es-MX.js +17 -1
- package/dist/locales/es-MX.js.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +18 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fi.d.ts.map +1 -1
- package/dist/locales/fi.js +18 -1
- package/dist/locales/fi.js.map +1 -1
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +18 -1
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +18 -1
- package/dist/locales/hi.js.map +1 -1
- package/dist/locales/id.d.ts.map +1 -1
- package/dist/locales/id.js +18 -1
- package/dist/locales/id.js.map +1 -1
- package/dist/locales/it.d.ts.map +1 -1
- package/dist/locales/it.js +18 -1
- package/dist/locales/it.js.map +1 -1
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +18 -1
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.d.ts.map +1 -1
- package/dist/locales/ko.js +18 -1
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/nl.d.ts.map +1 -1
- package/dist/locales/nl.js +18 -1
- package/dist/locales/nl.js.map +1 -1
- package/dist/locales/no.d.ts.map +1 -1
- package/dist/locales/no.js +18 -1
- package/dist/locales/no.js.map +1 -1
- package/dist/locales/pl.d.ts.map +1 -1
- package/dist/locales/pl.js +18 -1
- package/dist/locales/pl.js.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/locales/pt-BR.js +18 -1
- package/dist/locales/pt-BR.js.map +1 -1
- package/dist/locales/pt.d.ts.map +1 -1
- package/dist/locales/pt.js +18 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/locales/ru.d.ts.map +1 -1
- package/dist/locales/ru.js +18 -1
- package/dist/locales/ru.js.map +1 -1
- package/dist/locales/sv.d.ts.map +1 -1
- package/dist/locales/sv.js +18 -1
- package/dist/locales/sv.js.map +1 -1
- package/dist/locales/sw.d.ts.map +1 -1
- package/dist/locales/sw.js +18 -1
- package/dist/locales/sw.js.map +1 -1
- package/dist/locales/th.d.ts.map +1 -1
- package/dist/locales/th.js +18 -1
- package/dist/locales/th.js.map +1 -1
- package/dist/locales/tr.d.ts.map +1 -1
- package/dist/locales/tr.js +18 -1
- package/dist/locales/tr.js.map +1 -1
- package/dist/locales/types.d.ts +13 -0
- package/dist/locales/types.d.ts.map +1 -1
- package/dist/locales/types.js.map +1 -1
- package/dist/locales/vi.d.ts.map +1 -1
- package/dist/locales/vi.js +18 -1
- package/dist/locales/vi.js.map +1 -1
- package/dist/locales/zh.d.ts.map +1 -1
- package/dist/locales/zh.js +18 -1
- package/dist/locales/zh.js.map +1 -1
- package/dist/logger.d.ts +94 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +184 -0
- package/dist/logger.js.map +1 -0
- package/dist/pigment.d.ts +124 -0
- package/dist/pigment.d.ts.map +1 -0
- package/dist/pigment.js +177 -0
- package/dist/pigment.js.map +1 -0
- package/dist/plugins/codecs.d.ts +17 -0
- package/dist/plugins/codecs.d.ts.map +1 -0
- package/dist/plugins/codecs.js +29 -0
- package/dist/plugins/codecs.js.map +1 -0
- package/dist/plugins/coercion.d.ts +13 -0
- package/dist/plugins/coercion.d.ts.map +1 -0
- package/dist/plugins/coercion.js +34 -0
- package/dist/plugins/coercion.js.map +1 -0
- package/dist/plugins/core-validators.d.ts +13 -0
- package/dist/plugins/core-validators.d.ts.map +1 -0
- package/dist/plugins/core-validators.js +96 -0
- package/dist/plugins/core-validators.js.map +1 -0
- package/dist/plugins/index.d.ts +8 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +8 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/kernel.d.ts +29 -0
- package/dist/plugins/kernel.d.ts.map +1 -0
- package/dist/plugins/kernel.js +486 -0
- package/dist/plugins/kernel.js.map +1 -0
- package/dist/plugins/types.d.ts +186 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +8 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/style.d.ts +123 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +369 -0
- package/dist/style.js.map +1 -0
- package/dist/utils/codec-utils.d.ts +2 -0
- package/dist/utils/codec-utils.d.ts.map +1 -1
- package/dist/utils/codec-utils.js +28 -4
- package/dist/utils/codec-utils.js.map +1 -1
- package/dist/utils/deep-merge.d.ts +2 -0
- package/dist/utils/deep-merge.d.ts.map +1 -1
- package/dist/utils/deep-merge.js +22 -39
- package/dist/utils/deep-merge.js.map +1 -1
- package/dist/utils/ip-validation.d.ts +11 -0
- package/dist/utils/ip-validation.d.ts.map +1 -0
- package/dist/utils/ip-validation.js +98 -0
- package/dist/utils/ip-validation.js.map +1 -0
- package/dist/utils/security.d.ts +12 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +61 -0
- package/dist/utils/security.js.map +1 -0
- package/dist/validators/array.d.ts +3 -1
- package/dist/validators/array.d.ts.map +1 -1
- package/dist/validators/array.js +41 -15
- package/dist/validators/array.js.map +1 -1
- package/dist/validators/base.d.ts +134 -0
- package/dist/validators/base.d.ts.map +1 -1
- package/dist/validators/base.js +255 -1
- package/dist/validators/base.js.map +1 -1
- package/dist/validators/base64.js +1 -1
- package/dist/validators/bigint.d.ts +20 -0
- package/dist/validators/bigint.d.ts.map +1 -1
- package/dist/validators/bigint.js +39 -1
- package/dist/validators/bigint.js.map +1 -1
- package/dist/validators/boolean.js +29 -1
- package/dist/validators/boolean.js.map +1 -1
- package/dist/validators/codec.js +1 -1
- package/dist/validators/custom.d.ts +47 -0
- package/dist/validators/custom.d.ts.map +1 -0
- package/dist/validators/custom.js +50 -0
- package/dist/validators/custom.js.map +1 -0
- package/dist/validators/date.d.ts +16 -0
- package/dist/validators/date.d.ts.map +1 -1
- package/dist/validators/date.js +62 -7
- package/dist/validators/date.js.map +1 -1
- package/dist/validators/discriminated-union.d.ts +29 -0
- package/dist/validators/discriminated-union.d.ts.map +1 -0
- package/dist/validators/discriminated-union.js +98 -0
- package/dist/validators/discriminated-union.js.map +1 -0
- package/dist/validators/enum.d.ts +10 -0
- package/dist/validators/enum.d.ts.map +1 -1
- package/dist/validators/enum.js +38 -1
- package/dist/validators/enum.js.map +1 -1
- package/dist/validators/file.d.ts +57 -0
- package/dist/validators/file.d.ts.map +1 -0
- package/dist/validators/file.js +114 -0
- package/dist/validators/file.js.map +1 -0
- package/dist/validators/function.d.ts +26 -0
- package/dist/validators/function.d.ts.map +1 -0
- package/dist/validators/function.js +45 -0
- package/dist/validators/function.js.map +1 -0
- package/dist/validators/hex.d.ts.map +1 -1
- package/dist/validators/hex.js +3 -2
- package/dist/validators/hex.js.map +1 -1
- package/dist/validators/index.d.ts +18 -1
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +16 -1
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/intersection.d.ts.map +1 -1
- package/dist/validators/intersection.js +15 -8
- package/dist/validators/intersection.js.map +1 -1
- package/dist/validators/json.d.ts +26 -0
- package/dist/validators/json.d.ts.map +1 -0
- package/dist/validators/json.js +64 -0
- package/dist/validators/json.js.map +1 -0
- package/dist/validators/lazy.d.ts +28 -0
- package/dist/validators/lazy.d.ts.map +1 -0
- package/dist/validators/lazy.js +42 -0
- package/dist/validators/lazy.js.map +1 -0
- package/dist/validators/literal.js +1 -1
- package/dist/validators/map.js +1 -1
- package/dist/validators/nan.d.ts +17 -0
- package/dist/validators/nan.d.ts.map +1 -0
- package/dist/validators/nan.js +32 -0
- package/dist/validators/nan.js.map +1 -0
- package/dist/validators/never.js +1 -1
- package/dist/validators/null.d.ts +16 -0
- package/dist/validators/null.d.ts.map +1 -0
- package/dist/validators/null.js +31 -0
- package/dist/validators/null.js.map +1 -0
- package/dist/validators/number.d.ts +22 -0
- package/dist/validators/number.d.ts.map +1 -1
- package/dist/validators/number.js +47 -8
- package/dist/validators/number.js.map +1 -1
- package/dist/validators/object.d.ts +32 -0
- package/dist/validators/object.d.ts.map +1 -1
- package/dist/validators/object.js +125 -8
- package/dist/validators/object.js.map +1 -1
- package/dist/validators/record.d.ts +15 -2
- package/dist/validators/record.d.ts.map +1 -1
- package/dist/validators/record.js +74 -4
- package/dist/validators/record.js.map +1 -1
- package/dist/validators/set.js +1 -1
- package/dist/validators/string-bool.d.ts +61 -0
- package/dist/validators/string-bool.d.ts.map +1 -0
- package/dist/validators/string-bool.js +127 -0
- package/dist/validators/string-bool.js.map +1 -0
- package/dist/validators/string-formats.d.ts +97 -0
- package/dist/validators/string-formats.d.ts.map +1 -0
- package/dist/validators/string-formats.js +120 -0
- package/dist/validators/string-formats.js.map +1 -0
- package/dist/validators/string.d.ts.map +1 -1
- package/dist/validators/string.js +2 -73
- package/dist/validators/string.js.map +1 -1
- package/dist/validators/symbol.js +1 -1
- package/dist/validators/template-literal.d.ts +32 -0
- package/dist/validators/template-literal.d.ts.map +1 -0
- package/dist/validators/template-literal.js +102 -0
- package/dist/validators/template-literal.js.map +1 -0
- package/dist/validators/tuple.js +1 -1
- package/dist/validators/uint8array.d.ts +21 -4
- package/dist/validators/uint8array.d.ts.map +1 -1
- package/dist/validators/uint8array.js +34 -23
- package/dist/validators/uint8array.js.map +1 -1
- package/dist/validators/undefined.d.ts +16 -0
- package/dist/validators/undefined.d.ts.map +1 -0
- package/dist/validators/undefined.js +31 -0
- package/dist/validators/undefined.js.map +1 -0
- package/dist/validators/union.d.ts +2 -0
- package/dist/validators/union.d.ts.map +1 -1
- package/dist/validators/union.js +15 -21
- package/dist/validators/union.js.map +1 -1
- package/dist/validators/void.js +1 -1
- package/dist/validators/xor.d.ts +23 -0
- package/dist/validators/xor.d.ts.map +1 -0
- package/dist/validators/xor.js +64 -0
- package/dist/validators/xor.js.map +1 -0
- package/package.json +95 -79
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codecs Plugin
|
|
3
|
+
*
|
|
4
|
+
* Bu plugin tüm built-in codec'leri içerir.
|
|
5
|
+
* Bidirectional data transformation için kullanılır.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Codecs Plugin
|
|
9
|
+
*
|
|
10
|
+
* Bu plugin codec'leri kernel'a kaydeder.
|
|
11
|
+
* Codec'ler doğrudan VldCodec olarak export edildiği için,
|
|
12
|
+
* bu plugin sadece metadata ve lifecycle yönetimi sağlar.
|
|
13
|
+
*/
|
|
14
|
+
export const codecsPlugin = {
|
|
15
|
+
name: 'vld-codecs',
|
|
16
|
+
version: '2.0.0',
|
|
17
|
+
description: 'Built-in codecs for VLD',
|
|
18
|
+
// Codec'ler doğrudan src/codecs/index.ts'den export edilir
|
|
19
|
+
// Bu plugin sadece metadata sağlar
|
|
20
|
+
codecs: {},
|
|
21
|
+
install(kernel) {
|
|
22
|
+
if (kernel.getContext().debug) {
|
|
23
|
+
console.log('[VLD] Codecs plugin installed');
|
|
24
|
+
console.log('[VLD] Note: Codecs are available via direct imports from @oxog/vld');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export default codecsPlugin;
|
|
29
|
+
//# sourceMappingURL=codecs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../src/plugins/codecs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,yBAAyB;IAEtC,2DAA2D;IAC3D,mCAAmC;IACnC,MAAM,EAAE,EAAE;IAEV,OAAO,CAAC,MAAM;QACZ,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Codecs Plugin\n *\n * Bu plugin tüm built-in codec'leri içerir.\n * Bidirectional data transformation için kullanılır.\n */\n\nimport type { ValidatorPlugin } from './types.js';\n\n/**\n * Codecs Plugin\n *\n * Bu plugin codec'leri kernel'a kaydeder.\n * Codec'ler doğrudan VldCodec olarak export edildiği için,\n * bu plugin sadece metadata ve lifecycle yönetimi sağlar.\n */\nexport const codecsPlugin: ValidatorPlugin = {\n name: 'vld-codecs',\n version: '2.0.0',\n description: 'Built-in codecs for VLD',\n\n // Codec'ler doğrudan src/codecs/index.ts'den export edilir\n // Bu plugin sadece metadata sağlar\n codecs: {},\n\n install(kernel) {\n if (kernel.getContext().debug) {\n console.log('[VLD] Codecs plugin installed');\n console.log('[VLD] Note: Codecs are available via direct imports from @oxog/vld');\n }\n }\n};\n\nexport default codecsPlugin;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coercion Plugin
|
|
3
|
+
*
|
|
4
|
+
* Bu plugin type coercion validator'larını içerir.
|
|
5
|
+
* String, number, boolean, date, bigint için otomatik tip dönüşümü sağlar.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidatorPlugin } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Coercion Plugin
|
|
10
|
+
*/
|
|
11
|
+
export declare const coercionPlugin: ValidatorPlugin;
|
|
12
|
+
export default coercionPlugin;
|
|
13
|
+
//# sourceMappingURL=coercion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercion.d.ts","sourceRoot":"","sources":["../../src/plugins/coercion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAOpE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,eAmB5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coercion Plugin
|
|
3
|
+
*
|
|
4
|
+
* Bu plugin type coercion validator'larını içerir.
|
|
5
|
+
* String, number, boolean, date, bigint için otomatik tip dönüşümü sağlar.
|
|
6
|
+
*/
|
|
7
|
+
import { VldCoerceString } from '../coercion/string.js';
|
|
8
|
+
import { VldCoerceNumber } from '../coercion/number.js';
|
|
9
|
+
import { VldCoerceBoolean } from '../coercion/boolean.js';
|
|
10
|
+
import { VldCoerceDate } from '../coercion/date.js';
|
|
11
|
+
import { VldCoerceBigInt } from '../coercion/bigint.js';
|
|
12
|
+
/**
|
|
13
|
+
* Coercion Plugin
|
|
14
|
+
*/
|
|
15
|
+
export const coercionPlugin = {
|
|
16
|
+
name: 'vld-coercion',
|
|
17
|
+
version: '2.0.0',
|
|
18
|
+
description: 'Type coercion validators for VLD',
|
|
19
|
+
dependencies: ['vld-core-validators'],
|
|
20
|
+
validators: {
|
|
21
|
+
'coerce.string': (() => VldCoerceString.create()),
|
|
22
|
+
'coerce.number': (() => VldCoerceNumber.create()),
|
|
23
|
+
'coerce.boolean': (() => VldCoerceBoolean.create()),
|
|
24
|
+
'coerce.date': (() => VldCoerceDate.create()),
|
|
25
|
+
'coerce.bigint': (() => VldCoerceBigInt.create())
|
|
26
|
+
},
|
|
27
|
+
install(kernel) {
|
|
28
|
+
if (kernel.getContext().debug) {
|
|
29
|
+
console.log('[VLD] Coercion plugin installed');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export default coercionPlugin;
|
|
34
|
+
//# sourceMappingURL=coercion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercion.js","sourceRoot":"","sources":["../../src/plugins/coercion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,kCAAkC;IAC/C,YAAY,EAAE,CAAC,qBAAqB,CAAC;IAErC,UAAU,EAAE;QACV,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,CAAqB;QACrE,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,CAAqB;QACrE,gBAAgB,EAAE,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAqB;QACvE,aAAa,EAAE,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,CAAqB;QACjE,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,CAAqB;KACtE;IAED,OAAO,CAAC,MAAM;QACZ,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Coercion Plugin\n *\n * Bu plugin type coercion validator'larını içerir.\n * String, number, boolean, date, bigint için otomatik tip dönüşümü sağlar.\n */\n\nimport type { ValidatorPlugin, ValidatorFactory } from './types.js';\nimport { VldCoerceString } from '../coercion/string.js';\nimport { VldCoerceNumber } from '../coercion/number.js';\nimport { VldCoerceBoolean } from '../coercion/boolean.js';\nimport { VldCoerceDate } from '../coercion/date.js';\nimport { VldCoerceBigInt } from '../coercion/bigint.js';\n\n/**\n * Coercion Plugin\n */\nexport const coercionPlugin: ValidatorPlugin = {\n name: 'vld-coercion',\n version: '2.0.0',\n description: 'Type coercion validators for VLD',\n dependencies: ['vld-core-validators'],\n\n validators: {\n 'coerce.string': (() => VldCoerceString.create()) as ValidatorFactory,\n 'coerce.number': (() => VldCoerceNumber.create()) as ValidatorFactory,\n 'coerce.boolean': (() => VldCoerceBoolean.create()) as ValidatorFactory,\n 'coerce.date': (() => VldCoerceDate.create()) as ValidatorFactory,\n 'coerce.bigint': (() => VldCoerceBigInt.create()) as ValidatorFactory\n },\n\n install(kernel) {\n if (kernel.getContext().debug) {\n console.log('[VLD] Coercion plugin installed');\n }\n }\n};\n\nexport default coercionPlugin;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Validators Plugin
|
|
3
|
+
*
|
|
4
|
+
* Bu plugin tüm temel validator'ları içerir.
|
|
5
|
+
* VLD'nin varsayılan olarak yüklediği ana plugin'dir.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidatorPlugin } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Core Validators Plugin
|
|
10
|
+
*/
|
|
11
|
+
export declare const coreValidatorsPlugin: ValidatorPlugin;
|
|
12
|
+
export default coreValidatorsPlugin;
|
|
13
|
+
//# sourceMappingURL=core-validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-validators.d.ts","sourceRoot":"","sources":["../../src/plugins/core-validators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA2BlD;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,eAsElC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Validators Plugin
|
|
3
|
+
*
|
|
4
|
+
* Bu plugin tüm temel validator'ları içerir.
|
|
5
|
+
* VLD'nin varsayılan olarak yüklediği ana plugin'dir.
|
|
6
|
+
*/
|
|
7
|
+
import { VldString } from '../validators/string.js';
|
|
8
|
+
import { VldNumber } from '../validators/number.js';
|
|
9
|
+
import { VldBoolean } from '../validators/boolean.js';
|
|
10
|
+
import { VldDate } from '../validators/date.js';
|
|
11
|
+
import { VldBigInt } from '../validators/bigint.js';
|
|
12
|
+
import { VldSymbol } from '../validators/symbol.js';
|
|
13
|
+
import { VldArray } from '../validators/array.js';
|
|
14
|
+
import { VldObject } from '../validators/object.js';
|
|
15
|
+
import { VldTuple } from '../validators/tuple.js';
|
|
16
|
+
import { VldRecord } from '../validators/record.js';
|
|
17
|
+
import { VldSet } from '../validators/set.js';
|
|
18
|
+
import { VldMap } from '../validators/map.js';
|
|
19
|
+
import { VldUnion } from '../validators/union.js';
|
|
20
|
+
import { VldIntersection } from '../validators/intersection.js';
|
|
21
|
+
import { VldLiteral } from '../validators/literal.js';
|
|
22
|
+
import { VldEnum } from '../validators/enum.js';
|
|
23
|
+
import { VldAny } from '../validators/any.js';
|
|
24
|
+
import { VldUnknown } from '../validators/unknown.js';
|
|
25
|
+
import { VldVoid } from '../validators/void.js';
|
|
26
|
+
import { VldNever } from '../validators/never.js';
|
|
27
|
+
import { VldNull } from '../validators/null.js';
|
|
28
|
+
import { VldUndefined } from '../validators/undefined.js';
|
|
29
|
+
import { VldNan } from '../validators/nan.js';
|
|
30
|
+
import { VldLazy } from '../validators/lazy.js';
|
|
31
|
+
import { VldStringBool } from '../validators/string-bool.js';
|
|
32
|
+
/**
|
|
33
|
+
* Core Validators Plugin
|
|
34
|
+
*/
|
|
35
|
+
export const coreValidatorsPlugin = {
|
|
36
|
+
name: 'vld-core-validators',
|
|
37
|
+
version: '2.0.0',
|
|
38
|
+
description: 'Core validator types for VLD',
|
|
39
|
+
validators: {
|
|
40
|
+
// Primitive types
|
|
41
|
+
string: () => VldString.create(),
|
|
42
|
+
number: () => VldNumber.create(),
|
|
43
|
+
int: () => VldNumber.create().int(),
|
|
44
|
+
boolean: () => VldBoolean.create(),
|
|
45
|
+
date: () => VldDate.create(),
|
|
46
|
+
bigint: () => VldBigInt.create(),
|
|
47
|
+
symbol: () => VldSymbol.create(),
|
|
48
|
+
stringbool: (options) => VldStringBool.create(options),
|
|
49
|
+
// Complex types
|
|
50
|
+
array: (item) => VldArray.create(item),
|
|
51
|
+
object: (shape) => VldObject.create(shape),
|
|
52
|
+
tuple: (...items) => VldTuple.create(...items),
|
|
53
|
+
record: (value) => VldRecord.create(value),
|
|
54
|
+
set: (item) => VldSet.create(item),
|
|
55
|
+
map: (key, value) => VldMap.create(key, value),
|
|
56
|
+
// Union and intersection
|
|
57
|
+
union: (...validators) => VldUnion.create(...validators),
|
|
58
|
+
intersection: (first, second) => VldIntersection.create(first, second),
|
|
59
|
+
// Literal and enum
|
|
60
|
+
literal: (value) => VldLiteral.create(value),
|
|
61
|
+
enum: (values) => VldEnum.create(values),
|
|
62
|
+
// Special types
|
|
63
|
+
any: () => VldAny.create(),
|
|
64
|
+
unknown: () => VldUnknown.create(),
|
|
65
|
+
void: () => VldVoid.create(),
|
|
66
|
+
never: () => VldNever.create(), // Type assertion needed for never type
|
|
67
|
+
null: () => VldNull.create(),
|
|
68
|
+
undefined: () => VldUndefined.create(),
|
|
69
|
+
nan: () => VldNan.create(),
|
|
70
|
+
// Lazy (recursive schemas)
|
|
71
|
+
lazy: (schemaGetter) => VldLazy.create(schemaGetter)
|
|
72
|
+
},
|
|
73
|
+
install(kernel) {
|
|
74
|
+
if (kernel.getContext().debug) {
|
|
75
|
+
console.log('[VLD] Core validators plugin installed');
|
|
76
|
+
}
|
|
77
|
+
// Parse event'lerini dinle (debug mode)
|
|
78
|
+
kernel.on('vld:parse:start', ({ schema }) => {
|
|
79
|
+
if (kernel.getContext().debug) {
|
|
80
|
+
console.log(`[VLD] Parsing: ${schema.constructor.name}`);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
kernel.on('vld:parse:success', ({ schema, duration }) => {
|
|
84
|
+
if (kernel.getContext().debug) {
|
|
85
|
+
console.log(`[VLD] Parse success: ${schema.constructor.name} (${duration.toFixed(2)}ms)`);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
kernel.on('vld:parse:error', ({ schema, error, duration }) => {
|
|
89
|
+
if (kernel.getContext().debug) {
|
|
90
|
+
console.log(`[VLD] Parse error: ${schema.constructor.name} (${duration.toFixed(2)}ms) - ${error.message}`);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
export default coreValidatorsPlugin;
|
|
96
|
+
//# sourceMappingURL=core-validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-validators.js","sourceRoot":"","sources":["../../src/plugins/core-validators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;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H,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC3D,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;gBAC9B,OAAO,CAAC,GAAG,CAAC,sBAAsB,MAAM,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7G,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Core Validators Plugin\n *\n * Bu plugin tüm temel validator'ları içerir.\n * VLD'nin varsayılan olarak yüklediği ana plugin'dir.\n */\n\nimport type { ValidatorPlugin } from './types.js';\nimport { VldString } from '../validators/string.js';\nimport { VldNumber } from '../validators/number.js';\nimport { VldBoolean } from '../validators/boolean.js';\nimport { VldDate } from '../validators/date.js';\nimport { VldBigInt } from '../validators/bigint.js';\nimport { VldSymbol } from '../validators/symbol.js';\nimport { VldArray } from '../validators/array.js';\nimport { VldObject } from '../validators/object.js';\nimport { VldTuple } from '../validators/tuple.js';\nimport { VldRecord } from '../validators/record.js';\nimport { VldSet } from '../validators/set.js';\nimport { VldMap } from '../validators/map.js';\nimport { VldUnion } from '../validators/union.js';\nimport { VldIntersection } from '../validators/intersection.js';\nimport { VldLiteral } from '../validators/literal.js';\nimport { VldEnum } from '../validators/enum.js';\nimport { VldAny } from '../validators/any.js';\nimport { VldUnknown } from '../validators/unknown.js';\nimport { VldVoid } from '../validators/void.js';\nimport { VldNever } from '../validators/never.js';\nimport { VldNull } from '../validators/null.js';\nimport { VldUndefined } from '../validators/undefined.js';\nimport { VldNan } from '../validators/nan.js';\nimport { VldLazy } from '../validators/lazy.js';\nimport { VldStringBool } from '../validators/string-bool.js';\n\n/**\n * Core Validators Plugin\n */\nexport const coreValidatorsPlugin: ValidatorPlugin = {\n name: 'vld-core-validators',\n version: '2.0.0',\n description: 'Core validator types for VLD',\n\n validators: {\n // Primitive types\n string: () => VldString.create(),\n number: () => VldNumber.create(),\n int: () => VldNumber.create().int(),\n boolean: () => VldBoolean.create(),\n date: () => VldDate.create(),\n bigint: () => VldBigInt.create(),\n symbol: () => VldSymbol.create(),\n stringbool: (options?: { truthy?: readonly string[]; falsy?: readonly string[]; caseSensitive?: boolean }) =>\n VldStringBool.create(options as any),\n\n // Complex types\n array: (item: any) => VldArray.create(item),\n object: (shape: any) => VldObject.create(shape),\n tuple: (...items: any[]) => VldTuple.create(...items),\n record: (value: any) => VldRecord.create(value),\n set: (item: any) => VldSet.create(item),\n map: (key: any, value: any) => VldMap.create(key, value),\n\n // Union and intersection\n union: (...validators: any[]) => VldUnion.create(...validators),\n intersection: (first: any, second: any) => VldIntersection.create(first, second),\n\n // Literal and enum\n literal: (value: any) => VldLiteral.create(value),\n enum: (values: readonly [string, ...string[]]) => VldEnum.create(values),\n\n // Special types\n any: () => VldAny.create(),\n unknown: () => VldUnknown.create(),\n void: () => VldVoid.create(),\n never: () => VldNever.create() as any, // Type assertion needed for never type\n null: () => VldNull.create(),\n undefined: () => VldUndefined.create(),\n nan: () => VldNan.create(),\n\n // Lazy (recursive schemas)\n lazy: (schemaGetter: () => any) => VldLazy.create(schemaGetter)\n },\n\n install(kernel) {\n if (kernel.getContext().debug) {\n console.log('[VLD] Core validators plugin installed');\n }\n\n // Parse event'lerini dinle (debug mode)\n kernel.on('vld:parse:start', ({ schema }) => {\n if (kernel.getContext().debug) {\n console.log(`[VLD] Parsing: ${schema.constructor.name}`);\n }\n });\n\n kernel.on('vld:parse:success', ({ schema, duration }) => {\n if (kernel.getContext().debug) {\n console.log(`[VLD] Parse success: ${schema.constructor.name} (${duration.toFixed(2)}ms)`);\n }\n });\n\n kernel.on('vld:parse:error', ({ schema, error, duration }) => {\n if (kernel.getContext().debug) {\n console.log(`[VLD] Parse error: ${schema.constructor.name} (${duration.toFixed(2)}ms) - ${error.message}`);\n }\n });\n }\n};\n\nexport default coreValidatorsPlugin;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VLD Plugins Module
|
|
3
|
+
*
|
|
4
|
+
* This module exports all plugin-related functionality.
|
|
5
|
+
*/
|
|
6
|
+
export type { VldContext, VldPlugin, VldKernelInstance, VldKernelOptions, ValidatorFactory, TransformFactory, CodecFactory, HookContext, PluginBuilder, PluginMeta, PluginHooks } from './types';
|
|
7
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../kernel';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,SAAS,EACV,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VLD Plugins Module
|
|
3
|
+
*
|
|
4
|
+
* This module exports all plugin-related functionality.
|
|
5
|
+
*/
|
|
6
|
+
// Re-export kernel functionality
|
|
7
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../kernel.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,iCAAiC;AACjC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,SAAS,EACV,MAAM,WAAW,CAAC","sourcesContent":["/**\r\n * VLD Plugins Module\r\n *\r\n * This module exports all plugin-related functionality.\r\n */\r\n\r\n// Export types\r\nexport type {\r\n VldContext,\r\n VldPlugin,\r\n VldKernelInstance,\r\n VldKernelOptions,\r\n ValidatorFactory,\r\n TransformFactory,\r\n CodecFactory,\r\n HookContext,\r\n PluginBuilder,\r\n PluginMeta,\r\n PluginHooks\r\n} from './types';\r\n\r\n// Re-export kernel functionality\r\nexport {\r\n createVldKernel,\r\n definePlugin,\r\n getVldKernel,\r\n resetVldKernel,\r\n usePlugin\r\n} from '../kernel';\r\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VLD Kernel Implementation
|
|
3
|
+
*
|
|
4
|
+
* Bu modül VLD plugin sistemi için merkezi yönetim noktasını sağlar.
|
|
5
|
+
* @oxog/plugin paketi ile uyumlu micro-kernel mimarisi kullanır.
|
|
6
|
+
*/
|
|
7
|
+
import type { VldKernel, VldKernelOptions } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Yeni VLD Kernel oluşturur
|
|
10
|
+
*/
|
|
11
|
+
export declare function createVldKernel(options?: VldKernelOptions): VldKernel;
|
|
12
|
+
/**
|
|
13
|
+
* Global kernel'i alır veya oluşturur
|
|
14
|
+
*/
|
|
15
|
+
export declare function getGlobalKernel(): VldKernel;
|
|
16
|
+
/**
|
|
17
|
+
* Global kernel'i ayarlar
|
|
18
|
+
*/
|
|
19
|
+
export declare function setGlobalKernel(kernel: VldKernel): void;
|
|
20
|
+
/**
|
|
21
|
+
* Global kernel'i sıfırlar
|
|
22
|
+
*/
|
|
23
|
+
export declare function resetGlobalKernel(): void;
|
|
24
|
+
import type { PluginBuilder } from './types.js';
|
|
25
|
+
/**
|
|
26
|
+
* Plugin builder oluşturur
|
|
27
|
+
*/
|
|
28
|
+
export declare function definePlugin(): PluginBuilder;
|
|
29
|
+
//# sourceMappingURL=kernel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../src/plugins/kernel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAOjB,MAAM,YAAY,CAAC;AAwcpB;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAErE;AAQD;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAK3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAEvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAKxC;AAMD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;GAEG;AACH,wBAAgB,YAAY,IAAI,aAAa,CA6F5C"}
|