piclist 0.8.4 → 0.8.6
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/dist/i18n/zh-CN.d.ts +22 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/plugins/uploader/sftp.d.ts +2 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/utils/sshClient.d.ts +16 -0
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -364,6 +364,20 @@ export interface IWebdavPlistConfig {
|
|
|
364
364
|
/** webdav 的 `customUrl` */
|
|
365
365
|
customUrl: string;
|
|
366
366
|
}
|
|
367
|
+
/** 内置sftp 图床配置项 */
|
|
368
|
+
export interface ISftpPlistConfig {
|
|
369
|
+
host: string;
|
|
370
|
+
port?: number;
|
|
371
|
+
username: string;
|
|
372
|
+
password?: string;
|
|
373
|
+
privateKey?: string;
|
|
374
|
+
passphrase?: string;
|
|
375
|
+
uploadPath?: string;
|
|
376
|
+
customUrl?: string;
|
|
377
|
+
webPath?: string;
|
|
378
|
+
fileUser?: string;
|
|
379
|
+
fileMode?: string;
|
|
380
|
+
}
|
|
367
381
|
/** PicGo 配置文件类型定义 */
|
|
368
382
|
export interface IConfig {
|
|
369
383
|
picBed: {
|
|
@@ -377,6 +391,7 @@ export interface IConfig {
|
|
|
377
391
|
aliyun?: IAliyunConfig;
|
|
378
392
|
imgur?: IImgurConfig;
|
|
379
393
|
webdavplist?: IWebdavPlistConfig;
|
|
394
|
+
local?: ILocalConfig;
|
|
380
395
|
transformer?: string;
|
|
381
396
|
/** for uploader */
|
|
382
397
|
proxy?: string;
|
|
@@ -591,6 +606,7 @@ export interface IBuildInCompressOptions {
|
|
|
591
606
|
isReSize?: boolean;
|
|
592
607
|
reSizeWidth?: number;
|
|
593
608
|
reSizeHeight?: number;
|
|
609
|
+
skipReSizeOfSmallImg?: boolean;
|
|
594
610
|
isReSizeByPercent?: boolean;
|
|
595
611
|
reSizePercent?: number;
|
|
596
612
|
isRotate?: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NodeSSH } from 'node-ssh';
|
|
2
|
+
import { ISftpPlistConfig } from '../types';
|
|
3
|
+
declare class SSHClient {
|
|
4
|
+
private static _instance;
|
|
5
|
+
private static _client;
|
|
6
|
+
private _isConnected;
|
|
7
|
+
static get instance(): SSHClient;
|
|
8
|
+
static get client(): NodeSSH;
|
|
9
|
+
connect(config: ISftpPlistConfig): Promise<boolean>;
|
|
10
|
+
upload(local: string, remote: string): Promise<boolean>;
|
|
11
|
+
private mkdir;
|
|
12
|
+
chown(remote: string, user: string, group?: string): Promise<boolean>;
|
|
13
|
+
private exec;
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
|
16
|
+
export default SSHClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piclist",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Modified PicGo core, A tool for picture uploading",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kuingsmile",
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"util"
|
|
39
39
|
],
|
|
40
40
|
"husky": {
|
|
41
|
-
"hooks": {
|
|
42
|
-
}
|
|
41
|
+
"hooks": {}
|
|
43
42
|
},
|
|
44
43
|
"config": {
|
|
45
44
|
"commitizen": {
|
|
@@ -127,6 +126,7 @@
|
|
|
127
126
|
"mime-types": "2.1.33",
|
|
128
127
|
"minimatch": "^3.0.4",
|
|
129
128
|
"minimist": "^1.2.5",
|
|
129
|
+
"node-ssh": "^13.1.0",
|
|
130
130
|
"qiniu": "^7.8.0",
|
|
131
131
|
"resolve": "^1.8.1",
|
|
132
132
|
"rimraf": "^3.0.2",
|