@getcronit/pylon 2.10.0-canary-20250206024306.0b965bfde9f8e1db5b2728aeb8259def3c857325 → 3.0.0-canary-20250211153808.b2b63f4e67c55542413f7be6d62ce8139cfcbdbe

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/context.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context as HonoContext } from 'hono';
2
2
  import type { Toucan } from 'toucan-js';
3
- import { AuthState } from './auth';
3
+ import type { AuthState } from './plugins/use-auth';
4
4
  import { AsyncLocalStorage } from 'async_hooks';
5
5
  import type { GraphQLResolveInfo } from 'graphql';
6
6
  export interface Bindings {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Env } from './context.js';
2
2
  export { ServiceError } from './define-pylon.js';
3
- export * from './auth/index.js';
3
+ export { useAuth, requireAuth, authMiddleware } from './plugins/use-auth/index.js';
4
4
  export { Context, Env, Variables, Bindings, asyncContext, getContext, setContext } from './context.js';
5
5
  import { app as pylonApp } from './app/index.js';
6
6
  export { pylonApp as app };
@@ -8,12 +8,16 @@ export { handler } from './app/pylon-handler.js';
8
8
  export { getEnv } from './get-env.js';
9
9
  export { createDecorator } from './create-decorator.js';
10
10
  export { createPubSub as experimentalCreatePubSub } from 'graphql-yoga';
11
+ export { usePages, type PageProps, PageData } from './plugins/use-pages/index';
11
12
  import type { Plugin as YogaPlugin } from 'graphql-yoga';
12
13
  import { MiddlewareHandler } from 'hono';
14
+ import { BuildContext, BuildOptions } from 'esbuild';
13
15
  export type Plugin<PluginContext extends Record<string, any> = {}, TServerContext extends Record<string, any> = {}, TUserContext = {}> = YogaPlugin<PluginContext, TServerContext, TUserContext> & {
14
16
  middleware?: MiddlewareHandler<Env>;
15
17
  setup?: (app: typeof pylonApp) => void;
16
- build?: () => Promise<void>;
18
+ build?: <T extends BuildOptions>(args: {
19
+ onBuild: () => void;
20
+ }) => Promise<Omit<BuildContext<T>, 'serve'>>;
17
21
  };
18
22
  export type PylonConfig = {
19
23
  landingPage?: boolean;