@labwired/catalog
Advanced tools
| export interface CatalogFacts { | ||
| schema_version: number; | ||
| /** Every device_type LabWired can wire/simulate (broad validity set). */ | ||
| device_types: string[]; | ||
| /** External peripherals a proto.cat block is expected to map (coverage set). */ | ||
| peripheral_device_types: string[]; | ||
| /** | ||
| * Best-effort chip_family proxy: families with a bundled playground board or a | ||
| * pin-map, minus board-variant aliases. The authoritative chip_family set | ||
| * lives in the Rust core; treat this as a strong hint, not a closed universe. | ||
| */ | ||
| chips: string[]; | ||
| } | ||
| /** Schema version the TS side was built against. */ | ||
| export declare const CATALOG_FACTS_SCHEMA = 1; | ||
| /** True when the facts file matches the schema version these types expect. */ | ||
| export declare const schemaMatches: boolean; | ||
| /** | ||
| * Opt-in hard check. Consumers that want to fail on a schema mismatch (rather | ||
| * than tolerate it) call this explicitly — importing the package never crashes | ||
| * on its own. | ||
| */ | ||
| export declare function assertSchemaCompatible(): void; | ||
| export declare const CATALOG_FACTS: CatalogFacts; | ||
| export declare const DEVICE_TYPES: readonly string[]; | ||
| export declare const PERIPHERAL_DEVICE_TYPES: readonly string[]; | ||
| export declare const CHIPS: readonly string[]; | ||
| /** True if `deviceType` is a real LabWired device_type (any class). */ | ||
| export declare function isKnownDeviceType(deviceType: string): boolean; | ||
| /** True if `chip` is a real LabWired chip_family. */ | ||
| export declare function isKnownChip(chip: string): boolean; | ||
| //# sourceMappingURL=index.d.ts.map |
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gFAAgF;IAChF,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC;;;;OAIG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,oDAAoD;AACpD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAgBtC,8EAA8E;AAC9E,eAAO,MAAM,aAAa,SAAgD,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAO7C;AAED,eAAO,MAAM,aAAa,EAAE,YAAoB,CAAC;AACjD,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAuB,CAAC;AAClE,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAkC,CAAC;AACxF,eAAO,MAAM,KAAK,EAAE,SAAS,MAAM,EAAgB,CAAC;AAKpD,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD"} |
+5
-3
| { | ||
| "name": "@labwired/catalog", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "type": "module", | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "files": ["dist", "src/catalog-facts.json"], | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.js", | ||
| "default": "./src/index.ts" | ||
| "default": "./dist/index.js" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "build": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.mjs --packages=external && cp dist/index.mjs dist/index.js", | ||
| "build": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.mjs --packages=external && cp dist/index.mjs dist/index.js && tsc -p tsconfig.build.json --emitDeclarationOnly", | ||
| "generate:facts": "tsx scripts/generate-catalog-facts.ts", | ||
@@ -16,0 +18,0 @@ "check:facts": "tsx scripts/generate-catalog-facts.ts --check", |
10573
29.52%6
50%400
8.4%