From 32e2b1cc26101e30fd535220d0262bfc495dfee5 Mon Sep 17 00:00:00 2001 From: Vensin Date: Thu, 12 Nov 2026 10:30:47 +0100 Subject: [PATCH] chore: use @inkanjs/inkan, the core's new name --- app/docs/layout.tsx | 2 +- app/hanko/page.tsx | 2 +- components/landing/chrome.tsx | 2 +- components/landing/hero.tsx | 2 +- content/blog/inkan-0-9.mdx | 2 +- content/docs/api/app.mdx | 8 ++--- content/docs/api/context.mdx | 4 +-- content/docs/api/problems.mdx | 2 +- content/docs/api/routing.mdx | 4 +-- content/docs/api/schemas.mdx | 2 +- content/docs/built-in/compress.mdx | 2 +- content/docs/built-in/cors.mdx | 2 +- content/docs/built-in/rate-limit.mdx | 2 +- content/docs/built-in/static.mdx | 2 +- content/docs/client.mdx | 2 +- content/docs/deploy.mdx | 2 +- content/docs/hooks.mdx | 2 +- content/docs/index.mdx | 2 +- content/docs/installation.mdx | 4 +-- content/docs/integrations/bun.mdx | 4 +-- content/docs/integrations/next.mdx | 4 +-- content/docs/integrations/query.mdx | 2 +- content/docs/integrations/recipes.mdx | 2 +- content/docs/integrations/uws.mdx | 2 +- content/docs/integrations/vite.mdx | 6 ++-- content/docs/jobs.mdx | 2 +- content/docs/middleware.mdx | 4 +-- content/docs/migrate/fastify.mdx | 2 +- content/docs/official/auth.mdx | 2 +- content/docs/official/circuit-breaker.mdx | 2 +- content/docs/official/idempotency.mdx | 2 +- content/docs/official/mongo.mdx | 4 +-- content/docs/official/mysql.mdx | 4 +-- content/docs/official/postgres.mdx | 6 ++-- content/docs/official/redis.mdx | 6 ++-- content/docs/official/session.mdx | 4 +-- content/docs/plugins.mdx | 12 ++++---- content/docs/publish-a-plugin.mdx | 12 ++++---- content/docs/recipes/databases.mdx | 8 ++--- content/docs/runtime.mdx | 4 +-- content/docs/schemas.mdx | 2 +- content/docs/stability.mdx | 8 ++--- content/docs/storage.mdx | 16 +++++----- content/docs/streams.mdx | 4 +-- content/docs/websocket.mdx | 2 +- data/hanko.ts | 22 +++++++------- lib/community.ts | 2 +- package-lock.json | 36 +++++++++++------------ package.json | 4 +-- server/app.ts | 2 +- source.config.ts | 2 +- 51 files changed, 122 insertions(+), 122 deletions(-) diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx index df75f7b..f59c747 100644 --- a/app/docs/layout.tsx +++ b/app/docs/layout.tsx @@ -15,7 +15,7 @@ export default function Layout({ children }: LayoutProps<"/docs">) { url: "/", }} githubUrl="https://github.com/inkanjs/inkan" - links={[{ text: "Hanko", url: "/hanko" }, { text: "npm", url: "https://www.npmjs.com/package/@vxnsin/inkan", external: true }]} + links={[{ text: "Hanko", url: "/hanko" }, { text: "npm", url: "https://www.npmjs.com/package/@inkanjs/inkan", external: true }]} > {children} diff --git a/app/hanko/page.tsx b/app/hanko/page.tsx index b17e49c..f27c5ee 100644 --- a/app/hanko/page.tsx +++ b/app/hanko/page.tsx @@ -19,7 +19,7 @@ const PACKAGE = `// package.json "description": "One line: what it does.", "keywords": ["inkan", "inkan-plugin"], "peerDependencies": { - "@vxnsin/inkan": ">=0.8.0 <1.0.0" + "@inkanjs/inkan": ">=0.8.0 <1.0.0" } }`; diff --git a/components/landing/chrome.tsx b/components/landing/chrome.tsx index d701f9b..a4f861f 100644 --- a/components/landing/chrome.tsx +++ b/components/landing/chrome.tsx @@ -76,7 +76,7 @@ export function Footer() { {[ { title: "Learn", links: [["Docs", "/docs"], ["Installation", "/docs/installation"], ["Routes", "/docs/routes"], ["Compared", "/docs/compare"], ["From Express", "/docs/migrate/express"], ["From Fastify", "/docs/migrate/fastify"], ["npm create inkan", "/docs/installation#start-a-project"]] }, - { title: "Packages", links: [["@vxnsin/inkan", "https://www.npmjs.com/package/@vxnsin/inkan"], ["@inkanjs/vite", "/docs/integrations/vite"], ["@inkanjs/next", "/docs/integrations/next"], ["@inkanjs/query", "/docs/integrations/query"], ["@inkanjs/uws", "/docs/integrations/uws"], ["@inkanjs/bun", "/docs/integrations/bun"], ["check-action", "https://github.com/inkanjs/check-action"]] }, + { title: "Packages", links: [["@inkanjs/inkan", "https://www.npmjs.com/package/@inkanjs/inkan"], ["@inkanjs/vite", "/docs/integrations/vite"], ["@inkanjs/next", "/docs/integrations/next"], ["@inkanjs/query", "/docs/integrations/query"], ["@inkanjs/uws", "/docs/integrations/uws"], ["@inkanjs/bun", "/docs/integrations/bun"], ["check-action", "https://github.com/inkanjs/check-action"]] }, { title: "Project", links: [["Hanko", "/hanko"], ["Benchmarks", "/benchmarks"], ["Community", "/community"], ["Blog", "/blog"], ["GitHub", "https://github.com/inkanjs/inkan"], ["Integrations", "https://github.com/inkanjs/integrations"], ["Changelog", "https://github.com/inkanjs/inkan/blob/main/CHANGELOG.md"], ["This API's docs", "/api/docs"]] }, ].map((col) => (
diff --git a/components/landing/hero.tsx b/components/landing/hero.tsx index f79f395..b6cbb37 100644 --- a/components/landing/hero.tsx +++ b/components/landing/hero.tsx @@ -174,7 +174,7 @@ export function Hero() {

a project with a store, auth and tests · into one you have:{" "} - npm i @vxnsin/inkan + npm i @inkanjs/inkan

diff --git a/content/blog/inkan-0-9.mdx b/content/blog/inkan-0-9.mdx index 793d1f4..b5b87b2 100644 --- a/content/blog/inkan-0-9.mdx +++ b/content/blog/inkan-0-9.mdx @@ -108,7 +108,7 @@ This site got the things I kept being asked for: ## Upgrading ```sh -npm install @vxnsin/inkan@0.9 +npm install @inkanjs/inkan@0.9 ``` There is nothing to change in your code. One thing for CI scripts: the CLI now exits with 2, diff --git a/content/docs/api/app.mdx b/content/docs/api/app.mdx index 6defeab..bed7bda 100644 --- a/content/docs/api/app.mdx +++ b/content/docs/api/app.mdx @@ -4,7 +4,7 @@ description: "inkan(): the app, its options, and everything it can do." --- ```ts -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; const app = inkan({ title: "Tea Shop", version: "1.0.0" }) .get("/hello", () => ({ hello: "world" })); @@ -99,7 +99,7 @@ request, so a route pays for it only when a scope above it has one. Experimental ## register() ```ts -import { plugin } from "@vxnsin/inkan"; +import { plugin } from "@inkanjs/inkan"; const admin = plugin((scope, options: { token: string }) => { scope.onRequest((ctx) => { @@ -209,7 +209,7 @@ Read-only. `dev` is whether the app runs in development (the `dev` option, by de with `register(p, options, { prefix: "/v1" })`. New in 0.7.0. ```ts -import { joinPath } from "@vxnsin/inkan"; +import { joinPath } from "@inkanjs/inkan"; joinPath(scope.prefix, "/login"); // "/auth/login", one slash between the parts ``` @@ -239,7 +239,7 @@ docs page list them. Whether the credentials are good is for your hook or handle ## mount() ```ts -import { routes } from "@vxnsin/inkan"; +import { routes } from "@inkanjs/inkan"; const teas = routes().get("/", list).get("/:id", spec, one); app.mount("/teas", teas); diff --git a/content/docs/api/context.mdx b/content/docs/api/context.mdx index 5b38fd5..69e878c 100644 --- a/content/docs/api/context.mdx +++ b/content/docs/api/context.mdx @@ -111,7 +111,7 @@ Free space for middleware to hand things on to the handler. For values that are every request, a [decoration](/docs/api/app#decorate) is cheaper. ```ts -import { stateKey } from "@vxnsin/inkan"; +import { stateKey } from "@inkanjs/inkan"; export const tenant = stateKey("tenant"); @@ -194,7 +194,7 @@ Plain text. The status is the one `status()` set, or the usual one, unless given ## html() ```ts -import { html } from "@vxnsin/inkan"; +import { html } from "@inkanjs/inkan"; app.get("/tea/:name", ({ params, html: page }) => page(html`

${params.name}

`)); app.get("/hi/:name", ({ params }) => html`

Hello, ${params.name}

`); // the same, returned as it is diff --git a/content/docs/api/problems.mdx b/content/docs/api/problems.mdx index a663283..4503013 100644 --- a/content/docs/api/problems.mdx +++ b/content/docs/api/problems.mdx @@ -4,7 +4,7 @@ description: "How inkan answers when something is wrong: RFC 9457 problem docume --- ```ts -import { problem } from "@vxnsin/inkan"; +import { problem } from "@inkanjs/inkan"; app.post("/teas", { body: NewTea }, ({ body }) => { if (store.has(body.name)) throw problem(409, "taken", `There is a tea called ${body.name}`, { name: body.name }); diff --git a/content/docs/api/routing.mdx b/content/docs/api/routing.mdx index 2787470..6ff37ba 100644 --- a/content/docs/api/routing.mdx +++ b/content/docs/api/routing.mdx @@ -186,7 +186,7 @@ for the whole. A client that sends `accept: application/x-ndjson` gets one JSON ## Groups ```ts -import { routes } from "@vxnsin/inkan"; +import { routes } from "@inkanjs/inkan"; const admin = routes().security("bearer").use(audit).get("/stats", stats); app.mount("/admin", admin); @@ -200,7 +200,7 @@ under a prefix, types and all. For hooks and decorations of their own, use a ```ts // routes/teas/[id].ts -import { route, t } from "@vxnsin/inkan"; +import { route, t } from "@inkanjs/inkan"; export const GET = route({ params: t.object({ id: t.int() }) }, ({ params }) => findTea(params.id)); ``` diff --git a/content/docs/api/schemas.mdx b/content/docs/api/schemas.mdx index c29c2f2..4871566 100644 --- a/content/docs/api/schemas.mdx +++ b/content/docs/api/schemas.mdx @@ -4,7 +4,7 @@ description: "t: every schema, and every rule a schema takes." --- ```ts -import { t } from "@vxnsin/inkan"; +import { t } from "@inkanjs/inkan"; const Tea = t.object({ id: t.int(), diff --git a/content/docs/built-in/compress.mdx b/content/docs/built-in/compress.mdx index 00c3d66..3f41346 100644 --- a/content/docs/built-in/compress.mdx +++ b/content/docs/built-in/compress.mdx @@ -4,7 +4,7 @@ description: "Brotli or gzip, as the client takes it." --- ```ts -import { compress } from "@vxnsin/inkan"; +import { compress } from "@inkanjs/inkan"; app.register(compress()); ``` diff --git a/content/docs/built-in/cors.mdx b/content/docs/built-in/cors.mdx index 6bcd730..9b387c8 100644 --- a/content/docs/built-in/cors.mdx +++ b/content/docs/built-in/cors.mdx @@ -4,7 +4,7 @@ description: "Lets pages on other origins call the API." --- ```ts -import { cors } from "@vxnsin/inkan"; +import { cors } from "@inkanjs/inkan"; app.register(cors({ origins: ["https://shop.example"], credentials: true })); ``` diff --git a/content/docs/built-in/rate-limit.mdx b/content/docs/built-in/rate-limit.mdx index 9e7320c..203398e 100644 --- a/content/docs/built-in/rate-limit.mdx +++ b/content/docs/built-in/rate-limit.mdx @@ -4,7 +4,7 @@ description: "At most so many requests per client and window." --- ```ts -import { rateLimit } from "@vxnsin/inkan"; +import { rateLimit } from "@inkanjs/inkan"; app.register(rateLimit({ max: 120 })); // 120 a minute, per client ``` diff --git a/content/docs/built-in/static.mdx b/content/docs/built-in/static.mdx index 44c63fb..53c6adf 100644 --- a/content/docs/built-in/static.mdx +++ b/content/docs/built-in/static.mdx @@ -4,7 +4,7 @@ description: "The built frontend next to the API, with the fallback a single-pag --- ```ts -import { compress, serveStatic } from "@vxnsin/inkan"; +import { compress, serveStatic } from "@inkanjs/inkan"; app .register(compress()) diff --git a/content/docs/client.mdx b/content/docs/client.mdx index 8150b5d..1f4e4dc 100644 --- a/content/docs/client.mdx +++ b/content/docs/client.mdx @@ -15,7 +15,7 @@ export const api = inkan() // web.ts: only the type crosses over, none of the server import type { api } from "./server.ts"; -import { client } from "@vxnsin/inkan/client"; +import { client } from "@inkanjs/inkan/client"; const shop = client("https://shop.example.com", { headers: () => ({ authorization: `Bearer ${token}` }) }); diff --git a/content/docs/deploy.mdx b/content/docs/deploy.mdx index 1889ad2..0a95cb7 100644 --- a/content/docs/deploy.mdx +++ b/content/docs/deploy.mdx @@ -103,7 +103,7 @@ An app that serves its own built frontend registers two plugins: the files, with fallback a single-page app needs, and compression for everything that pays. ```ts -import { compress, serveStatic } from "@vxnsin/inkan"; +import { compress, serveStatic } from "@inkanjs/inkan"; app .register(compress()) // brotli or gzip, as the client takes it; streams too, event streams not diff --git a/content/docs/hooks.mdx b/content/docs/hooks.mdx index efb877d..eb1f5dd 100644 --- a/content/docs/hooks.mdx +++ b/content/docs/hooks.mdx @@ -22,7 +22,7 @@ A plugin is a function that gets a scope of its own. What it adds there (routes, hooks, decorations) stays there, under its prefix, unless it says `shared: true`: ```ts -import { plugin, problem, rateLimit } from "@vxnsin/inkan"; +import { plugin, problem, rateLimit } from "@inkanjs/inkan"; const admin = plugin(async (app, opts: { token: string }) => { app.register(rateLimit({ max: 10 })); // only these routes diff --git a/content/docs/index.mdx b/content/docs/index.mdx index 0679bd2..3c6b4ed 100644 --- a/content/docs/index.mdx +++ b/content/docs/index.mdx @@ -10,7 +10,7 @@ checks what goes out, writes OpenAPI 3.1, serves the docs, and runs every example as a test. ```ts -import { inkan, problem, t } from "@vxnsin/inkan"; +import { inkan, problem, t } from "@inkanjs/inkan"; const Tea = t.object({ id: t.int(), name: t.string(), kind: t.enum(["green", "black", "oolong"]) }); const teas = [{ id: 1, name: "Sencha", kind: "green" as const }]; diff --git a/content/docs/installation.mdx b/content/docs/installation.mdx index 46614b0..4a3eed5 100644 --- a/content/docs/installation.mdx +++ b/content/docs/installation.mdx @@ -4,7 +4,7 @@ description: "Install inkan, start an app, try the example." --- ```sh -npm install @vxnsin/inkan +npm install @inkanjs/inkan ``` The package is scoped because npm keeps the plain name `inkan` free of look-alikes. The command it installs is `inkan` either way. @@ -69,7 +69,7 @@ statuses the auth plugin promises that no single example can show. ```sh -npx @vxnsin/inkan examples # pick one, and it lands in a folder of its own +npx @inkanjs/inkan examples # pick one, and it lands in a folder of its own ``` Six example projects, in reading order, each explained file by file: diff --git a/content/docs/integrations/bun.mdx b/content/docs/integrations/bun.mdx index 164965b..70633a6 100644 --- a/content/docs/integrations/bun.mdx +++ b/content/docs/integrations/bun.mdx @@ -17,13 +17,13 @@ Bun's own websockets carrying the frames. ## Install ```sh -bun add @vxnsin/inkan @inkanjs/bun +bun add @inkanjs/inkan @inkanjs/bun ``` ## Use ```ts -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; import { serve } from "@inkanjs/bun"; const app = inkan().get("/teas/:id", { params: t.object({ id: t.int() }) }, ({ params }) => ({ id: params.id })); diff --git a/content/docs/integrations/next.mdx b/content/docs/integrations/next.mdx index e300980..187f166 100644 --- a/content/docs/integrations/next.mdx +++ b/content/docs/integrations/next.mdx @@ -8,7 +8,7 @@ route handlers, as a Pages Router API route, and as a typed client for Server Co Contracts, validation, problems, `/docs` and the inspector all come along. ```sh -npm install @vxnsin/inkan @inkanjs/next +npm install @inkanjs/inkan @inkanjs/next ``` The app keeps its routes under `/api`, and its docs, document and inspector too, so every @@ -16,7 +16,7 @@ link on the docs page points where Next will route it: ```ts // server/app.ts -import { inkan, routes, t } from "@vxnsin/inkan"; +import { inkan, routes, t } from "@inkanjs/inkan"; const teas = routes().get("/teas/:id", { params: t.object({ id: t.int() }) }, ({ params }) => findTea(params.id)); diff --git a/content/docs/integrations/query.mdx b/content/docs/integrations/query.mdx index 2b10ac7..0548f36 100644 --- a/content/docs/integrations/query.mdx +++ b/content/docs/integrations/query.mdx @@ -13,7 +13,7 @@ npm install @inkanjs/query ``` ```ts -import { client } from "@vxnsin/inkan/client"; +import { client } from "@inkanjs/inkan/client"; import { queries } from "@inkanjs/query"; import type { app } from "../server/app"; diff --git a/content/docs/integrations/recipes.mdx b/content/docs/integrations/recipes.mdx index 02a2298..f700def 100644 --- a/content/docs/integrations/recipes.mdx +++ b/content/docs/integrations/recipes.mdx @@ -9,7 +9,7 @@ under the prefix the framework routes to it, so every link on the docs page poin ```ts // server/app.ts, the same in every recipe -import { inkan, plugin, t } from "@vxnsin/inkan"; +import { inkan, plugin, t } from "@inkanjs/inkan"; const api = plugin((app) => { app.get("/teas/:id", { params: t.object({ id: t.int() }) }, ({ params }) => findTea(params.id)); diff --git a/content/docs/integrations/uws.mdx b/content/docs/integrations/uws.mdx index 828fad1..7faf584 100644 --- a/content/docs/integrations/uws.mdx +++ b/content/docs/integrations/uws.mdx @@ -24,7 +24,7 @@ npm install --allow-git=all "uWebSockets.js@github:uNetworking/uWebSockets.js#v2 ## Use ```ts -import { inkan } from "@vxnsin/inkan"; +import { inkan } from "@inkanjs/inkan"; import { serve } from "@inkanjs/uws"; const app = inkan().get("/hello", () => ({ hello: "world" })); diff --git a/content/docs/integrations/vite.mdx b/content/docs/integrations/vite.mdx index 72f1630..89946f0 100644 --- a/content/docs/integrations/vite.mdx +++ b/content/docs/integrations/vite.mdx @@ -8,7 +8,7 @@ and the API on one port, no proxy and no CORS, and the API reloaded on every sav for every Vite project: Vue, React, Svelte, Solid, plain TypeScript. ```sh -npm install @vxnsin/inkan +npm install @inkanjs/inkan npm install -D @inkanjs/vite ``` @@ -26,7 +26,7 @@ The app keeps its routes, and its docs, document and inspector, under the prefix ```ts // src/server/app.ts -import { inkan, routes } from "@vxnsin/inkan"; +import { inkan, routes } from "@inkanjs/inkan"; const teas = routes().get("/teas", () => listTeas()); @@ -75,7 +75,7 @@ Pair it with the typed client and every call in the frontend is checked against by the compiler (it sees the routes of a chain and of `mount`): ```ts -import { client } from "@vxnsin/inkan/client"; +import { client } from "@inkanjs/inkan/client"; import type { app } from "../server/app"; const api = client(location.origin); diff --git a/content/docs/jobs.mdx b/content/docs/jobs.mdx index e38dbe4..7800ac1 100644 --- a/content/docs/jobs.mdx +++ b/content/docs/jobs.mdx @@ -208,7 +208,7 @@ first of the month and every Monday. `@yearly`, `@monthly`, `@weekly`, `@daily`, ## Where jobs are kept ```ts notwoslash -import { memoryStore } from "@vxnsin/inkan"; +import { memoryStore } from "@inkanjs/inkan"; import { redisStore } from "@inkanjs/redis"; app.job("/exports", { store: memoryStore({ max: 5000 }) }, run); // this process diff --git a/content/docs/middleware.mdx b/content/docs/middleware.mdx index a2aee94..5a84cf8 100644 --- a/content/docs/middleware.mdx +++ b/content/docs/middleware.mdx @@ -53,7 +53,7 @@ without them breaks the contract like a wrong body does. origin, add `cors()`: ```ts -import { cors } from "@vxnsin/inkan"; +import { cors } from "@inkanjs/inkan"; app.register(cors()); // any origin app.register(cors({ origins: ["https://shop.example"], credentials: true })); // one origin, with cookies @@ -79,7 +79,7 @@ routes/files/[...rest].ts /files/*rest ```ts // routes/teas/[id].ts -import { route, t } from "@vxnsin/inkan"; +import { route, t } from "@inkanjs/inkan"; export const GET = route({ params: t.object({ id: t.int() }), response: { 200: Tea } }, ({ params }) => find(params.id)); export const DELETE = route({ params: t.object({ id: t.int() }) }, ({ params }) => remove(params.id)); diff --git a/content/docs/migrate/fastify.mdx b/content/docs/migrate/fastify.mdx index 91e648b..85cff6a 100644 --- a/content/docs/migrate/fastify.mdx +++ b/content/docs/migrate/fastify.mdx @@ -193,7 +193,7 @@ fastify.register(poweredBy); ``` ```ts title="inkan" -import { plugin } from "@vxnsin/inkan"; +import { plugin } from "@inkanjs/inkan"; // scoped: its hooks reach only its own routes const admin = plugin((scope, opts: { token: string }) => { diff --git a/content/docs/official/auth.mdx b/content/docs/official/auth.mdx index 585fcca..d6f7723 100644 --- a/content/docs/official/auth.mdx +++ b/content/docs/official/auth.mdx @@ -405,7 +405,7 @@ scheme: list your public origin in `origins`. Sessions, refresh tokens, pending TOTP secrets and used TOTP steps live in `store`; the brute-force counters in `bruteForce.store`, a second one. Both are inkan -[`Store`](/docs/storage)s, by default `memoryStore()` from `@vxnsin/inkan`: in memory, per +[`Store`](/docs/storage)s, by default `memoryStore()` from `@inkanjs/inkan`: in memory, per process (100 000 keys for `store`, 50 000 for the counters). For several processes, give shared ones, from an adapter or written against the interface: diff --git a/content/docs/official/circuit-breaker.mdx b/content/docs/official/circuit-breaker.mdx index caca9ca..3c0dd80 100644 --- a/content/docs/official/circuit-breaker.mdx +++ b/content/docs/official/circuit-breaker.mdx @@ -26,7 +26,7 @@ The common case: a service you call that sometimes falls over. Wrap the call onc the wrapped function as before. ```ts -import { HttpProblem } from "@vxnsin/inkan"; +import { HttpProblem } from "@inkanjs/inkan"; import { circuit, CircuitOpenError } from "@inkanjs/circuit-breaker"; const rates = circuit((currency: string) => fetch(`https://rates.example/${currency}`, { signal: AbortSignal.timeout(2000) }), { diff --git a/content/docs/official/idempotency.mdx b/content/docs/official/idempotency.mdx index c69b9a6..7e3c65b 100644 --- a/content/docs/official/idempotency.mdx +++ b/content/docs/official/idempotency.mdx @@ -76,7 +76,7 @@ it. ## Store Answers are kept in an inkan [`Store`](/docs/storage), by default `memoryStore()` from -`@vxnsin/inkan`: one process, at most 10000 keys, the one used longest ago dropped first. For +`@inkanjs/inkan`: one process, at most 10000 keys, the one used longest ago dropped first. For several processes any shared `Store` works: ```ts notwoslash diff --git a/content/docs/official/mongo.mdx b/content/docs/official/mongo.mdx index b212be8..64c4f01 100644 --- a/content/docs/official/mongo.mdx +++ b/content/docs/official/mongo.mdx @@ -13,12 +13,12 @@ limits, sessions, logins and idempotency keys kept where every process of your a them. You pass your own `mongodb` client; the package has no dependencies. ```sh -npm install @vxnsin/inkan @inkanjs/mongo mongodb +npm install @inkanjs/inkan @inkanjs/mongo mongodb ``` ```ts notwoslash import { MongoClient } from "mongodb"; -import { inkan, rateLimit } from "@vxnsin/inkan"; +import { inkan, rateLimit } from "@inkanjs/inkan"; import { mongoStore } from "@inkanjs/mongo"; const client = await new MongoClient(process.env.MONGO_URL!).connect(); diff --git a/content/docs/official/mysql.mdx b/content/docs/official/mysql.mdx index 2c14664..4d568c2 100644 --- a/content/docs/official/mysql.mdx +++ b/content/docs/official/mysql.mdx @@ -13,12 +13,12 @@ limits, sessions, logins and idempotency keys kept where every process of your a them. You pass your own `mysql2/promise` pool; the package has no dependencies. ```sh -npm install @vxnsin/inkan @inkanjs/mysql mysql2 +npm install @inkanjs/inkan @inkanjs/mysql mysql2 ``` ```ts notwoslash import mysql from "mysql2/promise"; -import { inkan, rateLimit } from "@vxnsin/inkan"; +import { inkan, rateLimit } from "@inkanjs/inkan"; import { mysqlStore } from "@inkanjs/mysql"; const pool = mysql.createPool(process.env.MYSQL_URL!); diff --git a/content/docs/official/postgres.mdx b/content/docs/official/postgres.mdx index 19d865d..49558d3 100644 --- a/content/docs/official/postgres.mdx +++ b/content/docs/official/postgres.mdx @@ -15,11 +15,11 @@ have, `pg` (a Pool or a Client) or `postgres` (postgres.js), and has no dependen own. ```sh -npm install @vxnsin/inkan @inkanjs/postgres pg # or postgres +npm install @inkanjs/inkan @inkanjs/postgres pg # or postgres ``` ```ts notwoslash -import { inkan, rateLimit } from "@vxnsin/inkan"; +import { inkan, rateLimit } from "@inkanjs/inkan"; import pg from "pg"; import { postgresStore } from "@inkanjs/postgres"; @@ -110,7 +110,7 @@ The driver is told apart by its methods: postgres.js has `unsafe` and `listen`, - `increment` counts in `numeric`: `0.1 + 0.2` is `0.3`. On a live key whose value is not a JSON number (a string, even `"5"`, a boolean, `null`, an object) it rejects with a `TypeError` and leaves the value as it was, as the other stores do. -- The suite from `@vxnsin/inkan/testing` (`storeConformance`, see [writing an adapter](/docs/storage#writing-an-adapter)) passes on a pg Pool, a pg +- The suite from `@inkanjs/inkan/testing` (`storeConformance`, see [writing an adapter](/docs/storage#writing-an-adapter)) passes on a pg Pool, a pg Client and postgres.js. ## Security diff --git a/content/docs/official/redis.mdx b/content/docs/official/redis.mdx index af8098d..99918b2 100644 --- a/content/docs/official/redis.mdx +++ b/content/docs/official/redis.mdx @@ -14,11 +14,11 @@ of an app sees the same state. It runs on the Redis client you already have, `re (node-redis v4 or later) or `ioredis`, and has no dependencies of its own. ```sh -npm install @vxnsin/inkan @inkanjs/redis redis # or ioredis +npm install @inkanjs/inkan @inkanjs/redis redis # or ioredis ``` ```ts notwoslash -import { inkan, rateLimit } from "@vxnsin/inkan"; +import { inkan, rateLimit } from "@inkanjs/inkan"; import { createClient } from "redis"; import { redisStore } from "@inkanjs/redis"; @@ -86,7 +86,7 @@ other object is refused. the TTL of one that was: a rate-limit window stays fixed. - Values are JSON: `get` returns what `JSON.stringify` made of the value, `undefined` for a missing key, `null` only for a stored `null`. -- The suite from `@vxnsin/inkan/testing` (`storeConformance`, see [writing an adapter](/docs/storage#writing-an-adapter)) passes on both clients. +- The suite from `@inkanjs/inkan/testing` (`storeConformance`, see [writing an adapter](/docs/storage#writing-an-adapter)) passes on both clients. ## Security diff --git a/content/docs/official/session.mdx b/content/docs/official/session.mdx index 03a8303..f378532 100644 --- a/content/docs/official/session.mdx +++ b/content/docs/official/session.mdx @@ -48,13 +48,13 @@ it. A cookie session lasts until it expires even after `destroy()`, if someone k When logout must end a session for certain, use a store. ```ts notwoslash -import { memoryStore } from "@vxnsin/inkan"; +import { memoryStore } from "@inkanjs/inkan"; import { session } from "@inkanjs/session"; app.register(session({ secret, store: memoryStore({ max: 50_000 }) })); ``` -The store is an inkan [`Store`](/docs/storage). `memoryStore` from `@vxnsin/inkan` lives in +The store is an inkan [`Store`](/docs/storage). `memoryStore` from `@inkanjs/inkan` lives in the process: right for development and one process. For more, any `Store` works, such as [Redis](/docs/official/redis), [PostgreSQL](/docs/official/postgres), [MongoDB](/docs/official/mongo) or [MySQL](/docs/official/mysql): diff --git a/content/docs/plugins.mdx b/content/docs/plugins.mdx index 353a5bd..2d819ff 100644 --- a/content/docs/plugins.mdx +++ b/content/docs/plugins.mdx @@ -17,7 +17,7 @@ the plugin is for other people. The [hooks](/docs/hooks) page has the basics. ## Shared or scoped ```ts -import { plugin } from "@vxnsin/inkan"; +import { plugin } from "@inkanjs/inkan"; const admin = plugin((app) => { // scoped: a scope of its own app.onRequest(requireAdmin); @@ -130,7 +130,7 @@ For a plugin written in JavaScript, or one that does not return its scope, say w in the type: `Plugin`. ```ts -import type { Plugin } from "@vxnsin/inkan"; +import type { Plugin } from "@inkanjs/inkan"; export declare function session(options: { secret: string }): Plugin<{}, {}, { session: Session }>; ``` @@ -181,7 +181,7 @@ A plugin names what it reads by extending the exported `RouteMeta` interface. Th shape does not compile, and the editor suggests the field: ```ts -declare module "@vxnsin/inkan" { +declare module "@inkanjs/inkan" { interface RouteMeta { auth?: { roles: string[] }; } @@ -194,7 +194,7 @@ write, which no route spec can set by accident. ```ts export const INTERNAL = Symbol("my-plugin"); -declare module "@vxnsin/inkan" { +declare module "@inkanjs/inkan" { interface RouteMeta { [INTERNAL]?: boolean; } @@ -232,7 +232,7 @@ The fourth argument, `ref(schema, name?)`, puts a `t.*` schema into the document unnamed schema needs `name`: ```ts -import { t } from "@vxnsin/inkan"; +import { t } from "@inkanjs/inkan"; const Locked = t.object({ until: t.string() }); @@ -280,7 +280,7 @@ a transaction around the handler, or an AsyncLocalStorage of your own. Experimen ## stateKey: a slot of your own in ctx.state ```ts -import { stateKey } from "@vxnsin/inkan"; +import { stateKey } from "@inkanjs/inkan"; export const tenant = stateKey("tenant"); diff --git a/content/docs/publish-a-plugin.mdx b/content/docs/publish-a-plugin.mdx index 5d1a953..844c904 100644 --- a/content/docs/publish-a-plugin.mdx +++ b/content/docs/publish-a-plugin.mdx @@ -8,14 +8,14 @@ A plugin is worth more once other people can find it. This page is about the ste listing it on [Hanko](/hanko), next to the official ones. - `npx @vxnsin/inkan create plugin` and the `inkan` option of `plugin()` are new in inkan 0.7.0. + `npx @inkanjs/inkan create plugin` and the `inkan` option of `plugin()` are new in inkan 0.7.0. ## Start from the template ```sh -npx @vxnsin/inkan create plugin inkan-tenant # into ./inkan-tenant -npx @vxnsin/inkan create plugin @you/inkan-tenant pkg # a scoped name, into ./pkg +npx @inkanjs/inkan create plugin inkan-tenant # into ./inkan-tenant +npx @inkanjs/inkan create plugin @you/inkan-tenant pkg # a scoped name, into ./pkg ``` `create plugin [folder]` writes a package for a plugin of your own: @@ -56,7 +56,7 @@ Name it after what it does, not after inkan: `inkan-tenant`, not `inkan-plugin-t "keywords": ["inkan-plugin"], "type": "module", "peerDependencies": { - "@vxnsin/inkan": ">=0.8.0 <1.0.0" + "@inkanjs/inkan": ">=0.8.0 <1.0.0" } } ``` @@ -75,7 +75,7 @@ npm only warns about a peer dependency that does not fit. The plugin can say it range in its options, and inkan checks it when the plugin is registered: ```ts -import { plugin } from "@vxnsin/inkan"; +import { plugin } from "@inkanjs/inkan"; export const tenant = (o: { header: string }) => plugin((app) => app.decorateRequest("tenant", (ctx) => ctx.rawHeaders[o.header]), { @@ -113,7 +113,7 @@ dependency's. `PluginOptions` is exported for the options' type. ```ts import { test } from "node:test"; import assert from "node:assert/strict"; - import { inkan } from "@vxnsin/inkan"; + import { inkan } from "@inkanjs/inkan"; import { tenant } from "./index.js"; test("reads the tenant from the header", async () => { diff --git a/content/docs/recipes/databases.mdx b/content/docs/recipes/databases.mdx index 15e6f5e..7d948e2 100644 --- a/content/docs/recipes/databases.mdx +++ b/content/docs/recipes/databases.mdx @@ -14,7 +14,7 @@ Chain `decorate` on the app: the handlers after it see `ctx.db` typed as the cli ## Postgres (pg) ```ts notwoslash -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; import pg from "pg"; const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL }); @@ -36,7 +36,7 @@ then `begin`, your queries, `commit` (or `rollback` in a `catch`), and `c.releas ## Redis (ioredis) ```ts notwoslash -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; import { Redis } from "ioredis"; const redis = new Redis(process.env.REDIS_URL!, { lazyConnect: true }); @@ -55,7 +55,7 @@ Commands that must run together go in `redis.multi()…exec()`: queued, then sen ## MongoDB ```ts notwoslash -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; import { MongoClient } from "mongodb"; type Tea = { id: number; name: string }; @@ -77,7 +77,7 @@ passing `{ session: s }` to every call inside. ## Prisma ```ts notwoslash -import { inkan, t } from "@vxnsin/inkan"; +import { inkan, t } from "@inkanjs/inkan"; import { PrismaPg } from "@prisma/adapter-pg"; import { PrismaClient } from "./generated/prisma/client"; diff --git a/content/docs/runtime.mdx b/content/docs/runtime.mdx index 58d41f1..f7fde1b 100644 --- a/content/docs/runtime.mdx +++ b/content/docs/runtime.mdx @@ -8,7 +8,7 @@ Three things an app needs once it runs for real, each off until you ask for it. ## env() ```ts -import { env, t } from "@vxnsin/inkan"; +import { env, t } from "@inkanjs/inkan"; export const config = env(t.object({ PORT: t.int().default(3000), @@ -70,7 +70,7 @@ Without the option it is `undefined`, there is no timer, and a request reads not ## currentContext(): the request, anywhere ```ts -import { currentContext, inkan } from "@vxnsin/inkan"; +import { currentContext, inkan } from "@inkanjs/inkan"; const app = inkan({ context: true }); diff --git a/content/docs/schemas.mdx b/content/docs/schemas.mdx index bb2a953..fb2bcd0 100644 --- a/content/docs/schemas.mdx +++ b/content/docs/schemas.mdx @@ -32,7 +32,7 @@ const Pet = t.discriminated("kind", { type Node = { name: string; children: Node[] }; const Node: Schema = t.object({ name: t.string(), children: t.array(t.lazy(() => Node)), -}).named("Node"); // import type { Schema } from "@vxnsin/inkan" +}).named("Node"); // import type { Schema } from "@inkanjs/inkan" ``` Refinements and transforms are synchronous, run in chain order after successful diff --git a/content/docs/stability.mdx b/content/docs/stability.mdx index b02b159..b841901 100644 --- a/content/docs/stability.mdx +++ b/content/docs/stability.mdx @@ -18,7 +18,7 @@ and CI read from the [command line](#the-command-line). rule. - **Experimental** exports are marked `@experimental` and may change in any minor. The CHANGELOG names every such change. -- **Not API**: anything not exported from `@vxnsin/inkan` or `@vxnsin/inkan/client`, +- **Not API**: anything not exported from `@inkanjs/inkan` or `@inkanjs/inkan/client`, anything named `_x`, and anything marked `@internal`. - **Security fixes** may break behaviour at once. They are announced in the CHANGELOG. - **Plugins** declare `inkan: ">=0.8.0 <1.0.0"`: from the minor they were built on up to the @@ -47,7 +47,7 @@ every change to the API shows up in review. | built-in middleware | `cors`, `rateLimit`, `serveStatic`, `compress` and their option types; `Origins`, `PreContext` | | servers and tests | `inject`, `InjectOptions`, `InjectResponse`, `listener`, `fetch`, `exchange`, `AdapterRequest`, `AdapterResponse`, `bodyFor`, `logRequest`, `listen`, `ListenOptions`, `RequestLog`, `RegisterOptions`, `joinPath` | | the rest | `Layout`, `TrustProxy`, `CacheRule`, `fileExample`, `env`, `Store`, `memoryStore` | -| `@vxnsin/inkan/client` | `client`, `Client`, `ClientOptions`, `Answer`, `Input`, `Jsonify`, `StreamError` | +| `@inkanjs/inkan/client` | `client`, `Client`, `ClientOptions`, `Answer`, `Input`, `Jsonify`, `StreamError` | ## The command line @@ -130,8 +130,8 @@ milliseconds where they were seconds. Their old exports are kept as deprecated r | old | new | | --- | --- | -| `memoryStore` from `@inkanjs/auth`, `@inkanjs/session` or `@inkanjs/idempotency` | `memoryStore` from `@vxnsin/inkan` | -| `Store`, `AuthStore` from `@inkanjs/auth`; `SessionStore`; `IdempotencyStore` | `Store` from `@vxnsin/inkan` | +| `memoryStore` from `@inkanjs/auth`, `@inkanjs/session` or `@inkanjs/idempotency` | `memoryStore` from `@inkanjs/inkan` | +| `Store`, `AuthStore` from `@inkanjs/auth`; `SessionStore`; `IdempotencyStore` | `Store` from `@inkanjs/inkan` | | a store of your own with TTLs in seconds | the same store with TTLs in milliseconds, or an [adapter](/docs/storage#choosing-an-adapter) | ## Finding the old names diff --git a/content/docs/storage.mdx b/content/docs/storage.mdx index b66d64d..eb194f3 100644 --- a/content/docs/storage.mdx +++ b/content/docs/storage.mdx @@ -11,7 +11,7 @@ part the same shared store, from Redis or the database you already run, and they same state. ```ts notwoslash -import { inkan, rateLimit } from "@vxnsin/inkan"; +import { inkan, rateLimit } from "@inkanjs/inkan"; import { redisStore } from "@inkanjs/redis"; import { session } from "@inkanjs/session"; @@ -29,7 +29,7 @@ Each part keeps its keys apart by a prefix of its own, so one store serves them ## The Store interface ```ts notwoslash -import type { Store } from "@vxnsin/inkan"; +import type { Store } from "@inkanjs/inkan"; interface Store { get(key: string): Promise; @@ -82,7 +82,7 @@ counter that counts every parallel guess, an idempotency key that only one proce ## memoryStore ```ts -import { memoryStore } from "@vxnsin/inkan"; +import { memoryStore } from "@inkanjs/inkan"; const store = memoryStore({ max: 50_000 }); ``` @@ -153,12 +153,12 @@ apps on one Redis or one table keep apart by the adapter's `prefix`. ## Writing an adapter A store of your own (another database, a cloud key-value service) implements the interface -above and proves it with the conformance suite from `@vxnsin/inkan/testing`: +above and proves it with the conformance suite from `@inkanjs/inkan/testing`: ```ts notwoslash // store.test.ts import { randomUUID } from "node:crypto"; -import { storeConformance } from "@vxnsin/inkan/testing"; +import { storeConformance } from "@inkanjs/inkan/testing"; import { myStore } from "./index.ts"; storeConformance(() => myStore(client, { prefix: `test:${randomUUID()}:` }), { @@ -189,12 +189,12 @@ emptied between runs passes too. The TTL test waits about four seconds of real t `wait` moves the store's clock: ```ts notwoslash -import { memoryStore } from "@vxnsin/inkan"; -import { storeConformance } from "@vxnsin/inkan/testing"; +import { memoryStore } from "@inkanjs/inkan"; +import { storeConformance } from "@inkanjs/inkan/testing"; let now = Date.now(); storeConformance(() => memoryStore({ clock: () => now }), { wait: async (ms) => void (now += ms) }); ``` When you publish it, say which inkan it was tested with (`peerDependencies` -`"@vxnsin/inkan": ">=0.8.0 <1.0.0"`), and [list it on Hanko](/docs/publish-a-plugin). +`"@inkanjs/inkan": ">=0.8.0 <1.0.0"`), and [list it on Hanko](/docs/publish-a-plugin). diff --git a/content/docs/streams.mdx b/content/docs/streams.mdx index 4d14bf4..60d10fe 100644 --- a/content/docs/streams.mdx +++ b/content/docs/streams.mdx @@ -9,7 +9,7 @@ or any async iterable. It goes out piece by piece, as it comes. **Server-sent events** have a contract like any other answer, one schema per event: ```ts -import { sse, t } from "@vxnsin/inkan"; +import { sse, t } from "@inkanjs/inkan"; app.get( "/clock", @@ -36,7 +36,7 @@ as many events as an example expects, so a stream that never ends can still be a `multipart/form-data`, and OpenAPI says so: ```ts -import { fileExample, t } from "@vxnsin/inkan"; +import { fileExample, t } from "@inkanjs/inkan"; app.post( "/avatars", diff --git a/content/docs/websocket.mdx b/content/docs/websocket.mdx index c1292a2..355c897 100644 --- a/content/docs/websocket.mdx +++ b/content/docs/websocket.mdx @@ -242,7 +242,7 @@ The types are `WsUpgrade`, `WsRefusal`, `WsTransport` and `WsEvents`. [`Store`](/docs/storage), Redis pub/sub, say: ```ts -import type { Infer, WsSocket } from "@vxnsin/inkan"; +import type { Infer, WsSocket } from "@inkanjs/inkan"; const room = new Set, Infer>>(); diff --git a/data/hanko.ts b/data/hanko.ts index 85071be..ec8f1af 100644 --- a/data/hanko.ts +++ b/data/hanko.ts @@ -52,7 +52,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/built-in/cors", repo: CORE, - code: `import { cors } from "@vxnsin/inkan"`, + code: `import { cors } from "@inkanjs/inkan"`, tags: ["middleware", "headers", "browser", "preflight"], }, { @@ -61,7 +61,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/built-in/rate-limit", repo: CORE, - code: `import { rateLimit } from "@vxnsin/inkan"`, + code: `import { rateLimit } from "@inkanjs/inkan"`, tags: ["middleware", "security", "throttle", "429"], }, { @@ -70,7 +70,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/built-in/compress", repo: CORE, - code: `import { compress } from "@vxnsin/inkan"`, + code: `import { compress } from "@inkanjs/inkan"`, tags: ["middleware", "brotli", "gzip", "performance"], }, { @@ -79,7 +79,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/built-in/static", repo: CORE, - code: `import { serveStatic } from "@vxnsin/inkan"`, + code: `import { serveStatic } from "@inkanjs/inkan"`, tags: ["middleware", "files", "spa", "frontend"], }, { @@ -104,7 +104,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/client", repo: CORE, - code: `import { client } from "@vxnsin/inkan/client"`, + code: `import { client } from "@inkanjs/inkan/client"`, tags: ["types", "fetch", "frontend", "rpc"], }, { @@ -129,7 +129,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/streams", repo: CORE, - code: `import { sse, t } from "@vxnsin/inkan"`, + code: `import { sse, t } from "@inkanjs/inkan"`, tags: ["sse", "events", "multipart", "forms", "files", "streaming"], }, { @@ -165,7 +165,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/runtime#env", repo: CORE, - code: `import { env } from "@vxnsin/inkan"`, + code: `import { env } from "@inkanjs/inkan"`, since: "0.7.0", tags: ["config", "environment", "validation", "12-factor"], }, @@ -184,7 +184,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/runtime#currentcontext-the-request-anywhere", repo: CORE, - code: `import { currentContext } from "@vxnsin/inkan"`, + code: `import { currentContext } from "@inkanjs/inkan"`, since: "0.7.0", tags: ["asynclocalstorage", "logging", "tracing", "request"], }, @@ -194,7 +194,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/storage#memorystore", repo: CORE, - code: `import { memoryStore } from "@vxnsin/inkan"`, + code: `import { memoryStore } from "@inkanjs/inkan"`, since: "0.8.0", tags: ["store", "cache", "ttl", "jobs", "sessions"], }, @@ -212,7 +212,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/api/context#html", repo: CORE, - code: `import { html } from "@vxnsin/inkan"`, + code: `import { html } from "@inkanjs/inkan"`, tags: ["html", "templates", "layout", "ssr"], }, { @@ -221,7 +221,7 @@ export const hanko: Hanko[] = [ kind: "built-in", href: "/docs/api/problems", repo: CORE, - code: `import { problem } from "@vxnsin/inkan"`, + code: `import { problem } from "@inkanjs/inkan"`, tags: ["errors", "rfc 9457"], }, { diff --git a/lib/community.ts b/lib/community.ts index f1741c9..48286a4 100644 --- a/lib/community.ts +++ b/lib/community.ts @@ -3,7 +3,7 @@ import { cacheLife } from "next/cache"; const REPOS = ["inkanjs/inkan", "inkanjs/integrations"]; -export const PACKAGES = ["@vxnsin/inkan", "@inkanjs/next", "@inkanjs/vite", "@inkanjs/query", "@inkanjs/uws"]; +export const PACKAGES = ["@inkanjs/inkan", "@inkanjs/next", "@inkanjs/vite", "@inkanjs/query", "@inkanjs/uws"]; export type Contributor = { login: string; avatar: string; url: string; contributions: number; repos: string[] }; diff --git a/package-lock.json b/package-lock.json index 1c9110e..41c2a73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "0.1.0", "hasInstallScript": true, "dependencies": { - "@inkanjs/next": "^0.2.0", + "@inkanjs/inkan": "^0.9.2", + "@inkanjs/next": "^0.2.1", "@remotion/player": "^4.0.534", "@types/mdx": "^2.0.14", - "@vxnsin/inkan": "^0.8.0", "fumadocs-core": "^16.16.2", "fumadocs-mdx": "^15.4.6", "fumadocs-twoslash": "^4.0.1", @@ -1642,16 +1642,28 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@inkanjs/inkan": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@inkanjs/inkan/-/inkan-0.9.2.tgz", + "integrity": "sha512-ftKg1xXFAQ9B7x1R2jN6q6TDc8AZ81yo60J8LXuQbZwQngXzAo9kQgICObc0GBHQkPFRjZEkf6ZzRCFCMW7lWQ==", + "license": "MIT", + "bin": { + "inkan": "dist/cli.js" + }, + "engines": { + "node": ">=22" + } + }, "node_modules/@inkanjs/next": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@inkanjs/next/-/next-0.2.0.tgz", - "integrity": "sha512-EzBIrdnS+vo44Z5+Pwt0BFfTNqf4OF9wlXRezH3BXzvHfuGHnOY9WLW2sMZavt89/xJYOnIX7R7FDc/JBX5Pdw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@inkanjs/next/-/next-0.2.1.tgz", + "integrity": "sha512-mptzpviwJiEXLDS3vQMepczKNyuWrNuJSpRl0BM2fL+gH+K/krfvlVUO6FpQMem7Y4OflI98P70YdB6aJn5mMw==", "license": "MIT", "engines": { "node": ">=22.18" }, "peerDependencies": { - "@vxnsin/inkan": ">=0.4.0" + "@inkanjs/inkan": ">=0.4.0" } }, "node_modules/@jridgewell/gen-mapping": { @@ -4260,18 +4272,6 @@ "win32" ] }, - "node_modules/@vxnsin/inkan": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@vxnsin/inkan/-/inkan-0.8.0.tgz", - "integrity": "sha512-hwCyNL0VQcvTvWxjIVCT8QFaQ92fR0dXB7aca0AGXqdBzd7HpeirLg/o2QI16MIkHroxSGuPaerM/f3lO78zBA==", - "license": "MIT", - "bin": { - "inkan": "dist/cli.js" - }, - "engines": { - "node": ">=22" - } - }, "node_modules/@yuku-analyzer/binding-android-arm64": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@yuku-analyzer/binding-android-arm64/-/binding-android-arm64-0.10.2.tgz", diff --git a/package.json b/package.json index 6c2041b..67b1ab1 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "postinstall": "fumadocs-mdx" }, "dependencies": { - "@inkanjs/next": "^0.2.0", + "@inkanjs/next": "^0.2.1", "@remotion/player": "^4.0.534", "@types/mdx": "^2.0.14", - "@vxnsin/inkan": "^0.8.0", + "@inkanjs/inkan": "^0.9.2", "fumadocs-core": "^16.16.2", "fumadocs-mdx": "^15.4.6", "fumadocs-twoslash": "^4.0.1", diff --git a/server/app.ts b/server/app.ts index 5814c9c..3a98b49 100644 --- a/server/app.ts +++ b/server/app.ts @@ -1,7 +1,7 @@ // The API this site runs on: an inkan app, served by Next.js through @inkanjs/next. // The playground on the front page talks to it, and its own docs live at /api/docs. // Everything sits in memory and resets with the process: it is a playground, not a shop. -import { inkan, problem, rateLimit, reply, routes, sse, t } from "@vxnsin/inkan"; +import { inkan, problem, rateLimit, reply, routes, sse, t } from "@inkanjs/inkan"; const Tea = t.object({ id: t.int(), name: t.string(), grams: t.int(), brewed: t.date() }).named("Tea"); const NewTea = t.object({ name: t.string().trim().min(1).max(40), grams: t.int().min(1).max(1000) }).named("NewTea"); diff --git a/source.config.ts b/source.config.ts index efb6192..666746b 100644 --- a/source.config.ts +++ b/source.config.ts @@ -8,7 +8,7 @@ import { createTwoslasher } from "twoslash"; // What every snippet takes for granted: the inkan API, and an app to add routes to. It sits // in front of each block and is cut away before the block is shown, so the names in it carry // their real types without the page showing an import above every example. -const PRELUDE = `import { inkan, t, html, raw, problem, reply, sse, routes, route, plugin, cors, rateLimit, compress, serveStatic } from "@vxnsin/inkan"; +const PRELUDE = `import { inkan, t, html, raw, problem, reply, sse, routes, route, plugin, cors, rateLimit, compress, serveStatic } from "@inkanjs/inkan"; const app = inkan(); // ---cut--- `;