@nocobase/cli 2.1.0-alpha.31 → 2.1.0-alpha.33
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/README.md +14 -0
- package/README.zh-CN.md +14 -0
- package/bin/run.js +3 -0
- package/bin/session-env.js +27 -0
- package/dist/commands/app/down.js +47 -9
- package/dist/commands/app/logs.js +17 -0
- package/dist/commands/app/restart.js +23 -1
- package/dist/commands/app/start.js +17 -0
- package/dist/commands/app/stop.js +17 -0
- package/dist/commands/app/upgrade.js +22 -2
- package/dist/commands/db/check.js +6 -4
- package/dist/commands/db/ps.js +1 -1
- package/dist/commands/env/add.js +3 -2
- package/dist/commands/env/auth.js +1 -1
- package/dist/commands/env/current.js +21 -0
- package/dist/commands/env/info.js +4 -3
- package/dist/commands/env/list.js +8 -14
- package/dist/commands/env/remove.js +2 -2
- package/dist/commands/env/status.js +90 -0
- package/dist/commands/env/update.js +1 -1
- package/dist/commands/env/use.js +11 -1
- package/dist/commands/install.js +10 -4
- package/dist/commands/license/activate.js +20 -24
- package/dist/commands/license/id.js +17 -2
- package/dist/commands/license/plugins/clean.js +17 -2
- package/dist/commands/license/plugins/list.js +17 -2
- package/dist/commands/license/plugins/sync.js +22 -5
- package/dist/commands/license/shared.js +15 -6
- package/dist/commands/license/status.js +17 -2
- package/dist/commands/plugin/disable.js +25 -4
- package/dist/commands/plugin/enable.js +25 -4
- package/dist/commands/plugin/list.js +25 -4
- package/dist/commands/session/id.js +24 -0
- package/dist/commands/session/remove.js +57 -0
- package/dist/commands/session/setup.js +62 -0
- package/dist/commands/source/dev.js +19 -1
- package/dist/commands/source/download.js +10 -8
- package/dist/lib/app-managed-resources.js +5 -3
- package/dist/lib/app-runtime.js +1 -1
- package/dist/lib/auth-store.js +28 -11
- package/dist/lib/docker-image.js +37 -0
- package/dist/lib/env-guard.js +61 -0
- package/dist/lib/generated-command.js +16 -0
- package/dist/lib/resource-command.js +15 -0
- package/dist/lib/runtime-generator.js +1 -1
- package/dist/lib/session-id.js +17 -0
- package/dist/lib/session-integration.js +703 -0
- package/dist/lib/session-store.js +118 -0
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@ import { createHash } from 'node:crypto';
|
|
|
18
18
|
import { loadBuildConfig } from './build-config.js';
|
|
19
19
|
import { toKebabCase, toLogicalActionName, toLogicalResourceName, toResourceSegments } from './naming.js';
|
|
20
20
|
import { collectOperations } from './openapi.js';
|
|
21
|
-
const RESERVED_FLAG_NAMES = new Set(['api-base-url', 'base-url', 'env', 'token', 'json-output', 'body', 'body-file']);
|
|
21
|
+
const RESERVED_FLAG_NAMES = new Set(['api-base-url', 'base-url', 'env', 'token', 'json-output', 'body', 'body-file', 'yes']);
|
|
22
22
|
function matchesPattern(value, pattern) {
|
|
23
23
|
if (!value) {
|
|
24
24
|
return false;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export function resolveSessionIdentity() {
|
|
10
|
+
const sessionId = String(process.env.NB_SESSION_ID ?? '').trim();
|
|
11
|
+
if (sessionId) {
|
|
12
|
+
return {
|
|
13
|
+
id: sessionId,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|