add plc directories collection
This commit is contained in:
rodič
25c5333eb8
revize
51b39c9aee
|
@ -0,0 +1,3 @@
|
|||
name: Bluesky PLC Directory
|
||||
url: https://plc.directory
|
||||
federation: bluesky
|
|
@ -0,0 +1,3 @@
|
|||
name: Sandbox PLC Directory
|
||||
url: https://plc.bsky-sandbox.dev
|
||||
federation: sandbox
|
|
@ -0,0 +1,13 @@
|
|||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
pattern: '^[a-z0-9-]+$'
|
||||
name:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
format: url
|
||||
federation:
|
||||
type: string
|
|
@ -7,6 +7,7 @@ const SCHEMA_PATH = "./schema";
|
|||
const SCHEMA_MAP = {
|
||||
clients: "client",
|
||||
federations: "federation",
|
||||
'plc-directories': 'plc-directory',
|
||||
};
|
||||
|
||||
async function loadYAML(fn) {
|
||||
|
@ -51,7 +52,7 @@ export class Engine {
|
|||
async schemas() {
|
||||
if (Object.keys(this.schemasData).length === 0) {
|
||||
for await (const sf of Deno.readDir(SCHEMA_PATH)) {
|
||||
const name = sf.name.match(/^(\w+)\./)[1];
|
||||
const name = sf.name.match(/^([\w-]+)\./)[1];
|
||||
const schema = await loadYAML(join(SCHEMA_PATH, sf.name));
|
||||
this.schemasData[name] = schema;
|
||||
}
|
||||
|
|
Načítá se…
Odkázat v novém úkolu