@warmhub/cli 0.50.0 → 0.51.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/dist/wh.js +20 -9
- package/package.json +1 -1
package/dist/wh.js
CHANGED
|
@@ -21666,9 +21666,9 @@ class WarmHubClient {
|
|
|
21666
21666
|
throw toWarmHubError(error);
|
|
21667
21667
|
}
|
|
21668
21668
|
},
|
|
21669
|
-
list: async () => {
|
|
21669
|
+
list: async (opts) => {
|
|
21670
21670
|
try {
|
|
21671
|
-
return await this.trpc.token.list.query();
|
|
21671
|
+
return await this.trpc.token.list.query(opts?.includeInactive ? { includeInactive: true } : undefined);
|
|
21672
21672
|
} catch (error) {
|
|
21673
21673
|
throw toWarmHubError(error);
|
|
21674
21674
|
}
|
|
@@ -36168,7 +36168,7 @@ function parseDuration(input) {
|
|
|
36168
36168
|
function tokenStatus(pat) {
|
|
36169
36169
|
if (pat.revokedAt)
|
|
36170
36170
|
return "revoked";
|
|
36171
|
-
if (pat.expiresAt && pat.expiresAt
|
|
36171
|
+
if (pat.expiresAt && pat.expiresAt <= Date.now())
|
|
36172
36172
|
return "expired";
|
|
36173
36173
|
return "active";
|
|
36174
36174
|
}
|
|
@@ -36193,6 +36193,12 @@ var createFlags9 = {
|
|
|
36193
36193
|
var nameFlags = {
|
|
36194
36194
|
name: flag.string({ short: "n", description: "Token name" })
|
|
36195
36195
|
};
|
|
36196
|
+
var listFlags6 = {
|
|
36197
|
+
all: flag.boolean({
|
|
36198
|
+
short: "a",
|
|
36199
|
+
description: "Include expired and revoked tokens (default: active only)"
|
|
36200
|
+
})
|
|
36201
|
+
};
|
|
36196
36202
|
function parseScopeFlag(value) {
|
|
36197
36203
|
const eqIdx = value.indexOf("=");
|
|
36198
36204
|
if (eqIdx === -1) {
|
|
@@ -36274,9 +36280,9 @@ var handleCreate8 = async (ctx, { flags }) => {
|
|
|
36274
36280
|
ctx.status(` expires: ${new Date(result.expiresAt).toISOString().slice(0, 16)}`);
|
|
36275
36281
|
});
|
|
36276
36282
|
};
|
|
36277
|
-
var handleList8 = async (ctx) => {
|
|
36283
|
+
var handleList8 = async (ctx, { flags }) => {
|
|
36278
36284
|
const c = ctx.colors;
|
|
36279
|
-
const items = await ctx.client.token.list();
|
|
36285
|
+
const items = await ctx.client.token.list({ includeInactive: flags.all });
|
|
36280
36286
|
writeOutput(ctx, items, () => {
|
|
36281
36287
|
if (!items.length) {
|
|
36282
36288
|
ctx.status(`${c.dim}No tokens${c.reset}`);
|
|
@@ -36348,9 +36354,14 @@ var TOKEN_DOMAIN = defineDomain({
|
|
|
36348
36354
|
handler: handleCreate8
|
|
36349
36355
|
},
|
|
36350
36356
|
list: {
|
|
36351
|
-
summary: "List your personal access tokens",
|
|
36357
|
+
summary: "List your personal access tokens (active by default)",
|
|
36352
36358
|
args: "",
|
|
36353
|
-
|
|
36359
|
+
flags: listFlags6,
|
|
36360
|
+
examples: [
|
|
36361
|
+
"wh token list",
|
|
36362
|
+
"wh token list --all",
|
|
36363
|
+
"wh token list --json"
|
|
36364
|
+
],
|
|
36354
36365
|
handler: handleList8
|
|
36355
36366
|
},
|
|
36356
36367
|
get: {
|
|
@@ -37866,7 +37877,7 @@ function resolveLogLevel(flags, env) {
|
|
|
37866
37877
|
// package.json
|
|
37867
37878
|
var package_default3 = {
|
|
37868
37879
|
name: "@warmhub/cli",
|
|
37869
|
-
version: "0.
|
|
37880
|
+
version: "0.51.0",
|
|
37870
37881
|
private: false,
|
|
37871
37882
|
type: "module",
|
|
37872
37883
|
description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
@@ -38893,4 +38904,4 @@ if (!updateCheckSuppressedByArgv && shouldRunUpdateCheck(updateEligibility)) {
|
|
|
38893
38904
|
var interceptedExitCode = await maybeHandleComponentShellBoundary(dispatchArgv);
|
|
38894
38905
|
process.exitCode = interceptedExitCode === undefined ? await runCli(dispatchArgv, { version: package_default3.version }) : interceptedExitCode;
|
|
38895
38906
|
|
|
38896
|
-
//# debugId=
|
|
38907
|
+
//# debugId=A9285CCD9DBD34EF64756E2164756E21
|
package/package.json
CHANGED