@o3r/store-sync 13.0.0-prerelease.2 → 13.0.0-prerelease.4

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": "13.0.0-prerelease.2",
3
+ "version": "13.0.0-prerelease.4",
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": "^13.0.0-prerelease.2",
16
+ "@ama-sdk/core": "^13.0.0-prerelease.4",
17
17
  "@angular-devkit/core": "^20.0.0",
18
18
  "@angular-devkit/schematics": "^20.0.0",
19
19
  "@ngrx/entity": "^20.0.0",
20
20
  "@ngrx/store": "^20.0.0",
21
- "@o3r/core": "^13.0.0-prerelease.2",
22
- "@o3r/logger": "^13.0.0-prerelease.2",
23
- "@o3r/schematics": "^13.0.0-prerelease.2",
21
+ "@o3r/core": "^13.0.0-prerelease.4",
22
+ "@o3r/logger": "^13.0.0-prerelease.4",
23
+ "@o3r/schematics": "^13.0.0-prerelease.4",
24
24
  "@schematics/angular": "^20.0.0",
25
25
  "fast-deep-equal": "^3.1.3",
26
26
  "rxjs": "^7.8.1",
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@o3r/schematics": "^13.0.0-prerelease.2",
48
+ "@o3r/schematics": "^13.0.0-prerelease.4",
49
49
  "tslib": "^2.6.2"
50
50
  },
51
51
  "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;AAcpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAqElB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,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;AAMpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA+BlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -17,49 +17,16 @@ const dependenciesToInstall = [
17
17
  * List of external dependencies to be added to the project as dev dependencies
18
18
  */
19
19
  const devDependenciesToInstall = [];
20
+ const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
20
21
  /**
21
22
  * Add Otter store-sync to an Otter Project
22
23
  * @param options
23
24
  */
24
25
  function ngAddFn(options) {
25
- return (tree, context) => {
26
- // use dynamic import to properly raise an exception if it is not an Otter project.
27
- const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
28
- const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
29
- const projectDirectory = workspaceProject?.root || '.';
30
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
31
- const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
32
- const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
33
- acc[dep] = {
34
- inManifest: [{
35
- range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
36
- types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
37
- }],
38
- ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
39
- };
40
- return acc;
41
- }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
42
- const externalDependenciesInfo = (0, schematics_2.getExternalDependenciesInfo)({
43
- devDependenciesToInstall,
44
- dependenciesToInstall,
45
- projectType: workspaceProject?.projectType,
46
- projectPackageJson,
47
- o3rPackageJsonPath: packageJsonPath
48
- }, context.logger);
49
- return (0, schematics_1.chain)([
50
- // optional custom action dedicated to this module
51
- options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
52
- // add the missing Otter modules in the current project
53
- (0, schematics_2.setupDependencies)({
54
- projectName: options.projectName,
55
- dependencies: {
56
- ...dependencies,
57
- ...externalDependenciesInfo
58
- },
59
- ngAddToRun: depsInfo.o3rPeerDeps
60
- })
61
- ]);
62
- };
26
+ return (0, schematics_1.chain)([
27
+ options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
28
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall })
29
+ ]);
63
30
  }
64
31
  /**
65
32
  * Add Otter store-sync to an Otter Project
@@ -1,12 +1,6 @@
1
- import type { SchematicOptionObject } from '@o3r/schematics';
2
- export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
- /** Project name */
4
- projectName?: string | undefined;
1
+ import type { NgAddOptions, SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgAddSchematicsSchema extends NgAddOptions, SchematicOptionObject {
5
3
  /** Skip the linter process which includes the run of EsLint and EditorConfig rules */
6
4
  skipLinter: boolean;
7
- /** Skip the install process */
8
- skipInstall: boolean;
9
- /** Use a pinned version for otter packages */
10
- exactO3rVersion?: boolean;
11
5
  }
12
6
  //# sourceMappingURL=schema.d.ts.map
@@ -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,sFAAsF;IACtF,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,YAAY,EACZ,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,YAAY,EAAE,qBAAqB;IAChF,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;CACrB"}