Rename plugin metadata to Cohere

This commit is contained in:
shi.changliang 2026-06-15 10:31:40 +08:00
parent c8d42b2a27
commit 16721712a3
3 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"id": "obsync",
"name": "S3 Vault Sync",
"id": "cohere",
"name": "Cohere",
"version": "0.1.2",
"minAppVersion": "1.6.6",
"description": "Sync vault files through OSS / S3-compatible object storage.",

View file

@ -1,5 +1,5 @@
{
"name": "obsync",
"name": "cohere",
"version": "0.1.2",
"description": "Plugin for OSS / S3-compatible vault sync.",
"main": "main.js",

View file

@ -1,4 +1,4 @@
import { copyFileSync, mkdirSync } from "node:fs";
import { copyFileSync, mkdirSync, readFileSync } from "node:fs";
import { join, resolve } from "node:path";
const vaultPath = process.argv[2];
@ -8,12 +8,12 @@ if (!vaultPath) {
process.exit(1);
}
const pluginDir = join(resolve(vaultPath), ".obsidian", "plugins", "obsync");
const manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
const pluginDir = join(resolve(vaultPath), ".obsidian", "plugins", manifest.id);
mkdirSync(pluginDir, { recursive: true });
copyFileSync("manifest.json", join(pluginDir, "manifest.json"));
copyFileSync("dist/main.js", join(pluginDir, "main.js"));
copyFileSync("dist/main.css", join(pluginDir, "styles.css"));
console.log(`Installed Obsync to ${pluginDir}`);
console.log(`Installed ${manifest.name} to ${pluginDir}`);