piclist 1.9.11 → 1.9.13
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/.github/workflows/alpha.yml +21 -21
- package/.github/workflows/docker.yml +42 -42
- package/.github/workflows/main.yml +21 -21
- package/.github/workflows/manually.yml +18 -18
- package/CHANGELOG.md +49 -0
- package/License +22 -22
- package/README.md +25 -15
- package/README_cn.md +25 -15
- package/bin/picgo +25 -25
- package/dist/core/Lifecycle.d.ts +17 -1
- package/dist/i18n/zh-CN.d.ts +23 -15
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/plugins/beforetransformer/skipProcess.d.ts +5 -0
- package/dist/plugins/uploader/utils.d.ts +2 -0
- package/dist/types/index.d.ts +7 -0
- package/docker-compose.yaml +11 -11
- package/package.json +6 -6
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
name: publish
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- alpha
|
|
6
|
-
jobs:
|
|
7
|
-
build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Clone repo
|
|
11
|
-
uses: actions/checkout@v1
|
|
12
|
-
- name: Setup node
|
|
13
|
-
uses: actions/setup-node@v1
|
|
14
|
-
with:
|
|
15
|
-
node-version: '16.x'
|
|
16
|
-
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
- name: Install modules
|
|
18
|
-
run: yarn
|
|
19
|
-
- run: npm run build
|
|
20
|
-
- run: npm publish --tag alpha --access public
|
|
21
|
-
env:
|
|
1
|
+
name: publish
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- alpha
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Clone repo
|
|
11
|
+
uses: actions/checkout@v1
|
|
12
|
+
- name: Setup node
|
|
13
|
+
uses: actions/setup-node@v1
|
|
14
|
+
with:
|
|
15
|
+
node-version: '16.x'
|
|
16
|
+
registry-url: 'https://registry.npmjs.org'
|
|
17
|
+
- name: Install modules
|
|
18
|
+
run: yarn
|
|
19
|
+
- run: npm run build
|
|
20
|
+
- run: npm publish --tag alpha --access public
|
|
21
|
+
env:
|
|
22
22
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
name: Build and Push Docker Image
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- '*'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build-and-push:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout Repository
|
|
14
|
-
uses: actions/checkout@v2
|
|
15
|
-
|
|
16
|
-
- name: Set up Docker Buildx
|
|
17
|
-
uses: docker/setup-buildx-action@v1
|
|
18
|
-
|
|
19
|
-
- name: Login to Docker Hub
|
|
20
|
-
uses: docker/login-action@v1
|
|
21
|
-
with:
|
|
22
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
23
|
-
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
|
24
|
-
|
|
25
|
-
- name: Build and Push Docker Image
|
|
26
|
-
uses: docker/build-push-action@v2
|
|
27
|
-
with:
|
|
28
|
-
context: .
|
|
29
|
-
file: ./Dockerfile
|
|
30
|
-
push: true
|
|
31
|
-
tags: kuingsmile/piclist:latest
|
|
32
|
-
platforms: linux/amd64,linux/arm64
|
|
33
|
-
|
|
34
|
-
- name: Build and Push Docker Image with Tag
|
|
35
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
36
|
-
uses: docker/build-push-action@v2
|
|
37
|
-
with:
|
|
38
|
-
context: .
|
|
39
|
-
file: ./Dockerfile
|
|
40
|
-
push: true
|
|
41
|
-
tags: kuingsmile/piclist:${{ github.ref_name }}
|
|
42
|
-
platforms: linux/amd64,linux/arm64
|
|
1
|
+
name: Build and Push Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-and-push:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout Repository
|
|
14
|
+
uses: actions/checkout@v2
|
|
15
|
+
|
|
16
|
+
- name: Set up Docker Buildx
|
|
17
|
+
uses: docker/setup-buildx-action@v1
|
|
18
|
+
|
|
19
|
+
- name: Login to Docker Hub
|
|
20
|
+
uses: docker/login-action@v1
|
|
21
|
+
with:
|
|
22
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
23
|
+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
|
24
|
+
|
|
25
|
+
- name: Build and Push Docker Image
|
|
26
|
+
uses: docker/build-push-action@v2
|
|
27
|
+
with:
|
|
28
|
+
context: .
|
|
29
|
+
file: ./Dockerfile
|
|
30
|
+
push: true
|
|
31
|
+
tags: kuingsmile/piclist:latest
|
|
32
|
+
platforms: linux/amd64,linux/arm64
|
|
33
|
+
|
|
34
|
+
- name: Build and Push Docker Image with Tag
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
36
|
+
uses: docker/build-push-action@v2
|
|
37
|
+
with:
|
|
38
|
+
context: .
|
|
39
|
+
file: ./Dockerfile
|
|
40
|
+
push: true
|
|
41
|
+
tags: kuingsmile/piclist:${{ github.ref_name }}
|
|
42
|
+
platforms: linux/amd64,linux/arm64
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
name: publish
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
jobs:
|
|
7
|
-
build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Clone repo
|
|
11
|
-
uses: actions/checkout@v1
|
|
12
|
-
- name: Setup node
|
|
13
|
-
uses: actions/setup-node@v1
|
|
14
|
-
with:
|
|
15
|
-
node-version: '16.x'
|
|
16
|
-
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
- name: Install modules
|
|
18
|
-
run: yarn
|
|
19
|
-
- run: npm run build
|
|
20
|
-
- run: npm publish --access public
|
|
21
|
-
env:
|
|
1
|
+
name: publish
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Clone repo
|
|
11
|
+
uses: actions/checkout@v1
|
|
12
|
+
- name: Setup node
|
|
13
|
+
uses: actions/setup-node@v1
|
|
14
|
+
with:
|
|
15
|
+
node-version: '16.x'
|
|
16
|
+
registry-url: 'https://registry.npmjs.org'
|
|
17
|
+
- name: Install modules
|
|
18
|
+
run: yarn
|
|
19
|
+
- run: npm run build
|
|
20
|
+
- run: npm publish --access public
|
|
21
|
+
env:
|
|
22
22
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
name: manually-trigger
|
|
2
|
-
on: workflow_dispatch
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
runs-on: ubuntu-latest
|
|
6
|
-
steps:
|
|
7
|
-
- name: Clone repo
|
|
8
|
-
uses: actions/checkout@v1
|
|
9
|
-
- name: Setup node
|
|
10
|
-
uses: actions/setup-node@v1
|
|
11
|
-
with:
|
|
12
|
-
node-version: '16.x'
|
|
13
|
-
registry-url: 'https://registry.npmjs.org'
|
|
14
|
-
- name: Install modules
|
|
15
|
-
run: yarn
|
|
16
|
-
- run: npm run build
|
|
17
|
-
- run: npm publish --access public
|
|
18
|
-
env:
|
|
1
|
+
name: manually-trigger
|
|
2
|
+
on: workflow_dispatch
|
|
3
|
+
jobs:
|
|
4
|
+
build:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- name: Clone repo
|
|
8
|
+
uses: actions/checkout@v1
|
|
9
|
+
- name: Setup node
|
|
10
|
+
uses: actions/setup-node@v1
|
|
11
|
+
with:
|
|
12
|
+
node-version: '16.x'
|
|
13
|
+
registry-url: 'https://registry.npmjs.org'
|
|
14
|
+
- name: Install modules
|
|
15
|
+
run: yarn
|
|
16
|
+
- run: npm run build
|
|
17
|
+
- run: npm publish --access public
|
|
18
|
+
env:
|
|
19
19
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
## :tada: 1.9.13 (2025-06-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### :sparkles: Features
|
|
5
|
+
|
|
6
|
+
* **custom:** add skip process setting ([81da5b1](https://github.com/Kuingsmile/PicList-Core/commit/81da5b1))
|
|
7
|
+
* **custom:** add webPath support for aliyun ([a81fea6](https://github.com/Kuingsmile/PicList-Core/commit/a81fea6))
|
|
8
|
+
* **custom:** add webPath support for tcyun ([1000c8b](https://github.com/Kuingsmile/PicList-Core/commit/1000c8b))
|
|
9
|
+
* **custom:** add webPath support to custom api ([7e83d0e](https://github.com/Kuingsmile/PicList-Core/commit/7e83d0e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### :bug: Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **custom:** fix an issue where upload will filed caused by backup domain setting ([0a6fdf8](https://github.com/Kuingsmile/PicList-Core/commit/0a6fdf8))
|
|
15
|
+
* **custom:** fix webdav webpath default value bug ([0184100](https://github.com/Kuingsmile/PicList-Core/commit/0184100))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :package: Chore
|
|
19
|
+
|
|
20
|
+
* **custom:** add mcp server configuration ([03cdfe9](https://github.com/Kuingsmile/PicList-Core/commit/03cdfe9))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## :tada: 1.9.12 (2025-06-03)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### :sparkles: Features
|
|
28
|
+
|
|
29
|
+
* **custom:** add error handling for missing SM.MS token in uploader plugin ([b229807](https://github.com/Kuingsmile/PicList-Core/commit/b229807))
|
|
30
|
+
* **custom:** improve image upload handling and error notifications in uploader plugin ([50e8dc8](https://github.com/Kuingsmile/PicList-Core/commit/50e8dc8))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### :bug: Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **custom:** fix typo ([a3dc79b](https://github.com/Kuingsmile/PicList-Core/commit/a3dc79b))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### :package: Chore
|
|
39
|
+
|
|
40
|
+
* **custom:** remove unused files ([0a6827f](https://github.com/Kuingsmile/PicList-Core/commit/0a6827f))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### :pencil: Documentation
|
|
44
|
+
|
|
45
|
+
* **custom:** add DeepWiki reference to English and Chinese README files ([50c4b09](https://github.com/Kuingsmile/PicList-Core/commit/50c4b09))
|
|
46
|
+
* **custom:** update readme ([abc7986](https://github.com/Kuingsmile/PicList-Core/commit/abc7986))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
1
50
|
## :tada: 1.9.11 (2025-02-27)
|
|
2
51
|
|
|
3
52
|
|
package/License
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 Molunerfinn
|
|
4
|
-
Copyright (c) 2023-present Kuingsmile
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Molunerfinn
|
|
4
|
+
Copyright (c) 2023-present Kuingsmile
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -8,30 +8,40 @@ English | [简体中文](./README_cn.md)
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
A tool for
|
|
11
|
+
A powerful tool for image uploading with both CLI & API support. PicList-Core extends PicGo-Core with additional features while maintaining plugin compatibility. Check out [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) for a collection of powerful plugins.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
You can refer to the [DeepWiki of PiclList-Core](https://deepwiki.com/Kuingsmile/PicList-Core/) for more information.
|
|
14
14
|
|
|
15
|
-
**Typora
|
|
15
|
+
**Natively supports Typora integration**.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Enhanced Features
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
19
|
+
- **Image processing capabilities**:
|
|
20
|
+
- Add watermarks, compress images, and convert formats
|
|
21
|
+
- Configure via `picgo set buildin watermark` and `picgo set buildin compress` CLI commands
|
|
22
|
+
- Processing happens during beforeTransform phase, ensuring compatibility with all plugins
|
|
23
|
+
|
|
24
|
+
- **Advanced renaming**:
|
|
25
|
+
- Set custom rename rules via `picgo set buildin rename`
|
|
26
|
+
|
|
27
|
+
- **Additional built-in image hosting services**:
|
|
28
|
+
- WebDAV, SFTP, Local path, AWS S3
|
|
29
|
+
- Improved Imgur support with account-based uploads
|
|
30
|
+
|
|
31
|
+
- **Built-in server**:
|
|
32
|
+
- Similar to PicList-Desktop server
|
|
33
|
+
- Launch with `picgo-server` command
|
|
34
|
+
|
|
35
|
+
- **Bug fixes**:
|
|
36
|
+
- Addresses several issues from the original PicGo-Core
|
|
27
37
|
|
|
28
38
|
## Installation
|
|
29
39
|
|
|
30
|
-
PicList
|
|
40
|
+
PicList requires Node.js >= 16
|
|
31
41
|
|
|
32
|
-
###
|
|
42
|
+
### Prerequisites
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
PicList depends on [sharp](https://sharp.pixelplumbing.com/). Install it first:
|
|
35
45
|
|
|
36
46
|
```bash
|
|
37
47
|
npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
|
package/README_cn.md
CHANGED
|
@@ -8,30 +8,40 @@
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
PicList-Core 是一个功能强大的图片上传工具,提供 CLI 和 API 两种调用方式。它在 PicGo-Core 的基础上增强了功能,同时保持插件兼容性。查看 [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) 获取丰富的插件资源。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
你可以查看 [PiclList-Core 的 DeepWiki](https://deepwiki.com/Kuingsmile/PicList-Core/) 获取更多信息。
|
|
14
14
|
|
|
15
|
-
**原生支持Typora
|
|
15
|
+
**原生支持 Typora 集成**。
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## 增强功能
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
19
|
+
- **图像处理能力**:
|
|
20
|
+
- 添加水印、压缩图片和转换格式
|
|
21
|
+
- 通过 `picgo set buildin watermark` 和 `picgo set buildin compress` CLI 命令进行配置
|
|
22
|
+
- 处理过程发生在 beforeTransform 阶段,确保与所有插件兼容
|
|
23
|
+
|
|
24
|
+
- **高级重命名**:
|
|
25
|
+
- 通过 `picgo set buildin rename` 设置自定义重命名规则
|
|
26
|
+
|
|
27
|
+
- **额外内置图床**:
|
|
28
|
+
- WebDAV、SFTP、本地路径、AWS S3
|
|
29
|
+
- 改进的 Imgur 支持,支持账户上传
|
|
30
|
+
|
|
31
|
+
- **内置服务器**:
|
|
32
|
+
- 类似于 PicList-Desktop 服务器
|
|
33
|
+
- 使用 `picgo-server` 命令启动
|
|
34
|
+
|
|
35
|
+
- **错误修复**:
|
|
36
|
+
- 解决了原始 PicGo-Core 的多个问题
|
|
27
37
|
|
|
28
38
|
## 安装
|
|
29
39
|
|
|
30
|
-
PicList需要
|
|
40
|
+
PicList 需要 Node.js >= 16
|
|
31
41
|
|
|
32
|
-
###
|
|
42
|
+
### 前置条件
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
PicList 依赖 [sharp](https://sharp.pixelplumbing.com/),请先安装它:
|
|
35
45
|
|
|
36
46
|
```bash
|
|
37
47
|
npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
|
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
|
+
}
|
package/dist/core/Lifecycle.d.ts
CHANGED
|
@@ -5,10 +5,26 @@ export declare class Lifecycle extends EventEmitter {
|
|
|
5
5
|
private readonly ctx;
|
|
6
6
|
ttfPath: string;
|
|
7
7
|
constructor(ctx: IPicGo);
|
|
8
|
+
private initializeDirs;
|
|
8
9
|
private downloadTTF;
|
|
9
|
-
private
|
|
10
|
+
private getProcessingOptions;
|
|
11
|
+
private getUploaderType;
|
|
12
|
+
private getSkipExtensions;
|
|
10
13
|
start(input: any[], skipProcess?: boolean): Promise<IPicGo>;
|
|
14
|
+
private initializeContext;
|
|
15
|
+
private handleSkipProcess;
|
|
16
|
+
private executeLifecycle;
|
|
17
|
+
private handleError;
|
|
11
18
|
private preprocess;
|
|
19
|
+
private initializeRawInputPaths;
|
|
20
|
+
private processImages;
|
|
21
|
+
private processImage;
|
|
22
|
+
private applyProcessing;
|
|
23
|
+
private addWatermark;
|
|
24
|
+
private compressImage;
|
|
25
|
+
private convertHeicAndCompress;
|
|
26
|
+
private saveProcessedImage;
|
|
27
|
+
private getFileBaseName;
|
|
12
28
|
private buildInRename;
|
|
13
29
|
private beforeTransform;
|
|
14
30
|
private doTransform;
|
package/dist/i18n/zh-CN.d.ts
CHANGED
|
@@ -8,23 +8,25 @@ export declare const ZH_CN: {
|
|
|
8
8
|
PICBED_SMMS: string;
|
|
9
9
|
PICBED_SMMS_TOKEN: string;
|
|
10
10
|
PICBED_SMMS_MESSAGE_TOKEN: string;
|
|
11
|
-
|
|
11
|
+
PICBED_SMMS_BACKUPDOMAIN: string;
|
|
12
12
|
PICBED_SMMS_MESSAGE_BACKUP_DOMAIN: string;
|
|
13
13
|
PICBED_ADVANCEDPLIST: string;
|
|
14
14
|
PICBED_ADVANCEDPLIST_ENDPOINT: string;
|
|
15
15
|
PICBED_ADVANCEDPLIST_MESSAGE_ENDPOINT: string;
|
|
16
16
|
PICBED_ADVANCEDPLIST_METHOD: string;
|
|
17
17
|
PICBED_ADVANCEDPLIST_MESSAGE_METHOD: string;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
PICBED_ADVANCEDPLIST_FORMDATAKEY: string;
|
|
19
|
+
PICBED_ADVANCEDPLIST_MESSAGE_FORMDATAKEY: string;
|
|
20
20
|
PICBED_ADVANCEDPLIST_HEADERS: string;
|
|
21
21
|
PICBED_ADVANCEDPLIST_MESSAGE_HEADERS: string;
|
|
22
22
|
PICBED_ADVANCEDPLIST_BODY: string;
|
|
23
23
|
PICBED_ADVANCEDPLIST_MESSAGE_BODY: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
PICBED_ADVANCEDPLIST_CUSTOMPREFIX: string;
|
|
25
|
+
PICBED_ADVANCEDPLIST_MESSAGE_CUSTOMPREFIX: string;
|
|
26
|
+
PICBED_ADVANCEDPLIST_WEBPATH: string;
|
|
27
|
+
PICBED_ADVANCEDPLIST_MESSAGE_WEBPATH: string;
|
|
28
|
+
PICBED_ADVANCEDPLIST_RESDATAPATH: string;
|
|
29
|
+
PICBED_ADVANCEDPLIST_MESSAGE_RESDATAPATH: string;
|
|
28
30
|
PICBED_LOCAL: string;
|
|
29
31
|
PICBED_LOCAL_PATH: string;
|
|
30
32
|
PICBED_LOCAL_MESSAGE_PATH: string;
|
|
@@ -41,9 +43,9 @@ export declare const ZH_CN: {
|
|
|
41
43
|
PICBED_ALIST_MESSAGE_USERNAME: string;
|
|
42
44
|
PICBED_ALIST_PASSWORD: string;
|
|
43
45
|
PICBED_ALIST_MESSAGE_PASSWORD: string;
|
|
44
|
-
|
|
46
|
+
PICBED_ALIST_UPLOADPATH: string;
|
|
45
47
|
PICBED_ALIST_MESSAGE_UPLOAD_PATH: string;
|
|
46
|
-
|
|
48
|
+
PICBED_ALIST_WEBPATH: string;
|
|
47
49
|
PICBED_ALIST_MESSAGE_WEB_PATH: string;
|
|
48
50
|
PICBED_ALIST_CUSTOMURL: string;
|
|
49
51
|
PICBED_ALIST_MESSAGE_CUSTOMURL: string;
|
|
@@ -53,10 +55,12 @@ export declare const ZH_CN: {
|
|
|
53
55
|
PICBED_ALICLOUD_BUCKET: string;
|
|
54
56
|
PICBED_ALICLOUD_AREA: string;
|
|
55
57
|
PICBED_ALICLOUD_PATH: string;
|
|
58
|
+
PICBED_ALICLOUD_WEBPATH: string;
|
|
56
59
|
PICBED_ALICLOUD_CUSTOMURL: string;
|
|
57
60
|
PICBED_ALICLOUD_OPTIONS: string;
|
|
58
61
|
PICBED_ALICLOUD_MESSAGE_AREA: string;
|
|
59
62
|
PICBED_ALICLOUD_MESSAGE_PATH: string;
|
|
63
|
+
PICBED_ALICLOUD_MESSAGE_WEBPATH: string;
|
|
60
64
|
PICBED_ALICLOUD_MESSAGE_OPTIONS: string;
|
|
61
65
|
PICBED_ALICLOUD_MESSAGE_CUSTOMURL: string;
|
|
62
66
|
PICBED_TENCENTCLOUD: string;
|
|
@@ -68,11 +72,13 @@ export declare const ZH_CN: {
|
|
|
68
72
|
PICBED_TENCENTCLOUD_AREA: string;
|
|
69
73
|
PICBED_TENCENTCLOUD_ENDPOINT: string;
|
|
70
74
|
PICBED_TENCENTCLOUD_PATH: string;
|
|
75
|
+
PICBED_TENCENTCLOUD_WEBPATH: string;
|
|
71
76
|
PICBED_TENCENTCLOUD_OPTIONS: string;
|
|
72
77
|
PICBED_TENCENTCLOUD_CUSTOMURL: string;
|
|
73
78
|
PICBED_TENCENTCLOUD_MESSAGE_APPID: string;
|
|
74
79
|
PICBED_TENCENTCLOUD_MESSAGE_AREA: string;
|
|
75
80
|
PICBED_TENCENTCLOUD_MESSAGE_PATH: string;
|
|
81
|
+
PICBED_TENCENTCLOUD_MESSAGE_WEBPATH: string;
|
|
76
82
|
PICBED_TENCENTCLOUD_MESSAGE_CUSTOMURL: string;
|
|
77
83
|
PICBED_TENCENTCLOUD_MESSAGE_OPTIONS: string;
|
|
78
84
|
PICBED_TENCENTCLOUD_MESSAGE_ENDPOINT: string;
|
|
@@ -121,8 +127,8 @@ export declare const ZH_CN: {
|
|
|
121
127
|
PICBED_UPYUN_URL: string;
|
|
122
128
|
PICBED_UPYUN_OPTIONS: string;
|
|
123
129
|
PICBED_UPYUN_ENDPOINT: string;
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
PICBED_UPYUN_ANTILEECHTOKEN: string;
|
|
131
|
+
PICBED_UPYUN_EXPIRETIME: string;
|
|
126
132
|
PICBED_UPYUN_MESSAGE_OPERATOR: string;
|
|
127
133
|
PICBED_UPYUN_MESSAGE_PASSWORD: string;
|
|
128
134
|
PICBED_UPYUN_MESSAGE_URL: string;
|
|
@@ -135,7 +141,7 @@ export declare const ZH_CN: {
|
|
|
135
141
|
PICBED_WEBDAVPLIST_USERNAME: string;
|
|
136
142
|
PICBED_WEBDAVPLIST_PASSWORD: string;
|
|
137
143
|
PICBED_WEBDAVPLIST_PATH: string;
|
|
138
|
-
|
|
144
|
+
PICBED_WEBDAVPLIST_WEBPATH: string;
|
|
139
145
|
PICBED_WEBDAVPLIST_CUSTOMURL: string;
|
|
140
146
|
PICBED_WEBDAVPLIST_AUTHTYPE: string;
|
|
141
147
|
PICBED_WEBDAVPLIST_OPTIONS: string;
|
|
@@ -225,16 +231,18 @@ export declare const ZH_CN: {
|
|
|
225
231
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKDEGREE: string;
|
|
226
232
|
BUILDIN_WATERMARK_WATERMARKTEXT: string;
|
|
227
233
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKTEXT: string;
|
|
228
|
-
|
|
234
|
+
BUILDIN_WATERMARK_WATERMARKFONTPATH: string;
|
|
229
235
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKFONTPATH: string;
|
|
230
|
-
|
|
236
|
+
BUILDIN_WATERMARK_WATERMARKSCALERATIO: string;
|
|
231
237
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKFONTRATIO: string;
|
|
232
|
-
|
|
238
|
+
BUILDIN_WATERMARK_WATERMARKCOLOR: string;
|
|
233
239
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKFONTCOLOR: string;
|
|
234
240
|
BUILDIN_WATERMARK_WATERMARKIMAGEPATH: string;
|
|
235
241
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKIMAGEPATH: string;
|
|
236
242
|
BUILDIN_WATERMARK_WATERMARKPOSITION: string;
|
|
237
243
|
BUILDIN_WATERMARK_MESSAGE_WATERMARKPOSITION: string;
|
|
244
|
+
BUILDIN_SKIPPROCESS: string;
|
|
245
|
+
BUILDIN_SKIPPROCESS_SKIPPROCESSEXTLIST: string;
|
|
238
246
|
BUILDIN_RENAME: string;
|
|
239
247
|
BUILDIN_RENAME_FORMAT: string;
|
|
240
248
|
BUILDIN_RENAME_ENABLE: string;
|