@nalvietnam/avatar-cli 1.2.7 → 1.2.9
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 = "
|
|
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;
|
|
@@ -1997,8 +1997,14 @@ import { dirname as dirname3, join as join13 } from "path";
|
|
|
1997
1997
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1998
1998
|
var __dirname = dirname3(fileURLToPath2(import.meta.url));
|
|
1999
1999
|
var CANDIDATE_DIRS = [
|
|
2000
|
+
// Bundled production: dist/index.js → __dirname = .../dist/, sibling dist/templates
|
|
2001
|
+
join13(__dirname, "templates", "gitignore"),
|
|
2002
|
+
// Legacy bundled: nếu file là dist/lib/*.js (sub-bundle), templates ở dist/templates
|
|
2000
2003
|
join13(__dirname, "..", "templates", "gitignore"),
|
|
2001
|
-
|
|
2004
|
+
// Dev mode (vitest/tsx run src/ trực tiếp): __dirname = src/lib/
|
|
2005
|
+
join13(__dirname, "..", "..", "src", "templates", "gitignore"),
|
|
2006
|
+
// npm-installed alt: __dirname = .../dist/ → package_root/src/templates
|
|
2007
|
+
join13(__dirname, "..", "src", "templates", "gitignore")
|
|
2002
2008
|
];
|
|
2003
2009
|
var AVATAR_MARKER_START = "# === avatar ===";
|
|
2004
2010
|
var AVATAR_MARKER_END = "# === /avatar ===";
|
|
@@ -2221,9 +2227,12 @@ async function findAlternativeWorkspaceName(parent, desiredName, maxAttempts = 1
|
|
|
2221
2227
|
// src/commands/init-scaffold-variable-builders.ts
|
|
2222
2228
|
var AVATAR_CLI_VERSION = "1.0.1";
|
|
2223
2229
|
function inferWorkspaceName(repoUrl) {
|
|
2224
|
-
const
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2230
|
+
const trimmed = repoUrl.trim().replace(/\/+$/, "");
|
|
2231
|
+
const lastSegment = trimmed.split(/[/:]/).pop() ?? "";
|
|
2232
|
+
const baseName = lastSegment.replace(/\.git$/, "");
|
|
2233
|
+
if (!baseName) return "avatar-client-workspace";
|
|
2234
|
+
const withoutPrefix = baseName.replace(/^avatar-/, "");
|
|
2235
|
+
return `avatar-${withoutPrefix}-workspace`;
|
|
2227
2236
|
}
|
|
2228
2237
|
function buildScaffoldVariables(args) {
|
|
2229
2238
|
return {
|
|
@@ -3164,7 +3173,7 @@ async function removeSubmoduleEntry(gitmodulesPath, submodulePath) {
|
|
|
3164
3173
|
}
|
|
3165
3174
|
|
|
3166
3175
|
// src/commands/uninstall.ts
|
|
3167
|
-
var CLI_VERSION = "1.2.
|
|
3176
|
+
var CLI_VERSION = "1.2.9";
|
|
3168
3177
|
function registerUninstallCommand(program2) {
|
|
3169
3178
|
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
3179
|
try {
|
|
@@ -3246,7 +3255,7 @@ function printUninstallSuccessBox(backupPath) {
|
|
|
3246
3255
|
}
|
|
3247
3256
|
|
|
3248
3257
|
// src/index.ts
|
|
3249
|
-
var CLI_VERSION2 = "1.2.
|
|
3258
|
+
var CLI_VERSION2 = "1.2.9";
|
|
3250
3259
|
var program = new Command();
|
|
3251
3260
|
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
3261
|
"beforeAll",
|