@nexus_js/types 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nexus Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @nexus_js/types
2
+
3
+ Nexus type generator — auto-generates nexus-types.d.ts for end-to-end type safety.
4
+
5
+ ## Documentation
6
+
7
+ All guides, API reference, and examples live on **[nexusjs.dev](https://nexusjs.dev)**.
8
+
9
+ ## Links
10
+
11
+ - **Website:** [https://nexusjs.dev](https://nexusjs.dev)
12
+ - **Repository:** [github.com/bierfor/nexus](https://github.com/bierfor/nexus) (see `packages/types/`)
13
+ - **Issues:** [github.com/bierfor/nexus/issues](https://github.com/bierfor/nexus/issues)
14
+
15
+ ## License
16
+
17
+ MIT © Nexus contributors
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Nexus Type Generator
3
+ *
4
+ * Auto-generates `nexus-types.d.ts` — the invisible glue between server and client.
5
+ *
6
+ * What it generates:
7
+ * - Route params types: `type RouteParams['/blog/[slug]'] = { slug: string }`
8
+ * - Server Action types: `type Actions = { updateProfile: (f: FormData) => Promise<{success:boolean}> }`
9
+ * - API route return types: inferred from the route's render function
10
+ * - `$sync` type bindings for the reactive sync rune
11
+ *
12
+ * Usage: runs automatically on `nexus dev` and `nexus build`.
13
+ */
14
+ export interface GenerateTypesOptions {
15
+ root: string;
16
+ outFile?: string;
17
+ }
18
+ /**
19
+ * Main entry: scans the project and writes `nexus-types.d.ts`.
20
+ */
21
+ export declare function generateTypes(opts: GenerateTypesOptions): Promise<void>;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAW7E"}
package/dist/index.js ADDED
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Nexus Type Generator
3
+ *
4
+ * Auto-generates `nexus-types.d.ts` — the invisible glue between server and client.
5
+ *
6
+ * What it generates:
7
+ * - Route params types: `type RouteParams['/blog/[slug]'] = { slug: string }`
8
+ * - Server Action types: `type Actions = { updateProfile: (f: FormData) => Promise<{success:boolean}> }`
9
+ * - API route return types: inferred from the route's render function
10
+ * - `$sync` type bindings for the reactive sync rune
11
+ *
12
+ * Usage: runs automatically on `nexus dev` and `nexus build`.
13
+ */
14
+ import { readFile, writeFile, mkdir } from 'node:fs/promises';
15
+ import { join, relative } from 'node:path';
16
+ import { parse } from '@nexus_js/compiler';
17
+ import { buildRouteManifest } from '@nexus_js/router';
18
+ /**
19
+ * Main entry: scans the project and writes `nexus-types.d.ts`.
20
+ */
21
+ export async function generateTypes(opts) {
22
+ const routesDir = join(opts.root, 'src', 'routes');
23
+ const outFile = opts.outFile ?? join(opts.root, '.nexus', 'nexus-types.d.ts');
24
+ await mkdir(join(opts.root, '.nexus'), { recursive: true });
25
+ const manifest = await buildRouteManifest(routesDir);
26
+ const output = await buildTypeOutput(manifest, routesDir);
27
+ await writeFile(outFile, output, 'utf-8');
28
+ console.log(` [Nexus Types] Generated ${relative(opts.root, outFile)}`);
29
+ }
30
+ async function buildTypeOutput(manifest, routesDir) {
31
+ const lines = [];
32
+ lines.push(`// nexus-types.d.ts — AUTO-GENERATED by @nexus_js/types`);
33
+ lines.push(`// DO NOT EDIT — re-generated on every build`);
34
+ lines.push(`// Add this file to your tsconfig "include" array.`);
35
+ lines.push('');
36
+ lines.push(`import type { NexusContext } from '@nexus_js/server';`);
37
+ lines.push('');
38
+ // ── Route Params ──────────────────────────────────────────────────────────
39
+ lines.push('// ── Route Params ────────────────────────────────────────────────────────────');
40
+ lines.push('export type RouteParams = {');
41
+ for (const route of manifest.routes) {
42
+ if (route.isLayout)
43
+ continue;
44
+ const paramsType = route.params.length > 0
45
+ ? `{ ${route.params.map((p) => `${p}: string`).join('; ')} }`
46
+ : 'Record<never, never>';
47
+ lines.push(` '${route.pattern}': ${paramsType};`);
48
+ }
49
+ lines.push('};');
50
+ lines.push('');
51
+ // ── Server Actions per route ───────────────────────────────────────────────
52
+ lines.push('// ── Server Actions ──────────────────────────────────────────────────────────');
53
+ const allActions = [];
54
+ for (const route of manifest.routes) {
55
+ try {
56
+ const src = await readFile(route.filepath, 'utf-8');
57
+ const parsed = parse(src, route.filepath);
58
+ if (parsed.serverActions.length === 0)
59
+ continue;
60
+ for (const action of parsed.serverActions) {
61
+ allActions.push({
62
+ name: action.name,
63
+ route: route.pattern,
64
+ params: action.params,
65
+ returnType: inferReturnType(action),
66
+ });
67
+ }
68
+ }
69
+ catch {
70
+ // File might not be readable — skip
71
+ }
72
+ }
73
+ if (allActions.length > 0) {
74
+ lines.push('export type NexusActions = {');
75
+ for (const a of allActions) {
76
+ const paramStr = a.params.length > 0 ? a.params.join(', ') : '';
77
+ lines.push(` /** @route ${a.route} */`);
78
+ lines.push(` '${a.name}': (${paramStr}) => ${a.returnType};`);
79
+ }
80
+ lines.push('};');
81
+ }
82
+ else {
83
+ lines.push('export type NexusActions = Record<never, never>;');
84
+ }
85
+ lines.push('');
86
+ // ── Typed useAction hook ───────────────────────────────────────────────────
87
+ lines.push('// ── useAction — typed client stub ───────────────────────────────────────────');
88
+ lines.push(`declare module '@nexus_js/runtime' {`);
89
+ lines.push(` export function useAction<K extends keyof NexusActions>(`);
90
+ lines.push(` name: K`);
91
+ lines.push(` ): {`);
92
+ lines.push(` execute: NexusActions[K];`);
93
+ lines.push(` pending: boolean;`);
94
+ lines.push(` error: string | null;`);
95
+ lines.push(` };`);
96
+ lines.push(`}`);
97
+ lines.push('');
98
+ // ── Typed Router ──────────────────────────────────────────────────────────
99
+ lines.push('// ── Typed Router ─────────────────────────────────────────────────────────────');
100
+ lines.push(`declare module '@nexus_js/runtime/router' {`);
101
+ lines.push(` export function navigate<R extends keyof RouteParams>(`);
102
+ lines.push(` route: R,`);
103
+ lines.push(` params: RouteParams[R]`);
104
+ lines.push(` ): void;`);
105
+ lines.push(`}`);
106
+ lines.push('');
107
+ // ── Form Action types ─────────────────────────────────────────────────────
108
+ lines.push('// ── Typed form action={fn} ───────────────────────────────────────────────────');
109
+ lines.push(`type ActionHandler<TInput = FormData, TResult = void> = (`);
110
+ lines.push(` input: TInput,`);
111
+ lines.push(` ctx: NexusContext`);
112
+ lines.push(`) => Promise<TResult>;`);
113
+ lines.push('');
114
+ lines.push('export type { ActionHandler };');
115
+ lines.push('');
116
+ // ── $sync type bindings ───────────────────────────────────────────────────
117
+ lines.push('// ── $sync rune bindings ─────────────────────────────────────────────────────');
118
+ lines.push(`declare global {`);
119
+ lines.push(` function $sync<T>(`);
120
+ lines.push(` key: string,`);
121
+ lines.push(` opts?: {`);
122
+ lines.push(` default?: T;`);
123
+ lines.push(` persist?: 'cookie' | 'session' | 'db';`);
124
+ lines.push(` optimistic?: boolean;`);
125
+ lines.push(` }`);
126
+ lines.push(` ): { value: T; pending: boolean; error: string | null };`);
127
+ lines.push('');
128
+ lines.push(` function $optimistic<T>(`);
129
+ lines.push(` signal: { value: T },`);
130
+ lines.push(` action: () => Promise<T | void>,`);
131
+ lines.push(` rollback?: T`);
132
+ lines.push(` ): void;`);
133
+ lines.push(`}`);
134
+ return lines.join('\n') + '\n';
135
+ }
136
+ /**
137
+ * Infers the return type of a server action from its body.
138
+ * For now: detects `return { ... }` patterns and maps to object literals.
139
+ * Future: use TS compiler API for perfect inference.
140
+ */
141
+ function inferReturnType(action) {
142
+ const body = action.body;
143
+ // Detect explicit return type from JSDoc-style comment
144
+ const docMatch = /\/\*\*\s*@returns\s+\{([^}]+)\}\s*\*\//.exec(body);
145
+ if (docMatch?.[1])
146
+ return `Promise<${docMatch[1].trim()}>`;
147
+ // Detect `return { success: true/false }` pattern
148
+ if (/return\s*\{\s*success/.test(body))
149
+ return 'Promise<{ success: boolean }>';
150
+ // Detect `return { data:` pattern
151
+ if (/return\s*\{\s*data:/.test(body))
152
+ return 'Promise<{ data: unknown }>';
153
+ // Detect `return Response.json(` pattern
154
+ if (/return\s+Response\.json\(/.test(body))
155
+ return 'Promise<Response>';
156
+ // Detect `return null` or `return undefined`
157
+ if (/return\s+(null|undefined)/.test(body))
158
+ return 'Promise<null>';
159
+ // Default: unknown — developer should annotate
160
+ return 'Promise<unknown>';
161
+ }
162
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE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,CAAC;IAE/E,kCAAkC;IAClC,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,4BAA4B,CAAC;IAE1E,yCAAyC;IACzC,IAAI,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,mBAAmB,CAAC;IAEvE,6CAA6C;IAC7C,IAAI,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,eAAe,CAAC;IAEnE,+CAA+C;IAC/C,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@nexus_js/types",
3
+ "version": "0.6.0",
4
+ "description": "Nexus type generator — auto-generates nexus-types.d.ts for end-to-end type safety",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "dependencies": {
15
+ "@nexus_js/compiler": "0.6.0",
16
+ "@nexus_js/router": "0.6.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^22.0.0",
20
+ "typescript": "^5.5.0"
21
+ },
22
+ "license": "MIT",
23
+ "homepage": "https://nexusjs.dev",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/bierfor/nexus.git",
27
+ "directory": "packages/types"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/bierfor/nexus/issues"
31
+ },
32
+ "keywords": [
33
+ "nexus",
34
+ "framework",
35
+ "full-stack",
36
+ "svelte",
37
+ "islands",
38
+ "ssr",
39
+ "vite",
40
+ "server-actions"
41
+ ],
42
+ "files": [
43
+ "dist",
44
+ "README.md"
45
+ ],
46
+ "publishConfig": {
47
+ "access": "public",
48
+ "registry": "https://registry.npmjs.org/"
49
+ },
50
+ "scripts": {
51
+ "build": "tsc -p tsconfig.json",
52
+ "dev": "tsc -p tsconfig.json --watch",
53
+ "clean": "rm -rf dist"
54
+ }
55
+ }