sedentary 0.0.41 → 0.0.44

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.
@@ -0,0 +1,142 @@
1
+ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";
2
+ export { Attribute, DB, EntryBase, ForeignKeyActions, ForeignKeyOptions, Index, Table, Transaction, Type } from "./db";
3
+ export declare type TypeDefinition<T, E> = (() => Type<T, E>) | Type<T, E>;
4
+ export interface AttributeOptions<T, E> {
5
+ defaultValue?: T;
6
+ fieldName?: string;
7
+ notNull?: boolean;
8
+ type: TypeDefinition<T, E>;
9
+ unique?: boolean;
10
+ }
11
+ export declare type AttributeDefinition<T, E> = TypeDefinition<T, E> | AttributeOptions<T, E>;
12
+ export declare type AttributesDefinition = {
13
+ [key: string]: AttributeDefinition<unknown, unknown>;
14
+ };
15
+ declare type ForeignKeysAttributes<T, k> = T extends AttributeDefinition<unknown, infer E> ? (E extends EntryBase ? k : never) : never;
16
+ declare type ForeignKeys<A extends AttributesDefinition> = {
17
+ [a in keyof A]?: ForeignKeysAttributes<A[a], a>;
18
+ }[keyof A];
19
+ declare type Native___<T> = T extends Type<infer N, unknown> ? N : never;
20
+ declare type Native__<T> = T extends () => Type<infer N, infer E> ? Native___<Type<N, E>> : Native___<T>;
21
+ declare type Native_<T, N, E> = T extends {
22
+ notNull: true;
23
+ } ? Native___<Type<N, E>> : Native___<Type<N, E>> | null;
24
+ declare type Native<T> = T extends AttributeOptions<infer N, infer E> ? Native_<T, N, E> : Native__<T> | null;
25
+ export declare type IndexAttributes = string[] | string;
26
+ export interface IndexOptions {
27
+ attributes: IndexAttributes;
28
+ type?: "btree" | "hash";
29
+ unique?: boolean;
30
+ }
31
+ export declare type IndexDefinition = IndexAttributes | IndexOptions;
32
+ export declare type IndexesDefinition = {
33
+ [key: string]: IndexDefinition;
34
+ };
35
+ interface BaseModelOptions {
36
+ indexes?: IndexesDefinition;
37
+ sync?: boolean;
38
+ tableName?: string;
39
+ }
40
+ export interface ModelOptions extends BaseModelOptions {
41
+ int8id?: boolean;
42
+ parent?: Attribute<unknown, EntryBase>;
43
+ primaryKey?: string;
44
+ }
45
+ declare type ConditionAttribute<T> = T | ["=" | ">" | "<" | ">=" | "<=" | "<>", T] | ["IN", T[]] | ["IS NULL"] | ["LIKE", string] | ["NOT"];
46
+ declare type ConditionBase<A extends AttributesDefinition> = string | {
47
+ [a in keyof A]?: ConditionAttribute<Native<A[a]>>;
48
+ };
49
+ declare type Condition<A extends AttributesDefinition> = ConditionBase<A> | ["NOT", Condition<A>] | ["AND", ...Condition<A>[]] | ["OR", ...Condition<A>[]];
50
+ declare type Order_<A extends AttributesDefinition> = keyof A | `-${string & keyof A}`;
51
+ declare type Order<A extends AttributesDefinition> = Order_<A> | Order_<A>[];
52
+ declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
53
+ declare type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;
54
+ declare type BaseKeyType<B extends boolean> = IsUnion<B> extends true ? number : B extends true ? string : number;
55
+ declare type KeyType<B extends boolean, P extends ModelStd> = P extends new () => EntryBase ? (P extends Attribute<infer T, EntryBase> ? T : never) : BaseKeyType<B>;
56
+ declare type ForeignKey<A> = A extends AttributeDefinition<unknown, infer E> ? () => Promise<E> : never;
57
+ declare type EntryBaseAttributes<A extends AttributesDefinition> = {
58
+ [a in keyof A]: Native<A[a]>;
59
+ };
60
+ declare type EntryMethodsBase<P extends ModelStd> = P extends new () => EntryBase ? P["methods"] : EntryBase;
61
+ declare type EntryMethodsFK<A extends AttributesDefinition> = {
62
+ [a in ForeignKeys<A> & string as `${a}Load`]: ForeignKey<A[a]>;
63
+ };
64
+ declare type EntryMethods<A extends AttributesDefinition, P extends ModelStd> = keyof EntryMethodsFK<A> extends never ? EntryMethodsBase<P> : EntryMethodsBase<P> & EntryMethodsFK<A>;
65
+ declare type ModelAttributesIf<A extends AttributesDefinition, T> = keyof A extends never ? T : T & A;
66
+ declare type ModelAttributes<A extends AttributesDefinition, B extends boolean, K extends string, P extends ModelStd> = K extends keyof A ? A : ModelAttributesIf<A, P extends new () => EntryBase ? P["attributes"] : {
67
+ id: {
68
+ notNull: true;
69
+ type: Type<BaseKeyType<B>, unknown>;
70
+ };
71
+ }>;
72
+ export interface ModelLoad<A extends AttributesDefinition, E extends EntryBase> {
73
+ load(where: Condition<A>, order?: Order<A>, limit?: number, tx?: Transaction, lock?: boolean): Promise<E[]>;
74
+ load(where: Condition<A>, order?: Order<A>, tx?: Transaction, lock?: boolean): Promise<E[]>;
75
+ load(where: Condition<A>, limit?: number, tx?: Transaction, lock?: boolean): Promise<E[]>;
76
+ load(where: Condition<A>, tx: Transaction, lock?: boolean): Promise<E[]>;
77
+ }
78
+ declare type ModelBase<T, A extends AttributesDefinition, EA extends Record<string, unknown>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<T, E> & {
79
+ attributes: A;
80
+ foreignKeys: Record<string, boolean>;
81
+ methods: EM;
82
+ parent?: ModelStd;
83
+ tableName: string;
84
+ } & {
85
+ [a in keyof A]: Attribute<Native<A[a]>, E>;
86
+ } & ModelLoad<A, E>;
87
+ declare type Model<T, A extends AttributesDefinition, EM extends EntryBase> = ModelBase<T, A, EntryBaseAttributes<A>, EM, EntryBaseAttributes<A> & EM>;
88
+ declare type ModelStd = Attribute<unknown, EntryBase> & {
89
+ attributes: AttributesDefinition;
90
+ foreignKeys: Record<string, boolean>;
91
+ methods: EntryBase;
92
+ parent?: ModelStd;
93
+ };
94
+ export declare type Entry<M> = M extends new () => infer E ? E : never;
95
+ export declare type OrderBy<M> = M extends {
96
+ load(where: unknown, order?: infer T): void;
97
+ load(where: unknown, limit?: number): void;
98
+ load(where: unknown, tx?: Transaction): void;
99
+ } ? Exclude<T, undefined> : never;
100
+ export declare type Where<M> = M extends {
101
+ load(where: infer T): void;
102
+ } ? T : never;
103
+ export interface SedentaryOptions {
104
+ autoSync?: boolean;
105
+ log?: ((message: string) => void) | null;
106
+ sync?: boolean;
107
+ }
108
+ export declare class Sedentary<D extends DB<T>, T extends Transaction> {
109
+ protected autoSync: boolean;
110
+ protected db: D;
111
+ protected doSync: boolean;
112
+ protected log: (message: string) => void;
113
+ private models;
114
+ constructor(options?: SedentaryOptions);
115
+ Boolean(): Type<boolean, unknown>;
116
+ DateTime(): Type<Date, unknown>;
117
+ FKey<T, E extends EntryBase>(attribute: Attribute<T, E>, options?: ForeignKeyOptions): Type<T, E>;
118
+ Int(size?: number): Type<number, unknown>;
119
+ Int8(): Type<bigint, unknown>;
120
+ JSON<T>(): Type<T, unknown>;
121
+ Number(): Type<number, unknown>;
122
+ VarChar(size?: number): Type<string, unknown>;
123
+ private checkDB;
124
+ private checkOrderBy;
125
+ private checkSize;
126
+ private createWhere;
127
+ connect(sync?: boolean): Promise<void>;
128
+ sync(): Promise<void>;
129
+ end(): Promise<void>;
130
+ begin(): Promise<T>;
131
+ escape(value: unknown): string;
132
+ model<A extends AttributesDefinition, B extends boolean, K extends string, P extends ModelStd, EM extends EntryMethods<A, P>>(modelName: string, attributes: A, options?: BaseModelOptions & {
133
+ int8id?: B;
134
+ parent?: P;
135
+ primaryKey?: K | keyof A;
136
+ }): Model<K extends keyof A ? Native<A[K]> : KeyType<B, P>, ModelAttributes<A, B, K, P>, EM>;
137
+ model<A extends AttributesDefinition, B extends boolean, K extends string, P extends ModelStd, EA extends EntryBaseAttributes<ModelAttributes<A, B, K, P>>, EM extends EntryMethods<A, P>, M extends Record<string, <S extends M>(this: EA & EM & S, ...args: any[]) => void>>(modelName: string, attributes: A, options: BaseModelOptions & {
138
+ int8id?: B;
139
+ parent?: P;
140
+ primaryKey?: K | keyof A;
141
+ }, methods: M & Record<keyof M, (this: EA & EM & M, ...args: any[]) => void>): Model<K extends keyof A ? Native<A[K]> : KeyType<B, P>, ModelAttributes<A, B, K, P>, EM & M>;
142
+ }
package/dist/es/index.js CHANGED
@@ -33,30 +33,33 @@ export class Sedentary {
33
33
  this.log = log ? log : log === null ? () => { } : console.log;
34
34
  this.doSync = sync;
35
35
  }
