@clickraft/cli 0.1.1 → 0.1.2
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 +2 -2
- package/dist/cli.js +13 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2148,16 +2148,19 @@ function inspectTelemetry(options = {}) {
|
|
|
2148
2148
|
// src/commands/tokens/list.ts
|
|
2149
2149
|
import { z as z6 } from "zod";
|
|
2150
2150
|
var TokenRowSchema = z6.object({
|
|
2151
|
-
id: z6.string(),
|
|
2152
|
-
|
|
2151
|
+
id: z6.string().uuid(),
|
|
2152
|
+
organizationId: z6.string().uuid(),
|
|
2153
|
+
userId: z6.string().uuid(),
|
|
2154
|
+
clientId: z6.string(),
|
|
2155
|
+
tokenPrefix: z6.string(),
|
|
2153
2156
|
name: z6.string().nullable(),
|
|
2154
2157
|
scopes: z6.array(z6.string()),
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
+
lastUsedAt: z6.string().nullable(),
|
|
2159
|
+
expiresAt: z6.string(),
|
|
2160
|
+
createdAt: z6.string()
|
|
2158
2161
|
}).strict();
|
|
2159
2162
|
var TokensListResponseSchema = z6.object({
|
|
2160
|
-
|
|
2163
|
+
tokens: z6.array(TokenRowSchema)
|
|
2161
2164
|
}).strict();
|
|
2162
2165
|
async function listTokens(options) {
|
|
2163
2166
|
const config = await loadConfig({
|
|
@@ -2175,7 +2178,7 @@ async function listTokens(options) {
|
|
|
2175
2178
|
responseSchema: TokensListResponseSchema,
|
|
2176
2179
|
signal: options.signal
|
|
2177
2180
|
});
|
|
2178
|
-
return data.
|
|
2181
|
+
return data.tokens;
|
|
2179
2182
|
}
|
|
2180
2183
|
|
|
2181
2184
|
// src/errors/format.ts
|
|
@@ -2479,11 +2482,11 @@ function renderTokensList(rows, out) {
|
|
|
2479
2482
|
}
|
|
2480
2483
|
const headers = ["PREFIX", "NAME", "SCOPES", "LAST USED", "EXPIRES"];
|
|
2481
2484
|
const data = rows.map((row) => [
|
|
2482
|
-
row.
|
|
2485
|
+
row.tokenPrefix,
|
|
2483
2486
|
row.name ?? "\u2014",
|
|
2484
2487
|
row.scopes.join(",") || "\u2014",
|
|
2485
|
-
row.
|
|
2486
|
-
row.
|
|
2488
|
+
row.lastUsedAt ?? "never",
|
|
2489
|
+
row.expiresAt
|
|
2487
2490
|
]);
|
|
2488
2491
|
const widths = headers.map(
|
|
2489
2492
|
(header, i) => Math.max(header.length, ...data.map((cells) => cells[i].length))
|