@civitai/client 0.1.1-beta.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/README.md +0 -0
- package/dist/client/CivitaiClient.d.ts +17 -0
- package/dist/client/CivitaiClient.js +24 -0
- package/dist/client/RequestsClient.d.ts +0 -0
- package/dist/client/RequestsClient.js +58 -0
- package/dist/generated/GeneratedClient.d.ts +20 -0
- package/dist/generated/GeneratedClient.js +38 -0
- package/dist/generated/core/ApiError.d.ts +10 -0
- package/dist/generated/core/ApiError.js +15 -0
- package/dist/generated/core/ApiRequestOptions.d.ts +13 -0
- package/dist/generated/core/ApiRequestOptions.js +2 -0
- package/dist/generated/core/ApiResult.d.ts +7 -0
- package/dist/generated/core/ApiResult.js +2 -0
- package/dist/generated/core/AxiosHttpRequest.d.ts +14 -0
- package/dist/generated/core/AxiosHttpRequest.js +20 -0
- package/dist/generated/core/BaseHttpRequest.d.ts +8 -0
- package/dist/generated/core/BaseHttpRequest.js +9 -0
- package/dist/generated/core/CancelablePromise.d.ts +37 -0
- package/dist/generated/core/CancelablePromise.js +93 -0
- package/dist/generated/core/FetchHttpRequest.d.ts +14 -0
- package/dist/generated/core/FetchHttpRequest.js +20 -0
- package/dist/generated/core/OpenAPI.d.ts +27 -0
- package/dist/generated/core/OpenAPI.js +33 -0
- package/dist/generated/core/request.d.ts +49 -0
- package/dist/generated/core/request.js +277 -0
- package/dist/generated/enums.gen.d.ts +93 -0
- package/dist/generated/enums.gen.js +97 -0
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +20 -0
- package/dist/generated/schemas.gen.d.ts +2243 -0
- package/dist/generated/schemas.gen.js +2244 -0
- package/dist/generated/services.gen.d.ts +242 -0
- package/dist/generated/services.gen.js +469 -0
- package/dist/generated/types.gen.d.ts +1931 -0
- package/dist/generated/types.gen.js +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/utils/Air.d.ts +19 -0
- package/dist/utils/Air.js +18 -0
- package/dist/utils/CivitaiClientError.d.ts +0 -0
- package/dist/utils/CivitaiClientError.js +4 -0
- package/dist/utils/TimeSpan.d.ts +45 -0
- package/dist/utils/TimeSpan.js +101 -0
- package/dist/utils/createClient.d.ts +1 -0
- package/dist/utils/createClient.js +119 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +5 -0
- package/package.json +48 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./generated"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./utils"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./client/CivitaiClient"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type AirProps = {
|
|
2
|
+
/** Type of the ecosystem (sd1, sd2, sdxl) */
|
|
3
|
+
ecosystem: string;
|
|
4
|
+
/** Type of the resource (model, lora, embedding, hypernet) */
|
|
5
|
+
type: string;
|
|
6
|
+
/** Supported network source */
|
|
7
|
+
source: string;
|
|
8
|
+
/** Id of the resource from the source */
|
|
9
|
+
id: string;
|
|
10
|
+
version?: string;
|
|
11
|
+
/** The format of the model (safetensor, ckpt, diffuser, tensor rt) optional */
|
|
12
|
+
format?: string;
|
|
13
|
+
};
|
|
14
|
+
/** https://github.com/civitai/civitai/wiki/AIR-%E2%80%90-Uniform-Resource-Names-for-AI */
|
|
15
|
+
export declare abstract class Air {
|
|
16
|
+
static parse(identifier: string): AirProps;
|
|
17
|
+
static stringify({ ecosystem, type, source, id, version, format }: AirProps): string;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Air = void 0;
|
|
4
|
+
const regex = /^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_\-\/]+):)?(?:(?<type>[a-zA-Z0-9_\-\/]+):)?(?<source>[a-zA-Z0-9_\-\/]+):(?<id>[a-zA-Z0-9_\-\/]+)(?:@(?<version>[a-zA-Z0-9_\-]+))?(?:\.(?<format>[a-zA-Z0-9_\-]+))?$/i;
|
|
5
|
+
/** https://github.com/civitai/civitai/wiki/AIR-%E2%80%90-Uniform-Resource-Names-for-AI */
|
|
6
|
+
class Air {
|
|
7
|
+
static parse(identifier) {
|
|
8
|
+
const match = regex.exec(identifier);
|
|
9
|
+
if (!match) {
|
|
10
|
+
throw new Error(`Invalid identifier: ${identifier}`);
|
|
11
|
+
}
|
|
12
|
+
return match.groups;
|
|
13
|
+
}
|
|
14
|
+
static stringify({ ecosystem, type, source, id, version, format }) {
|
|
15
|
+
return `urn:air:${ecosystem}:${type}:${source}:${id}${version ? `@${version}` : ''}${format ? `:${format}` : ''}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Air = Air;
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare class TimeSpan {
|
|
2
|
+
#private;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param timeSpanString format "days:hours:minutes:seconds.ticks" ("00:00:00:00.000000")
|
|
6
|
+
*/
|
|
7
|
+
constructor(timeSpanString: string);
|
|
8
|
+
constructor(ticks: number);
|
|
9
|
+
constructor(hours: number, minutes: number, seconds: number);
|
|
10
|
+
constructor(days: number, hours: number, minutes: number, seconds: number);
|
|
11
|
+
constructor(days: number, hours: number, minutes: number, seconds: number, milliseconds: number);
|
|
12
|
+
constructor(
|
|
13
|
+
days: number,
|
|
14
|
+
hours: number,
|
|
15
|
+
minutes: number,
|
|
16
|
+
seconds: number,
|
|
17
|
+
milliseconds: number,
|
|
18
|
+
ticks: number
|
|
19
|
+
);
|
|
20
|
+
addTicks: (value: number) => number;
|
|
21
|
+
subtractTicks: (value: number) => number;
|
|
22
|
+
addMilliseconds: (value: number) => number;
|
|
23
|
+
subtracktMilliseconds: (value: number) => number;
|
|
24
|
+
addSeconds: (value: number) => number;
|
|
25
|
+
subtractSeconds: (value: number) => number;
|
|
26
|
+
addMinutes: (value: number) => number;
|
|
27
|
+
subtractMinutes: (value: number) => number;
|
|
28
|
+
addHours: (value: number) => number;
|
|
29
|
+
subtractHours: (value: number) => number;
|
|
30
|
+
addDays: (value: number) => number;
|
|
31
|
+
subtractDays: (value: number) => number;
|
|
32
|
+
get days(): number;
|
|
33
|
+
get hours(): number;
|
|
34
|
+
get minutes(): number;
|
|
35
|
+
get seconds(): number;
|
|
36
|
+
get milliseconds(): number;
|
|
37
|
+
get ticks(): number;
|
|
38
|
+
get totalMilliseconds(): number;
|
|
39
|
+
get totalMinutes(): number;
|
|
40
|
+
get totalSeconds(): number;
|
|
41
|
+
get totalHours(): number;
|
|
42
|
+
get totalDays(): number;
|
|
43
|
+
get totalTicks(): number;
|
|
44
|
+
toString: () => string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _TimeSpan_ticks, _TimeSpan_add, _TimeSpan_subtract;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TimeSpan = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const ticksPerMillisecond = 10000, ticksPerSecond = 1000 * ticksPerMillisecond, ticksPerMinute = 60000 * ticksPerMillisecond, ticksPerHour = 3600000 * ticksPerMillisecond, ticksPerDay = 86400000 * ticksPerMillisecond;
|
|
7
|
+
const timeSpanWithDays = /^(\d+):(\d+):(\d+):(\d+).(\d+)?/, timeSpanNoDays = /^(\d+):(\d+):(\d+).(\d+)?/;
|
|
8
|
+
function toDoubleDigitString(n) {
|
|
9
|
+
return n < 10 ? '0' + n : n;
|
|
10
|
+
}
|
|
11
|
+
class TimeSpan {
|
|
12
|
+
constructor() {
|
|
13
|
+
_TimeSpan_ticks.set(this, 0);
|
|
14
|
+
_TimeSpan_add.set(this, (value, multiplier) => (tslib_1.__classPrivateFieldSet(this, _TimeSpan_ticks, tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") + (multiplier ? value * multiplier : value), "f")));
|
|
15
|
+
_TimeSpan_subtract.set(this, (value, multiplier) => (tslib_1.__classPrivateFieldSet(this, _TimeSpan_ticks, tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") - (multiplier ? value * multiplier : value), "f")));
|
|
16
|
+
this.addTicks = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value);
|
|
17
|
+
this.subtractTicks = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value);
|
|
18
|
+
this.addMilliseconds = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerMillisecond);
|
|
19
|
+
this.subtracktMilliseconds = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerMillisecond);
|
|
20
|
+
this.addSeconds = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerSecond);
|
|
21
|
+
this.subtractSeconds = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerSecond);
|
|
22
|
+
this.addMinutes = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerMinute);
|
|
23
|
+
this.subtractMinutes = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerMinute);
|
|
24
|
+
this.addHours = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerHour);
|
|
25
|
+
this.subtractHours = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerHour);
|
|
26
|
+
this.addDays = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_add, "f").call(this, value, ticksPerDay);
|
|
27
|
+
this.subtractDays = (value) => tslib_1.__classPrivateFieldGet(this, _TimeSpan_subtract, "f").call(this, value, ticksPerDay);
|
|
28
|
+
this.toString = () => {
|
|
29
|
+
return ([this.days, this.hours, this.minutes, this.seconds].map(toDoubleDigitString).join(':') +
|
|
30
|
+
'.' +
|
|
31
|
+
toDoubleDigitString(this.ticks));
|
|
32
|
+
};
|
|
33
|
+
let days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, ticks = 0;
|
|
34
|
+
if (typeof arguments[0] === 'string') {
|
|
35
|
+
const str = arguments[0];
|
|
36
|
+
let match;
|
|
37
|
+
if ((match = str.match(timeSpanWithDays))) {
|
|
38
|
+
[days, hours, minutes, seconds, ticks] = match.splice(1, 6).map(Number);
|
|
39
|
+
}
|
|
40
|
+
else if ((match = str.match(timeSpanNoDays))) {
|
|
41
|
+
[hours, minutes, seconds, ticks] = match.splice(1, 4).map(Number);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (arguments.length === 1)
|
|
45
|
+
[ticks] = arguments;
|
|
46
|
+
else if (arguments.length === 3)
|
|
47
|
+
[hours, minutes, seconds] = arguments;
|
|
48
|
+
else if (arguments.length === 4)
|
|
49
|
+
[days, hours, minutes, seconds] = arguments;
|
|
50
|
+
else if (arguments.length === 5)
|
|
51
|
+
[days, hours, minutes, seconds, milliseconds] = arguments;
|
|
52
|
+
this.addDays(days);
|
|
53
|
+
this.addHours(hours);
|
|
54
|
+
this.addMinutes(minutes);
|
|
55
|
+
this.addSeconds(seconds);
|
|
56
|
+
this.addMilliseconds(milliseconds);
|
|
57
|
+
this.addTicks(ticks);
|
|
58
|
+
}
|
|
59
|
+
get days() {
|
|
60
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerDay);
|
|
61
|
+
}
|
|
62
|
+
get hours() {
|
|
63
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerHour) % 24;
|
|
64
|
+
}
|
|
65
|
+
get minutes() {
|
|
66
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMinute) % 60;
|
|
67
|
+
}
|
|
68
|
+
get seconds() {
|
|
69
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerSecond) % 60;
|
|
70
|
+
}
|
|
71
|
+
get milliseconds() {
|
|
72
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMillisecond) % 1000;
|
|
73
|
+
}
|
|
74
|
+
get ticks() {
|
|
75
|
+
const dayTicks = this.days * ticksPerDay;
|
|
76
|
+
const hourTicks = this.hours * ticksPerHour;
|
|
77
|
+
const minuteTicks = this.minutes * ticksPerMinute;
|
|
78
|
+
const secondTicks = this.seconds * ticksPerSecond;
|
|
79
|
+
return tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") - dayTicks - hourTicks - minuteTicks - secondTicks;
|
|
80
|
+
}
|
|
81
|
+
get totalMilliseconds() {
|
|
82
|
+
return Math.floor(tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f") / ticksPerMillisecond);
|
|
83
|
+
}
|
|
84
|
+
get totalMinutes() {
|
|
85
|
+
return Math.floor(this.minutes / ticksPerMinute);
|
|
86
|
+
}
|
|
87
|
+
get totalSeconds() {
|
|
88
|
+
return Math.floor(this.seconds / ticksPerSecond);
|
|
89
|
+
}
|
|
90
|
+
get totalHours() {
|
|
91
|
+
return Math.floor(this.hours / ticksPerHour);
|
|
92
|
+
}
|
|
93
|
+
get totalDays() {
|
|
94
|
+
return Math.floor(this.days / ticksPerDay);
|
|
95
|
+
}
|
|
96
|
+
get totalTicks() {
|
|
97
|
+
return tslib_1.__classPrivateFieldGet(this, _TimeSpan_ticks, "f");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.TimeSpan = TimeSpan;
|
|
101
|
+
_TimeSpan_ticks = new WeakMap(), _TimeSpan_add = new WeakMap(), _TimeSpan_subtract = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// class CivitaiClient extends GeneratedClient implements ICivitaiClient {
|
|
4
|
+
// constructor(config: ClientConfig, HttpRequest?: HttpRequestConstructor) {
|
|
5
|
+
// super(
|
|
6
|
+
// {
|
|
7
|
+
// BASE:
|
|
8
|
+
// config.env === 'dev'
|
|
9
|
+
// ? 'https://orchestration-dev.civitai.com'
|
|
10
|
+
// : 'https://orchestration-stage.civitai.com', // TODO: Switch to orchestration.civitai.com once prod is back up and running
|
|
11
|
+
// HEADERS: { Authorization: `Bearer ${config.auth}` },
|
|
12
|
+
// interceptors: {
|
|
13
|
+
// request: config?.interceptors?.request ?? new Interceptors(),
|
|
14
|
+
// response: config?.interceptors?.response ?? new Interceptors(),
|
|
15
|
+
// },
|
|
16
|
+
// },
|
|
17
|
+
// HttpRequest
|
|
18
|
+
// );
|
|
19
|
+
// }
|
|
20
|
+
// public override requests = new CustomRequestsService(this.request);
|
|
21
|
+
// }
|
|
22
|
+
// export class CustomRequestsService extends RequestsService {
|
|
23
|
+
// constructor(public readonly httpRequest: BaseHttpRequest) {
|
|
24
|
+
// super(httpRequest);
|
|
25
|
+
// }
|
|
26
|
+
// public override submitRequest(
|
|
27
|
+
// props: Parameters<GeneratedClient['requests']['submitRequest']>[0],
|
|
28
|
+
// options?: { cleanupOnCancellation?: boolean }
|
|
29
|
+
// ): CancelablePromise<RequestInfo> {
|
|
30
|
+
// return new CancelablePromise<RequestInfo>(async (resolve, reject, oncancel) => {
|
|
31
|
+
// const { wait, include } = props ?? {};
|
|
32
|
+
// const { cleanupOnCancellation = true } = options ?? {};
|
|
33
|
+
// let result = await withCancellation(this.submitRequest({ ...props, wait: false }));
|
|
34
|
+
// if (!result) throw new Error('no result');
|
|
35
|
+
// try {
|
|
36
|
+
// while (wait && (result.status === 'Initialized' || result.status === 'Processing')) {
|
|
37
|
+
// result = await withCancellation(this.getRequest({ requestId: result.id, include, wait }));
|
|
38
|
+
// }
|
|
39
|
+
// resolve(result);
|
|
40
|
+
// } catch (error) {
|
|
41
|
+
// if (error instanceof CancelError && wait && cleanupOnCancellation) {
|
|
42
|
+
// console.log('cancelling request');
|
|
43
|
+
// await this.updateRequest({
|
|
44
|
+
// requestId: result.id,
|
|
45
|
+
// requestBody: {
|
|
46
|
+
// status: 'Canceled',
|
|
47
|
+
// },
|
|
48
|
+
// });
|
|
49
|
+
// }
|
|
50
|
+
// reject(error);
|
|
51
|
+
// }
|
|
52
|
+
// function withCancellation<T>(promise: CancelablePromise<T>) {
|
|
53
|
+
// oncancel(promise.cancel);
|
|
54
|
+
// return promise;
|
|
55
|
+
// }
|
|
56
|
+
// });
|
|
57
|
+
// }
|
|
58
|
+
// }
|
|
59
|
+
// export function createCivitaiClient(config: ClientConfig, HttpRequest?: HttpRequestConstructor) {
|
|
60
|
+
// const client = new GeneratedClient(
|
|
61
|
+
// {
|
|
62
|
+
// BASE:
|
|
63
|
+
// config.base ?? config.env === 'dev'
|
|
64
|
+
// ? 'https://orchestration-dev.civitai.com'
|
|
65
|
+
// : 'https://orchestration-stage.civitai.com', // TODO: Switch to orchestration.civitai.com once prod is back up and running
|
|
66
|
+
// HEADERS: { Authorization: `Bearer ${config.auth}` },
|
|
67
|
+
// interceptors: {
|
|
68
|
+
// request: config?.interceptors?.request ?? new Interceptors(),
|
|
69
|
+
// response: config?.interceptors?.response ?? new Interceptors(),
|
|
70
|
+
// },
|
|
71
|
+
// },
|
|
72
|
+
// HttpRequest
|
|
73
|
+
// ) as ICivitaiClient;
|
|
74
|
+
// function trySubmitRequest(
|
|
75
|
+
// props: Parameters<typeof client.requests.submitRequest>[0],
|
|
76
|
+
// options?: { cleanupOnCancellation?: boolean }
|
|
77
|
+
// ) {
|
|
78
|
+
// return new CancelablePromise<RequestInfo>(async (resolve, reject, oncancel) => {
|
|
79
|
+
// try {
|
|
80
|
+
// const { wait, include } = props ?? {};
|
|
81
|
+
// const { cleanupOnCancellation = true } = options ?? {};
|
|
82
|
+
// let result = await withCancellation(
|
|
83
|
+
// client.requests.submitRequest({ ...props, wait: false })
|
|
84
|
+
// );
|
|
85
|
+
// if (!result) throw new Error('no result');
|
|
86
|
+
// try {
|
|
87
|
+
// while (wait && (result.status === 'Initialized' || result.status === 'Processing')) {
|
|
88
|
+
// result = await withCancellation(
|
|
89
|
+
// client.requests.getRequest({ requestId: result.id, include, wait })
|
|
90
|
+
// );
|
|
91
|
+
// }
|
|
92
|
+
// resolve(result);
|
|
93
|
+
// } catch (error) {
|
|
94
|
+
// if (error instanceof CancelError && wait && cleanupOnCancellation) {
|
|
95
|
+
// console.log('cancelling request');
|
|
96
|
+
// await client.requests.updateRequest({
|
|
97
|
+
// requestId: result.id,
|
|
98
|
+
// requestBody: {
|
|
99
|
+
// status: 'Canceled',
|
|
100
|
+
// },
|
|
101
|
+
// });
|
|
102
|
+
// }
|
|
103
|
+
// throw error;
|
|
104
|
+
// }
|
|
105
|
+
// } catch (error) {
|
|
106
|
+
// reject(error);
|
|
107
|
+
// }
|
|
108
|
+
// function withCancellation<T>(promise: CancelablePromise<T>) {
|
|
109
|
+
// oncancel(promise.cancel);
|
|
110
|
+
// return promise;
|
|
111
|
+
// }
|
|
112
|
+
// });
|
|
113
|
+
// }
|
|
114
|
+
// const requests = { ...client.requests, submitRequest: trySubmitRequest };
|
|
115
|
+
// return {
|
|
116
|
+
// ...client,
|
|
117
|
+
// requests,
|
|
118
|
+
// };
|
|
119
|
+
// }
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@civitai/client",
|
|
3
|
+
"version": "0.1.1-beta.0",
|
|
4
|
+
"description": "Civitai's javascript client for generating ai content",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"repository": "https://github.com/civitai/civitai-client-javascript",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"dist/index.d.ts",
|
|
12
|
+
"dist/index.js",
|
|
13
|
+
"package.json"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18.0.0",
|
|
17
|
+
"npm": ">=7.19.0",
|
|
18
|
+
"git": ">=2.11.0",
|
|
19
|
+
"yarn": ">=1.7.0"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"generate": "openapi-ts",
|
|
23
|
+
"build": "tsc && eslint --fix dist",
|
|
24
|
+
"test": "jest",
|
|
25
|
+
"prepublishOnly": "npm test && npm run build"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@hey-api/openapi-ts": "^0.42.1",
|
|
29
|
+
"@types/jest": "^29.5.12",
|
|
30
|
+
"@types/node": "^20.11.19",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
32
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
33
|
+
"dotenv": "^16.4.4",
|
|
34
|
+
"eslint": "^9.1.1",
|
|
35
|
+
"eslint-config-prettier": "^9.1.0",
|
|
36
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
37
|
+
"jest": "^29.7.0",
|
|
38
|
+
"prettier": "^3.2.5",
|
|
39
|
+
"ts-jest": "^29.1.2",
|
|
40
|
+
"typescript": "^5.3.3"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"tslib": "^2.6.2"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|