@manfred-kunze-dev/backbone-cli 2.6.0-dev.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/LICENSE +19 -0
- package/dist/commands/ai.d.ts +3 -0
- package/dist/commands/ai.js +72 -0
- package/dist/commands/analytics.d.ts +3 -0
- package/dist/commands/analytics.js +120 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.js +115 -0
- package/dist/commands/billing.d.ts +3 -0
- package/dist/commands/billing.js +100 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.js +70 -0
- package/dist/commands/convert.d.ts +3 -0
- package/dist/commands/convert.js +123 -0
- package/dist/commands/extractions.d.ts +3 -0
- package/dist/commands/extractions.js +143 -0
- package/dist/commands/projects.d.ts +3 -0
- package/dist/commands/projects.js +83 -0
- package/dist/commands/prompt-labels.d.ts +3 -0
- package/dist/commands/prompt-labels.js +72 -0
- package/dist/commands/prompt-versions.d.ts +3 -0
- package/dist/commands/prompt-versions.js +70 -0
- package/dist/commands/prompts.d.ts +3 -0
- package/dist/commands/prompts.js +170 -0
- package/dist/commands/providers.d.ts +3 -0
- package/dist/commands/providers.js +115 -0
- package/dist/commands/schema-labels.d.ts +3 -0
- package/dist/commands/schema-labels.js +72 -0
- package/dist/commands/schema-versions.d.ts +3 -0
- package/dist/commands/schema-versions.js +71 -0
- package/dist/commands/schemas.d.ts +3 -0
- package/dist/commands/schemas.js +168 -0
- package/dist/commands/transcribe.d.ts +3 -0
- package/dist/commands/transcribe.js +65 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +38 -0
- package/dist/lib/client.d.ts +12 -0
- package/dist/lib/client.js +52 -0
- package/dist/lib/config.d.ts +20 -0
- package/dist/lib/config.js +68 -0
- package/dist/lib/context.d.ts +7 -0
- package/dist/lib/context.js +14 -0
- package/dist/lib/errors.d.ts +14 -0
- package/dist/lib/errors.js +53 -0
- package/dist/lib/multipart.d.ts +10 -0
- package/dist/lib/multipart.js +57 -0
- package/dist/lib/output.d.ts +29 -0
- package/dist/lib/output.js +107 -0
- package/dist/lib/pagination.d.ts +21 -0
- package/dist/lib/pagination.js +21 -0
- package/package.json +52 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import Conf from "conf";
|
|
2
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
const store = new Conf({
|
|
5
|
+
projectName: "backbone",
|
|
6
|
+
projectSuffix: "",
|
|
7
|
+
schema: {
|
|
8
|
+
apiKey: { type: "string" },
|
|
9
|
+
baseUrl: { type: "string" },
|
|
10
|
+
project: { type: "string" },
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export { store };
|
|
14
|
+
/**
|
|
15
|
+
* Read .backbone file from current directory (if it exists).
|
|
16
|
+
*/
|
|
17
|
+
function readLocalFile() {
|
|
18
|
+
const localPath = resolve(process.cwd(), ".backbone");
|
|
19
|
+
if (!existsSync(localPath))
|
|
20
|
+
return {};
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse(readFileSync(localPath, "utf-8"));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve configuration with priority:
|
|
30
|
+
* 1. CLI flags (--api-key, --base-url, --project)
|
|
31
|
+
* 2. Environment variables (BACKBONE_API_KEY, BACKBONE_BASE_URL, BACKBONE_PROJECT)
|
|
32
|
+
* 3. Local .backbone file
|
|
33
|
+
* 4. Config store (~/.config/backbone/config.json)
|
|
34
|
+
*/
|
|
35
|
+
export function resolveConfig(command) {
|
|
36
|
+
const root = getRootCommand(command);
|
|
37
|
+
const opts = root.opts();
|
|
38
|
+
const local = readLocalFile();
|
|
39
|
+
const apiKey = opts.apiKey ??
|
|
40
|
+
process.env.BACKBONE_API_KEY ??
|
|
41
|
+
local.apiKey ??
|
|
42
|
+
store.get("apiKey");
|
|
43
|
+
const baseUrl = opts.baseUrl ??
|
|
44
|
+
process.env.BACKBONE_BASE_URL ??
|
|
45
|
+
local.baseUrl ??
|
|
46
|
+
store.get("baseUrl") ??
|
|
47
|
+
"https://backbone.manfred-kunze.dev/api";
|
|
48
|
+
const project = opts.project ??
|
|
49
|
+
process.env.BACKBONE_PROJECT ??
|
|
50
|
+
local.project ??
|
|
51
|
+
store.get("project");
|
|
52
|
+
if (!apiKey) {
|
|
53
|
+
throw new Error('No API key configured. Run "backbone auth login" or set BACKBONE_API_KEY.');
|
|
54
|
+
}
|
|
55
|
+
return { apiKey, baseUrl, project };
|
|
56
|
+
}
|
|
57
|
+
/** Walk up Commander's parent chain to find root program */
|
|
58
|
+
function getRootCommand(cmd) {
|
|
59
|
+
let root = cmd;
|
|
60
|
+
while (root.parent)
|
|
61
|
+
root = root.parent;
|
|
62
|
+
return root;
|
|
63
|
+
}
|
|
64
|
+
/** Check if --json flag is set on root command */
|
|
65
|
+
export function isJsonOutput(command) {
|
|
66
|
+
return getRootCommand(command).opts().json === true;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the project ID from --project flag, env var, .backbone file, or config store.
|
|
4
|
+
* Throws a user-friendly error if no project is configured.
|
|
5
|
+
*/
|
|
6
|
+
export declare function requireProjectId(command: Command): string;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolveConfig } from "./config.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the project ID from --project flag, env var, .backbone file, or config store.
|
|
4
|
+
* Throws a user-friendly error if no project is configured.
|
|
5
|
+
*/
|
|
6
|
+
export function requireProjectId(command) {
|
|
7
|
+
const config = resolveConfig(command);
|
|
8
|
+
if (!config.project) {
|
|
9
|
+
throw new Error("No project ID configured. Use --project <id>, set BACKBONE_PROJECT, or run:\n" +
|
|
10
|
+
' backbone config set project <id>');
|
|
11
|
+
}
|
|
12
|
+
return config.project;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ApiErrorBody {
|
|
2
|
+
status: number;
|
|
3
|
+
error: string;
|
|
4
|
+
message: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class BackboneApiError extends Error {
|
|
8
|
+
readonly status: number;
|
|
9
|
+
readonly errorType: string;
|
|
10
|
+
readonly timestamp: string;
|
|
11
|
+
constructor(body: ApiErrorBody);
|
|
12
|
+
}
|
|
13
|
+
export declare function handleError(err: unknown, json: boolean): void;
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export class BackboneApiError extends Error {
|
|
3
|
+
status;
|
|
4
|
+
errorType;
|
|
5
|
+
timestamp;
|
|
6
|
+
constructor(body) {
|
|
7
|
+
super(body.message);
|
|
8
|
+
this.name = "BackboneApiError";
|
|
9
|
+
this.status = body.status;
|
|
10
|
+
this.errorType = body.error;
|
|
11
|
+
this.timestamp = body.timestamp;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const HINTS = {
|
|
15
|
+
401: 'Invalid or missing API key. Run "backbone auth login" to configure credentials.',
|
|
16
|
+
403: "You don't have permission for this action. Check your organization role.",
|
|
17
|
+
404: "Resource not found. Verify the ID is correct.",
|
|
18
|
+
409: "Conflict — the resource may already exist or was modified concurrently.",
|
|
19
|
+
422: "Validation error. Check the input values.",
|
|
20
|
+
429: "Rate limit exceeded. Wait a moment and try again.",
|
|
21
|
+
};
|
|
22
|
+
export function handleError(err, json) {
|
|
23
|
+
if (err instanceof BackboneApiError) {
|
|
24
|
+
if (json) {
|
|
25
|
+
console.error(JSON.stringify({
|
|
26
|
+
error: err.errorType,
|
|
27
|
+
status: err.status,
|
|
28
|
+
message: err.message,
|
|
29
|
+
timestamp: err.timestamp,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.error(chalk.red(`Error ${err.status}: ${err.message}`));
|
|
34
|
+
const hint = HINTS[err.status];
|
|
35
|
+
if (hint) {
|
|
36
|
+
console.error(chalk.yellow(`Hint: ${hint}`));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else if (err instanceof Error) {
|
|
41
|
+
if (json) {
|
|
42
|
+
console.error(JSON.stringify({ error: err.name, message: err.message }));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
console.error(chalk.red(`Error: ${err.message}`));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
console.error(chalk.red(`Unknown error: ${String(err)}`));
|
|
50
|
+
}
|
|
51
|
+
process.exitCode = 1;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getMimeType(filename: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Read a local file and return a Blob suitable for FormData.
|
|
4
|
+
*/
|
|
5
|
+
export declare function fileToBlob(filePath: string): {
|
|
6
|
+
blob: Blob;
|
|
7
|
+
filename: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=multipart.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { basename, extname } from "node:path";
|
|
3
|
+
const MIME_TYPES = {
|
|
4
|
+
".pdf": "application/pdf",
|
|
5
|
+
".doc": "application/msword",
|
|
6
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
7
|
+
".xls": "application/vnd.ms-excel",
|
|
8
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
9
|
+
".ppt": "application/vnd.ms-powerpoint",
|
|
10
|
+
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
11
|
+
".odt": "application/vnd.oasis.opendocument.text",
|
|
12
|
+
".ods": "application/vnd.oasis.opendocument.spreadsheet",
|
|
13
|
+
".odp": "application/vnd.oasis.opendocument.presentation",
|
|
14
|
+
".rtf": "application/rtf",
|
|
15
|
+
".csv": "text/csv",
|
|
16
|
+
".tsv": "text/tab-separated-values",
|
|
17
|
+
".txt": "text/plain",
|
|
18
|
+
".md": "text/markdown",
|
|
19
|
+
".html": "text/html",
|
|
20
|
+
".xml": "application/xml",
|
|
21
|
+
".json": "application/json",
|
|
22
|
+
".yaml": "application/yaml",
|
|
23
|
+
".yml": "application/yaml",
|
|
24
|
+
".png": "image/png",
|
|
25
|
+
".jpg": "image/jpeg",
|
|
26
|
+
".jpeg": "image/jpeg",
|
|
27
|
+
".gif": "image/gif",
|
|
28
|
+
".bmp": "image/bmp",
|
|
29
|
+
".tiff": "image/tiff",
|
|
30
|
+
".webp": "image/webp",
|
|
31
|
+
".svg": "image/svg+xml",
|
|
32
|
+
".eml": "message/rfc822",
|
|
33
|
+
".msg": "application/vnd.ms-outlook",
|
|
34
|
+
".epub": "application/epub+zip",
|
|
35
|
+
".flac": "audio/flac",
|
|
36
|
+
".mp3": "audio/mpeg",
|
|
37
|
+
".mp4": "audio/mp4",
|
|
38
|
+
".m4a": "audio/mp4",
|
|
39
|
+
".ogg": "audio/ogg",
|
|
40
|
+
".wav": "audio/wav",
|
|
41
|
+
".webm": "audio/webm",
|
|
42
|
+
};
|
|
43
|
+
export function getMimeType(filename) {
|
|
44
|
+
const ext = extname(filename).toLowerCase();
|
|
45
|
+
return MIME_TYPES[ext] ?? "application/octet-stream";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Read a local file and return a Blob suitable for FormData.
|
|
49
|
+
*/
|
|
50
|
+
export function fileToBlob(filePath) {
|
|
51
|
+
const buffer = readFileSync(filePath);
|
|
52
|
+
const filename = basename(filePath);
|
|
53
|
+
const mimeType = getMimeType(filename);
|
|
54
|
+
const blob = new Blob([buffer], { type: mimeType });
|
|
55
|
+
return { blob, filename, mimeType };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=multipart.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
type AnyRecord = Record<string, any>;
|
|
3
|
+
/**
|
|
4
|
+
* Format and display a paginated list (Spring Data Page<T>).
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatPage(page: {
|
|
7
|
+
content?: AnyRecord[];
|
|
8
|
+
totalElements?: number;
|
|
9
|
+
number?: number;
|
|
10
|
+
totalPages?: number;
|
|
11
|
+
} | undefined, command: Command, columns: string[]): void;
|
|
12
|
+
/**
|
|
13
|
+
* Format and display a single record as key-value pairs.
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatDetail(record: AnyRecord | undefined, command: Command): void;
|
|
16
|
+
/**
|
|
17
|
+
* Format and display a list of records (non-paginated).
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatList(items: AnyRecord[] | undefined, command: Command, columns: string[]): void;
|
|
20
|
+
/**
|
|
21
|
+
* Display a success message.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatSuccess(message: string, command: Command): void;
|
|
24
|
+
/**
|
|
25
|
+
* Run an async action with a spinner.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withSpinner<T>(text: string, action: () => Promise<T>): Promise<T>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import Table from "cli-table3";
|
|
3
|
+
import ora from "ora";
|
|
4
|
+
import { isJsonOutput } from "./config.js";
|
|
5
|
+
/**
|
|
6
|
+
* Format and display a paginated list (Spring Data Page<T>).
|
|
7
|
+
*/
|
|
8
|
+
export function formatPage(page, command, columns) {
|
|
9
|
+
if (!page) {
|
|
10
|
+
console.error(chalk.yellow("No data returned."));
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (isJsonOutput(command)) {
|
|
14
|
+
console.log(JSON.stringify(page, null, 2));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!page.content || page.content.length === 0) {
|
|
18
|
+
console.log(chalk.dim("No results found."));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const table = new Table({
|
|
22
|
+
head: columns.map((c) => chalk.cyan(c)),
|
|
23
|
+
wordWrap: true,
|
|
24
|
+
});
|
|
25
|
+
for (const item of page.content) {
|
|
26
|
+
table.push(columns.map((col) => formatValue(item[col])));
|
|
27
|
+
}
|
|
28
|
+
console.log(table.toString());
|
|
29
|
+
console.log(chalk.dim(`Page ${(page.number ?? 0) + 1} of ${page.totalPages ?? 0} (${page.totalElements ?? 0} total)`));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Format and display a single record as key-value pairs.
|
|
33
|
+
*/
|
|
34
|
+
export function formatDetail(record, command) {
|
|
35
|
+
if (!record) {
|
|
36
|
+
console.error(chalk.yellow("No data returned."));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (isJsonOutput(command)) {
|
|
40
|
+
console.log(JSON.stringify(record, null, 2));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const table = new Table();
|
|
44
|
+
for (const [key, value] of Object.entries(record)) {
|
|
45
|
+
table.push({ [chalk.cyan(key)]: formatValue(value) });
|
|
46
|
+
}
|
|
47
|
+
console.log(table.toString());
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Format and display a list of records (non-paginated).
|
|
51
|
+
*/
|
|
52
|
+
export function formatList(items, command, columns) {
|
|
53
|
+
if (!items) {
|
|
54
|
+
console.error(chalk.yellow("No data returned."));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (isJsonOutput(command)) {
|
|
58
|
+
console.log(JSON.stringify(items, null, 2));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (items.length === 0) {
|
|
62
|
+
console.log(chalk.dim("No results found."));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const table = new Table({
|
|
66
|
+
head: columns.map((c) => chalk.cyan(c)),
|
|
67
|
+
wordWrap: true,
|
|
68
|
+
});
|
|
69
|
+
for (const item of items) {
|
|
70
|
+
table.push(columns.map((col) => formatValue(item[col])));
|
|
71
|
+
}
|
|
72
|
+
console.log(table.toString());
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Display a success message.
|
|
76
|
+
*/
|
|
77
|
+
export function formatSuccess(message, command) {
|
|
78
|
+
if (isJsonOutput(command)) {
|
|
79
|
+
console.log(JSON.stringify({ success: true, message }));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.log(chalk.green(message));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Run an async action with a spinner.
|
|
87
|
+
*/
|
|
88
|
+
export async function withSpinner(text, action) {
|
|
89
|
+
const spinner = ora(text).start();
|
|
90
|
+
try {
|
|
91
|
+
const result = await action();
|
|
92
|
+
spinner.succeed();
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
spinner.fail();
|
|
97
|
+
throw err;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function formatValue(value) {
|
|
101
|
+
if (value === null || value === undefined)
|
|
102
|
+
return chalk.dim("—");
|
|
103
|
+
if (typeof value === "object")
|
|
104
|
+
return JSON.stringify(value);
|
|
105
|
+
return String(value);
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Add standard pagination options to a command.
|
|
4
|
+
* Spring Data uses page (0-indexed), size, and sort.
|
|
5
|
+
*/
|
|
6
|
+
export declare function addPaginationOptions(cmd: Command): Command;
|
|
7
|
+
/** Parse pagination options into query params.
|
|
8
|
+
* Spring Data accepts flat page/size/sort params directly. We cast to satisfy
|
|
9
|
+
* the generated types which expect a nested `pageable` object. */
|
|
10
|
+
export declare function paginationParams(opts: {
|
|
11
|
+
page?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
sort?: string[];
|
|
14
|
+
}): {
|
|
15
|
+
pageable: {
|
|
16
|
+
page?: number;
|
|
17
|
+
size?: number;
|
|
18
|
+
sort?: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add standard pagination options to a command.
|
|
3
|
+
* Spring Data uses page (0-indexed), size, and sort.
|
|
4
|
+
*/
|
|
5
|
+
export function addPaginationOptions(cmd) {
|
|
6
|
+
return cmd
|
|
7
|
+
.option("-p, --page <number>", "Page number (0-indexed)", "0")
|
|
8
|
+
.option("--size <number>", "Page size", "20")
|
|
9
|
+
.option("--sort <fields...>", "Sort fields (e.g., name,asc)");
|
|
10
|
+
}
|
|
11
|
+
/** Parse pagination options into query params.
|
|
12
|
+
* Spring Data accepts flat page/size/sort params directly. We cast to satisfy
|
|
13
|
+
* the generated types which expect a nested `pageable` object. */
|
|
14
|
+
export function paginationParams(opts) {
|
|
15
|
+
return {
|
|
16
|
+
page: opts.page !== undefined ? parseInt(opts.page, 10) : undefined,
|
|
17
|
+
size: opts.size !== undefined ? parseInt(opts.size, 10) : undefined,
|
|
18
|
+
sort: opts.sort,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=pagination.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@manfred-kunze-dev/backbone-cli",
|
|
3
|
+
"version": "2.6.0-dev.4",
|
|
4
|
+
"description": "CLI for the Backbone AI platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"backbone": "dist/index.js",
|
|
9
|
+
"bb": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"dev": "tsc --watch",
|
|
14
|
+
"start": "node dist/index.js",
|
|
15
|
+
"generate:spec": "tsx --env-file=.env openapi/scripts/fetch-spec.ts",
|
|
16
|
+
"generate:types": "openapi-typescript openapi/openapi.json -o src/generated/openapi.d.ts",
|
|
17
|
+
"generate": "npm run generate:spec && npm run generate:types",
|
|
18
|
+
"check:spec": "tsx --env-file=.env openapi/scripts/check-drift.ts",
|
|
19
|
+
"typecheck": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"chalk": "^5.4.1",
|
|
23
|
+
"cli-table3": "^0.6.5",
|
|
24
|
+
"commander": "^13.1.0",
|
|
25
|
+
"conf": "^13.1.0",
|
|
26
|
+
"openapi-fetch": "^0.13.5",
|
|
27
|
+
"ora": "^8.2.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^22.13.4",
|
|
31
|
+
"openapi-typescript": "^7.6.1",
|
|
32
|
+
"tsx": "^4.19.3",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18.20.8"
|
|
37
|
+
},
|
|
38
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"registry": "https://registry.npmjs.org",
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "https://gitlab.com/manfred-kunze-dev/backbone.git",
|
|
46
|
+
"directory": "cli"
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"dist/**/*.js",
|
|
50
|
+
"dist/**/*.d.ts"
|
|
51
|
+
]
|
|
52
|
+
}
|