@o3r/components 12.3.7 → 12.3.8
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/components",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -45,16 +45,15 @@
|
|
|
45
45
|
"@ngrx/effects": "^19.0.0",
|
|
46
46
|
"@ngrx/entity": "^19.0.0",
|
|
47
47
|
"@ngrx/store": "^19.0.0",
|
|
48
|
-
"@o3r/analytics": "^12.3.
|
|
49
|
-
"@o3r/configuration": "^12.3.
|
|
50
|
-
"@o3r/core": "^12.3.
|
|
51
|
-
"@o3r/dynamic-content": "^12.3.
|
|
52
|
-
"@o3r/extractors": "^12.3.
|
|
53
|
-
"@o3r/localization": "^12.3.
|
|
54
|
-
"@o3r/logger": "^12.3.
|
|
55
|
-
"@o3r/rules-engine": "^12.3.
|
|
56
|
-
"@o3r/schematics": "^12.3.
|
|
57
|
-
"@o3r/testing": "^12.3.7",
|
|
48
|
+
"@o3r/analytics": "^12.3.8",
|
|
49
|
+
"@o3r/configuration": "^12.3.8",
|
|
50
|
+
"@o3r/core": "^12.3.8",
|
|
51
|
+
"@o3r/dynamic-content": "^12.3.8",
|
|
52
|
+
"@o3r/extractors": "^12.3.8",
|
|
53
|
+
"@o3r/localization": "^12.3.8",
|
|
54
|
+
"@o3r/logger": "^12.3.8",
|
|
55
|
+
"@o3r/rules-engine": "^12.3.8",
|
|
56
|
+
"@o3r/schematics": "^12.3.8",
|
|
58
57
|
"@schematics/angular": "^19.0.0",
|
|
59
58
|
"@yarnpkg/cli": "^4.0.0",
|
|
60
59
|
"@yarnpkg/core": "^4.1.1",
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
"rxjs": "^7.8.1",
|
|
68
67
|
"semver": "^7.5.2",
|
|
69
68
|
"ts-node": "~10.9.2",
|
|
69
|
+
"type-fest": "^4.30.1",
|
|
70
70
|
"typescript": "^5.5.4"
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {
|
|
@@ -130,12 +130,15 @@
|
|
|
130
130
|
"semver": {
|
|
131
131
|
"optional": true
|
|
132
132
|
},
|
|
133
|
+
"type-fest": {
|
|
134
|
+
"optional": true
|
|
135
|
+
},
|
|
133
136
|
"typescript": {
|
|
134
137
|
"optional": true
|
|
135
138
|
}
|
|
136
139
|
},
|
|
137
140
|
"dependencies": {
|
|
138
|
-
"@o3r/schematics": "^12.3.
|
|
141
|
+
"@o3r/schematics": "^12.3.8",
|
|
139
142
|
"tslib": "^2.6.2"
|
|
140
143
|
},
|
|
141
144
|
"generatorDependencies": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAuBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA0FlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -8,55 +8,81 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
8
8
|
const schematics_2 = require("@o3r/schematics");
|
|
9
9
|
const cms_adapter_1 = require("../cms-adapter");
|
|
10
10
|
const devtools_registration_1 = require("./helpers/devtools-registration");
|
|
11
|
+
/**
|
|
12
|
+
* List of external dependencies to be added to the project as peer dependencies
|
|
13
|
+
*/
|
|
14
|
+
const dependenciesToInstall = [
|
|
15
|
+
'@angular/cdk',
|
|
16
|
+
'@angular/common',
|
|
17
|
+
'@angular/core',
|
|
18
|
+
'@angular/forms',
|
|
19
|
+
'@angular/platform-browser',
|
|
20
|
+
'@angular/platform-browser-dynamic',
|
|
21
|
+
'@ngrx/effects',
|
|
22
|
+
'@ngrx/entity',
|
|
23
|
+
'@ngrx/store',
|
|
24
|
+
'rxjs'
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* List of external dependencies to be added to the project as dev dependencies
|
|
28
|
+
*/
|
|
29
|
+
const devDependenciesToInstall = [
|
|
30
|
+
'chokidar'
|
|
31
|
+
];
|
|
11
32
|
/**
|
|
12
33
|
* Add Otter components to an Angular Project
|
|
13
34
|
* @param options
|
|
14
35
|
*/
|
|
15
36
|
function ngAddFn(options) {
|
|
16
37
|
/* ng add rules */
|
|
17
|
-
return
|
|
18
|
-
const { NodeDependencyType } = await Promise.resolve().then(() => tslib_1.__importStar(require('@schematics/angular/utility/dependencies'))).catch(() => ({ NodeDependencyType: { Dev: 'devDependencies' } }));
|
|
38
|
+
return (tree, context) => {
|
|
19
39
|
options = { ...(0, schematics_2.getDefaultOptionsForSchematic)((0, schematics_2.getWorkspaceConfig)(tree), '@o3r/components', 'ng-add', options), ...options };
|
|
20
40
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
21
|
-
const
|
|
22
|
-
const
|
|
41
|
+
const o3rPackageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
|
|
42
|
+
const o3rPeerDeps = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
|
|
23
43
|
if (options.enableMetadataExtract) {
|
|
24
|
-
|
|
44
|
+
o3rPeerDeps.o3rPeerDeps = [...o3rPeerDeps.o3rPeerDeps, '@o3r/extractors'];
|
|
25
45
|
}
|
|
26
46
|
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
27
|
-
const dependencies =
|
|
47
|
+
const dependencies = o3rPeerDeps.o3rPeerDeps.reduce((acc, dep) => {
|
|
28
48
|
acc[dep] = {
|
|
29
49
|
inManifest: [{
|
|
30
|
-
range: `${options.exactO3rVersion ? '' : '~'}${
|
|
50
|
+
range: `${options.exactO3rVersion ? '' : '~'}${o3rPeerDeps.packageVersion}`,
|
|
31
51
|
types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
|
|
32
52
|
}],
|
|
33
53
|
ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
|
|
34
54
|
};
|
|
35
55
|
return acc;
|
|
36
56
|
}, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
const projectDirectory = workspaceProject?.root || '.';
|
|
58
|
+
const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
|
|
59
|
+
const externalDependenciesInfo = (0, schematics_2.getExternalDependenciesInfo)({
|
|
60
|
+
devDependenciesToInstall,
|
|
61
|
+
dependenciesToInstall,
|
|
62
|
+
projectPackageJson,
|
|
63
|
+
o3rPackageJsonPath: packageJsonPath,
|
|
64
|
+
projectType: workspaceProject?.projectType
|
|
65
|
+
}, context.logger);
|
|
45
66
|
const rule = (0, schematics_1.chain)([
|
|
46
67
|
(0, schematics_2.removePackages)(['@otter/components']),
|
|
47
68
|
(0, schematics_2.setupDependencies)({
|
|
48
69
|
projectName: options.projectName,
|
|
49
70
|
dependencies: {
|
|
50
71
|
...dependencies,
|
|
51
|
-
...
|
|
72
|
+
...externalDependenciesInfo
|
|
52
73
|
},
|
|
53
|
-
ngAddToRun:
|
|
74
|
+
ngAddToRun: o3rPeerDeps.o3rPeerDeps
|
|
54
75
|
}),
|
|
55
|
-
(0, schematics_2.registerPackageCollectionSchematics)(
|
|
76
|
+
(0, schematics_2.registerPackageCollectionSchematics)(o3rPackageJson),
|
|
77
|
+
(0, schematics_2.setupSchematicsParamsForProject)({
|
|
78
|
+
'@o3r/core:component': {},
|
|
79
|
+
'@o3r/core:component-container': {},
|
|
80
|
+
'@o3r/core:component-presenter': {}
|
|
81
|
+
}, options.projectName),
|
|
56
82
|
...(options.enableMetadataExtract ? [(0, cms_adapter_1.updateCmsAdapter)(options)] : []),
|
|
57
83
|
(0, devtools_registration_1.registerDevtools)(options)
|
|
58
84
|
]);
|
|
59
|
-
context.logger.info(`The package ${
|
|
85
|
+
context.logger.info(`The package ${o3rPeerDeps.packageName} comes with a debug mechanism`);
|
|
60
86
|
context.logger.info('Get more information on the following page: https://github.com/AmadeusITGroup/otter/tree/main/docs/components/INTRODUCTION.md#Runtime-debugging');
|
|
61
87
|
return () => rule(tree, context);
|
|
62
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAC9B,wDAAkC;AAClC,2DAKoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAC9B,wDAAkC;AAClC,2DAKoC;AACpC,gDAYyB;AAIzB,gDAEwB;AACxB,2EAEyC;AAKzC;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,2BAA2B;IAC3B,mCAAmC;IACnC,eAAe;IACf,cAAc;IACd,aAAa;IACb,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAG;IAC/B,UAAU;CACX,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,kBAAkB;IAClB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,OAAO,GAAG,EAAE,GAAG,IAAA,0CAA6B,EAAC,IAAA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