@o3r/store-sync 12.3.0-prerelease.9 → 12.3.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/store-sync",
3
- "version": "12.3.0-prerelease.9",
3
+ "version": "12.3.0-rc.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,14 +13,14 @@
13
13
  "otter-module"
14
14
  ],
15
15
  "peerDependencies": {
16
- "@ama-sdk/core": "^12.3.0-prerelease.9",
16
+ "@ama-sdk/core": "^12.3.0-rc.0",
17
17
  "@angular-devkit/core": "^19.0.0",
18
18
  "@angular-devkit/schematics": "^19.0.0",
19
19
  "@ngrx/entity": "^19.0.0",
20
20
  "@ngrx/store": "^19.0.0",
21
- "@o3r/core": "^12.3.0-prerelease.9",
22
- "@o3r/logger": "^12.3.0-prerelease.9",
23
- "@o3r/schematics": "^12.3.0-prerelease.9",
21
+ "@o3r/core": "^12.3.0-rc.0",
22
+ "@o3r/logger": "^12.3.0-rc.0",
23
+ "@o3r/schematics": "^12.3.0-rc.0",
24
24
  "@schematics/angular": "^19.0.0",
25
25
  "fast-deep-equal": "^3.1.3",
26
26
  "rxjs": "^7.8.1",
@@ -41,6 +41,7 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
+ "@o3r/schematics": "^12.3.0-rc.0",
44
45
  "tslib": "^2.6.2"
45
46
  },
46
47
  "schematics": "./collection.json",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAmElB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAmDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -3,38 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
5
  const schematics_1 = require("@angular-devkit/schematics");
6
+ const schematics_2 = require("@o3r/schematics");
6
7
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
7
8
  const devDependenciesToInstall = [
8
9
  'fast-deep-equal'
9
10
  ];
10
- const reportMissingSchematicsDep = (logger) => (reason) => {
11
- logger.error(`[ERROR]: Adding store-sync has failed.
12
- If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the store-sync package. Please run 'ng add @o3r/core' .
13
- Otherwise, use the error message as guidance.`);
14
- throw reason;
15
- };
16
11
  /**
17
12
  * Add Otter store-sync to an Otter Project
18
13
  * @param options
19
14
  */
20
15
  function ngAddFn(options) {
21
- return async (tree, context) => {
16
+ return (tree, context) => {
22
17
  // use dynamic import to properly raise an exception if it is not an Otter project.
23
- const { getPackageInstallConfig, applyEsLintFix, setupDependencies, getO3rPeerDeps, getProjectNewDependenciesTypes, getWorkspaceConfig, getExternalDependenciesVersionRange } = await Promise.resolve().then(() => require('@o3r/schematics'));
24
- const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
18
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
25
19
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
26
- const depsInfo = getO3rPeerDeps(packageJsonPath);
20
+ const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
27
21
  const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
28
22
  acc[dep] = {
29
23
  inManifest: [{
30
24
  range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
31
- types: getProjectNewDependenciesTypes(workspaceProject)
25
+ types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
32
26
  }],
33
27
  ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
34
28
  };
35
29
  return acc;
36
- }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
37
- Object.entries(getExternalDependenciesVersionRange(devDependenciesToInstall, packageJsonPath, context.logger))
30
+ }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
31
+ Object.entries((0, schematics_2.getExternalDependenciesVersionRange)(devDependenciesToInstall, packageJsonPath, context.logger))
38
32
  .forEach(([dep, range]) => {
39
33
  dependencies[dep] = {
40
34
  inManifest: [{
@@ -45,9 +39,9 @@ function ngAddFn(options) {
45
39
  });
46
40
  return (0, schematics_1.chain)([
47
41
  // optional custom action dedicated to this module
48
- options.skipLinter ? (0, schematics_1.noop)() : applyEsLintFix(),
42
+ options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
49
43
  // add the missing Otter modules in the current project
50
- setupDependencies({
44
+ (0, schematics_2.setupDependencies)({
51
45
  projectName: options.projectName,
52
46
  dependencies,
53
47
  ngAddToRun: depsInfo.o3rPeerDeps
@@ -59,9 +53,6 @@ function ngAddFn(options) {
59
53
  * Add Otter store-sync to an Otter Project
60
54
  * @param options
61
55
  */
62
- const ngAdd = (options) => async (_, { logger }) => {
63
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
64
- return createOtterSchematic(ngAddFn)(options);
65
- };
56
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
66
57
  exports.ngAdd = ngAdd;
67
58
  //# sourceMappingUR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AC,CAAC,CAAC;QAC1G,MAAM,CAAC,OAAO,CAAC,IAAA,gDAAmC,EAAC,wBAAwB,EAAE,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;aAC3G,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG;gBAClB,UAAU,EAAE,CAAC;wBACX,KAAK;wBACL,KAAK,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;qBAChC,CAAC;aACH,CAAC;QACJ,CAAC,CAAC,CAAC;QAEL,OAAO,IAAA,kBAAK,EAAC;YACX,kDAAkD;YAClD,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,2BAAc,GAAE;YAC9C,uDAAuD;YACvD,IAAA,8BAAiB,EAAC;gBAChB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,YAAY;gBACZ,UAAU,EAAE,QAAQ,CAAC,WAAW;aACjC,CAAC;SACH,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAE,EAAE,CAAC,IAAA,iCAAoB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AAAnF,QAAA,KAAK,SAA8E"}
@@ -2,7 +2,7 @@ import type { SchematicOptionObject } from '@o3r/schematics';
2
2
  export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
3
  /** Project name */
4
4
  projectName?: string | undefined;
5
- /** Skip the linter process */
5
+ /** Skip the linter process which includes the run of EsLint and EditorConfig rules */
6
6
  skipLinter: boolean;
7
7
  /** Skip the install process */
8
8
  skipInstall: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IAErB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IAErB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "skipLinter": {
15
15
  "type": "boolean",
16
- "description": "Skip the linter process",
16
+ "description": "Skip the linter process which includes EsLint and EditorConfig rules applying",
17
17
  "default": true
18
18
  },
19
19
  "exactO3rVersion": {