@indigoai-us/hq-cli 5.111.1 → 5.112.0
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/CHANGELOG.md +24 -0
- package/dist/bin/hq-auth-refresh.d.ts +2 -0
- package/dist/bin/hq-auth-refresh.js +12 -6
- package/dist/command-catalog.generated.d.ts +6399 -0
- package/dist/command-catalog.generated.js +8275 -0
- package/dist/command-registration-plan.d.ts +394 -0
- package/dist/command-registration-plan.js +103 -0
- package/dist/commands/core.js +18 -0
- package/dist/commands/whoami.d.ts +17 -0
- package/dist/commands/whoami.js +26 -3
- package/dist/lazy-commands.d.ts +20 -44
- package/dist/lazy-commands.js +57 -58
- package/dist/lib/core-utils/sentry-report.d.ts +76 -0
- package/dist/lib/core-utils/sentry-report.js +255 -0
- package/dist/lib/plan-limit-nag.d.ts +1 -1
- package/dist/lib/plan-limit-nag.js +33 -12
- package/dist/main.d.ts +6 -0
- package/dist/main.js +87 -29
- package/dist/register-all.d.ts +4 -29
- package/dist/register-all.js +4 -235
- package/dist/sentry.d.ts +8 -2
- package/dist/sentry.js +17 -1
- package/dist/utils/cli-telemetry.d.ts +2 -1
- package/dist/utils/cli-telemetry.js +5 -5
- package/dist/utils/contribution-table.d.ts +1 -1
- package/dist/utils/version-check.d.ts +4 -1
- package/dist/utils/version-check.js +2 -2
- package/dist/utils/version-gate.d.ts +5 -1
- package/dist/utils/version-gate.js +4 -4
- package/package.json +3 -2
|
@@ -470,7 +470,7 @@ export function cleanStalePartialInstall(prefix, fs = nodeStaleInstallFs) {
|
|
|
470
470
|
* `null` on any failure (caller treats as "no gate"). Tight 3s timeout —
|
|
471
471
|
* a hung server must not delay CLI startup.
|
|
472
472
|
*/
|
|
473
|
-
async function fetchVersionDecision() {
|
|
473
|
+
async function fetchVersionDecision(timeoutMs = FETCH_TIMEOUT_MS) {
|
|
474
474
|
try {
|
|
475
475
|
const url = `${DEFAULT_VAULT_API_URL}${ENDPOINT_PATH}`;
|
|
476
476
|
const res = await fetch(url, {
|
|
@@ -484,7 +484,7 @@ async function fetchVersionDecision() {
|
|
|
484
484
|
currentVersion: CLI_VERSION,
|
|
485
485
|
platform: `${process.platform}-${process.arch}`,
|
|
486
486
|
}),
|
|
487
|
-
signal: AbortSignal.timeout(
|
|
487
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
488
488
|
});
|
|
489
489
|
if (!res.ok)
|
|
490
490
|
return null;
|
|
@@ -988,10 +988,10 @@ function attemptRequiredUpdate(decision, deps, install) {
|
|
|
988
988
|
console.error(chalk.green(`✓ Updated to hq-cli ${decision.latestVersion}. Rerun your command.`));
|
|
989
989
|
return 0;
|
|
990
990
|
}
|
|
991
|
-
export async function enforceVersionGate(onUpdateRecommended) {
|
|
991
|
+
export async function enforceVersionGate(onUpdateRecommended, options = {}) {
|
|
992
992
|
if (isOptedOut())
|
|
993
993
|
return "continue";
|
|
994
|
-
const decision = await fetchVersionDecision();
|
|
994
|
+
const decision = await fetchVersionDecision(options.timeoutMs);
|
|
995
995
|
if (!decision)
|
|
996
996
|
return "continue"; // best-effort: silent on any failure
|
|
997
997
|
if (!decision.updateRequired && !decision.updateRecommended)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.112.0",
|
|
4
4
|
"description": "HQ by Indigo management CLI \u2014 modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
"CHANGELOG.md"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "node scripts/generate-dsn.mjs && tsc && node scripts/copy-schemas.mjs && node scripts/chmod-bins.mjs",
|
|
19
|
+
"build": "node scripts/generate-dsn.mjs && tsc && node scripts/generate-command-catalog.mjs --check && node scripts/copy-schemas.mjs && node scripts/chmod-bins.mjs",
|
|
20
20
|
"prepublishOnly": "npm run build",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"gen:scan-golden": "node scripts/generate-scan-packages-table.mjs > src/utils/__fixtures__/scan-packages.generated-block.sh",
|
|
23
|
+
"gen:command-catalog": "tsc && node scripts/generate-command-catalog.mjs",
|
|
23
24
|
"lint": "eslint .",
|
|
24
25
|
"test": "vitest run",
|
|
25
26
|
"test:db": "vitest run src/lib/db test/commands/db.test.ts test/commands/db-tenant-isolation.test.ts",
|