@o3r/apis-manager 12.3.0-prerelease.48 → 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/apis-manager",
3
- "version": "12.3.0-prerelease.48",
3
+ "version": "12.3.0-prerelease.49",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,12 +11,12 @@
11
11
  "otter-module"
12
12
  ],
13
13
  "peerDependencies": {
14
- "@ama-sdk/client-fetch": "^12.3.0-prerelease.48",
15
- "@ama-sdk/core": "^12.3.0-prerelease.48",
14
+ "@ama-sdk/client-fetch": "^12.3.0-prerelease.49",
15
+ "@ama-sdk/core": "^12.3.0-prerelease.49",
16
16
  "@angular-devkit/schematics": "^19.0.0",
17
17
  "@angular/common": "^19.0.0",
18
18
  "@angular/core": "^19.0.0",
19
- "@o3r/schematics": "^12.3.0-prerelease.48",
19
+ "@o3r/schematics": "^12.3.0-prerelease.49",
20
20
  "@schematics/angular": "^19.0.0",
21
21
  "rxjs": "^7.8.1",
22
22
  "ts-node": "~10.9.2",
@@ -37,6 +37,7 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
+ "@o3r/schematics": "^12.3.0-prerelease.49",
40
41
  "tslib": "^2.6.2"
41
42
  },
42
43
  "schematics": "./collection.json",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAqDlB;;;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,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA6ClB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -3,24 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
5
  const schematics_1 = require("@angular-devkit/schematics");
6
- const reportMissingSchematicsDep = (logger) => (reason) => {
7
- logger.error(`[ERROR]: Adding @o3r/apis-manager has failed.
8
- You need to install '@o3r/schematics' to be able to use the o3r apis-manager package. Please run 'ng add @o3r/schematics'.`);
9
- throw reason;
10
- };
6
+ const schematics_2 = require("@o3r/schematics");
11
7
  /**
12
8
  * Add Otter apis manager to an Angular Project
13
9
  * @param options
14
10
  */
15
11
  function ngAddFn(options) {
16
12
  return async (tree) => {
17
- const { getPackageInstallConfig } = await Promise.resolve().then(() => require('@o3r/schematics'));
18
- const { setupDependencies, getO3rPeerDeps, applyEsLintFix, getWorkspaceConfig, getProjectNewDependenciesTypes } = await Promise.resolve().then(() => require('@o3r/schematics'));
19
13
  const { updateApiDependencies } = await Promise.resolve().then(() => require('../helpers/update-api-deps'));
20
14
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
21
- const depsInfo = getO3rPeerDeps(packageJsonPath);
15
+ const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
22
16
  const rulesToExecute = [];
23
- const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
17
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
24
18
  const projectType = workspaceProject?.projectType || 'application';
25
19
  if (projectType === 'application') {
26
20
  rulesToExecute.push(updateApiDependencies(options));
@@ -32,16 +26,16 @@ function ngAddFn(options) {
32
26
  acc[dep] = {
33
27
  inManifest: [{
34
28
  range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
35
- types: getProjectNewDependenciesTypes(workspaceProject)
29
+ types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
36
30
  }],
37
31
  ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
38
32
  };
39
33
  return acc;
40
- }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
34
+ }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
41
35
  return () => (0, schematics_1.chain)([
42
36
  ...rulesToExecute,
43
- options.skipLinter ? schematics_1.noop : applyEsLintFix(),
44
- setupDependencies({
37
+ options.skipLinter ? schematics_1.noop : (0, schematics_2.applyEsLintFix)(),
38
+ (0, schematics_2.setupDependencies)({
45
39
  projectName: options.projectName,
46
40
  dependencies,
47
41
  ngAddToRun: depsInfo.o3rPeerDeps
@@ -53,9 +47,6 @@ function ngAddFn(options) {
53
47
  * Add Otter apis manager to an Angular Project
54
48
  * @param options
55
49
  */
56
- const ngAdd = (options) => async (_, { logger }) => {
57
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
58
- return createOtterSchematic(ngAddFn)(options);
59
- };
50
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
60
51
  exports.ngAdd = ngAdd;
61
52
  //# sourceMappingURL=index.js.map