@o3r/logger 12.5.0-prerelease.9 → 13.0.0-next.1

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/logger",
3
- "version": "12.5.0-prerelease.9",
3
+ "version": "13.0.0-next.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,14 +16,15 @@
16
16
  "@angular/platform-browser-dynamic": "^19.0.0",
17
17
  "@fullstory/browser": "^2.0.0",
18
18
  "@ngrx/store": "^19.0.0",
19
- "@o3r/core": "^12.5.0-prerelease.9",
20
- "@o3r/schematics": "^12.5.0-prerelease.9",
19
+ "@o3r/core": "^13.0.0-next.1",
20
+ "@o3r/schematics": "^13.0.0-next.1",
21
21
  "@schematics/angular": "^19.0.0",
22
22
  "logrocket": "^9.0.0",
23
23
  "logrocket-ngrx": "^0.2.1",
24
24
  "rxjs": "^7.8.1",
25
25
  "smartlook-client": "^10.0.0",
26
- "ts-node": "~10.9.2"
26
+ "ts-node": "~10.9.2",
27
+ "type-fest": "^4.30.1"
27
28
  },
28
29
  "peerDependenciesMeta": {
29
30
  "@angular-devkit/schematics": {
@@ -49,10 +50,13 @@
49
50
  },
50
51
  "smartlook-client": {
51
52
  "optional": true
53
+ },
54
+ "type-fest": {
55
+ "optional": true
52
56
  }
53
57
  },
54
58
  "dependencies": {
55
- "@o3r/schematics": "^12.5.0-prerelease.9",
59
+ "@o3r/schematics": "^13.0.0-next.1",
56
60
  "tslib": "^2.6.2"
57
61
  },
58
62
  "engines": {
@@ -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;AAMpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAkBlB;;;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,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAWpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAgDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -4,16 +4,41 @@ exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
5
  const schematics_1 = require("@o3r/schematics");
6
6
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
7
+ /**
8
+ * List of external dependencies to be added to the project as peer dependencies
9
+ */
10
+ const dependenciesToInstall = [
11
+ '@angular/core',
12
+ '@angular/platform-browser-dynamic',
13
+ '@ngrx/store'
14
+ ];
15
+ /**
16
+ * List of external dependencies to be added to the project as dev dependencies
17
+ */
18
+ const devDependenciesToInstall = [];
7
19
  /**
8
20
  * Add Otter logger to an Angular Project
9
21
  * @param options
10
22
  */
11
23
  function ngAddFn(options) {
12
24
  /* ng add rules */
13
- return (tree) => {
25
+ return (tree, context) => {
26
+ const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
27
+ const projectDirectory = workspaceProject?.root || '.';
28
+ const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
29
+ const externalDependenciesInfo = (0, schematics_1.getExternalDependenciesInfo)({
30
+ devDependenciesToInstall,
31
+ dependenciesToInstall,
32
+ projectType: workspaceProject?.projectType,
33
+ o3rPackageJsonPath: packageJsonPath,
34
+ projectPackageJson
35
+ }, context.logger);
14
36
  return (0, schematics_1.setupDependencies)({
15
37
  projectName: options.projectName,
16
- dependencies: (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
38
+ dependencies: {
39
+ ...(0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion),
40
+ ...externalDependenciesInfo
41
+ }
17
42
  });
18
43
  };
19
44
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,gDAMyB;AAQzB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,eAAe;IACf,mCAAmC;IACnC,aAAa;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAa,EAAE,CAAC;AAE9C;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,kBAAkB;IAClB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAkB,EAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnH,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,IAAI,IAAI,GAAG,CAAC;QACvD,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAgB,CAAC;QAE3G,MAAM,wBAAwB,GAAG,IAAA,wCAA2B,EAAC;YAC3D,wBAAwB;YACxB,qBAAqB;YACrB,WAAW,EAAE,gBAAgB,EAAE,WAAW;YAC1C,kBAAkB,EAAE,eAAe;YACnC,kBAAkB;SACnB,EACD,OAAO,CAAC,MAAM,CACb,CAAC;QACF,OAAO,IAAA,8BAAiB,EAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY,E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