Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .agents/skills/obsidian-development/references/esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -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));
}
Original file line number Diff line number Diff line change
@@ -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
}
12 changes: 12 additions & 0 deletions .agents/skills/obsidian-development/references/obsidian-mock.ts
Original file line number Diff line number Diff line change
@@ -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 {}
Original file line number Diff line number Diff line change
@@ -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"
}
}
Original file line number Diff line number Diff line change
@@ -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 }}
18 changes: 18 additions & 0 deletions .agents/skills/obsidian-development/references/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -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,
},
},
});
61 changes: 0 additions & 61 deletions .claude/skills/obsidian-development/SKILL.md

This file was deleted.

17 changes: 0 additions & 17 deletions .claude/skills/obsidian-development/evals/evals.json

This file was deleted.

35 changes: 0 additions & 35 deletions .claude/skills/obsidian-development/references/pr-template.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "CodeQL"

on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
schedule:
- cron: '30 1 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Queries can be 'security-extended' or 'security-and-quality'
queries: security-extended

- name: Auto-build
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Git File Sync

[![CI](https://img.shields.io/github/actions/workflow/status/firstsun-dev/git-files-sync/ci.yml?branch=main&style=flat-square)](https://github.com/firstsun-dev/git-files-sync/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/firstsun-dev/git-files-sync?style=flat-square)](https://github.com/firstsun-dev/git-files-sync/releases)
[![Downloads](https://img.shields.io/github/downloads/firstsun-dev/git-files-sync/total?style=flat-square)](https://github.com/firstsun-dev/git-files-sync/releases)
[![License](https://img.shields.io/github/license/firstsun-dev/git-files-sync?style=flat-square)](LICENSE)
[![Obsidian](https://img.shields.io/badge/Obsidian-v0.15.0+-purple?style=flat-square)](https://obsidian.md)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=firstsun-dev_git-files-sync&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=firstsun-dev_git-files-sync)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
[![License](https://img.shields.io/github/license/firstsun-dev/git-files-sync?style=flat-square)](LICENSE)

**Git File Sync** is a powerful Obsidian plugin that enables seamless synchronization of individual notes with GitLab or GitHub repositories. Unlike full-vault sync solutions, it gives you granular control over what gets pushed and pulled, making it perfect for shared projects, selective backups, and cross-platform workflows.

Expand Down
Loading
Loading