a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: enable erasableSyntaxOnly for most packages

Mary d8ad730d dca650b0

+361 -214
+2 -1
packages/bluesky/richtext-builder/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/bluesky/richtext-parser/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/bluesky/richtext-segmenter/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/bluesky/search-parser/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/bluesky/threading/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/cache/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/client/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/firehose/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/jetstream/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/password-session/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/clients/tap/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/definitions/atproto/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/bluemoji/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/bluesky/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/frontpage/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/leaflet/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/lexicon-community/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/microcosm/tsconfig.lib.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/definitions/ozone/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/pckt/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/standard-site/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/tangled/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/definitions/whitewind/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+6 -5
packages/identity/did-plc/lib/client.ts
··· 17 17 export class PlcClientError extends Error { 18 18 override readonly name = 'PlcClientError'; 19 19 20 - constructor( 21 - public status: number, 22 - public body: PlcErrorBody | null, 23 - message: string, 24 - ) { 20 + status: number; 21 + body: PlcErrorBody | null; 22 + 23 + constructor(status: number, body: PlcErrorBody | null, message: string) { 25 24 super(message); 25 + this.status = status; 26 + this.body = body; 26 27 } 27 28 28 29 /**
+28 -17
packages/identity/did-plc/lib/errors.ts
··· 7 7 export class ImproperOperationError extends PlcError { 8 8 override name = 'ImproperOperationError'; 9 9 10 - constructor( 11 - public operation: t.IndexedEntry, 12 - public reason: string, 13 - ) { 10 + operation: t.IndexedEntry; 11 + reason: string; 12 + 13 + constructor(operation: t.IndexedEntry, reason: string) { 14 14 super(`improper operation; cid=${operation.cid}; reason=${reason}`); 15 + this.operation = operation; 16 + this.reason = reason; 15 17 } 16 18 } 17 19 18 20 export class InvalidSignatureError extends PlcError { 19 21 override name = 'InvalidSignatureError'; 20 22 21 - constructor(public operation: t.IndexedEntry) { 23 + operation: t.IndexedEntry; 24 + 25 + constructor(operation: t.IndexedEntry) { 22 26 super(`invalid signature; cid=${operation.cid}`); 27 + this.operation = operation; 23 28 } 24 29 } 25 30 26 31 export class InvalidHashError extends PlcError { 27 32 override name = 'InvalidHashError'; 28 33 29 - constructor( 30 - public operation: t.IndexedEntry, 31 - public expected: string, 32 - ) { 34 + operation: t.IndexedEntry; 35 + expected: string; 36 + 37 + constructor(operation: t.IndexedEntry, expected: string) { 33 38 super(`invalid hash; expected=${expected}; got=${operation.cid}`); 39 + this.operation = operation; 40 + this.expected = expected; 34 41 } 35 42 } 36 43 37 44 export class GenesisHashError extends PlcError { 38 45 override name = 'GenesisHashError'; 39 46 40 - constructor( 41 - public operation: t.IndexedEntry, 42 - public did: t.DidPlcString, 43 - ) { 47 + operation: t.IndexedEntry; 48 + did: t.DidPlcString; 49 + 50 + constructor(operation: t.IndexedEntry, did: t.DidPlcString) { 44 51 super(`mismatching genesis hash; did=${did}; cid=${operation.cid}`); 52 + this.operation = operation; 53 + this.did = did; 45 54 } 46 55 } 47 56 48 57 export class LateDisputeError extends PlcError { 49 58 override name = 'LateDisputeError'; 50 59 51 - constructor( 52 - public operation: t.IndexedEntry, 53 - public lapsed: number, 54 - ) { 60 + operation: t.IndexedEntry; 61 + lapsed: number; 62 + 63 + constructor(operation: t.IndexedEntry, lapsed: number) { 55 64 super(`dispute occured outside of permitted window; cid=${operation.cid}; lapsed=${lapsed}`); 65 + this.operation = operation; 66 + this.lapsed = lapsed; 56 67 } 57 68 }
+2 -1
packages/identity/did-plc/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/identity/identity-resolver-node/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+30 -16
packages/identity/identity-resolver/lib/errors.ts
··· 8 8 export class UnsupportedDidMethodError extends DidDocumentResolutionError { 9 9 override name = 'UnsupportedDidMethodError'; 10 10 11 - constructor(public did: Did) { 11 + did: Did; 12 + 13 + constructor(did: Did) { 12 14 super(`unsupported did method; did=${did}`); 15 + this.did = did; 13 16 } 14 17 } 15 18 16 19 export class ImproperDidError extends DidDocumentResolutionError { 17 20 override name = 'ImproperDidError'; 18 21 19 - constructor(public did: Did) { 22 + did: Did; 23 + 24 + constructor(did: Did) { 20 25 super(`improper did; did=${did}`); 26 + this.did = did; 21 27 } 22 28 } 23 29 24 30 export class DocumentNotFoundError extends DidDocumentResolutionError { 25 31 override name = 'DocumentNotFoundError'; 26 32 27 - constructor(public did: Did) { 33 + did: Did; 34 + 35 + constructor(did: Did) { 28 36 super(`did document not found; did=${did}`); 37 + this.did = did; 29 38 } 30 39 } 31 40 32 41 export class FailedDocumentResolutionError extends DidDocumentResolutionError { 33 42 override name = 'FailedDocumentResolutionError'; 34 43 35 - constructor( 36 - public did: Did, 37 - options?: ErrorOptions, 38 - ) { 44 + did: Did; 45 + 46 + constructor(did: Did, options?: ErrorOptions) { 39 47 super(`failed to resolve did document; did=${did}`, options); 48 + this.did = did; 40 49 } 41 50 } 42 51 // #endregion ··· 49 58 export class DidNotFoundError extends HandleResolutionError { 50 59 override name = 'DidNotFoundError'; 51 60 52 - constructor(public handle: string) { 61 + handle: string; 62 + 63 + constructor(handle: string) { 53 64 super(`handle returned no did; handle=${handle}`); 65 + this.handle = handle; 54 66 } 55 67 } 56 68 57 69 export class FailedHandleResolutionError extends HandleResolutionError { 58 70 override name = 'FailedHandleResolutionError'; 59 71 60 - constructor( 61 - public handle: string, 62 - options?: ErrorOptions, 63 - ) { 72 + handle: string; 73 + 74 + constructor(handle: string, options?: ErrorOptions) { 64 75 super(`failed to resolve handle; handle=${handle}`, options); 76 + this.handle = handle; 65 77 } 66 78 } 67 79 68 80 export class InvalidResolvedHandleError extends HandleResolutionError { 69 81 override name = 'InvalidResolvedHandleError'; 70 82 71 - constructor( 72 - public handle: string, 73 - public did: string, 74 - ) { 83 + handle: string; 84 + did: string; 85 + 86 + constructor(handle: string, did: string) { 75 87 super(`handle returned invalid did; handle=${handle}; did=${did}`); 88 + this.handle = handle; 89 + this.did = did; 76 90 } 77 91 } 78 92
+2 -1
packages/identity/identity-resolver/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/identity/identity/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+7 -4
packages/internal/dev-env/lib/network.ts
··· 8 8 }; 9 9 10 10 export class TestNetwork { 11 - constructor( 12 - public readonly plc: TestPlcServer, 13 - public readonly pds: TestPdsServer, 14 - ) {} 11 + readonly plc: TestPlcServer; 12 + readonly pds: TestPdsServer; 13 + 14 + constructor(plc: TestPlcServer, pds: TestPdsServer) { 15 + this.plc = plc; 16 + this.pds = pds; 17 + } 15 18 16 19 static async create(cfg: Partial<NetworkConfig>): Promise<TestNetwork> { 17 20 const plc = await TestPlcServer.create(cfg.plc ?? {});
+11 -6
packages/internal/dev-env/lib/pds.ts
··· 19 19 } 20 20 21 21 export class TestPdsServer { 22 - constructor( 23 - public readonly server: pds.PDS, 24 - public readonly url: string, 25 - public readonly port: number, 26 - public readonly additional: AdditionalPdsContext, 27 - ) {} 22 + readonly server: pds.PDS; 23 + readonly url: string; 24 + readonly port: number; 25 + readonly additional: AdditionalPdsContext; 26 + 27 + constructor(server: pds.PDS, url: string, port: number, additional: AdditionalPdsContext) { 28 + this.server = server; 29 + this.url = url; 30 + this.port = port; 31 + this.additional = additional; 32 + } 28 33 29 34 static async create(config: PdsServerOptions): Promise<TestPdsServer> { 30 35 const plcRotationKey = await Secp256k1Keypair.create({ exportable: true });
+9 -5
packages/internal/dev-env/lib/plc.ts
··· 6 6 } 7 7 8 8 export class TestPlcServer { 9 - constructor( 10 - public readonly server: PlcServer, 11 - public readonly url: string, 12 - public readonly port: number, 13 - ) {} 9 + readonly server: PlcServer; 10 + readonly url: string; 11 + readonly port: number; 12 + 13 + constructor(server: PlcServer, url: string, port: number) { 14 + this.server = server; 15 + this.url = url; 16 + this.port = port; 17 + } 14 18 15 19 static async create(cfg: PlcServerOptions = {}): Promise<TestPlcServer> { 16 20 const port = cfg.port ?? (await getPort());
+2 -1
packages/internal/dev-env/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["lib"] 26 27 }
+2 -1
packages/lexicons/lex-cli/tsconfig.json
··· 20 20 "module": "NodeNext", 21 21 "sourceMap": true, 22 22 "declaration": true, 23 - "declarationMap": true 23 + "declarationMap": true, 24 + "erasableSyntaxOnly": true 24 25 }, 25 26 "include": ["src"] 26 27 }
+2 -1
packages/lexicons/lexicon-doc/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/lexicons/lexicon-resolver-node/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+30 -22
packages/lexicons/lexicon-resolver/lib/errors.ts
··· 8 8 export class AuthorityNotFoundError extends LexiconAuthorityResolutionError { 9 9 override name = 'AuthorityNotFoundError'; 10 10 11 - constructor(public nsid: Nsid) { 11 + nsid: Nsid; 12 + 13 + constructor(nsid: Nsid) { 12 14 super(`lexicon authority not found; nsid=${nsid}`); 15 + this.nsid = nsid; 13 16 } 14 17 } 15 18 16 19 export class FailedAuthorityResolutionError extends LexiconAuthorityResolutionError { 17 20 override name = 'FailedAuthorityResolutionError'; 18 21 19 - constructor( 20 - public nsid: Nsid, 21 - options?: ErrorOptions, 22 - ) { 22 + nsid: Nsid; 23 + 24 + constructor(nsid: Nsid, options?: ErrorOptions) { 23 25 super(`failed to resolve lexicon authority; nsid=${nsid}`, options); 26 + this.nsid = nsid; 24 27 } 25 28 } 26 29 27 30 export class InvalidResolvedAuthorityError extends LexiconAuthorityResolutionError { 28 31 override name = 'InvalidResolvedAuthorityError'; 29 32 30 - constructor( 31 - public nsid: Nsid, 32 - public did: string, 33 - ) { 33 + nsid: Nsid; 34 + did: string; 35 + 36 + constructor(nsid: Nsid, did: string) { 34 37 super(`lexicon authority returned invalid did; nsid=${nsid}; did=${did}`); 38 + this.nsid = nsid; 39 + this.did = did; 35 40 } 36 41 } 37 42 38 43 export class AmbiguousAuthorityError extends LexiconAuthorityResolutionError { 39 44 override name = 'AmbiguousAuthorityError'; 40 45 41 - constructor(public nsid: Nsid) { 46 + nsid: Nsid; 47 + 48 + constructor(nsid: Nsid) { 42 49 super(`lexicon authority returned multiple did values; nsid=${nsid}`); 50 + this.nsid = nsid; 43 51 } 44 52 } 45 53 // #endregion ··· 52 60 export class FailedLexiconResolutionError extends LexiconResolutionError { 53 61 override name = 'FailedLexiconResolutionError'; 54 62 55 - constructor( 56 - public nsid: Nsid, 57 - options?: ErrorOptions, 58 - ) { 63 + nsid: Nsid; 64 + 65 + constructor(nsid: Nsid, options?: ErrorOptions) { 59 66 super(`failed to resolve lexicon; nsid=${nsid}`, options); 67 + this.nsid = nsid; 60 68 } 61 69 } 62 70 63 71 export class InvalidLexiconSchemaError extends LexiconResolutionError { 64 72 override name = 'InvalidLexiconSchemaError'; 65 73 66 - constructor( 67 - public nsid: Nsid, 68 - options?: ErrorOptions, 69 - ) { 74 + nsid: Nsid; 75 + 76 + constructor(nsid: Nsid, options?: ErrorOptions) { 70 77 super(`invalid lexicon schema; nsid=${nsid}`, options); 78 + this.nsid = nsid; 71 79 } 72 80 } 73 81 74 82 export class InvalidLexiconProofError extends LexiconResolutionError { 75 83 override name = 'InvalidLexiconProofError'; 76 84 77 - constructor( 78 - public nsid: Nsid, 79 - options?: ErrorOptions, 80 - ) { 85 + nsid: Nsid; 86 + 87 + constructor(nsid: Nsid, options?: ErrorOptions) { 81 88 super(`invalid lexicon record proof; nsid=${nsid}`, options); 89 + this.nsid = nsid; 82 90 } 83 91 } 84 92 // #endregion
+2 -1
packages/lexicons/lexicon-resolver/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/lexicons/lexicons/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/misc/time-ms/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/misc/uint8array/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+14 -10
packages/misc/util-fetch/lib/errors.ts
··· 5 5 export class FailedResponseError extends FetchResponseError { 6 6 override name = 'FailedResponseError'; 7 7 8 - constructor(public response: Response) { 8 + response: Response; 9 + 10 + constructor(response: Response) { 9 11 super(`got http ${response.status}`); 12 + this.response = response; 10 13 } 11 14 12 15 get status(): number { ··· 17 20 export class ImproperContentTypeError extends FetchResponseError { 18 21 override name = 'ImproperContentTypeError'; 19 22 20 - constructor( 21 - public contentType: string | null, 22 - reason: string, 23 - ) { 23 + contentType: string | null; 24 + 25 + constructor(contentType: string | null, reason: string) { 24 26 super(reason); 27 + this.contentType = contentType; 25 28 } 26 29 } 27 30 28 31 export class ImproperContentLengthError extends FetchResponseError { 29 32 override name = 'ImproperContentLengthError'; 30 33 31 - constructor( 32 - public expectedSize: number, 33 - public actualSize: number | null, 34 - reason: string, 35 - ) { 34 + expectedSize: number; 35 + actualSize: number | null; 36 + 37 + constructor(expectedSize: number, actualSize: number | null, reason: string) { 36 38 super(reason); 39 + this.expectedSize = expectedSize; 40 + this.actualSize = actualSize; 37 41 } 38 42 } 39 43
+2 -1
packages/misc/util-fetch/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/misc/util-text/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+4 -1
packages/oauth/browser-client/lib/agents/user-agent.ts
··· 11 11 #fetch: typeof fetch; 12 12 #getSessionPromise: Promise<Session> | undefined; 13 13 14 - constructor(public session: Session) { 14 + session: Session; 15 + 16 + constructor(session: Session) { 17 + this.session = session; 15 18 this.#fetch = createDPoPFetch(session.dpopKey, false); 16 19 } 17 20
+15 -14
packages/oauth/browser-client/lib/errors.ts
··· 15 15 export class TokenRefreshError extends Error { 16 16 override name = 'TokenRefreshError'; 17 17 18 - constructor( 19 - public readonly sub: Did, 20 - message: string, 21 - options?: ErrorOptions, 22 - ) { 18 + readonly sub: Did; 19 + 20 + constructor(sub: Did, message: string, options?: ErrorOptions) { 23 21 super(message, options); 22 + this.sub = sub; 24 23 } 25 24 } 26 25 27 26 export class OAuthResponseError extends Error { 28 27 override name = 'OAuthResponseError'; 29 28 29 + readonly response: Response; 30 + readonly data: any; 30 31 readonly error: string | undefined; 31 32 readonly description: string | undefined; 32 33 33 - constructor( 34 - public readonly response: Response, 35 - public readonly data: any, 36 - ) { 34 + constructor(response: Response, data: any) { 37 35 const error = ifString(ifObject(data)?.['error']); 38 36 const errorDescription = ifString(ifObject(data)?.['error_description']); 39 37 ··· 43 41 44 42 super(message); 45 43 44 + this.response = response; 45 + this.data = data; 46 46 this.error = error; 47 47 this.description = errorDescription; 48 48 } ··· 59 59 export class FetchResponseError extends Error { 60 60 override name = 'FetchResponseError'; 61 61 62 - constructor( 63 - public readonly response: Response, 64 - public status: number, 65 - message: string, 66 - ) { 62 + readonly response: Response; 63 + status: number; 64 + 65 + constructor(response: Response, status: number, message: string) { 67 66 super(message); 67 + this.response = response; 68 + this.status = status; 68 69 } 69 70 } 70 71
+2 -1
packages/oauth/browser-client/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+4 -4
packages/oauth/crypto/lib/dpop/verify.ts
··· 58 58 * error thrown when dpop verification fails. 59 59 */ 60 60 export class DpopVerifyError extends Error { 61 - constructor( 62 - message: string, 63 - public code: 'missing' | 'invalid' | 'expired' | 'nonce_required', 64 - ) { 61 + code: 'missing' | 'invalid' | 'expired' | 'nonce_required'; 62 + 63 + constructor(message: string, code: 'missing' | 'invalid' | 'expired' | 'nonce_required') { 65 64 super(message); 66 65 this.name = 'DpopVerifyError'; 66 + this.code = code; 67 67 } 68 68 } 69 69
+2 -1
packages/oauth/crypto/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/oauth/keyset/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/oauth/node-client-example/tsconfig.json
··· 19 19 "module": "NodeNext", 20 20 "sourceMap": true, 21 21 "declaration": true, 22 - "declarationMap": true 22 + "declarationMap": true, 23 + "erasableSyntaxOnly": true 23 24 }, 24 25 "include": ["src", "scripts"] 25 26 }
+2 -1
packages/oauth/node-client-public-example/tsconfig.json
··· 19 19 "module": "NodeNext", 20 20 "sourceMap": true, 21 21 "declaration": true, 22 - "declarationMap": true 22 + "declarationMap": true, 23 + "erasableSyntaxOnly": true 23 24 }, 24 25 "include": ["src"] 25 26 }
+28 -25
packages/oauth/node-client/lib/errors.ts
··· 12 12 export class TokenInvalidError extends Error { 13 13 override name = 'TokenInvalidError'; 14 14 15 - constructor( 16 - public readonly sub: string, 17 - message = `session for "${sub}" is invalid`, 18 - options?: ErrorOptions, 19 - ) { 15 + readonly sub: string; 16 + 17 + constructor(sub: string, message = `session for "${sub}" is invalid`, options?: ErrorOptions) { 20 18 super(message, options); 19 + this.sub = sub; 21 20 } 22 21 } 23 22 ··· 27 26 export class TokenRefreshError extends Error { 28 27 override name = 'TokenRefreshError'; 29 28 30 - constructor( 31 - public readonly sub: string, 32 - message: string, 33 - options?: ErrorOptions, 34 - ) { 29 + readonly sub: string; 30 + 31 + constructor(sub: string, message: string, options?: ErrorOptions) { 35 32 super(message, options); 33 + this.sub = sub; 36 34 } 37 35 } 38 36 ··· 42 40 export class TokenRevokedError extends Error { 43 41 override name = 'TokenRevokedError'; 44 42 45 - constructor( 46 - public readonly sub: string, 47 - message = `session for "${sub}" was revoked`, 48 - options?: ErrorOptions, 49 - ) { 43 + readonly sub: string; 44 + 45 + constructor(sub: string, message = `session for "${sub}" was revoked`, options?: ErrorOptions) { 50 46 super(message, options); 47 + this.sub = sub; 51 48 } 52 49 } 53 50 ··· 57 54 export class OAuthResponseError extends Error { 58 55 override name = 'OAuthResponseError'; 59 56 60 - constructor( 61 - public readonly response: Response, 62 - public readonly error: string, 63 - public readonly errorDescription?: string, 64 - ) { 57 + readonly response: Response; 58 + readonly error: string; 59 + readonly errorDescription?: string; 60 + 61 + constructor(response: Response, error: string, errorDescription?: string) { 65 62 super(errorDescription ?? error); 63 + this.response = response; 64 + this.error = error; 65 + this.errorDescription = errorDescription; 66 66 } 67 67 68 68 get status(): number { ··· 76 76 export class OAuthCallbackError extends Error { 77 77 override name = 'OAuthCallbackError'; 78 78 79 - constructor( 80 - public readonly error: string, 81 - public readonly errorDescription?: string, 82 - public readonly state?: string, 83 - ) { 79 + readonly error: string; 80 + readonly errorDescription?: string; 81 + readonly state?: string; 82 + 83 + constructor(error: string, errorDescription?: string, state?: string) { 84 84 super(errorDescription ?? error); 85 + this.error = error; 86 + this.errorDescription = errorDescription; 87 + this.state = state; 85 88 } 86 89 } 87 90
+13 -6
packages/oauth/node-client/lib/oauth-session.ts
··· 35 35 export class OAuthSession implements FetchHandlerObject { 36 36 private readonly dpopFetch: typeof globalThis.fetch; 37 37 38 + /** server agent for this session's AS */ 39 + readonly server: OAuthServerAgent; 40 + /** user's DID */ 41 + readonly sub: Did; 42 + /** session getter for token management */ 43 + private readonly sessionGetter: SessionGetter; 44 + 38 45 constructor( 39 - /** server agent for this session's AS */ 40 - readonly server: OAuthServerAgent, 41 - /** user's DID */ 42 - readonly sub: Did, 43 - /** session getter for token management */ 44 - private readonly sessionGetter: SessionGetter, 46 + server: OAuthServerAgent, 47 + sub: Did, 48 + sessionGetter: SessionGetter, 45 49 fetch: typeof globalThis.fetch = globalThis.fetch, 46 50 ) { 51 + this.server = server; 52 + this.sub = sub; 53 + this.sessionGetter = sessionGetter; 47 54 this.dpopFetch = createDpopFetch({ 48 55 key: server.dpopKey, 49 56 nonces: server.dpopNonces,
+12 -4
packages/oauth/node-client/lib/resolvers/index.ts
··· 28 28 * combines identity resolution with OAuth metadata discovery. 29 29 */ 30 30 export class OAuthResolver { 31 + readonly actorResolver: ActorResolver; 32 + readonly protectedResourceResolver: ProtectedResourceMetadataResolver; 33 + readonly authorizationServerResolver: AuthorizationServerMetadataResolver; 34 + 31 35 constructor( 32 - readonly actorResolver: ActorResolver, 33 - readonly protectedResourceResolver: ProtectedResourceMetadataResolver, 34 - readonly authorizationServerResolver: AuthorizationServerMetadataResolver, 35 - ) {} 36 + actorResolver: ActorResolver, 37 + protectedResourceResolver: ProtectedResourceMetadataResolver, 38 + authorizationServerResolver: AuthorizationServerMetadataResolver, 39 + ) { 40 + this.actorResolver = actorResolver; 41 + this.protectedResourceResolver = protectedResourceResolver; 42 + this.authorizationServerResolver = authorizationServerResolver; 43 + } 36 44 37 45 /** 38 46 * resolves OAuth metadata from a service URL (PDS or entryway).
+9 -5
packages/oauth/node-client/lib/utils/cached-getter.ts
··· 29 29 export class CachedGetter<K, V> { 30 30 #pending = new Map<K, PendingItem<V>>(); 31 31 32 - constructor( 33 - readonly getter: Getter<K, V>, 34 - readonly store: Store<K, V>, 35 - readonly options: CachedGetterOptions<K, V> = {}, 36 - ) {} 32 + readonly getter: Getter<K, V>; 33 + readonly store: Store<K, V>; 34 + readonly options: CachedGetterOptions<K, V>; 35 + 36 + constructor(getter: Getter<K, V>, store: Store<K, V>, options: CachedGetterOptions<K, V> = {}) { 37 + this.getter = getter; 38 + this.store = store; 39 + this.options = options; 40 + } 37 41 38 42 async get(key: K, options: GetCachedOptions = {}): Promise<V> { 39 43 const { signal, allowStale = false, noCache = false } = options;
+2 -1
packages/oauth/node-client/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/oauth/types/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+5 -1
packages/servers/labeler/lib/internal/async-buffer.ts
··· 11 11 private closed = false; 12 12 private deferred = Promise.withResolvers<void>(); 13 13 14 - constructor(private maxSize: number) {} 14 + private maxSize: number; 15 + 16 + constructor(maxSize: number) { 17 + this.maxSize = maxSize; 18 + } 15 19 16 20 push(value: T): void { 17 21 if (this.closed) {
+2 -1
packages/servers/labeler/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/servers/xrpc-server-bun/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/servers/xrpc-server-cloudflare/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/servers/xrpc-server-deno/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/servers/xrpc-server-node/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/servers/xrpc-server/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }
+2 -1
packages/utilities/car/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+5 -1
packages/utilities/cbor/lib/bytes.ts
··· 10 10 /** @internal */ 11 11 readonly [BYTES_SYMBOL] = true; 12 12 13 - constructor(public buf: Uint8Array) {} 13 + buf: Uint8Array; 14 + 15 + constructor(buf: Uint8Array) { 16 + this.buf = buf; 17 + } 14 18 15 19 get $bytes(): string { 16 20 return toBase64(this.buf);
+2 -1
packages/utilities/cbor/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/utilities/cid/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/utilities/crypto/tsconfig.json
··· 25 25 "stripInternal": true, 26 26 "paths": { 27 27 "#keypairs/secp256k1": ["./lib/keypairs/secp256k1-web.ts"] 28 - } 28 + }, 29 + "erasableSyntaxOnly": true 29 30 }, 30 31 "include": ["lib"] 31 32 }
+2 -1
packages/utilities/multibase/tsconfig.json
··· 27 27 "#bases/base16": ["./lib/bases/base16-web.ts"], 28 28 "#bases/base32-encode": ["./lib/bases/base32-encode.ts"], 29 29 "#bases/base64": ["./lib/bases/base64-web.ts"] 30 - } 30 + }, 31 + "erasableSyntaxOnly": true 31 32 }, 32 33 "include": ["lib"] 33 34 }
+15 -10
packages/utilities/repo/lib/types.ts
··· 4 4 import { isCidLink, type CidLink } from '@atcute/cid'; 5 5 6 6 export class RepoEntry { 7 + /** the collection this record belongs to */ 8 + readonly collection: string; 9 + /** record key */ 10 + readonly rkey: string; 11 + /** CID of this record */ 12 + readonly cid: CidLink; 13 + /** the associated CarEntry for this record */ 14 + readonly carEntry: CarEntry; 15 + 7 16 /** @internal */ 8 - constructor( 9 - /** the collection this record belongs to */ 10 - public readonly collection: string, 11 - /** record key */ 12 - public readonly rkey: string, 13 - /** CID of this record */ 14 - public readonly cid: CidLink, 15 - /** the associated CarEntry for this record */ 16 - public readonly carEntry: CarEntry, 17 - ) {} 17 + constructor(collection: string, rkey: string, cid: CidLink, carEntry: CarEntry) { 18 + this.collection = collection; 19 + this.rkey = rkey; 20 + this.cid = cid; 21 + this.carEntry = carEntry; 22 + } 18 23 19 24 /** 20 25 * raw contents of this record
+2 -1
packages/utilities/repo/tsconfig.json
··· 22 22 "sourceMap": true, 23 23 "declaration": true, 24 24 "declarationMap": true, 25 - "stripInternal": true 25 + "stripInternal": true, 26 + "erasableSyntaxOnly": true 26 27 }, 27 28 "include": ["lib"] 28 29 }
+2 -1
packages/utilities/tid/tsconfig.json
··· 24 24 "declarationMap": true, 25 25 "paths": { 26 26 "#platform/random": ["./lib/random-web.ts"] 27 - } 27 + }, 28 + "erasableSyntaxOnly": true 28 29 }, 29 30 "include": ["lib"] 30 31 }
+2 -1
packages/utilities/varint/tsconfig.json
··· 21 21 "module": "NodeNext", 22 22 "sourceMap": true, 23 23 "declaration": true, 24 - "declarationMap": true 24 + "declarationMap": true, 25 + "erasableSyntaxOnly": true 25 26 }, 26 27 "include": ["lib"] 27 28 }