@sealcode/sealgen 0.15.60 → 0.15.61

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.
@@ -26,6 +26,7 @@ export type StatefulPageActionArgument<State extends Record<string, unknown>, Ar
26
26
  state: State;
27
27
  inputs: Record<string, string>;
28
28
  args: Args;
29
+ page: StatefulPage<any, any>;
29
30
  };
30
31
  export type StatefulPageAction<State extends Record<string, unknown>, Args extends unknown[] = unknown[]> = (obj: StatefulPageActionArgument<State, Args>) => State | Promise<State>;
31
32
  export type ExtractStatefulPageActionArgs<X> = X extends StatefulPageAction<any, infer Args> ? Args : never;
@@ -182,7 +182,8 @@ class StatefulPage extends Mountable {
182
182
  inputs,
183
183
  args: JSON.parse(
184
184
  from_base64(action_args)
185
- )
185
+ ),
186
+ page: this
186
187
  });
187
188
  ctx.body = this.render(ctx, new_state, inputs);
188
189
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.15.60",
3
+ "version": "0.15.61",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -40,6 +40,7 @@ export type StatefulPageActionArgument<
40
40
  state: State;
41
41
  inputs: Record<string, string>;
42
42
  args: Args;
43
+ page: StatefulPage<any, any>;
43
44
  };
44
45
 
45
46
  export type StatefulPageAction<
@@ -315,6 +316,7 @@ export abstract class StatefulPage<
315
316
  args: JSON.parse(
316
317
  from_base64(action_args as string)
317
318
  ) as unknown[],
319
+ page: this,
318
320
  });
319
321
  ctx.body = this.render(ctx, new_state, inputs);
320
322
  } else {