@cloudstudio/editor-sdk
Advanced tools
Comparing version 0.0.9 to 0.0.10
{ | ||
"name": "@cloudstudio/editor-sdk", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Cloud Studio Editor SDK", | ||
@@ -42,3 +42,3 @@ "browser": "dist/index.js", | ||
}, | ||
"gitHead": "180328205adcad450da6060164ca94e1ad34de56" | ||
"gitHead": "ea125c71e89d5c2af27b355f86fa0c2be491c926" | ||
} |
@@ -37,7 +37,28 @@ # Cloud Studio Editor SDK | ||
// 执行云部署套件的函数部署命令: `deploykit.deploy` | ||
await commandService.executeCommand('deploykit.deploy', { notice: true }); | ||
await commandService.executeCommand('deploykit.deploy', { | ||
notice: true, | ||
deployConfig: { | ||
runtime: 'default', | ||
buildCommand: 'yarn build', // 部署前,项目构建命令 | ||
cloud: { | ||
disableProjectId: true, | ||
region: 'ap-guangzhou', | ||
namespace: { | ||
name: 'defalut' | ||
}, | ||
'function': { | ||
name: 'foo', | ||
codeUri: '${projectDir}/dist' // ${projectDir} 为项目根目录 | ||
} | ||
} | ||
} | ||
}); | ||
// 对光标所在位置进行代码的插入 | ||
await commandService!.executeCommand('cloudstudio.insertTextForCursorPosition', 'text1'); | ||
// 保持所有未保存的文件 | ||
await commandService!.executeCommand('saveAll'); | ||
// 获取当前光标所在文件的文件路径 | ||
@@ -44,0 +65,0 @@ const { schema, path } = await commandService!.executeCommand('cloudstudio.getActiveCodeEditorUri'); |
159262
93