@rejot-dev/thalo-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +9 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/format.js +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/setup-merge-driver.js +1 -1
- package/dist/files.js +1 -1
- package/dist/version.js +79 -0
- package/dist/version.js.map +1 -0
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { formatVersion, getVersionInfo } from "./version.js";
|
|
1
2
|
import { parseArgs } from "node:util";
|
|
2
3
|
import pc from "picocolors";
|
|
3
4
|
|
|
4
5
|
//#region src/cli.ts
|
|
5
|
-
const VERSION = "0.1.0";
|
|
6
6
|
/**
|
|
7
7
|
* Convert our option definitions to node:util parseArgs config
|
|
8
8
|
*/
|
|
@@ -142,8 +142,14 @@ function runCli(rootCommand, argv = process.argv.slice(2)) {
|
|
|
142
142
|
const { values, positionals } = parsed;
|
|
143
143
|
if (values["no-color"]) process.env["NO_COLOR"] = "1";
|
|
144
144
|
if (values["version"] && commandPath.length === 1) {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
getVersionInfo().then((info) => {
|
|
146
|
+
console.log(formatVersion(info));
|
|
147
|
+
process.exit(0);
|
|
148
|
+
}).catch(() => {
|
|
149
|
+
console.log("thalo (version unknown)");
|
|
150
|
+
process.exit(0);
|
|
151
|
+
});
|
|
152
|
+
return;
|
|
147
153
|
}
|
|
148
154
|
if (values["help"]) {
|
|
149
155
|
console.log(generateHelp(command, commandPath));
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":["config: ParseArgsConfig[\"options\"]","optConfig: NonNullable<ParseArgsConfig[\"options\"]>[string]","globalOptions: Record<string, OptionDef>","lines: string[]","parsed: ReturnType<typeof parseArgs>","ctx: CommandContext"],"sources":["../src/cli.ts"],"sourcesContent":["import { parseArgs, type ParseArgsConfig } from \"node:util\";\nimport pc from \"picocolors\";\n\nconst VERSION = \"0.1.0\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Types\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Option definition for a command\n */\nexport interface OptionDef {\n type: \"boolean\" | \"string\";\n short?: string;\n description: string;\n default?: string | boolean;\n choices?: string[];\n multiple?: boolean;\n}\n\n/**\n * Command definition\n */\nexport interface CommandDef {\n name: string;\n description: string;\n usage?: string;\n options?: Record<string, OptionDef>;\n args?: {\n name: string;\n description: string;\n required?: boolean;\n multiple?: boolean;\n };\n subcommands?: Record<string, CommandDef>;\n action?: (ctx: CommandContext) => void | Promise<void>;\n}\n\n/**\n * Parsed command context passed to action handlers\n */\nexport interface CommandContext {\n options: Record<string, string | boolean | string[]>;\n args: string[];\n command: CommandDef;\n commandPath: string[];\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Framework\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Convert our option definitions to node:util parseArgs config\n */\nfunction toParseArgsConfig(options: Record<string, OptionDef>): ParseArgsConfig[\"options\"] {\n const config: ParseArgsConfig[\"options\"] = {};\n\n for (const [name, def] of Object.entries(options)) {\n const optConfig: NonNullable<ParseArgsConfig[\"options\"]>[string] = {\n type: def.type,\n };\n\n if (def.short) {\n optConfig.short = def.short;\n }\n\n if (def.default !== undefined) {\n optConfig.default = def.default;\n }\n\n if (def.multiple !== undefined) {\n optConfig.multiple = def.multiple;\n }\n\n config[name] = optConfig;\n }\n\n return config;\n}\n\n/**\n * Global options available to all commands\n */\nconst globalOptions: Record<string, OptionDef> = {\n help: {\n type: \"boolean\",\n short: \"h\",\n description: \"Show help for the command\",\n default: false,\n },\n version: {\n type: \"boolean\",\n short: \"V\",\n description: \"Show version number\",\n default: false,\n },\n \"no-color\": {\n type: \"boolean\",\n description: \"Disable colored output\",\n default: false,\n },\n};\n\n/**\n * Generate help text for a command\n */\nexport function generateHelp(command: CommandDef, commandPath: string[] = []): string {\n const lines: string[] = [];\n const fullCommandName = commandPath.length > 0 ? commandPath.join(\" \") : \"thalo\";\n\n // Header\n lines.push(\"\");\n lines.push(pc.bold(command.description));\n lines.push(\"\");\n\n // Usage\n lines.push(pc.bold(\"USAGE\"));\n let usageLine = ` ${fullCommandName}`;\n\n if (command.subcommands && Object.keys(command.subcommands).length > 0) {\n usageLine += \" <command>\";\n }\n\n if (command.options && Object.keys(command.options).length > 0) {\n usageLine += \" [options]\";\n }\n\n if (command.args) {\n const argName = command.args.multiple ? `<${command.args.name}...>` : `<${command.args.name}>`;\n usageLine += command.args.required ? ` ${argName}` : ` [${argName}]`;\n }\n\n if (command.usage) {\n usageLine = ` ${fullCommandName} ${command.usage}`;\n }\n\n lines.push(usageLine);\n lines.push(\"\");\n\n // Subcommands\n if (command.subcommands && Object.keys(command.subcommands).length > 0) {\n lines.push(pc.bold(\"COMMANDS\"));\n\n const subcommandNames = Object.keys(command.subcommands);\n const maxLen = Math.max(...subcommandNames.map((n) => n.length));\n\n for (const [name, subcmd] of Object.entries(command.subcommands)) {\n const paddedName = name.padEnd(maxLen + 2);\n lines.push(` ${pc.cyan(paddedName)}${subcmd.description}`);\n }\n\n lines.push(\"\");\n lines.push(` Run '${fullCommandName} <command> --help' for more information on a command.`);\n lines.push(\"\");\n }\n\n // Options\n const allOptions = { ...globalOptions, ...command.options };\n if (Object.keys(allOptions).length > 0) {\n lines.push(pc.bold(\"OPTIONS\"));\n\n const optionEntries = Object.entries(allOptions);\n const optionStrings = optionEntries.map(([name, def]) => {\n const shortFlag = def.short ? `-${def.short}, ` : \" \";\n const longFlag = `--${name}`;\n const valueHint =\n def.type === \"string\" ? ` <${def.choices ? def.choices.join(\"|\") : \"value\"}>` : \"\";\n return `${shortFlag}${longFlag}${valueHint}`;\n });\n const maxOptLen = Math.max(...optionStrings.map((s) => s.length));\n\n for (let i = 0; i < optionEntries.length; i++) {\n const [, def] = optionEntries[i];\n const optStr = optionStrings[i].padEnd(maxOptLen + 2);\n let description = def.description;\n\n if (def.default !== undefined && def.default !== false && def.default !== \"\") {\n description += pc.dim(` (default: ${def.default})`);\n }\n\n lines.push(` ${pc.dim(optStr)}${description}`);\n }\n\n lines.push(\"\");\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Find a command by traversing the path\n */\nfunction findCommand(\n root: CommandDef,\n args: string[],\n): { command: CommandDef; commandPath: string[]; remainingArgs: string[] } {\n let current = root;\n const commandPath = [\"thalo\"];\n const remainingArgs = [...args];\n\n while (remainingArgs.length > 0) {\n const nextArg = remainingArgs[0];\n\n // Stop if it's an option\n if (nextArg.startsWith(\"-\")) {\n break;\n }\n\n // Check if it's a subcommand\n if (current.subcommands && current.subcommands[nextArg]) {\n current = current.subcommands[nextArg];\n commandPath.push(nextArg);\n remainingArgs.shift();\n } else {\n // Not a subcommand, must be a positional arg\n break;\n }\n }\n\n return { command: current, commandPath, remainingArgs };\n}\n\n/**\n * Parse and run a command\n */\nexport function runCli(rootCommand: CommandDef, argv: string[] = process.argv.slice(2)): void {\n // Find the target command\n const { command, commandPath, remainingArgs } = findCommand(rootCommand, argv);\n\n // Merge global options with command options\n const allOptions = { ...globalOptions, ...command.options };\n const parseArgsOptions = toParseArgsConfig(allOptions);\n\n // Parse arguments\n let parsed: ReturnType<typeof parseArgs>;\n try {\n parsed = parseArgs({\n args: remainingArgs,\n options: parseArgsOptions,\n allowPositionals: true,\n strict: true,\n });\n } catch (err) {\n if (err instanceof Error) {\n console.error(pc.red(`Error: ${err.message}`));\n console.error(`\\nRun '${commandPath.join(\" \")} --help' for usage information.`);\n }\n process.exit(2);\n }\n\n const { values, positionals } = parsed;\n\n // Handle no-color by setting env var (picocolors respects NO_COLOR)\n if (values[\"no-color\"]) {\n process.env[\"NO_COLOR\"] = \"1\";\n }\n\n // Handle version (only at root level)\n if (values[\"version\"] && commandPath.length === 1) {\n console.log(`thalo v${VERSION}`);\n process.exit(0);\n }\n\n // Handle help\n if (values[\"help\"]) {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n\n // If command has subcommands but no action and no subcommand was specified, show help\n if (command.subcommands && Object.keys(command.subcommands).length > 0 && !command.action) {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n\n // Run the command action\n if (command.action) {\n const ctx: CommandContext = {\n options: values as Record<string, string | boolean | string[]>,\n args: positionals,\n command,\n commandPath,\n };\n\n Promise.resolve(command.action(ctx)).catch((err) => {\n console.error(pc.red(`Error: ${err instanceof Error ? err.message : err}`));\n process.exit(1);\n });\n } else {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAGA,MAAM,UAAU;;;;AAqDhB,SAAS,kBAAkB,SAAgE;CACzF,MAAMA,SAAqC,EAAE;AAE7C,MAAK,MAAM,CAAC,MAAM,QAAQ,OAAO,QAAQ,QAAQ,EAAE;EACjD,MAAMC,YAA6D,EACjE,MAAM,IAAI,MACX;AAED,MAAI,IAAI,MACN,WAAU,QAAQ,IAAI;AAGxB,MAAI,IAAI,YAAY,OAClB,WAAU,UAAU,IAAI;AAG1B,MAAI,IAAI,aAAa,OACnB,WAAU,WAAW,IAAI;AAG3B,SAAO,QAAQ;;AAGjB,QAAO;;;;;AAMT,MAAMC,gBAA2C;CAC/C,MAAM;EACJ,MAAM;EACN,OAAO;EACP,aAAa;EACb,SAAS;EACV;CACD,SAAS;EACP,MAAM;EACN,OAAO;EACP,aAAa;EACb,SAAS;EACV;CACD,YAAY;EACV,MAAM;EACN,aAAa;EACb,SAAS;EACV;CACF;;;;AAKD,SAAgB,aAAa,SAAqB,cAAwB,EAAE,EAAU;CACpF,MAAMC,QAAkB,EAAE;CAC1B,MAAM,kBAAkB,YAAY,SAAS,IAAI,YAAY,KAAK,IAAI,GAAG;AAGzE,OAAM,KAAK,GAAG;AACd,OAAM,KAAK,GAAG,KAAK,QAAQ,YAAY,CAAC;AACxC,OAAM,KAA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,IAAIC;AACJ,KAAI;AACF,WAAS,UAAU;GACjB,MAAM;GACN,SAAS;GACT,kBAAkB;GAClB,QAAQ;GACT,CAAC;UACK,KAAK;AACZ,MAAI,eAAe,OAAO;AACxB,WAAQ,MAAM,GAAG,IAAI,UAAU,IAAI,UAAU,CAAC;AAC9C,WAAQ,MAAM,UAAU,YAAY,KAAK,IAAI,CAAC,iCAAiC;;AAEjF,UAAQ,KAAK,EAAE;;CAGjB,MAAM,EAAE,QAAQ,gBAAgB;AAGhC,KAAI,OAAO,YACT,SAAQ,IAAI,cAAc;AAI5B,KAAI,OAAO,cAAc,YAAY,WAAW,GAAG;AACjD,UAAQ,IAAI,UAAU,UAAU;AAChC,UAAQ,KAAK,EAAE;;AAIjB,KAAI,OAAO,SAAS;AAClB,UAAQ,IAAI,aAAa,SAAS,YAAY,CAAC;AAC/C,UAAQ,KAAK,EAAE;;AAIjB,KAAI,QAAQ,eAAe,OAAO,KAAK,QAAQ,YAAY,CAAC,SAAS,KAAK,CAAC,QAAQ,QAAQ;AACzF,UAAQ,IAAI,aAAa,SAAS,YAAY,CAAC;AAC/C,UAAQ,KAAK,EAAE;;AAIjB,KAAI,QAAQ,QAAQ;EAClB,MAAMC,MAAsB;GAC1B,SAAS;GACT,MAAM;GACN;GACA;GACD;AAED,UAAQ,QAAQ,QAAQ,OAAO,IAAI,CAAC,CAAC,OAAO,QAAQ;AAClD,WAAQ,MAAM,GAAG,IAAI,UAAU,eAAe,QAAQ,IAAI,UAAU,MAAM,CAAC;AAC3E,WAAQ,KAAK,EAAE;IACf;QACG;AACL,UAAQ,IAAI,aAAa,SAAS,YAAY,CAAC;AAC/C,UAAQ,KAAK,EAAE"}
|
|
1
|
+
{"version":3,"file":"cli.js","names":["config: ParseArgsConfig[\"options\"]","optConfig: NonNullable<ParseArgsConfig[\"options\"]>[string]","globalOptions: Record<string, OptionDef>","lines: string[]","parsed: ReturnType<typeof parseArgs>","ctx: CommandContext"],"sources":["../src/cli.ts"],"sourcesContent":["import { parseArgs, type ParseArgsConfig } from \"node:util\";\nimport pc from \"picocolors\";\nimport { getVersionInfo, formatVersion } from \"./version.js\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Types\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Option definition for a command\n */\nexport interface OptionDef {\n type: \"boolean\" | \"string\";\n short?: string;\n description: string;\n default?: string | boolean;\n choices?: string[];\n multiple?: boolean;\n}\n\n/**\n * Command definition\n */\nexport interface CommandDef {\n name: string;\n description: string;\n usage?: string;\n options?: Record<string, OptionDef>;\n args?: {\n name: string;\n description: string;\n required?: boolean;\n multiple?: boolean;\n };\n subcommands?: Record<string, CommandDef>;\n action?: (ctx: CommandContext) => void | Promise<void>;\n}\n\n/**\n * Parsed command context passed to action handlers\n */\nexport interface CommandContext {\n options: Record<string, string | boolean | string[]>;\n args: string[];\n command: CommandDef;\n commandPath: string[];\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Framework\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Convert our option definitions to node:util parseArgs config\n */\nfunction toParseArgsConfig(options: Record<string, OptionDef>): ParseArgsConfig[\"options\"] {\n const config: ParseArgsConfig[\"options\"] = {};\n\n for (const [name, def] of Object.entries(options)) {\n const optConfig: NonNullable<ParseArgsConfig[\"options\"]>[string] = {\n type: def.type,\n };\n\n if (def.short) {\n optConfig.short = def.short;\n }\n\n if (def.default !== undefined) {\n optConfig.default = def.default;\n }\n\n if (def.multiple !== undefined) {\n optConfig.multiple = def.multiple;\n }\n\n config[name] = optConfig;\n }\n\n return config;\n}\n\n/**\n * Global options available to all commands\n */\nconst globalOptions: Record<string, OptionDef> = {\n help: {\n type: \"boolean\",\n short: \"h\",\n description: \"Show help for the command\",\n default: false,\n },\n version: {\n type: \"boolean\",\n short: \"V\",\n description: \"Show version number\",\n default: false,\n },\n \"no-color\": {\n type: \"boolean\",\n description: \"Disable colored output\",\n default: false,\n },\n};\n\n/**\n * Generate help text for a command\n */\nexport function generateHelp(command: CommandDef, commandPath: string[] = []): string {\n const lines: string[] = [];\n const fullCommandName = commandPath.length > 0 ? commandPath.join(\" \") : \"thalo\";\n\n // Header\n lines.push(\"\");\n lines.push(pc.bold(command.description));\n lines.push(\"\");\n\n // Usage\n lines.push(pc.bold(\"USAGE\"));\n let usageLine = ` ${fullCommandName}`;\n\n if (command.subcommands && Object.keys(command.subcommands).length > 0) {\n usageLine += \" <command>\";\n }\n\n if (command.options && Object.keys(command.options).length > 0) {\n usageLine += \" [options]\";\n }\n\n if (command.args) {\n const argName = command.args.multiple ? `<${command.args.name}...>` : `<${command.args.name}>`;\n usageLine += command.args.required ? ` ${argName}` : ` [${argName}]`;\n }\n\n if (command.usage) {\n usageLine = ` ${fullCommandName} ${command.usage}`;\n }\n\n lines.push(usageLine);\n lines.push(\"\");\n\n // Subcommands\n if (command.subcommands && Object.keys(command.subcommands).length > 0) {\n lines.push(pc.bold(\"COMMANDS\"));\n\n const subcommandNames = Object.keys(command.subcommands);\n const maxLen = Math.max(...subcommandNames.map((n) => n.length));\n\n for (const [name, subcmd] of Object.entries(command.subcommands)) {\n const paddedName = name.padEnd(maxLen + 2);\n lines.push(` ${pc.cyan(paddedName)}${subcmd.description}`);\n }\n\n lines.push(\"\");\n lines.push(` Run '${fullCommandName} <command> --help' for more information on a command.`);\n lines.push(\"\");\n }\n\n // Options\n const allOptions = { ...globalOptions, ...command.options };\n if (Object.keys(allOptions).length > 0) {\n lines.push(pc.bold(\"OPTIONS\"));\n\n const optionEntries = Object.entries(allOptions);\n const optionStrings = optionEntries.map(([name, def]) => {\n const shortFlag = def.short ? `-${def.short}, ` : \" \";\n const longFlag = `--${name}`;\n const valueHint =\n def.type === \"string\" ? ` <${def.choices ? def.choices.join(\"|\") : \"value\"}>` : \"\";\n return `${shortFlag}${longFlag}${valueHint}`;\n });\n const maxOptLen = Math.max(...optionStrings.map((s) => s.length));\n\n for (let i = 0; i < optionEntries.length; i++) {\n const [, def] = optionEntries[i];\n const optStr = optionStrings[i].padEnd(maxOptLen + 2);\n let description = def.description;\n\n if (def.default !== undefined && def.default !== false && def.default !== \"\") {\n description += pc.dim(` (default: ${def.default})`);\n }\n\n lines.push(` ${pc.dim(optStr)}${description}`);\n }\n\n lines.push(\"\");\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Find a command by traversing the path\n */\nfunction findCommand(\n root: CommandDef,\n args: string[],\n): { command: CommandDef; commandPath: string[]; remainingArgs: string[] } {\n let current = root;\n const commandPath = [\"thalo\"];\n const remainingArgs = [...args];\n\n while (remainingArgs.length > 0) {\n const nextArg = remainingArgs[0];\n\n // Stop if it's an option\n if (nextArg.startsWith(\"-\")) {\n break;\n }\n\n // Check if it's a subcommand\n if (current.subcommands && current.subcommands[nextArg]) {\n current = current.subcommands[nextArg];\n commandPath.push(nextArg);\n remainingArgs.shift();\n } else {\n // Not a subcommand, must be a positional arg\n break;\n }\n }\n\n return { command: current, commandPath, remainingArgs };\n}\n\n/**\n * Parse and run a command\n */\nexport function runCli(rootCommand: CommandDef, argv: string[] = process.argv.slice(2)): void {\n // Find the target command\n const { command, commandPath, remainingArgs } = findCommand(rootCommand, argv);\n\n // Merge global options with command options\n const allOptions = { ...globalOptions, ...command.options };\n const parseArgsOptions = toParseArgsConfig(allOptions);\n\n // Parse arguments\n let parsed: ReturnType<typeof parseArgs>;\n try {\n parsed = parseArgs({\n args: remainingArgs,\n options: parseArgsOptions,\n allowPositionals: true,\n strict: true,\n });\n } catch (err) {\n if (err instanceof Error) {\n console.error(pc.red(`Error: ${err.message}`));\n console.error(`\\nRun '${commandPath.join(\" \")} --help' for usage information.`);\n }\n process.exit(2);\n }\n\n const { values, positionals } = parsed;\n\n // Handle no-color by setting env var (picocolors respects NO_COLOR)\n if (values[\"no-color\"]) {\n process.env[\"NO_COLOR\"] = \"1\";\n }\n\n // Handle version (only at root level)\n if (values[\"version\"] && commandPath.length === 1) {\n getVersionInfo()\n .then((info) => {\n console.log(formatVersion(info));\n process.exit(0);\n })\n .catch(() => {\n console.log(\"thalo (version unknown)\");\n process.exit(0);\n });\n return;\n }\n\n // Handle help\n if (values[\"help\"]) {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n\n // If command has subcommands but no action and no subcommand was specified, show help\n if (command.subcommands && Object.keys(command.subcommands).length > 0 && !command.action) {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n\n // Run the command action\n if (command.action) {\n const ctx: CommandContext = {\n options: values as Record<string, string | boolean | string[]>,\n args: positionals,\n command,\n commandPath,\n };\n\n Promise.resolve(command.action(ctx)).catch((err) => {\n console.error(pc.red(`Error: ${err instanceof Error ? err.message : err}`));\n process.exit(1);\n });\n } else {\n console.log(generateHelp(command, commandPath));\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;;;AAuDA,SAAS,kBAAkB,SAAgE;CACzF,MAAMA,SAAqC,EAAE;AAE7C,MAAK,MAAM,CAAC,MAAM,QAAQ,OAAO,QAAQ,QAAQ,EAAE;EACjD,MAAMC,YAA6D,EACjE,MAAM,IAAI,MACX;AAED,MAAI,IAAI,MACN,WAAU,QAAQ,IAAI;AAGxB,MAAI,IAAI,YAAY,OAClB,WAAU,UAAU,IAAI;AAG1B,MAAI,IAAI,aAAa,OACnB,WAAU,WAAW,IAAI;AAG3B,SAAO,QAAQ;;AAGjB,QAAO;;;;;AAMT,MAAMC,gBAA2C;CAC/C,MAAM;EACJ,MAAM;EACN,OAAO;EACP,aAAa;EACb,SAAS;EACV;CACD,SAAS;EACP,MAAM;EACN,OAAO;EACP,aAAa;EACb,SAAS;EACV;CACD,YAAY;EACV,MAAM;EACN,aAAa;EACb,SAAS;EACV;CACF;;;;AAKD,SAAgB,aAAa,SAAqB,cAAwB,EAAE,EAAU;CACpF,MAAMC,QAAkB,EAAE;CAC1B,MAAM,kBAAkB,YAAY,SAAS,IAAI,YAAY,KAAK,IAAI,GAAG;AAGzE,OAAM,KAAK,GAAG;AACd,OAAM,KAAK,GAAG,KAAK,QAAQ,YAAY,CAA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
|
import { relativePath, resolveFilesSync } from "../files.js";
|
|
2
2
|
import { createWorkspace } from "@rejot-dev/thalo/node";
|
|
3
3
|
import pc from "picocolors";
|
|
4
|
+
import * as path from "node:path";
|
|
4
5
|
import { formatDiagnostic, runCheck } from "@rejot-dev/thalo";
|
|
5
6
|
import * as fs from "node:fs";
|
|
6
|
-
import * as path from "node:path";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/check.ts
|
|
9
9
|
const SEVERITY_ORDER = {
|
package/dist/commands/format.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { relativePath } from "../files.js";
|
|
2
2
|
import { createWorkspace } from "@rejot-dev/thalo/node";
|
|
3
3
|
import pc from "picocolors";
|
|
4
|
-
import { runFormat } from "@rejot-dev/thalo";
|
|
5
4
|
import * as fs from "node:fs/promises";
|
|
6
5
|
import * as path from "node:path";
|
|
6
|
+
import { runFormat } from "@rejot-dev/thalo";
|
|
7
7
|
import ignore from "ignore";
|
|
8
8
|
|
|
9
9
|
//#region src/commands/format.ts
|
package/dist/commands/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pc from "picocolors";
|
|
2
|
-
import * as fs from "node:fs";
|
|
3
2
|
import * as path from "node:path";
|
|
3
|
+
import * as fs from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/commands/init.ts
|
|
6
6
|
const ENTITIES_THALO = `{{TIMESTAMP}} define-entity journal "Personal thoughts, reflections, and experiences" ^journal
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { promisify } from "node:util";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
+
import { execFile } from "node:child_process";
|
|
3
4
|
import * as fs from "node:fs/promises";
|
|
4
5
|
import * as path from "node:path";
|
|
5
|
-
import { execFile } from "node:child_process";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/setup-merge-driver.ts
|
|
8
8
|
const execFile$1 = promisify(execFile);
|
package/dist/files.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createWorkspace } from "@rejot-dev/thalo/node";
|
|
2
2
|
import pc from "picocolors";
|
|
3
|
-
import * as fs from "node:fs";
|
|
4
3
|
import { readFile, readdir, stat } from "node:fs/promises";
|
|
5
4
|
import * as path from "node:path";
|
|
6
5
|
import { join, resolve } from "node:path";
|
|
6
|
+
import * as fs from "node:fs";
|
|
7
7
|
|
|
8
8
|
//#region src/files.ts
|
|
9
9
|
/**
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { isInitialized, isUsingNative } from "@rejot-dev/thalo/node";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { exec } from "node:child_process";
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
|
|
8
|
+
//#region src/version.ts
|
|
9
|
+
const execAsync = promisify(exec);
|
|
10
|
+
const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
11
|
+
/**
|
|
12
|
+
* Get the package version from package.json
|
|
13
|
+
*/
|
|
14
|
+
async function getPackageVersion() {
|
|
15
|
+
try {
|
|
16
|
+
const content = await readFile(join(packageRoot, "package.json"), "utf-8");
|
|
17
|
+
return JSON.parse(content).version || "unknown";
|
|
18
|
+
} catch {
|
|
19
|
+
return "unknown";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get git commit hash if running from a git repository
|
|
24
|
+
*/
|
|
25
|
+
async function getGitHash() {
|
|
26
|
+
try {
|
|
27
|
+
const { stdout } = await execAsync("git rev-parse --short HEAD", { cwd: packageRoot });
|
|
28
|
+
return stdout.trim() || null;
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if there are uncommitted changes in the git repo
|
|
35
|
+
*/
|
|
36
|
+
async function isGitDirty() {
|
|
37
|
+
try {
|
|
38
|
+
const { stdout } = await execAsync("git status --porcelain", { cwd: packageRoot });
|
|
39
|
+
return stdout.trim().length > 0;
|
|
40
|
+
} catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get the parser backend being used (native, wasm, or unknown if not initialized)
|
|
46
|
+
*/
|
|
47
|
+
function getParserBackend() {
|
|
48
|
+
if (!isInitialized()) return "unknown";
|
|
49
|
+
return isUsingNative() ? "native" : "wasm";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get all version information
|
|
53
|
+
*/
|
|
54
|
+
async function getVersionInfo() {
|
|
55
|
+
const [version, gitHash, gitDirty] = await Promise.all([
|
|
56
|
+
getPackageVersion(),
|
|
57
|
+
getGitHash(),
|
|
58
|
+
isGitDirty()
|
|
59
|
+
]);
|
|
60
|
+
return {
|
|
61
|
+
version,
|
|
62
|
+
gitHash,
|
|
63
|
+
gitDirty,
|
|
64
|
+
parserBackend: getParserBackend()
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Format version info as a string for display
|
|
69
|
+
*/
|
|
70
|
+
function formatVersion(info) {
|
|
71
|
+
let versionStr = `thalo v${info.version}`;
|
|
72
|
+
if (info.gitHash) versionStr += ` (${info.gitHash}${info.gitDirty ? "-dirty" : ""})`;
|
|
73
|
+
versionStr += ` [${info.parserBackend}]`;
|
|
74
|
+
return versionStr;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { formatVersion, getVersionInfo };
|
|
79
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["import { exec } from \"node:child_process\";\nimport { readFile } from \"node:fs/promises\";\nimport { promisify } from \"node:util\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, join } from \"node:path\";\nimport { isInitialized, isUsingNative } from \"@rejot-dev/thalo/node\";\n\nconst execAsync = promisify(exec);\n\n// Compute package root once at module level\n// In dist/, go up one level to find package.json\n// In src/, go up one level to find package.json\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst packageRoot = join(__dirname, \"..\");\n\n/**\n * Get the package version from package.json\n */\nasync function getPackageVersion(): Promise<string> {\n try {\n const packageJsonPath = join(packageRoot, \"package.json\");\n const content = await readFile(packageJsonPath, \"utf-8\");\n const pkg = JSON.parse(content);\n return pkg.version || \"unknown\";\n } catch {\n return \"unknown\";\n }\n}\n\n/**\n * Get git commit hash if running from a git repository\n */\nasync function getGitHash(): Promise<string | null> {\n try {\n const { stdout } = await execAsync(\"git rev-parse --short HEAD\", { cwd: packageRoot });\n return stdout.trim() || null;\n } catch {\n return null;\n }\n}\n\n/**\n * Check if there are uncommitted changes in the git repo\n */\nasync function isGitDirty(): Promise<boolean> {\n try {\n const { stdout } = await execAsync(\"git status --porcelain\", { cwd: packageRoot });\n return stdout.trim().length > 0;\n } catch {\n return false;\n }\n}\n\n/**\n * Get the parser backend being used (native, wasm, or unknown if not initialized)\n */\nfunction getParserBackend(): \"native\" | \"wasm\" | \"unknown\" {\n if (!isInitialized()) {\n return \"unknown\";\n }\n return isUsingNative() ? \"native\" : \"wasm\";\n}\n\n/**\n * Version info structure\n */\nexport interface VersionInfo {\n version: string;\n gitHash: string | null;\n gitDirty: boolean;\n parserBackend: \"native\" | \"wasm\" | \"unknown\";\n}\n\n/**\n * Get all version information\n */\nexport async function getVersionInfo(): Promise<VersionInfo> {\n const [version, gitHash, gitDirty] = await Promise.all([\n getPackageVersion(),\n getGitHash(),\n isGitDirty(),\n ]);\n\n return {\n version,\n gitHash,\n gitDirty,\n parserBackend: getParserBackend(),\n };\n}\n\n/**\n * Format version info as a string for display\n */\nexport function formatVersion(info: VersionInfo): string {\n let versionStr = `thalo v${info.version}`;\n\n if (info.gitHash) {\n versionStr += ` (${info.gitHash}${info.gitDirty ? \"-dirty\" : \"\"})`;\n }\n\n versionStr += ` [${info.parserBackend}]`;\n\n return versionStr;\n}\n"],"mappings":";;;;;;;;AAOA,MAAM,YAAY,UAAU,KAAK;AAMjC,MAAM,cAAc,KADF,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EACrB,KAAK;;;;AAKzC,eAAe,oBAAqC;AAClD,KAAI;EAEF,MAAM,UAAU,MAAM,SADE,KAAK,aAAa,eAAe,EACT,QAAQ;AAExD,SADY,KAAK,MAAM,QAAQ,CACpB,WAAW;SAChB;AACN,SAAO;;;;;;AAOX,eAAe,aAAqC;AAClD,KAAI;EACF,MAAM,EAAE,WAAW,MAAM,UAAU,8BAA8B,EAAE,KAAK,aAAa,CAAC;AACtF,SAAO,OAAO,MAAM,IAAI;SAClB;AACN,SAAO;;;;;;AAOX,eAAe,aAA+B;AAC5C,KAAI;EACF,MAAM,EAAE,WAAW,MAAM,UAAU,0BAA0B,EAAE,KAAK,aAAa,CAAC;AAClF,SAAO,OAAO,MAAM,CAAC,SAAS;SACxB;AACN,SAAO;;;;;;AAOX,SAAS,mBAAkD;AACzD,KAAI,CAAC,eAAe,CAClB,QAAO;AAET,QAAO,eAAe,GAAG,WAAW;;;;;AAgBtC,eAAsB,iBAAuC;CAC3D,MAAM,CAAC,SAAS,SAAS,YAAY,MAAM,QAAQ,IAAI;EACrD,mBAAmB;EACnB,YAAY;EACZ,YAAY;EACb,CAAC;AAEF,QAAO;EACL;EACA;EACA;EACA,eAAe,kBAAkB;EAClC;;;;;AAMH,SAAgB,cAAc,MAA2B;CACvD,IAAI,aAAa,UAAU,KAAK;AAEhC,KAAI,KAAK,QACP,eAAc,KAAK,KAAK,UAAU,KAAK,WAAW,WAAW,GAAG;AAGlE,eAAc,KAAK,KAAK,cAAc;AAEtC,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rejot-dev/thalo-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"prettier": "^3.5.3",
|
|
31
31
|
"vscode-languageserver": "^9.0.1",
|
|
32
32
|
"web-tree-sitter": "^0.25.0",
|
|
33
|
-
"@rejot-dev/thalo": "0.2.
|
|
34
|
-
"@rejot-dev/thalo-lsp": "0.2.
|
|
35
|
-
"@rejot-dev/thalo-prettier": "0.2.
|
|
36
|
-
"@rejot-dev/tree-sitter-thalo": "0.2.
|
|
33
|
+
"@rejot-dev/thalo": "0.2.1",
|
|
34
|
+
"@rejot-dev/thalo-lsp": "0.2.1",
|
|
35
|
+
"@rejot-dev/thalo-prettier": "0.2.1",
|
|
36
|
+
"@rejot-dev/tree-sitter-thalo": "0.2.1"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
39
|
"tree-sitter": "^0.25.0"
|