gemi 0.1.2 → 0.2.1
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/dist/app/App.d.ts +107 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/Plugin.d.ts +10 -0
- package/dist/app/Plugin.d.ts.map +1 -0
- package/dist/app/flattenViewRoutes.d.ts +12 -0
- package/dist/app/flattenViewRoutes.d.ts.map +1 -0
- package/dist/app/index.js +1806 -0
- package/{bin → dist/bin}/gemi +0 -0
- package/dist/client/ClientRouter.d.ts +4 -0
- package/dist/client/ClientRouter.d.ts.map +1 -0
- package/dist/client/ClientRouterContext.d.ts +32 -0
- package/dist/client/ClientRouterContext.d.ts.map +1 -0
- package/dist/client/Form.d.ts +27 -3
- package/dist/client/Form.d.ts.map +1 -1
- package/dist/client/Image.d.ts +11 -0
- package/dist/client/Image.d.ts.map +1 -0
- package/dist/client/Mutation.d.ts +17 -0
- package/dist/client/Mutation.d.ts.map +1 -0
- package/dist/client/ServerDataProvider.d.ts +33 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -0
- package/dist/client/createRoot.d.ts +3 -0
- package/dist/client/createRoot.d.ts.map +1 -0
- package/dist/client/helpers/flattenComponentTree.d.ts +3 -0
- package/dist/client/helpers/flattenComponentTree.d.ts.map +1 -0
- package/dist/client/index-DiGoPyjN.mjs +717 -0
- package/dist/client/index.d.ts +7 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +29477 -30
- package/dist/client/init.d.ts +3 -0
- package/dist/client/init.d.ts.map +1 -0
- package/dist/client/types.d.ts +4 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/useMutation.d.ts +8 -0
- package/dist/client/useMutation.d.ts.map +1 -0
- package/dist/client/useQuery.d.ts +6 -0
- package/dist/client/useQuery.d.ts.map +1 -0
- package/dist/client/useUser.d.ts +2 -0
- package/dist/client/useUser.d.ts.map +1 -0
- package/dist/email/index.js +9086 -0
- package/dist/facades/index.js +71 -0
- package/dist/http/ApiRouter.d.ts +50 -0
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/Controller.d.ts +5 -0
- package/dist/http/Controller.d.ts.map +1 -1
- package/dist/http/Error.d.ts +7 -0
- package/dist/http/Error.d.ts.map +1 -0
- package/dist/http/HttpRequest.d.ts +21 -0
- package/dist/http/HttpRequest.d.ts.map +1 -0
- package/dist/http/Middleware.d.ts +4 -0
- package/dist/http/Middleware.d.ts.map +1 -0
- package/dist/http/Router.d.ts +31 -0
- package/dist/http/Router.d.ts.map +1 -0
- package/dist/http/ViewRouter.d.ts +30 -0
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/getCookies.d.ts +2 -0
- package/dist/http/getCookies.d.ts.map +1 -0
- package/dist/http/index.d.ts +4 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +328 -16
- package/dist/http/requestContext.d.ts +4 -0
- package/dist/http/requestContext.d.ts.map +1 -0
- package/dist/runtime/index.js +8 -0
- package/dist/server/generateEtag.d.ts +2 -0
- package/dist/server/generateEtag.d.ts.map +1 -0
- package/dist/server/imageHandler.d.ts +2 -0
- package/dist/server/imageHandler.d.ts.map +1 -0
- package/dist/utils/Subject.d.ts +9 -0
- package/dist/utils/Subject.d.ts.map +1 -0
- package/dist/utils/type.d.ts +2 -0
- package/dist/utils/type.d.ts.map +1 -0
- package/dist/vite/index.js +35 -0
- package/package.json +19 -9
- package/bin/gemi.ts +0 -3
- package/dist/client/useRouter.d.ts +0 -2
- package/dist/client/useRouter.d.ts.map +0 -1
- package/dist/dev.js +0 -1195
- package/dist/server/Server.d.ts +0 -10
- package/dist/server/Server.d.ts.map +0 -1
- package/dist/server/dev.d.ts +0 -3
- package/dist/server/dev.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -2
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -1195
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {createRequire} from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
+
var __require = createRequire(import.meta.url);
|
|
20
|
+
|
|
21
|
+
// http/requestContext.ts
|
|
22
|
+
import {AsyncLocalStorage} from "async_hooks";
|
|
23
|
+
var requestContext = new AsyncLocalStorage;
|
|
24
|
+
|
|
25
|
+
// facades/Auth.ts
|
|
26
|
+
class Auth {
|
|
27
|
+
static user() {
|
|
28
|
+
const requestContextStore = requestContext.getStore();
|
|
29
|
+
if (requestContextStore) {
|
|
30
|
+
return requestContextStore.get("user");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// http/Error.ts
|
|
35
|
+
class RequestBreakerError extends Error {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
}
|
|
39
|
+
payload = { api: {}, view: {} };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// facades/Redirect.ts
|
|
43
|
+
class RedirectError extends RequestBreakerError {
|
|
44
|
+
constructor(path) {
|
|
45
|
+
super("Redirect error");
|
|
46
|
+
this.name = "RedirectError";
|
|
47
|
+
this.payload = {
|
|
48
|
+
api: {
|
|
49
|
+
status: 302,
|
|
50
|
+
data: { error: "Redirect error" }
|
|
51
|
+
},
|
|
52
|
+
view: {
|
|
53
|
+
status: 302,
|
|
54
|
+
headers: {
|
|
55
|
+
"Cache-Control": "private, no-cache, no-store, max-age=0, must-revalidate",
|
|
56
|
+
Location: path
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
class Redirect {
|
|
64
|
+
static to(path) {
|
|
65
|
+
throw new RedirectError(path);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
Redirect,
|
|
70
|
+
Auth
|
|
71
|
+
};
|
package/dist/http/ApiRouter.d.ts
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
import type { Controller } from "./Controller";
|
|
2
|
+
import { type MiddlewareReturnType } from "./Router";
|
|
3
|
+
import type { App } from "../app/App";
|
|
4
|
+
type ControllerMethods<T extends new (app: App) => Controller> = {
|
|
5
|
+
[K in keyof InstanceType<T>]: InstanceType<T>[K] extends Function ? K : never;
|
|
6
|
+
}[keyof InstanceType<T>];
|
|
7
|
+
type DataResponse = {
|
|
8
|
+
data: any;
|
|
9
|
+
status: number;
|
|
10
|
+
headers: Record<string, string>;
|
|
11
|
+
cookies: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
type ErrorResponse = {
|
|
14
|
+
error: any;
|
|
15
|
+
status: number;
|
|
16
|
+
headers: Record<string, string>;
|
|
17
|
+
cookies: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
export type ApiRouteExec = (req: Request, params: Record<string, string>) => Promise<DataResponse | ErrorResponse>;
|
|
20
|
+
type ApiRouteConfig = {
|
|
21
|
+
method: string;
|
|
22
|
+
exec: ApiRouteExec;
|
|
23
|
+
};
|
|
24
|
+
export type ApiRouteChildren = Record<string, ApiRouteConfig | ApiRouteConfig[] | (new (app: App) => ApiRouter)>;
|
|
1
25
|
export declare class ApiRouter {
|
|
26
|
+
routes: Record<string, any>;
|
|
27
|
+
middlewares: string[];
|
|
28
|
+
constructor();
|
|
29
|
+
middleware(req: Request): MiddlewareReturnType;
|
|
30
|
+
private handleRequest;
|
|
31
|
+
protected get<T extends new (app: App) => Controller>(controller: T, methodName: ControllerMethods<T>): {
|
|
32
|
+
method: string;
|
|
33
|
+
exec: (req: Request, params: Record<string, string>, app: App) => Promise<DataResponse | ErrorResponse>;
|
|
34
|
+
};
|
|
35
|
+
protected post<T extends new (app: App) => Controller>(controller: T, methodName: ControllerMethods<T>): {
|
|
36
|
+
method: string;
|
|
37
|
+
exec: (req: Request, params: Record<string, string>, app: App) => Promise<DataResponse | ErrorResponse>;
|
|
38
|
+
};
|
|
39
|
+
protected patch<T extends new (app: App) => Controller>(controller: T, methodName: ControllerMethods<T>): {
|
|
40
|
+
method: string;
|
|
41
|
+
exec: (req: Request, params: Record<string, string>, app: App) => Promise<DataResponse | ErrorResponse>;
|
|
42
|
+
};
|
|
43
|
+
protected put<T extends new (app: App) => Controller>(controller: T, methodName: ControllerMethods<T>): {
|
|
44
|
+
method: string;
|
|
45
|
+
exec: (req: Request, params: Record<string, string>, app: App) => Promise<DataResponse | ErrorResponse>;
|
|
46
|
+
};
|
|
47
|
+
protected delete<T extends new (app: App) => Controller>(controller: T, methodName: ControllerMethods<T>): {
|
|
48
|
+
method: string;
|
|
49
|
+
exec: (req: Request, params: Record<string, string>, app: App) => Promise<DataResponse | ErrorResponse>;
|
|
50
|
+
};
|
|
2
51
|
}
|
|
52
|
+
export {};
|
|
3
53
|
//# sourceMappingURL=ApiRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiRouter.d.ts","sourceRoot":"","sources":["../../http/ApiRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiRouter.d.ts","sourceRoot":"","sources":["../../http/ApiRouter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,KAAK,iBAAiB,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,IAAI;KAC9D,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAC9E,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzB,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AACF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAYF,MAAM,MAAM,YAAY,GAAG,CACzB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,YAAY,GAAG,aAAa,CAAC,CAAC;AAE3C,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,MAAM,EACN,cAAc,GAAG,cAAc,EAAE,GAAG,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,SAAS,CAAC,CAClE,CAAC;AAEF,qBAAa,SAAS;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACjC,WAAW,EAAE,MAAM,EAAE,CAAM;;IAI3B,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB;IAErD,OAAO,CAAC,aAAa;IAkCrB,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EAClD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;IAMlC,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACnD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;IAMlC,SAAS,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACpD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;IAMlC,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EAClD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;IAMlC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACrD,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;CAKnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controller.d.ts","sourceRoot":"","sources":["../../http/Controller.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"Controller.d.ts","sourceRoot":"","sources":["../../http/Controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,qBAAa,UAAU;IAGF,GAAG,EAAE,GAAG;IAF3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAM;gBAEpC,GAAG,EAAE,GAAG;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../http/Error.ts"],"names":[],"mappings":"AAAA,qBAAa,mBAAoB,SAAQ,KAAK;IACrC,OAAO,EAAE;QACd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC3B,CAAyB;CAC3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare class Input<T> extends Map {
|
|
2
|
+
constructor();
|
|
3
|
+
toJSON(): T;
|
|
4
|
+
}
|
|
5
|
+
export declare class HttpRequest<T = {}> {
|
|
6
|
+
rawRequest: Request;
|
|
7
|
+
headers: Headers;
|
|
8
|
+
cookies: Map<string, string>;
|
|
9
|
+
protected schema: Partial<Record<keyof T, Record<string, string>>>;
|
|
10
|
+
constructor(req: Request);
|
|
11
|
+
private parseBody;
|
|
12
|
+
private validateInput;
|
|
13
|
+
input(): Promise<Input<T>>;
|
|
14
|
+
safeInput(): Promise<{
|
|
15
|
+
isValid: boolean;
|
|
16
|
+
errors: Record<string, string[]>;
|
|
17
|
+
input: Input<T>;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=HttpRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpRequest.d.ts","sourceRoot":"","sources":["../../http/HttpRequest.ts"],"names":[],"mappings":"AAEA,cAAM,KAAK,CAAC,CAAC,CAAE,SAAQ,GAAG;;IAKjB,MAAM,IAAI,CAAC;CAGnB;AA4CD,qBAAa,WAAW,CAAC,CAAC,GAAG,EAAE;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAM;gBAE5D,GAAG,EAAE,OAAO;YAeV,SAAS;IAyCvB,OAAO,CAAC,aAAa;IAsBR,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAI1B,SAAS,IAAI,OAAO,CAAC;QAChC,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACjC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB,CAAC;CAoBH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Middleware.d.ts","sourceRoot":"","sources":["../../http/Middleware.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACf,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;CAG/C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RequestBreakerError } from "./Error";
|
|
2
|
+
type MiddlewareResult = Partial<{
|
|
3
|
+
headers: Record<string, string>;
|
|
4
|
+
cookies: Record<string, string>;
|
|
5
|
+
}>;
|
|
6
|
+
export type MiddlewareReturnType = void | Promise<MiddlewareResult> | MiddlewareResult;
|
|
7
|
+
export type RouterMiddleware = (req: Request, ctx: any) => MiddlewareReturnType;
|
|
8
|
+
export declare class AuthenticationError extends RequestBreakerError {
|
|
9
|
+
constructor();
|
|
10
|
+
payload: {
|
|
11
|
+
api: {
|
|
12
|
+
status: number;
|
|
13
|
+
data: {
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
view: {
|
|
18
|
+
status: number;
|
|
19
|
+
headers: {
|
|
20
|
+
"Cache-Control": string;
|
|
21
|
+
Location: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare class ValidationError extends RequestBreakerError {
|
|
27
|
+
errors: Record<string, string[]>;
|
|
28
|
+
constructor(errors: Record<string, string[]>);
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=Router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../http/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,OAAO,CAAC,gBAAgB,CAAC,GACzB,gBAAgB,CAAC;AAErB,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,oBAAoB,CAAC;AAEhF,qBAAa,mBAAoB,SAAQ,mBAAmB;;IAM1D,OAAO;;;;;;;;;;;;;;MAaL;CACH;AAED,qBAAa,eAAgB,SAAQ,mBAAmB;IACtD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;gBAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAuB7C"}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
import { Controller } from "./Controller";
|
|
2
|
+
import type { MiddlewareReturnType } from "./Router";
|
|
3
|
+
import type { App } from "../app/App";
|
|
4
|
+
type ControllerMethods<T extends new () => Controller> = {
|
|
5
|
+
[K in keyof InstanceType<T>]: InstanceType<T>[K] extends Function ? K : never;
|
|
6
|
+
}[keyof InstanceType<T>];
|
|
7
|
+
type ViewHandler<T extends new () => Controller> = [
|
|
8
|
+
controller: T,
|
|
9
|
+
method: ControllerMethods<T>
|
|
10
|
+
];
|
|
11
|
+
type ViewPrepare = {
|
|
12
|
+
exec: (req: Request, params: Record<string, string>) => any;
|
|
13
|
+
viewPath: string;
|
|
14
|
+
children: ViewChildren;
|
|
15
|
+
middlewares: any[];
|
|
16
|
+
};
|
|
17
|
+
type ViewConfig = {
|
|
18
|
+
prepare: (_middlewares?: any[]) => ViewPrepare;
|
|
19
|
+
middlewares: (middlewares: any[]) => {
|
|
20
|
+
prepare: () => ViewPrepare;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type ViewChildren = Record<string, ViewConfig | (new (app: App) => ViewRouter)>;
|
|
24
|
+
export type ViewRouteExec = (req: Request, params: Record<string, string>, app: App) => any;
|
|
1
25
|
export declare class ViewRouter {
|
|
26
|
+
routes: ViewChildren;
|
|
27
|
+
middlewares: string[];
|
|
28
|
+
constructor();
|
|
29
|
+
middleware(req: Request): MiddlewareReturnType;
|
|
30
|
+
protected view<T extends new (app: App) => Controller>(viewPath: string, handler?: ViewHandler<T>, children?: ViewChildren): ViewConfig;
|
|
2
31
|
}
|
|
32
|
+
export {};
|
|
3
33
|
//# sourceMappingURL=ViewRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewRouter.d.ts","sourceRoot":"","sources":["../../http/ViewRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewRouter.d.ts","sourceRoot":"","sources":["../../http/ViewRouter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,KAAK,iBAAiB,CAAC,CAAC,SAAS,UAAU,UAAU,IAAI;KACtD,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAC9E,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzB,KAAK,WAAW,CAAC,CAAC,SAAS,UAAU,UAAU,IAAI;IACjD,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC7B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;IAC/C,WAAW,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK;QACnC,OAAO,EAAE,MAAM,WAAW,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAC/B,MAAM,EACN,UAAU,GAAG,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,CAAC,CAC5C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAC1B,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,GAAG,EAAE,GAAG,KACL,GAAG,CAAC;AAET,qBAAa,UAAU;IACd,MAAM,EAAE,YAAY,CAAM;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAM;;IAG3B,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB;IAErD,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACnD,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EACxB,QAAQ,GAAE,YAAiB,GAC1B,UAAU;CA8Bd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCookies.d.ts","sourceRoot":"","sources":["../../http/getCookies.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAY5D"}
|
package/dist/http/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { Controller } from "./Controller";
|
|
2
2
|
export { ApiRouter } from "./ApiRouter";
|
|
3
3
|
export { ViewRouter } from "./ViewRouter";
|
|
4
|
+
export { ValidationError, AuthenticationError } from "./Router";
|
|
5
|
+
export { HttpRequest } from "./HttpRequest";
|
|
6
|
+
export { Middleware } from "./Middleware";
|
|
7
|
+
export { getCookies } from "./getCookies";
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/http/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/http/index.js
CHANGED
|
@@ -1,33 +1,345 @@
|
|
|
1
|
+
import {createRequire} from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
1
3
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
10
17
|
};
|
|
11
|
-
var
|
|
12
|
-
var __require = (
|
|
13
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
14
|
-
}) : x)(function(x) {
|
|
15
|
-
if (typeof require !== "undefined")
|
|
16
|
-
return require.apply(this, arguments);
|
|
17
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
18
|
-
});
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
+
var __require = createRequire(import.meta.url);
|
|
19
20
|
|
|
20
21
|
// http/Controller.ts
|
|
21
22
|
class Controller {
|
|
23
|
+
app;
|
|
24
|
+
requests = {};
|
|
25
|
+
constructor(app) {
|
|
26
|
+
this.app = app;
|
|
27
|
+
}
|
|
22
28
|
}
|
|
29
|
+
// http/Error.ts
|
|
30
|
+
class RequestBreakerError extends Error {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
}
|
|
34
|
+
payload = { api: {}, view: {} };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// http/Router.ts
|
|
38
|
+
class AuthenticationError extends RequestBreakerError {
|
|
39
|
+
constructor() {
|
|
40
|
+
super("Authentication error");
|
|
41
|
+
this.name = "AuthenticationError";
|
|
42
|
+
}
|
|
43
|
+
payload = {
|
|
44
|
+
api: {
|
|
45
|
+
status: 401,
|
|
46
|
+
data: { error: "Authentication error" }
|
|
47
|
+
},
|
|
48
|
+
view: {
|
|
49
|
+
status: 302,
|
|
50
|
+
headers: {
|
|
51
|
+
"Cache-Control": "private, no-cache, no-store, max-age=0, must-revalidate",
|
|
52
|
+
Location: "/auth/sign-in"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
class ValidationError extends RequestBreakerError {
|
|
59
|
+
errors = {};
|
|
60
|
+
constructor(errors) {
|
|
61
|
+
console.log("ValidationError", { errors });
|
|
62
|
+
super("Validation error");
|
|
63
|
+
this.name = "ValidationError";
|
|
64
|
+
this.errors = errors;
|
|
65
|
+
this.payload = {
|
|
66
|
+
api: {
|
|
67
|
+
status: 400,
|
|
68
|
+
data: {
|
|
69
|
+
error: {
|
|
70
|
+
kind: "validation_error",
|
|
71
|
+
messages: errors
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
headers: {
|
|
75
|
+
"Content-Type": "application/json"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
view: {
|
|
79
|
+
status: 400
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// http/HttpRequest.ts
|
|
86
|
+
var validate = function(ruleName) {
|
|
87
|
+
const [rule, param] = ruleName.split(":");
|
|
88
|
+
switch (rule) {
|
|
89
|
+
case "required":
|
|
90
|
+
return (value) => {
|
|
91
|
+
return value !== null && value !== undefined;
|
|
92
|
+
};
|
|
93
|
+
case "password":
|
|
94
|
+
return (value) => {
|
|
95
|
+
const passwordRegex = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/;
|
|
96
|
+
return passwordRegex.test(value);
|
|
97
|
+
};
|
|
98
|
+
case "number":
|
|
99
|
+
return (value) => {
|
|
100
|
+
if (typeof value !== "number")
|
|
101
|
+
return false;
|
|
102
|
+
return !isNaN(value);
|
|
103
|
+
};
|
|
104
|
+
case "min":
|
|
105
|
+
return (value) => {
|
|
106
|
+
return value.length >= parseInt(param);
|
|
107
|
+
};
|
|
108
|
+
case "max":
|
|
109
|
+
return (value) => {
|
|
110
|
+
return value.length <= parseInt(param);
|
|
111
|
+
};
|
|
112
|
+
case "email":
|
|
113
|
+
return (value) => {
|
|
114
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
115
|
+
return emailRegex.test(value);
|
|
116
|
+
};
|
|
117
|
+
default:
|
|
118
|
+
return () => true;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
class Input extends Map {
|
|
123
|
+
constructor() {
|
|
124
|
+
super();
|
|
125
|
+
}
|
|
126
|
+
toJSON() {
|
|
127
|
+
return Object.fromEntries(this);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
class HttpRequest {
|
|
132
|
+
rawRequest;
|
|
133
|
+
headers;
|
|
134
|
+
cookies;
|
|
135
|
+
schema = {};
|
|
136
|
+
constructor(req) {
|
|
137
|
+
this.rawRequest = req;
|
|
138
|
+
this.headers = req.headers;
|
|
139
|
+
const cookie = this.rawRequest.headers.get("Cookie");
|
|
140
|
+
const cookies = new Map;
|
|
141
|
+
if (cookie) {
|
|
142
|
+
const cookieArray = cookie.split(";");
|
|
143
|
+
for (const c of cookieArray) {
|
|
144
|
+
const [key, value] = c.split("=");
|
|
145
|
+
cookies.set(key.trim(), value.trim());
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
this.cookies = cookies;
|
|
149
|
+
}
|
|
150
|
+
async parseBody() {
|
|
151
|
+
const inputMap = new Input;
|
|
152
|
+
if (this.rawRequest.headers.get("Content-Type") === "application/json") {
|
|
153
|
+
const body = await this.rawRequest.json();
|
|
154
|
+
for (const [key, value] of Object.entries(body)) {
|
|
155
|
+
inputMap.set(key, value);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (this.rawRequest.headers.get("Content-Type") === "application/x-www-form-urlencoded") {
|
|
159
|
+
const body = await this.rawRequest.formData();
|
|
160
|
+
for (const [key, value] of body) {
|
|
161
|
+
console.log(key, value);
|
|
162
|
+
inputMap.set(key, value);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (this.rawRequest.headers.get("Content-Type").startsWith("multipart/form-data")) {
|
|
166
|
+
const body = await this.rawRequest.formData();
|
|
167
|
+
for (const [key, value] of body) {
|
|
168
|
+
if (inputMap.has(key)) {
|
|
169
|
+
const currentValue = inputMap.get(key);
|
|
170
|
+
if (Array.isArray(currentValue)) {
|
|
171
|
+
currentValue.push(value);
|
|
172
|
+
inputMap.set(key, currentValue);
|
|
173
|
+
} else {
|
|
174
|
+
inputMap.set(key, [currentValue, value]);
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
inputMap.set(key, value);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return inputMap;
|
|
182
|
+
}
|
|
183
|
+
validateInput(input) {
|
|
184
|
+
const errors = {};
|
|
185
|
+
for (const [key, rules] of Object.entries(this.schema)) {
|
|
186
|
+
for (const [rule, message] of Object.entries(rules)) {
|
|
187
|
+
const validator = validate(rule);
|
|
188
|
+
if (!validator(input.get(key))) {
|
|
189
|
+
if (!errors[key]) {
|
|
190
|
+
errors[key] = [];
|
|
191
|
+
}
|
|
192
|
+
errors[key].push(String(message));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (Object.keys(errors).length > 0) {
|
|
197
|
+
throw new ValidationError(errors);
|
|
198
|
+
} else {
|
|
199
|
+
return input;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async input() {
|
|
203
|
+
return this.validateInput(await this.parseBody());
|
|
204
|
+
}
|
|
205
|
+
async safeInput() {
|
|
206
|
+
const input = await this.parseBody();
|
|
207
|
+
try {
|
|
208
|
+
this.validateInput(input);
|
|
209
|
+
return {
|
|
210
|
+
isValid: true,
|
|
211
|
+
errors: {},
|
|
212
|
+
input
|
|
213
|
+
};
|
|
214
|
+
} catch (err) {
|
|
215
|
+
if (!(err instanceof ValidationError)) {
|
|
216
|
+
throw err;
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
isValid: false,
|
|
220
|
+
errors: err.errors,
|
|
221
|
+
input
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
23
227
|
// http/ApiRouter.ts
|
|
24
228
|
class ApiRouter {
|
|
229
|
+
routes = {};
|
|
230
|
+
middlewares = [];
|
|
231
|
+
constructor() {
|
|
232
|
+
}
|
|
233
|
+
middleware(req) {
|
|
234
|
+
}
|
|
235
|
+
handleRequest(controller, methodName) {
|
|
236
|
+
return (method) => {
|
|
237
|
+
return {
|
|
238
|
+
method,
|
|
239
|
+
exec: async (req, params, app) => {
|
|
240
|
+
const controllerInstance = new controller(app);
|
|
241
|
+
const handler = controllerInstance[methodName].bind(controllerInstance);
|
|
242
|
+
const Req = controllerInstance.requests[methodName] ?? HttpRequest;
|
|
243
|
+
const httpRequest = new Req(req);
|
|
244
|
+
const {
|
|
245
|
+
data,
|
|
246
|
+
status = method === "post" ? 201 : 200,
|
|
247
|
+
headers = {},
|
|
248
|
+
cookies = {}
|
|
249
|
+
} = await handler(httpRequest, params);
|
|
250
|
+
return {
|
|
251
|
+
data,
|
|
252
|
+
status,
|
|
253
|
+
headers,
|
|
254
|
+
cookies
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
get(controller, methodName) {
|
|
261
|
+
const handler = this.handleRequest(controller, methodName);
|
|
262
|
+
return handler("get");
|
|
263
|
+
}
|
|
264
|
+
post(controller, methodName) {
|
|
265
|
+
const handler = this.handleRequest(controller, methodName);
|
|
266
|
+
return handler("post");
|
|
267
|
+
}
|
|
268
|
+
patch(controller, methodName) {
|
|
269
|
+
const handler = this.handleRequest(controller, methodName);
|
|
270
|
+
return handler("patch");
|
|
271
|
+
}
|
|
272
|
+
put(controller, methodName) {
|
|
273
|
+
const handler = this.handleRequest(controller, methodName);
|
|
274
|
+
return handler("put");
|
|
275
|
+
}
|
|
276
|
+
delete(controller, methodName) {
|
|
277
|
+
const handler = this.handleRequest(controller, methodName);
|
|
278
|
+
return handler("delete");
|
|
279
|
+
}
|
|
25
280
|
}
|
|
26
281
|
// http/ViewRouter.ts
|
|
27
282
|
class ViewRouter {
|
|
283
|
+
routes = {};
|
|
284
|
+
middlewares = [];
|
|
285
|
+
constructor() {
|
|
286
|
+
}
|
|
287
|
+
middleware(req) {
|
|
288
|
+
}
|
|
289
|
+
view(viewPath, handler, children = {}) {
|
|
290
|
+
function prepare(middlewares = []) {
|
|
291
|
+
return {
|
|
292
|
+
exec: async (req, params, app) => {
|
|
293
|
+
if (!handler) {
|
|
294
|
+
return { data: { [viewPath]: {} }, headers: {}, head: {} };
|
|
295
|
+
}
|
|
296
|
+
const [controller, methodName] = handler;
|
|
297
|
+
const instance = new controller(app);
|
|
298
|
+
const method = instance[methodName].bind(instance);
|
|
299
|
+
const { data, headers = {}, head = {} } = await method(req, params);
|
|
300
|
+
return { data: { [viewPath]: data }, headers, head };
|
|
301
|
+
},
|
|
302
|
+
children,
|
|
303
|
+
viewPath,
|
|
304
|
+
middlewares
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
prepare,
|
|
309
|
+
middlewares: (middlewares) => {
|
|
310
|
+
prepare:
|
|
311
|
+
;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
// http/Middleware.ts
|
|
317
|
+
class Middleware {
|
|
318
|
+
async run(_req, ctx) {
|
|
319
|
+
return {};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// http/getCookies.ts
|
|
323
|
+
function getCookies(req) {
|
|
324
|
+
const cookies = req.headers.get("cookie");
|
|
325
|
+
if (!cookies) {
|
|
326
|
+
return new Map;
|
|
327
|
+
}
|
|
328
|
+
const _cookies = new Map;
|
|
329
|
+
const cookieStrings = cookies.split(";");
|
|
330
|
+
for (const cookieString of cookieStrings) {
|
|
331
|
+
const [name, value] = cookieString.split("=");
|
|
332
|
+
_cookies.set(name.trim(), value);
|
|
333
|
+
}
|
|
334
|
+
return _cookies;
|
|
28
335
|
}
|
|
29
336
|
export {
|
|
337
|
+
getCookies,
|
|
30
338
|
ViewRouter,
|
|
339
|
+
ValidationError,
|
|
340
|
+
Middleware,
|
|
341
|
+
HttpRequest,
|
|
31
342
|
Controller,
|
|
343
|
+
AuthenticationError,
|
|
32
344
|
ApiRouter
|
|
33
345
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestContext.d.ts","sourceRoot":"","sources":["../../http/requestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAYhD,eAAO,MAAM,cAAc,qCAA4C,CAAC"}
|