@spirobel/mininext 0.2.24 → 0.2.25
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/url.d.ts +2 -2
- package/mininext/url.ts +2 -2
- package/package.json +2 -1
package/dist/url.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type Form = {
|
|
|
11
11
|
actionlink<Y = unknown>(qs?: string[] | string, settings?: LinkSettings): (mini: Mini<Y>) => string;
|
|
12
12
|
onPostSubmit<F>(cb: () => F): F | undefined;
|
|
13
13
|
};
|
|
14
|
-
export type DataMaker<X, Z = unknown> = ((mini: Mini
|
|
14
|
+
export type DataMaker<X, Z = unknown> = ((mini: Mini, rerun?: Z) => DataMakerReturnType<X>) | (() => DataMakerReturnType<X>);
|
|
15
15
|
export type DataMakerReturnType<X> = X | Promise<X>;
|
|
16
16
|
export type HandlerReturnType = JsonString | DangerJsonInHtml | HtmlString | string | void;
|
|
17
17
|
export type LazyHandlerReturnType = HandlerReturnType | Promise<HandlerReturnType>;
|
|
@@ -112,7 +112,7 @@ export declare class url {
|
|
|
112
112
|
* @example const {html,json, css, data, req, form, link, svg, deliver, route, params, header, head } = mini //pull everything out of the mini handbag
|
|
113
113
|
* @returns
|
|
114
114
|
*/
|
|
115
|
-
handler: (dataHandler: HtmlHandler<T>) => (oldmini: Mini
|
|
115
|
+
handler: (dataHandler: HtmlHandler<T>) => (oldmini: Mini) => Promise<string | void | DangerJsonInHtml>;
|
|
116
116
|
dataMaker: DataMaker<T, Z>;
|
|
117
117
|
/**
|
|
118
118
|
* use this to **specify the input type for the functions**,
|
package/mininext/url.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type Form = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type DataMaker<X, Z = unknown> =
|
|
19
|
-
| ((mini: Mini
|
|
19
|
+
| ((mini: Mini, rerun?: Z) => DataMakerReturnType<X>)
|
|
20
20
|
| (() => DataMakerReturnType<X>);
|
|
21
21
|
export type DataMakerReturnType<X> = X | Promise<X>;
|
|
22
22
|
export type HandlerReturnType =
|
|
@@ -221,7 +221,7 @@ export class url {
|
|
|
221
221
|
* @returns
|
|
222
222
|
*/
|
|
223
223
|
handler: (dataHandler: HtmlHandler<T>) => {
|
|
224
|
-
return async (oldmini: Mini
|
|
224
|
+
return async (oldmini: Mini) => {
|
|
225
225
|
const data = await dataMaker(oldmini);
|
|
226
226
|
const mini = new Mini(oldmini, data);
|
|
227
227
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spirobel/mininext",
|
|
3
|
+
"license" : "MIT" ,
|
|
3
4
|
"module": "dist/mininext.js",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "dist/mininext.js",
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
|
|
12
13
|
},
|
|
13
14
|
"files": ["dist", "mininext"],
|
|
14
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.25",
|
|
15
16
|
"devDependencies": {
|
|
16
17
|
"@types/bun": "latest"
|
|
17
18
|
},
|