@o3r/rules-engine 10.0.0-next.8 → 11.0.0-next.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.
Files changed (195) hide show
  1. package/README.md +16 -17
  2. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.d.ts +1 -1
  3. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.d.ts.map +1 -1
  4. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.interfaces.d.ts +2 -0
  5. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.interfaces.d.ts.map +1 -1
  6. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.js +10 -2
  7. package/builders/rules-engine-extractor/helpers/rules-engine.extractor.js.map +1 -1
  8. package/builders/rules-engine-extractor/index.js.map +1 -1
  9. package/builders/rules-engine-extractor/schema.json +1 -1
  10. package/components/rules-engine/rule-condition/rule-condition-pres.component.d.ts +2 -2
  11. package/components/rules-engine/rule-condition/rule-condition-pres.component.d.ts.map +1 -1
  12. package/components/rules-engine/rule-key-value/rule-key-value-pres.component.d.ts +1 -1
  13. package/components/rules-engine/rule-key-value/rule-key-value-pres.component.d.ts.map +1 -1
  14. package/components/rules-engine/ruleset-history/ruleset-history-pres.component.d.ts +1 -3
  15. package/components/rules-engine/ruleset-history/ruleset-history-pres.component.d.ts.map +1 -1
  16. package/components/rules-engine/shared/ruleset-history.helper.d.ts +0 -2
  17. package/components/rules-engine/shared/ruleset-history.helper.d.ts.map +1 -1
  18. package/devkit/rules-engine-devtools.console.service.d.ts +0 -7
  19. package/devkit/rules-engine-devtools.console.service.d.ts.map +1 -1
  20. package/devkit/rules-engine-devtools.message.service.d.ts +4 -6
  21. package/devkit/rules-engine-devtools.message.service.d.ts.map +1 -1
  22. package/devkit/rules-engine-devtools.module.d.ts +0 -1
  23. package/devkit/rules-engine-devtools.module.d.ts.map +1 -1
  24. package/devkit/rules-engine-devtools.service.d.ts +3 -10
  25. package/devkit/rules-engine-devtools.service.d.ts.map +1 -1
  26. package/engine/debug/engine.debug.d.ts +4 -12
  27. package/engine/debug/engine.debug.d.ts.map +1 -1
  28. package/engine/debug/helpers.d.ts +2 -4
  29. package/engine/debug/helpers.d.ts.map +1 -1
  30. package/engine/engine.d.ts +4 -13
  31. package/engine/engine.d.ts.map +1 -1
  32. package/engine/engine.interface.d.ts +2 -6
  33. package/engine/engine.interface.d.ts.map +1 -1
  34. package/engine/fact/fact.interfaces.d.ts +2 -0
  35. package/engine/fact/fact.interfaces.d.ts.map +1 -1
  36. package/engine/helpers/filter-ruleset-event.operator.d.ts +0 -1
  37. package/engine/helpers/filter-ruleset-event.operator.d.ts.map +1 -1
  38. package/engine/operator/operator.helpers.d.ts +10 -9
  39. package/engine/operator/operator.helpers.d.ts.map +1 -1
  40. package/engine/operator/operator.interface.d.ts +4 -1
  41. package/engine/operator/operator.interface.d.ts.map +1 -1
  42. package/engine/operator/operators/array-based.operators.d.ts +0 -23
  43. package/engine/operator/operators/array-based.operators.d.ts.map +1 -1
  44. package/engine/operator/operators/basic.operators.d.ts +5 -8
  45. package/engine/operator/operators/basic.operators.d.ts.map +1 -1
  46. package/engine/operator/operators/date-based.operators.d.ts +13 -6
  47. package/engine/operator/operators/date-based.operators.d.ts.map +1 -1
  48. package/engine/operator/operators/index.d.ts +1 -1
  49. package/engine/operator/operators/index.d.ts.map +1 -1
  50. package/engine/operator/operators/number-based.operators.d.ts +0 -4
  51. package/engine/operator/operators/number-based.operators.d.ts.map +1 -1
  52. package/engine/rule/rule.helpers.d.ts +0 -7
  53. package/engine/rule/rule.helpers.d.ts.map +1 -1
  54. package/engine/ruleset-executor.d.ts +15 -13
  55. package/engine/ruleset-executor.d.ts.map +1 -1
  56. package/engine/structure.d.ts +9 -5
  57. package/engine/structure.d.ts.map +1 -1
  58. package/esm2022/components/rules-engine/rule-actions/rule-actions-pres.component.mjs +4 -4
  59. package/esm2022/components/rules-engine/rule-condition/rule-condition-pres.component.mjs +8 -13
  60. package/esm2022/components/rules-engine/rule-key-value/rule-key-value-pres.component.mjs +5 -5
  61. package/esm2022/components/rules-engine/rule-tree/rule-tree-pres.component.mjs +5 -5
  62. package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.component.mjs +6 -8
  63. package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.module.mjs +4 -4
  64. package/esm2022/components/rules-engine/shared/fallback-to.pipe.mjs +3 -3
  65. package/esm2022/components/rules-engine/shared/ruleset-history.helper.mjs +1 -3
  66. package/esm2022/devkit/rules-engine-devtools.console.service.mjs +6 -13
  67. package/esm2022/devkit/rules-engine-devtools.message.service.mjs +6 -8
  68. package/esm2022/devkit/rules-engine-devtools.module.mjs +5 -6
  69. package/esm2022/devkit/rules-engine-devtools.service.mjs +7 -14
  70. package/esm2022/engine/debug/engine.debug.mjs +2 -10
  71. package/esm2022/engine/debug/helpers.mjs +1 -4
  72. package/esm2022/engine/engine.interface.mjs +1 -1
  73. package/esm2022/engine/engine.mjs +1 -9
  74. package/esm2022/engine/fact/fact.interfaces.mjs +1 -1
  75. package/esm2022/engine/helpers/filter-ruleset-event.operator.mjs +1 -2
  76. package/esm2022/engine/operator/index.mjs +1 -1
  77. package/esm2022/engine/operator/operator.helpers.mjs +33 -13
  78. package/esm2022/engine/operator/operator.interface.mjs +1 -1
  79. package/esm2022/engine/operator/operators/array-based.operators.mjs +6 -29
  80. package/esm2022/engine/operator/operators/basic.operators.mjs +16 -11
  81. package/esm2022/engine/operator/operators/date-based.operators.mjs +48 -8
  82. package/esm2022/engine/operator/operators/number-based.operators.mjs +1 -5
  83. package/esm2022/engine/rule/rule.helpers.mjs +1 -8
  84. package/esm2022/engine/ruleset-executor.mjs +58 -32
  85. package/esm2022/engine/structure.mjs +1 -1
  86. package/esm2022/fact/fact.abstract-service.mjs +1 -1
  87. package/esm2022/facts/current-time/current-time.facts.mjs +2 -0
  88. package/esm2022/facts/current-time/index.mjs +2 -0
  89. package/esm2022/facts/index.mjs +2 -0
  90. package/esm2022/fixtures/jasmine/index.mjs +2 -2
  91. package/esm2022/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.mjs +14 -0
  92. package/esm2022/fixtures/jest/index.mjs +2 -2
  93. package/esm2022/fixtures/jest/rules-engine.runner.service.fixture.jest.mjs +14 -0
  94. package/esm2022/interfaces/action.interfaces.mjs +1 -1
  95. package/esm2022/public_api.mjs +2 -1
  96. package/esm2022/services/index.mjs +2 -3
  97. package/esm2022/services/rules-engine.token.mjs +2 -1
  98. package/esm2022/services/runner/index.mjs +3 -0
  99. package/esm2022/services/runner/rules-engine.runner.module.mjs +37 -0
  100. package/esm2022/services/runner/rules-engine.runner.service.mjs +119 -0
  101. package/esm2022/stores/rulesets/rulesets.effect.mjs +4 -4
  102. package/esm2022/stores/rulesets/rulesets.module.mjs +4 -4
  103. package/esm2022/stores/rulesets/rulesets.selectors.mjs +3 -4
  104. package/fact/fact.abstract-service.d.ts +3 -3
  105. package/fact/fact.abstract-service.d.ts.map +1 -1
  106. package/facts/current-time/current-time.facts.d.ts +11 -0
  107. package/facts/current-time/current-time.facts.d.ts.map +1 -0
  108. package/facts/current-time/index.d.ts +2 -0
  109. package/facts/current-time/index.d.ts.map +1 -0
  110. package/facts/index.d.ts +2 -0
  111. package/facts/index.d.ts.map +1 -0
  112. package/fesm2022/o3r-rules-engine-fixtures-jasmine.mjs +3 -6
  113. package/fesm2022/o3r-rules-engine-fixtures-jasmine.mjs.map +1 -1
  114. package/fesm2022/o3r-rules-engine-fixtures-jest.mjs +3 -6
  115. package/fesm2022/o3r-rules-engine-fixtures-jest.mjs.map +1 -1
  116. package/fesm2022/o3r-rules-engine.mjs +264 -560
  117. package/fesm2022/o3r-rules-engine.mjs.map +1 -1
  118. package/fixtures/jasmine/index.d.ts +1 -1
  119. package/fixtures/jasmine/index.d.ts.map +1 -1
  120. package/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.d.ts +14 -0
  121. package/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.d.ts.map +1 -0
  122. package/fixtures/jest/index.d.ts +1 -1
  123. package/fixtures/jest/index.d.ts.map +1 -1
  124. package/fixtures/jest/index.js +1 -1
  125. package/fixtures/jest/index.js.map +1 -1
  126. package/fixtures/jest/rules-engine.runner.service.fixture.jest.d.ts +14 -0
  127. package/fixtures/jest/rules-engine.runner.service.fixture.jest.d.ts.map +1 -0
  128. package/fixtures/jest/{rules-engine.service.fixture.jest.js → rules-engine.runner.service.fixture.jest.js} +3 -6
  129. package/fixtures/jest/rules-engine.runner.service.fixture.jest.js.map +1 -0
  130. package/interfaces/action.interfaces.d.ts +5 -0
  131. package/interfaces/action.interfaces.d.ts.map +1 -1
  132. package/migration.json +10 -0
  133. package/package.json +57 -46
  134. package/public_api.d.ts +1 -0
  135. package/public_api.d.ts.map +1 -1
  136. package/rules.facts.metadata.json +7 -1
  137. package/rules.operators.metadata.json +61 -0
  138. package/schemas/rulesets.schema.json +6 -110
  139. package/schematics/cms-adapter/index.d.ts +0 -1
  140. package/schematics/cms-adapter/index.d.ts.map +1 -1
  141. package/schematics/cms-adapter/index.js +5 -9
  142. package/schematics/cms-adapter/index.js.map +1 -1
  143. package/schematics/facts-service/schema.json +1 -1
  144. package/schematics/ng-add/helpers/devtools-registration.d.ts +11 -0
  145. package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -0
  146. package/schematics/ng-add/helpers/devtools-registration.js +36 -0
  147. package/schematics/ng-add/helpers/devtools-registration.js.map +1 -0
  148. package/schematics/ng-add/index.d.ts +1 -0
  149. package/schematics/ng-add/index.d.ts.map +1 -1
  150. package/schematics/ng-add/index.js +8 -4
  151. package/schematics/ng-add/index.js.map +1 -1
  152. package/schematics/ng-add/schema.json +1 -1
  153. package/schematics/ng-update/index.d.ts +6 -0
  154. package/schematics/ng-update/index.d.ts.map +1 -0
  155. package/schematics/ng-update/index.js +22 -0
  156. package/schematics/ng-update/index.js.map +1 -0
  157. package/schematics/ng-update/v10.0/action-module-split.d.ts +6 -0
  158. package/schematics/ng-update/v10.0/action-module-split.d.ts.map +1 -0
  159. package/schematics/ng-update/v10.0/action-module-split.js +21 -0
  160. package/schematics/ng-update/v10.0/action-module-split.js.map +1 -0
  161. package/schematics/operator/schema.json +1 -1
  162. package/schematics/rules-engine-to-component/index.d.ts +0 -1
  163. package/schematics/rules-engine-to-component/index.d.ts.map +1 -1
  164. package/schematics/rules-engine-to-component/index.js +7 -8
  165. package/schematics/rules-engine-to-component/index.js.map +1 -1
  166. package/schematics/rules-engine-to-component/schema.json +1 -1
  167. package/services/index.d.ts +1 -2
  168. package/services/index.d.ts.map +1 -1
  169. package/services/rules-engine.token.d.ts +1 -0
  170. package/services/rules-engine.token.d.ts.map +1 -1
  171. package/services/runner/index.d.ts +3 -0
  172. package/services/runner/index.d.ts.map +1 -0
  173. package/services/runner/rules-engine.runner.module.d.ts +13 -0
  174. package/services/runner/rules-engine.runner.module.d.ts.map +1 -0
  175. package/services/runner/rules-engine.runner.service.d.ts +60 -0
  176. package/services/runner/rules-engine.runner.service.d.ts.map +1 -0
  177. package/stores/rulesets/rulesets.selectors.d.ts.map +1 -1
  178. package/builders/package.json +0 -3
  179. package/esm2022/fixtures/jasmine/rules-engine.service.fixture.jasmine.mjs +0 -17
  180. package/esm2022/fixtures/jest/rules-engine.service.fixture.jest.mjs +0 -17
  181. package/esm2022/services/rules-engine.effect.mjs +0 -162
  182. package/esm2022/services/rules-engine.module.mjs +0 -50
  183. package/esm2022/services/rules-engine.service.mjs +0 -272
  184. package/fixtures/jasmine/rules-engine.service.fixture.jasmine.d.ts +0 -17
  185. package/fixtures/jasmine/rules-engine.service.fixture.jasmine.d.ts.map +0 -1
  186. package/fixtures/jest/rules-engine.service.fixture.jest.d.ts +0 -18
  187. package/fixtures/jest/rules-engine.service.fixture.jest.d.ts.map +0 -1
  188. package/fixtures/jest/rules-engine.service.fixture.jest.js.map +0 -1
  189. package/schematics/package.json +0 -3
  190. package/services/rules-engine.effect.d.ts +0 -53
  191. package/services/rules-engine.effect.d.ts.map +0 -1
  192. package/services/rules-engine.module.d.ts +0 -16
  193. package/services/rules-engine.module.d.ts.map +0 -1
  194. package/services/rules-engine.service.d.ts +0 -90
  195. package/services/rules-engine.service.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- export * from './rules-engine.service.fixture.jasmine';
