From 0352a0dcf5f05f103540a7532354ba155ef89e9d Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Thu, 2 Nov 2023 15:05:54 +1100 Subject: [PATCH 01/30] types: session types --- package-lock.json | 19 +++++-- package.json | 1 + src/config/index.js | 10 ++-- src/session/getAccessToken.js | 12 ++++- src/session/getBooleanFlag.js | 13 +++++ src/session/getFlag.js | 15 ++++++ src/session/getIdToken.js | 13 +++-- src/session/getIntegerFlag.js | 13 +++++ src/session/getOrganization.js | 10 ++++ src/session/getPermission.js | 12 +++++ src/session/getPermissions.js | 10 ++++ src/session/getStringFlag.js | 12 +++++ src/session/getUser.js | 11 ++++ src/session/getUserOrganizations.js | 10 ++++ src/session/index.js | 4 +- src/session/isAuthenticated.js | 6 +++ src/session/sessionManager.js | 78 ++++++++++++++++++++--------- src/utils/version.js | 2 +- tsconfig.json | 4 +- index.d.ts => types.d.ts | 48 ++++++++++++------ 20 files changed, 246 insertions(+), 57 deletions(-) rename index.d.ts => types.d.ts (68%) diff --git a/package-lock.json b/package-lock.json index 3b5bf8a..ea29fcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.2", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", @@ -19,6 +19,7 @@ "@babel/core": "^7.17.12", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", + "@types/cookie": "^0.5.3", "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", @@ -32,7 +33,7 @@ "typescript": "^5.1.3" }, "peerDependencies": { - "next": "^12.2.5 || ^13", + "next": "^12.2.5 || ^13 || ^14", "react": "^18.1.0", "react-dom": "^18.1.0" } @@ -1206,6 +1207,12 @@ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true }, + "node_modules/@types/cookie": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.3.tgz", + "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", + "dev": true + }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -8736,6 +8743,12 @@ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true }, + "@types/cookie": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.3.tgz", + "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", + "dev": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", diff --git a/package.json b/package.json index 2812901..ca32ec2 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@babel/core": "^7.17.12", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", + "@types/cookie": "^0.5.3", "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", diff --git a/src/config/index.js b/src/config/index.js index 7b98205..df5ee7a 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -65,11 +65,11 @@ export const config = { profile: '/oauth2/v2/user_profile' }, clientOptions: { - audience: KINDE_AUDIENCE, - authDomain: KINDE_ISSUER_URL, - clientId: KINDE_CLIENT_ID, - clientSecret: KINDE_CLIENT_SECRET, - logoutRedirectURL: KINDE_POST_LOGOUT_REDIRECT_URL, + audience: KINDE_AUDIENCE || '', + authDomain: KINDE_ISSUER_URL || '', + clientId: KINDE_CLIENT_ID || '', + clientSecret: KINDE_CLIENT_SECRET || '', + logoutRedirectURL: KINDE_POST_LOGOUT_REDIRECT_URL || '', redirectURL: `${KINDE_SITE_URL}/api/auth/kinde_callback`, frameworkVersion: version, framework: 'Next.js' diff --git a/src/session/getAccessToken.js b/src/session/getAccessToken.js index 4b83263..b61017b 100644 --- a/src/session/getAccessToken.js +++ b/src/session/getAccessToken.js @@ -1,11 +1,19 @@ import {sessionManager} from './sessionManager'; +/** + * @callback getAccessToken + * @returns {Promise} + */ + /** * - * @param {Request} [req] - * @param {Response} [res] + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] * + * @returns {getAccessToken} */ + +// @ts-ignore export const getAccessTokenFactory = (req, res) => async () => { return await sessionManager(req, res).getSessionItem('access_token_payload'); }; diff --git a/src/session/getBooleanFlag.js b/src/session/getBooleanFlag.js index 129eae8..56ffe64 100644 --- a/src/session/getBooleanFlag.js +++ b/src/session/getBooleanFlag.js @@ -1,5 +1,18 @@ import {getFlagFactory} from './getFlag'; +/** + * @callback getBooleanFlag + * @param {string} code + * @param {boolean} defaultValue + * @returns {Promise} + */ + +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getBooleanFlag} + */ export const getBooleanFlagFactory = (req, res) => async (code, defaultValue) => { try { diff --git a/src/session/getFlag.js b/src/session/getFlag.js index 1b7fc94..c5486f8 100644 --- a/src/session/getFlag.js +++ b/src/session/getFlag.js @@ -1,6 +1,20 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getFlag + * @param {string} code + * @param {boolean | number | string} defaultValue + * @param {import('../../types').KindeFlagTypeCode} flagType + * @returns {Promise} + */ + +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getFlag} + */ export const getFlagFactory = (req, res) => async (code, defaultValue, flagType) => { try { @@ -13,6 +27,7 @@ export const getFlagFactory = return flag; } catch (error) { + // @ts-ignore if (error.message.includes('no default value has been provided')) { throw error; } diff --git a/src/session/getIdToken.js b/src/session/getIdToken.js index 93ba4d7..77a907f 100644 --- a/src/session/getIdToken.js +++ b/src/session/getIdToken.js @@ -1,11 +1,18 @@ import {sessionManager} from './sessionManager'; +/** + * @callback getIdToken + * @returns {Promise} + */ + /** * - * @param {Request} [req] - * @param {Response} [res] - * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getIdToken} */ + +// @ts-ignore export const getIdTokenFactory = (req, res) => async () => { return await sessionManager(req, res).getSessionItem('id_token_payload'); }; diff --git a/src/session/getIntegerFlag.js b/src/session/getIntegerFlag.js index 15a38eb..bbf2754 100644 --- a/src/session/getIntegerFlag.js +++ b/src/session/getIntegerFlag.js @@ -1,5 +1,18 @@ import {getFlagFactory} from './getFlag'; +/** + * @callback getIntegerFlag + * @param {string} code + * @param {number} defaultValue + * @returns {Promise} + */ + +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getIntegerFlag} + */ export const getIntegerFlagFactory = (req, res) => async (code, defaultValue) => { try { diff --git a/src/session/getOrganization.js b/src/session/getOrganization.js index 8c28765..3f77cd4 100644 --- a/src/session/getOrganization.js +++ b/src/session/getOrganization.js @@ -1,6 +1,16 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getOrganization + * @returns {Promise} + */ +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getOrganization} + */ export const getOrganizationFactory = (req, res) => async () => { try { const organization = await kindeClient.getOrganization( diff --git a/src/session/getPermission.js b/src/session/getPermission.js index efc7786..fcc5f9a 100644 --- a/src/session/getPermission.js +++ b/src/session/getPermission.js @@ -1,6 +1,18 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getPermission + * @param {string} name + * @returns {Promise} + */ + +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getPermission} + */ export const getPermissionFactory = (req, res) => async (name) => { try { const permission = await kindeClient.getPermission( diff --git a/src/session/getPermissions.js b/src/session/getPermissions.js index aa8ee8c..8c01582 100644 --- a/src/session/getPermissions.js +++ b/src/session/getPermissions.js @@ -1,6 +1,16 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getPermissions + * @returns {Promise} + */ +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getPermissions} + */ export const getPermissionsFactory = (req, res) => async () => { try { const permissions = await kindeClient.getPermissions( diff --git a/src/session/getStringFlag.js b/src/session/getStringFlag.js index f31ce32..7c84815 100644 --- a/src/session/getStringFlag.js +++ b/src/session/getStringFlag.js @@ -1,5 +1,17 @@ import {getFlagFactory} from './getFlag'; +/** + * @callback getStringFlag + * @param {string} code + * @param {string} defaultValue + * @returns {Promise} + */ +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getStringFlag} + */ export const getStringFlagFactory = (req, res) => async (code, defaultValue) => { try { diff --git a/src/session/getUser.js b/src/session/getUser.js index 5814c42..c9b43fd 100644 --- a/src/session/getUser.js +++ b/src/session/getUser.js @@ -1,8 +1,19 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getUser + * @returns {Promise} + */ +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getUser} + */ export const getUserFactory = (req, res) => async () => { try { + // @ts-ignore const user = await kindeClient.getUser(sessionManager(req, res)); return user; } catch (error) { diff --git a/src/session/getUserOrganizations.js b/src/session/getUserOrganizations.js index e16f89f..2298244 100644 --- a/src/session/getUserOrganizations.js +++ b/src/session/getUserOrganizations.js @@ -1,6 +1,16 @@ import {sessionManager} from './sessionManager'; import {kindeClient} from './kindeServerClient'; +/** + * @callback getUserOrganizations + * @returns {Promise} + */ +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {getUserOrganizations} + */ export const getUserOrganizationsFactory = (req, res) => async () => { try { const userOrgs = await kindeClient.getUserOrganizations( diff --git a/src/session/index.js b/src/session/index.js index acc522d..41acd67 100644 --- a/src/session/index.js +++ b/src/session/index.js @@ -13,8 +13,8 @@ import {isAuthenticatedFactory} from './isAuthenticated'; /** * - * @param {Request} [req] - * @param {Response} [res] + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] * @returns */ export const getKindeServerSession = (req, res) => ({ diff --git a/src/session/isAuthenticated.js b/src/session/isAuthenticated.js index 1bc7104..d3f3e99 100644 --- a/src/session/isAuthenticated.js +++ b/src/session/isAuthenticated.js @@ -1,5 +1,11 @@ import {getUserFactory} from './getUser'; +/** + * + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {() => Promise} + */ export const isAuthenticatedFactory = (req, res) => async () => { const user = await getUserFactory(req, res)(); return Boolean(user); diff --git a/src/session/sessionManager.js b/src/session/sessionManager.js index d4fbf8f..90479c3 100644 --- a/src/session/sessionManager.js +++ b/src/session/sessionManager.js @@ -1,13 +1,13 @@ -import {isAppRouter} from '../utils/isAppRouter'; import {cookies} from 'next/headers'; +import {isAppRouter} from '../utils/isAppRouter'; var cookie = require('cookie'); /** * - * @param {Request} [req] - * @param {Response} [res] - * @returns + * @param {import('next').NextApiRequest} [req] + * @param {import('next').NextApiResponse} [res] + * @returns {import('@kinde-oss/kinde-typescript-sdk').SessionManager} */ export const sessionManager = (req, res) => { if (!req) return appRouterSessionManager(cookies()); @@ -16,11 +16,16 @@ export const sessionManager = (req, res) => { : pageRouterSessionManager(req, res); }; +/** + * + * @param {import("next/dist/server/web/spec-extension/adapters/request-cookies").ReadonlyRequestCookies} cookieStore + * @returns {import('@kinde-oss/kinde-typescript-sdk').SessionManager} + */ export const appRouterSessionManager = (cookieStore) => ({ /** * * @param {string} itemKey - * @returns {Promise} + * @returns {Promise} */ getSessionItem: (itemKey) => { const item = cookieStore.get(itemKey); @@ -30,30 +35,40 @@ export const appRouterSessionManager = (cookieStore) => ({ if (typeof jsonValue === 'object') { return jsonValue; } - return item.value; + return new Promise(() => item.value); } catch (error) { - return item.value; + return new Promise(() => item.value); } } - return undefined; + return new Promise(() => null); }, /** * * @param {string} itemKey - * @param {string | object} itemValue + * @param {any} itemValue * @returns {Promise} */ - setSessionItem: (itemKey, itemValue) => - cookieStore.set( - itemKey, - typeof itemValue === 'object' ? JSON.stringify(itemValue) : itemValue - ), + setSessionItem: (itemKey, itemValue) => { + if (itemValue !== undefined) { + cookieStore.set( + itemKey, + typeof itemValue === 'object' ? JSON.stringify(itemValue) : itemValue + ); + } + return new Promise(() => {}); + }, /** * * @param {string} itemKey * @returns {Promise} */ - removeSessionItem: (itemKey) => cookieStore.delete(itemKey), + removeSessionItem: (itemKey) => { + cookieStore.delete(itemKey); + return new Promise(() => {}); + }, + /** + * @returns {Promise} + */ destroySession: () => { [ 'id_token_payload', @@ -63,9 +78,16 @@ export const appRouterSessionManager = (cookieStore) => ({ 'user', 'refresh_token' ].forEach((name) => cookieStore.delete(name)); + return new Promise(() => {}); } }); +/** + * + * @param {import('next/types').NextApiRequest} req + * @param {import('next').NextApiResponse} [res] + * @returns {import('@kinde-oss/kinde-typescript-sdk').SessionManager} + */ export const pageRouterSessionManager = (req, res) => ({ /** * @@ -80,27 +102,27 @@ export const pageRouterSessionManager = (req, res) => ({ if (typeof jsonValue === 'object') { return jsonValue; } - return itemValue; + return new Promise(() => itemValue); } catch (error) { - return itemValue; + return new Promise(() => itemValue); } } - return undefined; + return new Promise(() => undefined); }, /** * - * @param {string} itemKey - - * @param {string | object} itemValue + * @param {string} itemKey + * @param {any} itemValue * @returns {Promise} */ setSessionItem: (itemKey, itemValue) => { - let cookies = res.getHeader('Set-Cookie') || []; + let cookies = res?.getHeader('Set-Cookie') || []; if (!Array.isArray(cookies)) { - cookies = [cookies]; + cookies = [cookies.toString()]; } - res.setHeader('Set-Cookie', [ + res?.setHeader('Set-Cookie', [ ...cookies.filter((cookie) => !cookie.startsWith(`${itemKey}=`)), cookie.serialize( itemKey, @@ -108,6 +130,8 @@ export const pageRouterSessionManager = (req, res) => ({ {path: '/'} ) ]); + + return new Promise(() => {}); }, /** * @@ -115,13 +139,15 @@ export const pageRouterSessionManager = (req, res) => ({ * @returns {Promise} */ removeSessionItem: (itemKey) => { - res.setHeader( + res?.setHeader( 'Set-Cookie', cookie.serialize(itemKey, '', {path: '/', maxAge: -1}) ); + + return new Promise(() => {}); }, destroySession: () => { - res.setHeader( + res?.setHeader( 'Set-Cookie', [ 'id_token_payload', @@ -132,5 +158,7 @@ export const pageRouterSessionManager = (req, res) => ({ 'refresh_token' ].map((name) => cookie.serialize(name, '', {path: '/', maxAge: -1})) ); + + return new Promise(() => {}); } }); diff --git a/src/utils/version.js b/src/utils/version.js index 79ab516..c993876 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.0' +export const version = '2.0.0-alpha.2' diff --git a/tsconfig.json b/tsconfig.json index 761d327..91905f2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,8 @@ // go to js file when using IDE functions like // "Go to Definition" in VSCode "declarationMap": true, - "esModuleInterop": true + "esModuleInterop": true, + "checkJs": true, + "strict": true } } diff --git a/index.d.ts b/types.d.ts similarity index 68% rename from index.d.ts rename to types.d.ts index 2417ac5..ec95644 100644 --- a/index.d.ts +++ b/types.d.ts @@ -1,33 +1,51 @@ import {ReactElement} from 'react'; -export declare function KindeProvider({ - children -}: { - children: any; -}): ReactElement; - -export declare function handleAuth(): any; +export type KindeAccessToken = { + aud: string[]; + azp: number; + iat: number; + iss: string; + jti: string; + org_code: string; + permissions: string[]; + scp: string[]; + sub: string; +}; -export declare function isTokenValid(): boolean; +export type KindeIdToken = { + at_hash: string; + aud: string[]; + auth_time: number; + azp: string; + email: string; + exp: number; + family_name: string; + given_name: string; + iat: number; + iss: string; + jti: string; + name: string; + org_codes: string[]; + sub: string; + updated_at: number; +}; -export type User = { +export type KindeUser = { id: string; - name: string | null; email: string | null; given_name: string | null; family_name: string | null; - updated_at: string | null; picture: string | null; }; export type KindePermissions = { permissions: string[]; - orgCode: string; + orgCode: string | null; }; export type KindePermission = { isGranted: boolean; - orgCode: string; + orgCode: string | null; }; export type KindeFlagTypeCode = 'b' | 'i' | 's'; @@ -43,7 +61,7 @@ export type KindeFlag = { }; export type KindeOrganization = { - orgCode: string; + orgCode: string | null; }; export type KindeOrganizations = { @@ -51,7 +69,7 @@ export type KindeOrganizations = { }; export type State = { - user: User; + user: KindeUser; isLoading: boolean; isAuthenticated: boolean; error?: string | undefined; From c2953723e19076a3ea4f1dc92f5c42279a892447 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Thu, 2 Nov 2023 15:07:36 +1100 Subject: [PATCH 02/30] types: jsdoc refresh --- src/api-client.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api-client.js b/src/api-client.js index bfc9eb6..3e58e94 100644 --- a/src/api-client.js +++ b/src/api-client.js @@ -22,8 +22,8 @@ import {isTokenValid} from './utils/pageRouter/isTokenValid'; /** * Create the Kinde Management API client - * @param {Request | NextApiRequest} [req] - optional request (required when used with pages router) - * @param {Response | NextApiResponse} [res] - optional response (required when used with pages router) + * @param {import('next').NextApiRequest} [req] - optional request (required when used with pages router) + * @param {import('next').NextApiResponse} [res] - optional response (required when used with pages router) */ export const createKindeManagementAPIClient = async (req, res) => { let apiToken = null; @@ -41,9 +41,9 @@ export const createKindeManagementAPIClient = async (req, res) => { }, body: new URLSearchParams({ grant_type: 'client_credentials', - client_id: config.clientID, - client_secret: config.clientSecret, - audience: config.audience + client_id: config.clientID || '', + client_secret: config.clientSecret || '', + audience: config.audience || '' }) }); apiToken = (await response.json()).access_token; From 1ce3e546223c3d5955bf6d19f1fd508a350d960d Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Thu, 2 Nov 2023 15:10:25 +1100 Subject: [PATCH 03/30] types: jsx component jsdoc update --- src/components/LoginLink.js | 3 +++ src/components/RegisterLink.js | 3 +++ tsconfig.json | 1 + 3 files changed, 7 insertions(+) diff --git a/src/components/LoginLink.js b/src/components/LoginLink.js index efa51bb..4dba428 100644 --- a/src/components/LoginLink.js +++ b/src/components/LoginLink.js @@ -22,6 +22,9 @@ export function LoginLink({ ...props }) { let params = new URLSearchParams(); + /** + * @type {Record} + */ let paramsObj = {}; if (orgCode != null) paramsObj.org_code = orgCode; if (postLoginRedirectURL != null) diff --git a/src/components/RegisterLink.js b/src/components/RegisterLink.js index 0453807..ec824a2 100644 --- a/src/components/RegisterLink.js +++ b/src/components/RegisterLink.js @@ -23,6 +23,9 @@ export function RegisterLink({ ...props }) { let params = new URLSearchParams(); + /** + * @type {Record} + */ let paramsObj = {}; if (orgCode != null) paramsObj.org_code = orgCode; if (postLoginRedirectURL != null) diff --git a/tsconfig.json b/tsconfig.json index 91905f2..9bfb0fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ // Change this to match your project "include": ["src/**/*"], "compilerOptions": { + "jsx": "react", // Tells TypeScript to read JS files, as // normally they are ignored as source files "allowJs": true, From 73a07f3792b6e103e2989a03a1e98d3600fd49e3 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Thu, 2 Nov 2023 17:39:37 +1100 Subject: [PATCH 04/30] types: handlers --- src/handlers/auth.js | 43 +++++++++-- src/handlers/callback.js | 10 ++- src/handlers/createOrg.js | 10 ++- src/handlers/login.js | 8 ++- src/handlers/logout.js | 8 ++- src/handlers/register.js | 8 ++- src/handlers/setup.js | 6 ++ src/routerClients/AppRouterClient.js | 32 ++++++++- src/routerClients/PagesRouterClient.js | 34 +++++++-- src/routerClients/RouterClient.js | 49 +++++++++++-- src/session/kindeServerClient.js | 1 + types.d.ts | 98 +++++++++++++++++++++----- 12 files changed, 264 insertions(+), 43 deletions(-) diff --git a/src/handlers/auth.js b/src/handlers/auth.js index 1ab5d04..72844d0 100644 --- a/src/handlers/auth.js +++ b/src/handlers/auth.js @@ -7,7 +7,12 @@ import {setup} from './setup'; import {register} from './register'; import AppRouterClient from '../routerClients/AppRouterClient'; import PagesRouterClient from '../routerClients/PagesRouterClient'; +import {NextRequest} from 'next/server'; +import RouterClient from '../routerClients/RouterClient'; +/** + * @type {Record Promise>} + */ const routeMap = { create_org: createOrg, register, @@ -17,6 +22,11 @@ const routeMap = { kinde_callback: callback }; +/** + * + * @param {string} endpoint + * @returns + */ const getRoute = (endpoint) => { return routeMap[endpoint]; }; @@ -27,21 +37,29 @@ const getRoute = (endpoint) => { export default (request, endpoint) => { // For backwards compatibility in app router if (typeof request == 'object' && typeof endpoint == 'string') { + // @ts-ignore return appRouterHandler(request, {params: {kindeAuth: endpoint}}); } /** * - * @param {Request} [req] - * @param {Response} [res] - * @returns {Response} + * @param {import('next').NextApiRequest | Request} req + * @param {import('next').NextApiResponse | Response} res */ return async function handler(req, res) { return isAppRouter(req) - ? appRouterHandler(req, res) - : pagesRouterHandler(req, res); + ? // @ts-ignore + appRouterHandler(req, res) + : // @ts-ignore + pagesRouterHandler(req, res); }; }; +/** + * + * @param {NextRequest} req + * @param {{params: {kindeAuth: string}}} res + * @returns + */ const appRouterHandler = async (req, res) => { const {params} = res; let endpoint = params.kindeAuth; @@ -49,17 +67,28 @@ const appRouterHandler = async (req, res) => { const route = getRoute(endpoint); return route - ? await route(new AppRouterClient(req, res)) + ? // @ts-ignore + await route(new AppRouterClient(req, res)) : new Response('This page could not be found.', {status: 404}); }; +/** + * + * @param {import('next').NextApiRequest} req + * @param {import('next').NextApiResponse} res + * @returns + */ const pagesRouterHandler = async (req, res) => { let { query: {kindeAuth: endpoint} } = req; endpoint = Array.isArray(endpoint) ? endpoint[0] : endpoint; + if (!endpoint) { + throw Error('Please check your Kinde setup'); + } const route = getRoute(endpoint); return route - ? await route(new PagesRouterClient(req, res)) + ? // @ts-ignore + await route(new PagesRouterClient(req, res)) : res.status(404).end(); }; diff --git a/src/handlers/callback.js b/src/handlers/callback.js index c7a97b4..7c8c4e5 100644 --- a/src/handlers/callback.js +++ b/src/handlers/callback.js @@ -1,8 +1,13 @@ import {config} from '../config/index'; +import RouterClient from '../routerClients/RouterClient'; +/** + * + * @param {RouterClient} routerClient + */ export const callback = async (routerClient) => { const postLoginRedirectURLFromMemory = - routerClient.sessionManager.getSessionItem('post_login_redirect_url'); + await routerClient.sessionManager.getSessionItem('post_login_redirect_url'); if (postLoginRedirectURLFromMemory) { routerClient.sessionManager.removeSessionItem('post_login_redirect_url'); @@ -17,5 +22,6 @@ export const callback = async (routerClient) => { routerClient.getUrl() ); - routerClient.redirect(postLoginRedirectURL); + if (typeof postLoginRedirectURL === 'string') + routerClient.redirect(postLoginRedirectURL); }; diff --git a/src/handlers/createOrg.js b/src/handlers/createOrg.js index 919a947..bf2a30b 100644 --- a/src/handlers/createOrg.js +++ b/src/handlers/createOrg.js @@ -1,7 +1,13 @@ +import RouterClient from '../routerClients/RouterClient'; + +/** + * + * @param {RouterClient} routerClient + */ export const createOrg = async (routerClient) => { const org_name = routerClient.getSearchParam('org_name'); const options = { - org_name, + org_name: org_name ?? undefined, is_create_org: true }; @@ -10,5 +16,5 @@ export const createOrg = async (routerClient) => { options ); - routerClient.redirect(authUrl); + routerClient.redirect(authUrl.toString()); }; diff --git a/src/handlers/login.js b/src/handlers/login.js index 48e1d7e..ec03ece 100644 --- a/src/handlers/login.js +++ b/src/handlers/login.js @@ -1,3 +1,9 @@ +import RouterClient from '../routerClients/RouterClient'; + +/** + * + * @param {RouterClient} routerClient + */ export const login = async (routerClient) => { const authUrl = await routerClient.kindeClient.login( routerClient.sessionManager, @@ -17,5 +23,5 @@ export const login = async (routerClient) => { ); } - routerClient.redirect(authUrl); + routerClient.redirect(authUrl.toString()); }; diff --git a/src/handlers/logout.js b/src/handlers/logout.js index c36707f..4b9c076 100644 --- a/src/handlers/logout.js +++ b/src/handlers/logout.js @@ -1,7 +1,13 @@ +import RouterClient from '../routerClients/RouterClient'; + +/** + * + * @param {RouterClient} routerClient + */ export const logout = async (routerClient) => { const authUrl = await routerClient.kindeClient.logout( routerClient.sessionManager ); - routerClient.redirect(authUrl); + routerClient.redirect(authUrl.toString()); }; diff --git a/src/handlers/register.js b/src/handlers/register.js index 0ca2334..c36fabf 100644 --- a/src/handlers/register.js +++ b/src/handlers/register.js @@ -1,3 +1,9 @@ +import RouterClient from '../routerClients/RouterClient'; + +/** + * + * @param {RouterClient} routerClient + */ export const register = async (routerClient) => { const authUrl = await routerClient.kindeClient.register( routerClient.sessionManager, @@ -17,5 +23,5 @@ export const register = async (routerClient) => { ); } - routerClient.redirect(authUrl); + routerClient.redirect(authUrl.toString()); }; diff --git a/src/handlers/setup.js b/src/handlers/setup.js index 454d5c6..e0ecae5 100644 --- a/src/handlers/setup.js +++ b/src/handlers/setup.js @@ -1,3 +1,9 @@ +import RouterClient from '../routerClients/RouterClient'; + +/** + * + * @param {RouterClient} routerClient + */ export const setup = async (routerClient) => { const user = await routerClient.sessionManager.getSessionItem('user'); if (user) { diff --git a/src/routerClients/AppRouterClient.js b/src/routerClients/AppRouterClient.js index f557a81..8e56194 100644 --- a/src/routerClients/AppRouterClient.js +++ b/src/routerClients/AppRouterClient.js @@ -1,12 +1,20 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {cookies} from 'next/headers'; import {redirect} from 'next/navigation'; -import {NextResponse} from 'next/server'; +import {NextRequest, NextResponse} from 'next/server'; import {config} from '../config/index'; import {appRouterSessionManager} from '../session/sessionManager'; +import RouterClient from './RouterClient'; -export default class AppRouterClient { +// @ts-ignore +export default class AppRouterClient extends RouterClient { + /** + * + * @param {NextRequest} req + * @param {*} res + */ constructor(req, res) { + super(); this.kindeClient = createKindeServerClient( config.grantType, config.clientOptions @@ -17,14 +25,29 @@ export default class AppRouterClient { this.searchParams = req.nextUrl.searchParams; } + /** + * + * @param {string} url + * @returns + */ redirect(url) { return redirect(url); } + /** + * + * @returns {URL} + */ getUrl() { return this.url; } + /** + * + * @param {object} data + * @param {{status: number}} status + * @returns + */ json(data, status) { return NextResponse.json(data, status); } @@ -33,6 +56,11 @@ export default class AppRouterClient { return NextResponse.error; } + /** + * + * @param {string} key + * @returns + */ getSearchParam(key) { return this.req.nextUrl.searchParams.get(key); } diff --git a/src/routerClients/PagesRouterClient.js b/src/routerClients/PagesRouterClient.js index b10e2d1..f9c64e7 100644 --- a/src/routerClients/PagesRouterClient.js +++ b/src/routerClients/PagesRouterClient.js @@ -1,13 +1,22 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {config} from '../config/index'; import {sessionManager} from '../session/sessionManager'; +import RouterClient from './RouterClient'; -export default class PagesRouterClient { +// @ts-ignore +export default class PagesRouterClient extends RouterClient { + /** + * + * @param {import('next').NextApiRequest} req + * @param {import('next').NextApiResponse} res + */ constructor(req, res) { + super(); this.kindeClient = createKindeServerClient( config.grantType, config.clientOptions ); + // @ts-ignore this.url = new URL(config.redirectURL + req.url); this.res = res; this.req = req; @@ -15,18 +24,33 @@ export default class PagesRouterClient { this.sessionManager = sessionManager(req, res); } + /** + * + * @param {string} url + * @returns + */ redirect(url) { - return this.res.redirect(url.href ? url.href : url); + return this.res.redirect(url); } getUrl() { return this.url; } - - json(data, status = 200) { - return this.res.status(status).json(data); + /** + * + * @param {object} data + * @param {{status: number}} status + * @returns + */ + json(data, status) { + return this.res.status(status.status).json(data); } + /** + * + * @param {string} key + * @returns {string | null} + */ getSearchParam(key) { return this.url.searchParams.get(key); } diff --git a/src/routerClients/RouterClient.js b/src/routerClients/RouterClient.js index 26d8095..5a7a9bf 100644 --- a/src/routerClients/RouterClient.js +++ b/src/routerClients/RouterClient.js @@ -1,15 +1,41 @@ -export default class AppRouterClient { +import {GrantType} from '@kinde-oss/kinde-typescript-sdk'; +import {NextResponse} from 'next/server'; + +export default class RouterClient { constructor() { - if (this.constructor == AppRouterClient) { + if (this.constructor == RouterClient) { throw new Error("Abstract classes can't be instantiated."); } + /** @type {import('../../types').KindeClient} */ + this.kindeClient; + /** @type {URL} */ + this.url; + /** @type {import('@kinde-oss/kinde-typescript-sdk').SessionManager} */ + this.sessionManager; + /** @type {import('next').NextApiResponse | *} */ + this.res; + /** @type {import('next').NextApiRequest | NextResponse | *} */ + this.req; + /** @type {URLSearchParams} */ + this.searchParams; } - redirect() { + /** + * + * @param {string} url + * @returns + */ + redirect(url) { throw new Error("Method 'redirect()' must be implemented."); } - json() { + /** + * + * @param {object} data + * @param {{status: number}} [status] + * @returns + */ + json(data, status) { throw new Error("Method 'json()' must be implemented."); } @@ -17,7 +43,20 @@ export default class AppRouterClient { throw new Error("Method 'error()' must be implemented."); } - getSearchParam() { + /** + * + * @returns {URL} + */ + getUrl() { + throw new Error("Method 'getUrl()' must be implemented."); + } + + /** + * + * @param {string} key + * @returns {string | null} + */ + getSearchParam(key) { throw new Error("Method 'getSearchParam()' must be implemented."); } } diff --git a/src/session/kindeServerClient.js b/src/session/kindeServerClient.js index 39c4241..d74616b 100644 --- a/src/session/kindeServerClient.js +++ b/src/session/kindeServerClient.js @@ -1,6 +1,7 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {config} from '../config/index'; +/** @type {import('../../types').KindeClient} */ export const kindeClient = createKindeServerClient( config.grantType, config.clientOptions diff --git a/types.d.ts b/types.d.ts index ec95644..fb28a3b 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,3 +1,13 @@ +import { + ClaimTokenType, + CreateOrgURLOptions, + FlagType, + GetFlagType, + LoginURLOptions, + RegisterURLOptions, + SessionManager, + UserType +} from '@kinde-oss/kinde-typescript-sdk'; import {ReactElement} from 'react'; export type KindeAccessToken = { @@ -68,23 +78,77 @@ export type KindeOrganizations = { orgCodes: string[]; }; -export type State = { - user: KindeUser; - isLoading: boolean; - isAuthenticated: boolean; - error?: string | undefined; - getToken: () => string | undefined; - getClaim: (claim: string, tokenKey?: string) => any; +export type KindeClient = { + handleRedirectToApp: ( + sessionManager: SessionManager, + callbackURL: URL + ) => Promise; + isAuthenticated: (sessionManager: SessionManager) => Promise; + getUserProfile: (sessionManager: SessionManager) => Promise; + createOrg: ( + sessionManager: SessionManager, + options?: CreateOrgURLOptions + ) => Promise; + getToken: (sessionManager: SessionManager) => Promise; + register: ( + sessionManager: SessionManager, + options?: RegisterURLOptions + ) => Promise; + getUser: (sessionManager: SessionManager) => Promise; + logout: (sessionManager: SessionManager) => Promise; + login: ( + sessionManager: SessionManager, + options?: LoginURLOptions + ) => Promise; + getUserOrganizations: (sessionManager: SessionManager) => Promise<{ + orgCodes: string[]; + }>; + getOrganization: (sessionManager: SessionManager) => Promise<{ + orgCode: string | null; + }>; + getBooleanFlag: ( + sessionManager: SessionManager, + code: string, + defaultValue?: boolean | undefined + ) => Promise; + getIntegerFlag: ( + sessionManager: SessionManager, + code: string, + defaultValue?: number | undefined + ) => Promise; + getPermissions: (sessionManager: SessionManager) => Promise<{ + permissions: string[]; + orgCode: string | null; + }>; + getPermission: ( + sessionManager: SessionManager, + name: string + ) => Promise<{ + orgCode: string | null; + isGranted: boolean; + }>; + getClaimValue: ( + sessionManager: SessionManager, + claim: string, + type?: ClaimTokenType + ) => Promise; + getStringFlag: ( + sessionManager: SessionManager, + code: string, + defaultValue?: string | undefined + ) => Promise; + getClaim: ( + sessionManager: SessionManager, + claim: string, + type?: ClaimTokenType + ) => Promise<{ + name: string; + value: unknown; + }>; getFlag: ( + sessionManager: SessionManager, code: string, - defaultValue?: string | boolean | number, - flagType?: KindeFlagTypeCode - ) => KindeFlag; - getBooleanFlag: (code: string, defaultValue?: boolean) => boolean; - getStringFlag: (code, defaultValue) => string; - getIntegerFlag: (code, defaultValue) => number; - getPermissions: () => KindePermissions; - getPermission: (key: string) => KindePermission; - getOrganization: () => KindeOrganization; - getUserOrganizations: () => KindeOrganizations; + defaultValue?: string | number | boolean | undefined, + type?: keyof FlagType | undefined + ) => Promise; }; From cdffc62069293fa647f30d0f431a5147a6757180 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Thu, 2 Nov 2023 21:26:54 +1100 Subject: [PATCH 05/30] types: client update --- src/frontend/KindeBrowserClient.js | 78 +++++++++++++++++++++++++----- src/session/kindeServerClient.js | 1 + 2 files changed, 68 insertions(+), 11 deletions(-) diff --git a/src/frontend/KindeBrowserClient.js b/src/frontend/KindeBrowserClient.js index 44c111d..c2c5630 100644 --- a/src/frontend/KindeBrowserClient.js +++ b/src/frontend/KindeBrowserClient.js @@ -1,10 +1,6 @@ import {useEffect, useState} from 'react'; import {flagDataTypeMap} from './AuthProvider.jsx'; -/** - * - * @returns {import('./AuthProvider').State} - */ export const useKindeBrowserClient = () => { const [state, setState] = useState({ accessToken: null, @@ -36,8 +32,17 @@ export const useKindeBrowserClient = () => { fetchData(); }, []); + /** + * + * @param {string} code + * @param {string | number | boolean} defaultValue + * @param {import('../../types.js').KindeFlagTypeCode} flagType + * @returns {import('../../types.js').KindeFlag} + */ const getFlag = (code, defaultValue, flagType) => { + // @ts-ignore const flags = state.featureFlags || []; + // @ts-ignore const flag = flags && flags[code] ? flags[code] : {}; if (flag == {} && defaultValue == undefined) { @@ -48,6 +53,7 @@ export const useKindeBrowserClient = () => { if (flagType && flag.t && flagType !== flag.t) { throw Error( + // @ts-ignore `Flag ${code} is of type ${flagDataTypeMap[flag.t]} - requested type ${ flagDataTypeMap[flagType] }` @@ -55,12 +61,20 @@ export const useKindeBrowserClient = () => { } return { code, + // @ts-ignore type: flagDataTypeMap[flag.t || flagType], value: flag.v == null ? defaultValue : flag.v, - is_default: flag.v == null + is_default: flag.v == null, + defaultValue: defaultValue }; }; + /** + * + * @param {string} code + * @param {boolean} defaultValue + * @returns {boolean | undefined} + */ const getBooleanFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 'b'); @@ -70,6 +84,12 @@ export const useKindeBrowserClient = () => { } }; + /** + * + * @param {string} code + * @param {string} defaultValue + * @returns {string | undefined} + */ const getStringFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 's'); @@ -79,6 +99,12 @@ export const useKindeBrowserClient = () => { } }; + /** + * + * @param {string} code + * @param {number} defaultValue + * @returns {number | undefined} + */ const getIntegerFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 'i'); @@ -88,40 +114,70 @@ export const useKindeBrowserClient = () => { } }; + /** + * + * @param {string} claim + * @param {"access_token" | "id_token"} tokenKey + * @returns + */ const getClaim = (claim, tokenKey = 'access_token') => { const token = tokenKey === 'access_token' ? state.accessToken : state.idToken; return token ? {name: claim, value: token[claim]} : null; }; + /** + * @returns {import('../../types.js').KindeAccessToken | null} + */ const getAccessToken = () => { return state.accessToken; }; + /** + * @returns {string | null} + */ const getToken = () => { return state.accessTokenEncoded; }; + /** + * @returns {import('../../types.js').KindeIdToken | null} + */ const getIdToken = () => { return state.idToken; }; + /** + * @returns {import('../../types.js').KindeOrganization | null} + */ const getOrganization = () => { return state.organization; }; + /** + * @returns {import('../../types.js').KindePermissions | never[]} + */ const getPermissions = () => { return state.permissions; }; + /** + * @returns {import('../../types.js').KindeOrganizations | never[]} + */ const getUserOrganizations = () => { return state.userOrganizations; }; + /** + * + * @param {string} key + * @returns {import('../../types.js').KindePermission} + */ + const getPermission = (key) => { + return { + isGranted: state.permissions.some((p) => p === key), + orgCode: state.organization + }; + }; return { ...state, isAuthenticated: !!state.user, - getPermission: (key) => { - return { - isGranted: state.permissions.some((p) => p === key), - orgCode: state.organization - }; - }, + getPermission, getBooleanFlag, getIntegerFlag, getFlag, diff --git a/src/session/kindeServerClient.js b/src/session/kindeServerClient.js index d74616b..ae14d5f 100644 --- a/src/session/kindeServerClient.js +++ b/src/session/kindeServerClient.js @@ -2,6 +2,7 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {config} from '../config/index'; /** @type {import('../../types').KindeClient} */ +// @ts-ignore export const kindeClient = createKindeServerClient( config.grantType, config.clientOptions From 35185214bbda2fa3f1659703b38f0978a1d687b1 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 3 Nov 2023 10:10:44 +1100 Subject: [PATCH 06/30] types: auth provider --- src/config/index.js | 35 +++-- src/frontend/AuthProvider.jsx | 258 +++++++++++----------------------- tsconfig.json | 8 +- types.d.ts | 75 ++++++++-- 4 files changed, 174 insertions(+), 202 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index df5ee7a..c34e563 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,22 +1,31 @@ import {GrantType} from '@kinde-oss/kinde-typescript-sdk'; import {version} from '../utils/version'; +/** + * @type {import('../../types').KindeState} + */ const initialState = { - user: null, - isLoading: true, - checkSession: null, accessToken: null, - getClaim: null, - getFlag: null, - getToken: null, - getBooleanFlag: null, - getStringFlag: null, - getIntegerFlag: null, - getPermission: null, - getPermissions: null, - permissions: null, + idToken: null, + isAuthenticated: false, + isLoading: true, organization: null, - userOrganizations: null + permissions: [], + user: null, + userOrganiaztions: [], + getAccessToken: () => null, + getBooleanFlag: () => null, + getClaim: () => null, + getFlag: () => null, + getIdToken: () => null, + getIntegerFlag: () => null, + getOrganization: () => null, + getPermission: () => null, + getPermissions: () => [], + getStringFlag: () => null, + getToken: () => null, + getUser: () => null, + getUserOrganizations: () => null }; const SESSION_PREFIX = 'pkce-verifier'; diff --git a/src/frontend/AuthProvider.jsx b/src/frontend/AuthProvider.jsx index db1d9a7..a6b1093 100644 --- a/src/frontend/AuthProvider.jsx +++ b/src/frontend/AuthProvider.jsx @@ -7,6 +7,8 @@ import React, { } from 'react'; import {config} from '../config/index'; + +/** @type {Record} */ export const flagDataTypeMap = { s: 'string', i: 'integer', @@ -18,181 +20,35 @@ const handleError = () => { 'Oops! Seems like you forgot to wrap your app in .' ); }; -/** - * @typedef {Object} AccessToken - * @property {[string]} aud - * @property {number} azp - * @property {number} iat - * @property {string} iss - * @property {string} jti - * @property {string} org_code - * @property {[string]} permissions - * @property {[string]} scp - * @property {string} sub - */ - -/** - * @typedef {Object} IdToken - * @property {string} at_hash - * @property {[string]} aud - * @property {number} auth_time - * @property {string} azp - * @property {string} email - * @property {number} exp - * @property {string} family_name - * @property {string} given_name - * @property {number} iat - * @property {string} iss - * @property {string} jti - * @property {string} name - * @property {[string]} org_codes - * @property {string} sub - * @property {number} updated_at - */ - -/** - * @typedef {Object} KindeUser - * @property {string | null} family_name - User's family name - * @property {string | null} given_name - User's given name - * @property {string | null} picture - URL to user's picture - * @property {string | null} email - User's email - * @property {string | null} id - User's Kinde ID - */ - -/** - * @callback getClaim - * @param {string} claim - Property in a token object - * @param {"access_token" | "id_token"} [tokenKey] - Determines which token to get the claim from - * @returns {{name: string, value: string} | null} - */ - -/** - * @callback getFlag - * @param {string} code - The flag's code on Kinde - * @param {string | number | boolean} defaultValue - Default value if the flag cannot be found - * @param {"b" | "i" | "s"} flagType - The flag's type - * @returns {{code: string, type: string, value: string | number | boolean, is_default: boolean}} - */ - -/** - * @callback getBooleanFlag - * @param {string} code - The flag's code on Kinde - * @param {boolean} defaultValue - Fallback boolean value if the flag cannot be found - * @returns {boolean} - */ - -/** - * @callback getIntegerFlag - * @param {string} code - The flag's code on Kinde - * @param {number} defaultValue - Fallback integer value if the flag cannot be found - * @returns {number} - */ -/** - * @callback getStringFlag - * @param {string} code - The flag's code on Kinde - * @param {string} defaultValue - Fallback string value if the flag cannot be found - * @returns {string} - */ - -/** - * @callback getPermission - * @param {string} key - The permission's key on Kinde - * @return {{isGranted: boolean, orgCode: string}} - */ - -/** - * @callback getAccessToken - * @return {AccessToken} - */ - -/** - * @callback getToken - * @return {string | null} - */ - -/** - * @callback getIdToken - * @return {IdToken} - */ - -/** - * @callback getPermissions - * @return {[string] | null} - */ - -/** - * @callback getOrganization - * @return {string | null} - */ - -/** - * @callback getUserOrganzations - * @return {[string] | null} - */ - -/** - * @typedef {Object} State - * @property {AccessToken | null} accessToken - Kinde access token - * @property {IdToken | null} idToken - Kinde id token - * @property {string | null} [error] - * @property {boolean | null} isAuthenticated - * @property {boolean | null} isLoading - * @property {string | null} organization - The organization that the current user is logged in to - * @property {[string] | null} permissions - The current user's permissions - * @property {KindeUser | null} user - Kinde user - * @property {[string] | null} userOrganizations - Organizations that the current user belongs to - * @property {getBooleanFlag} getBooleanFlag - * @property {getClaim} getClaim - * @property {getFlag} getFlag - * @property {getIntegerFlag} getIntegerFlag - * @property {getPermission} getPermission - * @property {getStringFlag} getStringFlag - * @property {getAccessToken} getAccessToken - * @property {getToken} getToken - * @property {getPermissions} getPermissions - * @property {getOrganization} getOrganization - * @property {getUserOrganzations} getUserOrganzations - * @property {getIdToken} getIdToken - */ - -/** - * @typedef {Object} KindeFlag - * @property {string} code - * @property {string} type - * @property {string | boolean | number} value - * @property {boolean} is_default - */ - -/** - * @returns {React.Context} - */ const AuthContext = createContext({ - ...config.initialState, - user: handleError, - isLoading: handleError, - getToken: handleError + ...config.initialState }); /** * - * @returns {State} + * @returns {import('../../types').KindeState} */ export const useKindeAuth = () => useContext(AuthContext); +/** + * + * @param {string} url + * @returns {Promise} + */ const tokenFetcher = async (url) => { let response; try { response = await fetch(url); } catch { - throw new RequestError(0); + throw new Error('Failed to fetch token'); } if (response.ok) { const json = await response.json(); return json; } else if (response.status === 401) { - return; + throw new Error('Failed to fetch token'); } }; @@ -213,30 +69,46 @@ export const KindeProvider = ({children}) => { try { const tokens = await tokenFetcher(setupUrl); + if (tokens == undefined) return; + const { - user, - permissions, - organization, - userOrganizations, - featureFlags, accessToken, accessTokenEncoded, - idToken + featureFlags, + idToken, + organization, + permissions, + user, + userOrganizations } = tokens; - const getToken = () => accessTokenEncoded; const getAccessToken = () => accessToken; + const getToken = () => accessTokenEncoded; const getIdToken = () => idToken; const getPermissions = () => permissions; const getOrganization = () => organization; - const getUserOrganzations = () => userOrganizations; - + const getUser = () => user; + const getUserOrganizations = () => userOrganizations; + + /** + * + * @param {string} claim + * @param {"access_token" | "id_token"} tokenKey + */ const getClaim = (claim, tokenKey = 'access_token') => { const token = - tokenKey === 'access_token' ? tokens.access_token : tokens.id_token; + tokenKey === 'access_token' ? tokens.accessToken : tokens.idToken; + // @ts-ignore return token ? {name: claim, value: token[claim]} : null; }; + /** + * + * @param {string} code + * @param {number | string | boolean} defaultValue + * @param {import('../../types').KindeFlagTypeCode} flagType + * @returns {import('../../types').KindeFlag} + */ const getFlag = (code, defaultValue, flagType) => { const flags = featureFlags; const flag = flags && flags[code] ? flags[code] : {}; @@ -247,21 +119,34 @@ export const KindeProvider = ({children}) => { ); } + // @ts-ignore if (flagType && flag.t && flagType !== flag.t) { throw Error( `Flag ${code} is of type ${ + // @ts-ignore flagDataTypeMap[flag.t] } - requested type ${flagDataTypeMap[flagType]}` ); } return { + // @ts-ignore code, + // @ts-ignore type: flagDataTypeMap[flag.t || flagType], + // @ts-ignore value: flag.v == null ? defaultValue : flag.v, - is_default: flag.v == null + // @ts-ignore + is_default: flag.v == null, + defaultValue: defaultValue }; }; + /** + * + * @param {string} code + * @param {boolean} defaultValue + * @returns {boolean | undefined | null} + */ const getBooleanFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 'b'); @@ -271,6 +156,12 @@ export const KindeProvider = ({children}) => { } }; + /** + * + * @param {string} code + * @param {string} defaultValue + * @returns {string | undefined | null} + */ const getStringFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 's'); @@ -280,6 +171,12 @@ export const KindeProvider = ({children}) => { } }; + /** + * + * @param {string} code + * @param {number} defaultValue + * @returns {number | undefined | null} + */ const getIntegerFlag = (code, defaultValue) => { try { const flag = getFlag(code, defaultValue, 'i'); @@ -289,37 +186,44 @@ export const KindeProvider = ({children}) => { } }; + /** + * + * @param {string} key + * @returns {import('../../types').KindePermission} + */ const getPermission = (key) => { return { - isGranted: permissions.some((p) => p === key), - orgCode: organization + isGranted: permissions.permissions.some((p) => p === key), + orgCode: organization.orgCode }; }; setState((previous) => ({ ...previous, - user, accessToken, idToken, - permissions, + isLoading: false, organization, + permissions, + user, userOrganizations, getAccessToken, - getToken, + getBooleanFlag, getClaim, getFlag, getIdToken, - getBooleanFlag, - getStringFlag, getIntegerFlag, getOrganization, getPermission, getPermissions, - getUserOrganzations, - error: undefined + getStringFlag, + getToken, + getUser, + getUserOrganizations })); } catch (error) { - setState((previous) => ({...previous, isLoading: false, error})); + // @ts-ignore + setState((previous) => ({...previous, isLoading: false, error: error})); } }, [setupUrl]); @@ -353,7 +257,7 @@ export const KindeProvider = ({children}) => { getOrganization, getPermission, getPermissions, - getUserOrganzations, + getUserOrganozations, permissions, organization, userOrganizations, diff --git a/tsconfig.json b/tsconfig.json index 9bfb0fd..b12c1b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ // Change this to match your project "include": ["src/**/*"], "compilerOptions": { - "jsx": "react", + // "jsx": "react", // Tells TypeScript to read JS files, as // normally they are ignored as source files "allowJs": true, @@ -18,8 +18,8 @@ // go to js file when using IDE functions like // "Go to Definition" in VSCode "declarationMap": true, - "esModuleInterop": true, - "checkJs": true, - "strict": true + "esModuleInterop": true + // "checkJs": true, + // "strict": true } } diff --git a/types.d.ts b/types.d.ts index fb28a3b..781a469 100644 --- a/types.d.ts +++ b/types.d.ts @@ -8,7 +8,6 @@ import { SessionManager, UserType } from '@kinde-oss/kinde-typescript-sdk'; -import {ReactElement} from 'react'; export type KindeAccessToken = { aud: string[]; @@ -17,7 +16,7 @@ export type KindeAccessToken = { iss: string; jti: string; org_code: string; - permissions: string[]; + permissions: KindePermissions; scp: string[]; sub: string; }; @@ -58,6 +57,11 @@ export type KindePermission = { orgCode: string | null; }; +export type KindeFlagRaw = { + t: KindeFlagTypeCode; + v: string | number | boolean; +}; + export type KindeFlagTypeCode = 'b' | 'i' | 's'; export type KindeFlagTypeValue = 'boolean' | 'integer' | 'string'; @@ -100,12 +104,12 @@ export type KindeClient = { sessionManager: SessionManager, options?: LoginURLOptions ) => Promise; - getUserOrganizations: (sessionManager: SessionManager) => Promise<{ - orgCodes: string[]; - }>; - getOrganization: (sessionManager: SessionManager) => Promise<{ - orgCode: string | null; - }>; + getUserOrganizations: ( + sessionManager: SessionManager + ) => Promise; + getOrganization: ( + sessionManager: SessionManager + ) => Promise; getBooleanFlag: ( sessionManager: SessionManager, code: string, @@ -152,3 +156,58 @@ export type KindeClient = { type?: keyof FlagType | undefined ) => Promise; }; + +export type KindeState = { + accessToken: KindeAccessToken | null; + error?: string | null; + idToken: KindeIdToken | null; + isAuthenticated: boolean | null; + isLoading: boolean | null; + organization: KindeOrganization; + permissions: KindePermissions; + user: KindeUser | null; + userOrganiaztions: string[]; + getAccessToken: () => KindeAccessToken | null; + getBooleanFlag: () => boolean | null | undefined; + getClaim: ( + tokenKey?: 'access_token' | 'id_token' + ) => {name: string; value: string} | null; + getFlag: ( + code: string, + defaultValue: string | number | boolean, + flagType: KindeFlagTypeCode + ) => { + code: string; + type: string; + value: string | number | boolean; + is_default: boolean; + } | null; + getIdToken: () => KindeIdToken | null; + getIntegerFlag: ( + code: string, + defaultValue: number + ) => number | null | undefined; + getOrganization: () => KindeOrganization; + getPermission: ( + key: string + ) => {isGranted: boolean; orgCode: string | null} | null; + getPermissions: () => KindePermissions; + getStringFlag: ( + code: string, + defaultValue: string + ) => string | null | undefined; + getToken: () => string | null; + getUser: () => KindeUser | null; + getUserOrganizations: () => KindeOrganizations | null; +}; + +export type KindeSetupResponse = { + accessToken: KindeAccessToken; + accessTokenEncoded: string; + idToken: KindeIdToken; + user: KindeUser; + permissions: KindePermissions; + organization: KindeOrganization; + featureFlags: Record; + userOrganizations: KindeOrganizations; +}; From 697b150278cf3fd06e98f666a3e6cc6b0450aa45 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:03:12 +1100 Subject: [PATCH 07/30] types --- .../rollup.config.js | 0 package-lock.json | 223 +++++++++++++++++- package.json | 1 + rollup.config.js | 4 +- src/api-client.js | 4 +- src/utils/version.js | 2 +- tsconfig.json | 2 +- 7 files changed, 227 insertions(+), 9 deletions(-) rename {components => componentConfig}/rollup.config.js (100%) diff --git a/components/rollup.config.js b/componentConfig/rollup.config.js similarity index 100% rename from components/rollup.config.js rename to componentConfig/rollup.config.js diff --git a/package-lock.json b/package-lock.json index 3b5bf8a..2f6eaa3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.2", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", @@ -22,6 +22,7 @@ "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", + "dts-bundle-generator": "^8.1.2", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "genversion": "^3.1.1", @@ -32,7 +33,7 @@ "typescript": "^5.1.3" }, "peerDependencies": { - "next": "^12.2.5 || ^13", + "next": "^12.2.5 || ^13 || ^14", "react": "^18.1.0", "react-dom": "^18.1.0" } @@ -2120,6 +2121,70 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "peer": true }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -2532,6 +2597,22 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, + "node_modules/dts-bundle-generator": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-8.1.2.tgz", + "integrity": "sha512-/yvy9Xw0cfFodA8n6jEq8/COZ/WXgJtPabnLBAzIfP/TfxWbD/0a0dvfqNHneNqswQrH0kUcaAfGJC9UNvH97w==", + "dev": true, + "dependencies": { + "typescript": ">=5.0.2", + "yargs": "^17.6.0" + }, + "bin": { + "dts-bundle-generator": "dist/bin/dts-bundle-generator.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -3375,6 +3456,15 @@ "node": ">=10.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -6304,6 +6394,15 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", @@ -7859,6 +7958,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -7874,6 +7982,24 @@ "node": ">= 14" } }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -9370,6 +9496,54 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "peer": true }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -9672,6 +9846,16 @@ "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "dev": true }, + "dts-bundle-generator": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-8.1.2.tgz", + "integrity": "sha512-/yvy9Xw0cfFodA8n6jEq8/COZ/WXgJtPabnLBAzIfP/TfxWbD/0a0dvfqNHneNqswQrH0kUcaAfGJC9UNvH97w==", + "dev": true, + "requires": { + "typescript": ">=5.0.2", + "yargs": "^17.6.0" + } + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -10296,6 +10480,12 @@ "find-package": "^1.0.0" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -12362,6 +12552,12 @@ } } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, "resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", @@ -13471,6 +13667,12 @@ "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -13483,6 +13685,21 @@ "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", "dev": true }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", diff --git a/package.json b/package.json index 2812901..69b3a82 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", + "dts-bundle-generator": "^8.1.2", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "genversion": "^3.1.1", diff --git a/rollup.config.js b/rollup.config.js index f9a0f47..4f3b294 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import clientConfig from './clientConfig/rollup.config.js'; import serverConfig from './serverConfig/rollup.config.js'; -import componentsConfig from './components/rollup.config.js'; +import componentConfig from './componentConfig/rollup.config.js'; -export default [clientConfig, serverConfig, componentsConfig]; +export default [clientConfig, serverConfig, componentConfig]; diff --git a/src/api-client.js b/src/api-client.js index bfc9eb6..df35303 100644 --- a/src/api-client.js +++ b/src/api-client.js @@ -22,8 +22,8 @@ import {isTokenValid} from './utils/pageRouter/isTokenValid'; /** * Create the Kinde Management API client - * @param {Request | NextApiRequest} [req] - optional request (required when used with pages router) - * @param {Response | NextApiResponse} [res] - optional response (required when used with pages router) + * @param {Request | import('next').NextApiRequest} [req] - optional request (required when used with pages router) + * @param {Response | import('next').NextApiResponse} [res] - optional response (required when used with pages router) */ export const createKindeManagementAPIClient = async (req, res) => { let apiToken = null; diff --git a/src/utils/version.js b/src/utils/version.js index 79ab516..c993876 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.0' +export const version = '2.0.0-alpha.2' diff --git a/tsconfig.json b/tsconfig.json index 761d327..e916456 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ // Types should go into this directory. // Removing this would place the .d.ts files // next to the .js files - "outDir": "dist", + "outDir": "dist/types", // go to js file when using IDE functions like // "Go to Definition" in VSCode "declarationMap": true, From 800db5c8cdddc353b9262fe3a489cdf3fa94a526 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:19:20 +1100 Subject: [PATCH 08/30] types --- components/package.json | 2 +- package-lock.json | 675 +++++++++++++++++++++++++++++++++++++--- package.json | 6 +- server/package.json | 2 +- 4 files changed, 643 insertions(+), 42 deletions(-) diff --git a/components/package.json b/components/package.json index 3de7bd7..3dc9820 100644 --- a/components/package.json +++ b/components/package.json @@ -3,5 +3,5 @@ "private": true, "main": "../dist/components/cjs/index.js", "module": "../dist/components/index.js", - "typings": "../dist/components/index.d.ts" + "typings": "../dist/types/components/index.d.ts" } diff --git a/package-lock.json b/package-lock.json index 54cf704..253ff0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -694,6 +694,12 @@ "uncrypto": "^0.1.3" } }, + "node_modules/@mdn/browser-compat-data": { + "version": "5.3.31", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.31.tgz", + "integrity": "sha512-y+vtoPN3LqQrfQWu7GItqMjv1WvMHlc6lTywu0L8ZMu9IcIssfQcze16LcKFcjRD+OM6EDTd/RACJ/5agXMsTQ==", + "dev": true + }, "node_modules/@next/env": { "version": "13.5.4", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.4.tgz", @@ -1134,6 +1140,66 @@ } } }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz", + "integrity": "sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript/node_modules/@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@rollup/plugin-typescript/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -1232,6 +1298,12 @@ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", "dev": true }, + "node_modules/@types/object-path": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.4.tgz", + "integrity": "sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==", + "dev": true + }, "node_modules/@types/prop-types": { "version": "15.7.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.6.tgz", @@ -1264,6 +1336,27 @@ "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", + "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "dev": true + }, + "node_modules/@types/ua-parser-js": { + "version": "0.7.39", + "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz", + "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==", + "dev": true + }, + "node_modules/@wessberg/stringutil": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", + "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -1322,6 +1415,15 @@ "string-width": "^4.1.0" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1692,9 +1794,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "funding": [ { @@ -1711,10 +1813,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -1723,6 +1825,67 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/browserslist-generator": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-2.1.0.tgz", + "integrity": "sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==", + "dev": true, + "dependencies": { + "@mdn/browser-compat-data": "^5.3.7", + "@types/object-path": "^0.11.1", + "@types/semver": "^7.5.0", + "@types/ua-parser-js": "^0.7.36", + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001518", + "isbot": "^3.6.13", + "object-path": "^0.11.8", + "semver": "^7.5.4", + "ua-parser-js": "^1.0.35" + }, + "engines": { + "node": ">=16.15.1", + "npm": ">=7.0.0", + "pnpm": ">=3.2.0", + "yarn": ">=1.13" + }, + "funding": { + "type": "github", + "url": "https://github.com/wessberg/browserslist-generator?sponsor=1" + } + }, + "node_modules/browserslist-generator/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/browserslist-generator/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/browserslist-generator/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -1861,9 +2024,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001504", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz", - "integrity": "sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==", + "version": "1.0.30001562", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", + "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==", "funding": [ { "type": "opencollective", @@ -2231,6 +2394,21 @@ "node": ">= 10" } }, + "node_modules/compatfactory": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-3.0.0.tgz", + "integrity": "sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==", + "dev": true, + "dependencies": { + "helpertypes": "^0.0.19" + }, + "engines": { + "node": ">=14.9.0" + }, + "peerDependencies": { + "typescript": ">=3.x || >= 4.x || >= 5.x" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2333,6 +2511,24 @@ "node": ">= 8" } }, + "node_modules/crosspath": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", + "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", + "dev": true, + "dependencies": { + "@types/node": "^17.0.36" + }, + "engines": { + "node": ">=14.9.0" + } + }, + "node_modules/crosspath/node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + }, "node_modules/crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", @@ -2627,9 +2823,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.433", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.433.tgz", - "integrity": "sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ==", + "version": "1.4.585", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.585.tgz", + "integrity": "sha512-B4yBlX0azdA3rVMxpYwLQfDpdwOgcnLCkpvSOd68iFmeedo+WYjaBJS3/W58LVD8CB2nf+o7C4K9xz1l09RkWg==", "dev": true }, "node_modules/emoji-regex": { @@ -3813,6 +4009,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/helpertypes": { + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.19.tgz", + "integrity": "sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -4692,6 +4897,15 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, + "node_modules/isbot": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.7.1.tgz", + "integrity": "sha512-JfqOaY3O1lcWt2nc+D6Mq231CNpwZrBboLa59Go0J8hjGH+gY/Sy0CA/YLUSIScINmAVwTdJZIsOTk4PfBtRuw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5050,6 +5264,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5381,9 +5607,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/normalize-path": { @@ -5452,6 +5678,15 @@ "node": ">= 0.4" } }, + "node_modules/object-path": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", + "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", + "dev": true, + "engines": { + "node": ">= 10.12.0" + } + }, "node_modules/object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", @@ -6559,6 +6794,102 @@ "rollup": "^2.0.0" } }, + "node_modules/rollup-plugin-ts": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.4.5.tgz", + "integrity": "sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.2", + "@wessberg/stringutil": "^1.0.19", + "ansi-colors": "^4.1.3", + "browserslist": "^4.21.10", + "browserslist-generator": "^2.1.0", + "compatfactory": "^3.0.0", + "crosspath": "^2.0.0", + "magic-string": "^0.30.2", + "ts-clone-node": "^3.0.0", + "tslib": "^2.6.1" + }, + "engines": { + "node": ">=16.15.1", + "npm": ">=7.0.0", + "pnpm": ">=3.2.0", + "yarn": ">=1.13" + }, + "funding": { + "type": "github", + "url": "https://github.com/wessberg/rollup-plugin-ts?sponsor=1" + }, + "peerDependencies": { + "@babel/core": ">=7.x", + "@babel/plugin-transform-runtime": ">=7.x", + "@babel/preset-env": ">=7.x", + "@babel/preset-typescript": ">=7.x", + "@babel/runtime": ">=7.x", + "@swc/core": ">=1.x", + "@swc/helpers": ">=0.2", + "rollup": ">=1.x || >=2.x || >=3.x", + "typescript": ">=3.2.x || >= 4.x || >= 5.x" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@babel/plugin-transform-runtime": { + "optional": true + }, + "@babel/preset-env": { + "optional": true + }, + "@babel/preset-typescript": { + "optional": true + }, + "@babel/runtime": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-ts/node_modules/@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-ts/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/rollup-plugin-ts/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -7299,6 +7630,25 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "node_modules/ts-clone-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-3.0.0.tgz", + "integrity": "sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==", + "dev": true, + "dependencies": { + "compatfactory": "^3.0.0" + }, + "engines": { + "node": ">=14.9.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/wessberg/ts-clone-node?sponsor=1" + }, + "peerDependencies": { + "typescript": "^3.x || ^4.x || ^5.x" + } + }, "node_modules/tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", @@ -7415,6 +7765,29 @@ "node": ">=14.17" } }, + "node_modules/ua-parser-js": { + "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, "node_modules/ufo": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", @@ -7481,9 +7854,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -8522,6 +8895,12 @@ "uncrypto": "^0.1.3" } }, + "@mdn/browser-compat-data": { + "version": "5.3.31", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.31.tgz", + "integrity": "sha512-y+vtoPN3LqQrfQWu7GItqMjv1WvMHlc6lTywu0L8ZMu9IcIssfQcze16LcKFcjRD+OM6EDTd/RACJ/5agXMsTQ==", + "dev": true + }, "@next/env": { "version": "13.5.4", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.4.tgz", @@ -8810,6 +9189,41 @@ "@rollup/pluginutils": "^3.1.0" } }, + "@rollup/plugin-typescript": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz", + "integrity": "sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.0.1", + "resolve": "^1.22.1" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -8893,6 +9307,12 @@ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", "dev": true }, + "@types/object-path": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.4.tgz", + "integrity": "sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==", + "dev": true + }, "@types/prop-types": { "version": "15.7.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.6.tgz", @@ -8925,6 +9345,24 @@ "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", "dev": true }, + "@types/semver": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", + "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "dev": true + }, + "@types/ua-parser-js": { + "version": "0.7.39", + "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz", + "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==", + "dev": true + }, + "@wessberg/stringutil": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", + "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", + "dev": true + }, "acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -8968,6 +9406,12 @@ "string-width": "^4.1.0" } }, + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -9224,15 +9668,59 @@ } }, "browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" + } + }, + "browserslist-generator": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-2.1.0.tgz", + "integrity": "sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==", + "dev": true, + "requires": { + "@mdn/browser-compat-data": "^5.3.7", + "@types/object-path": "^0.11.1", + "@types/semver": "^7.5.0", + "@types/ua-parser-js": "^0.7.36", + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001518", + "isbot": "^3.6.13", + "object-path": "^0.11.8", + "semver": "^7.5.4", + "ua-parser-js": "^1.0.35" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "buffer": { @@ -9332,9 +9820,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001504", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz", - "integrity": "sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==" + "version": "1.0.30001562", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", + "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==" }, "chalk": { "version": "2.4.2", @@ -9590,6 +10078,15 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, + "compatfactory": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-3.0.0.tgz", + "integrity": "sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==", + "dev": true, + "requires": { + "helpertypes": "^0.0.19" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -9673,6 +10170,23 @@ "which": "^2.0.1" } }, + "crosspath": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", + "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", + "dev": true, + "requires": { + "@types/node": "^17.0.36" + }, + "dependencies": { + "@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "dev": true + } + } + }, "crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", @@ -9876,9 +10390,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.433", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.433.tgz", - "integrity": "sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ==", + "version": "1.4.585", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.585.tgz", + "integrity": "sha512-B4yBlX0azdA3rVMxpYwLQfDpdwOgcnLCkpvSOd68iFmeedo+WYjaBJS3/W58LVD8CB2nf+o7C4K9xz1l09RkWg==", "dev": true }, "emoji-regex": { @@ -10743,6 +11257,12 @@ "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", "dev": true }, + "helpertypes": { + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.19.tgz", + "integrity": "sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==", + "dev": true + }, "http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -11335,6 +11855,12 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, + "isbot": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.7.1.tgz", + "integrity": "sha512-JfqOaY3O1lcWt2nc+D6Mq231CNpwZrBboLa59Go0J8hjGH+gY/Sy0CA/YLUSIScINmAVwTdJZIsOTk4PfBtRuw==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -11619,6 +12145,15 @@ "integrity": "sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==", "dev": true }, + "magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -11834,9 +12369,9 @@ "dev": true }, "node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "normalize-path": { @@ -11880,6 +12415,12 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, + "object-path": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", + "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", + "dev": true + }, "object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", @@ -12672,6 +13213,49 @@ "terser": "^5.0.0" } }, + "rollup-plugin-ts": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.4.5.tgz", + "integrity": "sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.0.2", + "@wessberg/stringutil": "^1.0.19", + "ansi-colors": "^4.1.3", + "browserslist": "^4.21.10", + "browserslist-generator": "^2.1.0", + "compatfactory": "^3.0.0", + "crosspath": "^2.0.0", + "magic-string": "^0.30.2", + "ts-clone-node": "^3.0.0", + "tslib": "^2.6.1" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -13201,6 +13785,15 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "ts-clone-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-3.0.0.tgz", + "integrity": "sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==", + "dev": true, + "requires": { + "compatfactory": "^3.0.0" + } + }, "tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", @@ -13283,6 +13876,12 @@ "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", "dev": true }, + "ua-parser-js": { + "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", + "dev": true + }, "ufo": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", @@ -13334,9 +13933,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", diff --git a/package.json b/package.json index 88d47ec..88bbb21 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", - "typings": "dist/index.d.ts", + "typings": "dist/types/index.d.ts", "scripts": { "build": "npx tsc && genversion --es6 src/utils/version.js && rollup -c", "prepare": "genversion --es6 src/utils/version.js && rollup -c", @@ -28,6 +28,7 @@ "@babel/core": "^7.17.12", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-typescript": "^11.1.5", "@types/cookie": "^0.5.3", "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", @@ -40,6 +41,7 @@ "release-it": "^16.1.3", "rollup": "^2.73.0", "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-ts": "^3.4.5", "typescript": "^5.1.3" }, "peerDependencies": { @@ -63,6 +65,6 @@ "dist", "server", "components", - "index.d.ts" + "types.d.ts" ] } diff --git a/server/package.json b/server/package.json index d177d10..ec8a7f5 100644 --- a/server/package.json +++ b/server/package.json @@ -3,5 +3,5 @@ "private": true, "main": "../dist/server/cjs/index.js", "module": "../dist/server/index.js", - "typings": "../dist/server/index.d.ts" + "typings": "../dist/types/server/index.d.ts" } From 2638c05bef11c279cf4cf1258a1894798cdec839 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:19:36 +1100 Subject: [PATCH 09/30] 2.0.2-beta.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 253ff0b..b9322f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.2", + "version": "2.0.2-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.2", + "version": "2.0.2-beta.1", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 88bbb21..4480ce0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.0-alpha.2", + "version": "2.0.2-beta.1", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From ccafd487cba2de9b3b669a3a7d2aa142124eebd8 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:34:03 +1100 Subject: [PATCH 10/30] build --- package.json | 2 +- src/components/LoginLink.js | 3 --- src/components/RegisterLink.js | 3 --- src/frontend/AuthProvider.jsx | 14 ++++---------- src/utils/version.js | 2 +- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 4480ce0..db9dc86 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "module": "dist/index.js", "typings": "dist/types/index.d.ts", "scripts": { - "build": "npx tsc && genversion --es6 src/utils/version.js && rollup -c", + "build": "npx tsc && cp types.d.ts dist/types.d.ts && genversion --es6 src/utils/version.js && rollup -c", "prepare": "genversion --es6 src/utils/version.js && rollup -c", "build:watch": "genversion --es6 src/utils/version.js && rollup -c -w", "test": "jest", diff --git a/src/components/LoginLink.js b/src/components/LoginLink.js index 4dba428..efa51bb 100644 --- a/src/components/LoginLink.js +++ b/src/components/LoginLink.js @@ -22,9 +22,6 @@ export function LoginLink({ ...props }) { let params = new URLSearchParams(); - /** - * @type {Record} - */ let paramsObj = {}; if (orgCode != null) paramsObj.org_code = orgCode; if (postLoginRedirectURL != null) diff --git a/src/components/RegisterLink.js b/src/components/RegisterLink.js index ec824a2..0453807 100644 --- a/src/components/RegisterLink.js +++ b/src/components/RegisterLink.js @@ -23,9 +23,6 @@ export function RegisterLink({ ...props }) { let params = new URLSearchParams(); - /** - * @type {Record} - */ let paramsObj = {}; if (orgCode != null) paramsObj.org_code = orgCode; if (postLoginRedirectURL != null) diff --git a/src/frontend/AuthProvider.jsx b/src/frontend/AuthProvider.jsx index a6b1093..4691773 100644 --- a/src/frontend/AuthProvider.jsx +++ b/src/frontend/AuthProvider.jsx @@ -15,12 +15,6 @@ export const flagDataTypeMap = { b: 'boolean' }; -const handleError = () => { - throw new Error( - 'Oops! Seems like you forgot to wrap your app in .' - ); -}; - const AuthContext = createContext({ ...config.initialState }); @@ -55,7 +49,6 @@ const tokenFetcher = async (url) => { /** * * @param {{children: React.ReactNode}} props - * @returns {React.Provider>} */ export const KindeProvider = ({children}) => { const [state, setState] = useState({ @@ -257,7 +250,8 @@ export const KindeProvider = ({children}) => { getOrganization, getPermission, getPermissions, - getUserOrganozations, + getUser, + getUserOrganizations, permissions, organization, userOrganizations, @@ -283,8 +277,8 @@ export const KindeProvider = ({children}) => { getOrganization, getPermission, getPermissions, - getUserOrganzations, - getPermission, + getUser, + getUserOrganizations, permissions, organization, userOrganizations, diff --git a/src/utils/version.js b/src/utils/version.js index c993876..9b1d106 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.0-alpha.2' +export const version = '2.0.2-beta.1' From 383d6b3717f8a9901cefb57e4270f92c5f631cda Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:35:19 +1100 Subject: [PATCH 11/30] provider type --- src/frontend/AuthProvider.jsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/frontend/AuthProvider.jsx b/src/frontend/AuthProvider.jsx index 4691773..bfc0dff 100644 --- a/src/frontend/AuthProvider.jsx +++ b/src/frontend/AuthProvider.jsx @@ -46,10 +46,6 @@ const tokenFetcher = async (url) => { } }; -/** - * - * @param {{children: React.ReactNode}} props - */ export const KindeProvider = ({children}) => { const [state, setState] = useState({ ...config.initialState From 947e07a16f264dc8f4781249d634ba34e2753be3 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:35:22 +1100 Subject: [PATCH 12/30] 2.0.2-beta.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9322f8..7566eb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.1", + "version": "2.0.2-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.1", + "version": "2.0.2-beta.2", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index db9dc86..18e7dbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.1", + "version": "2.0.2-beta.2", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From 7dcb23699b61a9a7e5b4c6a8897f5066b36b3fb6 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:42:17 +1100 Subject: [PATCH 13/30] fix: types --- src/session/index.js | 4 ++-- src/utils/version.js | 2 +- types.d.ts | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/session/index.js b/src/session/index.js index 41acd67..cbb793e 100644 --- a/src/session/index.js +++ b/src/session/index.js @@ -13,8 +13,8 @@ import {isAuthenticatedFactory} from './isAuthenticated'; /** * - * @param {import('next').NextApiRequest} [req] - * @param {import('next').NextApiResponse} [res] + * @param {import('next').NextApiRequest | Request} [req] + * @param {import('next').NextApiResponse | Response} [res] * @returns */ export const getKindeServerSession = (req, res) => ({ diff --git a/src/utils/version.js b/src/utils/version.js index 9b1d106..ec206e0 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.1' +export const version = '2.0.2-beta.2' diff --git a/types.d.ts b/types.d.ts index 781a469..ab08311 100644 --- a/types.d.ts +++ b/types.d.ts @@ -166,11 +166,14 @@ export type KindeState = { organization: KindeOrganization; permissions: KindePermissions; user: KindeUser | null; - userOrganiaztions: string[]; + userOrganizations: string[]; getAccessToken: () => KindeAccessToken | null; - getBooleanFlag: () => boolean | null | undefined; + getBooleanFlag: (code: string, + defaultValue?: boolean | undefined) => boolean | null | undefined; getClaim: ( - tokenKey?: 'access_token' | 'id_token' + claim: string, + tokenKey?: 'access_token' | 'id_token', + ) => {name: string; value: string} | null; getFlag: ( code: string, From 4b3a03ae2efd51cdfbd3fc420ec12b8dd8e1ff6a Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:42:22 +1100 Subject: [PATCH 14/30] 2.0.2-beta.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7566eb6..90b5400 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.2", + "version": "2.0.2-beta.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.2", + "version": "2.0.2-beta.3", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 18e7dbb..1bf3dd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.2", + "version": "2.0.2-beta.3", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From b403ead3268ae090ca8468257527022a5a305592 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:43:10 +1100 Subject: [PATCH 15/30] version --- src/utils/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/version.js b/src/utils/version.js index ec206e0..7ef3208 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.2' +export const version = '2.0.2-beta.3' From 9506a54f8644ff72f7f8fd079b7506e513b05402 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:43:14 +1100 Subject: [PATCH 16/30] 2.0.2-beta.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90b5400..c227e64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.3", + "version": "2.0.2-beta.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.3", + "version": "2.0.2-beta.4", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 1bf3dd2..0286dd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.3", + "version": "2.0.2-beta.4", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From f7ca5d02bb6ff939b01721256345731283dd15b3 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:45:59 +1100 Subject: [PATCH 17/30] clean up --- src/session/sessionManager.js | 18 +++++------------- src/utils/version.js | 2 +- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/session/sessionManager.js b/src/session/sessionManager.js index 90479c3..ba7ac77 100644 --- a/src/session/sessionManager.js +++ b/src/session/sessionManager.js @@ -35,12 +35,12 @@ export const appRouterSessionManager = (cookieStore) => ({ if (typeof jsonValue === 'object') { return jsonValue; } - return new Promise(() => item.value); + return item.value; } catch (error) { - return new Promise(() => item.value); + return item.value; } } - return new Promise(() => null); + return null; }, /** * @@ -55,7 +55,6 @@ export const appRouterSessionManager = (cookieStore) => ({ typeof itemValue === 'object' ? JSON.stringify(itemValue) : itemValue ); } - return new Promise(() => {}); }, /** * @@ -64,7 +63,6 @@ export const appRouterSessionManager = (cookieStore) => ({ */ removeSessionItem: (itemKey) => { cookieStore.delete(itemKey); - return new Promise(() => {}); }, /** * @returns {Promise} @@ -78,7 +76,6 @@ export const appRouterSessionManager = (cookieStore) => ({ 'user', 'refresh_token' ].forEach((name) => cookieStore.delete(name)); - return new Promise(() => {}); } }); @@ -102,12 +99,11 @@ export const pageRouterSessionManager = (req, res) => ({ if (typeof jsonValue === 'object') { return jsonValue; } - return new Promise(() => itemValue); + return itemValue; } catch (error) { - return new Promise(() => itemValue); + return itemValue; } } - return new Promise(() => undefined); }, /** * @@ -131,7 +127,6 @@ export const pageRouterSessionManager = (req, res) => ({ ) ]); - return new Promise(() => {}); }, /** * @@ -144,7 +139,6 @@ export const pageRouterSessionManager = (req, res) => ({ cookie.serialize(itemKey, '', {path: '/', maxAge: -1}) ); - return new Promise(() => {}); }, destroySession: () => { res?.setHeader( @@ -158,7 +152,5 @@ export const pageRouterSessionManager = (req, res) => ({ 'refresh_token' ].map((name) => cookie.serialize(name, '', {path: '/', maxAge: -1})) ); - - return new Promise(() => {}); } }); diff --git a/src/utils/version.js b/src/utils/version.js index 7ef3208..51c608d 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.3' +export const version = '2.0.2-beta.4' From 7e0b0c7ada333bb85cf5d81515b0eaa9250dff76 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:46:06 +1100 Subject: [PATCH 18/30] 2.0.2-beta.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c227e64..c25eefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.4", + "version": "2.0.2-beta.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.4", + "version": "2.0.2-beta.5", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 0286dd5..2cd4f12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.4", + "version": "2.0.2-beta.5", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From 0d955b89192f424117b5e11ad18cc444198bdbbf Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:57:23 +1100 Subject: [PATCH 19/30] fix: bugs --- src/handlers/setup.js | 6 +++++- src/routerClients/AppRouterClient.js | 2 +- src/routerClients/PagesRouterClient.js | 2 +- src/utils/version.js | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/handlers/setup.js b/src/handlers/setup.js index e0ecae5..79f431d 100644 --- a/src/handlers/setup.js +++ b/src/handlers/setup.js @@ -3,6 +3,7 @@ import RouterClient from '../routerClients/RouterClient'; /** * * @param {RouterClient} routerClient + * @returns */ export const setup = async (routerClient) => { const user = await routerClient.sessionManager.getSessionItem('user'); @@ -45,7 +46,10 @@ export const setup = async (routerClient) => { accessTokenEncoded, idToken, user, - permissions, + permissions: { + permissions, + orgCode: organization + }, organization, featureFlags, userOrganizations diff --git a/src/routerClients/AppRouterClient.js b/src/routerClients/AppRouterClient.js index 8e56194..0ecd15d 100644 --- a/src/routerClients/AppRouterClient.js +++ b/src/routerClients/AppRouterClient.js @@ -48,7 +48,7 @@ export default class AppRouterClient extends RouterClient { * @param {{status: number}} status * @returns */ - json(data, status) { + json(data, status = {status: 200}) { return NextResponse.json(data, status); } diff --git a/src/routerClients/PagesRouterClient.js b/src/routerClients/PagesRouterClient.js index f9c64e7..b3a33ee 100644 --- a/src/routerClients/PagesRouterClient.js +++ b/src/routerClients/PagesRouterClient.js @@ -42,7 +42,7 @@ export default class PagesRouterClient extends RouterClient { * @param {{status: number}} status * @returns */ - json(data, status) { + json(data, status = {status: 200}) { return this.res.status(status.status).json(data); } diff --git a/src/utils/version.js b/src/utils/version.js index 51c608d..75de7e5 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.4' +export const version = '2.0.2-beta.5' From 73ea2a25f020b88ea56cdd1d640ab0630669fdeb Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 01:57:36 +1100 Subject: [PATCH 20/30] 2.0.2-beta.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c25eefd..e321d3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.5", + "version": "2.0.2-beta.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.5", + "version": "2.0.2-beta.6", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 2cd4f12..ae03707 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.5", + "version": "2.0.2-beta.6", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From e2f0139c6ed0e58cda2c0beab9c073ef9e4c8a87 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 09:05:18 +1100 Subject: [PATCH 21/30] exports --- package.json | 23 +++++++++++++++++++++++ src/utils/version.js | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ae03707..eb2a472 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,29 @@ "main": "dist/cjs/index.js", "module": "dist/index.js", "typings": "dist/types/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "types": "./dist/types/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.js" + }, + "./components": { + "types": "./dist/types/components/index.d.ts", + "require": "./dist/components/cjs/index.js", + "import": "./dist/components/index.js" + }, + "./server": { + "types": "./dist/types/server/index.d.ts", + "require": "./dist/server/cjs/index.js", + "import": "./dist/server/index.js" + }, + "./middleware": { + "types": "./dist/types/middleware/index.d.ts", + "require": "./dist/middleware/cjs/index.js", + "import": "./dist/middleware/index.js" + } + }, "scripts": { "build": "npx tsc && cp types.d.ts dist/types.d.ts && genversion --es6 src/utils/version.js && rollup -c", "prepare": "genversion --es6 src/utils/version.js && rollup -c", diff --git a/src/utils/version.js b/src/utils/version.js index 75de7e5..f224e79 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.5' +export const version = '2.0.2-beta.6' From 413cc1efa7238b45a4143c18156abce55b492327 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:32:19 +1100 Subject: [PATCH 22/30] middleware export --- middleware/package.json | 7 +++++++ middlewareConfig/rollup.config.js | 21 +++++++++++++++++++++ package.json | 24 +----------------------- rollup.config.js | 3 ++- src/middleware/index.js | 1 + 5 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 middleware/package.json create mode 100644 middlewareConfig/rollup.config.js create mode 100644 src/middleware/index.js diff --git a/middleware/package.json b/middleware/package.json new file mode 100644 index 0000000..4d1ab98 --- /dev/null +++ b/middleware/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kinde-oss/kinde-auth-nextjs/middleware", + "private": true, + "main": "../dist/middleware/cjs/index.js", + "module": "../dist/middleware/index.js", + "typings": "../dist/types/middleware/index.d.ts" +} diff --git a/middlewareConfig/rollup.config.js b/middlewareConfig/rollup.config.js new file mode 100644 index 0000000..369aed6 --- /dev/null +++ b/middlewareConfig/rollup.config.js @@ -0,0 +1,21 @@ +import babel from '@rollup/plugin-babel'; +import {terser} from 'rollup-plugin-terser'; + +export default { + plugins: [babel({babelHelpers: 'bundled'}), terser()], + input: 'src/middleware/index.js', + output: [ + { + file: 'dist/middleware/cjs/index.js', + format: 'cjs', + sourcemap: true, + exports: 'named' + }, + { + file: `dist/middleware/index.js`, + sourcemap: true, + exports: 'named', + format: 'esm' + } + ] +}; diff --git a/package.json b/package.json index eb2a472..2f18160 100644 --- a/package.json +++ b/package.json @@ -5,29 +5,6 @@ "main": "dist/cjs/index.js", "module": "dist/index.js", "typings": "dist/types/index.d.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "types": "./dist/types/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.js" - }, - "./components": { - "types": "./dist/types/components/index.d.ts", - "require": "./dist/components/cjs/index.js", - "import": "./dist/components/index.js" - }, - "./server": { - "types": "./dist/types/server/index.d.ts", - "require": "./dist/server/cjs/index.js", - "import": "./dist/server/index.js" - }, - "./middleware": { - "types": "./dist/types/middleware/index.d.ts", - "require": "./dist/middleware/cjs/index.js", - "import": "./dist/middleware/index.js" - } - }, "scripts": { "build": "npx tsc && cp types.d.ts dist/types.d.ts && genversion --es6 src/utils/version.js && rollup -c", "prepare": "genversion --es6 src/utils/version.js && rollup -c", @@ -88,6 +65,7 @@ "dist", "server", "components", + "middleware", "types.d.ts" ] } diff --git a/rollup.config.js b/rollup.config.js index 4f3b294..3a71142 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,6 @@ import clientConfig from './clientConfig/rollup.config.js'; import serverConfig from './serverConfig/rollup.config.js'; import componentConfig from './componentConfig/rollup.config.js'; +import middlewareConfig from './middlewareConfig/rollup.config.js'; -export default [clientConfig, serverConfig, componentConfig]; +export default [clientConfig, serverConfig, componentConfig, middlewareConfig]; diff --git a/src/middleware/index.js b/src/middleware/index.js new file mode 100644 index 0000000..09a2701 --- /dev/null +++ b/src/middleware/index.js @@ -0,0 +1 @@ +export { authMiddleware, withAuth } from "../authMiddleware/authMiddleware" \ No newline at end of file From a168e8d1055d12f60b813043234e4e8b95688f73 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:43:57 +1100 Subject: [PATCH 23/30] fix: kindeServerSession export --- package-lock.json | 1542 ++++++------------------------------------- package.json | 4 +- src/server/index.js | 2 +- 3 files changed, 198 insertions(+), 1350 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fd9073..6218453 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,18 +18,18 @@ "@babel/core": "^7.17.12", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", + "@rollup/plugin-typescript": "^11.1.5", "@types/cookie": "^0.5.3", "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", - "dts-bundle-generator": "^8.1.2", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "genversion": "^3.1.1", "prettier": "^3.0.1", "release-it": "^16.1.3", - "rollup": "^4.3.0", - "rollup-plugin-dts": "^6.1.0", + "rollup": "^2.73.0", + "rollup-plugin-terser": "^7.0.2", "typescript": "^5.1.3" }, "peerDependencies": { @@ -43,7 +43,6 @@ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -70,7 +69,6 @@ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } @@ -80,7 +78,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", @@ -111,7 +108,6 @@ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", @@ -139,7 +135,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, - "peer": true, "dependencies": { "@babel/compat-data": "^7.22.9", "@babel/helper-validator-option": "^7.22.15", @@ -156,7 +151,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } @@ -166,7 +160,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, - "peer": true, "dependencies": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -180,7 +173,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -205,7 +197,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, - "peer": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", @@ -234,7 +225,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -247,7 +237,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, - "peer": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -287,7 +276,6 @@ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, - "peer": true, "dependencies": { "@babel/template": "^7.22.15", "@babel/traverse": "^7.23.2", @@ -316,7 +304,6 @@ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, - "peer": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -429,7 +416,6 @@ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/parser": "^7.22.15", @@ -444,7 +430,6 @@ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", @@ -663,12 +648,6 @@ "uncrypto": "^0.1.3" } }, - "node_modules/@mdn/browser-compat-data": { - "version": "5.3.31", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.31.tgz", - "integrity": "sha512-y+vtoPN3LqQrfQWu7GItqMjv1WvMHlc6lTywu0L8ZMu9IcIssfQcze16LcKFcjRD+OM6EDTd/RACJ/5agXMsTQ==", - "dev": true - }, "node_modules/@next/env": { "version": "13.5.4", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.4.tgz", @@ -1087,77 +1066,56 @@ } }, "node_modules/@rollup/plugin-babel": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", - "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1" + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" }, "engines": { - "node": ">=14.0.0" + "node": ">= 10.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0", "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0" }, "peerDependenciesMeta": { "@types/babel__core": { "optional": true - }, - "rollup": { - "optional": true } } }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "node_modules/@rollup/plugin-babel/node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", - "is-module": "^1.0.0", - "resolve": "^1.22.1" + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" }, "engines": { - "node": ">=14.0.0" + "node": ">= 8.0.0" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/@rollup/plugin-terser": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", - "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", - "dev": true, - "dependencies": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } + "node_modules/@rollup/plugin-babel/node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@rollup/plugin-babel/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true }, "node_modules/@rollup/plugin-typescript": { "version": "11.1.5", @@ -1219,184 +1177,6 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, - "node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.3.0.tgz", - "integrity": "sha512-/4pns6BYi8MXdwnXM44yoGAcFYVHL/BYlB2q1HXZ6AzH++LaiEVWFpBWQ/glXhbMbv3E3o09igrHFbP/snhAvA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.3.0.tgz", - "integrity": "sha512-nLO/JsL9idr416vzi3lHm3Xm+QZh4qHij8k3Er13kZr5YhL7/+kBAx84kDmPc7HMexLmwisjDCeDIKNFp8mDlQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.3.0.tgz", - "integrity": "sha512-dGhVBlllt4iHwTGy21IEoMOTN5wZoid19zEIxsdY29xcEiOEHqzDa7Sqrkh5OE7LKCowL61eFJXxYe/+pYa7ZQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.3.0.tgz", - "integrity": "sha512-h8wRfHeLEbU3NzaP1Oku7BYXCJQiTRr+8U0lklyOQXxXiEpHLL8tk1hFl+tezoRKLcPJD7joKaK74ASsqt3Ekg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.3.0.tgz", - "integrity": "sha512-wP4VgR/gfV18sylTuym3sxRTkAgUR2vh6YLeX/GEznk5jCYcYSlx585XlcUcl0c8UffIZlRJ09raWSX3JDb4GA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.3.0.tgz", - "integrity": "sha512-v/14JCYVkqRSJeQbxFx4oUkwVQQw6lFMN7bd4vuARBc3X2lmomkxBsc+BFiIDL/BK+CTx5AOh/k9XmqDnKWRVg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.3.0.tgz", - "integrity": "sha512-tNhfYqFH5OxtRzfkTOKdgFYlPSZnlDLNW4+leNEvQZhwTJxoTwsZAAhR97l3qVry/kkLyJPBK+Q8EAJLPinDIg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.3.0.tgz", - "integrity": "sha512-pw77m8QywdsoFdFOgmc8roF1inBI0rciqzO8ffRUgLoq7+ee9o5eFqtEcS6hHOOplgifAUUisP8cAnwl9nUYPw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.3.0.tgz", - "integrity": "sha512-tJs7v2MnV2F8w6X1UpPHl/43OfxjUy9SuJ2ZPoxn79v9vYteChVYO/ueLHCpRMmyTUIVML3N9z4azl9ENH8Xxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.3.0.tgz", - "integrity": "sha512-OKGxp6kATQdTyI2DF+e9s+hB3/QZB45b6e+dzcfW1SUqiF6CviWyevhmT4USsMEdP3mlpC9zxLz3Oh+WaTMOSw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.3.0.tgz", - "integrity": "sha512-DDZ5AH68JJ2ClQFEA1aNnfA7Ybqyeh0644rGbrLOdNehTmzfICHiWSn0OprzYi9HAshTPQvlwrM+bi2kuaIOjQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.3.0.tgz", - "integrity": "sha512-dMvGV8p92GQ8jhNlGIKpyhVZPzJlT258pPrM5q2F8lKcc9Iv9BbfdnhX1OfinYWnb9ms5zLw6MlaMnqLfUkKnQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@sindresorhus/is": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", @@ -1442,12 +1222,6 @@ "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", "dev": true }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -1463,12 +1237,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/object-path": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.4.tgz", - "integrity": "sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==", - "dev": true - }, "node_modules/@types/prop-types": { "version": "15.7.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.6.tgz", @@ -1495,39 +1263,12 @@ "@types/react": "*" } }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true - }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", "dev": true }, - "node_modules/@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", - "dev": true - }, - "node_modules/@types/ua-parser-js": { - "version": "0.7.39", - "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz", - "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==", - "dev": true - }, - "node_modules/@wessberg/stringutil": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", - "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -1586,15 +1327,6 @@ "string-width": "^4.1.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1983,7 +1715,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001541", "electron-to-chromium": "^1.4.535", @@ -1997,67 +1728,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/browserslist-generator": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-2.1.0.tgz", - "integrity": "sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==", - "dev": true, - "dependencies": { - "@mdn/browser-compat-data": "^5.3.7", - "@types/object-path": "^0.11.1", - "@types/semver": "^7.5.0", - "@types/ua-parser-js": "^0.7.36", - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001518", - "isbot": "^3.6.13", - "object-path": "^0.11.8", - "semver": "^7.5.4", - "ua-parser-js": "^1.0.35" - }, - "engines": { - "node": ">=16.15.1", - "npm": ">=7.0.0", - "pnpm": ">=3.2.0", - "yarn": ">=1.13" - }, - "funding": { - "type": "github", - "url": "https://github.com/wessberg/browserslist-generator?sponsor=1" - } - }, - "node_modules/browserslist-generator/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/browserslist-generator/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/browserslist-generator/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -2088,18 +1758,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -2224,8 +1882,7 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "peer": true + ] }, "node_modules/chalk": { "version": "2.4.2", @@ -2476,70 +2133,6 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "peer": true }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -2579,21 +2172,6 @@ "node": ">= 10" } }, - "node_modules/compatfactory": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-3.0.0.tgz", - "integrity": "sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==", - "dev": true, - "dependencies": { - "helpertypes": "^0.0.19" - }, - "engines": { - "node": ">=14.9.0" - }, - "peerDependencies": { - "typescript": ">=3.x || >= 4.x || >= 5.x" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2654,8 +2232,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/cookie": { "version": "0.5.0", @@ -2697,24 +2274,6 @@ "node": ">= 8" } }, - "node_modules/crosspath": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", - "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", - "dev": true, - "dependencies": { - "@types/node": "^17.0.36" - }, - "engines": { - "node": ">=14.9.0" - } - }, - "node_modules/crosspath/node_modules/@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "dev": true - }, "node_modules/crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", @@ -2821,15 +2380,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/default-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", @@ -2996,22 +2546,6 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, - "node_modules/dts-bundle-generator": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-8.1.2.tgz", - "integrity": "sha512-/yvy9Xw0cfFodA8n6jEq8/COZ/WXgJtPabnLBAzIfP/TfxWbD/0a0dvfqNHneNqswQrH0kUcaAfGJC9UNvH97w==", - "dev": true, - "dependencies": { - "typescript": ">=5.0.2", - "yargs": "^17.6.0" - }, - "bin": { - "dts-bundle-generator": "dist/bin/dts-bundle-generator.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -3154,7 +2688,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -3469,12 +3002,6 @@ "node": ">=4.0" } }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -3836,7 +3363,6 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } @@ -3857,15 +3383,6 @@ "node": ">=10.0.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -4028,7 +3545,6 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "peer": true, "engines": { "node": ">=4" } @@ -4208,15 +3724,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/helpertypes": { - "version": "0.0.19", - "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.19.tgz", - "integrity": "sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -4695,21 +4202,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -4861,12 +4353,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -5117,15 +4603,6 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "node_modules/isbot": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.7.1.tgz", - "integrity": "sha512-JfqOaY3O1lcWt2nc+D6Mq231CNpwZrBboLa59Go0J8hjGH+gY/Sy0CA/YLUSIScINmAVwTdJZIsOTk4PfBtRuw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5170,6 +4647,41 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jiti": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", @@ -5201,7 +4713,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "peer": true, "bin": { "jsesc": "bin/jsesc" }, @@ -5238,7 +4749,6 @@ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "peer": true, "bin": { "json5": "lib/cli.js" }, @@ -5423,7 +4933,6 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "peer": true, "dependencies": { "yallist": "^3.0.2" } @@ -5440,18 +4949,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5848,20 +5345,11 @@ }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object-path": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", - "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "engines": { - "node": ">= 10.12.0" + "node": ">= 0.4" } }, "node_modules/object.assign": { @@ -6371,8 +5859,7 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "peer": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -6814,15 +6301,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", @@ -6942,151 +6420,45 @@ } }, "node_modules/rollup": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.3.0.tgz", - "integrity": "sha512-scIi1NrKLDIYSPK66jjECtII7vIgdAMFmFo8h6qm++I6nN9qDSV35Ku6erzGVqYjx+lj+j5wkusRMr++8SyDZg==", + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" + "node": ">=10.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.3.0", - "@rollup/rollup-android-arm64": "4.3.0", - "@rollup/rollup-darwin-arm64": "4.3.0", - "@rollup/rollup-darwin-x64": "4.3.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.3.0", - "@rollup/rollup-linux-arm64-gnu": "4.3.0", - "@rollup/rollup-linux-arm64-musl": "4.3.0", - "@rollup/rollup-linux-x64-gnu": "4.3.0", - "@rollup/rollup-linux-x64-musl": "4.3.0", - "@rollup/rollup-win32-arm64-msvc": "4.3.0", - "@rollup/rollup-win32-ia32-msvc": "4.3.0", - "@rollup/rollup-win32-x64-msvc": "4.3.0", "fsevents": "~2.3.2" } }, - "node_modules/rollup-plugin-dts": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.0.tgz", - "integrity": "sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==", - "dev": true, - "dependencies": { - "magic-string": "^0.30.4" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/Swatinem" - }, - "optionalDependencies": { - "@babel/code-frame": "^7.22.13" - }, - "peerDependencies": { - "rollup": "^3.29.4 || ^4", - "typescript": "^4.5 || ^5.0" - } - }, - "node_modules/rollup-plugin-ts": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.4.5.tgz", - "integrity": "sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==", + "node_modules/rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", "dev": true, "dependencies": { - "@rollup/pluginutils": "^5.0.2", - "@wessberg/stringutil": "^1.0.19", - "ansi-colors": "^4.1.3", - "browserslist": "^4.21.10", - "browserslist-generator": "^2.1.0", - "compatfactory": "^3.0.0", - "crosspath": "^2.0.0", - "magic-string": "^0.30.2", - "ts-clone-node": "^3.0.0", - "tslib": "^2.6.1" - }, - "engines": { - "node": ">=16.15.1", - "npm": ">=7.0.0", - "pnpm": ">=3.2.0", - "yarn": ">=1.13" - }, - "funding": { - "type": "github", - "url": "https://github.com/wessberg/rollup-plugin-ts?sponsor=1" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" }, "peerDependencies": { - "@babel/core": ">=7.x", - "@babel/plugin-transform-runtime": ">=7.x", - "@babel/preset-env": ">=7.x", - "@babel/preset-typescript": ">=7.x", - "@babel/runtime": ">=7.x", - "@swc/core": ">=1.x", - "@swc/helpers": ">=0.2", - "rollup": ">=1.x || >=2.x || >=3.x", - "typescript": ">=3.2.x || >= 4.x || >= 5.x" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@babel/plugin-transform-runtime": { - "optional": true - }, - "@babel/preset-env": { - "optional": true - }, - "@babel/preset-typescript": { - "optional": true - }, - "@babel/runtime": { - "optional": true - }, - "@swc/core": { - "optional": true - }, - "@swc/helpers": { - "optional": true - } + "rollup": "^2.0.0" } }, - "node_modules/rollup-plugin-ts/node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "node_modules/rollup-plugin-terser/node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "randombytes": "^2.1.0" } }, - "node_modules/rollup-plugin-ts/node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/rollup-plugin-ts/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -7310,7 +6682,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "peer": true, "bin": { "semver": "bin/semver.js" } @@ -7363,15 +6734,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7452,12 +6814,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/smob": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz", - "integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==", - "dev": true - }, "node_modules/socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", @@ -7823,25 +7179,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/ts-clone-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-3.0.0.tgz", - "integrity": "sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==", - "dev": true, - "dependencies": { - "compatfactory": "^3.0.0" - }, - "engines": { - "node": ">=14.9.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/wessberg/ts-clone-node?sponsor=1" - }, - "peerDependencies": { - "typescript": "^3.x || ^4.x || ^5.x" - } - }, "node_modules/tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", @@ -7958,29 +7295,6 @@ "node": ">=14.17" } }, - "node_modules/ua-parser-js": { - "version": "1.0.37", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", - "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - }, - { - "type": "github", - "url": "https://github.com/sponsors/faisalman" - } - ], - "engines": { - "node": "*" - } - }, "node_modules/ufo": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", @@ -8071,7 +7385,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -8538,21 +7851,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/yaml": { "version": "2.3.3", @@ -8563,24 +7866,6 @@ "node": ">= 14" } }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -8609,7 +7894,6 @@ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, - "peer": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -8629,15 +7913,13 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", - "dev": true, - "peer": true + "dev": true }, "@babel/core": { "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, - "peer": true, "requires": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", @@ -8661,7 +7943,6 @@ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, - "peer": true, "requires": { "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", @@ -8683,7 +7964,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, - "peer": true, "requires": { "@babel/compat-data": "^7.22.9", "@babel/helper-validator-option": "^7.22.15", @@ -8696,15 +7976,13 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "peer": true + "dev": true }, "@babel/helper-function-name": { "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, - "peer": true, "requires": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -8715,7 +7993,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, - "peer": true, "requires": { "@babel/types": "^7.22.5" } @@ -8734,7 +8011,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, - "peer": true, "requires": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", @@ -8754,7 +8030,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, - "peer": true, "requires": { "@babel/types": "^7.22.5" } @@ -8764,7 +8039,6 @@ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, - "peer": true, "requires": { "@babel/types": "^7.22.5" } @@ -8792,7 +8066,6 @@ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, - "peer": true, "requires": { "@babel/template": "^7.22.15", "@babel/traverse": "^7.23.2", @@ -8814,8 +8087,7 @@ "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true, - "peer": true + "dev": true }, "@babel/plugin-syntax-jsx": { "version": "7.22.5", @@ -8886,7 +8158,6 @@ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, - "peer": true, "requires": { "@babel/code-frame": "^7.22.13", "@babel/parser": "^7.22.15", @@ -8898,7 +8169,6 @@ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, - "peer": true, "requires": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", @@ -9064,12 +8334,6 @@ "uncrypto": "^0.1.3" } }, - "@mdn/browser-compat-data": { - "version": "5.3.31", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.3.31.tgz", - "integrity": "sha512-y+vtoPN3LqQrfQWu7GItqMjv1WvMHlc6lTywu0L8ZMu9IcIssfQcze16LcKFcjRD+OM6EDTd/RACJ/5agXMsTQ==", - "dev": true - }, "@next/env": { "version": "13.5.4", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.4.tgz", @@ -9349,38 +8613,38 @@ } }, "@rollup/plugin-babel": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", - "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@rollup/pluginutils": "^5.0.1" - } - }, - "@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", "dev": true, "requires": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - } - }, - "@rollup/plugin-terser": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", - "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", - "dev": true, - "requires": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } } }, "@rollup/plugin-typescript": { @@ -9399,119 +8663,24 @@ "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", "dev": true, "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - } - } - }, - "@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", - "dev": true, - "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@rollup/rollup-android-arm-eabi": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.3.0.tgz", - "integrity": "sha512-/4pns6BYi8MXdwnXM44yoGAcFYVHL/BYlB2q1HXZ6AzH++LaiEVWFpBWQ/glXhbMbv3E3o09igrHFbP/snhAvA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-android-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.3.0.tgz", - "integrity": "sha512-nLO/JsL9idr416vzi3lHm3Xm+QZh4qHij8k3Er13kZr5YhL7/+kBAx84kDmPc7HMexLmwisjDCeDIKNFp8mDlQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.3.0.tgz", - "integrity": "sha512-dGhVBlllt4iHwTGy21IEoMOTN5wZoid19zEIxsdY29xcEiOEHqzDa7Sqrkh5OE7LKCowL61eFJXxYe/+pYa7ZQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-darwin-x64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.3.0.tgz", - "integrity": "sha512-h8wRfHeLEbU3NzaP1Oku7BYXCJQiTRr+8U0lklyOQXxXiEpHLL8tk1hFl+tezoRKLcPJD7joKaK74ASsqt3Ekg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.3.0.tgz", - "integrity": "sha512-wP4VgR/gfV18sylTuym3sxRTkAgUR2vh6YLeX/GEznk5jCYcYSlx585XlcUcl0c8UffIZlRJ09raWSX3JDb4GA==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.3.0.tgz", - "integrity": "sha512-v/14JCYVkqRSJeQbxFx4oUkwVQQw6lFMN7bd4vuARBc3X2lmomkxBsc+BFiIDL/BK+CTx5AOh/k9XmqDnKWRVg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-arm64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.3.0.tgz", - "integrity": "sha512-tNhfYqFH5OxtRzfkTOKdgFYlPSZnlDLNW4+leNEvQZhwTJxoTwsZAAhR97l3qVry/kkLyJPBK+Q8EAJLPinDIg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.3.0.tgz", - "integrity": "sha512-pw77m8QywdsoFdFOgmc8roF1inBI0rciqzO8ffRUgLoq7+ee9o5eFqtEcS6hHOOplgifAUUisP8cAnwl9nUYPw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-linux-x64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.3.0.tgz", - "integrity": "sha512-tJs7v2MnV2F8w6X1UpPHl/43OfxjUy9SuJ2ZPoxn79v9vYteChVYO/ueLHCpRMmyTUIVML3N9z4azl9ENH8Xxg==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-arm64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.3.0.tgz", - "integrity": "sha512-OKGxp6kATQdTyI2DF+e9s+hB3/QZB45b6e+dzcfW1SUqiF6CviWyevhmT4USsMEdP3mlpC9zxLz3Oh+WaTMOSw==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-ia32-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.3.0.tgz", - "integrity": "sha512-DDZ5AH68JJ2ClQFEA1aNnfA7Ybqyeh0644rGbrLOdNehTmzfICHiWSn0OprzYi9HAshTPQvlwrM+bi2kuaIOjQ==", - "dev": true, - "optional": true - }, - "@rollup/rollup-win32-x64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.3.0.tgz", - "integrity": "sha512-dMvGV8p92GQ8jhNlGIKpyhVZPzJlT258pPrM5q2F8lKcc9Iv9BbfdnhX1OfinYWnb9ms5zLw6MlaMnqLfUkKnQ==", - "dev": true, - "optional": true + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } }, "@sindresorhus/is": { "version": "5.6.0", @@ -9549,12 +8718,6 @@ "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", "dev": true }, - "@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, "@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -9570,12 +8733,6 @@ "undici-types": "~5.26.4" } }, - "@types/object-path": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/@types/object-path/-/object-path-0.11.4.tgz", - "integrity": "sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==", - "dev": true - }, "@types/prop-types": { "version": "15.7.6", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.6.tgz", @@ -9602,36 +8759,12 @@ "@types/react": "*" } }, - "@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "dev": true - }, "@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", "dev": true }, - "@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", - "dev": true - }, - "@types/ua-parser-js": { - "version": "0.7.39", - "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz", - "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==", - "dev": true - }, - "@wessberg/stringutil": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/@wessberg/stringutil/-/stringutil-1.0.19.tgz", - "integrity": "sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==", - "dev": true - }, "acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -9675,12 +8808,6 @@ "string-width": "^4.1.0" } }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -9941,7 +9068,6 @@ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, - "peer": true, "requires": { "caniuse-lite": "^1.0.30001541", "electron-to-chromium": "^1.4.535", @@ -9949,50 +9075,6 @@ "update-browserslist-db": "^1.0.13" } }, - "browserslist-generator": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/browserslist-generator/-/browserslist-generator-2.1.0.tgz", - "integrity": "sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==", - "dev": true, - "requires": { - "@mdn/browser-compat-data": "^5.3.7", - "@types/object-path": "^0.11.1", - "@types/semver": "^7.5.0", - "@types/ua-parser-js": "^0.7.36", - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001518", - "isbot": "^3.6.13", - "object-path": "^0.11.8", - "semver": "^7.5.4", - "ua-parser-js": "^1.0.35" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, "buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -10009,12 +9091,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true - }, "bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -10273,54 +9349,6 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "peer": true }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -10354,15 +9382,6 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, - "compatfactory": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/compatfactory/-/compatfactory-3.0.0.tgz", - "integrity": "sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==", - "dev": true, - "requires": { - "helpertypes": "^0.0.19" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -10416,8 +9435,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "peer": true + "dev": true }, "cookie": { "version": "0.5.0", @@ -10447,23 +9465,6 @@ "which": "^2.0.1" } }, - "crosspath": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crosspath/-/crosspath-2.0.0.tgz", - "integrity": "sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==", - "dev": true, - "requires": { - "@types/node": "^17.0.36" - }, - "dependencies": { - "@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "dev": true - } - } - }, "crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", @@ -10536,12 +9537,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true - }, "default-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", @@ -10657,16 +9652,6 @@ "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "dev": true }, - "dts-bundle-generator": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-8.1.2.tgz", - "integrity": "sha512-/yvy9Xw0cfFodA8n6jEq8/COZ/WXgJtPabnLBAzIfP/TfxWbD/0a0dvfqNHneNqswQrH0kUcaAfGJC9UNvH97w==", - "dev": true, - "requires": { - "typescript": ">=5.0.2", - "yargs": "^17.6.0" - } - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -10790,8 +9775,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "peer": true + "dev": true }, "escape-goat": { "version": "4.0.0", @@ -11000,12 +9984,6 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -11280,8 +10258,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "peer": true + "dev": true }, "genversion": { "version": "3.1.1", @@ -11293,12 +10270,6 @@ "find-package": "^1.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -11423,8 +10394,7 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "peer": true + "dev": true }, "globalthis": { "version": "1.0.3", @@ -11544,12 +10514,6 @@ "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", "dev": true }, - "helpertypes": { - "version": "0.0.19", - "resolved": "https://registry.npmjs.org/helpertypes/-/helpertypes-0.0.19.tgz", - "integrity": "sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==", - "dev": true - }, "http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -11889,15 +10853,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "requires": { - "builtin-modules": "^3.3.0" - } - }, "is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -11989,12 +10944,6 @@ "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", "dev": true }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -12157,12 +11106,6 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "isbot": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/isbot/-/isbot-3.7.1.tgz", - "integrity": "sha512-JfqOaY3O1lcWt2nc+D6Mq231CNpwZrBboLa59Go0J8hjGH+gY/Sy0CA/YLUSIScINmAVwTdJZIsOTk4PfBtRuw==", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -12198,6 +11141,34 @@ "iterate-iterator": "^1.0.1" } }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jiti": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", @@ -12222,8 +11193,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "peer": true + "dev": true }, "json-buffer": { "version": "3.0.1", @@ -12253,8 +11223,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "peer": true + "dev": true }, "jsonc-parser": { "version": "3.2.0", @@ -12399,7 +11368,6 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "peer": true, "requires": { "yallist": "^3.0.2" } @@ -12410,15 +11378,6 @@ "integrity": "sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==", "dev": true }, - "magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", - "dev": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -12681,12 +11640,6 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-path": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.8.tgz", - "integrity": "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==", - "dev": true - }, "object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", @@ -13057,8 +12010,7 @@ "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "peer": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "picomatch": { "version": "2.3.1", @@ -13373,12 +12325,6 @@ } } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, "resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", @@ -13460,76 +12406,34 @@ } }, "rollup": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.3.0.tgz", - "integrity": "sha512-scIi1NrKLDIYSPK66jjECtII7vIgdAMFmFo8h6qm++I6nN9qDSV35Ku6erzGVqYjx+lj+j5wkusRMr++8SyDZg==", - "dev": true, - "requires": { - "@rollup/rollup-android-arm-eabi": "4.3.0", - "@rollup/rollup-android-arm64": "4.3.0", - "@rollup/rollup-darwin-arm64": "4.3.0", - "@rollup/rollup-darwin-x64": "4.3.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.3.0", - "@rollup/rollup-linux-arm64-gnu": "4.3.0", - "@rollup/rollup-linux-arm64-musl": "4.3.0", - "@rollup/rollup-linux-x64-gnu": "4.3.0", - "@rollup/rollup-linux-x64-musl": "4.3.0", - "@rollup/rollup-win32-arm64-msvc": "4.3.0", - "@rollup/rollup-win32-ia32-msvc": "4.3.0", - "@rollup/rollup-win32-x64-msvc": "4.3.0", - "fsevents": "~2.3.2" - } - }, - "rollup-plugin-dts": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.0.tgz", - "integrity": "sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==", + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "magic-string": "^0.30.4" + "fsevents": "~2.3.2" } }, - "rollup-plugin-ts": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/rollup-plugin-ts/-/rollup-plugin-ts-3.4.5.tgz", - "integrity": "sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==", + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "requires": { - "@rollup/pluginutils": "^5.0.2", - "@wessberg/stringutil": "^1.0.19", - "ansi-colors": "^4.1.3", - "browserslist": "^4.21.10", - "browserslist-generator": "^2.1.0", - "compatfactory": "^3.0.0", - "crosspath": "^2.0.0", - "magic-string": "^0.30.2", - "ts-clone-node": "^3.0.0", - "tslib": "^2.6.1" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" }, "dependencies": { - "@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "randombytes": "^2.1.0" } - }, - "@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true } } }, @@ -13681,8 +12585,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "peer": true + "dev": true }, "semver-diff": { "version": "4.0.0", @@ -13719,15 +12622,6 @@ } } }, - "serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -13783,12 +12677,6 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true }, - "smob": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz", - "integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==", - "dev": true - }, "socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", @@ -14058,15 +12946,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "ts-clone-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ts-clone-node/-/ts-clone-node-3.0.0.tgz", - "integrity": "sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==", - "dev": true, - "requires": { - "compatfactory": "^3.0.0" - } - }, "tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", @@ -14149,12 +13028,6 @@ "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", "dev": true }, - "ua-parser-js": { - "version": "1.0.37", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", - "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", - "dev": true - }, "ufo": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", @@ -14216,7 +13089,6 @@ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, - "peer": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -14559,18 +13431,11 @@ "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", "dev": true }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "peer": true + "dev": true }, "yaml": { "version": "2.3.3", @@ -14578,21 +13443,6 @@ "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==", "dev": true }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", diff --git a/package.json b/package.json index 3224713..00d800c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@kinde-oss/kinde-auth-nextjs", "version": "2.0.2-beta.6", "description": "Kinde Auth SDK for NextJS", - "type": "module", + "main": "dist/cjs/index.js", "module": "dist/index.js", "typings": "dist/types/index.d.ts", "scripts": { @@ -35,7 +35,6 @@ "@types/react": "^18.2.22", "@types/react-dom": "^18.2.10", "changelogen": "^0.5.5", - "dts-bundle-generator": "^8.1.2", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "genversion": "^3.1.1", @@ -43,7 +42,6 @@ "release-it": "^16.1.3", "rollup": "^2.73.0", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-ts": "^3.4.5", "typescript": "^5.1.3" }, "peerDependencies": { diff --git a/src/server/index.js b/src/server/index.js index a5854cb..0aa696f 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -1,4 +1,4 @@ -export {getKindeServerSession} from '../session/index'; +export {default as getKindeServerSession} from '../session/index'; export {authMiddleware, withAuth} from '../authMiddleware/authMiddleware'; export { LoginLink, From ebf9ddee8318d873739d093dc530c15ca4390508 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:44:06 +1100 Subject: [PATCH 24/30] 2.0.2-beta.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6218453..a62eb21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.6", + "version": "2.0.2-beta.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.6", + "version": "2.0.2-beta.9", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 00d800c..0b40537 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.6", + "version": "2.0.2-beta.9", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From 85614677b9fc180a3ec4d209cc8cabc95e941441 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:54:16 +1100 Subject: [PATCH 25/30] fix: NextResponse not imported --- src/routerClients/AppRouterClient.js | 2 +- src/utils/version.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routerClients/AppRouterClient.js b/src/routerClients/AppRouterClient.js index f429127..9418886 100644 --- a/src/routerClients/AppRouterClient.js +++ b/src/routerClients/AppRouterClient.js @@ -1,7 +1,7 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {cookies} from 'next/headers'; import {redirect} from 'next/navigation'; -import {NextRequest} from 'next/server'; +import {NextRequest, NextResponse} from 'next/server'; import {config} from '../config/index'; import {appRouterSessionManager} from '../session/sessionManager'; import RouterClient from './RouterClient'; diff --git a/src/utils/version.js b/src/utils/version.js index f224e79..81607a6 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.6' +export const version = '2.0.2-beta.9' From 174b02866286217165b31876874ea98138977062 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:54:33 +1100 Subject: [PATCH 26/30] 2.0.2-beta.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a62eb21..4175737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.9", + "version": "2.0.2-beta.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.9", + "version": "2.0.2-beta.10", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index 0b40537..c5299cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.9", + "version": "2.0.2-beta.10", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From c8883fbe653814fb360f02980b418991d929787e Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:56:23 +1100 Subject: [PATCH 27/30] version --- src/utils/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/version.js b/src/utils/version.js index 81607a6..cfe58da 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.9' +export const version = '2.0.2-beta.10' From 0c6ca0b344d47d258b64ceea48364ae528fbd5c7 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Fri, 17 Nov 2023 10:56:51 +1100 Subject: [PATCH 28/30] 2.0.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4175737..4470a30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.10", + "version": "2.0.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.10", + "version": "2.0.9", "dependencies": { "@kinde-oss/kinde-typescript-sdk": "^2.2.3", "cookie": "^0.5.0", diff --git a/package.json b/package.json index c5299cc..6fa5943 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kinde-oss/kinde-auth-nextjs", - "version": "2.0.2-beta.10", + "version": "2.0.9", "description": "Kinde Auth SDK for NextJS", "main": "dist/cjs/index.js", "module": "dist/index.js", From e8f76eb265f2bc809add1bbb8edd968c16d4393c Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Mon, 20 Nov 2023 13:08:25 +1100 Subject: [PATCH 29/30] versino --- src/utils/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/version.js b/src/utils/version.js index cfe58da..9995b8c 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '2.0.2-beta.10' +export const version = '2.0.9' From f08543cf67e7afe12eec49d5f114d90930145028 Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Mon, 20 Nov 2023 13:23:31 +1100 Subject: [PATCH 30/30] fix: handleAuth types --- src/handlers/auth.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/handlers/auth.js b/src/handlers/auth.js index 72844d0..dcafa24 100644 --- a/src/handlers/auth.js +++ b/src/handlers/auth.js @@ -33,6 +33,7 @@ const getRoute = (endpoint) => { /** * @param {object} [request] * @param {string} [endpoint] + * @returns {(req, res) => any} */ export default (request, endpoint) => { // For backwards compatibility in app router