corebasic 1.0.245 → 1.0.247

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