@o3r/localization 9.3.0-alpha.65 → 9.3.0-alpha.66
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 +6 -6
- package/schematics/ng-add/helpers/devtools-registration.d.ts +11 -0
- package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -0
- package/schematics/ng-add/helpers/devtools-registration.js +25 -0
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/localization",
|
|
3
|
-
"version": "9.3.0-alpha.
|
|
3
|
+
"version": "9.3.0-alpha.66",
|
|
4
4
|
"description": "This module provides a runtime dynamic language/translation support and debug tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localization",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"@formatjs/intl-numberformat": "^8.0.2",
|
|
21
21
|
"@ngrx/store": "~16.2.0",
|
|
22
22
|
"@ngx-translate/core": "~15.0.0",
|
|
23
|
-
"@o3r/core": "^9.3.0-alpha.
|
|
24
|
-
"@o3r/dynamic-content": "^9.3.0-alpha.
|
|
25
|
-
"@o3r/extractors": "^9.3.0-alpha.
|
|
26
|
-
"@o3r/logger": "^9.3.0-alpha.
|
|
27
|
-
"@o3r/schematics": "^9.3.0-alpha.
|
|
23
|
+
"@o3r/core": "^9.3.0-alpha.66",
|
|
24
|
+
"@o3r/dynamic-content": "^9.3.0-alpha.66",
|
|
25
|
+
"@o3r/extractors": "^9.3.0-alpha.66",
|
|
26
|
+
"@o3r/logger": "^9.3.0-alpha.66",
|
|
27
|
+
"@o3r/schematics": "^9.3.0-alpha.66",
|
|
28
28
|
"@schematics/angular": "~16.2.0",
|
|
29
29
|
"chokidar": "^3.5.2",
|
|
30
30
|
"intl-messageformat": "~10.5.0",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import type { NgAddSchematicsSchema } from '../schema';
|
|
3
|
+
/**
|
|
4
|
+
* Register Devtools to the application
|
|
5
|
+
* @param tree
|
|
6
|
+
* @param context
|
|
7
|
+
* @param options
|
|
8
|
+
* @param options.projectName
|
|
9
|
+
*/
|
|
10
|
+
export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
|
|
11
|
+
//# sourceMappingURL=devtools-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAMvD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,YAAmB,qBAAqB,KAAG,QAAQ,IAAI,CAQnF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerDevtools = void 0;
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const DEVTOOL_MODULE_NAME = 'LocalizationDevtoolsModule';
|
|
6
|
+
const DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsService';
|
|
7
|
+
const PACKAGE_NAME = require(path.resolve(__dirname, '..', '..', '..', 'package.json')).name;
|
|
8
|
+
/**
|
|
9
|
+
* Register Devtools to the application
|
|
10
|
+
* @param tree
|
|
11
|
+
* @param context
|
|
12
|
+
* @param options
|
|
13
|
+
* @param options.projectName
|
|
14
|
+
*/
|
|
15
|
+
const registerDevtools = async (options) => {
|
|
16
|
+
const { registerDevtoolsToApplication } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
17
|
+
return registerDevtoolsToApplication({
|
|
18
|
+
moduleName: DEVTOOL_MODULE_NAME,
|
|
19
|
+
packageName: PACKAGE_NAME,
|
|
20
|
+
serviceName: DEVTOOL_SERVICE_NAME,
|
|
21
|
+
projectName: options.projectName
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.registerDevtools = registerDevtools;
|
|
25
|
+
//# sourceMappingURL=devtools-registration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGtD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAsD1D"}
|
|
@@ -6,6 +6,7 @@ const fs = require("node:fs");
|
|
|
6
6
|
const path = require("node:path");
|
|
7
7
|
const schematics_2 = require("@o3r/schematics");
|
|
8
8
|
const cms_adapter_1 = require("../cms-adapter");
|
|
9
|
+
const devtools_registration_1 = require("./helpers/devtools-registration");
|
|
9
10
|
/**
|
|
10
11
|
* Add Otter localization to an Angular Project
|
|
11
12
|
* @param options for the dependencies installations
|
|
@@ -25,6 +26,7 @@ function ngAdd(options) {
|
|
|
25
26
|
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
26
27
|
const workingDirectory = workspaceProject?.root || '.';
|
|
27
28
|
const dependencyType = getProjectNewDependenciesType(workspaceProject);
|
|
29
|
+
const registerDevtoolRule = await (0, devtools_registration_1.registerDevtools)(options);
|
|
28
30
|
return () => (0, schematics_1.chain)([
|
|
29
31
|
updateLocalization(options, __dirname),
|
|
30
32
|
updateI18n(options),
|
|
@@ -51,7 +53,8 @@ function ngAdd(options) {
|
|
|
51
53
|
'@o3r/core:component-presenter': {
|
|
52
54
|
useLocalization: undefined
|
|
53
55
|
}
|
|
54
|
-
})
|
|
56
|
+
}),
|
|
57
|
+
registerDevtoolRule
|
|
55
58
|
])(tree, context);
|
|
56
59
|
}
|
|
57
60
|
catch (e) {
|