1
+ export * from './rules-engine.runner.service.fixture.jasmine';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jasmine/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jasmine/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="jasmine" />
2
+ import type { RulesEngineRunnerService } from '@o3r/rules-engine';
3
+ /** Jasmine Fixture class for RulesEngineRunnerService */
4
+ export declare class RulesEngineRunnerServiceFixture implements Readonly<Partial<RulesEngineRunnerService>> {
5
+ /** @inheritDoc */
6
+ upsertFacts: jasmine.Spy;
7
+ /** @inheritDoc */
8
+ upsertOperators: jasmine.Spy;
9
+ /** @inheritDoc */
10
+ enableRuleSetFor: jasmine.Spy;
11
+ /** @inheritDoc */
12
+ disableRuleSetFor: jasmine.Spy;
13
+ }
14
+ //# sourceMappingURL=rules-engine.runner.service.fixture.jasmine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules-engine.runner.service.fixture.jasmine.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,yDAAyD;AACzD,qBAAa,+BAAgC,YAAW,QAAQ,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEjG,kBAAkB;IACX,WAAW,EAAE,OAAO,CAAC,GAAG,CAAoC;IAEnE,kBAAkB;IACX,eAAe,EAAE,OAAO,CAAC,GAAG,CAAwC;IAE3E,kBAAkB;IACX,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAyC;IAE7E,kBAAkB;IACX,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAA0C;CAChF"}
@@ -1,2 +1,2 @@
1
- export * from './rules-engine.service.fixture.jest';
1
+ export * from './rules-engine.runner.service.fixture.jest';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jest/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jest/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './rules-engine.service.fixture.jest';
1
+ export * from './rules-engine.runner.service.fixture.jest';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fixtures/jest/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fixtures/jest/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="jest" />
2
+ import type { Fact, Operator, RulesEngineRunnerService, UnaryOperator } from '@o3r/rules-engine';
3
+ /** Jest Fixture class for RulesEngineRunnerService */
4
+ export declare class RulesEngineRunnerServiceFixture implements Readonly<Partial<RulesEngineRunnerService>> {
5
+ /** @inheritDoc */
6
+ upsertFacts: jest.Mock<void, [Fact<unknown> | Fact<unknown>[]]>;
7
+ /** @inheritDoc */
8
+ upsertOperators: jest.Mock<void, [(Operator<any, any> | UnaryOperator<any>)[]]>;
9
+ /** @inheritDoc */
10
+ enableRuleSetFor: jest.Mock<void, [string]>;
11
+ /** @inheritDoc */
12
+ disableRuleSetFor: jest.Mock<void, [string]>;
13
+ }
14
+ //# sourceMappingURL=rules-engine.runner.service.fixture.jest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules-engine.runner.service.fixture.jest.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jest/rules-engine.runner.service.fixture.jest.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAE,wBAAwB,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAE/F,sDAAsD;AACtD,qBAAa,+BAAgC,YAAW,QAAQ,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEjG,kBAAkB;IACX,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAa;IAEnF,kBAAkB;IACX,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAa;IAEnG,kBAAkB;IACX,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAa;IAE/D,kBAAkB;IACX,iBAAiB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAa;CACjE"}
@@ -1,17 +1,14 @@
1
- export class RulesEngineServiceFixture {
1
+ /** Jest Fixture class for RulesEngineRunnerService */
2
+ export class RulesEngineRunnerServiceFixture {
2
3
  constructor() {
3
4
  /** @inheritDoc */
4
5
  this.upsertFacts = jest.fn();
5
6
  /** @inheritDoc */
6
7
  this.upsertOperators = jest.fn();
7
8
  /** @inheritDoc */
8
- this.resolveUrlWithLang = jest.fn();
9
- /** @inheritDoc */
10
- this.retrieveTemplate = jest.fn();
11
- /** @inheritDoc */
12
9
  this.enableRuleSetFor = jest.fn();
13
10
  /** @inheritDoc */
14
11
  this.disableRuleSetFor = jest.fn();
15
12
  }
16
13
  }
17
- //# sourceMappingURL=rules-engine.service.fixture.jest.js.map
14
+ //# sourceMappingURL=rules-engine.runner.service.fixture.jest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules-engine.runner.service.fixture.jest.js","sourceRoot":"","sources":["../../../src/fixtures/jest/rules-engine.runner.service.fixture.jest.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,OAAO,+BAA+B;IAA5C;QAEE,kBAAkB;QACX,gBAAW,GAAuD,IAAI,CAAC,EAAE,EAAE,CAAC;QAEnF,kBAAkB;QACX,oBAAe,GAAmE,IAAI,CAAC,EAAE,EAAE,CAAC;QAEnG,kBAAkB;QACX,qBAAgB,GAA8B,IAAI,CAAC,EAAE,EAAE,CAAC;QAE/D,kBAAkB;QACX,sBAAiB,GAA8B,IAAI,CAAC,EAAE,EAAE,CAAC;IAClE,CAAC;CAAA"}
@@ -1,6 +1,7 @@
1
1
  import type { ActionBlock } from '../engine/index';
2
2
  /**
3
3
  * Content of action that updates the configuration
4
+ * @deprecated use the one exposer by `@o3r/configuration` module. Will be removed in Otter v12.
4
5
  */
5
6
  export interface ActionUpdateConfigBlock extends ActionBlock {
6
7
  actionType: 'UPDATE_CONFIG';
@@ -10,6 +11,7 @@ export interface ActionUpdateConfigBlock extends ActionBlock {
10
11
  }
11
12
  /**
12
13
  * Content of action that updates an asset
14
+ * @deprecated use the one exposer by `@o3r/dynamic-content` module. Will be removed in Otter v12.
13
15
  */
14
16
  export interface ActionUpdateAssetBlock extends ActionBlock {
15
17
  actionType: 'UPDATE_ASSET';
@@ -18,6 +20,7 @@ export interface ActionUpdateAssetBlock extends ActionBlock {
18
20
  }
19
21
  /**
20
22
  * Content of action that updates localization
23
+ * @deprecated use the one exposer by `@o3r/localization` module. Will be removed in Otter v12.
21
24
  */
22
25
  export interface ActionUpdateLocalisationBlock extends ActionBlock {
23
26
  actionType: 'UPDATE_LOCALISATION';
@@ -26,6 +29,7 @@ export interface ActionUpdateLocalisationBlock extends ActionBlock {
26
29
  }
27
30
  /**
28
31
  * Content of action that updates a placeholder
32
+ * @deprecated use the one exposer by `@o3r/components` module. Will be removed in Otter v12.
29
33
  */
30
34
  export interface ActionUpdatePlaceholderBlock extends ActionBlock {
31
35
  actionType: 'UPDATE_PLACEHOLDER';
@@ -34,6 +38,7 @@ export interface ActionUpdatePlaceholderBlock extends ActionBlock {
34
38
  }
35
39
  /**
36
40
  * Type that regroups all different kind of actions
41
+ * @deprecated will be removed in Otter v12.
37
42
  */
38
43
  export type ActionOverrideBlock = ActionUpdateConfigBlock | ActionUpdateAssetBlock | ActionUpdateLocalisationBlock | ActionUpdatePlaceholderBlock;
39
44
  //# sourceMappingURL=action.interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.interfaces.d.ts","sourceRoot":"","sources":["../../src/interfaces/action.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,UAAU,EAAE,qBAAqB,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,WAAW;IAC/D,UAAU,EAAE,oBAAoB,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC7B,uBAAuB,GACvB,sBAAsB,GACtB,6BAA6B,GAC7B,4BAA4B,CAAC"}
1
+ {"version":3,"file":"action.interfaces.d.ts","sourceRoot":"","sources":["../../src/interfaces/action.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA8B,SAAQ,WAAW;IAChE,UAAU,EAAE,qBAAqB,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,WAAW;IAC/D,UAAU,EAAE,oBAAoB,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC7B,uBAAuB,GACvB,sBAAsB,GACtB,6BAA6B,GAC7B,4BAA4B,CAAC"}
package/migration.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "migration-v10_0": {
5
+ "version": "10.0.0-alpha.0",
6
+ "description": "Updates of the Otter Library to v10.0.*",
7
+ "factory": "./schematics/ng-update/index#updateV100"
8
+ }
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/rules-engine",
3
- "version": "10.0.0-next.8",
3
+ "version": "11.0.0-next.0",
4
4
  "description": "This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.",
5
5
  "keywords": [
6
6
  "rules-engine",
@@ -8,32 +8,54 @@
8
8
  "otter-module",
9
9
  "otter-cms"
10
10
  ],
11
+ "exports": {
12
+ "./schemas/*.json": {
13
+ "default": "./schemas/*.json"
14
+ },
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "esm2022": "./esm2022/o3r-rules-engine.mjs",
21
+ "esm": "./esm2022/o3r-rules-engine.mjs",
22
+ "default": "./fesm2022/o3r-rules-engine.mjs"
23
+ },
24
+ "./fixtures/jasmine": {
25
+ "types": "./fixtures/jasmine/index.d.ts",
26
+ "esm2022": "./esm2022/fixtures/jasmine/o3r-rules-engine-fixtures-jasmine.mjs",
27
+ "esm": "./esm2022/fixtures/jasmine/o3r-rules-engine-fixtures-jasmine.mjs",
28
+ "default": "./fesm2022/o3r-rules-engine-fixtures-jasmine.mjs"
29
+ },
30
+ "./fixtures/jest": {
31
+ "types": "./fixtures/jest/index.d.ts",
32
+ "esm2022": "./esm2022/fixtures/jest/o3r-rules-engine-fixtures-jest.mjs",
33
+ "esm": "./esm2022/fixtures/jest/o3r-rules-engine-fixtures-jest.mjs",
34
+ "default": "./fesm2022/o3r-rules-engine-fixtures-jest.mjs"
35
+ }
36
+ },
11
37
  "peerDependencies": {
12
- "@angular-devkit/architect": "~0.1602.0",
13
- "@angular-devkit/core": "~16.2.0",
14
- "@angular-devkit/schematics": "~16.2.0",
15
- "@angular/core": "~16.2.0",
16
- "@angular/platform-browser-dynamic": "~16.2.0",
17
- "@ngrx/effects": "~16.2.0",
18
- "@ngrx/entity": "~16.2.0",
19
- "@ngrx/store": "~16.2.0",
38
+ "@angular-devkit/architect": "~0.1700.0",
39
+ "@angular-devkit/core": "~17.0.0",
40
+ "@angular-devkit/schematics": "~17.0.0",
41
+ "@angular/common": "~17.0.2",
42
+ "@angular/core": "~17.0.2",
43
+ "@angular/platform-browser-dynamic": "~17.0.2",
44
+ "@ngrx/effects": "~17.0.0",
45
+ "@ngrx/entity": "~17.0.0",
46
+ "@ngrx/store": "~17.0.0",
20
47
  "@ngx-translate/core": "~15.0.0",
21
- "@o3r/components": "^10.0.0-next.8",
22
- "@o3r/configuration": "^10.0.0-next.8",
23
- "@o3r/core": "^10.0.0-next.8",
24
- "@o3r/dev-tools": "^10.0.0-next.8",
25
- "@o3r/dynamic-content": "^10.0.0-next.8",
26
- "@o3r/extractors": "^10.0.0-next.8",
27
- "@o3r/localization": "^10.0.0-next.8",
28
- "@o3r/logger": "^10.0.0-next.8",
29
- "@o3r/schematics": "^10.0.0-next.8",
30
- "@schematics/angular": "~16.2.0",
48
+ "@o3r/core": "^11.0.0-next.0",
49
+ "@o3r/extractors": "^11.0.0-next.0",
50
+ "@o3r/logger": "^11.0.0-next.0",
51
+ "@o3r/schematics": "^11.0.0-next.0",
52
+ "@schematics/angular": "~17.0.0",
31
53
  "globby": "^11.1.0",
32
54
  "jasmine": "^5.0.0",
33
55
  "jsonpath-plus": "^7.0.0",
34
56
  "rxjs": "^7.8.1",
35
- "typescript": "~5.1.6",
36
- "typescript-json-schema": "~0.61.0"
57
+ "typescript": "~5.2.2",
58
+ "typescript-json-schema": "~0.62.0"
37
59
  },
38
60
  "peerDependenciesMeta": {
39
61
  "@angular-devkit/core": {
@@ -68,9 +90,20 @@
68
90
  "tslib": "^2.5.3"
69
91
  },
70
92
  "engines": {
71
- "node": ">=16.0.0"
93
+ "node": ">=18.0.0"
72
94
  },
73
95
  "builders": "./builders.json",
96
+ "ng-update": {
97
+ "migrations": "./migration.json",
98
+ "packageGroup": [
99
+ "@o3r/core",
100
+ "@o3r/components",
101
+ "@o3r/configuration",
102
+ "@o3r/dynamic-content",
103
+ "@o3r/eslint-config-otter",
104
+ "@o3r/localization"
105
+ ]
106
+ },
74
107
  "cmsMetadata": {
75
108
  "localizationFilePath": "./localisation.metadata.json",
76
109
  "componentFilePath": "./component.class.metadata.json",
@@ -81,29 +114,6 @@
81
114
  "schematics": "./collection.json",
82
115
  "module": "fesm2022/o3r-rules-engine.mjs",
83
116
  "typings": "index.d.ts",
84
- "exports": {
85
- "./package.json": {
86
- "default": "./package.json"
87
- },
88
- ".": {
89
- "types": "./index.d.ts",
90
- "esm2022": "./esm2022/o3r-rules-engine.mjs",
91
- "esm": "./esm2022/o3r-rules-engine.mjs",
92
- "default": "./fesm2022/o3r-rules-engine.mjs"
93
- },
94
- "./fixtures/jasmine": {
95
- "types": "./fixtures/jasmine/index.d.ts",
96
- "esm2022": "./esm2022/fixtures/jasmine/o3r-rules-engine-fixtures-jasmine.mjs",
97
- "esm": "./esm2022/fixtures/jasmine/o3r-rules-engine-fixtures-jasmine.mjs",
98
- "default": "./fesm2022/o3r-rules-engine-fixtures-jasmine.mjs"
99
- },
100
- "./fixtures/jest": {
101
- "types": "./fixtures/jest/index.d.ts",
102
- "esm2022": "./esm2022/fixtures/jest/o3r-rules-engine-fixtures-jest.mjs",
103
- "esm": "./esm2022/fixtures/jest/o3r-rules-engine-fixtures-jest.mjs",
104
- "default": "./fesm2022/o3r-rules-engine-fixtures-jest.mjs"
105
- }
106
- },
107
117
  "sideEffects": false,
108
118
  "contributors": [
109
119
  {
@@ -168,5 +178,6 @@
168
178
  ],
169
179
  "bugs": "https://github.com/AmadeusITGroup/otter/issues",
170
180
  "repository": "https://github.com/AmadeusITGroup/otter",
171
- "license": "BSD-3-Clause"
181
+ "license": "BSD-3-Clause",
182
+ "homepage": "https://amadeusitgroup.github.io/otter/"
172
183
  }
package/public_api.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './components/index';
2
2
  export * from './devkit/index';
3
3
  export * from './engine/index';
4
4
  export * from './fact/index';
5
+ export * from './facts/index';
5
6
  export * from './interfaces/index';
6
7
  export * from './services/index';
7
8
  export * from './stores/index';
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
@@ -1,3 +1,9 @@
1
1
  {
2
- "facts": []
2
+ "facts": [
3
+ {
4
+ "name": "o3rCurrentTime",
5
+ "description": "The current time as a timestamp",
6
+ "type": "number"
7
+ }
8
+ ]
3
9
  }
@@ -628,6 +628,23 @@
628
628
  "nbValues": 0
629
629
  }
630
630
  },
631
+ {
632
+ "id": "matchesPattern",
633
+ "description": "Check if the text variable matches the specified RegExp pattern",
634
+ "display": "matches the pattern",
635
+ "leftOperand": {
636
+ "types": [
637
+ "string"
638
+ ],
639
+ "nbValues": 1
640
+ },
641
+ "rightOperand": {
642
+ "types": [
643
+ "string"
644
+ ],
645
+ "nbValues": 1
646
+ }
647
+ },
631
648
  {
632
649
  "id": "inRangeDate",
633
650
  "description": "Check if a date variable is in a specified date range",
@@ -647,6 +664,50 @@
647
664
  "nbValues": 1
648
665
  }
649
666
  },
667
+ {
668
+ "id": "dateInNextMinutes",
669
+ "description": "Check if the value of the variable is in the next x minutes",
670
+ "display": "is in next minutes",
671
+ "leftOperand": {
672
+ "types": [
673
+ "date"
674
+ ],
675
+ "nbValues": 1
676
+ },
677
+ "factImplicitDependencies": [
678
+ "o3rCurrentTime"
679
+ ],
680
+ "rightOperand": {
681
+ "types": [
682
+ "date",
683
+ "string",
684
+ "number"
685
+ ],
686
+ "nbValues": 1
687
+ }
688
+ },
689
+ {
690
+ "id": "dateNotInNextMinutes",
691
+ "description": "Check if the value of the variable is not in the next x minutes",
692
+ "display": "is not in next minutes",
693
+ "leftOperand": {
694
+ "types": [
695
+ "date"
696
+ ],
697
+ "nbValues": 1
698
+ },
699
+ "factImplicitDependencies": [
700
+ "o3rCurrentTime"
701
+ ],
702
+ "rightOperand": {
703
+ "types": [
704
+ "date",
705
+ "string",
706
+ "number"
707
+ ],
708
+ "nbValues": 1
709
+ }
710
+ },
650
711
  {
651
712
  "id": "dateBefore",
652
713
  "description": "Check if a date variable is prior than a specified date",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "RulesEngineRulesets",
4
4
  "type": "object",
5
5
  "properties": {
@@ -95,6 +95,7 @@
95
95
  "inputFacts": {
96
96
  "type": "array",
97
97
  "description": "Facts that are needed for the rule execution (sent by the CMS)",
98
+ "deprecated": true,
98
99
  "items": {
99
100
  "type": "string"
100
101
  }
@@ -156,93 +157,21 @@
156
157
  "$ref": "#/definitions/RulesActionSetTemporaryFactBlock"
157
158
  },
158
159
  {
159
- "$ref": "#/definitions/RulesActionUpdateConfigBlock"
160
+ "$ref": "https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/%40o3r/configuration/schemas/rules-engine.config-action.schema.json"
160
161
  },
161
162
  {
162
- "$ref": "#/definitions/RulesActionUpdateAssetBlock"
163
+ "$ref": "https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/%40o3r/dynamic-content/schemas/rules-engine.asset-action.schema.json"
163
164
  },
164
165
  {
165
- "$ref": "#/definitions/RulesActionUpdateLocalisationBlock"
166
+ "$ref": "https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/%40o3r/localization/schemas/rules-engine.localisation-action.schema.json"
166
167
  },
167
168
  {
168
- "$ref": "#/definitions/ActionUpdatePlaceholderBlock"
169
+ "$ref": "https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/%40o3r/components/schemas/rules-engine.placeholder-action.schema.json"
169
170
  }
170
171
  ]
171
172
  }
172
173
  ]
173
174
  },
174
- "ActionUpdatePlaceholderBlock": {
175
- "type": "object",
176
- "description": "Content of action that updates a placeholder",
177
- "properties": {
178
- "actionType": {
179
- "type": "string",
180
- "description": "Action Type",
181
- "const": "UPDATE_PLACEHOLDER"
182
- },
183
- "placeholderId": {
184
- "type": "string",
185
- "description": "Id of the placeholder to update"
186
- },
187
- "value": {
188
- "type": "string"
189
- }
190
- },
191
- "additionalItems": false,
192
- "required": [
193
- "actionType",
194
- "placeholderId",
195
- "value"
196
- ]
197
- },
198
- "RulesActionUpdateLocalisationBlock": {
199
- "type": "object",
200
- "description": "Content of action that updates the localizations",
201
- "properties": {
202
- "actionType": {
203
- "type": "string",
204
- "description": "Action Type",
205
- "const": "UPDATE_LOCALISATION"
206
- },
207
- "key": {
208
- "type": "string",
209
- "description": "key of the location to update"
210
- },
211
- "value": {
212
- "type": "string"
213
- }
214
- },
215
- "additionalItems": false,
216
- "required": [
217
- "actionType",
218
- "key",
219
- "value"
220
- ]
221
- },
222
- "RulesActionUpdateAssetBlock": {
223
- "type": "object",
224
- "description": "Content of action that updates the assets",
225
- "properties": {
226
- "actionType": {
227
- "type": "string",
228
- "description": "Action Type",
229
- "const": "UPDATE_ASSET"
230
- },
231
- "asset": {
232
- "type": "string",
233
- "description": "asset to update"
234
- },
235
- "value": {
236
- "type": "string"
237
- }
238
- },
239
- "additionalItems": false,
240
- "required": [
241
- "actionType",
242
- "asset",
243
- "value"
244
- ]
245
- },
246
175
  "RulesActionSetTemporaryFactBlock": {
247
176
  "type": "object",
248
177
  "description": "Content of action that updates the runtime facts",
@@ -265,39 +194,6 @@
265
194
  "value"
266
195
  ]
267
196
  },
268
- "RulesActionUpdateConfigBlock": {
269
- "type": "object",
270
- "description": "Content of action that updates the configuration",
271
- "properties": {
272
- "actionType": {
273
- "type": "string",
274
- "description": "Action Type",
275
- "const": "UPDATE_CONFIG"
276
- },
277
- "library": {
278
- "type": "string",
279
- "description": "Library of the component"
280
- },
281
- "component": {
282
- "type": "string",
283
- "description": "name of the component"
284
- },
285
- "property": {
286
- "type": "string",
287
- "description": "name of the config property to update"
288
- },
289
- "value": {}
290
- },
291
- "additionalItems": false,
292
- "required": [
293
- "elementType",
294
- "actionType",
295
- "library",
296
- "component",
297
- "property",
298
- "value"
299
- ]
300
- },
301
197
  "RulesEngineIfElseBlock": {
302
198
  "type": "object",
303
199
  "description": "Block representing an 'if else' condition. If no condition specified it will execute success elements onlyk",
@@ -1,7 +1,6 @@
1
1
  import { Rule } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Update CMS adapter tools
4
- *
5
4
  * @param options @see RuleFactory.options
6
5
  * @param options.projectName
7
6
  * @param rootPath @see RuleFactory.rootPath
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAuEpF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAoEpF"}
@@ -7,7 +7,6 @@ const schematics_2 = require("@o3r/schematics");
7
7
  const path = tslib_1.__importStar(require("node:path"));
8
8
  /**
9
9
  * Update CMS adapter tools
10
- *
11
10
  * @param options @see RuleFactory.options
12
11
  * @param options.projectName
13
12
  * @param rootPath @see RuleFactory.rootPath
@@ -18,15 +17,14 @@ function updateCmsAdapter(options) {
18
17
  }
19
18
  /**
20
19
  * Add cms extractors builder into the angular.json
21
- *
22
20
  * @param tree
23
21
  * @param _context
24
22
  * @param context
25
23
  */
26
24
  const editAngularJson = (tree, context) => {
27
- const workspace = (0, schematics_2.readAngularJson)(tree);
28
- const workspaceProject = (0, schematics_2.getProjectFromTree)(tree, options.projectName);
29
- if (!workspaceProject) {
25
+ const workspace = (0, schematics_2.getWorkspaceConfig)(tree);
26
+ const workspaceProject = options.projectName ? workspace?.projects[options.projectName] : undefined;
27
+ if (!workspace || !workspaceProject) {
30
28
  context.logger.error('No project detected, the extractors will not be added');
31
29
  return tree;
32
30
  }
@@ -40,20 +38,18 @@ function updateCmsAdapter(options) {
40
38
  libraries: []
41
39
  }
42
40
  };
43
- const { name, ...newProject } = workspaceProject;
44
- workspace.projects[name] = newProject;
41
+ workspace.projects[options.projectName] = workspaceProject;
45
42
  tree.overwrite('/angular.json', JSON.stringify(workspace, null, 2));
46
43
  return tree;
47
44
  };
48
45
  /**
49
46
  * Add cms extractors scripts into the package.json
50
- *
51
47
  * @param tree
52
48
  * @param _context
53
49
  * @param context
54
50
  */
55
51
  const addExtractorsScripts = (tree, context) => {
56
- const workspaceProject = (0, schematics_2.getProjectFromTree)(tree, options.projectName);
52
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
57
53
  if (!workspaceProject) {
58
54
  context.logger.error('No package detected, the extractor scripts will not be added');
59
55
  return tree;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":";;;;AAAA,2DAAuF;AACvF,gDAAoI;AACpI,wDAAkC;AAGlC;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,OAA6C;IAC5E,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;QACxB,OAAO,iBAAI,CAAC;KACb;IAED;;;;;;OAMG;IACH,MAAM,eAAe,GAAG,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAChE,MAAM,SAAS,GAAG,IAAA,4BAAe,EAAC,IAAI,CAAC,CAAC;QACxC,MAAM,gBAAgB,GAAG,IAAA,+BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QAEvE,IAAI,CAAC,gBAAgB,EAAE;YACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC9E,OAAO,IAAI,CAAC;SACb;QAED,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;YAC/B,gBAAgB,CAAC,SAAS,GAAG,EAAE,CAAC;SACjC;QAED,gBAAgB,CAAC,SAAS,CAAC,sBAAsB,CAAC,KAAK;YACrD,OAAO,EAAE,6BAA6B;YACtC,OAAO,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,IAAI,EAAE,EAAE,mBAAmB,CAAC;gBACtE,SAAS,EAAE,EAAE;aACd;SACF,CAAC;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,gBAAgB,CAAC;QACjD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;QACtC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SA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CAAC,CAAC;IAEF,OAAO,IAAA,kBAAK,EAAC;QACX,oBAAoB;QACpB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC;AApED,4CAoEC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "NgGenerateFactsServiceSchematicsSchema",
4
4
  "title": "Generate a facts service",
5
5
  "description": "Generate a facts service",
@@ -0,0 +1,11 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import type { NgAddSchematicsSchema } from '../schema';
3
+ /**
4
+ * Register Devtools to the application
5
+ * @param tree
6
+ * @param context
7
+ * @param options
8
+ * @param options.projectName
9
+ */
10
+ export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
11
+ //# sourceMappingURL=devtools-registration.d.ts.map