oksy 0.1.22 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
package/public/index.html CHANGED
@@ -22,7 +22,7 @@
22
22
  height: 100% !important;
23
23
  }
24
24
  </style>
25
- <script type="module" crossorigin src="/assets/index.364a2f7d.js"></script>
25
+ <script type="module" crossorigin src="/assets/index.45dac613.js"></script>
26
26
  <link rel="stylesheet" href="/assets/index.ef68285e.css">
27
27
  </head>
28
28
  <body class="tw-flex tw-flex-col tw-bg-gray-50">
package/tsconfig.json CHANGED
@@ -5,7 +5,6 @@
5
5
  ],
6
6
  "sourceMap": true,
7
7
  "target": "ESNext",
8
- "strictPropertyInitialization": false,
9
8
  "paths": {
10
9
  "oksy": ["./types/src/library.pub"],
11
10
  },
@@ -19,7 +19,7 @@ export declare class SqliteClient {
19
19
  updateInQueue(tableName: string, whereClause: any, data: any): void;
20
20
  delete(tableName: string, whereClause: any): Promise<void>;
21
21
  deleteInQueue(tableName: string, whereClause: any): void;
22
- dropAllRows(tableName: any): Promise<number>;
22
+ dropAllRows(tableName: string): Promise<number>;
23
23
  connect(options: {
24
24
  inMemory: boolean;
25
25
  }): Promise<void>;
@@ -10,7 +10,7 @@ export declare abstract class BasePage {
10
10
  client: WebSocketServerClient;
11
11
  visitedUrl: string;
12
12
  URL: string;
13
- abstract view(): any[];
13
+ abstract view(): any;
14
14
  init?(...args: any[]): void | boolean;
15
15
  watchStoppers: WatchStopHandle[];
16
16
  state: {
@@ -1,7 +1,6 @@
1
- import { Many } from 'oksy';
2
- import { GlobalEntity } from 'src/library.pub';
1
+ import { Many, GlobalEntity } from 'oksy';
3
2
  import { Draft } from 'src/ReactiveStore/BaseEntity';
4
- type ValueFields<T1 extends GlobalEntity> = {
3
+ type ValueFields<T1> = {
5
4
  [K in keyof T1]: T1[K] extends GlobalEntity ? never : (T1[K] extends Many<any, any> ? never : K);
6
5
  }[keyof T1];
7
6
  type EntityArray = Array<Draft<GlobalEntity>>;
@@ -1,7 +1,7 @@
1
1
  import { SqliteClient } from './../Bootstrap/SqliteClient';
2
2
  import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
3
3
  import { ModelMaker } from './ModelMaker';
4
- import { GlobalEntity } from 'src/library.pub';
4
+ import { GlobalEntity } from 'oksy';
5
5
  export interface Storage {
6
6
  getById(tableName: string, id: string): null | any;
7
7
  delete(model: any): void;
@@ -18,11 +18,11 @@ export declare class ReactiveStore implements Storage {
18
18
  });
19
19
  addDatabase(workspaceId: string): Database;
20
20
  amountOfDatabases(): number;
21
- getDatabase(workspaceId: undefined | string): null | Database;
21
+ getDatabase(workspaceId: undefined | null | string): null | Database;
22
22
  allDatabases(): Database[];
23
23
  getAll(tableName: string): any[];
24
24
  getAllWithDraft(tableName: string): any[];
25
- getById(tableName: string, id: undefined | string): null | any;
25
+ getById(tableName: string, id: undefined | null | string): null | any;
26
26
  delete(model: null | InstanceType<typeof GlobalEntity>): void;
27
27
  }
28
28
  export declare class Database implements Storage {
@@ -36,7 +36,7 @@ export declare class Database implements Storage {
36
36
  getByName(tableName: string): null | Table;
37
37
  amountOfTables(): number;
38
38
  addRow(tableName: string, item: any): any;
39
- getById(tableName: string, id: undefined | string): null | any;
39
+ getById(tableName: string, id: undefined | null | string): null | any;
40
40
  getAll(tableName: string): any[];
41
41
  getAllWithDraft(tableName: string): any[];
42
42
  create(moduleName: string): any;
@@ -26,7 +26,7 @@ declare class Many<T1 extends GlobalEntity = any, T2 extends RelationFields<T1>
26
26
  }
27
27
  declare abstract class BasePage {
28
28
  URL: string;
29
- abstract view(...args: any[]): any[];
29
+ abstract view(...args: any[]): any;
30
30
  init?(...args: any[]): void | boolean;
31
31
  state: {
32
32
  [key: string]: any;
@@ -46,7 +46,7 @@ declare abstract class BasePage {
46
46
  type MODULE_KEY = keyof typeof MODULES;
47
47
  type MODEL<KEY extends MODULE_KEY> = InstanceType<(typeof MODULES[KEY])>;
48
48
  declare class Database {
49
- getById<T extends MODULE_KEY>(tableName: T, id: string): null | MODEL<T>;
49
+ getById<T extends MODULE_KEY>(tableName: T, id: undefined | null | string): null | MODEL<T>;
50
50
  getAll<T extends MODULE_KEY>(tableName: T): MODEL<T>[];
51
51
  getAllWithDraft<T extends MODULE_KEY>(tableName: T): Draft<MODEL<T>>[];
52
52
  create<T extends MODULE_KEY>(moduleName: T): MODEL<T>;