piclist 1.8.10 → 1.8.12
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/.eslintignore +4 -0
- package/.eslintrc.js +50 -29
- package/.prettierrc +18 -0
- package/CHANGELOG.md +23 -0
- package/bin/picgo +25 -25
- package/bin/picgo-server +522 -491
- package/dist/core/Lifecycle.d.ts +1 -1
- package/dist/core/PicGo.d.ts +4 -4
- package/dist/i18n/en.d.ts +1 -1
- package/dist/i18n/index.d.ts +3 -4
- package/dist/i18n/zh-TW.d.ts +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/lib/Commander.d.ts +2 -2
- package/dist/lib/LifecyclePlugins.d.ts +1 -1
- package/dist/lib/Logger.d.ts +1 -1
- package/dist/lib/PluginHandler.d.ts +1 -1
- package/dist/lib/PluginLoader.d.ts +1 -1
- package/dist/lib/Request.d.ts +1 -1
- package/dist/plugins/beforetransformer/compress.d.ts +1 -1
- package/dist/plugins/beforetransformer/watermark.d.ts +1 -1
- package/dist/plugins/beforeupload/buildInRename.d.ts +1 -1
- package/dist/plugins/commander/config.d.ts +1 -1
- package/dist/plugins/commander/i18n.d.ts +1 -1
- package/dist/plugins/commander/index.d.ts +1 -1
- package/dist/plugins/commander/init.d.ts +1 -1
- package/dist/plugins/commander/pluginHandler.d.ts +1 -1
- package/dist/plugins/commander/proxy.d.ts +1 -1
- package/dist/plugins/commander/setting.d.ts +1 -1
- package/dist/plugins/commander/upload.d.ts +1 -1
- package/dist/plugins/commander/use.d.ts +1 -1
- package/dist/plugins/transformer/base64.d.ts +1 -1
- package/dist/plugins/transformer/index.d.ts +1 -1
- package/dist/plugins/transformer/path.d.ts +1 -1
- package/dist/plugins/uploader/aliyun.d.ts +1 -1
- package/dist/plugins/uploader/awss3plist.d.ts +1 -1
- package/dist/plugins/uploader/github.d.ts +1 -1
- package/dist/plugins/uploader/imgur.d.ts +1 -1
- package/dist/plugins/uploader/index.d.ts +1 -1
- package/dist/plugins/uploader/local.d.ts +1 -1
- package/dist/plugins/uploader/lsky.d.ts +1 -1
- package/dist/plugins/uploader/piclist.d.ts +1 -1
- package/dist/plugins/uploader/qiniu.d.ts +1 -1
- package/dist/plugins/uploader/s3/uploader.d.ts +1 -1
- package/dist/plugins/uploader/s3/utils.d.ts +1 -1
- package/dist/plugins/uploader/sftp.d.ts +1 -1
- package/dist/plugins/uploader/smms.d.ts +1 -1
- package/dist/plugins/uploader/tcyun.d.ts +1 -1
- package/dist/plugins/uploader/telegraph.d.ts +1 -1
- package/dist/plugins/uploader/upyun.d.ts +1 -1
- package/dist/plugins/uploader/webdav.d.ts +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/utils/common.d.ts +4 -5
- package/dist/utils/createContext.d.ts +1 -1
- package/dist/utils/db.d.ts +2 -2
- package/dist/utils/getClipboardImage.d.ts +1 -1
- package/dist/utils/initUtils.d.ts +1 -1
- package/dist/utils/interfaces.d.ts +3 -3
- package/dist/utils/sshClient.d.ts +10 -11
- package/package.json +6 -4
- package/rollup.config.js +93 -93
package/.eslintignore
CHANGED
package/.eslintrc.js
CHANGED
|
@@ -1,29 +1,50 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'eslint:recommended',
|
|
4
|
+
'plugin:@typescript-eslint/recommended',
|
|
5
|
+
'plugin:import/recommended',
|
|
6
|
+
'plugin:import/typescript',
|
|
7
|
+
'plugin:n/recommended',
|
|
8
|
+
'plugin:prettier/recommended',
|
|
9
|
+
],
|
|
10
|
+
parser: '@typescript-eslint/parser',
|
|
11
|
+
plugins: ['@typescript-eslint', 'import'],
|
|
12
|
+
rules: {
|
|
13
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/ef88a696a157f617d38ce6d49207a4a4a089a19b/packages/eslint-plugin/docs/rules/naming-convention.md#enforce-that-interface-names-do-not-begin-with-an-i
|
|
14
|
+
'@typescript-eslint/naming-convention': [
|
|
15
|
+
'error',
|
|
16
|
+
{
|
|
17
|
+
selector: 'interface',
|
|
18
|
+
format: ['PascalCase'],
|
|
19
|
+
custom: {
|
|
20
|
+
regex: '^I[A-Z]',
|
|
21
|
+
match: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
26
|
+
'@typescript-eslint/no-non-null-assertion': 0,
|
|
27
|
+
'@typescript-eslint/no-explicit-any': 0,
|
|
28
|
+
'import/no-named-as-default': 0,
|
|
29
|
+
'n/no-missing-import': 0,
|
|
30
|
+
'n/no-process-exit': 0,
|
|
31
|
+
'prettier/prettier': [
|
|
32
|
+
'error',
|
|
33
|
+
{},
|
|
34
|
+
{
|
|
35
|
+
usePrettierrc: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
settings: {
|
|
40
|
+
'import/parsers': {
|
|
41
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
42
|
+
},
|
|
43
|
+
'import/resolver': {
|
|
44
|
+
typescript: {
|
|
45
|
+
alwaysTryTypes: true,
|
|
46
|
+
project: './tsconfig.json',
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
}
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "avoid",
|
|
3
|
+
"bracketSpacing": true,
|
|
4
|
+
"htmlWhitespaceSensitivity": "css",
|
|
5
|
+
"insertPragma": false,
|
|
6
|
+
"jsxBracketSameLine": false,
|
|
7
|
+
"jsxSingleQuote": true,
|
|
8
|
+
"printWidth": 120,
|
|
9
|
+
"proseWrap": "always",
|
|
10
|
+
"quoteProps": "as-needed",
|
|
11
|
+
"requirePragma": false,
|
|
12
|
+
"semi": false,
|
|
13
|
+
"singleQuote": true,
|
|
14
|
+
"tabWidth": 2,
|
|
15
|
+
"trailingComma": "none",
|
|
16
|
+
"useTabs": false,
|
|
17
|
+
"endOfLine": "lf"
|
|
18
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## :tada: 1.8.12 (2024-06-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### :sparkles: Features
|
|
5
|
+
|
|
6
|
+
* **custom:** optimize upload progress event ([048b338](https://github.com/Kuingsmile/PicList-Core/commit/048b338))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## :tada: 1.8.11 (2024-06-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### :sparkles: Features
|
|
14
|
+
|
|
15
|
+
* **custom:** picgo-server now support configName ([95f9b18](https://github.com/Kuingsmile/PicList-Core/commit/95f9b18))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **custom:** remove unused code ([ef137fe](https://github.com/Kuingsmile/PicList-Core/commit/ef137fe))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
1
24
|
## :tada: 1.8.10 (2024-06-14)
|
|
2
25
|
|
|
3
26
|
|
package/bin/picgo
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const path = require('path')
|
|
3
|
-
const minimist = require('minimist')
|
|
4
|
-
const os = require('os')
|
|
5
|
-
|
|
6
|
-
const argv = minimist(process.argv.slice(2))
|
|
7
|
-
let configPath = argv.c || argv.config || ''
|
|
8
|
-
if (configPath !== true && configPath !== '') {
|
|
9
|
-
configPath = configPath.replace(/^~/, os.homedir())
|
|
10
|
-
configPath = path.resolve(configPath)
|
|
11
|
-
} else {
|
|
12
|
-
configPath = ''
|
|
13
|
-
}
|
|
14
|
-
const { PicGo } = require('..')
|
|
15
|
-
const picgo = new PicGo(configPath)
|
|
16
|
-
picgo.registerCommands()
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
picgo.cmd.program.parse(process.argv)
|
|
20
|
-
} catch (e) {
|
|
21
|
-
picgo.log.error(e)
|
|
22
|
-
if (process.argv.includes('--debug')) {
|
|
23
|
-
Promise.reject(e)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path')
|
|
3
|
+
const minimist = require('minimist')
|
|
4
|
+
const os = require('os')
|
|
5
|
+
|
|
6
|
+
const argv = minimist(process.argv.slice(2))
|
|
7
|
+
let configPath = argv.c || argv.config || ''
|
|
8
|
+
if (configPath !== true && configPath !== '') {
|
|
9
|
+
configPath = configPath.replace(/^~/, os.homedir())
|
|
10
|
+
configPath = path.resolve(configPath)
|
|
11
|
+
} else {
|
|
12
|
+
configPath = ''
|
|
13
|
+
}
|
|
14
|
+
const { PicGo } = require('..')
|
|
15
|
+
const picgo = new PicGo(configPath)
|
|
16
|
+
picgo.registerCommands()
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
picgo.cmd.program.parse(process.argv)
|
|
20
|
+
} catch (e) {
|
|
21
|
+
picgo.log.error(e)
|
|
22
|
+
if (process.argv.includes('--debug')) {
|
|
23
|
+
Promise.reject(e)
|
|
24
|
+
}
|
|
25
|
+
}
|