shokupan 0.1.0 → 0.2.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/README.md +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/context.d.ts +12 -3
- package/dist/index.cjs +819 -452
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +819 -452
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +2 -0
- package/dist/{openapi-analyzer-CFqgSLNK.cjs → openapi-analyzer-BN0wFCML.cjs} +4 -1
- package/dist/openapi-analyzer-BN0wFCML.cjs.map +1 -0
- package/dist/{openapi-analyzer-cjdGeQ5a.js → openapi-analyzer-BTExMLX4.js} +4 -1
- package/dist/openapi-analyzer-BTExMLX4.js.map +1 -0
- package/dist/plugins/debugview/plugin.d.ts +34 -0
- package/dist/plugins/openapi-validator.d.ts +2 -0
- package/dist/plugins/proxy.d.ts +9 -0
- package/dist/response.d.ts +4 -0
- package/dist/router.d.ts +2 -0
- package/dist/server-adapter-BD6oKEto.cjs +81 -0
- package/dist/server-adapter-BD6oKEto.cjs.map +1 -0
- package/dist/server-adapter-CnQFr4P7.js +64 -0
- package/dist/server-adapter-CnQFr4P7.js.map +1 -0
- package/dist/shokupan.d.ts +2 -0
- package/dist/types.d.ts +12 -0
- package/package.json +5 -2
- package/dist/openapi-analyzer-CFqgSLNK.cjs.map +0 -1
- package/dist/openapi-analyzer-cjdGeQ5a.js.map +0 -1
package/README.md
CHANGED
|
@@ -1632,6 +1632,7 @@ Container.clear();
|
|
|
1632
1632
|
- ✅ **Deep Introspection** - Type analysis for enhanced OpenAPI generation
|
|
1633
1633
|
- ✅ **Controller Mode** - Option for controller-only mode
|
|
1634
1634
|
- ✅ **Supports Node/Deno** - Shokupan can run on Node.js or Deno
|
|
1635
|
+
- ✅ **OpenAPI Validation** - Built-in [OpenAPI](https://www.openapis.org/) validation
|
|
1635
1636
|
|
|
1636
1637
|
### Future Features
|
|
1637
1638
|
|
package/dist/cli.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const p = require("@clack/prompts");
|
|
|
4
4
|
const fs = require("node:fs");
|
|
5
5
|
const path = require("node:path");
|
|
6
6
|
const promises = require("node:timers/promises");
|
|
7
|
-
const openapiAnalyzer = require("./openapi-analyzer-
|
|
7
|
+
const openapiAnalyzer = require("./openapi-analyzer-BN0wFCML.cjs");
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
10
|
if (e) {
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as p from "@clack/prompts";
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
|
-
import { analyzeDirectory } from "./openapi-analyzer-
|
|
6
|
+
import { analyzeDirectory } from "./openapi-analyzer-BTExMLX4.js";
|
|
7
7
|
const templates = {
|
|
8
8
|
controller: (name) => `import { Controller, Get, Ctx } from 'shokupan';
|
|
9
9
|
import { ShokupanContext } from 'shokupan';
|
package/dist/context.d.ts
CHANGED
|
@@ -4,15 +4,24 @@ import { ShokupanResponse } from './response';
|
|
|
4
4
|
import { Shokupan } from './shokupan';
|
|
5
5
|
import { CookieOptions, JSXRenderer } from './types';
|
|
6
6
|
type HeadersInit = Headers | Record<string, string> | [string, string][];
|
|
7
|
+
export interface HandlerStackItem {
|
|
8
|
+
name: string;
|
|
9
|
+
file: string;
|
|
10
|
+
line: number;
|
|
11
|
+
stateChanges?: Record<string, any>;
|
|
12
|
+
}
|
|
7
13
|
export declare class ShokupanContext<State extends Record<string, any> = Record<string, any>> {
|
|
8
14
|
readonly request: ShokupanRequest<any>;
|
|
9
15
|
readonly server?: Server;
|
|
10
16
|
readonly app?: Shokupan;
|
|
11
|
-
|
|
17
|
+
private _url;
|
|
12
18
|
params: Record<string, string>;
|
|
13
19
|
state: State;
|
|
20
|
+
handlerStack: HandlerStackItem[];
|
|
14
21
|
readonly response: ShokupanResponse;
|
|
15
|
-
|
|
22
|
+
_finalResponse?: Response;
|
|
23
|
+
constructor(request: ShokupanRequest<any>, server?: Server, state?: State, app?: Shokupan, enableMiddlewareTracking?: boolean);
|
|
24
|
+
get url(): URL;
|
|
16
25
|
/**
|
|
17
26
|
* Base request
|
|
18
27
|
*/
|
|
@@ -24,7 +33,7 @@ export declare class ShokupanContext<State extends Record<string, any> = Record<
|
|
|
24
33
|
/**
|
|
25
34
|
* Request path
|
|
26
35
|
*/
|
|
27
|
-
get path():
|
|
36
|
+
get path(): any;
|
|
28
37
|
/**
|
|
29
38
|
* Request query params
|
|
30
39
|
*/
|