Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on its own; inkan itself keeps no dependencies.
Nuxt, SvelteKit, Astro and Remix need no package, see the [recipes](recipes): they hand their server routes a web
`Request` and want a `Response`, which is what `app.fetch` does.

Every package is tested against the published `@vxnsin/inkan` in CI, on Node 22, 24 and 26,
Every package is tested against the published `@inkanjs/inkan` in CI, on Node 22, 24 and 26,
`@inkanjs/next` once more inside a real `next build` and `next start`, and `@inkanjs/bun`
under Bun:

Expand Down
95 changes: 28 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/bun/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.1.1

- Works with `@inkanjs/inkan`, the new name of the core (it was `@vxnsin/inkan`). Install
`@inkanjs/inkan` 0.9.2 or later next to it.

## 0.1.0

- `serve(app, { port, hostname, tls, signals, drain })`: an inkan app on `Bun.serve`. HTTP
Expand Down
4 changes: 2 additions & 2 deletions packages/bun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ problems, streams and the inspector work as they do with `app.listen()`. HTTP go
## 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 }));
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { App } from "@vxnsin/inkan";
import type { App } from "@inkanjs/inkan";

export type Served = {
/** The port it listens on, also when it was asked for 0. */
Expand Down
6 changes: 3 additions & 3 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inkanjs/bun",
"version": "0.1.0",
"version": "0.1.1",
"description": "Runs an inkan app on Bun.serve, WebSocket routes on Bun's own websockets.",
"type": "module",
"license": "MIT",
Expand All @@ -26,14 +26,14 @@
"bun": ">=1.1"
},
"peerDependencies": {
"@vxnsin/inkan": ">=0.9.0 <1.0.0"
"@inkanjs/inkan": ">=0.9.0 <1.0.0"
},
"scripts": {
"test": "node --test test.ts",
"test:bun": "bun run test.ts"
},
"devDependencies": {
"@vxnsin/inkan": "^0.9.0"
"@inkanjs/inkan": "^0.9.2"
},
"keywords": [
"inkan",
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import assert from "node:assert/strict";
import { connect } from "node:net";
import { randomBytes } from "node:crypto";
import { inkan, sse, t, type App } from "@vxnsin/inkan";
import { inkan, sse, t, type App } from "@inkanjs/inkan";
import type { serve as Serve } from "./index.js";

const isBun = typeof (globalThis as { Bun?: unknown }).Bun !== "undefined";
Expand Down
5 changes: 5 additions & 0 deletions packages/next/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.2.1

- Works with `@inkanjs/inkan`, the new name of the core (it was `@vxnsin/inkan`). Install
`@inkanjs/inkan` 0.9.2 or later next to it.

## 0.2.0

- `pages(app)`: the app as a Pages Router API route, `export default pages(app)` in
Expand Down
4 changes: 2 additions & 2 deletions packages/next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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
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));

Expand Down
2 changes: 1 addition & 1 deletion packages/next/e2e/server/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inkan, plugin, t } from "@vxnsin/inkan";
import { inkan, plugin, t } from "@inkanjs/inkan";

const teas = plugin((p) => {
p.get("/teas/:id", { params: t.object({ id: t.int() }), response: { 200: t.object({ id: t.int(), name: t.string() }) } }, ({ params }) => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/next/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IncomingMessage, ServerResponse } from "node:http";
import type { App, Routes } from "@vxnsin/inkan";
import type { Client, ClientOptions } from "@vxnsin/inkan/client";
import type { App, Routes } from "@inkanjs/inkan";
import type { Client, ClientOptions } from "@inkanjs/inkan/client";

type Handler = (request: Request) => Promise<Response>;

Expand Down
2 changes: 1 addition & 1 deletion packages/next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// import { handlers } from "@inkanjs/next";
// export const { GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS } = handlers(app);

import { client } from "@vxnsin/inkan/client";
import { client } from "@inkanjs/inkan/client";

const METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"];
const development = () => (process.env.NODE_ENV === "development" ? "127.0.0.1" : undefined);
Expand Down
6 changes: 3 additions & 3 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inkanjs/next",
"version": "0.2.0",
"version": "0.2.1",
"description": "An inkan app inside Next.js: App Router route handlers, Pages Router API routes, and a typed client for Server Components.",
"type": "module",
"license": "MIT",
Expand All @@ -10,8 +10,8 @@
"exports": { ".": { "types": "./index.d.ts", "default": "./index.js" } },
"files": ["index.js", "index.d.ts", "README.md", "CHANGELOG.md"],
"engines": { "node": ">=22.18" },
"peerDependencies": { "@vxnsin/inkan": ">=0.4.0" },
"devDependencies": { "@vxnsin/inkan": "^0.4.0" },
"peerDependencies": { "@inkanjs/inkan": ">=0.4.0" },
"devDependencies": { "@inkanjs/inkan": "^0.9.2" },
"scripts": { "test": "node --test test.ts" },
"publishConfig": { "access": "public" }
}
2 changes: 1 addition & 1 deletion packages/next/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { inkan, plugin, routes, t } from "@vxnsin/inkan";
import { inkan, plugin, routes, t } from "@inkanjs/inkan";
import { createServer, type IncomingMessage } from "node:http";
import type { AddressInfo } from "node:net";
import { direct, handlers, pages } from "./index.js";
Expand Down
5 changes: 5 additions & 0 deletions packages/query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.3.1

- Works with `@inkanjs/inkan`, the new name of the core (it was `@vxnsin/inkan`). Install
`@inkanjs/inkan` 0.9.2 or later next to it.

## 0.3.0

- `q.events(path, input)` and `q.ws(path, input)`: live sources for a route that answers
Expand Down
2 changes: 1 addition & 1 deletion packages/query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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";

Expand Down
4 changes: 2 additions & 2 deletions packages/query/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ProblemBody, Responses, Routes } from "@vxnsin/inkan";
import type { Answer, Client, EventOf, Input, Jsonify, TypedSocket } from "@vxnsin/inkan/client";
import type { ProblemBody, Responses, Routes } from "@inkanjs/inkan";
import type { Answer, Client, EventOf, Input, Jsonify, TypedSocket } from "@inkanjs/inkan/client";

/** What the typed client answers: success or failure, told apart by `ok`. */
type AnyAnswer = { ok: true; data: unknown } | { ok: false; status: number; problem: unknown };
Expand Down
6 changes: 3 additions & 3 deletions packages/query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inkanjs/query",
"version": "0.3.0",
"version": "0.3.1",
"description": "The typed inkan client for TanStack Query: data typed from the contract, problems as errors, live events and WebSockets. React, Vue, Svelte, Solid.",
"type": "module",
"license": "MIT",
Expand Down Expand Up @@ -43,7 +43,7 @@
"node": ">=22.18"
},
"peerDependencies": {
"@vxnsin/inkan": ">=0.7.0",
"@inkanjs/inkan": ">=0.7.0",
"react": ">=18"
},
"peerDependenciesMeta": {
Expand All @@ -53,7 +53,7 @@
},
"devDependencies": {
"@tanstack/query-core": "^5.104.1",
"@vxnsin/inkan": "^0.8.0",
"@inkanjs/inkan": "^0.9.2",
"react": "^19.3.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/query/react.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Jsonify } from "@vxnsin/inkan/client";
import type { Jsonify } from "@inkanjs/inkan/client";
import type { AnyEvent, EventsState, FollowOptions, LiveEvents, LiveSocket, SocketState } from "./index.js";

export type UseEventsOptions<E extends AnyEvent> = FollowOptions<E> & {
Expand Down
Loading
Loading