@o3r/core 10.3.0-prerelease.4 → 10.3.0-prerelease.40

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 (32) hide show
  1. package/core/interfaces/configuration.d.ts +14 -0
  2. package/core/interfaces/configuration.d.ts.map +1 -1
  3. package/esm2022/core/interfaces/configuration.mjs +1 -1
  4. package/package.json +13 -13
  5. package/schematics/component/index.d.ts.map +1 -1
  6. package/schematics/component/index.js +4 -22
  7. package/schematics/page/schema.json +0 -1
  8. package/schematics/rule-factories/component/analytics.d.ts.map +1 -1
  9. package/schematics/rule-factories/component/analytics.js +1 -0
  10. package/schematics/rule-factories/component/common.js +2 -2
  11. package/schematics/rule-factories/component/configuration.d.ts.map +1 -1
  12. package/schematics/rule-factories/component/configuration.js +1 -0
  13. package/schematics/rule-factories/component/context.js +1 -1
  14. package/schematics/rule-factories/component/design-token.d.ts.map +1 -1
  15. package/schematics/rule-factories/component/design-token.js +4 -1
  16. package/schematics/rule-factories/component/fixture.d.ts.map +1 -1
  17. package/schematics/rule-factories/component/fixture.js +1 -0
  18. package/schematics/rule-factories/component/localization.d.ts.map +1 -1
  19. package/schematics/rule-factories/component/localization.js +1 -0
  20. package/schematics/rule-factories/component/rules-engine.js +1 -1
  21. package/schematics/rule-factories/index.d.ts +0 -1
  22. package/schematics/rule-factories/index.d.ts.map +1 -1
  23. package/schematics/rule-factories/index.js +0 -1
  24. package/schematics/rule-factories/playwright/index.d.ts +0 -10
  25. package/schematics/rule-factories/playwright/index.d.ts.map +0 -1
  26. package/schematics/rule-factories/playwright/index.js +0 -79
  27. package/schematics/rule-factories/playwright/templates/e2e-playwright/playwright-config.sanity.ts.template +0 -12
  28. package/schematics/rule-factories/playwright/templates/e2e-playwright/playwright-config.ts.template +0 -34
  29. package/schematics/rule-factories/playwright/templates/e2e-playwright/sanity/__sanity@dasherize__.e2e.ts +0 -7
  30. package/schematics/rule-factories/playwright/templates/e2e-playwright/scenarios/__name@dasherize__.e2e-playwright-spec.ts +0 -19
  31. package/schematics/rule-factories/playwright/templates/e2e-playwright/utils/base-scenario.ts +0 -29
  32. package/schematics/rule-factories/playwright/templates/e2e-playwright/utils/index.ts +0 -1
@@ -1,3 +1,4 @@
1
+ import type { InputSignal, Signal } from '@angular/core';
1
2
  import type { Observable } from 'rxjs';
2
3
  /**
3
4
  * Types available for configuration
@@ -38,6 +39,19 @@ export interface DynamicConfigurable<T extends Configuration> {
38
39
  */
39
40
  config$: Observable<T>;
40
41
  }
