sedentary 0.0.44 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/db.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Transaction = exports.DB = exports.Table = exports.Attribute = exports.Type = exports.EntryBase = void 0;
3
+ exports.differ = exports.Transaction = exports.DB = exports.Table = exports.Attribute = exports.Type = exports.EntryBase = exports.loaded = exports.actions = void 0;
4
+ exports.actions = Symbol("actions");
5
+ exports.loaded = Symbol("loaded");
4
6
  class EntryBase {
5
7
  constructor(from) {
6
8
  if (from === "load")
@@ -12,9 +14,15 @@ class EntryBase {
12
14
  }
13
15
  }
14
16
  construct() { }
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
+ postCommit(actions) { }
15
19
  postLoad() { }
16
- postRemove() { }
17
- postSave() { }
20
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
+ postRemove(deletedRecords) { }
22
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
+ postSave(savedRecords) { }
24
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
25
+ preCommit(actions) { }
18
26
  preLoad() { }
19
27
  preRemove() { }
20
28
  preSave() { }
@@ -101,15 +109,55 @@ class Transaction {
101
109
  }
102
110
  clean() {
103
111
  const { entries } = this;
104
- for (const entry of entries)
105
- Object.defineProperty(entry, "tx", { configurable: true, value: null });
112
+ for (const entry of entries) {
113
+ Object.defineProperty(entry, exports.actions, { configurable: true, value: undefined });
114
+ Object.defineProperty(entry, "tx", { configurable: true, value: undefined });
115
+ }
106
116
  this.entries = [];
107
117
  }
108
118
  async commit() {
119
+ const { entries } = this;
120
+ for (const entry of entries)
121
+ if (entry[exports.actions])
122
+ entry.postCommit(entry[exports.actions]);
109
123
  this.clean();
110
124
  }
125
+ preCommit() {
126
+ const { entries } = this;
127
+ for (const entry of entries)
128
+ if (entry[exports.actions])
129
+ entry.preCommit(entry[exports.actions]);
130
+ }
111
131
  async rollback() {
112
132
  this.clean();
113
133
  }
114
134
  }
115
135
  exports.Transaction = Transaction;
136
+ const sortedEntries = (obj) => Object.entries(obj).sort((entryA, entryB) => (entryA[0] > entryB[0] ? -1 : 1));
137
+ function differ(a, b) {
138
+ if (typeof a !== "object")
139
+ return a !== b;
140
+ if (typeof b !== "object")
141
+ return true;
142
+ if (a === null)
143
+ return b !== null;
144
+ if (b === null)
145
+ return true;
146
+ if (a instanceof Array) {
147
+ if (!(b instanceof Array))
148
+ return true;
149
+ for (const [i, value] of a.entries())
150
+ if (differ(value, b[i]))
151
+ return true;
152
+ return false;
153
+ }
154
+ const entriesA = sortedEntries(a);
155
+ const entriesB = sortedEntries(b);
156
+ if (entriesA.length !== entriesB.length)
157
+ return true;
158
+ for (const [i, [key, value]] of entriesA.entries())
159
+ if (key !== entriesB[i][0] || differ(value, entriesB[i][1]))
160
+ return true;
161
+ return false;
162
+ }
163
+ exports.differ = differ;
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Sedentary = exports.Type = exports.Transaction = exports.Table = exports.EntryBase = exports.DB = exports.Attribute = void 0;
3
+ exports.Sedentary = exports.Type = exports.Transaction = exports.Table = exports.EntryBase = exports.differ = exports.DB = exports.Attribute = void 0;
4
4
  const db_1 = require("./db");
5
5
  var db_2 = require("./db");
6
6
  Object.defineProperty(exports, "Attribute", { enumerable: true, get: function () { return db_2.Attribute; } });
7
7
  Object.defineProperty(exports, "DB", { enumerable: true, get: function () { return db_2.DB; } });
8
+ Object.defineProperty(exports, "differ", { enumerable: true, get: function () { return db_2.differ; } });
8
9
  Object.defineProperty(exports, "EntryBase", { enumerable: true, get: function () { return db_2.EntryBase; } });
9
10
  Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return db_2.Table; } });
