@sedni/cloud_common 2.1.0 → 3.0.1
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/deno.jsonc +46 -0
- package/dist/browser-index.cjs +1481 -0
- package/dist/browser-index.d.cts +470 -0
- package/dist/browser-index.d.ts +470 -0
- package/dist/browser-index.js +409 -0
- package/dist/chunk-55XBONH2.js +1415 -0
- package/dist/chunk-K5VO2MYI.js +1415 -0
- package/dist/chunk-VQWCQ4E2.js +908 -0
- package/dist/index.cjs +2278 -31
- package/dist/index.d.cts +1631 -100
- package/dist/index.d.ts +1631 -100
- package/dist/index.js +1277 -40
- package/dist/unit.types-4ZD9ivHi.d.cts +797 -0
- package/dist/unit.types-4ZD9ivHi.d.ts +797 -0
- package/dist/unit.types-BZWIS1vq.d.cts +1246 -0
- package/dist/unit.types-BZWIS1vq.d.ts +1246 -0
- package/dist/unit.types-CFWDGNUR.d.cts +1246 -0
- package/dist/unit.types-CFWDGNUR.d.ts +1246 -0
- package/package.json +24 -19
- package/tsconfig.json +2 -1
- package/dist/chunk-AOC7BD5E.js +0 -153
- package/dist/chunk-NCUZ3O3P.js +0 -152
- package/dist/node-entry.cjs +0 -1191
- package/dist/node-entry.d.cts +0 -53
- package/dist/node-entry.d.ts +0 -53
- package/dist/node-entry.js +0 -1078
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sedni/cloud_common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Common package for all types, resources and tools of Diamar Cloud",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "tsup app/index.ts app/
|
|
10
|
+
"build": "tsup app/browser-index.ts app/index.ts --format esm,cjs --dts --out-dir dist",
|
|
11
11
|
"test": "cross-env NODE_ENV=internal_test mocha --recursive --exit app/test/*",
|
|
12
12
|
"coverage": "nyc --include 'app/**/*controller.js' mocha",
|
|
13
13
|
"lint": "eslint app/*",
|
|
@@ -16,32 +16,37 @@
|
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
-
"types": "./dist/index.d.ts",
|
|
19
|
+
"types": "./dist/browser-index.d.ts",
|
|
20
|
+
"browser": {
|
|
21
|
+
"import": "./dist/browser-index.js",
|
|
22
|
+
"require": "./dist/browser-index.cjs",
|
|
23
|
+
"default": "./dist/browser-index.js"
|
|
24
|
+
},
|
|
20
25
|
"import": "./dist/index.js",
|
|
21
|
-
"require": "./dist/
|
|
26
|
+
"require": "./dist/index.cjs",
|
|
27
|
+
"default": "./dist/index.cjs"
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
"author": "Jose Luis Silvestre García",
|
|
25
31
|
"license": "ISC",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"mongoose": "^9.2.1",
|
|
34
|
+
"mongoose-aggregate-paginate-v2": "^1.1.4",
|
|
35
|
+
"mongoose-autopopulate": "^1.2.1",
|
|
36
|
+
"mongoose-paginate-v2": "^1.9.1"
|
|
37
|
+
},
|
|
26
38
|
"dependencies": {
|
|
27
|
-
"mongoose": "^
|
|
39
|
+
"mongoose": "^9.2.1",
|
|
28
40
|
"mongoose-aggregate-paginate-v2": "^1.1.4",
|
|
29
|
-
"mongoose-autopopulate": "^1.1
|
|
41
|
+
"mongoose-autopopulate": "^1.2.1",
|
|
30
42
|
"mongoose-paginate-v2": "^1.9.1"
|
|
31
43
|
},
|
|
32
44
|
"devDependencies": {
|
|
33
|
-
"@eslint/js": "^9.
|
|
45
|
+
"@eslint/js": "^9.39.2",
|
|
34
46
|
"@types/node": "^24.10.1",
|
|
35
|
-
"
|
|
36
|
-
"eslint": "^
|
|
37
|
-
"
|
|
38
|
-
"globals": "^16.3.0",
|
|
39
|
-
"mocha": "^11.7.1",
|
|
40
|
-
"nyc": "^17.1.0",
|
|
41
|
-
"proxyquire": "^2.1.3",
|
|
42
|
-
"sinon": "^21.0.0",
|
|
43
|
-
"supertest": "^7.1.4",
|
|
44
|
-
"tsup": "^8.5.0",
|
|
47
|
+
"eslint": "^9.39.2",
|
|
48
|
+
"eslint-plugin-n": "^17.24.0",
|
|
49
|
+
"tsup": "^8.5.1",
|
|
45
50
|
"typescript": "^5.9.3"
|
|
46
51
|
}
|
|
47
|
-
}
|
|
52
|
+
}
|
package/tsconfig.json
CHANGED
package/dist/chunk-AOC7BD5E.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
|
-
}) : x)(function(x) {
|
|
8
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
|
-
});
|
|
11
|
-
var __esm = (fn, res) => function __init() {
|
|
12
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
13
|
-
};
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __export = (target, all) => {
|
|
18
|
-
for (var name in all)
|
|
19
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
20
|
-
};
|
|
21
|
-
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
for (let key of __getOwnPropNames(from))
|
|
24
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
-
}
|
|
27
|
-
return to;
|
|
28
|
-
};
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// app/types/alarm.types.ts
|
|
32
|
-
var alarm_types_exports = {};
|
|
33
|
-
__export(alarm_types_exports, {
|
|
34
|
-
AlarmPriorities: () => AlarmPriorities,
|
|
35
|
-
AlarmTypes: () => AlarmTypes,
|
|
36
|
-
CloudAlarmStates: () => CloudAlarmStates,
|
|
37
|
-
DiamarAlarmStates: () => DiamarAlarmStates
|
|
38
|
-
});
|
|
39
|
-
var AlarmPriorities, DiamarAlarmStates, CloudAlarmStates, AlarmTypes;
|
|
40
|
-
var init_alarm_types = __esm({
|
|
41
|
-
"app/types/alarm.types.ts"() {
|
|
42
|
-
"use strict";
|
|
43
|
-
AlarmPriorities = {
|
|
44
|
-
CRITICAL: "Critical",
|
|
45
|
-
ALARM: "Alarm",
|
|
46
|
-
WARNING: "Warning"
|
|
47
|
-
};
|
|
48
|
-
DiamarAlarmStates = {
|
|
49
|
-
INACTIVE: "Inactive",
|
|
50
|
-
ACKNOWLEDGED: "Acknowledged",
|
|
51
|
-
ACTIVE: "Active",
|
|
52
|
-
UNACKNOWLEDGED: "Unacknowledged",
|
|
53
|
-
UNDEFINED: "Undefined"
|
|
54
|
-
};
|
|
55
|
-
CloudAlarmStates = {
|
|
56
|
-
INACTIVE: "Inactive",
|
|
57
|
-
ALARM: "Active",
|
|
58
|
-
ALARM_ACK: "Acknowledged",
|
|
59
|
-
WARNING: "WarningActive",
|
|
60
|
-
WARNING_ACK: "WarningAcknowledged",
|
|
61
|
-
RETURN_NO_ACK: "Unacknowledged",
|
|
62
|
-
INHIBITED: "Inhibited",
|
|
63
|
-
OFFSCAN: "Offscan",
|
|
64
|
-
UNDEFINED: "Undefined"
|
|
65
|
-
};
|
|
66
|
-
AlarmTypes = {
|
|
67
|
-
NORMAL: "Normal",
|
|
68
|
-
ALARM_OPEN: "AlarmOpen",
|
|
69
|
-
ALARM_CLOSE: "AlarmClose",
|
|
70
|
-
ALARM_IFH: "AlarmIfh",
|
|
71
|
-
ALARM_HH: "AlarmHh",
|
|
72
|
-
ALARM_H: "AlarmH",
|
|
73
|
-
ALARM_L: "AlarmL",
|
|
74
|
-
ALARM_LL: "AlarmLl",
|
|
75
|
-
ALARM_IFL: "AlarmIfl",
|
|
76
|
-
ALARM_OFFSCAN: "AlarmOffScan",
|
|
77
|
-
ALARM_FAIL: "AlarmFail",
|
|
78
|
-
ALARM_INH: "AlarmInh",
|
|
79
|
-
ALARM_UNK: "AlarmUnk"
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// app/types/event.types.ts
|
|
85
|
-
var event_types_exports = {};
|
|
86
|
-
__export(event_types_exports, {
|
|
87
|
-
EventCategories: () => EventCategories,
|
|
88
|
-
EventCriticalities: () => EventCriticalities
|
|
89
|
-
});
|
|
90
|
-
var EventCategories, EventCriticalities;
|
|
91
|
-
var init_event_types = __esm({
|
|
92
|
-
"app/types/event.types.ts"() {
|
|
93
|
-
"use strict";
|
|
94
|
-
EventCategories = {
|
|
95
|
-
ACCESS_CONTROL: "AccessControl",
|
|
96
|
-
REQUEST_ERROR: "RequestErrors",
|
|
97
|
-
OS: "OperatingSystemEvents",
|
|
98
|
-
CONTROL: "ControlSystemEvents",
|
|
99
|
-
BACKUP: "BackupAndRestoreEvents",
|
|
100
|
-
CONFIG_CHANGE: "ConfigurationChanges",
|
|
101
|
-
LOGS: "AuditLogEvents",
|
|
102
|
-
POTENTIAL_ATTACK: "PotentialAttackActivity"
|
|
103
|
-
};
|
|
104
|
-
EventCriticalities = {
|
|
105
|
-
VERBOSE: "Verbose",
|
|
106
|
-
INFO: "Info",
|
|
107
|
-
WARNING: "Warning",
|
|
108
|
-
ERROR: "Error",
|
|
109
|
-
CRITICAL: "Critical"
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// app/types/unit.types.ts
|
|
115
|
-
var unit_types_exports = {};
|
|
116
|
-
__export(unit_types_exports, {
|
|
117
|
-
UnitTypes: () => UnitTypes
|
|
118
|
-
});
|
|
119
|
-
var UnitTypes;
|
|
120
|
-
var init_unit_types = __esm({
|
|
121
|
-
"app/types/unit.types.ts"() {
|
|
122
|
-
"use strict";
|
|
123
|
-
UnitTypes = {
|
|
124
|
-
AIM18: "Aim18",
|
|
125
|
-
DIM36: "Dim36",
|
|
126
|
-
DIOM24: "Diom24",
|
|
127
|
-
KLIM: "Klim",
|
|
128
|
-
LUM: "Lum",
|
|
129
|
-
PMM: "Pmm",
|
|
130
|
-
SLIM: "Slim",
|
|
131
|
-
TIM28: "Tim28"
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export {
|
|
137
|
-
__require,
|
|
138
|
-
__commonJS,
|
|
139
|
-
__toCommonJS,
|
|
140
|
-
AlarmPriorities,
|
|
141
|
-
DiamarAlarmStates,
|
|
142
|
-
CloudAlarmStates,
|
|
143
|
-
AlarmTypes,
|
|
144
|
-
alarm_types_exports,
|
|
145
|
-
init_alarm_types,
|
|
146
|
-
EventCategories,
|
|
147
|
-
EventCriticalities,
|
|
148
|
-
event_types_exports,
|
|
149
|
-
init_event_types,
|
|
150
|
-
UnitTypes,
|
|
151
|
-
unit_types_exports,
|
|
152
|
-
init_unit_types
|
|
153
|
-
};
|
package/dist/chunk-NCUZ3O3P.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
|
-
}) : x)(function(x) {
|
|
8
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
|
-
});
|
|
11
|
-
var __esm = (fn, res) => function __init() {
|
|
12
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
13
|
-
};
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __export = (target, all) => {
|
|
18
|
-
for (var name in all)
|
|
19
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
20
|
-
};
|
|
21
|
-
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
for (let key of __getOwnPropNames(from))
|
|
24
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
-
}
|
|
27
|
-
return to;
|
|
28
|
-
};
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// app/types/alarm.types.ts
|
|
32
|
-
var alarm_types_exports = {};
|
|
33
|
-
__export(alarm_types_exports, {
|
|
34
|
-
AlarmPriorities: () => AlarmPriorities,
|
|
35
|
-
AlarmTypes: () => AlarmTypes,
|
|
36
|
-
CloudAlarmStates: () => CloudAlarmStates,
|
|
37
|
-
DiamarAlarmStates: () => DiamarAlarmStates
|
|
38
|
-
});
|
|
39
|
-
var AlarmPriorities, DiamarAlarmStates, CloudAlarmStates, AlarmTypes;
|
|
40
|
-
var init_alarm_types = __esm({
|
|
41
|
-
"app/types/alarm.types.ts"() {
|
|
42
|
-
"use strict";
|
|
43
|
-
AlarmPriorities = {
|
|
44
|
-
CRITICAL: "Critical",
|
|
45
|
-
ALARM: "Alarm",
|
|
46
|
-
WARNING: "Warning"
|
|
47
|
-
};
|
|
48
|
-
DiamarAlarmStates = {
|
|
49
|
-
INACTIVE: "Inactive",
|
|
50
|
-
ACKNOWLEDGED: "Acknowledged",
|
|
51
|
-
ACTIVE: "Active",
|
|
52
|
-
UNACKNOWLEDGED: "Unacknowledged",
|
|
53
|
-
UNDEFINED: "Undefined"
|
|
54
|
-
};
|
|
55
|
-
CloudAlarmStates = {
|
|
56
|
-
INACTIVE: "Inactive",
|
|
57
|
-
ALARM: "Active",
|
|
58
|
-
ALARM_ACK: "Acknowledged",
|
|
59
|
-
WARNING: "WarningActive",
|
|
60
|
-
WARNING_ACK: "WarningAcknowledged",
|
|
61
|
-
RETURN_NO_ACK: "Unacknowledged",
|
|
62
|
-
INHIBITED: "Inhibited",
|
|
63
|
-
OFFSCAN: "Offscan",
|
|
64
|
-
UNDEFINED: "Undefined"
|
|
65
|
-
};
|
|
66
|
-
AlarmTypes = {
|
|
67
|
-
NORMAL: "Normal",
|
|
68
|
-
ALARM_OPEN: "AlarmOpen",
|
|
69
|
-
ALARM_CLOSE: "AlarmClose",
|
|
70
|
-
ALARM_IFH: "AlarmIfh",
|
|
71
|
-
ALARM_HH: "AlarmHh",
|
|
72
|
-
ALARM_H: "AlarmH",
|
|
73
|
-
ALARM_L: "AlarmL",
|
|
74
|
-
ALARM_LL: "AlarmLl",
|
|
75
|
-
ALARM_IFL: "AlarmIfl",
|
|
76
|
-
ALARM_OFFSCAN: "AlarmOffScan",
|
|
77
|
-
ALARM_FAIL: "AlarmFail",
|
|
78
|
-
ALARM_INH: "AlarmInh",
|
|
79
|
-
ALARM_UNK: "AlarmUnk"
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// app/types/event.types.ts
|
|
85
|
-
var event_types_exports = {};
|
|
86
|
-
__export(event_types_exports, {
|
|
87
|
-
EventCategories: () => EventCategories,
|
|
88
|
-
EventCriticalities: () => EventCriticalities
|
|
89
|
-
});
|
|
90
|
-
var EventCategories, EventCriticalities;
|
|
91
|
-
var init_event_types = __esm({
|
|
92
|
-
"app/types/event.types.ts"() {
|
|
93
|
-
"use strict";
|
|
94
|
-
EventCategories = {
|
|
95
|
-
ACCESS_CONTROL: "AccessControl",
|
|
96
|
-
REQUEST_ERROR: "RequestErrors",
|
|
97
|
-
OS: "OperatingSystemEvents",
|
|
98
|
-
CONTROL: "ControlSystemEvents",
|
|
99
|
-
BACKUP: "BackupAndRestoreEvents",
|
|
100
|
-
CONFIG_CHANGE: "ConfigurationChanges",
|
|
101
|
-
LOGS: "AuditLogEvents",
|
|
102
|
-
POTENTIAL_ATTACK: "PotentialAttackActivity"
|
|
103
|
-
};
|
|
104
|
-
EventCriticalities = {
|
|
105
|
-
VERBOSE: "Verbose",
|
|
106
|
-
INFO: "Info",
|
|
107
|
-
WARNING: "Warning",
|
|
108
|
-
ERROR: "Error",
|
|
109
|
-
CRITICAL: "Critical"
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// app/types/unit.types.ts
|
|
115
|
-
var unit_types_exports = {};
|
|
116
|
-
__export(unit_types_exports, {
|
|
117
|
-
UnitTypes: () => UnitTypes
|
|
118
|
-
});
|
|
119
|
-
var UnitTypes;
|
|
120
|
-
var init_unit_types = __esm({
|
|
121
|
-
"app/types/unit.types.ts"() {
|
|
122
|
-
"use strict";
|
|
123
|
-
UnitTypes = {
|
|
124
|
-
AIM18: "Aim18",
|
|
125
|
-
DIM36: "Dim36",
|
|
126
|
-
DIOM24: "Diom24",
|
|
127
|
-
KLIM: "Klim",
|
|
128
|
-
LUM: "Lum",
|
|
129
|
-
PMM: "Pmm",
|
|
130
|
-
SLIM: "Slim",
|
|
131
|
-
TIM28: "Tim28"
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export {
|
|
137
|
-
__require,
|
|
138
|
-
__commonJS,
|
|
139
|
-
__toCommonJS,
|
|
140
|
-
AlarmPriorities,
|
|
141
|
-
DiamarAlarmStates,
|
|
142
|
-
CloudAlarmStates,
|
|
143
|
-
AlarmTypes,
|
|
144
|
-
alarm_types_exports,
|
|
145
|
-
init_alarm_types,
|
|
146
|
-
EventCategories,
|
|
147
|
-
event_types_exports,
|
|
148
|
-
init_event_types,
|
|
149
|
-
UnitTypes,
|
|
150
|
-
unit_types_exports,
|
|
151
|
-
init_unit_types
|
|
152
|
-
};
|