@vite-hub/auth 0.0.3 → 0.1.0

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.
Files changed (50) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +213 -41
  3. package/dist/agent.d.ts +25 -13
  4. package/dist/agent.js +19 -5
  5. package/dist/application-path-C290OAIs.js +18 -0
  6. package/dist/cli-mgXvsBtA.d.ts +85 -0
  7. package/dist/cli.d.ts +7 -0
  8. package/dist/cli.js +68 -0
  9. package/dist/console-B7eERmGv.d.ts +180 -0
  10. package/dist/console-runtime-bZQtnX2Y.d.ts +39 -0
  11. package/dist/console-runtime.d.ts +3 -0
  12. package/dist/console-runtime.js +819 -0
  13. package/dist/console-types-CmmnKGMx.js +38 -0
  14. package/dist/console.d.ts +7 -0
  15. package/dist/console.js +15 -0
  16. package/dist/error-diagnostics-CL0yjHiM.js +79 -0
  17. package/dist/events-BkmK2dFY.d.ts +486 -0
  18. package/dist/events-P7mI4IQb.js +196 -0
  19. package/dist/events-config-CjcFOhTE.js +177 -0
  20. package/dist/host-declarations.d.ts +17 -0
  21. package/dist/index.d.ts +6 -5
  22. package/dist/index.js +40 -28
  23. package/dist/inspect-DPtsW8dB.d.ts +36 -0
  24. package/dist/nuxt.d.ts +59 -0
  25. package/dist/nuxt.js +93 -0
  26. package/dist/presets-BGZi6Dfu.d.ts +25 -0
  27. package/dist/presets.d.ts +2 -0
  28. package/dist/presets.js +32 -0
  29. package/dist/runtime/console.d.ts +7 -0
  30. package/dist/runtime/console.js +42 -0
  31. package/dist/runtime/empty-definition.d.ts +1 -2
  32. package/dist/runtime/nuxt.d.ts +3 -0
  33. package/dist/runtime/nuxt.js +9 -0
  34. package/dist/runtime/vue-nuxt.d.ts +3 -0
  35. package/dist/runtime/vue-nuxt.js +8 -0
  36. package/dist/server-B7LU19dS.js +1730 -0
  37. package/dist/server-CTD_JAww.d.ts +77 -0
  38. package/dist/server.d.ts +3 -20
  39. package/dist/server.js +3 -2
  40. package/dist/set-cookie-2as_DbHe.js +75 -0
  41. package/dist/shared-DnpgYiLF.js +15 -0
  42. package/dist/vite-COWkwxsj.js +990 -0
  43. package/dist/vite.d.ts +34 -10
  44. package/dist/vite.js +2 -995
  45. package/dist/vue.d.ts +55 -0
  46. package/dist/vue.js +112 -0
  47. package/package.json +92 -17
  48. package/dist/server-Diw3mAbX.js +0 -322
  49. package/dist/shared-QSYBHaMG.js +0 -12
  50. package/dist/types-B0fg9XFd.d.ts +0 -106
package/dist/vite.d.ts CHANGED
@@ -1,22 +1,46 @@
1
- import { f as AuthModuleOptions, j as ResolvedAuthViteConfig } from "./types-B0fg9XFd.js";
1
+ /// <reference path="./host-declarations.d.ts" />
2
+ import { n as ViteHubCliPluginMetadata } from "./cli-mgXvsBtA.js";
3
+ import { F as AuthModuleOptions, ct as ResolvedAuthViteConfig } from "./events-BkmK2dFY.js";
4
+ import { n as ViteHubDefinitionSummary, r as ViteHubInspectionPluginMetadata } from "./inspect-DPtsW8dB.js";
2
5
  import { Plugin } from "vite";
3
-
6
+ //#region src/config.d.ts
7
+ export declare function resolveAuthViteConfig(options?: AuthModuleOptions, rootDir?: string, discovery?: {
8
+ serverDirs?: string[];
9
+ }): ResolvedAuthViteConfig | undefined;
10
+ //#endregion
4
11
  //#region src/vite.d.ts
5
- declare const AUTH_DEFINITION_ID = "#vitehub/auth/definition";
6
- declare const AUTH_SERVER_ID = "#vitehub/auth/server";
7
- declare const AUTH_VITE_PLUGIN_NAME = "@vite-hub/auth/vite";
8
- interface AuthVitePluginAPI {
12
+ export declare function shouldPassThroughAuthResponse(basePath: string, status: number): boolean;
13
+ export declare const AUTH_DEFINITION_ID = "#vitehub/auth/definition";
14
+ export declare const AUTH_SERVER_ID = "#vitehub/auth/server";
15
+ export declare const AUTH_VITE_PLUGIN_NAME = "@vite-hub/auth/vite";
16
+ export interface AuthVitePluginAPI {
9
17
  getConfig: () => ResolvedAuthViteConfig | undefined;
10
18
  refresh: () => ResolvedAuthViteConfig | undefined;
11
19
  }
12
- type AuthVitePlugin = Plugin & {
20
+ export type AuthVitePlugin = Plugin & {
13
21
  api: AuthVitePluginAPI;
22
+ vitehub: ViteHubInspectionPluginMetadata & ViteHubCliPluginMetadata;
14
23
  };
15
- declare function hubAuth(options?: AuthModuleOptions): AuthVitePlugin;
24
+ export interface AuthInspectionOptions {
25
+ projectRoot: string;
26
+ rootDir: string;
27
+ serverDirs?: string[];
28
+ }
29
+ /** Lists the Auth Definition as a serializable inspection summary. */
30
+ export declare function inspectAuthDefinitions(options: AuthInspectionOptions): ViteHubDefinitionSummary[];
31
+ export declare function createAuthNitroConfig(plugin: AuthVitePlugin, options: {
32
+ nitro: Record<string, unknown>;
33
+ projectRoot: string;
34
+ serverDirs?: string[];
35
+ viteAuth?: AuthModuleOptions;
36
+ }): Record<string, unknown>;
37
+ interface InternalAuthModuleOptions {
38
+ importBase?: string;
39
+ }
40
+ export declare function hubAuth(options?: AuthModuleOptions, internalOptions?: InternalAuthModuleOptions): AuthVitePlugin;
16
41
  declare module "vite" {
17
42
  interface UserConfig {
18
43
  auth?: AuthModuleOptions;
19
44
  }
20
45
  }
21
- //#endregion
22
- export { AUTH_DEFINITION_ID, AUTH_SERVER_ID, AUTH_VITE_PLUGIN_NAME, AuthVitePlugin, AuthVitePluginAPI, hubAuth };
46
+ //#endregion