@o3r/third-party 12.2.4 → 12.2.7
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/third-party",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@angular-devkit/schematics": "^19.0.0",
|
|
20
|
-
"@o3r/core": "^12.2.
|
|
21
|
-
"@o3r/schematics": "^12.2.
|
|
20
|
+
"@o3r/core": "^12.2.7",
|
|
21
|
+
"@o3r/schematics": "^12.2.7",
|
|
22
22
|
"@schematics/angular": "^19.0.0",
|
|
23
23
|
"rxjs": "^7.8.1",
|
|
24
|
+
"type-fest": "^4.30.1",
|
|
24
25
|
"typescript": "^5.5.4"
|
|
25
26
|
},
|
|
26
27
|
"peerDependenciesMeta": {
|
|
@@ -36,6 +37,9 @@
|
|
|
36
37
|
"@schematics/angular": {
|
|
37
38
|
"optional": true
|
|
38
39
|
},
|
|
40
|
+
"type-fest": {
|
|
41
|
+
"optional": true
|
|
42
|
+
},
|
|
39
43
|
"typescript": {
|
|
40
44
|
"optional": true
|
|
41
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAwDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,CAAC"}
|
|
@@ -10,20 +10,43 @@ If the error is related to missing @o3r dependencies you need to install '@o3r/c
|
|
|
10
10
|
Otherwise, use the error message as guidance.`);
|
|
11
11
|
throw reason;
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* List of external dependencies to be added to the project as peer dependencies
|
|
15
|
+
*/
|
|
16
|
+
const dependenciesToInstall = [
|
|
17
|
+
'rxjs'
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* List of external dependencies to be added to the project as dev dependencies
|
|
21
|
+
*/
|
|
22
|
+
const devDependenciesToInstall = [];
|
|
13
23
|
/**
|
|
14
24
|
* Add Otter third-party to an Angular Project
|
|
15
25
|
* @param options
|
|
16
26
|
*/
|
|
17
27
|
function ngAddFn(options) {
|
|
18
|
-
return async (tree) => {
|
|
28
|
+
return async (tree, context) => {
|
|
29
|
+
const { getExternalDependenciesInfo, getPackageInstallConfig, getWorkspaceConfig, registerPackageCollectionSchematics, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
19
30
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
31
|
+
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
20
32
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
|
|
21
|
-
const
|
|
33
|
+
const projectDirectory = workspaceProject?.root || '.';
|
|
34
|
+
const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
|
|
35
|
+
const externalDependenciesInfo = getExternalDependenciesInfo({
|
|
36
|
+
devDependenciesToInstall,
|
|
37
|
+
dependenciesToInstall,
|
|
38
|
+
projectType: workspaceProject?.projectType,
|
|
39
|
+
projectPackageJson,
|
|
40
|
+
o3rPackageJsonPath: packageJsonPath
|
|
41
|
+
}, context.logger);
|
|
22
42
|
return (0, schematics_1.chain)([
|
|
23
43
|
registerPackageCollectionSchematics(packageJson),
|
|
24
44
|
setupDependencies({
|
|
25
45
|
projectName: options.projectName,
|
|
26
|
-
dependencies:
|
|
46
|
+
dependencies: {
|
|
47
|
+
...getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion),
|
|
48
|
+
...externalDependenciesInfo
|
|
49
|
+
}
|
|
27
50
|
})
|
|
28
51
|
]);
|
|
29
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAC9B,kCAAkC;AAClC,2DAGoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAC9B,kCAAkC;AAClC,2DAGoC;AAQpC,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;;8CAE+B,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAa,EAC1C,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,iBAAiB,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QAC7K,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5E,MAAM,gBAAgB,GAAG,OAAO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