@thzero/library_server 0.16.12 → 0.17.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/boot/index.js CHANGED
@@ -4,10 +4,10 @@ import config from 'config';
4
4
 
5
5
  import {internalIpV4} from '@thzero/library_server/utility/internalIp/index.js';
6
6
 
7
- import LibraryConstants from '../constants.js';
7
+ import LibraryServerConstants from '../constants.js';
8
8
  import LibraryCommonServiceConstants from '@thzero/library_common_service/constants.js';
9
9
 
10
- import Utility from '@thzero/library_common/utility/index.js';
10
+ import LibraryCommonUtility from '@thzero/library_common/utility/index.js';
11
11
 
12
12
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
13
13
 
@@ -96,7 +96,7 @@ class BootMain {
96
96
  )
97
97
  }
98
98
 
99
- const healthcheckPath = this._appConfig.get('healthcheck.path', LibraryConstants.HealthCheck.DefaultPath);
99
+ const healthcheckPath = this._appConfig.get('healthcheck.path', LibraryServerConstants.HealthCheck.DefaultPath);
100
100
  if (!healthcheckPath.startsWith('/'))
101
101
  healthcheckPath = '/' + healthcheckPath;
102
102
 
@@ -213,7 +213,7 @@ class BootMain {
213
213
  await pluginRepository.initRepositories(this._repositories);
214
214
 
215
215
  await this._initRepositories();
216
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_USAGE_METRIC, this._initRepositoriesUsageMetrics());
216
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_USAGE_METRIC, this._initRepositoriesUsageMetrics());
217
217
 
218
218
  this._services = new Map();
219
219
 
@@ -227,15 +227,15 @@ class BootMain {
227
227
  this._injectService(LibraryCommonServiceConstants.InjectorKeys.SERVICE_MONITORING, monitoringService);
228
228
 
229
229
  this.usageMetricsServiceI = this._initServicesUsageMetrics();
230
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_USAGE_METRIC, this.usageMetricsServiceI);
230
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_USAGE_METRIC, this.usageMetricsServiceI);
231
231
 
232
232
  this.resourceDiscoveryServiceI = this._initServicesDiscoveryResources();
233
233
  if (this.resourceDiscoveryServiceI)
234
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_DISCOVERY_RESOURCES, this.resourceDiscoveryServiceI);
234
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_DISCOVERY_RESOURCES, this.resourceDiscoveryServiceI);
235
235
 
236
236
  this.mdnsDiscoveryServiceI = this._initServicesDiscoveryMdns();
237
237
  if (this.mdnsDiscoveryServiceI)
238
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_DISCOVERY_MDNS, this.mdnsDiscoveryServiceI);
238
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_DISCOVERY_MDNS, this.mdnsDiscoveryServiceI);
239
239
 
240
240
  for (const pluginService of plugins)
241
241
  await pluginService.initServices(this._services);
@@ -271,7 +271,7 @@ class BootMain {
271
271
  this._servicesPost.set(key, value);
272
272
  }
273
273
 
274
- Utility.initDateTime();
274
+ LibraryCommonUtility.initDateTime();
275
275
  }
276
276
  finally {
277
277
  this._repositories = null;
@@ -354,15 +354,15 @@ class BootMain {
354
354
 
355
355
  const opts = await this._initServerDiscoveryOpts();
356
356
 
357
- await this._initServerDiscoveryMdns(Utility.cloneDeep(opts));
358
- await this._initServerDiscoveryResources(Utility.cloneDeep(opts));
357
+ await this._initServerDiscoveryMdns(LibraryCommonUtility.cloneDeep(opts));
358
+ await this._initServerDiscoveryResources(LibraryCommonUtility.cloneDeep(opts));
359
359
  }
360
360
 
361
361
  async _initServerDiscoveryMdns(opts) {
362
362
  if (!this.mdnsDiscoveryServiceI)
363
363
  return;
364
364
 
365
- await this.mdnsDiscoveryServiceI.initialize(Utility.generateId(), await this._initServerDiscoveryOptsMdns(opts));
365
+ await this.mdnsDiscoveryServiceI.initialize(LibraryCommonUtility.generateId(), await this._initServerDiscoveryOptsMdns(opts));
366
366
  }
367
367
 
368
368
  async _initServerDiscoveryOpts() {
@@ -400,7 +400,7 @@ class BootMain {
400
400
  if (!this.resourceDiscoveryServiceI)
401
401
  return;
402
402
 
403
- await this.resourceDiscoveryServiceI.initialize(Utility.generateId(), await this._initServerDiscoveryOptsResources(opts));
403
+ await this.resourceDiscoveryServiceI.initialize(LibraryCommonUtility.generateId(), await this._initServerDiscoveryOptsResources(opts));
404
404
  }
405
405
 
406
406
  _injectRepository(key, repository) {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../../constants.js';
1
+ import LibraryServerConstants from '../../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -10,11 +10,11 @@ class NewsAdminBootPlugin extends AdminBootPlugin {
10
10
  }
11
11
 
12
12
  async _initRepositories() {
13
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS, this._initRepositoriesAdminNews());
13
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS, this._initRepositoriesAdminNews());
14
14
  }
