diff --git a/package.json b/package.json index e361de329833269fd8f5f402a18821ee873a9248..5730653df83dc51560b4e421e4a8aa3be8e17520 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arise/aidc-sveltekit", - "version": "0.0.8", + "version": "0.0.9", "type": "module", "scripts": { "dev": "vite dev", @@ -20,6 +20,10 @@ ".": { "types": "./dist/index.d.ts", "svelte": "./dist/index.js" + }, + "./public": { + "types": "./dist/public.d.ts", + "svelte": "./dist/public.js" } }, "files": [ diff --git a/src/lib/app.d.ts b/src/app.d.ts similarity index 100% rename from src/lib/app.d.ts rename to src/app.d.ts diff --git a/src/lib/index.ts b/src/lib/index.ts index e261e2e10daa39a154448e3576c2aad56607ea9a..8ea634a14e9b84a0410a61e62042a64a6ea3b735 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -5,9 +5,8 @@ import type { Config, InternalConfig } from "./types.js"; import * as paths from "./paths.js"; import { authCookieBuilder, tokenSetCookieBuilder } from "./cookies.js"; -export type { AuthData as AriseData, Config, Locals } from "./types.js"; export { handleBuilder as ariseIdConnectBuilder } from "./index.js"; -export * as authPaths from "./paths.js"; +export * from "./public.js"; function addBase(path: string): string { return `${base}${path}`; diff --git a/src/lib/public.ts b/src/lib/public.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b4101253e5cdd14ebf51247c7ec4381809a4a9c --- /dev/null +++ b/src/lib/public.ts @@ -0,0 +1,2 @@ +export type { AuthData as AriseData, Config } from "./types.js"; +export * as authPaths from "./paths.js"; diff --git a/src/lib/types.ts b/src/lib/types.ts index ae7f85f0bb665e85dab73cb8add7d178e13b5e5f..0995ebfc4833e8e898a60e71f0e223880c9e4016 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -17,8 +17,13 @@ export type AuthData = { error?: errors.OPError | errors.RPError; }; -export interface Locals { - arise: AuthData; +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace App { + interface Locals { + arise: AuthData; + } + } } type Paths = {