@niledatabase/nitro 5.0.0-alpha.15 → 5.0.0-alpha.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niledatabase/nitro",
3
- "version": "5.0.0-alpha.15",
3
+ "version": "5.0.0-alpha.16",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,6 +11,9 @@
11
11
  "import": "./dist/index.mjs"
12
12
  }
13
13
  },
14
+ "files": [
15
+ "dist"
16
+ ],
14
17
  "prettier": {
15
18
  "printWidth": 80,
16
19
  "semi": true,
@@ -37,5 +40,5 @@
37
40
  "h3": "^1",
38
41
  "tsup": "^8.5.0"
39
42
  },
40
- "gitHead": "5838393fd8739e388754a43b0efcd8430d6d6027"
43
+ "gitHead": "b96e22d67b78a2a0d6d8027dea4973272a1ce94e"
41
44
  }
package/CHANGELOG.md DELETED
@@ -1,56 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [5.0.0-alpha.15](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.14...v5.0.0-alpha.15) (2025-06-25)
7
-
8
- **Note:** Version bump only for package @niledatabase/nitro
9
-
10
- # [5.0.0-alpha.14](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.13...v5.0.0-alpha.14) (2025-06-16)
11
-
12
- **Note:** Version bump only for package @niledatabase/nitro
13
-
14
- # [5.0.0-alpha.13](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.12...v5.0.0-alpha.13) (2025-06-16)
15
-
16
- **Note:** Version bump only for package @niledatabase/nitro
17
-
18
- # [5.0.0-alpha.12](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.11...v5.0.0-alpha.12) (2025-06-16)
19
-
20
- **Note:** Version bump only for package @niledatabase/nitro
21
-
22
- # [5.0.0-alpha.11](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.10...v5.0.0-alpha.11) (2025-06-16)
23
-
24
- **Note:** Version bump only for package @niledatabase/nitro
25
-
26
- # [5.0.0-alpha.10](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.9...v5.0.0-alpha.10) (2025-06-16)
27
-
28
- **Note:** Version bump only for package @niledatabase/nitro
29
-
30
- # [5.0.0-alpha.9](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.8...v5.0.0-alpha.9) (2025-06-16)
31
-
32
- **Note:** Version bump only for package @niledatabase/nitro
33
-
34
- # [5.0.0-alpha.8](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.7...v5.0.0-alpha.8) (2025-06-12)
35
-
36
- **Note:** Version bump only for package @niledatabase/nitro
37
-
38
- # [5.0.0-alpha.7](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.6...v5.0.0-alpha.7) (2025-06-11)
39
-
40
- **Note:** Version bump only for package @niledatabase/nitro
41
-
42
- # [5.0.0-alpha.6](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.5...v5.0.0-alpha.6) (2025-06-11)
43
-
44
- **Note:** Version bump only for package @niledatabase/nitro
45
-
46
- # [5.0.0-alpha.5](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.4...v5.0.0-alpha.5) (2025-06-10)
47
-
48
- ### Bug Fixes
49
-
50
- - **nextjs:** build and export correctly ([c522c5e](https://github.com/niledatabase/nile-js/commit/c522c5e485bea75b0fdf86cfcd6b0af662f5a0b5))
51
-
52
- # [5.0.0-alpha.4](https://github.com/niledatabase/nile-js/compare/v5.0.0-alpha.3...v5.0.0-alpha.4) (2025-06-10)
53
-
54
- ### Features
55
-
56
- - **server:** invites ([c10f598](https://github.com/niledatabase/nile-js/commit/c10f5980bcbc55ed436ce8cceca4111aa8e6a276))
package/src/index.ts DELETED
@@ -1,40 +0,0 @@
1
- import { EventHandlerRequest, getRequestURL, H3Event, readRawBody } from 'h3';
2
- import { Server } from '@niledatabase/server';
3
-
4
- const convertHeader = ([key, value]: [
5
- string,
6
- string | string[] | undefined
7
- ]) => [
8
- key.toLowerCase(),
9
- Array.isArray(value) ? value.join(', ') : String(value),
10
- ];
11
- export async function convertToRequest(
12
- event: H3Event<EventHandlerRequest>,
13
- nile: Server
14
- ) {
15
- const { handlers } = nile;
16
- const url = getRequestURL(event);
17
- const reqHeaders = event.node.req.headers;
18
- const headers: HeadersInit = reqHeaders
19
- ? Object.fromEntries(Object.entries(reqHeaders).map(convertHeader))
20
- : {};
21
- const method = event.node.req.method || 'GET';
22
- const body =
23
- method !== 'GET' && method !== 'HEAD' ? await readRawBody(event) : null;
24
-
25
- const request = new Request(url, {
26
- method,
27
- headers,
28
- body: body ? JSON.stringify(body) : null,
29
- });
30
- switch (request.method) {
31
- case 'GET':
32
- return handlers.GET(request);
33
- case 'POST':
34
- return handlers.POST(request);
35
- case 'PUT':
36
- return handlers.PUT(request);
37
- case 'DELETE':
38
- return handlers.DELETE(request);
39
- }
40
- }
package/tsup.config.js DELETED
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- minify: true,
5
- target: 'es2022',
6
- external: ['react'],
7
- sourcemap: true,
8
- dts: true,
9
- format: ['esm', 'cjs'],
10
- });