@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.
Files changed (24) hide show
  1. package/internal-do-not-import-from-here/BlockingRegistry.js +33 -33
  2. package/internal-do-not-import-from-here/BuildConfigurationRegistry.js +19 -19
  3. package/internal-do-not-import-from-here/ComponentRegistry.js +83 -83
  4. package/internal-do-not-import-from-here/Composer.js +30 -30
  5. package/internal-do-not-import-from-here/ConfigurationClientServiceRegistry.js +15 -15
  6. package/internal-do-not-import-from-here/DevelopmentBuildConfiguration.js +8 -8
  7. package/internal-do-not-import-from-here/DevelopmentEnvironment.js +3 -3
  8. package/internal-do-not-import-from-here/DevelopmentHostingEnvironment.js +8 -8
  9. package/internal-do-not-import-from-here/ImportManifestRegistry.js +18 -18
  10. package/internal-do-not-import-from-here/LoadableManifestRegistry.js +247 -249
  11. package/internal-do-not-import-from-here/LocalizationComposer.js +15 -15
  12. package/internal-do-not-import-from-here/ManifestGroupRegistry.js +87 -87
  13. package/internal-do-not-import-from-here/ManifestRegistry.js +83 -83
  14. package/internal-do-not-import-from-here/RequestedResourcesRegistry.js +54 -54
  15. package/internal-do-not-import-from-here/RequiredAzureAdAppPermissionRegistry.js +12 -12
  16. package/internal-do-not-import-from-here/ResourceRegistry.js +136 -136
  17. package/internal-do-not-import-from-here/SecurityProviderManifestRegistry.js +24 -24
  18. package/internal-do-not-import-from-here/ServiceAppRegistry.js +26 -26
  19. package/internal-do-not-import-from-here/ServiceFeatureRegistry.js +27 -27
  20. package/internal-do-not-import-from-here/ServiceManifestRegistry.js +29 -29
  21. package/internal-do-not-import-from-here/ServiceRoleRegistry.js +26 -26
  22. package/internal-do-not-import-from-here/Utils.js +79 -79
  23. package/internal-do-not-import-from-here/task.js +1 -1
  24. package/package.json +3 -3
@@ -3,6 +3,85 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Utils = void 0;
4
4
  //import { LoadByUrlMatchingRule, DomMatchingRule, ClientResolvableLoadRule, FeatureActiveRule, LoadIfManifestLoaded } from "./models";
