@o3r/application 12.3.0-prerelease.7 → 12.3.0-prerelease.70

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.
@@ -49,10 +49,10 @@ class OtterApplicationDevtools {
49
49
  isProduction: isProductionEnvironment(this.document?.body.dataset)
50
50
  };
51
51
  }
52
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterApplicationDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
53
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterApplicationDevtools, providedIn: 'root' }); }
52
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: OtterApplicationDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
53
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: OtterApplicationDevtools, providedIn: 'root' }); }
54
54
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterApplicationDevtools, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: OtterApplicationDevtools, decorators: [{
56
56
  type: Injectable,
57
57
  args: [{ providedIn: 'root' }]
58
58
  }] });
@@ -79,10 +79,10 @@ class ApplicationDevtoolsConsoleService {
79
79
  displayApplicationInfo() {
80
80
  console.info('Application info', this.applicationDevtools.getApplicationInformation());
81
81
  }
82
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsConsoleService, deps: [{ token: OtterApplicationDevtools }, { token: OTTER_APPLICATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
83
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsConsoleService, providedIn: 'root' }); }
82
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsConsoleService, deps: [{ token: OtterApplicationDevtools }, { token: OTTER_APPLICATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
83
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsConsoleService, providedIn: 'root' }); }
84
84
  }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsConsoleService, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsConsoleService, decorators: [{
86
86
  type: Injectable,
87
87
  args: [{
88
88
  providedIn: 'root'
@@ -203,10 +203,10 @@ class ApplicationDevtoolsMessageService {
203
203
  prepareVisualTesting(this.options.e2eIgnoreClass);
204
204
  this.sendApplicationInformation();
205
205
  }
206
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsMessageService, deps: [{ token: i1.LoggerService }, { token: OtterApplicationDevtools }, { token: OTTER_APPLICATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
207
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsMessageService, providedIn: 'root' }); }
206
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsMessageService, deps: [{ token: i1.LoggerService }, { token: OtterApplicationDevtools }, { token: OTTER_APPLICATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
207
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsMessageService, providedIn: 'root' }); }
208
208
  }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsMessageService, decorators: [{
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsMessageService, decorators: [{
210
210
  type: Injectable,
211
211
  args: [{
212
212
  providedIn: 'root'
@@ -234,16 +234,16 @@ class ApplicationDevtoolsModule {
234
234
  ]
235
235
  };
236
236
  }
237
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
238
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsModule }); }
239
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsModule, providers: [
237
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
238
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsModule }); }
239
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsModule, providers: [
240
240
  { provide: OTTER_APPLICATION_DEVTOOLS_OPTIONS, useValue: OTTER_APPLICATION_DEVTOOLS_DEFAULT_OPTIONS },
241
241
  ApplicationDevtoolsMessageService,
242
242
  ApplicationDevtoolsConsoleService,
243
243
  OtterApplicationDevtools
244
244
  ] }); }
