@bussolabs/closeyourit-cli 0.0.5 → 0.0.7
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/tickets/attachment-download.d.ts +15 -0
- package/dist/commands/tickets/attachment-download.js +35 -0
- package/dist/commands/tickets/attachments.d.ts +12 -0
- package/dist/commands/tickets/attachments.js +33 -0
- package/dist/commands/tickets/comments.d.ts +12 -0
- package/dist/commands/tickets/comments.js +44 -0
- package/dist/lib/api.d.ts +11 -0
- package/dist/lib/api.js +27 -0
- package/dist/lib/output.js +22 -6
- package/oclif.manifest.json +499 -335
- package/package.json +3 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TicketsAttachmentDownload extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
attachment: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
out: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
filename: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const base_1 = require("../../base");
|
|
7
|
+
class TicketsAttachmentDownload extends base_1.BaseCommand {
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ description: 'Ticket id', required: true }),
|
|
10
|
+
attachment: core_1.Args.string({ description: 'Attachment id', required: true }),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Download a ticket attachment to disk';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> tickets attachment-download <ticket-id> <attachment-id> --project acme-api',
|
|
15
|
+
'<%= config.bin %> tickets attachment-download <ticket-id> <attachment-id> -p acme-api --out ./downloads',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...base_1.projectFlag,
|
|
19
|
+
out: core_1.Flags.string({ default: '.', description: 'Output directory' }),
|
|
20
|
+
filename: core_1.Flags.string({ description: 'Override the output filename' }),
|
|
21
|
+
};
|
|
22
|
+
async run() {
|
|
23
|
+
const { args, flags } = await this.parse(TicketsAttachmentDownload);
|
|
24
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
25
|
+
const { data, filename } = await this.api.download(`/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/attachments/${encodeURIComponent(args.attachment)}/download`);
|
|
26
|
+
const name = flags.filename ?? filename ?? args.attachment;
|
|
27
|
+
const dest = (0, node_path_1.join)(flags.out, name);
|
|
28
|
+
await (0, promises_1.writeFile)(dest, data);
|
|
29
|
+
if (!this.jsonEnabled()) {
|
|
30
|
+
this.log(`Saved ${data.byteLength} bytes → ${dest}`);
|
|
31
|
+
}
|
|
32
|
+
return { bytes: data.byteLength, filename: name, path: dest };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = TicketsAttachmentDownload;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TicketsAttachments extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class TicketsAttachments extends base_1.BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: core_1.Args.string({ description: 'Ticket id', required: true }),
|
|
9
|
+
};
|
|
10
|
+
static description = "List a ticket's attachments";
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> tickets attachments <ticket-id> --project acme-api',
|
|
13
|
+
'<%= config.bin %> tickets attachments <ticket-id> -p acme-api --json',
|
|
14
|
+
];
|
|
15
|
+
static flags = { ...base_1.projectFlag };
|
|
16
|
+
async run() {
|
|
17
|
+
const { args, flags } = await this.parse(TicketsAttachments);
|
|
18
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
19
|
+
const res = await this.api.get(`/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/attachments?per=100`);
|
|
20
|
+
const attachments = res.data ?? [];
|
|
21
|
+
if (!this.jsonEnabled()) {
|
|
22
|
+
this.log((0, output_1.renderTable)(['ID', 'FILENAME', 'CONTENT_TYPE', 'BYTE_SIZE', 'CREATED_AT'], attachments.map((attachment) => [
|
|
23
|
+
String(attachment.id ?? ''),
|
|
24
|
+
String(attachment.filename ?? ''),
|
|
25
|
+
String(attachment.content_type ?? ''),
|
|
26
|
+
String(attachment.byte_size ?? ''),
|
|
27
|
+
String(attachment.created_at ?? ''),
|
|
28
|
+
])));
|
|
29
|
+
}
|
|
30
|
+
return res;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = TicketsAttachments;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TicketsComments extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class TicketsComments extends base_1.BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: core_1.Args.string({ description: 'Ticket id', required: true }),
|
|
8
|
+
};
|
|
9
|
+
static description = 'List all comments of a ticket (oldest first)';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> tickets comments <ticket-id> --project acme-api',
|
|
12
|
+
'<%= config.bin %> tickets comments <ticket-id> -p acme-api --json',
|
|
13
|
+
];
|
|
14
|
+
static flags = { ...base_1.projectFlag };
|
|
15
|
+
async run() {
|
|
16
|
+
const { args, flags } = await this.parse(TicketsComments);
|
|
17
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
18
|
+
const base = `/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/comments`;
|
|
19
|
+
// Read every page so `comments` returns the full discussion, not just the first page.
|
|
20
|
+
const all = [];
|
|
21
|
+
let page = 1;
|
|
22
|
+
let totalPages = 1;
|
|
23
|
+
do {
|
|
24
|
+
// eslint-disable-next-line no-await-in-loop
|
|
25
|
+
const res = await this.api.get(`${base}?page=${page}&per=100`);
|
|
26
|
+
all.push(...(res.data ?? []));
|
|
27
|
+
totalPages = Number(res.meta?.total_pages ?? 1);
|
|
28
|
+
page += 1;
|
|
29
|
+
} while (page <= totalPages);
|
|
30
|
+
if (!this.jsonEnabled()) {
|
|
31
|
+
if (all.length === 0) {
|
|
32
|
+
this.log('(nessun commento)');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
for (const comment of all) {
|
|
36
|
+
this.log(`\n── ${String(comment.author ?? '?')} · ${String(comment.created_at ?? '')} · ${String(comment.id ?? '')}`);
|
|
37
|
+
this.log(String(comment.body ?? ''));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { data: all };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.default = TicketsComments;
|
package/dist/lib/api.d.ts
CHANGED
|
@@ -41,5 +41,16 @@ export declare class CliApi {
|
|
|
41
41
|
post<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<Envelope<T>>;
|
|
42
42
|
put<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<Envelope<T>>;
|
|
43
43
|
delete<T = unknown>(path: string, opts?: RequestOptions): Promise<Envelope<T>>;
|
|
44
|
+
/**
|
|
45
|
+
* Download a binary payload (e.g. a ticket attachment). The endpoint redirects to a signed
|
|
46
|
+
* ActiveStorage blob URL; fetch follows the redirect (and drops the Authorization header on the
|
|
47
|
+
* cross-origin hop to storage, as intended). Returns the bytes plus the filename parsed from
|
|
48
|
+
* Content-Disposition when present. Error responses are JSON envelopes → mapped like every call.
|
|
49
|
+
*/
|
|
50
|
+
download(path: string): Promise<{
|
|
51
|
+
contentType?: string;
|
|
52
|
+
data: Uint8Array;
|
|
53
|
+
filename?: string;
|
|
54
|
+
}>;
|
|
44
55
|
}
|
|
45
56
|
export {};
|
package/dist/lib/api.js
CHANGED
|
@@ -105,5 +105,32 @@ class CliApi {
|
|
|
105
105
|
delete(path, opts) {
|
|
106
106
|
return this.request('DELETE', path, opts);
|
|
107
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Download a binary payload (e.g. a ticket attachment). The endpoint redirects to a signed
|
|
110
|
+
* ActiveStorage blob URL; fetch follows the redirect (and drops the Authorization header on the
|
|
111
|
+
* cross-origin hop to storage, as intended). Returns the bytes plus the filename parsed from
|
|
112
|
+
* Content-Disposition when present. Error responses are JSON envelopes → mapped like every call.
|
|
113
|
+
*/
|
|
114
|
+
async download(path) {
|
|
115
|
+
const headers = this.authHeaders(true);
|
|
116
|
+
headers.Accept = '*/*';
|
|
117
|
+
const url = this.resolveUrl(path);
|
|
118
|
+
let res;
|
|
119
|
+
try {
|
|
120
|
+
res = await fetch(url, { method: 'GET', headers, redirect: 'follow' });
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
throw new ApiRequestError(0, error_codes_1.ErrorCodes.Network.requestFailed, `Request to ${url} failed: ${err.message}`);
|
|
124
|
+
}
|
|
125
|
+
if (!res.ok) {
|
|
126
|
+
await this.handleResponse(res); // always throws: maps the JSON error envelope
|
|
127
|
+
throw new ApiRequestError(res.status, `C${res.status}-API-000`, `Download failed (${res.status})`);
|
|
128
|
+
}
|
|
129
|
+
const data = new Uint8Array(await res.arrayBuffer());
|
|
130
|
+
const disposition = res.headers.get('content-disposition') ?? '';
|
|
131
|
+
const match = /filename\*?=(?:UTF-8''|")?([^";]+)/i.exec(disposition);
|
|
132
|
+
const filename = match ? decodeURIComponent(match[1].replace(/"$/, '')) : undefined;
|
|
133
|
+
return { contentType: res.headers.get('content-type') ?? undefined, data, filename };
|
|
134
|
+
}
|
|
108
135
|
}
|
|
109
136
|
exports.CliApi = CliApi;
|
package/dist/lib/output.js
CHANGED
|
@@ -2,20 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderTable = renderTable;
|
|
4
4
|
exports.renderRecord = renderRecord;
|
|
5
|
+
/**
|
|
6
|
+
* Neutralize terminal control sequences (CWE-150) in server-supplied strings.
|
|
7
|
+
* Log/error/ticket text is attacker-influenceable; printing raw ESC (0x1B) & co.
|
|
8
|
+
* to a TTY allows cursor/color/title injection. Replace every C0/C1 control char
|
|
9
|
+
* (0x00–0x1F, 0x7F–0x9F) with a space — ANSI is defused, width is preserved.
|
|
10
|
+
*/
|
|
11
|
+
function sanitize(value) {
|
|
12
|
+
let out = '';
|
|
13
|
+
for (const ch of String(value ?? '')) {
|
|
14
|
+
const code = ch.codePointAt(0) ?? 0;
|
|
15
|
+
out += code <= 0x1f || (code >= 0x7f && code <= 0x9f) ? ' ' : ch;
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
5
19
|
/** Minimal dependency-free table renderer for human output. */
|
|
6
20
|
function renderTable(headers, rows) {
|
|
7
|
-
|
|
8
|
-
|
|
21
|
+
const safeHeaders = headers.map(sanitize);
|
|
22
|
+
const safeRows = rows.map((row) => row.map(sanitize));
|
|
23
|
+
if (safeRows.length === 0) {
|
|
24
|
+
return `${safeHeaders.join(' ')}\n(no results)`;
|
|
9
25
|
}
|
|
10
|
-
const widths =
|
|
11
|
-
const line = (cols) => cols.map((cell, col) =>
|
|
26
|
+
const widths = safeHeaders.map((header, col) => Math.max(header.length, ...safeRows.map((row) => (row[col] ?? '').length)));
|
|
27
|
+
const line = (cols) => cols.map((cell, col) => (cell ?? '').padEnd(widths[col])).join(' ').trimEnd();
|
|
12
28
|
const separator = widths.map((width) => '-'.repeat(width));
|
|
13
|
-
return [line(
|
|
29
|
+
return [line(safeHeaders), line(separator), ...safeRows.map(line)].join('\n');
|
|
14
30
|
}
|
|
15
31
|
/** Pretty-print the scalar fields of a record as `key: value` lines. */
|
|
16
32
|
function renderRecord(obj) {
|
|
17
33
|
const lines = Object.entries(obj)
|
|
18
34
|
.filter(([, value]) => value === null || ['string', 'number', 'boolean'].includes(typeof value))
|
|
19
|
-
.map(([key, value]) => `${key}: ${value === null ? '-' : value}`);
|
|
35
|
+
.map(([key, value]) => `${sanitize(key)}: ${value === null ? '-' : sanitize(value)}`);
|
|
20
36
|
return lines.length > 0 ? lines.join('\n') : JSON.stringify(obj, null, 2);
|
|
21
37
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -2434,98 +2434,6 @@
|
|
|
2434
2434
|
"update.js"
|
|
2435
2435
|
]
|
|
2436
2436
|
},
|
|
2437
|
-
"org:show": {
|
|
2438
|
-
"aliases": [],
|
|
2439
|
-
"args": {},
|
|
2440
|
-
"description": "Show your organization settings",
|
|
2441
|
-
"examples": [
|
|
2442
|
-
"<%= config.bin %> org show",
|
|
2443
|
-
"<%= config.bin %> org show --json"
|
|
2444
|
-
],
|
|
2445
|
-
"flags": {
|
|
2446
|
-
"json": {
|
|
2447
|
-
"description": "Format output as json.",
|
|
2448
|
-
"helpGroup": "GLOBAL",
|
|
2449
|
-
"name": "json",
|
|
2450
|
-
"allowNo": false,
|
|
2451
|
-
"type": "boolean"
|
|
2452
|
-
}
|
|
2453
|
-
},
|
|
2454
|
-
"hasDynamicHelp": false,
|
|
2455
|
-
"hiddenAliases": [],
|
|
2456
|
-
"id": "org:show",
|
|
2457
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
2458
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
2459
|
-
"pluginType": "core",
|
|
2460
|
-
"strict": true,
|
|
2461
|
-
"enableJsonFlag": true,
|
|
2462
|
-
"isESM": false,
|
|
2463
|
-
"relativePath": [
|
|
2464
|
-
"dist",
|
|
2465
|
-
"commands",
|
|
2466
|
-
"org",
|
|
2467
|
-
"show.js"
|
|
2468
|
-
]
|
|
2469
|
-
},
|
|
2470
|
-
"org:update": {
|
|
2471
|
-
"aliases": [],
|
|
2472
|
-
"args": {},
|
|
2473
|
-
"description": "Update your organization settings (requires organization.manage)",
|
|
2474
|
-
"examples": [
|
|
2475
|
-
"<%= config.bin %> org update --name \"Acme Inc\"",
|
|
2476
|
-
"<%= config.bin %> org update --slug acme-inc",
|
|
2477
|
-
"<%= config.bin %> org update --projects-view table"
|
|
2478
|
-
],
|
|
2479
|
-
"flags": {
|
|
2480
|
-
"json": {
|
|
2481
|
-
"description": "Format output as json.",
|
|
2482
|
-
"helpGroup": "GLOBAL",
|
|
2483
|
-
"name": "json",
|
|
2484
|
-
"allowNo": false,
|
|
2485
|
-
"type": "boolean"
|
|
2486
|
-
},
|
|
2487
|
-
"name": {
|
|
2488
|
-
"description": "New organization name",
|
|
2489
|
-
"name": "name",
|
|
2490
|
-
"hasDynamicHelp": false,
|
|
2491
|
-
"multiple": false,
|
|
2492
|
-
"type": "option"
|
|
2493
|
-
},
|
|
2494
|
-
"slug": {
|
|
2495
|
-
"description": "New organization slug (lowercase, a-z 0-9 and hyphens)",
|
|
2496
|
-
"name": "slug",
|
|
2497
|
-
"hasDynamicHelp": false,
|
|
2498
|
-
"multiple": false,
|
|
2499
|
-
"type": "option"
|
|
2500
|
-
},
|
|
2501
|
-
"projects-view": {
|
|
2502
|
-
"description": "Default projects list view",
|
|
2503
|
-
"name": "projects-view",
|
|
2504
|
-
"hasDynamicHelp": false,
|
|
2505
|
-
"multiple": false,
|
|
2506
|
-
"options": [
|
|
2507
|
-
"cards",
|
|
2508
|
-
"table"
|
|
2509
|
-
],
|
|
2510
|
-
"type": "option"
|
|
2511
|
-
}
|
|
2512
|
-
},
|
|
2513
|
-
"hasDynamicHelp": false,
|
|
2514
|
-
"hiddenAliases": [],
|
|
2515
|
-
"id": "org:update",
|
|
2516
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
2517
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
2518
|
-
"pluginType": "core",
|
|
2519
|
-
"strict": true,
|
|
2520
|
-
"enableJsonFlag": true,
|
|
2521
|
-
"isESM": false,
|
|
2522
|
-
"relativePath": [
|
|
2523
|
-
"dist",
|
|
2524
|
-
"commands",
|
|
2525
|
-
"org",
|
|
2526
|
-
"update.js"
|
|
2527
|
-
]
|
|
2528
|
-
},
|
|
2529
2437
|
"platforms:create": {
|
|
2530
2438
|
"aliases": [],
|
|
2531
2439
|
"args": {
|
|
@@ -3444,6 +3352,98 @@
|
|
|
3444
3352
|
"update.js"
|
|
3445
3353
|
]
|
|
3446
3354
|
},
|
|
3355
|
+
"org:show": {
|
|
3356
|
+
"aliases": [],
|
|
3357
|
+
"args": {},
|
|
3358
|
+
"description": "Show your organization settings",
|
|
3359
|
+
"examples": [
|
|
3360
|
+
"<%= config.bin %> org show",
|
|
3361
|
+
"<%= config.bin %> org show --json"
|
|
3362
|
+
],
|
|
3363
|
+
"flags": {
|
|
3364
|
+
"json": {
|
|
3365
|
+
"description": "Format output as json.",
|
|
3366
|
+
"helpGroup": "GLOBAL",
|
|
3367
|
+
"name": "json",
|
|
3368
|
+
"allowNo": false,
|
|
3369
|
+
"type": "boolean"
|
|
3370
|
+
}
|
|
3371
|
+
},
|
|
3372
|
+
"hasDynamicHelp": false,
|
|
3373
|
+
"hiddenAliases": [],
|
|
3374
|
+
"id": "org:show",
|
|
3375
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3376
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3377
|
+
"pluginType": "core",
|
|
3378
|
+
"strict": true,
|
|
3379
|
+
"enableJsonFlag": true,
|
|
3380
|
+
"isESM": false,
|
|
3381
|
+
"relativePath": [
|
|
3382
|
+
"dist",
|
|
3383
|
+
"commands",
|
|
3384
|
+
"org",
|
|
3385
|
+
"show.js"
|
|
3386
|
+
]
|
|
3387
|
+
},
|
|
3388
|
+
"org:update": {
|
|
3389
|
+
"aliases": [],
|
|
3390
|
+
"args": {},
|
|
3391
|
+
"description": "Update your organization settings (requires organization.manage)",
|
|
3392
|
+
"examples": [
|
|
3393
|
+
"<%= config.bin %> org update --name \"Acme Inc\"",
|
|
3394
|
+
"<%= config.bin %> org update --slug acme-inc",
|
|
3395
|
+
"<%= config.bin %> org update --projects-view table"
|
|
3396
|
+
],
|
|
3397
|
+
"flags": {
|
|
3398
|
+
"json": {
|
|
3399
|
+
"description": "Format output as json.",
|
|
3400
|
+
"helpGroup": "GLOBAL",
|
|
3401
|
+
"name": "json",
|
|
3402
|
+
"allowNo": false,
|
|
3403
|
+
"type": "boolean"
|
|
3404
|
+
},
|
|
3405
|
+
"name": {
|
|
3406
|
+
"description": "New organization name",
|
|
3407
|
+
"name": "name",
|
|
3408
|
+
"hasDynamicHelp": false,
|
|
3409
|
+
"multiple": false,
|
|
3410
|
+
"type": "option"
|
|
3411
|
+
},
|
|
3412
|
+
"slug": {
|
|
3413
|
+
"description": "New organization slug (lowercase, a-z 0-9 and hyphens)",
|
|
3414
|
+
"name": "slug",
|
|
3415
|
+
"hasDynamicHelp": false,
|
|
3416
|
+
"multiple": false,
|
|
3417
|
+
"type": "option"
|
|
3418
|
+
},
|
|
3419
|
+
"projects-view": {
|
|
3420
|
+
"description": "Default projects list view",
|
|
3421
|
+
"name": "projects-view",
|
|
3422
|
+
"hasDynamicHelp": false,
|
|
3423
|
+
"multiple": false,
|
|
3424
|
+
"options": [
|
|
3425
|
+
"cards",
|
|
3426
|
+
"table"
|
|
3427
|
+
],
|
|
3428
|
+
"type": "option"
|
|
3429
|
+
}
|
|
3430
|
+
},
|
|
3431
|
+
"hasDynamicHelp": false,
|
|
3432
|
+
"hiddenAliases": [],
|
|
3433
|
+
"id": "org:update",
|
|
3434
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3435
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3436
|
+
"pluginType": "core",
|
|
3437
|
+
"strict": true,
|
|
3438
|
+
"enableJsonFlag": true,
|
|
3439
|
+
"isESM": false,
|
|
3440
|
+
"relativePath": [
|
|
3441
|
+
"dist",
|
|
3442
|
+
"commands",
|
|
3443
|
+
"org",
|
|
3444
|
+
"update.js"
|
|
3445
|
+
]
|
|
3446
|
+
},
|
|
3447
3447
|
"roles:create": {
|
|
3448
3448
|
"aliases": [],
|
|
3449
3449
|
"args": {
|
|
@@ -3673,19 +3673,12 @@
|
|
|
3673
3673
|
"update.js"
|
|
3674
3674
|
]
|
|
3675
3675
|
},
|
|
3676
|
-
"
|
|
3676
|
+
"tokens:create": {
|
|
3677
3677
|
"aliases": [],
|
|
3678
|
-
"args": {
|
|
3679
|
-
|
|
3680
|
-
"description": "Ticket id",
|
|
3681
|
-
"name": "id",
|
|
3682
|
-
"required": true
|
|
3683
|
-
}
|
|
3684
|
-
},
|
|
3685
|
-
"description": "Assign a ticket to an account, or unassign it (--unassign)",
|
|
3678
|
+
"args": {},
|
|
3679
|
+
"description": "Create an ingest token (the secret is shown only once)",
|
|
3686
3680
|
"examples": [
|
|
3687
|
-
"<%= config.bin %>
|
|
3688
|
-
"<%= config.bin %> tickets assign <ticket-id> --project acme-api --unassign"
|
|
3681
|
+
"<%= config.bin %> tokens create --project acme-api --name \"CI prod\" --environment-id <env-id>"
|
|
3689
3682
|
],
|
|
3690
3683
|
"flags": {
|
|
3691
3684
|
"json": {
|
|
@@ -3704,29 +3697,26 @@
|
|
|
3704
3697
|
"multiple": false,
|
|
3705
3698
|
"type": "option"
|
|
3706
3699
|
},
|
|
3707
|
-
"
|
|
3708
|
-
"description": "
|
|
3709
|
-
"
|
|
3710
|
-
|
|
3711
|
-
],
|
|
3712
|
-
"name": "assignee-id",
|
|
3700
|
+
"name": {
|
|
3701
|
+
"description": "Human-readable token name",
|
|
3702
|
+
"name": "name",
|
|
3703
|
+
"required": true,
|
|
3713
3704
|
"hasDynamicHelp": false,
|
|
3714
3705
|
"multiple": false,
|
|
3715
3706
|
"type": "option"
|
|
3716
3707
|
},
|
|
3717
|
-
"
|
|
3718
|
-
"description": "
|
|
3719
|
-
"
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
"
|
|
3723
|
-
"
|
|
3724
|
-
"type": "boolean"
|
|
3708
|
+
"environment-id": {
|
|
3709
|
+
"description": "Environment id the token is scoped to",
|
|
3710
|
+
"name": "environment-id",
|
|
3711
|
+
"required": true,
|
|
3712
|
+
"hasDynamicHelp": false,
|
|
3713
|
+
"multiple": false,
|
|
3714
|
+
"type": "option"
|
|
3725
3715
|
}
|
|
3726
3716
|
},
|
|
3727
3717
|
"hasDynamicHelp": false,
|
|
3728
3718
|
"hiddenAliases": [],
|
|
3729
|
-
"id": "
|
|
3719
|
+
"id": "tokens:create",
|
|
3730
3720
|
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3731
3721
|
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3732
3722
|
"pluginType": "core",
|
|
@@ -3736,23 +3726,17 @@
|
|
|
3736
3726
|
"relativePath": [
|
|
3737
3727
|
"dist",
|
|
3738
3728
|
"commands",
|
|
3739
|
-
"
|
|
3740
|
-
"
|
|
3729
|
+
"tokens",
|
|
3730
|
+
"create.js"
|
|
3741
3731
|
]
|
|
3742
3732
|
},
|
|
3743
|
-
"
|
|
3733
|
+
"tokens:list": {
|
|
3744
3734
|
"aliases": [],
|
|
3745
|
-
"args": {
|
|
3746
|
-
|
|
3747
|
-
"description": "Ticket id",
|
|
3748
|
-
"name": "id",
|
|
3749
|
-
"required": true
|
|
3750
|
-
}
|
|
3751
|
-
},
|
|
3752
|
-
"description": "Attach one or more local files to a ticket",
|
|
3735
|
+
"args": {},
|
|
3736
|
+
"description": "List ingest tokens for a project",
|
|
3753
3737
|
"examples": [
|
|
3754
|
-
"<%= config.bin %>
|
|
3755
|
-
"<%= config.bin %>
|
|
3738
|
+
"<%= config.bin %> tokens list --project acme-api",
|
|
3739
|
+
"<%= config.bin %> tokens list -p acme-api --json"
|
|
3756
3740
|
],
|
|
3757
3741
|
"flags": {
|
|
3758
3742
|
"json": {
|
|
@@ -3770,19 +3754,344 @@
|
|
|
3770
3754
|
"hasDynamicHelp": false,
|
|
3771
3755
|
"multiple": false,
|
|
3772
3756
|
"type": "option"
|
|
3773
|
-
},
|
|
3774
|
-
"file": {
|
|
3775
|
-
"description": "Path to a local file to upload (repeatable)",
|
|
3776
|
-
"name": "file",
|
|
3777
|
-
"required": true,
|
|
3778
|
-
"hasDynamicHelp": false,
|
|
3779
|
-
"multiple": true,
|
|
3780
|
-
"type": "option"
|
|
3781
3757
|
}
|
|
3782
3758
|
},
|
|
3783
3759
|
"hasDynamicHelp": false,
|
|
3784
3760
|
"hiddenAliases": [],
|
|
3785
|
-
"id": "
|
|
3761
|
+
"id": "tokens:list",
|
|
3762
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3763
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3764
|
+
"pluginType": "core",
|
|
3765
|
+
"strict": true,
|
|
3766
|
+
"enableJsonFlag": true,
|
|
3767
|
+
"isESM": false,
|
|
3768
|
+
"relativePath": [
|
|
3769
|
+
"dist",
|
|
3770
|
+
"commands",
|
|
3771
|
+
"tokens",
|
|
3772
|
+
"list.js"
|
|
3773
|
+
]
|
|
3774
|
+
},
|
|
3775
|
+
"tokens:revoke": {
|
|
3776
|
+
"aliases": [],
|
|
3777
|
+
"args": {
|
|
3778
|
+
"id": {
|
|
3779
|
+
"description": "Token id",
|
|
3780
|
+
"name": "id",
|
|
3781
|
+
"required": true
|
|
3782
|
+
}
|
|
3783
|
+
},
|
|
3784
|
+
"description": "Revoke an ingest token",
|
|
3785
|
+
"examples": [
|
|
3786
|
+
"<%= config.bin %> tokens revoke <token-id> --project acme-api"
|
|
3787
|
+
],
|
|
3788
|
+
"flags": {
|
|
3789
|
+
"json": {
|
|
3790
|
+
"description": "Format output as json.",
|
|
3791
|
+
"helpGroup": "GLOBAL",
|
|
3792
|
+
"name": "json",
|
|
3793
|
+
"allowNo": false,
|
|
3794
|
+
"type": "boolean"
|
|
3795
|
+
},
|
|
3796
|
+
"project": {
|
|
3797
|
+
"char": "p",
|
|
3798
|
+
"description": "Project id (UUID) or key",
|
|
3799
|
+
"name": "project",
|
|
3800
|
+
"required": true,
|
|
3801
|
+
"hasDynamicHelp": false,
|
|
3802
|
+
"multiple": false,
|
|
3803
|
+
"type": "option"
|
|
3804
|
+
}
|
|
3805
|
+
},
|
|
3806
|
+
"hasDynamicHelp": false,
|
|
3807
|
+
"hiddenAliases": [],
|
|
3808
|
+
"id": "tokens:revoke",
|
|
3809
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3810
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3811
|
+
"pluginType": "core",
|
|
3812
|
+
"strict": true,
|
|
3813
|
+
"enableJsonFlag": true,
|
|
3814
|
+
"isESM": false,
|
|
3815
|
+
"relativePath": [
|
|
3816
|
+
"dist",
|
|
3817
|
+
"commands",
|
|
3818
|
+
"tokens",
|
|
3819
|
+
"revoke.js"
|
|
3820
|
+
]
|
|
3821
|
+
},
|
|
3822
|
+
"tokens:rotate": {
|
|
3823
|
+
"aliases": [],
|
|
3824
|
+
"args": {
|
|
3825
|
+
"id": {
|
|
3826
|
+
"description": "Token id",
|
|
3827
|
+
"name": "id",
|
|
3828
|
+
"required": true
|
|
3829
|
+
}
|
|
3830
|
+
},
|
|
3831
|
+
"description": "Rotate an ingest token (the new secret is shown only once)",
|
|
3832
|
+
"examples": [
|
|
3833
|
+
"<%= config.bin %> tokens rotate <token-id> --project acme-api"
|
|
3834
|
+
],
|
|
3835
|
+
"flags": {
|
|
3836
|
+
"json": {
|
|
3837
|
+
"description": "Format output as json.",
|
|
3838
|
+
"helpGroup": "GLOBAL",
|
|
3839
|
+
"name": "json",
|
|
3840
|
+
"allowNo": false,
|
|
3841
|
+
"type": "boolean"
|
|
3842
|
+
},
|
|
3843
|
+
"project": {
|
|
3844
|
+
"char": "p",
|
|
3845
|
+
"description": "Project id (UUID) or key",
|
|
3846
|
+
"name": "project",
|
|
3847
|
+
"required": true,
|
|
3848
|
+
"hasDynamicHelp": false,
|
|
3849
|
+
"multiple": false,
|
|
3850
|
+
"type": "option"
|
|
3851
|
+
}
|
|
3852
|
+
},
|
|
3853
|
+
"hasDynamicHelp": false,
|
|
3854
|
+
"hiddenAliases": [],
|
|
3855
|
+
"id": "tokens:rotate",
|
|
3856
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3857
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3858
|
+
"pluginType": "core",
|
|
3859
|
+
"strict": true,
|
|
3860
|
+
"enableJsonFlag": true,
|
|
3861
|
+
"isESM": false,
|
|
3862
|
+
"relativePath": [
|
|
3863
|
+
"dist",
|
|
3864
|
+
"commands",
|
|
3865
|
+
"tokens",
|
|
3866
|
+
"rotate.js"
|
|
3867
|
+
]
|
|
3868
|
+
},
|
|
3869
|
+
"tickets:assign": {
|
|
3870
|
+
"aliases": [],
|
|
3871
|
+
"args": {
|
|
3872
|
+
"id": {
|
|
3873
|
+
"description": "Ticket id",
|
|
3874
|
+
"name": "id",
|
|
3875
|
+
"required": true
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3878
|
+
"description": "Assign a ticket to an account, or unassign it (--unassign)",
|
|
3879
|
+
"examples": [
|
|
3880
|
+
"<%= config.bin %> tickets assign <ticket-id> --project acme-api --assignee-id <account-id>",
|
|
3881
|
+
"<%= config.bin %> tickets assign <ticket-id> --project acme-api --unassign"
|
|
3882
|
+
],
|
|
3883
|
+
"flags": {
|
|
3884
|
+
"json": {
|
|
3885
|
+
"description": "Format output as json.",
|
|
3886
|
+
"helpGroup": "GLOBAL",
|
|
3887
|
+
"name": "json",
|
|
3888
|
+
"allowNo": false,
|
|
3889
|
+
"type": "boolean"
|
|
3890
|
+
},
|
|
3891
|
+
"project": {
|
|
3892
|
+
"char": "p",
|
|
3893
|
+
"description": "Project id (UUID) or key",
|
|
3894
|
+
"name": "project",
|
|
3895
|
+
"required": true,
|
|
3896
|
+
"hasDynamicHelp": false,
|
|
3897
|
+
"multiple": false,
|
|
3898
|
+
"type": "option"
|
|
3899
|
+
},
|
|
3900
|
+
"assignee-id": {
|
|
3901
|
+
"description": "Account id to assign",
|
|
3902
|
+
"exclusive": [
|
|
3903
|
+
"unassign"
|
|
3904
|
+
],
|
|
3905
|
+
"name": "assignee-id",
|
|
3906
|
+
"hasDynamicHelp": false,
|
|
3907
|
+
"multiple": false,
|
|
3908
|
+
"type": "option"
|
|
3909
|
+
},
|
|
3910
|
+
"unassign": {
|
|
3911
|
+
"description": "Remove the current assignee (DELETE)",
|
|
3912
|
+
"exclusive": [
|
|
3913
|
+
"assignee-id"
|
|
3914
|
+
],
|
|
3915
|
+
"name": "unassign",
|
|
3916
|
+
"allowNo": false,
|
|
3917
|
+
"type": "boolean"
|
|
3918
|
+
}
|
|
3919
|
+
},
|
|
3920
|
+
"hasDynamicHelp": false,
|
|
3921
|
+
"hiddenAliases": [],
|
|
3922
|
+
"id": "tickets:assign",
|
|
3923
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3924
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3925
|
+
"pluginType": "core",
|
|
3926
|
+
"strict": true,
|
|
3927
|
+
"enableJsonFlag": true,
|
|
3928
|
+
"isESM": false,
|
|
3929
|
+
"relativePath": [
|
|
3930
|
+
"dist",
|
|
3931
|
+
"commands",
|
|
3932
|
+
"tickets",
|
|
3933
|
+
"assign.js"
|
|
3934
|
+
]
|
|
3935
|
+
},
|
|
3936
|
+
"tickets:attach": {
|
|
3937
|
+
"aliases": [],
|
|
3938
|
+
"args": {
|
|
3939
|
+
"id": {
|
|
3940
|
+
"description": "Ticket id",
|
|
3941
|
+
"name": "id",
|
|
3942
|
+
"required": true
|
|
3943
|
+
}
|
|
3944
|
+
},
|
|
3945
|
+
"description": "Attach one or more local files to a ticket",
|
|
3946
|
+
"examples": [
|
|
3947
|
+
"<%= config.bin %> tickets attach <ticket-id> --project acme-api --file ./screenshot.png",
|
|
3948
|
+
"<%= config.bin %> tickets attach <ticket-id> -p acme-api --file ./log.txt --file ./trace.json"
|
|
3949
|
+
],
|
|
3950
|
+
"flags": {
|
|
3951
|
+
"json": {
|
|
3952
|
+
"description": "Format output as json.",
|
|
3953
|
+
"helpGroup": "GLOBAL",
|
|
3954
|
+
"name": "json",
|
|
3955
|
+
"allowNo": false,
|
|
3956
|
+
"type": "boolean"
|
|
3957
|
+
},
|
|
3958
|
+
"project": {
|
|
3959
|
+
"char": "p",
|
|
3960
|
+
"description": "Project id (UUID) or key",
|
|
3961
|
+
"name": "project",
|
|
3962
|
+
"required": true,
|
|
3963
|
+
"hasDynamicHelp": false,
|
|
3964
|
+
"multiple": false,
|
|
3965
|
+
"type": "option"
|
|
3966
|
+
},
|
|
3967
|
+
"file": {
|
|
3968
|
+
"description": "Path to a local file to upload (repeatable)",
|
|
3969
|
+
"name": "file",
|
|
3970
|
+
"required": true,
|
|
3971
|
+
"hasDynamicHelp": false,
|
|
3972
|
+
"multiple": true,
|
|
3973
|
+
"type": "option"
|
|
3974
|
+
}
|
|
3975
|
+
},
|
|
3976
|
+
"hasDynamicHelp": false,
|
|
3977
|
+
"hiddenAliases": [],
|
|
3978
|
+
"id": "tickets:attach",
|
|
3979
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3980
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3981
|
+
"pluginType": "core",
|
|
3982
|
+
"strict": true,
|
|
3983
|
+
"enableJsonFlag": true,
|
|
3984
|
+
"isESM": false,
|
|
3985
|
+
"relativePath": [
|
|
3986
|
+
"dist",
|
|
3987
|
+
"commands",
|
|
3988
|
+
"tickets",
|
|
3989
|
+
"attach.js"
|
|
3990
|
+
]
|
|
3991
|
+
},
|
|
3992
|
+
"tickets:attachment-download": {
|
|
3993
|
+
"aliases": [],
|
|
3994
|
+
"args": {
|
|
3995
|
+
"id": {
|
|
3996
|
+
"description": "Ticket id",
|
|
3997
|
+
"name": "id",
|
|
3998
|
+
"required": true
|
|
3999
|
+
},
|
|
4000
|
+
"attachment": {
|
|
4001
|
+
"description": "Attachment id",
|
|
4002
|
+
"name": "attachment",
|
|
4003
|
+
"required": true
|
|
4004
|
+
}
|
|
4005
|
+
},
|
|
4006
|
+
"description": "Download a ticket attachment to disk",
|
|
4007
|
+
"examples": [
|
|
4008
|
+
"<%= config.bin %> tickets attachment-download <ticket-id> <attachment-id> --project acme-api",
|
|
4009
|
+
"<%= config.bin %> tickets attachment-download <ticket-id> <attachment-id> -p acme-api --out ./downloads"
|
|
4010
|
+
],
|
|
4011
|
+
"flags": {
|
|
4012
|
+
"json": {
|
|
4013
|
+
"description": "Format output as json.",
|
|
4014
|
+
"helpGroup": "GLOBAL",
|
|
4015
|
+
"name": "json",
|
|
4016
|
+
"allowNo": false,
|
|
4017
|
+
"type": "boolean"
|
|
4018
|
+
},
|
|
4019
|
+
"project": {
|
|
4020
|
+
"char": "p",
|
|
4021
|
+
"description": "Project id (UUID) or key",
|
|
4022
|
+
"name": "project",
|
|
4023
|
+
"required": true,
|
|
4024
|
+
"hasDynamicHelp": false,
|
|
4025
|
+
"multiple": false,
|
|
4026
|
+
"type": "option"
|
|
4027
|
+
},
|
|
4028
|
+
"out": {
|
|
4029
|
+
"description": "Output directory",
|
|
4030
|
+
"name": "out",
|
|
4031
|
+
"default": ".",
|
|
4032
|
+
"hasDynamicHelp": false,
|
|
4033
|
+
"multiple": false,
|
|
4034
|
+
"type": "option"
|
|
4035
|
+
},
|
|
4036
|
+
"filename": {
|
|
4037
|
+
"description": "Override the output filename",
|
|
4038
|
+
"name": "filename",
|
|
4039
|
+
"hasDynamicHelp": false,
|
|
4040
|
+
"multiple": false,
|
|
4041
|
+
"type": "option"
|
|
4042
|
+
}
|
|
4043
|
+
},
|
|
4044
|
+
"hasDynamicHelp": false,
|
|
4045
|
+
"hiddenAliases": [],
|
|
4046
|
+
"id": "tickets:attachment-download",
|
|
4047
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4048
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4049
|
+
"pluginType": "core",
|
|
4050
|
+
"strict": true,
|
|
4051
|
+
"enableJsonFlag": true,
|
|
4052
|
+
"isESM": false,
|
|
4053
|
+
"relativePath": [
|
|
4054
|
+
"dist",
|
|
4055
|
+
"commands",
|
|
4056
|
+
"tickets",
|
|
4057
|
+
"attachment-download.js"
|
|
4058
|
+
]
|
|
4059
|
+
},
|
|
4060
|
+
"tickets:attachments": {
|
|
4061
|
+
"aliases": [],
|
|
4062
|
+
"args": {
|
|
4063
|
+
"id": {
|
|
4064
|
+
"description": "Ticket id",
|
|
4065
|
+
"name": "id",
|
|
4066
|
+
"required": true
|
|
4067
|
+
}
|
|
4068
|
+
},
|
|
4069
|
+
"description": "List a ticket's attachments",
|
|
4070
|
+
"examples": [
|
|
4071
|
+
"<%= config.bin %> tickets attachments <ticket-id> --project acme-api",
|
|
4072
|
+
"<%= config.bin %> tickets attachments <ticket-id> -p acme-api --json"
|
|
4073
|
+
],
|
|
4074
|
+
"flags": {
|
|
4075
|
+
"json": {
|
|
4076
|
+
"description": "Format output as json.",
|
|
4077
|
+
"helpGroup": "GLOBAL",
|
|
4078
|
+
"name": "json",
|
|
4079
|
+
"allowNo": false,
|
|
4080
|
+
"type": "boolean"
|
|
4081
|
+
},
|
|
4082
|
+
"project": {
|
|
4083
|
+
"char": "p",
|
|
4084
|
+
"description": "Project id (UUID) or key",
|
|
4085
|
+
"name": "project",
|
|
4086
|
+
"required": true,
|
|
4087
|
+
"hasDynamicHelp": false,
|
|
4088
|
+
"multiple": false,
|
|
4089
|
+
"type": "option"
|
|
4090
|
+
}
|
|
4091
|
+
},
|
|
4092
|
+
"hasDynamicHelp": false,
|
|
4093
|
+
"hiddenAliases": [],
|
|
4094
|
+
"id": "tickets:attachments",
|
|
3786
4095
|
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
3787
4096
|
"pluginName": "@bussolabs/closeyourit-cli",
|
|
3788
4097
|
"pluginType": "core",
|
|
@@ -3793,7 +4102,7 @@
|
|
|
3793
4102
|
"dist",
|
|
3794
4103
|
"commands",
|
|
3795
4104
|
"tickets",
|
|
3796
|
-
"
|
|
4105
|
+
"attachments.js"
|
|
3797
4106
|
]
|
|
3798
4107
|
},
|
|
3799
4108
|
"tickets:comment-delete": {
|
|
@@ -3912,6 +4221,54 @@
|
|
|
3912
4221
|
"comment.js"
|
|
3913
4222
|
]
|
|
3914
4223
|
},
|
|
4224
|
+
"tickets:comments": {
|
|
4225
|
+
"aliases": [],
|
|
4226
|
+
"args": {
|
|
4227
|
+
"id": {
|
|
4228
|
+
"description": "Ticket id",
|
|
4229
|
+
"name": "id",
|
|
4230
|
+
"required": true
|
|
4231
|
+
}
|
|
4232
|
+
},
|
|
4233
|
+
"description": "List all comments of a ticket (oldest first)",
|
|
4234
|
+
"examples": [
|
|
4235
|
+
"<%= config.bin %> tickets comments <ticket-id> --project acme-api",
|
|
4236
|
+
"<%= config.bin %> tickets comments <ticket-id> -p acme-api --json"
|
|
4237
|
+
],
|
|
4238
|
+
"flags": {
|
|
4239
|
+
"json": {
|
|
4240
|
+
"description": "Format output as json.",
|
|
4241
|
+
"helpGroup": "GLOBAL",
|
|
4242
|
+
"name": "json",
|
|
4243
|
+
"allowNo": false,
|
|
4244
|
+
"type": "boolean"
|
|
4245
|
+
},
|
|
4246
|
+
"project": {
|
|
4247
|
+
"char": "p",
|
|
4248
|
+
"description": "Project id (UUID) or key",
|
|
4249
|
+
"name": "project",
|
|
4250
|
+
"required": true,
|
|
4251
|
+
"hasDynamicHelp": false,
|
|
4252
|
+
"multiple": false,
|
|
4253
|
+
"type": "option"
|
|
4254
|
+
}
|
|
4255
|
+
},
|
|
4256
|
+
"hasDynamicHelp": false,
|
|
4257
|
+
"hiddenAliases": [],
|
|
4258
|
+
"id": "tickets:comments",
|
|
4259
|
+
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4260
|
+
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4261
|
+
"pluginType": "core",
|
|
4262
|
+
"strict": true,
|
|
4263
|
+
"enableJsonFlag": true,
|
|
4264
|
+
"isESM": false,
|
|
4265
|
+
"relativePath": [
|
|
4266
|
+
"dist",
|
|
4267
|
+
"commands",
|
|
4268
|
+
"tickets",
|
|
4269
|
+
"comments.js"
|
|
4270
|
+
]
|
|
4271
|
+
},
|
|
3915
4272
|
"tickets:create": {
|
|
3916
4273
|
"aliases": [],
|
|
3917
4274
|
"args": {},
|
|
@@ -4584,200 +4941,7 @@
|
|
|
4584
4941
|
"tickets",
|
|
4585
4942
|
"vote.js"
|
|
4586
4943
|
]
|
|
4587
|
-
},
|
|
4588
|
-
"tokens:create": {
|
|
4589
|
-
"aliases": [],
|
|
4590
|
-
"args": {},
|
|
4591
|
-
"description": "Create an ingest token (the secret is shown only once)",
|
|
4592
|
-
"examples": [
|
|
4593
|
-
"<%= config.bin %> tokens create --project acme-api --name \"CI prod\" --environment-id <env-id>"
|
|
4594
|
-
],
|
|
4595
|
-
"flags": {
|
|
4596
|
-
"json": {
|
|
4597
|
-
"description": "Format output as json.",
|
|
4598
|
-
"helpGroup": "GLOBAL",
|
|
4599
|
-
"name": "json",
|
|
4600
|
-
"allowNo": false,
|
|
4601
|
-
"type": "boolean"
|
|
4602
|
-
},
|
|
4603
|
-
"project": {
|
|
4604
|
-
"char": "p",
|
|
4605
|
-
"description": "Project id (UUID) or key",
|
|
4606
|
-
"name": "project",
|
|
4607
|
-
"required": true,
|
|
4608
|
-
"hasDynamicHelp": false,
|
|
4609
|
-
"multiple": false,
|
|
4610
|
-
"type": "option"
|
|
4611
|
-
},
|
|
4612
|
-
"name": {
|
|
4613
|
-
"description": "Human-readable token name",
|
|
4614
|
-
"name": "name",
|
|
4615
|
-
"required": true,
|
|
4616
|
-
"hasDynamicHelp": false,
|
|
4617
|
-
"multiple": false,
|
|
4618
|
-
"type": "option"
|
|
4619
|
-
},
|
|
4620
|
-
"environment-id": {
|
|
4621
|
-
"description": "Environment id the token is scoped to",
|
|
4622
|
-
"name": "environment-id",
|
|
4623
|
-
"required": true,
|
|
4624
|
-
"hasDynamicHelp": false,
|
|
4625
|
-
"multiple": false,
|
|
4626
|
-
"type": "option"
|
|
4627
|
-
}
|
|
4628
|
-
},
|
|
4629
|
-
"hasDynamicHelp": false,
|
|
4630
|
-
"hiddenAliases": [],
|
|
4631
|
-
"id": "tokens:create",
|
|
4632
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4633
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4634
|
-
"pluginType": "core",
|
|
4635
|
-
"strict": true,
|
|
4636
|
-
"enableJsonFlag": true,
|
|
4637
|
-
"isESM": false,
|
|
4638
|
-
"relativePath": [
|
|
4639
|
-
"dist",
|
|
4640
|
-
"commands",
|
|
4641
|
-
"tokens",
|
|
4642
|
-
"create.js"
|
|
4643
|
-
]
|
|
4644
|
-
},
|
|
4645
|
-
"tokens:list": {
|
|
4646
|
-
"aliases": [],
|
|
4647
|
-
"args": {},
|
|
4648
|
-
"description": "List ingest tokens for a project",
|
|
4649
|
-
"examples": [
|
|
4650
|
-
"<%= config.bin %> tokens list --project acme-api",
|
|
4651
|
-
"<%= config.bin %> tokens list -p acme-api --json"
|
|
4652
|
-
],
|
|
4653
|
-
"flags": {
|
|
4654
|
-
"json": {
|
|
4655
|
-
"description": "Format output as json.",
|
|
4656
|
-
"helpGroup": "GLOBAL",
|
|
4657
|
-
"name": "json",
|
|
4658
|
-
"allowNo": false,
|
|
4659
|
-
"type": "boolean"
|
|
4660
|
-
},
|
|
4661
|
-
"project": {
|
|
4662
|
-
"char": "p",
|
|
4663
|
-
"description": "Project id (UUID) or key",
|
|
4664
|
-
"name": "project",
|
|
4665
|
-
"required": true,
|
|
4666
|
-
"hasDynamicHelp": false,
|
|
4667
|
-
"multiple": false,
|
|
4668
|
-
"type": "option"
|
|
4669
|
-
}
|
|
4670
|
-
},
|
|
4671
|
-
"hasDynamicHelp": false,
|
|
4672
|
-
"hiddenAliases": [],
|
|
4673
|
-
"id": "tokens:list",
|
|
4674
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4675
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4676
|
-
"pluginType": "core",
|
|
4677
|
-
"strict": true,
|
|
4678
|
-
"enableJsonFlag": true,
|
|
4679
|
-
"isESM": false,
|
|
4680
|
-
"relativePath": [
|
|
4681
|
-
"dist",
|
|
4682
|
-
"commands",
|
|
4683
|
-
"tokens",
|
|
4684
|
-
"list.js"
|
|
4685
|
-
]
|
|
4686
|
-
},
|
|
4687
|
-
"tokens:revoke": {
|
|
4688
|
-
"aliases": [],
|
|
4689
|
-
"args": {
|
|
4690
|
-
"id": {
|
|
4691
|
-
"description": "Token id",
|
|
4692
|
-
"name": "id",
|
|
4693
|
-
"required": true
|
|
4694
|
-
}
|
|
4695
|
-
},
|
|
4696
|
-
"description": "Revoke an ingest token",
|
|
4697
|
-
"examples": [
|
|
4698
|
-
"<%= config.bin %> tokens revoke <token-id> --project acme-api"
|
|
4699
|
-
],
|
|
4700
|
-
"flags": {
|
|
4701
|
-
"json": {
|
|
4702
|
-
"description": "Format output as json.",
|
|
4703
|
-
"helpGroup": "GLOBAL",
|
|
4704
|
-
"name": "json",
|
|
4705
|
-
"allowNo": false,
|
|
4706
|
-
"type": "boolean"
|
|
4707
|
-
},
|
|
4708
|
-
"project": {
|
|
4709
|
-
"char": "p",
|
|
4710
|
-
"description": "Project id (UUID) or key",
|
|
4711
|
-
"name": "project",
|
|
4712
|
-
"required": true,
|
|
4713
|
-
"hasDynamicHelp": false,
|
|
4714
|
-
"multiple": false,
|
|
4715
|
-
"type": "option"
|
|
4716
|
-
}
|
|
4717
|
-
},
|
|
4718
|
-
"hasDynamicHelp": false,
|
|
4719
|
-
"hiddenAliases": [],
|
|
4720
|
-
"id": "tokens:revoke",
|
|
4721
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4722
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4723
|
-
"pluginType": "core",
|
|
4724
|
-
"strict": true,
|
|
4725
|
-
"enableJsonFlag": true,
|
|
4726
|
-
"isESM": false,
|
|
4727
|
-
"relativePath": [
|
|
4728
|
-
"dist",
|
|
4729
|
-
"commands",
|
|
4730
|
-
"tokens",
|
|
4731
|
-
"revoke.js"
|
|
4732
|
-
]
|
|
4733
|
-
},
|
|
4734
|
-
"tokens:rotate": {
|
|
4735
|
-
"aliases": [],
|
|
4736
|
-
"args": {
|
|
4737
|
-
"id": {
|
|
4738
|
-
"description": "Token id",
|
|
4739
|
-
"name": "id",
|
|
4740
|
-
"required": true
|
|
4741
|
-
}
|
|
4742
|
-
},
|
|
4743
|
-
"description": "Rotate an ingest token (the new secret is shown only once)",
|
|
4744
|
-
"examples": [
|
|
4745
|
-
"<%= config.bin %> tokens rotate <token-id> --project acme-api"
|
|
4746
|
-
],
|
|
4747
|
-
"flags": {
|
|
4748
|
-
"json": {
|
|
4749
|
-
"description": "Format output as json.",
|
|
4750
|
-
"helpGroup": "GLOBAL",
|
|
4751
|
-
"name": "json",
|
|
4752
|
-
"allowNo": false,
|
|
4753
|
-
"type": "boolean"
|
|
4754
|
-
},
|
|
4755
|
-
"project": {
|
|
4756
|
-
"char": "p",
|
|
4757
|
-
"description": "Project id (UUID) or key",
|
|
4758
|
-
"name": "project",
|
|
4759
|
-
"required": true,
|
|
4760
|
-
"hasDynamicHelp": false,
|
|
4761
|
-
"multiple": false,
|
|
4762
|
-
"type": "option"
|
|
4763
|
-
}
|
|
4764
|
-
},
|
|
4765
|
-
"hasDynamicHelp": false,
|
|
4766
|
-
"hiddenAliases": [],
|
|
4767
|
-
"id": "tokens:rotate",
|
|
4768
|
-
"pluginAlias": "@bussolabs/closeyourit-cli",
|
|
4769
|
-
"pluginName": "@bussolabs/closeyourit-cli",
|
|
4770
|
-
"pluginType": "core",
|
|
4771
|
-
"strict": true,
|
|
4772
|
-
"enableJsonFlag": true,
|
|
4773
|
-
"isESM": false,
|
|
4774
|
-
"relativePath": [
|
|
4775
|
-
"dist",
|
|
4776
|
-
"commands",
|
|
4777
|
-
"tokens",
|
|
4778
|
-
"rotate.js"
|
|
4779
|
-
]
|
|
4780
4944
|
}
|
|
4781
4945
|
},
|
|
4782
|
-
"version": "0.0.
|
|
4946
|
+
"version": "0.0.7"
|
|
4783
4947
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bussolabs/closeyourit-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "CLI for CloseYourIt — manage org, errors, tokens and tickets with your user token",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22",
|
|
32
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
32
33
|
"oclif": "^4",
|
|
33
34
|
"typescript": "^5",
|
|
34
35
|
"vitest": "^2"
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"build": "tsc -b",
|
|
67
68
|
"prepack": "pnpm build && oclif manifest",
|
|
68
69
|
"postpack": "rm -f oclif.manifest.json",
|
|
69
|
-
"test": "vitest run",
|
|
70
|
+
"test": "vitest run --coverage",
|
|
70
71
|
"lint": "tsc --noEmit"
|
|
71
72
|
}
|
|
72
73
|
}
|