@cloudbase/cli 2.7.3 → 2.7.4
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/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -704,6 +704,10 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
704
704
|
示例:--extendedContext '{"a":1,"b":2}'
|
|
705
705
|
环境变量:EXTENDED_CONTEXT
|
|
706
706
|
`
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
flags: '--open-debug-panel <openDebugPanel>',
|
|
710
|
+
desc: `是否打开调试面板,默认为 'true'`
|
|
707
711
|
}
|
|
708
712
|
],
|
|
709
713
|
requiredEnvId: false,
|
|
@@ -713,7 +717,7 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
713
717
|
execute(envId, logger, ctx, options) {
|
|
714
718
|
return __awaiter(this, void 0, void 0, function* () {
|
|
715
719
|
debugger;
|
|
716
|
-
let { runMode = 'normal', agentId } = options;
|
|
720
|
+
let { runMode = 'normal', agentId, openDebugPanel = true } = options;
|
|
717
721
|
const type = runMode;
|
|
718
722
|
console.log(chalk_1.default.green(`当前运行模式: ${type}`));
|
|
719
723
|
if (!process.argv.some((arg) => arg.includes('--dotEnvFilePath='))) {
|
|
@@ -738,7 +742,7 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
738
742
|
{
|
|
739
743
|
type: 'input',
|
|
740
744
|
name: 'agentId',
|
|
741
|
-
message: `请输入 Agent ID
|
|
745
|
+
message: `请输入 Agent ID(如没有请填写任意值):`,
|
|
742
746
|
validate: (val) => {
|
|
743
747
|
return val.trim() ? true : 'Agent ID 不能为空';
|
|
744
748
|
}
|
|
@@ -788,7 +792,7 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
788
792
|
logger.info('Initializing server in watch mode. Changes in source files will trigger a restart.');
|
|
789
793
|
if (!nodemonInstance._firstStartDone) {
|
|
790
794
|
nodemonInstance._firstStartDone = true;
|
|
791
|
-
this.openDebugApp(type, port, envId, agentId);
|
|
795
|
+
this.openDebugApp(type, port, envId, agentId, openDebugPanel !== 'false');
|
|
792
796
|
}
|
|
793
797
|
}))
|
|
794
798
|
.on('quit', (e) => {
|
|
@@ -812,13 +816,13 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
812
816
|
}
|
|
813
817
|
else {
|
|
814
818
|
(0, functions_framework_1.runCLI)();
|
|
815
|
-
if (!process.env.FROM_NODEMON) {
|
|
816
|
-
this.openDebugApp(type, port, envId, agentId);
|
|
819
|
+
if (!process.env.FROM_NODEMON && openDebugPanel) {
|
|
820
|
+
this.openDebugApp(type, port, envId, agentId, openDebugPanel !== 'false');
|
|
817
821
|
}
|
|
818
822
|
}
|
|
819
823
|
});
|
|
820
824
|
}
|
|
821
|
-
openDebugApp(type, port, envId, agentId) {
|
|
825
|
+
openDebugApp(type, port, envId, agentId, isOpen = true) {
|
|
822
826
|
setTimeout(() => {
|
|
823
827
|
let url = `http://127.0.0.1:${port}/cloudrun-run-ui/index.html?type=${type}&envId=${envId}&port=${port}`;
|
|
824
828
|
if (type === 'agent') {
|
|
@@ -828,7 +832,7 @@ let CloudRunRunCommand = class CloudRunRunCommand extends common_1.Command {
|
|
|
828
832
|
else {
|
|
829
833
|
console.log(chalk_1.default.green(`点击 [${url}] 可以打开函数调试面板`));
|
|
830
834
|
}
|
|
831
|
-
(0, open_1.default)(url, { wait: false });
|
|
835
|
+
isOpen && (0, open_1.default)(url, { wait: false });
|
|
832
836
|
}, 3000);
|
|
833
837
|
}
|
|
834
838
|
};
|