fix(cli): replace npmextra config loading with smartconfig

This commit is contained in:
2026-03-24 15:07:43 +00:00
parent e9ad5775a1
commit b85abf7b93
6 changed files with 38 additions and 11 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tsrust',
version: '1.3.0',
version: '1.3.1',
description: 'A tool for compiling Rust projects, detecting Cargo workspaces, building with cargo, and placing binaries in a conventional dist_rust directory.'
}

View File

@@ -53,8 +53,8 @@ export class TsRustCli {
constructor(cwd: string = process.cwd()) {
this.cwd = cwd;
this.cli = new plugins.smartcli.Smartcli();
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
this.config = npmextraInstance.dataFor<ITsrustConfig>('@git.zone/tsrust', { targets: [] });
const smartconfigInstance = new plugins.smartconfig.Smartconfig(this.cwd);
this.config = smartconfigInstance.dataFor<ITsrustConfig>('@git.zone/tsrust', { targets: [] });
this.registerCommands();
}
@@ -122,7 +122,7 @@ export class TsRustCli {
const distDir = path.join(this.cwd, 'dist_rust');
const profile = isDebug ? 'debug' : 'release';
// Parse --target flag (can appear multiple times), fall back to npmextra.json config
// Parse --target flag (can appear multiple times), fall back to smartconfig.json config
const cliTargets = (argvArg as any).target;
const targets: string[] = cliTargets
? (Array.isArray(cliTargets) ? cliTargets : [cliTargets])

View File

@@ -1,5 +1,5 @@
import * as early from '@push.rocks/early';
import * as npmextra from '@push.rocks/npmextra';
import * as smartconfig from '@push.rocks/smartconfig';
import * as smartcli from '@push.rocks/smartcli';
import * as smartfile from '@push.rocks/smartfile';
import * as smartpath from '@push.rocks/smartpath';
@@ -7,7 +7,7 @@ import * as smartshell from '@push.rocks/smartshell';
export {
early,
npmextra,
smartconfig,
smartcli,
smartfile,
smartpath,