@xrystal/core 3.8.7 → 3.8.8
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/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { BaseApiClient } from '../../utils/index';
|
|
2
1
|
import ConfigsService from '../configs';
|
|
3
2
|
export default class ClientsService {
|
|
4
3
|
static services: Record<string, any>;
|
|
5
|
-
apiClient: BaseApiClient;
|
|
6
4
|
baseApiClientName: string;
|
|
7
5
|
load({ configs }: {
|
|
8
6
|
configs: ConfigsService;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { BaseApiClient } from '../../utils/index';
|
|
2
2
|
export default class ClientsService {
|
|
3
3
|
static services = {};
|
|
4
|
-
apiClient;
|
|
5
4
|
baseApiClientName = 'base-api-client';
|
|
6
5
|
async load({ configs }) {
|
|
7
|
-
|
|
6
|
+
const baseApiClient = new BaseApiClient({
|
|
8
7
|
clientName: this.baseApiClientName,
|
|
9
8
|
baseURL: configs.all.baseApiUri || ''
|
|
10
9
|
});
|
|
11
|
-
ClientsService.services[this.baseApiClientName] =
|
|
10
|
+
ClientsService.services[this.baseApiClientName] = baseApiClient;
|
|
12
11
|
}
|
|
13
12
|
}
|
package/source/loader/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import ConfigsService from "./configs";
|
|
|
3
3
|
import LoggerService from "./logger";
|
|
4
4
|
import EventsService from "./events";
|
|
5
5
|
import LocalizationsService from "./localizations";
|
|
6
|
-
|
|
6
|
+
import ClientsService from "./clients";
|
|
7
|
+
export { SystemService, ConfigsService, LoggerService, EventsService, LocalizationsService, ClientsService };
|
package/source/loader/index.js
CHANGED
|
@@ -3,4 +3,5 @@ import ConfigsService from "./configs";
|
|
|
3
3
|
import LoggerService from "./logger";
|
|
4
4
|
import EventsService from "./events";
|
|
5
5
|
import LocalizationsService from "./localizations";
|
|
6
|
-
|
|
6
|
+
import ClientsService from "./clients";
|
|
7
|
+
export { SystemService, ConfigsService, LoggerService, EventsService, LocalizationsService, ClientsService };
|
package/source/project/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// => import dependencies
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { SystemService, ConfigsService, LoggerService, EventsService, LocalizationsService } from '../loader/index';
|
|
3
|
+
import { SystemService, ConfigsService, LoggerService, EventsService, LocalizationsService, ClientsService } from '../loader/index';
|
|
4
4
|
import { packageName, tmpFileDefaultName, tmpFileDefaultExt, findFileRecursively, TmpFileLoader, x, kafkaBrokers, systemLoggerLayer, } from '../utils/index';
|
|
5
|
-
import ClientsService from 'source/loader/clients';
|
|
6
5
|
//
|
|
7
6
|
let coreHasRun = false;
|
|
8
7
|
export const coreInit = async (params) => {
|
|
@@ -27,7 +26,8 @@ const coreLoader = async ({}) => {
|
|
|
27
26
|
ConfigsService,
|
|
28
27
|
LoggerService,
|
|
29
28
|
EventsService,
|
|
30
|
-
LocalizationsService
|
|
29
|
+
LocalizationsService,
|
|
30
|
+
ClientsService
|
|
31
31
|
];
|
|
32
32
|
services.forEach(service => x.set({ service, reference: service }));
|
|
33
33
|
const system = x.get(SystemService);
|