@ama-sdk/client-angular 13.0.0-prerelease.3 → 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": "@ama-sdk/client-angular",
3
- "version": "13.0.0-prerelease.3",
3
+ "version": "13.0.0-prerelease.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,18 +35,18 @@
35
35
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
36
36
  },
37
37
  "dependencies": {
38
- "@o3r/schematics": "^13.0.0-prerelease.3",
38
+ "@o3r/schematics": "^13.0.0-prerelease.4",
39
39
  "@swc/helpers": "~0.5.0",
40
40
  "tslib": "^2.6.2",
41
41
  "type-fest": "^4.30.1",
42
42
  "uuid": "^11.0.5"
43
43
  },
44
44
  "peerDependencies": {
45
- "@ama-sdk/core": "^13.0.0-prerelease.3",
45
+ "@ama-sdk/core": "^13.0.0-prerelease.4",
46
46
  "@angular-devkit/schematics": "^20.0.0",
47
47
  "@angular/cli": "^20.0.0",
48
48
  "@angular/common": "^20.0.0",
49
- "@o3r/schematics": "^13.0.0-prerelease.3",
49
+ "@o3r/schematics": "^13.0.0-prerelease.4",
50
50
  "@schematics/angular": "^20.0.0",
51
51
  "rxjs": "^7.8.1",
52
52
  "type-fest": "^4.30.1",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "devDependencies": {
79
- "@ama-sdk/core": "^13.0.0-prerelease.3",
79
+ "@ama-sdk/core": "^13.0.0-prerelease.4",
80
80
  "@angular-devkit/core": "~20.0.0",
81
81
  "@angular-devkit/schematics": "~20.0.0",
82
82
  "@angular/common": "~20.0.0",
@@ -84,9 +84,9 @@
84
84
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
85
85
  "@nx/eslint-plugin": "~21.3.11",
86
86
  "@nx/jest": "~21.3.11",
87
- "@o3r/build-helpers": "^13.0.0-prerelease.3",
88
- "@o3r/eslint-plugin": "^13.0.0-prerelease.3",
89
- "@o3r/test-helpers": "^13.0.0-prerelease.3",
87
+ "@o3r/build-helpers": "^13.0.0-prerelease.4",
88
+ "@o3r/eslint-plugin": "^13.0.0-prerelease.4",
89
+ "@o3r/test-helpers": "^13.0.0-prerelease.4",
90
90
  "@schematics/angular": "~20.0.0",
91
91
  "@stylistic/eslint-plugin": "~5.2.0",
92
92
  "@swc/cli": "~0.7.7",
@@ -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;AAkBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAiElB;;;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;AAUpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA8BlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -15,49 +15,18 @@ const dependenciesToInstall = [
15
15
  * List of external dependencies to be added to the project as dev dependencies
16
16
  */
17
17
  const devDependenciesToInstall = [];
18
+ const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
18
19
  /**
19
20
  * Add SDk Angular Client to an Otter Project
20
21
  * @param options
21
22
  */
22
23
  function ngAddFn(options) {
23
- return (tree, context) => {
24
- const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
25
- const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
26
- const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
27
- const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
28
- acc[dep] = {
29
- inManifest: [{
30
- range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
31
- types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
32
- }],
33
- ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
34
- };
35
- return acc;
36
- }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
37
- const projectDirectory = workspaceProject?.root || '.';
38
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
39
- const externalDependenciesInfo = (0, schematics_2.getExternalDependenciesInfo)({
40
- devDependenciesToInstall,
41
- dependenciesToInstall,
42
- projectType: workspaceProject?.projectType,
43
- o3rPackageJsonPath: packageJsonPath,
44
- projectPackageJson
45
- }, context.logger);
46
- return (0, schematics_1.chain)([
47
- // optional custom action dedicated to this module
48
- options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
49
- // add the missing Otter modules in the current project
50
- (0, schematics_2.setupDependencies)({
51
- projectName: options.projectName,
52
- dependencies: {
53
- ...dependencies,
54
- ...externalDependenciesInfo
55
- },
56
- ngAddToRun: depsInfo.o3rPeerDeps
57
- }),
58
- (0, schematics_2.updateImports)(import_map_1.mapMigrationFromCoreImports)
59
- ]);
60
- };
24
+ return (0, schematics_1.chain)([
25
+ // optional custom action dedicated to this module
26
+ options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
27
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall }),
28
+ (0, schematics_2.updateImports)(import_map_1.mapMigrationFromCoreImports)
29
+ ]);
61
30
  }
62
31
  /**
63
32
  * Add SDk Angular Client to an Otter Project
@@ -1,6 +1,4 @@
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
  }
6
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;CAClC"}
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"}