@vite-hub/auth 0.0.3 → 0.0.4

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/vite.d.ts CHANGED
@@ -1,6 +1,12 @@
1
- import { f as AuthModuleOptions, j as ResolvedAuthViteConfig } from "./types-B0fg9XFd.js";
1
+ /// <reference path="./host-declarations.d.ts" />
2
+ import { P as ResolvedAuthViteConfig, h as AuthModuleOptions } from "./types-jaRlW3D1.js";
2
3
  import { Plugin } from "vite";
3
4
 
5
+ //#region src/config.d.ts
6
+ declare function resolveAuthViteConfig(options?: AuthModuleOptions, rootDir?: string, discovery?: {
7
+ serverDirs?: string[];
8
+ }): ResolvedAuthViteConfig | undefined;
9
+ //#endregion
4
10
  //#region src/vite.d.ts
5
11
  declare const AUTH_DEFINITION_ID = "#vitehub/auth/definition";
6
12
  declare const AUTH_SERVER_ID = "#vitehub/auth/server";
@@ -12,11 +18,20 @@ interface AuthVitePluginAPI {
12
18
  type AuthVitePlugin = Plugin & {
13
19
  api: AuthVitePluginAPI;
14
20
  };
15
- declare function hubAuth(options?: AuthModuleOptions): AuthVitePlugin;
21
+ declare function createAuthNitroConfig(plugin: AuthVitePlugin, options: {
22
+ nitro: Record<string, unknown>;
23
+ projectRoot: string;
24
+ serverDirs?: string[];
25
+ viteAuth?: AuthModuleOptions;
26
+ }): Record<string, unknown>;
27
+ interface InternalAuthModuleOptions {
28
+ importBase?: string;
29
+ }
30
+ declare function hubAuth(options?: AuthModuleOptions, internalOptions?: InternalAuthModuleOptions): AuthVitePlugin;
16
31
  declare module "vite" {
17
32
  interface UserConfig {
18
33
  auth?: AuthModuleOptions;
19
34
  }
20
35
  }
21
36
  //#endregion
22
- export { AUTH_DEFINITION_ID, AUTH_SERVER_ID, AUTH_VITE_PLUGIN_NAME, AuthVitePlugin, AuthVitePluginAPI, hubAuth };
37
+ export { AUTH_DEFINITION_ID, AUTH_SERVER_ID, AUTH_VITE_PLUGIN_NAME, AuthVitePlugin, AuthVitePluginAPI, createAuthNitroConfig, hubAuth, resolveAuthViteConfig };