42
+ /**
43
+ * Dynamically Configurable item working with signal
44
+ */
45
+ export interface DynamicConfigurableWithSignal<T extends Configuration> {
46
+ /**
47
+ * Configuration override
48
+ */
49
+ config: InputSignal<Partial<T> | undefined>;
50
+ /**
51
+ * Configuration signal
52
+ */
53
+ configSignal: Signal<T>;
54
+ }
41
55
  /**
42
56
  * Configurable item
43
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,CAAC,MAAM,GAAG,mBAAmB,CAAC,EAAE,CAAC;CAC1E;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAErF,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iDAAiD;IACjD,MAAM,EAAE,CAAC,CAAC;CACX;AAED;;GAEG;AAEH,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,aAAa;IAC1D;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAE/B;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CACxB;AAED;;GAEG;AAEH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,EAAE;IACxC;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC;CACX;AAGD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IAEb,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,yBAAyB,GAAG,uBAAuB,GAAG,kBAAkB,CAAC;AAErH;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;CACtF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,UAAU,CAAC,EAAE,8BAA8B,CAAC;CAC7C"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,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cHBCdWlsZENvbmZpZ3VyYXRpb24nIHwgJ0V4cG9zZWRDb21wb25lbnQnO1xuXG4vKipcbiAqIEludGVyZmFjZSB0byBkZWZpbmUgd2lkZ2V0IHBhcmFtZXRlciB0byBiZSB1c2VkIG9uIENNUyBzaWRlXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgQ29uZmlnUHJvcGVydHlXaWRnZXRQYXJhbWV0ZXJzIHtcbiAgW3BhcmFtZXRlck5hbWU6IHN0cmluZ106IHN0cmluZyB8IGJvb2xlYW4gfCBudW1iZXIgfCBzdHJpbmdbXSB8IGJvb2xlYW5bXSB8IG51bWJlcltdO1xufVxuXG4vKipcbiAqIEludGVyZmFjZSB0byBkZWZpbmUgdGhlIHdpZGdldCB0byBiZSB1c2VkIG9uIENNUyBzaWRlXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgQ29uZmlnUHJvcGVydHlXaWRnZXQge1xuICAvKiogVHlwZSBvZiB0aGUgQ01TIHdpZGdldCAqL1xuICB0eXBlOiBzdHJpbmc7XG4gIC8qKiBQYXJhbWV0ZXJzIHByb3ZpZGVkIHRvIHRoZSBDTVMgd2lkZ2V0ICovXG4gIHBhcmFtZXRlcnM/OiBDb25maWdQcm9wZXJ0eVdpZGdldFBhcmFtZXRlcnM7XG59XG4iXX0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/core",
3
- "version": "10.3.0-prerelease.4",
3
+ "version": "10.3.0-prerelease.40",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -22,11 +22,11 @@
22
22
  "@angular/forms": "~17.3.0",
23
23
  "@angular/platform-browser-dynamic": "~17.3.0",
24
24
  "@angular/router": "~17.3.0",
25
- "@ngrx/entity": "~17.1.0",
26
- "@ngrx/store": "~17.1.0",
27
- "@nrwl/devkit": "~18.2.0",
28
- "@nx/angular": "~18.2.0",
29
- "@o3r/telemetry": "^10.3.0-prerelease.4",
25
+ "@ngrx/entity": "~17.2.0",
26
+ "@ngrx/store": "~17.2.0",
27
+ "@nrwl/devkit": "~18.3.0",
28
+ "@nx/angular": "~18.3.0",
29
+ "@o3r/telemetry": "^10.3.0-prerelease.40",
30
30
  "@schematics/angular": "~17.3.0",
31
31
  "chokidar": "^3.5.2",
32
32
  "globby": "^11.1.0",
@@ -64,24 +64,24 @@
64
64
  }
65
65
  },
66
66
  "dependencies": {
67
- "@o3r/schematics": "^10.3.0-prerelease.4",
67
+ "@o3r/schematics": "^10.3.0-prerelease.40",
68
68
  "tslib": "^2.6.2",
69
69
  "uuid": "^9.0.0"
70
70
  },
71
71
  "generatorDependencies": {
72
72
  "@angular-eslint/eslint-plugin": "~17.3.0",
73
73
  "@angular/material": "~17.3.0",
74
- "@ngrx/router-store": "~17.1.0",
75
- "@ngrx/effects": "~17.1.0",
76
- "@ngrx/store-devtools": "~17.1.0",
77
- "@o3r/store-sync": "^10.3.0-prerelease.4",
74
+ "@ngrx/router-store": "~17.2.0",
75
+ "@ngrx/effects": "~17.2.0",
76
+ "@ngrx/store-devtools": "~17.2.0",
77
+ "@o3r/store-sync": "^10.3.0-prerelease.40",
78
78
  "@types/jest": "~29.5.2",
79
- "nx": "~18.2.0",
79
+ "nx": "~18.3.0",
80
80
  "@typescript-eslint/parser": "^7.2.0",
81
81
  "@stylistic/eslint-plugin-ts": "^1.5.4",
82
82
  "cpy-cli": "^5.0.0",
83
83
  "eslint": "^8.57.0",
84
- "@nx/eslint-plugin": "~18.2.0",
84
+ "@nx/eslint-plugin": "~18.3.0",
85
85
  "jsonc-eslint-parser": "~2.4.0",
86
86
  "eslint-import-resolver-node": "^0.3.9",
87
87
  "eslint-plugin-jest": "~27.9.0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/component/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAsD,IAAI,EAAoD,MAAM,4BAA4B,CAAC;AAWxJ,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AAsI/D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wDAA+D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/component/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAsD,IAAI,EAAoD,MAAM,4BAA4B,CAAC;AAWxJ,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AAoH/D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wDAA+D,CAAC"}
@@ -12,18 +12,11 @@ const path = require("node:path");
12
12
  */
