chore(agent): update obsidian skills

This commit is contained in:
ClaudiaFang 2026-05-22 03:15:37 +00:00
parent d5379c1f3f
commit 49acf05241
7 changed files with 179 additions and 0 deletions

View file

@ -0,0 +1,47 @@
import esbuild from "esbuild";
import process from "process";
import builtins from 'builtin-modules'
const banner =
`/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
`;
const prod = (process.argv[2] === 'production');
const buildOptions = {
banner: {
js: banner,
},
entryPoints: ['src/main.ts'],
bundle: true,
external: [
'obsidian',
'electron',
'@codemirror/autocomplete',
'@codemirror/collab',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/lint',
'@codemirror/search',
'@codemirror/state',
'@codemirror/view',
'@lezer/common',
'@lezer/highlight',
'@lezer/lr',
...builtins],
format: 'cjs',
target: 'es2018',
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
};
if (prod) {
esbuild.build(buildOptions).catch(() => process.exit(1));
} else {
esbuild.context(buildOptions).then(ctx => ctx.watch()).catch(() => process.exit(1));
}

View file

@ -0,0 +1,10 @@
{
"id": "my-plugin-id",
"name": "My Plugin Name",
"version": "1.0.0",
"minAppVersion": "1.4.0",
"description": "A concise description under 250 characters that explains exactly what this plugin does for the user.",
"author": "Your Name",
"authorUrl": "https://your-website.com",
"isDesktopOnly": false
}

View file

@ -0,0 +1,12 @@
// Minimal stub so uploader.ts can be imported in the test environment
export const requestUrl = () => Promise.resolve({ headers: {}, status: 200, arrayBuffer: new ArrayBuffer(0) });
export type RequestUrlParam = unknown;
export class Notice { constructor(_msg: string) {} }
export class Plugin {}
export class PluginSettingTab {}
export class Setting {}
export class TextComponent {}
export const setIcon = () => {};
export class TFile {}
export class MarkdownView {}
export class Editor {}

View file

@ -0,0 +1,61 @@
{
"name": "watermark-s3-uploader",
"version": "1.1.0",
"description": "Obsidian plugin: upload images to Cloudflare R2 with WebP conversion and watermark support.",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json",
"deploy": "node esbuild.config.mjs production && cp main.js manifest.json styles.css ../../src/content/.obsidian/plugins/watermark-s3-uploader/",
"prepare": "husky",
"lint": "eslint src/",
"test": "vitest run",
"semantic-release": "npx semantic-release"
},
"keywords": [],
"author": "ClaudiaFang",
"license": "MIT",
"engines": {
"node": ">=20"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.3.5",
"@semantic-release/npm": "^12.0.1",
"@types/mime-types": "^2.1.1",
"@types/node": "^20.19.37",
"@vitest/coverage-v8": "4.1.5",
"browser-resolve": "^2.0.0",
"builtin-modules": "3.3.0",
"conventional-changelog-conventionalcommits": "^8.0.0",
"detective": "^5.2.1",
"esbuild": "^0.27.0",
"eslint": "^9.0.0",
"eslint-plugin-obsidianmd": "^0.2.4",
"eslint-plugin-sonarjs": "^4.0.3",
"globals": "^16.0.0",
"husky": "^9.1.7",
"jiti": "^2.0.0",
"obsidian": "^1.12.3",
"process": "^0.11.10",
"semantic-release": "^24.2.3",
"tslib": "2.4.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0",
"vitest": "4.1.5"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1019.0",
"@aws-sdk/fetch-http-handler": "^3.310.0",
"@aws-sdk/protocol-http": "^3.310.0",
"@aws-sdk/querystring-builder": "^3.310.0",
"@aws-sdk/types": "^3.310.0",
"@smithy/fetch-http-handler": "^2.2.7",
"browser-image-compression": "^2.0.2",
"filesize": "^10.1.6",
"minimatch": "^10.2.3"
}
}

View file

@ -0,0 +1,20 @@
name: CI/CD
permissions:
contents: write
issues: write
pull-requests: write
on:
push:
branches: [main, master, '**']
pull_request:
types: [opened, synchronize, reopened]
jobs:
CI:
uses: firstsun-dev/.github/.github/workflows/obsidian-plugin-ci.yml@main
with:
plugin-id: "watermark-image-bucket-uploader"
secrets:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

View file

@ -0,0 +1,18 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "node",
coverage: {
reporter: ["text", "lcov", "html"],
exclude: ["node_modules/**", "tests/**"],
include: ["src/**"],
all: true,
},
},
resolve: {
alias: {
obsidian: new URL("./tests/__mocks__/obsidian.ts", import.meta.url).pathname,
},
},
});

11
skills-lock.json Normal file
View file

@ -0,0 +1,11 @@
{
"version": 1,
"skills": {
"obsidian-development": {
"source": "firstsun-dev/skills",
"sourceType": "github",
"skillPath": "custom/obsidian/obsidian-development/SKILL.md",
"computedHash": "087f548b82f8c150fcc2879488109bdda5d21c91fc4c9e379765150a4acbff82"
}
}
}