@nocobase/cli 2.1.0-beta.45 → 2.1.0-beta.46

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.
@@ -6,12 +6,10 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import { fileURLToPath } from 'node:url';
10
9
  import { Command, Flags } from '@oclif/core';
11
10
  import { getCurrentEnvName } from '../../lib/auth-store.js';
12
11
  import { ensureCrossEnvConfirmed, hasExplicitEnvSelection } from '../../lib/env-guard.js';
13
12
  import { formatMissingManagedAppEnvMessage, managedAppLifecycleEnvVars, resolveManagedAppRuntime, runLocalNocoBaseCommand, } from '../../lib/app-runtime.js';
14
- import { resolveProjectCwd, runNocoBaseCommand } from '../../lib/run-npm.js';
15
13
  import { announceTargetEnv, failTask, isInteractiveTerminal, printInfo, startTask, succeedTask } from '../../lib/ui.js';
16
14
  import { builtinDbContainerName, removeDockerContainerIfExists } from './shared.js';
17
15
  function formatStopFailure(envName, message) {
@@ -28,8 +26,9 @@ function formatStopCrossEnvConfirmationRequiredMessage(currentEnv, requestedEnv)
28
26
  'Re-run the command with `--yes` to confirm this one-off cross-env stop, or switch the current env first.',
29
27
  ].join('\n');
30
28
  }
31
- function isMissingManagedLocalProjectError(message) {
32
- return (message.includes('The specified --cwd does not exist:') ||
29
+ function shouldIgnoreLocalStopError(message) {
30
+ return (message.includes('spawn nocobase-v1 ENOENT') ||
31
+ message.includes('The specified --cwd does not exist:') ||
33
32
  message.includes('The specified --cwd is not a directory:') ||
34
33
  message.includes("Couldn't find a NocoBase source project from --cwd:"));
35
34
  }
@@ -44,16 +43,10 @@ async function stopLocalRuntimeWithFallback(runtime, options) {
44
43
  }
45
44
  catch (error) {
46
45
  const message = error instanceof Error ? error.message : String(error);
47
- if (!isMissingManagedLocalProjectError(message)) {
46
+ if (!shouldIgnoreLocalStopError(message)) {
48
47
  throw error;
49
48
  }
50
49
  }
51
- const cliProjectCwd = resolveProjectCwd(fileURLToPath(new URL('.', import.meta.url)));
52
- await runNocoBaseCommand(['pm2', 'kill'], {
53
- cwd: cliProjectCwd,
54
- env,
55
- stdio: options.stdio,
56
- });
57
50
  }
58
51
  export default class AppStop extends Command {
59
52
  static hidden = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "2.1.0-beta.45",
3
+ "version": "2.1.0-beta.46",
4
4
  "description": "NocoBase Command Line Tool",
5
5
  "type": "module",
6
6
  "main": "dist/generated/command-registry.js",
@@ -138,5 +138,5 @@
138
138
  "type": "git",
139
139
  "url": "git+https://github.com/nocobase/nocobase.git"
140
140
  },
141
- "gitHead": "42587115fc34c3eb01ef2b2549f1c998e5708318"
141
+ "gitHead": "91fd3ab238a5ff58735bbfca04a8cb05d233b0af"
142
142
  }