@atproto/lexicon-resolver 0.3.1 → 0.3.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atproto/lexicon-resolver
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0dbea15`](https://github.com/bluesky-social/atproto/commit/0dbea15da48a6ca913cc3a3a2d8c0ffe64d7c69a), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`d0c136c`](https://github.com/bluesky-social/atproto/commit/d0c136cba2ec8fa97017849b1023d5af5d2cc60c), [`527f5d4`](https://github.com/bluesky-social/atproto/commit/527f5d4c5d0c9264c2ff6f23ad06a41163fc6809)]:
8
+ - @atproto/syntax@0.5.2
9
+ - @atproto/repo@0.9.0
10
+ - @atproto/lex@0.0.23
11
+ - @atproto/lex-document@0.0.18
12
+
13
+ ## 0.3.2
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies []:
18
+ - @atproto/lex@0.0.22
19
+ - @atproto/lex-document@0.0.17
20
+
3
21
  ## 0.3.1
4
22
 
5
23
  ### Patch Changes
@@ -15,23 +15,26 @@ declare const main: l.RecordSchema<"nsid", "com.atproto.lexicon.schema", l.Valid
15
15
  export { main };
16
16
  export declare const $isTypeOf: <TValue extends {
17
17
  $type?: unknown;
18
- }>(value: TValue) => value is l.TypedRecord<"com.atproto.lexicon.schema", TValue>, $build: (input: Omit<{
19
- lexicon: number;
20
- $type: "com.atproto.lexicon.schema";
21
- }, "$type">) => {
22
- lexicon: number;
23
- $type: "com.atproto.lexicon.schema";
18
+ }>(value: TValue) => value is l.TypedRecord<"com.atproto.lexicon.schema", TValue>, $build: {
19
+ (input: Omit<Omit<Main, "$type">, "$type">): {
20
+ lexicon: number;
21
+ $type: "com.atproto.lexicon.schema";
22
+ };
23
+ (input: Omit<Omit<Main, "$type">, "$type">): {
24
+ lexicon: number;
25
+ $type: "com.atproto.lexicon.schema";
26
+ };
24
27
  }, $type: "com.atproto.lexicon.schema";
25
- export declare const $assert: (input: unknown) => asserts input is {
28
+ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
26
29
  lexicon: number;
27
30
  $type: "com.atproto.lexicon.schema";
28
- }, $check: (input: unknown) => void, $cast: <I>(input: I) => I & {
31
+ }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
29
32
  lexicon: number;
30
33
  $type: "com.atproto.lexicon.schema";
31
- }, $ifMatches: <I>(input: I) => (I & {
34
+ }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
32
35
  lexicon: number;
33
36
  $type: "com.atproto.lexicon.schema";
34
- }) | undefined, $matches: <I>(input: I) => input is I & {
37
+ }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
35
38
  lexicon: number;
36
39
  $type: "com.atproto.lexicon.schema";
37
40
  }, $parse: (input: unknown, options?: l.ParseOptions) => {
@@ -1 +1 @@
1
- {"version":3,"file":"schema.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/lexicon/schema.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAEhC,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,wUAAwU;AACxU,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,4BAA4B,CAAA;IAEnC;;OAEG;IACH,OAAO,EAAE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M;;CAiB0C,EACzD,MAAM,uDAAsC,EAC5C,KAAK;aAnBI,MAAM;;CAmB2B,EAC1C,UAAU;aApBD,MAAM;;cAoBqC,EACpD,QAAQ;aArBC,MAAM;;CAqBiC,EAChD,MAAM;aAtBG,MAAM;;CAsB6B,EAC5C,UAAU;aAvBD,MAAM;;EAuBqC,EACpD,SAAS;aAxBA,MAAM;;CAwBmC,EAClD,aAAa;aAzBJ,MAAM;;EAyB2C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/lexicon-resolver",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "description": "ATProto Lexicon resolution",
@@ -25,19 +25,20 @@
25
25
  "dependencies": {
26
26
  "@atproto-labs/fetch-node": "^0.2.0",
27
27
  "@atproto/identity": "^0.4.12",
28
- "@atproto/lex": "^0.0.21",
29
- "@atproto/lex-document": "^0.0.16",
30
- "@atproto/repo": "^0.8.13",
31
- "@atproto/syntax": "^0.5.1"
28
+ "@atproto/lex": "^0.0.23",
29
+ "@atproto/lex-document": "^0.0.18",
30
+ "@atproto/repo": "^0.9.0",
31
+ "@atproto/syntax": "^0.5.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "jest": "^28.1.2",
35
35
  "typescript": "^5.6.3",
36
- "@atproto/lex-cbor": "^0.0.14"
36
+ "@atproto/lex-cbor": "^0.0.15"
37
37
  },
38
38
  "scripts": {
39
39
  "test": "jest",
40
40
  "build": "tsc --build tsconfig.build.json",
41
- "codegen": "lex build --indexFile --lexicons ../../lexicons --clear --include com.atproto.sync.getRecord --include com.atproto.lexicon.schema"
41
+ "prebuild": "pnpm run codegen",
42
+ "codegen": "lex build --override --indexFile --lexicons ../../lexicons --include com.atproto.sync.getRecord --include com.atproto.lexicon.schema"
42
43
  }
43
44
  }
@@ -42,7 +42,7 @@ describe('Lexicon resolution', () => {
42
42
  })
43
43
 
44
44
  it('resolves Lexicon.', async () => {
45
- const client = network.pds.getClient()
45
+ const client = network.pds.getAgent()
46
46
  const lex = await client.com.atproto.lexicon.schema.create(
47
47
  { repo: sc.dids.alice, rkey: 'example.alice.name1' },
48
48
  { id: 'example.alice.name1', lexicon: 1, defs: {} },
@@ -64,7 +64,7 @@ describe('Lexicon resolution', () => {
64
64
  })
65
65
 
66
66
  it('fails on mismatched id.', async () => {
67
- const client = network.pds.getClient()
67
+ const client = network.pds.getAgent()
68
68
  await client.com.atproto.lexicon.schema.create(
69
69
  { repo: sc.dids.alice, rkey: 'example.alice.mismatch' },
70
70
  { id: 'example.test1.mismatch.bad', lexicon: 1, defs: {} },
@@ -80,7 +80,7 @@ describe('Lexicon resolution', () => {
80
80
  })
81
81
 
82
82
  it('fails on missing DNS entry.', async () => {
83
- const client = network.pds.getClient()
83
+ const client = network.pds.getAgent()
84
84
  await client.com.atproto.lexicon.schema.create(
85
85
  { repo: sc.dids.bob, rkey: 'example.bob.name' },
86
86
  { id: 'example.bob.name', lexicon: 1, defs: {} },
@@ -104,7 +104,7 @@ describe('Lexicon resolution', () => {
104
104
  })
105
105
 
106
106
  it('fails on bad verification.', async () => {
107
- const client = network.pds.getClient()
107
+ const client = network.pds.getAgent()
108
108
  const alicekey = await network.pds.ctx.actorStore.keypair(sc.dids.alice)
109
109
  const bobkey = await network.pds.ctx.actorStore.keypair(sc.dids.bob)
110
110
  await client.com.atproto.lexicon.schema.create(
@@ -142,7 +142,7 @@ describe('Lexicon resolution', () => {
142
142
  })
143
143
 
144
144
  it('fails on invalid Lexicon document.', async () => {
145
- const client = network.pds.getClient()
145
+ const client = network.pds.getAgent()
146
146
  await client.com.atproto.lexicon.schema.create(
147
147
  { repo: sc.dids.alice, rkey: 'example.alice.baddoc' },
148
148
  { id: 'example.alice.baddoc', lexicon: 999, defs: {} },
@@ -164,7 +164,7 @@ describe('Lexicon resolution', () => {
164
164
  })
165
165
 
166
166
  it('resolves Lexicon based on override authority.', async () => {
167
- const client = network.pds.getClient()
167
+ const client = network.pds.getAgent()
168
168
  await client.com.atproto.lexicon.schema.create(
169
169
  { repo: sc.dids.alice, rkey: 'example.alice.override' },
170
170
  {