@atproto/lexicon 0.2.1 → 0.2.3
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 +16 -0
- package/README.md +8 -5
- package/dist/index.js +20 -1
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +506 -506
- package/package.json +11 -5
- package/src/types.ts +3 -5
- package/tests/general.test.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atproto/lexicon
|
|
2
2
|
|
|
3
|
+
## 0.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`35d108ce`](https://github.com/bluesky-social/atproto/commit/35d108ce94866ce1b3d147cd0620a0ba1c4ebcd7)]:
|
|
8
|
+
- @atproto/common-web@0.2.2
|
|
9
|
+
- @atproto/syntax@0.1.3
|
|
10
|
+
|
|
11
|
+
## 0.2.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`41ee177f`](https://github.com/bluesky-social/atproto/commit/41ee177f5a440490280d17acd8a89bcddaffb23b)]:
|
|
16
|
+
- @atproto/common-web@0.2.1
|
|
17
|
+
- @atproto/syntax@0.1.2
|
|
18
|
+
|
|
3
19
|
## 0.2.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @atproto/lexicon: schema validation library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript implementation of the Lexicon data and API schema description language, which is part of [atproto](https://atproto.com).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
5
|
+
[](https://www.npmjs.com/package/@atproto/lexicon)
|
|
6
|
+
[](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
|
|
8
7
|
|
|
9
8
|
## Usage
|
|
10
9
|
|
|
@@ -29,3 +28,7 @@ lex.assertValidXrpcParams('com.example.query', {...})
|
|
|
29
28
|
lex.assertValidXrpcInput('com.example.procedure', {...})
|
|
30
29
|
lex.assertValidXrpcOutput('com.example.query', {...})
|
|
31
30
|
```
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -13916,6 +13916,25 @@ var validateLanguage = (langTag) => {
|
|
|
13916
13916
|
};
|
|
13917
13917
|
var bcp47Regexp = /^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUseA>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUseB>x(-[A-Za-z0-9]{1,8})+))$/;
|
|
13918
13918
|
|
|
13919
|
+
// ../common-web/src/did-doc.ts
|
|
13920
|
+
var verificationMethod = z.object({
|
|
13921
|
+
id: z.string(),
|
|
13922
|
+
type: z.string(),
|
|
13923
|
+
controller: z.string(),
|
|
13924
|
+
publicKeyMultibase: z.string().optional()
|
|
13925
|
+
});
|
|
13926
|
+
var service = z.object({
|
|
13927
|
+
id: z.string(),
|
|
13928
|
+
type: z.string(),
|
|
13929
|
+
serviceEndpoint: z.union([z.string(), z.record(z.unknown())])
|
|
13930
|
+
});
|
|
13931
|
+
var didDocument = z.object({
|
|
13932
|
+
id: z.string(),
|
|
13933
|
+
alsoKnownAs: z.array(z.string()).optional(),
|
|
13934
|
+
verificationMethod: z.array(verificationMethod).optional(),
|
|
13935
|
+
service: z.array(service).optional()
|
|
13936
|
+
});
|
|
13937
|
+
|
|
13919
13938
|
// src/validators/formats.ts
|
|
13920
13939
|
var import_iso_datestring_validator = __toESM(require_dist());
|
|
13921
13940
|
function datetime(path, value) {
|
|
@@ -14628,7 +14647,7 @@ var lexObject = z.object({
|
|
|
14628
14647
|
description: z.string().optional(),
|
|
14629
14648
|
required: z.string().array().optional(),
|
|
14630
14649
|
nullable: z.string().array().optional(),
|
|
14631
|
-
properties: z.record(z.union([lexRefVariant, lexIpldType, lexArray, lexBlob, lexPrimitive]))
|
|
14650
|
+
properties: z.record(z.union([lexRefVariant, lexIpldType, lexArray, lexBlob, lexPrimitive]))
|
|
14632
14651
|
}).strict().superRefine(requiredPropertiesRefinement);
|
|
14633
14652
|
var lexXrpcParameters = z.object({
|
|
14634
14653
|
type: z.literal("params"),
|