@thzero/library_server 0.18.22 → 0.18.23
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/README.md +289 -112
- package/boot/index.js +529 -529
- package/boot/plugins/admin/index.js +6 -6
- package/boot/plugins/admin/news.js +33 -33
- package/boot/plugins/admin/users.js +33 -33
- package/boot/plugins/api.js +64 -64
- package/boot/plugins/apiFront.js +31 -31
- package/boot/plugins/index.js +70 -70
- package/boot/plugins/news.js +44 -44
- package/boot/plugins/users.js +46 -46
- package/boot/plugins/usersExtended.js +32 -32
- package/constants.js +45 -45
- package/data/baseNews.js +42 -42
- package/data/baseSettingsUser.js +9 -9
- package/data/baseUser.js +28 -28
- package/data/index.js +24 -24
- package/data/named.js +20 -20
- package/errors/tokenExpired.js +7 -7
- package/license.md +8 -8
- package/openSource.js +66 -66
- package/package.json +38 -38
- package/repository/index.js +182 -182
- package/repository/usageMetrics/devnull.js +16 -16
- package/routes/index.js +76 -76
- package/service/admin/baseNews.js +45 -45
- package/service/admin/index.js +130 -130
- package/service/admin/news.js +6 -6
- package/service/admin/users.js +107 -107
- package/service/baseSecurity.js +183 -183
- package/service/baseUser.js +122 -122
- package/service/communication.js +6 -6
- package/service/config.js +37 -37
- package/service/crypto.js +16 -16
- package/service/discovery/index.js +6 -6
- package/service/discovery/resources/index.js +101 -101
- package/service/external.js +19 -19
- package/service/externalRest.js +19 -19
- package/service/index.js +20 -20
- package/service/monitoring.js +12 -12
- package/service/news/base.js +59 -59
- package/service/news/index.js +6 -6
- package/service/news/validation/index.js +6 -6
- package/service/plans.js +31 -31
- package/service/restCommunication.js +21 -21
- package/service/usageMetrics.js +84 -84
- package/service/utility.js +190 -190
- package/service/version.js +37 -37
- package/utility/injector.js +59 -59
- package/utility/internalIp/index.js +48 -48
- package/utility/list/doubleLinked.js +88 -88
- package/utility/list/priorityQueue.js +109 -109
- package/utility/list/queue.js +72 -72
- package/utility/os.js +20 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BootPlugin from '../index.js';
|
|
2
|
-
|
|
3
|
-
class AdminBootPlugin extends BootPlugin {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export default AdminBootPlugin;
|
|
1
|
+
import BootPlugin from '../index.js';
|
|
2
|
+
|
|
3
|
+
class AdminBootPlugin extends BootPlugin {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export default AdminBootPlugin;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../../constants.js';
|
|
2
|
-
|
|
3
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
-
|
|
5
|
-
import AdminBootPlugin from './index.js';
|
|
6
|
-
|
|
7
|
-
class NewsAdminBootPlugin extends AdminBootPlugin {
|
|
8
|
-
async _initRoutes() {
|
|
9
|
-
this._initRoute(this._initRoutesAdminNews());
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async _initRepositories() {
|
|
13
|
-
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS, this._initRepositoriesAdminNews());
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async _initServices() {
|
|
17
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_NEWS, this._initServicesAdminNews());
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
_initRepositoriesAdminNews() {
|
|
21
|
-
throw new NotImplementedError();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_initRoutesAdminNews() {
|
|
25
|
-
throw new NotImplementedError();;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
_initServicesAdminNews() {
|
|
29
|
-
throw new NotImplementedError();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default NewsAdminBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../../constants.js';
|
|
2
|
+
|
|
3
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
+
|
|
5
|
+
import AdminBootPlugin from './index.js';
|
|
6
|
+
|
|
7
|
+
class NewsAdminBootPlugin extends AdminBootPlugin {
|
|
8
|
+
async _initRoutes() {
|
|
9
|
+
this._initRoute(this._initRoutesAdminNews());
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async _initRepositories() {
|
|
13
|
+
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS, this._initRepositoriesAdminNews());
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async _initServices() {
|
|
17
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_NEWS, this._initServicesAdminNews());
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_initRepositoriesAdminNews() {
|
|
21
|
+
throw new NotImplementedError();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_initRoutesAdminNews() {
|
|
25
|
+
throw new NotImplementedError();;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_initServicesAdminNews() {
|
|
29
|
+
throw new NotImplementedError();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default NewsAdminBootPlugin;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../../constants.js';
|
|
2
|
-
|
|
3
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
-
|
|
5
|
-
import AdminBootPlugin from './index.js';
|
|
6
|
-
|
|
7
|
-
class UsersAdminBootPlugin extends AdminBootPlugin {
|
|
8
|
-
async _initRoutes() {
|
|
9
|
-
this._initRoute(this._initRoutesAdminUsers());
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async _initRepositories() {
|
|
13
|
-
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_USERS, this._initRepositoriesAdminUsers());
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async _initServices() {
|
|
17
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_USERS, this._initServicesAdminUsers());
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
_initRepositoriesAdminUsers() {
|
|
21
|
-
throw new NotImplementedError();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_initRoutesAdminUsers() {
|
|
25
|
-
throw new NotImplementedError();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
_initServicesAdminUsers() {
|
|
29
|
-
throw new NotImplementedError();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default UsersAdminBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../../constants.js';
|
|
2
|
+
|
|
3
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
+
|
|
5
|
+
import AdminBootPlugin from './index.js';
|
|
6
|
+
|
|
7
|
+
class UsersAdminBootPlugin extends AdminBootPlugin {
|
|
8
|
+
async _initRoutes() {
|
|
9
|
+
this._initRoute(this._initRoutesAdminUsers());
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async _initRepositories() {
|
|
13
|
+
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_USERS, this._initRepositoriesAdminUsers());
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async _initServices() {
|
|
17
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_USERS, this._initServicesAdminUsers());
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_initRepositoriesAdminUsers() {
|
|
21
|
+
throw new NotImplementedError();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_initRoutesAdminUsers() {
|
|
25
|
+
throw new NotImplementedError();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_initServicesAdminUsers() {
|
|
29
|
+
throw new NotImplementedError();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default UsersAdminBootPlugin;
|
package/boot/plugins/api.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../constants.js';
|
|
2
|
-
import LibraryCommonServiceConstants from '@thzero/library_common_service/constants.js';
|
|
3
|
-
|
|
4
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
5
|
-
|
|
6
|
-
import BootPlugin from './index.js';
|
|
7
|
-
|
|
8
|
-
import cryptoService from '../../service/crypto.js';
|
|
9
|
-
import versionService from '../../service/version.js';
|
|
10
|
-
|
|
11
|
-
class ApiBootPlugin extends BootPlugin {
|
|
12
|
-
async _initRoutesPost() {
|
|
13
|
-
this._initRoute(this._initRoutesHome());
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async _initRoutesPre() {
|
|
17
|
-
const routeUsageMetrics = this._initRoutesUsageMetrics();
|
|
18
|
-
if (routeUsageMetrics)
|
|
19
|
-
this._initRoute(routeUsageMetrics);
|
|
20
|
-
this._initRoute(this._initRoutesVersion());
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async _initServices() {
|
|
24
|
-
const communicationRestService = this._initServicesCommunicationRest();
|
|
25
|
-
if (communicationRestService)
|
|
26
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_COMMUNICATION_REST, communicationRestService);
|
|
27
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_CRYPTO, this._initServicesCrypto());
|
|
28
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VERSION, this._initServicesVersion());
|
|
29
|
-
|
|
30
|
-
const validationServices = this._initServicesValidation();
|
|
31
|
-
if (validationServices)
|
|
32
|
-
this._injectService(LibraryCommonServiceConstants.InjectorKeys.SERVICE_VALIDATION, validationServices);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
_initRoutesHome() {
|
|
36
|
-
throw new NotImplementedError();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_initRoutesUsageMetrics() {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
_initRoutesVersion() {
|
|
44
|
-
throw new NotImplementedError();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
_initServicesCrypto() {
|
|
48
|
-
return new cryptoService();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_initServicesCommunicationRest() {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_initServicesValidation() {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
_initServicesVersion() {
|
|
60
|
-
return new versionService();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default ApiBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../constants.js';
|
|
2
|
+
import LibraryCommonServiceConstants from '@thzero/library_common_service/constants.js';
|
|
3
|
+
|
|
4
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
5
|
+
|
|
6
|
+
import BootPlugin from './index.js';
|
|
7
|
+
|
|
8
|
+
import cryptoService from '../../service/crypto.js';
|
|
9
|
+
import versionService from '../../service/version.js';
|
|
10
|
+
|
|
11
|
+
class ApiBootPlugin extends BootPlugin {
|
|
12
|
+
async _initRoutesPost() {
|
|
13
|
+
this._initRoute(this._initRoutesHome());
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async _initRoutesPre() {
|
|
17
|
+
const routeUsageMetrics = this._initRoutesUsageMetrics();
|
|
18
|
+
if (routeUsageMetrics)
|
|
19
|
+
this._initRoute(routeUsageMetrics);
|
|
20
|
+
this._initRoute(this._initRoutesVersion());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async _initServices() {
|
|
24
|
+
const communicationRestService = this._initServicesCommunicationRest();
|
|
25
|
+
if (communicationRestService)
|
|
26
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_COMMUNICATION_REST, communicationRestService);
|
|
27
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_CRYPTO, this._initServicesCrypto());
|
|
28
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VERSION, this._initServicesVersion());
|
|
29
|
+
|
|
30
|
+
const validationServices = this._initServicesValidation();
|
|
31
|
+
if (validationServices)
|
|
32
|
+
this._injectService(LibraryCommonServiceConstants.InjectorKeys.SERVICE_VALIDATION, validationServices);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_initRoutesHome() {
|
|
36
|
+
throw new NotImplementedError();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
_initRoutesUsageMetrics() {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
_initRoutesVersion() {
|
|
44
|
+
throw new NotImplementedError();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_initServicesCrypto() {
|
|
48
|
+
return new cryptoService();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_initServicesCommunicationRest() {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_initServicesValidation() {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
_initServicesVersion() {
|
|
60
|
+
return new versionService();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default ApiBootPlugin;
|
package/boot/plugins/apiFront.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../constants.js';
|
|
2
|
-
|
|
3
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
-
|
|
5
|
-
import ApiBootPlugin from './api.js';
|
|
6
|
-
|
|
7
|
-
import utilityService from '../../service/utility.js';
|
|
8
|
-
|
|
9
|
-
class FrontApiBootPlugin extends ApiBootPlugin {
|
|
10
|
-
async _initRoutesPre() {
|
|
11
|
-
super._initRoutesPre();
|
|
12
|
-
|
|
13
|
-
this._initRoute(this._initRoutesUtility());
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async _initServices() {
|
|
17
|
-
super._initServices();
|
|
18
|
-
|
|
19
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_UTILITY, this._initServicesUtility());
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
_initRoutesUtility() {
|
|
23
|
-
throw new NotImplementedError();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
_initServicesUtility() {
|
|
27
|
-
return new utilityService();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default FrontApiBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../constants.js';
|
|
2
|
+
|
|
3
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
+
|
|
5
|
+
import ApiBootPlugin from './api.js';
|
|
6
|
+
|
|
7
|
+
import utilityService from '../../service/utility.js';
|
|
8
|
+
|
|
9
|
+
class FrontApiBootPlugin extends ApiBootPlugin {
|
|
10
|
+
async _initRoutesPre() {
|
|
11
|
+
super._initRoutesPre();
|
|
12
|
+
|
|
13
|
+
this._initRoute(this._initRoutesUtility());
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async _initServices() {
|
|
17
|
+
super._initServices();
|
|
18
|
+
|
|
19
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_UTILITY, this._initServicesUtility());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_initRoutesUtility() {
|
|
23
|
+
throw new NotImplementedError();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_initServicesUtility() {
|
|
27
|
+
return new utilityService();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default FrontApiBootPlugin;
|
package/boot/plugins/index.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
class BootPlugin {
|
|
2
|
-
async init(config, injector) {
|
|
3
|
-
this._config = config;
|
|
4
|
-
this._injector = injector;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
async initRoutes(routes) {
|
|
8
|
-
this._routes = routes;
|
|
9
|
-
|
|
10
|
-
await this._initRoutesPre();
|
|
11
|
-
|
|
12
|
-
await this._initRoutes();
|
|
13
|
-
|
|
14
|
-
await this._initRoutesPost();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async initRepositories(repositories) {
|
|
18
|
-
this._repositories = repositories;
|
|
19
|
-
|
|
20
|
-
await this._initRepositories();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async initServices(services) {
|
|
24
|
-
this._services = services;
|
|
25
|
-
|
|
26
|
-
await this._initServices();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async initServicesSecondary(services) {
|
|
30
|
-
this._services = services;
|
|
31
|
-
|
|
32
|
-
await this._initServicesSecondary();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
_initRoute(route) {
|
|
36
|
-
this._routes.push(route);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async _initRoutes() {
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async _initRoutesPost() {
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async _initRoutesPre() {
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async _initRepositories() {
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_injectRepository(key, repository) {
|
|
52
|
-
console.log(`repositories.inject - ${key}`);
|
|
53
|
-
this._repositories.set(key, repository);
|
|
54
|
-
this._injector.addSingleton(key, repository);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_injectService(key, service) {
|
|
58
|
-
console.log(`services.inject - ${key}`);
|
|
59
|
-
this._services.set(key, service);
|
|
60
|
-
this._injector.addSingleton(key, service);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
async _initServices() {
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async _initServicesSecondary() {
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default BootPlugin;
|
|
1
|
+
class BootPlugin {
|
|
2
|
+
async init(config, injector) {
|
|
3
|
+
this._config = config;
|
|
4
|
+
this._injector = injector;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
async initRoutes(routes) {
|
|
8
|
+
this._routes = routes;
|
|
9
|
+
|
|
10
|
+
await this._initRoutesPre();
|
|
11
|
+
|
|
12
|
+
await this._initRoutes();
|
|
13
|
+
|
|
14
|
+
await this._initRoutesPost();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async initRepositories(repositories) {
|
|
18
|
+
this._repositories = repositories;
|
|
19
|
+
|
|
20
|
+
await this._initRepositories();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async initServices(services) {
|
|
24
|
+
this._services = services;
|
|
25
|
+
|
|
26
|
+
await this._initServices();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async initServicesSecondary(services) {
|
|
30
|
+
this._services = services;
|
|
31
|
+
|
|
32
|
+
await this._initServicesSecondary();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_initRoute(route) {
|
|
36
|
+
this._routes.push(route);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async _initRoutes() {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async _initRoutesPost() {
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async _initRoutesPre() {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async _initRepositories() {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_injectRepository(key, repository) {
|
|
52
|
+
console.log(`repositories.inject - ${key}`);
|
|
53
|
+
this._repositories.set(key, repository);
|
|
54
|
+
this._injector.addSingleton(key, repository);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_injectService(key, service) {
|
|
58
|
+
console.log(`services.inject - ${key}`);
|
|
59
|
+
this._services.set(key, service);
|
|
60
|
+
this._injector.addSingleton(key, service);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async _initServices() {
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async _initServicesSecondary() {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export default BootPlugin;
|
package/boot/plugins/news.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../constants.js';
|
|
2
|
-
|
|
3
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
-
|
|
5
|
-
import BootPlugin from './index.js';
|
|
6
|
-
|
|
7
|
-
class NewsApiBootPlugin extends BootPlugin {
|
|
8
|
-
async _initRoutes() {
|
|
9
|
-
await super._initRoutes();
|
|
10
|
-
|
|
11
|
-
this._initRoute(this._initRoutesNews());
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async _initRepositories() {
|
|
15
|
-
await super._initRepositories();
|
|
16
|
-
|
|
17
|
-
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_NEWS, this._initRepositoriesNews());
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async _initServices() {
|
|
21
|
-
await super._initServices();
|
|
22
|
-
|
|
23
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_NEWS, this._initServicesNews());
|
|
24
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VALIDATION_NEWS, this._initServicesNewsValidation());
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
_initRepositoriesNews() {
|
|
28
|
-
throw new NotImplementedError();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
_initRoutesNews() {
|
|
32
|
-
throw new NotImplementedError();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
_initServicesNews() {
|
|
36
|
-
throw new NotImplementedError();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_initServicesNewsValidation() {
|
|
40
|
-
throw new NotImplementedError();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default NewsApiBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../constants.js';
|
|
2
|
+
|
|
3
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
+
|
|
5
|
+
import BootPlugin from './index.js';
|
|
6
|
+
|
|
7
|
+
class NewsApiBootPlugin extends BootPlugin {
|
|
8
|
+
async _initRoutes() {
|
|
9
|
+
await super._initRoutes();
|
|
10
|
+
|
|
11
|
+
this._initRoute(this._initRoutesNews());
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async _initRepositories() {
|
|
15
|
+
await super._initRepositories();
|
|
16
|
+
|
|
17
|
+
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_NEWS, this._initRepositoriesNews());
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async _initServices() {
|
|
21
|
+
await super._initServices();
|
|
22
|
+
|
|
23
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_NEWS, this._initServicesNews());
|
|
24
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VALIDATION_NEWS, this._initServicesNewsValidation());
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_initRepositoriesNews() {
|
|
28
|
+
throw new NotImplementedError();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
_initRoutesNews() {
|
|
32
|
+
throw new NotImplementedError();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_initServicesNews() {
|
|
36
|
+
throw new NotImplementedError();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
_initServicesNewsValidation() {
|
|
40
|
+
throw new NotImplementedError();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default NewsApiBootPlugin;
|
package/boot/plugins/users.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import LibraryServerConstants from '../../constants.js';
|
|
2
|
-
|
|
3
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
-
|
|
5
|
-
import BootPlugin from './index.js';
|
|
6
|
-
|
|
7
|
-
class UsersApiBootPlugin extends BootPlugin {
|
|
8
|
-
async _initRoutes() {
|
|
9
|
-
await super._initRoutes();
|
|
10
|
-
|
|
11
|
-
const usersRoute = this._initRoutesUsers();
|
|
12
|
-
if (usersRoute)
|
|
13
|
-
this._initRoute(usersRoute);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async _initRepositories() {
|
|
17
|
-
await super._initRepositories();
|
|
18
|
-
|
|
19
|
-
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_USERS, this._initRepositoriesUsers());
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async _initServices() {
|
|
23
|
-
await super._initServices();
|
|
24
|
-
|
|
25
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_AUTH, this._initServicesAuth());
|
|
26
|
-
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_USERS, this._initServicesUser());
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
_initRepositoriesUsers() {
|
|
30
|
-
throw new NotImplementedError();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
_initRoutesUsers() {
|
|
34
|
-
throw new NotImplementedError();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
_initServicesAuth() {
|
|
38
|
-
throw new NotImplementedError();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
_initServicesUser() {
|
|
42
|
-
throw new NotImplementedError();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default UsersApiBootPlugin;
|
|
1
|
+
import LibraryServerConstants from '../../constants.js';
|
|
2
|
+
|
|
3
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
4
|
+
|
|
5
|
+
import BootPlugin from './index.js';
|
|
6
|
+
|
|
7
|
+
class UsersApiBootPlugin extends BootPlugin {
|
|
8
|
+
async _initRoutes() {
|
|
9
|
+
await super._initRoutes();
|
|
10
|
+
|
|
11
|
+
const usersRoute = this._initRoutesUsers();
|
|
12
|
+
if (usersRoute)
|
|
13
|
+
this._initRoute(usersRoute);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async _initRepositories() {
|
|
17
|
+
await super._initRepositories();
|
|
18
|
+
|
|
19
|
+
this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_USERS, this._initRepositoriesUsers());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async _initServices() {
|
|
23
|
+
await super._initServices();
|
|
24
|
+
|
|
25
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_AUTH, this._initServicesAuth());
|
|
26
|
+
this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_USERS, this._initServicesUser());
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_initRepositoriesUsers() {
|
|
30
|
+
throw new NotImplementedError();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_initRoutesUsers() {
|
|
34
|
+
throw new NotImplementedError();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
_initServicesAuth() {
|
|
38
|
+
throw new NotImplementedError();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
_initServicesUser() {
|
|
42
|
+
throw new NotImplementedError();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default UsersApiBootPlugin;
|