@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.
- package/README.md +16 -17
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.d.ts +1 -1
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.d.ts.map +1 -1
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.interfaces.d.ts +2 -0
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.interfaces.d.ts.map +1 -1
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.js +10 -2
- package/builders/rules-engine-extractor/helpers/rules-engine.extractor.js.map +1 -1
- package/builders/rules-engine-extractor/index.js.map +1 -1
- package/builders/rules-engine-extractor/schema.json +1 -1
- package/components/rules-engine/rule-condition/rule-condition-pres.component.d.ts +2 -2
- package/components/rules-engine/rule-condition/rule-condition-pres.component.d.ts.map +1 -1
- package/components/rules-engine/rule-key-value/rule-key-value-pres.component.d.ts +1 -1
- package/components/rules-engine/rule-key-value/rule-key-value-pres.component.d.ts.map +1 -1
- package/components/rules-engine/ruleset-history/ruleset-history-pres.component.d.ts +1 -3
- package/components/rules-engine/ruleset-history/ruleset-history-pres.component.d.ts.map +1 -1
- package/components/rules-engine/shared/ruleset-history.helper.d.ts +0 -2
- package/components/rules-engine/shared/ruleset-history.helper.d.ts.map +1 -1
- package/devkit/rules-engine-devtools.console.service.d.ts +0 -7
- package/devkit/rules-engine-devtools.console.service.d.ts.map +1 -1
- package/devkit/rules-engine-devtools.message.service.d.ts +4 -6
- package/devkit/rules-engine-devtools.message.service.d.ts.map +1 -1
- package/devkit/rules-engine-devtools.module.d.ts +0 -1
- package/devkit/rules-engine-devtools.module.d.ts.map +1 -1
- package/devkit/rules-engine-devtools.service.d.ts +3 -10
- package/devkit/rules-engine-devtools.service.d.ts.map +1 -1
- package/engine/debug/engine.debug.d.ts +4 -12
- package/engine/debug/engine.debug.d.ts.map +1 -1
- package/engine/debug/helpers.d.ts +2 -4
- package/engine/debug/helpers.d.ts.map +1 -1
- package/engine/engine.d.ts +4 -13
- package/engine/engine.d.ts.map +1 -1
- package/engine/engine.interface.d.ts +2 -6
- package/engine/engine.interface.d.ts.map +1 -1
- package/engine/fact/fact.interfaces.d.ts +2 -0
- package/engine/fact/fact.interfaces.d.ts.map +1 -1
- package/engine/helpers/filter-ruleset-event.operator.d.ts +0 -1
- package/engine/helpers/filter-ruleset-event.operator.d.ts.map +1 -1
- package/engine/operator/operator.helpers.d.ts +10 -9
- package/engine/operator/operator.helpers.d.ts.map +1 -1
- package/engine/operator/operator.interface.d.ts +4 -1
- package/engine/operator/operator.interface.d.ts.map +1 -1
- package/engine/operator/operators/array-based.operators.d.ts +0 -23
- package/engine/operator/operators/array-based.operators.d.ts.map +1 -1
- package/engine/operator/operators/basic.operators.d.ts +5 -8
- package/engine/operator/operators/basic.operators.d.ts.map +1 -1
- package/engine/operator/operators/date-based.operators.d.ts +13 -6
- package/engine/operator/operators/date-based.operators.d.ts.map +1 -1
- package/engine/operator/operators/index.d.ts +1 -1
- package/engine/operator/operators/index.d.ts.map +1 -1
- package/engine/operator/operators/number-based.operators.d.ts +0 -4
- package/engine/operator/operators/number-based.operators.d.ts.map +1 -1
- package/engine/rule/rule.helpers.d.ts +0 -7
- package/engine/rule/rule.helpers.d.ts.map +1 -1
- package/engine/ruleset-executor.d.ts +15 -13
- package/engine/ruleset-executor.d.ts.map +1 -1
- package/engine/structure.d.ts +9 -5
- package/engine/structure.d.ts.map +1 -1
- package/esm2022/components/rules-engine/rule-actions/rule-actions-pres.component.mjs +4 -4
- package/esm2022/components/rules-engine/rule-condition/rule-condition-pres.component.mjs +8 -13
- package/esm2022/components/rules-engine/rule-key-value/rule-key-value-pres.component.mjs +5 -5
- package/esm2022/components/rules-engine/rule-tree/rule-tree-pres.component.mjs +5 -5
- package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.component.mjs +6 -8
- package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.module.mjs +4 -4
- package/esm2022/components/rules-engine/shared/fallback-to.pipe.mjs +3 -3
- package/esm2022/components/rules-engine/shared/ruleset-history.helper.mjs +1 -3
- package/esm2022/devkit/rules-engine-devtools.console.service.mjs +6 -13
- package/esm2022/devkit/rules-engine-devtools.message.service.mjs +6 -8
- package/esm2022/devkit/rules-engine-devtools.module.mjs +5 -6
- package/esm2022/devkit/rules-engine-devtools.service.mjs +7 -14
- package/esm2022/engine/debug/engine.debug.mjs +2 -10
- package/esm2022/engine/debug/helpers.mjs +1 -4
- package/esm2022/engine/engine.interface.mjs +1 -1
- package/esm2022/engine/engine.mjs +1 -9
- package/esm2022/engine/fact/fact.interfaces.mjs +1 -1
- package/esm2022/engine/helpers/filter-ruleset-event.operator.mjs +1 -2
- package/esm2022/engine/operator/index.mjs +1 -1
- package/esm2022/engine/operator/operator.helpers.mjs +33 -13
- package/esm2022/engine/operator/operator.interface.mjs +1 -1
- package/esm2022/engine/operator/operators/array-based.operators.mjs +6 -29
- package/esm2022/engine/operator/operators/basic.operators.mjs +16 -11
- package/esm2022/engine/operator/operators/date-based.operators.mjs +48 -8
- package/esm2022/engine/operator/operators/number-based.operators.mjs +1 -5
- package/esm2022/engine/rule/rule.helpers.mjs +1 -8
- package/esm2022/engine/ruleset-executor.mjs +58 -32
- package/esm2022/engine/structure.mjs +1 -1
- package/esm2022/fact/fact.abstract-service.mjs +1 -1
- package/esm2022/facts/current-time/current-time.facts.mjs +2 -0
- package/esm2022/facts/current-time/index.mjs +2 -0
- package/esm2022/facts/index.mjs +2 -0
- package/esm2022/fixtures/jasmine/index.mjs +2 -2
- package/esm2022/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.mjs +14 -0
- package/esm2022/fixtures/jest/index.mjs +2 -2
- package/esm2022/fixtures/jest/rules-engine.runner.service.fixture.jest.mjs +14 -0
- package/esm2022/interfaces/action.interfaces.mjs +1 -1
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/services/index.mjs +2 -3
- package/esm2022/services/rules-engine.token.mjs +2 -1
- package/esm2022/services/runner/index.mjs +3 -0
- package/esm2022/services/runner/rules-engine.runner.module.mjs +37 -0
- package/esm2022/services/runner/rules-engine.runner.service.mjs +119 -0
- package/esm2022/stores/rulesets/rulesets.effect.mjs +4 -4
- package/esm2022/stores/rulesets/rulesets.module.mjs +4 -4
- package/esm2022/stores/rulesets/rulesets.selectors.mjs +3 -4
- package/fact/fact.abstract-service.d.ts +3 -3
- package/fact/fact.abstract-service.d.ts.map +1 -1
- package/facts/current-time/current-time.facts.d.ts +11 -0
- package/facts/current-time/current-time.facts.d.ts.map +1 -0
- package/facts/current-time/index.d.ts +2 -0
- package/facts/current-time/index.d.ts.map +1 -0
- package/facts/index.d.ts +2 -0
- package/facts/index.d.ts.map +1 -0
- package/fesm2022/o3r-rules-engine-fixtures-jasmine.mjs +3 -6
- package/fesm2022/o3r-rules-engine-fixtures-jasmine.mjs.map +1 -1
- package/fesm2022/o3r-rules-engine-fixtures-jest.mjs +3 -6
- package/fesm2022/o3r-rules-engine-fixtures-jest.mjs.map +1 -1
- package/fesm2022/o3r-rules-engine.mjs +264 -560
- package/fesm2022/o3r-rules-engine.mjs.map +1 -1
- package/fixtures/jasmine/index.d.ts +1 -1
- package/fixtures/jasmine/index.d.ts.map +1 -1
- package/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.d.ts +14 -0
- package/fixtures/jasmine/rules-engine.runner.service.fixture.jasmine.d.ts.map +1 -0
- package/fixtures/jest/index.d.ts +1 -1
- package/fixtures/jest/index.d.ts.map +1 -1
- package/fixtures/jest/index.js +1 -1
- package/fixtures/jest/index.js.map +1 -1
- package/fixtures/jest/rules-engine.runner.service.fixture.jest.d.ts +14 -0
- package/fixtures/jest/rules-engine.runner.service.fixture.jest.d.ts.map +1 -0
- package/fixtures/jest/{rules-engine.service.fixture.jest.js → rules-engine.runner.service.fixture.jest.js} +3 -6
- package/fixtures/jest/rules-engine.runner.service.fixture.jest.js.map +1 -0
- package/interfaces/action.interfaces.d.ts +5 -0
- package/interfaces/action.interfaces.d.ts.map +1 -1
- package/migration.json +10 -0
- package/package.json +57 -46
- package/public_api.d.ts +1 -0
- package/public_api.d.ts.map +1 -1
- package/rules.facts.metadata.json +7 -1
- package/rules.operators.metadata.json +61 -0
- package/schemas/rulesets.schema.json +6 -110
- package/schematics/cms-adapter/index.d.ts +0 -1
- package/schematics/cms-adapter/index.d.ts.map +1 -1
- package/schematics/cms-adapter/index.js +5 -9
- package/schematics/cms-adapter/index.js.map +1 -1
- package/schematics/facts-service/schema.json +1 -1
- package/schematics/ng-add/helpers/devtools-registration.d.ts +11 -0
- package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -0
- package/schematics/ng-add/helpers/devtools-registration.js +36 -0
- package/schematics/ng-add/helpers/devtools-registration.js.map +1 -0
- package/schematics/ng-add/index.d.ts +1 -0
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +8 -4
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/ng-update/index.d.ts +6 -0
- package/schematics/ng-update/index.d.ts.map +1 -0
- package/schematics/ng-update/index.js +22 -0
- package/schematics/ng-update/index.js.map +1 -0
- package/schematics/ng-update/v10.0/action-module-split.d.ts +6 -0
- package/schematics/ng-update/v10.0/action-module-split.d.ts.map +1 -0
- package/schematics/ng-update/v10.0/action-module-split.js +21 -0
- package/schematics/ng-update/v10.0/action-module-split.js.map +1 -0
- package/schematics/operator/schema.json +1 -1
- package/schematics/rules-engine-to-component/index.d.ts +0 -1
- package/schematics/rules-engine-to-component/index.d.ts.map +1 -1
- package/schematics/rules-engine-to-component/index.js +7 -8
- package/schematics/rules-engine-to-component/index.js.map +1 -1
- package/schematics/rules-engine-to-component/schema.json +1 -1
- package/services/index.d.ts +1 -2
- package/services/index.d.ts.map +1 -1
- package/services/rules-engine.token.d.ts +1 -0
- package/services/rules-engine.token.d.ts.map +1 -1
- package/services/runner/index.d.ts +3 -0
- package/services/runner/index.d.ts.map +1 -0
- package/services/runner/rules-engine.runner.module.d.ts +13 -0
- package/services/runner/rules-engine.runner.module.d.ts.map +1 -0
- package/services/runner/rules-engine.runner.service.d.ts +60 -0
- package/services/runner/rules-engine.runner.service.d.ts.map +1 -0
- package/stores/rulesets/rulesets.selectors.d.ts.map +1 -1
- package/builders/package.json +0 -3
- package/esm2022/fixtures/jasmine/rules-engine.service.fixture.jasmine.mjs +0 -17
- package/esm2022/fixtures/jest/rules-engine.service.fixture.jest.mjs +0 -17
- package/esm2022/services/rules-engine.effect.mjs +0 -162
- package/esm2022/services/rules-engine.module.mjs +0 -50
- package/esm2022/services/rules-engine.service.mjs +0 -272
- package/fixtures/jasmine/rules-engine.service.fixture.jasmine.d.ts +0 -17
- package/fixtures/jasmine/rules-engine.service.fixture.jasmine.d.ts.map +0 -1
- package/fixtures/jest/rules-engine.service.fixture.jest.d.ts +0 -18
- package/fixtures/jest/rules-engine.service.fixture.jest.d.ts.map +0 -1
- package/fixtures/jest/rules-engine.service.fixture.jest.js.map +0 -1
- package/schematics/package.json +0 -3
- package/services/rules-engine.effect.d.ts +0 -53
- package/services/rules-engine.effect.d.ts.map +0 -1
- package/services/rules-engine.module.d.ts +0 -16
- package/services/rules-engine.module.d.ts.map +0 -1
- package/services/rules-engine.service.d.ts +0 -90
- 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,
|
|
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"}
|
package/fixtures/jest/index.d.ts
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/jest/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
|
package/fixtures/jest/index.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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
|
|
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": "
|
|
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.
|
|
13
|
-
"@angular-devkit/core": "~
|
|
14
|
-
"@angular-devkit/schematics": "~
|
|
15
|
-
"@angular/
|
|
16
|
-
"@angular/
|
|
17
|
-
"@
|
|
18
|
-
"@ngrx/
|
|
19
|
-
"@ngrx/
|
|
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/
|
|
22
|
-
"@o3r/
|
|
23
|
-
"@o3r/
|
|
24
|
-
"@o3r/
|
|
25
|
-
"@
|
|
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.
|
|
36
|
-
"typescript-json-schema": "~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": ">=
|
|
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';
|
package/public_api.d.ts.map
CHANGED
|
@@ -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"}
|
|
@@ -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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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 +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
|
|
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.
|
|
28
|
-
const workspaceProject =
|
|
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
|
-
|
|
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.
|
|
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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -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
|