gemi 0.3.8 → 0.4.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/dist/app/index.js +4 -4
- package/dist/http/ViewRouter.d.ts +2 -2
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +4 -4
- package/package.json +5 -3
- package/dist/app/flattenViewRoutes.d.ts +0 -12
- package/dist/app/flattenViewRoutes.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -8
- package/dist/server/imageHandler.d.ts +0 -2
- package/dist/server/imageHandler.d.ts.map +0 -1
package/dist/app/index.js
CHANGED
|
@@ -770,9 +770,9 @@ class ViewRouter {
|
|
|
770
770
|
middlewares = [];
|
|
771
771
|
middleware(req) {
|
|
772
772
|
}
|
|
773
|
-
layout(viewPath, handler, children
|
|
773
|
+
layout(viewPath, handler, children) {
|
|
774
774
|
function prepare(middlewares = []) {
|
|
775
|
-
let _children = children;
|
|
775
|
+
let _children = children ?? {};
|
|
776
776
|
if (handler && handler.constructor === Object) {
|
|
777
777
|
_children = handler;
|
|
778
778
|
}
|
|
@@ -807,9 +807,9 @@ class ViewRouter {
|
|
|
807
807
|
})
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
|
-
view(viewPath, handler, children
|
|
810
|
+
view(viewPath, handler, children) {
|
|
811
811
|
function prepare(middlewares = []) {
|
|
812
|
-
let _children = children;
|
|
812
|
+
let _children = children ?? {};
|
|
813
813
|
if (handler && handler.constructor === Object) {
|
|
814
814
|
_children = handler;
|
|
815
815
|
}
|
|
@@ -23,10 +23,10 @@ export declare class ViewRouter {
|
|
|
23
23
|
middlewares: string[];
|
|
24
24
|
middleware(req: Request): MiddlewareReturnType;
|
|
25
25
|
protected layout<T extends new (app: App) => Controller>(viewPath: string): ViewConfig;
|
|
26
|
-
protected layout<T extends new (app: App) => Controller>(viewPath: string, children
|
|
26
|
+
protected layout<T extends new (app: App) => Controller>(viewPath: string, children: ViewChildren): ViewConfig;
|
|
27
27
|
protected layout<T extends new (app: App) => Controller>(viewPath: string, handler: ViewHandler<T>): ViewConfig;
|
|
28
28
|
protected view<T extends new (app: App) => Controller>(viewPath: string): ViewConfig;
|
|
29
|
-
protected view<T extends new (app: App) => Controller>(viewPath: string, children
|
|
29
|
+
protected view<T extends new (app: App) => Controller>(viewPath: string, children: ViewChildren): ViewConfig;
|
|
30
30
|
protected view<T extends new (app: App) => Controller>(viewPath: string, handler: ViewHandler<T>): ViewConfig;
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
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,IAC3C,CAAC,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAC7C,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAE3C,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,MA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AU,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB;IAErD,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACrD,QAAQ,EAAE,MAAM,GACf,UAAU;IACb,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACrD,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,YAAY,GACrB,UAAU;IACb,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACrD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GACtB,UAAU;IAmDb,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACnD,QAAQ,EAAE,MAAM,GACf,UAAU;IACb,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACnD,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,YAAY,GACrB,UAAU;IACb,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,KAAK,UAAU,EACnD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GACtB,UAAU;CAkDd"}
|
package/dist/http/index.js
CHANGED
|
@@ -299,9 +299,9 @@ class ViewRouter {
|
|
|
299
299
|
middlewares = [];
|
|
300
300
|
middleware(req) {
|
|
301
301
|
}
|
|
302
|
-
layout(viewPath, handler, children
|
|
302
|
+
layout(viewPath, handler, children) {
|
|
303
303
|
function prepare(middlewares = []) {
|
|
304
|
-
let _children = children;
|
|
304
|
+
let _children = children ?? {};
|
|
305
305
|
if (handler && handler.constructor === Object) {
|
|
306
306
|
_children = handler;
|
|
307
307
|
}
|
|
@@ -336,9 +336,9 @@ class ViewRouter {
|
|
|
336
336
|
})
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
view(viewPath, handler, children
|
|
339
|
+
view(viewPath, handler, children) {
|
|
340
340
|
function prepare(middlewares = []) {
|
|
341
|
-
let _children = children;
|
|
341
|
+
let _children = children ?? {};
|
|
342
342
|
if (handler && handler.constructor === Object) {
|
|
343
343
|
_children = handler;
|
|
344
344
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gemi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@repo/eslint-config": "*",
|
|
6
6
|
"@repo/typescript-config": "*",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
"build:client": "vite build",
|
|
39
39
|
"build:types": "tsc",
|
|
40
40
|
"build:client-types": "tsc -p tsconfig.browser.json",
|
|
41
|
-
"test": "vitest"
|
|
41
|
+
"test": "vitest",
|
|
42
|
+
"prepublishOnly": "bun run build && bun scripts/setupExports.ts prod",
|
|
43
|
+
"postpublish": "bun scripts/setupExports.ts dev"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
46
|
"commander": "^12.1.0",
|
|
@@ -48,4 +50,4 @@
|
|
|
48
50
|
"urlpattern-polyfill": "^10.0.0",
|
|
49
51
|
"uuid": "^9.0.1"
|
|
50
52
|
}
|
|
51
|
-
}
|
|
53
|
+
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ComponentTree } from "../client/types";
|
|
2
|
-
import { type ViewChildren, type ViewRouteExec } from "../http/ViewRouter";
|
|
3
|
-
import type { App } from "./App";
|
|
4
|
-
export declare function flattenViewRoutes(routes: ViewChildren, app: App): {
|
|
5
|
-
flatRoutes: Record<string, {
|
|
6
|
-
exec: ViewRouteExec[];
|
|
7
|
-
middleware: any[];
|
|
8
|
-
}>;
|
|
9
|
-
routeManifest: Record<string, string[]>;
|
|
10
|
-
componentTree: ComponentTree;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=flattenViewRoutes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flattenViewRoutes.d.ts","sourceRoot":"","sources":["../../app/flattenViewRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG;;cAGpD,aAAa,EAAE;oBAAc,GAAG,EAAE;;;;EAwE7C"}
|
package/dist/runtime/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imageHandler.d.ts","sourceRoot":"","sources":["../../server/imageHandler.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2DlE"}
|