@chiendt/ack-cli 1.3.0-dev.6 → 1.3.0-dev.7
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/cli-manifest.json +2 -2
- package/dist/index.js +48 -18
- package/package.json +1 -1
package/cli-manifest.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -63756,7 +63756,7 @@ var package_default;
|
|
|
63756
63756
|
var init_package = __esm(() => {
|
|
63757
63757
|
package_default = {
|
|
63758
63758
|
name: "@chiendt/ack-cli",
|
|
63759
|
-
version: "1.3.0-dev.
|
|
63759
|
+
version: "1.3.0-dev.7",
|
|
63760
63760
|
description: "ACK CLI - tool for bootstrapping and updating ACK kits (Claude Code agent kits)",
|
|
63761
63761
|
type: "module",
|
|
63762
63762
|
repository: {
|
|
@@ -72633,9 +72633,11 @@ var exports_npmrc_setup_step = {};
|
|
|
72633
72633
|
__export(exports_npmrc_setup_step, {
|
|
72634
72634
|
runNpmrcSetupStep: () => runNpmrcSetupStep
|
|
72635
72635
|
});
|
|
72636
|
+
import { execFile as execFile10 } from "node:child_process";
|
|
72636
72637
|
import { existsSync as existsSync66, readFileSync as readFileSync20 } from "node:fs";
|
|
72637
72638
|
import { homedir as homedir45 } from "node:os";
|
|
72638
72639
|
import { join as join96 } from "node:path";
|
|
72640
|
+
import { promisify as promisify12 } from "node:util";
|
|
72639
72641
|
function resolveTokenFromEnv() {
|
|
72640
72642
|
const fromProcess = process.env[TOKEN_ENV_KEY];
|
|
72641
72643
|
if (fromProcess && fromProcess.length > 0) {
|
|
@@ -72671,18 +72673,33 @@ function resolveTokenFromEnv() {
|
|
|
72671
72673
|
}
|
|
72672
72674
|
return null;
|
|
72673
72675
|
}
|
|
72676
|
+
async function smokeGitHubPackagesAuth() {
|
|
72677
|
+
try {
|
|
72678
|
+
const { stdout } = await execFileP("npm", ["view", "@chiendt1108/fqc-mcp-servers", "version"], {
|
|
72679
|
+
timeout: 15000
|
|
72680
|
+
});
|
|
72681
|
+
const version = stdout.trim();
|
|
72682
|
+
logger.info(import_picocolors19.default.green(`✓ GitHub Packages reachable — fqc-mcp-servers@${version}`));
|
|
72683
|
+
} catch (err) {
|
|
72684
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
72685
|
+
logger.info(import_picocolors19.default.yellow(`⚠ GitHub Packages smoke failed: ${msg.split(`
|
|
72686
|
+
`)[0]}
|
|
72687
|
+
Check token has 'read:packages' scope and is not expired.`));
|
|
72688
|
+
}
|
|
72689
|
+
}
|
|
72674
72690
|
async function writeNpmrcWithToken(pat, source) {
|
|
72675
72691
|
const npmrcPath = join96(homedir45(), ".npmrc");
|
|
72676
72692
|
try {
|
|
72677
72693
|
const result = await writeNpmrc(npmrcPath, buildGitHubPackagesEntries(pat));
|
|
72678
72694
|
if (result.noChange) {
|
|
72679
72695
|
logger.info(import_picocolors19.default.dim("~/.npmrc already up to date"));
|
|
72680
|
-
|
|
72696
|
+
} else {
|
|
72697
|
+
logger.info(import_picocolors19.default.green(`Wrote GitHub Packages config → ${npmrcPath}`));
|
|
72698
|
+
if (result.backupPath)
|
|
72699
|
+
logger.info(import_picocolors19.default.dim(` backup: ${result.backupPath}`));
|
|
72681
72700
|
}
|
|
72682
|
-
|
|
72683
|
-
|
|
72684
|
-
logger.info(import_picocolors19.default.dim(` backup: ${result.backupPath}`));
|
|
72685
|
-
return { status: "written", backupPath: result.backupPath, source };
|
|
72701
|
+
await smokeGitHubPackagesAuth();
|
|
72702
|
+
return result.noChange ? { status: "no-change", source } : { status: "written", backupPath: result.backupPath, source };
|
|
72686
72703
|
} catch (err) {
|
|
72687
72704
|
const msg = err instanceof Error ? err.message : String(err);
|
|
72688
72705
|
logger.error(`Failed to write ~/.npmrc: ${msg}`);
|
|
@@ -72717,6 +72734,14 @@ async function runNpmrcSetupStep(opts = {}) {
|
|
|
72717
72734
|
logger.info(import_picocolors19.default.yellow("--yes given — skipping interactive PAT prompt."));
|
|
72718
72735
|
return { status: "skipped-cancel" };
|
|
72719
72736
|
}
|
|
72737
|
+
const proceed = await se({
|
|
72738
|
+
message: "Set up GitHub Packages auth now?",
|
|
72739
|
+
initialValue: true
|
|
72740
|
+
});
|
|
72741
|
+
if (lD(proceed) || proceed === false) {
|
|
72742
|
+
logger.info(import_picocolors19.default.yellow("Skipped. Rerun with `ack fqc-qa-setup --npmrc-only` when ready."));
|
|
72743
|
+
return { status: "skipped-cancel" };
|
|
72744
|
+
}
|
|
72720
72745
|
const pat = await re({
|
|
72721
72746
|
message: "GitHub Personal Access Token (read:packages):",
|
|
72722
72747
|
validate: (value) => {
|
|
@@ -72734,12 +72759,13 @@ async function runNpmrcSetupStep(opts = {}) {
|
|
|
72734
72759
|
}
|
|
72735
72760
|
return writeNpmrcWithToken(pat, "prompt");
|
|
72736
72761
|
}
|
|
72737
|
-
var import_picocolors19, TOKEN_ENV_KEY = "FQC_GITHUB_PACKAGES_TOKEN";
|
|
72762
|
+
var import_picocolors19, execFileP, TOKEN_ENV_KEY = "FQC_GITHUB_PACKAGES_TOKEN";
|
|
72738
72763
|
var init_npmrc_setup_step = __esm(() => {
|
|
72739
72764
|
init_npmrc_bootstrap();
|
|
72740
72765
|
init_logger();
|
|
72741
72766
|
init_dist2();
|
|
72742
72767
|
import_picocolors19 = __toESM(require_picocolors(), 1);
|
|
72768
|
+
execFileP = promisify12(execFile10);
|
|
72743
72769
|
});
|
|
72744
72770
|
|
|
72745
72771
|
// node_modules/picomatch/lib/constants.js
|
|
@@ -74847,8 +74873,8 @@ async function checkNeedsSudoPackages() {
|
|
|
74847
74873
|
return false;
|
|
74848
74874
|
}
|
|
74849
74875
|
const { exec: exec5 } = await import("node:child_process");
|
|
74850
|
-
const { promisify:
|
|
74851
|
-
const execAsync5 =
|
|
74876
|
+
const { promisify: promisify13 } = await import("node:util");
|
|
74877
|
+
const execAsync5 = promisify13(exec5);
|
|
74852
74878
|
try {
|
|
74853
74879
|
await Promise.all([
|
|
74854
74880
|
execAsync5("which ffmpeg", { timeout: WHICH_COMMAND_TIMEOUT_MS }),
|
|
@@ -77346,11 +77372,11 @@ var require_extract_zip = __commonJS((exports, module) => {
|
|
|
77346
77372
|
var { createWriteStream: createWriteStream3, promises: fs15 } = __require("fs");
|
|
77347
77373
|
var getStream = require_get_stream();
|
|
77348
77374
|
var path9 = __require("path");
|
|
77349
|
-
var { promisify:
|
|
77375
|
+
var { promisify: promisify13 } = __require("util");
|
|
77350
77376
|
var stream = __require("stream");
|
|
77351
77377
|
var yauzl = require_yauzl();
|
|
77352
|
-
var openZip =
|
|
77353
|
-
var pipeline =
|
|
77378
|
+
var openZip = promisify13(yauzl.open);
|
|
77379
|
+
var pipeline = promisify13(stream.pipeline);
|
|
77354
77380
|
|
|
77355
77381
|
class Extractor {
|
|
77356
77382
|
constructor(zipPath, opts) {
|
|
@@ -77435,7 +77461,7 @@ var require_extract_zip = __commonJS((exports, module) => {
|
|
|
77435
77461
|
if (isDir)
|
|
77436
77462
|
return;
|
|
77437
77463
|
debug("opening read stream", dest);
|
|
77438
|
-
const readStream = await
|
|
77464
|
+
const readStream = await promisify13(this.zipfile.openReadStream.bind(this.zipfile))(entry);
|
|
77439
77465
|
if (symlink4) {
|
|
77440
77466
|
const link = await getStream(readStream);
|
|
77441
77467
|
debug("creating symlink", link, dest);
|
|
@@ -98993,10 +99019,10 @@ class TarExtractor {
|
|
|
98993
99019
|
// src/domains/installation/extraction/zip-extractor.ts
|
|
98994
99020
|
init_logger();
|
|
98995
99021
|
var import_extract_zip = __toESM(require_extract_zip(), 1);
|
|
98996
|
-
import { execFile as
|
|
99022
|
+
import { execFile as execFile11 } from "node:child_process";
|
|
98997
99023
|
import { copyFile as copyFile6, mkdir as mkdir29, readdir as readdir26, rm as rm14, stat as stat16 } from "node:fs/promises";
|
|
98998
99024
|
import { join as join111 } from "node:path";
|
|
98999
|
-
import { promisify as
|
|
99025
|
+
import { promisify as promisify13 } from "node:util";
|
|
99000
99026
|
|
|
99001
99027
|
// src/domains/installation/extraction/native-zip-commands.ts
|
|
99002
99028
|
var NATIVE_EXTRACT_TIMEOUT_MS = 120000;
|
|
@@ -99035,7 +99061,7 @@ function getNativeZipCommands(archivePath, destDir, platformName = process.platf
|
|
|
99035
99061
|
}
|
|
99036
99062
|
|
|
99037
99063
|
// src/domains/installation/extraction/zip-extractor.ts
|
|
99038
|
-
var execFileAsync7 =
|
|
99064
|
+
var execFileAsync7 = promisify13(execFile11);
|
|
99039
99065
|
|
|
99040
99066
|
class ZipExtractor {
|
|
99041
99067
|
async tryNativeExtraction(archivePath, destDir) {
|
|
@@ -105788,8 +105814,8 @@ async function detectAccessibleKits() {
|
|
|
105788
105814
|
// src/domains/github/preflight-checker.ts
|
|
105789
105815
|
init_logger();
|
|
105790
105816
|
import { exec as exec5 } from "node:child_process";
|
|
105791
|
-
import { promisify as
|
|
105792
|
-
var execAsync5 =
|
|
105817
|
+
import { promisify as promisify14 } from "node:util";
|
|
105818
|
+
var execAsync5 = promisify14(exec5);
|
|
105793
105819
|
function createSuccessfulPreflightResult() {
|
|
105794
105820
|
return {
|
|
105795
105821
|
success: true,
|
|
@@ -110510,6 +110536,10 @@ async function postSetup(resolvedDir, validOptions, isNonInteractive2, prompts)
|
|
|
110510
110536
|
withSudo: validOptions.withSudo
|
|
110511
110537
|
});
|
|
110512
110538
|
}
|
|
110539
|
+
if (validOptions.kit === "fqc-qa") {
|
|
110540
|
+
const { runNpmrcSetupStep: runNpmrcSetupStep2 } = await Promise.resolve().then(() => (init_npmrc_setup_step(), exports_npmrc_setup_step));
|
|
110541
|
+
await runNpmrcSetupStep2({ yes: isNonInteractive2 });
|
|
110542
|
+
}
|
|
110513
110543
|
const claudeDir3 = join154(resolvedDir, ".claude");
|
|
110514
110544
|
await promptSetupWizardIfNeeded({
|
|
110515
110545
|
envPath: join154(claudeDir3, ".env"),
|