corebasic 1.0.246 → 1.0.248

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.
@@ -14,6 +14,7 @@ const REMOTES_DIR = `${Utils.PROJECT_ROOT_PATH}/types/remotes`;
14
14
  const g_this = globalThis;
15
15
  g_this.Schemas ??= {};
16
16
  g_this.Types ??= { Remotes: {} };
17
+ // ================
17
18
  function init(partial) {
18
19
  return {
19
20
  created: 0,
@@ -27,7 +28,7 @@ function init(partial) {
27
28
  ...partial,
28
29
  };
29
30
  }
30
- g_this.Schemas.Default = { init };
31
+ g_this.DefaultSchema = { init };
31
32
  // ================
32
33
  async function load(path) {
33
34
  let files;
package/libs/schemas.ts CHANGED
@@ -11,17 +11,8 @@ g_this.Types ??= {Remotes: {}};
11
11
 
12
12
 
13
13
  // ================
14
- type DefaultSchema = {
15
- created: number
16
- updated: number
17
- createdBy: string
18
- updatedBy: string
19
- createdByUser: string
20
- updatedByUser: string
21
- company: string
22
- outlet: string
23
- }
24
- function init(partial: Partial<DefaultSchema>): DefaultSchema {
14
+
15
+ function init(partial?: Partial<DefaultSchema>): DefaultSchema {
25
16
  return {
26
17
  created: 0,
27
18
  updated: 0,
@@ -35,12 +26,19 @@ function init(partial: Partial<DefaultSchema>): DefaultSchema {
35
26
  } as DefaultSchema
36
27
  }
37
28
  declare global {
38
- namespace Schemas {
39
- type Default = DefaultSchema;
40
- const Default: { init: typeof init };
29
+ type DefaultSchema = {
30
+ created: number
31
+ updated: number
32
+ createdBy: string
33
+ updatedBy: string
34
+ createdByUser: string
35
+ updatedByUser: string
36
+ company: string
37
+ outlet: string
41
38
  }
39
+ const DefaultSchema: { init: typeof init };
42
40
  }
43
- g_this.Schemas.Default = { init }
41
+ g_this.DefaultSchema = { init }
44
42
  // ================
45
43
 
46
44
  async function load(path: string) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.246",
4
+ "version": "1.0.248",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "./index.ts",