@mouryaamit/nx-polystack 1.11.2 → 1.11.3
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/dist/migrations.json +5 -0
- package/dist/src/generators/preset/files/root/nx.json__template__ +1 -0
- package/dist/src/migrations/nx-analytics-off/nx-analytics-off.d.ts +7 -0
- package/dist/src/migrations/nx-analytics-off/nx-analytics-off.js +33 -0
- package/dist/src/migrations/nx-analytics-off/nx-analytics-off.js.map +1 -0
- package/package.json +1 -1
package/dist/migrations.json
CHANGED
|
@@ -102,6 +102,11 @@
|
|
|
102
102
|
"version": "1.10.4",
|
|
103
103
|
"description": "Fix the lint-staged ESLint script so commits with staged TypeScript files find ESLint 8 and later again (it resolved bin/eslint.js, which ESLint no longer exports)",
|
|
104
104
|
"implementation": "./src/migrations/lint-staged-eslint-resolve/lint-staged-eslint-resolve"
|
|
105
|
+
},
|
|
106
|
+
"nx-analytics-off": {
|
|
107
|
+
"version": "1.11.3",
|
|
108
|
+
"description": "Set nx.json \"analytics\": false when the workspace has not answered Nx's usage-data prompt, so Nx 22 no longer stops to ask",
|
|
109
|
+
"implementation": "./src/migrations/nx-analytics-off/nx-analytics-off"
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
/**
|
|
3
|
+
* v1.11.3: Nx 22 asks on the first command whether to share usage data, and records the answer
|
|
4
|
+
* as nx.json `analytics`. Sets it to false in workspaces that have not answered, so the prompt
|
|
5
|
+
* does not stop local runs or scripts. An answer already in nx.json is kept.
|
|
6
|
+
*/
|
|
7
|
+
export default function nxAnalyticsOff(tree: Tree): Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const json_layout_1 = require("../../lib/utils/json-layout");
|
|
5
|
+
/**
|
|
6
|
+
* v1.11.3: Nx 22 asks on the first command whether to share usage data, and records the answer
|
|
7
|
+
* as nx.json `analytics`. Sets it to false in workspaces that have not answered, so the prompt
|
|
8
|
+
* does not stop local runs or scripts. An answer already in nx.json is kept.
|
|
9
|
+
*/
|
|
10
|
+
async function nxAnalyticsOff(tree) {
|
|
11
|
+
if (!tree.exists('nx.json'))
|
|
12
|
+
return;
|
|
13
|
+
const before = tree.read('nx.json', 'utf8') ?? '';
|
|
14
|
+
let json;
|
|
15
|
+
try {
|
|
16
|
+
json = JSON.parse(before);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
devkit_1.logger.warn('nx-analytics-off: nx.json is not plain JSON; add "analytics": false by hand.');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (typeof json !== 'object' || json === null || Array.isArray(json))
|
|
23
|
+
return;
|
|
24
|
+
if (json['analytics'] !== undefined)
|
|
25
|
+
return;
|
|
26
|
+
json['analytics'] = false;
|
|
27
|
+
const after = JSON.stringify(json, null, 2);
|
|
28
|
+
const jsonc = (0, json_layout_1.loadJsonc)(tree.root);
|
|
29
|
+
tree.write('nx.json', (jsonc && (0, json_layout_1.keepJsonLayout)(jsonc, before, after)) || `${after}\n`);
|
|
30
|
+
devkit_1.logger.info('nx-analytics-off: nx.json "analytics": false (Nx no longer asks to share usage data).');
|
|
31
|
+
}
|
|
32
|
+
exports.default = nxAnalyticsOff;
|
|
33
|
+
//# sourceMappingURL=nx-analytics-off.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nx-analytics-off.js","sourceRoot":"","sources":["../../../../src/migrations/nx-analytics-off/nx-analytics-off.ts"],"names":[],"mappings":";;AAAA,uCAA0C;AAE1C,6DAAwE;AAExE;;;;GAIG;AACY,KAAK,UAAU,cAAc,CAAC,IAAU;IACrD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAAE,OAAO;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAClD,IAAI,IAA6B,CAAC;IAClC,IAAI;QACF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAA4B,CAAC;KACtD;IAAC,MAAM;QACN,eAAM,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;QAC5F,OAAO;KACR;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO;IAC7E,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,SAAS;QAAE,OAAO;IAC5C,IAAI,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,IAAA,uBAAS,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI,IAAA,4BAAc,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC;IACvF,eAAM,CAAC,IAAI,CACT,uFAAuF,CACxF,CAAC;AACJ,CAAC;AAnBD,iCAmBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mouryaamit/nx-polystack",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Nx plugin and pstack CLI that scaffold and build multi-tech monorepos (Angular, Ionic, Flutter) with a hardened release pipeline.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|