@o3r/forms 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/forms",
3
- "version": "13.0.0-prerelease.2",
3
+ "version": "13.0.0-prerelease.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,15 +11,15 @@
11
11
  "otter-module"
12
12
  ],
13
13
  "peerDependencies": {
14
- "@ama-sdk/core": "^13.0.0-prerelease.2",
14
+ "@ama-sdk/core": "^13.0.0-prerelease.4",
15
15
  "@angular-devkit/schematics": "^20.0.0",
16
16
  "@angular/common": "^20.0.0",
17
17
  "@angular/core": "^20.0.0",
18
18
  "@angular/forms": "^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/schematics": "^13.0.0-prerelease.2",
21
+ "@o3r/core": "^13.0.0-prerelease.4",
22
+ "@o3r/schematics": "^13.0.0-prerelease.4",
23
23
  "@schematics/angular": "^20.0.0",
24
24
  "rxjs": "^7.8.1",
25
25
  "ts-node": "~10.9.2",
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@o3r/schematics": "^13.0.0-prerelease.2",
43
+ "@o3r/schematics": "^13.0.0-prerelease.4",
44
44
  "tslib": "^2.6.2"
45
45
  },
46
46
  "engines": {
@@ -1,4 +1,4 @@
1
- import type { Rule } from '@angular-devkit/schematics';
1
+ import { type Rule } from '@angular-devkit/schematics';
2
2
  import type { NgAddSchematicsSchema } from './schema';
3
3
  /**
4
4
  * Add Otter forms to an Angular Project
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAWpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAkDlB;;;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,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAgClB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
- const schematics_1 = require("@o3r/schematics");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const schematics_2 = require("@o3r/schematics");
6
7
  /**
7
8
  * List of external dependencies to be added to the project as peer dependencies
8
9
  */
@@ -25,30 +26,14 @@ const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
25
26
  */
26
27
  function ngAddFn(options) {
27
28
  /* ng add rules */
28
- return (tree, context) => {
29
- const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
30
- const projectDirectory = workspaceProject?.root || '.';
31
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
32
- const externalDependenciesInfo = (0, schematics_1.getExternalDependenciesInfo)({
33
- devDependenciesToInstall,
34
- dependenciesToInstall,
35
- o3rPackageJsonPath: packageJsonPath,
36
- projectPackageJson,
37
- projectType: workspaceProject?.projectType
38
- }, context.logger);
39
- return (0, schematics_1.setupDependencies)({
40
- projectName: options.projectName,
41
- dependencies: {
42
- ...(0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion),
43
- ...externalDependenciesInfo
44
- }
45
- });
46
- };
29
+ return (0, schematics_1.chain)([
30
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall })
31
+ ]);
47
32
  }
48
33
  /**
49
34
  * Add Otter forms to an Angular Project
50
35
  * @param options
51
36
  */
52
- const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
37
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
53
38
  exports.ngAdd = ngAdd;
54
39
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,4 @@
1
- import type { SchematicOptionObject } from '@o3r/schematics';
2
- export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
- /** Project name */
4
- projectName?: string | undefined;
5
- /** Use a pinned version for otter packages */
6
- exactO3rVersion?: boolean;
1
+ import type { NgAddOptions, SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgAddSchematicsSchema extends NgAddOptions, SchematicOptionObject {
7
3
  }
8
4
  //# 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;IACjC,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;CAAG"}