@o3r/components 13.0.0-prerelease.2 → 13.0.0-prerelease.4
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": "13.0.0-prerelease.
|
|
3
|
+
"version": "13.0.0-prerelease.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"@ngrx/effects": "^20.0.0",
|
|
45
45
|
"@ngrx/entity": "^20.0.0",
|
|
46
46
|
"@ngrx/store": "^20.0.0",
|
|
47
|
-
"@o3r/analytics": "^13.0.0-prerelease.
|
|
48
|
-
"@o3r/configuration": "^13.0.0-prerelease.
|
|
49
|
-
"@o3r/core": "^13.0.0-prerelease.
|
|
50
|
-
"@o3r/dynamic-content": "^13.0.0-prerelease.
|
|
51
|
-
"@o3r/extractors": "^13.0.0-prerelease.
|
|
52
|
-
"@o3r/localization": "^13.0.0-prerelease.
|
|
53
|
-
"@o3r/logger": "^13.0.0-prerelease.
|
|
54
|
-
"@o3r/rules-engine": "^13.0.0-prerelease.
|
|
55
|
-
"@o3r/schematics": "^13.0.0-prerelease.
|
|
47
|
+
"@o3r/analytics": "^13.0.0-prerelease.4",
|
|
48
|
+
"@o3r/configuration": "^13.0.0-prerelease.4",
|
|
49
|
+
"@o3r/core": "^13.0.0-prerelease.4",
|
|
50
|
+
"@o3r/dynamic-content": "^13.0.0-prerelease.4",
|
|
51
|
+
"@o3r/extractors": "^13.0.0-prerelease.4",
|
|
52
|
+
"@o3r/localization": "^13.0.0-prerelease.4",
|
|
53
|
+
"@o3r/logger": "^13.0.0-prerelease.4",
|
|
54
|
+
"@o3r/rules-engine": "^13.0.0-prerelease.4",
|
|
55
|
+
"@o3r/schematics": "^13.0.0-prerelease.4",
|
|
56
56
|
"@schematics/angular": "^20.0.0",
|
|
57
57
|
"@yarnpkg/cli": "^4.0.0",
|
|
58
58
|
"@yarnpkg/core": "^4.1.1",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
"dependencies": {
|
|
137
|
-
"@o3r/schematics": "^13.0.0-prerelease.
|
|
137
|
+
"@o3r/schematics": "^13.0.0-prerelease.4",
|
|
138
138
|
"tslib": "^2.6.2"
|
|
139
139
|
},
|
|
140
140
|
"engines": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAwDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -29,63 +29,34 @@ const dependenciesToInstall = [
|
|
|
29
29
|
const devDependenciesToInstall = [
|
|
30
30
|
'chokidar'
|
|
31
31
|
];
|
|
32
|
+
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
32
33
|
/**
|
|
33
34
|
* Add Otter components to an Angular Project
|
|
34
35
|
* @param options
|
|
35
36
|
*/
|
|
36
37
|
function ngAddFn(options) {
|
|
38
|
+
const o3rPackageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
|
|
37
39
|
/* ng add rules */
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
47
|
-
const dependencies = o3rPeerDeps.o3rPeerDeps.reduce((acc, dep) => {
|
|
48
|
-
acc[dep] = {
|
|
49
|
-
inManifest: [{
|
|
50
|
-
range: `${options.exactO3rVersion ? '' : '~'}${o3rPeerDeps.packageVersion}`,
|
|
51
|
-
types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
|
|
52
|
-
}],
|
|
53
|
-
ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
|
|
54
|
-
};
|
|
55
|
-
return acc;
|
|
56
|
-
}, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
|
|
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,
|
|
40
|
+
return (0, schematics_1.chain)([
|
|
41
|
+
(_, context) => {
|
|
42
|
+
context.logger.info(`The package @o3r/components comes with a debug mechanism`);
|
|
43
|
+
context.logger.info('Get more information on the following page: https://github.com/AmadeusITGroup/otter/tree/main/docs/components/INTRODUCTION.md#Runtime-debugging');
|
|
44
|
+
},
|
|
45
|
+
(0, schematics_2.removePackages)(['@otter/components']),
|
|
46
|
+
(0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, {
|
|
61
47
|
dependenciesToInstall,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
ngAddToRun: o3rPeerDeps.o3rPeerDeps
|
|
75
|
-
}),
|
|
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),
|
|
82
|
-
...(options.enableMetadataExtract ? [(0, cms_adapter_1.updateCmsAdapter)(options)] : []),
|
|
83
|
-
(0, devtools_registration_1.registerDevtools)(options)
|
|
84
|
-
]);
|
|
85
|
-
context.logger.info(`The package ${o3rPeerDeps.packageName} comes with a debug mechanism`);
|
|
86
|
-
context.logger.info('Get more information on the following page: https://github.com/AmadeusITGroup/otter/tree/main/docs/components/INTRODUCTION.md#Runtime-debugging');
|
|
87
|
-
return () => rule(tree, context);
|
|
88
|
-
};
|
|
48
|
+
devDependenciesToInstall,
|
|
49
|
+
additionalNgAddToRun: options.enableMetadataExtract ? ['@o3r/extractors'] : undefined
|
|
50
|
+
}),
|
|
51
|
+
(0, schematics_2.registerPackageCollectionSchematics)(o3rPackageJson),
|
|
52
|
+
(0, schematics_2.setupSchematicsParamsForProject)({
|
|
53
|
+
'@o3r/core:component': {},
|
|
54
|
+
'@o3r/core:component-container': {},
|
|
55
|
+
'@o3r/core:component-presenter': {}
|
|
56
|
+
}, options.projectName),
|
|
57
|
+
...(options.enableMetadataExtract ? [(0, cms_adapter_1.updateCmsAdapter)(options)] : []),
|
|
58
|
+
(0, devtools_registration_1.registerDevtools)(options)
|
|
59
|
+
]);
|
|
89
60
|
}
|
|
90
61
|
/**
|
|
91
62
|
* Add Otter components to an Angular Project
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { SchematicOptionObject } from '@o3r/schematics';
|
|
2
|
-
export interface NgAddSchematicsSchema extends SchematicOptionObject {
|
|
3
|
-
/** Project name */
|
|
4
|
-
projectName?: string | undefined;
|
|
1
|
+
import type { NgAddOptions, SchematicOptionObject } from '@o3r/schematics';
|
|
2
|
+
export interface NgAddSchematicsSchema extends NgAddOptions, SchematicOptionObject {
|
|
5
3
|
/** Activate metadata extraction */
|
|
6
4
|
enableMetadataExtract: boolean;
|
|
7
|
-
/** Use a pinned version for otter packages */
|
|
8
|
-
exactO3rVersion?: boolean;
|
|
9
5
|
}
|
|
10
6
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,YAAY,EAAE,qBAAqB;IAChF,mCAAmC;IACnC,qBAAqB,EAAE,OAAO,CAAC;CAChC"}
|