@o3r/analytics 12.4.0-rc.3 → 12.4.0
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/analytics",
|
|
3
|
-
"version": "12.4.0
|
|
3
|
+
"version": "12.4.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ama-sdk/core": "^12.4.0
|
|
14
|
+
"@ama-sdk/core": "^12.4.0",
|
|
15
15
|
"@angular-devkit/schematics": "^19.0.0",
|
|
16
16
|
"@angular/common": "^19.0.0",
|
|
17
17
|
"@angular/core": "^19.0.0",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"@angular/platform-browser-dynamic": "^19.0.0",
|
|
20
20
|
"@angular/router": "^19.0.0",
|
|
21
21
|
"@ngrx/store": "^19.0.0",
|
|
22
|
-
"@o3r/core": "^12.4.0
|
|
23
|
-
"@o3r/schematics": "^12.4.0
|
|
22
|
+
"@o3r/core": "^12.4.0",
|
|
23
|
+
"@o3r/schematics": "^12.4.0",
|
|
24
24
|
"@schematics/angular": "^19.0.0",
|
|
25
25
|
"jasmine": "^5.0.0",
|
|
26
26
|
"rxjs": "^7.8.1",
|
|
27
27
|
"ts-node": "~10.9.2",
|
|
28
|
+
"type-fest": "^4.30.1",
|
|
28
29
|
"typescript": "^5.5.4",
|
|
29
30
|
"webpack": "^5.96.0"
|
|
30
31
|
},
|
|
@@ -41,6 +42,9 @@
|
|
|
41
42
|
"jasmine": {
|
|
42
43
|
"optional": true
|
|
43
44
|
},
|
|
45
|
+
"type-fest": {
|
|
46
|
+
"optional": true
|
|
47
|
+
},
|
|
44
48
|
"typescript": {
|
|
45
49
|
"optional": true
|
|
46
50
|
},
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
"dependencies": {
|
|
52
|
-
"@o3r/schematics": "^12.4.0
|
|
56
|
+
"@o3r/schematics": "^12.4.0",
|
|
53
57
|
"tslib": "^2.6.2"
|
|
54
58
|
},
|
|
55
59
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAWpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAqDlB,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -4,16 +4,45 @@ exports.ngAdd = void 0;
|
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
const schematics_1 = require("@o3r/schematics");
|
|
6
6
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
7
|
+
/**
|
|
8
|
+
* List of external dependencies to be added to the project as peer dependencies
|
|
9
|
+
*/
|
|
10
|
+
const dependenciesToInstall = [
|
|
11
|
+
'@angular/common',
|
|
12
|
+
'@angular/core',
|
|
13
|
+
'@angular/router',
|
|
14
|
+
'@angular/platform-browser',
|
|
15
|
+
'@angular/platform-browser-dynamic',
|
|
16
|
+
'@ngrx/store',
|
|
17
|
+
'rxjs'
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* List of external dependencies to be added to the project as dev dependencies
|
|
21
|
+
*/
|
|
22
|
+
const devDependenciesToInstall = [];
|
|
7
23
|
/**
|
|
8
24
|
* Add Otter analytics to an Angular Project
|
|
9
25
|
* @param options
|
|
10
26
|
*/
|
|
11
27
|
function ngAddFn(options) {
|
|
12
28
|
/* ng add rules */
|
|
13
|
-
return (tree) => {
|
|
29
|
+
return (tree, context) => {
|
|
30
|
+
const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
31
|
+
const projectDirectory = workspaceProject?.root || '.';
|
|
32
|
+
const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
|
|
33
|
+
const externalDependenciesInfo = (0, schematics_1.getExternalDependenciesInfo)({
|
|
34
|
+
devDependenciesToInstall,
|
|
35
|
+
dependenciesToInstall,
|
|
36
|
+
projectPackageJson,
|
|
37
|
+
o3rPackageJsonPath: packageJsonPath,
|
|
38
|
+
projectType: workspaceProject?.projectType
|
|
39
|
+
}, context.logger);
|
|
14
40
|
return (0, schematics_1.setupDependencies)({
|
|
15
41
|
projectName: options.projectName,
|
|
16
|
-
dependencies:
|
|
42
|
+
dependencies: {
|
|
43
|
+
...(0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion),
|
|
44
|
+
...externalDependenciesInfo
|
|
45
|
+
}
|
|
17
46
|
});
|
|
18
47
|
};
|
|
19
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,gDAMyB;AAQzB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,2BAA2B;IAC3B,mCAAmC;IACnC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