taon 21.0.29 → 21.0.34
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/browser/fesm2022/taon-browser.mjs +2 -14
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon-browser.d.ts +76 -78
- package/browser-prod/fesm2022/taon-browser.mjs +770 -788
- package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
- package/browser-prod/package.json +23 -0
- package/browser-prod/types/taon-browser.d.ts +495 -513
- package/browser-prod.split-namespaces.json +186 -0
- package/icon-menu-taon.svg +15 -15
- package/lib/base-classes/base-controller.d.ts +2 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/decorators/http/http-decorators.d.ts +2 -1
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib/decorators/http/http-params-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +2 -1
- package/lib/endpoint-context.js.map +1 -1
- package/lib/index.d.ts +3 -5
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +2 -3
- package/lib/models.js +0 -7
- package/lib/models.js.map +1 -1
- package/lib/package.json +4 -0
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-class.js +1 -1
- package/lib-prod/base-classes/base-class.js.map +1 -1
- package/lib-prod/base-classes/base-context.d.ts +1 -1
- package/lib-prod/base-classes/base-controller.d.ts +5 -4
- package/lib-prod/base-classes/base-controller.js +2 -2
- package/lib-prod/base-classes/base-controller.js.map +1 -1
- package/lib-prod/base-classes/base-crud-controller.d.ts +13 -13
- package/lib-prod/base-classes/base-crud-controller.js +8 -9
- package/lib-prod/base-classes/base-crud-controller.js.map +1 -1
- package/lib-prod/base-classes/base-injector.js +11 -11
- package/lib-prod/base-classes/base-injector.js.map +1 -1
- package/lib-prod/base-classes/base-middleware.d.ts +2 -2
- package/lib-prod/base-classes/base-migration.js +3 -3
- package/lib-prod/base-classes/base-migration.js.map +1 -1
- package/lib-prod/base-classes/base-repository.js +4 -4
- package/lib-prod/base-classes/base-repository.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/config/method-config.d.ts +2 -2
- package/lib-prod/config/param-config.d.ts +2 -2
- package/lib-prod/context-db-migrations.js +12 -12
- package/lib-prod/context-db-migrations.js.map +1 -1
- package/lib-prod/create-context.d.ts +5 -5
- package/lib-prod/create-context.js +3 -3
- package/lib-prod/create-context.js.map +1 -1
- package/lib-prod/decorators/classes/controller-decorator.js +3 -3
- package/lib-prod/decorators/classes/controller-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/entity-decorator.d.ts +3 -3
- package/lib-prod/decorators/classes/entity-decorator.js +5 -5
- package/lib-prod/decorators/classes/entity-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/middleware-decorator.js +3 -3
- package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/migration-decorator.js +3 -3
- package/lib-prod/decorators/classes/migration-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/provider-decorator.js +3 -3
- package/lib-prod/decorators/classes/provider-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/repository-decorator.js +3 -3
- package/lib-prod/decorators/classes/repository-decorator.js.map +1 -1
- package/lib-prod/decorators/classes/subscriber-decorator.js +3 -3
- package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib-prod/decorators/http/http-decorators.d.ts +3 -2
- package/lib-prod/decorators/http/http-decorators.js +2 -2
- package/lib-prod/decorators/http/http-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-methods-decorators.d.ts +5 -5
- package/lib-prod/decorators/http/http-methods-decorators.js +2 -2
- package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js +1 -1
- package/lib-prod/decorators/http/http-params-decorators.js.map +1 -1
- package/lib-prod/endpoint-context-storage.js +1 -1
- package/lib-prod/endpoint-context-storage.js.map +1 -1
- package/lib-prod/endpoint-context.d.ts +14 -13
- package/lib-prod/endpoint-context.js +171 -171
- package/lib-prod/endpoint-context.js.map +1 -1
- package/lib-prod/entity-process.js +14 -14
- package/lib-prod/entity-process.js.map +1 -1
- package/lib-prod/formly/fromly.d.ts +2 -2
- package/lib-prod/formly/fromly.js +1 -1
- package/lib-prod/formly/fromly.js.map +1 -1
- package/lib-prod/formly/type-from-entity.js +2 -2
- package/lib-prod/formly/type-from-entity.js.map +1 -1
- package/lib-prod/get-response-value.d.ts +2 -2
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +3 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +0 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +1 -1
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +12 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +2 -2
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +0 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +1 -1
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +1 -3
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -8
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +1 -1
- package/lib-prod/helpers/class-helpers.d.ts +20 -22
- package/lib-prod/helpers/class-helpers.js +231 -218
- package/lib-prod/helpers/class-helpers.js.map +1 -1
- package/lib-prod/helpers/taon-helpers.d.ts +14 -16
- package/lib-prod/helpers/taon-helpers.js +148 -138
- package/lib-prod/helpers/taon-helpers.js.map +1 -1
- package/lib-prod/index.d.ts +80 -84
- package/lib-prod/index.js +71 -70
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/inject.js +3 -3
- package/lib-prod/inject.js.map +1 -1
- package/lib-prod/models.d.ts +242 -247
- package/lib-prod/models.js +83 -91
- package/lib-prod/models.js.map +1 -1
- package/lib-prod/package.json +4 -0
- package/lib-prod/realtime/realtime-client.d.ts +2 -2
- package/lib-prod/realtime/realtime-client.js +9 -9
- package/lib-prod/realtime/realtime-client.js.map +1 -1
- package/lib-prod/realtime/realtime-server.js +17 -17
- package/lib-prod/realtime/realtime-server.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +3 -3
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib-prod/realtime/realtime-subs-manager.d.ts +2 -2
- package/lib-prod/realtime/realtime-subs-manager.js +6 -6
- package/lib-prod/realtime/realtime-subs-manager.js.map +1 -1
- package/lib-prod/realtime/realtime.models.d.ts +23 -25
- package/lib-prod/realtime/realtime.models.js +1 -0
- package/lib-prod/realtime/realtime.models.js.map +1 -1
- package/lib-prod/symbols.d.ts +39 -41
- package/lib-prod/symbols.js +44 -45
- package/lib-prod/symbols.js.map +1 -1
- package/lib-prod/ui/index.d.ts +1 -1
- package/lib-prod/ui/index.js +2 -2
- package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/validators.d.ts +4 -6
- package/lib-prod/validators.js +50 -47
- package/lib-prod/validators.js.map +1 -1
- package/lib-prod.split-namespaces.json +188 -0
- package/package.json +28 -6
- package/websql/fesm2022/taon-websql.mjs +2 -10
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon-websql.d.ts +76 -78
- package/websql-prod/fesm2022/taon-websql.mjs +855 -870
- package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
- package/websql-prod/package.json +23 -0
- package/websql-prod/types/taon-websql.d.ts +498 -516
- package/websql-prod.split-namespaces.json +188 -0
- package/migrations/index.d.ts +0 -1
- package/migrations/index.js +0 -19
- package/migrations/index.js.map +0 -1
- package/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/migrations/migrations_index._auto-generated_.js +0 -4
- package/migrations/migrations_index._auto-generated_.js.map +0 -1
|
@@ -1,152 +1,162 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TaonHelpers_websqlMocks = exports.TaonHelpers_ipcKeyNameRequest = exports.TaonHelpers_ipcKeyNameResponse = exports.TaonHelpers_isPlainFileOrFolder = exports.TaonHelpers_parseJSONwithStringJSONs = exports.TaonHelpers_defaultType = exports.TaonHelpers_getExpressPath = exports.TaonHelpers_tryTransformParam = exports.TaonHelpers_firstStringOrElemFromArray = exports.TaonHelpers_isGoodPath = exports.TaonHelpers_fillUpTo = void 0;
|
|
4
4
|
const JSON5 = require("json5");
|
|
5
5
|
const lib_prod_1 = require("tnp-core/lib-prod");
|
|
6
6
|
const class_helpers_1 = require("./class-helpers");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return s.charAt(n);
|
|
14
|
-
}
|
|
15
|
-
return ' ';
|
|
16
|
-
}).join('');
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region is good path
|
|
20
|
-
TaonHelpers.isGoodPath = (p) => {
|
|
21
|
-
return p && typeof p === 'string' && p.trim() !== '';
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
TaonHelpers.firstStringOrElemFromArray = (stringOrArrayOfString) => {
|
|
25
|
-
if (Array.isArray(stringOrArrayOfString)) {
|
|
26
|
-
return lib_prod_1._.first(stringOrArrayOfString);
|
|
7
|
+
//namespace TaonHelpers
|
|
8
|
+
//#region fillUpTo string
|
|
9
|
+
const TaonHelpers_fillUpTo = (s, nCharacters) => {
|
|
10
|
+
return lib_prod_1._.times(nCharacters, n => {
|
|
11
|
+
if (s.charAt(n)) {
|
|
12
|
+
return s.charAt(n);
|
|
27
13
|
}
|
|
28
|
-
return
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
14
|
+
return ' ';
|
|
15
|
+
}).join('');
|
|
16
|
+
};
|
|
17
|
+
exports.TaonHelpers_fillUpTo = TaonHelpers_fillUpTo;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region is good path
|
|
20
|
+
const TaonHelpers_isGoodPath = (p) => {
|
|
21
|
+
return p && typeof p === 'string' && p.trim() !== '';
|
|
22
|
+
};
|
|
23
|
+
exports.TaonHelpers_isGoodPath = TaonHelpers_isGoodPath;
|
|
24
|
+
//#endregion
|
|
25
|
+
const TaonHelpers_firstStringOrElemFromArray = (stringOrArrayOfString) => {
|
|
26
|
+
if (Array.isArray(stringOrArrayOfString)) {
|
|
27
|
+
return lib_prod_1._.first(stringOrArrayOfString);
|
|
28
|
+
}
|
|
29
|
+
return stringOrArrayOfString;
|
|
30
|
+
};
|
|
31
|
+
exports.TaonHelpers_firstStringOrElemFromArray = TaonHelpers_firstStringOrElemFromArray;
|
|
32
|
+
//#region try transform params
|
|
33
|
+
const TaonHelpers_tryTransformParam = param => {
|
|
34
|
+
if (typeof param === 'string') {
|
|
35
|
+
let n = Number(param);
|
|
36
|
+
if (!isNaN(n))
|
|
37
|
+
return n;
|
|
38
|
+
const bool = param.trim().toLowerCase();
|
|
39
|
+
if (bool === 'true') {
|
|
40
|
+
return true;
|
|
50
41
|
}
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region get expores path
|
|
55
|
-
TaonHelpers.getExpressPath = (c, pathOrClassConfig) => {
|
|
56
|
-
if (typeof pathOrClassConfig === 'string')
|
|
57
|
-
return `${c.calculatedPath}${pathOrClassConfig}`.replace(/\/$/, '');
|
|
58
|
-
return `${c.calculatedPath}${pathOrClassConfig.path}`.replace(/\/$/, '');
|
|
59
|
-
};
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region get default value tyep
|
|
62
|
-
TaonHelpers.defaultType = value => {
|
|
63
|
-
if (typeof value === 'string')
|
|
64
|
-
return '';
|
|
65
|
-
if (typeof value === 'boolean')
|
|
42
|
+
if (bool === 'false') {
|
|
66
43
|
return false;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const t = JSON5.parse(param);
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
return param;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return param;
|
|
54
|
+
};
|
|
55
|
+
exports.TaonHelpers_tryTransformParam = TaonHelpers_tryTransformParam;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region get expores path
|
|
58
|
+
const TaonHelpers_getExpressPath = (c, pathOrClassConfig) => {
|
|
59
|
+
if (typeof pathOrClassConfig === 'string')
|
|
60
|
+
return `${c.calculatedPath}${pathOrClassConfig}`.replace(/\/$/, '');
|
|
61
|
+
return `${c.calculatedPath}${pathOrClassConfig.path}`.replace(/\/$/, '');
|
|
62
|
+
};
|
|
63
|
+
exports.TaonHelpers_getExpressPath = TaonHelpers_getExpressPath;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region get default value tyep
|
|
66
|
+
const TaonHelpers_defaultType = value => {
|
|
67
|
+
if (typeof value === 'string')
|
|
68
|
+
return '';
|
|
69
|
+
if (typeof value === 'boolean')
|
|
70
|
+
return false;
|
|
71
|
+
if (Array.isArray(value))
|
|
72
|
+
return {};
|
|
73
|
+
if (typeof value === 'object')
|
|
74
|
+
return {};
|
|
75
|
+
};
|
|
76
|
+
exports.TaonHelpers_defaultType = TaonHelpers_defaultType;
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region parse json with string jsons
|
|
79
|
+
const TaonHelpers_parseJSONwithStringJSONs = (object, waring = false) => {
|
|
80
|
+
// console.log('checking object', object)
|
|
81
|
+
if (!lib_prod_1._.isObject(object)) {
|
|
82
|
+
if (waring) {
|
|
83
|
+
console.error(`
|
|
79
84
|
parseJSONwithStringJSONs(...)
|
|
80
85
|
Parameter should be a object, but is ${typeof object}
|
|
81
86
|
`, object);
|
|
82
|
-
}
|
|
83
|
-
return object;
|
|
84
87
|
}
|
|
85
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
88
|
+
return object;
|
|
89
|
+
}
|
|
90
|
+
let res = lib_prod_1._.cloneDeep(object);
|
|
91
|
+
Object.keys(res).forEach(key => {
|
|
92
|
+
let isJson = false;
|
|
93
|
+
try {
|
|
94
|
+
const possibleJSON = JSON.parse(res[key]);
|
|
95
|
+
res[key] = possibleJSON;
|
|
96
|
+
isJson = true;
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
isJson = false;
|
|
100
|
+
}
|
|
101
|
+
// console.log(`key ${key} is json `, isJson)
|
|
102
|
+
if (isJson) {
|
|
103
|
+
res[key] = (0, exports.TaonHelpers_parseJSONwithStringJSONs)(res[key], false);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return res;
|
|
107
|
+
};
|
|
108
|
+
exports.TaonHelpers_parseJSONwithStringJSONs = TaonHelpers_parseJSONwithStringJSONs;
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region is plain file or folder
|
|
111
|
+
const TaonHelpers_isPlainFileOrFolder = filePath => {
|
|
112
|
+
return /^([a-zA-Z]|\-|\_|\@|\#|\$|\!|\^|\&|\*|\(|\))+$/.test(filePath);
|
|
113
|
+
};
|
|
114
|
+
exports.TaonHelpers_isPlainFileOrFolder = TaonHelpers_isPlainFileOrFolder;
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region ips key name repsonse
|
|
117
|
+
const TaonHelpers_ipcKeyNameResponse = (target, methodConfig, expressPath) => {
|
|
118
|
+
return [
|
|
119
|
+
'response',
|
|
120
|
+
(0, class_helpers_1.ClassHelpers_getName)(target),
|
|
121
|
+
methodConfig.methodName,
|
|
122
|
+
methodConfig.type,
|
|
123
|
+
expressPath,
|
|
124
|
+
].join('--');
|
|
125
|
+
};
|
|
126
|
+
exports.TaonHelpers_ipcKeyNameResponse = TaonHelpers_ipcKeyNameResponse;
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region ipc key name request
|
|
129
|
+
const TaonHelpers_ipcKeyNameRequest = (target, methodConfig, expressPath) => {
|
|
130
|
+
return [
|
|
131
|
+
'request',
|
|
132
|
+
(0, class_helpers_1.ClassHelpers_getName)(target),
|
|
133
|
+
methodConfig.methodName,
|
|
134
|
+
methodConfig.type,
|
|
135
|
+
expressPath,
|
|
136
|
+
].join('--');
|
|
137
|
+
};
|
|
138
|
+
exports.TaonHelpers_ipcKeyNameRequest = TaonHelpers_ipcKeyNameRequest;
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region websql mocks
|
|
141
|
+
const TaonHelpers_websqlMocks = headers => {
|
|
142
|
+
const response = {
|
|
143
|
+
status(status) {
|
|
144
|
+
// console.log({status})
|
|
145
|
+
return {
|
|
146
|
+
send(send) {
|
|
147
|
+
// console.log({status})
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
setHeader(key, value) {
|
|
152
|
+
// console.log('Dummy set header', arguments)
|
|
153
|
+
headers[key] = value;
|
|
154
|
+
},
|
|
149
155
|
};
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
const request = {};
|
|
157
|
+
return { request, response };
|
|
158
|
+
};
|
|
159
|
+
exports.TaonHelpers_websqlMocks = TaonHelpers_websqlMocks;
|
|
160
|
+
//#endregion
|
|
161
|
+
//end of namespace TaonHelpers
|
|
152
162
|
//# sourceMappingURL=taon-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taon-helpers.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,gDAAsC;AAMtC,
|
|
1
|
+
{"version":3,"file":"taon-helpers.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,gDAAsC;AAMtC,mDAA6c;AAE7c,uBAAuB;AAErB,yBAAyB;AAClB,MAAM,oBAAoB,GAAG,CAAC,CAAS,EAAE,WAAmB,EAAE,EAAE;IACrE,OAAO,YAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;QAC9B,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YAChB,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC;AAPW,QAAA,oBAAoB,wBAO/B;AACF,YAAY;AAEZ,sBAAsB;AACf,MAAM,sBAAsB,GAAG,CAAC,CAAS,EAAE,EAAE;IAClD,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC;AACF,YAAY;AAEL,MAAM,sCAAsC,GAAG,CACpD,qBAAwC,EAChC,EAAE;IACV,IAAI,KAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACzC,OAAO,YAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,qBAAqB,CAAC;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AAK,CAAC;QACvB,CAAC;KACF,CAAC;IACF,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC,CAAC;AAjBW,QAAA,uBAAuB,2BAiBlC;AACF,YAAY;AAEd,8BAA8B"}
|
package/lib-prod/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import 'reflect-metadata';
|
|
|
2
2
|
import { RestErrorResponseWrapper } from 'ng2-rest/lib-prod';
|
|
3
3
|
import * as endpointContext from './endpoint-context';
|
|
4
4
|
import * as models from './models';
|
|
5
|
-
import * as allSymbols from './symbols';
|
|
6
5
|
export * from './constants';
|
|
7
6
|
export * from './context-db-migrations';
|
|
8
7
|
export * from './create-context';
|
|
@@ -58,91 +57,88 @@ export * from './realtime/realtime-strategy/realtime-strategy-mock';
|
|
|
58
57
|
export * from './realtime/realtime-strategy/realtime-strategy-socket-io';
|
|
59
58
|
export * from './realtime/realtime-strategy/realtime-strategy';
|
|
60
59
|
export type { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions, } from 'ng2-rest/lib-prod';
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
readonly
|
|
93
|
-
|
|
94
|
-
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
95
|
-
};
|
|
60
|
+
/**
|
|
61
|
+
* Remove global taon loader from env.ts [loading.preAngularBootstrap]
|
|
62
|
+
*/
|
|
63
|
+
export declare const Taon_removeLoader: (afterMS?: number) => Promise<void>;
|
|
64
|
+
export declare const Taon_error: (opt: Pick<RestErrorResponseWrapper, "message" | "status" | "details" | "code"> | string) => void;
|
|
65
|
+
export type Taon_ResponseHtml = models.Models_Http_Response<string>;
|
|
66
|
+
export type Taon_Response<T = string> = models.Models_Http_Response<T>;
|
|
67
|
+
export type Taon_StartParams = models.Models_StartParams;
|
|
68
|
+
export declare const Taon_getResponseValue: <T>(response: models.Models_Http_Response<T>, options?: {
|
|
69
|
+
req: import("express").Request<any>;
|
|
70
|
+
res: import("express").Response<any>;
|
|
71
|
+
}) => Promise<T>;
|
|
72
|
+
export declare const Taon_isBrowser: boolean;
|
|
73
|
+
export declare const Taon_isNode: boolean;
|
|
74
|
+
export declare const Taon_isWebSQL: boolean;
|
|
75
|
+
export declare const Taon_isElectron: boolean;
|
|
76
|
+
export declare const Taon_createContext: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARES extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => models.Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARES>) => {
|
|
77
|
+
readonly contextName: string;
|
|
78
|
+
readonly appId: string;
|
|
79
|
+
cloneAsRemote: (cloneOpt?: {
|
|
80
|
+
overrideRemoteHost?: string;
|
|
81
|
+
}) => /*elided*/ any;
|
|
82
|
+
cloneAsNormal: (cloneOpt?: {
|
|
83
|
+
overrideHost?: string;
|
|
84
|
+
}) => /*elided*/ any;
|
|
85
|
+
__ref(): Promise<endpointContext.EndpointContext>;
|
|
86
|
+
readonly __refSync: endpointContext.EndpointContext;
|
|
87
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
88
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
89
|
+
initialize: (overrideOptions?: models.Models_TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
90
|
+
readonly realtime: {
|
|
91
|
+
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
92
|
+
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
96
93
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
94
|
+
};
|
|
95
|
+
export declare const Taon_createContextTemplate: <CTX extends Record<string, object>, CTRL extends Record<string, new (...args: any[]) => any>, ENTITY extends Record<string, new (...args: any[]) => any>, REPO extends Record<string, new (...args: any[]) => any>, PROVIDER extends Record<string, new (...args: any[]) => any>, SUBSCRIBER extends Record<string, new (...args: any[]) => any>, MIGRATION extends Record<string, new (...args: any[]) => any>, MIDDLEWARE extends Record<string, new (...args: any[]) => any>>(configFn: (env: any) => models.Models_ContextOptions<CTX, CTRL, ENTITY, REPO, PROVIDER, SUBSCRIBER, MIGRATION, MIDDLEWARE>) => () => {
|
|
96
|
+
readonly contextName: string;
|
|
97
|
+
readonly appId: string;
|
|
98
|
+
cloneAsRemote: (cloneOpt?: {
|
|
99
|
+
overrideRemoteHost?: string;
|
|
100
|
+
}) => /*elided*/ any;
|
|
101
|
+
cloneAsNormal: (cloneOpt?: {
|
|
102
|
+
overrideHost?: string;
|
|
103
|
+
}) => /*elided*/ any;
|
|
104
|
+
__ref(): Promise<endpointContext.EndpointContext>;
|
|
105
|
+
readonly __refSync: endpointContext.EndpointContext;
|
|
106
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
107
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
108
|
+
initialize: (overrideOptions?: models.Models_TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
109
|
+
readonly realtime: {
|
|
110
|
+
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
111
|
+
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export declare const Taon_inject: <T>(entity: () => new (...args: any[]) => T) => T;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated
|
|
117
|
+
* use createContext instead
|
|
118
|
+
*/
|
|
119
|
+
export declare const Taon_init: (options: {
|
|
120
|
+
host: string;
|
|
121
|
+
entities: Function[];
|
|
122
|
+
controllers: Function[];
|
|
123
|
+
}) => Promise<{
|
|
124
|
+
readonly contextName: string;
|
|
125
|
+
readonly appId: string;
|
|
126
|
+
cloneAsRemote: (cloneOpt?: {
|
|
127
|
+
overrideRemoteHost?: string;
|
|
128
|
+
}) => /*elided*/ any;
|
|
129
|
+
cloneAsNormal: (cloneOpt?: {
|
|
130
|
+
overrideHost?: string;
|
|
131
|
+
}) => /*elided*/ any;
|
|
132
|
+
__ref(): Promise<endpointContext.EndpointContext>;
|
|
133
|
+
readonly __refSync: endpointContext.EndpointContext;
|
|
134
|
+
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
135
|
+
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
136
|
+
initialize: (overrideOptions?: models.Models_TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
137
|
+
readonly realtime: {
|
|
138
|
+
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
139
|
+
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
115
140
|
};
|
|
116
|
-
|
|
117
|
-
const symbols: typeof allSymbols.Symbols;
|
|
118
|
-
/**
|
|
119
|
-
* @deprecated
|
|
120
|
-
* use createContext instead
|
|
121
|
-
*/
|
|
122
|
-
const init: (options: {
|
|
123
|
-
host: string;
|
|
124
|
-
entities: Function[];
|
|
125
|
-
controllers: Function[];
|
|
126
|
-
}) => Promise<{
|
|
127
|
-
readonly contextName: string;
|
|
128
|
-
readonly appId: string;
|
|
129
|
-
cloneAsRemote: (cloneOpt?: {
|
|
130
|
-
overrideRemoteHost?: string;
|
|
131
|
-
}) => /*elided*/ any;
|
|
132
|
-
cloneAsNormal: (cloneOpt?: {
|
|
133
|
-
overrideHost?: string;
|
|
134
|
-
}) => /*elided*/ any;
|
|
135
|
-
__ref(): Promise<endpointContext.EndpointContext>;
|
|
136
|
-
readonly __refSync: endpointContext.EndpointContext;
|
|
137
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
138
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
139
|
-
initialize: (overrideOptions?: models.Models.TaonInitializeParams) => Promise<endpointContext.EndpointContext>;
|
|
140
|
-
readonly realtime: {
|
|
141
|
-
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
142
|
-
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
143
|
-
};
|
|
144
|
-
}>;
|
|
145
|
-
}
|
|
141
|
+
}>;
|
|
146
142
|
export declare const TAON_FLATTEN_MAPPING: {
|
|
147
143
|
'taon/src': {
|
|
148
144
|
'Taon.Http.GET': string;
|