chore: bump version to 2.0.12 and add plugin build infra

Add build:plugin-env script to bake the PostHog key into the plugin at pack time.
This commit is contained in:
kumarabhirup 2026-03-05 19:08:51 -08:00
parent c4ee320994
commit 135fa3608a
No known key found for this signature in database
GPG Key ID: DB7CA2289CAB0167
5 changed files with 16 additions and 4 deletions

3
.gitignore vendored
View File

@ -110,3 +110,6 @@ dist/protocol.schema.json
.cursor/skills/
.npmrc.deploy
# Generated at build time (bakes POSTHOG_KEY into the plugin)
extensions/posthog-analytics/lib/build-env.js

View File

@ -0,0 +1 @@
export const POSTHOG_KEY = "";

View File

@ -1,6 +1,6 @@
{
"name": "denchclaw",
"version": "2.0.9",
"version": "2.0.12",
"description": "Fully Managed OpenClaw Framework for managing your CRM, Sales Automation and Outreach agents. The only local productivity tool you need.",
"keywords": [],
"homepage": "https://github.com/DenchHQ/DenchClaw#readme",
@ -37,13 +37,14 @@
},
"scripts": {
"build": "tsdown",
"build:plugin-env": "node scripts/build-plugin-env.mjs",
"check": "pnpm format:check && pnpm lint",
"denchclaw": "node denchclaw.mjs",
"dev": "node denchclaw.mjs",
"format": "oxfmt --write",
"format:check": "oxfmt --check",
"lint": "oxlint --type-aware",
"prepack": "pnpm build && pnpm web:build && pnpm web:prepack",
"prepack": "pnpm build:plugin-env && pnpm build && pnpm web:build && pnpm web:prepack",
"start": "node denchclaw.mjs",
"test": "pnpm test:cli && pnpm --dir apps/web test",
"test:cli": "vitest run --config vitest.unit.config.ts src/cli/run-main.test.ts src/cli/bootstrap-external.test.ts src/cli/bootstrap-external.bootstrap-command.test.ts src/cli/workspace-seed.test.ts src/cli/web-runtime.test.ts src/cli/web-runtime-command.test.ts src/cli/flatten-standalone-deps.test.ts",

View File

@ -1,6 +1,6 @@
{
"name": "dench",
"version": "2.0.9",
"version": "2.0.12",
"description": "Shorthand alias for denchclaw — AI-powered CRM platform CLI",
"license": "MIT",
"repository": {
@ -16,7 +16,7 @@
],
"type": "module",
"dependencies": {
"denchclaw": "^2.0.9"
"denchclaw": "^2.0.12"
},
"engines": {
"node": ">=22.12.0"

View File

@ -0,0 +1,7 @@
import { writeFileSync } from "node:fs";
const key = process.env.POSTHOG_KEY || "";
writeFileSync(
"extensions/posthog-analytics/lib/build-env.js",
`export const POSTHOG_KEY = ${JSON.stringify(key)};\n`,
);