@o3r/logger 12.3.0-prerelease.47 → 12.3.0-prerelease.49

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.3.0-prerelease.47",
3
+ "version": "12.3.0-prerelease.49",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,8 +16,8 @@
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.3.0-prerelease.47",
20
- "@o3r/schematics": "^12.3.0-prerelease.47",
19
+ "@o3r/core": "^12.3.0-prerelease.49",
20
+ "@o3r/schematics": "^12.3.0-prerelease.49",
21
21
  "@schematics/angular": "^19.0.0",
22
22
  "logrocket": "^9.0.0",
23
23
  "logrocket-ngrx": "^0.2.1",
@@ -52,6 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
+ "@o3r/schematics": "^12.3.0-prerelease.49",
55
56
  "tslib": "^2.6.2"
56
57
  },
57
58
  "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;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA0BlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,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;AAMpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAkBlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -2,24 +2,18 @@
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
6
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
6
- const reportMissingSchematicsDep = (logger) => (reason) => {
7
- logger.error(`[ERROR]: Adding @o3r/logger has failed.
8
- If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the logger package. Please run 'ng add @o3r/core' .
9
- Otherwise, use the error message as guidance.`);
10
- throw reason;
11
- };
12
7
  /**
13
8
  * Add Otter logger to an Angular Project
14
9
  * @param options
15
10
  */
16
11
  function ngAddFn(options) {
17
12
  /* ng add rules */
18
- return async (tree) => {
19
- const { getPackageInstallConfig, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
20
- return setupDependencies({
13
+ return (tree) => {
14
+ return (0, schematics_1.setupDependencies)({
21
15
  projectName: options.projectName,
22
- dependencies: getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
16
+ dependencies: (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
23
17
  });
24
18
  };
25
19
  }
@@ -27,9 +21,6 @@ function ngAddFn(options) {
27
21
  * Add Otter logger to an Angular Project
28
22
  * @param options
29
23
  */
30
- const ngAdd = (options) => async (_, { logger }) => {
31
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
32
- return createOtterSchematic(ngAddFn)(options);
33
- };
24
+ const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
34
25
  exports.ngAdd = ngAdd;
35
26
  //# sourceMappingURL=index.js.map