15
15
 
16
16
  async _initServices() {
17
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_ADMIN_NEWS, this._initServicesAdminNews());
17
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_NEWS, this._initServicesAdminNews());
18
18
  }
19
19
 
20
20
  _initRepositoriesAdminNews() {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../../constants.js';
1
+ import LibraryServerConstants from '../../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -10,11 +10,11 @@ class UsersAdminBootPlugin extends AdminBootPlugin {
10
10
  }
11
11
 
12
12
  async _initRepositories() {
13
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_ADMIN_USERS, this._initRepositoriesAdminUsers());
13
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_USERS, this._initRepositoriesAdminUsers());
14
14
  }
15
15
 
16
16
  async _initServices() {
17
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_ADMIN_USERS, this._initServicesAdminUsers());
17
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_ADMIN_USERS, this._initServicesAdminUsers());
18
18
  }
19
19
 
20
20
  _initRepositoriesAdminUsers() {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
  import LibraryCommonServiceConstants from '@thzero/library_common_service/constants.js';
3
3
 
4
4
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
@@ -20,9 +20,9 @@ class ApiBootPlugin extends BootPlugin {
20
20
  async _initServices() {
21
21
  const communicationRestService = this._initServicesCommunicationRest();
22
22
  if (communicationRestService)
23
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_COMMUNICATION_REST, communicationRestService);
24
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_CRYPTO, this._initServicesCrypto());
25
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_VERSION, this._initServicesVersion());
23
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_COMMUNICATION_REST, communicationRestService);
24
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_CRYPTO, this._initServicesCrypto());
25
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VERSION, this._initServicesVersion());
26
26
 
27
27
  const validationServices = this._initServicesValidation();
28
28
  if (validationServices)
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -16,7 +16,7 @@ class FrontApiBootPlugin extends ApiBootPlugin {
16
16
  async _initServices() {
17
17
  super._initServices();
18
18
 
19
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_UTILITY, this._initServicesUtility());
19
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_UTILITY, this._initServicesUtility());
20
20
  }
21
21
 
22
22
  _initRoutesUtility() {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -14,14 +14,14 @@ class NewsApiBootPlugin extends BootPlugin {
14
14
  async _initRepositories() {
15
15
  await super._initRepositories();
16
16
 
17
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_NEWS, this._initRepositoriesNews());
17
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_NEWS, this._initRepositoriesNews());
18
18
  }
19
19
 
20
20
  async _initServices() {
21
21
  await super._initServices();
22
22
 
23
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_NEWS, this._initServicesNews());
24
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_VALIDATION_NEWS, this._initServicesNewsValidation());
23
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_NEWS, this._initServicesNews());
24
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_VALIDATION_NEWS, this._initServicesNewsValidation());
25
25
  }
26
26
 
27
27
  _initRepositoriesNews() {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -16,14 +16,14 @@ class UsersApiBootPlugin extends BootPlugin {
16
16
  async _initRepositories() {
17
17
  await super._initRepositories();
18
18
 
19
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_USERS, this._initRepositoriesUsers());
19
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_USERS, this._initRepositoriesUsers());
20
20
  }
21
21
 
22
22
  async _initServices() {
23
23
  await super._initServices();
24
24
 
25
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_AUTH, this._initServicesAuth());
26
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_USERS, this._initServicesUser());
25
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_AUTH, this._initServicesAuth());
26
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_USERS, this._initServicesUser());
27
27
  }
28
28
 
29
29
  _initRepositoriesUsers() {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -10,14 +10,14 @@ class ExtendedUsersApiBootPlugin extends UsersApiBootPlugin {
10
10
  async _initRepositories() {
11
11
  await super._initRepositories();
12
12
 
13
- this._injectRepository(LibraryConstants.InjectorKeys.REPOSITORY_PLANS, this._initRepositoriesPlans());
13
+ this._injectRepository(LibraryServerConstants.InjectorKeys.REPOSITORY_PLANS, this._initRepositoriesPlans());
14
14
  }
15
15
 
16
16
  async _initServices() {
17
17
  await super._initServices();
18
18
 
19
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_PLANS, this._initServicesPlans());
20
- this._injectService(LibraryConstants.InjectorKeys.SERVICE_SECURITY, this._initServicesSecurity());
19
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_PLANS, this._initServicesPlans());
20
+ this._injectService(LibraryServerConstants.InjectorKeys.SERVICE_SECURITY, this._initServicesSecurity());
21
21
  }
