Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/atproto-browser/lib/navigation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test("valid http input without included at uri", async () => {
test("lex input with invalid NSID", async () => {
// Numbers in NSID are not allowed
expect(await navigateAtUri("lex:com.example.invalid1")).toEqual({
error: "Invalid NSID: com.example.invalid1",
error: "Could not resolve NSID(com.example.invalid1): NO_AUTHORITY",
});
});

Expand Down
6 changes: 3 additions & 3 deletions packages/atproto-browser/lib/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { parse as parseHtml } from "node-html-parser";
import { parse as parseLinkHeader } from "http-link-header";
import { domainToASCII } from "url";
import { isDid } from "@atproto/did";
import { getRegistry as getLexiconRegistry } from "@lpm/core";
import { getCatalog } from "@lpm/core";

export async function navigateAtUri(input: string) {
// Remove all zero-width characters and weird control codes from the input
Expand Down Expand Up @@ -179,8 +179,8 @@ async function getAtUriFromLexUri(
};
}
const nsid = NSID.parse(uri.slice(4));
const registry = getLexiconRegistry();
const node = registry.get(nsid);
const catalog = getCatalog();
const node = catalog.get(nsid);
const resolution = await node.resolve();
if (!resolution.success) {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/atproto-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@atproto/api": "catalog:",
"@atproto/did": "catalog:",
"@atproto/identity": "catalog:",
"@atproto/lexicon": "^0.4.12",
"@atproto/lexicon": "catalog:",
"@atproto/repo": "catalog:",
"@atproto/syntax": "catalog:",
"@lpm/core": "npm:@jsr/lpm__core@^0.2.9",
"@lpm/core": "npm:@jsr/lpm__core@^0.3.2",
"hls.js": "^1.6.7",
"http-link-header": "^1.1.3",
"multiformats": "^13.3.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontpage-atproto-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build": "tsc"
},
"dependencies": {
"@atproto/lexicon": "^0.4.12",
"@atproto/lexicon": "catalog:",
"@atproto/xrpc": "^0.6.12",
"multiformats": "^13.3.7"
},
Expand Down
Loading