@omnia/tooling-composers 8.0.128-dev → 8.0.129-dev
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/internal-do-not-import-from-here/BlockingRegistry.js +33 -33
- package/internal-do-not-import-from-here/BuildConfigurationRegistry.js +19 -19
- package/internal-do-not-import-from-here/ComponentRegistry.js +83 -83
- package/internal-do-not-import-from-here/Composer.js +30 -30
- package/internal-do-not-import-from-here/ConfigurationClientServiceRegistry.js +15 -15
- package/internal-do-not-import-from-here/DevelopmentBuildConfiguration.js +8 -8
- package/internal-do-not-import-from-here/DevelopmentEnvironment.js +3 -3
- package/internal-do-not-import-from-here/DevelopmentHostingEnvironment.js +8 -8
- package/internal-do-not-import-from-here/ImportManifestRegistry.js +18 -18
- package/internal-do-not-import-from-here/LoadableManifestRegistry.js +247 -249
- package/internal-do-not-import-from-here/LocalizationComposer.js +15 -15
- package/internal-do-not-import-from-here/ManifestGroupRegistry.js +87 -87
- package/internal-do-not-import-from-here/ManifestRegistry.js +83 -83
- package/internal-do-not-import-from-here/RequestedResourcesRegistry.js +54 -54
- package/internal-do-not-import-from-here/RequiredAzureAdAppPermissionRegistry.js +12 -12
- package/internal-do-not-import-from-here/ResourceRegistry.js +136 -136
- package/internal-do-not-import-from-here/SecurityProviderManifestRegistry.js +24 -24
- package/internal-do-not-import-from-here/ServiceAppRegistry.js +26 -26
- package/internal-do-not-import-from-here/ServiceFeatureRegistry.js +27 -27
- package/internal-do-not-import-from-here/ServiceManifestRegistry.js +29 -29
- package/internal-do-not-import-from-here/ServiceRoleRegistry.js +26 -26
- package/internal-do-not-import-from-here/Utils.js +79 -79
- package/internal-do-not-import-from-here/task.js +1 -1
- package/package.json +3 -3
|
@@ -17,38 +17,38 @@ class BlockInformation {
|
|
|
17
17
|
// omniaServiceId: string;
|
|
18
18
|
//}
|
|
19
19
|
class BlockingRegistry {
|
|
20
|
+
static { this.BlockedManifests = []; }
|
|
21
|
+
static { this.addBlockedManifest = (omniaServiceId, manifestId) => {
|
|
22
|
+
omniaServiceId = Utils_1.Utils.ensureValidServiceId(omniaServiceId);
|
|
23
|
+
manifestId = Utils_1.Utils.ensureValidManifestId(manifestId);
|
|
24
|
+
BlockingRegistry.BlockedManifests.push(new BlockInformation({
|
|
25
|
+
omniaServiceId: omniaServiceId,
|
|
26
|
+
resourceId: manifestId,
|
|
27
|
+
manifestType: Enums_1.ClientManifestTypes.BlockedManifest
|
|
28
|
+
}, ManifestRegistry_1.ManifestRegistry.getCurrentManifestPath()));
|
|
29
|
+
}; }
|
|
30
|
+
//public static addBlockedElementName = (omniaServiceId: string, elementName: string) => {
|
|
31
|
+
// omniaServiceId = Utils.ensureValidOmniaServiceId(omniaServiceId);
|
|
32
|
+
// elementName = Utils.ensureValidElementName(elementName);
|
|
33
|
+
// BlockingRegistry.BlockedManifests.push({
|
|
34
|
+
// omniaServiceId: omniaServiceId,
|
|
35
|
+
// resourceId: manifestId,
|
|
36
|
+
// manifestType: ManifestType.BlockedManifest
|
|
37
|
+
// });
|
|
38
|
+
//}
|
|
39
|
+
static { this.getClientManifests = (currentServiceId) => {
|
|
40
|
+
let result = [];
|
|
41
|
+
for (let b of BlockingRegistry.BlockedManifests) {
|
|
42
|
+
if (b.blockedManifest.omniaServiceId === currentServiceId) {
|
|
43
|
+
throw new Error("It's not allowed to block manifests in the current omnia service (only external), see manifest file:" + b.manifestPath);
|
|
44
|
+
}
|
|
45
|
+
result.push(b.blockedManifest);
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}; }
|
|
49
|
+
static { this.clearState = () => {
|
|
50
|
+
BlockingRegistry.BlockedManifests = [];
|
|
51
|
+
}; }
|
|
52
|
+
static { this.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(BlockingRegistry.getClientManifests, BlockingRegistry.clearState)); }
|
|
20
53
|
}
|
|
21
54
|
exports.BlockingRegistry = BlockingRegistry;
|
|
22
|
-
BlockingRegistry.BlockedManifests = [];
|
|
23
|
-
BlockingRegistry.addBlockedManifest = (omniaServiceId, manifestId) => {
|
|
24
|
-
omniaServiceId = Utils_1.Utils.ensureValidServiceId(omniaServiceId);
|
|
25
|
-
manifestId = Utils_1.Utils.ensureValidManifestId(manifestId);
|
|
26
|
-
BlockingRegistry.BlockedManifests.push(new BlockInformation({
|
|
27
|
-
omniaServiceId: omniaServiceId,
|
|
28
|
-
resourceId: manifestId,
|
|
29
|
-
manifestType: Enums_1.ClientManifestTypes.BlockedManifest
|
|
30
|
-
}, ManifestRegistry_1.ManifestRegistry.getCurrentManifestPath()));
|
|
31
|
-
};
|
|
32
|
-
//public static addBlockedElementName = (omniaServiceId: string, elementName: string) => {
|
|
33
|
-
// omniaServiceId = Utils.ensureValidOmniaServiceId(omniaServiceId);
|
|
34
|
-
// elementName = Utils.ensureValidElementName(elementName);
|
|
35
|
-
// BlockingRegistry.BlockedManifests.push({
|
|
36
|
-
// omniaServiceId: omniaServiceId,
|
|
37
|
-
// resourceId: manifestId,
|
|
38
|
-
// manifestType: ManifestType.BlockedManifest
|
|
39
|
-
// });
|
|
40
|
-
//}
|
|
41
|
-
BlockingRegistry.getClientManifests = (currentServiceId) => {
|
|
42
|
-
let result = [];
|
|
43
|
-
for (let b of BlockingRegistry.BlockedManifests) {
|
|
44
|
-
if (b.blockedManifest.omniaServiceId === currentServiceId) {
|
|
45
|
-
throw new Error("It's not allowed to block manifests in the current omnia service (only external), see manifest file:" + b.manifestPath);
|
|
46
|
-
}
|
|
47
|
-
result.push(b.blockedManifest);
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
};
|
|
51
|
-
BlockingRegistry.clearState = () => {
|
|
52
|
-
BlockingRegistry.BlockedManifests = [];
|
|
53
|
-
};
|
|
54
|
-
BlockingRegistry.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(BlockingRegistry.getClientManifests, BlockingRegistry.clearState));
|
|
@@ -3,24 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BuildConfigurationRegistry = void 0;
|
|
4
4
|
const ManifestRegistry_1 = require("./ManifestRegistry");
|
|
5
5
|
class BuildConfigurationRegistry {
|
|
6
|
+
static { this.BuildOptions = null; }
|
|
7
|
+
static { this.AddBuildOptions = (buildOptions) => {
|
|
8
|
+
BuildConfigurationRegistry.BuildOptions = buildOptions;
|
|
9
|
+
}; }
|
|
10
|
+
static { this.getBuildOptions = () => {
|
|
11
|
+
//let defaultOptions: BuildOptions = {
|
|
12
|
+
// moduleOptions: {},
|
|
13
|
+
// bundleOptions: {}
|
|
14
|
+
//};
|
|
15
|
+
//BuildConfigurationRegistry.BuildOptions = deepExtend(defaultOptions, BuildConfigurationRegistry.BuildOptions);
|
|
16
|
+
return BuildConfigurationRegistry.BuildOptions;
|
|
17
|
+
}; }
|
|
18
|
+
static { this.getClientManifests = (currentServiceId) => {
|
|
19
|
+
return new Array();
|
|
20
|
+
}; }
|
|
21
|
+
static { this.clearState = () => {
|
|
22
|
+
BuildConfigurationRegistry.BuildOptions = null;
|
|
23
|
+
}; }
|
|
24
|
+
static { this.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(BuildConfigurationRegistry.getClientManifests, BuildConfigurationRegistry.clearState)); }
|
|
6
25
|
}
|
|
7
26
|
exports.BuildConfigurationRegistry = BuildConfigurationRegistry;
|
|
8
|
-
BuildConfigurationRegistry.BuildOptions = null;
|
|
9
|
-
BuildConfigurationRegistry.AddBuildOptions = (buildOptions) => {
|
|
10
|
-
BuildConfigurationRegistry.BuildOptions = buildOptions;
|
|
11
|
-
};
|
|
12
|
-
BuildConfigurationRegistry.getBuildOptions = () => {
|
|
13
|
-
//let defaultOptions: BuildOptions = {
|
|
14
|
-
// moduleOptions: {},
|
|
15
|
-
// bundleOptions: {}
|
|
16
|
-
//};
|
|
17
|
-
//BuildConfigurationRegistry.BuildOptions = deepExtend(defaultOptions, BuildConfigurationRegistry.BuildOptions);
|
|
18
|
-
return BuildConfigurationRegistry.BuildOptions;
|
|
19
|
-
};
|
|
20
|
-
BuildConfigurationRegistry.getClientManifests = (currentServiceId) => {
|
|
21
|
-
return new Array();
|
|
22
|
-
};
|
|
23
|
-
BuildConfigurationRegistry.clearState = () => {
|
|
24
|
-
BuildConfigurationRegistry.BuildOptions = null;
|
|
25
|
-
};
|
|
26
|
-
BuildConfigurationRegistry.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(BuildConfigurationRegistry.getClientManifests, BuildConfigurationRegistry.clearState));
|
|
@@ -71,92 +71,92 @@ class ComponentRegistry {
|
|
|
71
71
|
ComponentRegistry.ComponentRegistrations = new Map();
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
ComponentRegistry.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
ComponentRegistry.getComponentDefinition = (manifest) => {
|
|
104
|
-
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
105
|
-
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
106
|
-
if (registration != null) {
|
|
107
|
-
return registration.definition;
|
|
108
|
-
}
|
|
109
|
-
return null;
|
|
110
|
-
};
|
|
111
|
-
ComponentRegistry.addComponentDefinition = (manifest, definition) => {
|
|
112
|
-
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
113
|
-
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
114
|
-
if (registration != null) {
|
|
115
|
-
registration.definition = definition;
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
throw new Error("Can't add ComponentDefinition for component manifest with id: " + manifest.resourceId + " a component has not been registered");
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
ComponentRegistry.addComponentBuildOptions = (manifest, buildOptions) => {
|
|
122
|
-
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
123
|
-
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
124
|
-
if (registration != null) {
|
|
125
|
-
registration.buildOptions = buildOptions;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
throw new Error("Can't add buildOptions for component manifest with id: " + manifest.resourceId + " a component has not been registered");
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
ComponentRegistry.newCombinedRules = (manifest, rules) => {
|
|
132
|
-
if (rules) {
|
|
74
|
+
static { this.ComponentRegistrations = new Map(); }
|
|
75
|
+
static { this.ComponentElements = {}; }
|
|
76
|
+
static { this.registerComponent = (manifest, componentOptions) => {
|
|
77
|
+
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
78
|
+
if (!componentOptions) {
|
|
79
|
+
throw new Error("Can't register component with missing componentOptions");
|
|
80
|
+
}
|
|
81
|
+
if (!componentOptions.elementName ||
|
|
82
|
+
!componentOptions.entryPoint) {
|
|
83
|
+
throw new Error("Can't register component with missing mandatory attributes: " + JSON.stringify(componentOptions));
|
|
84
|
+
}
|
|
85
|
+
if (ComponentRegistry.ComponentRegistrations.get(manifest.resourceId)) {
|
|
86
|
+
throw new Error("Can't re-register component on manifest with id: " + manifest.resourceId +
|
|
87
|
+
" current info: " + JSON.stringify(ComponentRegistry.ComponentRegistrations.get(manifest.resourceId)));
|
|
88
|
+
}
|
|
89
|
+
if (ComponentRegistry.ComponentElements[componentOptions.elementName]) {
|
|
90
|
+
throw new Error("Can't register component: " + JSON.stringify(componentOptions) + " elementName is already registered");
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
ComponentRegistry.ComponentElements[componentOptions.elementName] = true;
|
|
94
|
+
ComponentRegistry.ComponentRegistrations.set(manifest.resourceId, new ComponentRegistration(componentOptions, ManifestRegistry_1.ManifestRegistry.getCurrentManifestPath(), manifest));
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
ComponentRegistry.ComponentElements[componentOptions.elementName] = false;
|
|
98
|
+
ComponentRegistry.ComponentRegistrations.set(manifest.resourceId, null);
|
|
99
|
+
}
|
|
100
|
+
}; }
|
|
101
|
+
static { this.getComponentDefinition = (manifest) => {
|
|
133
102
|
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
134
|
-
Utils_1.Utils.validateSupportedLoadRuleTypes(rules);
|
|
135
103
|
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
136
104
|
if (registration != null) {
|
|
137
|
-
registration.
|
|
105
|
+
return registration.definition;
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}; }
|
|
109
|
+
static { this.addComponentDefinition = (manifest, definition) => {
|
|
110
|
+
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
111
|
+
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
112
|
+
if (registration != null) {
|
|
113
|
+
registration.definition = definition;
|
|
138
114
|
}
|
|
139
115
|
else {
|
|
140
|
-
throw new Error("Can't add
|
|
116
|
+
throw new Error("Can't add ComponentDefinition for component manifest with id: " + manifest.resourceId + " a component has not been registered");
|
|
141
117
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
ComponentRegistry.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
ComponentRegistry.ensureCorrectManifest
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
118
|
+
}; }
|
|
119
|
+
static { this.addComponentBuildOptions = (manifest, buildOptions) => {
|
|
120
|
+
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
121
|
+
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
122
|
+
if (registration != null) {
|
|
123
|
+
registration.buildOptions = buildOptions;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
throw new Error("Can't add buildOptions for component manifest with id: " + manifest.resourceId + " a component has not been registered");
|
|
127
|
+
}
|
|
128
|
+
}; }
|
|
129
|
+
static { this.newCombinedRules = (manifest, rules) => {
|
|
130
|
+
if (rules) {
|
|
131
|
+
ComponentRegistry.ensureCorrectManifest(manifest);
|
|
132
|
+
Utils_1.Utils.validateSupportedLoadRuleTypes(rules);
|
|
133
|
+
let registration = ComponentRegistry.ComponentRegistrations.get(manifest.resourceId);
|
|
134
|
+
if (registration != null) {
|
|
135
|
+
registration.loadRules = rules;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
throw new Error("Can't add load rules for component manifest with id: " + manifest.resourceId + " a component has not been registered");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}; }
|
|
142
|
+
static { this.getRegistrations = () => {
|
|
143
|
+
let components = [];
|
|
144
|
+
for (const wc of ComponentRegistry.ComponentRegistrations.values()) {
|
|
145
|
+
components.push(wc);
|
|
146
|
+
}
|
|
147
|
+
LoadableManifestRegistry_1.LoadableManifestRegistry.registerManifestProvider(new ComponentRegistry());
|
|
148
|
+
return components;
|
|
149
|
+
}; }
|
|
150
|
+
static { this.getComponentRegistrations = () => {
|
|
151
|
+
return Array.from(ComponentRegistry.ComponentRegistrations.values());
|
|
152
|
+
}; }
|
|
153
|
+
static { this.ensureCorrectManifest = (manifest) => {
|
|
154
|
+
if (!manifest ||
|
|
155
|
+
!manifest.manifestType ||
|
|
156
|
+
manifest.manifestType !== Enums_1.ClientManifestTypes.Component) {
|
|
157
|
+
throw new Error("Manifest :" + JSON.stringify(manifest) + " can't be used as component manifest. Mandatory properties maybe missing or the manifest is not of component type");
|
|
158
|
+
}
|
|
159
|
+
manifest.resourceId = Utils_1.Utils.ensureValidManifestId(manifest.resourceId);
|
|
160
|
+
}; }
|
|
161
|
+
}
|
|
162
|
+
exports.ComponentRegistry = ComponentRegistry;
|
|
@@ -56,41 +56,41 @@ class Composer {
|
|
|
56
56
|
*/
|
|
57
57
|
constructor() {
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Registers a new manifest
|
|
61
|
+
* @param manifestId the unique id of the manifest, must be a valid guid.
|
|
62
|
+
* @param name a friendly name of the manifest.
|
|
63
|
+
*/
|
|
64
|
+
static { this.registerManifest = (manifestId, name) => {
|
|
65
|
+
return new NewManifestComposer(manifestId.toString(), name);
|
|
66
|
+
}; }
|
|
67
|
+
/**
|
|
68
|
+
* Re-opens resources manifest, so more resources can be included.
|
|
69
|
+
* {param}:manifestId the unique id of the resource manifest to open, must be a valid guid.
|
|
70
|
+
*/
|
|
71
|
+
static { this.openResourceManifest = (manifestId) => {
|
|
72
|
+
return new ResourcesComposer_1.ReOpenedResourceComposer(manifestId.toString());
|
|
73
|
+
}; }
|
|
59
74
|
/** Add information about things you want to block.
|
|
60
75
|
E.g. block a manifest from being loaded, so you can provide your own implementation
|
|
61
76
|
*/
|
|
62
77
|
static get block() {
|
|
63
78
|
return new BlockingComposer_1.BlockingComposer();
|
|
64
79
|
}
|
|
80
|
+
static { this.importManifests = (folderPath) => {
|
|
81
|
+
ImportManifestRegistry_1.ImportManifestRegistry.add(folderPath);
|
|
82
|
+
return {
|
|
83
|
+
configuration: (omniaServiceId, configurationType) => {
|
|
84
|
+
return _1.ConfigurationClientServiceRegistry.Add(omniaServiceId, configurationType, [Composer]);
|
|
85
|
+
},
|
|
86
|
+
done: () => {
|
|
87
|
+
return {
|
|
88
|
+
registerManifest: Composer.registerManifest,
|
|
89
|
+
openResourceManifest: Composer.openResourceManifest,
|
|
90
|
+
block: Composer.block
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}; }
|
|
65
95
|
}
|
|
66
96
|
exports.Composer = Composer;
|
|
67
|
-
/**
|
|
68
|
-
* Registers a new manifest
|
|
69
|
-
* @param manifestId the unique id of the manifest, must be a valid guid.
|
|
70
|
-
* @param name a friendly name of the manifest.
|
|
71
|
-
*/
|
|
72
|
-
Composer.registerManifest = (manifestId, name) => {
|
|
73
|
-
return new NewManifestComposer(manifestId.toString(), name);
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Re-opens resources manifest, so more resources can be included.
|
|
77
|
-
* {param}:manifestId the unique id of the resource manifest to open, must be a valid guid.
|
|
78
|
-
*/
|
|
79
|
-
Composer.openResourceManifest = (manifestId) => {
|
|
80
|
-
return new ResourcesComposer_1.ReOpenedResourceComposer(manifestId.toString());
|
|
81
|
-
};
|
|
82
|
-
Composer.importManifests = (folderPath) => {
|
|
83
|
-
ImportManifestRegistry_1.ImportManifestRegistry.add(folderPath);
|
|
84
|
-
return {
|
|
85
|
-
configuration: (omniaServiceId, configurationType) => {
|
|
86
|
-
return _1.ConfigurationClientServiceRegistry.Add(omniaServiceId, configurationType, [Composer]);
|
|
87
|
-
},
|
|
88
|
-
done: () => {
|
|
89
|
-
return {
|
|
90
|
-
registerManifest: Composer.registerManifest,
|
|
91
|
-
openResourceManifest: Composer.openResourceManifest,
|
|
92
|
-
block: Composer.block
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
};
|
|
@@ -48,6 +48,7 @@ class OmniaFxConfigurator {
|
|
|
48
48
|
}
|
|
49
49
|
exports.OmniaFxConfigurator = OmniaFxConfigurator;
|
|
50
50
|
class ConfigurationClientServiceRegistry {
|
|
51
|
+
static { this.configurations = {}; }
|
|
51
52
|
static Add(omniaServiceId, configurationType, constructorArgs) {
|
|
52
53
|
let creator = function construct(constructor, args) {
|
|
53
54
|
function F() {
|
|
@@ -67,20 +68,19 @@ class ConfigurationClientServiceRegistry {
|
|
|
67
68
|
static getConfigurations() {
|
|
68
69
|
return ConfigurationClientServiceRegistry.configurations;
|
|
69
70
|
}
|
|
71
|
+
static { this.getClientManifests = (currentServiceId) => {
|
|
72
|
+
let result = new Array();
|
|
73
|
+
let configuration = ConfigurationClientServiceRegistry.configurations[currentServiceId.toLowerCase()];
|
|
74
|
+
if (configuration) {
|
|
75
|
+
result.push(Object.assign({}, configuration.build(), {
|
|
76
|
+
manifestType: models_1.ClientManifestTypes.Configuration
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
}; }
|
|
81
|
+
static { this.clearState = () => {
|
|
82
|
+
ConfigurationClientServiceRegistry.configurations = {};
|
|
83
|
+
}; }
|
|
84
|
+
static { this.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(ConfigurationClientServiceRegistry.getClientManifests, ConfigurationClientServiceRegistry.clearState)); }
|
|
70
85
|
}
|
|
71
86
|
exports.ConfigurationClientServiceRegistry = ConfigurationClientServiceRegistry;
|
|
72
|
-
ConfigurationClientServiceRegistry.configurations = {};
|
|
73
|
-
ConfigurationClientServiceRegistry.getClientManifests = (currentServiceId) => {
|
|
74
|
-
let result = new Array();
|
|
75
|
-
let configuration = ConfigurationClientServiceRegistry.configurations[currentServiceId.toLowerCase()];
|
|
76
|
-
if (configuration) {
|
|
77
|
-
result.push(Object.assign({}, configuration.build(), {
|
|
78
|
-
manifestType: models_1.ClientManifestTypes.Configuration
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
82
|
-
};
|
|
83
|
-
ConfigurationClientServiceRegistry.clearState = () => {
|
|
84
|
-
ConfigurationClientServiceRegistry.configurations = {};
|
|
85
|
-
};
|
|
86
|
-
ConfigurationClientServiceRegistry.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(ConfigurationClientServiceRegistry.getClientManifests, ConfigurationClientServiceRegistry.clearState));
|
|
@@ -25,13 +25,13 @@ class DevelopmentBuildConfiguration {
|
|
|
25
25
|
static get isEnableMeasureBuild() {
|
|
26
26
|
return DevelopmentBuildConfiguration._enableMeasureBuild;
|
|
27
27
|
}
|
|
28
|
+
static { this.getServerManifests = (currentServiceId) => {
|
|
29
|
+
let serverManifests = new Array();
|
|
30
|
+
return serverManifests;
|
|
31
|
+
}; }
|
|
32
|
+
static { this.clearState = () => {
|
|
33
|
+
DevelopmentBuildConfiguration._disableBuild = false;
|
|
34
|
+
}; }
|
|
35
|
+
static { this.clientSubscription = ManifestRegistry_1.ManifestRegistry.registerServerManifestProvider(new ManifestRegistry_1.StaticServerManifestProviderProxy(DevelopmentBuildConfiguration.getServerManifests, DevelopmentBuildConfiguration.clearState)); }
|
|
28
36
|
}
|
|
29
37
|
exports.DevelopmentBuildConfiguration = DevelopmentBuildConfiguration;
|
|
30
|
-
DevelopmentBuildConfiguration.getServerManifests = (currentServiceId) => {
|
|
31
|
-
let serverManifests = new Array();
|
|
32
|
-
return serverManifests;
|
|
33
|
-
};
|
|
34
|
-
DevelopmentBuildConfiguration.clearState = () => {
|
|
35
|
-
DevelopmentBuildConfiguration._disableBuild = false;
|
|
36
|
-
};
|
|
37
|
-
DevelopmentBuildConfiguration.clientSubscription = ManifestRegistry_1.ManifestRegistry.registerServerManifestProvider(new ManifestRegistry_1.StaticServerManifestProviderProxy(DevelopmentBuildConfiguration.getServerManifests, DevelopmentBuildConfiguration.clearState));
|
|
@@ -19,11 +19,11 @@ class DevelopmentEnvironment {
|
|
|
19
19
|
get hosting() {
|
|
20
20
|
return new DevelopmentHostingEnvironment_1.DevelopmentHostingEnvironment(this.localOverride);
|
|
21
21
|
}
|
|
22
|
+
static { this.localOverride = () => {
|
|
23
|
+
return new DevelopmentEnvironment(true);
|
|
24
|
+
}; }
|
|
22
25
|
get build() {
|
|
23
26
|
return new DevelopmentBuildConfiguration_1.DevelopmentBuildConfiguration();
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
exports.DevelopmentEnvironment = DevelopmentEnvironment;
|
|
27
|
-
DevelopmentEnvironment.localOverride = () => {
|
|
28
|
-
return new DevelopmentEnvironment(true);
|
|
29
|
-
};
|
|
@@ -75,13 +75,13 @@ class DevelopmentHostingEnvironment {
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
+
static { this.getServerManifests = (currentServiceId) => {
|
|
79
|
+
let serverManifests = new Array();
|
|
80
|
+
return serverManifests;
|
|
81
|
+
}; }
|
|
82
|
+
static { this.clearState = () => {
|
|
83
|
+
devHosting = null;
|
|
84
|
+
}; }
|
|
85
|
+
static { this.ServerSubscription = ManifestRegistry_1.ManifestRegistry.registerServerManifestProvider(new ManifestRegistry_1.StaticServerManifestProviderProxy(DevelopmentHostingEnvironment.getServerManifests, DevelopmentHostingEnvironment.clearState)); }
|
|
78
86
|
}
|
|
79
87
|
exports.DevelopmentHostingEnvironment = DevelopmentHostingEnvironment;
|
|
80
|
-
DevelopmentHostingEnvironment.getServerManifests = (currentServiceId) => {
|
|
81
|
-
let serverManifests = new Array();
|
|
82
|
-
return serverManifests;
|
|
83
|
-
};
|
|
84
|
-
DevelopmentHostingEnvironment.clearState = () => {
|
|
85
|
-
devHosting = null;
|
|
86
|
-
};
|
|
87
|
-
DevelopmentHostingEnvironment.ServerSubscription = ManifestRegistry_1.ManifestRegistry.registerServerManifestProvider(new ManifestRegistry_1.StaticServerManifestProviderProxy(DevelopmentHostingEnvironment.getServerManifests, DevelopmentHostingEnvironment.clearState));
|
|
@@ -3,23 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ImportManifestRegistry = void 0;
|
|
4
4
|
const ManifestRegistry_1 = require("./ManifestRegistry");
|
|
5
5
|
class ImportManifestRegistry {
|
|
6
|
+
static { this.manifestPackagePaths = []; }
|
|
7
|
+
static { this.add = (path) => {
|
|
8
|
+
// use Set to filter duplicate
|
|
9
|
+
if (ImportManifestRegistry.manifestPackagePaths.indexOf(path) > -1) {
|
|
10
|
+
throw new Error(`Error, already import manifest with path ${path}`);
|
|
11
|
+
}
|
|
12
|
+
ImportManifestRegistry.manifestPackagePaths.push(path);
|
|
13
|
+
}; }
|
|
14
|
+
static { this.getPaths = () => {
|
|
15
|
+
return [...ImportManifestRegistry.manifestPackagePaths];
|
|
16
|
+
}; }
|
|
17
|
+
static { this.getClientManifests = (currentServiceId) => {
|
|
18
|
+
return new Array();
|
|
19
|
+
}; }
|
|
20
|
+
static { this.clearState = () => {
|
|
21
|
+
ImportManifestRegistry.manifestPackagePaths = [];
|
|
22
|
+
}; }
|
|
23
|
+
static { this.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(ImportManifestRegistry.getClientManifests, ImportManifestRegistry.clearState)); }
|
|
6
24
|
}
|
|
7
25
|
exports.ImportManifestRegistry = ImportManifestRegistry;
|
|
8
|
-
ImportManifestRegistry.manifestPackagePaths = [];
|
|
9
|
-
ImportManifestRegistry.add = (path) => {
|
|
10
|
-
// use Set to filter duplicate
|
|
11
|
-
if (ImportManifestRegistry.manifestPackagePaths.indexOf(path) > -1) {
|
|
12
|
-
throw new Error(`Error, already import manifest with path ${path}`);
|
|
13
|
-
}
|
|
14
|
-
ImportManifestRegistry.manifestPackagePaths.push(path);
|
|
15
|
-
};
|
|
16
|
-
ImportManifestRegistry.getPaths = () => {
|
|
17
|
-
return [...ImportManifestRegistry.manifestPackagePaths];
|
|
18
|
-
};
|
|
19
|
-
ImportManifestRegistry.getClientManifests = (currentServiceId) => {
|
|
20
|
-
return new Array();
|
|
21
|
-
};
|
|
22
|
-
ImportManifestRegistry.clearState = () => {
|
|
23
|
-
ImportManifestRegistry.manifestPackagePaths = [];
|
|
24
|
-
};
|
|
25
|
-
ImportManifestRegistry.Subscription = ManifestRegistry_1.ManifestRegistry.registerClientManifestProvider(new ManifestRegistry_1.StaticClientManifestProviderProxy(ImportManifestRegistry.getClientManifests, ImportManifestRegistry.clearState));
|