22
22
 
23
23
  _initRepositoriesPlans() {
package/data/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import Utility from '@thzero/library_common/utility/index.js';
1
+ import CommonUtility from '@thzero/library_common/utility/index.js';
2
2
 
3
3
  class Data {
4
4
  constructor() {
5
- this.id = Utility.generateId();
6
- this.createdTimestamp = Utility.getTimestamp();
5
+ this.id = CommonUtility.generateId();
6
+ this.createdTimestamp = CommonUtility.getTimestamp();
7
7
  this.createdUserId = null;
8
- this.updatedTimestamp = Utility.getTimestamp();
8
+ this.updatedTimestamp = CommonUtility.getTimestamp();
9
9
  this.updatedUserId = null;
10
10
  }
11
11
 
package/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2022 thZero.com
3
+ Copyright (c) 2020-2023 thZero.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server",
3
3
  "type": "module",
4
- "version": "0.16.12",
4
+ "version": "0.17.1",
5
5
  "version_major": 0,
6
- "version_minor": 16,
7
- "version_patch": 12,
8
- "version_date": "01/06/2023",
6
+ "version_minor": 17,
7
+ "version_patch": 1,
8
+ "version_date": "02/02/2023",
9
9
  "description": "An opinionated library of common functionality to bootstrap an API application using MongoDb and Firebase. Currently either Fastify or Koa can be used as the web server.",
10
10
  "author": "thZero",
11
11
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "ipaddr.js": "^2.0.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "@thzero/library_common": "^0.16",
37
- "@thzero/library_common_service": "^0.16"
36
+ "@thzero/library_common": "^0.17",
37
+ "@thzero/library_common_service": "^0.17"
38
38
  }
39
39
  }
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import BaseAdminService from './index.js';
4
4
 
@@ -16,9 +16,9 @@ class BaseNewsAdminService extends BaseAdminService {
16
16
  async init(injector) {
17
17
  await super.init(injector);
18
18
 
19
- this._repositoryNews = this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS);
19
+ this._repositoryNews = this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_NEWS);
20
20
 
21
- this._serviceValidationNews = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_VALIDATION_NEWS);
21
+ this._serviceValidationNews = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_VALIDATION_NEWS);
22
22
  }
23
23
 
24
24
  _initializeData() {
@@ -1,4 +1,4 @@
1
- import Utility from '@thzero/library_common/utility/index.js';
1
+ import LibraryCommonUtility from '@thzero/library_common/utility/index.js';
2
2
 
3
3
  import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
4
4
 
@@ -63,7 +63,7 @@ class BaseAdminService extends Service {
63
63
  let value = this._initializeData();
64
64
  const fetchRespositoryResponse = await this._repository.fetch(correlationId, id);
65
65
  if (this._hasSucceeded(fetchRespositoryResponse) && fetchRespositoryResponse.results)
66
- value = Utility.map(this._initializeData(), fetchRespositoryResponse.results, true);
66
+ value = LibraryCommonUtility.map(this._initializeData(), fetchRespositoryResponse.results, true);
67
67
 
68
68
  const validResponse = this._checkUpdatedTimestamp(correlationId, value, requestedValue, 'value');
69
69
  if (this._hasFailed(validResponse))
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import BaseAdminService from './index.js';
4
4
 
@@ -17,10 +17,10 @@ class BaseUsersAdminService extends BaseAdminService {
17
17
  async init(injector) {
18
18
  await super.init(injector);
19
19
 
20
- this._repositoryUsers = this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_ADMIN_USERS);
20
+ this._repositoryUsers = this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_ADMIN_USERS);
21
21
 
22
- this._serviceAuth = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_AUTH);
23
- this._serviceUser = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_USERS);
22
+ this._serviceAuth = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_AUTH);
23
+ this._serviceUser = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_USERS);
24
24
  }
25
25
 
26
26
  async delete(correlationId, user, id) {
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../constants.js';
1
+ import LibraryServerConstants from '../constants.js';
2
2
 
3
3
  import ExternalService from './external.js';
4
4
 
@@ -12,7 +12,7 @@ class RestExternalService extends ExternalService {
12
12
  async init(injector) {
13
13
  await super.init(injector);
14
14
 
15
- this._serviceCommunicationRest = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_COMMUNICATION_REST);
15
+ this._serviceCommunicationRest = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_COMMUNICATION_REST);
16
16
  }
17
17
  }
18
18
 
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../../constants.js';
1
+ import LibraryServerConstants from '../../constants.js';
2
2
 
