picgo 1.5.11 → 1.6.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/.node-version +1 -1
- package/README.md +2 -2
- package/dist/core/Lifecycle.d.ts +14 -15
- package/dist/core/PicGo.d.ts +48 -49
- package/dist/i18n/en.d.ts +2 -2
- package/dist/i18n/index.d.ts +18 -18
- package/dist/i18n/zh-CN.d.ts +97 -97
- package/dist/i18n/zh-TW.d.ts +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/Commander.d.ts +22 -22
- package/dist/lib/LifecyclePlugins.d.ts +17 -17
- package/dist/lib/Logger.d.ts +19 -19
- package/dist/lib/PluginHandler.d.ts +10 -10
- package/dist/lib/PluginLoader.d.ts +27 -27
- package/dist/lib/Request.d.ts +12 -12
- package/dist/plugins/commander/config.d.ts +3 -3
- package/dist/plugins/commander/i18n.d.ts +3 -3
- package/dist/plugins/commander/index.d.ts +3 -3
- package/dist/plugins/commander/init.d.ts +3 -3
- package/dist/plugins/commander/pluginHandler.d.ts +3 -3
- package/dist/plugins/commander/proxy.d.ts +3 -3
- package/dist/plugins/commander/setting.d.ts +5 -5
- package/dist/plugins/commander/upload.d.ts +3 -3
- package/dist/plugins/commander/use.d.ts +3 -3
- package/dist/plugins/transformer/base64.d.ts +5 -5
- package/dist/plugins/transformer/index.d.ts +3 -3
- package/dist/plugins/transformer/path.d.ts +5 -5
- package/dist/plugins/uploader/aliyun.d.ts +2 -2
- package/dist/plugins/uploader/github.d.ts +2 -2
- package/dist/plugins/uploader/imgur.d.ts +2 -2
- package/dist/plugins/uploader/index.d.ts +3 -3
- package/dist/plugins/uploader/qiniu.d.ts +2 -2
- package/dist/plugins/uploader/smms.d.ts +2 -2
- package/dist/plugins/uploader/tcyun.d.ts +8 -8
- package/dist/plugins/uploader/upyun.d.ts +2 -2
- package/dist/types/index.d.ts +542 -542
- package/dist/types/oldRequest.d.ts +19 -19
- package/dist/utils/common.d.ts +118 -120
- package/dist/utils/createContext.d.ts +6 -6
- package/dist/utils/db.d.ts +15 -15
- package/dist/utils/enum.d.ts +27 -27
- package/dist/utils/eventBus.d.ts +3 -4
- package/dist/utils/getClipboardImage.d.ts +4 -4
- package/dist/utils/initUtils.d.ts +26 -26
- package/dist/utils/interfaces.d.ts +202 -203
- package/dist/utils/static.d.ts +1 -1
- package/package.json +40 -38
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -25
- package/.github/CODEOWNERS +0 -1
- package/.github/funding.yml +0 -1
- package/.github/workflows/alpha.yml +0 -22
- package/.github/workflows/main.yml +0 -22
- package/.github/workflows/manually.yml +0 -19
- package/CHANGELOG.md +0 -680
- package/logo.png +0 -0
- package/rollup.config.js +0 -87
package/rollup.config.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { terser } from 'rollup-plugin-terser'
|
|
2
|
-
import pkg from './package.json'
|
|
3
|
-
import typescript from 'rollup-plugin-typescript2'
|
|
4
|
-
import commonjs from '@rollup/plugin-commonjs'
|
|
5
|
-
import { string } from 'rollup-plugin-string'
|
|
6
|
-
import json from '@rollup/plugin-json'
|
|
7
|
-
import builtins from 'builtins'
|
|
8
|
-
import replace from '@rollup/plugin-replace'
|
|
9
|
-
const version = process.env.VERSION || pkg.version
|
|
10
|
-
const sourcemap = 'inline'
|
|
11
|
-
const banner = `/*
|
|
12
|
-
* picgo@${version}, https://github.com/PicGo/PicGo-Core
|
|
13
|
-
* (c) 2018-${new Date().getFullYear()} PicGo Group
|
|
14
|
-
* Released under the MIT License.
|
|
15
|
-
*/`
|
|
16
|
-
const input = './src/index.ts'
|
|
17
|
-
|
|
18
|
-
const commonOptions = {
|
|
19
|
-
// Creating regex of the packages to make sure sub-paths of the
|
|
20
|
-
// packages such as `lowdb/adapters/FileSync` are also treated as external
|
|
21
|
-
// See https://github.com/rollup/rollup/issues/3684#issuecomment-926558056
|
|
22
|
-
external: [
|
|
23
|
-
...Object.keys(pkg.dependencies),
|
|
24
|
-
...builtins()
|
|
25
|
-
].map(packageName => new RegExp(`^${packageName}(/.*)?`)),
|
|
26
|
-
plugins: [
|
|
27
|
-
typescript({
|
|
28
|
-
tsconfigOverride: {
|
|
29
|
-
compilerOptions: {
|
|
30
|
-
target: 'ES2017',
|
|
31
|
-
module: 'ES2015'
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
// terser(),
|
|
36
|
-
commonjs(),
|
|
37
|
-
string({
|
|
38
|
-
// Required to be specified
|
|
39
|
-
include: [
|
|
40
|
-
'**/*.applescript',
|
|
41
|
-
'**/*.ps1',
|
|
42
|
-
'**/*.sh'
|
|
43
|
-
]
|
|
44
|
-
}),
|
|
45
|
-
json(),
|
|
46
|
-
replace({
|
|
47
|
-
'process.env.PICGO_VERSION': JSON.stringify(pkg.version),
|
|
48
|
-
preventAssignment: true
|
|
49
|
-
})
|
|
50
|
-
],
|
|
51
|
-
input
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const isDev = process.env.NODE_ENV === 'development'
|
|
55
|
-
|
|
56
|
-
if (!isDev) {
|
|
57
|
-
commonOptions.plugins.push(terser())
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** @type import('rollup').RollupOptions */
|
|
61
|
-
const nodeCjs = {
|
|
62
|
-
output: [{
|
|
63
|
-
file: 'dist/index.cjs.js',
|
|
64
|
-
format: 'cjs',
|
|
65
|
-
banner,
|
|
66
|
-
sourcemap
|
|
67
|
-
}],
|
|
68
|
-
...commonOptions
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const nodeEsm = {
|
|
72
|
-
output: [{
|
|
73
|
-
file: 'dist/index.esm.js',
|
|
74
|
-
format: 'esm',
|
|
75
|
-
banner,
|
|
76
|
-
sourcemap
|
|
77
|
-
}],
|
|
78
|
-
...commonOptions
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const bundles = []
|
|
82
|
-
const env = process.env.BUNDLES || ''
|
|
83
|
-
if (env.includes('cjs')) bundles.push(nodeCjs)
|
|
84
|
-
if (env.includes('esm')) bundles.push(nodeEsm)
|
|
85
|
-
if (bundles.length === 0) bundles.push(nodeCjs, nodeEsm)
|
|
86
|
-
|
|
87
|
-
export default bundles
|