Skip to content

Commit

Permalink
Merge branch 'v2' into pr/tudorpip/2637
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 5, 2024
2 parents 6934cf2 + 78a5f9d commit 37ec4d7
Show file tree
Hide file tree
Showing 23 changed files with 2,295 additions and 2,984 deletions.
4 changes: 2 additions & 2 deletions docs/1.guide/1.utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Nitro also exposes several built-in utils:
- `nitroPlugin(plugin)`{lang=ts}
- `getRouteRules(event)`{lang=ts}

::read-more{to="https://github.com/unjs/nitro/blob/main/src/imports.ts"}
Check [the source code](https://github.com/unjs/nitro/blob/main/src/imports.ts) for list of available Nitro auto imports.
::read-more{to="https://github.com/unjs/nitro/blob/v2/src/core/config/resolvers/imports.ts#L58"}
Check [the source code](https://github.com/unjs/nitro/blob/v2/src/core/config/resolvers/imports.ts#L58) for list of available Nitro auto imports.
::

::read-more{to="/guide/typescript"}
Expand Down
6 changes: 3 additions & 3 deletions docs/1.guide/2.routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ icon: ri:direction-line

# Server Routes

> Nitro support filesystem routing to automatically map files to h3 routes.
> Nitro supports filesystem routing to automatically map files to h3 routes.
## Event handlers

Expand All @@ -14,7 +14,7 @@ An [event handler](https://h3.unjs.io/guide/event-handler) is a function that wi

## Filesystem routing

Nitro supports file-based routing for your API routes (file are automatically mapped to [h3 routes](https://h3.unjs.io/guide/router). Defining a route is as simple as creating a file inside the `api/` or `routes/` directory.
Nitro supports file-based routing for your API routes (files are automatically mapped to [h3 routes](https://h3.unjs.io/guide/router)). Defining a route is as simple as creating a file inside the `api/` or `routes/` directory.

You can only define one handler per files and you can [append the HTTP method](#specific-request-method) to the filename to define a specific request method.

Expand Down Expand Up @@ -46,7 +46,7 @@ If you are using [Nuxt](https://nuxt.com), move the `server/api/` and `server/ro
::

::tip
Some providers like Vercel use a top-level `api/` directory as a feature, therefore routes placed in `/api` wont work.
Some providers like Vercel use a top-level `api/` directory as a feature, therefore routes placed in `/api` won't work.
You will have to use `routes/api/`.
::

Expand Down
2 changes: 1 addition & 1 deletion docs/1.guide/3.websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ icon: cib:socket-io

# WebSocket

> Nitro natively support a cross platform WebSocket API
> Nitro natively supports a cross platform WebSocket API
Nitro natively supports runtime agnostic [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) API using [CrossWS](https://crossws.unjs.io/) and [H3 WebSocket](https://h3.unjs.io/guide/websocket).

Expand Down
4 changes: 2 additions & 2 deletions docs/2.deploy/20.providers/firebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ You can set custom Node.js version in configuration:
```ts [nitro.config.ts]
export default defineNitroConfig({
firebase: {
nodeVersion: "18" // Can be "16" or "18" or "20"
nodeVersion: "18" // Can be "16", "18", "20" or "22"
},
});
```
Expand All @@ -202,7 +202,7 @@ export default defineNitroConfig({
export default defineNuxtConfig({
nitro: {
firebase: {
nodeVersion: "18" // Can be "16" or "18" or "20"
nodeVersion: "18" // Can be "16", "18", "20" or "22"
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The preset will automatically be detected when the `preset` option is not set an

- Default: `3`{lang=ts} (`1`{lang=ts} when the testing environment is detected)

Log verbosity level. See [unjs/consola#level](https://github.com/unjs/consola/#level) for more information.
Log verbosity level. See [unjs/consola](https://github.com/unjs/consola?tab=readme-ov-file#log-level) for more information.

### `runtimeConfig`

Expand Down
80 changes: 42 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@
"nitro": "./dist/cli/index.mjs",
"nitropack": "./dist/cli/index.mjs"
},
"files": ["dist", "*.d.ts", "runtime-meta.*"],
"files": [
"dist",
"*.d.ts",
"runtime-meta.*"
],
"scripts": {
"build": "pnpm gen-presets && unbuild",
"dev": "pnpm nitro dev playground",
Expand All @@ -94,8 +98,8 @@
"undici": "^6.19.2"
},
"dependencies": {
"@cloudflare/kv-asset-handler": "^0.3.3",
"@netlify/functions": "^2.7.0",
"@cloudflare/kv-asset-handler": "^0.3.4",
"@netlify/functions": "^2.8.1",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-inject": "^5.0.5",
Expand All @@ -104,101 +108,101 @@
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/pluginutils": "^5.1.0",
"@types/http-proxy": "^1.17.14",
"@vercel/nft": "^0.27.2",
"@types/http-proxy": "^1.17.15",
"@vercel/nft": "^0.27.3",
"archiver": "^7.0.1",
"c12": "^1.11.1",
"chokidar": "^3.6.0",
"citty": "^0.1.6",
"compatx": "^0.1.8",
"confbox": "^0.1.7",
"consola": "^3.2.3",
"cookie-es": "^1.1.0",
"croner": "^8.0.2",
"cookie-es": "^1.2.2",
"croner": "^8.1.1",
"crossws": "^0.2.4",
"db0": "^0.1.4",
"defu": "^6.1.4",
"destr": "^2.0.3",
"dot-prop": "^9.0.0",
"esbuild": "^0.21.5",
"esbuild": "^0.23.1",
"escape-string-regexp": "^5.0.0",
"etag": "^1.8.1",
"fs-extra": "^11.2.0",
"globby": "^14.0.1",
"globby": "^14.0.2",
"gzip-size": "^7.0.0",
"h3": "^1.11.1",
"h3": "^1.12.0",
"hookable": "^5.5.3",
"httpxy": "^0.1.5",
"ioredis": "^5.4.1",
"jiti": "^1.21.6",
"klona": "^2.0.6",
"knitwork": "^1.1.0",
"listhen": "^1.7.2",
"magic-string": "^0.30.10",
"magic-string": "^0.30.11",
"magicast": "^0.3.4",
"mime": "^4.0.3",
"mime": "^4.0.4",
"mlly": "^1.7.1",
"mri": "^1.2.0",
"node-fetch-native": "^1.6.4",
"ofetch": "^1.3.4",
"ohash": "^1.1.3",
"openapi-typescript": "^7.0.0",
"openapi-typescript": "^7.3.0",
"pathe": "^1.1.2",
"perfect-debounce": "^1.0.0",
"pkg-types": "^1.1.1",
"pkg-types": "^1.2.0",
"pretty-bytes": "^6.1.1",
"radix3": "^1.1.2",
"rollup": "^4.18.0",
"rollup": "^4.21.0",
"rollup-plugin-visualizer": "^5.12.0",
"scule": "^1.3.0",
"semver": "^7.6.2",
"semver": "^7.6.3",
"serve-placeholder": "^2.0.2",
"serve-static": "^1.15.0",
"std-env": "^3.7.0",
"ufo": "^1.5.3",
"ufo": "^1.5.4",
"uncrypto": "^0.1.3",
"unctx": "^2.3.1",
"unenv": "^1.9.0",
"unimport": "^3.7.2",
"unenv": "^1.10.0",
"unimport": "^3.11.0",
"unstorage": "^1.10.2",
"untyped": "^1.4.2",
"unwasm": "^0.3.9"
},
"devDependencies": {
"@azure/functions": "^3.5.1",
"@azure/static-web-apps-cli": "^1.1.9",
"@biomejs/biome": "^1.8.1",
"@cloudflare/workers-types": "^4.20240614.0",
"@azure/static-web-apps-cli": "^1.1.10",
"@biomejs/biome": "^1.8.3",
"@cloudflare/workers-types": "^4.20240821.1",
"@deno/types": "^0.0.1",
"@scalar/api-reference": "^1.24.11",
"@scalar/api-reference": "^1.25.5",
"@types/archiver": "^6.0.2",
"@types/aws-lambda": "^8.10.140",
"@types/bun": "^1.1.4",
"@types/aws-lambda": "^8.10.143",
"@types/bun": "^1.1.6",
"@types/estree": "^1.0.5",
"@types/etag": "^1.8.3",
"@types/fs-extra": "^11.0.4",
"@types/node-fetch": "^2.6.11",
"@types/semver": "^7.5.8",
"@types/serve-static": "^1.15.7",
"@types/xml2js": "^0.4.14",
"@vitest/coverage-v8": "^1.6.0",
"automd": "^0.3.7",
"better-sqlite3": "^11.0.0",
"@vitest/coverage-v8": "^2.0.5",
"automd": "^0.3.8",
"better-sqlite3": "^11.2.1",
"changelogen": "^0.5.5",
"edge-runtime": "^3.0.1",
"eslint": "^9.5.0",
"edge-runtime": "^3.0.2",
"eslint": "^9.9.0",
"eslint-config-unjs": "0.3.2",
"execa": "^9.2.0",
"expect-type": "^0.19.0",
"firebase-admin": "^12.1.1",
"execa": "^9.3.1",
"expect-type": "^0.20.0",
"firebase-admin": "^12.3.1",
"firebase-functions": "^4.9.0",
"get-port-please": "^3.1.2",
"miniflare": "^3.20240610.1",
"prettier": "^3.3.2",
"typescript": "^5.4.5",
"miniflare": "^3.20240821.0",
"prettier": "^3.3.3",
"typescript": "^5.5.4",
"unbuild": "3.0.0-rc.2",
"undici": "^6.19.2",
"vitest": "^1.6.0",
"undici": "^6.19.8",
"vitest": "^2.0.5",
"xml2js": "^0.6.2"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 37ec4d7

Please sign in to comment.