From dbc20e3c30eb723e7e5af58439a7330f36fbb30a Mon Sep 17 00:00:00 2001 From: Steel <mael.acier@ensiie.fr> Date: Mon, 11 Dec 2023 23:10:31 +0100 Subject: [PATCH] fix: readable-http-codes --- package.json | 10 +++++----- pnpm-lock.yaml | 15 +++++++-------- src/lib/env.ts | 3 --- src/lib/handlers/login.ts | 2 +- src/lib/handlers/loginCallback.ts | 2 +- src/lib/handlers/logout.ts | 2 +- src/lib/handlers/logoutCallback.ts | 2 +- 7 files changed, 16 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 8ef9c2c..438aa46 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 f914012..ad4c73d 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 1eae230..dfa9da6 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 eac6954..6735e0d 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 c213bb8..f1df019 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 bad145c..ec04f0b 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 98464b0..dd7cae4 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 }) { -- GitLab