@earendil-works/pi-schema 0.0.0-stage → 0.0.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 +13 -0
- package/LICENSES/typebox-LICENSE +23 -0
- package/README.md +295 -2
- package/dist/annotations.d.ts +44 -0
- package/dist/annotations.d.ts.map +1 -0
- package/dist/annotations.js +193 -0
- package/dist/annotations.js.map +1 -0
- package/dist/builders.d.ts +114 -0
- package/dist/builders.d.ts.map +1 -0
- package/dist/builders.js +98 -0
- package/dist/builders.js.map +1 -0
- package/dist/checks.d.ts +87 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +447 -0
- package/dist/checks.js.map +1 -0
- package/dist/coerce.d.ts +53 -0
- package/dist/coerce.d.ts.map +1 -0
- package/dist/coerce.js +585 -0
- package/dist/coerce.js.map +1 -0
- package/dist/compiler.d.ts +53 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +532 -0
- package/dist/compiler.js.map +1 -0
- package/dist/explain.d.ts +29 -0
- package/dist/explain.d.ts.map +1 -0
- package/dist/explain.js +381 -0
- package/dist/explain.js.map +1 -0
- package/dist/formats/index.d.ts +7 -0
- package/dist/formats/index.d.ts.map +1 -0
- package/dist/formats/index.js +51 -0
- package/dist/formats/index.js.map +1 -0
- package/dist/formats/typebox/date.d.ts +7 -0
- package/dist/formats/typebox/date.d.ts.map +1 -0
- package/dist/formats/typebox/date.js +47 -0
- package/dist/formats/typebox/date.js.map +1 -0
- package/dist/formats/typebox/date_time.d.ts +7 -0
- package/dist/formats/typebox/date_time.d.ts.map +1 -0
- package/dist/formats/typebox/date_time.js +39 -0
- package/dist/formats/typebox/date_time.js.map +1 -0
- package/dist/formats/typebox/duration.d.ts +6 -0
- package/dist/formats/typebox/duration.d.ts.map +1 -0
- package/dist/formats/typebox/duration.js +36 -0
- package/dist/formats/typebox/duration.js.map +1 -0
- package/dist/formats/typebox/email.d.ts +6 -0
- package/dist/formats/typebox/email.d.ts.map +1 -0
- package/dist/formats/typebox/email.js +36 -0
- package/dist/formats/typebox/email.js.map +1 -0
- package/dist/formats/typebox/hostname.d.ts +8 -0
- package/dist/formats/typebox/hostname.d.ts.map +1 -0
- package/dist/formats/typebox/hostname.js +38 -0
- package/dist/formats/typebox/hostname.js.map +1 -0
- package/dist/formats/typebox/idn_email.d.ts +6 -0
- package/dist/formats/typebox/idn_email.d.ts.map +1 -0
- package/dist/formats/typebox/idn_email.js +36 -0
- package/dist/formats/typebox/idn_email.js.map +1 -0
- package/dist/formats/typebox/idn_hostname.d.ts +9 -0
- package/dist/formats/typebox/idn_hostname.d.ts.map +1 -0
- package/dist/formats/typebox/idn_hostname.js +39 -0
- package/dist/formats/typebox/idn_hostname.js.map +1 -0
- package/dist/formats/typebox/idna/format/bidi.d.ts +4 -0
- package/dist/formats/typebox/idna/format/bidi.d.ts.map +1 -0
- package/dist/formats/typebox/idna/format/bidi.js +132 -0
- package/dist/formats/typebox/idna/format/bidi.js.map +1 -0
- package/dist/formats/typebox/idna/format/puny.d.ts +4 -0
- package/dist/formats/typebox/idna/format/puny.d.ts.map +1 -0
- package/dist/formats/typebox/idna/format/puny.js +172 -0
- package/dist/formats/typebox/idna/format/puny.js.map +1 -0
- package/dist/formats/typebox/idna/hostname.d.ts +2 -0
- package/dist/formats/typebox/idna/hostname.d.ts.map +1 -0
- package/dist/formats/typebox/idna/hostname.js +43 -0
- package/dist/formats/typebox/idna/hostname.js.map +1 -0
- package/dist/formats/typebox/idna/idn-hostname.d.ts +2 -0
- package/dist/formats/typebox/idna/idn-hostname.d.ts.map +1 -0
- package/dist/formats/typebox/idna/idn-hostname.js +71 -0
- package/dist/formats/typebox/idna/idn-hostname.js.map +1 -0
- package/dist/formats/typebox/idna/index.d.ts +3 -0
- package/dist/formats/typebox/idna/index.d.ts.map +1 -0
- package/dist/formats/typebox/idna/index.js +30 -0
- package/dist/formats/typebox/idna/index.js.map +1 -0
- package/dist/formats/typebox/idna/label/ascii.d.ts +2 -0
- package/dist/formats/typebox/idna/label/ascii.d.ts.map +1 -0
- package/dist/formats/typebox/idna/label/ascii.js +37 -0
- package/dist/formats/typebox/idna/label/ascii.js.map +1 -0
- package/dist/formats/typebox/idna/label/puny.d.ts +2 -0
- package/dist/formats/typebox/idna/label/puny.d.ts.map +1 -0
- package/dist/formats/typebox/idna/label/puny.js +56 -0
- package/dist/formats/typebox/idna/label/puny.js.map +1 -0
- package/dist/formats/typebox/idna/label/unicode.d.ts +2 -0
- package/dist/formats/typebox/idna/label/unicode.d.ts.map +1 -0
- package/dist/formats/typebox/idna/label/unicode.js +134 -0
- package/dist/formats/typebox/idna/label/unicode.js.map +1 -0
- package/dist/formats/typebox/idna/pattern/pattern.d.ts +31 -0
- package/dist/formats/typebox/idna/pattern/pattern.d.ts.map +1 -0
- package/dist/formats/typebox/idna/pattern/pattern.js +98 -0
- package/dist/formats/typebox/idna/pattern/pattern.js.map +1 -0
- package/dist/formats/typebox/ipv4.d.ts +6 -0
- package/dist/formats/typebox/ipv4.d.ts.map +1 -0
- package/dist/formats/typebox/ipv4.js +36 -0
- package/dist/formats/typebox/ipv4.js.map +1 -0
- package/dist/formats/typebox/ipv6.d.ts +6 -0
- package/dist/formats/typebox/ipv6.d.ts.map +1 -0
- package/dist/formats/typebox/ipv6.js +36 -0
- package/dist/formats/typebox/ipv6.js.map +1 -0
- package/dist/formats/typebox/iri.d.ts +6 -0
- package/dist/formats/typebox/iri.d.ts.map +1 -0
- package/dist/formats/typebox/iri.js +63 -0
- package/dist/formats/typebox/iri.js.map +1 -0
- package/dist/formats/typebox/iri_reference.d.ts +6 -0
- package/dist/formats/typebox/iri_reference.d.ts.map +1 -0
- package/dist/formats/typebox/iri_reference.js +40 -0
- package/dist/formats/typebox/iri_reference.js.map +1 -0
- package/dist/formats/typebox/json_pointer.d.ts +7 -0
- package/dist/formats/typebox/json_pointer.d.ts.map +1 -0
- package/dist/formats/typebox/json_pointer.js +37 -0
- package/dist/formats/typebox/json_pointer.js.map +1 -0
- package/dist/formats/typebox/json_pointer_uri_fragment.d.ts +7 -0
- package/dist/formats/typebox/json_pointer_uri_fragment.d.ts.map +1 -0
- package/dist/formats/typebox/json_pointer_uri_fragment.js +37 -0
- package/dist/formats/typebox/json_pointer_uri_fragment.js.map +1 -0
- package/dist/formats/typebox/regex.d.ts +6 -0
- package/dist/formats/typebox/regex.d.ts.map +1 -0
- package/dist/formats/typebox/regex.js +41 -0
- package/dist/formats/typebox/regex.js.map +1 -0
- package/dist/formats/typebox/relative_json_pointer.d.ts +7 -0
- package/dist/formats/typebox/relative_json_pointer.d.ts.map +1 -0
- package/dist/formats/typebox/relative_json_pointer.js +37 -0
- package/dist/formats/typebox/relative_json_pointer.js.map +1 -0
- package/dist/formats/typebox/time.d.ts +6 -0
- package/dist/formats/typebox/time.d.ts.map +1 -0
- package/dist/formats/typebox/time.js +60 -0
- package/dist/formats/typebox/time.js.map +1 -0
- package/dist/formats/typebox/uri.d.ts +6 -0
- package/dist/formats/typebox/uri.d.ts.map +1 -0
- package/dist/formats/typebox/uri.js +36 -0
- package/dist/formats/typebox/uri.js.map +1 -0
- package/dist/formats/typebox/uri_reference.d.ts +6 -0
- package/dist/formats/typebox/uri_reference.d.ts.map +1 -0
- package/dist/formats/typebox/uri_reference.js +36 -0
- package/dist/formats/typebox/uri_reference.js.map +1 -0
- package/dist/formats/typebox/uri_template.d.ts +6 -0
- package/dist/formats/typebox/uri_template.d.ts.map +1 -0
- package/dist/formats/typebox/uri_template.js +37 -0
- package/dist/formats/typebox/uri_template.js.map +1 -0
- package/dist/formats/typebox/url.d.ts +7 -0
- package/dist/formats/typebox/url.d.ts.map +1 -0
- package/dist/formats/typebox/url.js +36 -0
- package/dist/formats/typebox/url.js.map +1 -0
- package/dist/formats/typebox/uuid.d.ts +7 -0
- package/dist/formats/typebox/uuid.d.ts.map +1 -0
- package/dist/formats/typebox/uuid.js +37 -0
- package/dist/formats/typebox/uuid.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/resolver.d.ts +57 -0
- package/dist/resolver.d.ts.map +1 -0
- package/dist/resolver.js +202 -0
- package/dist/resolver.js.map +1 -0
- package/dist/shared.d.ts +9 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +33 -0
- package/dist/shared.js.map +1 -0
- package/dist/typebox-static.d.ts +48 -0
- package/dist/typebox-static.d.ts.map +1 -0
- package/dist/typebox-static.js +5 -0
- package/dist/typebox-static.js.map +1 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/validator.d.ts +39 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +71 -0
- package/dist/validator.js.map +1 -0
- package/package.json +59 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json_pointer.js","sourceRoot":"","sources":["../../../src/formats/typebox/json_pointer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IAC1C,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst JsonPointer = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\n\n/**\n * Returns true if the value is a json pointer\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointer(value: string): boolean {\n\treturn JsonPointer.test(value);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if the value is a json pointer uri fragment
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6901
|
|
4
|
+
* @source https://github.com/ajv-validator/ajv-formats
|
|
5
|
+
*/
|
|
6
|
+
export declare function IsJsonPointerUriFragment(value: string): boolean;
|
|
7
|
+
//# sourceMappingURL=json_pointer_uri_fragment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json_pointer_uri_fragment.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/json_pointer_uri_fragment.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const JsonPointerUriFragment = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is a json pointer uri fragment
|
|
31
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6901
|
|
32
|
+
* @source https://github.com/ajv-validator/ajv-formats
|
|
33
|
+
*/
|
|
34
|
+
export function IsJsonPointerUriFragment(value) {
|
|
35
|
+
return JsonPointerUriFragment.test(value);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=json_pointer_uri_fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json_pointer_uri_fragment.js","sourceRoot":"","sources":["../../../src/formats/typebox/json_pointer_uri_fragment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,sBAAsB,GAAG,8DAA8D,CAAC;AAE9F;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACrD,OAAO,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst JsonPointerUriFragment = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\n\n/**\n * Returns true if the value is a json pointer uri fragment\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointerUriFragment(value: string): boolean {\n\treturn JsonPointerUriFragment.test(value);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/regex.ts"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAO9C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if the value is a regular expression string pattern
|
|
30
|
+
* @specification https://ecma-international.org/ecma-262
|
|
31
|
+
*/
|
|
32
|
+
export function IsRegex(value) {
|
|
33
|
+
try {
|
|
34
|
+
new RegExp(value, "u");
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=regex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../src/formats/typebox/regex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACpC,IAAI,CAAC;QACJ,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\n/**\n * Returns true if the value is a regular expression string pattern\n * @specification https://ecma-international.org/ecma-262\n */\nexport function IsRegex(value: string): boolean {\n\ttry {\n\t\tnew RegExp(value, \"u\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if the value is a relative json pointer
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6901
|
|
4
|
+
* @source https://github.com/ajv-validator/ajv-formats
|
|
5
|
+
*/
|
|
6
|
+
export declare function IsRelativeJsonPointer(value: string): boolean;
|
|
7
|
+
//# sourceMappingURL=relative_json_pointer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative_json_pointer.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/relative_json_pointer.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const RelativeJsonPointer = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is a relative json pointer
|
|
31
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6901
|
|
32
|
+
* @source https://github.com/ajv-validator/ajv-formats
|
|
33
|
+
*/
|
|
34
|
+
export function IsRelativeJsonPointer(value) {
|
|
35
|
+
return RelativeJsonPointer.test(value);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=relative_json_pointer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative_json_pointer.js","sourceRoot":"","sources":["../../../src/formats/typebox/relative_json_pointer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,mBAAmB,GAAG,kDAAkD,CAAC;AAE/E;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IAClD,OAAO,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst RelativeJsonPointer = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n\n/**\n * Returns true if the value is a relative json pointer\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsRelativeJsonPointer(value: string): boolean {\n\treturn RelativeJsonPointer.test(value);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/time.ts"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,GAAE,OAAc,GAAG,OAAO,CAqB7E"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is an ISO time string
|
|
31
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3339
|
|
32
|
+
*/
|
|
33
|
+
export function IsTime(value, strictTimeZone = true) {
|
|
34
|
+
const matches = TIME.exec(value);
|
|
35
|
+
if (!matches)
|
|
36
|
+
return false;
|
|
37
|
+
// Require timezone offset or 'Z'/'z' when strictTimeZone is true
|
|
38
|
+
if (strictTimeZone && !matches[4] && !matches[5])
|
|
39
|
+
return false;
|
|
40
|
+
const hr = +matches[1];
|
|
41
|
+
const min = +matches[2];
|
|
42
|
+
const sec = +matches[3];
|
|
43
|
+
if (hr > 23 || min > 59 || sec > 60)
|
|
44
|
+
return false;
|
|
45
|
+
if (matches[5]) {
|
|
46
|
+
const tzH = +matches[6];
|
|
47
|
+
const tzM = +matches[7];
|
|
48
|
+
if (tzH > 23 || tzM > 59)
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
if (sec < 60)
|
|
52
|
+
return true;
|
|
53
|
+
// Leap second handling: must normalize to 23:59:60 UTC (1439 total UTC minutes)
|
|
54
|
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
55
|
+
const tzH = +(matches[6] || 0);
|
|
56
|
+
const tzM = +(matches[7] || 0);
|
|
57
|
+
const totalUtcMin = hr * 60 + min - tzSign * (tzH * 60 + tzM);
|
|
58
|
+
return ((totalUtcMin % 1440) + 1440) % 1440 === 1439;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../../src/formats/typebox/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAE/E;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAa,EAAE,cAAc,GAAY,IAAI;IACnE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,C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CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;AACtD,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.\\d+)?(?:([Zz])|([+-])(\\d\\d):(\\d\\d))?$/;\n\n/**\n * Returns true if the value is an ISO time string\n * @specification https://datatracker.ietf.org/doc/html/rfc3339\n */\nexport function IsTime(value: string, strictTimeZone: boolean = true): boolean {\n\tconst matches = TIME.exec(value);\n\tif (!matches) return false;\n\t// Require timezone offset or 'Z'/'z' when strictTimeZone is true\n\tif (strictTimeZone && !matches[4] && !matches[5]) return false;\n\tconst hr = +matches[1];\n\tconst min = +matches[2];\n\tconst sec = +matches[3];\n\tif (hr > 23 || min > 59 || sec > 60) return false;\n\tif (matches[5]) {\n\t\tconst tzH = +matches[6];\n\t\tconst tzM = +matches[7];\n\t\tif (tzH > 23 || tzM > 59) return false;\n\t}\n\tif (sec < 60) return true;\n\t// Leap second handling: must normalize to 23:59:60 UTC (1439 total UTC minutes)\n\tconst tzSign = matches[5] === \"-\" ? -1 : 1;\n\tconst tzH = +(matches[6] || 0);\n\tconst tzM = +(matches[7] || 0);\n\tconst totalUtcMin = hr * 60 + min - tzSign * (tzH * 60 + tzM);\n\treturn ((totalUtcMin % 1440) + 1440) % 1440 === 1439;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/uri.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const Uri = /^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is a valid Uniform Resource Identifier.
|
|
31
|
+
* @specification https://tools.ietf.org/html/rfc3986
|
|
32
|
+
*/
|
|
33
|
+
export function IsUri(value) {
|
|
34
|
+
return Uri.test(value);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=uri.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../../src/formats/typebox/uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,GAAG,GACR,ivDAAivD,CAAC;AAEnvD;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IAClC,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst Uri =\n\t/^[a-z][a-z0-9+\\-.]*:(?:\\/\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?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1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4})?::[\\da-f]{1,4}|(?:(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4})?::)|v[0-9a-f]+\\.[-a-z0-9._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n\n/**\n * Returns true if the value is a valid Uniform Resource Identifier.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUri(value: string): boolean {\n\treturn Uri.test(value);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri_reference.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/uri_reference.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const UriReference = /^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|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\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is a valid Uri Reference.
|
|
31
|
+
* @specification https://tools.ietf.org/html/rfc3986
|
|
32
|
+
*/
|
|
33
|
+
export function IsUriReference(value) {
|
|
34
|
+
return UriReference.test(value);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=uri_reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri_reference.js","sourceRoot":"","sources":["../../../src/formats/typebox/uri_reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,YAAY,GACjB,u2GAAu2G,CAAC;AAEz2G;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC3C,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst UriReference =\n\t/^(?:[a-z][a-z0-9+\\-.]*:(?:\\/\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(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()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n\n/**\n * Returns true if the value is a valid Uri Reference.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUriReference(value: string): boolean {\n\treturn UriReference.test(value);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri_template.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/uri_template.ts"],"names":[],"mappings":"AAiCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
// deno-lint-ignore-file no-control-regex
|
|
29
|
+
const UriTemplate = /^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;
|
|
30
|
+
/**
|
|
31
|
+
* Returns true if the value is a valid Uri Template
|
|
32
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6570
|
|
33
|
+
*/
|
|
34
|
+
export function IsUriTemplate(value) {
|
|
35
|
+
return UriTemplate.test(value);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=uri_template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uri_template.js","sourceRoot":"","sources":["../../../src/formats/typebox/uri_template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,yCAAyC;AAEzC,MAAM,WAAW,GAChB,oPAAoP,CAAC;AAEtP;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IAC1C,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\n// deno-lint-ignore-file no-control-regex\n\nconst UriTemplate =\n\t/^(?:(?:[^\\x00-\\x20\"<>%\\\\^`{|}\\x7f]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?)*\\})*$/i;\n\n/**\n * Returns true if the value is a valid Uri Template\n * @specification https://datatracker.ietf.org/doc/html/rfc6570\n */\nexport function IsUriTemplate(value: string): boolean {\n\treturn UriTemplate.test(value);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if the value is a valid Uniform Resource Locator
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3986
|
|
4
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3987
|
|
5
|
+
*/
|
|
6
|
+
export declare function IsUrl(value: string): boolean;
|
|
7
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/url.ts"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if the value is a valid Uniform Resource Locator
|
|
30
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3986
|
|
31
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3987
|
|
32
|
+
*/
|
|
33
|
+
export function IsUrl(value) {
|
|
34
|
+
return URL.canParse(value);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/formats/typebox/url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IAClC,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\n/**\n * Returns true if the value is a valid Uniform Resource Locator\n * @specification https://datatracker.ietf.org/doc/html/rfc3986\n * @specification https://datatracker.ietf.org/doc/html/rfc3987\n */\nexport function IsUrl(value: string): boolean {\n\treturn URL.canParse(value);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../src/formats/typebox/uuid.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE7C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*--------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
TypeBox
|
|
4
|
+
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2017-2026 Haydn Paterson
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in
|
|
17
|
+
all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
THE SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---------------------------------------------------------------------------*/
|
|
28
|
+
const Uuid = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the value is a uuid
|
|
31
|
+
* @specification https://www.rfc-editor.org/info/rfc4122/
|
|
32
|
+
* @specification https://www.rfc-editor.org/info/rfc9562/
|
|
33
|
+
*/
|
|
34
|
+
export function IsUuid(value) {
|
|
35
|
+
return Uuid.test(value);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../../src/formats/typebox/uuid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0B6E;AAE7E,MAAM,IAAI,GAAG,gDAAgD,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,KAAa;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC","sourcesContent":["/*--------------------------------------------------------------------------\n\nTypeBox\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2026 Haydn Paterson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nconst Uuid = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\n\n/**\n * Returns true if the value is a uuid\n * @specification https://www.rfc-editor.org/info/rfc4122/\n * @specification https://www.rfc-editor.org/info/rfc9562/\n */\nexport function IsUuid(value: string): boolean {\n\treturn Uuid.test(value);\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type Annotations, arr, bool, bytes, int, type LengthBounds, lit, map, type NumberBounds, nul, nullable, num, Optional, obj, oneOf, opt, type Properties, type Schema, type Static, type StaticObject, str, tuple, union, unknown, } from "./builders.ts";
|
|
2
|
+
export type { Check, CompileOptions, FormatCheck, JsonSchema, ParseResult, ValidationError } from "./types.ts";
|
|
3
|
+
export { CoercingValidator, compile, Validator } from "./validator.ts";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,WAAW,EAChB,GAAG,EACH,IAAI,EACJ,KAAK,EACL,GAAG,EACH,KAAK,YAAY,EACjB,GAAG,EACH,GAAG,EACH,KAAK,YAAY,EACjB,GAAG,EACH,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,GAAG,EACH,KAAK,EACL,GAAG,EACH,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,GAAG,EACH,KAAK,EACL,KAAK,EACL,OAAO,GACP,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// JSON Schema validation (drafts 2020-12 and 7) without eval: compile() builds a schema into plain closures once.
|
|
2
|
+
// The builders return plain JSON Schema objects typed with the values they accept.
|
|
3
|
+
export { arr, bool, bytes, int, lit, map, nul, nullable, num, Optional, obj, oneOf, opt, str, tuple, union, unknown, } from "./builders.js";
|
|
4
|
+
export { CoercingValidator, compile, Validator } from "./validator.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,mFAAmF;AAEnF,OAAO,EAEN,GAAG,EACH,IAAI,EACJ,KAAK,EACL,GAAG,EAEH,GAAG,EACH,GAAG,EAEH,GAAG,EACH,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,GAAG,EACH,KAAK,EACL,GAAG,EAKH,GAAG,EACH,KAAK,EACL,KAAK,EACL,OAAO,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["// JSON Schema validation (drafts 2020-12 and 7) without eval: compile() builds a schema into plain closures once.\n// The builders return plain JSON Schema objects typed with the values they accept.\n\nexport {\n\ttype Annotations,\n\tarr,\n\tbool,\n\tbytes,\n\tint,\n\ttype LengthBounds,\n\tlit,\n\tmap,\n\ttype NumberBounds,\n\tnul,\n\tnullable,\n\tnum,\n\tOptional,\n\tobj,\n\toneOf,\n\topt,\n\ttype Properties,\n\ttype Schema,\n\ttype Static,\n\ttype StaticObject,\n\tstr,\n\ttuple,\n\tunion,\n\tunknown,\n} from \"./builders.ts\";\nexport type { Check, CompileOptions, FormatCheck, JsonSchema, ParseResult, ValidationError } from \"./types.ts\";\nexport { CoercingValidator, compile, Validator } from \"./validator.ts\";\n"]}
|