diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5f9e945..0081953 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -39,7 +39,7 @@ updates: - "picgo-core" - package-ecosystem: npm - directory: "/libs/zhi-picgo-siyuan" + directory: "/libs/Universal-PicGo-Core" schedule: interval: daily time: "00:00" diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..d4aa74c --- /dev/null +++ b/dev.sh @@ -0,0 +1,4 @@ +#/bin/sh + +pnpm build -F zhi-picgo-siyuan +pnpm serve -F picgo-plugin-app diff --git a/libs/PicGo-Core/.eslintignore b/libs/PicGo-Core/.eslintignore new file mode 100644 index 0000000..f06235c --- /dev/null +++ b/libs/PicGo-Core/.eslintignore @@ -0,0 +1,2 @@ +node_modules +dist diff --git a/libs/PicGo-Core/.eslintrc.js b/libs/PicGo-Core/.eslintrc.js new file mode 100644 index 0000000..c52d935 --- /dev/null +++ b/libs/PicGo-Core/.eslintrc.js @@ -0,0 +1,25 @@ +module.exports = { + extends: 'standard-with-typescript', + parserOptions: { + project: './tsconfig.json' + }, + rules: { + '@typescript-eslint/strict-boolean-expressions': 0, + // 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 + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'interface', + format: ['PascalCase'], + custom: { + regex: '^I[A-Z]', + match: true + } + } + ], + '@typescript-eslint/prefer-nullish-coalescing': 0, + '@typescript-eslint/return-await': 0, + '@typescript-eslint/no-floating-promises': 0, + '@typescript-eslint/no-non-null-assertion': 0 + } +} diff --git a/libs/PicGo-Core/.github/workflows/alpha.yml b/libs/PicGo-Core/.github/workflows/alpha.yml new file mode 100644 index 0000000..dd4b345 --- /dev/null +++ b/libs/PicGo-Core/.github/workflows/alpha.yml @@ -0,0 +1,22 @@ +name: publish +on: + push: + branches: + - alpha +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --tag alpha --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/PicGo-Core/.github/workflows/main.yml b/libs/PicGo-Core/.github/workflows/main.yml new file mode 100644 index 0000000..152eb9f --- /dev/null +++ b/libs/PicGo-Core/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: publish +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/PicGo-Core/.github/workflows/manually.yml b/libs/PicGo-Core/.github/workflows/manually.yml new file mode 100644 index 0000000..209ab3c --- /dev/null +++ b/libs/PicGo-Core/.github/workflows/manually.yml @@ -0,0 +1,19 @@ +name: manually-trigger +on: workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/PicGo-Core/.gitignore b/libs/PicGo-Core/.gitignore new file mode 100644 index 0000000..61c5770 --- /dev/null +++ b/libs/PicGo-Core/.gitignore @@ -0,0 +1,7 @@ +node_modules/ +dist/ +.DS_Store +yarn-error.log +temp.js +package-lock.json +test.jpg \ No newline at end of file diff --git a/libs/PicGo-Core/.npmignore b/libs/PicGo-Core/.npmignore new file mode 100644 index 0000000..bdffc2e --- /dev/null +++ b/libs/PicGo-Core/.npmignore @@ -0,0 +1,8 @@ +node_modules/ +yarn-error.log +temp.js +package-lock.json +tsconfig.json +.vscode/ +src/ +.travis.yml diff --git a/libs/PicGo-Core/.travis.yml b/libs/PicGo-Core/.travis.yml new file mode 100644 index 0000000..b910861 --- /dev/null +++ b/libs/PicGo-Core/.travis.yml @@ -0,0 +1,32 @@ +language: node_js +node_js: stable + +# Travis-CI Caching +cache: + directories: + - node_modules + yarn: true + +# S: Build Lifecycle +install: + - yarn + +stages: + - name: deploy + +jobs: + include: + - stage: deploy + script: + - npm run build + deploy: + edge: true + provider: npm + email: "marksz@teamsz.xyz" + api_key: "${NPM_TOKEN}" + skip_cleanup: true + on: + branch: master +branches: + only: + - master diff --git a/libs/PicGo-Core/.vscode/launch.json b/libs/PicGo-Core/.vscode/launch.json new file mode 100644 index 0000000..3a84132 --- /dev/null +++ b/libs/PicGo-Core/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/bin/picgo", + "args": [ + "upload" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js" + ] + } + ] +} diff --git a/libs/PicGo-Core/.vscode/settings.json b/libs/PicGo-Core/.vscode/settings.json new file mode 100644 index 0000000..95175e1 --- /dev/null +++ b/libs/PicGo-Core/.vscode/settings.json @@ -0,0 +1,33 @@ +{ + "files.trimTrailingWhitespace": true, + "editor.formatOnSave": false, + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "eslint.enable": true, + "eslint.alwaysShowStatus": true, + "editor.tabSize": 2, + "cSpell.words": [ + "aliyun", + "applescript", + "commitlint", + "copyfiles", + "imgur", + "Molunerfinn", + "picgo", + "qiniu", + "smms", + "tcyun", + "uploader", + "uploaders", + "upyun", + "weibo" + ], + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/libs/PicGo-Core/.vscode/tasks.json b/libs/PicGo-Core/.vscode/tasks.json new file mode 100644 index 0000000..8e04634 --- /dev/null +++ b/libs/PicGo-Core/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "debug", + "problemMatcher": [], + "label": "npm: debug", + "detail": "tsc -p . --sourcemap && npm run copy", + } + ] +} \ No newline at end of file diff --git a/libs/PicGo-Core/CHANGELOG.md b/libs/PicGo-Core/CHANGELOG.md new file mode 100644 index 0000000..86beadb --- /dev/null +++ b/libs/PicGo-Core/CHANGELOG.md @@ -0,0 +1,613 @@ +## :tada: 1.5.6 (2023-09-06) + + +### :bug: Bug Fixes + +* logLevel bug ([7c24d50](https://github.com/PicGo/PicGo-Core/commit/7c24d50)) + + + +## :tada: 1.5.5 (2023-08-26) + + +### :sparkles: Features + +* support buffer image upload ([70f6529](https://github.com/PicGo/PicGo-Core/commit/70f6529)) +* support ENDPOINT for Tencent COS ([#155](https://github.com/PicGo/PicGo-Core/issues/155)) ([42494ac](https://github.com/PicGo/PicGo-Core/commit/42494ac)) +* support upload buffer ([#152](https://github.com/PicGo/PicGo-Core/issues/152)) ([54c05be](https://github.com/PicGo/PicGo-Core/commit/54c05be)) +* **tcyun:** add slim section ([#156](https://github.com/PicGo/PicGo-Core/issues/156)) ([30ee4fc](https://github.com/PicGo/PicGo-Core/commit/30ee4fc)) + + + +## :tada: 1.5.4 (2023-07-08) + + +### :sparkles: Features + +* change proxy\registry -> npmProxy ([9bedce3](https://github.com/PicGo/PicGo-Core/commit/9bedce3)) + + + +## :tada: 1.5.3 (2023-05-07) + + +### :sparkles: Features + +* update encodeOutputURL behavior ([82347ff](https://github.com/PicGo/PicGo-Core/commit/82347ff)) + + + +## :tada: 1.5.2 (2023-05-07) + + +### :bug: Bug Fixes + +* fileName urlencode bug & github duplicate error ([c22492b](https://github.com/PicGo/PicGo-Core/commit/c22492b)), closes [Molunerfinn/PicGo#1105](https://github.com/Molunerfinn/PicGo/issues/1105) + + + +## :tada: 1.5.1 (2023-04-09) + + +### :sparkles: Features + +* add mime-types for some uploaders ([fb59681](https://github.com/PicGo/PicGo-Core/commit/fb59681)) +* add settings.encodeOutputURL options for URL encode ([2b9c791](https://github.com/PicGo/PicGo-Core/commit/2b9c791)) + + +### :bug: Bug Fixes + +* smms error message is an object ([527d19e](https://github.com/PicGo/PicGo-Core/commit/527d19e)) +* tencent cos UA bug ([cb64d84](https://github.com/PicGo/PicGo-Core/commit/cb64d84)) + + + +# :tada: 1.5.0 (2022-11-13) + + + +# :tada: 1.5.0-alpha.17 (2022-11-13) + + +### :sparkles: Features + +* update picgo.use ([e19bb6e](https://github.com/PicGo/PicGo-Core/commit/e19bb6e)) + + +### :bug: Bug Fixes + +* some case will cause proxy not work ([6272303](https://github.com/PicGo/PicGo-Core/commit/6272303)) + + + +# :tada: 1.5.0-alpha.16 (2022-11-09) + + +### :bug: Bug Fixes + +* upyun url-options is not required ([9736a11](https://github.com/PicGo/PicGo-Core/commit/9736a11)) + + + +# :tada: 1.5.0-alpha.15 (2022-10-24) + + +### :bug: Bug Fixes + +* tencent cos url encode bug ([eafb70f](https://github.com/PicGo/PicGo-Core/commit/eafb70f)) + + + +# :tada: 1.5.0-alpha.14 (2022-10-24) + + +### :bug: Bug Fixes + +* url encode bug ([4c70e9b](https://github.com/PicGo/PicGo-Core/commit/4c70e9b)) + + + +# :tada: 1.5.0-alpha.13 (2022-10-19) + + +### :bug: Bug Fixes + +* type error ([b934e8a](https://github.com/PicGo/PicGo-Core/commit/b934e8a)) + + +### :package: Chore + +* create oldRequest types ([749359a](https://github.com/PicGo/PicGo-Core/commit/749359a)) + + + +# :tada: 1.5.0-alpha.12 (2022-10-14) + + +### :bug: Bug Fixes + +* types bug ([d77e6f3](https://github.com/PicGo/PicGo-Core/commit/d77e6f3)) + + + +# :tada: 1.5.0-alpha.11 (2022-10-13) + + + +# :tada: 1.5.0-alpha.10 (2022-09-25) + + +### :sparkles: Features + +* add zh-TW ([#135](https://github.com/PicGo/PicGo-Core/issues/135)) ([d111d6a](https://github.com/PicGo/PicGo-Core/commit/d111d6a)) +* update linux.sh ([#134](https://github.com/PicGo/PicGo-Core/issues/134)) ([2910c20](https://github.com/PicGo/PicGo-Core/commit/2910c20)) + + +### :bug: Bug Fixes + +* some texts in zh-TW ([#136](https://github.com/PicGo/PicGo-Core/issues/136)) ([907e6c9](https://github.com/PicGo/PicGo-Core/commit/907e6c9)) +* url image download bug & tencent cos url encode bug ([53d54f8](https://github.com/PicGo/PicGo-Core/commit/53d54f8)) + + + +# :tada: 1.5.0-alpha.9 (2022-09-03) + + +### :sparkles: Features + +* finish request -> axios ([b89cf1e](https://github.com/PicGo/PicGo-Core/commit/b89cf1e)) + + +### :bug: Bug Fixes + +* qiniu error msg can't show ([0e4661b](https://github.com/PicGo/PicGo-Core/commit/0e4661b)) +* sm.ms backupDomain message text ([45424d1](https://github.com/PicGo/PicGo-Core/commit/45424d1)) +* when request-options resolveWithFullResponse is false bug ([eb8217a](https://github.com/PicGo/PicGo-Core/commit/eb8217a)) + + + +# :tada: 1.5.0-alpha.8 (2022-08-27) + + +### :sparkles: Features + +* add backupDomain for sm.ms ([c6d54f1](https://github.com/PicGo/PicGo-Core/commit/c6d54f1)) +* add debug logger type ([4342268](https://github.com/PicGo/PicGo-Core/commit/4342268)) +* add picgo.use for easily using plugin ([c0107f1](https://github.com/PicGo/PicGo-Core/commit/c0107f1)) + + +### :bug: Bug Fixes + +* sometime tencent-cloud error message is empty ([6355e1b](https://github.com/PicGo/PicGo-Core/commit/6355e1b)) + + + +# :tada: 1.5.0-alpha.7 (2022-08-20) + + +### :sparkles: Features + +* finish i18n text ([11b3197](https://github.com/PicGo/PicGo-Core/commit/11b3197)) + + +### :bug: Bug Fixes + +* aliyun content-type -> Content-Type ([a649fcc](https://github.com/PicGo/PicGo-Core/commit/a649fcc)) + + + +# :tada: 1.5.0-alpha.6 (2022-08-17) + + +### :bug: Bug Fixes + +* tencent cos upload error ([61df53a](https://github.com/PicGo/PicGo-Core/commit/61df53a)) + + + +# :tada: 1.5.0-alpha.5 (2022-07-31) + + +### :sparkles: Features + +* add log file size limit ([158be01](https://github.com/PicGo/PicGo-Core/commit/158be01)) +* change inner db to @picgo/store ([0e90af3](https://github.com/PicGo/PicGo-Core/commit/0e90af3)) + + +### :bug: Bug Fixes + +* build error ([674a6b5](https://github.com/PicGo/PicGo-Core/commit/674a6b5)) + + + +# :tada: 1.5.0-alpha.4 (2022-05-26) + + +### :sparkles: Features + +* add userAgent for tencent cloud COS ([acac59a](https://github.com/PicGo/PicGo-Core/commit/acac59a)) + + + +# :tada: 1.5.0-alpha.3 (2022-04-04) + + +### :bug: Bug Fixes + +* picgo-gui clipboard image uploading error ([1302f76](https://github.com/PicGo/PicGo-Core/commit/1302f76)) + + + +# :tada: 1.5.0-alpha.2 (2022-04-03) + + +### :sparkles: Features + +* add wayland support for linux ([#119](https://github.com/PicGo/PicGo-Core/issues/119)) ([28905f2](https://github.com/PicGo/PicGo-Core/commit/28905f2)) + + +### :bug: Bug Fixes + +* qiniu && upyun errors ([587dd3f](https://github.com/PicGo/PicGo-Core/commit/587dd3f)) + + + +# :tada: 1.5.0-alpha.1 (2022-03-08) + + +### :sparkles: Features + +* add options for tencent cos ([1fccdcc](https://github.com/PicGo/PicGo-Core/commit/1fccdcc)), closes [#117](https://github.com/PicGo/PicGo-Core/issues/117) +* **i18n:** add i18n for picgo ([4b93a76](https://github.com/PicGo/PicGo-Core/commit/4b93a76)) + + +### :bug: Bug Fixes + +* build error in windows ([5616fb9](https://github.com/PicGo/PicGo-Core/commit/5616fb9)) + + +### :package: Chore + +* add alpha branch for alpha version ([6882022](https://github.com/PicGo/PicGo-Core/commit/6882022)), closes [#106](https://github.com/PicGo/PicGo-Core/issues/106) + + + +# :tada: 1.5.0-alpha.0 (2021-10-26) + + +### :package: Chore + +* **build:** migrate to esbuild and change export assignment to esm export ([#102](https://github.com/PicGo/PicGo-Core/issues/102)) ([2a6cd18](https://github.com/PicGo/PicGo-Core/commit/2a6cd18)) + + + +## :tada: 1.4.26 (2021-08-23) + + +### :bug: Bug Fixes + +* engine bug in package.json ([1c65144](https://github.com/PicGo/PicGo-Core/commit/1c65144)) + + + +## :tada: 1.4.25 (2021-08-21) + + +### :bug: Bug Fixes + +* handle clipboard file path error ([ff4ec86](https://github.com/PicGo/PicGo-Core/commit/ff4ec86)), closes [#97](https://github.com/PicGo/PicGo-Core/issues/97) +* **error:** throw error when transform failed ([#96](https://github.com/PicGo/PicGo-Core/issues/96)) ([57fce75](https://github.com/PicGo/PicGo-Core/commit/57fce75)) +* clipboard path contains space ([#95](https://github.com/PicGo/PicGo-Core/issues/95)) ([d2b73c1](https://github.com/PicGo/PicGo-Core/commit/d2b73c1)) + + + +## :tada: 1.4.24 (2021-08-01) + + +### :sparkles: Features + +* uploaded now can be modified since picgo will not use this value ([b6a8b58](https://github.com/PicGo/PicGo-Core/commit/b6a8b58)) + + + +## :tada: 1.4.23 (2021-07-27) + + +### :bug: Bug Fixes + +* cases when clipboard of wsl contain image file ([#91](https://github.com/PicGo/PicGo-Core/issues/91)) ([adfc55e](https://github.com/PicGo/PicGo-Core/commit/adfc55e)) + + +### :package: Chore + +* add github actions for publishing ([caae80e](https://github.com/PicGo/PicGo-Core/commit/caae80e)) + + + +## :tada: 1.4.22 (2021-07-27) + + +### :sparkles: Features + +* **smms:** smms now supports image without token ([#89](https://github.com/PicGo/PicGo-Core/issues/89)) ([456b81c](https://github.com/PicGo/PicGo-Core/commit/456b81c)) +* add support for clipboard in wsl ([#87](https://github.com/PicGo/PicGo-Core/issues/87)) ([3e230de](https://github.com/PicGo/PicGo-Core/commit/3e230de)) + + + +## :tada: 1.4.21 (2021-05-09) + + +### :bug: Bug Fixes + +* output empty after uploading when using isolate context ([79c228b](https://github.com/PicGo/PicGo-Core/commit/79c228b)) + + + +## :tada: 1.4.20 (2021-05-09) + + +### :sparkles: Features + +* add createContext for each upload process ([ecde023](https://github.com/PicGo/PicGo-Core/commit/ecde023)) + + +### :package: Chore + +* add debug launch.json ([9950259](https://github.com/PicGo/PicGo-Core/commit/9950259)) + + + +## :tada: 1.4.19 (2021-04-04) + + +### :sparkles: Features + +* add current uploader && transformer log ([67b2bb1](https://github.com/PicGo/PicGo-Core/commit/67b2bb1)) +* limit some of config's capabilities ([f901505](https://github.com/PicGo/PicGo-Core/commit/f901505)) + + + +## :tada: 1.4.18 (2021-03-06) + + +### :bug: Bug Fixes + +* unregister plugin delete pluginMap ([85228d8](https://github.com/PicGo/PicGo-Core/commit/85228d8)) + + + +## :tada: 1.4.17 (2021-02-09) + + +### :bug: Bug Fixes + +* **type:** type error in index.d.ts ([f617658](https://github.com/PicGo/PicGo-Core/commit/f617658)), closes [#69](https://github.com/PicGo/PicGo-Core/issues/69) + + + +## :tada: 1.4.16 (2021-02-08) + + +### :sparkles: Features + +* add proxy & registry options for pluginHandler ([b10b963](https://github.com/PicGo/PicGo-Core/commit/b10b963)) +* dynamic proxy getter with ctx.Request.request ([687805f](https://github.com/PicGo/PicGo-Core/commit/687805f)), closes [#64](https://github.com/PicGo/PicGo-Core/issues/64) +* supporting install specific version of plugin ([35e15b0](https://github.com/PicGo/PicGo-Core/commit/35e15b0)) + + + +## :tada: 1.4.15 (2021-01-24) + + +### :sparkles: Features + +* add local plugin install/uninstall/update support & imporve plugin name handler ([f8ec464](https://github.com/PicGo/PicGo-Core/commit/f8ec464)) + + + +## :tada: 1.4.14 (2020-12-19) + + +### :bug: Bug Fixes + +* types error ([303a4ec](https://github.com/PicGo/PicGo-Core/commit/303a4ec)) + + + +## :tada: 1.4.13 (2020-12-19) + + +### :sparkles: Features + +* new addPlugin api for node projects ([5a18432](https://github.com/PicGo/PicGo-Core/commit/5a18432)) + + +### :bug: Bug Fixes + +* **type:** some type error ([233a6ca](https://github.com/PicGo/PicGo-Core/commit/233a6ca)) +* pluginLoader can't get the full plugin list ([83535b9](https://github.com/PicGo/PicGo-Core/commit/83535b9)), closes [#60](https://github.com/PicGo/PicGo-Core/issues/60) + + + +## :tada: 1.4.12 (2020-11-04) + + +### :bug: Bug Fixes + +* let tcyun error info more detail ([ddf645f](https://github.com/PicGo/PicGo-Core/commit/ddf645f)) +* not encode before uploading an image with url ([c0aee32](https://github.com/PicGo/PicGo-Core/commit/c0aee32)) +* qiniu error handler ([de94212](https://github.com/PicGo/PicGo-Core/commit/de94212)) + + + +## :tada: 1.4.11 (2020-07-12) + + +### :bug: Bug Fixes + +* initailize db function error ([df7d526](https://github.com/PicGo/PicGo-Core/commit/df7d526)) + + + +## :tada: 1.4.10 (2020-06-28) + + +### :bug: Bug Fixes + +* url image hash bug ([e405221](https://github.com/PicGo/PicGo-Core/commit/e405221)) + + + +## :tada: 1.4.9 (2020-06-27) + + +### :sparkles: Features + +* add plugin running && error logs ([6adc070](https://github.com/PicGo/PicGo-Core/commit/6adc070)) +* **transformer:** add fallback to support more image formats such as HEIC ([0f5d2a9](https://github.com/PicGo/PicGo-Core/commit/0f5d2a9)), closes [#13](https://github.com/PicGo/PicGo-Core/issues/13) + + +### :bug: Bug Fixes + +* multiline logs format ([444a42f](https://github.com/PicGo/PicGo-Core/commit/444a42f)) +* the issue of lost logs ([daa7508](https://github.com/PicGo/PicGo-Core/commit/daa7508)) +* the order of the uploaded list may not be the same as the order entered ([2bf1ed9](https://github.com/PicGo/PicGo-Core/commit/2bf1ed9)), closes [#40](https://github.com/PicGo/PicGo-Core/issues/40) +* unregisterPlugin's bug ([966bfd8](https://github.com/PicGo/PicGo-Core/commit/966bfd8)) + + +### :package: Chore + +* add vscode workspace settings & migrate tslint to eslint ([50a4842](https://github.com/PicGo/PicGo-Core/commit/50a4842)) + + + +## :tada: 1.4.8 (2020-04-04) + + +### :bug: Bug Fixes + +* encode url before finishing ([7a6b39c](https://github.com/PicGo/PicGo-Core/commit/7a6b39c)) +* return true if decodeURI throw error to avoid crash ([d09d77a](https://github.com/PicGo/PicGo-Core/commit/d09d77a)) +* win10 cmd crash bug when "picgo upload" ([#35](https://github.com/PicGo/PicGo-Core/issues/35)) ([deec252](https://github.com/PicGo/PicGo-Core/commit/deec252)) + + + +## :tada: 1.4.7 (2020-03-07) + + +### :sparkles: Features + +* add smms-v2 support ([7e10655](https://github.com/PicGo/PicGo-Core/commit/7e10655)) +* remove weibo support ([96b2b3a](https://github.com/PicGo/PicGo-Core/commit/96b2b3a)) + + +### :pencil: Documentation + +* update README ([aff6326](https://github.com/PicGo/PicGo-Core/commit/aff6326)) + + + +## :tada: 1.4.6 (2020-02-23) + + +### :bug: Bug Fixes + +* auto generate a local png bug ([c54ac67](https://github.com/PicGo/PicGo-Core/commit/c54ac67)) + + + +## :tada: 1.4.5 (2020-02-23) + + +### :sparkles: Features + +* add upload image from URL support ([0d87342](https://github.com/PicGo/PicGo-Core/commit/0d87342)) + + +### :package: Chore + +* travis-ci deploy option ([a2a89cd](https://github.com/PicGo/PicGo-Core/commit/a2a89cd)) + + + +## :tada: 1.4.4 (2019-12-30) + + +### :bug: Bug Fixes + +* image_repeated error from smms ([#28](https://github.com/PicGo/PicGo-Core/issues/28)) ([f246b8d](https://github.com/PicGo/PicGo-Core/commit/f246b8d)) + + + +## :tada: 1.4.3 (2019-12-27) + + +### :sparkles: Features + +* add aliyun optionUrl option ([0a3bdea](https://github.com/PicGo/PicGo-Core/commit/0a3bdea)) + + + +## :tada: 1.4.2 (2019-12-26) + + +### :bug: Bug Fixes + +* cli source ([be6cdcc](https://github.com/PicGo/PicGo-Core/commit/be6cdcc)) + + + +## :tada: 1.4.1 (2019-12-26) + + + +# :tada: 1.4.0 (2019-12-26) + + +### :sparkles: Features + +* add config methods && pluginHandler to ctx ([f9bb9fb](https://github.com/PicGo/PicGo-Core/commit/f9bb9fb)) +* **plugin:** passing environment variables ([50467c7](https://github.com/PicGo/PicGo-Core/commit/50467c7)) + + +### :bug: Bug Fixes + +* correct sm.ms err msg ([#18](https://github.com/PicGo/PicGo-Core/issues/18)) ([f0a4e8a](https://github.com/PicGo/PicGo-Core/commit/f0a4e8a)) +* pluginHandler args length error ([e15eac2](https://github.com/PicGo/PicGo-Core/commit/e15eac2)) + + +### :package: Chore + +* **types:** added typings field to export type inform… ([#23](https://github.com/PicGo/PicGo-Core/issues/23)) ([8bb16e7](https://github.com/PicGo/PicGo-Core/commit/8bb16e7)) + + + +## :tada: 1.3.7 (2019-05-12) + + +### :bug: Bug Fixes + +* **clipboard:** clipboard image getter error in macOS ([8314604](https://github.com/PicGo/PicGo-Core/commit/8314604)) + + + +## :tada: 1.3.6 (2019-04-20) + + +### :bug: Bug Fixes + +* clipboard image upload under win10 ([48b72ed](https://github.com/PicGo/PicGo-Core/commit/48b72ed)) + + + +## :tada: 1.3.5 (2019-04-15) + + +### :bug: Bug Fixes + +* writing log sometimes disappeared ([d36c0ae](https://github.com/PicGo/PicGo-Core/commit/d36c0ae)) + + +### :package: Chore + +* add picgo bump version ([c312302](https://github.com/PicGo/PicGo-Core/commit/c312302)) diff --git a/libs/PicGo-Core/License b/libs/PicGo-Core/License new file mode 100644 index 0000000..7aea152 --- /dev/null +++ b/libs/PicGo-Core/License @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Molunerfinn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libs/PicGo-Core/README.md b/libs/PicGo-Core/README.md new file mode 100644 index 0000000..745a2d4 --- /dev/null +++ b/libs/PicGo-Core/README.md @@ -0,0 +1,116 @@ +# PicGo-Core + +![standard](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square) +![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square) +[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpicgo%2Fpicgo-core%2Fbadge%3Fref%3Dmaster&style=flat-square)](https://actions-badge.atrox.dev/picgo/picgo-core/goto?ref=master) +![npm](https://img.shields.io/npm/v/picgo.svg?style=flat-square) +[![PicGo Convention](https://img.shields.io/badge/picgo-convention-blue.svg?style=flat-square)](https://github.com/PicGo/bump-version) +![node](https://img.shields.io/badge/node-%3E%3D12.0.0-blue?style=flat-square) + +![picgo-core](https://cdn.jsdelivr.net/gh/Molunerfinn/test/picgo/picgo-core-fix.jpg) + +A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) to find powerful plugins. + +**Typora supports PicGo-Core natively**. If you like PicGo-Core and have time, welcome to help me translate the documentation of PicGo-Core into English. + +## Installation + +PicGo should be installed with node.js >= 12 (v1.5.0-alpha.4 and small) & node.js >= 16 (since v1.5.0-alpha.5). + +### Global install + +```bash +npm install picgo -g + +# or + +yarn global add picgo +``` + +### Local install + +```bash +npm install picgo -D + +# or + +yarn add picgo -D +``` + +## Usage + +### Use in CLI + +> PicGo uses `SM.MS` as the default upload pic-bed. + +Show help: + +```bash +$ picgo -h + + Usage: picgo [options] [command] + + Options: + + -v, --version output the version number + -d, --debug debug mode + -s, --silent silent mode + -c, --config set config path + -h, --help output usage information + + Commands: + + install|add install picgo plugin + uninstall|rm uninstall picgo plugin + update update picgo plugin + set|config [name] configure config of picgo modules + upload|u [input...] upload, go go go + use [module] use modules of picgo + init [options]