36
- BOOLEAN() {
36
+ Boolean() {
37
37
  return new Type({ base: Boolean, type: "BOOLEAN" });
38
38
  }
39
- DATETIME() {
39
+ DateTime() {
40
40
  return new Type({ base: Date, type: "DATETIME" });
41
41
  }
42
- FKEY(attribute, options) {
42
+ FKey(attribute, options) {
43
43
  const { attributeName, base, fieldName, size, tableName, type } = attribute;
44
44
  return new Type({ base, foreignKey: { attributeName, fieldName, options, tableName }, size, type });
45
45
  }
46
- INT(size) {
46
+ Int(size) {
47
47
  const message = "Sedentary.INT: 'size' argument: Wrong value, expected 2 or 4";
48
48
  size = size ? this.checkSize(size, message) : 4;
49
49
  if (size !== 2 && size !== 4)
50
50
  throw new Error(message);
51
51
  return new Type({ base: Number, size, type: "INT" });
52
52
  }
53
- INT8() {
53
+ Int8() {
54
54
  return new Type({ base: BigInt, size: 8, type: "INT8" });
55
55
  }
56
- NUMBER() {
56
+ JSON() {
57
+ return new Type({ base: Object, type: "JSON" });
58
+ }
59
+ Number() {
57
60
  return new Type({ base: Number, type: "NUMBER" });
58
61
  }
59
- VARCHAR(size) {
62
+ VarChar(size) {
60
63
  const message = "Sedentary.VARCHAR: 'size' argument: Wrong value, expected positive integer";
61
64
  size = size ? this.checkSize(size, message) : undefined;
62
65
  return new Type({ base: String, size, type: "VARCHAR" });
@@ -189,7 +192,7 @@ export class Sedentary {
189
192
  await this.db.end();
190
193
  this.log("Connection closed");
191
194
  }
192
- async begin() {
195
+ begin() {
193
196
  return this.db.begin();
194
197
  }
195
198
  escape(value) {
@@ -221,12 +224,12 @@ export class Sedentary {
221
224
  throw new Error(`Sedentary.model: '${modelName}' model: 'parent' and 'primaryKey' options conflict each other`);
222
225
  let autoIncrement = true;
223
226
  const { indexes, int8id, parent, primaryKey, sync, tableName } = { sync: this.doSync, tableName: modelName, ...options };
224
- let aarray = int8id
225
- ? [new Attribute({ ...this.INT8(), attributeName: "id", fieldName: "id", modelName, notNull: true, tableName, unique: true })]
226
- : [new Attribute({ ...this.INT(4), attributeName: "id", fieldName: "id", modelName, notNull: true, tableName, unique: true })];
227
- let constraints = [{ attribute: aarray[0], constraintName: `${tableName}_id_unique`, type: "u" }];
228
- const iarray = [];
229
- let pk = aarray[0];
227
+ let aArray = int8id
228
+ ? [new Attribute({ ...this.Int8(), attributeName: "id", fieldName: "id", modelName, notNull: true, tableName, unique: true })]
229
+ : [new Attribute({ ...this.Int(4), attributeName: "id", fieldName: "id", modelName, notNull: true, tableName, unique: true })];
230
+ let constraints = [{ attribute: aArray[0], constraintName: `${tableName}_id_unique`, type: "u" }];
231
+ const iArray = [];
232
+ let pk = aArray[0];
230
233
  let attr2field = { id: "id" };
231
234
  if (!methods)
232
235
  methods = {};
@@ -243,16 +246,16 @@ export class Sedentary {
243
246
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
244
247
  attr2field = parent ? { ...parent.attr2field } : {};
245
248
  autoIncrement = false;
246
- aarray = [];
249
+ aArray = [];
247
250
  constraints = [];
248
251
  }
249
252
  for (const attributeName of Object.keys(attributes).sort()) {
250
253
  if (reservedNames.includes(attributeName))
251
254
  throw new Error(`Sedentary.model: '${modelName}' model: '${attributeName}' attribute: Reserved name`);
252
255
  const call = (defaultValue, fieldName, notNull, unique, func, message1, message2) => {
253
- if (func === this.FKEY)
254
- throw new Error(`${message1} 'this.FKEY' can't be used directly`);
255
- if (![this.BOOLEAN, this.DATETIME, this.NUMBER, this.INT, this.INT8, this.VARCHAR].includes(func))
256
+ if (func === this.FKey)
257
+ throw new Error(`${message1} 'this.FKey' can't be used directly`);
258
+ if (![this.Boolean, this.DateTime, this.Int, this.JSON, this.Int8, this.Number, this.VarChar].includes(func))
256
259
  throw new Error(`${message1} ${message2}`);
257
260
  return new Attribute({ attributeName, defaultValue, fieldName, modelName, notNull, tableName, unique, ...func() });
258
261
  };
@@ -299,17 +302,17 @@ export class Sedentary {
299
302
  if (foreignKey) {
300
303
  const options = foreignKey.options || {};
301
304
  if (foreignKey.options !== undefined && !(foreignKey.options instanceof Object))
302
- throw new Error(`Sedentary.FKEY: '${modelName}' model: '${attributeName}' attribute: Wrong options type, expected 'Object'`);
305
+ throw new Error(`Sedentary.FKey: '${modelName}' model: '${attributeName}' attribute: Wrong options type, expected 'Object'`);
303
306
  for (const k in options)
304
307
  if (!["onDelete", "onUpdate"].includes(k))
305
- throw new Error(`Sedentary.FKEY: '${modelName}' model: '${attributeName}' attribute: Unknown option '${k}'`);
308
+ throw new Error(`Sedentary.FKey: '${modelName}' model: '${attributeName}' attribute: Unknown option '${k}'`);
306
309
  for (const onChange of ["onDelete", "onUpdate"]) {
307
310
  const actions = ["cascade", "no action", "restrict", "set default", "set null"];
308
311
  let action = options[onChange];
309
312
  if (!action)
310
313
  action = options[onChange] = "no action";
311
314
  if (action && !actions.includes(action))
312
- throw new Error(`Sedentary.FKEY: '${modelName}' model: '${attributeName}' attribute: '${onChange}' option: Wrong value, expected ${actions.map(_ => `'${_}'`).join(" | ")}`);
315
+ throw new Error(`Sedentary.FKey: '${modelName}' model: '${attributeName}' attribute: '${onChange}' option: Wrong value, expected ${actions.map(_ => `'${_}'`).join(" | ")}`);
313
316
  }
314
317
  foreignKey.options = options;
315
318
  }
@@ -322,7 +325,7 @@ export class Sedentary {
322
325
  const attribute = new Attribute({ attributeName, base, defaultValue, fieldName, foreignKey, modelName, notNull, size, tableName, type, unique });
323
326
  if (primaryKey === attributeName)
324
327
  pk = attribute;
325
- aarray.push(attribute);
328
+ aArray.push(attribute);
326
329
  attr2field[attributeName] = fieldName;
327
330
  if (foreignKey)
328
331
  constraints.push({ attribute, constraintName: `fkey_${fieldName}_${foreignKey.tableName}_${foreignKey.fieldName}`, type: "f" });
@@ -330,17 +333,17 @@ export class Sedentary {
330
333
  constraints.push({ attribute, constraintName: `${tableName}_${fieldName}_unique`, type: "u" });
331
334
  }
332
335
  if (indexes) {
333
- const flds = attributes;
336
+ const originalAttributes = attributes;
334
337
  if (!(indexes instanceof Object))
335
338
  throw new Error(`Sedentary.model: '${modelName}' model: 'indexes' option: Wrong type, expected 'Object'`);
336
339
  for (const indexName in indexes) {
337
- if (aarray.filter(({ fieldName, unique }) => unique && `${tableName}_${fieldName}_unique` === indexName).length !== 0)
340
+ if (aArray.some(({ fieldName, unique }) => unique && `${tableName}_${fieldName}_unique` === indexName))
338
341
  throw new Error(`Sedentary.model: '${modelName}' model: '${indexName}' index: index name already inferred by the unique constraint on an attribute`);
339
342
  const idx = indexes[indexName];
340
343
  const checkAttribute = (attribute, l) => {
341
344
  if (typeof attribute !== "string")
342
345
  throw new Error(`Sedentary.model: '${modelName}' model: '${indexName}' index: #${l + 1} attribute: Wrong type, expected 'string'`);
343
- if (!(attribute in flds))
346
+ if (!(attribute in originalAttributes))
344
347
  throw new Error(`Sedentary.model: '${modelName}' model: '${indexName}' index: #${l + 1} attribute: Unknown attribute '${attribute}'`);
345
348
  };
346
349
  let attributes;
@@ -378,11 +381,11 @@ export class Sedentary {
378
381
  }
379
382
  else
380
383
  throw new Error(`Sedentary.model: '${modelName}' model: '${indexName}' index: Wrong type, expected 'Object'`);
381
- iarray.push({ fields: attributes, indexName, type, unique });
384
+ iArray.push({ fields: attributes, indexName, type, unique });
382
385
  }
383
386
  }
384
387
  this.models[modelName] = true;
385
- const foreignKeys = aarray
388
+ const foreignKeys = aArray
386
389
  .filter(_ => _.foreignKey)
387
390
  .reduce((ret, curr) => {
388
391
  ret[curr.attributeName] = true;
@@ -432,7 +435,7 @@ export class Sedentary {
432
435
  tx.addEntry(this);
433
436
  }
434
437
  };
435
- const table = new Table({ autoIncrement, constraints, attributes: aarray, indexes: iarray, model: ret, parent, pk, sync, tableName });
438
+ const table = new Table({ attributes: aArray, autoIncrement, constraints, indexes: iArray, model: ret, parent, pk, sync, tableName });
436
439
  this.db.tables.push(table);
437
440
  const load_ = this.db.load(tableName, attr2field, pk, ret, table);
438
441
  const load = async (where, ...args) => {
@@ -500,7 +503,7 @@ export class Sedentary {
500
503
  return ret;
501
504
  };
502
505
  Object.defineProperty(ret.prototype.save, "name", { value: modelName + ".save" });
503
- for (const attribute of aarray)
506
+ for (const attribute of aArray)
504
507
  Object.defineProperty(ret, attribute.attributeName, { value: attribute });
505
508
  for (const key of ["attributeName", "base", "fieldName", "modelName", "size", "tableName", "type", "unique"])
506
509
  Object.defineProperty(ret, key, { value: pk[key] });
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.full.d.ts","../../db.ts","../../index.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../../node_modules/@types/babel__generator/index.d.ts","../../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../../node_modules/@types/babel__template/index.d.ts","../../../../node_modules/@types/babel__traverse/index.d.ts","../../../../node_modules/@types/babel__core/index.d.ts","../../../../node_modules/@types/eslint/helpers.d.ts","../../../../node_modules/@types/eslint/lib/rules/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/eslint/index.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/graceful-fs/index.d.ts","../../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../../node_modules/@types/istanbul-reports/index.d.ts","../../../../node_modules/chalk/index.d.ts","../../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../../node_modules/@jest/schemas/build/index.d.ts","../../../../node_modules/pretty-format/build/index.d.ts","../../../../node_modules/jest-diff/build/index.d.ts","../../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/minimist/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/pg-types/index.d.ts","../../../../node_modules/pg-protocol/dist/messages.d.ts","../../../../node_modules/pg-protocol/dist/serializer.d.ts","../../../../node_modules/pg-protocol/dist/parser.d.ts","../../../../node_modules/pg-protocol/dist/index.d.ts","../../../../node_modules/@types/pg/index.d.ts","../../../../node_modules/@types/pg-format/index.d.ts","../../../../node_modules/@types/prettier/index.d.ts","../../../../node_modules/@types/stack-utils/index.d.ts","../../../../node_modules/@types/yargs-parser/index.d.ts","../../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141",{"version":"646aeb4fd36cec9c56dbe354720c8b555b6698ab688fd56784a52bea50631204","signature":"f9c304ad2d70238bd5859e6d74588f1411b7b615c9bcf4de29c0cfa0cd885a80"},{"version":"0072ed52c9d0b60303ddbc7cf8ff0a6cbb50e06e892adda62fe11ba9f983e6e3","signature":"c9c29a8ffd4cb138c52b0a9961aa8b8206c48e063374054677f4745a94a39f04"},"9b6d2a9f610aac2dc6c3fcc45a90dbbde0411dd677bdc956d76f484f397640f1","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","a46a2e69d12afe63876ec1e58d70e5dbee6d3e74132f4468f570c3d69f809f1c","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","c7597e9b1b1eac80e5bca7d136321ab80804ff37f026bc84a8a8553904db9847","5426e62886b7be7806312d31a00e8f7dccd6fe63ba9bbefe99ee2eab29cc48a3",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0133ebdd17a823ae56861948870cde4dac18dd8818ab641039c85bbb720429e0","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","946bd1737d9412395a8f24414c70f18660b84a75a12b0b448e6eb1a2161d06dd","874d84ca5699231d5af2868fef01fc63f948bd83be928881479db48508f92ca0","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"002d6d5f044365b3fbfba0ba9be3bb57cac09b81547c8df4b0795755d2081d90","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","34ec1daf3566f26c43dbab380af0de1aac29166e57e4f9ef379a2f154e0cb290","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"bae4ea23beb8397755b935cb84d3cdc6cdb0b1b4a329b90de9fc6c8774d71994","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","c57870f6664fd657ec2cf096bbb043b9556b0228ec0c12dd54193361ca563ea1","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","acfbb5aaef964e1d441f961a1846197f03241dba3c63b1e4d1903684888ef465","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"9499ba4dcd1ee0596d8c98d01341bc874840c5291156513bda667fecad54d5be","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","cb92bc2e42b261e4299025756f1beb826b3d9666a3f0d46f8a7254ca512f57e4","e795a96de48dd2fbf83b1e29ecfae8e1dd428b99aa3508962c98679862e129a0",{"version":"59104b2e80c588b813d03d3a45f57117ca4601ae3fc216c5ffbcbafc4effc1c5","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","556bf5c36deb62cffa1bf697c1789fe008ec82db0273025001db66732714e9d9","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","653968fc1b35c5eb3d273d36fac1c1dc66f9537edf28f33485b8776bd956e23d",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2d526e6f21d8cc66ac11ada32874e95ae88d870c6c9d3d9d4e03b1d1f9ad7b8e","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","d2ec52f565f0570e90b659811347bd689f8c6039b11eaaccd0f243759d46da6e","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9c3df5971dc261aa29f25fdfcf7e8cfa248ff95a3d09ae4a6b81b1b09473f80f","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d982cdd2610155b3cbcbfa62ccabcf2d2b739f821518ef113348d160ef0010d9","ffcc5500e77223169833fc6eb59b3a507944a1f89574e0a1276b0ea7fc22c4a4","22f13de9e2fe5f0f4724797abd3d34a1cdd6e47ef81fc4933fea3b8bf4ad524b","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","cda0cb09b995489b7f4c57f168cd31b83dcbaa7aad49612734fb3c9c73f6e4f2",{"version":"1de1ad6a1929317171d8cfcd55bb2732257680c1bf89bcd53e1d46a4d8dbda22","affectsGlobalScope":true},"209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","87ed0f84f0691d5c724b23159db96342e6b04ac69201b02c65936f4281ce1fbe","13868c5792808236b17dfe2803eafce911ea4d09d3b2fda95391891a494f988f","0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","fa5c2d3fcd8e227e180815df0a0903ed4b116400452af8a75ac5b68e5e1de9da","e0fa568e94e16b6ee842d293e387f1b9620686a7f975371322429ce3d2ce0313","93c4fc5b5237c09bc9ed65cb8f0dc1d89034406ab40500b89701341994897142","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","5e19d765e36e4b673d8eeeec8d8fb65dafb17ba6202cc21e9172bac2bce0fd04"],"options":{"composite":true,"esModuleInterop":true,"module":99,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"./","strict":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":99},"fileIdsList":[[60,115],[115],[115,128],[60,61,62,63,64,115],[60,62,115],[66,67,68,69,115],[70,115],[87,115,122],[115,124],[115,125],[115,130,132],[71,115],[74,115],[75,80,115],[76,86,87,94,103,114,115],[76,77,86,94,115],[78,115],[79,80,87,95,115],[80,103,111,115],[81,83,86,94,115],[82,115],[83,84,115],[85,86,115],[86,115],[86,87,88,103,114,115],[86,87,88,103,106,115],[115,119],[89,94,103,114,115],[86,87,89,90,94,103,111,114,115],[89,91,103,111,114,115],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],[86,92,115],[93,114,115],[83,86,94,103,115],[95,115],[96,115],[74,97,115],[98,113,115,119],[99,115],[100,115],[86,101,115],[101,102,115,117],[86,103,104,105,106,115],[103,105,115],[103,104,115],[106,115],[107,115],[86,109,110,115],[109,110,115],[80,94,103,111,115],[112,115],[94,113,115],[75,89,100,114,115],[80,115],[103,115,116],[115,117],[115,118],[75,80,86,88,97,103,114,115,117,119],[103,115,120],[86,103,111,115,122,136,137,140,141],[115,145],[115,130],[115,127,131],[115,122,137,138,139],[115,122],[103,115,122,137],[115,129],[58,115],[58]],"referencedMap":[[62,1],[60,2],[129,3],[128,2],[65,4],[61,1],[63,5],[64,1],[66,2],[70,6],[67,7],[69,2],[123,8],[124,2],[125,9],[126,10],[133,11],[68,2],[134,2],[71,12],[72,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,18],[80,19],[81,20],[82,21],[83,22],[84,22],[85,23],[86,24],[87,25],[88,26],[73,27],[121,2],[89,28],[90,29],[91,30],[122,31],[92,32],[93,33],[94,34],[95,35],[96,36],[97,37],[98,38],[99,39],[100,40],[101,41],[102,42],[103,43],[105,44],[104,45],[106,46],[107,47],[108,2],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[115,54],[116,55],[117,56],[118,57],[119,58],[120,59],[135,2],[142,2],[141,60],[143,2],[144,2],[145,2],[146,61],[127,2],[131,62],[132,63],[140,64],[137,65],[139,66],[138,65],[136,2],[130,67],[11,2],[12,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[4,2],[28,2],[25,2],[26,2],[27,2],[29,2],[30,2],[31,2],[5,2],[32,2],[33,2],[34,2],[35,2],[6,2],[36,2],[37,2],[38,2],[39,2],[7,2],[40,2],[45,2],[46,2],[41,2],[42,2],[43,2],[44,2],[8,2],[50,2],[47,2],[48,2],[49,2],[51,2],[9,2],[52,2],[53,2],[54,2],[55,2],[1,2],[10,2],[57,2],[56,2],[14,2],[13,2],[58,2],[59,68]],"exportedModulesMap":[[62,1],[60,2],[129,3],[128,2],[65,4],[61,1],[63,5],[64,1],[66,2],[70,6],[67,7],[69,2],[123,8],[124,2],[125,9],[126,10],[133,11],[68,2],[134,2],[71,12],[72,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,18],[80,19],[81,20],[82,21],[83,22],[84,22],[85,23],[86,24],[87,25],[88,26],[73,27],[121,2],[89,28],[90,29],[91,30],[122,31],[92,32],[93,33],[94,34],[95,35],[96,36],[97,37],[98,38],[99,39],[100,40],[101,41],[102,42],[103,43],[105,44],[104,45],[106,46],[107,47],[108,2],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[115,54],[116,55],[117,56],[118,57],[119,58],[120,59],[135,2],[142,2],[141,60],[143,2],[144,2],[145,2],[146,61],[127,2],[131,62],[132,63],[140,64],[137,65],[139,66],[138,65],[136,2],[130,67],[11,2],[12,2],[16,2],[15,2],[2,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[24,2],[3,2],[4,2],[28,2],[25,2],[26,2],[27,2],[29,2],[30,2],[31,2],[5,2],[32,2],[33,2],[34,2],[35,2],[6,2],[36,2],[37,2],[38,2],[39,2],[7,2],[40,2],[45,2],[46,2],[41,2],[42,2],[43,2],[44,2],[8,2],[50,2],[47,2],[48,2],[49,2],[51,2],[9,2],[52,2],[53,2],[54,2],[55,2],[1,2],[10,2],[57,2],[56,2],[14,2],[13,2],[59,69]],"semanticDiagnosticsPerFile":[62,60,129,128,65,61,63,64,66,70,67,69,123,124,125,126,133,68,134,71,72,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,73,121,89,90,91,122,92,93,94,95,96,97,98,99,100,101,102,103,105,104,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,135,142,141,143,144,145,146,127,131,132,140,137,139,138,136,130,11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,36,37,38,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,55,1,10,57,56,14,13,58,59]},"version":"4.7.4"}
@@ -1,4 +1,3 @@
1
- export declare type Natural = Date | Record<string, unknown> | bigint | boolean | number | string | null;
2
1
  export declare class EntryBase {
3
2
  constructor(from?: Partial<EntryBase>);
4
3
  construct(): void;
@@ -16,10 +15,10 @@ export interface ForeignKeyOptions {
16
15
  onDelete?: ForeignKeyActions;
17
16
  onUpdate?: ForeignKeyActions;
18
17
  }
19
- export interface Type<N extends Natural, E> {
18
+ export interface Type<T, E> {
20
19
  base: unknown;
21
20
  entry?: E;
22
- native?: N;
21
+ native?: T;
23
22
  size?: number;
24
23
  type: string;
25
24
  foreignKey?: {
@@ -29,23 +28,23 @@ export interface Type<N extends Natural, E> {
29
28
  tableName: string;
30
29
  };
31
30
  }
32
- export declare class Type<N extends Natural, E> {
33
- constructor(from: Type<N, E>);
31
+ export declare class Type<T, E> {
32
+ constructor(from: Type<T, E>);
34
33
  }
35
- export interface Attribute<N extends Natural, E> extends Type<N, E> {
34
+ export interface Attribute<T, E> extends Type<T, E> {
36
35
  attributeName: string;
37
- defaultValue?: Natural;
36
+ defaultValue?: unknown;
38
37
  fieldName: string;
39
38
  modelName: string;
40
39
  notNull: boolean;
41
40
  tableName: string;
42
41
  unique?: boolean;
43
42
  }
44
- export declare class Attribute<N extends Natural, E> extends Type<N, E> {
45
- constructor(from: Attribute<N, E>);
43
+ export declare class Attribute<T, E> extends Type<T, E> {
44
+ constructor(from: Attribute<T, E>);
46
45
  }
47
46
  export interface Constraint {
48
- attribute: Attribute<Natural, unknown>;
47
+ attribute: Attribute<unknown, unknown>;
49
48
  constraintName: string;
50
49
  type: "f" | "u";
51
50
  }
@@ -56,15 +55,15 @@ export interface Index {
56
55
  unique: boolean;
57
56
  }
58
57
  interface ITable {
59
- attributes: Attribute<Natural, unknown>[];
58
+ attributes: Attribute<unknown, unknown>[];
60
59
  autoIncrement: boolean;
61
60
  constraints: Constraint[];
62
61
  indexes: Index[];
63
62
  model: {
64
63
  load: (where: any, order?: string[], tx?: Transaction) => Promise<EntryBase[]>;
65
64
  };
66
- parent?: Attribute<Natural, unknown>;
67
- pk: Attribute<Natural, unknown>;
65
+ parent?: Attribute<unknown, unknown>;
66
+ pk: Attribute<unknown, unknown>;
68
67
  sync: boolean;
69
68
  tableName: string;
70
69
  }
@@ -72,7 +71,7 @@ declare const Table_base: new (defaults?: ITable | undefined) => ITable;
72
71
  export declare class Table extends Table_base {
73
72
  autoIncrementOwn?: boolean;
74
73
  oid?: number;
75
- findField(name: string): Attribute<Natural, unknown>;
74
+ findField(name: string): Attribute<unknown, unknown>;
76
75
  }
77
76
  export declare abstract class DB<T extends Transaction> {
78
77
  tables: Table[];
@@ -86,10 +85,10 @@ export declare abstract class DB<T extends Transaction> {
86
85
  syncDataBase(): Promise<void>;
87
86
  protected syncLog(message: string): void;
88
87
  abstract begin(): Promise<T>;
89
- abstract escape(value: Natural): string;
90
- abstract load(tableName: string, attributes: Record<string, string>, pk: Attribute<Natural, unknown>, model: new () => EntryBase, table: Table): (where: string, order?: string | string[], limit?: number, tx?: Transaction, lock?: boolean) => Promise<EntryBase[]>;
91
- abstract remove(tableName: string, pk: Attribute<Natural, unknown>): (this: EntryBase & Record<string, Natural>) => Promise<boolean>;
92
- abstract save(tableName: string, attributes: Record<string, string>, pk: Attribute<Natural, unknown>): (this: EntryBase & Record<string, Natural>) => Promise<boolean>;
88
+ abstract escape(value: unknown): string;
89
+ abstract load(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>, model: new () => EntryBase, table: Table): (where: string, order?: string | string[], limit?: number, tx?: Transaction, lock?: boolean) => Promise<EntryBase[]>;
90
+ abstract remove(tableName: string, pk: Attribute<unknown, unknown>): (this: EntryBase & Record<string, unknown>) => Promise<boolean>;
91
+ abstract save(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>): (this: EntryBase & Record<string, unknown>) => Promise<boolean>;
93
92
  abstract dropConstraints(table: Table): Promise<number[]>;
94
93
  abstract dropFields(table: Table): Promise<void>;
95
94
  abstract dropIndexes(table: Table, constraintIndexes: number[]): Promise<void>;
@@ -1,24 +1,24 @@
1
- import { Attribute, DB, EntryBase, ForeignKeyOptions, Natural, Transaction, Type } from "./db";
2
- export { Attribute, DB, EntryBase, ForeignKeyActions, ForeignKeyOptions, Index, Natural, Table, Transaction, Type } from "./db";
3
- export declare type TypeDefinition<N extends Natural, E> = (() => Type<N, E>) | Type<N, E>;
4
- export interface AttributeOptions<N extends Natural, E> {
5
- defaultValue?: N;
1
+ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";
2
+ export { Attribute, DB, EntryBase, ForeignKeyActions, ForeignKeyOptions, Index, Table, Transaction, Type } from "./db";
3
+ export declare type TypeDefinition<T, E> = (() => Type<T, E>) | Type<T, E>;
4
+ export interface AttributeOptions<T, E> {
5
+ defaultValue?: T;
6
6
  fieldName?: string;
7
7
  notNull?: boolean;
8
- type: TypeDefinition<N, E>;
8
+ type: TypeDefinition<T, E>;
9
9
  unique?: boolean;
10
10
  }
11
- export declare type AttributeDefinition<N extends Natural, E> = TypeDefinition<N, E> | AttributeOptions<N, E>;
11
+ export declare type AttributeDefinition<T, E> = TypeDefinition<T, E> | AttributeOptions<T, E>;
12
12
  export declare type AttributesDefinition = {
13
- [key: string]: AttributeDefinition<Natural, unknown>;
13
+ [key: string]: AttributeDefinition<unknown, unknown>;
14
14
  };
15
- declare type ForeignKeysAttributes<T, k> = T extends AttributeDefinition<Natural, infer E> ? (E extends EntryBase ? k : never) : never;
15
+ declare type ForeignKeysAttributes<T, k> = T extends AttributeDefinition<unknown, infer E> ? (E extends EntryBase ? k : never) : never;
16
16
  declare type ForeignKeys<A extends AttributesDefinition> = {
17
17
  [a in keyof A]?: ForeignKeysAttributes<A[a], a>;
18
18
  }[keyof A];
19
19
  declare type Native___<T> = T extends Type<infer N, unknown> ? N : never;
20
20
  declare type Native__<T> = T extends () => Type<infer N, infer E> ? Native___<Type<N, E>> : Native___<T>;
21
- declare type Native_<T, N extends Natural, E> = T extends {
21
+ declare type Native_<T, N, E> = T extends {
22
22
  notNull: true;
23
23
  } ? Native___<Type<N, E>> : Native___<Type<N, E>> | null;
24
24
  declare type Native<T> = T extends AttributeOptions<infer N, infer E> ? Native_<T, N, E> : Native__<T> | null;
@@ -39,10 +39,10 @@ interface BaseModelOptions {
39
39
  }
40
40
  export interface ModelOptions extends BaseModelOptions {
41
41
  int8id?: boolean;
42
- parent?: Attribute<Natural, EntryBase>;
42
+ parent?: Attribute<unknown, EntryBase>;
43
43
  primaryKey?: string;
44
44
  }
45
- declare type ConditionAttribute<N extends Natural> = N | ["=" | ">" | "<" | ">=" | "<=" | "<>", N] | ["IN", N[]] | ["IS NULL"] | ["LIKE", string] | ["NOT"];
45
+ declare type ConditionAttribute<T> = T | ["=" | ">" | "<" | ">=" | "<=" | "<>", T] | ["IN", T[]] | ["IS NULL"] | ["LIKE", string] | ["NOT"];
46
46
  declare type ConditionBase<A extends AttributesDefinition> = string | {
47
47
  [a in keyof A]?: ConditionAttribute<Native<A[a]>>;
48
48
  };
@@ -53,7 +53,7 @@ declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : neve
53
53
  declare type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;
54
54
  declare type BaseKeyType<B extends boolean> = IsUnion<B> extends true ? number : B extends true ? string : number;
55
55
  declare type KeyType<B extends boolean, P extends ModelStd> = P extends new () => EntryBase ? (P extends Attribute<infer T, EntryBase> ? T : never) : BaseKeyType<B>;
56
- declare type ForeignKey<A> = A extends AttributeDefinition<Natural, infer E> ? () => Promise<E> : never;
56
+ declare type ForeignKey<A> = A extends AttributeDefinition<unknown, infer E> ? () => Promise<E> : never;
57
57
  declare type EntryBaseAttributes<A extends AttributesDefinition> = {
58
58
  [a in keyof A]: Native<A[a]>;
59
59
  };
@@ -75,7 +75,7 @@ export interface ModelLoad<A extends AttributesDefinition, E extends EntryBase>
75
75
  load(where: Condition<A>, limit?: number, tx?: Transaction, lock?: boolean): Promise<E[]>;
76
76
  load(where: Condition<A>, tx: Transaction, lock?: boolean): Promise<E[]>;
77
77
  }
78
- declare type ModelBase<N extends Natural, A extends AttributesDefinition, EA extends Record<string, Natural>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<N, E> & {
78
+ declare type ModelBase<T, A extends AttributesDefinition, EA extends Record<string, unknown>, EM extends EntryBase, E extends EntryBase> = (new (from?: Partial<EA>, tx?: Transaction) => E) & Attribute<T, E> & {
79
79
  attributes: A;
80
80
  foreignKeys: Record<string, boolean>;
81
81
  methods: EM;
@@ -84,8 +84,8 @@ declare type ModelBase<N extends Natural, A extends AttributesDefinition, EA ext
84
84
  } & {
85
85
  [a in keyof A]: Attribute<Native<A[a]>, E>;
86
86
  } & ModelLoad<A, E>;
87
- declare type Model<N extends Natural, A extends AttributesDefinition, EM extends EntryBase> = ModelBase<N, A, EntryBaseAttributes<A>, EM, EntryBaseAttributes<A> & EM>;
88
- declare type ModelStd = Attribute<Natural, EntryBase> & {
87
+ declare type Model<T, A extends AttributesDefinition, EM extends EntryBase> = ModelBase<T, A, EntryBaseAttributes<A>, EM, EntryBaseAttributes<A> & EM>;
88
+ declare type ModelStd = Attribute<unknown, EntryBase> & {
89
89
  attributes: AttributesDefinition;
90
90
  foreignKeys: Record<string, boolean>;
91
91
  methods: EntryBase;
@@ -112,13 +112,14 @@ export declare class Sedentary<D extends DB<T>, T extends Transaction> {
112
112
  protected log: (message: string) => void;
113
113
  private models;
114
114
  constructor(options?: SedentaryOptions);
115
- BOOLEAN(): Type<boolean, unknown>;
116
- DATETIME(): Type<Date, unknown>;
117
- FKEY<N extends Natural, E extends EntryBase>(attribute: Attribute<N, E>, options?: ForeignKeyOptions): Type<N, E>;
118
- INT(size?: number): Type<number, unknown>;
119
- INT8(): Type<bigint, unknown>;
120
- NUMBER(): Type<number, unknown>;
121
- VARCHAR(size?: number): Type<string, unknown>;
115
+ Boolean(): Type<boolean, unknown>;
116
+ DateTime(): Type<Date, unknown>;
117
+ FKey<T, E extends EntryBase>(attribute: Attribute<T, E>, options?: ForeignKeyOptions): Type<T, E>;
118
+ Int(size?: number): Type<number, unknown>;
119
+ Int8(): Type<bigint, unknown>;
120
+ JSON<T>(): Type<T, unknown>;
121
+ Number(): Type<number, unknown>;
122
+ VarChar(size?: number): Type<string, unknown>;
122
123
  private checkDB;
123
124
  private checkOrderBy;
124
125
  private checkSize;
@@ -127,7 +128,7 @@ export declare class Sedentary<D extends DB<T>, T extends Transaction> {
127
128
  sync(): Promise<void>;
128
129
  end(): Promise<void>;
129
130
  begin(): Promise<T>;
130
- escape(value: Natural): string;
131
+ escape(value: unknown): string;
131
132
  model<A extends AttributesDefinition, B extends boolean, K extends string, P extends ModelStd, EM extends EntryMethods<A, P>>(modelName: string, attributes: A, options?: BaseModelOptions & {
132
133
  int8id?: B;
133
134
  parent?: P;