corebasic 1.0.245 → 1.0.246

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