piclist 1.8.9 → 1.8.11

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.
Files changed (61) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.js +50 -29
  3. package/.prettierrc +18 -0
  4. package/CHANGELOG.md +18 -0
  5. package/bin/picgo +25 -25
  6. package/bin/picgo-server +522 -491
  7. package/dist/core/Lifecycle.d.ts +1 -1
  8. package/dist/core/PicGo.d.ts +4 -4
  9. package/dist/i18n/en.d.ts +1 -1
  10. package/dist/i18n/index.d.ts +3 -4
  11. package/dist/i18n/zh-TW.d.ts +1 -1
  12. package/dist/index.cjs.js +2 -2
  13. package/dist/index.esm.js +2 -2
  14. package/dist/lib/Commander.d.ts +2 -2
  15. package/dist/lib/LifecyclePlugins.d.ts +1 -1
  16. package/dist/lib/Logger.d.ts +1 -1
  17. package/dist/lib/PluginHandler.d.ts +1 -1
  18. package/dist/lib/PluginLoader.d.ts +1 -1
  19. package/dist/lib/Request.d.ts +1 -1
  20. package/dist/plugins/beforetransformer/compress.d.ts +1 -1
  21. package/dist/plugins/beforetransformer/watermark.d.ts +1 -1
  22. package/dist/plugins/beforeupload/buildInRename.d.ts +1 -1
  23. package/dist/plugins/commander/config.d.ts +1 -1
  24. package/dist/plugins/commander/i18n.d.ts +1 -1
  25. package/dist/plugins/commander/index.d.ts +1 -1
  26. package/dist/plugins/commander/init.d.ts +1 -1
  27. package/dist/plugins/commander/pluginHandler.d.ts +1 -1
  28. package/dist/plugins/commander/proxy.d.ts +1 -1
  29. package/dist/plugins/commander/setting.d.ts +1 -1
  30. package/dist/plugins/commander/upload.d.ts +1 -1
  31. package/dist/plugins/commander/use.d.ts +1 -1
  32. package/dist/plugins/transformer/base64.d.ts +1 -1
  33. package/dist/plugins/transformer/index.d.ts +1 -1
  34. package/dist/plugins/transformer/path.d.ts +1 -1
  35. package/dist/plugins/uploader/aliyun.d.ts +1 -1
  36. package/dist/plugins/uploader/awss3plist.d.ts +1 -1
  37. package/dist/plugins/uploader/github.d.ts +1 -1
  38. package/dist/plugins/uploader/imgur.d.ts +1 -1
  39. package/dist/plugins/uploader/index.d.ts +1 -1
  40. package/dist/plugins/uploader/local.d.ts +1 -1
  41. package/dist/plugins/uploader/lsky.d.ts +1 -1
  42. package/dist/plugins/uploader/piclist.d.ts +1 -1
  43. package/dist/plugins/uploader/qiniu.d.ts +1 -1
  44. package/dist/plugins/uploader/s3/uploader.d.ts +1 -1
  45. package/dist/plugins/uploader/s3/utils.d.ts +1 -1
  46. package/dist/plugins/uploader/sftp.d.ts +1 -1
  47. package/dist/plugins/uploader/smms.d.ts +1 -1
  48. package/dist/plugins/uploader/tcyun.d.ts +1 -1
  49. package/dist/plugins/uploader/telegraph.d.ts +1 -1
  50. package/dist/plugins/uploader/upyun.d.ts +1 -1
  51. package/dist/plugins/uploader/webdav.d.ts +1 -1
  52. package/dist/types/index.d.ts +5 -5
  53. package/dist/utils/common.d.ts +1 -1
  54. package/dist/utils/createContext.d.ts +1 -1
  55. package/dist/utils/db.d.ts +2 -2
  56. package/dist/utils/getClipboardImage.d.ts +1 -1
  57. package/dist/utils/initUtils.d.ts +1 -1
  58. package/dist/utils/interfaces.d.ts +3 -3
  59. package/dist/utils/sshClient.d.ts +10 -11
  60. package/package.json +10 -7
  61. package/rollup.config.js +93 -93
package/.eslintignore CHANGED
@@ -1,2 +1,6 @@
1
1
  node_modules
2
2
  dist
3
+ webpack.config.js
4
+ .eslintrc.js
5
+ rollup.config.js
6
+ bin/
package/.eslintrc.js CHANGED
@@ -1,29 +1,50 @@
1
- module.exports = {
2
- extends: 'standard-with-typescript',
3
- parserOptions: {
4
- parser: '@typescript-eslint/parser',
5
- project: './tsconfig.json'
6
- },
7
- rules: {
8
- '@typescript-eslint/strict-boolean-expressions': 0,
9
- // 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
10
- '@typescript-eslint/naming-convention': [
11
- 'error',
12
- {
13
- selector: 'interface',
14
- format: ['PascalCase'],
15
- custom: {
16
- regex: '^I[A-Z]',
17
- match: true
18
- }
19
- }
20
- ],
21
- '@typescript-eslint/prefer-nullish-coalescing': 0,
22
- '@typescript-eslint/return-await': 0,
23
- '@typescript-eslint/no-floating-promises': 0,
24
- '@typescript-eslint/no-non-null-assertion': 0,
25
- "@typescript-eslint/consistent-type-imports": ["error", {
26
- "disallowTypeAnnotations": false
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,21 @@
1
+ ## :tada: 1.8.11 (2024-06-24)
2
+
3
+
4
+ ### :sparkles: Features
5
+
6
+ * **custom:** picgo-server now support configName ([95f9b18](https://github.com/Kuingsmile/PicList-Core/commit/95f9b18))
7
+
8
+
9
+ ### :bug: Bug Fixes
10
+
11
+ * **custom:** remove unused code ([ef137fe](https://github.com/Kuingsmile/PicList-Core/commit/ef137fe))
12
+
13
+
14
+
15
+ ## :tada: 1.8.10 (2024-06-14)
16
+
17
+
18
+
1
19
  ## :tada: 1.8.9 (2024-06-13)
2
20
 
3
21
 
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
+ }