@staff0rd/assist 0.1092.2 → 0.1092.4
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/built-version +1 -1
- package/dist/commands/sessions/web/bundle.js +413 -413
- package/dist/index.js +31 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.1092.
|
|
9
|
+
version: "0.1092.4",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -934,7 +934,6 @@ var assistConfigShape = {
|
|
|
934
934
|
keyId: z6.string().optional(),
|
|
935
935
|
issuerId: z6.string().optional(),
|
|
936
936
|
keyRef: z6.string().optional(),
|
|
937
|
-
account: z6.string().optional(),
|
|
938
937
|
bundleId: z6.string().optional(),
|
|
939
938
|
externalGroup: z6.string().optional(),
|
|
940
939
|
internalGroup: z6.string().optional()
|
|
@@ -1451,26 +1450,35 @@ function stripLegacyReviewKeys(review2) {
|
|
|
1451
1450
|
return { ...rest, highLevel: kept };
|
|
1452
1451
|
}
|
|
1453
1452
|
|
|
1454
|
-
// src/shared/
|
|
1455
|
-
var
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1453
|
+
// src/shared/stripLegacySectionKeys.ts
|
|
1454
|
+
var LEGACY_SECTION_KEYS = {
|
|
1455
|
+
sessions: [
|
|
1456
|
+
"windowsProjectsRoot",
|
|
1457
|
+
"windowsDaemonHost",
|
|
1458
|
+
"windowsDaemonPort",
|
|
1459
|
+
"windowsVersionCheck",
|
|
1460
|
+
"topBar",
|
|
1461
|
+
"floatWaiting",
|
|
1462
|
+
"floatWaitingAfterMs",
|
|
1463
|
+
"parkWaitingAfterMs",
|
|
1464
|
+
"askQuestionAutoApprove"
|
|
1465
|
+
],
|
|
1466
|
+
worktree: ["watcher", "includeDrafts"],
|
|
1467
|
+
devlog: ["skip"],
|
|
1468
|
+
testflight: ["account"]
|
|
1469
|
+
};
|
|
1468
1470
|
function withoutKeys(value, keys) {
|
|
1469
1471
|
if (!value || typeof value !== "object") return value;
|
|
1470
1472
|
const rest = { ...value };
|
|
1471
1473
|
for (const key of keys) delete rest[key];
|
|
1472
1474
|
return rest;
|
|
1473
1475
|
}
|
|
1476
|
+
function stripLegacySectionKeys(config) {
|
|
1477
|
+
for (const [section2, keys] of Object.entries(LEGACY_SECTION_KEYS))
|
|
1478
|
+
if (config[section2]) config[section2] = withoutKeys(config[section2], keys);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// src/shared/stripLegacyConfigKeys.ts
|
|
1474
1482
|
function stripRepos(repos2) {
|
|
1475
1483
|
if (!repos2 || typeof repos2 !== "object") return repos2;
|
|
1476
1484
|
return Object.fromEntries(
|
|
@@ -1491,12 +1499,7 @@ function stripLegacyConfigKeys(config) {
|
|
|
1491
1499
|
const { feeds: _feeds, ...rest } = news;
|
|
1492
1500
|
stripped.news = rest;
|
|
1493
1501
|
}
|
|
1494
|
-
|
|
1495
|
-
stripped.sessions = withoutKeys(stripped.sessions, LEGACY_SESSIONS_KEYS);
|
|
1496
|
-
if (stripped.worktree)
|
|
1497
|
-
stripped.worktree = withoutKeys(stripped.worktree, LEGACY_WORKTREE_KEYS);
|
|
1498
|
-
if (stripped.devlog)
|
|
1499
|
-
stripped.devlog = withoutKeys(stripped.devlog, LEGACY_DEVLOG_KEYS);
|
|
1502
|
+
stripLegacySectionKeys(stripped);
|
|
1500
1503
|
if (stripped.review) stripped.review = stripLegacyReviewKeys(stripped.review);
|
|
1501
1504
|
return stripped;
|
|
1502
1505
|
}
|
|
@@ -7043,12 +7046,7 @@ var testflightConfigHelp = [
|
|
|
7043
7046
|
{
|
|
7044
7047
|
key: "testflight.keyRef",
|
|
7045
7048
|
setter: "assist config set testflight.keyRef op://<vault>/<item>/<field>",
|
|
7046
|
-
note: "1Password reference to the API key .p8 (read via op, never stored)"
|
|
7047
|
-
},
|
|
7048
|
-
{
|
|
7049
|
-
key: "testflight.account",
|
|
7050
|
-
setter: "assist config set testflight.account my.1password.com",
|
|
7051
|
-
note: "1Password account holding keyRef (default: searches every signed-in account)"
|
|
7049
|
+
note: "1Password reference to the API key .p8 (read via op from whichever signed-in account holds it, never stored)"
|
|
7052
7050
|
},
|
|
7053
7051
|
{
|
|
7054
7052
|
key: "testflight.bundleId",
|
|
@@ -12832,15 +12830,14 @@ function failure(reason4) {
|
|
|
12832
12830
|
`Failed to read testflight.keyRef from 1Password: ${reason4}`
|
|
12833
12831
|
);
|
|
12834
12832
|
}
|
|
12835
|
-
async function readAscKey(reference,
|
|
12833
|
+
async function readAscKey(reference, op = runOp) {
|
|
12836
12834
|
if (!reference.startsWith("op://"))
|
|
12837
12835
|
throw new TestflightError(
|
|
12838
12836
|
"testflight.keyRef must be a 1Password reference starting with op://"
|
|
12839
12837
|
);
|
|
12840
|
-
const
|
|
12841
|
-
const first = await op(["read", ...accountArgs, reference]);
|
|
12838
|
+
const first = await op(["read", reference]);
|
|
12842
12839
|
if (first.ok) return first.stdout.trim();
|
|
12843
|
-
if (
|
|
12840
|
+
if (!first.missing) throw failure(first.error);
|
|
12844
12841
|
const accounts = await listAccounts(op);
|
|
12845
12842
|
for (const url of accounts) {
|
|
12846
12843
|
const result = await op(["read", "--account", url, reference]);
|
|
@@ -12850,16 +12847,13 @@ async function readAscKey(reference, account, op = runOp) {
|
|
|
12850
12847
|
const searched = accounts.length ? ` (searched ${accounts.join(", ")})` : "";
|
|
12851
12848
|
throw failure(
|
|
12852
12849
|
`${first.error}
|
|
12853
|
-
The item was not found in any signed-in 1Password account${searched}
|
|
12850
|
+
The item was not found in any signed-in 1Password account${searched}.`
|
|
12854
12851
|
);
|
|
12855
12852
|
}
|
|
12856
12853
|
|
|
12857
12854
|
// src/commands/testflight/connectAsc.ts
|
|
12858
12855
|
async function connectAsc(config, options2 = {}) {
|
|
12859
|
-
const privateKey = await (options2.readKey ?? readAscKey)(
|
|
12860
|
-
config.keyRef,
|
|
12861
|
-
config.account
|
|
12862
|
-
);
|
|
12856
|
+
const privateKey = await (options2.readKey ?? readAscKey)(config.keyRef);
|
|
12863
12857
|
const token = createAscToken({
|
|
12864
12858
|
keyId: config.keyId,
|
|
12865
12859
|
issuerId: config.issuerId,
|