10
11
  Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return db_2.Transaction; } });
@@ -13,7 +14,26 @@ const operators = ["=", ">", "<", ">=", "<=", "<>", "IN", "IS NULL", "LIKE", "NO
13
14
  const allowedOption = ["indexes", "int8id", "parent", "primaryKey", "sync", "tableName"];
14
15
  const reservedNames = [
15
16
  ...["attr2field", "attributeName", "attributes", "base", "class", "construct", "constructor", "defaultValue", "entry", "fieldName", "foreignKeys", "load"],
16
- ...["loaded", "methods", "name", "postLoad", "postSave", "preLoad", "preSave", "primaryKey", "prototype", "save", "size", "tableName", "tx", "type"]
17
+ ...[
18
+ "loaded",
19
+ "methods",
20
+ "name",
21
+ "postCommit",
22
+ "postLoad",
23
+ "postRemove",
24
+ "postSave",
25
+ "preCommit",
26
+ "preLoad",
27
+ "preRemove",
28
+ "preSave",
29
+ "primaryKey",
30
+ "prototype",
31
+ "save",
32
+ "size",
33
+ "tableName",
34
+ "tx",
35
+ "type"
36
+ ]
17
37
  ];
18
38
  class Sedentary {
19
39
  constructor(options) {
@@ -443,8 +463,11 @@ class Sedentary {
443
463
  };
444
464
  const table = new db_1.Table({ attributes: aArray, autoIncrement, constraints, indexes: iArray, model: ret, parent, pk, sync, tableName });
445
465
  this.db.tables.push(table);
466
+ const cancel_ = this.db.cancel(tableName);
467
+ const cancel = (where, tx) => cancel_(this.createWhere(modelName, attr2field, where)[0], tx);
468
+ Object.defineProperty(cancel, "name", { value: modelName + ".cancel" });
446
469
  const load_ = this.db.load(tableName, attr2field, pk, ret, table);
447
- const load = async (where, ...args) => {
470
+ const load = (where, ...args) => {
448
471
  let order = undefined;
449
472
  let limit = undefined;
450
473
  let tx = undefined;
@@ -477,11 +500,10 @@ class Sedentary {
477
500
  throw new Error(`${modelName}.load: 'order' argument: Wrong type, expected 'string | string[]'`);
478
501
  if (tx && !(tx instanceof db_1.Transaction))
479
502
  throw new Error(`${modelName}.load: 'tx' argument: Wrong type, expected 'Transaction'`);
480
- const [str] = this.createWhere(modelName, attr2field, where);
481
- const ret = await load_(str, order, limit, tx, lock);
482
- return ret;
503
+ return load_(this.createWhere(modelName, attr2field, where)[0], order, limit, tx, lock);
483
504
  };
484
505
  Object.defineProperty(load, "name", { value: modelName + ".load" });
506
+ Object.defineProperty(ret, "cancel", { value: cancel });
485
507
  Object.defineProperty(ret, "name", { value: modelName });
486
508
  Object.defineProperty(ret, "load", { value: load });
487
509
  Object.defineProperty(ret, "attr2field", { value: attr2field });
@@ -494,19 +516,27 @@ class Sedentary {
494
516
  if (!this.loaded)
495
517
  throw new Error(`${modelName}.remove: Can't remove a never saved Entry`);
496
518
  this.preRemove();
497
- const ret = await remove.call(this);
498
- if (ret)
499
- this.postRemove();
500
- return ret;
519
+ const records = await remove.call(this);
520
+ this.postRemove(records);
521
+ if (this.tx) {
522
+ if (!this[db_1.actions])
523
+ Object.defineProperty(this, db_1.actions, { configurable: true, value: [] });
524
+ this[db_1.actions].push({ action: "remove", records });
525
+ }
526
+ return records;
501
527
  };
502
528
  Object.defineProperty(ret.prototype.remove, "name", { value: modelName + ".remove" });
503
529
  const save = this.db.save(tableName, attr2field, pk);
504
530
  ret.prototype.save = async function () {
505
531
  this.preSave();
506
- const ret = await save.call(this);
507
- if (ret)
508
- this.postSave();
509
- return ret;
532
+ const records = await save.call(this);
533
+ this.postSave(records);
534
+ if (this.tx) {
535
+ if (!this[db_1.actions])
536
+ Object.defineProperty(this, db_1.actions, { configurable: true, value: [] });
537
+ this[db_1.actions].push({ action: "save", records });
538
+ }
539
+ return records;
510
540
  };
511
541
  Object.defineProperty(ret.prototype.save, "name", { value: modelName + ".save" });
512
542
  for (const attribute of aArray)
package/dist/es/db.js CHANGED
@@ -1,3 +1,5 @@
1
+ export const actions = Symbol("actions");
2
+ export const loaded = Symbol("loaded");
1
3
  export class EntryBase {
2
4
  constructor(from) {
3
5
  if (from === "load")
@@ -9,9 +11,15 @@ export class EntryBase {
9
11
  }
10
12
  }
11
13
  construct() { }
14
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
+ postCommit(actions) { }
12
16
  postLoad() { }
13
- postRemove() { }
14
- postSave() { }
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
+ postRemove(deletedRecords) { }
19
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
20
+ postSave(savedRecords) { }
21
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
+ preCommit(actions) { }
15
23
  preLoad() { }
16
24
  preRemove() { }
17
25
  preSave() { }
@@ -97,14 +105,53 @@ export class Transaction {
97
105
  }
98
106
  clean() {
99
107
  const { entries } = this;
100
- for (const entry of entries)
101
- Object.defineProperty(entry, "tx", { configurable: true, value: null });
108
+ for (const entry of entries) {
109
+ Object.defineProperty(entry, actions, { configurable: true, value: undefined });
110
+ Object.defineProperty(entry, "tx", { configurable: true, value: undefined });
111
+ }
102
112
  this.entries = [];
103
113
  }
104
114
  async commit() {
115
+ const { entries } = this;
116
+ for (const entry of entries)
117
+ if (entry[actions])
118
+ entry.postCommit(entry[actions]);
105
119
  this.clean();
106
120
  }
121
+ preCommit() {
122
+ const { entries } = this;
123
+ for (const entry of entries)
124
+ if (entry[actions])
125
+ entry.preCommit(entry[actions]);
126
+ }
107
127
  async rollback() {
108
128
  this.clean();
109
129
  }
110
130
  }
131
+ const sortedEntries = (obj) => Object.entries(obj).sort((entryA, entryB) => (entryA[0] > entryB[0] ? -1 : 1));
132
+ export function differ(a, b) {
133
+ if (typeof a !== "object")
134
+ return a !== b;
135
+ if (typeof b !== "object")
136
+ return true;
137
+ if (a === null)
138
+ return b !== null;
139
+ if (b === null)
140
+ return true;
141
+ if (a instanceof Array) {
142
+ if (!(b instanceof Array))
143
+ return true;
144
+ for (const [i, value] of a.entries())
145
+ if (differ(value, b[i]))
146
+ return true;
147
+ return false;
148
+ }
149
+ const entriesA = sortedEntries(a);
150
+ const entriesB = sortedEntries(b);
151
+ if (entriesA.length !== entriesB.length)
152
+ return true;
153
+ for (const [i, [key, value]] of entriesA.entries())
154
+ if (key !== entriesB[i][0] || differ(value, entriesB[i][1]))
155
+ return true;
156
+ return false;
157
+ }
package/dist/es/index.js CHANGED
@@ -1,10 +1,29 @@
1
- import { Attribute, EntryBase, Table, Transaction, Type } from "./db";
2
- export { Attribute, DB, EntryBase, Table, Transaction, Type } from "./db";
1
+ import { actions, Attribute, EntryBase, Table, Transaction, Type } from "./db";
2
+ export { Attribute, DB, differ, EntryBase, Table, Transaction, Type } from "./db";
3
3
  const operators = ["=", ">", "<", ">=", "<=", "<>", "IN", "IS NULL", "LIKE", "NOT"];
4
4
  const allowedOption = ["indexes", "int8id", "parent", "primaryKey", "sync", "tableName"];
5
5
  const reservedNames = [
6
6
  ...["attr2field", "attributeName", "attributes", "base", "class", "construct", "constructor", "defaultValue", "entry", "fieldName", "foreignKeys", "load"],
7
- ...["loaded", "methods", "name", "postLoad", "postSave", "preLoad", "preSave", "primaryKey", "prototype", "save", "size", "tableName", "tx", "type"]
7
+ ...[
8
+ "loaded",
9
+ "methods",
10
+ "name",
11
+ "postCommit",
12
+ "postLoad",
13
+ "postRemove",
14
+ "postSave",
15
+ "preCommit",
16
+ "preLoad",
17
+ "preRemove",
18
+ "preSave",
19
+ "primaryKey",
20
+ "prototype",
21
+ "save",
22
+ "size",
23
+ "tableName",
24
+ "tx",
25
+ "type"
26
+ ]
8
27
  ];
9
28
  export class Sedentary {
10
29
  autoSync;
@@ -437,8 +456,11 @@ export class Sedentary {
437
456
  };
438
457
  const table = new Table({ attributes: aArray, autoIncrement, constraints, indexes: iArray, model: ret, parent, pk, sync, tableName });
439
458
  this.db.tables.push(table);
459
+ const cancel_ = this.db.cancel(tableName);
460
+ const cancel = (where, tx) => cancel_(this.createWhere(modelName, attr2field, where)[0], tx);
461
+ Object.defineProperty(cancel, "name", { value: modelName + ".cancel" });
440
462
  const load_ = this.db.load(tableName, attr2field, pk, ret, table);
441
- const load = async (where, ...args) => {
463
+ const load = (where, ...args) => {
442
464
  let order = undefined;
443
465
  let limit = undefined;
444
466
  let tx = undefined;
@@ -471,11 +493,10 @@ export class Sedentary {
471
493
  throw new Error(`${modelName}.load: 'order' argument: Wrong type, expected 'string | string[]'`);
472
494
  if (tx && !(tx instanceof Transaction))
473
495
  throw new Error(`${modelName}.load: 'tx' argument: Wrong type, expected 'Transaction'`);
474
- const [str] = this.createWhere(modelName, attr2field, where);
475
- const ret = await load_(str, order, limit, tx, lock);
476
- return ret;
496
+ return load_(this.createWhere(modelName, attr2field, where)[0], order, limit, tx, lock);
477
497
  };
478
498
  Object.defineProperty(load, "name", { value: modelName + ".load" });
499
+ Object.defineProperty(ret, "cancel", { value: cancel });
479
500
  Object.defineProperty(ret, "name", { value: modelName });
480
501
  Object.defineProperty(ret, "load", { value: load });
481
502
  Object.defineProperty(ret, "attr2field", { value: attr2field });
@@ -488,19 +509,27 @@ export class Sedentary {
488
509
  if (!this.loaded)
489
510
  throw new Error(`${modelName}.remove: Can't remove a never saved Entry`);
490
511
  this.preRemove();
491
- const ret = await remove.call(this);
492
- if (ret)
493
- this.postRemove();
494
- return ret;
512
+ const records = await remove.call(this);
513
+ this.postRemove(records);
514
+ if (this.tx) {
515
+ if (!this[actions])
516
+ Object.defineProperty(this, actions, { configurable: true, value: [] });
517
+ this[actions].push({ action: "remove", records });
518
+ }
519
+ return records;
495
520
  };
496
521
  Object.defineProperty(ret.prototype.remove, "name", { value: modelName + ".remove" });
497
522
  const save = this.db.save(tableName, attr2field, pk);
498
523
  ret.prototype.save = async function () {
499
524
  this.preSave();
500
- const ret = await save.call(this);
501
- if (ret)
502
- this.postSave();
503
- return ret;
525
+ const records = await save.call(this);
526
+ this.postSave(records);
527
+ if (this.tx) {
528
+ if (!this[actions])
529
+ Object.defineProperty(this, actions, { configurable: true, value: [] });
530
+ this[actions].push({ action: "save", records });
531
+ }
532
+ return records;
504
533
  };
505
534
  Object.defineProperty(ret.prototype.save, "name", { value: modelName + ".save" });
506
535
  for (const attribute of aArray)
@@ -1,9 +1,17 @@
1
+ export declare const actions: unique symbol;
2
+ export declare const loaded: unique symbol;
3
+ export interface Action {
4
+ action: "remove" | "save";
5
+ records: number | false;
6
+ }
1
7
  export declare class EntryBase {
2
8
  constructor(from?: Partial<EntryBase>);
3
9
  construct(): void;
10
+ postCommit(actions: Action[]): void;
4
11
  postLoad(): void;
5
- postRemove(): void;
6
- postSave(): void;
12
+ postRemove(deletedRecords: number): void;
13
+ postSave(savedRecords: number | false): void;
14
+ preCommit(actions: Action[]): void;
7
15
  preLoad(): void;
8
16
  preRemove(): void;
9
17
  preSave(): void;
@@ -85,10 +93,11 @@ export declare abstract class DB<T extends Transaction> {
85
93
  syncDataBase(): Promise<void>;
86
94
  protected syncLog(message: string): void;
87
95
  abstract begin(): Promise<T>;
96
+ abstract cancel(tableName: string): (where: string, tx?: Transaction) => Promise<number>;
88
97
  abstract escape(value: unknown): string;
89
98
  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>;
99
+ abstract remove(tableName: string, pk: Attribute<unknown, unknown>): (this: EntryBase & Record<string, unknown>) => Promise<number>;
100
+ abstract save(tableName: string, attributes: Record<string, string>, pk: Attribute<unknown, unknown>): (this: EntryBase & Record<string, unknown>) => Promise<number | false>;
92
101
  abstract dropConstraints(table: Table): Promise<number[]>;
93
102
  abstract dropFields(table: Table): Promise<void>;
94
103
  abstract dropIndexes(table: Table, constraintIndexes: number[]): Promise<void>;
@@ -105,6 +114,8 @@ export declare class Transaction {
105
114
  addEntry(entry: EntryBase): void;
106
115
  clean(): void;
107
116
  commit(): Promise<void>;
117
+ protected preCommit(): void;
108
118
  rollback(): Promise<void>;
109
119
  }
120
+ export declare function differ(a: unknown, b: unknown): boolean;
110
121
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";
2
- export { Attribute, DB, EntryBase, ForeignKeyActions, ForeignKeyOptions, Index, Table, Transaction, Type } from "./db";
2
+ export { Action, Attribute, DB, differ, EntryBase, ForeignKeyActions, ForeignKeyOptions, Index, Table, Transaction, Type } from "./db";
3
3
  export declare type TypeDefinition<T, E> = (() => Type<T, E>) | Type<T, E>;
4
4
  export interface AttributeOptions<T, E> {
5
5
  defaultValue?: T;
@@ -74,6 +74,7 @@ export interface ModelLoad<A extends AttributesDefinition, E extends EntryBase>
74
74
  load(where: Condition<A>, order?: Order<A>, tx?: Transaction, lock?: boolean): Promise<E[]>;
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
+ cancel(where: Condition<A>, tx?: Transaction): Promise<number>;
77
78
  }
78
79
  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
80
  attributes: A;
@@ -119,7 +120,7 @@ export declare class Sedentary<D extends DB<T>, T extends Transaction> {
119
120
  Int8(): Type<bigint, unknown>;
120
121
  JSON<T>(): Type<T, unknown>;
121
122
  Number(): Type<number, unknown>;
122
- VarChar(size?: number): Type<string, unknown>;
123
+ VarChar<S extends string>(size?: number): Type<S, unknown>;
123
124
  private checkDB;
124
125
  private checkOrderBy;
125
126
  private checkSize;
package/package.json CHANGED
@@ -58,5 +58,5 @@
58
58
  }
59
59
  },
60
60
  "types": "./dist/types/index.d.ts",
61
- "version": "0.0.44"
61
+ "version": "0.0.47"
62
62
  }
package/dist/cjs/db.d.ts DELETED
@@ -1,110 +0,0 @@
1
- export declare class EntryBase {
2
- constructor(from?: Partial<EntryBase>);
3
- construct(): void;
4
- postLoad(): void;
5
- postRemove(): void;
6
- postSave(): void;
7
- preLoad(): void;
8
- preRemove(): void;
9
- preSave(): void;
10
- remove(): Promise<boolean>;
11
- save(): Promise<boolean>;
12
- }
13
- export declare type ForeignKeyActions = "cascade" | "no action" | "restrict" | "set default" | "set null";
14
- export interface ForeignKeyOptions {
15
- onDelete?: ForeignKeyActions;
16
- onUpdate?: ForeignKeyActions;
17
- }
18
- export interface Type<T, E> {
19
- base: unknown;
20
- entry?: E;
21
- native?: T;
22
- size?: number;
23
- type: string;
24
- foreignKey?: {
25
- attributeName: string;
26
- fieldName: string;
27
- options?: ForeignKeyOptions;
28
- tableName: string;
29
- };
30
- }
31
- export declare class Type<T, E> {
32
- constructor(from: Type<T, E>);
33
- }
34
- export interface Attribute<T, E> extends Type<T, E> {
35
- attributeName: string;
36
- defaultValue?: unknown;
37
- fieldName: string;
38
- modelName: string;
39
- notNull: boolean;
40
- tableName: string;
41
- unique?: boolean;
42
- }
43
- export declare class Attribute<T, E> extends Type<T, E> {
44
- constructor(from: Attribute<T, E>);
45
- }
46
- export interface Constraint {
47
- attribute: Attribute<unknown, unknown>;
48
- constraintName: string;
49
- type: "f" | "u";
50
- }
51
- export interface Index {
52
- fields: string[];
53
- indexName: string;
54
- type: "btree" | "hash";
55
- unique: boolean;
56
- }
57
- interface ITable {
58
- attributes: Attribute<unknown, unknown>[];
59
- autoIncrement: boolean;
60
- constraints: Constraint[];
61
- indexes: Index[];
62
- model: {
63
- load: (where: any, order?: string[], tx?: Transaction) => Promise<EntryBase[]>;
64
- };
65
- parent?: Attribute<unknown, unknown>;
66
- pk: Attribute<unknown, unknown>;
67
- sync: boolean;
68
- tableName: string;
69
- }
70
- declare const Table_base: new (defaults?: ITable | undefined) => ITable;
71
- export declare class Table extends Table_base {
72
- autoIncrementOwn?: boolean;
73
- oid?: number;
74
- findField(name: string): Attribute<unknown, unknown>;
75
- }
76
- export declare abstract class DB<T extends Transaction> {
77
- tables: Table[];
78
- protected log: (message: string) => void;
79
- protected sync: boolean;
80
- abstract connect(): Promise<void>;
81
- abstract end(): Promise<void>;
82
- constructor(log: (message: string) => void);
83
- findTable(name: string): Table;
84
- protected indexesEq(a: Index, b: Index): boolean;
85
- syncDataBase(): Promise<void>;
86
- protected syncLog(message: string): void;
87
- abstract begin(): Promise<T>;
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>;
92
- abstract dropConstraints(table: Table): Promise<number[]>;
93
- abstract dropFields(table: Table): Promise<void>;
94
- abstract dropIndexes(table: Table, constraintIndexes: number[]): Promise<void>;
95
- abstract syncConstraints(table: Table): Promise<void>;
96
- abstract syncFields(table: Table): Promise<void>;
97
- abstract syncIndexes(table: Table): Promise<void>;
98
- abstract syncSequence(table: Table): Promise<void>;
99
- abstract syncTable(table: Table): Promise<void>;
100
- }
101
- export declare class Transaction {
102
- private entries;
103
- protected log: (message: string) => void;
104
- constructor(log: (message: string) => void);
105
- addEntry(entry: EntryBase): void;
106
- clean(): void;
107
- commit(): Promise<void>;
108
- rollback(): Promise<void>;
109
- }
110
- export {};
@@ -1,142 +0,0 @@
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
- }
@@ -1 +0,0 @@
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.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.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.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",{"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":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"f58c6d0669d1ee04b2fcb0e87fb949b6828602f3f29c7bf6c76a214f16fd50d5",{"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":1,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"./","strict":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":7},"fileIdsList":[[48,103],[103],[103,116],[48,49,50,51,52,103],[48,50,103],[54,55,56,57,103],[58,103],[75,103,110],[103,112],[103,113],[103,118,120],[59,103],[62,103],[63,68,103],[64,74,75,82,91,102,103],[64,65,74,82,103],[66,103],[67,68,75,83,103],[68,91,99,103],[69,71,74,82,103],[70,103],[71,72,103],[73,74,103],[74,103],[74,75,76,91,102,103],[74,75,76,91,94,103],[103,107],[77,82,91,102,103],[74,75,77,78,82,91,99,102,103],[77,79,91,99,102,103],[59,60,61,62,63,64,65,66,67,68,69,70,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],[74,80,103],[81,102,103],[71,74,82,91,103],[83,103],[84,103],[62,85,103],[86,101,103,107],[87,103],[88,103],[74,89,103],[89,90,103,105],[74,91,92,93,94,103],[91,93,103],[91,92,103],[94,103],[95,103],[74,97,98,103],[97,98,103],[68,82,91,99,103],[100,103],[82,101,103],[63,77,88,102,103],[68,103],[91,103,104],[103,105],[103,106],[63,68,74,76,85,91,102,103,105,107],[91,103,108],[74,91,99,103,110,124,125,128,129],[103,133],[103,118],[103,115,119],[103,110,125,126,127],[103,110],[91,103,110,125],[103,117],[46,103],[46]],"referencedMap":[[50,1],[48,2],[117,3],[116,2],[53,4],[49,1],[51,5],[52,1],[54,2],[58,6],[55,7],[57,2],[111,8],[112,2],[113,9],[114,10],[121,11],[56,2],[122,2],[59,12],[60,12],[62,13],[63,14],[64,15],[65,16],[66,17],[67,18],[68,19],[69,20],[70,21],[71,22],[72,22],[73,23],[74,24],[75,25],[76,26],[61,27],[109,2],[77,28],[78,29],[79,30],[110,31],[80,32],[81,33],[82,34],[83,35],[84,36],[85,37],[86,38],[87,39],[88,40],[89,41],[90,42],[91,43],[93,44],[92,45],[94,46],[95,47],[96,2],[97,48],[98,49],[99,50],[100,51],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[123,2],[130,2],[129,60],[131,2],[132,2],[133,2],[134,61],[115,2],[119,62],[120,63],[128,64],[125,65],[127,66],[126,65],[124,2],[118,67],[8,2],[9,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[33,2],[34,2],[35,2],[36,2],[7,2],[37,2],[45,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[1,2],[44,2],[11,2],[10,2],[46,2],[47,68]],"exportedModulesMap":[[50,1],[48,2],[117,3],[116,2],[53,4],[49,1],[51,5],[52,1],[54,2],[58,6],[55,7],[57,2],[111,8],[112,2],[113,9],[114,10],[121,11],[56,2],[122,2],[59,12],[60,12],[62,13],[63,14],[64,15],[65,16],[66,17],[67,18],[68,19],[69,20],[70,21],[71,22],[72,22],[73,23],[74,24],[75,25],[76,26],[61,27],[109,2],[77,28],[78,29],[79,30],[110,31],[80,32],[81,33],[82,34],[83,35],[84,36],[85,37],[86,38],[87,39],[88,40],[89,41],[90,42],[91,43],[93,44],[92,45],[94,46],[95,47],[96,2],[97,48],[98,49],[99,50],[100,51],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[123,2],[130,2],[129,60],[131,2],[132,2],[133,2],[134,61],[115,2],[119,62],[120,63],[128,64],[125,65],[127,66],[126,65],[124,2],[118,67],[8,2],[9,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[33,2],[34,2],[35,2],[36,2],[7,2],[37,2],[45,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[1,2],[44,2],[11,2],[10,2],[47,69]],"semanticDiagnosticsPerFile":[50,48,117,116,53,49,51,52,54,58,55,57,111,112,113,114,121,56,122,59,60,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,61,109,77,78,79,110,80,81,82,83,84,85,86,87,88,89,90,91,93,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,123,130,129,131,132,133,134,115,119,120,128,125,127,126,124,118,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,45,42,43,38,39,40,41,1,44,11,10,46,47]},"version":"4.7.4"}
package/dist/es/db.d.ts DELETED
@@ -1,110 +0,0 @@
1
- export declare class EntryBase {
2
- constructor(from?: Partial<EntryBase>);
3
- construct(): void;
4
- postLoad(): void;
5
- postRemove(): void;
6
- postSave(): void;
7
- preLoad(): void;
8
- preRemove(): void;
9
- preSave(): void;
10
- remove(): Promise<boolean>;
11
- save(): Promise<boolean>;
12
- }
13
- export declare type ForeignKeyActions = "cascade" | "no action" | "restrict" | "set default" | "set null";
14
- export interface ForeignKeyOptions {
15
- onDelete?: ForeignKeyActions;
16
- onUpdate?: ForeignKeyActions;
17
- }
18
- export interface Type<T, E> {
19
- base: unknown;
20
- entry?: E;
21
- native?: T;
22
- size?: number;
23
- type: string;
24
- foreignKey?: {
25
- attributeName: string;
26
- fieldName: string;
27
- options?: ForeignKeyOptions;
28
- tableName: string;
29
- };
30
- }
31
- export declare class Type<T, E> {
32
- constructor(from: Type<T, E>);
33
- }
34
- export interface Attribute<T, E> extends Type<T, E> {
35
- attributeName: string;
36
- defaultValue?: unknown;
37
- fieldName: string;
38
- modelName: string;
39
- notNull: boolean;
40
- tableName: string;
41
- unique?: boolean;
42
- }
43
- export declare class Attribute<T, E> extends Type<T, E> {
44
- constructor(from: Attribute<T, E>);
45
- }
46
- export interface Constraint {
47
- attribute: Attribute<unknown, unknown>;
48
- constraintName: string;
49
- type: "f" | "u";
50
- }
51
- export interface Index {
52
- fields: string[];
53
- indexName: string;
54
- type: "btree" | "hash";
55
- unique: boolean;
56
- }
57
- interface ITable {
58
- attributes: Attribute<unknown, unknown>[];
59
- autoIncrement: boolean;
60
- constraints: Constraint[];
61
- indexes: Index[];
62
- model: {
63
- load: (where: any, order?: string[], tx?: Transaction) => Promise<EntryBase[]>;
64
- };
65
- parent?: Attribute<unknown, unknown>;
66
- pk: Attribute<unknown, unknown>;
67
- sync: boolean;
68
- tableName: string;
69
- }
70
- declare const Table_base: new (defaults?: ITable | undefined) => ITable;
71
- export declare class Table extends Table_base {
72
- autoIncrementOwn?: boolean;
73
- oid?: number;
74
- findField(name: string): Attribute<unknown, unknown>;
75
- }
76
- export declare abstract class DB<T extends Transaction> {
77
- tables: Table[];
78
- protected log: (message: string) => void;
79
- protected sync: boolean;
80
- abstract connect(): Promise<void>;
81
- abstract end(): Promise<void>;
82
- constructor(log: (message: string) => void);
83
- findTable(name: string): Table;
84
- protected indexesEq(a: Index, b: Index): boolean;
85
- syncDataBase(): Promise<void>;
86
- protected syncLog(message: string): void;
87
- abstract begin(): Promise<T>;
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>;
92
- abstract dropConstraints(table: Table): Promise<number[]>;
93
- abstract dropFields(table: Table): Promise<void>;
94
- abstract dropIndexes(table: Table, constraintIndexes: number[]): Promise<void>;
95
- abstract syncConstraints(table: Table): Promise<void>;
96
- abstract syncFields(table: Table): Promise<void>;
97
- abstract syncIndexes(table: Table): Promise<void>;
98
- abstract syncSequence(table: Table): Promise<void>;
99
- abstract syncTable(table: Table): Promise<void>;
100
- }
101
- export declare class Transaction {
102
- private entries;
103
- protected log: (message: string) => void;
104
- constructor(log: (message: string) => void);
105
- addEntry(entry: EntryBase): void;
106
- clean(): void;
107
- commit(): Promise<void>;
108
- rollback(): Promise<void>;
109
- }
110
- export {};
@@ -1,142 +0,0 @@
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
- }
@@ -1 +0,0 @@
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 +0,0 @@
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,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"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"}