f4987093f6
- define and validate the capability and resource-lock languages - provision workspace source repositories through Central Gitea - build package runtimes from pinned standalone sources - replace legacy schema compilation with workspace persistence plans - add stable optimistic registers and Automerge CRDT documents - modernize TypeScript/Nix package builds and runtime activation readiness
21 lines
658 B
JavaScript
21 lines
658 B
JavaScript
#!/usr/bin/env node
|
|
import { readFile } from "node:fs/promises";
|
|
import { parseQuixosLock } from "./parser.js";
|
|
|
|
const fileName = process.argv[2];
|
|
if (!fileName || process.argv.length !== 3) {
|
|
console.error("Usage: quixos-lock-check <quixos.lock>");
|
|
process.exit(2);
|
|
}
|
|
|
|
const result = parseQuixosLock(await readFile(fileName, "utf8"), fileName);
|
|
if (!result.ok) {
|
|
for (const diagnostic of result.diagnostics) {
|
|
console.error(
|
|
`${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column + 1}: ${diagnostic.phase}/${diagnostic.code}: ${diagnostic.message}`,
|
|
);
|
|
}
|
|
process.exit(1);
|
|
}
|
|
console.log(JSON.stringify(result.lock, null, 2));
|