From ebc990d1407a6c6967ce5cc9e9a50158b9d1a3b9 Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Thu, 24 Feb 2022 19:18:02 +0800 Subject: [PATCH] feat(browser-sample): add browser sample pages --- package.json | 3 + packages/browser-sample/package.json | 7 +- .../browser-sample/{src => public}/index.html | 2 +- packages/browser-sample/src/app.js | 6 - packages/browser-sample/src/app.scss | 3 - packages/browser-sample/src/consts.js | 6 + packages/browser-sample/src/index.js | 16 +- packages/browser-sample/src/index.scss | 36 ++ packages/browser-sample/src/pages/Callback.js | 47 ++ packages/browser-sample/src/pages/Home.js | 62 +++ pnpm-lock.yaml | 410 ++---------------- 11 files changed, 202 insertions(+), 396 deletions(-) rename packages/browser-sample/{src => public}/index.html (80%) delete mode 100644 packages/browser-sample/src/app.js delete mode 100644 packages/browser-sample/src/app.scss create mode 100644 packages/browser-sample/src/consts.js create mode 100644 packages/browser-sample/src/index.scss create mode 100644 packages/browser-sample/src/pages/Callback.js create mode 100644 packages/browser-sample/src/pages/Home.js diff --git a/package.json b/package.json index 4db07e08..41560dd0 100644 --- a/package.json +++ b/package.json @@ -20,5 +20,8 @@ "packages": [ "packages/*" ] + }, + "alias": { + "superstruct": "superstruct/lib/index.es.js" } } diff --git a/packages/browser-sample/package.json b/packages/browser-sample/package.json index 16c6a84c..13c74093 100644 --- a/packages/browser-sample/package.json +++ b/packages/browser-sample/package.json @@ -5,8 +5,8 @@ "scripts": { "preinstall": "npx only-allow pnpm", "precommit": "lint-staged", - "start": "parcel src/index.html", - "build": "rm -rf dist && parcel build src/index.html --no-autoinstall", + "start": "parcel public/index.html -p 3000", + "build": "rm -rf dist && parcel build public/index.html --no-autoinstall", "lint": "eslint --ext .js src", "stylelint": "stylelint \"src/**/*.scss\"" }, @@ -18,10 +18,13 @@ "@parcel/transformer-sass": "^2.3.2", "@silverhand/eslint-config": "^0.9.1", "@silverhand/eslint-config-react": "^0.9.1", + "buffer": "^6.0.3", + "eslint": "^8.9.0", "lint-staged": "^12.3.4", "parcel": "^2.3.2", "postcss": "^8.4.6", "prettier": "^2.5.1", + "process": "^0.11.10", "stylelint": "^13.13.1" }, "eslintConfig": { diff --git a/packages/browser-sample/src/index.html b/packages/browser-sample/public/index.html similarity index 80% rename from packages/browser-sample/src/index.html rename to packages/browser-sample/public/index.html index 37b65e60..acc7a5bd 100644 --- a/packages/browser-sample/src/index.html +++ b/packages/browser-sample/public/index.html @@ -9,7 +9,7 @@
- + diff --git a/packages/browser-sample/src/app.js b/packages/browser-sample/src/app.js deleted file mode 100644 index a1de645f..00000000 --- a/packages/browser-sample/src/app.js +++ /dev/null @@ -1,6 +0,0 @@ -import styles from './app.scss'; - -export const init = (element) => { - // eslint-disable-next-line @silverhand/fp/no-mutation - element.innerHTML = `

Hello world!

`; -}; diff --git a/packages/browser-sample/src/app.scss b/packages/browser-sample/src/app.scss deleted file mode 100644 index 79f82850..00000000 --- a/packages/browser-sample/src/app.scss +++ /dev/null @@ -1,3 +0,0 @@ -.app { - color: #aaa; -} diff --git a/packages/browser-sample/src/consts.js b/packages/browser-sample/src/consts.js new file mode 100644 index 00000000..c5de0664 --- /dev/null +++ b/packages/browser-sample/src/consts.js @@ -0,0 +1,6 @@ +export const baseUrl = window.location.origin; +export const redirectUrl = `${baseUrl}/callback`; +export const clientId = 'foo'; + +// OIDC domain +export const endpoint = 'https://logto.dev'; diff --git a/packages/browser-sample/src/index.js b/packages/browser-sample/src/index.js index cfbd4c0a..ced1fe8c 100644 --- a/packages/browser-sample/src/index.js +++ b/packages/browser-sample/src/index.js @@ -1,5 +1,17 @@ -import { init } from './app.js'; +import LogtoClient from '@logto/browser'; + +import { endpoint, clientId } from './consts.js'; +import Callback from './pages/Callback.js'; +import Home from './pages/Home.js'; + +import './index.scss'; + +const logtoClient = new LogtoClient({ endpoint, clientId }); const app = document.querySelector('#app'); -init(app); +// Could replace this with a formal router solution +const isCallback = window.location.pathname.startsWith('/callback'); +const render = isCallback ? Callback : Home; + +render(app, logtoClient); diff --git a/packages/browser-sample/src/index.scss b/packages/browser-sample/src/index.scss new file mode 100644 index 00000000..ec8e972d --- /dev/null +++ b/packages/browser-sample/src/index.scss @@ -0,0 +1,36 @@ +body { + margin: 0; + padding: 0; + font-family: sans-serif; + background: #101419; + color: #dadae0; + text-align: center; +} + +.container { + width: 100%; + padding: 20px; +} + +table { + margin: 50px auto; + table-layout: fixed; + width: 800px; + border: 1px solid #333; + border-spacing: 0; + + th, + td { + padding: 10px; + word-wrap: break-word; + border: 1px solid #333; + } + + th { + font-weight: bold; + } +} + +button { + cursor: pointer; +} diff --git a/packages/browser-sample/src/pages/Callback.js b/packages/browser-sample/src/pages/Callback.js new file mode 100644 index 00000000..3710477c --- /dev/null +++ b/packages/browser-sample/src/pages/Callback.js @@ -0,0 +1,47 @@ +/* eslint-disable @silverhand/fp/no-mutation */ +import { baseUrl } from '../consts.js'; + +const Callback = async (app, logtoClient) => { + if (!logtoClient) { + throw new Error('no logto client found'); + } + + const fragment = document.createDocumentFragment(); + const container = document.createElement('div'); + container.classList.add('container'); + + const h3 = document.createElement('h3'); + h3.innerHTML = 'Authenticating...'; + + container.append(h3); + fragment.append(container); + app.append(fragment); + + await logtoClient.handleSignInCallback(window.location.href); + + if (logtoClient.isAuthenticated) { + h3.innerHTML = 'Signed in!'; + + const h4 = document.createElement('h4'); + container.append(h4); + + // eslint-disable-next-line @silverhand/fp/no-let + let countDown = 3; + h4.innerHTML = `Redirecting back to home page in ${countDown} seconds...`; + + const interval = setInterval(() => { + countDown -= 1; + h4.innerHTML = `Redirecting back to home page in ${countDown} seconds...`; + + if (countDown === 0) { + clearInterval(interval); + window.location.assign(baseUrl); + } + }, 1000); + } else { + h3.innerHTML = 'Sign in failed.'; + } +}; + +export default Callback; +/* eslint-enable @silverhand/fp/no-mutation */ diff --git a/packages/browser-sample/src/pages/Home.js b/packages/browser-sample/src/pages/Home.js new file mode 100644 index 00000000..1ca1766f --- /dev/null +++ b/packages/browser-sample/src/pages/Home.js @@ -0,0 +1,62 @@ +/* eslint-disable @silverhand/fp/no-mutation */ +import { baseUrl, redirectUrl } from '../consts.js'; + +const Home = (app, logtoClient) => { + if (!logtoClient) { + throw new Error('no logto client found'); + } + + const { isAuthenticated } = logtoClient; + const onClickSignIn = () => logtoClient.signIn(redirectUrl); + const onClickSignOut = () => logtoClient.signOut(baseUrl); + + const fragment = document.createDocumentFragment(); + + const container = document.createElement('div'); + container.classList.add('container'); + + const h3 = document.createElement('h3'); + h3.innerHTML = 'Logto Browser Sample'; + + const button = document.createElement('button'); + button.innerHTML = isAuthenticated ? 'Sign Out' : 'Sign In'; + button.addEventListener('click', isAuthenticated ? onClickSignOut : onClickSignIn); + + container.append(h3, button); + + if (isAuthenticated) { + // Generate display table for ID token claims + const table = document.createElement('table'); + + const thead = document.createElement('thead'); + const tr = document.createElement('tr'); + const thName = document.createElement('th'); + const thValue = document.createElement('th'); + thName.innerHTML = 'Name'; + thValue.innerHTML = 'Value'; + tr.append(thName, thValue); + thead.append(tr); + table.append(thead); + + const tbody = document.createElement('tbody'); + const entries = Object.entries(logtoClient.getIdTokenClaims()); + for (const [key, value] of entries) { + const tr = document.createElement('tr'); + const tdName = document.createElement('td'); + const tdValue = document.createElement('td'); + tdName.innerHTML = key; + tdValue.innerHTML = value; + tr.append(tdName, tdValue); + tbody.append(tr); + } + + table.append(tbody); + container.append(table); + } + + fragment.append(container); + app.append(fragment); +}; + +export default Home; +/* eslint-enable @silverhand/fp/no-mutation */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc58863d..49461386 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,22 +76,28 @@ importers: '@parcel/transformer-sass': ^2.3.2 '@silverhand/eslint-config': ^0.9.1 '@silverhand/eslint-config-react': ^0.9.1 + buffer: ^6.0.3 + eslint: ^8.9.0 lint-staged: ^12.3.4 parcel: ^2.3.2 postcss: ^8.4.6 prettier: ^2.5.1 + process: ^0.11.10 stylelint: ^13.13.1 dependencies: '@logto/browser': link:../browser devDependencies: '@parcel/core': 2.3.2 '@parcel/transformer-sass': 2.3.2_@parcel+core@2.3.2 - '@silverhand/eslint-config': 0.9.1_prettier@2.5.1+typescript@4.5.5 - '@silverhand/eslint-config-react': 0.9.1_8e1e1a63dd756434291a86320d5dee2c + '@silverhand/eslint-config': 0.9.1_e76591a86d1a18308a5596326ddf9c7e + '@silverhand/eslint-config-react': 0.9.1_0ef89fbb1934b6d734eb57576b2b6e2d + buffer: 6.0.3 + eslint: 8.9.0 lint-staged: 12.3.4 parcel: 2.3.2_postcss@8.4.6 postcss: 8.4.6 prettier: 2.5.1 + process: 0.11.10 stylelint: 13.13.1 packages/js: @@ -242,19 +248,6 @@ packages: - supports-color dev: true - /@babel/eslint-parser/7.17.0_@babel+core@7.17.5: - resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} - engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} - peerDependencies: - '@babel/core': '>=7.11.0' - eslint: ^7.5.0 || ^8.0.0 - dependencies: - '@babel/core': 7.17.5 - eslint-scope: 5.1.1 - eslint-visitor-keys: 2.1.0 - semver: 6.3.0 - dev: true - /@babel/eslint-parser/7.17.0_@babel+core@7.17.5+eslint@8.9.0: resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -2584,24 +2577,6 @@ packages: - typescript dev: true - /@silverhand/eslint-config-react/0.9.1_8e1e1a63dd756434291a86320d5dee2c: - resolution: {integrity: sha512-ajNInWD91DGy8vkBzNJDSHncA4tXnbREzBxdvdyS0PJzO/dxLgiUx+Hnn5YMKiYIfS5Hbyidj4m2ZljGUbiK+w==} - peerDependencies: - stylelint: ^13.13.1 - dependencies: - '@silverhand/eslint-config': 0.9.1_prettier@2.5.1+typescript@4.5.5 - eslint-config-xo-react: 0.25.0_07cd418ac3f8908390f4bee17ccf7489 - eslint-plugin-react: 7.28.0 - eslint-plugin-react-hooks: 4.3.0 - stylelint: 13.13.1 - stylelint-config-xo-scss: 0.14.0_stylelint@13.13.1 - transitivePeerDependencies: - - eslint - - prettier - - supports-color - - typescript - dev: true - /@silverhand/eslint-config/0.9.1_e76591a86d1a18308a5596326ddf9c7e: resolution: {integrity: sha512-kQJcdR7ElJ22uY/aLUqcmJj3XlcM32R+uoYaqBfWFlh2afHziLkoFD4gM3ZsqRNEW8C/Ji908TNUMSISPXbGUQ==} engines: {node: '>=14.15.0'} @@ -2633,48 +2608,6 @@ packages: - supports-color dev: true - /@silverhand/eslint-config/0.9.1_prettier@2.5.1+typescript@4.5.5: - resolution: {integrity: sha512-kQJcdR7ElJ22uY/aLUqcmJj3XlcM32R+uoYaqBfWFlh2afHziLkoFD4gM3ZsqRNEW8C/Ji908TNUMSISPXbGUQ==} - engines: {node: '>=14.15.0'} - peerDependencies: - eslint: ^8.1.0 - prettier: ^2.3.2 - typescript: ^4.3.5 - dependencies: - '@silverhand/eslint-plugin-fp': 2.5.0 - '@typescript-eslint/eslint-plugin': 5.12.1_c98266ab067bdbead27a0c4c155ee052 - '@typescript-eslint/parser': 5.12.1_typescript@4.5.5 - eslint-config-prettier: 8.4.0 - eslint-config-xo: 0.40.0 - eslint-config-xo-typescript: 0.50.0_ba62746e7c3c2677d50e9e3721a73a9a - eslint-import-resolver-typescript: 2.5.0_eslint-plugin-import@2.25.4 - eslint-plugin-consistent-default-export-name: 0.0.7 - eslint-plugin-eslint-comments: 3.2.0 - eslint-plugin-import: 2.25.4 - eslint-plugin-no-use-extend-native: 0.5.0 - eslint-plugin-node: 11.1.0 - eslint-plugin-prettier: 3.4.1_2d2b5ca7c15e09d7b95a5f1b395d8e4f - eslint-plugin-promise: 6.0.0 - eslint-plugin-sql: 2.1.0 - eslint-plugin-unicorn: 39.0.0 - prettier: 2.5.1 - typescript: 4.5.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@silverhand/eslint-plugin-fp/2.5.0: - resolution: {integrity: sha512-/oLO2Rs9nkhOk+rmC3PsWDvrDKrOfKuRtbSAwH4Scawn5GqAjo7ZXIZXj7RWa4nxLsCGc3ULvaVs1e1m4n6G/A==} - engines: {node: '>=14.15.0'} - peerDependencies: - eslint: ^8.1.0 - dependencies: - create-eslint-index: 1.0.0 - eslint-ast-utils: 1.1.0 - import-modules: 2.1.0 - lodash: 4.17.21 - dev: true - /@silverhand/eslint-plugin-fp/2.5.0_eslint@8.9.0: resolution: {integrity: sha512-/oLO2Rs9nkhOk+rmC3PsWDvrDKrOfKuRtbSAwH4Scawn5GqAjo7ZXIZXj7RWa4nxLsCGc3ULvaVs1e1m4n6G/A==} engines: {node: '>=14.15.0'} @@ -2990,32 +2923,6 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin/5.12.1_c98266ab067bdbead27a0c4c155ee052: - resolution: {integrity: sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/parser': 5.12.1_typescript@4.5.5 - '@typescript-eslint/scope-manager': 5.12.1 - '@typescript-eslint/type-utils': 5.12.1_typescript@4.5.5 - '@typescript-eslint/utils': 5.12.1_typescript@4.5.5 - debug: 4.3.3 - functional-red-black-tree: 1.0.1 - ignore: 5.2.0 - regexpp: 3.2.0 - semver: 7.3.5 - tsutils: 3.21.0_typescript@4.5.5 - typescript: 4.5.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/parser/5.12.1_eslint@8.9.0+typescript@4.5.5: resolution: {integrity: sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3036,25 +2943,6 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.12.1_typescript@4.5.5: - resolution: {integrity: sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.12.1 - '@typescript-eslint/types': 5.12.1 - '@typescript-eslint/typescript-estree': 5.12.1_typescript@4.5.5 - debug: 4.3.3 - typescript: 4.5.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/scope-manager/5.12.1: resolution: {integrity: sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3082,24 +2970,6 @@ packages: - supports-color dev: true - /@typescript-eslint/type-utils/5.12.1_typescript@4.5.5: - resolution: {integrity: sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/utils': 5.12.1_typescript@4.5.5 - debug: 4.3.3 - tsutils: 3.21.0_typescript@4.5.5 - typescript: 4.5.5 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/types/5.12.1: resolution: {integrity: sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3144,23 +3014,6 @@ packages: - typescript dev: true - /@typescript-eslint/utils/5.12.1_typescript@4.5.5: - resolution: {integrity: sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 5.12.1 - '@typescript-eslint/types': 5.12.1 - '@typescript-eslint/typescript-estree': 5.12.1_typescript@4.5.5 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/visitor-keys/5.12.1: resolution: {integrity: sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3736,6 +3589,10 @@ packages: safe-buffer: 5.2.1 dev: true + /base64-js/1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: true + /bcrypt-pbkdf/1.0.2: resolution: {integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=} dependencies: @@ -3802,6 +3659,13 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true + /buffer/6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + /builtin-modules/3.2.0: resolution: {integrity: sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==} engines: {node: '>=6'} @@ -4912,13 +4776,6 @@ packages: lodash.zip: 4.2.0 dev: true - /eslint-config-prettier/8.4.0: - resolution: {integrity: sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dev: true - /eslint-config-prettier/8.4.0_eslint@8.9.0: resolution: {integrity: sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==} hasBin: true @@ -4928,18 +4785,6 @@ packages: eslint: 8.9.0 dev: true - /eslint-config-xo-react/0.25.0_07cd418ac3f8908390f4bee17ccf7489: - resolution: {integrity: sha512-YpABFxnoATAYtxsZQChZEbOkWqzCtcQDRdiUqHhLgG7hzbAEzPDmsRUWnTP8oTVLVFWrbgdf913b8kQJaR1cBA==} - engines: {node: '>=10'} - peerDependencies: - eslint: '>=7' - eslint-plugin-react: '>=7.22.0' - eslint-plugin-react-hooks: '>=4.2.0' - dependencies: - eslint-plugin-react: 7.28.0 - eslint-plugin-react-hooks: 4.3.0 - dev: true - /eslint-config-xo-react/0.25.0_525b37837aa73776ea53a3c7796c062f: resolution: {integrity: sha512-YpABFxnoATAYtxsZQChZEbOkWqzCtcQDRdiUqHhLgG7hzbAEzPDmsRUWnTP8oTVLVFWrbgdf913b8kQJaR1cBA==} engines: {node: '>=10'} @@ -4966,27 +4811,6 @@ packages: typescript: 4.5.5 dev: true - /eslint-config-xo-typescript/0.50.0_ba62746e7c3c2677d50e9e3721a73a9a: - resolution: {integrity: sha512-Ru2tXB8y2w9fFHLm4v2AVfY6P81UbfEuDZuxEpeXlfV65Ezlk0xO4nBaT899ojIFkWfr60rP9Ye4CdVUUT1UYg==} - engines: {node: '>=12'} - peerDependencies: - '@typescript-eslint/eslint-plugin': '>=5.8.0' - eslint: '>=8.0.0' - typescript: '>=4.4' - dependencies: - '@typescript-eslint/eslint-plugin': 5.12.1_c98266ab067bdbead27a0c4c155ee052 - typescript: 4.5.5 - dev: true - - /eslint-config-xo/0.40.0: - resolution: {integrity: sha512-msI1O0JGxeK2bbExg3U6EGaWKcjhOFzEjwzObywG/DC5GSNZTOyJT+b2l9MZGBeZsVdxfIGwdXTNeWXl8cN9iw==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=8.6.0' - dependencies: - confusing-browser-globals: 1.0.11 - dev: true - /eslint-config-xo/0.40.0_eslint@8.9.0: resolution: {integrity: sha512-msI1O0JGxeK2bbExg3U6EGaWKcjhOFzEjwzObywG/DC5GSNZTOyJT+b2l9MZGBeZsVdxfIGwdXTNeWXl8cN9iw==} engines: {node: '>=12'} @@ -5022,23 +4846,6 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/2.5.0_eslint-plugin-import@2.25.4: - resolution: {integrity: sha512-qZ6e5CFr+I7K4VVhQu3M/9xGv9/YmwsEXrsm3nimw8vWaVHRDrQRp26BgCypTxBp3vUp4o5aVEJRiy0F2DFddQ==} - engines: {node: '>=4'} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - dependencies: - debug: 4.3.3 - eslint-plugin-import: 2.25.4 - glob: 7.2.0 - is-glob: 4.0.3 - resolve: 1.22.0 - tsconfig-paths: 3.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-module-utils/2.7.3: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} @@ -5057,16 +4864,6 @@ packages: lodash.upperfirst: 4.3.1 dev: true - /eslint-plugin-es/3.0.1: - resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=4.19.1' - dependencies: - eslint-utils: 2.1.0 - regexpp: 3.2.0 - dev: true - /eslint-plugin-es/3.0.1_eslint@8.9.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} @@ -5078,16 +4875,6 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-eslint-comments/3.2.0: - resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} - engines: {node: '>=6.5.0'} - peerDependencies: - eslint: '>=4.19.1' - dependencies: - escape-string-regexp: 1.0.5 - ignore: 5.2.0 - dev: true - /eslint-plugin-eslint-comments/3.2.0_eslint@8.9.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} @@ -5099,27 +4886,6 @@ packages: ignore: 5.2.0 dev: true - /eslint-plugin-import/2.25.4: - resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - dependencies: - array-includes: 3.1.4 - array.prototype.flat: 1.2.5 - debug: 2.6.9 - doctrine: 2.1.0 - eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3 - has: 1.0.3 - is-core-module: 2.8.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.5 - resolve: 1.22.0 - tsconfig-paths: 3.12.0 - dev: true - /eslint-plugin-import/2.25.4_eslint@8.9.0: resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} engines: {node: '>=4'} @@ -5152,20 +4918,6 @@ packages: is-proto-prop: 2.0.0 dev: true - /eslint-plugin-node/11.1.0: - resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=5.16.0' - dependencies: - eslint-plugin-es: 3.0.1 - eslint-utils: 2.1.0 - ignore: 5.2.0 - minimatch: 3.1.2 - resolve: 1.22.0 - semver: 6.3.0 - dev: true - /eslint-plugin-node/11.1.0_eslint@8.9.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} @@ -5181,22 +4933,6 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-prettier/3.4.1_2d2b5ca7c15e09d7b95a5f1b395d8e4f: - resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} - engines: {node: '>=6.0.0'} - peerDependencies: - eslint: '>=5.0.0' - eslint-config-prettier: '*' - prettier: '>=1.13.0' - peerDependenciesMeta: - eslint-config-prettier: - optional: true - dependencies: - eslint-config-prettier: 8.4.0 - prettier: 2.5.1 - prettier-linter-helpers: 1.0.0 - dev: true - /eslint-plugin-prettier/3.4.1_9f62b85ce3ce02949dbd2ccffcebe95f: resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} engines: {node: '>=6.0.0'} @@ -5214,13 +4950,6 @@ packages: prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-promise/6.0.0: - resolution: {integrity: sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dev: true - /eslint-plugin-promise/6.0.0_eslint@8.9.0: resolution: {integrity: sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5230,13 +4959,6 @@ packages: eslint: 8.9.0 dev: true - /eslint-plugin-react-hooks/4.3.0: - resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - dev: true - /eslint-plugin-react-hooks/4.3.0_eslint@8.9.0: resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} engines: {node: '>=10'} @@ -5246,28 +4968,6 @@ packages: eslint: 8.9.0 dev: true - /eslint-plugin-react/7.28.0: - resolution: {integrity: sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.4 - array.prototype.flatmap: 1.2.5 - doctrine: 2.1.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.2.1 - minimatch: 3.1.2 - object.entries: 1.1.5 - object.fromentries: 2.0.5 - object.hasown: 1.1.0 - object.values: 1.1.5 - prop-types: 15.8.1 - resolve: 2.0.0-next.3 - semver: 6.3.0 - string.prototype.matchall: 4.0.6 - dev: true - /eslint-plugin-react/7.28.0_eslint@8.9.0: resolution: {integrity: sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==} engines: {node: '>=4'} @@ -5291,21 +4991,6 @@ packages: string.prototype.matchall: 4.0.6 dev: true - /eslint-plugin-sql/2.1.0: - resolution: {integrity: sha512-UPapPPhK1ADgQDTogpApiSAh6bYjrt2daYkKCdApHm5KPbq9qR4ca4TPyYod06bAnLgswbri6Z9gEPAy0R+B1A==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=8.1.0' - dependencies: - astring: 1.8.1 - debug: 4.3.3 - lodash: 4.17.21 - pg-formatter: 1.3.0 - sql-parse: 0.1.5 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-plugin-sql/2.1.0_eslint@8.9.0: resolution: {integrity: sha512-UPapPPhK1ADgQDTogpApiSAh6bYjrt2daYkKCdApHm5KPbq9qR4ca4TPyYod06bAnLgswbri6Z9gEPAy0R+B1A==} engines: {node: '>=12'} @@ -5322,31 +5007,6 @@ packages: - supports-color dev: true - /eslint-plugin-unicorn/39.0.0: - resolution: {integrity: sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=7.32.0' - dependencies: - '@babel/helper-validator-identifier': 7.16.7 - ci-info: 3.3.0 - clean-regexp: 1.0.0 - eslint-template-visitor: 2.3.2 - eslint-utils: 3.0.0 - esquery: 1.4.0 - indent-string: 4.0.0 - is-builtin-module: 3.1.0 - lodash: 4.17.21 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.24 - safe-regex: 2.1.1 - semver: 7.3.5 - strip-indent: 3.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-plugin-unicorn/39.0.0_eslint@8.9.0: resolution: {integrity: sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==} engines: {node: '>=12'} @@ -5389,20 +5049,6 @@ packages: estraverse: 5.3.0 dev: true - /eslint-template-visitor/2.3.2: - resolution: {integrity: sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==} - peerDependencies: - eslint: '>=7.0.0' - dependencies: - '@babel/core': 7.17.5 - '@babel/eslint-parser': 7.17.0_@babel+core@7.17.5 - eslint-visitor-keys: 2.1.0 - esquery: 1.4.0 - multimap: 1.1.0 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-template-visitor/2.3.2_eslint@8.9.0: resolution: {integrity: sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==} peerDependencies: @@ -5425,15 +5071,6 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint-visitor-keys: 2.1.0 - dev: true - /eslint-utils/3.0.0_eslint@8.9.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} @@ -6269,6 +5906,10 @@ packages: postcss: 8.4.6 dev: true + /ieee754/1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: true + /ignore-walk/3.0.4: resolution: {integrity: sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==} dependencies: @@ -9349,6 +8990,11 @@ packages: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true + /process/0.11.10: + resolution: {integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI=} + engines: {node: '>= 0.6.0'} + dev: true + /promise-inflight/1.0.1: resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} dev: true