@o3r/schematics 10.1.0-prerelease.9 → 10.1.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/environment.js.map +1 -0
- package/package.json +6 -6
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/src/rule-factories/ng-add/dependencies.d.ts +17 -2
- package/src/rule-factories/ng-add/dependencies.d.ts.map +1 -1
- package/src/rule-factories/ng-add/dependencies.js +25 -7
- package/src/rule-factories/ng-add/dependencies.js.map +1 -1
- package/src/utility/wrapper.d.ts.map +1 -1
- package/src/utility/wrapper.js +51 -37
- package/src/utility/wrapper.js.map +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../cli/environment.ts"],"names":[],"mappings":";;AAAA,gDAAmE;AAEnE,OAAO,CAAC,IAAI,CAAC,4BAA4B,IAAA,mCAA2B,GAAE,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "10.1.0-
|
3
|
+
"version": "10.1.0-rc.1",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@angular-devkit/core": "~17.2.0",
|
31
31
|
"@angular-devkit/schematics": "~17.2.0",
|
32
32
|
"@angular/cli": "~17.2.0",
|
33
|
-
"@o3r/telemetry": "^10.1.0-
|
33
|
+
"@o3r/telemetry": "^10.1.0-rc.1",
|
34
34
|
"@schematics/angular": "~17.2.0",
|
35
35
|
"eslint": "^8.42.0",
|
36
36
|
"rxjs": "^7.8.1",
|
@@ -72,16 +72,16 @@
|
|
72
72
|
"@angular/core": "~17.2.0",
|
73
73
|
"@angular/platform-browser": "~17.2.0",
|
74
74
|
"@angular/platform-browser-dynamic": "~17.2.0",
|
75
|
-
"@babel/core": "~7.
|
75
|
+
"@babel/core": "~7.24.0",
|
76
76
|
"@babel/preset-typescript": "~7.23.0",
|
77
77
|
"@compodoc/compodoc": "^1.1.19",
|
78
78
|
"@nx/eslint": "~18.0.2",
|
79
79
|
"@nx/eslint-plugin": "~18.0.2",
|
80
80
|
"@nx/jest": "~18.0.2",
|
81
81
|
"@nx/js": "~18.0.2",
|
82
|
-
"@o3r/build-helpers": "^10.1.0-
|
83
|
-
"@o3r/eslint-plugin": "^10.1.0-
|
84
|
-
"@o3r/telemetry": "^10.1.0-
|
82
|
+
"@o3r/build-helpers": "^10.1.0-rc.1",
|
83
|
+
"@o3r/eslint-plugin": "^10.1.0-rc.1",
|
84
|
+
"@o3r/telemetry": "^10.1.0-rc.1",
|
85
85
|
"@schematics/angular": "~17.2.0",
|
86
86
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
87
87
|
"@types/inquirer": "~8.2.10",
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AACA,gDAA+G;AAC/G,2EAA8E;AAC9E,kCAAkC;AAClC,gDAAwE;AAGxE;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,MAAM,sBAAsB,GAAG,CAAC,2BAA2B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IACpJ,OAAO,GAAG,EAAE,CAAC,KAAK,IAAmB,EAAE;QACrC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAE5E,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,IAAA,gDAAmC,EAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7I,GAAG,CAAC,GAAG,CAAC,GAAG;gBACT,UAAU,EAAE,CAAC;wBACX,KAAK;wBACL,KAAK,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;qBAChC,CAAC;aACH,CAAC;YACF,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAqC,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,IAAA,gDAAmC,EAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC;aACzF,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG;gBAClB,UAAU,EAAE,CAAC;wBACX,KAAK;wBACL,KAAK,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;qBAChC,CAAC;aACH,CAAC;QACJ,CAAC,CAAC,CAAC;QACL,OAAO,IAAA,8BAAiB,EAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY;YACZ,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACU,QAAA,KAAK,GAAG,IAAA,kDAAqC,EAAC,OAAO,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Rule, type TaskId, Tree } from '@angular-devkit/schematics';
|
1
|
+
import { Rule, type SchematicContext, type TaskId, Tree } from '@angular-devkit/schematics';
|
2
2
|
import { NodeDependencyType } from '@schematics/angular/utility/dependencies';
|
3
3
|
import { SupportedPackageManagers } from '../../utility';
|
4
4
|
/**
|
@@ -59,7 +59,21 @@ export interface SetupDependenciesOptions {
|
|
59
59
|
runAfterTasks?: TaskId[];
|
60
60
|
/** Callback to run after the task ID is calculated */
|
61
61
|
scheduleTaskCallback?: (taskIds?: TaskId[]) => void;
|
62
|
+
/** Working directory for the installation process only */
|
63
|
+
workingDirectory?: string;
|
62
64
|
}
|
65
|
+
/** Result of the Setup Dependencies task scheduling process */
|
66
|
+
export interface SetupDependenciesResult {
|
67
|
+
/** List of the task ID resulting of the install process */
|
68
|
+
taskIds: TaskId[];
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Determine if the context has information regarding the setup dependencies process
|
72
|
+
* @param context Schematic context
|
73
|
+
*/
|
74
|
+
export declare const hasSetupInformation: (context: SchematicContext) => context is SchematicContext & {
|
75
|
+
setupDependencies: SetupDependenciesResult;
|
76
|
+
};
|
63
77
|
/**
|
64
78
|
* Retrieve the package install configuration
|
65
79
|
* This is a workaround to ng-add to add the dependency to the sub-package
|
@@ -67,8 +81,9 @@ export interface SetupDependenciesOptions {
|
|
67
81
|
* @param tree Tree to read the file
|
68
82
|
* @param projectName Name of the project
|
69
83
|
* @param devDependencyOnly If true, the dependency will be added as devDependency
|
84
|
+
* @param exactO3rVersion Use a pinned version of the o3r package
|
70
85
|
*/
|
71
|
-
export declare const getPackageInstallConfig: (packageJsonPath: string, tree: Tree, projectName?: string, devDependencyOnly?: boolean) => Record<string, DependencyToAdd>;
|
86
|
+
export declare const getPackageInstallConfig: (packageJsonPath: string, tree: Tree, projectName?: string, devDependencyOnly?: boolean, exactO3rVersion?: boolean) => Record<string, DependencyToAdd>;
|
72
87
|
/**
|
73
88
|
* Setup dependency to a repository.
|
74
89
|
* Will run manually the ngAdd schematics according to the parameters and install the packages if required
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAAa,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAAa,KAAK,gBAAgB,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM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BAAoB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,uBAAuB;IACtC,2DAA2D;IAC3D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB;uBAAmF,uBAAuB;CAEzI,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,oBAAqB,MAAM,QAAQ,IAAI,gBAAgB,MAAM,sBAAsB,OAAO,oBAAoB,OAAO,KAAG,OAAO,MAAM,EAAE,eAAe,CAiBzL,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAa,wBAAwB,KAAG,IAoIrE,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupDependencies = exports.getPackageInstallConfig = void 0;
|
3
|
+
exports.setupDependencies = exports.getPackageInstallConfig = exports.hasSetupInformation = void 0;
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
5
5
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
6
6
|
const path = require("node:path");
|
@@ -8,6 +8,14 @@ const semver = require("semver");
|
|
8
8
|
const utility_1 = require("../../utility");
|
9
9
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
10
10
|
const node_fs_1 = require("node:fs");
|
11
|
+
/**
|
12
|
+
* Determine if the context has information regarding the setup dependencies process
|
13
|
+
* @param context Schematic context
|
14
|
+
*/
|
15
|
+
const hasSetupInformation = (context) => {
|
16
|
+
return !!context.setupDependencies;
|
17
|
+
};
|
18
|
+
exports.hasSetupInformation = hasSetupInformation;
|
11
19
|
/**
|
12
20
|
* Retrieve the package install configuration
|
13
21
|
* This is a workaround to ng-add to add the dependency to the sub-package
|
@@ -15,8 +23,9 @@ const node_fs_1 = require("node:fs");
|
|
15
23
|
* @param tree Tree to read the file
|
16
24
|
* @param projectName Name of the project
|
17
25
|
* @param devDependencyOnly If true, the dependency will be added as devDependency
|
26
|
+
* @param exactO3rVersion Use a pinned version of the o3r package
|
18
27
|
*/
|
19
|
-
const getPackageInstallConfig = (packageJsonPath, tree, projectName, devDependencyOnly) => {
|
28
|
+
const getPackageInstallConfig = (packageJsonPath, tree, projectName, devDependencyOnly, exactO3rVersion) => {
|
20
29
|
if (!projectName) {
|
21
30
|
return {};
|
22
31
|
}
|
@@ -25,10 +34,11 @@ const getPackageInstallConfig = (packageJsonPath, tree, projectName, devDependen
|
|
25
34
|
return {
|
26
35
|
[packageJson.name]: {
|
27
36
|
inManifest: [{
|
28
|
-
range:
|
37
|
+
range: `${exactO3rVersion ? '' : '~'}${packageJson.version}`,
|
29
38
|
types: devDependencyOnly ? [dependencies_1.NodeDependencyType.Dev] : (0, utility_1.getProjectNewDependenciesTypes)(workspaceProject)
|
30
39
|
}],
|
31
|
-
requireInstall: true
|
40
|
+
requireInstall: true,
|
41
|
+
ngAddOptions: { exactO3rVersion: exactO3rVersion }
|
32
42
|
}
|
33
43
|
};
|
34
44
|
};
|
@@ -116,7 +126,9 @@ const setupDependencies = (options) => {
|
|
116
126
|
};
|
117
127
|
const runNgAddSchematics = (_, context) => {
|
118
128
|
const packageManager = options.packageManager || (0, utility_1.getPackageManager)();
|
119
|
-
const installId = isInstallNeeded() ? [
|
129
|
+
const installId = isInstallNeeded() ? [
|
130
|
+
context.addTask(new tasks_1.NodePackageInstallTask({ packageManager, quiet: true, workingDirectory: options.workingDirectory }), options.runAfterTasks)
|
131
|
+
] : undefined;
|
120
132
|
if (installId !== undefined) {
|
121
133
|
context.logger.debug(`Schedule the installation of the workspace (${ngAddToRun.size > 0 ? 'for: ' + [...ngAddToRun].join(', ') : options.skipInstall ? 'skipped' : 'forced'})`);
|
122
134
|
}
|
@@ -125,7 +137,7 @@ const setupDependencies = (options) => {
|
|
125
137
|
return Object.fromEntries(Object.entries({ projectName: options.projectName, ...options.ngAddOptions, ...options.dependencies[packageName].ngAddOptions })
|
126
138
|
.filter(([key]) => !schemaOptions || !!schemaOptions[key]));
|
127
139
|
};
|
128
|
-
const
|
140
|
+
const finalTaskIds = [...ngAddToRun]
|
129
141
|
.map((packageName) => {
|
130
142
|
let schematic;
|
131
143
|
try {
|
@@ -142,8 +154,14 @@ const setupDependencies = (options) => {
|
|
142
154
|
context.logger.debug(`Schedule the schematic ng-add for ${packageName}`);
|
143
155
|
return [...ids, context.addTask(new tasks_1.RunSchematicTask(packageName, 'ng-add', schematicOptions), ids)];
|
144
156
|
}, [...(installId || []), ...(options.runAfterTasks || [])]);
|
157
|
+
if ((0, exports.hasSetupInformation)(context)) {
|
158
|
+
context.setupDependencies.taskIds.push(...finalTaskIds);
|
159
|
+
}
|
160
|
+
else {
|
161
|
+
context.setupDependencies = { taskIds: finalTaskIds };
|
162
|
+
}
|
145
163
|
if (options.scheduleTaskCallback) {
|
146
|
-
options.scheduleTaskCallback(
|
164
|
+
options.scheduleTaskCallback(finalTaskIds);
|
147
165
|
}
|
148
166
|
};
|
149
167
|
return (0, schematics_1.chain)([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/dependencies.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/dependencies.ts"],"names":[],"mappings":";;;AAAA,2DAA8G;AAC9G,2EAA8E;AAC9E,kCAAkC;AAElC,iCAAiC;AACjC,2CAAgI;AAChI,4DAA4F;AAC5F,qCAAuC;AA4EvC;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,OAAyB,EAAgF,EAAE;IAC7I,OAAO,CAAC,CAAE,OAAe,CAAC,iBAAiB,CAAC;AAC9C,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE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E,SAAS,CAAC,CAAC;gBAC5D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;YAC3C,CAAC,CAAC;iBACD,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,EAAE;gBACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,WAAW,EAAE,CAAC,CAAC;gBACzE,OAAO,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,wBAAgB,CAAC,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;YACvG,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAE/D,IAAI,IAAA,2BAAmB,EAAC,OAAO,CAAC,EAAE,CAAC;gBACjC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;YAC1D,CAAC;iBAAM,CAAC;gBACL,OAAe,CAAC,iBAAiB,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;YACjE,CAAC;YAED,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;gBACjC,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC;QAEF,OAAO,IAAA,kBAAK,EAAC;YACX,eAAe;YACf,kBAAkB;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;AAEJ,CAAC,CAAC;AApIW,QAAA,iBAAiB,qBAoI5B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA0CvD;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE,gBA4CnD,CAAC"}
|
package/src/utility/wrapper.js
CHANGED
@@ -1,13 +1,41 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.createSchematicWithMetricsIfInstalled = void 0;
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
4
5
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
5
6
|
const inquirer_1 = require("inquirer");
|
6
7
|
const node_fs_1 = require("node:fs");
|
7
8
|
const path = require("node:path");
|
8
|
-
const
|
9
|
-
const index_1 = require("../tasks/index");
|
9
|
+
const rule_factories_1 = require("../rule-factories");
|
10
10
|
const noopSchematicWrapper = (fn) => fn;
|
11
|
+
const PACKAGE_JSON_PATH = 'package.json';
|
12
|
+
const setupO3rMetricsInPackageJson = (activated) => (tree) => {
|
13
|
+
if (tree.exists(PACKAGE_JSON_PATH)) {
|
14
|
+
const packageJson = tree.readJson(PACKAGE_JSON_PATH);
|
15
|
+
packageJson.config ||= {};
|
16
|
+
packageJson.config.o3rMetrics = activated;
|
17
|
+
tree.overwrite(PACKAGE_JSON_PATH, JSON.stringify(packageJson, null, 2));
|
18
|
+
}
|
19
|
+
};
|
20
|
+
const setupTelemetry = ({ workingDirectory, runNgAdd, exactO3rVersion }) => (_, context) => {
|
21
|
+
const taskIdsFromContext = (0, rule_factories_1.hasSetupInformation)(context) ? context.setupDependencies.taskIds : undefined;
|
22
|
+
const version = JSON.parse((0, node_fs_1.readFileSync)(path.join(__dirname, '..', '..', 'package.json'), 'utf-8')).version;
|
23
|
+
return (0, rule_factories_1.setupDependencies)({
|
24
|
+
dependencies: {
|
25
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
26
|
+
'@o3r/telemetry': {
|
27
|
+
inManifest: [{
|
28
|
+
range: `${exactO3rVersion ? '' : '~'}${version}`,
|
29
|
+
types: [dependencies_1.NodeDependencyType.Dev]
|
30
|
+
}],
|
31
|
+
ngAddOptions: { exactO3rVersion }
|
32
|
+
}
|
33
|
+
},
|
34
|
+
ngAddToRun: runNgAdd ? ['@o3r/telemetry'] : [],
|
35
|
+
runAfterTasks: taskIdsFromContext,
|
36
|
+
workingDirectory
|
37
|
+
});
|
38
|
+
};
|
11
39
|
/**
|
12
40
|
* Wrapper method of a schematic to retrieve some metrics around the schematic run
|
13
41
|
* if @o3r/telemetry is installed
|
@@ -15,22 +43,20 @@ const noopSchematicWrapper = (fn) => fn;
|
|
15
43
|
*/
|
16
44
|
const createSchematicWithMetricsIfInstalled = (schematicFn) => (opts) => async (tree, context) => {
|
17
45
|
let wrapper = noopSchematicWrapper;
|
18
|
-
|
19
|
-
const packageJson = tree.exists(
|
46
|
+
let shouldInstallTelemetry;
|
47
|
+
const packageJson = tree.exists(PACKAGE_JSON_PATH) ? tree.readJson(PACKAGE_JSON_PATH) : {};
|
20
48
|
try {
|
21
49
|
const { createSchematicWithMetrics } = await Promise.resolve().then(() => require('@o3r/telemetry'));
|
22
|
-
|
23
|
-
wrapper = createSchematicWithMetrics;
|
24
|
-
}
|
50
|
+
wrapper = createSchematicWithMetrics;
|
25
51
|
}
|
26
52
|
catch (e) {
|
27
53
|
// Do not throw if `@o3r/telemetry is not installed
|
28
|
-
if (
|
29
|
-
context.logger.warn('`config.o3rMetrics` is set to true in your package.json, please install the telemetry package with `ng add @o3r/telemetry` to enable the collection of metrics.');
|
30
|
-
}
|
31
|
-
else if ((process.env.NX_CLI_SET !== 'true' || process.env.NX_INTERACTIVE === 'true')
|
54
|
+
if ((process.env.NX_CLI_SET !== 'true' || process.env.NX_INTERACTIVE === 'true')
|
32
55
|
&& context.interactive
|
33
|
-
&& packageJson.config?.o3rMetrics
|
56
|
+
&& typeof packageJson.config?.o3rMetrics === 'undefined'
|
57
|
+
&& process.env.O3R_METRICS !== 'false'
|
58
|
+
&& opts.o3rMetrics !== false
|
59
|
+
&& (!process.env.CI || process.env.CI === 'false')) {
|
34
60
|
context.logger.debug('`@o3r/telemetry` is not available.\nAsking to add the dependency\n' + e.toString());
|
35
61
|
const question = {
|
36
62
|
type: 'confirm',
|
@@ -39,35 +65,23 @@ const createSchematicWithMetricsIfInstalled = (schematicFn) => (opts) => async (
|
|
39
65
|
Would you like to share anonymous data about the usage of Otter builders and schematics with the Otter Team at Amadeus ?
|
40
66
|
It will help us to improve our tools.
|
41
67
|
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/README.md.
|
42
|
-
|
68
|
+
`,
|
69
|
+
default: false
|
43
70
|
};
|
44
71
|
const { isReplyPositive } = await (0, inquirer_1.prompt)([question]);
|
45
|
-
|
46
|
-
const version = JSON.parse((0, node_fs_1.readFileSync)(path.join(__dirname, '..', '..', 'package.json'), 'utf-8')).version;
|
47
|
-
context.addTask(new index_1.NodePackageNgAddTask('@o3r/telemetry', {
|
48
|
-
dependencyType: dependencies_1.NodeDependencyType.Dev,
|
49
|
-
version
|
50
|
-
}));
|
51
|
-
await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
|
52
|
-
try {
|
53
|
-
const { createSchematicWithMetrics } = await Promise.resolve().then(() => require('@o3r/telemetry'));
|
54
|
-
wrapper = createSchematicWithMetrics;
|
55
|
-
}
|
56
|
-
catch {
|
57
|
-
// If pnp context package installed in the same process will not be available
|
58
|
-
}
|
59
|
-
}
|
60
|
-
else {
|
61
|
-
context.logger.info('You can activate it at any time by running `ng add @o3r/telemetry`.');
|
62
|
-
packageJson.config ||= {};
|
63
|
-
packageJson.config.o3rMetrics = false;
|
64
|
-
if (tree.exists(packageJsonPath)) {
|
65
|
-
tree.overwrite(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
66
|
-
}
|
67
|
-
}
|
72
|
+
shouldInstallTelemetry = isReplyPositive;
|
68
73
|
}
|
69
74
|
}
|
70
|
-
|
75
|
+
const subtreeDirectory = context.schematic.description.name === 'typescript-shell' ? opts.directory.split(path.posix.sep).join(path.sep) ?? '' : '';
|
76
|
+
const rule = (0, schematics_1.chain)([
|
77
|
+
typeof shouldInstallTelemetry !== 'undefined' ? (0, schematics_1.applyToSubtree)(subtreeDirectory, [setupO3rMetricsInPackageJson(!!shouldInstallTelemetry)]) : (0, schematics_1.noop)(),
|
78
|
+
schematicFn(opts),
|
79
|
+
shouldInstallTelemetry ? (0, schematics_1.applyToSubtree)(subtreeDirectory, [
|
80
|
+
setupTelemetry({ workingDirectory: subtreeDirectory || undefined, runNgAdd: !subtreeDirectory, exactO3rVersion: opts.exactO3rVersion })
|
81
|
+
]) : (0, schematics_1.noop)(),
|
82
|
+
typeof shouldInstallTelemetry !== 'undefined' && subtreeDirectory ? (0, schematics_1.applyToSubtree)(subtreeDirectory, [setupO3rMetricsInPackageJson(shouldInstallTelemetry)]) : (0, schematics_1.noop)()
|
83
|
+
]);
|
84
|
+
return wrapper(() => rule)(opts);
|
71
85
|
};
|
72
86
|
exports.createSchematicWithMetricsIfInstalled = createSchematicWithMetricsIfInstalled;
|
73
87
|
//# sourceMappingURL=wrapper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":";;;AACA,2DAAoF;AAEpF,2EAA8E;AAC9E,uCAA4C;AAC5C,qCAAuC;AACvC,kCAAkC;AAClC,sDAA2E;AAE3E,MAAM,oBAAoB,GAAqB,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;AAE1D,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,MAAM,4BAA4B,GAAiC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;IACzF,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAA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