@spirobel/mininext 0.2.25 → 0.2.26
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/mininext.js +1 -1
- package/dist/url.d.ts +1 -1
- package/mininext/mininext.ts +1 -1
- package/mininext/url.ts +2 -2
- package/package.json +1 -1
package/dist/mininext.js
CHANGED
|
@@ -48,7 +48,7 @@ async function buildBackend(backendPath = "backend/backend.ts") {
|
|
|
48
48
|
outdir: path.resolve(projectRoot(), "dist"),
|
|
49
49
|
naming: "backend.js",
|
|
50
50
|
minify: Bun.argv[2] === "dev" ? false : true, //production
|
|
51
|
-
target: "
|
|
51
|
+
target: "bun",
|
|
52
52
|
define: {
|
|
53
53
|
FrontendScripts: JSON.stringify(FrontendScripts),
|
|
54
54
|
FrontendScriptUrls: JSON.stringify(FrontendScriptUrls),
|
package/dist/url.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export declare class url {
|
|
|
146
146
|
* @param handler - normal html handler with mini as the argument
|
|
147
147
|
* @returns a wrapped html handler that will only be called when the request is post
|
|
148
148
|
*/
|
|
149
|
-
static post(handler: HtmlHandler): (mini: Mini) => LazyHandlerReturnType;
|
|
149
|
+
static post<Y = unknown>(handler: HtmlHandler<Y>): (mini: Mini<Y>) => LazyHandlerReturnType;
|
|
150
150
|
/**
|
|
151
151
|
* wrap your handlers in this if you mutate something to prevent CSRF issues.
|
|
152
152
|
* @param handler - normal html handler with mini as the argument
|
package/mininext/mininext.ts
CHANGED
|
@@ -59,7 +59,7 @@ async function buildBackend(backendPath: string = "backend/backend.ts") {
|
|
|
59
59
|
outdir: path.resolve(projectRoot(), "dist"),
|
|
60
60
|
naming: "backend.js",
|
|
61
61
|
minify: Bun.argv[2] === "dev" ? false : true, //production
|
|
62
|
-
target: "
|
|
62
|
+
target: "bun",
|
|
63
63
|
define: {
|
|
64
64
|
FrontendScripts: JSON.stringify(FrontendScripts),
|
|
65
65
|
FrontendScriptUrls: JSON.stringify(FrontendScriptUrls),
|
package/mininext/url.ts
CHANGED
|
@@ -272,8 +272,8 @@ export class url {
|
|
|
272
272
|
* @param handler - normal html handler with mini as the argument
|
|
273
273
|
* @returns a wrapped html handler that will only be called when the request is post
|
|
274
274
|
*/
|
|
275
|
-
static post(handler: HtmlHandler) {
|
|
276
|
-
return (mini: Mini) => {
|
|
275
|
+
static post<Y = unknown>(handler: HtmlHandler<Y>) {
|
|
276
|
+
return (mini: Mini<Y>) => {
|
|
277
277
|
if (mini.form.post) {
|
|
278
278
|
return handler(mini);
|
|
279
279
|
} else {
|