namirasoft-site-map 1.4.2 → 1.4.3
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/build.js +9 -9
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index_maps.d.ts +1 -0
- package/dist/index_maps.js +18 -0
- package/dist/index_maps.js.map +1 -0
- package/package.json +48 -48
- package/src/BaseMap.ts +10 -10
- package/src/Globe.ts +137 -140
- package/src/build.ts +96 -96
- package/src/check.ts +20 -20
- package/src/index.ts +8 -2
- package/src/maps/index.ts +23 -24
- package/src/maps/TimifyMap.ts +0 -10
- /package/dist/maps/{APILinkMap.d.ts → ApiLinkMap.d.ts} +0 -0
- /package/dist/maps/{APILinkMap.js → ApiLinkMap.js} +0 -0
- /package/dist/maps/{APILinkMap.js.map → ApiLinkMap.js.map} +0 -0
- /package/dist/maps/{APINewsMap.d.ts → ApiNewsMap.d.ts} +0 -0
- /package/dist/maps/{APINewsMap.js → ApiNewsMap.js} +0 -0
- /package/dist/maps/{APINewsMap.js.map → ApiNewsMap.js.map} +0 -0
- /package/dist/maps/{APIProductMap.d.ts → ApiProductMap.d.ts} +0 -0
- /package/dist/maps/{APIProductMap.js → ApiProductMap.js} +0 -0
- /package/dist/maps/{APIProductMap.js.map → ApiProductMap.js.map} +0 -0
- /package/dist/maps/{APIServiceMap.d.ts → ApiServiceMap.d.ts} +0 -0
- /package/dist/maps/{APIServiceMap.js → ApiServiceMap.js} +0 -0
- /package/dist/maps/{APIServiceMap.js.map → ApiServiceMap.js.map} +0 -0
- /package/dist/maps/{APIWorkMap.d.ts → ApiWorkMap.d.ts} +0 -0
- /package/dist/maps/{APIWorkMap.js → ApiWorkMap.js} +0 -0
- /package/dist/maps/{APIWorkMap.js.map → ApiWorkMap.js.map} +0 -0
- /package/dist/maps/{NWSMaxMindMap.d.ts → NwsMaxMindMap.d.ts} +0 -0
- /package/dist/maps/{NWSMaxMindMap.js → NwsMaxMindMap.js} +0 -0
- /package/dist/maps/{NWSMaxMindMap.js.map → NwsMaxMindMap.js.map} +0 -0
- /package/dist/maps/{NWSRegionMap.d.ts → NwsRegionMap.d.ts} +0 -0
- /package/dist/maps/{NWSRegionMap.js → NwsRegionMap.js} +0 -0
- /package/dist/maps/{NWSRegionMap.js.map → NwsRegionMap.js.map} +0 -0
- /package/dist/maps/{SMSSenderMap.d.ts → SmsSenderMap.d.ts} +0 -0
- /package/dist/maps/{SMSSenderMap.js → SmsSenderMap.js} +0 -0
- /package/dist/maps/{SMSSenderMap.js.map → SmsSenderMap.js.map} +0 -0
package/dist/build.js
CHANGED
|
@@ -48,15 +48,15 @@ function build() {
|
|
|
48
48
|
imports.push(`import { ${type_name}Map } from "./maps/${type_name}Map";`);
|
|
49
49
|
defines.push(` public ${var_name}: ${type_name}Map;`);
|
|
50
50
|
inits.push(` this.${var_name} = new ${type_name}Map();`);
|
|
51
|
-
fs_1.default.writeFileSync(`./src/maps/${type_name}Map.ts`, `import { Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server } from "${package_name}";
|
|
52
|
-
import { BaseMap } from "../BaseMap";
|
|
53
|
-
|
|
54
|
-
export class ${type_name}Map extends BaseMap<Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server>
|
|
55
|
-
{
|
|
56
|
-
constructor()
|
|
57
|
-
{
|
|
58
|
-
super(new Namirasoft${type_name}MetaDatabase());
|
|
59
|
-
}
|
|
51
|
+
fs_1.default.writeFileSync(`./src/maps/${type_name}Map.ts`, `import { Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server } from "${package_name}";
|
|
52
|
+
import { BaseMap } from "../BaseMap";
|
|
53
|
+
|
|
54
|
+
export class ${type_name}Map extends BaseMap<Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server>
|
|
55
|
+
{
|
|
56
|
+
constructor()
|
|
57
|
+
{
|
|
58
|
+
super(new Namirasoft${type_name}MetaDatabase());
|
|
59
|
+
}
|
|
60
60
|
};`);
|
|
61
61
|
}
|
|
62
62
|
imports.push("// tables import end");
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const Globe_1 = require("./Globe");
|
|
18
|
+
Globe_1.Globe.namirasoft.api_product.meta.tables.product.front_end.getViewLink = (id) => {
|
|
19
|
+
return Globe_1.Globe.namirasoft.getByProductID(id).meta.product.link;
|
|
20
|
+
};
|
|
17
21
|
__exportStar(require("./BaseMap"), exports);
|
|
18
22
|
__exportStar(require("./Globe"), exports);
|
|
19
23
|
__exportStar(require("./maps/index"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB;AACxB,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,aAAK,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,GAAG,CAAC,EAAU,EAAE,EAAE;IAEpF,OAAO,aAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AACjE,CAAC,CAAA;AAED,4CAA0B;AAC1B,0CAAwB;AACxB,+CAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./maps/APILinkMap";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./maps/APILinkMap"), exports);
|
|
18
|
+
//# sourceMappingURL=index_maps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_maps.js","sourceRoot":"","sources":["../src/index_maps.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "namirasoft-site-map",
|
|
3
|
-
"title": "Namirasoft Site Map NPM Package",
|
|
4
|
-
"description": "Namira Software Corporation Site Map NPM Package",
|
|
5
|
-
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/image/namirasoft/site/logo/base.png",
|
|
7
|
-
"language": "ts",
|
|
8
|
-
"framework": "npm",
|
|
9
|
-
"application": "package",
|
|
10
|
-
"private": false,
|
|
11
|
-
"version": "1.4.
|
|
12
|
-
"author": "Amir Abolhasani",
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"main": "./dist/index.js",
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "node ./dist/build.js",
|
|
18
|
-
"check": "node ./dist/check.js"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@types/node": "^22.10.2",
|
|
22
|
-
"namirasoft-access": "^1.4.29",
|
|
23
|
-
"namirasoft-account": "^1.4.28",
|
|
24
|
-
"namirasoft-alarm": "^1.4.9",
|
|
25
|
-
"namirasoft-api-link": "^1.4.8",
|
|
26
|
-
"namirasoft-api-news": "^1.4.3",
|
|
27
|
-
"namirasoft-api-product": "^1.4.11",
|
|
28
|
-
"namirasoft-api-service": "^1.4.4",
|
|
29
|
-
"namirasoft-api-work": "^1.4.2",
|
|
30
|
-
"namirasoft-balance": "^1.4.4",
|
|
31
|
-
"namirasoft-content-template": "^1.4.19",
|
|
32
|
-
"namirasoft-core": "^1.4.25",
|
|
33
|
-
"namirasoft-data": "^1.4.0",
|
|
34
|
-
"namirasoft-email-sender": "^1.4.14",
|
|
35
|
-
"namirasoft-field": "^1.4.4",
|
|
36
|
-
"namirasoft-history": "^1.4.8",
|
|
37
|
-
"namirasoft-job-arranger": "^1.4.33",
|
|
38
|
-
"namirasoft-log": "^1.4.12",
|
|
39
|
-
"namirasoft-message": "^1.4.8",
|
|
40
|
-
"namirasoft-notification-sender": "^1.4.11",
|
|
41
|
-
"namirasoft-nws-max-mind": "^1.4.5",
|
|
42
|
-
"namirasoft-nws-region": "^1.3.10",
|
|
43
|
-
"namirasoft-payment": "^1.4.28",
|
|
44
|
-
"namirasoft-secret": "^1.4.16",
|
|
45
|
-
"namirasoft-site": "^1.4.7",
|
|
46
|
-
"namirasoft-sms-sender": "^1.4.8",
|
|
47
|
-
"namirasoft-workspace": "^1.4.7"
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-site-map",
|
|
3
|
+
"title": "Namirasoft Site Map NPM Package",
|
|
4
|
+
"description": "Namira Software Corporation Site Map NPM Package",
|
|
5
|
+
"icon": "logo.png",
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/site/logo/base.png",
|
|
7
|
+
"language": "ts",
|
|
8
|
+
"framework": "npm",
|
|
9
|
+
"application": "package",
|
|
10
|
+
"private": false,
|
|
11
|
+
"version": "1.4.3",
|
|
12
|
+
"author": "Amir Abolhasani",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "node ./dist/build.js",
|
|
18
|
+
"check": "node ./dist/check.js"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@types/node": "^22.10.2",
|
|
22
|
+
"namirasoft-access": "^1.4.29",
|
|
23
|
+
"namirasoft-account": "^1.4.28",
|
|
24
|
+
"namirasoft-alarm": "^1.4.9",
|
|
25
|
+
"namirasoft-api-link": "^1.4.8",
|
|
26
|
+
"namirasoft-api-news": "^1.4.3",
|
|
27
|
+
"namirasoft-api-product": "^1.4.11",
|
|
28
|
+
"namirasoft-api-service": "^1.4.4",
|
|
29
|
+
"namirasoft-api-work": "^1.4.2",
|
|
30
|
+
"namirasoft-balance": "^1.4.4",
|
|
31
|
+
"namirasoft-content-template": "^1.4.19",
|
|
32
|
+
"namirasoft-core": "^1.4.25",
|
|
33
|
+
"namirasoft-data": "^1.4.0",
|
|
34
|
+
"namirasoft-email-sender": "^1.4.14",
|
|
35
|
+
"namirasoft-field": "^1.4.4",
|
|
36
|
+
"namirasoft-history": "^1.4.8",
|
|
37
|
+
"namirasoft-job-arranger": "^1.4.33",
|
|
38
|
+
"namirasoft-log": "^1.4.12",
|
|
39
|
+
"namirasoft-message": "^1.4.8",
|
|
40
|
+
"namirasoft-notification-sender": "^1.4.11",
|
|
41
|
+
"namirasoft-nws-max-mind": "^1.4.5",
|
|
42
|
+
"namirasoft-nws-region": "^1.3.10",
|
|
43
|
+
"namirasoft-payment": "^1.4.28",
|
|
44
|
+
"namirasoft-secret": "^1.4.16",
|
|
45
|
+
"namirasoft-site": "^1.4.7",
|
|
46
|
+
"namirasoft-sms-sender": "^1.4.8",
|
|
47
|
+
"namirasoft-workspace": "^1.4.7"
|
|
48
|
+
}
|
|
49
49
|
}
|
package/src/BaseMap.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { NSBaseMetaDatabase } from "namirasoft-site";
|
|
2
|
-
|
|
3
|
-
export abstract class BaseMap<Meta extends NSBaseMetaDatabase, Server>
|
|
4
|
-
{
|
|
5
|
-
meta: Meta;
|
|
6
|
-
server?: Server;
|
|
7
|
-
constructor(meta: Meta)
|
|
8
|
-
{
|
|
9
|
-
this.meta = meta;
|
|
10
|
-
}
|
|
1
|
+
import { NSBaseMetaDatabase } from "namirasoft-site";
|
|
2
|
+
|
|
3
|
+
export abstract class BaseMap<Meta extends NSBaseMetaDatabase, Server>
|
|
4
|
+
{
|
|
5
|
+
meta: Meta;
|
|
6
|
+
server?: Server;
|
|
7
|
+
constructor(meta: Meta)
|
|
8
|
+
{
|
|
9
|
+
this.meta = meta;
|
|
10
|
+
}
|
|
11
11
|
};
|
package/src/Globe.ts
CHANGED
|
@@ -1,141 +1,138 @@
|
|
|
1
|
-
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
-
import { BaseMap } from "./BaseMap";
|
|
3
|
-
// tables import start
|
|
4
|
-
import { APILinkMap } from "./maps/APILinkMap";
|
|
5
|
-
import { APINewsMap } from "./maps/APINewsMap";
|
|
6
|
-
import { APIProductMap } from "./maps/APIProductMap";
|
|
7
|
-
import { APIServiceMap } from "./maps/APIServiceMap";
|
|
8
|
-
import { APIWorkMap } from "./maps/APIWorkMap";
|
|
9
|
-
import { AccessMap } from "./maps/AccessMap";
|
|
10
|
-
import { AccountMap } from "./maps/AccountMap";
|
|
11
|
-
import { AlarmMap } from "./maps/AlarmMap";
|
|
12
|
-
import { BalanceMap } from "./maps/BalanceMap";
|
|
13
|
-
import { ContentTemplateMap } from "./maps/ContentTemplateMap";
|
|
14
|
-
import { DataMap } from "./maps/DataMap";
|
|
15
|
-
import { EmailSenderMap } from "./maps/EmailSenderMap";
|
|
16
|
-
import { FieldMap } from "./maps/FieldMap";
|
|
17
|
-
import { HistoryMap } from "./maps/HistoryMap";
|
|
18
|
-
import { JobArrangerMap } from "./maps/JobArrangerMap";
|
|
19
|
-
import { LogMap } from "./maps/LogMap";
|
|
20
|
-
import { MessageMap } from "./maps/MessageMap";
|
|
21
|
-
import { NWSMaxMindMap } from "./maps/NWSMaxMindMap";
|
|
22
|
-
import { NWSRegionMap } from "./maps/NWSRegionMap";
|
|
23
|
-
import { NotificationSenderMap } from "./maps/NotificationSenderMap";
|
|
24
|
-
import { PaymentMap } from "./maps/PaymentMap";
|
|
25
|
-
import { SMSSenderMap } from "./maps/SMSSenderMap";
|
|
26
|
-
import { SecretMap } from "./maps/SecretMap";
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
public
|
|
36
|
-
public
|
|
37
|
-
public
|
|
38
|
-
public
|
|
39
|
-
public
|
|
40
|
-
public
|
|
41
|
-
public
|
|
42
|
-
public
|
|
43
|
-
public
|
|
44
|
-
public
|
|
45
|
-
public
|
|
46
|
-
public
|
|
47
|
-
public
|
|
48
|
-
public
|
|
49
|
-
public
|
|
50
|
-
public
|
|
51
|
-
public
|
|
52
|
-
public
|
|
53
|
-
public
|
|
54
|
-
public
|
|
55
|
-
public
|
|
56
|
-
public
|
|
57
|
-
public
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
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
|
-
return
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
return ans;
|
|
139
|
-
throw new Error(`Result could not be found for short name: ${short_name}`);
|
|
140
|
-
}
|
|
1
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
+
import { BaseMap } from "./BaseMap";
|
|
3
|
+
// tables import start
|
|
4
|
+
import { APILinkMap } from "./maps/APILinkMap";
|
|
5
|
+
import { APINewsMap } from "./maps/APINewsMap";
|
|
6
|
+
import { APIProductMap } from "./maps/APIProductMap";
|
|
7
|
+
import { APIServiceMap } from "./maps/APIServiceMap";
|
|
8
|
+
import { APIWorkMap } from "./maps/APIWorkMap";
|
|
9
|
+
import { AccessMap } from "./maps/AccessMap";
|
|
10
|
+
import { AccountMap } from "./maps/AccountMap";
|
|
11
|
+
import { AlarmMap } from "./maps/AlarmMap";
|
|
12
|
+
import { BalanceMap } from "./maps/BalanceMap";
|
|
13
|
+
import { ContentTemplateMap } from "./maps/ContentTemplateMap";
|
|
14
|
+
import { DataMap } from "./maps/DataMap";
|
|
15
|
+
import { EmailSenderMap } from "./maps/EmailSenderMap";
|
|
16
|
+
import { FieldMap } from "./maps/FieldMap";
|
|
17
|
+
import { HistoryMap } from "./maps/HistoryMap";
|
|
18
|
+
import { JobArrangerMap } from "./maps/JobArrangerMap";
|
|
19
|
+
import { LogMap } from "./maps/LogMap";
|
|
20
|
+
import { MessageMap } from "./maps/MessageMap";
|
|
21
|
+
import { NWSMaxMindMap } from "./maps/NWSMaxMindMap";
|
|
22
|
+
import { NWSRegionMap } from "./maps/NWSRegionMap";
|
|
23
|
+
import { NotificationSenderMap } from "./maps/NotificationSenderMap";
|
|
24
|
+
import { PaymentMap } from "./maps/PaymentMap";
|
|
25
|
+
import { SMSSenderMap } from "./maps/SMSSenderMap";
|
|
26
|
+
import { SecretMap } from "./maps/SecretMap";
|
|
27
|
+
import { WorkspaceMap } from "./maps/WorkspaceMap";
|
|
28
|
+
// tables import end
|
|
29
|
+
|
|
30
|
+
export class Globe
|
|
31
|
+
{
|
|
32
|
+
public static namirasoft: Globe = new Globe();
|
|
33
|
+
// tables define start
|
|
34
|
+
public api_link: APILinkMap;
|
|
35
|
+
public api_news: APINewsMap;
|
|
36
|
+
public api_product: APIProductMap;
|
|
37
|
+
public api_service: APIServiceMap;
|
|
38
|
+
public api_work: APIWorkMap;
|
|
39
|
+
public access: AccessMap;
|
|
40
|
+
public account: AccountMap;
|
|
41
|
+
public alarm: AlarmMap;
|
|
42
|
+
public balance: BalanceMap;
|
|
43
|
+
public content_template: ContentTemplateMap;
|
|
44
|
+
public data: DataMap;
|
|
45
|
+
public email_sender: EmailSenderMap;
|
|
46
|
+
public field: FieldMap;
|
|
47
|
+
public history: HistoryMap;
|
|
48
|
+
public job_arranger: JobArrangerMap;
|
|
49
|
+
public log: LogMap;
|
|
50
|
+
public message: MessageMap;
|
|
51
|
+
public nws_max_mind: NWSMaxMindMap;
|
|
52
|
+
public nws_region: NWSRegionMap;
|
|
53
|
+
public notification_sender: NotificationSenderMap;
|
|
54
|
+
public payment: PaymentMap;
|
|
55
|
+
public sms_sender: SMSSenderMap;
|
|
56
|
+
public secret: SecretMap;
|
|
57
|
+
public workspace: WorkspaceMap;
|
|
58
|
+
// tables define end
|
|
59
|
+
constructor()
|
|
60
|
+
{
|
|
61
|
+
// tables init start
|
|
62
|
+
this.api_link = new APILinkMap();
|
|
63
|
+
this.api_news = new APINewsMap();
|
|
64
|
+
this.api_product = new APIProductMap();
|
|
65
|
+
this.api_service = new APIServiceMap();
|
|
66
|
+
this.api_work = new APIWorkMap();
|
|
67
|
+
this.access = new AccessMap();
|
|
68
|
+
this.account = new AccountMap();
|
|
69
|
+
this.alarm = new AlarmMap();
|
|
70
|
+
this.balance = new BalanceMap();
|
|
71
|
+
this.content_template = new ContentTemplateMap();
|
|
72
|
+
this.data = new DataMap();
|
|
73
|
+
this.email_sender = new EmailSenderMap();
|
|
74
|
+
this.field = new FieldMap();
|
|
75
|
+
this.history = new HistoryMap();
|
|
76
|
+
this.job_arranger = new JobArrangerMap();
|
|
77
|
+
this.log = new LogMap();
|
|
78
|
+
this.message = new MessageMap();
|
|
79
|
+
this.nws_max_mind = new NWSMaxMindMap();
|
|
80
|
+
this.nws_region = new NWSRegionMap();
|
|
81
|
+
this.notification_sender = new NotificationSenderMap();
|
|
82
|
+
this.payment = new PaymentMap();
|
|
83
|
+
this.sms_sender = new SMSSenderMap();
|
|
84
|
+
this.secret = new SecretMap();
|
|
85
|
+
this.workspace = new WorkspaceMap();
|
|
86
|
+
// tables init end
|
|
87
|
+
}
|
|
88
|
+
forEachProduct<T>(handler: (map: BaseMap<NSBaseMetaDatabase, any>) => T | null): T | null
|
|
89
|
+
{
|
|
90
|
+
for (let key of Object.keys(this))
|
|
91
|
+
{
|
|
92
|
+
let obj = (this as any)[key];
|
|
93
|
+
if (obj?.meta)
|
|
94
|
+
{
|
|
95
|
+
let ans = handler(obj);
|
|
96
|
+
if (ans)
|
|
97
|
+
return ans;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
getByProductID(product_id: string): BaseMap<NSBaseMetaDatabase, any>
|
|
103
|
+
{
|
|
104
|
+
let ans = this.forEachProduct(m =>
|
|
105
|
+
{
|
|
106
|
+
if (m.meta.product.id === product_id)
|
|
107
|
+
return m;
|
|
108
|
+
return null;
|
|
109
|
+
});
|
|
110
|
+
if (ans)
|
|
111
|
+
return ans;
|
|
112
|
+
throw new Error(`Map could not be found for product id: ${product_id}`);
|
|
113
|
+
}
|
|
114
|
+
getByShortName(short_name: string):
|
|
115
|
+
{
|
|
116
|
+
product: {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
headline: string;
|
|
120
|
+
description: string;
|
|
121
|
+
logo: string;
|
|
122
|
+
link: string;
|
|
123
|
+
};
|
|
124
|
+
table: NSBaseMetaTable;
|
|
125
|
+
}
|
|
126
|
+
{
|
|
127
|
+
let ans = this.forEachProduct(product =>
|
|
128
|
+
{
|
|
129
|
+
for (let table in product.meta.tables)
|
|
130
|
+
if (product.meta.tables[table].uuid.short === short_name)
|
|
131
|
+
return { product: product.meta.product, table: product.meta.tables[table] };
|
|
132
|
+
return null;
|
|
133
|
+
});
|
|
134
|
+
if (ans)
|
|
135
|
+
return ans;
|
|
136
|
+
throw new Error(`Result could not be found for short name: ${short_name}`);
|
|
137
|
+
}
|
|
141
138
|
};
|
package/src/build.ts
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import { NamingConvention } from "namirasoft-core";
|
|
3
|
-
|
|
4
|
-
let products =
|
|
5
|
-
[
|
|
6
|
-
'API Link',
|
|
7
|
-
'API News',
|
|
8
|
-
'API Product',
|
|
9
|
-
'API Service',
|
|
10
|
-
'API Work',
|
|
11
|
-
'Access',
|
|
12
|
-
'Account',
|
|
13
|
-
'Alarm',
|
|
14
|
-
'Balance',
|
|
15
|
-
'Content Template',
|
|
16
|
-
'Data',
|
|
17
|
-
'Email Sender',
|
|
18
|
-
'Field',
|
|
19
|
-
'History',
|
|
20
|
-
'Job Arranger',
|
|
21
|
-
'Log',
|
|
22
|
-
'Message',
|
|
23
|
-
'NWS Max Mind',
|
|
24
|
-
'NWS Region',
|
|
25
|
-
'Notification Sender',
|
|
26
|
-
'Payment',
|
|
27
|
-
'SMS Sender',
|
|
28
|
-
'Secret',
|
|
29
|
-
"Timify",
|
|
30
|
-
'Workspace'
|
|
31
|
-
|
|
32
|
-
// "Cretificate",
|
|
33
|
-
// "Hive",
|
|
34
|
-
// "Lend",
|
|
35
|
-
// "Redeem",
|
|
36
|
-
];
|
|
37
|
-
products = products.sort();
|
|
38
|
-
console.log(products);
|
|
39
|
-
|
|
40
|
-
function build()
|
|
41
|
-
{
|
|
42
|
-
let index_code = [];
|
|
43
|
-
let imports = ["// tables import start"];
|
|
44
|
-
let defines = ["// tables define start"];
|
|
45
|
-
let inits = ["// tables init start"];
|
|
46
|
-
for (let i = 0; i < products.length; i++)
|
|
47
|
-
{
|
|
48
|
-
let product = products[i];
|
|
49
|
-
let package_name = "namirasoft-" + NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.lower_case_dash, false);
|
|
50
|
-
let var_name = NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.lower_case_underscore, false);
|
|
51
|
-
let type_name = NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.Pascal_Case);
|
|
52
|
-
|
|
53
|
-
index_code.push(`export * from "./${type_name}Map";`);
|
|
54
|
-
imports.push(`import { ${type_name}Map } from "./maps/${type_name}Map";`);
|
|
55
|
-
defines.push(` public ${var_name}: ${type_name}Map;`);
|
|
56
|
-
inits.push(` this.${var_name} = new ${type_name}Map();`);
|
|
57
|
-
|
|
58
|
-
fs.writeFileSync(`./src/maps/${type_name}Map.ts`,
|
|
59
|
-
`import { Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server } from "${package_name}";
|
|
60
|
-
import { BaseMap } from "../BaseMap";
|
|
61
|
-
|
|
62
|
-
export class ${type_name}Map extends BaseMap<Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server>
|
|
63
|
-
{
|
|
64
|
-
constructor()
|
|
65
|
-
{
|
|
66
|
-
super(new Namirasoft${type_name}MetaDatabase());
|
|
67
|
-
}
|
|
68
|
-
};`);
|
|
69
|
-
}
|
|
70
|
-
imports.push("// tables import end");
|
|
71
|
-
defines.push("// tables define end");
|
|
72
|
-
inits.push("// tables init end");
|
|
73
|
-
|
|
74
|
-
let globe_code = fs.readFileSync("./src/Globe.ts").toString();
|
|
75
|
-
{
|
|
76
|
-
let start_index = globe_code.indexOf(imports[0]);
|
|
77
|
-
let end_index = globe_code.indexOf(imports[imports.length - 1]) + imports[imports.length - 1].length;
|
|
78
|
-
globe_code = globe_code.substring(0, start_index) + imports.join("\n") + globe_code.substring(end_index);
|
|
79
|
-
}
|
|
80
|
-
{
|
|
81
|
-
let start_index = globe_code.indexOf(defines[0]);
|
|
82
|
-
let end_index = globe_code.indexOf(defines[defines.length - 1]) + defines[defines.length - 1].length;
|
|
83
|
-
defines[defines.length - 1] = " " + defines[defines.length - 1];
|
|
84
|
-
globe_code = globe_code.substring(0, start_index) + defines.join("\n") + globe_code.substring(end_index);
|
|
85
|
-
}
|
|
86
|
-
{
|
|
87
|
-
let start_index = globe_code.indexOf(inits[0]);
|
|
88
|
-
let end_index = globe_code.indexOf(inits[inits.length - 1]) + inits[inits.length - 1].length;
|
|
89
|
-
inits[defines.length - 1] = " " + inits[defines.length - 1];
|
|
90
|
-
globe_code = globe_code.substring(0, start_index) + inits.join("\n") + "" + globe_code.substring(end_index);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
fs.writeFileSync("./src/Globe.ts", globe_code);
|
|
94
|
-
fs.writeFileSync("./src/maps/index.ts", index_code.join("\n"));
|
|
95
|
-
}
|
|
96
|
-
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { NamingConvention } from "namirasoft-core";
|
|
3
|
+
|
|
4
|
+
let products =
|
|
5
|
+
[
|
|
6
|
+
'API Link',
|
|
7
|
+
'API News',
|
|
8
|
+
'API Product',
|
|
9
|
+
'API Service',
|
|
10
|
+
'API Work',
|
|
11
|
+
'Access',
|
|
12
|
+
'Account',
|
|
13
|
+
'Alarm',
|
|
14
|
+
'Balance',
|
|
15
|
+
'Content Template',
|
|
16
|
+
'Data',
|
|
17
|
+
'Email Sender',
|
|
18
|
+
'Field',
|
|
19
|
+
'History',
|
|
20
|
+
'Job Arranger',
|
|
21
|
+
'Log',
|
|
22
|
+
'Message',
|
|
23
|
+
'NWS Max Mind',
|
|
24
|
+
'NWS Region',
|
|
25
|
+
'Notification Sender',
|
|
26
|
+
'Payment',
|
|
27
|
+
'SMS Sender',
|
|
28
|
+
'Secret',
|
|
29
|
+
"Timify",
|
|
30
|
+
'Workspace'
|
|
31
|
+
|
|
32
|
+
// "Cretificate",
|
|
33
|
+
// "Hive",
|
|
34
|
+
// "Lend",
|
|
35
|
+
// "Redeem",
|
|
36
|
+
];
|
|
37
|
+
products = products.sort();
|
|
38
|
+
console.log(products);
|
|
39
|
+
|
|
40
|
+
function build()
|
|
41
|
+
{
|
|
42
|
+
let index_code = [];
|
|
43
|
+
let imports = ["// tables import start"];
|
|
44
|
+
let defines = ["// tables define start"];
|
|
45
|
+
let inits = ["// tables init start"];
|
|
46
|
+
for (let i = 0; i < products.length; i++)
|
|
47
|
+
{
|
|
48
|
+
let product = products[i];
|
|
49
|
+
let package_name = "namirasoft-" + NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.lower_case_dash, false);
|
|
50
|
+
let var_name = NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.lower_case_underscore, false);
|
|
51
|
+
let type_name = NamingConvention.Pascal_Case_Space.convert(product, NamingConvention.Pascal_Case);
|
|
52
|
+
|
|
53
|
+
index_code.push(`export * from "./${type_name}Map";`);
|
|
54
|
+
imports.push(`import { ${type_name}Map } from "./maps/${type_name}Map";`);
|
|
55
|
+
defines.push(` public ${var_name}: ${type_name}Map;`);
|
|
56
|
+
inits.push(` this.${var_name} = new ${type_name}Map();`);
|
|
57
|
+
|
|
58
|
+
fs.writeFileSync(`./src/maps/${type_name}Map.ts`,
|
|
59
|
+
`import { Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server } from "${package_name}";
|
|
60
|
+
import { BaseMap } from "../BaseMap";
|
|
61
|
+
|
|
62
|
+
export class ${type_name}Map extends BaseMap<Namirasoft${type_name}MetaDatabase, Namirasoft${type_name}Server>
|
|
63
|
+
{
|
|
64
|
+
constructor()
|
|
65
|
+
{
|
|
66
|
+
super(new Namirasoft${type_name}MetaDatabase());
|
|
67
|
+
}
|
|
68
|
+
};`);
|
|
69
|
+
}
|
|
70
|
+
imports.push("// tables import end");
|
|
71
|
+
defines.push("// tables define end");
|
|
72
|
+
inits.push("// tables init end");
|
|
73
|
+
|
|
74
|
+
let globe_code = fs.readFileSync("./src/Globe.ts").toString();
|
|
75
|
+
{
|
|
76
|
+
let start_index = globe_code.indexOf(imports[0]);
|
|
77
|
+
let end_index = globe_code.indexOf(imports[imports.length - 1]) + imports[imports.length - 1].length;
|
|
78
|
+
globe_code = globe_code.substring(0, start_index) + imports.join("\n") + globe_code.substring(end_index);
|
|
79
|
+
}
|
|
80
|
+
{
|
|
81
|
+
let start_index = globe_code.indexOf(defines[0]);
|
|
82
|
+
let end_index = globe_code.indexOf(defines[defines.length - 1]) + defines[defines.length - 1].length;
|
|
83
|
+
defines[defines.length - 1] = " " + defines[defines.length - 1];
|
|
84
|
+
globe_code = globe_code.substring(0, start_index) + defines.join("\n") + globe_code.substring(end_index);
|
|
85
|
+
}
|
|
86
|
+
{
|
|
87
|
+
let start_index = globe_code.indexOf(inits[0]);
|
|
88
|
+
let end_index = globe_code.indexOf(inits[inits.length - 1]) + inits[inits.length - 1].length;
|
|
89
|
+
inits[defines.length - 1] = " " + inits[defines.length - 1];
|
|
90
|
+
globe_code = globe_code.substring(0, start_index) + inits.join("\n") + "" + globe_code.substring(end_index);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
fs.writeFileSync("./src/Globe.ts", globe_code);
|
|
94
|
+
fs.writeFileSync("./src/maps/index.ts", index_code.join("\n"));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
97
|
build();
|
package/src/check.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
-
import { Globe } from "./Globe";
|
|
3
|
-
|
|
4
|
-
let keys: { [short: string]: NSBaseMetaTable } = {};
|
|
5
|
-
Globe.namirasoft.forEachProduct(product =>
|
|
6
|
-
{
|
|
7
|
-
for (let key in product.meta.tables)
|
|
8
|
-
{
|
|
9
|
-
const table = product.meta.tables[key];
|
|
10
|
-
if (table.uuid.short)
|
|
11
|
-
{
|
|
12
|
-
if (keys[table.uuid.short])
|
|
13
|
-
{
|
|
14
|
-
console.log(`Duplicate short name:`);
|
|
15
|
-
console.log(`\t\t${table.database.product.name} - ${table.text}`);
|
|
16
|
-
console.log(`\t\t${keys[table.uuid.short].database.product.name} - ${keys[table.uuid.short].text}`);
|
|
17
|
-
}
|
|
18
|
-
keys[table.uuid.short] = table;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import { NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
+
import { Globe } from "./Globe";
|
|
3
|
+
|
|
4
|
+
let keys: { [short: string]: NSBaseMetaTable } = {};
|
|
5
|
+
Globe.namirasoft.forEachProduct(product =>
|
|
6
|
+
{
|
|
7
|
+
for (let key in product.meta.tables)
|
|
8
|
+
{
|
|
9
|
+
const table = product.meta.tables[key];
|
|
10
|
+
if (table.uuid.short)
|
|
11
|
+
{
|
|
12
|
+
if (keys[table.uuid.short])
|
|
13
|
+
{
|
|
14
|
+
console.log(`Duplicate short name:`);
|
|
15
|
+
console.log(`\t\t${table.database.product.name} - ${table.text}`);
|
|
16
|
+
console.log(`\t\t${keys[table.uuid.short].database.product.name} - ${keys[table.uuid.short].text}`);
|
|
17
|
+
}
|
|
18
|
+
keys[table.uuid.short] = table;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
21
|
});
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Globe } from "./Globe";
|
|
2
|
+
Globe.namirasoft.api_product.meta.tables.product.front_end.getViewLink = (id: string) =>
|
|
3
|
+
{
|
|
4
|
+
return Globe.namirasoft.getByProductID(id).meta.product.link;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export * from "./BaseMap";
|
|
8
|
+
export * from "./Globe";
|
|
3
9
|
export * from "./maps/index";
|
package/src/maps/index.ts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
export * from "./APILinkMap";
|
|
2
|
-
export * from "./APINewsMap";
|
|
3
|
-
export * from "./APIProductMap";
|
|
4
|
-
export * from "./APIServiceMap";
|
|
5
|
-
export * from "./APIWorkMap";
|
|
6
|
-
export * from "./AccessMap";
|
|
7
|
-
export * from "./AccountMap";
|
|
8
|
-
export * from "./AlarmMap";
|
|
9
|
-
export * from "./BalanceMap";
|
|
10
|
-
export * from "./ContentTemplateMap";
|
|
11
|
-
export * from "./DataMap";
|
|
12
|
-
export * from "./EmailSenderMap";
|
|
13
|
-
export * from "./FieldMap";
|
|
14
|
-
export * from "./HistoryMap";
|
|
15
|
-
export * from "./JobArrangerMap";
|
|
16
|
-
export * from "./LogMap";
|
|
17
|
-
export * from "./MessageMap";
|
|
18
|
-
export * from "./NWSMaxMindMap";
|
|
19
|
-
export * from "./NWSRegionMap";
|
|
20
|
-
export * from "./NotificationSenderMap";
|
|
21
|
-
export * from "./PaymentMap";
|
|
22
|
-
export * from "./SMSSenderMap";
|
|
23
|
-
export * from "./SecretMap";
|
|
24
|
-
export * from "./TimifyMap";
|
|
1
|
+
export * from "./APILinkMap";
|
|
2
|
+
export * from "./APINewsMap";
|
|
3
|
+
export * from "./APIProductMap";
|
|
4
|
+
export * from "./APIServiceMap";
|
|
5
|
+
export * from "./APIWorkMap";
|
|
6
|
+
export * from "./AccessMap";
|
|
7
|
+
export * from "./AccountMap";
|
|
8
|
+
export * from "./AlarmMap";
|
|
9
|
+
export * from "./BalanceMap";
|
|
10
|
+
export * from "./ContentTemplateMap";
|
|
11
|
+
export * from "./DataMap";
|
|
12
|
+
export * from "./EmailSenderMap";
|
|
13
|
+
export * from "./FieldMap";
|
|
14
|
+
export * from "./HistoryMap";
|
|
15
|
+
export * from "./JobArrangerMap";
|
|
16
|
+
export * from "./LogMap";
|
|
17
|
+
export * from "./MessageMap";
|
|
18
|
+
export * from "./NWSMaxMindMap";
|
|
19
|
+
export * from "./NWSRegionMap";
|
|
20
|
+
export * from "./NotificationSenderMap";
|
|
21
|
+
export * from "./PaymentMap";
|
|
22
|
+
export * from "./SMSSenderMap";
|
|
23
|
+
export * from "./SecretMap";
|
|
25
24
|
export * from "./WorkspaceMap";
|
package/src/maps/TimifyMap.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NamirasoftTimifyMetaDatabase, NamirasoftTimifyServer } from "namirasoft-timify";
|
|
2
|
-
import { BaseMap } from "../BaseMap";
|
|
3
|
-
|
|
4
|
-
export class TimifyMap extends BaseMap<NamirasoftTimifyMetaDatabase, NamirasoftTimifyServer>
|
|
5
|
-
{
|
|
6
|
-
constructor()
|
|
7
|
-
{
|
|
8
|
-
super(new NamirasoftTimifyMetaDatabase());
|
|
9
|
-
}
|
|
10
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|