5
5
  class Utils {
6
+ static { this.ensureValidManifestId = (id, errorMsg) => {
7
+ if (!id) {
8
+ throw new Error(errorMsg ? errorMsg : "Invalid manifest id, can't be null/empty or undefined");
9
+ }
10
+ if (!Utils.isValidGuid(id.toString())) {
11
+ console.dir(id);
12
+ throw new Error("The manifest id must be a valid guid");
13
+ }
14
+ return id.toString().toLowerCase();
15
+ }; }
16
+ static { this.ensureValidServiceId = (id, errorMsg) => {
17
+ if (!id) {
18
+ throw new Error(errorMsg ? errorMsg : "Invalid service id, can't be null/empty or undefined");
19
+ }
20
+ return id.toString().toLowerCase();
21
+ }; }
22
+ static { this.ensureValidElementName = (name, errorMsg) => {
23
+ if (!name) {
24
+ throw new Error(errorMsg ? errorMsg : "Invalid element name, can't be null/empty or undefined");
25
+ }
26
+ return name.toUpperCase();
27
+ }; }
28
+ static { this.validateSupportedLoadRuleTypes = (rules) => {
29
+ if (rules) {
30
+ for (let rule of rules) {
31
+ Utils.validateSupportedLoadRuleType(rule);
32
+ }
33
+ }
34
+ }; }
35
+ static { this.validateSupportedLoadRuleType = (rule) => {
36
+ if (!rule ||
37
+ !rule.rule) {
38
+ throw new Error("Can't add rule null/empty/undefined");
39
+ }
40
+ let testIfValidLoadByUrl = rule.rule;
41
+ let testIfValidLoadByElement = rule.rule;
42
+ let testIfValidFeatureEnabled = rule.rule;
43
+ let testIfValidLicense = rule.rule;
44
+ let testIfValidManifestLoaded = rule.rule;
45
+ let testIfValidUser = rule.rule;
46
+ let testIfValidClientRuntime = rule.rule;
47
+ let testIfValidBackendRuntime = rule.rule;
48
+ if (testIfValidLoadByUrl.regEx ||
49
+ testIfValidLoadByUrl.startsWith) {
50
+ }
51
+ else if (testIfValidLoadByElement.cssSelector) {
52
+ }
53
+ else if (testIfValidFeatureEnabled.featureId) {
54
+ }
55
+ else if (testIfValidUser.userPropertyName) {
56
+ }
57
+ else if (testIfValidLicense.licenseId) {
58
+ }
59
+ else if (testIfValidManifestLoaded.omniaServiceId &&
60
+ testIfValidManifestLoaded.resourceId) {
61
+ }
62
+ else if (testIfValidClientRuntime.clientRuntimeTypes) {
63
+ }
64
+ else if (testIfValidBackendRuntime.backendRuntimeTypes) {
65
+ }
66
+ else {
67
+ throw new Error("ICombinableLoadRule is not matching any of the (OOTB) supported load rules, make sure all mandatory properties has valid values for rule: " + JSON.stringify(rule));
68
+ }
69
+ }; }
70
+ static { this.isValidGuid = (value) => {
71
+ if (!Utils.isNullOrEmpty(value)) {
72
+ var result = value.match(/^[{]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[}]?$/);
73
+ return result !== null && result.length > 0;
74
+ }
75
+ return false;
76
+ }; }
77
+ static { this.isNull = (obj) => {
78
+ if (obj === 0 || obj === false)
79
+ return false;
80
+ return (!obj || typeof obj === "undefined" || obj === null);
81
+ }; }
82
+ static { this.isNullOrEmpty = (obj) => {
83
+ return Utils.isNull(obj) || obj === "";
84
+ }; }
6
85
  static getPropertyPathInExpression(exp) {
7
86
  const result = new Set();
8
87
  const targetObject = {};
@@ -67,82 +146,3 @@ class Utils {
67
146
  }
68
147
  }
69
148
  exports.Utils = Utils;
70
- Utils.ensureValidManifestId = (id, errorMsg) => {
71
- if (!id) {
72
- throw new Error(errorMsg ? errorMsg : "Invalid manifest id, can't be null/empty or undefined");
73
- }
74
- if (!Utils.isValidGuid(id.toString())) {
75
- console.dir(id);
76
- throw new Error("The manifest id must be a valid guid");
77
- }
78
- return id.toString().toLowerCase();
79
- };
80
- Utils.ensureValidServiceId = (id, errorMsg) => {
81
- if (!id) {
82
- throw new Error(errorMsg ? errorMsg : "Invalid service id, can't be null/empty or undefined");
83
- }
84
- return id.toString().toLowerCase();
85
- };
86
- Utils.ensureValidElementName = (name, errorMsg) => {
87
- if (!name) {
88
- throw new Error(errorMsg ? errorMsg : "Invalid element name, can't be null/empty or undefined");
89
- }
90
- return name.toUpperCase();
91
- };
92
- Utils.validateSupportedLoadRuleTypes = (rules) => {
93
- if (rules) {
94
- for (let rule of rules) {
95
- Utils.validateSupportedLoadRuleType(rule);
96
- }
97
- }
98
- };
99
- Utils.validateSupportedLoadRuleType = (rule) => {
100
- if (!rule ||
101
- !rule.rule) {
102
- throw new Error("Can't add rule null/empty/undefined");
103
- }
104
- let testIfValidLoadByUrl = rule.rule;
105
- let testIfValidLoadByElement = rule.rule;
106
- let testIfValidFeatureEnabled = rule.rule;
107
- let testIfValidLicense = rule.rule;
108
- let testIfValidManifestLoaded = rule.rule;
109
- let testIfValidUser = rule.rule;
110
- let testIfValidClientRuntime = rule.rule;
111
- let testIfValidBackendRuntime = rule.rule;
112
- if (testIfValidLoadByUrl.regEx ||
113
- testIfValidLoadByUrl.startsWith) {
114
- }
115
- else if (testIfValidLoadByElement.cssSelector) {
116
- }
117
- else if (testIfValidFeatureEnabled.featureId) {
118
- }
119
- else if (testIfValidUser.userPropertyName) {
120
- }
121
- else if (testIfValidLicense.licenseId) {
122
- }
123
- else if (testIfValidManifestLoaded.omniaServiceId &&
124
- testIfValidManifestLoaded.resourceId) {
125
- }
126
- else if (testIfValidClientRuntime.clientRuntimeTypes) {
127
- }
128
- else if (testIfValidBackendRuntime.backendRuntimeTypes) {
129
- }
130
- else {
131
- throw new Error("ICombinableLoadRule is not matching any of the (OOTB) supported load rules, make sure all mandatory properties has valid values for rule: " + JSON.stringify(rule));
132
- }
133
- };
134
- Utils.isValidGuid = (value) => {
135
- if (!Utils.isNullOrEmpty(value)) {
136
- var result = value.match(/^[{]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[}]?$/);
137
- return result !== null && result.length > 0;
138
- }
139
- return false;
140
- };
141
- Utils.isNull = (obj) => {
142
- if (obj === 0 || obj === false)
143
- return false;
144
- return (!obj || typeof obj === "undefined" || obj === null);
145
- };
146
- Utils.isNullOrEmpty = (obj) => {
147
- return Utils.isNull(obj) || obj === "";
148
- };
@@ -46,6 +46,7 @@ tooling_1.core.registerBuildTask({ stage: tooling_1.core.TaskStage.Build, order:
46
46
  tooling_1.core.registerServeTask({ stage: tooling_1.core.TaskStage.BeforeCreateServer, order: 1, task: beforeCreateServer });
47
47
  tooling_1.core.registerServeTask({ stage: tooling_1.core.TaskStage.AfterCreateServer, order: 1, task: serve });
48
48
  class OmniaOutput {
49
+ static { this.rootFolder = "wwwroot"; } // set default web app root folder
49
50
  static get OutputLocalizationPath() {
50
51
  return _outputLocalizationPath.replace("{{rootFolder}}", getOutDir(this.rootFolder));
51
52
  }
@@ -66,7 +67,6 @@ class OmniaOutput {
66
67
  }
67
68
  }
68
69
  exports.OmniaOutput = OmniaOutput;
69
- OmniaOutput.rootFolder = "wwwroot"; // set default web app root folder
70
70
  function getOutDir(defaultDir) {
71
71
  const buildOptions = composers.BuildConfigurationRegistry.getBuildOptions();
72
72
  return tooling_1.utils.ensureTraillingSlash(buildOptions?.outDir || defaultDir);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling-composers",
3
3
  "license": "MIT",
4
- "version": "8.0.128-dev",
4
+ "version": "8.0.129-dev",
5
5
  "description": "Provide tooling to work with manifest things.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "author": "Precio Fishbone",
21
21
  "dependencies": {
22
- "@omnia/fx-models": "8.0.128-dev",
23
- "@omnia/tooling": "8.0.128-dev",
22
+ "@omnia/fx-models": "8.0.129-dev",
23
+ "@omnia/tooling": "8.0.129-dev",
24
24
  "deep-extend": "0.6.0",
25
25
  "fs-extra": "11.1.0",
26
26
  "del": "6.0.0",