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

is this thing on?

+35 -35
+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: "sh -c 'deno publish --allow-slow-types --token $JSR_TOKEN'"
+12 -1
deno.json
··· 34 34 }, 35 35 "compilerOptions": { 36 36 "lib": [ 37 + "esnext", 38 + "DOM", 37 39 "deno.window" 38 - ] 40 + ], 41 + "strict": true, 42 + "skipLibCheck": true, 43 + "noUnusedLocals": true, 44 + "noUnusedParameters": true, 45 + "noFallthroughCasesInSwitch": true, 46 + "noImplicitReturns": true, 47 + "noUncheckedIndexedAccess": true, 48 + "noImplicitOverride": true, 49 + "exactOptionalPropertyTypes": true 39 50 } 40 51 }
+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 ),
+1 -28
tsconfig.json
··· 1 - { 2 - "compilerOptions": { 3 - "target": "esnext", 4 - "module": "nodenext", 5 - "moduleResolution": "nodenext", 6 - "lib": [ 7 - "esnext", 8 - "DOM" 9 - ], 10 - "strict": true, 11 - "esModuleInterop": true, 12 - "skipLibCheck": true, 13 - "forceConsistentCasingInFileNames": true, 14 - "noUnusedLocals": true, 15 - "noUnusedParameters": true, 16 - "noFallthroughCasesInSwitch": true, 17 - "noImplicitReturns": true, 18 - "noUncheckedIndexedAccess": true, 19 - "noImplicitOverride": true, 20 - "exactOptionalPropertyTypes": true 21 - }, 22 - "include": [ 23 - "**/*.ts" 24 - ], 25 - "exclude": [ 26 - "node_modules" 27 - ] 28 - } 1 + {}