piclist 2.4.0 → 2.4.2
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/AGENTS.md +36 -0
- package/README.md +2 -1
- package/README_en.md +2 -1
- package/dist/core/Lifecycle.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/Commander.d.ts +2 -2
- package/dist/lib/PluginHandler.d.ts +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/utils/common/compress.d.ts +6 -0
- package/dist/utils/common/config.d.ts +6 -0
- package/dist/utils/common/hash.d.ts +4 -0
- package/dist/utils/common/imageFile.d.ts +5 -0
- package/dist/utils/common/plugin.d.ts +9 -0
- package/dist/utils/common/processingOptions.d.ts +3 -0
- package/dist/utils/common/rename.d.ts +5 -0
- package/dist/utils/common/url.d.ts +3 -0
- package/dist/utils/common/watermark.d.ts +4 -0
- package/dist/utils/common.d.ts +9 -46
- package/dist/utils/inquirerShim.d.ts +23 -0
- package/package.json +25 -25
package/AGENTS.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Project Structure & Module Organization
|
|
4
|
+
|
|
5
|
+
This is a TypeScript ESM package and CLI for PicList/PicGo-style image uploading. Source lives in `src/`, with `src/index.ts` as the package entry. Core runtime classes are in `src/core/`, shared helpers in `src/utils/`, CLI and plugin plumbing in `src/lib/` and `src/plugins/`, and type declarations in `src/types/`. Executable entrypoints are `bin/picgo` and `bin/picgo-server`. Tests mirror behavior under `test/`, using paths such as `test/utils/common.test.ts` and `test/plugins/uploader/utils.test.ts`. Static images are in `assets/`; generated build output goes to `dist/` and should not be edited directly.
|
|
6
|
+
|
|
7
|
+
## Build, Test, and Development Commands
|
|
8
|
+
|
|
9
|
+
This repository currently tracks `yarn.lock`; use Yarn for consistency unless intentionally migrating package managers.
|
|
10
|
+
|
|
11
|
+
- `yarn build`: remove `dist/` and build production output with Rollup.
|
|
12
|
+
- `yarn dev`: run Rollup in watch mode for development.
|
|
13
|
+
- `yarn start`: run the `picgo` CLI from `bin/picgo`.
|
|
14
|
+
- `yarn server`: run the local server entrypoint.
|
|
15
|
+
- `yarn test`: run the Vitest suite once.
|
|
16
|
+
- `yarn test:watch`: run Vitest interactively.
|
|
17
|
+
- `yarn test:coverage`: generate V8 coverage reports.
|
|
18
|
+
- `yarn lint`: run ESLint across configured files.
|
|
19
|
+
- `yarn lint:dpdm`: fail on circular dependencies from `src/index.ts`.
|
|
20
|
+
- `yarn cz`: create a commit through the configured Commitizen flow.
|
|
21
|
+
|
|
22
|
+
## Coding Style & Naming Conventions
|
|
23
|
+
|
|
24
|
+
Use TypeScript with ESM imports. Prettier enforces 2-space indentation, single quotes, no semicolons, trailing commas, and 120-column wrapping. ESLint requires sorted imports/exports, `eqeqeq`, `prefer-const`, object shorthand, Node protocol imports, and no unused variables unless prefixed with `_`. Keep module and utility filenames lower camel case where the existing tree does, such as `configManager.ts` and `eventBus.ts`.
|
|
25
|
+
|
|
26
|
+
## Testing Guidelines
|
|
27
|
+
|
|
28
|
+
Vitest discovers `test/**/*.test.ts` with globals enabled and a 10-second timeout. Add focused tests next to the relevant behavior area under `test/`, and name files `*.test.ts`. Coverage includes `src/**/*.ts` and excludes `src/types/**` and `src/custom-env.d.ts`.
|
|
29
|
+
|
|
30
|
+
## Commit & Pull Request Guidelines
|
|
31
|
+
|
|
32
|
+
Recent history uses emoji-prefixed conventional subjects, for example `:sparkles: Feature(custom): add new command...` and `:bug: Fix(custom): fix docker build issue...`. Prefer `yarn cz` so commitlint and release tooling stay aligned. Pull requests should include a concise summary, linked issues when applicable, validation commands/results, and screenshots or logs for CLI/server behavior changes.
|
|
33
|
+
|
|
34
|
+
## Security & Configuration Tips
|
|
35
|
+
|
|
36
|
+
Never log secrets, tokens, private prompts, or private file contents. Before adding a production dependency, document why it is needed and summarize maintenance, license, security, Electron compatibility, and bundle/runtime impact.
|
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ PicList-Core 是一个功能强大的图片上传工具,提供 CLI 和 API 两
|
|
|
44
44
|
|
|
45
45
|
## 安装
|
|
46
46
|
|
|
47
|
-
PicList 需要 Node.js >=
|
|
47
|
+
PicList 需要 Node.js >= 22
|
|
48
48
|
|
|
49
49
|
### 前置条件
|
|
50
50
|
|
|
@@ -201,6 +201,7 @@ Options:
|
|
|
201
201
|
-h, --help display help for command
|
|
202
202
|
|
|
203
203
|
Commands:
|
|
204
|
+
list|ls list installed plugins
|
|
204
205
|
install|add [options] <plugins...> install picgo plugin
|
|
205
206
|
uninstall|rm <plugins...> uninstall picgo plugin
|
|
206
207
|
update|up [options] <plugins...> update picgo plugin
|
package/README_en.md
CHANGED
|
@@ -45,7 +45,7 @@ You can refer to the [DeepWiki of PiclList-Core](https://deepwiki.com/Kuingsmile
|
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
48
|
-
PicList requires Node.js >=
|
|
48
|
+
PicList requires Node.js >= 22
|
|
49
49
|
|
|
50
50
|
### Prerequisites
|
|
51
51
|
|
|
@@ -202,6 +202,7 @@ Options:
|
|
|
202
202
|
-h, --help display help for command
|
|
203
203
|
|
|
204
204
|
Commands:
|
|
205
|
+
list|ls list installed plugins
|
|
205
206
|
install|add [options] <plugins...> install picgo plugin
|
|
206
207
|
uninstall|rm <plugins...> uninstall picgo plugin
|
|
207
208
|
update|up [options] <plugins...> update picgo plugin
|
package/dist/core/Lifecycle.d.ts
CHANGED