diff --git a/content/index.md b/content/index.md index daca95a18..809d9d269 100644 --- a/content/index.md +++ b/content/index.md @@ -15,4 +15,3 @@ Quartz is a static site generator for digital gardens. - Fast search - Graph view - Explorer sidebar - diff --git a/package-lock.json b/package-lock.json index 136ad8238..919657a9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,6 @@ "@floating-ui/dom": "^1.7.4", "@myriaddreamin/rehype-typst": "^0.6.0", "@napi-rs/simple-git": "0.1.22", - "@quartz-community/explorer": "github:quartz-community/explorer", - "@quartz-community/graph": "github:quartz-community/graph", - "@quartz-community/search": "github:quartz-community/search", "@tweenjs/tween.js": "^25.0.0", "ansi-truncate": "^1.4.0", "async-mutex": "^0.5.0", @@ -79,6 +76,7 @@ "quartz": "quartz/bootstrap-cli.mjs" }, "devDependencies": { + "@quartz-community/types": "file:../types", "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", @@ -97,6 +95,20 @@ "npm": ">=10.9.2" } }, + "../types": { + "name": "@quartz-community/types", + "version": "0.1.0", + "dev": true, + "license": "MIT", + "devDependencies": { + "tsup": "^8.5.0", + "typescript": "^5.9.3" + }, + "engines": { + "node": ">=22", + "npm": ">=10.9.2" + } + }, "node_modules/@bufbuild/protobuf": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz", @@ -1916,108 +1928,9 @@ "version": "2.9.6", "license": "MIT" }, - "node_modules/@quartz-community/explorer": { - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/quartz-community/explorer.git#90d00f2217b186cbc96a44b29854abb7004a7f51", - "license": "MIT", - "dependencies": { - "mdast-util-find-and-replace": "^3.0.1", - "rehype-slug": "^6.0.0", - "remark-gfm": "^4.0.1", - "remark-parse": "^11.0.0", - "remark-stringify": "^11.0.0", - "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.3" - }, - "engines": { - "node": ">=22", - "npm": ">=10.9.2" - }, - "peerDependencies": { - "@jackyzha0/quartz": "^4.5.2", - "preact": "^10.0.0" - }, - "peerDependenciesMeta": { - "@jackyzha0/quartz": { - "optional": true - }, - "preact": { - "optional": false - } - } - }, - "node_modules/@quartz-community/graph": { - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/quartz-community/graph.git#71bd8dc24d67d1a9ea461c379b87bab3904739de", - "license": "MIT", - "dependencies": { - "mdast-util-find-and-replace": "^3.0.1", - "rehype-slug": "^6.0.0", - "remark-gfm": "^4.0.1", - "remark-parse": "^11.0.0", - "remark-stringify": "^11.0.0", - "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.3" - }, - "engines": { - "node": ">=22", - "npm": ">=10.9.2" - }, - "peerDependencies": { - "@jackyzha0/quartz": "^4.5.2", - "preact": "^10.0.0" - }, - "peerDependenciesMeta": { - "@jackyzha0/quartz": { - "optional": true - }, - "preact": { - "optional": false - } - } - }, - "node_modules/@quartz-community/search": { - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/quartz-community/search.git#e3b491b0a588c67ec5475cc7b1ccc35de7d8cf59", - "license": "MIT", - "dependencies": { - "@quartz-community/types": "github:quartz-community/types", - "mdast-util-find-and-replace": "^3.0.1", - "rehype-slug": "^6.0.0", - "remark-gfm": "^4.0.1", - "remark-parse": "^11.0.0", - "remark-stringify": "^11.0.0", - "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.3" - }, - "engines": { - "node": ">=22", - "npm": ">=10.9.2" - }, - "peerDependencies": { - "@jackyzha0/quartz": "^4.5.2", - "preact": "^10.0.0" - }, - "peerDependenciesMeta": { - "@jackyzha0/quartz": { - "optional": true - }, - "preact": { - "optional": false - } - } - }, "node_modules/@quartz-community/types": { - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/quartz-community/types.git#a342579c845f6dfd74c2aed861b4662a69c5e328", - "license": "MIT", - "engines": { - "node": ">=22", - "npm": ">=10.9.2" - } + "resolved": "../types", + "link": true }, "node_modules/@shikijs/core": { "version": "1.26.2", diff --git a/package.json b/package.json index 481ae1d27..3ce518f52 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "yargs": "^18.0.0" }, "devDependencies": { + "@quartz-community/types": "file:../types", "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", diff --git a/quartz/cli/plugin-git-handlers.js b/quartz/cli/plugin-git-handlers.js index fd1dfac49..15e63f6e1 100644 --- a/quartz/cli/plugin-git-handlers.js +++ b/quartz/cli/plugin-git-handlers.js @@ -52,7 +52,9 @@ export async function handlePluginInstall() { const lockfile = readLockfile() if (!lockfile) { - console.log(styleText("yellow", "⚠ No quartz.lock.json found. Run 'npx quartz plugin add ' first.")) + console.log( + styleText("yellow", "⚠ No quartz.lock.json found. Run 'npx quartz plugin add ' first."), + ) return } @@ -71,7 +73,9 @@ export async function handlePluginInstall() { try { const currentCommit = getGitCommit(pluginDir) if (currentCommit === entry.commit) { - console.log(styleText("gray", ` ✓ ${name}@${entry.commit.slice(0, 7)} already installed`)) + console.log( + styleText("gray", ` ✓ ${name}@${entry.commit.slice(0, 7)} already installed`), + ) installed++ continue } @@ -88,7 +92,10 @@ export async function handlePluginInstall() { console.log(styleText("cyan", ` → ${name}: cloning...`)) execSync(`git clone --depth 1 ${entry.resolved} ${pluginDir}`, { stdio: "ignore" }) if (entry.commit !== "unknown") { - execSync(`git fetch --depth 1 origin ${entry.commit}`, { cwd: pluginDir, stdio: "ignore" }) + execSync(`git fetch --depth 1 origin ${entry.commit}`, { + cwd: pluginDir, + stdio: "ignore", + }) execSync(`git checkout ${entry.commit}`, { cwd: pluginDir, stdio: "ignore" }) } console.log(styleText("green", ` ✓ ${name}@${entry.commit.slice(0, 7)}`)) @@ -203,7 +210,9 @@ export async function handlePluginUpdate(names) { const pluginDir = path.join(PLUGINS_DIR, name) if (!fs.existsSync(pluginDir)) { - console.log(styleText("yellow", `⚠ ${name} directory missing. Run 'npx quartz plugin install'.`)) + console.log( + styleText("yellow", `⚠ ${name} directory missing. Run 'npx quartz plugin install'.`), + ) continue } @@ -295,7 +304,9 @@ export async function handlePluginRestore() { } try { - console.log(styleText("cyan", `→ ${name}: cloning ${entry.resolved}@${entry.commit.slice(0, 7)}...`)) + console.log( + styleText("cyan", `→ ${name}: cloning ${entry.resolved}@${entry.commit.slice(0, 7)}...`), + ) execSync(`git clone ${entry.resolved} ${pluginDir}`, { stdio: "ignore" }) execSync(`git checkout ${entry.commit}`, { cwd: pluginDir, stdio: "ignore" }) console.log(styleText("green", `✓ ${name} restored`))