@omnia/tooling-composers 8.0.179-dev → 8.0.181-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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SecurityProviderCombinableRuleComposer = void 0;
4
4
  const Enums_1 = require("./models/Enums");
5
- const Utils_1 = require("./Utils");
5
+ const fx_models_1 = require("@omnia/fx-models");
6
6
  class SecurityProviderCombinableRuleComposer {
7
7
  constructor(newRuleCb, composerForDone) {
8
8
  this.newRuleCb = newRuleCb;
@@ -17,7 +17,7 @@ class SecurityProviderCombinableRuleComposer {
17
17
  if (!securityProviderId) {
18
18
  throw new Error("Can't add security provider rule with id null/empty/undefined");
19
19
  }
20
- if (!Utils_1.Utils.isValidGuid(securityProviderId)) {
20
+ if (!fx_models_1.Guid.isValid(securityProviderId)) {
21
21
  throw new Error("Can't add security provider rule with id: " + securityProviderId + " must be a valid Guid");
22
22
  }
23
23
  if (this.selectedLogicalOperator == null &&
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CustomServiceComposer = void 0;
4
4
  const models_1 = require("./models");
5
- const Utils_1 = require("./Utils");
6
5
  const ServiceManifestRegistry_1 = require("./ServiceManifestRegistry");
7
6
  const ServiceManifestComposer_1 = require("./ServiceManifestComposer");
7
+ const fx_models_1 = require("@omnia/fx-models");
8
8
  class CustomServiceComposer extends ServiceManifestComposer_1.ServiceManifestComposer {
9
9
  constructor(manifestId, manifestTitle, serviceOptions) {
10
10
  // TODO wait hot reload update not execute composer two times
11
11
  super(() => { return this; });
12
12
  this.manifestId = manifestId;
13
13
  this.manifestTitle = manifestTitle;
14
- if (!Utils_1.Utils.isValidGuid(this.manifestId)) {
14
+ if (!fx_models_1.Guid.isValid(this.manifestId)) {
15
15
  throw new Error("Can't register omnia service with id: " + this.manifestId + " must be a valid Guid");
16
16
  }
17
17
  let serviceInfo = {
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServiceComposer = void 0;
4
- const Utils_1 = require("./Utils");
5
4
  const WebAppServiceComposer_1 = require("./WebAppServiceComposer");
6
5
  const WorkerServiceComposer_1 = require("./WorkerServiceComposer");
7
6
  const CustomServiceComposer_1 = require("./CustomServiceComposer");
7
+ const fx_models_1 = require("@omnia/fx-models");
8
8
  class ServiceComposer {
9
9
  constructor(manifestId, manifestName, serviceInfo) {
10
10
  // TODO wait hot reload update not execute composer two times
@@ -20,7 +20,7 @@ class ServiceComposer {
20
20
  this.AsCustom = () => {
21
21
  return new CustomServiceComposer_1.CustomServiceComposer(this.manifestId, this.manifestName, this.serviceInfo);
22
22
  };
23
- if (!Utils_1.Utils.isValidGuid(this.manifestId)) {
23
+ if (!fx_models_1.Guid.isValid(this.manifestId)) {
24
24
  throw new Error("Can't register service with id: " + this.manifestId + " must be a valid Guid");
25
25
  }
26
26
  }
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Utils = void 0;
4
+ const models_1 = require("../../fx-models");
4
5
  //import { LoadByUrlMatchingRule, DomMatchingRule, ClientResolvableLoadRule, FeatureActiveRule, LoadIfManifestLoaded } from "./models";
5
6
  class Utils {
6
7
  static { this.ensureValidManifestId = (id, errorMsg) => {
7
8
  if (!id) {
8
9
  throw new Error(errorMsg ? errorMsg : "Invalid manifest id, can't be null/empty or undefined");
9
10
  }
10
- if (!Utils.isValidGuid(id.toString())) {
11
+ if (!models_1.Guid.isValid(id.toString())) {
11
12
  console.dir(id);
12
13
  throw new Error("The manifest id must be a valid guid");
13
14
  }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebAppServiceComposer = void 0;
4
4
  const models_1 = require("./models");
5
- const Utils_1 = require("./Utils");
6
5
  const CombinableSecurityProviderComposer_1 = require("./CombinableSecurityProviderComposer");
7
6
  const SecurityProviderManifestRegistry_1 = require("./SecurityProviderManifestRegistry");
8
7
  const ServiceManifestRegistry_1 = require("./ServiceManifestRegistry");
@@ -32,7 +31,7 @@ class WebAppServiceComposer extends ServiceManifestComposer_1.ServiceManifestCom
32
31
  if (!validScope) {
33
32
  throw new Error("Can't add role based security provider with scope: " + options.scope + " it's not a valid scope value");
34
33
  }
35
- if (!Utils_1.Utils.isValidGuid(options.providerId)) {
34
+ if (!models_2.Guid.isValid(options.providerId)) {
36
35
  throw new Error("Can't add role based security provider with id: " + options.providerId + " must be a valid Guid");
37
36
  }
38
37
  if (!options.roleName) {
@@ -51,7 +50,7 @@ class WebAppServiceComposer extends ServiceManifestComposer_1.ServiceManifestCom
51
50
  if (!options) {
52
51
  throw new Error("Can't add combined security provider with missing options");
53
52
  }
54
- if (!Utils_1.Utils.isValidGuid(options.providerId)) {
53
+ if (!models_2.Guid.isValid(options.providerId)) {
55
54
  throw new Error("Can't add combined security provider with id: " + options.providerId + " must be a valid Guid");
56
55
  }
57
56
  let combinedProvider = {
@@ -65,7 +64,7 @@ class WebAppServiceComposer extends ServiceManifestComposer_1.ServiceManifestCom
65
64
  SecurityProviderManifestRegistry_1.SecurityProviderManifestRegistry.AddSecurityProvider(combinedProvider);
66
65
  return new CombinableSecurityProviderComposer_1.SecurityProviderCombinableRuleComposer(cbNewRule, this);
67
66
  };
68
- if (!Utils_1.Utils.isValidGuid(this.manifestId)) {
67
+ if (!models_2.Guid.isValid(this.manifestId)) {
69
68
  throw new Error("Can't register omnia service with id: " + this.manifestId + " must be a valid Guid");
70
69
  }
71
70
  let serviceInfo = {
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkerServiceComposer = void 0;
4
4
  const models_1 = require("./models");
5
- const Utils_1 = require("./Utils");
6
5
  const ServiceManifestRegistry_1 = require("./ServiceManifestRegistry");
7
6
  const ServiceManifestComposer_1 = require("./ServiceManifestComposer");
7
+ const fx_models_1 = require("@omnia/fx-models");
8
8
  class WorkerServiceComposer extends ServiceManifestComposer_1.ServiceManifestComposer {
9
9
  constructor(manifestId, manifestTitle, serviceOptions) {
10
10
  // TODO wait hot reload update not execute composer two times
11
11
  super(() => { return this; });
12
12
  this.manifestId = manifestId;
13
13
  this.manifestTitle = manifestTitle;
14
- if (!Utils_1.Utils.isValidGuid(this.manifestId)) {
14
+ if (!fx_models_1.Guid.isValid(this.manifestId)) {
15
15
  throw new Error("Can't register omnia service with id: " + this.manifestId + " must be a valid Guid");
16
16
  }
17
17
  let serviceInfo = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling-composers",
3
3
  "license": "MIT",
4
- "version": "8.0.179-dev",
4
+ "version": "8.0.181-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.179-dev",
23
- "@omnia/tooling": "8.0.179-dev",
22
+ "@omnia/fx-models": "8.0.181-dev",
23
+ "@omnia/tooling": "8.0.181-dev",
24
24
  "deep-extend": "0.6.0",
25
25
  "fs-extra": "11.1.0",
26
26
  "del": "6.0.0",