A tool for conquest of ATProto lexicons. https://jsr.io/@hotsocket/lexiconqueror

is this thing on?

+22 -6
+13
.tangled/workflows/jsr.yml
··· 1 + when: 2 + - event: ["push"] 3 + branch: ["main"] 4 + 5 + engine: "nixery" 6 + 7 + dependencies: 8 + nixpkgs: 9 + - deno 10 + 11 + steps: 12 + - name: "Ship it!" 13 + command: "deno publish --token $JSR_TOKEN"
+1 -1
mod.ts
··· 4 4 * file, You can obtain one at https://mozilla.org/MPL/2.0/. 5 5 */ 6 6 7 - export * from "./src/config.ts"; 7 + export * from "./src/config_public.ts"; 8 8 9 9 // running as program 10 10 import { argv, exit } from "node:process";
-3
src/config.ts
··· 45 45 dataDir: z.string(), 46 46 outputDir: z.string(), 47 47 }); 48 - 49 - /** actual type for lxq.json format */ 50 - export type Config = z.infer<typeof config_z>;
+5
src/config_public.ts
··· 1 + import z from "@zod/zod"; 2 + import { config_z } from "./config.ts"; 3 + 4 + /** actual type for lxq.json format */ 5 + export type Config = z.infer<typeof config_z>;
+3 -2
src/run.ts
··· 15 15 import { lexicon as lex } from "@hotsocket/atproto-common"; 16 16 import { spawnSync } from "node:child_process"; 17 17 import * as gen from "./generator/generator.ts"; 18 + import { Config } from "./config_public.ts"; 18 19 19 20 // not using generated code to avoid potential circular dependency type trouble 20 21 21 22 export const DEFAULT_CONFIG_PATH = "./lxq.json"; 22 23 const DEFAULT_DATA_PATH = ".lxq"; 23 24 const DEFAULT_OUTPUT_PATH = "generated/lxq"; 24 - async function configHelper(configPath: string): Promise<cfg.Config & { root: string }> { 25 + async function configHelper(configPath: string): Promise<Config & { root: string }> { 25 26 console.log(); 26 27 const configDir = path.dirname(path.resolve(configPath)); 27 28 const raw = JSON.parse(await fs.readFile(path.resolve(configPath), { encoding: "utf-8" })); ··· 259 260 }, 260 261 dataDir: ".lxq", 261 262 outputDir: "generated", 262 - } as cfg.Config, 263 + } as Config, 263 264 null, 264 265 "\t", 265 266 ),