13
13
  function generateComponentContainer(options) {
14
14
  return (0, schematics_1.schematic)('component-container', {
15
+ ...options,
15
16
  projectName: options.projectName || undefined,
16
17
  componentName: options.componentName || undefined,
17
18
  prefix: options.prefix || undefined,
18
- componentStructure: options.componentStructure,
19
- description: options.description || '',
20
- useComponentFixtures: options.useComponentFixtures,
21
- useOtterConfig: options.useOtterConfig,
22
- useRulesEngine: options.useRulesEngine,
23
- path: options.path,
24
- useContext: options.useContext,
25
- skipLinter: options.skipLinter,
26
- standalone: options.standalone
19
+ description: options.description || ''
27
20
  });
28
21
  }
29
22
  /**
@@ -33,21 +26,10 @@ function generateComponentContainer(options) {
33
26
  */
34
27
  function generateComponentPresenter(options) {
35
28
  return (0, schematics_1.schematic)('component-presenter', {
29
+ ...options,
36
30
  projectName: options.projectName || undefined,
37
- componentName: options.componentName,
38
31
  prefix: options.prefix || undefined,
39
- componentStructure: options.componentStructure,
40
- description: options.description || '',
41
- useComponentFixtures: options.useComponentFixtures,
42
- useOtterTheming: options.useOtterTheming,
43
- useOtterConfig: options.useOtterConfig,
44
- path: options.path,
45
- useLocalization: options.useLocalization,
46
- useContext: options.useContext,
47
- activateDummy: options.activateDummy,
48
- useOtterAnalytics: options.useOtterAnalytics,
49
- skipLinter: options.skipLinter,
50
- standalone: options.standalone
32
+ description: options.description || ''
51
33
  });
52
34
  }
