@lensjs/core 1.0.12 → 2.1.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 +69 -0
- package/dist/abstracts/store.cjs +23 -0
- package/dist/abstracts/store.d.cts +7 -2
- package/dist/abstracts/store.d.ts +7 -2
- package/dist/abstracts/store.js +23 -0
- package/dist/core/api_controller.cjs +47 -4
- package/dist/core/api_controller.d.cts +7 -3
- package/dist/core/api_controller.d.ts +7 -3
- package/dist/core/api_controller.js +47 -4
- package/dist/core/lens.cjs +109 -10
- package/dist/core/lens.js +110 -11
- package/dist/exception-3AZsPtAg.d.ts +52 -0
- package/dist/exception-C69UCHPk.d.cts +52 -0
- package/dist/index.cjs +301 -19
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +296 -20
- package/dist/stores/better_sqlite.cjs +40 -6
- package/dist/stores/better_sqlite.d.cts +17 -1
- package/dist/stores/better_sqlite.d.ts +17 -1
- package/dist/stores/better_sqlite.js +41 -7
- package/dist/stores/index.cjs +40 -6
- package/dist/stores/index.js +41 -7
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +49 -2
- package/dist/types/index.d.ts +49 -2
- package/dist/types/index.js +2 -0
- package/dist/ui/assets/CacheActionBadge-3t8U516j.js +1 -0
- package/dist/ui/assets/CacheEntriesTable-BqLquILg.js +1 -0
- package/dist/ui/assets/CacheEntryContainer-B86waEsR.js +2 -0
- package/dist/ui/assets/CacheEntryDetails-Dm-oXALj.js +1 -0
- package/dist/ui/assets/CacheEntryDetailsContainer-BCyXGgkx.js +2 -0
- package/dist/ui/assets/ExceptionContainer-DSQBz5cb.js +2 -0
- package/dist/ui/assets/ExceptionDetails-gmpSQ_eu.js +16 -0
- package/dist/ui/assets/ExceptionDetailsContainer-BHIz-TUv.js +2 -0
- package/dist/ui/assets/ExceptionTable-BhrX9MSS.js +1 -0
- package/dist/ui/assets/LoadMore-26PcNWcP.js +1 -0
- package/dist/ui/assets/QueriesContainer-BSF-O4s3.js +2 -0
- package/dist/ui/assets/{QueryDetailsContainer-E7P-IO7f.js → QueryDetailsContainer-BjQM9QIb.js} +15 -15
- package/dist/ui/assets/QueryTable-szgIT5Uc.js +1 -0
- package/dist/ui/assets/RequestDetails-CvQhX-2F.js +1 -0
- package/dist/ui/assets/{RequestDetailsContainer-DuDo-IqS.js → RequestDetailsContainer-XYPFJFX0.js} +2 -2
- package/dist/ui/assets/RequestsContainer-D0QPK2Ii.js +2 -0
- package/dist/ui/assets/RequetsTable-6Fqchsrt.js +1 -0
- package/dist/ui/assets/{StatusCode-FQEjz7gK.js → StatusCode-CfVCLID2.js} +1 -1
- package/dist/ui/assets/TabbedDataViewer-Cl5ednx4.js +1 -0
- package/dist/ui/assets/{Table-DYaXk80S.js → Table-CGe8JwTO.js} +2 -2
- package/dist/ui/assets/columns-BFxCubt5.js +1 -0
- package/dist/ui/assets/columns-Cw7tw3Em.js +1 -0
- package/dist/ui/assets/columns-RiCoo9Ea.js +1 -0
- package/dist/ui/assets/{index-CpP2Ap5X.js → index-BRRKsoNv.js} +1 -1
- package/dist/ui/assets/index-BzFeZyjf.css +1 -0
- package/dist/ui/assets/{index-BS8XxorB.js → index-XoJlyTFO.js} +32 -22
- package/dist/ui/assets/useCacheEntries-SCADuxKq.js +1 -0
- package/dist/ui/assets/useExceptions-BMGL3nir.js +1 -0
- package/dist/ui/assets/useLensApi-BYyiIIZR.js +1 -0
- package/dist/ui/assets/{useLoadMore-CJltToLI.js → useLoadMore-CksOcXOF.js} +1 -1
- package/dist/ui/assets/useQueries-6nYr0oG5.js +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/utils/async_context.cjs +144 -0
- package/dist/utils/async_context.d.cts +13 -0
- package/dist/utils/async_context.d.ts +13 -0
- package/dist/utils/async_context.js +108 -0
- package/dist/utils/event_emitter.cjs +5 -2
- package/dist/utils/event_emitter.d.cts +8 -1
- package/dist/utils/event_emitter.d.ts +8 -1
- package/dist/utils/event_emitter.js +3 -1
- package/dist/utils/exception.cjs +130 -0
- package/dist/utils/exception.d.cts +3 -0
- package/dist/utils/exception.d.ts +3 -0
- package/dist/utils/exception.js +91 -0
- package/dist/watchers/cache_watcher.cjs +107 -0
- package/dist/watchers/cache_watcher.d.cts +11 -0
- package/dist/watchers/cache_watcher.d.ts +11 -0
- package/dist/watchers/cache_watcher.js +84 -0
- package/dist/watchers/exception_watcher.cjs +108 -0
- package/dist/watchers/exception_watcher.d.cts +10 -0
- package/dist/watchers/exception_watcher.d.ts +10 -0
- package/dist/watchers/exception_watcher.js +75 -0
- package/dist/watchers/index.cjs +81 -0
- package/dist/watchers/index.d.cts +2 -0
- package/dist/watchers/index.d.ts +2 -0
- package/dist/watchers/index.js +69 -0
- package/package.json +8 -6
- package/dist/ui/assets/QueriesContainer-CAAsjjW5.js +0 -2
- package/dist/ui/assets/QueryTable-BcrtUssT.js +0 -1
- package/dist/ui/assets/RequestDetails-C2DZBu5H.js +0 -1
- package/dist/ui/assets/RequestsContainer-DK3hQVz9.js +0 -2
- package/dist/ui/assets/RequetsTable-DgP8p60b.js +0 -1
- package/dist/ui/assets/TabbedDataViewer-cBDdPwIz.js +0 -1
- package/dist/ui/assets/index-DzNHqeKh.css +0 -1
- package/dist/ui/assets/useLensApi-DG6atd6d.js +0 -1
- package/dist/ui/assets/useQueries-C8mDDDc6.js +0 -1
package/dist/stores/index.cjs
CHANGED
|
@@ -36,6 +36,29 @@ module.exports = __toCommonJS(stores_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/abstracts/store.ts
|
|
38
38
|
var Store = class {
|
|
39
|
+
getAllExceptions(_paginationParams) {
|
|
40
|
+
return this.defaultMinimalPaginate();
|
|
41
|
+
}
|
|
42
|
+
stringifyData(data) {
|
|
43
|
+
if (typeof data === "string") {
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
return JSON.stringify(data);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
console.error(`Failed to stringify lens data: ${e}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
defaultMinimalPaginate() {
|
|
53
|
+
return Promise.resolve({
|
|
54
|
+
data: [],
|
|
55
|
+
meta: {
|
|
56
|
+
currentPage: 0,
|
|
57
|
+
lastPage: 0,
|
|
58
|
+
total: 0
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
39
62
|
};
|
|
40
63
|
|
|
41
64
|
// src/stores/better_sqlite.ts
|
|
@@ -58,11 +81,11 @@ var BetterSqliteStore = class extends Store {
|
|
|
58
81
|
`INSERT INTO ${TABLE_NAME} (id, data, type, created_at, lens_entry_id, minimal_data) values($id, $data, $type, $created_at, $lens_entry_id, $minimalData)`
|
|
59
82
|
).run({
|
|
60
83
|
id: entry.id ?? (0, import_crypto.randomUUID)(),
|
|
61
|
-
data:
|
|
84
|
+
data: this.stringifyData(entry.data),
|
|
62
85
|
type: entry.type,
|
|
63
|
-
created_at: entry.timestamp ?? (0, import_date.
|
|
86
|
+
created_at: entry.timestamp ?? (0, import_date.nowISO)(),
|
|
64
87
|
lens_entry_id: entry.requestId || null,
|
|
65
|
-
minimalData:
|
|
88
|
+
minimalData: this.stringifyData(entry.minimal_data ?? {})
|
|
66
89
|
});
|
|
67
90
|
}
|
|
68
91
|
async getAllQueries(pagination) {
|
|
@@ -71,11 +94,17 @@ var BetterSqliteStore = class extends Store {
|
|
|
71
94
|
async getAllRequests(pagination) {
|
|
72
95
|
return await this.paginate("request" /* REQUEST */, pagination, false);
|
|
73
96
|
}
|
|
74
|
-
async
|
|
97
|
+
async getAllCacheEntries(pagination) {
|
|
98
|
+
return await this.paginate("cache" /* CACHE */, pagination);
|
|
99
|
+
}
|
|
100
|
+
async getAllExceptions(pagination) {
|
|
101
|
+
return await this.paginate("exception" /* EXCEPTION */, pagination, false);
|
|
102
|
+
}
|
|
103
|
+
async allByRequestId(requestId, type, includeFullData = true) {
|
|
75
104
|
const rows = this.connection.prepare(
|
|
76
|
-
`${this.getSelectedColumns()} FROM ${TABLE_NAME} WHERE type = $type AND lens_entry_id = $requestId ORDER BY created_at DESC`
|
|
105
|
+
`${this.getSelectedColumns(includeFullData)} FROM ${TABLE_NAME} WHERE type = $type AND lens_entry_id = $requestId ORDER BY created_at DESC`
|
|
77
106
|
).all({ type, requestId });
|
|
78
|
-
return this.mapRows(rows);
|
|
107
|
+
return this.mapRows(rows, includeFullData);
|
|
79
108
|
}
|
|
80
109
|
async paginate(type, { page, perPage }, includeFullData = true) {
|
|
81
110
|
const offset = (page - 1) * perPage;
|
|
@@ -123,8 +152,13 @@ var BetterSqliteStore = class extends Store {
|
|
|
123
152
|
CREATE INDEX IF NOT EXISTS lens_entries_id_type_index
|
|
124
153
|
ON ${TABLE_NAME} (id, type);
|
|
125
154
|
`;
|
|
155
|
+
const lensEntryIdIndex = `
|
|
156
|
+
CREATE INDEX IF NOT EXISTS lens_entry_id_index
|
|
157
|
+
ON ${TABLE_NAME} (lens_entry_id);
|
|
158
|
+
`;
|
|
126
159
|
this.connection.exec(createTable);
|
|
127
160
|
this.connection.exec(createIndex);
|
|
161
|
+
this.connection.exec(lensEntryIdIndex);
|
|
128
162
|
}
|
|
129
163
|
mapRow(row, includeFullData = true) {
|
|
130
164
|
let data = includeFullData ? JSON.parse(row.data) : {};
|
package/dist/stores/index.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
// src/abstracts/store.ts
|
|
2
2
|
var Store = class {
|
|
3
|
+
getAllExceptions(_paginationParams) {
|
|
4
|
+
return this.defaultMinimalPaginate();
|
|
5
|
+
}
|
|
6
|
+
stringifyData(data) {
|
|
7
|
+
if (typeof data === "string") {
|
|
8
|
+
return data;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
return JSON.stringify(data);
|
|
12
|
+
} catch (e) {
|
|
13
|
+
console.error(`Failed to stringify lens data: ${e}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
defaultMinimalPaginate() {
|
|
17
|
+
return Promise.resolve({
|
|
18
|
+
data: [],
|
|
19
|
+
meta: {
|
|
20
|
+
currentPage: 0,
|
|
21
|
+
lastPage: 0,
|
|
22
|
+
total: 0
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
3
26
|
};
|
|
4
27
|
|
|
5
28
|
// src/stores/better_sqlite.ts
|
|
6
29
|
import { randomUUID } from "crypto";
|
|
7
30
|
import Database from "libsql";
|
|
8
|
-
import {
|
|
31
|
+
import { nowISO } from "@lensjs/date";
|
|
9
32
|
var TABLE_NAME = "lens_entries";
|
|
10
33
|
var BetterSqliteStore = class extends Store {
|
|
11
34
|
connection;
|
|
@@ -22,11 +45,11 @@ var BetterSqliteStore = class extends Store {
|
|
|
22
45
|
`INSERT INTO ${TABLE_NAME} (id, data, type, created_at, lens_entry_id, minimal_data) values($id, $data, $type, $created_at, $lens_entry_id, $minimalData)`
|
|
23
46
|
).run({
|
|
24
47
|
id: entry.id ?? randomUUID(),
|
|
25
|
-
data:
|
|
48
|
+
data: this.stringifyData(entry.data),
|
|
26
49
|
type: entry.type,
|
|
27
|
-
created_at: entry.timestamp ??
|
|
50
|
+
created_at: entry.timestamp ?? nowISO(),
|
|
28
51
|
lens_entry_id: entry.requestId || null,
|
|
29
|
-
minimalData:
|
|
52
|
+
minimalData: this.stringifyData(entry.minimal_data ?? {})
|
|
30
53
|
});
|
|
31
54
|
}
|
|
32
55
|
async getAllQueries(pagination) {
|
|
@@ -35,11 +58,17 @@ var BetterSqliteStore = class extends Store {
|
|
|
35
58
|
async getAllRequests(pagination) {
|
|
36
59
|
return await this.paginate("request" /* REQUEST */, pagination, false);
|
|
37
60
|
}
|
|
38
|
-
async
|
|
61
|
+
async getAllCacheEntries(pagination) {
|
|
62
|
+
return await this.paginate("cache" /* CACHE */, pagination);
|
|
63
|
+
}
|
|
64
|
+
async getAllExceptions(pagination) {
|
|
65
|
+
return await this.paginate("exception" /* EXCEPTION */, pagination, false);
|
|
66
|
+
}
|
|
67
|
+
async allByRequestId(requestId, type, includeFullData = true) {
|
|
39
68
|
const rows = this.connection.prepare(
|
|
40
|
-
`${this.getSelectedColumns()} FROM ${TABLE_NAME} WHERE type = $type AND lens_entry_id = $requestId ORDER BY created_at DESC`
|
|
69
|
+
`${this.getSelectedColumns(includeFullData)} FROM ${TABLE_NAME} WHERE type = $type AND lens_entry_id = $requestId ORDER BY created_at DESC`
|
|
41
70
|
).all({ type, requestId });
|
|
42
|
-
return this.mapRows(rows);
|
|
71
|
+
return this.mapRows(rows, includeFullData);
|
|
43
72
|
}
|
|
44
73
|
async paginate(type, { page, perPage }, includeFullData = true) {
|
|
45
74
|
const offset = (page - 1) * perPage;
|
|
@@ -87,8 +116,13 @@ var BetterSqliteStore = class extends Store {
|
|
|
87
116
|
CREATE INDEX IF NOT EXISTS lens_entries_id_type_index
|
|
88
117
|
ON ${TABLE_NAME} (id, type);
|
|
89
118
|
`;
|
|
119
|
+
const lensEntryIdIndex = `
|
|
120
|
+
CREATE INDEX IF NOT EXISTS lens_entry_id_index
|
|
121
|
+
ON ${TABLE_NAME} (lens_entry_id);
|
|
122
|
+
`;
|
|
90
123
|
this.connection.exec(createTable);
|
|
91
124
|
this.connection.exec(createIndex);
|
|
125
|
+
this.connection.exec(lensEntryIdIndex);
|
|
92
126
|
}
|
|
93
127
|
mapRow(row, includeFullData = true) {
|
|
94
128
|
let data = includeFullData ? JSON.parse(row.data) : {};
|
package/dist/types/index.cjs
CHANGED
|
@@ -26,6 +26,8 @@ module.exports = __toCommonJS(types_exports);
|
|
|
26
26
|
var WatcherTypeEnum = /* @__PURE__ */ ((WatcherTypeEnum2) => {
|
|
27
27
|
WatcherTypeEnum2["REQUEST"] = "request";
|
|
28
28
|
WatcherTypeEnum2["QUERY"] = "query";
|
|
29
|
+
WatcherTypeEnum2["CACHE"] = "cache";
|
|
30
|
+
WatcherTypeEnum2["EXCEPTION"] = "exception";
|
|
29
31
|
return WatcherTypeEnum2;
|
|
30
32
|
})(WatcherTypeEnum || {});
|
|
31
33
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/types/index.d.cts
CHANGED
|
@@ -11,6 +11,51 @@ type QueryEntry = {
|
|
|
11
11
|
};
|
|
12
12
|
requestId?: string;
|
|
13
13
|
};
|
|
14
|
+
type CacheAction = "miss" | "hit" | "delete" | "clear" | "write";
|
|
15
|
+
type CacheEntry = {
|
|
16
|
+
action: "hit" | "write";
|
|
17
|
+
requestId?: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
data: {
|
|
20
|
+
key: string;
|
|
21
|
+
value: any;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
action: "clear";
|
|
25
|
+
requestId?: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
data?: undefined | {};
|
|
28
|
+
} | {
|
|
29
|
+
action: "delete" | "miss";
|
|
30
|
+
requestId?: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
data: {
|
|
33
|
+
key: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type ExceptionEntry = {
|
|
37
|
+
name: string;
|
|
38
|
+
message: string;
|
|
39
|
+
cause?: Record<string, any> | string | null;
|
|
40
|
+
trace?: string[];
|
|
41
|
+
requestId?: string;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
fileInfo?: {
|
|
44
|
+
file: string;
|
|
45
|
+
function: string;
|
|
46
|
+
};
|
|
47
|
+
codeFrame?: {
|
|
48
|
+
file: string;
|
|
49
|
+
line: number;
|
|
50
|
+
column: number;
|
|
51
|
+
context: {
|
|
52
|
+
pre: string[];
|
|
53
|
+
error: string;
|
|
54
|
+
post: string[];
|
|
55
|
+
};
|
|
56
|
+
} | null;
|
|
57
|
+
originalStack?: string | null;
|
|
58
|
+
};
|
|
14
59
|
type UserEntry = {
|
|
15
60
|
id: number | string;
|
|
16
61
|
name: string;
|
|
@@ -43,7 +88,9 @@ type Entry = {
|
|
|
43
88
|
};
|
|
44
89
|
declare enum WatcherTypeEnum {
|
|
45
90
|
REQUEST = "request",
|
|
46
|
-
QUERY = "query"
|
|
91
|
+
QUERY = "query",
|
|
92
|
+
CACHE = "cache",
|
|
93
|
+
EXCEPTION = "exception"
|
|
47
94
|
}
|
|
48
95
|
type LensConfig = {
|
|
49
96
|
basePath: string;
|
|
@@ -88,4 +135,4 @@ type ApiResponse<T> = {
|
|
|
88
135
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
89
136
|
type RouteHttpMethod = "get" | "post" | "put" | "delete" | "patch";
|
|
90
137
|
|
|
91
|
-
export { type ApiResponse, type Entry, type HttpMethod, type LensConfig, type LensEntry, type PaginationParams, type Paginator, type QueryEntry, type QueryType, type RequestEntry, type RouteDefinition, type RouteDefinitionHandler, type RouteHttpMethod, type SqlQueryType, type UserEntry, WatcherTypeEnum };
|
|
138
|
+
export { type ApiResponse, type CacheAction, type CacheEntry, type Entry, type ExceptionEntry, type HttpMethod, type LensConfig, type LensEntry, type PaginationParams, type Paginator, type QueryEntry, type QueryType, type RequestEntry, type RouteDefinition, type RouteDefinitionHandler, type RouteHttpMethod, type SqlQueryType, type UserEntry, WatcherTypeEnum };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,51 @@ type QueryEntry = {
|
|
|
11
11
|
};
|
|
12
12
|
requestId?: string;
|
|
13
13
|
};
|
|
14
|
+
type CacheAction = "miss" | "hit" | "delete" | "clear" | "write";
|
|
15
|
+
type CacheEntry = {
|
|
16
|
+
action: "hit" | "write";
|
|
17
|
+
requestId?: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
data: {
|
|
20
|
+
key: string;
|
|
21
|
+
value: any;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
action: "clear";
|
|
25
|
+
requestId?: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
data?: undefined | {};
|
|
28
|
+
} | {
|
|
29
|
+
action: "delete" | "miss";
|
|
30
|
+
requestId?: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
data: {
|
|
33
|
+
key: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type ExceptionEntry = {
|
|
37
|
+
name: string;
|
|
38
|
+
message: string;
|
|
39
|
+
cause?: Record<string, any> | string | null;
|
|
40
|
+
trace?: string[];
|
|
41
|
+
requestId?: string;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
fileInfo?: {
|
|
44
|
+
file: string;
|
|
45
|
+
function: string;
|
|
46
|
+
};
|
|
47
|
+
codeFrame?: {
|
|
48
|
+
file: string;
|
|
49
|
+
line: number;
|
|
50
|
+
column: number;
|
|
51
|
+
context: {
|
|
52
|
+
pre: string[];
|
|
53
|
+
error: string;
|
|
54
|
+
post: string[];
|
|
55
|
+
};
|
|
56
|
+
} | null;
|
|
57
|
+
originalStack?: string | null;
|
|
58
|
+
};
|
|
14
59
|
type UserEntry = {
|
|
15
60
|
id: number | string;
|
|
16
61
|
name: string;
|
|
@@ -43,7 +88,9 @@ type Entry = {
|
|
|
43
88
|
};
|
|
44
89
|
declare enum WatcherTypeEnum {
|
|
45
90
|
REQUEST = "request",
|
|
46
|
-
QUERY = "query"
|
|
91
|
+
QUERY = "query",
|
|
92
|
+
CACHE = "cache",
|
|
93
|
+
EXCEPTION = "exception"
|
|
47
94
|
}
|
|
48
95
|
type LensConfig = {
|
|
49
96
|
basePath: string;
|
|
@@ -88,4 +135,4 @@ type ApiResponse<T> = {
|
|
|
88
135
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
89
136
|
type RouteHttpMethod = "get" | "post" | "put" | "delete" | "patch";
|
|
90
137
|
|
|
91
|
-
export { type ApiResponse, type Entry, type HttpMethod, type LensConfig, type LensEntry, type PaginationParams, type Paginator, type QueryEntry, type QueryType, type RequestEntry, type RouteDefinition, type RouteDefinitionHandler, type RouteHttpMethod, type SqlQueryType, type UserEntry, WatcherTypeEnum };
|
|
138
|
+
export { type ApiResponse, type CacheAction, type CacheEntry, type Entry, type ExceptionEntry, type HttpMethod, type LensConfig, type LensEntry, type PaginationParams, type Paginator, type QueryEntry, type QueryType, type RequestEntry, type RouteDefinition, type RouteDefinitionHandler, type RouteHttpMethod, type SqlQueryType, type UserEntry, WatcherTypeEnum };
|
package/dist/types/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
var WatcherTypeEnum = /* @__PURE__ */ ((WatcherTypeEnum2) => {
|
|
3
3
|
WatcherTypeEnum2["REQUEST"] = "request";
|
|
4
4
|
WatcherTypeEnum2["QUERY"] = "query";
|
|
5
|
+
WatcherTypeEnum2["CACHE"] = "cache";
|
|
6
|
+
WatcherTypeEnum2["EXCEPTION"] = "exception";
|
|
5
7
|
return WatcherTypeEnum2;
|
|
6
8
|
})(WatcherTypeEnum || {});
|
|
7
9
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-XoJlyTFO.js";const d=({action:e})=>{const t={hit:"bg-green-100 text-green-800 dark:bg-green-600 dark:text-white",miss:"bg-amber-100 text-amber-800 dark:bg-amber-600 dark:text-white",write:"bg-blue-100 text-blue-800 dark:bg-blue-600 dark:text-white",delete:"bg-red-100 text-red-800 dark:bg-red-600 dark:text-white",clear:"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white"};return r.jsx("span",{className:`rounded px-2 py-1 text-sm font-semibold ${t[e]||t.clear}`,children:e})};export{d as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./index-XoJlyTFO.js";import{L as s}from"./LoadMore-26PcNWcP.js";import{T as t}from"./Table-CGe8JwTO.js";import{g as r}from"./columns-BFxCubt5.js";import"./index-BRRKsoNv.js";import"./CacheActionBadge-3t8U516j.js";const p=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{p as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntriesTable-BqLquILg.js","./index-XoJlyTFO.js","./index-BzFeZyjf.css","./LoadMore-26PcNWcP.js","./Table-CGe8JwTO.js","./columns-BFxCubt5.js","./index-BRRKsoNv.js","./CacheActionBadge-3t8U516j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,j as a,_ as s}from"./index-XoJlyTFO.js";import{u as i}from"./useLoadMore-CksOcXOF.js";import{u as m}from"./useCacheEntries-SCADuxKq.js";import"./useLensApi-BYyiIIZR.js";const n=t.lazy(()=>s(()=>import("./CacheEntriesTable-BqLquILg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:r}=m(),o=i({paginatedPage:e});return t.useEffect(()=>{r()},[]),a.jsx(n,{hasMoreObject:o})};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a,L as s,q as i,k as r}from"./index-XoJlyTFO.js";import{D as n,T as o,J as u}from"./TabbedDataViewer-Cl5ednx4.js";import{C as d}from"./CacheActionBadge-3t8U516j.js";function y({data:e}){const t=[e.lens_entry_id?{label:"Request",value:a.jsx(s,{to:`${i(r()).REQUESTS}/${e.lens_entry_id}`,className:"text-blue-600 hover:underline font-semibold",children:"View Request"}),className:"text-gray-900 dark:text-gray-100"}:null,{label:"Operation",value:a.jsx(d,{action:e.data.action}),className:"text-gray-900 dark:text-gray-100"},e.data.data.key?{label:"Key",value:e.data.data.key??"__",className:"text-gray-900 dark:text-gray-100"}:null].filter(l=>!!l);return a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx(n,{title:"Details",items:t}),a.jsx(o,{tabs:[{id:"value",label:"Value",shouldShow:!!e.data.data.value,content:a.jsx(u,{data:e.data.data.value})}],defaultActiveTab:"value"})]})}export{y as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntryDetails-Dm-oXALj.js","./index-XoJlyTFO.js","./index-BzFeZyjf.css","./TabbedDataViewer-Cl5ednx4.js","./CacheActionBadge-3t8U516j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as o,r as s,j as r,_ as i}from"./index-XoJlyTFO.js";import{u as m}from"./useCacheEntries-SCADuxKq.js";import"./useLensApi-BYyiIIZR.js";const n=s.lazy(()=>i(()=>import("./CacheEntryDetails-Dm-oXALj.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),E=()=>{const{item:e,getItem:a}=m(),{id:t}=o();return s.useEffect(()=>{t&&a(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{E as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionTable-BhrX9MSS.js","./index-XoJlyTFO.js","./index-BzFeZyjf.css","./LoadMore-26PcNWcP.js","./Table-CGe8JwTO.js","./columns-Cw7tw3Em.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,j as s,_ as a}from"./index-XoJlyTFO.js";import{u as i}from"./useLoadMore-CksOcXOF.js";import{u as m}from"./useExceptions-BMGL3nir.js";import"./useLensApi-BYyiIIZR.js";const n=t.lazy(()=>a(()=>import("./ExceptionTable-BhrX9MSS.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:o}=m(),r=i({paginatedPage:e});return t.useEffect(()=>{o()},[]),s.jsx(n,{hasMoreObject:r})};export{_ as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{o as g,j as e,L as j,q as N,k as v}from"./index-XoJlyTFO.js";import{D as w,T as S}from"./TabbedDataViewer-Cl5ednx4.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const $=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=g("circle-alert",$);/**
|
|
7
|
+
* @license lucide-react v0.542.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const E=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],p=g("file-text",E);/**
|
|
12
|
+
* @license lucide-react v0.542.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const F=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],u=g("list",F),_=r=>{try{const a=[],s=[{type:"comment",regex:/(\/\/.*$|\/\*[\s\S]*?\*\/)/g},{type:"string",regex:/(["'`])((?:\\.|(?!\1)[^\\])*?)\1/g},{type:"template",regex:/`([^`\\]|\\.)*`/g},{type:"keyword",regex:/\b(const|let|var|function|class|if|else|for|while|return|import|export|from|try|catch|throw|async|await|new|this|super|extends|implements|interface|type|enum|namespace|public|private|protected|static|readonly|abstract|void|null|undefined|true|false)\b/g},{type:"function",regex:/\b([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?=\()/g},{type:"className",regex:/\bclass\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/g},{type:"property",regex:/\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g},{type:"number",regex:/\b\d+(\.\d+)?\b/g},{type:"operator",regex:/[+\-*/%=<>!&|^~?:]/g},{type:"bracket",regex:/[(){}\[\]]/g}],t=[];s.forEach(({type:l,regex:c})=>{try{let n;for(;(n=c.exec(r))!==null;)l==="className"&&n[1]?t.push({start:n.index+n[0].indexOf(n[1]),end:n.index+n[0].indexOf(n[1])+n[1].length,type:"className",text:n[1]}):l==="property"&&n[1]?t.push({start:n.index+1,end:n.index+n[0].length,type:"property",text:n[1]}):t.push({start:n.index,end:n.index+n[0].length,type:l,text:n[0]})}catch(n){console.warn(`Regex error for type ${l}:`,n)}}),t.sort((l,c)=>l.start-c.start);const o=[];let i=0;for(const l of t)l.start>=i&&(o.push(l),i=l.end);let d=0;for(const l of o)l.start>d&&a.push({text:r.slice(d,l.start),type:"text"}),a.push({text:l.text,type:l.type}),d=l.end;return d<r.length&&a.push({text:r.slice(d),type:"text"}),a}catch(a){return console.error("Error highlighting code:",a),[{text:r,type:"text"}]}},M=r=>{switch(r){case"comment":return"text-green-600 dark:text-green-400 italic";case"string":case"template":return"text-orange-600 dark:text-orange-400";case"keyword":return"text-blue-600 dark:text-blue-400 font-semibold";case"function":return"text-yellow-600 dark:text-yellow-400 font-medium";case"className":return"text-teal-600 dark:text-teal-400 font-semibold";case"property":return"text-indigo-600 dark:text-indigo-400";case"number":return"text-purple-600 dark:text-purple-400";case"operator":return"text-pink-600 dark:text-pink-400";case"bracket":return"text-gray-600 dark:text-gray-400 font-semibold";default:return"text-gray-800 dark:text-gray-200"}},f=({message:r})=>e.jsxs("div",{className:"p-4 text-center text-red-500 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[e.jsx(y,{className:"w-5 h-5"}),e.jsx("span",{className:"font-semibold",children:"Error Loading Code Frame"})]}),e.jsx("p",{className:"text-sm",children:r})]}),z=({code:r})=>{try{const a=_(r);return e.jsx("code",{className:"font-mono text-sm leading-5 whitespace-pre tracking-normal",children:a.map((s,t)=>e.jsx("span",{className:M(s.type),children:s.text},t))})}catch(a){return console.error("Error rendering syntax highlighter:",a),e.jsx("code",{className:"font-mono text-sm leading-5 whitespace-pre text-gray-800 dark:text-gray-200",children:r})}},L=({file:r,line:a,column:s})=>e.jsx("div",{className:"px-4 py-2 bg-gradient-to-r from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-700 border-b border-gray-200 dark:border-gray-600",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-red-500 dark:text-red-400"}),e.jsx("span",{className:"font-semibold text-red-600 dark:text-red-400",children:"Error Location"})]}),e.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-600"}),e.jsx("div",{className:"font-mono text-gray-700 dark:text-gray-300 bg-gray-200 dark:bg-gray-600 px-2 py-1 rounded text-xs truncate max-w-xs",title:r,children:r||"Unknown file"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-xs",children:["Line ",a||"?",":",s||"?"]})]})}),C=({column:r})=>e.jsx("div",{className:"mt-2",children:e.jsx("div",{className:"absolute flex items-center gap-2 z-20",style:{left:`${Math.max(0,(r-1)*.6)}em`},children:e.jsx("span",{className:"text-red-500 -mt-2 dark:text-red-400 font-semibold font-mono",children:"^"})})}),T=({codeLine:r,lineNumber:a,isErrorLine:s,column:t})=>e.jsxs("div",{className:`flex group ${s?"bg-red-50 dark:bg-red-950/30":"hover:bg-gray-50 dark:hover:bg-gray-800/30"}`,children:[e.jsx("div",{className:`flex-shrink-0 w-16 py-1 px-3 text-right select-none text-sm font-mono tabular-nums border-r ${s?"text-red-500 dark:text-red-400 font-bold bg-red-100 dark:bg-red-900/40 border-red-300 dark:border-red-700":"text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700 group-hover:bg-gray-100 dark:group-hover:bg-gray-700"}`,children:a}),e.jsx("div",{className:"flex-1 py-1 px-3 relative min-h-[1.5rem] flex items-start overflow-hidden",children:e.jsxs("div",{className:"w-full font-mono text-sm",children:[e.jsx(z,{code:r||""}),s&&t&&e.jsx(C,{column:t,codeLine:r||""})]})})]}),I=({totalLines:r})=>e.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 text-xs",children:e.jsx("div",{className:"flex items-center justify-between text-gray-600 dark:text-gray-400",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full animate-pulse"}),"Error line highlighted :",e.jsxs("span",{children:[r," lines of context"]})]})})}),h=({message:r})=>e.jsxs("div",{className:"p-4 text-center text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsx(p,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:r})]}),q=({codeFrame:r})=>{if(!r)return e.jsx(h,{message:"No code frame available"});try{const{file:a,line:s,column:t,context:o}=r;if(!o||!o.pre&&!o.error&&!o.post)return e.jsx(h,{message:"No code context available"});const{pre:i,error:d,post:l}=o,c=[...i||[],d||"",...l||[]],n=(i||[]).length;return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden bg-white dark:bg-gray-900 shadow-lg",children:[e.jsx(L,{file:a||"",line:s||0,column:t||0}),e.jsx("div",{className:"overflow-auto max-h-80 font-mono",children:e.jsx("div",{className:"relative",children:c.map((b,x)=>{const k=(s||1)-n+x,m=x===n;return e.jsx(T,{codeLine:b,lineNumber:k,isErrorLine:m,column:m?t:void 0},x)})})}),e.jsx(I,{totalLines:c.length})]})}catch(a){return console.error("Error rendering CodeFrameViewer:",a),e.jsx(f,{message:"Unable to display code context. Please check the console for details."})}},A=()=>e.jsxs("div",{className:"p-4 text-center text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsx(u,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"No stack trace available"})]}),H=({frameCount:r})=>e.jsx("div",{className:"px-4 py-2 bg-gradient-to-r from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-700 border-b border-gray-200 dark:border-gray-600",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(u,{className:"w-4 h-4 text-orange-500 dark:text-orange-400"}),e.jsx("span",{className:"font-semibold text-orange-600 dark:text-orange-400",children:"Stack Trace"})]}),e.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-600"}),e.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-xs",children:[r," stack frame",r!==1?"s":""]})]})}),V=({file:r,line:a,column:s})=>e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-600 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono truncate max-w-xs",title:r,children:r}),a&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsxs("span",{className:"font-mono",children:[a,s?`:${s}`:""]})]})]}),Z=({index:r,isFirst:a})=>e.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-xs font-semibold ${a?"bg-orange-500 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}`,children:r+1}),D=({functionName:r})=>e.jsx("div",{className:"font-mono text-sm font-medium text-gray-900 dark:text-gray-100 mb-1",children:e.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:r})}),R=r=>{const a=[/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/,/at\s+(.+?):(\d+):(\d+)/,/(.+?)@(.+?):(\d+):(\d+)/,/(.+)/];for(const s of a){const t=r.match(s);if(t){if(t.length>=5)return{function:t[1]?.trim(),file:t[2]?.trim(),line:t[3],column:t[4],raw:r};if(t.length>=4)return{function:null,file:t[1]?.trim(),line:t[2],column:t[3],raw:r};if(t.length>=4&&t[0].includes("@"))return{function:t[1]?.trim(),file:t[2]?.trim(),line:t[3],column:t[4],raw:r}}}return{function:null,file:null,line:null,column:null,raw:r}},P=({line:r,index:a,isFirst:s})=>{const t=R(r);return e.jsx("div",{className:`group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors ${s?"bg-orange-50 dark:bg-orange-950/20":""}`,children:e.jsxs("div",{className:"flex items-start gap-3 p-3",children:[e.jsx(Z,{index:a,isFirst:s}),e.jsxs("div",{className:"flex-1 min-w-0",children:[t.function&&e.jsx(D,{functionName:t.function}),t.file&&e.jsx(V,{file:t.file,line:t.line||void 0,column:t.column||void 0}),!t.function&&!t.file&&e.jsx("div",{className:"font-mono text-sm text-gray-700 dark:text-gray-300 break-all",children:t.raw})]}),s&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"bg-orange-500 text-white px-2 py-1 rounded text-xs font-medium",children:"Origin"})})]})})},O=({traceDepth:r})=>e.jsx("div",{className:"px-4 py-2 bg-gray-50 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 text-xs",children:e.jsxs("div",{className:"flex items-center justify-between text-gray-600 dark:text-gray-400",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-orange-500 rounded-full"}),"Call stack from error origin"]}),e.jsxs("span",{children:["Trace depth: ",r]})]}),e.jsx("span",{className:"font-mono",children:"Stack Trace"})]})}),U=({trace:r})=>{if(!r||r.length===0)return e.jsx(A,{});try{return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden bg-white dark:bg-gray-900 shadow-lg",children:[e.jsx(H,{frameCount:r.length}),e.jsx("div",{className:"overflow-auto max-h-96",children:e.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-800",children:r.map((a,s)=>e.jsx(P,{line:a,index:s,isFirst:s===0},s))})}),e.jsx(O,{traceDepth:r.length})]})}catch(a){return console.error("Error rendering StackTraceViewer:",a),e.jsx(f,{message:"Unable to display stack trace. Please check the console for details."})}},G=({data:r})=>{const a=[r.lens_entry_id?{label:"Request",value:e.jsx(j,{to:`${N(v()).REQUESTS}/${r.lens_entry_id}`,className:"text-blue-600 hover:underline font-semibold",children:"View Request"}),className:"text-gray-900 dark:text-gray-100"}:null,r.data.name?{label:"Name",value:r.data.name,className:"text-gray-900 dark:text-gray-100"}:null,r.data.fileInfo?.file?{label:"File",value:r.data.fileInfo?.file,className:"text-gray-900 dark:text-gray-100"}:null,r.data.fileInfo?.function?{label:"Function",value:r.data.fileInfo?.function,className:"text-gray-900 dark:text-gray-100"}:null].filter(t=>!!t),s=[{id:"message",label:"Message",data:r.data.message,shouldShow:!!r.data.message},{id:"stack-trace",label:"Stacktrace",content:e.jsx(U,{trace:r.data.trace||[]}),shouldShow:!!r.data.trace&&r.data.trace.length>0},{id:"location",label:"Location",content:e.jsx(q,{codeFrame:r.data.codeFrame}),shouldShow:!!r.data.codeFrame},{id:"cause",label:"Cause",data:r.data.cause??"",shouldShow:!!r.data.cause&&r.data.cause.length>0},{id:"original-stack",label:"Original Stack",data:r.data.originalStack??"",shouldShow:!!r.data.originalStack&&r.data.originalStack.length>0}];return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(w,{title:"Exception Details",items:a}),e.jsx(S,{tabs:s})]})};export{G as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionDetails-gmpSQ_eu.js","./index-XoJlyTFO.js","./index-BzFeZyjf.css","./TabbedDataViewer-Cl5ednx4.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as a,r as s,j as r,_ as i}from"./index-XoJlyTFO.js";import{u as m}from"./useExceptions-BMGL3nir.js";import"./useLensApi-BYyiIIZR.js";const n=s.lazy(()=>i(()=>import("./ExceptionDetails-gmpSQ_eu.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),x=()=>{const{item:e,getItem:o}=m(),{id:t}=a();return s.useEffect(()=>{t&&o(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{x as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./index-XoJlyTFO.js";import{L as s}from"./LoadMore-26PcNWcP.js";import{T as t}from"./Table-CGe8JwTO.js";import{g as r}from"./columns-Cw7tw3Em.js";import"./index-BRRKsoNv.js";const d=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-XoJlyTFO.js";import{t}from"./Table-CGe8JwTO.js";function n({paginatedPage:r}){return r.hasMore?o.jsx("div",{className:"flex justify-center p-4",children:o.jsx("button",{onClick:r.loadMore,disabled:r.loading,className:t("px-4 py-2 rounded-md bg-gray-200 text-gray-800 dark:bg-neutral-800 dark:text-white text-sm hover:bg-gray-300 dark:hover:bg-neutral-700 transition-colors",r.loading&&"opacity-50 cursor-not-allowed"),children:r.loading?"Loading...":"Load More"})}):null}export{n as L};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./QueryTable-szgIT5Uc.js","./index-XoJlyTFO.js","./index-BzFeZyjf.css","./LoadMore-26PcNWcP.js","./Table-CGe8JwTO.js","./columns-RiCoo9Ea.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,j as s,_ as a}from"./index-XoJlyTFO.js";import{u as i}from"./useQueries-6nYr0oG5.js";import{u}from"./useLoadMore-CksOcXOF.js";import"./useLensApi-BYyiIIZR.js";const m=e.lazy(()=>a(()=>import("./QueryTable-szgIT5Uc.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),f=()=>{const{loadMoreRequests:r,fetchQueries:t}=i(),o=u({paginatedPage:r});return e.useEffect(()=>{t()},[]),s.jsx(m,{hasMoreObject:o})};export{f as default};
|