{
+ const controller = new AbortController()
+ const timer = setTimeout(() => controller.abort(), timeoutMs)
+ try {
+ const res = await fetch(N8N_NODE_REGISTRY_LATEST_URL, { signal: controller.signal })
+ if (!res.ok) return null
+ const body = await res.json()
+ return validVersion(body?.version)
+ } catch {
+ return null
+ } finally {
+ clearTimeout(timer)
+ }
+}
+
+// --- browser refresh ------------------------------------------------------------------
+const CACHE_KEY = 'devdesk-docs:n8n-node-version'
+const CACHE_TTL_MS = 6 * 60 * 60 * 1000
+const version = ref('')
+let refreshStarted = false
+
+function apply(candidate: string | null) {
+ if (candidate && (!version.value || compareVersions(candidate, version.value) > 0)) {
+ version.value = candidate
+ }
+}
+
+async function refresh() {
+ try {
+ const cached = JSON.parse(localStorage.getItem(CACHE_KEY) || 'null')
+ if (cached && Date.now() - cached.at < CACHE_TTL_MS && validVersion(cached.version)) {
+ apply(cached.version)
+ return
+ }
+ } catch {}
+ const latest = await fetchLatestN8nNodeVersion()
+ if (!latest) return
+ apply(latest)
+ try {
+ localStorage.setItem(CACHE_KEY, JSON.stringify({ version: latest, at: Date.now() }))
+ } catch {}
+}
+
+/** Reactive version: starts at the build-time value, refreshed from npm once mounted. */
+export function useN8nNodeVersion(buildVersion: string) {
+ apply(validVersion(buildVersion))
+ return version
+}
+
+/** Call from onMounted (client only). */
+export function scheduleN8nNodeVersionRefresh() {
+ if (refreshStarted || typeof window === 'undefined') return
+ refreshStarted = true
+ const idle = (window as Window & { requestIdleCallback?: (cb: () => void, opts?: { timeout: number }) => number }).requestIdleCallback
+ if (idle) idle(() => { refresh() }, { timeout: 4000 })
+ else setTimeout(() => { refresh() }, 2000)
+}
diff --git a/src/n8n/index.md b/src/n8n/index.md
index e714055..cdc46a2 100644
--- a/src/n8n/index.md
+++ b/src/n8n/index.md
@@ -7,7 +7,7 @@ description: 'Get started with n8n-nodes-devdeskapp: what the community node doe
`n8n-nodes-devdeskapp` is an official community node for [n8n](https://n8n.io) that brings high-performance, zero-latency developer utilities, formatters, and financial calculation engines directly into your automation pipelines.
- Version v0.1.4 (Latest)
+ Version (Latest)
Official n8n Template #21017
MIT Open Source
@@ -56,7 +56,7 @@ Easily switch between resources and operations using intuitive dropdowns and dyn
---
-## 🛠️ Complete Operations Matrix (v0.1.4)
+## 🛠️ Complete Operations Matrix
| Category | Operation | Description |
| :--- | :--- | :--- |
diff --git a/src/n8n/installation.md b/src/n8n/installation.md
index a94d87b..491e2cd 100644
--- a/src/n8n/installation.md
+++ b/src/n8n/installation.md
@@ -6,6 +6,8 @@ description: 'Install n8n-nodes-devdeskapp step by step from the n8n Community N
You can install `n8n-nodes-devdeskapp` into your n8n instance using the graphical Community Nodes manager or via container/npm deployment scripts.
+**Latest release:** ([all versions on npm](https://www.npmjs.com/package/n8n-nodes-devdeskapp?activeTab=versions)). Installing without a version number always gets the latest one.
+
---
## Option 1: Install via n8n Web UI (Recommended)
diff --git a/src/public/og-docs.jpg b/src/public/og-docs.jpg
new file mode 100644
index 0000000..d0f6a37
Binary files /dev/null and b/src/public/og-docs.jpg differ