docs: rank the destructive generator as item 0
Quality / quality (ubuntu-latest) (push) Failing after 19m36s
Quality / quality (windows-latest) (push) Canceled after 0s

It was written up in 4.7 but never made the work order, which is exactly how it
stayed dangerous in the first place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-09 11:18:45 +05:30
co-authored by Claude Opus 5
parent 790b81330a
commit 247f360ae7
79 changed files with 2759 additions and 146 deletions
@@ -0,0 +1,17 @@
{
"name": "@app/shared",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "src/index.ts",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"typecheck": "tsc --noEmit",
"test": "bun test"
},
"dependencies": {
"@wrnexus/pubsub": "0.8.6"
}
}
@@ -0,0 +1,30 @@
/**
* Shared code for every app in this workspace. Import it anywhere: `@app/shared`.
* The cross-app event bus uses Redis so messages reach every app process/domain.
*/
import { createPubSub } from "../../../../../packages/pubsub/src/index.ts";
import { redisDriver } from "../../../../../packages/pubsub/src/redis.ts";
import { defineService, procedure } from "../../../../../packages/rpc/src/index.ts";
import { v } from "../../../../../packages/validation/src/index.ts";
// One bus per process, backed by Redis (set REDIS_URL, defaults to localhost:6379).
export const bus = createPubSub(redisDriver(process.env.REDIS_URL));
// Shared domain types can live here and be imported by every app.
export interface Tenant {
id: string;
name: string;
}
/** Contract shared by web (caller) and admin (callee). */
export const catalogService = defineService({
name: "catalog",
procedures: {
getProduct: procedure
.input(v.object({ sku: v.string() }))
.output<{ sku: string; name: string; priceCents: number }>()
.permission("catalog:read")
.idempotent()
.build(),
},
});