@qse/ssh-sftp 1.3.0 → 1.3.1
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/CHANGELOG.md +4 -0
- package/package.json +4 -4
- package/src/index.js +3 -11
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qse/ssh-sftp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "教育代码部署工具",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Ironkinoko <kinoko_main@outlook.com>",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@inquirer/prompts": "^8.3.0",
|
|
29
30
|
"chalk": "^5.6.2",
|
|
30
31
|
"glob": "^13.0.0",
|
|
31
|
-
"inquirer": "^13.1.0",
|
|
32
32
|
"minimatch": "^10.1.1",
|
|
33
33
|
"ora": "^9.0.0",
|
|
34
34
|
"p-limit": "^7.3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"yargs": "^18.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"
|
|
39
|
+
"@qse/eslint-config": "^1.0.0",
|
|
40
|
+
"eslint": "^10.0.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import ora from 'ora'
|
|
|
3
3
|
import * as glob from 'glob'
|
|
4
4
|
import fs from 'fs'
|
|
5
5
|
import * as minimatch from 'minimatch'
|
|
6
|
-
import inquirer from 'inquirer'
|
|
6
|
+
import * as inquirer from '@inquirer/prompts'
|
|
7
7
|
import { exitWithError, injectTiming, warn } from './utils.js'
|
|
8
8
|
import chalk from 'chalk'
|
|
9
9
|
import { presets, servers } from './presets.js'
|
|
@@ -145,12 +145,7 @@ async function _sshSftp(opts) {
|
|
|
145
145
|
if (opts.skipPrompt) {
|
|
146
146
|
confirm = true
|
|
147
147
|
} else {
|
|
148
|
-
|
|
149
|
-
name: 'confirm',
|
|
150
|
-
message: `远程文件夹不存在,是否要创建一个`,
|
|
151
|
-
type: 'confirm',
|
|
152
|
-
})
|
|
153
|
-
confirm = ans.confirm
|
|
148
|
+
confirm = await inquirer.confirm({ message: `远程文件夹不存在,是否要创建一个` })
|
|
154
149
|
}
|
|
155
150
|
|
|
156
151
|
if (confirm) {
|
|
@@ -184,10 +179,8 @@ async function _sshSftp(opts) {
|
|
|
184
179
|
let confirm = Confirm.delete
|
|
185
180
|
if (remoteDeletefiles.length > localUploadFiles.length && !opts.skipPrompt) {
|
|
186
181
|
const showSelect = async () => {
|
|
187
|
-
|
|
188
|
-
name: 'confirm',
|
|
182
|
+
return await inquirer.select({
|
|
189
183
|
message: `远程需要删除的文件数(${remoteDeletefiles.length})比本地(${localUploadFiles.length})多,确定要删除吗?`,
|
|
190
|
-
type: 'list',
|
|
191
184
|
choices: [
|
|
192
185
|
{ name: '删除', value: Confirm.delete },
|
|
193
186
|
{ name: '不删除,继续部署', value: Confirm.skip },
|
|
@@ -195,7 +188,6 @@ async function _sshSftp(opts) {
|
|
|
195
188
|
{ name: '显示需要删除的文件', value: Confirm.showDeleteFile },
|
|
196
189
|
],
|
|
197
190
|
})
|
|
198
|
-
return confirm
|
|
199
191
|
}
|
|
200
192
|
|
|
201
193
|
do {
|