245
245
  }
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ApplicationDevtoolsModule, decorators: [{
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ApplicationDevtoolsModule, decorators: [{
247
247
  type: NgModule,
248
248
  args: [{
249
249
  providers: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/application",
3
- "version": "12.3.0-prerelease.7",
3
+ "version": "12.3.0-prerelease.70",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,11 +26,11 @@
26
26
  "@angular-devkit/schematics": "^19.0.0",
27
27
  "@angular/common": "^19.0.0",
28
28
  "@angular/core": "^19.0.0",
29
- "@o3r/core": "^12.3.0-prerelease.7",
30
- "@o3r/logger": "^12.3.0-prerelease.7",
31
- "@o3r/routing": "^12.3.0-prerelease.7",
32
- "@o3r/schematics": "^12.3.0-prerelease.7",
33
- "@o3r/testing": "^12.3.0-prerelease.7",
29
+ "@o3r/core": "^12.3.0-prerelease.70",
30
+ "@o3r/logger": "^12.3.0-prerelease.70",
31
+ "@o3r/routing": "^12.3.0-prerelease.70",
32
+ "@o3r/schematics": "^12.3.0-prerelease.70",
33
+ "@o3r/testing": "^12.3.0-prerelease.70",
34
34
  "@schematics/angular": "^19.0.0",
35
35
  "rxjs": "^7.8.1",
36
36
  "ts-node": "~10.9.2",
@@ -48,6 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
+ "@o3r/schematics": "^12.3.0-prerelease.70",
51
52
  "tslib": "^2.6.2"
52
53
  },
53
54
  "engines": {
@@ -1,8 +1,7 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
1
  import type { NgAddSchematicsSchema } from '../schema';
3
2
  /**
4
3
  * Register Devtools to the application
5
4
  * @param options
6
5
  */
7
- export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
6
+ export declare const registerDevtools: (options: NgAddSchematicsSchema) => import("@angular-devkit/schematics").Rule;
8
7
  //# sourceMappingURL=devtools-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAOnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAgBnF,CAAC"}
1
+ {"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAOnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,qBAAqB,8CAe9D,CAAC"}
@@ -4,6 +4,7 @@ exports.registerDevtools = void 0;
4
4
  const node_fs_1 = require("node:fs");
5
5
  const path = require("node:path");
6
6
  const schematics_1 = require("@angular-devkit/schematics");
7
+ const schematics_2 = require("@o3r/schematics");
7
8
  const DEVTOOL_MODULE_NAME = 'ApplicationDevtoolsModule';
8
9
  const CONSOLE_DEVTOOL_SERVICE_NAME = 'ApplicationDevtoolsConsoleService';
9
10
  const MESSAGE_DEVTOOL_SERVICE_NAME = 'ApplicationDevtoolsMessageService';
@@ -12,16 +13,15 @@ const PACKAGE_NAME = JSON.parse((0, node_fs_1.readFileSync)(path.resolve(__dirna
12
13
  * Register Devtools to the application
13
14
  * @param options
14
15
  */
15
- const registerDevtools = async (options) => {
16
- const { registerDevtoolsToApplication } = await Promise.resolve().then(() => require('@o3r/schematics'));
16
+ const registerDevtools = (options) => {
17
17
  return (0, schematics_1.chain)([
18
- registerDevtoolsToApplication({
18
+ (0, schematics_2.registerDevtoolsToApplication)({
19
19
  moduleName: DEVTOOL_MODULE_NAME,
20
20
  packageName: PACKAGE_NAME,
21
21
  serviceName: CONSOLE_DEVTOOL_SERVICE_NAME,
22
22
  projectName: options.projectName
23
23
  }),
24
- registerDevtoolsToApplication({
24
+ (0, schematics_2.registerDevtoolsToApplication)({
25
25
  moduleName: DEVTOOL_MODULE_NAME,
26
26
  packageName: PACKAGE_NAME,
27
27
  serviceName: MESSAGE_DEVTOOL_SERVICE_NAME,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA6GlB;;;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,EAGL,MAAM,4BAA4B,CAAC;AAoBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA6FlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -3,14 +3,9 @@ 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 schematics_2 = require("@o3r/schematics");
6
7
  const utility_1 = require("@schematics/angular/utility");
7
8
  const devtools_registration_1 = require("./helpers/devtools-registration");
8
- const reportMissingSchematicsDep = (logger) => (reason) => {
9
- logger.error(`[ERROR]: Adding @o3r/application has failed.
10
- If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the o3r application package. Please run 'ng add @o3r/core' .
11
- Otherwise, use the error message as guidance.`);
12
- throw reason;
13
- };
14
9
  /**
15
10
  * Add Otter application to an Angular Project
16
11
  * @param options The options to pass to ng-add execution
@@ -18,15 +13,14 @@ Otherwise, use the error message as guidance.`);
18
13
  function ngAddFn(options) {
19
14
  /* ng add rules */
20
15
  return async (tree, context) => {
21
- const { getAppModuleFilePath, getWorkspaceConfig, insertImportToModuleFile, setupDependencies, getO3rPeerDeps, getProjectNewDependenciesTypes, getPackageInstallConfig } = await Promise.resolve().then(() => require('@o3r/schematics'));
22
16
  const { isImported } = await Promise.resolve().then(() => require('@schematics/angular/utility/ast-utils')).catch(() => ({ isImported: undefined }));
23
17
  const ts = await Promise.resolve().then(() => require('typescript')).catch(() => undefined);
24
18
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
25
- const depsInfo = getO3rPeerDeps(packageJsonPath);
26
- const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
19
+ const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
20
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
27
21
  const addAngularAnimationPreferences = () => {
28
22
  const additionalRules = [];
29
- const moduleFilePath = getAppModuleFilePath(tree, context, options.projectName);
23
+ const moduleFilePath = (0, schematics_2.getAppModuleFilePath)(tree, context, options.projectName);
30
24
  if (!moduleFilePath || !options.projectName) {
31
25
  return tree;
32
26
  }
@@ -46,7 +40,7 @@ function ngAddFn(options) {
46
40
  }
47
41
  const importInRootModule = (name, file, moduleFunction) => additionalRules.push((0, utility_1.addRootImport)(options.projectName, ({ code, external }) => code `\n${external(name, file)}${moduleFunction}`));
48
42
  const recorder = tree.beginUpdate(moduleFilePath);
49
- insertImportToModuleFile('prefersReducedMotion', '@o3r/application', sourceFile, recorder, moduleFilePath);
43
+ (0, schematics_2.insertImportToModuleFile)('prefersReducedMotion', '@o3r/application', sourceFile, recorder, moduleFilePath);
50
44
  importInRootModule('BrowserAnimationsModule', '@angular/platform-browser/animations', '.withConfig({disableAnimations: prefersReducedMotion()})');
51
45
  tree.commitUpdate(recorder);
52
46
  return (0, schematics_1.chain)(additionalRules)(tree, context);
@@ -55,15 +49,15 @@ function ngAddFn(options) {
55
49
  acc[dep] = {
56
50
  inManifest: [{
57
51
  range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
58
- types: getProjectNewDependenciesTypes(workspaceProject)
52
+ types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
59
53
  }],
60
54
  ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
61
55
  };
62
56
  return acc;
63
- }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
64
- const registerDevtoolRule = await (0, devtools_registration_1.registerDevtools)(options);
57
+ }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
58
+ const registerDevtoolRule = (0, devtools_registration_1.registerDevtools)(options);
65
59
  return () => (0, schematics_1.chain)([
66
- setupDependencies({
60
+ (0, schematics_2.setupDependencies)({
67
61
  projectName: options.projectName,
68
62
  dependencies,
69
63
  ngAddToRun: depsInfo.o3rPeerDeps
@@ -77,9 +71,6 @@ function ngAddFn(options) {
77
71
  * Add Otter application to an Angular Project
78
72
  * @param options The options to pass to ng-add execution
79
73
  */
80
- const ngAdd = (options) => async (_, { logger }) => {
81
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
82
- return createOtterSchematic(ngAddFn)(options);
83
- };
74
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
84
75
  exports.ngAdd = ngAdd;
85
76
  //# sourceMappingURL=index.js.map