shokupan 0.4.4 → 0.4.5
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 +6 -7
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/scalar.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,15 +32,14 @@ Shokupan is designed to make building APIs delightful again. With zero-config de
|
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
import { Shokupan } from 'shokupan';
|
|
35
|
+
const app = new Shokupan();
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
development: true
|
|
39
|
-
});
|
|
37
|
+
app.get('/', (ctx) => ({ message: 'Hello, World!' }));
|
|
38
|
+
app.get('/hello', (ctx) => "world");
|
|
40
39
|
|
|
41
|
-
app.
|
|
42
|
-
|
|
43
|
-
});
|
|
40
|
+
app.mount('/scalar', new ScalarPlugin({
|
|
41
|
+
enableStaticAnalysis: true
|
|
42
|
+
}));
|
|
44
43
|
|
|
45
44
|
app.listen();
|
|
46
45
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -3473,7 +3473,8 @@ function enableOpenApiValidation(app) {
|
|
|
3473
3473
|
}
|
|
3474
3474
|
const eta = new eta$2.Eta();
|
|
3475
3475
|
class ScalarPlugin extends ShokupanRouter {
|
|
3476
|
-
constructor(pluginOptions) {
|
|
3476
|
+
constructor(pluginOptions = {}) {
|
|
3477
|
+
pluginOptions.config ??= {};
|
|
3477
3478
|
super();
|
|
3478
3479
|
this.pluginOptions = pluginOptions;
|
|
3479
3480
|
this.init();
|