@common-stack/server-core 3.0.1-alpha.0 → 3.0.2-alpha.0
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/lib/connector/__tests__/container-connector.test.d.ts +2 -0
- package/lib/connector/__tests__/context-connector.test.d.ts +1 -0
- package/lib/connector/__tests__/fixtures/preferenfces/sample-settings.d.ts +98 -0
- package/lib/connector/__tests__/fixtures/sample-roles-permissions/account-api/permission-contribution.d.ts +90 -0
- package/lib/connector/__tests__/permissions.test.d.ts +1 -0
- package/lib/connector/__tests__/policies.test.d.ts +1 -0
- package/lib/connector/__tests__/preferences.test.d.ts +1 -0
- package/lib/connector/__tests__/roles-update-connector.test.d.ts +1 -0
- package/lib/connector/__tests__/rules-connector.test.d.ts +1 -0
- package/lib/connector/__tests__/samples/graphql/types/person_entity_type.d.ts +2 -0
- package/lib/connector/__tests__/samples/graphql/types/person_search_type.d.ts +2 -0
- package/lib/connector/__tests__/samples/graphql/types/vendor_type.d.ts +2 -0
- package/lib/connector/__tests__/schema-connector.test.d.ts +1 -0
- package/lib/connector/__tests__/service-connector.test.d.ts +2 -0
- package/lib/connector/__tests__/websocket-connector.test.d.ts +1 -0
- package/lib/connector/connector.cjs +270 -0
- package/lib/connector/connector.cjs.map +1 -0
- package/lib/connector/connector.mjs +270 -0
- package/lib/connector/connector.mjs.map +1 -0
- package/lib/constants/types.cjs +8 -0
- package/lib/constants/types.cjs.map +1 -0
- package/lib/constants/types.mjs +8 -0
- package/lib/constants/types.mjs.map +1 -0
- package/lib/index.cjs +1 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.mjs +1 -0
- package/lib/index.mjs.map +1 -0
- package/lib/interfaces/connector.cjs +5 -0
- package/lib/interfaces/connector.cjs.map +1 -0
- package/lib/interfaces/connector.mjs +5 -0
- package/lib/interfaces/connector.mjs.map +1 -0
- package/lib/interfaces/rules.cjs +6 -0
- package/lib/interfaces/rules.cjs.map +1 -0
- package/lib/interfaces/rules.mjs +6 -0
- package/lib/interfaces/rules.mjs.map +1 -0
- package/lib/interfaces/store.d.ts +3 -0
- package/lib/logger/logger.cjs +5 -0
- package/lib/logger/logger.cjs.map +1 -0
- package/lib/logger/logger.mjs +5 -0
- package/lib/logger/logger.mjs.map +1 -0
- package/lib/utils/preferences.cjs +34 -0
- package/lib/utils/preferences.cjs.map +1 -0
- package/lib/utils/preferences.mjs +34 -0
- package/lib/utils/preferences.mjs.map +1 -0
- package/package.json +10 -6
- package/lib/index.js +0 -700
- package/lib/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { IPreferences } from "../../../../interfaces";
|
|
2
|
+
export declare const defaultSettings: IPreferences;
|
|
3
|
+
export declare const convertedDefaultSettings: ({
|
|
4
|
+
type: string;
|
|
5
|
+
data: ({
|
|
6
|
+
default: boolean;
|
|
7
|
+
description: string;
|
|
8
|
+
enum: any[];
|
|
9
|
+
enumDescriptions: any[];
|
|
10
|
+
name: string;
|
|
11
|
+
overridable: boolean;
|
|
12
|
+
settings: string;
|
|
13
|
+
type: string;
|
|
14
|
+
} | {
|
|
15
|
+
default: boolean;
|
|
16
|
+
description: string;
|
|
17
|
+
enum: any[];
|
|
18
|
+
enumDescriptions: any[];
|
|
19
|
+
name: string;
|
|
20
|
+
settings: string;
|
|
21
|
+
type: string;
|
|
22
|
+
overridable?: undefined;
|
|
23
|
+
})[];
|
|
24
|
+
} | {
|
|
25
|
+
type: string;
|
|
26
|
+
data: {
|
|
27
|
+
name: string;
|
|
28
|
+
one: boolean;
|
|
29
|
+
}[];
|
|
30
|
+
})[];
|
|
31
|
+
export declare const userSettings: {
|
|
32
|
+
'files.trimTrailingWhitespace.default': boolean;
|
|
33
|
+
'tree.trimTrailingWhitespace.something': string;
|
|
34
|
+
'tree.trimTrailingWhitespace.one': boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare const prefRes: {
|
|
37
|
+
'files.trimTrailingWhitespace': {
|
|
38
|
+
type: string;
|
|
39
|
+
default: boolean;
|
|
40
|
+
description: string;
|
|
41
|
+
settings: string;
|
|
42
|
+
enum: any[];
|
|
43
|
+
enumDescriptions: any[];
|
|
44
|
+
overridable: boolean;
|
|
45
|
+
};
|
|
46
|
+
'files.autosave': {
|
|
47
|
+
type: string;
|
|
48
|
+
default: boolean;
|
|
49
|
+
description: string;
|
|
50
|
+
settings: string;
|
|
51
|
+
enum: any[];
|
|
52
|
+
enumDescriptions: any[];
|
|
53
|
+
};
|
|
54
|
+
'tree.trimTrailingWhitespace': {
|
|
55
|
+
one: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const prefsArrRes: ({
|
|
59
|
+
type: string;
|
|
60
|
+
data: ({
|
|
61
|
+
name: string;
|
|
62
|
+
type: string;
|
|
63
|
+
default: boolean;
|
|
64
|
+
description: string;
|
|
65
|
+
settings: string;
|
|
66
|
+
enum: any[];
|
|
67
|
+
enumDescriptions: any[];
|
|
68
|
+
overridable: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
name: string;
|
|
71
|
+
type: string;
|
|
72
|
+
default: boolean;
|
|
73
|
+
description: string;
|
|
74
|
+
settings: string;
|
|
75
|
+
enum: any[];
|
|
76
|
+
enumDescriptions: any[];
|
|
77
|
+
overridable?: undefined;
|
|
78
|
+
})[];
|
|
79
|
+
} | {
|
|
80
|
+
type: string;
|
|
81
|
+
data: {
|
|
82
|
+
name: string;
|
|
83
|
+
one: boolean;
|
|
84
|
+
}[];
|
|
85
|
+
})[];
|
|
86
|
+
export declare const finalSettings: {
|
|
87
|
+
type: string;
|
|
88
|
+
data: {
|
|
89
|
+
name: string;
|
|
90
|
+
type: string;
|
|
91
|
+
default: boolean;
|
|
92
|
+
description: string;
|
|
93
|
+
settings: string;
|
|
94
|
+
enum: any[];
|
|
95
|
+
enumDescriptions: any[];
|
|
96
|
+
overridable: boolean;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const permissionContribution: {
|
|
2
|
+
"organization.teams.inviteMember": {
|
|
3
|
+
enumDescriptions: string[];
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
enum: string[];
|
|
7
|
+
default: string;
|
|
8
|
+
scope: number;
|
|
9
|
+
};
|
|
10
|
+
"organization.teams.view": {
|
|
11
|
+
enumDescriptions: string[];
|
|
12
|
+
description: string;
|
|
13
|
+
type: string;
|
|
14
|
+
enum: string[];
|
|
15
|
+
default: string;
|
|
16
|
+
scope: number;
|
|
17
|
+
};
|
|
18
|
+
"organization.teams.create": {
|
|
19
|
+
enumDescriptions: string[];
|
|
20
|
+
description: string;
|
|
21
|
+
type: string;
|
|
22
|
+
enum: string[];
|
|
23
|
+
default: string;
|
|
24
|
+
scope: number;
|
|
25
|
+
};
|
|
26
|
+
"organization.teams.edit": {
|
|
27
|
+
enumDescriptions: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
enum: string[];
|
|
31
|
+
default: string;
|
|
32
|
+
scope: number;
|
|
33
|
+
};
|
|
34
|
+
"organization.teams.delete": {
|
|
35
|
+
enumDescriptions: string[];
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
enum: string[];
|
|
39
|
+
default: string;
|
|
40
|
+
scope: number;
|
|
41
|
+
};
|
|
42
|
+
"organization.teams.manage": {
|
|
43
|
+
enumDescriptions: string[];
|
|
44
|
+
description: string;
|
|
45
|
+
type: string;
|
|
46
|
+
enum: string[];
|
|
47
|
+
default: string;
|
|
48
|
+
scope: number;
|
|
49
|
+
};
|
|
50
|
+
"organization.projects.view": {
|
|
51
|
+
enumDescriptions: string[];
|
|
52
|
+
description: string;
|
|
53
|
+
type: string;
|
|
54
|
+
enum: string[];
|
|
55
|
+
default: string;
|
|
56
|
+
scope: number;
|
|
57
|
+
};
|
|
58
|
+
"organization.projects.create": {
|
|
59
|
+
enumDescriptions: string[];
|
|
60
|
+
description: string;
|
|
61
|
+
type: string;
|
|
62
|
+
enum: string[];
|
|
63
|
+
default: string;
|
|
64
|
+
scope: number;
|
|
65
|
+
};
|
|
66
|
+
"organization.projects.edit": {
|
|
67
|
+
enumDescriptions: string[];
|
|
68
|
+
description: string;
|
|
69
|
+
type: string;
|
|
70
|
+
enum: string[];
|
|
71
|
+
default: string;
|
|
72
|
+
scope: number;
|
|
73
|
+
};
|
|
74
|
+
"organization.projects.delete": {
|
|
75
|
+
enumDescriptions: string[];
|
|
76
|
+
description: string;
|
|
77
|
+
type: string;
|
|
78
|
+
enum: string[];
|
|
79
|
+
default: string;
|
|
80
|
+
scope: number;
|
|
81
|
+
};
|
|
82
|
+
"organization.projects.manage": {
|
|
83
|
+
enumDescriptions: string[];
|
|
84
|
+
description: string;
|
|
85
|
+
type: string;
|
|
86
|
+
enum: string[];
|
|
87
|
+
default: string;
|
|
88
|
+
scope: number;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'jest';
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
'use strict';var lodash=require('lodash'),inversify=require('inversify'),preferences=require('../utils/preferences.cjs');const featureCatalog = {};
|
|
2
|
+
const combine = (features, extractor) => lodash.without(lodash.union(...lodash.map(features, (res) => lodash.castArray(extractor(res)))), undefined);
|
|
3
|
+
class Feature {
|
|
4
|
+
constructor(feature, ...features) {
|
|
5
|
+
const args = [feature, ...features];
|
|
6
|
+
combine(args, (arg) => arg.catalogInfo).forEach((info) => Object.keys(info).forEach((key) => (featureCatalog[key] = info[key])));
|
|
7
|
+
this.schema = combine(args, (arg) => arg.schema);
|
|
8
|
+
this.createDirectivesFunc = combine(args, (arg) => arg.createDirectivesFunc);
|
|
9
|
+
this.createResolversFunc = combine(args, (arg) => arg.createResolversFunc);
|
|
10
|
+
this.createContextFunc = combine(args, (arg) => arg.createContextFunc);
|
|
11
|
+
this.postBindContainerFunc = combine(args, (arg) => arg.postBindContainerFunc);
|
|
12
|
+
this.postBindHemraContainerFunc = combine(args, (arg) => arg.postBindHemraContainerFunc);
|
|
13
|
+
this.createServiceFunc = combine(args, (arg) => arg.createServiceFunc);
|
|
14
|
+
this.preCreateServiceFunc = combine(args, (arg) => arg.preCreateServiceFunc);
|
|
15
|
+
this.postCreateServiceFunc = combine(args, (arg) => arg.postCreateServiceFunc);
|
|
16
|
+
this.preStartFunc = combine(args, (arg) => arg.preStartFunc);
|
|
17
|
+
this.postStartFunc = combine(args, (arg) => arg.postStartFunc);
|
|
18
|
+
this.microservicePreStartFunc = combine(args, (arg) => arg.microservicePreStartFunc);
|
|
19
|
+
this.microservicePostStartFunc = combine(args, (arg) => arg.microservicePostStartFunc);
|
|
20
|
+
this.addBrokerMainServiceClass = combine(args, (arg) => arg.addBrokerMainServiceClass);
|
|
21
|
+
this.addBrokerClientServiceClass = combine(args, (arg) => arg.addBrokerClientServiceClass);
|
|
22
|
+
this.disposeFunc = combine(args, (arg) => arg.disposeFunc);
|
|
23
|
+
this.federation = combine(args, (arg) => arg.federation);
|
|
24
|
+
this.migrations = combine(args, (arg) => arg);
|
|
25
|
+
this.createContainerFunc = combine(args, (arg) => arg.createContainerFunc);
|
|
26
|
+
this.createHemeraContainerFunc = combine(args, (arg) => arg.createHemeraContainerFunc);
|
|
27
|
+
this.createAsyncContainerFunc = combine(args, (arg) => arg.createAsyncContainerFunc);
|
|
28
|
+
this.createAsyncHemeraContainerFunc = combine(args, (arg) => arg.createAsyncHemeraContainerFunc);
|
|
29
|
+
this.updateContainerFunc = combine(args, (arg) => arg.updateContainerFunc);
|
|
30
|
+
this.createDataSourceFunc = combine(args, (arg) => arg.createDataSourceFunc);
|
|
31
|
+
this.beforeware = combine(args, (arg) => arg.beforeware);
|
|
32
|
+
this.middleware = combine(args, (arg) => arg.middleware);
|
|
33
|
+
this.createWebsocketConfig = combine(args, (arg) => arg.createWebsocketConfig);
|
|
34
|
+
this.createPreference = combine(args, (arg) => arg.createPreference);
|
|
35
|
+
this.addPermissions = {
|
|
36
|
+
createPermissions: combine(args, (arg) => arg.addPermissions && arg.addPermissions.createPermissions),
|
|
37
|
+
overwritePermissions: combine(args, (arg) => arg.addPermissions && arg.addPermissions.overwritePermissions),
|
|
38
|
+
};
|
|
39
|
+
this.addPolicies = {
|
|
40
|
+
createPolicies: combine(args, (arg) => arg.addPolicies && arg.addPolicies.createPolicies),
|
|
41
|
+
overwritePolicies: combine(args, (arg) => arg.addPolicies && arg.addPolicies.overwritePolicies),
|
|
42
|
+
};
|
|
43
|
+
this.rolesUpdate = {
|
|
44
|
+
createRoles: combine(args, (arg) => arg.rolesUpdate && arg.rolesUpdate.createRoles),
|
|
45
|
+
overwriteRolesPermissions: combine(args, (arg) => arg.rolesUpdate && arg.rolesUpdate.overwriteRolesPermissions),
|
|
46
|
+
};
|
|
47
|
+
this.overwritePreference = combine(args, (arg) => arg.overwritePreference);
|
|
48
|
+
this._rules = combine(args, (arg) => arg.rules);
|
|
49
|
+
}
|
|
50
|
+
get rules() {
|
|
51
|
+
return this._rules.reduce((acc, curr) => {
|
|
52
|
+
return lodash.merge(acc, curr);
|
|
53
|
+
}, {});
|
|
54
|
+
}
|
|
55
|
+
get schemas() {
|
|
56
|
+
return this.schema;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Creates context
|
|
60
|
+
* @param req
|
|
61
|
+
* @param connectionParams
|
|
62
|
+
* @param webSocket
|
|
63
|
+
* @deprecated
|
|
64
|
+
*/
|
|
65
|
+
async createContext(req, connectionParams, webSocket) {
|
|
66
|
+
const results = await Promise.all(this.createContextFunc.map((createContext) => createContext(req, connectionParams, webSocket)));
|
|
67
|
+
return lodash.merge({}, ...results);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* If you need to attach service to Graphql Context, you can use this function.
|
|
71
|
+
* It should be called twice to get the context.
|
|
72
|
+
*/
|
|
73
|
+
createServiceContext(options, updateOptions) {
|
|
74
|
+
return async (req, connectionParams, webSocket) => {
|
|
75
|
+
await this.createService(options, updateOptions);
|
|
76
|
+
const results = await Promise.all(this.createContextFunc.map((createContext) => createContext(req, connectionParams, webSocket)));
|
|
77
|
+
return lodash.merge({}, ...results, Object.assign({}, this.services));
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Its wrapper to container to get services
|
|
82
|
+
* @param container
|
|
83
|
+
*/
|
|
84
|
+
async createService(options, updateOptions) {
|
|
85
|
+
try {
|
|
86
|
+
if (this.container) {
|
|
87
|
+
this.updateContainers(options, updateOptions);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
await this.createContainers(options);
|
|
91
|
+
await Promise.all(this.preCreateServiceFunc.map(async (createService) => await createService(this.container)));
|
|
92
|
+
}
|
|
93
|
+
this.services = lodash.merge({}, ...this.createServiceFunc.map((createService) => createService(this.container)));
|
|
94
|
+
await Promise.all(this.postCreateServiceFunc.map(async (createService) => await createService(this.container)));
|
|
95
|
+
return this.services;
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
throw err;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Pre start action will be executed there.
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
async preStart(options) {
|
|
106
|
+
return await Promise.all(this.preStartFunc.map(async (preStart) => await preStart(this.container, options)));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Post start actions will be executed here.
|
|
110
|
+
*/
|
|
111
|
+
async postStart(options) {
|
|
112
|
+
return await Promise.all(this.postStartFunc.map(async (postStart) => await postStart(this.container, options)));
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Pre start action will be executed there.
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
async microservicePreStart(options) {
|
|
119
|
+
return await Promise.all(this.microservicePreStartFunc.map(async (preStart) => await preStart(this.container, options)));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Post start actions will be executed here.
|
|
123
|
+
*/
|
|
124
|
+
async microservicePostStart(options) {
|
|
125
|
+
return await Promise.all(this.microservicePostStartFunc.map(async (postStart) => await postStart(this.container, options)));
|
|
126
|
+
}
|
|
127
|
+
createDataSource(options) {
|
|
128
|
+
return (this.dataSources = lodash.merge({}, ...this.createDataSourceFunc.map((createDataSource) => createDataSource(this.container))));
|
|
129
|
+
}
|
|
130
|
+
createResolvers(options) {
|
|
131
|
+
return lodash.merge({}, ...this.createResolversFunc.map((createResolvers) => createResolvers(options)));
|
|
132
|
+
}
|
|
133
|
+
createDirectives(options) {
|
|
134
|
+
return lodash.merge({}, ...this.createDirectivesFunc.map((createDirectives) => createDirectives(options)));
|
|
135
|
+
}
|
|
136
|
+
async createContainers(options, containerOptions = { skipBaseClassChecks: true }) {
|
|
137
|
+
this.container = new inversify.Container(containerOptions);
|
|
138
|
+
this.createContainerFunc.map((createModule) => {
|
|
139
|
+
this.container.load(createModule(options));
|
|
140
|
+
});
|
|
141
|
+
await Promise.all(this.createAsyncContainerFunc.map(async (asyncCreateModule) => {
|
|
142
|
+
await this.container.loadAsync(asyncCreateModule(options));
|
|
143
|
+
}));
|
|
144
|
+
this.container.bind('IDefaultSettings').toConstantValue(this.getPreferences());
|
|
145
|
+
this.container.bind('IDefaultSettingsObj').toConstantValue(this.getPreferencesObj());
|
|
146
|
+
// permissions
|
|
147
|
+
this.container.bind('IDefaultPermissions').toConstantValue(this.getPermissionPreferences());
|
|
148
|
+
this.container.bind('IDefaultPermissionsObj').toConstantValue(this.getPermissionPreferencesObj());
|
|
149
|
+
this.container.bind('IDefaultRoles').toConstantValue(this.getRoles());
|
|
150
|
+
this.container.bind('IDefaultPoliciesObj').toConstantValue(this.getPolicyPreferencesObj());
|
|
151
|
+
this.postBindContainerFunc.map((bindModule) => {
|
|
152
|
+
this.container.load(bindModule(this.container));
|
|
153
|
+
});
|
|
154
|
+
return this.container;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Use createMicroserviceContainer
|
|
158
|
+
* @param options
|
|
159
|
+
* @deprecated
|
|
160
|
+
*/
|
|
161
|
+
async createHemeraContainers(options) {
|
|
162
|
+
return this.createMicroserviceContainers(options);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Creates container for the microservice
|
|
166
|
+
*
|
|
167
|
+
* @param options
|
|
168
|
+
*/
|
|
169
|
+
async createMicroserviceContainers(options) {
|
|
170
|
+
this.hemeraContainer = new inversify.Container();
|
|
171
|
+
this.createHemeraContainerFunc.map((createModule) => {
|
|
172
|
+
this.hemeraContainer.load(createModule(options));
|
|
173
|
+
});
|
|
174
|
+
await Promise.all(this.createAsyncHemeraContainerFunc.map(async (asyncCreateModule) => {
|
|
175
|
+
await this.hemeraContainer.loadAsync(asyncCreateModule(options));
|
|
176
|
+
}));
|
|
177
|
+
this.postBindHemraContainerFunc.map((bindModule) => {
|
|
178
|
+
this.hemeraContainer.load(bindModule(this.container));
|
|
179
|
+
});
|
|
180
|
+
return this.hemeraContainer;
|
|
181
|
+
}
|
|
182
|
+
updateContainers(options, updateOptions) {
|
|
183
|
+
let mergedModules = lodash.merge({}, ...this.updateContainerFunc);
|
|
184
|
+
const matchingModules = [];
|
|
185
|
+
if (updateOptions) {
|
|
186
|
+
updateOptions.forEach((option) => {
|
|
187
|
+
const dispose = this.disposeFunc.find((el) => el.container === option);
|
|
188
|
+
if (dispose) {
|
|
189
|
+
this.services[dispose.ctx].dispose();
|
|
190
|
+
}
|
|
191
|
+
const searchModule = mergedModules[option];
|
|
192
|
+
if (searchModule) {
|
|
193
|
+
matchingModules.push(searchModule);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
matchingModules.map((createModule) => this.container.load(createModule(options)));
|
|
198
|
+
}
|
|
199
|
+
loadMainMoleculerService({ container, broker, settings, }) {
|
|
200
|
+
this.addBrokerMainServiceClass.map((serviceClass) => broker.createService(serviceClass, { container, settings }));
|
|
201
|
+
}
|
|
202
|
+
loadClientMoleculerService({ container, broker, settings, }) {
|
|
203
|
+
this.addBrokerClientServiceClass.map((serviceClass) => broker.createService(serviceClass, { container, settings }));
|
|
204
|
+
}
|
|
205
|
+
createDefaultPreferences() {
|
|
206
|
+
return preferences.transformPrefsToArray(lodash.merge([], ...this.createPreference));
|
|
207
|
+
}
|
|
208
|
+
get beforewares() {
|
|
209
|
+
return this.beforeware;
|
|
210
|
+
}
|
|
211
|
+
get middlewares() {
|
|
212
|
+
return this.middleware;
|
|
213
|
+
}
|
|
214
|
+
getPreferences() {
|
|
215
|
+
return preferences.transformPrefsToArray(this.getPreferencesObj());
|
|
216
|
+
}
|
|
217
|
+
getPreferencesObj() {
|
|
218
|
+
const defaultPrefs = lodash.merge([], ...this.createPreference);
|
|
219
|
+
const overwritePrefs = lodash.merge([], ...this.overwritePreference);
|
|
220
|
+
return preferences.getCurrentPreferences(defaultPrefs, overwritePrefs);
|
|
221
|
+
}
|
|
222
|
+
getPermissionPreferences() {
|
|
223
|
+
return preferences.transformPrefsToArray(this.getPermissionPreferencesObj());
|
|
224
|
+
}
|
|
225
|
+
getPermissionPreferencesObj() {
|
|
226
|
+
const { createPermissions = [], overwritePermissions = [] } = this.addPermissions;
|
|
227
|
+
const defaultPrefs = lodash.merge([], ...lodash.castArray(createPermissions));
|
|
228
|
+
const overwritePrefs = lodash.merge([], ...lodash.castArray(overwritePermissions));
|
|
229
|
+
return preferences.getCurrentPreferences(defaultPrefs, overwritePrefs);
|
|
230
|
+
}
|
|
231
|
+
getPolicyPreferences() {
|
|
232
|
+
return preferences.transformPrefsToArray(this.getPolicyPreferencesObj());
|
|
233
|
+
}
|
|
234
|
+
getPolicyPreferencesObj() {
|
|
235
|
+
const { createPolicies = [], overwritePolicies = [] } = this.addPolicies;
|
|
236
|
+
const defaultPrefs = lodash.merge([], ...lodash.castArray(createPolicies));
|
|
237
|
+
const overwritePrefs = lodash.merge([], ...lodash.castArray(overwritePolicies));
|
|
238
|
+
return preferences.getCurrentPreferences(defaultPrefs, overwritePrefs);
|
|
239
|
+
}
|
|
240
|
+
getRoles() {
|
|
241
|
+
const { createRoles, overwriteRolesPermissions } = this.rolesUpdate;
|
|
242
|
+
const mergedRoles = lodash.merge({}, ...lodash.castArray(createRoles));
|
|
243
|
+
const mergedOverwriteRolesPermissions = lodash.merge({}, ...lodash.castArray(overwriteRolesPermissions));
|
|
244
|
+
let result = {};
|
|
245
|
+
for (const role in mergedRoles) {
|
|
246
|
+
const rolePermission = mergedOverwriteRolesPermissions[role]
|
|
247
|
+
? lodash.merge({}, mergedRoles[role].permissions, mergedOverwriteRolesPermissions[role])
|
|
248
|
+
: mergedRoles[role].permissions;
|
|
249
|
+
const mmm = Object.assign(Object.assign({}, mergedRoles[role]), { permissions: Object.assign({}, rolePermission) });
|
|
250
|
+
result = lodash.merge({}, result, { [role]: mmm });
|
|
251
|
+
}
|
|
252
|
+
return result;
|
|
253
|
+
}
|
|
254
|
+
getRolesObj() {
|
|
255
|
+
const { createRoles } = this.rolesUpdate;
|
|
256
|
+
const defaultPrefs = lodash.merge([], ...lodash.castArray(createRoles));
|
|
257
|
+
const overwritePrefs = lodash.merge([], ...lodash.castArray(createRoles));
|
|
258
|
+
return preferences.getCurrentPreferences(defaultPrefs, overwritePrefs);
|
|
259
|
+
}
|
|
260
|
+
getWebsocketConfig() {
|
|
261
|
+
return this.createWebsocketConfig.reduce((pre, curr) => {
|
|
262
|
+
return lodash.merge(pre, curr);
|
|
263
|
+
}, {});
|
|
264
|
+
}
|
|
265
|
+
convertArrayToObject(arrayObject) {
|
|
266
|
+
return arrayObject.reduce((pre, curr) => {
|
|
267
|
+
return lodash.merge(pre, curr);
|
|
268
|
+
}, {});
|
|
269
|
+
}
|
|
270
|
+
}exports.Feature=Feature;exports.featureCatalog=featureCatalog;//# sourceMappingURL=connector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.cjs","sources":["../../src/connector/connector.ts"],"sourcesContent":[null],"names":["without","union","map","castArray","merge","Container","transformPrefsToArray","getCurrentPreferences"],"mappings":"yHAkBO,MAAM,cAAc,GAAQ,GAAG;AA8DtC,MAAM,OAAO,GAAG,CAAI,QAA4B,EAAE,SAAS,KACvDA,cAAO,CAACC,YAAK,CAAC,GAAGC,UAAG,CAAC,QAAQ,EAAE,CAAC,GAAqB,KAAKC,gBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAEtG,MAAM,OAAO,CAAA;IA0CT,WAAY,CAAA,OAA0B,EAAE,GAAG,QAAsB,EAAA;QAC7D,MAAM,IAAI,GAAuB,CAAC,OAAO,EAAE,GAAI,QAA0C,CAAC,CAAC;QAC3F,OAAO,CAAI,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KACpD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CACxE,CAAC;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,OAAO,CAAI,IAAI,EAAE,CAAC,GAAqB,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC;AACtE,QAAA,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAI,IAAI,EAAE,CAAC,GAAqB,KAAK,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAClG,QAAA,IAAI,CAAC,mBAAmB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