35c351e716
Publish to Gitea Registry / publish (push) Failing after 4s
Replace hand-rolled CLI argument parsing with Commander for command registration and option handling. Streamline config resolution by removing the BrickConfig type and accepting a plain source string with BRICK_SOURCE env var support. - Replace manual CLI dispatch with Commander-based command tree - Simplify resolveConfig/resolveSource to a single resolveSource function - Remove BrickConfig interface in favor of direct source string - Move isRemote check into index-loader as a local utility - Update loadIndex signature to accept source string directly
9 lines
290 B
TypeScript
9 lines
290 B
TypeScript
const DEFAULT_SOURCE =
|
|
"https://gitea.synoth.com/synoth/brick-index/raw/branch/master/blocks.yaml";
|
|
|
|
export function resolveSource(cliSource?: string): string {
|
|
if (cliSource) return cliSource;
|
|
if (process.env.BRICK_SOURCE) return process.env.BRICK_SOURCE;
|
|
return DEFAULT_SOURCE;
|
|
}
|