@o3r/extractors 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
@@ -2,7 +2,7 @@
2
2
  "name": "@o3r/extractors",
3
3
  "main": "./src/public_api.js",
4
4
  "types": "./src/public_api.d.ts",
5
- "version": "13.0.0-prerelease.3",
5
+ "version": "13.0.0-prerelease.4",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -24,9 +24,9 @@
24
24
  "@angular-devkit/architect": ">=0.2000.0 <0.2100.0-0",
25
25
  "@angular-devkit/core": "^20.0.0",
26
26
  "@angular-devkit/schematics": "^20.0.0",
27
- "@o3r/core": "^13.0.0-prerelease.3",
28
- "@o3r/schematics": "^13.0.0-prerelease.3",
29
- "@o3r/telemetry": "^13.0.0-prerelease.3",
27
+ "@o3r/core": "^13.0.0-prerelease.4",
28
+ "@o3r/schematics": "^13.0.0-prerelease.4",
29
+ "@o3r/telemetry": "^13.0.0-prerelease.4",
30
30
  "@schematics/angular": "^20.0.0",
31
31
  "@yarnpkg/cli": "^4.0.0",
32
32
  "@yarnpkg/core": "^4.1.1",
@@ -98,13 +98,13 @@
98
98
  "@nx/eslint-plugin": "~21.3.11",
99
99
  "@nx/jest": "~21.3.11",
100
100
  "@nx/js": "~21.3.11",
101
- "@o3r/build-helpers": "^13.0.0-prerelease.3",
102
- "@o3r/core": "^13.0.0-prerelease.3",
103
- "@o3r/eslint-config": "^13.0.0-prerelease.3",
104
- "@o3r/eslint-plugin": "^13.0.0-prerelease.3",
105
- "@o3r/schematics": "^13.0.0-prerelease.3",
106
- "@o3r/telemetry": "^13.0.0-prerelease.3",
107
- "@o3r/test-helpers": "^13.0.0-prerelease.3",
101
+ "@o3r/build-helpers": "^13.0.0-prerelease.4",
102
+ "@o3r/core": "^13.0.0-prerelease.4",
103
+ "@o3r/eslint-config": "^13.0.0-prerelease.4",
104
+ "@o3r/eslint-plugin": "^13.0.0-prerelease.4",
105
+ "@o3r/schematics": "^13.0.0-prerelease.4",
106
+ "@o3r/telemetry": "^13.0.0-prerelease.4",
107
+ "@o3r/test-helpers": "^13.0.0-prerelease.4",
108
108
  "@schematics/angular": "~20.0.0",
109
109
  "@stylistic/eslint-plugin": "~5.2.0",
110
110
  "@swc/helpers": "~0.5.0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAgBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA+DlB;;;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":"AAIA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAQpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA8BlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -17,46 +17,16 @@ const devDependenciesToInstall = [
17
17
  '@angular-devkit/core',
18
18
  'semver'
19
19
  ];
20
+ const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
20
21
  /**
21
22
  * Add Otter extractors to an Angular Project
22
23
  * @param options
23
24
  */
24
25
  function ngAddFn(options) {
25
- return (tree, context) => {
26
- const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
27
- const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
28
- const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
29
- const projectDirectory = workspaceProject?.root || '.';
30
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
31
- const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
32
- acc[dep] = {
33
- inManifest: [{
34
- range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
35
- types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
36
- }],
37
- ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
38
- };
39
- return acc;
40
- }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, true, !!options.exactO3rVersion));
41
- const externalDependenciesInfo = (0, schematics_2.getExternalDependenciesInfo)({
42
- devDependenciesToInstall,
43
- dependenciesToInstall,
44
- projectPackageJson,
45
- o3rPackageJsonPath: packageJsonPath,
46
- projectType: workspaceProject?.projectType
47
- }, context.logger);
48
- return (0, schematics_1.chain)([
49
- (0, schematics_2.setupDependencies)({
50
- projectName: options.projectName,
51
- dependencies: {
52
- ...dependencies,
53
- ...externalDependenciesInfo
54
- },
55
- ngAddToRun: depsInfo.o3rPeerDeps
56
- }),
57
- (0, cms_adapter_1.updateCmsAdapter)(options, __dirname)
58
- ]);
59
- };
26
+ return (0, schematics_1.chain)([
27
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall }),
28
+ (0, cms_adapter_1.updateCmsAdapter)(options, __dirname)
29
+ ]);
60
30
  }
61
31
  /**
62
32
  * Add Otter extractors to an Angular Project
@@ -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"}