@webiny/db 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
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/DbRegistry.d.ts +8 -0
- package/DbRegistry.js +45 -0
- package/DbRegistry.js.map +1 -0
- package/index.d.ts +14 -68
- package/index.js +23 -196
- package/index.js.map +1 -0
- package/package.json +27 -26
- package/store/Store.d.ts +17 -0
- package/store/Store.js +35 -0
- package/store/Store.js.map +1 -0
- package/store/types.d.ts +84 -0
- package/store/types.js +7 -0
- package/store/types.js.map +1 -0
- package/types.d.ts +24 -0
- package/types.js +18 -0
- package/types.js.map +1 -0
package/DbRegistry.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IRegistry, IRegistryItem, IRegistryRegisterParams } from "./types";
|
|
2
|
+
export declare class DbRegistry implements IRegistry {
|
|
3
|
+
private readonly items;
|
|
4
|
+
register<T = unknown>(input: IRegistryRegisterParams<T>): void;
|
|
5
|
+
getOneItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>;
|
|
6
|
+
getItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T> | null;
|
|
7
|
+
getItems<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>[];
|
|
8
|
+
}
|
package/DbRegistry.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DbRegistry = void 0;
|
|
7
|
+
class DbRegistry {
|
|
8
|
+
items = {};
|
|
9
|
+
register(input) {
|
|
10
|
+
const key = `${input.app}-${input.tags.sort().join("-")}`;
|
|
11
|
+
if (this.items[key]) {
|
|
12
|
+
throw new Error(`Item with app "${input.app}" and tags "${input.tags.join(", ")}" is already registered.`);
|
|
13
|
+
}
|
|
14
|
+
this.items[key] = input;
|
|
15
|
+
}
|
|
16
|
+
getOneItem(cb) {
|
|
17
|
+
const item = this.getItem(cb);
|
|
18
|
+
if (!item) {
|
|
19
|
+
throw new Error("Item not found.");
|
|
20
|
+
}
|
|
21
|
+
return item;
|
|
22
|
+
}
|
|
23
|
+
getItem(cb) {
|
|
24
|
+
const items = this.getItems(cb);
|
|
25
|
+
if (items.length === 0) {
|
|
26
|
+
return null;
|
|
27
|
+
} else if (items.length > 1) {
|
|
28
|
+
throw new Error("More than one item found with the provided criteria.");
|
|
29
|
+
}
|
|
30
|
+
return items[0];
|
|
31
|
+
}
|
|
32
|
+
getItems(cb) {
|
|
33
|
+
const results = [];
|
|
34
|
+
for (const key in this.items) {
|
|
35
|
+
const item = this.items[key];
|
|
36
|
+
if (cb(item)) {
|
|
37
|
+
results.push(item);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return results;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.DbRegistry = DbRegistry;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=DbRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DbRegistry","items","register","input","key","app","tags","sort","join","Error","getOneItem","cb","item","getItem","getItems","length","results","push","exports"],"sources":["DbRegistry.ts"],"sourcesContent":["import type { IRegistry, IRegistryItem, IRegistryRegisterParams } from \"./types\";\nimport type { GenericRecord } from \"@webiny/api/types\";\n\nexport class DbRegistry implements IRegistry {\n private readonly items: GenericRecord<string, IRegistryItem> = {};\n\n public register<T = unknown>(input: IRegistryRegisterParams<T>): void {\n const key = `${input.app}-${input.tags.sort().join(\"-\")}`;\n\n if (this.items[key]) {\n throw new Error(\n `Item with app \"${input.app}\" and tags \"${input.tags.join(\n \", \"\n )}\" is already registered.`\n );\n }\n this.items[key] = input;\n }\n\n public getOneItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T> {\n const item = this.getItem(cb);\n if (!item) {\n throw new Error(\"Item not found.\");\n }\n return item;\n }\n\n public getItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T> | null {\n const items = this.getItems(cb);\n if (items.length === 0) {\n return null;\n } else if (items.length > 1) {\n throw new Error(\"More than one item found with the provided criteria.\");\n }\n return items[0];\n }\n\n public getItems<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>[] {\n const results: IRegistryItem<T>[] = [];\n for (const key in this.items) {\n const item = this.items[key] as IRegistryItem<T>;\n if (cb(item)) {\n results.push(item);\n }\n }\n\n return results;\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,UAAU,CAAsB;EACxBC,KAAK,GAAyC,CAAC,CAAC;EAE1DC,QAAQA,CAAcC,KAAiC,EAAQ;IAClE,MAAMC,GAAG,GAAG,GAAGD,KAAK,CAACE,GAAG,IAAIF,KAAK,CAACG,IAAI,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,EAAE;IAEzD,IAAI,IAAI,CAACP,KAAK,CAACG,GAAG,CAAC,EAAE;MACjB,MAAM,IAAIK,KAAK,CACX,kBAAkBN,KAAK,CAACE,GAAG,eAAeF,KAAK,CAACG,IAAI,CAACE,IAAI,CACrD,IACJ,CAAC,0BACL,CAAC;IACL;IACA,IAAI,CAACP,KAAK,CAACG,GAAG,CAAC,GAAGD,KAAK;EAC3B;EAEOO,UAAUA,CAAcC,EAAuC,EAAoB;IACtF,MAAMC,IAAI,GAAG,IAAI,CAACC,OAAO,CAACF,EAAE,CAAC;IAC7B,IAAI,CAACC,IAAI,EAAE;MACP,MAAM,IAAIH,KAAK,CAAC,iBAAiB,CAAC;IACtC;IACA,OAAOG,IAAI;EACf;EAEOC,OAAOA,CAAcF,EAAuC,EAA2B;IAC1F,MAAMV,KAAK,GAAG,IAAI,CAACa,QAAQ,CAACH,EAAE,CAAC;IAC/B,IAAIV,KAAK,CAACc,MAAM,KAAK,CAAC,EAAE;MACpB,OAAO,IAAI;IACf,CAAC,MAAM,IAAId,KAAK,CAACc,MAAM,GAAG,CAAC,EAAE;MACzB,MAAM,IAAIN,KAAK,CAAC,sDAAsD,CAAC;IAC3E;IACA,OAAOR,KAAK,CAAC,CAAC,CAAC;EACnB;EAEOa,QAAQA,CAAcH,EAAuC,EAAsB;IACtF,MAAMK,OAA2B,GAAG,EAAE;IACtC,KAAK,MAAMZ,GAAG,IAAI,IAAI,CAACH,KAAK,EAAE;MAC1B,MAAMW,IAAI,GAAG,IAAI,CAACX,KAAK,CAACG,GAAG,CAAqB;MAChD,IAAIO,EAAE,CAACC,IAAI,CAAC,EAAE;QACVI,OAAO,CAACC,IAAI,CAACL,IAAI,CAAC;MACtB;IACJ;IAEA,OAAOI,OAAO;EAClB;AACJ;AAACE,OAAA,CAAAlB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,72 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
}[];
|
|
8
|
-
};
|
|
9
|
-
export declare type Args = {
|
|
10
|
-
__batch?: {
|
|
11
|
-
instance: Batch;
|
|
12
|
-
operation: Operation;
|
|
13
|
-
};
|
|
14
|
-
table?: string;
|
|
15
|
-
meta?: boolean;
|
|
16
|
-
limit?: number;
|
|
17
|
-
sort?: Record<string, 1 | -1>;
|
|
18
|
-
data?: Record<string, any>;
|
|
19
|
-
query?: Record<string, any>;
|
|
20
|
-
keys?: Key[];
|
|
21
|
-
};
|
|
22
|
-
export declare type Result<T = any> = [T, Record<string, any>];
|
|
23
|
-
export interface DbDriver {
|
|
24
|
-
create: (args: Args) => Promise<Result<true>>;
|
|
25
|
-
read: <T = Record<string, any>>(args: Args) => Promise<Result<T[]>>;
|
|
26
|
-
update: (args: Args) => Promise<Result<true>>;
|
|
27
|
-
delete: (args: Args) => Promise<Result<true>>;
|
|
28
|
-
createLog: (args: {
|
|
29
|
-
operation: string;
|
|
30
|
-
data: Args;
|
|
31
|
-
table: string;
|
|
32
|
-
id: string;
|
|
33
|
-
}) => Promise<Result<true>>;
|
|
34
|
-
readLogs: <T = Record<string, any>>(args: {
|
|
35
|
-
table: string;
|
|
36
|
-
}) => Promise<Result<T[]>>;
|
|
1
|
+
import { DbRegistry } from "./DbRegistry";
|
|
2
|
+
import type { IStore } from "./store/types";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export interface DbDriver<T> extends IStore {
|
|
5
|
+
getClient(): T;
|
|
37
6
|
}
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
export declare type ConstructorArgs = {
|
|
41
|
-
driver: DbDriver;
|
|
7
|
+
export interface ConstructorArgs<T> {
|
|
8
|
+
driver: DbDriver<T>;
|
|
42
9
|
table?: string;
|
|
43
|
-
logTable?: string;
|
|
44
|
-
};
|
|
45
|
-
declare class Db {
|
|
46
|
-
driver: DbDriver;
|
|
47
|
-
table: string;
|
|
48
|
-
logTable?: string;
|
|
49
|
-
constructor({ driver, table, logTable }: ConstructorArgs);
|
|
50
|
-
create(args: Args): Promise<Result<true>>;
|
|
51
|
-
read<T = Record<string, any>>(args: Args): Promise<Result<T[]>>;
|
|
52
|
-
update(args: Args): Promise<Result<true>>;
|
|
53
|
-
delete(args: Args): Promise<Result<true>>;
|
|
54
|
-
createLog(operation: any, args: Args): Promise<Result<true>>;
|
|
55
|
-
readLogs<T = Record<string, any>>(): Promise<Result<T[]>>;
|
|
56
|
-
batch<T0 = any, T1 = any, T2 = any, T3 = any, T4 = any, T5 = any, T6 = any, T7 = any, T8 = any, T9 = any>(): Batch<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>;
|
|
57
10
|
}
|
|
58
|
-
declare class
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
constructor(db: any);
|
|
65
|
-
push(...operations: Operation[]): this;
|
|
66
|
-
create(...args: Args[]): this;
|
|
67
|
-
read(...args: Args[]): this;
|
|
68
|
-
update(...args: Args[]): this;
|
|
69
|
-
delete(...args: Args[]): this;
|
|
70
|
-
execute(): Promise<[T0?, T1?, T2?, T3?, T4?, T5?, T6?, T7?, T8?, T9?]>;
|
|
11
|
+
declare class Db<T> {
|
|
12
|
+
driver: DbDriver<T>;
|
|
13
|
+
readonly table?: string;
|
|
14
|
+
readonly store: IStore;
|
|
15
|
+
readonly registry: DbRegistry;
|
|
16
|
+
constructor({ driver, table }: ConstructorArgs<T>);
|
|
71
17
|
}
|
|
72
|
-
export {
|
|
18
|
+
export { Db };
|
package/index.js
CHANGED
|
@@ -1,212 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
|
-
|
|
16
|
-
// Generates a short and sortable ID, e.g. "1607677774994.tfz58m".
|
|
17
|
-
const shortId = () => {
|
|
18
|
-
const time = new Date().getTime();
|
|
19
|
-
const uniqueId = Math.random().toString(36).slice(-6);
|
|
20
|
-
return `${time}.${uniqueId}`;
|
|
21
|
-
}; // Picks necessary data from received args, ready to be stored in the log table.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const getCreateLogData = args => {
|
|
25
|
-
const {
|
|
26
|
-
table,
|
|
27
|
-
meta,
|
|
28
|
-
limit,
|
|
29
|
-
sort,
|
|
30
|
-
data,
|
|
31
|
-
query,
|
|
32
|
-
keys
|
|
33
|
-
} = args;
|
|
34
|
-
const logData = {
|
|
35
|
-
table,
|
|
36
|
-
meta,
|
|
37
|
-
limit,
|
|
38
|
-
sort,
|
|
39
|
-
data,
|
|
40
|
-
query,
|
|
41
|
-
keys,
|
|
42
|
-
batch: null
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
if (args.__batch) {
|
|
46
|
-
logData.batch = {
|
|
47
|
-
id: args.__batch.instance.id,
|
|
48
|
-
type: args.__batch.instance.type
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return logData;
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Db: true
|
|
53
8
|
};
|
|
54
|
-
|
|
9
|
+
exports.Db = void 0;
|
|
10
|
+
var _DbRegistry = require("./DbRegistry");
|
|
11
|
+
var _Store = require("./store/Store");
|
|
12
|
+
var _types = require("./types");
|
|
13
|
+
Object.keys(_types).forEach(function (key) {
|
|
14
|
+
if (key === "default" || key === "__esModule") return;
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
17
|
+
Object.defineProperty(exports, key, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _types[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
55
24
|
class Db {
|
|
25
|
+
registry = new _DbRegistry.DbRegistry();
|
|
56
26
|
constructor({
|
|
57
27
|
driver,
|
|
58
|
-
table
|
|
59
|
-
logTable
|
|
28
|
+
table
|
|
60
29
|
}) {
|
|
61
|
-
(0, _defineProperty2.default)(this, "driver", void 0);
|
|
62
|
-
(0, _defineProperty2.default)(this, "table", void 0);
|
|
63
|
-
(0, _defineProperty2.default)(this, "logTable", void 0);
|
|
64
|
-
this.driver = driver;
|
|
65
30
|
this.table = table;
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
async create(args) {
|
|
70
|
-
const createArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
71
|
-
table: args.table || this.table
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
await this.createLog("create", createArgs);
|
|
75
|
-
return this.driver.create(createArgs);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async read(args) {
|
|
79
|
-
const readArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
80
|
-
table: args.table || this.table
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
await this.createLog("read", readArgs);
|
|
84
|
-
return this.driver.read(readArgs);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async update(args) {
|
|
88
|
-
const updateArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
89
|
-
table: args.table || this.table
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
await this.createLog("update", updateArgs);
|
|
93
|
-
return this.driver.update(updateArgs);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async delete(args) {
|
|
97
|
-
const deleteArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
98
|
-
table: args.table || this.table
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
await this.createLog("delete", deleteArgs);
|
|
102
|
-
return this.driver.delete(deleteArgs);
|
|
103
|
-
} // Logging functions.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
async createLog(operation, args) {
|
|
107
|
-
if (!this.logTable) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const data = getCreateLogData(args);
|
|
112
|
-
return this.driver.createLog({
|
|
113
|
-
operation,
|
|
114
|
-
data,
|
|
115
|
-
table: this.logTable,
|
|
116
|
-
id: shortId()
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
async readLogs() {
|
|
121
|
-
if (!this.logTable) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return this.driver.readLogs({
|
|
126
|
-
table: this.logTable
|
|
31
|
+
this.driver = driver;
|
|
32
|
+
this.store = new _Store.Store({
|
|
33
|
+
driver
|
|
127
34
|
});
|
|
128
35
|
}
|
|
129
|
-
|
|
130
|
-
batch() {
|
|
131
|
-
return new Batch(this);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
36
|
}
|
|
135
|
-
|
|
136
37
|
exports.Db = Db;
|
|
137
38
|
|
|
138
|
-
|
|
139
|
-
constructor(db) {
|
|
140
|
-
(0, _defineProperty2.default)(this, "db", void 0);
|
|
141
|
-
(0, _defineProperty2.default)(this, "type", void 0);
|
|
142
|
-
(0, _defineProperty2.default)(this, "id", void 0);
|
|
143
|
-
(0, _defineProperty2.default)(this, "meta", void 0);
|
|
144
|
-
(0, _defineProperty2.default)(this, "operations", void 0);
|
|
145
|
-
this.db = db;
|
|
146
|
-
this.type = "batch";
|
|
147
|
-
this.id = shortId();
|
|
148
|
-
this.meta = {};
|
|
149
|
-
this.operations = [];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
push(...operations) {
|
|
153
|
-
for (let i = 0; i < operations.length; i++) {
|
|
154
|
-
const item = operations[i];
|
|
155
|
-
this.operations.push(item);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return this;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
create(...args) {
|
|
162
|
-
for (let i = 0; i < args.length; i++) {
|
|
163
|
-
this.push(["create", args[i]]);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return this;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
read(...args) {
|
|
170
|
-
for (let i = 0; i < args.length; i++) {
|
|
171
|
-
this.push(["read", args[i]]);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return this;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
update(...args) {
|
|
178
|
-
for (let i = 0; i < args.length; i++) {
|
|
179
|
-
this.push(["update", args[i]]);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return this;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
delete(...args) {
|
|
186
|
-
for (let i = 0; i < args.length; i++) {
|
|
187
|
-
this.push(["delete", args[i]]);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return this;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
async execute() {
|
|
194
|
-
const promises = [];
|
|
195
|
-
|
|
196
|
-
for (let i = 0; i < this.operations.length; i++) {
|
|
197
|
-
const [operation, args] = this.operations[i];
|
|
198
|
-
promises.push(this.db[operation](_objectSpread(_objectSpread({}, args), {}, {
|
|
199
|
-
__batch: {
|
|
200
|
-
instance: this,
|
|
201
|
-
operation: this.operations[i]
|
|
202
|
-
}
|
|
203
|
-
})));
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const result = Promise.all(promises);
|
|
207
|
-
return result;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
exports.Batch = Batch;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_DbRegistry","require","_Store","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","Db","registry","DbRegistry","constructor","driver","table","store","Store"],"sources":["index.ts"],"sourcesContent":["import { DbRegistry } from \"~/DbRegistry\";\nimport type { IStore } from \"~/store/types\";\nimport { Store } from \"~/store/Store\";\n\nexport * from \"./types\";\n\nexport interface DbDriver<T> extends IStore {\n getClient(): T;\n}\n\nexport interface ConstructorArgs<T> {\n driver: DbDriver<T>;\n table?: string;\n}\n\nclass Db<T> {\n public driver: DbDriver<T>;\n public readonly table?: string;\n public readonly store: IStore;\n\n public readonly registry = new DbRegistry();\n\n constructor({ driver, table }: ConstructorArgs<T>) {\n this.table = table;\n this.driver = driver;\n this.store = new Store<T>({\n driver\n });\n }\n}\n\nexport { Db };\n"],"mappings":";;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAWA,MAAMS,EAAE,CAAI;EAKQC,QAAQ,GAAG,IAAIC,sBAAU,CAAC,CAAC;EAE3CC,WAAWA,CAAC;IAAEC,MAAM;IAAEC;EAA0B,CAAC,EAAE;IAC/C,IAAI,CAACA,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACE,KAAK,GAAG,IAAIC,YAAK,CAAI;MACtBH;IACJ,CAAC,CAAC;EACN;AACJ;AAACR,OAAA,CAAAI,EAAA,GAAAA,EAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
"name": "@webiny/db",
|
|
3
|
+
"version": "0.0.0-unstable.06b2ede40f",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
8
|
+
},
|
|
9
|
+
"description": "A simple multi-database client.",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"directory": "dist"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@webiny/api": "0.0.0-unstable.06b2ede40f",
|
|
17
|
+
"type-fest": "4.14.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@webiny/project-utils": "0.0.0-unstable.06b2ede40f",
|
|
21
|
+
"rimraf": "6.0.1",
|
|
22
|
+
"typescript": "5.3.3"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "node ../cli/bin.js run build",
|
|
26
|
+
"watch": "node ../cli/bin.js run watch"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "06b2ede40fc2212a70eeafd74afd50b56fb0ce82"
|
|
28
29
|
}
|
package/store/Store.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GetValueResult, GetValuesResult, IListValuesParams, IStore, ListValuesResult, RemoveValueResult, RemoveValuesResult, StorageKey, StoreValueResult, StoreValuesResult } from "./types";
|
|
2
|
+
import type { GenericRecord } from "@webiny/api/types";
|
|
3
|
+
import type { DbDriver } from "../index";
|
|
4
|
+
export interface IStoreParams<T> {
|
|
5
|
+
driver: DbDriver<T>;
|
|
6
|
+
}
|
|
7
|
+
export declare class Store<T> implements IStore {
|
|
8
|
+
private driver;
|
|
9
|
+
constructor(params: IStoreParams<T>);
|
|
10
|
+
storeValue<V>(key: StorageKey, value: V): Promise<StoreValueResult<V>>;
|
|
11
|
+
storeValues<V extends GenericRecord<StorageKey>>(values: V): Promise<StoreValuesResult<V>>;
|
|
12
|
+
getValue<V>(key: StorageKey): Promise<GetValueResult<V>>;
|
|
13
|
+
getValues<V extends GenericRecord<StorageKey>>(keys: (keyof V)[]): Promise<GetValuesResult<V>>;
|
|
14
|
+
listValues<V extends GenericRecord<StorageKey>>(params?: IListValuesParams): Promise<ListValuesResult<V>>;
|
|
15
|
+
removeValue<V>(key: StorageKey): Promise<RemoveValueResult<V>>;
|
|
16
|
+
removeValues<V extends GenericRecord<StorageKey>>(keys: (keyof V)[]): Promise<RemoveValuesResult<V>>;
|
|
17
|
+
}
|
package/store/Store.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Store = void 0;
|
|
7
|
+
class Store {
|
|
8
|
+
constructor(params) {
|
|
9
|
+
this.driver = params.driver;
|
|
10
|
+
}
|
|
11
|
+
async storeValue(key, value) {
|
|
12
|
+
return this.driver.storeValue(key, value);
|
|
13
|
+
}
|
|
14
|
+
async storeValues(values) {
|
|
15
|
+
return this.driver.storeValues(values);
|
|
16
|
+
}
|
|
17
|
+
async getValue(key) {
|
|
18
|
+
return this.driver.getValue(key);
|
|
19
|
+
}
|
|
20
|
+
async getValues(keys) {
|
|
21
|
+
return this.driver.getValues(keys);
|
|
22
|
+
}
|
|
23
|
+
async listValues(params) {
|
|
24
|
+
return this.driver.listValues(params);
|
|
25
|
+
}
|
|
26
|
+
async removeValue(key) {
|
|
27
|
+
return this.driver.removeValue(key);
|
|
28
|
+
}
|
|
29
|
+
async removeValues(keys) {
|
|
30
|
+
return this.driver.removeValues(keys);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Store = Store;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=Store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Store","constructor","params","driver","storeValue","key","value","storeValues","values","getValue","getValues","keys","listValues","removeValue","removeValues","exports"],"sources":["Store.ts"],"sourcesContent":["import type {\n GetValueResult,\n GetValuesResult,\n IListValuesParams,\n IStore,\n ListValuesResult,\n RemoveValueResult,\n RemoveValuesResult,\n StorageKey,\n StoreValueResult,\n StoreValuesResult\n} from \"./types\";\nimport type { GenericRecord } from \"@webiny/api/types\";\nimport type { DbDriver } from \"~/index\";\n\nexport interface IStoreParams<T> {\n driver: DbDriver<T>;\n}\n\nexport class Store<T> implements IStore {\n private driver: DbDriver<T>;\n\n public constructor(params: IStoreParams<T>) {\n this.driver = params.driver;\n }\n\n public async storeValue<V>(key: StorageKey, value: V): Promise<StoreValueResult<V>> {\n return this.driver.storeValue<V>(key, value);\n }\n\n public async storeValues<V extends GenericRecord<StorageKey>>(\n values: V\n ): Promise<StoreValuesResult<V>> {\n return this.driver.storeValues<V>(values);\n }\n\n public async getValue<V>(key: StorageKey): Promise<GetValueResult<V>> {\n return this.driver.getValue<V>(key);\n }\n\n public async getValues<V extends GenericRecord<StorageKey>>(\n keys: (keyof V)[]\n ): Promise<GetValuesResult<V>> {\n return this.driver.getValues<V>(keys);\n }\n\n public async listValues<V extends GenericRecord<StorageKey>>(\n params?: IListValuesParams\n ): Promise<ListValuesResult<V>> {\n return this.driver.listValues<V>(params);\n }\n\n public async removeValue<V>(key: StorageKey): Promise<RemoveValueResult<V>> {\n return this.driver.removeValue<V>(key);\n }\n\n public async removeValues<V extends GenericRecord<StorageKey>>(\n keys: (keyof V)[]\n ): Promise<RemoveValuesResult<V>> {\n return this.driver.removeValues<V>(keys);\n }\n}\n"],"mappings":";;;;;;AAmBO,MAAMA,KAAK,CAAsB;EAG7BC,WAAWA,CAACC,MAAuB,EAAE;IACxC,IAAI,CAACC,MAAM,GAAGD,MAAM,CAACC,MAAM;EAC/B;EAEA,MAAaC,UAAUA,CAAIC,GAAe,EAAEC,KAAQ,EAAgC;IAChF,OAAO,IAAI,CAACH,MAAM,CAACC,UAAU,CAAIC,GAAG,EAAEC,KAAK,CAAC;EAChD;EAEA,MAAaC,WAAWA,CACpBC,MAAS,EACoB;IAC7B,OAAO,IAAI,CAACL,MAAM,CAACI,WAAW,CAAIC,MAAM,CAAC;EAC7C;EAEA,MAAaC,QAAQA,CAAIJ,GAAe,EAA8B;IAClE,OAAO,IAAI,CAACF,MAAM,CAACM,QAAQ,CAAIJ,GAAG,CAAC;EACvC;EAEA,MAAaK,SAASA,CAClBC,IAAiB,EACU;IAC3B,OAAO,IAAI,CAACR,MAAM,CAACO,SAAS,CAAIC,IAAI,CAAC;EACzC;EAEA,MAAaC,UAAUA,CACnBV,MAA0B,EACE;IAC5B,OAAO,IAAI,CAACC,MAAM,CAACS,UAAU,CAAIV,MAAM,CAAC;EAC5C;EAEA,MAAaW,WAAWA,CAAIR,GAAe,EAAiC;IACxE,OAAO,IAAI,CAACF,MAAM,CAACU,WAAW,CAAIR,GAAG,CAAC;EAC1C;EAEA,MAAaS,YAAYA,CACrBH,IAAiB,EACa;IAC9B,OAAO,IAAI,CAACR,MAAM,CAACW,YAAY,CAAIH,IAAI,CAAC;EAC5C;AACJ;AAACI,OAAA,CAAAf,KAAA,GAAAA,KAAA","ignoreList":[]}
|
package/store/types.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { CamelCase } from "type-fest";
|
|
2
|
+
import type { GenericRecord } from "@webiny/api/types";
|
|
3
|
+
export type StorageKey = `${CamelCase<string>}`;
|
|
4
|
+
export interface IStoreValueSuccessResult<V> {
|
|
5
|
+
key: StorageKey;
|
|
6
|
+
data: V | null | undefined;
|
|
7
|
+
error?: undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface IStoreValueErrorResult {
|
|
10
|
+
key: StorageKey;
|
|
11
|
+
data?: never;
|
|
12
|
+
error: Error;
|
|
13
|
+
}
|
|
14
|
+
export type StoreValueResult<V> = IStoreValueSuccessResult<V> | IStoreValueErrorResult;
|
|
15
|
+
export interface IStoreValuesSuccessResult<V extends GenericRecord<StorageKey>> {
|
|
16
|
+
keys: (keyof V)[];
|
|
17
|
+
data: V;
|
|
18
|
+
error?: undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface IStoreValuesErrorResult<V> {
|
|
21
|
+
keys: (keyof V)[];
|
|
22
|
+
data?: never;
|
|
23
|
+
error: Error;
|
|
24
|
+
}
|
|
25
|
+
export type StoreValuesResult<V extends GenericRecord<StorageKey>> = IStoreValuesSuccessResult<V> | IStoreValuesErrorResult<V>;
|
|
26
|
+
export interface IGetValueSuccessResult<V> {
|
|
27
|
+
key: StorageKey;
|
|
28
|
+
data: V | null | undefined;
|
|
29
|
+
error?: undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface IGetValueErrorResult {
|
|
32
|
+
key: StorageKey;
|
|
33
|
+
data?: never;
|
|
34
|
+
error: Error;
|
|
35
|
+
}
|
|
36
|
+
export type GetValueResult<V> = IGetValueSuccessResult<V> | IGetValueErrorResult;
|
|
37
|
+
export interface IGetValuesSuccessResult<V extends GenericRecord<StorageKey>> {
|
|
38
|
+
keys: (keyof V)[];
|
|
39
|
+
data: V;
|
|
40
|
+
error?: undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface IGetValuesErrorResult<V> {
|
|
43
|
+
keys: (keyof V)[];
|
|
44
|
+
data?: never;
|
|
45
|
+
error: Error;
|
|
46
|
+
}
|
|
47
|
+
export type GetValuesResult<V extends GenericRecord<StorageKey>> = IGetValuesSuccessResult<V> | IGetValuesErrorResult<V>;
|
|
48
|
+
export interface IListValuesSuccessResult<V extends GenericRecord<StorageKey>> {
|
|
49
|
+
keys: (keyof V)[];
|
|
50
|
+
data: V;
|
|
51
|
+
error?: undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface IListValuesErrorResult {
|
|
54
|
+
data?: never;
|
|
55
|
+
error: Error;
|
|
56
|
+
}
|
|
57
|
+
export type ListValuesResult<V extends GenericRecord<StorageKey>> = IListValuesSuccessResult<V> | IListValuesErrorResult;
|
|
58
|
+
export type IListValuesParams = {
|
|
59
|
+
beginsWith: string;
|
|
60
|
+
} | {
|
|
61
|
+
eq: string;
|
|
62
|
+
} | {
|
|
63
|
+
gt: string;
|
|
64
|
+
} | {
|
|
65
|
+
gte: string;
|
|
66
|
+
} | {
|
|
67
|
+
lt: string;
|
|
68
|
+
} | {
|
|
69
|
+
lte: string;
|
|
70
|
+
};
|
|
71
|
+
export type RemoveValueResult<V> = StoreValueResult<V>;
|
|
72
|
+
export interface RemoveValuesResult<V extends GenericRecord<StorageKey>> {
|
|
73
|
+
keys: (keyof V)[];
|
|
74
|
+
error?: Error;
|
|
75
|
+
}
|
|
76
|
+
export interface IStore {
|
|
77
|
+
storeValue<V>(key: StorageKey, value: V): Promise<StoreValueResult<V>>;
|
|
78
|
+
storeValues<V extends GenericRecord<StorageKey>>(values: V): Promise<StoreValuesResult<V>>;
|
|
79
|
+
getValue<V>(key: StorageKey): Promise<GetValueResult<V>>;
|
|
80
|
+
getValues<V extends GenericRecord<StorageKey>>(keys: (keyof V)[]): Promise<GetValuesResult<V>>;
|
|
81
|
+
listValues<V extends GenericRecord<StorageKey>>(params?: IListValuesParams): Promise<ListValuesResult<V>>;
|
|
82
|
+
removeValue<V>(key: StorageKey): Promise<RemoveValueResult<V>>;
|
|
83
|
+
removeValues<V extends GenericRecord<StorageKey>>(keys: (keyof V)[]): Promise<RemoveValuesResult<V>>;
|
|
84
|
+
}
|
package/store/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { CamelCase } from \"type-fest\";\nimport type { GenericRecord } from \"@webiny/api/types\";\n\nexport type StorageKey = `${CamelCase<string>}`;\n\nexport interface IStoreValueSuccessResult<V> {\n key: StorageKey;\n data: V | null | undefined;\n error?: undefined;\n}\n\nexport interface IStoreValueErrorResult {\n key: StorageKey;\n data?: never;\n error: Error;\n}\n\nexport type StoreValueResult<V> = IStoreValueSuccessResult<V> | IStoreValueErrorResult;\n\nexport interface IStoreValuesSuccessResult<V extends GenericRecord<StorageKey>> {\n keys: (keyof V)[];\n data: V;\n error?: undefined;\n}\n\nexport interface IStoreValuesErrorResult<V> {\n keys: (keyof V)[];\n data?: never;\n error: Error;\n}\n\nexport type StoreValuesResult<V extends GenericRecord<StorageKey>> =\n | IStoreValuesSuccessResult<V>\n | IStoreValuesErrorResult<V>;\n\nexport interface IGetValueSuccessResult<V> {\n key: StorageKey;\n data: V | null | undefined;\n error?: undefined;\n}\n\nexport interface IGetValueErrorResult {\n key: StorageKey;\n data?: never;\n error: Error;\n}\n\nexport type GetValueResult<V> = IGetValueSuccessResult<V> | IGetValueErrorResult;\n\nexport interface IGetValuesSuccessResult<V extends GenericRecord<StorageKey>> {\n keys: (keyof V)[];\n data: V;\n error?: undefined;\n}\n\nexport interface IGetValuesErrorResult<V> {\n keys: (keyof V)[];\n data?: never;\n error: Error;\n}\n\nexport type GetValuesResult<V extends GenericRecord<StorageKey>> =\n | IGetValuesSuccessResult<V>\n | IGetValuesErrorResult<V>;\n\nexport interface IListValuesSuccessResult<V extends GenericRecord<StorageKey>> {\n keys: (keyof V)[];\n data: V;\n error?: undefined;\n}\n\nexport interface IListValuesErrorResult {\n data?: never;\n error: Error;\n}\n\nexport type ListValuesResult<V extends GenericRecord<StorageKey>> =\n | IListValuesSuccessResult<V>\n | IListValuesErrorResult;\n\nexport type IListValuesParams =\n | {\n beginsWith: string;\n }\n | {\n eq: string;\n }\n | {\n gt: string;\n }\n | {\n gte: string;\n }\n | {\n lt: string;\n }\n | {\n lte: string;\n };\n\nexport type RemoveValueResult<V> = StoreValueResult<V>;\n\nexport interface RemoveValuesResult<V extends GenericRecord<StorageKey>> {\n keys: (keyof V)[];\n error?: Error;\n}\n\nexport interface IStore {\n storeValue<V>(key: StorageKey, value: V): Promise<StoreValueResult<V>>;\n storeValues<V extends GenericRecord<StorageKey>>(values: V): Promise<StoreValuesResult<V>>;\n getValue<V>(key: StorageKey): Promise<GetValueResult<V>>;\n getValues<V extends GenericRecord<StorageKey>>(keys: (keyof V)[]): Promise<GetValuesResult<V>>;\n listValues<V extends GenericRecord<StorageKey>>(\n params?: IListValuesParams\n ): Promise<ListValuesResult<V>>;\n removeValue<V>(key: StorageKey): Promise<RemoveValueResult<V>>;\n removeValues<V extends GenericRecord<StorageKey>>(\n keys: (keyof V)[]\n ): Promise<RemoveValuesResult<V>>;\n}\n"],"mappings":"","ignoreList":[]}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { NonEmptyArray } from "@webiny/api/types";
|
|
2
|
+
export interface IRegistryRegisterParams<T = unknown> {
|
|
3
|
+
item: T;
|
|
4
|
+
app: string;
|
|
5
|
+
tags: NonEmptyArray<string>;
|
|
6
|
+
}
|
|
7
|
+
export interface IRegistryItem<T = unknown> {
|
|
8
|
+
item: T;
|
|
9
|
+
app: string;
|
|
10
|
+
tags: NonEmptyArray<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface IRegistry {
|
|
13
|
+
register<T = unknown>(params: IRegistryRegisterParams<T>): void;
|
|
14
|
+
/**
|
|
15
|
+
* Throws an error if more than one item is found or there is no item found.
|
|
16
|
+
*/
|
|
17
|
+
getOneItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Throws an error if more than one item is found.
|
|
20
|
+
*/
|
|
21
|
+
getItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T> | null;
|
|
22
|
+
getItems<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>[];
|
|
23
|
+
}
|
|
24
|
+
export * from "./store/types";
|
package/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _types = require("./store/types");
|
|
7
|
+
Object.keys(_types).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _types[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import type { NonEmptyArray } from \"@webiny/api/types\";\n\nexport interface IRegistryRegisterParams<T = unknown> {\n item: T;\n app: string;\n tags: NonEmptyArray<string>;\n}\n\nexport interface IRegistryItem<T = unknown> {\n item: T;\n app: string;\n tags: NonEmptyArray<string>;\n}\n\nexport interface IRegistry {\n register<T = unknown>(params: IRegistryRegisterParams<T>): void;\n /**\n * Throws an error if more than one item is found or there is no item found.\n */\n getOneItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>;\n /**\n * Throws an error if more than one item is found.\n */\n getItem<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T> | null;\n getItems<T = unknown>(cb: (item: IRegistryItem<T>) => boolean): IRegistryItem<T>[];\n}\n\nexport * from \"./store/types\";\n"],"mappings":";;;;;AA2BA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|