@book000/pixivts-db-mysql 0.63.1-beta.45 → 0.63.1-beta.47
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/index.d.cts +10 -10
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ declare namespace schema_d_exports {
|
|
|
17
17
|
* that each unique request/response combination is stored only once, regardless
|
|
18
18
|
* of when it was recorded.
|
|
19
19
|
*/
|
|
20
|
-
declare const responsesTable: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
20
|
+
export declare const responsesTable: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
21
21
|
name: "responses";
|
|
22
22
|
schema: undefined;
|
|
23
23
|
columns: {
|
|
@@ -275,7 +275,7 @@ type DbInstance = ReturnType<typeof drizzle<typeof schema_d_exports>>;
|
|
|
275
275
|
* @param opts - Connection options (fall back to environment variables)
|
|
276
276
|
* @returns `{ pool, db }` — raw pool for `close()`, db for queries
|
|
277
277
|
*/
|
|
278
|
-
declare function createDbConnection(opts: ConnectionOptions): {
|
|
278
|
+
export declare function createDbConnection(opts: ConnectionOptions): {
|
|
279
279
|
pool: mysql.Pool;
|
|
280
280
|
db: DbInstance;
|
|
281
281
|
};
|
|
@@ -312,7 +312,7 @@ interface RecorderOptions extends ConnectionOptions {
|
|
|
312
312
|
* @param db - Drizzle ORM database instance
|
|
313
313
|
* @param record - Response record from the HTTP client interceptor
|
|
314
314
|
*/
|
|
315
|
-
declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<void>;
|
|
315
|
+
export declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<void>;
|
|
316
316
|
/**
|
|
317
317
|
* Creates a `RecorderBundle` from an existing Drizzle instance.
|
|
318
318
|
*
|
|
@@ -321,7 +321,7 @@ declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<vo
|
|
|
321
321
|
* @param db - Drizzle ORM database instance
|
|
322
322
|
* @param close - Function that closes the underlying connection
|
|
323
323
|
*/
|
|
324
|
-
declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>): RecorderBundle;
|
|
324
|
+
export declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>): RecorderBundle;
|
|
325
325
|
/**
|
|
326
326
|
* Creates a response recorder that persists every pixiv API response to MySQL.
|
|
327
327
|
*
|
|
@@ -340,7 +340,7 @@ declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>
|
|
|
340
340
|
* await close()
|
|
341
341
|
* ```
|
|
342
342
|
*/
|
|
343
|
-
declare function createResponseRecorder(opts: RecorderOptions): Promise<RecorderBundle>;
|
|
343
|
+
export declare function createResponseRecorder(opts: RecorderOptions): Promise<RecorderBundle>;
|
|
344
344
|
/** Filter criteria for response queries. */
|
|
345
345
|
interface ResponseFilter {
|
|
346
346
|
/** HTTP method to filter by (e.g. `"GET"`). Omit to match all methods. */
|
|
@@ -365,7 +365,7 @@ interface RangeOptions {
|
|
|
365
365
|
* @param range - Optional pagination options
|
|
366
366
|
* @returns Array of response rows, newest first
|
|
367
367
|
*/
|
|
368
|
-
declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: RangeOptions): Promise<ResponseRow[]>;
|
|
368
|
+
export declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: RangeOptions): Promise<ResponseRow[]>;
|
|
369
369
|
/**
|
|
370
370
|
* Returns the total count of response records from the last 90 days.
|
|
371
371
|
*
|
|
@@ -373,7 +373,7 @@ declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: R
|
|
|
373
373
|
* @param filter - Optional filter criteria
|
|
374
374
|
* @returns Total row count matching the filter
|
|
375
375
|
*/
|
|
376
|
-
declare function getResponseCount(db: DbInstance, filter?: ResponseFilter): Promise<number>;
|
|
376
|
+
export declare function getResponseCount(db: DbInstance, filter?: ResponseFilter): Promise<number>;
|
|
377
377
|
/** An endpoint with its response count. */
|
|
378
378
|
interface EndpointWithCount {
|
|
379
379
|
/** HTTP method (e.g. `"GET"` or `"POST"`). */
|
|
@@ -392,7 +392,7 @@ interface EndpointWithCount {
|
|
|
392
392
|
* @param db - Drizzle ORM database instance
|
|
393
393
|
* @returns Endpoints sorted by count descending
|
|
394
394
|
*/
|
|
395
|
-
declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
395
|
+
export declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/migrations.d.ts
|
|
398
398
|
/**
|
|
@@ -403,7 +403,7 @@ declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
|
403
403
|
*
|
|
404
404
|
* @param db - Drizzle ORM database instance
|
|
405
405
|
*/
|
|
406
|
-
declare function bootstrapSchema(db: DbInstance): Promise<void>;
|
|
406
|
+
export declare function bootstrapSchema(db: DbInstance): Promise<void>;
|
|
407
407
|
//#endregion
|
|
408
|
-
export {
|
|
408
|
+
export type { ConnectionOptions, DbInstance, EndpointWithCount, NewResponse, RangeOptions, RecorderBundle, RecorderOptions, ResponseFilter, ResponseRow };
|
|
409
409
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/schema.ts","../src/connection.ts","../src/recorder.ts","../src/migrations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["schema"],"sources":["../src/schema.ts","../src/connection.ts","../src/recorder.ts","../src/migrations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAwBa,iDAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAd;;;;;;;;;;;;;;;;KAuCD,qBAAqB,eAAe;;KAGpC,qBAAqB,eAAe;;;;UCvD/B;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;;;KAQU,aAAa,kBAAkB,eAAeA;;;;;;;;wBAe1C,mBAAmB,MAAM;EACvC,MAAM,MAAM;EACZ,IAAI;;;;;UCzCW;;;;;EAKf,aAAa;;EAGb,IAAI;;EAGJ,SAAS;;;UAQM,wBAAwB;;;;;;;EAOvC;;;;;;;;;;;wBA8CoB,YACpB,IAAI,YACJ,QAAQ,iBACP;;;;;;;;;wBAkCa,qBACd,IAAI,YACJ,aAAa,gBACZ;;;;;;;;;;;;;;;;;;;wBAyBmB,uBACpB,MAAM,kBACL,QAAQ;;UAeM;;EAEf;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;;;;;;;;;;wBAWoB,aACpB,IAAI,YACJ,SAAS,gBACT,QAAQ,eACP,QAAQ;;;;;;;;wBAkCW,iBACpB,IAAI,YACJ,SAAS,iBACR;;UAuBc;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAUoB,aAAa,IAAI,aAAa,QAAQ;;;;;;;;;;;wBCvQtC,gBAAgB,IAAI,aAAa"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare namespace schema_d_exports {
|
|
|
17
17
|
* that each unique request/response combination is stored only once, regardless
|
|
18
18
|
* of when it was recorded.
|
|
19
19
|
*/
|
|
20
|
-
declare const responsesTable: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
20
|
+
export declare const responsesTable: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
|
|
21
21
|
name: "responses";
|
|
22
22
|
schema: undefined;
|
|
23
23
|
columns: {
|
|
@@ -275,7 +275,7 @@ type DbInstance = ReturnType<typeof drizzle<typeof schema_d_exports>>;
|
|
|
275
275
|
* @param opts - Connection options (fall back to environment variables)
|
|
276
276
|
* @returns `{ pool, db }` — raw pool for `close()`, db for queries
|
|
277
277
|
*/
|
|
278
|
-
declare function createDbConnection(opts: ConnectionOptions): {
|
|
278
|
+
export declare function createDbConnection(opts: ConnectionOptions): {
|
|
279
279
|
pool: mysql.Pool;
|
|
280
280
|
db: DbInstance;
|
|
281
281
|
};
|
|
@@ -312,7 +312,7 @@ interface RecorderOptions extends ConnectionOptions {
|
|
|
312
312
|
* @param db - Drizzle ORM database instance
|
|
313
313
|
* @param record - Response record from the HTTP client interceptor
|
|
314
314
|
*/
|
|
315
|
-
declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<void>;
|
|
315
|
+
export declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<void>;
|
|
316
316
|
/**
|
|
317
317
|
* Creates a `RecorderBundle` from an existing Drizzle instance.
|
|
318
318
|
*
|
|
@@ -321,7 +321,7 @@ declare function addResponse(db: DbInstance, record: ResponseRecord): Promise<vo
|
|
|
321
321
|
* @param db - Drizzle ORM database instance
|
|
322
322
|
* @param close - Function that closes the underlying connection
|
|
323
323
|
*/
|
|
324
|
-
declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>): RecorderBundle;
|
|
324
|
+
export declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>): RecorderBundle;
|
|
325
325
|
/**
|
|
326
326
|
* Creates a response recorder that persists every pixiv API response to MySQL.
|
|
327
327
|
*
|
|
@@ -340,7 +340,7 @@ declare function createRecorderBundle(db: DbInstance, close: () => Promise<void>
|
|
|
340
340
|
* await close()
|
|
341
341
|
* ```
|
|
342
342
|
*/
|
|
343
|
-
declare function createResponseRecorder(opts: RecorderOptions): Promise<RecorderBundle>;
|
|
343
|
+
export declare function createResponseRecorder(opts: RecorderOptions): Promise<RecorderBundle>;
|
|
344
344
|
/** Filter criteria for response queries. */
|
|
345
345
|
interface ResponseFilter {
|
|
346
346
|
/** HTTP method to filter by (e.g. `"GET"`). Omit to match all methods. */
|
|
@@ -365,7 +365,7 @@ interface RangeOptions {
|
|
|
365
365
|
* @param range - Optional pagination options
|
|
366
366
|
* @returns Array of response rows, newest first
|
|
367
367
|
*/
|
|
368
|
-
declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: RangeOptions): Promise<ResponseRow[]>;
|
|
368
|
+
export declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: RangeOptions): Promise<ResponseRow[]>;
|
|
369
369
|
/**
|
|
370
370
|
* Returns the total count of response records from the last 90 days.
|
|
371
371
|
*
|
|
@@ -373,7 +373,7 @@ declare function getResponses(db: DbInstance, filter?: ResponseFilter, range?: R
|
|
|
373
373
|
* @param filter - Optional filter criteria
|
|
374
374
|
* @returns Total row count matching the filter
|
|
375
375
|
*/
|
|
376
|
-
declare function getResponseCount(db: DbInstance, filter?: ResponseFilter): Promise<number>;
|
|
376
|
+
export declare function getResponseCount(db: DbInstance, filter?: ResponseFilter): Promise<number>;
|
|
377
377
|
/** An endpoint with its response count. */
|
|
378
378
|
interface EndpointWithCount {
|
|
379
379
|
/** HTTP method (e.g. `"GET"` or `"POST"`). */
|
|
@@ -392,7 +392,7 @@ interface EndpointWithCount {
|
|
|
392
392
|
* @param db - Drizzle ORM database instance
|
|
393
393
|
* @returns Endpoints sorted by count descending
|
|
394
394
|
*/
|
|
395
|
-
declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
395
|
+
export declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/migrations.d.ts
|
|
398
398
|
/**
|
|
@@ -403,7 +403,7 @@ declare function getEndpoints(db: DbInstance): Promise<EndpointWithCount[]>;
|
|
|
403
403
|
*
|
|
404
404
|
* @param db - Drizzle ORM database instance
|
|
405
405
|
*/
|
|
406
|
-
declare function bootstrapSchema(db: DbInstance): Promise<void>;
|
|
406
|
+
export declare function bootstrapSchema(db: DbInstance): Promise<void>;
|
|
407
407
|
//#endregion
|
|
408
|
-
export {
|
|
408
|
+
export type { ConnectionOptions, DbInstance, EndpointWithCount, NewResponse, RangeOptions, RecorderBundle, RecorderOptions, ResponseFilter, ResponseRow };
|
|
409
409
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/schema.ts","../src/connection.ts","../src/recorder.ts","../src/migrations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["schema"],"sources":["../src/schema.ts","../src/connection.ts","../src/recorder.ts","../src/migrations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAwBa,iDAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAd;;;;;;;;;;;;;;;;KAuCD,qBAAqB,eAAe;;KAGpC,qBAAqB,eAAe;;;;UCvD/B;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;;;KAQU,aAAa,kBAAkB,eAAeA;;;;;;;;wBAe1C,mBAAmB,MAAM;EACvC,MAAM,MAAM;EACZ,IAAI;;;;;UCzCW;;;;;EAKf,aAAa;;EAGb,IAAI;;EAGJ,SAAS;;;UAQM,wBAAwB;;;;;;;EAOvC;;;;;;;;;;;wBA8CoB,YACpB,IAAI,YACJ,QAAQ,iBACP;;;;;;;;;wBAkCa,qBACd,IAAI,YACJ,aAAa,gBACZ;;;;;;;;;;;;;;;;;;;wBAyBmB,uBACpB,MAAM,kBACL,QAAQ;;UAeM;;EAEf;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;;;;;;;;;;wBAWoB,aACpB,IAAI,YACJ,SAAS,gBACT,QAAQ,eACP,QAAQ;;;;;;;;wBAkCW,iBACpB,IAAI,YACJ,SAAS,iBACR;;UAuBc;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;wBAUoB,aAAa,IAAI,aAAa,QAAQ;;;;;;;;;;;wBCvQtC,gBAAgB,IAAI,aAAa"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@book000/pixivts-db-mysql",
|
|
3
|
-
"version": "0.63.1-beta.
|
|
3
|
+
"version": "0.63.1-beta.47",
|
|
4
4
|
"description": "MySQL response recorder for @book000/pixivts (Drizzle ORM)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pixiv",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"drizzle-orm": "0.45.
|
|
46
|
-
"mysql2": "3.
|
|
45
|
+
"drizzle-orm": "0.45.4",
|
|
46
|
+
"mysql2": "3.24.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@book000/pixivts": "0.63.1-beta.
|
|
49
|
+
"@book000/pixivts": "0.63.1-beta.47"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/node": "24.
|
|
53
|
-
"@vitest/coverage-v8": "
|
|
54
|
-
"drizzle-kit": "0.31.
|
|
55
|
-
"tsdown": "0.
|
|
52
|
+
"@types/node": "24.19.1",
|
|
53
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
54
|
+
"drizzle-kit": "0.31.11",
|
|
55
|
+
"tsdown": "0.23.0",
|
|
56
56
|
"typescript": "6.0.3",
|
|
57
|
-
"vitest": "
|
|
57
|
+
"vitest": "5.0.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsdown",
|