@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.
- package/LICENSE +201 -0
- package/README.md +213 -41
- package/dist/agent.d.ts +25 -13
- package/dist/agent.js +19 -5
- package/dist/application-path-C290OAIs.js +18 -0
- package/dist/cli-mgXvsBtA.d.ts +85 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +68 -0
- package/dist/console-B7eERmGv.d.ts +180 -0
- package/dist/console-runtime-bZQtnX2Y.d.ts +39 -0
- package/dist/console-runtime.d.ts +3 -0
- package/dist/console-runtime.js +819 -0
- package/dist/console-types-CmmnKGMx.js +38 -0
- package/dist/console.d.ts +7 -0
- package/dist/console.js +15 -0
- package/dist/error-diagnostics-CL0yjHiM.js +79 -0
- package/dist/events-BkmK2dFY.d.ts +486 -0
- package/dist/events-P7mI4IQb.js +196 -0
- package/dist/events-config-CjcFOhTE.js +177 -0
- package/dist/host-declarations.d.ts +17 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +40 -28
- package/dist/inspect-DPtsW8dB.d.ts +36 -0
- package/dist/nuxt.d.ts +59 -0
- package/dist/nuxt.js +93 -0
- package/dist/presets-BGZi6Dfu.d.ts +25 -0
- package/dist/presets.d.ts +2 -0
- package/dist/presets.js +32 -0
- package/dist/runtime/console.d.ts +7 -0
- package/dist/runtime/console.js +42 -0
- package/dist/runtime/empty-definition.d.ts +1 -2
- package/dist/runtime/nuxt.d.ts +3 -0
- package/dist/runtime/nuxt.js +9 -0
- package/dist/runtime/vue-nuxt.d.ts +3 -0
- package/dist/runtime/vue-nuxt.js +8 -0
- package/dist/server-B7LU19dS.js +1730 -0
- package/dist/server-CTD_JAww.d.ts +77 -0
- package/dist/server.d.ts +3 -20
- package/dist/server.js +3 -2
- package/dist/set-cookie-2as_DbHe.js +75 -0
- package/dist/shared-DnpgYiLF.js +15 -0
- package/dist/vite-COWkwxsj.js +990 -0
- package/dist/vite.d.ts +34 -10
- package/dist/vite.js +2 -995
- package/dist/vue.d.ts +55 -0
- package/dist/vue.js +112 -0
- package/package.json +92 -17
- package/dist/server-Diw3mAbX.js +0 -322
- package/dist/shared-QSYBHaMG.js +0 -12
- package/dist/types-B0fg9XFd.d.ts +0 -106
package/dist/vite.d.ts
CHANGED
|
@@ -1,22 +1,46 @@
|
|
|
1
|
-
|
|
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
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
|
|
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
|
-
|
|
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
|