universal-picgo 1.8.0

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 (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/README.md +52 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +72224 -0
  6. package/dist/package.json +47 -0
  7. package/dist/src/core/ExternalPicgo.d.ts +24 -0
  8. package/dist/src/core/Lifecycle.d.ts +15 -0
  9. package/dist/src/core/UniversalPicGo.d.ts +47 -0
  10. package/dist/src/db/config/index.d.ts +25 -0
  11. package/dist/src/db/externalPicGo/index.d.ts +24 -0
  12. package/dist/src/db/pluginLoder/index.d.ts +24 -0
  13. package/dist/src/i18n/browserI18nDb.d.ts +16 -0
  14. package/dist/src/i18n/en.d.ts +3 -0
  15. package/dist/src/i18n/index.d.ts +18 -0
  16. package/dist/src/i18n/zh-CN.d.ts +111 -0
  17. package/dist/src/i18n/zh-TW.d.ts +3 -0
  18. package/dist/src/index.d.ts +17 -0
  19. package/dist/src/index.spec.d.ts +1 -0
  20. package/dist/src/lib/LifecyclePlugins.d.ts +18 -0
  21. package/dist/src/lib/PicGoRequest.d.ts +21 -0
  22. package/dist/src/lib/PluginHandler.d.ts +20 -0
  23. package/dist/src/lib/PluginLoader.d.ts +29 -0
  24. package/dist/src/plugins/transformer/base64.d.ts +6 -0
  25. package/dist/src/plugins/transformer/index.d.ts +4 -0
  26. package/dist/src/plugins/transformer/path.d.ts +6 -0
  27. package/dist/src/plugins/uploader/aliyun/index.d.ts +3 -0
  28. package/dist/src/plugins/uploader/aliyun/node.d.ts +4 -0
  29. package/dist/src/plugins/uploader/aliyun/web.d.ts +4 -0
  30. package/dist/src/plugins/uploader/github.d.ts +3 -0
  31. package/dist/src/plugins/uploader/gitlab.d.ts +3 -0
  32. package/dist/src/plugins/uploader/imgur.d.ts +3 -0
  33. package/dist/src/plugins/uploader/index.d.ts +4 -0
  34. package/dist/src/plugins/uploader/qiniu/digest.d.ts +7 -0
  35. package/dist/src/plugins/uploader/qiniu/index.d.ts +3 -0
  36. package/dist/src/plugins/uploader/qiniu/rs.d.ts +13 -0
  37. package/dist/src/plugins/uploader/qiniu/util.d.ts +8 -0
  38. package/dist/src/plugins/uploader/smms.d.ts +3 -0
  39. package/dist/src/plugins/uploader/tcyun.d.ts +9 -0
  40. package/dist/src/plugins/uploader/upyun/index.d.ts +3 -0
  41. package/dist/src/utils/CodingUtil.d.ts +39 -0
  42. package/dist/src/utils/CodingUtil.spec.d.ts +1 -0
  43. package/dist/src/utils/browserUtils.d.ts +12 -0
  44. package/dist/src/utils/clipboard/browser.d.ts +4 -0
  45. package/dist/src/utils/clipboard/electron.d.ts +4 -0
  46. package/dist/src/utils/cmd/index.d.ts +37 -0
  47. package/dist/src/utils/common.d.ts +135 -0
  48. package/dist/src/utils/constants.d.ts +1 -0
  49. package/dist/src/utils/createContext.d.ts +9 -0
  50. package/dist/src/utils/enums.d.ts +32 -0
  51. package/dist/src/utils/eventBus.d.ts +4 -0
  52. package/dist/src/utils/getClipboardImage.d.ts +4 -0
  53. package/dist/src/utils/hashUtil.d.ts +2 -0
  54. package/dist/src/utils/image-size/detector.d.ts +4 -0
  55. package/dist/src/utils/image-size/index.d.ts +12 -0
  56. package/dist/src/utils/image-size/types/bmp.d.ts +3 -0
  57. package/dist/src/utils/image-size/types/cur.d.ts +3 -0
  58. package/dist/src/utils/image-size/types/dds.d.ts +3 -0
  59. package/dist/src/utils/image-size/types/gif.d.ts +3 -0
  60. package/dist/src/utils/image-size/types/heif.d.ts +3 -0
  61. package/dist/src/utils/image-size/types/icns.d.ts +3 -0
  62. package/dist/src/utils/image-size/types/ico.d.ts +3 -0
  63. package/dist/src/utils/image-size/types/index.d.ts +21 -0
  64. package/dist/src/utils/image-size/types/interface.d.ts +15 -0
  65. package/dist/src/utils/image-size/types/j2c.d.ts +3 -0
  66. package/dist/src/utils/image-size/types/jp2.d.ts +3 -0
  67. package/dist/src/utils/image-size/types/jpg.d.ts +3 -0
  68. package/dist/src/utils/image-size/types/ktx.d.ts +3 -0
  69. package/dist/src/utils/image-size/types/png.d.ts +3 -0
  70. package/dist/src/utils/image-size/types/pnm.d.ts +3 -0
  71. package/dist/src/utils/image-size/types/psd.d.ts +3 -0
  72. package/dist/src/utils/image-size/types/svg.d.ts +3 -0
  73. package/dist/src/utils/image-size/types/tga.d.ts +3 -0
  74. package/dist/src/utils/image-size/types/tiff.d.ts +3 -0
  75. package/dist/src/utils/image-size/types/utils.d.ts +17 -0
  76. package/dist/src/utils/image-size/types/webp.d.ts +3 -0
  77. package/dist/src/utils/nodePolyfill.d.ts +4 -0
  78. package/dist/src/utils/nodeUtils.d.ts +31 -0
  79. package/dist/src/utils/os/index.d.ts +3 -0
  80. package/dist/src/utils/os/is-docker/index.d.ts +2 -0
  81. package/dist/src/utils/os/is-inside-container/index.d.ts +1 -0
  82. package/dist/src/utils/os/is-wsl/index.d.ts +2 -0
  83. package/dist/src/utils/picgoEventBus.d.ts +4 -0
  84. package/dist/vite.config.d.ts +2 -0
  85. package/package.json +47 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Terwer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # universal-picgo
2
+
3
+ picgo lib for node, browser and electron
4
+
5
+ ## Usage
6
+
7
+ ```js
8
+ // usage
9
+ import { UniversalPicGo } from "universal-picgo"
10
+
11
+ try {
12
+ const picgo = new UniversalPicGo()
13
+ console.log("picgo =>", picgo)
14
+
15
+ const result = await picgo.upload()
16
+ console.log("upload success =>", result)
17
+ } catch (e: any) {
18
+ console.error(e)
19
+ }
20
+ ```
21
+
22
+ ## Deps
23
+
24
+ ```
25
+ ├── universal-picgo-store
26
+ ```
27
+
28
+ ## Dev
29
+
30
+ ```bash
31
+ pnpm dev -F universal-picgo
32
+ ```
33
+
34
+ ## Build
35
+
36
+ ```bash
37
+ pnpm build -F universal-picgo
38
+ ```
39
+
40
+ ## Test
41
+
42
+ Execute the unit tests via [vitest](https://vitest.dev)
43
+
44
+ ```bash
45
+ pnpm test -F universal-picgo
46
+ ```
47
+
48
+ ## Publish
49
+
50
+ ```bash
51
+ pnpm publish -F universal-picgo --tag latest
52
+ ```
package/dist/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # universal-picgo
2
+
3
+ picgo lib for node, browser and electron
4
+
5
+ ## Usage
6
+
7
+ ```js
8
+ // usage
9
+ import { UniversalPicGo } from "universal-picgo"
10
+
11
+ try {
12
+ const picgo = new UniversalPicGo()
13
+ console.log("picgo =>", picgo)
14
+
15
+ const result = await picgo.upload()
16
+ console.log("upload success =>", result)
17
+ } catch (e: any) {
18
+ console.error(e)
19
+ }
20
+ ```
21
+
22
+ ## Deps
23
+
24
+ ```
25
+ ├── universal-picgo-store
26
+ ```
27
+
28
+ ## Dev
29
+
30
+ ```bash
31
+ pnpm dev -F universal-picgo
32
+ ```
33
+
34
+ ## Build
35
+
36
+ ```bash
37
+ pnpm build -F universal-picgo
38
+ ```
39
+
40
+ ## Test
41
+
42
+ Execute the unit tests via [vitest](https://vitest.dev)
43
+
44
+ ```bash
45
+ pnpm test -F universal-picgo
46
+ ```
47
+
48
+ ## Publish
49
+
50
+ ```bash
51
+ pnpm publish -F universal-picgo --tag latest
52
+ ```
@@ -0,0 +1 @@
1
+ export * from './src/index'