diff --git a/package.json b/package.json index 8ef9c2c2b4c2419a981f6c91b22d74a13a216e56..438aa468d0f0330a55fbb84b62e8cb0b97793336 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "@arise/aidc-sveltekit", - "version": "0.0.4", + "version": "0.0.5", + "type": "module", "scripts": { "dev": "vite dev", "build": "vite build && npm run package", @@ -13,6 +14,8 @@ "lint": "prettier --check . && eslint .", "format": "prettier --write ." }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", @@ -52,15 +55,12 @@ "vite": "^4.4.2", "vitest": "^0.34.0" }, - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "type": "module", "dependencies": { "assert": "^2.1.0", "cookie": "^0.6.0", - "http-status": "^1.7.3", "jsonwebtoken": "^9.0.2", "openid-client": "^5.6.1", + "readable-http-codes": "^1.1.1", "zod": "^3.22.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f914012474e07294e42962a805502b8fa3dc00e1..ad4c73d7acd0c06642634ae144969ddfc196cd79 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,15 +11,15 @@ dependencies: cookie: specifier: ^0.6.0 version: 0.6.0 - http-status: - specifier: ^1.7.3 - version: 1.7.3 jsonwebtoken: specifier: ^9.0.2 version: 9.0.2 openid-client: specifier: ^5.6.1 version: 5.6.1 + readable-http-codes: + specifier: ^1.1.1 + version: 1.1.1 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1458,11 +1458,6 @@ packages: function-bind: 1.1.2 dev: false - /http-status@1.7.3: - resolution: {integrity: sha512-GS8tL1qHT2nBCMJDYMHGkkkKQLNkIAHz37vgO68XKvzv+XyqB4oh/DfmMHdtRzfqSJPj1xKG2TaELZtlCz6BEQ==} - engines: {node: '>= 0.4.0'} - dev: false - /ignore-walk@5.0.1: resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -2104,6 +2099,10 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true + /readable-http-codes@1.1.1: + resolution: {integrity: sha512-M+u7iokHWtqEXmeeLuPztJrWnS6kMvqDWEg/Ho7i1hqVv64ROJLqf0U0PHhwQJo9Q7lynj25sbDG8hljdLEfHg==} + dev: false + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} diff --git a/src/lib/env.ts b/src/lib/env.ts index 1eae2309f7ff8f9a4f4aa0541ad0381267f257c5..dfa9da617d2551981b9d3ffdfa0328791a9e07c8 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -1,5 +1,4 @@ import { ensureEnv } from "$lib/utils/env.js"; -import { ensurePublicEnv } from "$lib/utils/public_env.js"; export const env = ensureEnv([ "API_URL", @@ -9,5 +8,3 @@ export const env = ensureEnv([ "AIDC_CLIENT_SECRET", "ORIGIN", ] as const); - -export const publicEnv = ensurePublicEnv(["PUBLIC_MAPTILER_KEY"] as const); diff --git a/src/lib/handlers/login.ts b/src/lib/handlers/login.ts index eac69540d19b56c4b728a8e1504455279570e080..6735e0de2dbb66480f89a0f25bfdb17e68948ddf 100644 --- a/src/lib/handlers/login.ts +++ b/src/lib/handlers/login.ts @@ -3,7 +3,7 @@ import { generators } from "openid-client"; import { authCookie } from "$lib/cookies.js"; import type { Handle } from "@sveltejs/kit"; import type { InternalConfig } from "$lib/types.js"; -import { SEE_OTHER } from "http-status"; +import { SEE_OTHER } from "readable-http-codes"; export default function (config: InternalConfig): Handle { return async function ({ event }) { diff --git a/src/lib/handlers/loginCallback.ts b/src/lib/handlers/loginCallback.ts index c213bb820ac95d391ba04e5b520f4c4b272367f7..f1df019aa89ca1638c9f3cc86dc2324eaf01782a 100644 --- a/src/lib/handlers/loginCallback.ts +++ b/src/lib/handlers/loginCallback.ts @@ -3,7 +3,7 @@ import { authCookie, setTokenSetCookie } from "$lib/cookies.js"; import { errors } from "openid-client"; import type { InternalConfig } from "$lib/types.js"; import { base } from "$app/paths"; -import { SEE_OTHER } from "http-status"; +import { SEE_OTHER } from "readable-http-codes"; export default function (config: InternalConfig): Handle { return async function ({ event, resolve }) { diff --git a/src/lib/handlers/logout.ts b/src/lib/handlers/logout.ts index bad145c9c9c6868f4d3342ac8a825f259dfce79f..ec04f0b25a59f499d3b5c4757c6f2de804075619 100644 --- a/src/lib/handlers/logout.ts +++ b/src/lib/handlers/logout.ts @@ -1,7 +1,7 @@ import { redirect } from "@sveltejs/kit"; import type { Handle } from "@sveltejs/kit"; import type { InternalConfig } from "$lib/types.js"; -import { SEE_OTHER } from "http-status"; +import { SEE_OTHER } from "readable-http-codes"; export default function (config: InternalConfig): Handle { return async function ({ event }) { diff --git a/src/lib/handlers/logoutCallback.ts b/src/lib/handlers/logoutCallback.ts index 98464b030dede6dcb135ad15d81b7f04c859c98b..dd7cae4b150a4b222b2d4b52341845f7eba7bc81 100644 --- a/src/lib/handlers/logoutCallback.ts +++ b/src/lib/handlers/logoutCallback.ts @@ -1,7 +1,7 @@ import { type Handle, redirect } from "@sveltejs/kit"; import { tokenSetCookie } from "$lib/cookies.js"; import type { InternalConfig } from "$lib/types.js"; -import { SEE_OTHER } from "http-status"; +import { SEE_OTHER } from "readable-http-codes"; export default function (config: InternalConfig): Handle { return async function ({ event }) {