add-workflow-builder
v0.1.6
Published
Installs the Workflow Builder feature (Builder / Workflows / Execution History) into an existing Imola Kit Pro project.
Readme
add-workflow-builder
Published on npm: npx add-workflow-builder@latest.
Installs the Workflow Builder feature (Builder / Workflows / Execution History) from workflow-builder-component into an existing project. Fully automatic on Imola Kit Pro projects (Vite + React Router variant, TypeScript or JavaScript); on any other stack, use --dump-assets and integrate by hand (or via the companion Skill, which does this adaptation for you) — see ~/.claude/skills/workflow-builder-init/ (a global user skill, like ikp-init — install it there once, use it from any project via /workflow-builder-init).
What it does
- Detects the target project (TS vs JS, package manager) and checks whether it's an Imola Kit Pro project.
- Copies the feature's 19 component/page files plus the 7
lib/apifiles (stripping TypeScript for JS targets via esbuild). - Patches
src/paths.ts,src/routes/dashboard.tsx,src/config/dashboard.ts,src/components/dashboard/layout/nav-icons.tsx, andsrc/locales/{en,de,es}/index.ts— all idempotently, safe to re-run. - Merges the required npm dependencies (
@dnd-kit/*,recharts) intopackage.json. - Appends
VITE_API_URLto.env/.env.example. - Optionally seeds the shared
workflow_builder_backend's required admin user (its auth is a stub — see that repo's README). - Optionally writes a real table list into
tables.ts(via--tables), replacing the placeholder — see the companion Skill at~/.claude/skills/workflow-builder-init/ (a global user skill, like ikp-init — install it there once, use it from any project via /workflow-builder-init)for how to discover a client's real tables and feed them in.
None of the above needs a decision from whoever's running it — the target directory and backend URL default silently. The only interactive prompt is for a Postgres connection string, and only if --seed-db=yes is passed without --database-url.
Usage
npx add-workflow-builder@latest # defaults: cwd, shared backend URL
npx add-workflow-builder@latest --tables='[{"id":"orders","label":"Orders"}]'
npx add-workflow-builder@latest --dump-assets=.workflow-builder-src # non-Imola-Kit-Pro projects: raw source, no patchingDevelopment
npm install
npm run build # tsc -> dist/
npm link # test the `add-workflow-builder` command globally without publishing
node dist/index.jsPublishing
npm version patch # or minor / major
npm publish --access public # npm will prompt for an OTP if the account has 2FA enabledprepublishOnly runs npm run build automatically.
Keeping the bundled source in sync: assets/src/ and assets/locales/ are a snapshot copied from workflow-builder-component at the time this package was built — they do not update automatically if that project changes. Re-copy the relevant files and bump the version before publishing a new release.
