mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
## Stack Auth → Hexclave rename — PR 5 (internal symbols, paths,
packages, brand strings)
PR 5 finishes the **internal / non-wire** half of the Stack→Hexclave
rename. It only touches things where nothing outside the repo depends on
the exact name: internal symbols, file/dir names, the
`@stackframe/template` package, and residual brand strings. Plan +
progress are in `HEXCLAVE-RENAME-PR5-PLAN.md`.
Every step was verified green (`pnpm typecheck` + `pnpm lint`, 28/28)
and committed as its own checkpoint, then a fan-out of review agents
audited all commits and the findings were fixed.
### What changed
- **Internal symbols** (`@hexclave/shared`, `packages/template`, apps):
`stack*`/`Stack*` → `hexclave*`/`Hexclave*` — incl.
`stackGlobalsSymbol`, the `_Stack*AppImpl` classes,
`stackAppInternalsSymbol`, `StackContext`, `getStackStripe`, etc. The
`stack*App` local-variable convention
(`stackServerApp`/`stackClientApp`/…) was renamed across 175
source/example/doc files.
- **File renames**: `hexclave-handler/provider/context.tsx`,
`backend/hexclave.tsx`, `internal-tool/hexclave.ts`,
`hexclave-app-internals.ts`.
- **Directory renames**: `lib/hexclave-app`, `hexclave-companion`,
`[...hexclave]` route segment, `skills/hexclave`,
`dashboard/src/hexclave`, and the package dirs
**`packages/{next,shared,ui,sc,cli}`** (dropping the `stack-` prefix to
match the `@hexclave/*` npm names).
- **Packages**: `@stackframe/template` → `@hexclave/template`; **deleted
`packages/init-stack`** (onboarding lives in `@hexclave/cli init`; the
published npm package is untouched).
- **Brand strings**: reworded `Stack Auth`/`Stack dashboard` prose in
code + docs-mintlify, renamed `hexclave-app.mdx`/`use-hexclave-app.mdx`
with redirects, regenerated OpenAPI, updated coupled e2e assertions;
`doctor`/`init` now prefer `hexclave.config.ts`.
### Intentionally kept (verified, not oversights)
Wire/compat identifiers (`x-stack-*` headers, `stack-*` cookies,
`STACK_*` env names, `*.stack-auth.com`, `stackauth_`, `ask_stack_auth`,
query params), public `Stack*` SDK aliases, crypto/JWT/vault
domain-separation tags, `*-brand-sentinel`s, the
`Symbol.for("StackAuth--…")` string, `_stack_sync_metadata`, Postgres
`stackframe` / docker image names, the `stack-auth-logo*.svg` (used by
the rebrand modal), and `migration.mdx` / "formerly known as Stack Auth"
notes. False positives (Phosphor `StackIcon`/`StackSimple`, `TanStack`,
`OrbStack`, `stackable`/`Stacked` charts) left alone.
### Review pass
Six review agents audited all commits. Found + fixed one real bug — a
build script (`bundle-type-definitions.ts`) hardcoded the old
`lib/stack-app` glob path (not an import, so typecheck/lint were blind),
silently emptying the dashboard AI type bundle — plus stale comments, a
dead CI env var, and stale `.gitignore`/`.dockerignore` entries.
Cross-cutting audit confirmed **zero wire-compat identifiers were
accidentally renamed**.
### ⚠️ Verification note
`typecheck` + `lint` are fully green locally. The **e2e suite was not
run** (needs a live backend+DB), so the brand-string assertion +
OpenAPI-regen changes are verified by grep/codegen only — please let CI
exercise e2e to confirm.
### Base-branch note
This branch was forked from the local-only `cl/friendly-lewin-72293f`
(not on origin, no separate PR), so this PR against `dev` also carries
that branch's ~11 preceding Hexclave-rename commits (config-file rename,
env-var dual-read, AI setup-prompt rebrand). If those should land
separately, re-parent before merge.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Finishes the internal Stack Auth → Hexclave rename and cleans up
remaining stragglers, including dev-tool and prompt copy. All changes
are internal-only; public/wire APIs remain unchanged. Re-merged `dev`
and resolved the payments create-purchase-url conflict.
- **Refactors**
- Internal symbols: stack*/Stack* → hexclave*/Hexclave* (e.g.,
`getHexclaveServerApp` via `@/hexclave`, `getHexclaveStripe`,
`hexclaveAppInternalsSymbol`, `hexclaveSchemaInfo`, Prisma
`__hexclave_*`, `data-hexclave-handler-page`, Stripe mock
`hexclavePortPrefix`).
- Files/dirs: moved to `lib/hexclave-app`; handler route
`[...hexclave]`; backend entry `src/hexclave.tsx`; dashboard internals
`hexclave-app-internals`; companion `hexclave-companion`; dropped
`stack-` prefix across package dirs
(`packages/{shared,ui,sc,cli,next}`); workflows/emulator paths now
`packages/cli`; Quetzal codegen env at `packages/next/.env.local`.
- Packages/docs: `@stackframe/template` → `@hexclave/template`; removed
`packages/init-stack`; regenerated OpenAPI and updated docs
slugs/redirects for hexclave-app/use-hexclave-app.
- Brand strings/prompts: reworded remaining “Stack” dashboard strings to
Hexclave; updated dev-tool copy and prompts; `doctor/init` now prefer
`hexclave.config.ts`. Kept all wire-compat identifiers and public
aliases (`x-stack-*`, `stack-*` cookies, `STACK_*` env,
`*.stack-auth.com`, `Stack*` SDK names).
- Rebased/merged onto latest `dev`: retained `@hexclave/template`, kept
`src` in published files, refreshed setup-prompt imports and docs JSON,
adopted 1.0.5 version bumps, and re-merged `dev` again (resolved
`create-purchase-url` with `getHexclaveStripe`).
- **Bug Fixes**
- Restored dashboard AI type bundle by pointing the glob to
`packages/template/src/lib/hexclave-app`.
- Addressed rename leftovers: updated lingering `@/stack` imports and
CSS selector, fixed schema/meta and port-prefix expansions, and aligned
emulator commands to `packages/cli`.
- CI/build: removed a dead env var and stale ignore entries; fixed
Docker by renaming `STACK_SKIP_TEMPLATE_GENERATION` →
`HEXCLAVE_SKIP_TEMPLATE_GENERATION`.
<sup>Written for commit 3c1af3bff3.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1547?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
125 lines
11 KiB
JSON
125 lines
11 KiB
JSON
{
|
|
"name": "@hexclave/monorepo",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"repository": "https://github.com/hexclave/hexclave",
|
|
"scripts": {
|
|
"pre-no-codegen": "pnpm exec only-allow pnpm",
|
|
"pre-preinstall": "pnpx only-allow@1.2.2 pnpm && node -e \"if(process.env.HEXCLAVE_SKIP_TEMPLATE_GENERATION !== 'true') require('child_process').execSync('pnpm exec tsx ./scripts/generate-sdks.ts', {stdio: 'inherit'})\"",
|
|
"pre": "pnpm pre-preinstall",
|
|
"preinstall": "pnpm pre-preinstall",
|
|
"postinstall": "node ./scripts/postinstall-patch-next-async-debug-info.mjs",
|
|
"typecheck": "pnpm pre && turbo typecheck --",
|
|
"build:dev": "pnpm pre && NODE_ENV=development pnpm run build",
|
|
"build": "pnpm pre && turbo build",
|
|
"cli": "pnpm pre && turbo run build --filter=@hexclave/cli && pnpm run cli:no-build",
|
|
"cli:no-build": "pnpm pre && echo && echo && echo '[CLI output starts below]' && echo && echo && STACK_API_URL=http://localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}02 STACK_DASHBOARD_URL=http://localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}01 STACK_CLI_PUBLISHABLE_CLIENT_KEY=this-publishable-client-key-is-for-local-development-only node packages/cli/dist/index.js",
|
|
"build:backend": "pnpm pre && turbo run build --filter=@hexclave/backend...",
|
|
"build:dashboard": "pnpm pre && turbo run build --filter=@hexclave/dashboard...",
|
|
"build:demo": "pnpm pre && turbo run build --filter=@hexclave/example-demo-app...",
|
|
"build:docs": "pnpm run build:packages && pnpm run codegen && pnpm run build:backend && turbo run build --filter=@hexclave/docs-mintlify",
|
|
"build:packages": "pnpm pre && turbo run build --filter=./packages/*",
|
|
"clean": "pnpm pre-no-codegen && turbo run --concurrency 1 clean && rimraf --glob **/.next && rimraf --glob **/.turbo && rimraf .turbo && rimraf --glob **/node_modules && rimraf node_modules",
|
|
"uff-cutie": "pnpm clean && pnpm i && (pnpm build || true) && pnpm codegen",
|
|
"fml": "pnpm uff-cutie && pnpm restart-deps",
|
|
"codegen": "pnpm pre && turbo run codegen && pnpm run generate-sdks && pnpm run generate-setup-prompt-docs",
|
|
"codegen:backend": "pnpm pre && turbo run codegen --filter=@hexclave/backend...",
|
|
"deps-compose": "docker compose -p stack-dependencies-${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81} -f docker/dependencies/docker.compose.yaml",
|
|
"emulator:generate-env": "node ./docker/local-emulator/generate-env-development.mjs",
|
|
"emulator:check-env": "node ./docker/local-emulator/generate-env-development.mjs --check",
|
|
"emulator:start": "pnpm run emulator:generate-env && docker/local-emulator/qemu/run-emulator.sh start",
|
|
"emulator:stop": "docker/local-emulator/qemu/run-emulator.sh stop",
|
|
"emulator:reset": "docker/local-emulator/qemu/run-emulator.sh reset",
|
|
"emulator:status": "docker/local-emulator/qemu/run-emulator.sh status",
|
|
"emulator:build": "docker/local-emulator/qemu/build-image.sh",
|
|
"emulator:bench": "docker/local-emulator/qemu/run-emulator.sh bench",
|
|
"stop-deps": "POSTGRES_DELAY_MS=0 pnpm run deps-compose kill && POSTGRES_DELAY_MS=0 pnpm run deps-compose down -v",
|
|
"wait-until-postgres-is-ready:pg_isready": "until pg_isready -h localhost -p ${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}28 && pg_isready -h localhost -p ${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}34; do sleep 1; done",
|
|
"wait-until-postgres-is-ready": "command -v pg_isready >/dev/null 2>&1 && pnpm run wait-until-postgres-is-ready:pg_isready || sleep 10",
|
|
"wait-until-clickhouse-is-ready": "echo 'Waiting for ClickHouse to be ready...' && pnpm exec wait-on -t 10000 -v http-get://localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}36/ping || echo 'ClickHouse is not ready after 10 seconds (this is probably a problem with our wait-on setup TODO fix), continuing regardless...'",
|
|
"start-deps:no-delay": "pnpm pre && pnpm run deps-compose up --detach --build && pnpm run wait-until-postgres-is-ready && pnpm run wait-until-clickhouse-is-ready && pnpm run db:init && echo \"\\nDependencies started in the background as Docker containers. 'pnpm run stop-deps' to stop them\"",
|
|
"start-deps": "POSTGRES_DELAY_MS=${POSTGRES_DELAY_MS:-0} pnpm run start-deps:no-delay",
|
|
"restart-deps": "pnpm pre && pnpm run stop-deps && pnpm run start-deps",
|
|
"restart-deps:no-delay": "pnpm pre && pnpm run stop-deps && pnpm run start-deps:no-delay",
|
|
"restart-deps:with-tests": "pnpm run restart-deps && pnpm test run auto-migrations/migration-tests",
|
|
"psql": "pnpm pre && pnpm run --filter=@hexclave/backend psql",
|
|
"clickhouse": "pnpm pre && pnpm run --filter=@hexclave/backend clickhouse",
|
|
"explain-query": "pnpm pre && echo 'Paste your query (end with Ctrl-D):' && query=$(cat) && echo 'Connecting to Postgres...' && printf \"EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)\n$query\" | pnpm run --silent psql -qAt | sed -n '/\\[/,$p' > explained-query.untracked.json && echo 'Explained query saved to explained-query.untracked.json. To analyze it, open it in the query analyzer at https://tatiyants.com/pev/#/plans/new'",
|
|
"db:migration-gen": "pnpm pre && pnpm run --filter=@hexclave/backend db:migration-gen",
|
|
"db:reset": "pnpm pre && pnpm run --filter=@hexclave/backend db:reset",
|
|
"db:seed": "pnpm pre && pnpm run --filter=@hexclave/backend db:seed",
|
|
"db:init": "pnpm pre && pnpm run --filter=@hexclave/backend db:init",
|
|
"db:migrate": "pnpm pre && pnpm run --filter=@hexclave/backend db:migrate",
|
|
"db:backfill-internal-free-plans": "pnpm pre && pnpm run --filter=@hexclave/backend db:backfill-internal-free-plans",
|
|
"db:regen-internal-subscriptions-to-latest": "pnpm pre && pnpm run --filter=@hexclave/backend db:regen-internal-subscriptions-to-latest",
|
|
"dev:full": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"pnpm run generate-setup-prompt-docs:watch\" \"turbo run dev --concurrency 99999\"",
|
|
"dev": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"pnpm run generate-openapi-docs:watch\" \"pnpm run generate-setup-prompt-docs:watch\" \"turbo run dev --concurrency 99999 --filter=./apps/* --filter=@hexclave/docs-mintlify --filter=./packages/* --filter=./examples/demo --filter=./examples/tanstack-start-demo \"",
|
|
"dev:tui": "pnpm pre && (trap 'kill 0' EXIT; pnpm run generate-sdks:watch & pnpm run generate-openapi-docs:watch & pnpm run generate-setup-prompt-docs:watch & turbo run dev --ui tui --concurrency 99999 --filter=./apps/* --filter=@hexclave/docs-mintlify --filter=./packages/* --filter=./examples/demo --filter=./examples/tanstack-start-demo)",
|
|
"dev:inspect": "pnpm pre && STACK_BACKEND_DEV_EXTRA_ARGS=\"--inspect\" pnpm run dev",
|
|
"dev:profile": "pnpm pre && STACK_BACKEND_DEV_EXTRA_ARGS=\"--experimental-cpu-prof\" pnpm run dev",
|
|
"dev:basic": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"turbo run dev --concurrency 99999 --filter=@hexclave/backend --filter=@hexclave/mcp --filter=@hexclave/dashboard --filter=@hexclave/mock-oauth-server\"",
|
|
"dev:docs": "pnpm pre && concurrently -k \"pnpm run generate-setup-prompt-docs:watch\" \"turbo run dev --concurrency 99999 --filter=@hexclave/docs-mintlify\"",
|
|
"dev:named": "pnpm pre && concurrently -k \"pnpm run dev\" \"node -e \\\"process.title='node (stack-named-dev-server)'; process.stdin.resume();\\\"\"",
|
|
"kill-dev:named": "(pgrep -f 'stack-named-dev-server' | xargs -r -n1 pkill -P); echo 'Killed named dev server (if found). Sleeping to give some time for it to shut down...' && sleep 10",
|
|
"kms": "PREFIX=${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}; for p in 00 01 02 03 04 06 14 42; do pids=$(lsof -i :$PREFIX$p 2>/dev/null | grep LISTEN | awk '$1 != \"OrbStack\" {print $2}' | sort -u); [ -n \"$pids\" ] && echo $pids | xargs kill -9 2>/dev/null; done; echo Done.",
|
|
"start": "pnpm pre && turbo run start --concurrency 99999",
|
|
"start:backend": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/backend",
|
|
"start:mcp": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/mcp",
|
|
"start:dashboard": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/dashboard",
|
|
"start:mock-oauth-server": "pnpm pre && turbo run start --concurrency 99999 --filter=@hexclave/mock-oauth-server",
|
|
"lint": "pnpm pre && turbo run lint --continue -- --max-warnings=0",
|
|
"release": "pnpm pre && release",
|
|
"dotenv": "dotenv",
|
|
"peek": "pnpm pre && pnpm release --peek",
|
|
"changeset": "pnpm pre && changeset",
|
|
"test": "pnpm pre && vitest",
|
|
"test:e2e": "pnpm pre && vitest e2e/tests",
|
|
"test:unit": "pnpm pre && vitest src",
|
|
"verify-data-integrity": "pnpm pre && pnpm -C apps/backend run verify-data-integrity",
|
|
"generate-keys": "pnpm pre && turbo run generate-keys",
|
|
"generate-sdks": "pnpm exec tsx ./scripts/generate-sdks.ts",
|
|
"generate-setup-prompt-docs": "pnpm exec tsx ./scripts/generate-setup-prompt-docs.ts",
|
|
"generate-sdks:watch": "chokidar --silent -c 'pnpm run generate-sdks' './packages/template' --ignore './packages/template/package.json' --ignore '**/node_modules/**' --ignore '**/dist/**' --ignore '**/.turbo/**' --throttle 2000",
|
|
"generate-openapi-docs:watch": "pnpm exec tsx ./scripts/wait-for-dev-package-imports.ts && pnpm run --filter=@hexclave/backend codegen-docs && chokidar --silent -c 'pnpm run --filter=@hexclave/backend codegen-docs' './apps/backend/src/app/api/latest/**/route.{js,jsx,ts,tsx}' './apps/backend/src/lib/openapi.ts' './packages/shared/src/interface/webhooks.ts' --throttle 2000",
|
|
"generate-setup-prompt-docs:watch": "pnpm run generate-setup-prompt-docs && chokidar --silent -c 'pnpm run generate-setup-prompt-docs' './docs-mintlify/docs.json' './packages/shared/src/ai/unified-prompts/**/*.ts' './scripts/generate-setup-prompt-docs.ts' --throttle 2000"
|
|
},
|
|
"devDependencies": {
|
|
"@changesets/cli": "^2.27.9",
|
|
"@testing-library/react": "^15.0.7",
|
|
"@types/node": "20.17.6",
|
|
"@types/supertest": "^6.0.2",
|
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
"@typescript-eslint/parser": "^8.56.1",
|
|
"@vitejs/plugin-react": "^4.3.3",
|
|
"chokidar-cli": "^3.0.0",
|
|
"codebuff": "^1.0.261",
|
|
"concurrently": "^8.2.2",
|
|
"dotenv-cli": "^7.3.0",
|
|
"esbuild": "^0.24.0",
|
|
"eslint": "^8.57.0",
|
|
"eslint-config-next": "^14.2.17",
|
|
"eslint-plugin-import": "^2.31.0",
|
|
"eslint-plugin-node": "^11.1.0",
|
|
"eslint-plugin-promise": "^6.6.0",
|
|
"eslint-plugin-react": "^7.37.2",
|
|
"jsdom": "^24.1.3",
|
|
"only-allow": "^1.2.1",
|
|
"rimraf": "^5.0.10",
|
|
"tsdown": "^0.20.3",
|
|
"turbo": "^2.8.15",
|
|
"typescript": "5.9.3",
|
|
"vite-tsconfig-paths": "^4.3.2",
|
|
"vitest": "^1.6.0",
|
|
"wait-on": "^8.0.1"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.13.0"
|
|
},
|
|
"packageManager": "pnpm@11.5.0+sha512.dbfcc4f81cf48597afd4bc391ffdf12c11f1a9fb83a395bfa6b0a2d9cc2fd8ffebafdb1ccbd529632153f793904c2615b7f09fe1a345473fd1c35845172a8eb1",
|
|
"dependencies": {
|
|
"commander": "^13.1.0",
|
|
"tsx": "^4.19.3",
|
|
"yaml": "^2.4.5"
|
|
}
|
|
}
|