@indigoai-us/hq-cli 5.36.2 → 5.36.3
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/commands/cloud.js
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* hq sync status — show local journal summary
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
16
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="856084be-3bbb-50cd-8e3b-1e19ea13f4fb")}catch(e){}}();
|
|
17
17
|
import chalk from "chalk";
|
|
18
18
|
import * as fs from "fs";
|
|
19
19
|
import * as path from "path";
|
|
20
|
-
import { share, sync, readJournal, getJournalPath, loadCachedTokens, VaultClient, computePersonalVaultPaths, } from "@indigoai-us/hq-cloud";
|
|
20
|
+
import { share, sync, readJournal, getJournalPath, loadCachedTokens, VaultClient, computePersonalVaultPaths, PERSONAL_VAULT_JOURNAL_SLUG, } from "@indigoai-us/hq-cloud";
|
|
21
21
|
import { DEFAULT_HQ_ROOT, ensureCognitoToken, buildVaultConfig, } from "../utils/cognito-session.js";
|
|
22
22
|
import { emitNarrowHint, isStrictRefusal, resolveBannerLevel, } from "../lib/narrow-hint-banner.js";
|
|
23
23
|
/**
|
|
@@ -89,13 +89,18 @@ export async function pullAll(options, deps) {
|
|
|
89
89
|
}
|
|
90
90
|
const personal = options.skipPersonal ? null : pickCanonicalPerson(persons);
|
|
91
91
|
if (personal) {
|
|
92
|
+
// Canonical slug, NOT the literal "personal": that legacy slug is the
|
|
93
|
+
// companies/personal company's journal. hq-sync-runner moved the vault
|
|
94
|
+
// slot to PERSONAL_VAULT_JOURNAL_SLUG; hq-cli journaling the same vault
|
|
95
|
+
// under the old slug split the bookkeeping across two files — every CLI
|
|
96
|
+
// sync re-flagged the menubar's already-synced files as conflicts.
|
|
92
97
|
plan.push({
|
|
93
98
|
slug: "personal",
|
|
94
99
|
syncOptions: {
|
|
95
100
|
company: personal.uid,
|
|
96
101
|
hqRoot: options.hqRoot,
|
|
97
102
|
personalMode: true,
|
|
98
|
-
journalSlug:
|
|
103
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
99
104
|
...(options.onConflict ? { onConflict: options.onConflict } : {}),
|
|
100
105
|
},
|
|
101
106
|
});
|
|
@@ -213,7 +218,7 @@ export async function pushAll(options, deps) {
|
|
|
213
218
|
hqRoot: options.hqRoot,
|
|
214
219
|
paths: computePersonalVaultPaths(options.hqRoot),
|
|
215
220
|
personalMode: true,
|
|
216
|
-
journalSlug:
|
|
221
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
217
222
|
skipUnchanged: true,
|
|
218
223
|
propagateDeletes: true,
|
|
219
224
|
propagateDeletePolicy: resolveDeletePolicy(),
|
|
@@ -481,7 +486,7 @@ export function registerCloudCommands(program) {
|
|
|
481
486
|
getEntity: async () => null,
|
|
482
487
|
});
|
|
483
488
|
personalMode = true;
|
|
484
|
-
journalSlug =
|
|
489
|
+
journalSlug = PERSONAL_VAULT_JOURNAL_SLUG;
|
|
485
490
|
}
|
|
486
491
|
// Default paths. For `--personal` with no explicit paths, default to
|
|
487
492
|
// the canonical personal-vault top-level scope so re-runs from a
|
|
@@ -833,7 +838,7 @@ async function runPullPersonal(hqRoot, onConflict) {
|
|
|
833
838
|
vaultConfig,
|
|
834
839
|
hqRoot,
|
|
835
840
|
personalMode: true,
|
|
836
|
-
journalSlug:
|
|
841
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
837
842
|
});
|
|
838
843
|
if (result.aborted) {
|
|
839
844
|
console.log(chalk.yellow(`\n⚠ Pull aborted (${result.filesDownloaded} downloaded, ${result.filesSkipped} skipped, ${result.conflicts} conflicts)`));
|
|
@@ -954,7 +959,7 @@ async function runNowSingle(hqRoot, company, personal, message, onConflict, mode
|
|
|
954
959
|
getEntity: async () => null,
|
|
955
960
|
});
|
|
956
961
|
personalMode = true;
|
|
957
|
-
journalSlug =
|
|
962
|
+
journalSlug = PERSONAL_VAULT_JOURNAL_SLUG;
|
|
958
963
|
pushPaths = computePersonalVaultPaths(hqRoot);
|
|
959
964
|
}
|
|
960
965
|
else {
|
|
@@ -1163,4 +1168,4 @@ function resolveUploadAuthorFromCache() {
|
|
|
1163
1168
|
}
|
|
1164
1169
|
}
|
|
1165
1170
|
//# sourceMappingURL=cloud.js.map
|
|
1166
|
-
//# debugId=
|
|
1171
|
+
//# debugId=856084be-3bbb-50cd-8e3b-1e19ea13f4fb
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.36.
|
|
3
|
+
"version": "5.36.3",
|
|
4
4
|
"description": "HQ by Indigo management CLI \u2014 modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"clean": "rm -rf dist"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@indigoai-us/hq-cloud": "^6.2.
|
|
18
|
+
"@indigoai-us/hq-cloud": "^6.2.4",
|
|
19
19
|
"@indigoai-us/hq-onboarding": "^0.1.0",
|
|
20
20
|
"@sentry/node": "^10.49.0",
|
|
21
21
|
"chalk": "^5.3.0",
|
|
@@ -140,7 +140,7 @@ describe("pullAll", () => {
|
|
|
140
140
|
expect(sync.calls[2]).toMatchObject({
|
|
141
141
|
company: "psn_alice",
|
|
142
142
|
personalMode: true,
|
|
143
|
-
journalSlug: "
|
|
143
|
+
journalSlug: "__hq_personal_vault__",
|
|
144
144
|
});
|
|
145
145
|
|
|
146
146
|
expect(result.attempted).toBe(3);
|
|
@@ -300,7 +300,7 @@ describe("pullAll", () => {
|
|
|
300
300
|
expect(sync.calls).toHaveLength(1);
|
|
301
301
|
expect(sync.calls[0].company).toBe("psn_old");
|
|
302
302
|
expect(sync.calls[0].personalMode).toBe(true);
|
|
303
|
-
expect(sync.calls[0].journalSlug).toBe("
|
|
303
|
+
expect(sync.calls[0].journalSlug).toBe("__hq_personal_vault__");
|
|
304
304
|
});
|
|
305
305
|
|
|
306
306
|
// ── 8/9/10. US-011 narrow-hint banner ─────────────────────────────────────
|
|
@@ -565,7 +565,7 @@ describe("pullAll", () => {
|
|
|
565
565
|
"psn_alice",
|
|
566
566
|
]);
|
|
567
567
|
expect(sync.calls[1].personalMode).toBe(true);
|
|
568
|
-
expect(sync.calls[1].journalSlug).toBe("
|
|
568
|
+
expect(sync.calls[1].journalSlug).toBe("__hq_personal_vault__");
|
|
569
569
|
});
|
|
570
570
|
|
|
571
571
|
it("skipPersonal=true with empty memberships produces zero sync calls", async () => {
|
|
@@ -176,7 +176,7 @@ describe("pushAll", () => {
|
|
|
176
176
|
expect(share.calls[2]).toMatchObject({
|
|
177
177
|
company: "psn_alice",
|
|
178
178
|
personalMode: true,
|
|
179
|
-
journalSlug: "
|
|
179
|
+
journalSlug: "__hq_personal_vault__",
|
|
180
180
|
skipUnchanged: true,
|
|
181
181
|
propagateDeletes: true,
|
|
182
182
|
});
|
|
@@ -346,7 +346,7 @@ describe("pushAll", () => {
|
|
|
346
346
|
expect(share.calls).toHaveLength(1);
|
|
347
347
|
expect(share.calls[0].company).toBe("psn_old");
|
|
348
348
|
expect(share.calls[0].personalMode).toBe(true);
|
|
349
|
-
expect(share.calls[0].journalSlug).toBe("
|
|
349
|
+
expect(share.calls[0].journalSlug).toBe("__hq_personal_vault__");
|
|
350
350
|
});
|
|
351
351
|
|
|
352
352
|
// ── 7. Aggregate counts include deletes ───────────────────────────────────
|
|
@@ -451,6 +451,6 @@ describe("pushAll", () => {
|
|
|
451
451
|
"psn_alice",
|
|
452
452
|
]);
|
|
453
453
|
expect(share.calls[1].personalMode).toBe(true);
|
|
454
|
-
expect(share.calls[1].journalSlug).toBe("
|
|
454
|
+
expect(share.calls[1].journalSlug).toBe("__hq_personal_vault__");
|
|
455
455
|
});
|
|
456
456
|
});
|
package/src/commands/cloud.ts
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
loadCachedTokens,
|
|
27
27
|
VaultClient,
|
|
28
28
|
computePersonalVaultPaths,
|
|
29
|
+
PERSONAL_VAULT_JOURNAL_SLUG,
|
|
29
30
|
type ConflictStrategy,
|
|
30
31
|
type EntityContext,
|
|
31
32
|
type MembershipSyncConfig,
|
|
@@ -301,13 +302,18 @@ export async function pullAll(
|
|
|
301
302
|
|
|
302
303
|
const personal = options.skipPersonal ? null : pickCanonicalPerson(persons);
|
|
303
304
|
if (personal) {
|
|
305
|
+
// Canonical slug, NOT the literal "personal": that legacy slug is the
|
|
306
|
+
// companies/personal company's journal. hq-sync-runner moved the vault
|
|
307
|
+
// slot to PERSONAL_VAULT_JOURNAL_SLUG; hq-cli journaling the same vault
|
|
308
|
+
// under the old slug split the bookkeeping across two files — every CLI
|
|
309
|
+
// sync re-flagged the menubar's already-synced files as conflicts.
|
|
304
310
|
plan.push({
|
|
305
311
|
slug: "personal",
|
|
306
312
|
syncOptions: {
|
|
307
313
|
company: personal.uid,
|
|
308
314
|
hqRoot: options.hqRoot,
|
|
309
315
|
personalMode: true,
|
|
310
|
-
journalSlug:
|
|
316
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
311
317
|
...(options.onConflict ? { onConflict: options.onConflict } : {}),
|
|
312
318
|
},
|
|
313
319
|
});
|
|
@@ -442,7 +448,7 @@ export async function pushAll(
|
|
|
442
448
|
hqRoot: options.hqRoot,
|
|
443
449
|
paths: computePersonalVaultPaths(options.hqRoot),
|
|
444
450
|
personalMode: true,
|
|
445
|
-
journalSlug:
|
|
451
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
446
452
|
skipUnchanged: true,
|
|
447
453
|
propagateDeletes: true,
|
|
448
454
|
propagateDeletePolicy: resolveDeletePolicy(),
|
|
@@ -821,7 +827,7 @@ export function registerCloudCommands(program: Command): void {
|
|
|
821
827
|
getEntity: async () => null,
|
|
822
828
|
});
|
|
823
829
|
personalMode = true;
|
|
824
|
-
journalSlug =
|
|
830
|
+
journalSlug = PERSONAL_VAULT_JOURNAL_SLUG;
|
|
825
831
|
}
|
|
826
832
|
|
|
827
833
|
// Default paths. For `--personal` with no explicit paths, default to
|
|
@@ -1349,7 +1355,7 @@ async function runPullPersonal(
|
|
|
1349
1355
|
vaultConfig,
|
|
1350
1356
|
hqRoot,
|
|
1351
1357
|
personalMode: true,
|
|
1352
|
-
journalSlug:
|
|
1358
|
+
journalSlug: PERSONAL_VAULT_JOURNAL_SLUG,
|
|
1353
1359
|
});
|
|
1354
1360
|
|
|
1355
1361
|
if (result.aborted) {
|
|
@@ -1510,7 +1516,7 @@ async function runNowSingle(
|
|
|
1510
1516
|
getEntity: async () => null,
|
|
1511
1517
|
});
|
|
1512
1518
|
personalMode = true;
|
|
1513
|
-
journalSlug =
|
|
1519
|
+
journalSlug = PERSONAL_VAULT_JOURNAL_SLUG;
|
|
1514
1520
|
pushPaths = computePersonalVaultPaths(hqRoot);
|
|
1515
1521
|
} else {
|
|
1516
1522
|
// For company targets we need a concrete slug to compute the push path.
|