Webhooks for the AT Protocol airglow.run
atproto atprotocol automation webhook
12
fork

Configure Feed

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

chore: improve build

Hugo 8972ddd8 45566b8e

+86 -71
+1 -1
app/islands/AutomationForm.tsx
··· 1 1 import { useState, useCallback, useRef, useMemo, useEffect } from "hono/jsx"; 2 - import type { RecordSchema } from "../../lib/lexicons/schema-tree.js"; 2 + import type { RecordSchema } from "../../lib/lexicons/schema-types.js"; 3 3 import type { Action, FetchStep } from "../../lib/db/schema.js"; 4 4 import RecordFormBuilder from "./RecordFormBuilder.js"; 5 5 import * as s from "./AutomationForm.css.ts";
+1 -1
app/islands/RecordFormBuilder.tsx
··· 4 4 RecordSchema, 5 5 ObjectNode, 6 6 ArrayNode, 7 - } from "../../lib/lexicons/schema-tree.js"; 7 + } from "../../lib/lexicons/schema-types.js"; 8 8 import * as s from "./RecordFormBuilder.css.ts"; 9 9 10 10 type FormState = Record<string, unknown>;
+17 -58
lib/lexicons/schema-tree.ts
··· 1 1 import { getCachedRaw, setCacheRaw } from "./cache.js"; 2 2 import { resolveRaw } from "./resolver.js"; 3 3 4 - // --------------------------------------------------------------------------- 5 - // Types 6 - // --------------------------------------------------------------------------- 7 - 8 - export type StringNode = { 9 - type: "string"; 10 - description?: string; 11 - format?: string; 12 - knownValues?: string[]; 13 - maxLength?: number; 14 - minLength?: number; 15 - default?: string; 16 - }; 17 - 18 - export type IntegerNode = { 19 - type: "integer"; 20 - description?: string; 21 - minimum?: number; 22 - maximum?: number; 23 - default?: number; 24 - }; 4 + export type { 5 + StringNode, 6 + IntegerNode, 7 + BooleanNode, 8 + ObjectNode, 9 + ArrayNode, 10 + UnknownNode, 11 + SchemaNode, 12 + RecordSchema, 13 + } from "./schema-types.js"; 25 14 26 - export type BooleanNode = { 27 - type: "boolean"; 28 - description?: string; 29 - default?: boolean; 30 - }; 31 - 32 - export type ObjectNode = { 33 - type: "object"; 34 - description?: string; 35 - required: string[]; 36 - properties: Record<string, SchemaNode>; 37 - }; 38 - 39 - export type ArrayNode = { 40 - type: "array"; 41 - description?: string; 42 - items: SchemaNode; 43 - maxLength?: number; 44 - }; 45 - 46 - export type UnknownNode = { 47 - type: "unknown"; 48 - description?: string; 49 - }; 50 - 51 - export type SchemaNode = 52 - | StringNode 53 - | IntegerNode 54 - | BooleanNode 55 - | ObjectNode 56 - | ArrayNode 57 - | UnknownNode; 58 - 59 - export type RecordSchema = { 60 - required: string[]; 61 - properties: Record<string, SchemaNode>; 62 - }; 15 + import type { 16 + StringNode, 17 + ObjectNode, 18 + ArrayNode, 19 + SchemaNode, 20 + RecordSchema, 21 + } from "./schema-types.js"; 63 22 64 23 // --------------------------------------------------------------------------- 65 24 // External ref parsing
+55
lib/lexicons/schema-types.ts
··· 1 + export type StringNode = { 2 + type: "string"; 3 + description?: string; 4 + format?: string; 5 + knownValues?: string[]; 6 + maxLength?: number; 7 + minLength?: number; 8 + default?: string; 9 + }; 10 + 11 + export type IntegerNode = { 12 + type: "integer"; 13 + description?: string; 14 + minimum?: number; 15 + maximum?: number; 16 + default?: number; 17 + }; 18 + 19 + export type BooleanNode = { 20 + type: "boolean"; 21 + description?: string; 22 + default?: boolean; 23 + }; 24 + 25 + export type ObjectNode = { 26 + type: "object"; 27 + description?: string; 28 + required: string[]; 29 + properties: Record<string, SchemaNode>; 30 + }; 31 + 32 + export type ArrayNode = { 33 + type: "array"; 34 + description?: string; 35 + items: SchemaNode; 36 + maxLength?: number; 37 + }; 38 + 39 + export type UnknownNode = { 40 + type: "unknown"; 41 + description?: string; 42 + }; 43 + 44 + export type SchemaNode = 45 + | StringNode 46 + | IntegerNode 47 + | BooleanNode 48 + | ObjectNode 49 + | ArrayNode 50 + | UnknownNode; 51 + 52 + export type RecordSchema = { 53 + required: string[]; 54 + properties: Record<string, SchemaNode>; 55 + };
+12 -11
vite.config.ts
··· 81 81 } 82 82 83 83 function pdsProxy(): Plugin { 84 - const issuer = getPdsIssuer(); 85 - if (!issuer) { 86 - console.log("[pds-proxy] PDS not available, skipping proxy"); 87 - return { name: "pds-proxy" }; 88 - } 89 - 90 - const issuerUrl = new URL(issuer); 91 - const pdsUrl = new URL(PDS_TARGET); 92 - const proxyPaths = ["/oauth/", "/.well-known/", "/xrpc/", "/@atproto/"]; 93 - console.log(`[pds-proxy] Will proxy PDS (${issuer}) through ${APP_ORIGIN}`); 94 - 95 84 return { 96 85 name: "pds-proxy", 86 + apply: "serve", 97 87 configureServer(server) { 88 + const issuer = getPdsIssuer(); 89 + if (!issuer) { 90 + console.log("[pds-proxy] PDS not available, skipping proxy"); 91 + return; 92 + } 93 + 94 + const issuerUrl = new URL(issuer); 95 + const pdsUrl = new URL(PDS_TARGET); 96 + const proxyPaths = ["/oauth/", "/.well-known/", "/xrpc/", "/@atproto/"]; 97 + console.log(`[pds-proxy] Will proxy PDS (${issuer}) through ${APP_ORIGIN}`); 98 + 98 99 server.middlewares.use((req, res, next) => { 99 100 if (!req.url || !proxyPaths.some((p) => req.url!.startsWith(p))) { 100 101 return next();