@nalvietnam/avatar-cli 1.2.7 → 1.2.8

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/index.js CHANGED
@@ -1342,7 +1342,7 @@ async function ensureTeamPackAccessWithRetry(args) {
1342
1342
  }
1343
1343
 
1344
1344
  // src/lib/resolve-team-pack-repo-url.ts
1345
- var ORG_DEFAULT = "https://github.com/nalvn/team-ai-pack.git";
1345
+ var ORG_DEFAULT = "git@github.com:nalvn/team-ai-pack.git";
1346
1346
  function resolveTeamPackRepoUrl() {
1347
1347
  if (process.env.AVATAR_TEAM_PACK_REPO_URL) {
1348
1348
  return process.env.AVATAR_TEAM_PACK_REPO_URL;
@@ -2221,9 +2221,12 @@ async function findAlternativeWorkspaceName(parent, desiredName, maxAttempts = 1
2221
2221
  // src/commands/init-scaffold-variable-builders.ts
2222
2222
  var AVATAR_CLI_VERSION = "1.0.1";
2223
2223
  function inferWorkspaceName(repoUrl) {
2224
- const m = repoUrl.match(/[/:]([^/]+?)(\.git)?$/);
2225
- const base = m?.[1] ?? "client";
2226
- return `avatar-${base}-workspace`;
2224
+ const trimmed = repoUrl.trim().replace(/\/+$/, "");
2225
+ const lastSegment = trimmed.split(/[/:]/).pop() ?? "";
2226
+ const baseName = lastSegment.replace(/\.git$/, "");
2227
+ if (!baseName) return "avatar-client-workspace";
2228
+ const withoutPrefix = baseName.replace(/^avatar-/, "");
2229
+ return `avatar-${withoutPrefix}-workspace`;
2227
2230
  }
2228
2231
  function buildScaffoldVariables(args) {
2229
2232
  return {
@@ -3164,7 +3167,7 @@ async function removeSubmoduleEntry(gitmodulesPath, submodulePath) {
3164
3167
  }
3165
3168
 
3166
3169
  // src/commands/uninstall.ts
3167
- var CLI_VERSION = "1.2.7";
3170
+ var CLI_VERSION = "1.2.8";
3168
3171
  function registerUninstallCommand(program2) {
3169
3172
  program2.command("uninstall").description("G\u1EE1 Avatar kh\u1ECFi project \u2014 backup t\u1EF1 \u0111\u1ED9ng (M11)").option("--yes", "Skip confirm prompt").option("--no-backup", "Kh\xF4ng t\u1EA1o backup tr\u01B0\u1EDBc khi x\xF3a (nguy hi\u1EC3m)").option("--keep-submodule", "Gi\u1EEF submodule .claude/pack/").option("--keep-hooks", "Gi\u1EEF git hooks post-merge, pre-push").option("--dry-run", "Hi\u1EC3n th\u1ECB danh s\xE1ch s\u1EBD x\xF3a, kh\xF4ng th\u1EF1c thi").action(async (opts) => {
3170
3173
  try {
@@ -3246,7 +3249,7 @@ function printUninstallSuccessBox(backupPath) {
3246
3249
  }
3247
3250
 
3248
3251
  // src/index.ts
3249
- var CLI_VERSION2 = "1.2.7";
3252
+ var CLI_VERSION2 = "1.2.8";
3250
3253
  var program = new Command();
3251
3254
  program.name("avatar").description("AI harness CLI for NAL Vietnam engineering").version(CLI_VERSION2, "-v, --version", "Hi\u1EC3n th\u1ECB phi\xEAn b\u1EA3n Avatar CLI").addHelpText(
3252
3255
  "beforeAll",