Skip to content

Commit 088d4c8

Browse files
committed
chore: bump version to 1.6.0
1 parent 314d71a commit 088d4c8

3 files changed

Lines changed: 34 additions & 8 deletions

File tree

AGENTS.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Obsidian Image Upload Toolkit
22

3-
An Obsidian plugin for uploading local images to multiple cloud storage providers (Imgur, GitHub, AWS S3, Aliyun OSS, TencentCloud COS, Qiniu Kodo, ImageKit, Cloudflare R2, Backblaze B2). Also supports automatic mermaid diagram conversion to images during publish.
3+
An Obsidian plugin for uploading local images to multiple cloud storage providers (Imgur, Gyazo, GitHub, AWS S3, Aliyun OSS, TencentCloud COS, Qiniu Kodo, ImageKit, Cloudflare R2, Backblaze B2). Also supports automatic mermaid diagram conversion to images during publish.
44

55
## Project Overview
66

@@ -19,7 +19,7 @@ This is a TypeScript-based Obsidian plugin that processes markdown documents, de
1919
```
2020
src/
2121
├── publish.ts # Main plugin entry point
22-
├── imageStore.ts # Storage provider registry
22+
├── imageStore.ts # Storage provider registry (with normalizeId() for legacy alias support)
2323
├── styles.css # Plugin styles
2424
├── ui/
2525
│ ├── publishSettingTab.ts # Settings UI
@@ -33,6 +33,7 @@ src/
3333
├── uploaderUtils.ts # Shared utilities
3434
├── apiError.ts # Error handling
3535
├── imgur/ # Imgur implementation
36+
├── gyazo/ # Gyazo implementation (v1.6.0)
3637
├── github/ # GitHub implementation
3738
├── s3/ # AWS S3 implementation
3839
├── r2/ # Cloudflare R2 implementation
@@ -177,7 +178,27 @@ To add a new storage provider:
177178

178179
## Testing
179180

180-
Currently no automated test suite. Manual testing checklist:
181+
### Automated Tests
182+
183+
Unit tests are located in `tests/unit/` and run via [Vitest](https://vitest.dev/):
184+
185+
```bash
186+
npm test # Run all tests
187+
npm run test:watch # Watch mode
188+
npm run test:coverage # Coverage report
189+
```
190+
191+
Current test files:
192+
- `gyazoUploader.test.ts` — Gyazo uploader (upload success, error handling, field omission)
193+
- `imageStore.test.ts` — Provider registry and `normalizeId()` alias resolution
194+
- `isAlreadyHosted.test.ts` — Hosted-URL detection for all providers
195+
- `imageTagRegex.test.ts` — Markdown/Wiki image tag regex matching
196+
- `uploaderUtils.test.ts` — Path template generation and domain customization
197+
- `webImageDownloader.test.ts` — Web image download logic
198+
- `mermaidProcessor.test.ts` — Mermaid-to-PNG conversion
199+
- `mermaidRegex.test.ts` — Mermaid code block regex matching
200+
201+
### Manual Testing Checklist
181202

182203
1. Test each storage provider with sample images
183204
2. Verify path variable substitution works correctly
@@ -286,7 +307,7 @@ Follow conventional commit format:
286307
- `qiniu` - Qiniu Kodo SDK
287308
- `proxy-agent` - HTTP/HTTPS proxy support
288309

289-
> **Note**: ImageKit uses Obsidian's built-in `requestUrl` API directly instead of the `imagekit` SDK. Mermaid rendering uses Obsidian's built-in `loadMermaid()` API — no bundled mermaid dependency.
310+
> **Note**: ImageKit and Gyazo use Obsidian's built-in `requestUrl` API directly instead of external SDKs. Mermaid rendering uses Obsidian's built-in `loadMermaid()` API — no bundled mermaid dependency.
290311
291312
### Development
292313
- `typescript` - TypeScript compiler
@@ -309,6 +330,11 @@ Settings are stored in `.obsidian/plugins/image-upload-toolkit/data.json`:
309330
"mermaidScale": 2,
310331
"mermaidTheme": "default",
311332
"imgurAnonymousSetting": { "clientId": "..." },
333+
"gyazoSetting": {
334+
"accessToken": "...",
335+
"accessPolicy": "anyone",
336+
"description": ""
337+
},
312338
"b2Setting": {
313339
"keyId": "...",
314340
"applicationKey": "...",
@@ -352,4 +378,4 @@ Settings are stored in `.obsidian/plugins/image-upload-toolkit/data.json`:
352378

353379
## Current Version
354380

355-
v1.4.0 - Latest features include mermaid diagram conversion to images during publish (with configurable scale and theme), Backblaze B2 storage support, and various robustness improvements (state-based double-upload prevention, ImageKit API migration, B2 MIME detection fixes).
381+
v1.6.0 - Added Gyazo uploader support (PR #52), `normalizeId()` for backward-compatible provider alias resolution, and refactored all switch cases to use `ImageStore` constants.

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"id": "image-upload-toolkit",
33
"name": "Image Upload Toolkit",
4-
"description": "Upload local images to remote store (Imgur, AliYun OSS, Imagekit, Amazon S3, TencentCloud COS, Qiniu Kodo, GitHub, Cloudflare R2 and Backblaze B2).",
4+
"description": "Upload local images to remote store (Imgur, Gyazo, AliYun OSS, Imagekit, Amazon S3, TencentCloud COS, Qiniu Kodo, GitHub, Cloudflare R2 and Backblaze B2).",
55
"author": "Addo Zhang",
66
"authorUrl": "https://atbug.com",
77
"isDesktopOnly": true,
88
"minAppVersion": "0.11.0",
9-
"version": "1.5.1"
9+
"version": "1.6.0"
1010
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-image-upload-toolkit",
3-
"version": "1.5.1",
3+
"version": "1.6.0",
44
"description": "",
55
"author": "addozhang",
66
"main": "main.js",

0 commit comments

Comments
 (0)