@onreza/adapter-nitro 0.2.2 → 0.2.3
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/README.md +44 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/preset/preset.js +1 -1
- package/dist/routes.d.ts +4 -4
- package/dist/types.d.ts +0 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,17 +102,56 @@ export default defineNuxtConfig({
|
|
|
102
102
|
|
|
103
103
|
## Build output
|
|
104
104
|
|
|
105
|
-
После сборки адаптер
|
|
105
|
+
После сборки адаптер генерирует структуру, совместимую с [ONREZA Build Output Specification](https://github.com/onreza/platform/blob/main/docs/architecture/BUILD_OUTPUT_SPEC.md):
|
|
106
106
|
|
|
107
107
|
```
|
|
108
108
|
.output/
|
|
109
109
|
├── .onreza/
|
|
110
|
-
│ └── manifest.json # Метаданные билда
|
|
110
|
+
│ └── manifest.json # Метаданные билда (версия 1)
|
|
111
111
|
├── server/
|
|
112
|
-
│ └── entry.mjs # Server handler (fetch контракт)
|
|
113
|
-
├── client/ # Static assets
|
|
114
|
-
│ └── _nuxt/
|
|
112
|
+
│ └── entry.mjs # Server handler (Web fetch контракт)
|
|
113
|
+
├── client/ # Static assets
|
|
114
|
+
│ └── _nuxt/ # Nuxt assets (или _assets/ для Nitro)
|
|
115
115
|
└── prerender/ # Prerendered HTML (опционально)
|
|
116
|
+
└── about/
|
|
117
|
+
└── index.html
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Формат manifest.json
|
|
121
|
+
|
|
122
|
+
Адаптер генерирует манифест версии 1:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"version": 1,
|
|
127
|
+
"adapter": {
|
|
128
|
+
"name": "@onreza/adapter-nitro",
|
|
129
|
+
"version": "0.2.1"
|
|
130
|
+
},
|
|
131
|
+
"framework": {
|
|
132
|
+
"name": "nuxt",
|
|
133
|
+
"version": "3.17.0"
|
|
134
|
+
},
|
|
135
|
+
"server": {
|
|
136
|
+
"entry": "server/entry.mjs",
|
|
137
|
+
"export": "fetch"
|
|
138
|
+
},
|
|
139
|
+
"assets": {
|
|
140
|
+
"directory": "client",
|
|
141
|
+
"prefix": "/_nuxt/"
|
|
142
|
+
},
|
|
143
|
+
"routes": [
|
|
144
|
+
{ "pattern": "^/_nuxt/.*$", "type": "static", "priority": 100 },
|
|
145
|
+
{ "pattern": "^/api/.*$", "type": "api", "priority": 20 },
|
|
146
|
+
{ "pattern": "^/.*$", "type": "ssr", "priority": 0 }
|
|
147
|
+
],
|
|
148
|
+
"prerender": {
|
|
149
|
+
"directory": "prerender",
|
|
150
|
+
"pages": {
|
|
151
|
+
"/about": { "html": "about/index.html" }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
116
155
|
```
|
|
117
156
|
|
|
118
157
|
## Ограничения
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { ApiRoute, IsrRoute, OnrezaManifest, Route, RoutePriority, RouteType, SsrRoute, StaticRoute, } from "@onreza/shared";
|
|
2
2
|
export { default } from "./preset/preset.ts";
|
|
3
3
|
export { collectRoutes, routeToRegex } from "./routes.ts";
|
|
4
|
-
export type {
|
|
4
|
+
export type { OnrezaRoute } from "./types.ts";
|