Lines 60-100json
60 "//prebuild": "Purge the webpack module cache before a release build. Next's incremental cache (.next/cache) can re-emit a STALE compiled module after a source edit (observed under OneDrive/Windows mtime quirks), which silently shipped a build that ignored a source fix. A release artifact must compile from source every time — this forces a full recompile (only affects `build`, not `dev`).",
61 "prebuild": "node -e \"require('fs').rmSync('.next/cache',{recursive:true,force:true})\"",
62 "build": "next build --webpack",
63 "//clean:next": "Purge the ENTIRE .next (server + static + cache), not just the cache. An incremental `next build` over a stale .next/server + .next/static (under OneDrive/Windows mtime quirks) can ship an artifact whose RSC/manifest references client-chunk state the emitted static chunks don't match — the published 0.2.15 did exactly this, crashing /login at hydration with 'invariant expected layout router to be mounted'. The release build must start from an empty .next.",
64 "clean:next": "node -e \"require('fs').rmSync('.next',{recursive:true,force:true})\"",
65 "//build:release": "Clean, from-scratch production build for the artifact that ships. `validate` (the pre-publish gate) uses this; plain `build` stays incremental for fast local iteration.",
66 "build:release": "npm run clean:next && next build --webpack",
67 "//smoke": "Pre-publish smoke gate: boots the built package in isolation and loads /login (signin + signup) in headless Chrome, asserting no 'invariant expected layout router' / 'broke at the root'. Run after `validate`, before `npm publish`. Catches a bad .next artifact before it ever ships.",
68 "smoke": "node scripts/smoke-login.mjs",
69 "start": "node scripts/start-all.mjs",
70 "start:web": "next start",
72 "lint:i18n": "eslint src/components src/app --max-warnings 0",
73 "parity": "node scripts/i18n-parity.mjs",
74 "typecheck": "tsc --noEmit",
75 "validate": "npm run typecheck && npm run parity && npm run build:release",
76 "update": "node bin/constella.mjs update",
77 "clean": "node scripts/clean-repo.mjs",
78 "prepublishOnly": "drizzle-kit generate --config drizzle.config.mjs && npm run validate",
79 "prepack": "node scripts/trim-next.mjs",
80 "postinstall": "node scripts/postinstall.mjs",
HighInstall Time Lifecycle Scripts
Package defines install-time lifecycle scripts.
package.jsonView on unpkg · L80 MediumAmbiguous Install Lifecycle Script
Install-time lifecycle script is not statically allowlisted and needs review.
package.jsonView on unpkg · L80 81 "db:dir": "node -e \"require('fs').mkdirSync('.constella',{recursive:true})\"",
82 "db:generate": "drizzle-kit generate --config drizzle.config.mjs",
83 "predb:migrate": "npm run db:dir",
84 "db:migrate": "drizzle-kit migrate --config drizzle.config.mjs",
85 "predb:push": "npm run db:dir",
86 "db:push": "drizzle-kit push --config drizzle.config.mjs",
87 "db:studio": "drizzle-kit studio --config drizzle.config.mjs",
88 "predb:seed": "npm run db:dir",
89 "db:seed": "tsx src/db/seed.ts",
90 "db:migrate-fs": "tsx src/db/migrate-fs.ts",
91 "db:defake-models": "tsx src/db/defake-models.ts",
92 "db:reset-state": "tsx src/db/reset-state.ts",
93 "db:repair-fs": "tsx src/db/repair-fs.ts",
94 "db:nuke": "node -e \"const fs=require('fs'),os=require('os'),p=require('path');fs.rmSync('.constella',{recursive:true,force:true});fs.rmSync(p.join(process.env.CONSTELLA_HOME||p.join(os.homedir(),'.constella'),'organizations'),{recursive:true,force:true})\"",
95 "db:reset": "npm run db:nuke && npm run db:migrate",
96 "db:reset-demo": "npm run db:nuke && npm run db:migrate && npm run db:seed && npm run db:repair-fs",
97 "worker": "node --env-file=.env bin/worker.mjs",
98 "constella": "node bin/constella.mjs"