tirtc-devtools-cli 0.0.9 → 0.0.11
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 +17 -11
- package/USAGE.md +72 -33
- package/bin/tirtc-devtools-cli.js +1 -1
- package/dist/cli/src/bootstrap_flows.d.ts +46 -0
- package/dist/cli/src/bootstrap_flows.js +249 -0
- package/dist/{devtools/cli → cli}/src/config.d.ts +4 -15
- package/dist/{devtools/cli → cli}/src/config.js +7 -31
- package/dist/cli/src/default_paths.d.ts +3 -0
- package/dist/cli/src/default_paths.js +23 -0
- package/dist/{devtools/cli → cli}/src/embedded_paths.d.ts +1 -0
- package/dist/{devtools/cli → cli}/src/embedded_paths.js +18 -1
- package/dist/{devtools/cli → cli}/src/facade.d.ts +41 -235
- package/dist/{devtools/cli → cli}/src/facade.js +8 -27
- package/dist/cli/src/guide.js +47 -0
- package/dist/{devtools/cli → cli}/src/index.js +55 -141
- package/dist/{devtools/cli → cli}/src/session_manager.js +9 -11
- package/dist/{devtools/cli → cli}/src/token_command.js +69 -0
- package/dist/{devtools/cli → cli}/src/token_tool.d.ts +26 -0
- package/dist/{devtools/cli → cli}/src/token_tool.js +123 -22
- package/dist/{devtools/cli → cli}/src/transport.d.ts +1 -1
- package/package.json +6 -2
- package/script/ensure_ffmpeg.sh +1 -1
- package/vendor/app-server/bin/native/linux-x64/credential_napi.node +0 -0
- package/vendor/app-server/bin/native/macos-arm64/credential_napi.node +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/credential.h +34 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/error.h +13 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/foundation/build_info.h +27 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/http.h +57 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/logging.h +3 -1
- package/vendor/app-server/bin/runtime/linux-x64/lib/libcrypto.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libssl.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +2 -32
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio.h +176 -133
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/av.h +223 -182
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +2 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_downlink.h +6 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/transport.h +58 -133
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/trp.h +47 -224
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libTGTRP.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libTiRTC.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/manifest.txt +19 -15
- package/vendor/app-server/dist/host/HostCommandCoordinator.d.ts +19 -0
- package/vendor/app-server/dist/host/HostCommandCoordinator.js +196 -0
- package/vendor/app-server/dist/host/HostProtocol.d.ts +1 -11
- package/vendor/app-server/dist/host/HostProtocol.js +3 -37
- package/vendor/app-server/dist/host/HostServer.d.ts +1 -4
- package/vendor/app-server/dist/host/HostServer.js +16 -152
- package/vendor/app-server/dist/host/RuntimeAdapter.js +2 -2
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +3 -3
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +4 -4
- package/vendor/app-server/dist/host/runtime_backed_preflight.js +2 -2
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +1 -1
- package/vendor/app-server/dist/protocol/contract.d.ts +5 -64
- package/vendor/app-server/dist/protocol/contract.js +3 -12
- package/dist/devtools/cli/src/guide.js +0 -50
- package/dist/dummy.d.ts +0 -0
- package/dist/dummy.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -48
- package/vendor/app-server/bin/native/macos-arm64/libcrypto.dylib +0 -0
- package/vendor/app-server/bin/native/macos-arm64/libssl.dylib +0 -0
- package/vendor/app-server/bin/native/macos-arm64/runtime_host_napi.node +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_codec.h +0 -23
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_frame.h +0 -36
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io.h +0 -56
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_android.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_apple.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_harmony.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_windows.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_processing.h +0 -56
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_sample_rate.h +0 -18
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_codec.h +0 -21
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_downlink.h +0 -89
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_uplink.h +0 -115
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/runtime.h +0 -236
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_codec.h +0 -57
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_frame.h +0 -55
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io.h +0 -46
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_android.h +0 -32
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_apple.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_harmony.h +0 -32
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_windows.h +0 -26
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_processing.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libwebrtc_apm.a +0 -0
- package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.d.ts +0 -30
- package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.js +0 -224
- /package/dist/{devtools/cli → cli}/src/dummy.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/dummy.js +0 -0
- /package/dist/{devtools/cli → cli}/src/ffmpeg_tool.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/ffmpeg_tool.js +0 -0
- /package/dist/{devtools/cli → cli}/src/guide.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/index.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/media_assets.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/media_assets.js +0 -0
- /package/dist/{devtools/cli → cli}/src/progress.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/progress.js +0 -0
- /package/dist/{devtools/cli → cli}/src/session_manager.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/token_command.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/transport.js +0 -0
- /package/vendor/app-server/bin/{native/macos-arm64 → runtime/macos-arm64/lib}/libtgrtc.dylib +0 -0
|
@@ -29,7 +29,7 @@ function resolveConfigOutputPath(outputPath) {
|
|
|
29
29
|
function renderTomlConfigTemplate() {
|
|
30
30
|
return [
|
|
31
31
|
'# TiRTC DevTool CLI 配置模板(TOML)',
|
|
32
|
-
'#
|
|
32
|
+
'# client token 通过命令行 --token 显式提供,不写入配置文件。',
|
|
33
33
|
'',
|
|
34
34
|
'[server]',
|
|
35
35
|
'# 可留空,走 runtime/core/transport 默认 service_entry',
|
|
@@ -40,37 +40,13 @@ function renderTomlConfigTemplate() {
|
|
|
40
40
|
'video_stream_id = 11',
|
|
41
41
|
'audio_stream_id = 10',
|
|
42
42
|
'',
|
|
43
|
-
'[
|
|
44
|
-
'#
|
|
45
|
-
'service_entry = ""',
|
|
46
|
-
'peer_id = ""',
|
|
47
|
-
'token = ""',
|
|
48
|
-
'',
|
|
49
|
-
'[connection.auto_token]',
|
|
50
|
-
'# 留空则使用 runtime/core/credential 默认 openapi entry',
|
|
51
|
-
'# openapi_entry = ""',
|
|
52
|
-
'# access/secret/local 三元组用于自动签发 token',
|
|
53
|
-
'# access_id = ""',
|
|
54
|
-
'# secret_key = ""',
|
|
55
|
-
'# local_id = ""',
|
|
56
|
-
'# 可选 TTL(秒)',
|
|
57
|
-
'# user_ttl_seconds = 86400',
|
|
58
|
-
'# channel_ttl_seconds = 300',
|
|
59
|
-
'',
|
|
60
|
-
'[logging]',
|
|
61
|
-
'# session 日志根目录;每个 session 会写到 <root_dir>/<session_id>/',
|
|
62
|
-
'root_dir = "./.tmp/tirtc-devtools-cli/logging"',
|
|
63
|
-
'# 是否镜像 Host 控制台日志到当前终端',
|
|
64
|
-
'console_mirror = true',
|
|
65
|
-
'# verbose|debug|info|warn|error|fatal(预留)',
|
|
66
|
-
'level = "info"',
|
|
67
|
-
'',
|
|
68
|
-
'[debug.connect_bootstrap]',
|
|
69
|
-
'access_id = ""',
|
|
70
|
-
'secret_key = ""',
|
|
71
|
-
'peer_id = ""',
|
|
72
|
-
'# 可留空,走 runtime/core/transport 默认 service_entry',
|
|
43
|
+
'[client]',
|
|
44
|
+
'# client start 正式路径读取这里的最小连接事实',
|
|
73
45
|
'service_entry = ""',
|
|
46
|
+
'peer_id = "peer-123"',
|
|
47
|
+
'audio_stream_id = 10',
|
|
48
|
+
'video_stream_id = 11',
|
|
49
|
+
'consumer = "web_preview"',
|
|
74
50
|
'',
|
|
75
51
|
].join('\n');
|
|
76
52
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveCliStateRootDir = resolveCliStateRootDir;
|
|
7
|
+
exports.resolveCliLogRootDir = resolveCliLogRootDir;
|
|
8
|
+
exports.resolveCliPreparedAssetsRoot = resolveCliPreparedAssetsRoot;
|
|
9
|
+
const os_1 = __importDefault(require("os"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
function resolveCliStateRootDir() {
|
|
12
|
+
const explicit = process.env.TIRTC_DEVTOOL_STATE_DIR;
|
|
13
|
+
if (explicit && explicit.trim().length > 0) {
|
|
14
|
+
return explicit.trim();
|
|
15
|
+
}
|
|
16
|
+
return path_1.default.join(os_1.default.homedir(), '.tirtc-devtools-cli');
|
|
17
|
+
}
|
|
18
|
+
function resolveCliLogRootDir() {
|
|
19
|
+
return path_1.default.join(resolveCliStateRootDir(), 'logging');
|
|
20
|
+
}
|
|
21
|
+
function resolveCliPreparedAssetsRoot() {
|
|
22
|
+
return path_1.default.join(resolveCliStateRootDir(), 'prepared-assets');
|
|
23
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function resolveCliPackageRoot(fromDir: string): string;
|
|
2
|
+
export declare function resolveWorkspaceRepoRoot(fromDir: string): string | undefined;
|
|
2
3
|
export declare function resolveEmbeddedRoot(fromDir: string): string | undefined;
|
|
3
4
|
export declare function resolveEmbeddedAppServerRoot(fromDir: string): string | undefined;
|
|
4
5
|
export declare function resolveEmbeddedHostBinary(fromDir: string): string | undefined;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resolveCliPackageRoot = resolveCliPackageRoot;
|
|
7
|
+
exports.resolveWorkspaceRepoRoot = resolveWorkspaceRepoRoot;
|
|
7
8
|
exports.resolveEmbeddedRoot = resolveEmbeddedRoot;
|
|
8
9
|
exports.resolveEmbeddedAppServerRoot = resolveEmbeddedAppServerRoot;
|
|
9
10
|
exports.resolveEmbeddedHostBinary = resolveEmbeddedHostBinary;
|
|
@@ -15,6 +16,11 @@ const path_1 = __importDefault(require("path"));
|
|
|
15
16
|
function pathExists(filePath) {
|
|
16
17
|
return fs_1.default.existsSync(filePath);
|
|
17
18
|
}
|
|
19
|
+
function isWorkspaceRepoRoot(candidate) {
|
|
20
|
+
return pathExists(path_1.default.join(candidate, 'products/cli/package.json')) &&
|
|
21
|
+
pathExists(path_1.default.join(candidate, 'products/app-server/package.json')) &&
|
|
22
|
+
pathExists(path_1.default.join(candidate, 'runtime/script/prepare_runtime_media_dataset.sh'));
|
|
23
|
+
}
|
|
18
24
|
function resolveCliPackageRoot(fromDir) {
|
|
19
25
|
const candidates = [
|
|
20
26
|
path_1.default.resolve(fromDir, '..'),
|
|
@@ -22,7 +28,7 @@ function resolveCliPackageRoot(fromDir) {
|
|
|
22
28
|
path_1.default.resolve(fromDir, '../../..'),
|
|
23
29
|
path_1.default.resolve(fromDir, '../../../..'),
|
|
24
30
|
path_1.default.resolve(process.cwd()),
|
|
25
|
-
path_1.default.resolve(process.cwd(), '
|
|
31
|
+
path_1.default.resolve(process.cwd(), 'products/cli'),
|
|
26
32
|
];
|
|
27
33
|
for (const candidate of candidates) {
|
|
28
34
|
if (pathExists(path_1.default.join(candidate, 'package.json')) && pathExists(path_1.default.join(candidate, 'bin/tirtc-devtools-cli.js'))) {
|
|
@@ -31,7 +37,18 @@ function resolveCliPackageRoot(fromDir) {
|
|
|
31
37
|
}
|
|
32
38
|
return candidates[0];
|
|
33
39
|
}
|
|
40
|
+
function resolveWorkspaceRepoRoot(fromDir) {
|
|
41
|
+
const packageRoot = resolveCliPackageRoot(fromDir);
|
|
42
|
+
const repoRoot = path_1.default.resolve(packageRoot, '../..');
|
|
43
|
+
if (isWorkspaceRepoRoot(repoRoot)) {
|
|
44
|
+
return repoRoot;
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
34
48
|
function resolveEmbeddedRoot(fromDir) {
|
|
49
|
+
if (resolveWorkspaceRepoRoot(fromDir)) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
35
52
|
const packageRoot = resolveCliPackageRoot(fromDir);
|
|
36
53
|
const embeddedRoot = path_1.default.join(packageRoot, 'vendor');
|
|
37
54
|
if (pathExists(path_1.default.join(embeddedRoot, 'app-server')) || pathExists(path_1.default.join(embeddedRoot, 'runtime'))) {
|
|
@@ -20,69 +20,24 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
20
20
|
video_stream_id?: number | undefined;
|
|
21
21
|
audio_stream_id?: number | undefined;
|
|
22
22
|
}>>;
|
|
23
|
-
|
|
23
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
24
24
|
service_entry: z.ZodOptional<z.ZodString>;
|
|
25
25
|
peer_id: z.ZodOptional<z.ZodString>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
30
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
31
|
-
local_id: z.ZodOptional<z.ZodString>;
|
|
32
|
-
user_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
channel_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
openapi_entry?: string | undefined;
|
|
36
|
-
access_id?: string | undefined;
|
|
37
|
-
secret_key?: string | undefined;
|
|
38
|
-
local_id?: string | undefined;
|
|
39
|
-
user_ttl_seconds?: number | undefined;
|
|
40
|
-
channel_ttl_seconds?: number | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
openapi_entry?: string | undefined;
|
|
43
|
-
access_id?: string | undefined;
|
|
44
|
-
secret_key?: string | undefined;
|
|
45
|
-
local_id?: string | undefined;
|
|
46
|
-
user_ttl_seconds?: number | undefined;
|
|
47
|
-
channel_ttl_seconds?: number | undefined;
|
|
48
|
-
}>>;
|
|
26
|
+
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
49
29
|
}, "strip", z.ZodTypeAny, {
|
|
50
30
|
service_entry?: string | undefined;
|
|
31
|
+
video_stream_id?: number | undefined;
|
|
32
|
+
audio_stream_id?: number | undefined;
|
|
51
33
|
peer_id?: string | undefined;
|
|
52
|
-
|
|
53
|
-
auto_token?: {
|
|
54
|
-
openapi_entry?: string | undefined;
|
|
55
|
-
access_id?: string | undefined;
|
|
56
|
-
secret_key?: string | undefined;
|
|
57
|
-
local_id?: string | undefined;
|
|
58
|
-
user_ttl_seconds?: number | undefined;
|
|
59
|
-
channel_ttl_seconds?: number | undefined;
|
|
60
|
-
} | undefined;
|
|
34
|
+
consumer?: "web_preview" | undefined;
|
|
61
35
|
}, {
|
|
62
36
|
service_entry?: string | undefined;
|
|
37
|
+
video_stream_id?: number | undefined;
|
|
38
|
+
audio_stream_id?: number | undefined;
|
|
63
39
|
peer_id?: string | undefined;
|
|
64
|
-
|
|
65
|
-
auto_token?: {
|
|
66
|
-
openapi_entry?: string | undefined;
|
|
67
|
-
access_id?: string | undefined;
|
|
68
|
-
secret_key?: string | undefined;
|
|
69
|
-
local_id?: string | undefined;
|
|
70
|
-
user_ttl_seconds?: number | undefined;
|
|
71
|
-
channel_ttl_seconds?: number | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
}>>;
|
|
74
|
-
logging: z.ZodOptional<z.ZodObject<{
|
|
75
|
-
root_dir: z.ZodOptional<z.ZodString>;
|
|
76
|
-
console_mirror: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
-
level: z.ZodOptional<z.ZodEnum<["verbose", "debug", "info", "warn", "error", "fatal"]>>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
root_dir?: string | undefined;
|
|
80
|
-
console_mirror?: boolean | undefined;
|
|
81
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
root_dir?: string | undefined;
|
|
84
|
-
console_mirror?: boolean | undefined;
|
|
85
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
40
|
+
consumer?: "web_preview" | undefined;
|
|
86
41
|
}>>;
|
|
87
42
|
debug: z.ZodOptional<z.ZodObject<{
|
|
88
43
|
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
@@ -137,69 +92,24 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
137
92
|
video_stream_id?: number | undefined;
|
|
138
93
|
audio_stream_id?: number | undefined;
|
|
139
94
|
}>>;
|
|
140
|
-
|
|
95
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
141
96
|
service_entry: z.ZodOptional<z.ZodString>;
|
|
142
97
|
peer_id: z.ZodOptional<z.ZodString>;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
147
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
148
|
-
local_id: z.ZodOptional<z.ZodString>;
|
|
149
|
-
user_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
150
|
-
channel_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
151
|
-
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
openapi_entry?: string | undefined;
|
|
153
|
-
access_id?: string | undefined;
|
|
154
|
-
secret_key?: string | undefined;
|
|
155
|
-
local_id?: string | undefined;
|
|
156
|
-
user_ttl_seconds?: number | undefined;
|
|
157
|
-
channel_ttl_seconds?: number | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
openapi_entry?: string | undefined;
|
|
160
|
-
access_id?: string | undefined;
|
|
161
|
-
secret_key?: string | undefined;
|
|
162
|
-
local_id?: string | undefined;
|
|
163
|
-
user_ttl_seconds?: number | undefined;
|
|
164
|
-
channel_ttl_seconds?: number | undefined;
|
|
165
|
-
}>>;
|
|
98
|
+
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
166
101
|
}, "strip", z.ZodTypeAny, {
|
|
167
102
|
service_entry?: string | undefined;
|
|
103
|
+
video_stream_id?: number | undefined;
|
|
104
|
+
audio_stream_id?: number | undefined;
|
|
168
105
|
peer_id?: string | undefined;
|
|
169
|
-
|
|
170
|
-
auto_token?: {
|
|
171
|
-
openapi_entry?: string | undefined;
|
|
172
|
-
access_id?: string | undefined;
|
|
173
|
-
secret_key?: string | undefined;
|
|
174
|
-
local_id?: string | undefined;
|
|
175
|
-
user_ttl_seconds?: number | undefined;
|
|
176
|
-
channel_ttl_seconds?: number | undefined;
|
|
177
|
-
} | undefined;
|
|
106
|
+
consumer?: "web_preview" | undefined;
|
|
178
107
|
}, {
|
|
179
108
|
service_entry?: string | undefined;
|
|
109
|
+
video_stream_id?: number | undefined;
|
|
110
|
+
audio_stream_id?: number | undefined;
|
|
180
111
|
peer_id?: string | undefined;
|
|
181
|
-
|
|
182
|
-
auto_token?: {
|
|
183
|
-
openapi_entry?: string | undefined;
|
|
184
|
-
access_id?: string | undefined;
|
|
185
|
-
secret_key?: string | undefined;
|
|
186
|
-
local_id?: string | undefined;
|
|
187
|
-
user_ttl_seconds?: number | undefined;
|
|
188
|
-
channel_ttl_seconds?: number | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
}>>;
|
|
191
|
-
logging: z.ZodOptional<z.ZodObject<{
|
|
192
|
-
root_dir: z.ZodOptional<z.ZodString>;
|
|
193
|
-
console_mirror: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
-
level: z.ZodOptional<z.ZodEnum<["verbose", "debug", "info", "warn", "error", "fatal"]>>;
|
|
195
|
-
}, "strip", z.ZodTypeAny, {
|
|
196
|
-
root_dir?: string | undefined;
|
|
197
|
-
console_mirror?: boolean | undefined;
|
|
198
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
199
|
-
}, {
|
|
200
|
-
root_dir?: string | undefined;
|
|
201
|
-
console_mirror?: boolean | undefined;
|
|
202
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
112
|
+
consumer?: "web_preview" | undefined;
|
|
203
113
|
}>>;
|
|
204
114
|
debug: z.ZodOptional<z.ZodObject<{
|
|
205
115
|
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
@@ -254,69 +164,24 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
254
164
|
video_stream_id?: number | undefined;
|
|
255
165
|
audio_stream_id?: number | undefined;
|
|
256
166
|
}>>;
|
|
257
|
-
|
|
167
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
258
168
|
service_entry: z.ZodOptional<z.ZodString>;
|
|
259
169
|
peer_id: z.ZodOptional<z.ZodString>;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
264
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
265
|
-
local_id: z.ZodOptional<z.ZodString>;
|
|
266
|
-
user_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
267
|
-
channel_ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
openapi_entry?: string | undefined;
|
|
270
|
-
access_id?: string | undefined;
|
|
271
|
-
secret_key?: string | undefined;
|
|
272
|
-
local_id?: string | undefined;
|
|
273
|
-
user_ttl_seconds?: number | undefined;
|
|
274
|
-
channel_ttl_seconds?: number | undefined;
|
|
275
|
-
}, {
|
|
276
|
-
openapi_entry?: string | undefined;
|
|
277
|
-
access_id?: string | undefined;
|
|
278
|
-
secret_key?: string | undefined;
|
|
279
|
-
local_id?: string | undefined;
|
|
280
|
-
user_ttl_seconds?: number | undefined;
|
|
281
|
-
channel_ttl_seconds?: number | undefined;
|
|
282
|
-
}>>;
|
|
170
|
+
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
283
173
|
}, "strip", z.ZodTypeAny, {
|
|
284
174
|
service_entry?: string | undefined;
|
|
175
|
+
video_stream_id?: number | undefined;
|
|
176
|
+
audio_stream_id?: number | undefined;
|
|
285
177
|
peer_id?: string | undefined;
|
|
286
|
-
|
|
287
|
-
auto_token?: {
|
|
288
|
-
openapi_entry?: string | undefined;
|
|
289
|
-
access_id?: string | undefined;
|
|
290
|
-
secret_key?: string | undefined;
|
|
291
|
-
local_id?: string | undefined;
|
|
292
|
-
user_ttl_seconds?: number | undefined;
|
|
293
|
-
channel_ttl_seconds?: number | undefined;
|
|
294
|
-
} | undefined;
|
|
178
|
+
consumer?: "web_preview" | undefined;
|
|
295
179
|
}, {
|
|
296
180
|
service_entry?: string | undefined;
|
|
181
|
+
video_stream_id?: number | undefined;
|
|
182
|
+
audio_stream_id?: number | undefined;
|
|
297
183
|
peer_id?: string | undefined;
|
|
298
|
-
|
|
299
|
-
auto_token?: {
|
|
300
|
-
openapi_entry?: string | undefined;
|
|
301
|
-
access_id?: string | undefined;
|
|
302
|
-
secret_key?: string | undefined;
|
|
303
|
-
local_id?: string | undefined;
|
|
304
|
-
user_ttl_seconds?: number | undefined;
|
|
305
|
-
channel_ttl_seconds?: number | undefined;
|
|
306
|
-
} | undefined;
|
|
307
|
-
}>>;
|
|
308
|
-
logging: z.ZodOptional<z.ZodObject<{
|
|
309
|
-
root_dir: z.ZodOptional<z.ZodString>;
|
|
310
|
-
console_mirror: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
-
level: z.ZodOptional<z.ZodEnum<["verbose", "debug", "info", "warn", "error", "fatal"]>>;
|
|
312
|
-
}, "strip", z.ZodTypeAny, {
|
|
313
|
-
root_dir?: string | undefined;
|
|
314
|
-
console_mirror?: boolean | undefined;
|
|
315
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
316
|
-
}, {
|
|
317
|
-
root_dir?: string | undefined;
|
|
318
|
-
console_mirror?: boolean | undefined;
|
|
319
|
-
level?: "verbose" | "debug" | "info" | "warn" | "error" | "fatal" | undefined;
|
|
184
|
+
consumer?: "web_preview" | undefined;
|
|
320
185
|
}>>;
|
|
321
186
|
debug: z.ZodOptional<z.ZodObject<{
|
|
322
187
|
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
@@ -379,82 +244,23 @@ export declare const ServiceStartParamsSchema: z.ZodObject<{
|
|
|
379
244
|
export declare const ConnectionConnectParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
380
245
|
serviceEntry: z.ZodOptional<z.ZodString>;
|
|
381
246
|
peerId: z.ZodString;
|
|
382
|
-
token: z.
|
|
383
|
-
tokenMode: z.ZodOptional<z.ZodEnum<["manual", "auto"]>>;
|
|
384
|
-
autoToken: z.ZodOptional<z.ZodObject<{
|
|
385
|
-
openapiEntry: z.ZodOptional<z.ZodString>;
|
|
386
|
-
accessId: z.ZodString;
|
|
387
|
-
secretKey: z.ZodString;
|
|
388
|
-
localId: z.ZodOptional<z.ZodString>;
|
|
389
|
-
userTtlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
390
|
-
channelTtlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
391
|
-
}, "strip", z.ZodTypeAny, {
|
|
392
|
-
accessId: string;
|
|
393
|
-
secretKey: string;
|
|
394
|
-
openapiEntry?: string | undefined;
|
|
395
|
-
localId?: string | undefined;
|
|
396
|
-
userTtlSeconds?: number | undefined;
|
|
397
|
-
channelTtlSeconds?: number | undefined;
|
|
398
|
-
}, {
|
|
399
|
-
accessId: string;
|
|
400
|
-
secretKey: string;
|
|
401
|
-
openapiEntry?: string | undefined;
|
|
402
|
-
localId?: string | undefined;
|
|
403
|
-
userTtlSeconds?: number | undefined;
|
|
404
|
-
channelTtlSeconds?: number | undefined;
|
|
405
|
-
}>>;
|
|
247
|
+
token: z.ZodString;
|
|
406
248
|
}, "strip", z.ZodTypeAny, {
|
|
407
249
|
peerId: string;
|
|
408
|
-
token
|
|
250
|
+
token: string;
|
|
409
251
|
serviceEntry?: string | undefined;
|
|
410
|
-
tokenMode?: "manual" | "auto" | undefined;
|
|
411
|
-
autoToken?: {
|
|
412
|
-
accessId: string;
|
|
413
|
-
secretKey: string;
|
|
414
|
-
openapiEntry?: string | undefined;
|
|
415
|
-
localId?: string | undefined;
|
|
416
|
-
userTtlSeconds?: number | undefined;
|
|
417
|
-
channelTtlSeconds?: number | undefined;
|
|
418
|
-
} | undefined;
|
|
419
252
|
}, {
|
|
420
253
|
peerId: string;
|
|
421
|
-
token
|
|
254
|
+
token: string;
|
|
422
255
|
serviceEntry?: string | undefined;
|
|
423
|
-
tokenMode?: "manual" | "auto" | undefined;
|
|
424
|
-
autoToken?: {
|
|
425
|
-
accessId: string;
|
|
426
|
-
secretKey: string;
|
|
427
|
-
openapiEntry?: string | undefined;
|
|
428
|
-
localId?: string | undefined;
|
|
429
|
-
userTtlSeconds?: number | undefined;
|
|
430
|
-
channelTtlSeconds?: number | undefined;
|
|
431
|
-
} | undefined;
|
|
432
256
|
}>, {
|
|
433
257
|
peerId: string;
|
|
434
|
-
token
|
|
258
|
+
token: string;
|
|
435
259
|
serviceEntry?: string | undefined;
|
|
436
|
-
tokenMode?: "manual" | "auto" | undefined;
|
|
437
|
-
autoToken?: {
|
|
438
|
-
accessId: string;
|
|
439
|
-
secretKey: string;
|
|
440
|
-
openapiEntry?: string | undefined;
|
|
441
|
-
localId?: string | undefined;
|
|
442
|
-
userTtlSeconds?: number | undefined;
|
|
443
|
-
channelTtlSeconds?: number | undefined;
|
|
444
|
-
} | undefined;
|
|
445
260
|
}, {
|
|
446
261
|
peerId: string;
|
|
447
|
-
token
|
|
262
|
+
token: string;
|
|
448
263
|
serviceEntry?: string | undefined;
|
|
449
|
-
tokenMode?: "manual" | "auto" | undefined;
|
|
450
|
-
autoToken?: {
|
|
451
|
-
accessId: string;
|
|
452
|
-
secretKey: string;
|
|
453
|
-
openapiEntry?: string | undefined;
|
|
454
|
-
localId?: string | undefined;
|
|
455
|
-
userTtlSeconds?: number | undefined;
|
|
456
|
-
channelTtlSeconds?: number | undefined;
|
|
457
|
-
} | undefined;
|
|
458
264
|
}>;
|
|
459
265
|
export declare const StreamSendStartParamsSchema: z.ZodObject<{
|
|
460
266
|
streamId: z.ZodString;
|
|
@@ -498,16 +304,16 @@ export declare const OutputAttachParamsSchema: z.ZodObject<{
|
|
|
498
304
|
targetPath: z.ZodOptional<z.ZodString>;
|
|
499
305
|
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
500
306
|
}, "strip", z.ZodTypeAny, {
|
|
501
|
-
streamId: string;
|
|
502
307
|
consumer: string;
|
|
308
|
+
streamId: string;
|
|
503
309
|
mediaView: string;
|
|
504
310
|
format: string;
|
|
505
311
|
delivery: string;
|
|
506
312
|
targetPath?: string | undefined;
|
|
507
313
|
maxFiles?: number | undefined;
|
|
508
314
|
}, {
|
|
509
|
-
streamId: string;
|
|
510
315
|
consumer: string;
|
|
316
|
+
streamId: string;
|
|
511
317
|
mediaView: string;
|
|
512
318
|
format: string;
|
|
513
319
|
delivery: string;
|
|
@@ -523,32 +329,32 @@ export declare const OutputAttachCliParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
523
329
|
targetPath: z.ZodOptional<z.ZodString>;
|
|
524
330
|
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
525
331
|
}, "strip", z.ZodTypeAny, {
|
|
526
|
-
streamId: number;
|
|
527
332
|
consumer: "web_preview" | "file_sink";
|
|
333
|
+
streamId: number;
|
|
528
334
|
mediaView: "encoded" | "encoded_packet";
|
|
529
335
|
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
530
336
|
delivery: "artifact_path" | "file";
|
|
531
337
|
targetPath?: string | undefined;
|
|
532
338
|
maxFiles?: number | undefined;
|
|
533
339
|
}, {
|
|
534
|
-
streamId: number;
|
|
535
340
|
consumer: "web_preview" | "file_sink";
|
|
341
|
+
streamId: number;
|
|
536
342
|
mediaView: "encoded" | "encoded_packet";
|
|
537
343
|
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
538
344
|
delivery: "artifact_path" | "file";
|
|
539
345
|
targetPath?: string | undefined;
|
|
540
346
|
maxFiles?: number | undefined;
|
|
541
347
|
}>, {
|
|
542
|
-
streamId: number;
|
|
543
348
|
consumer: "web_preview" | "file_sink";
|
|
349
|
+
streamId: number;
|
|
544
350
|
mediaView: "encoded" | "encoded_packet";
|
|
545
351
|
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
546
352
|
delivery: "artifact_path" | "file";
|
|
547
353
|
targetPath?: string | undefined;
|
|
548
354
|
maxFiles?: number | undefined;
|
|
549
355
|
}, {
|
|
550
|
-
streamId: number;
|
|
551
356
|
consumer: "web_preview" | "file_sink";
|
|
357
|
+
streamId: number;
|
|
552
358
|
mediaView: "encoded" | "encoded_packet";
|
|
553
359
|
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
554
360
|
delivery: "artifact_path" | "file";
|
|
@@ -11,23 +11,12 @@ exports.CliConfigSchema = zod_1.z.object({
|
|
|
11
11
|
video_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
12
12
|
audio_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
13
13
|
}).optional(),
|
|
14
|
-
|
|
14
|
+
client: zod_1.z.object({
|
|
15
15
|
service_entry: zod_1.z.string().optional(),
|
|
16
16
|
peer_id: zod_1.z.string().optional(),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
access_id: zod_1.z.string().optional(),
|
|
21
|
-
secret_key: zod_1.z.string().optional(),
|
|
22
|
-
local_id: zod_1.z.string().optional(),
|
|
23
|
-
user_ttl_seconds: zod_1.z.number().int().positive().optional(),
|
|
24
|
-
channel_ttl_seconds: zod_1.z.number().int().positive().optional(),
|
|
25
|
-
}).optional(),
|
|
26
|
-
}).optional(),
|
|
27
|
-
logging: zod_1.z.object({
|
|
28
|
-
root_dir: zod_1.z.string().optional(),
|
|
29
|
-
console_mirror: zod_1.z.boolean().optional(),
|
|
30
|
-
level: zod_1.z.enum(['verbose', 'debug', 'info', 'warn', 'error', 'fatal']).optional(),
|
|
17
|
+
audio_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
18
|
+
video_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
19
|
+
consumer: zod_1.z.enum(['web_preview']).optional(),
|
|
31
20
|
}).optional(),
|
|
32
21
|
debug: zod_1.z.object({
|
|
33
22
|
connect_bootstrap: zod_1.z.object({
|
|
@@ -48,6 +37,7 @@ exports.CommandToHostMethodMapping = {
|
|
|
48
37
|
'host stop': 'host/shutdown',
|
|
49
38
|
'service start': 'service/start',
|
|
50
39
|
'service stop': 'service/stop',
|
|
40
|
+
'client start': 'connection/connect',
|
|
51
41
|
'connection show': 'connection/get',
|
|
52
42
|
'connection connect': 'connection/connect',
|
|
53
43
|
'connection disconnect': 'connection/disconnect',
|
|
@@ -89,18 +79,9 @@ exports.ServiceStartParamsSchema = zod_1.z.object({
|
|
|
89
79
|
exports.ConnectionConnectParamsSchema = zod_1.z.object({
|
|
90
80
|
serviceEntry: zod_1.z.string().optional(),
|
|
91
81
|
peerId: zod_1.z.string(),
|
|
92
|
-
token: zod_1.z.string().
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
openapiEntry: zod_1.z.string().optional(),
|
|
96
|
-
accessId: zod_1.z.string(),
|
|
97
|
-
secretKey: zod_1.z.string(),
|
|
98
|
-
localId: zod_1.z.string().optional(),
|
|
99
|
-
userTtlSeconds: zod_1.z.number().int().positive().optional(),
|
|
100
|
-
channelTtlSeconds: zod_1.z.number().int().positive().optional(),
|
|
101
|
-
}).optional(),
|
|
102
|
-
}).refine((value) => Boolean(value.token) || Boolean(value.autoToken), {
|
|
103
|
-
message: 'token or autoToken is required',
|
|
82
|
+
token: zod_1.z.string().min(1),
|
|
83
|
+
}).refine((value) => value.token.trim().length > 0, {
|
|
84
|
+
message: 'token is required',
|
|
104
85
|
});
|
|
105
86
|
exports.StreamSendStartParamsSchema = zod_1.z.object({
|
|
106
87
|
streamId: zod_1.z.string(),
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printQuickstartGuide = printQuickstartGuide;
|
|
4
|
+
function printQuickstartGuide() {
|
|
5
|
+
const lines = [
|
|
6
|
+
'TiRTC CLI 新手快速入口(service start -> client start 本地预览)',
|
|
7
|
+
'',
|
|
8
|
+
'前置条件:',
|
|
9
|
+
'1) 已构建最新 CLI:',
|
|
10
|
+
' npm --prefix products/app-server run build',
|
|
11
|
+
' npm --prefix products/cli run build',
|
|
12
|
+
'2) 准备一份 TOML 配置:',
|
|
13
|
+
' [server] service_entry = "" license = "<LICENSE>" mp4_path = "./.refers/simple.mp4" video_stream_id = 11 audio_stream_id = 10',
|
|
14
|
+
' [client] service_entry = "" peer_id = "<PEER_ID>" audio_stream_id = 10 video_stream_id = 11 consumer = "web_preview"',
|
|
15
|
+
'',
|
|
16
|
+
'步骤 1:启动服务(自动创建 session)',
|
|
17
|
+
' node products/cli/bin/tirtc-devtools-cli.js --config ./server.toml service start',
|
|
18
|
+
' # 记下输出里的 sessionId,后续观测命令显式带 --session',
|
|
19
|
+
'',
|
|
20
|
+
'步骤 2:CLI 会自动 prepare MP4 并绑定音视频 stream,不再需要手工 prepare assets_dir',
|
|
21
|
+
' # service start 成功后会自动 prepare 并按 AUTO_ON_CONNECTED 进入待发流语义',
|
|
22
|
+
'',
|
|
23
|
+
'步骤 3:显式签发 client token(可本地执行,也可由外部系统提供)',
|
|
24
|
+
' export TIRTC_CONN_ACCESS_ID="<ACCESS_ID>"',
|
|
25
|
+
' export TIRTC_CONN_SECRET_KEY="<SECRET_KEY>"',
|
|
26
|
+
' node products/cli/bin/tirtc-devtools-cli.js --json token issue "<PEER_ID>" --service-entry "<SERVICE_ENTRY>"',
|
|
27
|
+
'',
|
|
28
|
+
'步骤 4:启动 client 本地 web preview',
|
|
29
|
+
' node products/cli/bin/tirtc-devtools-cli.js --config ./client.toml client start --token "<TOKEN>"',
|
|
30
|
+
' # 返回结果里的 autoApplied.preview.url 就是浏览器预览入口',
|
|
31
|
+
'',
|
|
32
|
+
'步骤 5:打开返回的 preview.url,并让页面触发 /preview/start',
|
|
33
|
+
' # Host 会在收到 preview/start 后激活对应 receive worker',
|
|
34
|
+
'',
|
|
35
|
+
'步骤 6:服务端观测',
|
|
36
|
+
' node products/cli/bin/tirtc-devtools-cli.js --session <SESSION_ID> events tail',
|
|
37
|
+
' node products/cli/bin/tirtc-devtools-cli.js --session <SESSION_ID> report show',
|
|
38
|
+
'',
|
|
39
|
+
'补充:',
|
|
40
|
+
'- client start 是正式入口;connection connect / stream receive start / output attach 保留为 expert path',
|
|
41
|
+
'- debug bootstrap qrcode 仅生成连接信息二维码,不签发 token',
|
|
42
|
+
'- 机器可读输出:在命令后追加 --json',
|
|
43
|
+
'- 查看全部命令:node products/cli/bin/tirtc-devtools-cli.js --help',
|
|
44
|
+
'- 查看单命令说明:node products/cli/bin/tirtc-devtools-cli.js <command> --help',
|
|
45
|
+
];
|
|
46
|
+
console.log(lines.join('\n'));
|
|
47
|
+
}
|