@ohos-ports/nx 23.3.0-beta.2 → 23.3.0-beta.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/src/command-line/add/add.js +1 -1
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +1 -1
- package/dist/src/command-line/init/init-v2.js +1 -1
- package/dist/src/command-line/repair/repair.js +1 -1
- package/dist/src/command-line/report/report.js +1 -1
- package/dist/src/daemon/server/handle-configure-ai-agents.js +2 -2
- package/dist/src/daemon/server/nx-console-operations.js +2 -2
- package/dist/src/daemon/server/shutdown-utils.js +1 -1
- package/dist/src/utils/nx-package-group.js +1 -1
- package/dist/src/utils/package-json.js +1 -1
- package/dist/src/utils/versions.js +1 -1
- package/package.json +1 -1
|
@@ -133,7 +133,7 @@ function parsePackageSpecifier(packageSpecifier) {
|
|
|
133
133
|
const version = packageSpecifier.substring(i + 1);
|
|
134
134
|
return [pkgName, version];
|
|
135
135
|
}
|
|
136
|
-
exports.coreNxPluginVersions = require(require.resolve('nx/package.json'))['nx-migrations'].packageGroup.reduce((map, entry) => {
|
|
136
|
+
exports.coreNxPluginVersions = require(require.resolve('@ohos-ports/nx/package.json'))['nx-migrations'].packageGroup.reduce((map, entry) => {
|
|
137
137
|
const packageName = typeof entry === 'string' ? entry : entry.package;
|
|
138
138
|
const version = typeof entry === 'string' ? versions_1.nxVersion : entry.version;
|
|
139
139
|
return map.set(packageName, version);
|
|
@@ -47,7 +47,7 @@ async function configureAiAgentsHandler(args, inner = false) {
|
|
|
47
47
|
await (0, provenance_1.ensurePackageHasProvenance)('nx', 'latest');
|
|
48
48
|
const packageInstallResults = (0, package_json_1.installPackageToTmp)('nx', 'latest', (0, package_manager_1.detectPackageManager)(workspace_root_1.workspaceRoot));
|
|
49
49
|
cleanup = packageInstallResults.cleanup;
|
|
50
|
-
let modulePath = require.resolve('nx/src/command-line/configure-ai-agents/configure-ai-agents.js', { paths: [packageInstallResults.tempDir] });
|
|
50
|
+
let modulePath = require.resolve('@ohos-ports/nx/src/command-line/configure-ai-agents/configure-ai-agents.js', { paths: [packageInstallResults.tempDir] });
|
|
51
51
|
const module = await (0, handle_import_1.handleImport)(modulePath);
|
|
52
52
|
await module.configureAiAgentsHandler(args, true);
|
|
53
53
|
cleanup();
|
|
@@ -48,7 +48,7 @@ async function initHandler(options, inner = false) {
|
|
|
48
48
|
await (0, provenance_1.ensurePackageHasProvenance)('nx', 'latest');
|
|
49
49
|
const packageInstallResults = (0, package_json_1.installPackageToTmp)('nx', 'latest', (0, package_manager_1.detectPackageManager)(process.cwd()));
|
|
50
50
|
cleanup = packageInstallResults.cleanup;
|
|
51
|
-
let modulePath = require.resolve('nx/src/command-line/init/init-v2.js', {
|
|
51
|
+
let modulePath = require.resolve('@ohos-ports/nx/src/command-line/init/init-v2.js', {
|
|
52
52
|
paths: [packageInstallResults.tempDir],
|
|
53
53
|
});
|
|
54
54
|
const module = await (0, handle_import_1.handleImport)(modulePath);
|
|
@@ -6,7 +6,7 @@ const migrate_1 = require("../migrate/migrate");
|
|
|
6
6
|
const output_1 = require("../../utils/output");
|
|
7
7
|
async function repair(args, extraMigrations = []) {
|
|
8
8
|
return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
|
|
9
|
-
const migrationsJson = require(require.resolve('nx/migrations.json'));
|
|
9
|
+
const migrationsJson = require(require.resolve('@ohos-ports/nx/migrations.json'));
|
|
10
10
|
const nxMigrations = Object.entries(migrationsJson.generators).reduce((agg, [name, migration]) => {
|
|
11
11
|
const skip = migration['x-repair-skip'];
|
|
12
12
|
if (!skip) {
|
|
@@ -31,7 +31,7 @@ const cache_1 = require("../../tasks-runner/cache");
|
|
|
31
31
|
const cache_directory_1 = require("../../utils/cache-directory");
|
|
32
32
|
const client_1 = require("../../daemon/client/client");
|
|
33
33
|
const nx_package_group_1 = require("../../utils/nx-package-group");
|
|
34
|
-
const nxPackageJson = (0, fileutils_1.readJsonFile)(require.resolve('nx/package.json'));
|
|
34
|
+
const nxPackageJson = (0, fileutils_1.readJsonFile)(require.resolve('@ohos-ports/nx/package.json'));
|
|
35
35
|
exports.packagesWeCareAbout = [
|
|
36
36
|
'lerna',
|
|
37
37
|
...(0, nx_package_group_1.readNxPackageGroup)(),
|
|
@@ -71,11 +71,11 @@ async function computeAgentStatuses() {
|
|
|
71
71
|
let modulePath;
|
|
72
72
|
if (process.env.NX_USE_LOCAL === 'true') {
|
|
73
73
|
log('Using local implementation (NX_USE_LOCAL=true)');
|
|
74
|
-
modulePath = require.resolve('nx/src/ai/utils.js');
|
|
74
|
+
modulePath = require.resolve('@ohos-ports/nx/src/ai/utils.js');
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
77
|
const tmpPath = await (0, latest_nx_1.getLatestNxTmpPath)();
|
|
78
|
-
modulePath = require.resolve('nx/src/ai/utils.js', {
|
|
78
|
+
modulePath = require.resolve('@ohos-ports/nx/src/ai/utils.js', {
|
|
79
79
|
paths: [tmpPath],
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -26,7 +26,7 @@ async function getNxConsoleStatus({ inner, } = {}) {
|
|
|
26
26
|
}
|
|
27
27
|
try {
|
|
28
28
|
const tmpPath = await (0, latest_nx_1.getLatestNxTmpPath)();
|
|
29
|
-
const modulePath = require.resolve('nx/src/daemon/server/nx-console-operations.js', { paths: [tmpPath] });
|
|
29
|
+
const modulePath = require.resolve('@ohos-ports/nx/src/daemon/server/nx-console-operations.js', { paths: [tmpPath] });
|
|
30
30
|
const module = await (0, handle_import_1.handleImport)(modulePath);
|
|
31
31
|
const result = await module.getNxConsoleStatus({ inner: true });
|
|
32
32
|
log('Console status check completed, shouldPrompt:', result);
|
|
@@ -53,7 +53,7 @@ async function handleNxConsolePreferenceAndInstall({ preference, inner, }) {
|
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
55
|
const tmpPath = await (0, latest_nx_1.getLatestNxTmpPath)();
|
|
56
|
-
const modulePath = require.resolve('nx/src/daemon/server/nx-console-operations.js', { paths: [tmpPath] });
|
|
56
|
+
const modulePath = require.resolve('@ohos-ports/nx/src/daemon/server/nx-console-operations.js', { paths: [tmpPath] });
|
|
57
57
|
const module = await (0, handle_import_1.handleImport)(modulePath);
|
|
58
58
|
const result = await module.handleNxConsolePreferenceAndInstall({
|
|
59
59
|
preference,
|
|
@@ -35,7 +35,7 @@ async function startNewDaemonInBackground() {
|
|
|
35
35
|
// Resolve from workspace root to pick up the correct symlink target
|
|
36
36
|
let startScriptPath;
|
|
37
37
|
try {
|
|
38
|
-
startScriptPath = require.resolve('nx/src/daemon/server/start.js', {
|
|
38
|
+
startScriptPath = require.resolve('@ohos-ports/nx/src/daemon/server/start.js', {
|
|
39
39
|
paths: [workspace_root_1.workspaceRoot],
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -10,6 +10,6 @@ const fileutils_1 = require("./fileutils");
|
|
|
10
10
|
* the package group — no hand-maintained list.
|
|
11
11
|
*/
|
|
12
12
|
function readNxPackageGroup() {
|
|
13
|
-
const nxPkg = (0, fileutils_1.readJsonFile)(require.resolve('nx/package.json'));
|
|
13
|
+
const nxPkg = (0, fileutils_1.readJsonFile)(require.resolve('@ohos-ports/nx/package.json'));
|
|
14
14
|
return (nxPkg['nx-migrations']?.packageGroup ?? []).map((e) => typeof e === 'string' ? e : e.package);
|
|
15
15
|
}
|
|
@@ -231,7 +231,7 @@ function readModulePackageJson(moduleSpecifier, requirePaths = (0, installation_
|
|
|
231
231
|
* path instead of the workspace path.
|
|
232
232
|
*
|
|
233
233
|
* 2. Package self-reference. When a file inside package `nx` calls
|
|
234
|
-
* `require.resolve('nx/...')`, Node returns that calling package's
|
|
234
|
+
* `require.resolve('@ohos-ports/nx/...')`, Node returns that calling package's
|
|
235
235
|
* own file regardless of `paths`. We avoid that by issuing the
|
|
236
236
|
* resolve from a `createRequire` rooted at a synthetic path that is
|
|
237
237
|
* outside any package, so the resolver has no "self" to reference
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/nx",
|
|
3
|
-
"version": "23.3.0-beta.
|
|
3
|
+
"version": "23.3.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|