@o3r/dynamic-content 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/dynamic-content",
3
- "version": "13.0.0-prerelease.2",
3
+ "version": "13.0.0-prerelease.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,8 +42,8 @@
42
42
  "@angular/core": "^20.0.0",
43
43
  "@angular/platform-browser-dynamic": "^20.0.0",
44
44
  "@ngrx/store": "^20.0.0",
45
- "@o3r/core": "^13.0.0-prerelease.2",
46
- "@o3r/schematics": "^13.0.0-prerelease.2",
45
+ "@o3r/core": "^13.0.0-prerelease.4",
46
+ "@o3r/schematics": "^13.0.0-prerelease.4",
47
47
  "@schematics/angular": "^20.0.0",
48
48
  "cheerio": "^1.1.2",
49
49
  "express-interceptor": "^1.2.0",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "@o3r/schematics": "^13.0.0-prerelease.2",
79
+ "@o3r/schematics": "^13.0.0-prerelease.4",
80
80
  "tslib": "^2.6.2"
81
81
  },
82
82
  "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 dynamic-content 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;AAqDlB;;;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;AAiClB;;;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
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
7
8
  /**
8
9
  * List of external dependencies to be added to the project as peer dependencies
@@ -26,30 +27,14 @@ const devDependenciesToInstall = [
26
27
  */
27
28
  function ngAddFn(options) {
28
29
  /* ng add rules */
29
- return (tree, context) => {
30
- const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
31
- const projectDirectory = workspaceProject?.root || '.';
32
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
33
- const externalDependenciesInfo = (0, schematics_1.getExternalDependenciesInfo)({
34
- devDependenciesToInstall,
35
- dependenciesToInstall,
36
- projectType: workspaceProject?.projectType,
37
- o3rPackageJsonPath: packageJsonPath,
38
- projectPackageJson
39
- }, context.logger);
40
- return (0, schematics_1.setupDependencies)({
41
- projectName: options.projectName,
42
- dependencies: {
43
- ...(0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion),
44
- ...externalDependenciesInfo
45
- }
46
- });
47
- };
30
+ return (0, schematics_1.chain)([
31
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall })
32
+ ]);
48
33
  }
49
34
  /**
50
35
  * Add Otter dynamic-content to an Angular Project
51
36
  * @param options
52
37
  */
53
- const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
38
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
54
39
  exports.ngAdd = ngAdd;
55
40
  //# 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"}