3
3
  import Service from '../../service/index.js';
4
4
 
@@ -14,9 +14,9 @@ class BaseNewsService extends Service {
14
14
  async init(injector) {
15
15
  await super.init(injector);
16
16
 
17
- this._repositoryNewsI = this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_NEWS);
17
+ this._repositoryNewsI = this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_NEWS);
18
18
 
19
- this._serviceValidationNews = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_VALIDATION_NEWS);
19
+ this._serviceValidationNews = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_VALIDATION_NEWS);
20
20
  }
21
21
 
22
22
  async latest(correlationId, user, timestamp) {
package/service/plans.js CHANGED
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '../constants.js';
1
+ import LibraryServerConstants from '../constants.js';
2
2
 
3
3
  import Service from './index.js';
4
4
 
@@ -12,7 +12,7 @@ class PlansService extends Service {
12
12
  async init(injector) {
13
13
  await super.init(injector);
14
14
 
15
- this._repositoryPlansI = this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_PLANS);
15
+ this._repositoryPlansI = this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_PLANS);
16
16
  }
17
17
 
18
18
  async listing(correlationId) {
@@ -1,6 +1,6 @@
1
- import LibraryConstants from '../constants.js';
1
+ import LibraryServerConstants from '../constants.js';
2
2
 
3
- import Utility from '@thzero/library_common/utility/index.js';
3
+ import LibraryCommonUtility from '@thzero/library_common/utility/index.js';
4
4
 
5
5
  import Service from './index.js';
6
6
 
@@ -16,7 +16,7 @@ class UsageMetricsService extends Service {
16
16
  async init(injector) {
17
17
  await super.init(injector);
18
18
 
19
- this._repositoryUsageMetricsI = this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_USAGE_METRIC);
19
+ this._repositoryUsageMetricsI = this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_USAGE_METRIC);
20
20
  }
21
21
 
22
22
  async register(usageMetrics, err) {
@@ -32,7 +32,7 @@ class UsageMetricsService extends Service {
32
32
  }
33
33
  }
34
34
 
35
- usageMetrics.date = new Date(new Date(Utility.getTimestamp()).toISOString());
35
+ usageMetrics.date = new Date(new Date(LibraryCommonUtility.getTimestamp()).toISOString());
36
36
 
37
37
  await this._repositoryUsageMetrics.register(usageMetrics);
38
38
  return this._success(usageMetrics.correlationId);
@@ -50,7 +50,7 @@ class UsageMetricsService extends Service {
50
50
  }
51
51
 
52
52
  get _repositoryUsageMetrics() {
53
- return this._injector.getService(LibraryConstants.InjectorKeys.REPOSITORY_USAGE_METRIC)
53
+ return this._injector.getService(LibraryServerConstants.InjectorKeys.REPOSITORY_USAGE_METRIC)
54
54
  }
55
55
  }
56
56
 
@@ -2,9 +2,9 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { Mutex as asyncMutex } from 'async-mutex';
4
4
 
5
- import LibraryConstants from '@thzero/library_server/constants.js';
5
+ import LibraryServerConstants from '@thzero/library_server/constants.js';
6
6
 
7
- import Utility from '@thzero/library_common/utility/index.js';
7
+ import LibraryCommonUtility from '@thzero/library_common/utility/index.js';
8
8
 
9
9
  import Service from './index.js';
10
10
 
@@ -26,14 +26,14 @@ class UtilityService extends Service {
26
26
  async init(injector) {
27
27
  await super.init(injector);
28
28
 
29
- this._servicePlans = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_PLANS);
30
- this._serviceVersion = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_VERSION);
29
+ this._servicePlans = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_PLANS);
30
+ this._serviceVersion = this._injector.getService(LibraryServerConstants.InjectorKeys.SERVICE_VERSION);
31
31
 
32
32
  await this._initializeOopenSource();
33
33
  }
34
34
 
35
35
  async initialize(correlationId) {
36
- const now = Utility.getTimestamp();
36
+ const now = LibraryCommonUtility.getTimestamp();
37
37
  const ttlInitialize = this._ttlInitialize ? this._ttlInitialize : 0;
38
38
  const delta = now - ttlInitialize;
39
39
  if (this._initializeResponse && (delta <= this._ttlInitializeDiff))
@@ -61,7 +61,7 @@ class UtilityService extends Service {
61
61
 
62
62
  await this._intialize(correlationId, response);
63
63
 
64
- this._ttlInitialize = Utility.getTimestamp();
64
+ this._ttlInitialize = LibraryCommonUtility.getTimestamp();
65
65
  this._initializeResponse = response;
66
66
  return response;
67
67
  }