53
35
  /**
@@ -24,7 +24,6 @@
24
24
  "scope": {
25
25
  "type": "string",
26
26
  "description": "Page scope (e.g. booking, servicing, ssci, etc.)",
27
- "x-prompt": "Page scope (e.g. booking, servicing, ssci, etc.)?",
28
27
  "default": ""
29
28
  },
30
29
  "appRoutingModulePath": {
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,oBAAoB,kBAChB,MAAM,WACZ,mCAAmC,KAC3C,IAYF,CAAC"}
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,oBAAoB,kBAChB,MAAM,WACZ,mCAAmC,KAC3C,IAaF,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddAnalyticsRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddAnalyticsRules = (componentPath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useOtterAnalytics', options.useOtterAnalytics, 'Generate component with Otter analytics?', ['@o3r/core:component', '@o3r/core:component-presenter'], '@o3r/analytics', 'analytics-to-component', {
6
+ ...options,
6
7
  skipLinter: options.skipLinter,
7
8
  activateDummy: options.activateDummy
8
9
  });
@@ -61,8 +61,8 @@ const askQuestionsToGetRulesOrThrowIfPackageNotAvailable = (path, optionName, de
61
61
  }
62
62
  }
63
63
  const options = {
64
- path,
65
- ...schematicOptions
64
+ ...schematicOptions,
65
+ path
66
66
  };
67
67
  return applyRule ? (0, schematics_1.chain)([
68
68
  packageName !== '@o3r/core'
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,wBAAwB,kBACpB,MAAM,WACZ,KAAK,mCAAmC,EAAE,gBAAgB,GAAG,YAAY,GAAG,aAAa,CAAC,GAAG,QAAQ,KAAK,mCAAmC,EAAE,oBAAoB,CAAC,CAAC,KAC7K,IAaF,CAAC"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,wBAAwB,kBACpB,MAAM,WACZ,KAAK,mCAAmC,EAAE,gBAAgB,GAAG,YAAY,GAAG,aAAa,CAAC,GAAG,QAAQ,KAAK,mCAAmC,EAAE,oBAAoB,CAAC,CAAC,KAC7K,IAcF,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddConfigurationRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddConfigurationRules = (componentPath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useOtterConfig', options.useOtterConfig, 'Generate component with Otter configuration?', ['@o3r/core:component', '@o3r/core:component-presenter', '@o3r/core:component-container'], '@o3r/configuration', 'configuration-to-component', {
6
+ ...options,
6
7
  skipLinter: options.skipLinter,
7
8
  projectName: options.projectName,
8
9
  exposeComponent: !!options.componentStructure && options.componentStructure !== 'full'
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddContextRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddContextRules = (componentPath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useContext', options.useContext, 'Generate component with Otter context?', ['@o3r/core:component', '@o3r/core:component-container', '@o3r/core:component-presenter'], '@o3r/core', 'context-to-component', {
6
- path: componentPath,
6
+ ...options,
7
7
  skipLinter: options.skipLinter
8
8
  });
9
9
  exports.getAddContextRules = getAddContextRules;
@@ -1 +1 @@
1
- {"version":3,"file":"design-token.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/design-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,sBAAsB,oBAChB,MAAM,aACZ,MAAM,WACR,KAAK,mCAAmC,EAAE,qBAAqB,CAAC,KACxE,IASF,CAAC"}
1
+ {"version":3,"file":"design-token.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/design-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,sBAAsB,oBAChB,MAAM,aACZ,MAAM,WACR,KAAK,mCAAmC,EAAE,qBAAqB,CAAC,KACxE,IAYF,CAAC"}
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddDesignTokenRules = void 0;
4
4
  const common_1 = require("./common");
5
- const getAddDesignTokenRules = (designTokenPath, stylePath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(designTokenPath, 'useOtterDesignToken', options.useOtterDesignToken, 'Generate component with Design Token specification?', ['@o3r/core:component', '@o3r/core:component-presenter'], '@o3r/design', 'design-token-to-component', { stylePath });
5
+ const getAddDesignTokenRules = (designTokenPath, stylePath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(designTokenPath, 'useOtterDesignToken', options.useOtterDesignToken, 'Generate component with Design Token specification?', ['@o3r/core:component', '@o3r/core:component-presenter'], '@o3r/design', 'design-token-to-component', {
6
+ ...options,
7
+ stylePath
8
+ });
6
9
  exports.getAddDesignTokenRules = getAddDesignTokenRules;
7
10
  //# sourceMappingURL=design-token.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixture.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,kBAAkB,kBACd,MAAM,WACZ,KAAK,mCAAmC,EAAE,sBAAsB,GAAG,YAAY,CAAC,uBAExF,IAYF,CAAC"}
1
+ {"version":3,"file":"fixture.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,kBAAkB,kBACd,MAAM,WACZ,KAAK,mCAAmC,EAAE,sBAAsB,GAAG,YAAY,CAAC,uBAExF,IAaF,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddFixtureRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddFixtureRules = (componentPath, options, isPage = false) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useComponentFixtures', options.useComponentFixtures, 'Generate component with Otter fixture?', ['@o3r/core:component', '@o3r/core:component-presenter', '@o3r/core:component-container'], '@o3r/testing', 'fixture-to-component', {
6
+ ...options,
6
7
  skipLinter: options.skipLinter,
7
8
  page: isPage
8
9
  });
@@ -1 +1 @@
1
- {"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/localization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,uBAAuB,kBACnB,MAAM,WACZ,KAAK,mCAAmC,EAAE,iBAAiB,GAAG,YAAY,GAAG,eAAe,CAAC,KACrG,IAYF,CAAC"}
1
+ {"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/component/localization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAGlF,eAAO,MAAM,uBAAuB,kBACnB,MAAM,WACZ,KAAK,mCAAmC,EAAE,iBAAiB,GAAG,YAAY,GAAG,eAAe,CAAC,KACrG,IAaF,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddLocalizationRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddLocalizationRules = (componentPath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useLocalization', options.useLocalization, 'Generate component with Otter localization?', ['@o3r/core:component', '@o3r/core:component-presenter', '@o3r/core:component-container'], '@o3r/localization', 'localization-to-component', {
6
+ ...options,
6
7
  skipLinter: options.skipLinter,
7
8
  activateDummy: options.activateDummy
8
9
  });
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAddRulesEngineRules = void 0;
4
4
  const common_1 = require("./common");
5
5
  const getAddRulesEngineRules = (componentPath, options) => (0, common_1.askQuestionsToGetRulesOrThrowIfPackageNotAvailable)(componentPath, 'useRulesEngine', options.useRulesEngine, 'Generate component with rules-engine?', ['@o3r/core:component', '@o3r/core:component-container'], '@o3r/rules-engine', 'rules-engine-to-component', {
6
- path: componentPath,
6
+ ...options,
7
7
  skipLinter: options.skipLinter,
8
8
  projectName: options.projectName
9
9
  });
@@ -2,6 +2,5 @@ export * from './o3r-basic-updates/index';
2
2
  export * from './additional-modules/index';
3
3
  export * from './customization-environment/index';
4
4
  export * from './otter-environment/index';
5
- export * from './playwright/index';
6
5
  export * from './store/index';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC"}
@@ -5,6 +5,5 @@ tslib_1.__exportStar(require("./o3r-basic-updates/index"), exports);
5
5
  tslib_1.__exportStar(require("./additional-modules/index"), exports);
6
6
  tslib_1.__exportStar(require("./customization-environment/index"), exports);
7
7
  tslib_1.__exportStar(require("./otter-environment/index"), exports);
8
- tslib_1.__exportStar(require("./playwright/index"), exports);
9
8
  tslib_1.__exportStar(require("./store/index"), exports);
10
9
  //# sourceMappingURL=index.js.map
@@ -1,10 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- import { NgAddPackageOptions } from '@o3r/schematics';
3
- /**
4
- * Add Playwright to Otter application
5
- * @param options @see RuleFactory.options
6
- * @param options.projectName
7
- * @param rootPath @see RuleFactory.rootPath
8
- */
9
- export declare function updatePlaywright(rootPath: string, options?: NgAddPackageOptions): Rule;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/rule-factories/playwright/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA+D,IAAI,EAAyC,MAAM,4BAA4B,CAAC;AACtJ,OAAO,EAGL,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AAMzB;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAoE1F"}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatePlaywright = void 0;
4
- const core_1 = require("@angular-devkit/core");
5
- const schematics_1 = require("@angular-devkit/schematics");
6
- const schematics_2 = require("@o3r/schematics");
7
- const dependencies_1 = require("@schematics/angular/utility/dependencies");
8
- const path = require("node:path");
9
- const fs = require("node:fs");
10
- /**
11
- * Add Playwright to Otter application
12
- * @param options @see RuleFactory.options
13
- * @param options.projectName
14
- * @param rootPath @see RuleFactory.rootPath
15
- */
16
- function updatePlaywright(rootPath, options = {}) {
17
- const ownPackageJsonPath = path.resolve(__dirname, '..', '..', '..', 'package.json');
18
- const ownPackageJson = JSON.parse(fs.readFileSync(ownPackageJsonPath, { encoding: 'utf-8' }));
19
- return (tree, context) => {
20
- // update gitignore
21
- if (tree.exists('/.gitignore')) {
22
- let gitignore = tree.read('/.gitignore').toString();
23
- if (!gitignore.includes('dist*') && !gitignore.includes('/dist-e2e-playwright') && !gitignore.includes('/playwright-reports')) {
24
- gitignore +=
25
- `
26
- # Playwright
27
- /dist-e2e-playwright
28
- /playwright-reports
29
- `;
30
- tree.overwrite('/.gitignore', gitignore);
31
- }
32
- }
33
- // register scripts
34
- if (tree.exists('/package.json')) {
35
- const packageJson = JSON.parse(tree.read('/package.json').toString());
36
- packageJson.scripts ||= {};
37
- packageJson.scripts['test:playwright'] ||= 'playwright test --config=e2e-playwright/playwright-config.ts';
38
- packageJson.scripts['test:playwright:sanity'] ||= 'playwright test --config=e2e-playwright/playwright-config.sanity.ts';
39
- tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2));
40
- }
41
- const dependencies = ['@playwright/test', 'rimraf'].reduce((acc, dep) => {
42
- acc[dep] = {
43
- inManifest: [{
44
- range: ownPackageJson.generatorDependencies[dep],
45
- types: [dependencies_1.NodeDependencyType.Dev]
46
- }]
47
- };
48
- return acc;
49
- }, {});
50
- const ngAddRules = (0, schematics_2.setupDependencies)({
51
- projectName: options.projectName || undefined,
52
- dependencies
53
- });
54
- // generate files
55
- if (!tree.exists('/e2e-playwright/playwright-config.ts')) {
56
- const name = 'my-scenario';
57
- const scenarioName = core_1.strings.capitalize(core_1.strings.camelize(name));
58
- const sanity = 'my-sanity';
59
- const sanityName = core_1.strings.capitalize(core_1.strings.camelize(sanity));
60
- const templateSource = (0, schematics_1.apply)((0, schematics_1.url)((0, schematics_2.getTemplateFolder)(rootPath, __dirname)), [
61
- (0, schematics_1.template)({
62
- ...core_1.strings,
63
- name,
64
- scenarioName,
65
- sanity,
66
- sanityName
67
- }),
68
- (0, schematics_1.renameTemplateFiles)()
69
- ]);
70
- return (0, schematics_1.chain)([
71
- ngAddRules,
72
- (0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite)
73
- ])(tree, context);
74
- }
75
- return ngAddRules(tree, context);
76
- };
77
- }
78
- exports.updatePlaywright = updatePlaywright;
79
- //# sourceMappingURL=index.js.map
@@ -1,12 +0,0 @@
1
- import {PlaywrightTestConfig} from '@playwright/test';
2
- import * as path from 'node:path';
3
-
4
- import {default as defaultConfig} from './playwright-config';
5
-
6
- const config: PlaywrightTestConfig = {
7
- ...defaultConfig,
8
- testDir: path.join(__dirname, 'sanity'),
9
- testMatch: /.*\.e2e\.ts$/
10
- };
11
-
12
- export default config;
@@ -1,34 +0,0 @@
1
- import { adjustPath } from '@o3r/testing/tools/path-replacement';
2
- import type { PlaywrightTestConfig } from '@playwright/test';
3
- import * as path from 'node:path';
4
-
5
- adjustPath('playwright');
6
-
7
- const FIVE_MINUTES = 1_000 * 60 * 5;
8
-
9
- const reportsFolder = path.join(__dirname, '..', 'playwright-reports');
10
-
11
- const config: PlaywrightTestConfig = {
12
- testDir: path.join(__dirname, '..', 'e2e-playwright'),
13
- testMatch: /.*\.e2e-playwright-spec.ts$/,
14
- reporter: [
15
- ['list'],
16
- ['junit', {outputFile: path.join(reportsFolder, 'junit', 'reporter.xml')}],
17
- ['html', {open: 'never', outputFolder: path.join(reportsFolder, 'html')}]
18
- ],
19
- retries: process.env.CI ? 3 : 0,
20
- forbidOnly: !!process.env.CI,
21
- timeout: FIVE_MINUTES,
22
- use: {
23
- ignoreHTTPSErrors: true,
24
- screenshot: 'only-on-failure',
25
- trace: 'retain-on-failure'
26
- },
27
- projects: [
28
- {name: 'Chromium', use: {browserName: 'chromium'}},
29
- {name: 'Webkit', use: {browserName: 'webkit'}},
30
- {name: 'Firefox', use: {browserName: 'firefox'}}
31
- ]
32
- };
33
-
34
- export default config;
@@ -1,7 +0,0 @@
1
- import { expect, test } from '@playwright/test';
2
-
3
- test.describe.serial('Empty <%= classify(sanityName) %> test', () => {
4
- test('Empty test', ({ page }) => {
5
- expect(page).toBeDefined();
6
- });
7
- });
@@ -1,19 +0,0 @@
1
- import { expect, test } from '@playwright/test';
2
- import { BaseScenario } from '../utils';
3
-
4
- export class <%= classify(scenarioName) %> extends BaseScenario {
5
- protected <%= camelize(scenarioName) %>() {
6
- test.describe.serial('Empty <%= classify(scenarioName) %> tests', () => {
7
- test('Empty test', async ({ page }) => {
8
- await page.goto(this.targetUrl);
9
- await expect(page).toHaveTitle('TestApp');
10
- });
11
- });
12
- }
13
-
14
- public performFlow() {
15
- this.<%= camelize(scenarioName) %>();
16
- }
17
- }
18
-
19
- new <%= classify(scenarioName) %>().run();
@@ -1,29 +0,0 @@
1
- import { test } from '@playwright/test';
2
-
3
- /**
4
- * Interface to define the interface of a flow test
5
- */
6
- export interface Flow {
7
- /**
8
- * Run the flow
9
- */
10
- performFlow(): void;
11
- }
12
-
13
- /**
14
- * Base scenario for e2e scenarios.
15
- * Init the fetch manager and call `performFlow` method.
16
- * E2E Booking flows should inherit from this class.
17
- */
18
- export abstract class BaseScenario implements Flow {
19
-
20
- public targetUrl = process.env.PLAYWRIGHT_TARGET_URL || 'http://localhost:4200/';
21
-
22
- public abstract performFlow();
23
-
24
- public run() {
25
- test.describe.serial(this.constructor.name, () => {
26
- this.performFlow();
27
- });
28
- }
29
- }
@@ -1 +0,0 @@
1
- export * from './base-scenario';