diff --git a/packages/cli/package.json b/packages/cli/package.json index 2633af674..0795db1eb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -69,8 +69,8 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/inquirer": "^9.0.0", "@types/jest": "^29.4.0", "@types/node": "^18.11.18", diff --git a/packages/cli/src/commands/connector/add.ts b/packages/cli/src/commands/connector/add.ts index 9897ca647..086ab2372 100644 --- a/packages/cli/src/commands/connector/add.ts +++ b/packages/cli/src/commands/connector/add.ts @@ -1,6 +1,7 @@ import type { CommandModule } from 'yargs'; import { log } from '../../utils.js'; + import { addConnectors, addOfficialConnectors, inquireInstancePath } from './utils.js'; const add: CommandModule< diff --git a/packages/cli/src/commands/connector/list.ts b/packages/cli/src/commands/connector/list.ts index b749189d4..cc0130103 100644 --- a/packages/cli/src/commands/connector/list.ts +++ b/packages/cli/src/commands/connector/list.ts @@ -2,6 +2,7 @@ import chalk from 'chalk'; import type { CommandModule } from 'yargs'; import type { ConnectorPackage } from '../../utils.js'; + import { getConnectorPackagesFrom, isOfficialConnector } from './utils.js'; const logConnectorNames = (type: string, packages: ConnectorPackage[]) => { diff --git a/packages/cli/src/commands/connector/remove.ts b/packages/cli/src/commands/connector/remove.ts index 810f7ac99..e8ba14fd1 100644 --- a/packages/cli/src/commands/connector/remove.ts +++ b/packages/cli/src/commands/connector/remove.ts @@ -1,9 +1,10 @@ -import fs from 'fs/promises'; +import fs from 'node:fs/promises'; import chalk from 'chalk'; import type { CommandModule } from 'yargs'; import { log } from '../../utils.js'; + import { getConnectorPackagesFrom } from './utils.js'; const remove: CommandModule<{ path?: string }, { path?: string; packages?: string[] }> = { diff --git a/packages/cli/src/commands/connector/utils.ts b/packages/cli/src/commands/connector/utils.ts index d76fe567d..847300117 100644 --- a/packages/cli/src/commands/connector/utils.ts +++ b/packages/cli/src/commands/connector/utils.ts @@ -1,8 +1,8 @@ -import { exec } from 'child_process'; -import { existsSync } from 'fs'; -import fs from 'fs/promises'; -import path from 'path'; -import { promisify } from 'util'; +import { exec } from 'node:child_process'; +import { existsSync } from 'node:fs'; +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { promisify } from 'node:util'; import { assert, conditionalArray, conditionalString, trySafe } from '@silverhand/essentials'; import chalk from 'chalk'; diff --git a/packages/cli/src/commands/database/alteration/index.ts b/packages/cli/src/commands/database/alteration/index.ts index fb919d62f..d59a64b9d 100644 --- a/packages/cli/src/commands/database/alteration/index.ts +++ b/packages/cli/src/commands/database/alteration/index.ts @@ -10,6 +10,7 @@ import { updateDatabaseTimestamp, } from '../../../queries/system.js'; import { log } from '../../../utils.js'; + import type { AlterationFile } from './type.js'; import { getAlterationFiles, getTimestampFromFilename } from './utils.js'; import { chooseAlterationsByVersion, chooseRevertAlterationsByVersion } from './version.js'; diff --git a/packages/cli/src/commands/database/alteration/utils.ts b/packages/cli/src/commands/database/alteration/utils.ts index 5683f0234..b5faea162 100644 --- a/packages/cli/src/commands/database/alteration/utils.ts +++ b/packages/cli/src/commands/database/alteration/utils.ts @@ -1,11 +1,12 @@ -import { existsSync } from 'fs'; -import fs from 'fs/promises'; +import { existsSync } from 'node:fs'; +import fs from 'node:fs/promises'; +import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import path from 'path'; import { findPackage } from '@logto/shared'; import { getPathInModule } from '../../../utils.js'; + import type { AlterationFile } from './type.js'; const currentDirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/packages/cli/src/commands/database/alteration/version.ts b/packages/cli/src/commands/database/alteration/version.ts index f7546e017..47b271960 100644 --- a/packages/cli/src/commands/database/alteration/version.ts +++ b/packages/cli/src/commands/database/alteration/version.ts @@ -4,6 +4,7 @@ import inquirer from 'inquirer'; import { SemVer, compare, eq, gt } from 'semver'; import { findLastIndex, isTty, log } from '../../../utils.js'; + import type { AlterationFile } from './type.js'; const getVersionStringFromFilename = (filename: string) => diff --git a/packages/cli/src/commands/database/config.ts b/packages/cli/src/commands/database/config.ts index 1b6800f3c..8ee6d3f8c 100644 --- a/packages/cli/src/commands/database/config.ts +++ b/packages/cli/src/commands/database/config.ts @@ -12,6 +12,7 @@ import type { CommandModule } from 'yargs'; import { createPoolFromConfig } from '../../database.js'; import { getRowsByKeys, updateValueByKey } from '../../queries/logto-config.js'; import { log } from '../../utils.js'; + import { generateOidcCookieKey, generateOidcPrivateKey } from './utils.js'; const validKeysDisplay = chalk.green(logtoConfigKeys.join(', ')); diff --git a/packages/cli/src/commands/database/seed/index.ts b/packages/cli/src/commands/database/seed/index.ts index bb9dfad23..eb5d5c43d 100644 --- a/packages/cli/src/commands/database/seed/index.ts +++ b/packages/cli/src/commands/database/seed/index.ts @@ -7,6 +7,7 @@ import { doesConfigsTableExist } from '../../../queries/logto-config.js'; import { log, oraPromise } from '../../../utils.js'; import { getLatestAlterationTimestamp } from '../alteration/index.js'; import { getAlterationDirectory } from '../alteration/utils.js'; + import { createTables, seedCloud, seedTables } from './tables.js'; export const seedByPool = async (pool: DatabasePool, cloud = false) => { diff --git a/packages/cli/src/commands/database/seed/oidc-config.ts b/packages/cli/src/commands/database/seed/oidc-config.ts index b37364156..c948aa4a0 100644 --- a/packages/cli/src/commands/database/seed/oidc-config.ts +++ b/packages/cli/src/commands/database/seed/oidc-config.ts @@ -1,4 +1,4 @@ -import { readFile } from 'fs/promises'; +import { readFile } from 'node:fs/promises'; import type { LogtoOidcConfigType } from '@logto/schemas'; import { LogtoOidcConfigKey, logtoConfigGuards } from '@logto/schemas'; diff --git a/packages/cli/src/commands/database/seed/tables.ts b/packages/cli/src/commands/database/seed/tables.ts index a65962105..9f1f8c48c 100644 --- a/packages/cli/src/commands/database/seed/tables.ts +++ b/packages/cli/src/commands/database/seed/tables.ts @@ -1,5 +1,5 @@ -import { readdir, readFile } from 'fs/promises'; -import path from 'path'; +import { readdir, readFile } from 'node:fs/promises'; +import path from 'node:path'; import { createDefaultAdminConsoleConfig, @@ -26,6 +26,7 @@ import { insertInto } from '../../../database.js'; import { getDatabaseName } from '../../../queries/database.js'; import { updateDatabaseTimestamp } from '../../../queries/system.js'; import { getPathInModule, log } from '../../../utils.js'; + import { appendAdminConsoleRedirectUris } from './cloud.js'; import { seedOidcConfigs } from './oidc-config.js'; import { assignScopesToRole, createTenant, seedAdminData } from './tenant.js'; diff --git a/packages/cli/src/commands/database/seed/tenant.ts b/packages/cli/src/commands/database/seed/tenant.ts index d09604407..676b999f7 100644 --- a/packages/cli/src/commands/database/seed/tenant.ts +++ b/packages/cli/src/commands/database/seed/tenant.ts @@ -1,6 +1,11 @@ import { generateStandardId } from '@logto/core-kit'; -import type { TenantModel, AdminData, UpdateAdminData, CreateScope } from '@logto/schemas'; -import { CreateRolesScope } from '@logto/schemas'; +import type { + TenantModel, + AdminData, + UpdateAdminData, + CreateScope, + CreateRolesScope, +} from '@logto/schemas'; import { createTenantMetadata } from '@logto/shared'; import { assert } from '@silverhand/essentials'; import type { CommonQueryMethods } from 'slonik'; diff --git a/packages/cli/src/commands/database/utils.ts b/packages/cli/src/commands/database/utils.ts index 86e6e0873..180d88eff 100644 --- a/packages/cli/src/commands/database/utils.ts +++ b/packages/cli/src/commands/database/utils.ts @@ -1,5 +1,5 @@ -import { generateKeyPair } from 'crypto'; -import { promisify } from 'util'; +import { generateKeyPair } from 'node:crypto'; +import { promisify } from 'node:util'; import { generateStandardId } from '@logto/core-kit'; diff --git a/packages/cli/src/commands/install/index.ts b/packages/cli/src/commands/install/index.ts index 965ffe8c5..7dfb5ff21 100644 --- a/packages/cli/src/commands/install/index.ts +++ b/packages/cli/src/commands/install/index.ts @@ -3,6 +3,7 @@ import type { CommandModule } from 'yargs'; import { getDatabaseUrlFromConfig } from '../../database.js'; import { log } from '../../utils.js'; + import { validateNodeVersion, inquireInstancePath, diff --git a/packages/cli/src/commands/install/utils.ts b/packages/cli/src/commands/install/utils.ts index 8fd41b9ba..594b858fd 100644 --- a/packages/cli/src/commands/install/utils.ts +++ b/packages/cli/src/commands/install/utils.ts @@ -1,8 +1,8 @@ -import { execSync } from 'child_process'; -import { existsSync } from 'fs'; -import fs from 'fs/promises'; -import os from 'os'; -import path from 'path'; +import { execSync } from 'node:child_process'; +import { existsSync } from 'node:fs'; +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; import { assert } from '@silverhand/essentials'; import chalk from 'chalk'; diff --git a/packages/cli/src/connector/loader.ts b/packages/cli/src/connector/loader.ts index bd2ba7dba..c87a09971 100644 --- a/packages/cli/src/connector/loader.ts +++ b/packages/cli/src/connector/loader.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import type { AllConnector, CreateConnector } from '@logto/connector-kit'; import connectorKitMeta from '@logto/connector-kit/package.json' assert { type: 'json' }; diff --git a/packages/cli/src/connector/utils.ts b/packages/cli/src/connector/utils.ts index 4aa982da9..9e0e21222 100644 --- a/packages/cli/src/connector/utils.ts +++ b/packages/cli/src/connector/utils.ts @@ -1,6 +1,6 @@ -import { existsSync } from 'fs'; -import { readFile } from 'fs/promises'; -import path from 'path'; +import { existsSync } from 'node:fs'; +import { readFile } from 'node:fs/promises'; +import path from 'node:path'; import type { AllConnector, diff --git a/packages/cli/src/queries/system.test.ts b/packages/cli/src/queries/system.test.ts index 415c47c57..8eda604e2 100644 --- a/packages/cli/src/queries/system.test.ts +++ b/packages/cli/src/queries/system.test.ts @@ -5,6 +5,7 @@ import { createMockPool, createMockQueryResult, sql } from 'slonik'; import type { QueryType } from '../test-utils.js'; import { expectSqlAssert } from '../test-utils.js'; + import { updateDatabaseTimestamp, getCurrentDatabaseAlterationTimestamp } from './system.js'; const { jest } = import.meta; diff --git a/packages/cli/src/utils.ts b/packages/cli/src/utils.ts index 60310ea61..16e790792 100644 --- a/packages/cli/src/utils.ts +++ b/packages/cli/src/utils.ts @@ -1,8 +1,8 @@ -import { execSync } from 'child_process'; -import { createWriteStream, existsSync } from 'fs'; -import { readdir, readFile } from 'fs/promises'; -import { createRequire } from 'module'; -import path from 'path'; +import { execSync } from 'node:child_process'; +import { createWriteStream, existsSync } from 'node:fs'; +import { readdir, readFile } from 'node:fs/promises'; +import { createRequire } from 'node:module'; +import path from 'node:path'; import type { Optional } from '@silverhand/essentials'; import { conditionalString } from '@silverhand/essentials'; diff --git a/packages/cloud/package.json b/packages/cloud/package.json index 72a1817fe..5069b1a76 100644 --- a/packages/cloud/package.json +++ b/packages/cloud/package.json @@ -44,9 +44,9 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/jest-config": "^2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/jest-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/accepts": "^1.3.5", "@types/http-proxy": "^1.17.9", "@types/jest": "^29.4.0", diff --git a/packages/cloud/src/queries/tenants.ts b/packages/cloud/src/queries/tenants.ts index 912ff4934..4612cbe95 100644 --- a/packages/cloud/src/queries/tenants.ts +++ b/packages/cloud/src/queries/tenants.ts @@ -1,14 +1,13 @@ import assert from 'node:assert'; import { generateStandardId } from '@logto/core-kit'; -import type { AdminData, TenantModel } from '@logto/schemas'; import { adminConsoleApplicationId, adminTenantId, getManagementApiResourceIndicator, PredefinedScope, - CreateRolesScope, } from '@logto/schemas'; +import type { AdminData, TenantModel, CreateRolesScope } from '@logto/schemas'; import type { PostgreSql } from '@withtyped/postgres'; import { jsonb, dangerousRaw, id, sql } from '@withtyped/postgres'; import type { Queryable } from '@withtyped/server'; diff --git a/packages/cloud/src/utils/connector/index.ts b/packages/cloud/src/utils/connector/index.ts index eee70ec2c..c4ddce6e5 100644 --- a/packages/cloud/src/utils/connector/index.ts +++ b/packages/cloud/src/utils/connector/index.ts @@ -1,6 +1,6 @@ -import { existsSync } from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import { existsSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { loadConnectorFactories as _loadConnectorFactories } from '@logto/cli/lib/connector/index.js'; import { connectorDirectory } from '@logto/cli/lib/constants.js'; diff --git a/packages/console/package.json b/packages/console/package.json index da9de0da3..387152b1c 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -35,11 +35,11 @@ "@parcel/transformer-mdx": "2.8.3", "@parcel/transformer-sass": "2.8.3", "@parcel/transformer-svg-react": "2.8.3", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/eslint-config-react": "2.0.1", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/eslint-config-react": "3.0.0", "@silverhand/essentials": "^2.5.0", - "@silverhand/ts-config": "2.0.3", - "@silverhand/ts-config-react": "2.0.3", + "@silverhand/ts-config": "3.0.0", + "@silverhand/ts-config-react": "3.0.0", "@tsconfig/docusaurus": "^1.0.5", "@types/color": "^3.0.3", "@types/mdx": "^2.0.1", diff --git a/packages/console/src/components/ActionMenu/index.tsx b/packages/console/src/components/ActionMenu/index.tsx index a800e18df..cadde0567 100644 --- a/packages/console/src/components/ActionMenu/index.tsx +++ b/packages/console/src/components/ActionMenu/index.tsx @@ -6,6 +6,7 @@ import type { HorizontalAlignment } from '@/types/positioning'; import type { Props as ButtonProps } from '../Button'; import Dropdown from '../Dropdown'; + import ActionMenuButton from './ActionMenuButton'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/components/Alert/index.tsx b/packages/console/src/components/Alert/index.tsx index 63de97e83..08f62b4ca 100644 --- a/packages/console/src/components/Alert/index.tsx +++ b/packages/console/src/components/Alert/index.tsx @@ -7,6 +7,7 @@ import Info from '@/assets/images/info.svg'; import Button from '../Button'; import TextLink from '../TextLink'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/AuditLogTable/index.tsx b/packages/console/src/components/AuditLogTable/index.tsx index ce06e1db9..49e0837d3 100644 --- a/packages/console/src/components/AuditLogTable/index.tsx +++ b/packages/console/src/components/AuditLogTable/index.tsx @@ -15,6 +15,7 @@ import { buildUrl } from '@/utils/url'; import EmptyDataPlaceholder from '../EmptyDataPlaceholder'; import Table from '../Table'; import type { Column } from '../Table/types'; + import ApplicationSelector from './components/ApplicationSelector'; import EventName from './components/EventName'; import EventSelector from './components/EventSelector'; diff --git a/packages/console/src/components/Button/index.tsx b/packages/console/src/components/Button/index.tsx index 0c917708c..5cbbdd82d 100644 --- a/packages/console/src/components/Button/index.tsx +++ b/packages/console/src/components/Button/index.tsx @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next'; import { Ring as Spinner } from '@/components/Spinner'; import type DangerousRaw from '../DangerousRaw'; + import * as styles from './index.module.scss'; export type ButtonType = diff --git a/packages/console/src/components/CardTitle/index.tsx b/packages/console/src/components/CardTitle/index.tsx index e196f9788..f7f9af9f4 100644 --- a/packages/console/src/components/CardTitle/index.tsx +++ b/packages/console/src/components/CardTitle/index.tsx @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'; import type DangerousRaw from '../DangerousRaw'; import TextLink from '../TextLink'; + import * as styles from './index.module.scss'; export type Props = { diff --git a/packages/console/src/components/Checkbox/index.tsx b/packages/console/src/components/Checkbox/index.tsx index f0317e8e2..7aefc66ef 100644 --- a/packages/console/src/components/Checkbox/index.tsx +++ b/packages/console/src/components/Checkbox/index.tsx @@ -5,6 +5,7 @@ import { useLayoutEffect, useState } from 'react'; import { onKeyDownHandler } from '@/utils/a11y'; import { Tooltip } from '../Tip'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/CodeEditor/index.tsx b/packages/console/src/components/CodeEditor/index.tsx index 1671dcdbb..2a3c90326 100644 --- a/packages/console/src/components/CodeEditor/index.tsx +++ b/packages/console/src/components/CodeEditor/index.tsx @@ -6,6 +6,7 @@ import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter'; import { a11yDark as a11yDarkTheme } from 'react-syntax-highlighter/dist/esm/styles/prism'; import CopyToClipboard from '../CopyToClipboard'; + import * as styles from './index.module.scss'; import { lineNumberContainerStyle, lineNumberStyle, customStyle } from './utils'; diff --git a/packages/console/src/components/ConfirmModal/index.tsx b/packages/console/src/components/ConfirmModal/index.tsx index 09bfc5f8b..deae8de8a 100644 --- a/packages/console/src/components/ConfirmModal/index.tsx +++ b/packages/console/src/components/ConfirmModal/index.tsx @@ -8,6 +8,7 @@ import Button from '@/components/Button'; import * as modalStyles from '@/scss/modal.module.scss'; import ModalLayout from '../ModalLayout'; + import * as styles from './index.module.scss'; export type ConfirmModalProps = { diff --git a/packages/console/src/components/ConnectorLogo/index.tsx b/packages/console/src/components/ConnectorLogo/index.tsx index 06ca89b32..2b99f28c8 100644 --- a/packages/console/src/components/ConnectorLogo/index.tsx +++ b/packages/console/src/components/ConnectorLogo/index.tsx @@ -5,6 +5,7 @@ import classNames from 'classnames'; import useTheme from '@/hooks/use-theme'; import ImageWithErrorFallback from '../ImageWithErrorFallback'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/CopyToClipboard/index.tsx b/packages/console/src/components/CopyToClipboard/index.tsx index 35fd1fdc2..bb0befae8 100644 --- a/packages/console/src/components/CopyToClipboard/index.tsx +++ b/packages/console/src/components/CopyToClipboard/index.tsx @@ -11,6 +11,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import IconButton from '../IconButton'; import { Tooltip } from '../Tip'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/DetailsForm/index.tsx b/packages/console/src/components/DetailsForm/index.tsx index 1f9e3a2a2..d4d24e558 100644 --- a/packages/console/src/components/DetailsForm/index.tsx +++ b/packages/console/src/components/DetailsForm/index.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import type { ReactNode } from 'react'; import SubmitFormChangesActionBar from '../SubmitFormChangesActionBar'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/DetailsPage/index.tsx b/packages/console/src/components/DetailsPage/index.tsx index d2ca1b4a6..3a4f3f041 100644 --- a/packages/console/src/components/DetailsPage/index.tsx +++ b/packages/console/src/components/DetailsPage/index.tsx @@ -10,6 +10,7 @@ import type DangerousRaw from '../DangerousRaw'; import DetailsSkeleton from '../DetailsSkeleton'; import RequestDataError from '../RequestDataError'; import TextLink from '../TextLink'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Drawer/index.tsx b/packages/console/src/components/Drawer/index.tsx index 29e6a8b17..420df76b3 100644 --- a/packages/console/src/components/Drawer/index.tsx +++ b/packages/console/src/components/Drawer/index.tsx @@ -6,6 +6,7 @@ import Close from '@/assets/images/close.svg'; import CardTitle from '../CardTitle'; import IconButton from '../IconButton'; import Spacer from '../Spacer'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Dropdown/index.tsx b/packages/console/src/components/Dropdown/index.tsx index c86a78b00..15636de3c 100644 --- a/packages/console/src/components/Dropdown/index.tsx +++ b/packages/console/src/components/Dropdown/index.tsx @@ -14,6 +14,7 @@ import type { HorizontalAlignment } from '@/types/positioning'; import { onKeyDownHandler } from '@/utils/a11y'; import OverlayScrollbar from '../OverlayScrollbar'; + import * as styles from './index.module.scss'; export { default as DropdownItem } from './DropdownItem'; diff --git a/packages/console/src/components/FormCard/index.tsx b/packages/console/src/components/FormCard/index.tsx index 28c8f346e..3dc4bfd06 100644 --- a/packages/console/src/components/FormCard/index.tsx +++ b/packages/console/src/components/FormCard/index.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import Card from '../Card'; import TextLink from '../TextLink'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/FormField/index.tsx b/packages/console/src/components/FormField/index.tsx index 3b8963bd6..d3ba7fe2d 100644 --- a/packages/console/src/components/FormField/index.tsx +++ b/packages/console/src/components/FormField/index.tsx @@ -10,6 +10,7 @@ import IconButton from '../IconButton'; import Spacer from '../Spacer'; import { ToggleTip } from '../Tip'; import type { Props as ToggleTipProps } from '../Tip/ToggleTip'; + import * as styles from './index.module.scss'; export type Props = { diff --git a/packages/console/src/components/LivePreviewButton/index.tsx b/packages/console/src/components/LivePreviewButton/index.tsx index 644cf8172..528c217b3 100644 --- a/packages/console/src/components/LivePreviewButton/index.tsx +++ b/packages/console/src/components/LivePreviewButton/index.tsx @@ -10,6 +10,7 @@ import useConfigs from '@/hooks/use-configs'; import type { Props as ButtonProps, ButtonType } from '../Button'; import Button from '../Button'; import { Tooltip } from '../Tip'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Markdown/index.tsx b/packages/console/src/components/Markdown/index.tsx index 64d3be613..9faad93a3 100644 --- a/packages/console/src/components/Markdown/index.tsx +++ b/packages/console/src/components/Markdown/index.tsx @@ -6,6 +6,7 @@ import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import CodeEditor from '../CodeEditor'; + import GithubRawImage from './components/GithubRawImage'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/components/ModalLayout/index.tsx b/packages/console/src/components/ModalLayout/index.tsx index 84d3cc265..f7b32463c 100644 --- a/packages/console/src/components/ModalLayout/index.tsx +++ b/packages/console/src/components/ModalLayout/index.tsx @@ -7,6 +7,7 @@ import Card from '../Card'; import type { Props as CardTitleProps } from '../CardTitle'; import CardTitle from '../CardTitle'; import IconButton from '../IconButton'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/MultiTextInput/index.tsx b/packages/console/src/components/MultiTextInput/index.tsx index 22e6a2605..d19637bb8 100644 --- a/packages/console/src/components/MultiTextInput/index.tsx +++ b/packages/console/src/components/MultiTextInput/index.tsx @@ -12,6 +12,7 @@ import Button from '../Button'; import ConfirmModal from '../ConfirmModal'; import IconButton from '../IconButton'; import TextInput from '../TextInput'; + import * as styles from './index.module.scss'; import type { MultiTextInputError } from './types'; diff --git a/packages/console/src/components/MultiTextInputField/index.tsx b/packages/console/src/components/MultiTextInputField/index.tsx index 2ebcff415..40e4899e0 100644 --- a/packages/console/src/components/MultiTextInputField/index.tsx +++ b/packages/console/src/components/MultiTextInputField/index.tsx @@ -5,6 +5,7 @@ import FormField from '@/components/FormField'; import type { Props as MultiTextInputProps } from '@/components/MultiTextInput'; import MultiTextInput from '../MultiTextInput'; + import * as styles from './index.module.scss'; type Props = MultiTextInputProps & diff --git a/packages/console/src/components/Pagination/index.tsx b/packages/console/src/components/Pagination/index.tsx index 7f0f10979..3b97abb65 100644 --- a/packages/console/src/components/Pagination/index.tsx +++ b/packages/console/src/components/Pagination/index.tsx @@ -6,6 +6,7 @@ import useCacheValue from '@/hooks/use-cache-value'; import Button from '../Button'; import DangerousRaw from '../DangerousRaw'; + import Next from './Next'; import Previous from './Previous'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/components/PermissionsTable/index.tsx b/packages/console/src/components/PermissionsTable/index.tsx index 8a6dfbaee..ab5246310 100644 --- a/packages/console/src/components/PermissionsTable/index.tsx +++ b/packages/console/src/components/PermissionsTable/index.tsx @@ -20,6 +20,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import EmptyDataPlaceholder from '../EmptyDataPlaceholder'; import type { Props as PaginationProps } from '../Pagination'; import TablePlaceholder from '../Table/TablePlaceholder'; + import * as styles from './index.module.scss'; type SearchProps = { diff --git a/packages/console/src/components/RadioGroup/Radio.tsx b/packages/console/src/components/RadioGroup/Radio.tsx index dc89da024..a890f243a 100644 --- a/packages/console/src/components/RadioGroup/Radio.tsx +++ b/packages/console/src/components/RadioGroup/Radio.tsx @@ -5,6 +5,7 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import type DangerousRaw from '../DangerousRaw'; + import * as styles from './Radio.module.scss'; function Check() { diff --git a/packages/console/src/components/RequestDataError/index.tsx b/packages/console/src/components/RequestDataError/index.tsx index ff306b536..f3cd07c0e 100644 --- a/packages/console/src/components/RequestDataError/index.tsx +++ b/packages/console/src/components/RequestDataError/index.tsx @@ -9,6 +9,7 @@ import useTheme from '@/hooks/use-theme'; import Button from '../Button'; import Card from '../Card'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx index 513407b47..de8f7f8ce 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx @@ -11,6 +11,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import type { DetailedResourceResponse } from '../../types'; import SourceScopeItem from '../SourceScopeItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx index 29608a5cf..c952c5c63 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx @@ -15,6 +15,7 @@ import type { RequestError } from '@/hooks/use-api'; import * as transferLayout from '@/scss/transfer.module.scss'; import ResourceItem from '../ResourceItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx index 508db33d2..f539ed79c 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import * as transferLayout from '@/scss/transfer.module.scss'; import TargetScopeItem from '../TargetScopeItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/RoleUsersTransfer/components/SourceUsersBox/index.tsx b/packages/console/src/components/RoleUsersTransfer/components/SourceUsersBox/index.tsx index d2d64eb6a..157d706ed 100644 --- a/packages/console/src/components/RoleUsersTransfer/components/SourceUsersBox/index.tsx +++ b/packages/console/src/components/RoleUsersTransfer/components/SourceUsersBox/index.tsx @@ -17,6 +17,7 @@ import * as transferLayout from '@/scss/transfer.module.scss'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import SourceUserItem from '../SourceUserItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/RoleUsersTransfer/components/TargetUsersBox/index.tsx b/packages/console/src/components/RoleUsersTransfer/components/TargetUsersBox/index.tsx index 425d548fa..df9b11f15 100644 --- a/packages/console/src/components/RoleUsersTransfer/components/TargetUsersBox/index.tsx +++ b/packages/console/src/components/RoleUsersTransfer/components/TargetUsersBox/index.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import * as transferLayout from '@/scss/transfer.module.scss'; import TargetUserItem from '../TargetUserItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Search/index.tsx b/packages/console/src/components/Search/index.tsx index 5bdca5423..497a6af44 100644 --- a/packages/console/src/components/Search/index.tsx +++ b/packages/console/src/components/Search/index.tsx @@ -6,6 +6,7 @@ import SearchIcon from '@/assets/images/search.svg'; import Button from '../Button'; import TextInput from '../TextInput'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Select/index.tsx b/packages/console/src/components/Select/index.tsx index 0bb154e90..ba893b5dc 100644 --- a/packages/console/src/components/Select/index.tsx +++ b/packages/console/src/components/Select/index.tsx @@ -9,6 +9,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import Dropdown, { DropdownItem } from '../Dropdown'; import IconButton from '../IconButton'; + import * as styles from './index.module.scss'; export type Option = { diff --git a/packages/console/src/components/SessionExpired/index.tsx b/packages/console/src/components/SessionExpired/index.tsx index 7d375c8ec..59338e093 100644 --- a/packages/console/src/components/SessionExpired/index.tsx +++ b/packages/console/src/components/SessionExpired/index.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'; import AppError from '../AppError'; import Button from '../Button'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx b/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx index 2898c7d2f..3fc49f8a4 100644 --- a/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx +++ b/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx @@ -6,6 +6,7 @@ import Sun from '@/assets/images/sun.svg'; import type { Props as ButtonProps } from '../../../Button'; import Button from '../../../Button'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx index a18a8235e..4bdc522b0 100644 --- a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx +++ b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx @@ -1,6 +1,7 @@ import classNames from 'classnames'; import Button from '../Button'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Table/TableError.tsx b/packages/console/src/components/Table/TableError.tsx index f2d68672a..841bfec1e 100644 --- a/packages/console/src/components/Table/TableError.tsx +++ b/packages/console/src/components/Table/TableError.tsx @@ -6,6 +6,7 @@ import RequestErrorImage from '@/assets/images/request-error.svg'; import useTheme from '@/hooks/use-theme'; import Button from '../Button'; + import * as styles from './TableError.module.scss'; type Props = { diff --git a/packages/console/src/components/Table/TablePlaceholder.tsx b/packages/console/src/components/Table/TablePlaceholder.tsx index 47a8ea8a5..451c5f575 100644 --- a/packages/console/src/components/Table/TablePlaceholder.tsx +++ b/packages/console/src/components/Table/TablePlaceholder.tsx @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'; import useTheme from '@/hooks/use-theme'; import TextLink from '../TextLink'; + import * as styles from './TablePlaceholder.module.scss'; type Props = { diff --git a/packages/console/src/components/Table/index.tsx b/packages/console/src/components/Table/index.tsx index 51d6bae8e..7dd5ed96b 100644 --- a/packages/console/src/components/Table/index.tsx +++ b/packages/console/src/components/Table/index.tsx @@ -8,6 +8,7 @@ import type { Props as PaginationProps } from '@/components/Pagination'; import Pagination from '@/components/Pagination'; import OverlayScrollbar from '../OverlayScrollbar'; + import TableEmptyWrapper from './TableEmptyWrapper'; import TableError from './TableError'; import TableLoading from './TableLoading'; diff --git a/packages/console/src/components/Tip/ToggleTip/index.tsx b/packages/console/src/components/Tip/ToggleTip/index.tsx index 417624f7f..12afdcdd5 100644 --- a/packages/console/src/components/Tip/ToggleTip/index.tsx +++ b/packages/console/src/components/Tip/ToggleTip/index.tsx @@ -14,6 +14,7 @@ import { getVerticalOffset, getHorizontalOffset, } from '../TipBubble/utils'; + import * as styles from './index.module.scss'; export type Props = { diff --git a/packages/console/src/components/Tip/Tooltip/index.tsx b/packages/console/src/components/Tip/Tooltip/index.tsx index 41cf83063..4d2e2debe 100644 --- a/packages/console/src/components/Tip/Tooltip/index.tsx +++ b/packages/console/src/components/Tip/Tooltip/index.tsx @@ -14,6 +14,7 @@ import { getVerticalOffset, getHorizontalOffset, } from '../TipBubble/utils'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/Uploader/FileUploader/index.tsx b/packages/console/src/components/Uploader/FileUploader/index.tsx index 759d57b82..0da2b89ed 100644 --- a/packages/console/src/components/Uploader/FileUploader/index.tsx +++ b/packages/console/src/components/Uploader/FileUploader/index.tsx @@ -10,6 +10,7 @@ import useApi from '@/hooks/use-api'; import { convertToFileExtensionArray } from '@/utils/uploader'; import { Ring } from '../../Spinner'; + import * as styles from './index.module.scss'; export type Props = { diff --git a/packages/console/src/components/Uploader/ImageUploader/index.tsx b/packages/console/src/components/Uploader/ImageUploader/index.tsx index b77db9c6f..6d8d68c62 100644 --- a/packages/console/src/components/Uploader/ImageUploader/index.tsx +++ b/packages/console/src/components/Uploader/ImageUploader/index.tsx @@ -5,6 +5,7 @@ import Delete from '@/assets/images/delete.svg'; import IconButton from '../../IconButton'; import FileUploader from '../FileUploader'; import type { Props as FileUploaderProps } from '../FileUploader'; + import * as styles from './index.module.scss'; export const maxImageSizeLimit = 500 * 1024; // 500 KB diff --git a/packages/console/src/components/Uploader/ImageUploaderField/index.tsx b/packages/console/src/components/Uploader/ImageUploaderField/index.tsx index f271e76a6..d7f3fe66a 100644 --- a/packages/console/src/components/Uploader/ImageUploaderField/index.tsx +++ b/packages/console/src/components/Uploader/ImageUploaderField/index.tsx @@ -6,6 +6,7 @@ import { convertToFileExtensionArray } from '@/utils/uploader'; import ImageUploader, { maxImageSizeLimit, allowedImageMimeTypes } from '../ImageUploader'; import type { Props as ImageUploaderProps } from '../ImageUploader'; + import * as styles from './index.module.scss'; type Props = Pick & { diff --git a/packages/console/src/components/UserAvatar/index.tsx b/packages/console/src/components/UserAvatar/index.tsx index 0a59a823a..62878698a 100644 --- a/packages/console/src/components/UserAvatar/index.tsx +++ b/packages/console/src/components/UserAvatar/index.tsx @@ -5,6 +5,7 @@ import classNames from 'classnames'; import DefaultAvatar from '@/assets/images/default-avatar.svg'; import ImageWithErrorFallback from '../ImageWithErrorFallback'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/UserInfoCard/index.tsx b/packages/console/src/components/UserInfoCard/index.tsx index c48102f11..a97f520a6 100644 --- a/packages/console/src/components/UserInfoCard/index.tsx +++ b/packages/console/src/components/UserInfoCard/index.tsx @@ -4,6 +4,7 @@ import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import UserAvatar from '../UserAvatar'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/UserRolesTransfer/components/SourceRolesBox/index.tsx b/packages/console/src/components/UserRolesTransfer/components/SourceRolesBox/index.tsx index 665a34ec6..5b15b7f21 100644 --- a/packages/console/src/components/UserRolesTransfer/components/SourceRolesBox/index.tsx +++ b/packages/console/src/components/UserRolesTransfer/components/SourceRolesBox/index.tsx @@ -17,6 +17,7 @@ import * as transferLayout from '@/scss/transfer.module.scss'; import { buildUrl } from '@/utils/url'; import SourceRoleItem from '../SourceRoleItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/components/UserRolesTransfer/components/TargetRolesBox/index.tsx b/packages/console/src/components/UserRolesTransfer/components/TargetRolesBox/index.tsx index 530ea71e0..27651bff2 100644 --- a/packages/console/src/components/UserRolesTransfer/components/TargetRolesBox/index.tsx +++ b/packages/console/src/components/UserRolesTransfer/components/TargetRolesBox/index.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import * as transferLayout from '@/scss/transfer.module.scss'; import TargetRoleItem from '../TargetRoleItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/containers/AppContent/components/Topbar/index.tsx b/packages/console/src/containers/AppContent/components/Topbar/index.tsx index 3b9547d31..0a82c5e5c 100644 --- a/packages/console/src/containers/AppContent/components/Topbar/index.tsx +++ b/packages/console/src/containers/AppContent/components/Topbar/index.tsx @@ -9,6 +9,7 @@ import EarlyBirdGift from '@/onboarding/components/EarlyBirdGift'; import GetStartedProgress from '@/pages/GetStarted/components/GetStartedProgress'; import UserInfo from '../UserInfo'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/containers/AppContent/components/UserInfo/index.tsx b/packages/console/src/containers/AppContent/components/UserInfo/index.tsx index 4804c2364..6377caac9 100644 --- a/packages/console/src/containers/AppContent/components/UserInfo/index.tsx +++ b/packages/console/src/containers/AppContent/components/UserInfo/index.tsx @@ -24,6 +24,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import SubMenu from '../SubMenu'; import UserInfoSkeleton from '../UserInfoSkeleton'; + import * as styles from './index.module.scss'; function UserInfo() { diff --git a/packages/console/src/containers/AppContent/index.tsx b/packages/console/src/containers/AppContent/index.tsx index 240e3ff00..621ddb4cc 100644 --- a/packages/console/src/containers/AppContent/index.tsx +++ b/packages/console/src/containers/AppContent/index.tsx @@ -15,9 +15,10 @@ import Broadcast from '@/onboarding/components/Broadcast'; import { getPath } from '../ConsoleContent/Sidebar'; import { useSidebarMenuItems } from '../ConsoleContent/Sidebar/hook'; + import Topbar from './components/Topbar'; import * as styles from './index.module.scss'; -import { AppContentOutletContext } from './types'; +import { type AppContentOutletContext } from './types'; function AppContent() { const { isAuthenticated, isLoading: isLogtoLoading, error, signIn } = useLogto(); diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx index 475c5ffa5..d62c2fb5c 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import { getPath } from '../../utils'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/containers/ConsoleContent/index.tsx b/packages/console/src/containers/ConsoleContent/index.tsx index 19386a630..88c62abb3 100644 --- a/packages/console/src/containers/ConsoleContent/index.tsx +++ b/packages/console/src/containers/ConsoleContent/index.tsx @@ -38,6 +38,7 @@ import UserSettings from '@/pages/UserDetails/UserSettings'; import Users from '@/pages/Users'; import type { AppContentOutletContext } from '../AppContent/types'; + import Sidebar from './Sidebar'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/hooks/use-swr-fetcher.ts b/packages/console/src/hooks/use-swr-fetcher.ts index 1db2c9fe2..05602f3ef 100644 --- a/packages/console/src/hooks/use-swr-fetcher.ts +++ b/packages/console/src/hooks/use-swr-fetcher.ts @@ -1,4 +1,4 @@ -import { HTTPError } from 'ky'; +import { HTTPError, type Options } from 'ky'; import type { KyInstance } from 'ky/distribution/types/ky'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; @@ -17,7 +17,7 @@ const useSwrFetcher: useSwrFetcherHook = (api: KyInstance) => { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); const fetcher = useCallback>>( - async (resource, init) => { + async (resource: string | URL, init: Options) => { try { const response = await api.get(resource, init); const data = await response.json(); diff --git a/packages/console/src/mdx-components/Tabs/index.tsx b/packages/console/src/mdx-components/Tabs/index.tsx index 7e147f013..ef0648650 100644 --- a/packages/console/src/mdx-components/Tabs/index.tsx +++ b/packages/console/src/mdx-components/Tabs/index.tsx @@ -9,6 +9,7 @@ import type { Nullable } from '@silverhand/essentials'; import { useState, isValidElement, type ReactElement, cloneElement, useRef, Children } from 'react'; import type { Props as TabItemProps } from '../TabItem'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/components/ActionBar/index.tsx b/packages/console/src/onboarding/components/ActionBar/index.tsx index 3b6dcd47b..b0a057191 100644 --- a/packages/console/src/onboarding/components/ActionBar/index.tsx +++ b/packages/console/src/onboarding/components/ActionBar/index.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from 'react'; import ProgressBar from '../ProgressBar'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx index 689518765..4d5d8f15e 100644 --- a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx +++ b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx @@ -6,6 +6,7 @@ import { Tooltip } from '@/components/Tip'; import { onKeyDownHandler } from '@/utils/a11y'; import type { MultiCardSelectorOption } from '../types'; + import * as styles from './CardItem.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx index a181a8b8a..8517e3000 100644 --- a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx +++ b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx @@ -1,6 +1,7 @@ import classNames from 'classnames'; import type { MultiCardSelectorOption } from '../types'; + import CardItem from './CardItem'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/onboarding/components/EarlyBirdGift/GiftModal/index.tsx b/packages/console/src/onboarding/components/EarlyBirdGift/GiftModal/index.tsx index 511835b96..8e4c30b75 100644 --- a/packages/console/src/onboarding/components/EarlyBirdGift/GiftModal/index.tsx +++ b/packages/console/src/onboarding/components/EarlyBirdGift/GiftModal/index.tsx @@ -5,6 +5,7 @@ import ModalLayout from '@/components/ModalLayout'; import * as modalStyles from '@/scss/modal.module.scss'; import Reservation from '../../Reservation'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/pages/About/index.tsx b/packages/console/src/onboarding/pages/About/index.tsx index 8aad59261..a5c8450af 100644 --- a/packages/console/src/onboarding/pages/About/index.tsx +++ b/packages/console/src/onboarding/pages/About/index.tsx @@ -18,6 +18,7 @@ import { CardSelector, MultiCardSelector } from '../../components/CardSelector'; import type { Questionnaire } from '../../types'; import { OnboardingPage } from '../../types'; import { getOnboardingPage } from '../../utils'; + import * as styles from './index.module.scss'; import { titleOptions, companySizeOptions, reasonOptions } from './options'; diff --git a/packages/console/src/onboarding/pages/SignInExperience/components/InspireMe/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/components/InspireMe/index.tsx index 40a7b6115..1217ad501 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/components/InspireMe/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/components/InspireMe/index.tsx @@ -9,6 +9,7 @@ import useConnectorGroups from '@/hooks/use-connector-groups'; import type { OnboardingSieConfig } from '@/onboarding/types'; import { randomSieConfigTemplate } from '../../sie-config-templates'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/pages/SignInExperience/components/Preview/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/components/Preview/index.tsx index 1a53ce163..dc44e8c74 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/components/Preview/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/components/Preview/index.tsx @@ -8,6 +8,7 @@ import SignInExperiencePreview from '@/components/SignInExperiencePreview'; import { PreviewPlatform } from '@/components/SignInExperiencePreview/types'; import PlatformTabs from '../PlatformTabs'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/onboarding/pages/SignInExperience/components/Skeleton/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/components/Skeleton/index.tsx index 8e667e048..4680daa9c 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/components/Skeleton/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/components/Skeleton/index.tsx @@ -1,6 +1,7 @@ import * as pageLayout from '@/onboarding/scss/layout.module.scss'; import * as sieLayout from '../../index.module.scss'; + import * as styles from './index.module.scss'; function Skeleton() { diff --git a/packages/console/src/onboarding/pages/Welcome/index.tsx b/packages/console/src/onboarding/pages/Welcome/index.tsx index ce1acf4f4..20cd768c7 100644 --- a/packages/console/src/onboarding/pages/Welcome/index.tsx +++ b/packages/console/src/onboarding/pages/Welcome/index.tsx @@ -17,6 +17,7 @@ import { withAppInsights } from '@/utils/app-insights'; import type { Questionnaire } from '../../types'; import { OnboardingPage } from '../../types'; import { getOnboardingPage } from '../../utils'; + import * as styles from './index.module.scss'; import { deploymentTypeOptions, projectOptions } from './options'; diff --git a/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/index.tsx b/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/index.tsx index f2b68d4db..fc4a3f0a5 100644 --- a/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/index.tsx @@ -15,6 +15,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { ApiResourceDetailsOutletContext } from '../types'; + import CreatePermissionModal from './components/CreatePermissionModal'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/ApiResourceDetails/index.tsx b/packages/console/src/pages/ApiResourceDetails/index.tsx index b1ff03e91..da827702d 100644 --- a/packages/console/src/pages/ApiResourceDetails/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/index.tsx @@ -24,7 +24,7 @@ import useTheme from '@/hooks/use-theme'; import { withAppInsights } from '@/utils/app-insights'; import * as styles from './index.module.scss'; -import { ApiResourceDetailsOutletContext } from './types'; +import { type ApiResourceDetailsOutletContext } from './types'; function ApiResourceDetails() { const { pathname } = useLocation(); diff --git a/packages/console/src/pages/ApplicationDetails/index.tsx b/packages/console/src/pages/ApplicationDetails/index.tsx index 48f2ba299..e61012cd2 100644 --- a/packages/console/src/pages/ApplicationDetails/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/index.tsx @@ -28,6 +28,7 @@ import { withAppInsights } from '@/utils/app-insights'; import Guide from '../Applications/components/Guide'; import GuideModal from '../Applications/components/Guide/GuideModal'; + import AdvancedSettings from './components/AdvancedSettings'; import Settings from './components/Settings'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/pages/Applications/components/ApplicationsPlaceholder/index.tsx b/packages/console/src/pages/Applications/components/ApplicationsPlaceholder/index.tsx index ac24094c1..222d1e203 100644 --- a/packages/console/src/pages/Applications/components/ApplicationsPlaceholder/index.tsx +++ b/packages/console/src/pages/Applications/components/ApplicationsPlaceholder/index.tsx @@ -10,6 +10,7 @@ import useConfigs from '@/hooks/use-configs'; import { applicationTypeI18nKey } from '@/types/applications'; import TypeDescription from '../TypeDescription'; + import * as styles from './index.module.scss'; const defaultAppName = 'My App'; diff --git a/packages/console/src/pages/Applications/components/CreateForm/index.tsx b/packages/console/src/pages/Applications/components/CreateForm/index.tsx index 54ba8cde8..7261aa5da 100644 --- a/packages/console/src/pages/Applications/components/CreateForm/index.tsx +++ b/packages/console/src/pages/Applications/components/CreateForm/index.tsx @@ -16,6 +16,7 @@ import * as modalStyles from '@/scss/modal.module.scss'; import { applicationTypeI18nKey } from '@/types/applications'; import TypeDescription from '../TypeDescription'; + import * as styles from './index.module.scss'; type FormData = { diff --git a/packages/console/src/pages/Applications/components/Guide/index.tsx b/packages/console/src/pages/Applications/components/Guide/index.tsx index 94a5702c3..47b1694ee 100644 --- a/packages/console/src/pages/Applications/components/Guide/index.tsx +++ b/packages/console/src/pages/Applications/components/Guide/index.tsx @@ -16,6 +16,7 @@ import { applicationTypeAndSdkTypeMappings } from '@/types/applications'; import GuideHeader from '../GuideHeader'; import SdkSelector from '../SdkSelector'; import StepsSkeleton from '../StepsSkeleton'; + import * as styles from './index.module.scss'; type Props = { @@ -90,7 +91,7 @@ function Guide({ app, isCompact, onClose }: Props) { { - const [, language] = /language-(\w+)/.exec(className ?? '') ?? []; + const [, language] = /language-(\w+)/.exec(String(className ?? '')) ?? []; return language ? ( diff --git a/packages/console/src/pages/ConnectorDetails/index.tsx b/packages/console/src/pages/ConnectorDetails/index.tsx index dd56fe45e..7584fe4e2 100644 --- a/packages/console/src/pages/ConnectorDetails/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/index.tsx @@ -27,6 +27,7 @@ import useConnectorInUse from '@/hooks/use-connector-in-use'; import { withAppInsights } from '@/utils/app-insights'; import CreateForm from '../Connectors/components/CreateForm'; + import ConnectorContent from './components/ConnectorContent'; import ConnectorTabs from './components/ConnectorTabs'; import ConnectorTypeName from './components/ConnectorTypeName'; diff --git a/packages/console/src/pages/Connectors/components/ConfigForm/index.tsx b/packages/console/src/pages/Connectors/components/ConfigForm/index.tsx index 4f6f4be5d..a57562868 100644 --- a/packages/console/src/pages/Connectors/components/ConfigForm/index.tsx +++ b/packages/console/src/pages/Connectors/components/ConfigForm/index.tsx @@ -14,6 +14,7 @@ import Textarea from '@/components/Textarea'; import { jsonValidator } from '@/utils/validator'; import type { ConnectorFormType } from '../../types'; + import * as styles from './ConfigForm.module.scss'; type Props = { diff --git a/packages/console/src/pages/Connectors/components/ConnectorForm/BasicForm.tsx b/packages/console/src/pages/Connectors/components/ConnectorForm/BasicForm.tsx index 6df3a1a76..615708281 100644 --- a/packages/console/src/pages/Connectors/components/ConnectorForm/BasicForm.tsx +++ b/packages/console/src/pages/Connectors/components/ConnectorForm/BasicForm.tsx @@ -16,6 +16,7 @@ import { uriValidator } from '@/utils/validator'; import type { ConnectorFormType } from '../../types'; import { SyncProfileMode } from '../../types'; + import * as styles from './BasicForm.module.scss'; type Props = { diff --git a/packages/console/src/pages/Connectors/components/ConnectorForm/ConfigForm.tsx b/packages/console/src/pages/Connectors/components/ConnectorForm/ConfigForm.tsx index 256ea8d43..d3d34457f 100644 --- a/packages/console/src/pages/Connectors/components/ConnectorForm/ConfigForm.tsx +++ b/packages/console/src/pages/Connectors/components/ConnectorForm/ConfigForm.tsx @@ -12,6 +12,7 @@ import { jsonValidator } from '@/utils/validator'; import type { ConnectorFormType } from '../../types'; import ConfigFormItems from '../ConfigForm'; + import * as styles from './ConfigForm.module.scss'; type Props = { diff --git a/packages/console/src/pages/Connectors/components/CreateForm/index.tsx b/packages/console/src/pages/Connectors/components/CreateForm/index.tsx index 89977de85..de53ec95e 100644 --- a/packages/console/src/pages/Connectors/components/CreateForm/index.tsx +++ b/packages/console/src/pages/Connectors/components/CreateForm/index.tsx @@ -14,6 +14,7 @@ import type { RequestError } from '@/hooks/use-api'; import * as modalStyles from '@/scss/modal.module.scss'; import { getConnectorGroups } from '../../utils'; + import PlatformSelector from './PlatformSelector'; import * as styles from './index.module.scss'; import { getConnectorOrder } from './utils'; diff --git a/packages/console/src/pages/Connectors/components/Guide/index.tsx b/packages/console/src/pages/Connectors/components/Guide/index.tsx index 414e9410e..2f6463cf1 100644 --- a/packages/console/src/pages/Connectors/components/Guide/index.tsx +++ b/packages/console/src/pages/Connectors/components/Guide/index.tsx @@ -32,6 +32,7 @@ import BasicForm from '../ConnectorForm/BasicForm'; import ConfigForm from '../ConnectorForm/ConfigForm'; import { useConnectorFormConfigParser } from '../ConnectorForm/hooks'; import { initFormData } from '../ConnectorForm/utils'; + import * as styles from './index.module.scss'; const targetErrorCode = 'connector.multiple_target_with_same_platform'; diff --git a/packages/console/src/pages/Dashboard/index.tsx b/packages/console/src/pages/Dashboard/index.tsx index cfadec7c1..f503e15b4 100644 --- a/packages/console/src/pages/Dashboard/index.tsx +++ b/packages/console/src/pages/Dashboard/index.tsx @@ -122,7 +122,7 @@ function Dashboard() { axisLine={false} tickLine={false} tick={tickStyle} - tickFormatter={(tick) => tickFormatter.format(tick).toLowerCase()} + tickFormatter={(tick) => tickFormatter.format(Number(tick)).toLowerCase()} /> } cursor={{ stroke: 'var(--color-primary' }} /> diff --git a/packages/console/src/pages/GetStarted/components/GetStartedProgress/index.tsx b/packages/console/src/pages/GetStarted/components/GetStartedProgress/index.tsx index a1a652588..0a1d4f1e0 100644 --- a/packages/console/src/pages/GetStarted/components/GetStartedProgress/index.tsx +++ b/packages/console/src/pages/GetStarted/components/GetStartedProgress/index.tsx @@ -12,6 +12,7 @@ import useUserPreferences from '@/hooks/use-user-preferences'; import { onKeyDownHandler } from '@/utils/a11y'; import useGetStartedMetadata from '../../hook'; + import * as styles from './index.module.scss'; function GetStartedProgress() { diff --git a/packages/console/src/pages/Profile/components/CardContent/index.tsx b/packages/console/src/pages/Profile/components/CardContent/index.tsx index 69c6ae75f..dd4450577 100644 --- a/packages/console/src/pages/Profile/components/CardContent/index.tsx +++ b/packages/console/src/pages/Profile/components/CardContent/index.tsx @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next'; import Button from '@/components/Button'; import NotSet from '../NotSet'; + import * as styles from './index.module.scss'; export type Action = { diff --git a/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx b/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx index 2e5ceca2c..fd20172e0 100644 --- a/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx +++ b/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx @@ -23,6 +23,7 @@ import { popupWindow } from '../../utils'; import type { Row } from '../CardContent'; import CardContent from '../CardContent'; import NotSet from '../NotSet'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx b/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx index debd1218e..000869a2a 100644 --- a/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx @@ -15,6 +15,7 @@ import useCurrentUser from '@/hooks/use-current-user'; import MainFlowLikeModal from '../../components/MainFlowLikeModal'; import { checkLocationState, handleError } from '../../utils'; + import * as styles from './index.module.scss'; export const resendTimeout = 59; diff --git a/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx b/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx index eb1dfa270..cbccf6396 100644 --- a/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx @@ -16,6 +16,7 @@ import { useStaticApi } from '@/hooks/use-api'; import MainFlowLikeModal from '../../components/MainFlowLikeModal'; import { checkLocationState, handleError } from '../../utils'; + import * as styles from './index.module.scss'; type FormFields = { diff --git a/packages/console/src/pages/RoleDetails/RolePermissions/index.tsx b/packages/console/src/pages/RoleDetails/RolePermissions/index.tsx index 730ab9452..fcd5bf77a 100644 --- a/packages/console/src/pages/RoleDetails/RolePermissions/index.tsx +++ b/packages/console/src/pages/RoleDetails/RolePermissions/index.tsx @@ -15,6 +15,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { RoleDetailsOutletContext } from '../types'; + import AssignPermissionsModal from './components/AssignPermissionsModal'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx b/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx index d784766dd..773bf70be 100644 --- a/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx +++ b/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx @@ -26,6 +26,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { RoleDetailsOutletContext } from '../types'; + import AssignUsersModal from './components/AssignUsersModal'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/pages/RoleDetails/index.tsx b/packages/console/src/pages/RoleDetails/index.tsx index 9cc50a0fb..da0b994f9 100644 --- a/packages/console/src/pages/RoleDetails/index.tsx +++ b/packages/console/src/pages/RoleDetails/index.tsx @@ -20,7 +20,7 @@ import useApi from '@/hooks/use-api'; import { withAppInsights } from '@/utils/app-insights'; import * as styles from './index.module.scss'; -import { RoleDetailsOutletContext } from './types'; +import { type RoleDetailsOutletContext } from './types'; function RoleDetails() { const { pathname } = useLocation(); diff --git a/packages/console/src/pages/SignInExperience/components/Skeleton/index.tsx b/packages/console/src/pages/SignInExperience/components/Skeleton/index.tsx index 27e0b77f1..ea6c8eb65 100644 --- a/packages/console/src/pages/SignInExperience/components/Skeleton/index.tsx +++ b/packages/console/src/pages/SignInExperience/components/Skeleton/index.tsx @@ -4,6 +4,7 @@ import CardTitle from '@/components/CardTitle'; import Spacer from '@/components/Spacer'; import * as pageStyles from '../../index.module.scss'; + import * as styles from './index.module.scss'; function Skeleton() { diff --git a/packages/console/src/pages/SignInExperience/components/Welcome/GuideModal.tsx b/packages/console/src/pages/SignInExperience/components/Welcome/GuideModal.tsx index 2c7a2f7f3..7153cff88 100644 --- a/packages/console/src/pages/SignInExperience/components/Welcome/GuideModal.tsx +++ b/packages/console/src/pages/SignInExperience/components/Welcome/GuideModal.tsx @@ -23,6 +23,7 @@ import TermsForm from '../../tabs/Others/TermsForm'; import type { SignInExperienceForm } from '../../types'; import { signInExperienceParser } from '../../utils/form'; import Preview from '../Preview'; + import * as styles from './GuideModal.module.scss'; type Props = { diff --git a/packages/console/src/pages/SignInExperience/tabs/Branding/BrandingForm.tsx b/packages/console/src/pages/SignInExperience/tabs/Branding/BrandingForm.tsx index 53eac8894..c7e5048c5 100644 --- a/packages/console/src/pages/SignInExperience/tabs/Branding/BrandingForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/Branding/BrandingForm.tsx @@ -16,6 +16,7 @@ import { uriValidator } from '@/utils/validator'; import type { SignInExperienceForm } from '../../types'; import * as styles from '../index.module.scss'; + import LogoAndFaviconUploader from './components/LogoAndFaviconUploader'; function BrandingForm() { diff --git a/packages/console/src/pages/SignInExperience/tabs/Branding/CustomCssForm.tsx b/packages/console/src/pages/SignInExperience/tabs/Branding/CustomCssForm.tsx index e834beead..a148eaa70 100644 --- a/packages/console/src/pages/SignInExperience/tabs/Branding/CustomCssForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/Branding/CustomCssForm.tsx @@ -9,6 +9,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import type { SignInExperienceForm } from '../../types'; import * as tabsStyles from '../index.module.scss'; + import * as brandingStyles from './CustomCssForm.module.scss'; function CustomCssForm() { diff --git a/packages/console/src/pages/SignInExperience/tabs/Branding/index.tsx b/packages/console/src/pages/SignInExperience/tabs/Branding/index.tsx index 269c35f98..4678d7816 100644 --- a/packages/console/src/pages/SignInExperience/tabs/Branding/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/Branding/index.tsx @@ -1,5 +1,6 @@ import TabWrapper from '../../components/TabWrapper'; import * as styles from '../index.module.scss'; + import BrandingForm from './BrandingForm'; import CustomCssForm from './CustomCssForm'; diff --git a/packages/console/src/pages/SignInExperience/tabs/Others/LanguagesForm.tsx b/packages/console/src/pages/SignInExperience/tabs/Others/LanguagesForm.tsx index 4071f74b8..f67a528ae 100644 --- a/packages/console/src/pages/SignInExperience/tabs/Others/LanguagesForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/Others/LanguagesForm.tsx @@ -14,6 +14,7 @@ import useUiLanguages from '@/hooks/use-ui-languages'; import type { SignInExperienceForm } from '../../types'; import * as styles from '../index.module.scss'; + import ManageLanguageButton from './components/ManageLanguage/ManageLanguageButton'; type Props = { diff --git a/packages/console/src/pages/SignInExperience/tabs/Others/index.tsx b/packages/console/src/pages/SignInExperience/tabs/Others/index.tsx index 470b2bddb..5d112a19b 100644 --- a/packages/console/src/pages/SignInExperience/tabs/Others/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/Others/index.tsx @@ -1,5 +1,6 @@ import TabWrapper from '../../components/TabWrapper'; import * as styles from '../index.module.scss'; + import AuthenticationForm from './AuthenticationForm'; import LanguagesForm from './LanguagesForm'; import TermsForm from './TermsForm'; diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignInForm.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignInForm.tsx index c177d5c01..2b35de220 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignInForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignInForm.tsx @@ -4,6 +4,7 @@ import Card from '@/components/Card'; import FormField from '@/components/FormField'; import * as styles from '../index.module.scss'; + import SignInMethodEditBox from './components/SignInMethodEditBox'; function SignInForm() { diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignUpForm.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignUpForm.tsx index 6d6e4c724..e15fb388f 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignUpForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SignUpForm.tsx @@ -20,6 +20,7 @@ import { isVerificationRequiredSignUpIdentifiers, } from '../../utils/identifier'; import * as styles from '../index.module.scss'; + import ConnectorSetupWarning from './components/ConnectorSetupWarning'; import { createSignInMethod, diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SocialSignInForm.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SocialSignInForm.tsx index 00d036a1e..305daef25 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SocialSignInForm.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/SocialSignInForm.tsx @@ -6,6 +6,7 @@ import FormField from '@/components/FormField'; import type { SignInExperienceForm } from '../../types'; import * as styles from '../index.module.scss'; + import SocialConnectorEditBox from './components/SocialConnectorEditBox'; function SocialSignInForm() { diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/SignInMethodItem.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/SignInMethodItem.tsx index e3b3847a2..9e68dcd9a 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/SignInMethodItem.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/SignInMethodItem.tsx @@ -14,6 +14,7 @@ import { signInIdentifierPhrase } from '@/pages/SignInExperience/constants'; import type { SignInMethod } from '@/pages/SignInExperience/types'; import ConnectorSetupWarning from '../ConnectorSetupWarning'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/index.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/index.tsx index 8d4c7f0c2..8dd2b6b11 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SignInMethodEditBox/index.tsx @@ -14,6 +14,7 @@ import type { SignInExperienceForm } from '@/pages/SignInExperience/types'; import { getSignUpRequiredConnectorTypes } from '@/pages/SignInExperience/utils/identifier'; import { createSignInMethod } from '../../utils'; + import AddButton from './AddButton'; import SignInMethodItem from './SignInMethodItem'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SocialConnectorEditBox/index.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SocialConnectorEditBox/index.tsx index 47ec87eaa..287ad0e91 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SocialConnectorEditBox/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/components/SocialConnectorEditBox/index.tsx @@ -7,6 +7,7 @@ import useConnectorGroups from '@/hooks/use-connector-groups'; import type { ConnectorGroup } from '@/types/connector'; import ConnectorSetupWarning from '../ConnectorSetupWarning'; + import AddButton from './AddButton'; import SelectedConnectorItem from './SelectedConnectorItem'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/index.tsx b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/index.tsx index f986ddb8b..df9d097e2 100644 --- a/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/index.tsx +++ b/packages/console/src/pages/SignInExperience/tabs/SignUpAndSignIn/index.tsx @@ -1,5 +1,6 @@ import TabWrapper from '../../components/TabWrapper'; import * as styles from '../index.module.scss'; + import SignInForm from './SignInForm'; import SignUpForm from './SignUpForm'; import SocialSignInForm from './SocialSignInForm'; diff --git a/packages/console/src/pages/SignInExperience/utils/form.ts b/packages/console/src/pages/SignInExperience/utils/form.ts index 967adb1a4..8664ad20a 100644 --- a/packages/console/src/pages/SignInExperience/utils/form.ts +++ b/packages/console/src/pages/SignInExperience/utils/form.ts @@ -11,6 +11,7 @@ import { import { signUpIdentifiersMapping } from '../constants'; import { SignUpIdentifier } from '../types'; import type { SignInExperienceForm, SignUpForm } from '../types'; + import { mapIdentifiersToSignUpIdentifier } from './identifier'; export const signInExperienceParser = { diff --git a/packages/console/src/pages/UserDetails/UserLogs/index.tsx b/packages/console/src/pages/UserDetails/UserLogs/index.tsx index 3a778a08c..3af61a2f4 100644 --- a/packages/console/src/pages/UserDetails/UserLogs/index.tsx +++ b/packages/console/src/pages/UserDetails/UserLogs/index.tsx @@ -3,6 +3,7 @@ import { useOutletContext } from 'react-router-dom'; import AuditLogTable from '@/components/AuditLogTable'; import type { UserDetailsOutletContext } from '../types'; + import * as styles from './index.module.scss'; function UserLogs() { diff --git a/packages/console/src/pages/UserDetails/UserRoles/index.tsx b/packages/console/src/pages/UserDetails/UserRoles/index.tsx index 272caf924..920fcf451 100644 --- a/packages/console/src/pages/UserDetails/UserRoles/index.tsx +++ b/packages/console/src/pages/UserDetails/UserRoles/index.tsx @@ -23,6 +23,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { UserDetailsOutletContext } from '../types'; + import AssignRolesModal from './components/AssignRolesModal'; import * as styles from './index.module.scss'; diff --git a/packages/console/src/pages/UserDetails/UserSettings/index.tsx b/packages/console/src/pages/UserDetails/UserSettings/index.tsx index 2b6ae190a..555fa835e 100644 --- a/packages/console/src/pages/UserDetails/UserSettings/index.tsx +++ b/packages/console/src/pages/UserDetails/UserSettings/index.tsx @@ -18,6 +18,7 @@ import { uriValidator } from '@/utils/validator'; import type { UserDetailsForm, UserDetailsOutletContext } from '../types'; import { userDetailsParser } from '../utils'; + import UserSocialIdentities from './components/UserSocialIdentities'; function UserSettings() { diff --git a/packages/console/src/pages/UserDetails/index.tsx b/packages/console/src/pages/UserDetails/index.tsx index 22b163e1f..7bf2c4a2f 100644 --- a/packages/console/src/pages/UserDetails/index.tsx +++ b/packages/console/src/pages/UserDetails/index.tsx @@ -24,9 +24,10 @@ import * as modalStyles from '@/scss/modal.module.scss'; import { withAppInsights } from '@/utils/app-insights'; import UserAccountInformation from '../../components/UserAccountInformation'; + import ResetPasswordForm from './components/ResetPasswordForm'; import * as styles from './index.module.scss'; -import { UserDetailsOutletContext } from './types'; +import { type UserDetailsOutletContext } from './types'; function UserDetails() { const { pathname } = useLocation(); diff --git a/packages/core/package.json b/packages/core/package.json index 65b64b2b8..dc29fd6b8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -77,8 +77,8 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/debug": "^4.1.7", "@types/etag": "^1.8.1", "@types/http-errors": "^1.8.2", diff --git a/packages/core/src/__mocks__/custom-phrase.ts b/packages/core/src/__mocks__/custom-phrase.ts index c367babd2..755dca3f4 100644 --- a/packages/core/src/__mocks__/custom-phrase.ts +++ b/packages/core/src/__mocks__/custom-phrase.ts @@ -1,5 +1,5 @@ import en from '@logto/phrases-ui/lib/locales/en.js'; -import { CustomPhrase } from '@logto/schemas'; +import { type CustomPhrase } from '@logto/schemas'; import { mockId } from '#src/test-utils/nanoid.js'; diff --git a/packages/core/src/app/init.test.ts b/packages/core/src/app/init.test.ts index 83aeb06b6..146903061 100644 --- a/packages/core/src/app/init.test.ts +++ b/packages/core/src/app/init.test.ts @@ -1,4 +1,4 @@ -import { createServer } from 'http'; +import { createServer } from 'node:http'; import { pickDefault } from '@logto/shared/esm'; import Koa from 'koa'; diff --git a/packages/core/src/app/init.ts b/packages/core/src/app/init.ts index 1e3fe8554..e41d32f30 100644 --- a/packages/core/src/app/init.ts +++ b/packages/core/src/app/init.ts @@ -1,5 +1,5 @@ -import fs from 'fs/promises'; -import http2 from 'http2'; +import fs from 'node:fs/promises'; +import http2 from 'node:http2'; import { appInsights } from '@logto/shared/app-insights'; import { toTitle, trySafe } from '@silverhand/essentials'; diff --git a/packages/core/src/database/update-where.ts b/packages/core/src/database/update-where.ts index 7fd4c38b4..6d824a1dc 100644 --- a/packages/core/src/database/update-where.ts +++ b/packages/core/src/database/update-where.ts @@ -1,4 +1,4 @@ -import type { SchemaLike, GeneratedSchema } from '@logto/schemas'; +import type { SchemaLike, GeneratedSchema, SchemaValue } from '@logto/schemas'; import { convertToIdentifiers, convertToPrimitiveOrSql, conditionalSql } from '@logto/shared'; import type { UpdateWhereData } from '@logto/shared'; import type { Truthy } from '@silverhand/essentials'; @@ -30,7 +30,7 @@ export const buildUpdateWhereWithPool = const { table, fields } = convertToIdentifiers(schema); const isKeyOfSchema = isKeyOf(schema); const connectKeyValueWithEqualSign = (data: Partial, jsonbMode: 'replace' | 'merge') => - Object.entries(data) + Object.entries(data) .map(([key, value]) => { if (!isKeyOfSchema(key)) { return; diff --git a/packages/core/src/env-set/oidc.ts b/packages/core/src/env-set/oidc.ts index 7533d7f58..a796f8e78 100644 --- a/packages/core/src/env-set/oidc.ts +++ b/packages/core/src/env-set/oidc.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import type { LogtoOidcConfigType } from '@logto/schemas'; import { LogtoOidcConfigKey } from '@logto/schemas'; diff --git a/packages/core/src/env-set/utils.ts b/packages/core/src/env-set/utils.ts index 773d1149d..20f5c00d6 100644 --- a/packages/core/src/env-set/utils.ts +++ b/packages/core/src/env-set/utils.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import { adminTenantId } from '@logto/schemas'; import type { GlobalValues } from '@logto/shared'; diff --git a/packages/core/src/event-listeners/grant.ts b/packages/core/src/event-listeners/grant.ts index 313ee2711..d4c39ff3a 100644 --- a/packages/core/src/event-listeners/grant.ts +++ b/packages/core/src/event-listeners/grant.ts @@ -5,6 +5,7 @@ import type { WithLogContext } from '#src/middleware/koa-audit-log.js'; import { stringifyError } from '../utils/format.js'; import { isEnum } from '../utils/type.js'; + import { extractInteractionContext } from './utils.js'; /** diff --git a/packages/core/src/i18n/detect-language.ts b/packages/core/src/i18n/detect-language.ts index 66a13650a..7d6232e9e 100644 --- a/packages/core/src/i18n/detect-language.ts +++ b/packages/core/src/i18n/detect-language.ts @@ -1,4 +1,4 @@ -import type { IncomingHttpHeaders } from 'http'; +import type { IncomingHttpHeaders } from 'node:http'; import type { Optional } from '@silverhand/essentials'; import { normalizeValueToStringArray } from '@silverhand/essentials'; diff --git a/packages/core/src/libraries/__mocks__/logto-config.ts b/packages/core/src/libraries/__mocks__/logto-config.ts index d767ca8e3..c6f0bb202 100644 --- a/packages/core/src/libraries/__mocks__/logto-config.ts +++ b/packages/core/src/libraries/__mocks__/logto-config.ts @@ -1,4 +1,4 @@ -import { generateKeyPairSync } from 'crypto'; +import { generateKeyPairSync } from 'node:crypto'; import type { LogtoOidcConfigType } from '@logto/schemas'; import { LogtoOidcConfigKey } from '@logto/schemas'; diff --git a/packages/core/src/libraries/hook.ts b/packages/core/src/libraries/hook.ts index 78f8aa321..949cbc7a9 100644 --- a/packages/core/src/libraries/hook.ts +++ b/packages/core/src/libraries/hook.ts @@ -1,7 +1,7 @@ import { generateStandardId } from '@logto/core-kit'; import { HookEvent, - HookEventPayload, + type HookEventPayload, InteractionEvent, LogResult, userInfoSelectFields, diff --git a/packages/core/src/libraries/passcode.test.ts b/packages/core/src/libraries/passcode.test.ts index 74e8282e9..5192a20a6 100644 --- a/packages/core/src/libraries/passcode.test.ts +++ b/packages/core/src/libraries/passcode.test.ts @@ -1,6 +1,6 @@ import { defaultConnectorMethods } from '@logto/cli/lib/connector/index.js'; import { ConnectorType, VerificationCodeType } from '@logto/connector-kit'; -import { Passcode } from '@logto/schemas'; +import { type Passcode } from '@logto/schemas'; import { any } from 'zod'; import { mockConnector, mockMetadata } from '#src/__mocks__/index.js'; diff --git a/packages/core/src/libraries/phrase.test.ts b/packages/core/src/libraries/phrase.test.ts index 14545849c..38671a5ad 100644 --- a/packages/core/src/libraries/phrase.test.ts +++ b/packages/core/src/libraries/phrase.test.ts @@ -1,5 +1,5 @@ import resource from '@logto/phrases-ui'; -import { CustomPhrase } from '@logto/schemas'; +import { type CustomPhrase } from '@logto/schemas'; import deepmerge from 'deepmerge'; import { diff --git a/packages/core/src/middleware/koa-auth/index.ts b/packages/core/src/middleware/koa-auth/index.ts index 18959004a..2509fc69c 100644 --- a/packages/core/src/middleware/koa-auth/index.ts +++ b/packages/core/src/middleware/koa-auth/index.ts @@ -1,4 +1,4 @@ -import type { IncomingHttpHeaders } from 'http'; +import type { IncomingHttpHeaders } from 'node:http'; import { adminTenantId, defaultManagementApi, PredefinedScope } from '@logto/schemas'; import type { Optional } from '@silverhand/essentials'; diff --git a/packages/core/src/middleware/koa-auth/utils.ts b/packages/core/src/middleware/koa-auth/utils.ts index 8016a6be8..203d8a1a0 100644 --- a/packages/core/src/middleware/koa-auth/utils.ts +++ b/packages/core/src/middleware/koa-auth/utils.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import type { LogtoConfig } from '@logto/schemas'; import { diff --git a/packages/core/src/middleware/koa-console-redirect-proxy.ts b/packages/core/src/middleware/koa-console-redirect-proxy.ts index e6a8da3c9..207c51885 100644 --- a/packages/core/src/middleware/koa-console-redirect-proxy.ts +++ b/packages/core/src/middleware/koa-console-redirect-proxy.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import { ossConsolePath } from '@logto/schemas'; import type { MiddlewareType } from 'koa'; diff --git a/packages/core/src/middleware/koa-serve-static.ts b/packages/core/src/middleware/koa-serve-static.ts index 7987a02b9..b6e6b9a95 100644 --- a/packages/core/src/middleware/koa-serve-static.ts +++ b/packages/core/src/middleware/koa-serve-static.ts @@ -1,6 +1,6 @@ // Modified from https://github.com/koajs/static/blob/7f0ed88c8902e441da4e30b42f108617d8dff9ec/index.js -import path from 'path'; +import path from 'node:path'; import type { MiddlewareType } from 'koa'; import send from 'koa-send'; diff --git a/packages/core/src/middleware/koa-spa-proxy.test.ts b/packages/core/src/middleware/koa-spa-proxy.test.ts index fdc824e35..3216ea0b8 100644 --- a/packages/core/src/middleware/koa-spa-proxy.test.ts +++ b/packages/core/src/middleware/koa-spa-proxy.test.ts @@ -12,7 +12,7 @@ const mockProxyMiddleware = jest.fn(); const mockStaticMiddleware = jest.fn(); const mountedApps = Object.values(UserApps); -mockEsmDefault('fs/promises', () => ({ +mockEsmDefault('node:fs/promises', () => ({ readdir: jest.fn().mockResolvedValue(['sign-in']), })); diff --git a/packages/core/src/middleware/koa-spa-proxy.ts b/packages/core/src/middleware/koa-spa-proxy.ts index 269a886b0..5c6c9bdc6 100644 --- a/packages/core/src/middleware/koa-spa-proxy.ts +++ b/packages/core/src/middleware/koa-spa-proxy.ts @@ -1,5 +1,5 @@ -import fs from 'fs/promises'; -import path from 'path'; +import fs from 'node:fs/promises'; +import path from 'node:path'; import type { MiddlewareType } from 'koa'; import proxy from 'koa-proxies'; diff --git a/packages/core/src/oidc/init.ts b/packages/core/src/oidc/init.ts index e57b56576..94d61d6e3 100644 --- a/packages/core/src/oidc/init.ts +++ b/packages/core/src/oidc/init.ts @@ -1,12 +1,12 @@ /* istanbul ignore file */ -import { readFileSync } from 'fs'; +import { readFileSync } from 'node:fs'; import { userClaims } from '@logto/core-kit'; import type { I18nKey } from '@logto/phrases'; import { CustomClientMetadataKey, demoAppApplicationId } from '@logto/schemas'; import i18next from 'i18next'; -import Provider, { errors, ResourceServer } from 'oidc-provider'; +import Provider, { errors, type ResourceServer } from 'oidc-provider'; import snakecaseKeys from 'snakecase-keys'; import type { EnvSet } from '#src/env-set/index.js'; diff --git a/packages/core/src/routes-me/social.ts b/packages/core/src/routes-me/social.ts index 1d7746f47..183f7aec0 100644 --- a/packages/core/src/routes-me/social.ts +++ b/packages/core/src/routes-me/social.ts @@ -9,6 +9,7 @@ import assertThat from '#src/utils/assert-that.js'; import { transpileLogtoConnector } from '#src/utils/connectors/index.js'; import type { RouterInitArgs } from '../routes/types.js'; + import type { AuthedMeRouter } from './types.js'; /** diff --git a/packages/core/src/routes-me/user.ts b/packages/core/src/routes-me/user.ts index a3108f663..bd90d8eb7 100644 --- a/packages/core/src/routes-me/user.ts +++ b/packages/core/src/routes-me/user.ts @@ -10,6 +10,7 @@ import koaGuard from '#src/middleware/koa-guard.js'; import assertThat from '#src/utils/assert-that.js'; import type { RouterInitArgs } from '../routes/types.js'; + import type { AuthedMeRouter } from './types.js'; export default function userRoutes( diff --git a/packages/core/src/routes/admin-user.test.ts b/packages/core/src/routes/admin-user.test.ts index 327ad7640..5205193a1 100644 --- a/packages/core/src/routes/admin-user.test.ts +++ b/packages/core/src/routes/admin-user.test.ts @@ -9,9 +9,9 @@ import { mockUserListResponse, mockUserResponse, } from '#src/__mocks__/index.js'; -import Libraries from '#src/tenants/Libraries.js'; -import Queries from '#src/tenants/Queries.js'; -import { MockTenant, Partial2 } from '#src/test-utils/tenant.js'; +import type Libraries from '#src/tenants/Libraries.js'; +import type Queries from '#src/tenants/Queries.js'; +import { MockTenant, type Partial2 } from '#src/test-utils/tenant.js'; import { createRequester } from '#src/utils/test-utils.js'; const { jest } = import.meta; diff --git a/packages/core/src/routes/authn.test.ts b/packages/core/src/routes/authn.test.ts index 8cf1a8931..fba41ce87 100644 --- a/packages/core/src/routes/authn.test.ts +++ b/packages/core/src/routes/authn.test.ts @@ -3,7 +3,7 @@ import { pickDefault, createMockUtils } from '@logto/shared/esm'; import { mockRole } from '#src/__mocks__/index.js'; import RequestError from '#src/errors/RequestError/index.js'; -import Libraries from '#src/tenants/Libraries.js'; +import type Libraries from '#src/tenants/Libraries.js'; import { createMockProvider } from '#src/test-utils/oidc-provider.js'; import { MockTenant } from '#src/test-utils/tenant.js'; diff --git a/packages/core/src/routes/connector.test.ts b/packages/core/src/routes/connector.test.ts index c8b4f4358..645253247 100644 --- a/packages/core/src/routes/connector.test.ts +++ b/packages/core/src/routes/connector.test.ts @@ -19,7 +19,7 @@ import { mockLogtoConnector, } from '#src/__mocks__/index.js'; import RequestError from '#src/errors/RequestError/index.js'; -import Queries from '#src/tenants/Queries.js'; +import type Queries from '#src/tenants/Queries.js'; import { MockTenant } from '#src/test-utils/tenant.js'; import assertThat from '#src/utils/assert-that.js'; import type { LogtoConnector } from '#src/utils/connectors/types.js'; diff --git a/packages/core/src/routes/custom-phrase.test.ts b/packages/core/src/routes/custom-phrase.test.ts index ff16ceeb0..200372452 100644 --- a/packages/core/src/routes/custom-phrase.test.ts +++ b/packages/core/src/routes/custom-phrase.test.ts @@ -1,6 +1,5 @@ import en from '@logto/phrases-ui/lib/locales/en.js'; -import { CustomPhrase } from '@logto/schemas'; -import type { SignInExperience } from '@logto/schemas'; +import { type CustomPhrase, type SignInExperience } from '@logto/schemas'; import { pickDefault, createMockUtils } from '@logto/shared/esm'; import { mockZhCnCustomPhrase, trTrTag, zhCnTag } from '#src/__mocks__/custom-phrase.js'; diff --git a/packages/core/src/routes/init.ts b/packages/core/src/routes/init.ts index 91f1270fc..36df2baa4 100644 --- a/packages/core/src/routes/init.ts +++ b/packages/core/src/routes/init.ts @@ -8,6 +8,7 @@ import koaCors from '#src/middleware/koa-cors.js'; import type TenantContext from '#src/tenants/TenantContext.js'; import koaAuth from '../middleware/koa-auth/index.js'; + import adminUserRoleRoutes from './admin-user-role.js'; import adminUserRoutes from './admin-user.js'; import applicationRoutes from './application.js'; diff --git a/packages/core/src/routes/interaction/index.ts b/packages/core/src/routes/interaction/index.ts index 9dda938dc..31c3d7841 100644 --- a/packages/core/src/routes/interaction/index.ts +++ b/packages/core/src/routes/interaction/index.ts @@ -16,6 +16,7 @@ import koaGuard from '#src/middleware/koa-guard.js'; import assertThat from '#src/utils/assert-that.js'; import type { AnonymousRouter, RouterInitArgs } from '../types.js'; + import submitInteraction from './actions/submit-interaction.js'; import consentRoutes from './consent.js'; import { interactionPrefix, verificationPath } from './const.js'; diff --git a/packages/core/src/routes/interaction/middleware/koa-interaction-hooks.ts b/packages/core/src/routes/interaction/middleware/koa-interaction-hooks.ts index 2b3482d21..cdff6ee97 100644 --- a/packages/core/src/routes/interaction/middleware/koa-interaction-hooks.ts +++ b/packages/core/src/routes/interaction/middleware/koa-interaction-hooks.ts @@ -5,6 +5,7 @@ import type { IRouterParamContext } from 'koa-router'; import type TenantContext from '#src/tenants/TenantContext.js'; import { getInteractionStorage } from '../utils/interaction.js'; + import type { WithInteractionDetailsContext } from './koa-interaction-details.js'; export default function koaInteractionHooks< diff --git a/packages/core/src/routes/interaction/utils/interaction.test.ts b/packages/core/src/routes/interaction/utils/interaction.test.ts index ebec31bc8..f9e9a6cbc 100644 --- a/packages/core/src/routes/interaction/utils/interaction.test.ts +++ b/packages/core/src/routes/interaction/utils/interaction.test.ts @@ -1,4 +1,5 @@ import type { Identifier } from '../types/index.js'; + import { mergeIdentifiers, categorizeIdentifiers } from './interaction.js'; describe('interaction utils', () => { diff --git a/packages/core/src/routes/interaction/verifications/identifier-verification.ts b/packages/core/src/routes/interaction/verifications/identifier-verification.ts index 0d8bc3889..ce3a439cd 100644 --- a/packages/core/src/routes/interaction/verifications/identifier-verification.ts +++ b/packages/core/src/routes/interaction/verifications/identifier-verification.ts @@ -10,6 +10,7 @@ import type { AccountVerifiedInteractionResult, } from '../types/index.js'; import { storeInteractionResult } from '../utils/interaction.js'; + import verifyUserAccount from './user-identity-verification.js'; type InteractionResult = diff --git a/packages/core/src/routes/swagger.test.ts b/packages/core/src/routes/swagger.test.ts index e3804f498..ebc673b05 100644 --- a/packages/core/src/routes/swagger.test.ts +++ b/packages/core/src/routes/swagger.test.ts @@ -62,6 +62,7 @@ describe('GET /swagger.json', () => { it('should contain the specific paths', async () => { const response = await mockSwaggerRequest.get('/swagger.json'); + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument expect(Object.entries(response.body.paths)).toHaveLength(2); expect(response.body.paths).toMatchObject({ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ diff --git a/packages/core/src/routes/swagger.ts b/packages/core/src/routes/swagger.ts index b4e959594..d1bceadb3 100644 --- a/packages/core/src/routes/swagger.ts +++ b/packages/core/src/routes/swagger.ts @@ -1,4 +1,4 @@ -import { readFile } from 'fs/promises'; +import { readFile } from 'node:fs/promises'; import { toTitle } from '@silverhand/essentials'; import { load } from 'js-yaml'; @@ -59,6 +59,8 @@ const buildParameters = ( assertThat(zodParameters instanceof ZodObject, 'swagger.not_supported_zod_type_for_params'); + // Type from Zod is any + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument return Object.entries(zodParameters.shape).map(([key, value]) => ({ name: key, in: inWhere, diff --git a/packages/core/src/routes/user-assets.ts b/packages/core/src/routes/user-assets.ts index 507e58909..84d3ba91b 100644 --- a/packages/core/src/routes/user-assets.ts +++ b/packages/core/src/routes/user-assets.ts @@ -1,4 +1,4 @@ -import { readFile } from 'fs/promises'; +import { readFile } from 'node:fs/promises'; import { generateStandardId } from '@logto/core-kit'; import type { UserAssets } from '@logto/schemas'; diff --git a/packages/core/src/routes/well-known.phrases.test.ts b/packages/core/src/routes/well-known.phrases.test.ts index 1c5b8a482..819772fbb 100644 --- a/packages/core/src/routes/well-known.phrases.test.ts +++ b/packages/core/src/routes/well-known.phrases.test.ts @@ -5,7 +5,7 @@ import { pickDefault, createMockUtils } from '@logto/shared/esm'; import { zhCnTag } from '#src/__mocks__/custom-phrase.js'; import { mockSignInExperience } from '#src/__mocks__/index.js'; import { wellKnownCache } from '#src/caches/well-known.js'; -import Queries from '#src/tenants/Queries.js'; +import type Queries from '#src/tenants/Queries.js'; import { createMockProvider } from '#src/test-utils/oidc-provider.js'; import { MockTenant } from '#src/test-utils/tenant.js'; diff --git a/packages/core/src/tenants/Tenant.ts b/packages/core/src/tenants/Tenant.ts index 2f75c8f43..07c55e098 100644 --- a/packages/core/src/tenants/Tenant.ts +++ b/packages/core/src/tenants/Tenant.ts @@ -18,8 +18,8 @@ import koaSlonikErrorHandler from '#src/middleware/koa-slonik-error-handler.js'; import koaSpaProxy from '#src/middleware/koa-spa-proxy.js'; import koaSpaSessionGuard from '#src/middleware/koa-spa-session-guard.js'; import initOidc from '#src/oidc/init.js'; -import initMeApis from '#src/routes-me/init.js'; import initApis from '#src/routes/init.js'; +import initMeApis from '#src/routes-me/init.js'; import Libraries from './Libraries.js'; import Queries from './Queries.js'; @@ -35,14 +35,14 @@ export default class Tenant implements TenantContext { return new Tenant(envSet, id); } - #requestCount = 0; - #onRequestEmpty?: () => Promise; - public readonly provider: Provider; public readonly run: MiddlewareType; private readonly app: Koa; + #requestCount = 0; + #onRequestEmpty?: () => Promise; + // eslint-disable-next-line max-params private constructor( public readonly envSet: EnvSet, diff --git a/packages/core/src/utils/connectors/index.ts b/packages/core/src/utils/connectors/index.ts index af9bbe721..efaf909cf 100644 --- a/packages/core/src/utils/connectors/index.ts +++ b/packages/core/src/utils/connectors/index.ts @@ -1,6 +1,6 @@ -import { existsSync } from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import { existsSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import type { ConnectorFactory } from '@logto/cli/lib/connector/index.js'; import { loadConnectorFactories as _loadConnectorFactories } from '@logto/cli/lib/connector/index.js'; diff --git a/packages/core/src/utils/jwks.ts b/packages/core/src/utils/jwks.ts index 2c85841a9..fd8c44ada 100644 --- a/packages/core/src/utils/jwks.ts +++ b/packages/core/src/utils/jwks.ts @@ -3,7 +3,7 @@ * - [initialize_keystore.js](https://github.com/panva/node-oidc-provider/blob/9da61e9c9dc6152cd1140d42ea06abe1d812c286/lib/helpers/initialize_keystore.js#L13-L36) */ -import { createHash } from 'crypto'; +import { createHash } from 'node:crypto'; import type { JWK, KeyLike } from 'jose'; import { exportJWK as joseExportJWK } from 'jose'; diff --git a/packages/core/src/utils/password.ts b/packages/core/src/utils/password.ts index 8d35b7538..27a809cc5 100644 --- a/packages/core/src/utils/password.ts +++ b/packages/core/src/utils/password.ts @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; import { UsersPasswordEncryptionMethod } from '@logto/schemas'; import { argon2i } from 'hash-wasm'; diff --git a/packages/core/src/utils/search.test.ts b/packages/core/src/utils/search.test.ts index ef81ed676..4d5d4786a 100644 --- a/packages/core/src/utils/search.test.ts +++ b/packages/core/src/utils/search.test.ts @@ -3,7 +3,7 @@ import type { ListSqlToken, TaggedTemplateLiteralInvocation } from 'slonik'; import { sql } from 'slonik'; // Will add `params` to the exception list -// eslint-disable-next-line unicorn/prevent-abbreviations + import { buildConditionsFromSearch, parseSearchParamsForSearch } from './search.js'; import { expectSqlAssert, expectSqlTokenAssert } from './test-utils.js'; diff --git a/packages/core/src/utils/search.ts b/packages/core/src/utils/search.ts index af83c2220..d24884336 100644 --- a/packages/core/src/utils/search.ts +++ b/packages/core/src/utils/search.ts @@ -116,12 +116,10 @@ const getSearchMetadata = (searchParameters: URLSearchParams, allowedFields?: st return { joint, matchMode, matchValues, isCaseSensitive }; }; -/* eslint-disable unicorn/prevent-abbreviations */ export const parseSearchParamsForSearch = ( searchParams: URLSearchParams, allowedFields?: string[] ): Search => { - /* eslint-enable unicorn/prevent-abbreviations */ const { matchMode, matchValues, ...rest } = getSearchMetadata(searchParams, allowedFields); // Validate and generate result diff --git a/packages/core/src/utils/zod.ts b/packages/core/src/utils/zod.ts index e8d7f3211..f61885278 100644 --- a/packages/core/src/utils/zod.ts +++ b/packages/core/src/utils/zod.ts @@ -177,6 +177,8 @@ export const zodTypeToSwagger = ( if (config instanceof ZodNativeEnum || config instanceof ZodEnum) { return { type: 'string', + // Type from Zod is any + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument enum: Object.values(config.enum), }; } @@ -198,6 +200,8 @@ export const zodTypeToSwagger = ( } if (config instanceof ZodObject) { + // Type from Zod is any + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument const entries = Object.entries(config.shape); const required = entries .filter(([, value]) => !(value instanceof ZodOptional)) diff --git a/packages/demo-app/package.json b/packages/demo-app/package.json index 20e837377..6d142e21a 100644 --- a/packages/demo-app/package.json +++ b/packages/demo-app/package.json @@ -23,10 +23,10 @@ "@logto/schemas": "workspace:^", "@parcel/core": "2.8.3", "@parcel/transformer-sass": "2.8.3", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/eslint-config-react": "2.0.1", - "@silverhand/ts-config": "2.0.3", - "@silverhand/ts-config-react": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/eslint-config-react": "3.0.0", + "@silverhand/ts-config": "3.0.0", + "@silverhand/ts-config-react": "3.0.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "buffer": "^5.7.1", diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 8f9462698..cdca69b69 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -27,9 +27,9 @@ "@logto/node": "1.1.0", "@logto/schemas": "workspace:^", "@peculiar/webcrypto": "^1.3.3", - "@silverhand/eslint-config": "2.0.1", + "@silverhand/eslint-config": "3.0.0", "@silverhand/essentials": "^2.5.0", - "@silverhand/ts-config": "2.0.3", + "@silverhand/ts-config": "3.0.0", "@types/expect-puppeteer": "^5.0.3", "@types/jest": "^29.4.0", "@types/jest-environment-puppeteer": "^5.0.3", diff --git a/packages/integration-tests/src/api/admin-user.ts b/packages/integration-tests/src/api/admin-user.ts index 91f8e065a..c8bab955b 100644 --- a/packages/integration-tests/src/api/admin-user.ts +++ b/packages/integration-tests/src/api/admin-user.ts @@ -11,27 +11,27 @@ type CreateUserPayload = Partial<{ isAdmin: boolean; }>; -export const createUser = (payload: CreateUserPayload) => +export const createUser = async (payload: CreateUserPayload) => authedAdminApi .post('users', { json: payload, }) .json(); -export const getUser = (userId: string) => authedAdminApi.get(`users/${userId}`).json(); +export const getUser = async (userId: string) => authedAdminApi.get(`users/${userId}`).json(); -export const getUsers = () => authedAdminApi.get('users').json(); +export const getUsers = async () => authedAdminApi.get('users').json(); -export const updateUser = (userId: string, payload: Partial) => +export const updateUser = async (userId: string, payload: Partial) => authedAdminApi .patch(`users/${userId}`, { json: payload, }) .json(); -export const deleteUser = (userId: string) => authedAdminApi.delete(`users/${userId}`); +export const deleteUser = async (userId: string) => authedAdminApi.delete(`users/${userId}`); -export const updateUserPassword = (userId: string, password: string) => +export const updateUserPassword = async (userId: string, password: string) => authedAdminApi .patch(`users/${userId}/password`, { json: { @@ -40,14 +40,14 @@ export const updateUserPassword = (userId: string, password: string) => }) .json(); -export const deleteUserIdentity = (userId: string, connectorTarget: string) => +export const deleteUserIdentity = async (userId: string, connectorTarget: string) => authedAdminApi.delete(`users/${userId}/identities/${connectorTarget}`); -export const assignRolesToUser = (userId: string, roleIds: string[]) => +export const assignRolesToUser = async (userId: string, roleIds: string[]) => authedAdminApi.post(`users/${userId}/roles`, { json: { roleIds } }); -export const getUserRoles = (userId: string) => +export const getUserRoles = async (userId: string) => authedAdminApi.get(`users/${userId}/roles`).json(); -export const deleteRoleFromUser = (userId: string, roleId: string) => +export const deleteRoleFromUser = async (userId: string, roleId: string) => authedAdminApi.delete(`users/${userId}/roles/${roleId}`); diff --git a/packages/integration-tests/src/api/application.ts b/packages/integration-tests/src/api/application.ts index f251d25c0..8778232df 100644 --- a/packages/integration-tests/src/api/application.ts +++ b/packages/integration-tests/src/api/application.ts @@ -7,7 +7,7 @@ import type { import { authedAdminApi } from './api.js'; -export const createApplication = (name: string, type: ApplicationType) => +export const createApplication = async (name: string, type: ApplicationType) => authedAdminApi .post('applications', { json: { @@ -17,10 +17,10 @@ export const createApplication = (name: string, type: ApplicationType) => }) .json(); -export const getApplication = (applicationId: string) => +export const getApplication = async (applicationId: string) => authedAdminApi.get(`applications/${applicationId}`).json(); -export const updateApplication = ( +export const updateApplication = async ( applicationId: string, payload: Partial< Omit & { @@ -36,5 +36,5 @@ export const updateApplication = ( }) .json(); -export const deleteApplication = (applicationId: string) => +export const deleteApplication = async (applicationId: string) => authedAdminApi.delete(`applications/${applicationId}`); diff --git a/packages/integration-tests/src/api/dashboard.ts b/packages/integration-tests/src/api/dashboard.ts index 8835bed54..30aeb8412 100644 --- a/packages/integration-tests/src/api/dashboard.ts +++ b/packages/integration-tests/src/api/dashboard.ts @@ -21,11 +21,11 @@ export type ActiveUserStatistics = { mau: StatisticsData; }; -export const getTotalUsersCount = () => +export const getTotalUsersCount = async () => authedAdminApi.get('dashboard/users/total').json(); -export const getNewUsersData = () => +export const getNewUsersData = async () => authedAdminApi.get('dashboard/users/new').json(); -export const getActiveUsersData = () => +export const getActiveUsersData = async () => authedAdminApi.get('dashboard/users/active').json(); diff --git a/packages/integration-tests/src/api/logs.ts b/packages/integration-tests/src/api/logs.ts index 331a0af10..9813d69e4 100644 --- a/packages/integration-tests/src/api/logs.ts +++ b/packages/integration-tests/src/api/logs.ts @@ -3,8 +3,7 @@ import { conditionalString } from '@silverhand/essentials'; import { authedAdminApi } from './api.js'; -// eslint-disable-next-line unicorn/prevent-abbreviations -export const getLogs = (params?: URLSearchParams) => +export const getLogs = async (params?: URLSearchParams) => authedAdminApi.get('logs?' + conditionalString(params?.toString())).json(); -export const getLog = (logId: string) => authedAdminApi.get(`logs/${logId}`).json(); +export const getLog = async (logId: string) => authedAdminApi.get(`logs/${logId}`).json(); diff --git a/packages/integration-tests/src/api/resource.ts b/packages/integration-tests/src/api/resource.ts index 5f988ce0f..18a710f1b 100644 --- a/packages/integration-tests/src/api/resource.ts +++ b/packages/integration-tests/src/api/resource.ts @@ -5,7 +5,7 @@ import { generateResourceIndicator, generateResourceName } from '#src/utils.js'; import { authedAdminApi } from './api.js'; -export const createResource = (name?: string, indicator?: string) => +export const createResource = async (name?: string, indicator?: string) => authedAdminApi .post('resources', { json: { @@ -15,10 +15,10 @@ export const createResource = (name?: string, indicator?: string) => }) .json(); -export const getResource = (resourceId: string, options?: OptionsOfTextResponseBody) => +export const getResource = async (resourceId: string, options?: OptionsOfTextResponseBody) => authedAdminApi.get(`resources/${resourceId}`, options).json(); -export const updateResource = ( +export const updateResource = async ( resourceId: string, payload: Partial> ) => @@ -30,5 +30,5 @@ export const updateResource = ( }) .json(); -export const deleteResource = (resourceId: string) => +export const deleteResource = async (resourceId: string) => authedAdminApi.delete(`resources/${resourceId}`); diff --git a/packages/integration-tests/src/api/role.ts b/packages/integration-tests/src/api/role.ts index 7f5ef6376..fe613fea8 100644 --- a/packages/integration-tests/src/api/role.ts +++ b/packages/integration-tests/src/api/role.ts @@ -4,7 +4,7 @@ import { generateRoleName } from '#src/utils.js'; import { authedAdminApi } from './api.js'; -export const createRole = (name?: string, description?: string, scopeIds?: string[]) => +export const createRole = async (name?: string, description?: string, scopeIds?: string[]) => authedAdminApi .post('roles', { json: { @@ -15,11 +15,11 @@ export const createRole = (name?: string, description?: string, scopeIds?: strin }) .json(); -export const getRoles = () => authedAdminApi.get('roles').json(); +export const getRoles = async () => authedAdminApi.get('roles').json(); -export const getRole = (roleId: string) => authedAdminApi.get(`roles/${roleId}`).json(); +export const getRole = async (roleId: string) => authedAdminApi.get(`roles/${roleId}`).json(); -export const updateRole = (roleId: string, payload: Partial>) => +export const updateRole = async (roleId: string, payload: Partial>) => authedAdminApi .patch(`roles/${roleId}`, { json: { @@ -28,28 +28,28 @@ export const updateRole = (roleId: string, payload: Partial(); -export const deleteRole = (roleId: string) => authedAdminApi.delete(`roles/${roleId}`); +export const deleteRole = async (roleId: string) => authedAdminApi.delete(`roles/${roleId}`); -export const getRoleScopes = (roleId: string) => +export const getRoleScopes = async (roleId: string) => authedAdminApi.get(`roles/${roleId}/scopes`).json(); -export const assignScopesToRole = (scopeIds: string[], roleId: string) => +export const assignScopesToRole = async (scopeIds: string[], roleId: string) => authedAdminApi .post(`roles/${roleId}/scopes`, { json: { scopeIds }, }) .json(); -export const deleteScopeFromRole = (scopeId: string, roleId: string) => +export const deleteScopeFromRole = async (scopeId: string, roleId: string) => authedAdminApi.delete(`roles/${roleId}/scopes/${scopeId}`); -export const getRoleUsers = (roleId: string) => +export const getRoleUsers = async (roleId: string) => authedAdminApi.get(`roles/${roleId}/users`).json(); -export const assignUsersToRole = (userIds: string[], roleId: string) => +export const assignUsersToRole = async (userIds: string[], roleId: string) => authedAdminApi.post(`roles/${roleId}/users`, { json: { userIds }, }); -export const deleteUserFromRole = (userId: string, roleId: string) => +export const deleteUserFromRole = async (userId: string, roleId: string) => authedAdminApi.delete(`roles/${roleId}/users/${userId}`); diff --git a/packages/integration-tests/src/api/scope.ts b/packages/integration-tests/src/api/scope.ts index 6116ac12b..e0edbe524 100644 --- a/packages/integration-tests/src/api/scope.ts +++ b/packages/integration-tests/src/api/scope.ts @@ -5,10 +5,10 @@ import { generateScopeName } from '#src/utils.js'; import { authedAdminApi } from './api.js'; -export const getScopes = (resourceId: string, options?: OptionsOfTextResponseBody) => +export const getScopes = async (resourceId: string, options?: OptionsOfTextResponseBody) => authedAdminApi.get(`resources/${resourceId}/scopes`, options).json(); -export const createScope = (resourceId: string, name?: string) => { +export const createScope = async (resourceId: string, name?: string) => { const scopeName = name ?? generateScopeName(); return authedAdminApi @@ -21,7 +21,7 @@ export const createScope = (resourceId: string, name?: string) => { .json(); }; -export const updateScope = ( +export const updateScope = async ( resourceId: string, scopeId: string, payload: Partial> @@ -34,5 +34,5 @@ export const updateScope = ( }) .json(); -export const deleteScope = (resourceId: string, scopeId: string) => +export const deleteScope = async (resourceId: string, scopeId: string) => authedAdminApi.delete(`resources/${resourceId}/scopes/${scopeId}`); diff --git a/packages/integration-tests/src/api/sign-in-experience.ts b/packages/integration-tests/src/api/sign-in-experience.ts index 231f3a76e..b270b8972 100644 --- a/packages/integration-tests/src/api/sign-in-experience.ts +++ b/packages/integration-tests/src/api/sign-in-experience.ts @@ -2,9 +2,10 @@ import type { SignInExperience } from '@logto/schemas'; import { authedAdminApi } from './api.js'; -export const getSignInExperience = () => authedAdminApi.get('sign-in-exp').json(); +export const getSignInExperience = async () => + authedAdminApi.get('sign-in-exp').json(); -export const updateSignInExperience = (signInExperience: Partial) => +export const updateSignInExperience = async (signInExperience: Partial) => authedAdminApi .patch('sign-in-exp', { json: signInExperience, diff --git a/packages/integration-tests/src/api/verification-code.ts b/packages/integration-tests/src/api/verification-code.ts index 4ac3ee5df..0bc9155f9 100644 --- a/packages/integration-tests/src/api/verification-code.ts +++ b/packages/integration-tests/src/api/verification-code.ts @@ -2,8 +2,8 @@ import type { RequestVerificationCodePayload, VerifyVerificationCodePayload } fr import { authedAdminApi } from './api.js'; -export const requestVerificationCode = (payload: RequestVerificationCodePayload) => +export const requestVerificationCode = async (payload: RequestVerificationCodePayload) => authedAdminApi.post('verification-codes', { json: payload }); -export const verifyVerificationCode = (payload: VerifyVerificationCodePayload) => +export const verifyVerificationCode = async (payload: VerifyVerificationCodePayload) => authedAdminApi.post('verification-codes/verify', { json: payload }); diff --git a/packages/integration-tests/src/helpers/index.ts b/packages/integration-tests/src/helpers/index.ts index e4f35441c..7f660b10c 100644 --- a/packages/integration-tests/src/helpers/index.ts +++ b/packages/integration-tests/src/helpers/index.ts @@ -1,9 +1,8 @@ -import fs from 'fs/promises'; -import { createServer } from 'http'; -import path from 'path'; +import fs from 'node:fs/promises'; +import { createServer } from 'node:http'; +import path from 'node:path'; import { mockSmsVerificationCodeFileName } from '@logto/connector-kit'; -import type { User } from '@logto/schemas'; import { RequestError } from 'got'; import { createUser } from '#src/api/index.js'; @@ -11,7 +10,7 @@ import { generateUsername } from '#src/utils.js'; const temporaryVerificationCodeFilePath = path.join('/tmp', mockSmsVerificationCodeFileName); -export const createUserByAdmin = ( +export const createUserByAdmin = async ( username?: string, password?: string, primaryEmail?: string, @@ -26,7 +25,7 @@ export const createUserByAdmin = ( primaryEmail, primaryPhone, isAdmin, - }).json(); + }); }; type VerificationCodeRecord = { diff --git a/packages/integration-tests/src/tests/api/admin-user.search.test.ts b/packages/integration-tests/src/tests/api/admin-user.search.test.ts index c25c87c5f..701659fda 100644 --- a/packages/integration-tests/src/tests/api/admin-user.search.test.ts +++ b/packages/integration-tests/src/tests/api/admin-user.search.test.ts @@ -1,4 +1,4 @@ -import type { IncomingHttpHeaders } from 'http'; +import type { IncomingHttpHeaders } from 'node:http'; import type { User } from '@logto/schemas'; @@ -38,7 +38,7 @@ describe('admin console user search params', () => { // eslint-disable-next-line @silverhand/fp/no-mutation users = await Promise.all( - rawNames.map((raw, index) => { + rawNames.map(async (raw, index) => { const username = raw.split(' ').join('_'); const name = raw .split(' ') @@ -62,7 +62,7 @@ describe('admin console user search params', () => { }); afterAll(async () => { - await Promise.all(users.map(({ id }) => deleteUser(id))); + await Promise.all(users.map(async ({ id }) => deleteUser(id))); }); it('should return all users if nothing specified', async () => { diff --git a/packages/integration-tests/src/tests/api/connector.test.ts b/packages/integration-tests/src/tests/api/connector.test.ts index 789cba03f..eabd71f5a 100644 --- a/packages/integration-tests/src/tests/api/connector.test.ts +++ b/packages/integration-tests/src/tests/api/connector.test.ts @@ -20,7 +20,7 @@ import { updateConnectorConfig, } from '#src/api/connector.js'; -const connectorIdMap = new Map(); +const connectorIdMap = new Map(); /* * We'd better only use mock connectors in integration tests. @@ -62,11 +62,11 @@ test('connector set-up flow', async () => { * We will test updating to the invalid connector config, that is the case not covered above. */ await expect( - updateConnectorConfig(connectorIdMap.get(mockSocialConnectorId), mockSmsConnectorConfig) + updateConnectorConfig(connectorIdMap.get(mockSocialConnectorId)!, mockSmsConnectorConfig) ).rejects.toThrow(HTTPError); // To confirm the failed updating request above did not modify the original config, // we check: the mock connector config should stay the same. - const mockSocialConnector = await getConnector(connectorIdMap.get(mockSocialConnectorId)); + const mockSocialConnector = await getConnector(connectorIdMap.get(mockSocialConnectorId)!); expect(mockSocialConnector.config).toEqual(mockSocialConnectorConfig); /* @@ -94,7 +94,7 @@ test('connector set-up flow', async () => { * Delete (i.e. disable) a connector */ await expect( - deleteConnectorById(connectorIdMap.get(mockStandardEmailConnectorId)) + deleteConnectorById(connectorIdMap.get(mockStandardEmailConnectorId)!) ).resolves.not.toThrow(); connectorIdMap.delete(mockStandardEmailConnectorId); @@ -105,13 +105,11 @@ test('connector set-up flow', async () => { expect(await listConnectors()).toEqual( expect.arrayContaining([ expect.objectContaining({ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment id: connectorIdMap.get(mockSmsConnectorId), connectorId: mockSmsConnectorId, config: mockSmsConnectorConfig, }), expect.objectContaining({ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment id: connectorIdMap.get(mockSocialConnectorId), connectorId: mockSocialConnectorId, config: mockSocialConnectorConfig, diff --git a/packages/integration-tests/src/tests/api/get-access-token.test.ts b/packages/integration-tests/src/tests/api/get-access-token.test.ts index 4f2341fdc..b5cbde339 100644 --- a/packages/integration-tests/src/tests/api/get-access-token.test.ts +++ b/packages/integration-tests/src/tests/api/get-access-token.test.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import { fetchTokenByRefreshToken } from '@logto/js'; import { defaultManagementApi, InteractionEvent } from '@logto/schemas'; diff --git a/packages/integration-tests/src/tests/ui/smoke.test.ts b/packages/integration-tests/src/tests/ui/smoke.test.ts index 3627e776c..bf3d81a93 100644 --- a/packages/integration-tests/src/tests/ui/smoke.test.ts +++ b/packages/integration-tests/src/tests/ui/smoke.test.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import { setDefaultOptions } from 'expect-puppeteer'; diff --git a/packages/phrases-ui/package.json b/packages/phrases-ui/package.json index 14fb82f8a..55d3d0302 100644 --- a/packages/phrases-ui/package.json +++ b/packages/phrases-ui/package.json @@ -38,8 +38,8 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "buffer": "^5.7.1", "eslint": "^8.34.0", "lint-staged": "^13.0.0", diff --git a/packages/phrases/package.json b/packages/phrases/package.json index bee31cc13..c17253f8e 100644 --- a/packages/phrases/package.json +++ b/packages/phrases/package.json @@ -38,8 +38,8 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "eslint": "^8.34.0", "lint-staged": "^13.0.0", "prettier": "^2.8.2", diff --git a/packages/phrases/src/locales/de/index.ts b/packages/phrases/src/locales/de/index.ts index 715f77192..ec52f1140 100644 --- a/packages/phrases/src/locales/de/index.ts +++ b/packages/phrases/src/locales/de/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/fr/index.ts b/packages/phrases/src/locales/fr/index.ts index 5a3541d9f..8bd57b482 100644 --- a/packages/phrases/src/locales/fr/index.ts +++ b/packages/phrases/src/locales/fr/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/ko/index.ts b/packages/phrases/src/locales/ko/index.ts index 9788f8495..2e138f26f 100644 --- a/packages/phrases/src/locales/ko/index.ts +++ b/packages/phrases/src/locales/ko/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/pt-br/index.ts b/packages/phrases/src/locales/pt-br/index.ts index 2c087c53d..306c93011 100644 --- a/packages/phrases/src/locales/pt-br/index.ts +++ b/packages/phrases/src/locales/pt-br/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/pt-pt/index.ts b/packages/phrases/src/locales/pt-pt/index.ts index e3447c128..0892f3bab 100644 --- a/packages/phrases/src/locales/pt-pt/index.ts +++ b/packages/phrases/src/locales/pt-pt/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/tr-tr/index.ts b/packages/phrases/src/locales/tr-tr/index.ts index 572e02c8b..285639c70 100644 --- a/packages/phrases/src/locales/tr-tr/index.ts +++ b/packages/phrases/src/locales/tr-tr/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/phrases/src/locales/zh-cn/index.ts b/packages/phrases/src/locales/zh-cn/index.ts index c90c4c0be..0dc555841 100644 --- a/packages/phrases/src/locales/zh-cn/index.ts +++ b/packages/phrases/src/locales/zh-cn/index.ts @@ -1,4 +1,5 @@ import type { LocalPhrase } from '../../types.js'; + import errors from './errors.js'; import translation from './translation/index.js'; diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 30252e601..ad852548e 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -40,9 +40,9 @@ "node": "^18.12.0" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", + "@silverhand/eslint-config": "3.0.0", "@silverhand/essentials": "^2.5.0", - "@silverhand/ts-config": "2.0.3", + "@silverhand/ts-config": "3.0.0", "@types/inquirer": "^9.0.0", "@types/jest": "^29.4.0", "@types/node": "^18.11.18", diff --git a/packages/schemas/src/gen/index.ts b/packages/schemas/src/gen/index.ts index dace4a1b1..5c4f2a6de 100644 --- a/packages/schemas/src/gen/index.ts +++ b/packages/schemas/src/gen/index.ts @@ -1,9 +1,9 @@ // LOG-88: Refactor '@logto/schemas' type gen // Consider add the better assert into `essentials` package -// eslint-disable-next-line no-restricted-imports -import assert from 'assert'; -import fs from 'fs/promises'; -import path from 'path'; + +import assert from 'node:assert'; +import fs from 'node:fs/promises'; +import path from 'node:path'; import { conditionalString, deduplicate } from '@silverhand/essentials'; import camelcase from 'camelcase'; diff --git a/packages/schemas/src/seeds/application.ts b/packages/schemas/src/seeds/application.ts index 94b95c460..7896bcd44 100644 --- a/packages/schemas/src/seeds/application.ts +++ b/packages/schemas/src/seeds/application.ts @@ -6,6 +6,7 @@ import type { CreateApplicationsRole, } from '../db-entries/index.js'; import { ApplicationType } from '../db-entries/index.js'; + import { adminTenantId } from './tenant.js'; /** diff --git a/packages/schemas/src/seeds/cloud-api.ts b/packages/schemas/src/seeds/cloud-api.ts index 66c5a0fc4..76fd9117b 100644 --- a/packages/schemas/src/seeds/cloud-api.ts +++ b/packages/schemas/src/seeds/cloud-api.ts @@ -2,6 +2,7 @@ import { generateStandardId } from '@logto/core-kit'; import type { CreateScope, Role } from '../index.js'; import { AdminTenantRole } from '../types/index.js'; + import type { UpdateAdminData } from './management-api.js'; import { adminTenantId } from './tenant.js'; diff --git a/packages/schemas/src/seeds/logto-config.ts b/packages/schemas/src/seeds/logto-config.ts index bc9c08c6d..4e053ef1b 100644 --- a/packages/schemas/src/seeds/logto-config.ts +++ b/packages/schemas/src/seeds/logto-config.ts @@ -1,4 +1,4 @@ -import { CreateLogtoConfig } from '../db-entries/index.js'; +import { type CreateLogtoConfig } from '../db-entries/index.js'; import type { AdminConsoleData } from '../types/index.js'; import { LogtoTenantConfigKey } from '../types/index.js'; diff --git a/packages/schemas/src/seeds/management-api.ts b/packages/schemas/src/seeds/management-api.ts index e75ae1de2..21b1599e2 100644 --- a/packages/schemas/src/seeds/management-api.ts +++ b/packages/schemas/src/seeds/management-api.ts @@ -2,6 +2,7 @@ import { generateStandardId } from '@logto/core-kit'; import type { CreateResource, CreateRole, CreateScope } from '../db-entries/index.js'; import { PredefinedScope, InternalRole, AdminTenantRole } from '../types/index.js'; + import { adminTenantId, defaultTenantId } from './tenant.js'; export type AdminData = { diff --git a/packages/schemas/src/seeds/sign-in-experience.ts b/packages/schemas/src/seeds/sign-in-experience.ts index dcf4ac99d..cdf2b2738 100644 --- a/packages/schemas/src/seeds/sign-in-experience.ts +++ b/packages/schemas/src/seeds/sign-in-experience.ts @@ -3,6 +3,7 @@ import { generateDarkColor } from '@logto/core-kit'; import type { CreateSignInExperience } from '../db-entries/index.js'; import { SignInMode } from '../db-entries/index.js'; import { SignInIdentifier } from '../foundations/index.js'; + import { adminTenantId, defaultTenantId } from './tenant.js'; const defaultPrimaryColor = '#6139F6'; diff --git a/packages/schemas/src/types/hook.ts b/packages/schemas/src/types/hook.ts index 652c6df78..5ba79d284 100644 --- a/packages/schemas/src/types/hook.ts +++ b/packages/schemas/src/types/hook.ts @@ -1,5 +1,6 @@ import type { Application, User } from '../db-entries/index.js'; import type { HookEvent } from '../foundations/index.js'; + import type { userInfoSelectFields } from './user.js'; export type HookEventPayload = { diff --git a/packages/schemas/src/types/interactions.ts b/packages/schemas/src/types/interactions.ts index ab586340a..74a990d76 100644 --- a/packages/schemas/src/types/interactions.ts +++ b/packages/schemas/src/types/interactions.ts @@ -2,6 +2,7 @@ import { emailRegEx, phoneRegEx, usernameRegEx, passwordRegEx } from '@logto/cor import { z } from 'zod'; import { arbitraryObjectGuard } from '../foundations/index.js'; + import type { EmailVerificationCodePayload, PhoneVerificationCodePayload, diff --git a/packages/shared/package.json b/packages/shared/package.json index a83371985..e8fe800f2 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -36,8 +36,8 @@ }, "devDependencies": { "@logto/connector-kit": "workspace:^", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/jest": "^29.4.0", "@types/node": "^18.11.18", "eslint": "^8.34.0", diff --git a/packages/shared/src/database/utils.ts b/packages/shared/src/database/utils.ts index 7fdd14d74..8bee023e7 100644 --- a/packages/shared/src/database/utils.ts +++ b/packages/shared/src/database/utils.ts @@ -37,7 +37,7 @@ export const excludeAutoSetFields = (fields: readonly T[]) => export const convertToPrimitiveOrSql = ( key: string, - value: NonNullable | null + value: SchemaValue ): NonNullable | SqlToken | null => { if (value === null) { return null; diff --git a/packages/shared/src/env/UrlSet.ts b/packages/shared/src/env/UrlSet.ts index 8f9bb9366..fd269f3ac 100644 --- a/packages/shared/src/env/UrlSet.ts +++ b/packages/shared/src/env/UrlSet.ts @@ -6,11 +6,11 @@ import { deduplicate, getEnv, trySafe, yes } from '@silverhand/essentials'; * It's useful for aggregating URLs for the same purpose, e.g. to serve the core service. */ export default class UrlSet { + public readonly isLocalhostDisabled = yes(getEnv(this.envPrefix + 'DISABLE_LOCALHOST')); + readonly #port = Number(getEnv(this.envPrefix + 'PORT') || this.defaultPort); readonly #endpoint = getEnv(this.envPrefix + 'ENDPOINT'); - public readonly isLocalhostDisabled = yes(getEnv(this.envPrefix + 'DISABLE_LOCALHOST')); - /** * Construct a new UrlSet instance by reading the following env variables: * diff --git a/packages/shared/src/esm/mock-esm.ts b/packages/shared/src/esm/mock-esm.ts index d34d40a3c..f23e2ff9d 100644 --- a/packages/shared/src/esm/mock-esm.ts +++ b/packages/shared/src/esm/mock-esm.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; export type WithEsmMock = { // Copied from `@jest/globals` diff --git a/packages/shared/src/utils/find-package.ts b/packages/shared/src/utils/find-package.ts index 2406155bf..93dc48c5b 100644 --- a/packages/shared/src/utils/find-package.ts +++ b/packages/shared/src/utils/find-package.ts @@ -1,5 +1,5 @@ -import { lstat } from 'fs/promises'; -import path from 'path'; +import { lstat } from 'node:fs/promises'; +import path from 'node:path'; import { conditional } from '@silverhand/essentials'; import { findUp, pathExists } from 'find-up'; diff --git a/packages/shared/src/utils/ttl-cache.ts b/packages/shared/src/utils/ttl-cache.ts index 28beba2d7..bd4fdda84 100644 --- a/packages/shared/src/utils/ttl-cache.ts +++ b/packages/shared/src/utils/ttl-cache.ts @@ -4,14 +4,6 @@ export class TtlCache { constructor(public readonly ttl = Number.POSITIVE_INFINITY) {} - #purge(key: Key) { - const expiration = this.expiration.get(key); - - if (expiration !== undefined && expiration < Date.now()) { - this.delete(key); - } - } - set(key: Key, value: Value, ttl = this.ttl) { if (value === undefined) { throw new TypeError('Value cannot be undefined'); @@ -43,4 +35,12 @@ export class TtlCache { this.expiration.clear(); this.data.clear(); } + + #purge(key: Key) { + const expiration = this.expiration.get(key); + + if (expiration !== undefined && expiration < Date.now()) { + this.delete(key); + } + } } diff --git a/packages/toolkit/connector-kit/package.json b/packages/toolkit/connector-kit/package.json index ced1dd463..87345d3e9 100644 --- a/packages/toolkit/connector-kit/package.json +++ b/packages/toolkit/connector-kit/package.json @@ -39,8 +39,8 @@ "zod": "^3.20.2" }, "devDependencies": { - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/node": "^18.11.18", "eslint": "^8.34.0", "lint-staged": "^13.0.0", diff --git a/packages/toolkit/core-kit/package.json b/packages/toolkit/core-kit/package.json index a4f009cd5..812085299 100644 --- a/packages/toolkit/core-kit/package.json +++ b/packages/toolkit/core-kit/package.json @@ -48,10 +48,10 @@ }, "devDependencies": { "@jest/types": "^29.0.3", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/eslint-config-react": "2.0.1", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config-react": "3.0.0", "@silverhand/essentials": "^2.5.0", - "@silverhand/ts-config": "2.0.3", + "@silverhand/ts-config": "3.0.0", "@types/color": "^3.0.3", "@types/jest": "^29.4.0", "@types/node": "^18.11.18", diff --git a/packages/toolkit/language-kit/package.json b/packages/toolkit/language-kit/package.json index cad271da3..f497cc91e 100644 --- a/packages/toolkit/language-kit/package.json +++ b/packages/toolkit/language-kit/package.json @@ -39,8 +39,8 @@ }, "devDependencies": { "@jest/types": "^29.0.3", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/ts-config": "2.0.3", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/ts-config": "3.0.0", "@types/jest": "^29.4.0", "@types/node": "^18.11.18", "eslint": "^8.34.0", diff --git a/packages/ui/package.json b/packages/ui/package.json index 3b894b368..dbd3ce23b 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -31,12 +31,12 @@ "@peculiar/webcrypto": "^1.3.3", "@react-spring/shared": "^9.6.1", "@react-spring/web": "^9.6.1", - "@silverhand/eslint-config": "2.0.1", - "@silverhand/eslint-config-react": "2.0.1", + "@silverhand/eslint-config": "3.0.0", + "@silverhand/eslint-config-react": "3.0.0", "@silverhand/essentials": "^2.5.0", "@silverhand/jest-config": "1.2.2", - "@silverhand/ts-config": "2.0.3", - "@silverhand/ts-config-react": "2.0.3", + "@silverhand/ts-config": "3.0.0", + "@silverhand/ts-config-react": "3.0.0", "@testing-library/react": "^14.0.0", "@types/color": "^3.0.3", "@types/jest": "^29.4.0", diff --git a/packages/ui/src/Layout/LandingPageLayout/index.tsx b/packages/ui/src/Layout/LandingPageLayout/index.tsx index 60e0a1836..bc29a4e94 100644 --- a/packages/ui/src/Layout/LandingPageLayout/index.tsx +++ b/packages/ui/src/Layout/LandingPageLayout/index.tsx @@ -9,6 +9,7 @@ import { layoutClassNames } from '@/utils/consts'; import { getBrandingLogoUrl } from '@/utils/logo'; import AppNotification from '../../containers/AppNotification'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/ui/src/Layout/SecondaryPageLayout/index.tsx b/packages/ui/src/Layout/SecondaryPageLayout/index.tsx index d851695ce..659934860 100644 --- a/packages/ui/src/Layout/SecondaryPageLayout/index.tsx +++ b/packages/ui/src/Layout/SecondaryPageLayout/index.tsx @@ -5,6 +5,7 @@ import NavBar from '@/components/NavBar'; import usePlatform from '@/hooks/use-platform'; import { InlineNotification } from '../../components/Notification'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/ui/src/Providers/AppBoundary/index.tsx b/packages/ui/src/Providers/AppBoundary/index.tsx index 609f45283..0693a4f87 100644 --- a/packages/ui/src/Providers/AppBoundary/index.tsx +++ b/packages/ui/src/Providers/AppBoundary/index.tsx @@ -9,6 +9,7 @@ import useTheme from '@/hooks/use-theme'; import ConfirmModalProvider from '../ConfirmModalProvider'; import IframeModalProvider from '../IframeModalProvider'; import ToastProvider from '../ToastProvider'; + import * as styles from './index.module.scss'; type Props = { diff --git a/packages/ui/src/components/ConfirmModal/AcModal.tsx b/packages/ui/src/components/ConfirmModal/AcModal.tsx index c1c3063b8..0f7ce4597 100644 --- a/packages/ui/src/components/ConfirmModal/AcModal.tsx +++ b/packages/ui/src/components/ConfirmModal/AcModal.tsx @@ -9,6 +9,7 @@ import IconButton from '@/components/Button/IconButton'; import { onKeyDownHandler } from '@/utils/a11y'; import * as modalStyles from '../../scss/modal.module.scss'; + import * as styles from './Acmodal.module.scss'; import type { ModalProps } from './type'; diff --git a/packages/ui/src/components/ConfirmModal/MobileModal.tsx b/packages/ui/src/components/ConfirmModal/MobileModal.tsx index a927a1bfe..9b398da3c 100644 --- a/packages/ui/src/components/ConfirmModal/MobileModal.tsx +++ b/packages/ui/src/components/ConfirmModal/MobileModal.tsx @@ -4,6 +4,7 @@ import ReactModal from 'react-modal'; import Button from '@/components/Button'; import * as modalStyles from '../../scss/modal.module.scss'; + import * as styles from './MobileModal.module.scss'; import type { ModalProps } from './type'; diff --git a/packages/ui/src/components/InputFields/SmartInputField/index.tsx b/packages/ui/src/components/InputFields/SmartInputField/index.tsx index 80c4eb9fd..2d0a295d0 100644 --- a/packages/ui/src/components/InputFields/SmartInputField/index.tsx +++ b/packages/ui/src/components/InputFields/SmartInputField/index.tsx @@ -8,6 +8,7 @@ import ClearIcon from '@/assets/icons/clear-icon.svg'; import IconButton from '@/components/Button/IconButton'; import InputField from '../InputField'; + import AnimatedPrefix from './AnimatedPrefix'; import CountryCodeSelector from './CountryCodeSelector'; import type { IdentifierInputType, IdentifierInputValue } from './use-smart-input-field'; diff --git a/packages/ui/src/pages/Continue/SetEmailOrPhone/index.test.tsx b/packages/ui/src/pages/Continue/SetEmailOrPhone/index.test.tsx index 8366cb160..0aa301949 100644 --- a/packages/ui/src/pages/Continue/SetEmailOrPhone/index.test.tsx +++ b/packages/ui/src/pages/Continue/SetEmailOrPhone/index.test.tsx @@ -6,10 +6,10 @@ import { act } from 'react-dom/test-utils'; import renderWithPageContext from '@/__mocks__/RenderWithPageContext'; import SettingsProvider from '@/__mocks__/RenderWithPageContext/SettingsProvider'; import { sendVerificationCodeApi } from '@/apis/utils'; -import { UserFlow, VerificationCodeIdentifier } from '@/types'; +import { UserFlow, type VerificationCodeIdentifier } from '@/types'; import { getDefaultCountryCallingCode } from '@/utils/country-code'; -import SetEmailOrPhone, { VerificationCodeProfileType, pageContent } from '.'; +import SetEmailOrPhone, { type VerificationCodeProfileType, pageContent } from '.'; const mockedNavigate = jest.fn(); diff --git a/packages/ui/src/pages/Continue/SetEmailOrPhone/index.tsx b/packages/ui/src/pages/Continue/SetEmailOrPhone/index.tsx index ce6daa978..718f66329 100644 --- a/packages/ui/src/pages/Continue/SetEmailOrPhone/index.tsx +++ b/packages/ui/src/pages/Continue/SetEmailOrPhone/index.tsx @@ -8,6 +8,7 @@ import type { VerificationCodeIdentifier } from '@/types'; import { UserFlow } from '@/types'; import IdentifierProfileForm from '../IdentifierProfileForm'; + import SocialIdentityNotification from './SocialIdentityNotification'; export type VerificationCodeProfileType = Exclude; @@ -59,7 +60,7 @@ const formSettings: Record< const SetEmailOrPhone = ({ missingProfile, notification }: Props) => { const { onSubmit, errorMessage, clearErrorMessage } = useSendVerificationCode(UserFlow.continue); - const handleSubmit = (identifier: SignInIdentifier, value: string) => { + const handleSubmit = async (identifier: SignInIdentifier, value: string) => { // Only handles email and phone if (identifier === SignInIdentifier.Username) { return; diff --git a/packages/ui/src/pages/Continue/SetUsername/index.tsx b/packages/ui/src/pages/Continue/SetUsername/index.tsx index abe62ad09..2a1af4e49 100644 --- a/packages/ui/src/pages/Continue/SetUsername/index.tsx +++ b/packages/ui/src/pages/Continue/SetUsername/index.tsx @@ -4,6 +4,7 @@ import type { TFuncKey } from 'react-i18next'; import SecondaryPageLayout from '@/Layout/SecondaryPageLayout'; import IdentifierProfileForm from '../IdentifierProfileForm'; + import useSetUsername from './use-set-username'; type Props = { @@ -13,7 +14,7 @@ type Props = { const SetUsername = (props: Props) => { const { onSubmit, errorMessage, clearErrorMessage } = useSetUsername(); - const handleSubmit = (identifier: SignInIdentifier, value: string) => { + const handleSubmit = async (identifier: SignInIdentifier, value: string) => { if (identifier !== SignInIdentifier.Username) { return; } diff --git a/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx b/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx index 9801aa787..515af9f34 100644 --- a/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx +++ b/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx @@ -5,7 +5,7 @@ import { MemoryRouter } from 'react-router-dom'; import renderWithPageContext from '@/__mocks__/RenderWithPageContext'; import { putInteraction, sendVerificationCode } from '@/apis/interaction'; -import { UserFlow, VerificationCodeIdentifier } from '@/types'; +import { UserFlow, type VerificationCodeIdentifier } from '@/types'; import ForgotPasswordForm from '.'; diff --git a/packages/ui/src/pages/ForgotPassword/index.tsx b/packages/ui/src/pages/ForgotPassword/index.tsx index 30ca00eee..1bc8adebb 100644 --- a/packages/ui/src/pages/ForgotPassword/index.tsx +++ b/packages/ui/src/pages/ForgotPassword/index.tsx @@ -10,6 +10,7 @@ import { passwordIdentifierStateGuard } from '@/types/guard'; import { identifierInputDescriptionMap } from '@/utils/form'; import ErrorPage from '../ErrorPage'; + import ForgotPasswordForm from './ForgotPasswordForm'; const ForgotPassword = () => { diff --git a/packages/ui/src/pages/Register/index.tsx b/packages/ui/src/pages/Register/index.tsx index c87966616..9e21665ae 100644 --- a/packages/ui/src/pages/Register/index.tsx +++ b/packages/ui/src/pages/Register/index.tsx @@ -9,6 +9,7 @@ import TermsAndPrivacy from '@/containers/TermsAndPrivacy'; import { useSieMethods } from '@/hooks/use-sie'; import ErrorPage from '../ErrorPage'; + import IdentifierRegisterForm from './IdentifierRegisterForm'; import * as styles from './index.module.scss'; diff --git a/packages/ui/src/pages/RegisterPassword/index.tsx b/packages/ui/src/pages/RegisterPassword/index.tsx index c02e65e6e..0cb187f31 100644 --- a/packages/ui/src/pages/RegisterPassword/index.tsx +++ b/packages/ui/src/pages/RegisterPassword/index.tsx @@ -6,6 +6,7 @@ import { useSieMethods } from '@/hooks/use-sie'; import { passwordMinLength } from '@/utils/form'; import ErrorPage from '../ErrorPage'; + import useUsernamePasswordRegister from './use-username-password-register'; const RegisterPassword = () => { diff --git a/packages/ui/src/pages/SignIn/index.tsx b/packages/ui/src/pages/SignIn/index.tsx index 9507b978c..e7d03e915 100644 --- a/packages/ui/src/pages/SignIn/index.tsx +++ b/packages/ui/src/pages/SignIn/index.tsx @@ -9,6 +9,7 @@ import TermsAndPrivacyLinks from '@/containers/TermsAndPrivacyLinks'; import { useSieMethods } from '@/hooks/use-sie'; import ErrorPage from '../ErrorPage'; + import Main from './Main'; import * as styles from './index.module.scss'; diff --git a/packages/ui/src/pages/SignInPassword/PasswordForm/index.tsx b/packages/ui/src/pages/SignInPassword/PasswordForm/index.tsx index 71c460321..ea7669262 100644 --- a/packages/ui/src/pages/SignInPassword/PasswordForm/index.tsx +++ b/packages/ui/src/pages/SignInPassword/PasswordForm/index.tsx @@ -12,6 +12,7 @@ import usePasswordSignIn from '@/hooks/use-password-sign-in'; import { useForgotPasswordSettings } from '@/hooks/use-sie'; import * as styles from '../index.module.scss'; + import VerificationCodeLink from './VerificationCodeLink'; type Props = { diff --git a/packages/ui/src/pages/SignInPassword/index.tsx b/packages/ui/src/pages/SignInPassword/index.tsx index 1fe14ec58..3e49dfb8c 100644 --- a/packages/ui/src/pages/SignInPassword/index.tsx +++ b/packages/ui/src/pages/SignInPassword/index.tsx @@ -28,7 +28,7 @@ const SignInPassword = () => { const methodSetting = signInMethods.find((method) => method.identifier === identifier); // Sign-In method not enabled - if (!methodSetting || !methodSetting.password) { + if (!methodSetting?.password) { return ; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0215c32a..f44e16db6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,9 +31,9 @@ importers: '@logto/core-kit': workspace:^ '@logto/schemas': workspace:^ '@logto/shared': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/inquirer': ^9.0.0 '@types/jest': ^29.4.0 '@types/node': ^18.11.18 @@ -92,8 +92,8 @@ importers: yargs: 17.6.0 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/inquirer': 9.0.3 '@types/jest': 29.4.0 '@types/node': 18.11.18 @@ -115,10 +115,10 @@ importers: '@logto/core-kit': workspace:^ '@logto/schemas': workspace:^ '@logto/shared': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/jest-config': ^2.0.1 - '@silverhand/ts-config': 2.0.3 + '@silverhand/jest-config': 3.0.0 + '@silverhand/ts-config': 3.0.0 '@types/accepts': ^1.3.5 '@types/http-proxy': ^1.17.9 '@types/jest': ^29.4.0 @@ -164,9 +164,9 @@ importers: mime-types: 2.1.35 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/jest-config': 2.0.1_jest@29.5.0 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/jest-config': 3.0.0_jest@29.5.0 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/accepts': 1.3.5 '@types/http-proxy': 1.17.9 '@types/jest': 29.4.0 @@ -198,11 +198,11 @@ importers: '@parcel/transformer-mdx': 2.8.3 '@parcel/transformer-sass': 2.8.3 '@parcel/transformer-svg-react': 2.8.3 - '@silverhand/eslint-config': 2.0.1 - '@silverhand/eslint-config-react': 2.0.1 + '@silverhand/eslint-config': 3.0.0 + '@silverhand/eslint-config-react': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 - '@silverhand/ts-config-react': 2.0.3 + '@silverhand/ts-config': 3.0.0 + '@silverhand/ts-config-react': 3.0.0 '@tsconfig/docusaurus': ^1.0.5 '@types/color': ^3.0.3 '@types/mdx': ^2.0.1 @@ -278,11 +278,11 @@ importers: '@parcel/transformer-mdx': 2.8.3_bj7lw3hdztun63ochfmnvr3ssm '@parcel/transformer-sass': 2.8.3_@parcel+core@2.8.3 '@parcel/transformer-svg-react': 2.8.3_@parcel+core@2.8.3 - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/eslint-config-react': 2.0.1_ilijqvcenf77xe3iaontyufqu4 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config-react': 3.0.0_ilijqvcenf77xe3iaontyufqu4 '@silverhand/essentials': 2.5.0 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 - '@silverhand/ts-config-react': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 + '@silverhand/ts-config-react': 3.0.0_typescript@5.0.2 '@tsconfig/docusaurus': 1.0.5 '@types/color': 3.0.3 '@types/mdx': 2.0.1 @@ -353,9 +353,9 @@ importers: '@logto/phrases-ui': workspace:^ '@logto/schemas': workspace:^ '@logto/shared': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/debug': ^4.1.7 '@types/etag': ^1.8.1 '@types/http-errors': ^1.8.2 @@ -477,8 +477,8 @@ importers: snakecase-keys: 5.4.4 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/debug': 4.1.7 '@types/etag': 1.8.1 '@types/http-errors': 1.8.2 @@ -525,10 +525,10 @@ importers: '@logto/schemas': workspace:^ '@parcel/core': 2.8.3 '@parcel/transformer-sass': 2.8.3 - '@silverhand/eslint-config': 2.0.1 - '@silverhand/eslint-config-react': 2.0.1 - '@silverhand/ts-config': 2.0.3 - '@silverhand/ts-config-react': 2.0.3 + '@silverhand/eslint-config': 3.0.0 + '@silverhand/eslint-config-react': 3.0.0 + '@silverhand/ts-config': 3.0.0 + '@silverhand/ts-config-react': 3.0.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 buffer: ^5.7.1 @@ -554,10 +554,10 @@ importers: '@logto/schemas': link:../schemas '@parcel/core': 2.8.3 '@parcel/transformer-sass': 2.8.3_@parcel+core@2.8.3 - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/eslint-config-react': 2.0.1_xy6uwdposyujrlafdregyrl22m - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 - '@silverhand/ts-config-react': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config-react': 3.0.0_xy6uwdposyujrlafdregyrl22m + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 + '@silverhand/ts-config-react': 3.0.0_typescript@5.0.2 '@types/react': 18.0.15 '@types/react-dom': 18.0.6 buffer: 5.7.1 @@ -584,9 +584,9 @@ importers: '@logto/node': 1.1.0 '@logto/schemas': workspace:^ '@peculiar/webcrypto': ^1.3.3 - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/expect-puppeteer': ^5.0.3 '@types/jest': ^29.4.0 '@types/jest-environment-puppeteer': ^5.0.3 @@ -613,9 +613,9 @@ importers: '@logto/node': 1.1.0 '@logto/schemas': link:../schemas '@peculiar/webcrypto': 1.3.3 - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q '@silverhand/essentials': 2.5.0 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/expect-puppeteer': 5.0.3 '@types/jest': 29.4.0 '@types/jest-environment-puppeteer': 5.0.3 @@ -636,9 +636,9 @@ importers: packages/phrases: specifiers: '@logto/language-kit': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 eslint: ^8.34.0 lint-staged: ^13.0.0 prettier: ^2.8.2 @@ -649,8 +649,8 @@ importers: '@silverhand/essentials': 2.5.0 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 eslint: 8.34.0 lint-staged: 13.0.0 prettier: 2.8.4 @@ -659,9 +659,9 @@ importers: packages/phrases-ui: specifiers: '@logto/language-kit': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 buffer: ^5.7.1 eslint: ^8.34.0 lint-staged: ^13.0.0 @@ -673,8 +673,8 @@ importers: '@silverhand/essentials': 2.5.0 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 buffer: 5.7.1 eslint: 8.34.0 lint-staged: 13.0.0 @@ -688,9 +688,9 @@ importers: '@logto/language-kit': workspace:^ '@logto/phrases': workspace:^ '@logto/phrases-ui': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/inquirer': ^9.0.0 '@types/jest': ^29.4.0 '@types/node': ^18.11.18 @@ -717,9 +717,9 @@ importers: '@withtyped/server': 0.8.1 zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q '@silverhand/essentials': 2.5.0 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/inquirer': 9.0.3 '@types/jest': 29.4.0 '@types/node': 18.11.18 @@ -741,9 +741,9 @@ importers: '@logto/connector-kit': workspace:^ '@logto/core-kit': workspace:^ '@logto/schemas': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/jest': ^29.4.0 '@types/node': ^18.11.18 applicationinsights: ^2.5.0 @@ -768,8 +768,8 @@ importers: applicationinsights: 2.5.0 devDependencies: '@logto/connector-kit': link:../toolkit/connector-kit - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/jest': 29.4.0 '@types/node': 18.11.18 eslint: 8.34.0 @@ -781,9 +781,9 @@ importers: packages/toolkit/connector-kit: specifiers: '@logto/language-kit': workspace:^ - '@silverhand/eslint-config': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 '@types/node': ^18.11.18 eslint: ^8.34.0 lint-staged: ^13.0.0 @@ -797,8 +797,8 @@ importers: optionalDependencies: zod: 3.20.2 devDependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/node': 18.11.18 eslint: 8.34.0 lint-staged: 13.0.0 @@ -810,10 +810,10 @@ importers: specifiers: '@jest/types': ^29.0.3 '@logto/language-kit': workspace:^ - '@silverhand/eslint-config': 2.0.1 - '@silverhand/eslint-config-react': 2.0.1 + '@silverhand/eslint-config': 3.0.0 '@silverhand/essentials': ^2.5.0 - '@silverhand/ts-config': 2.0.3 + '@silverhand/ts-config': 3.0.0 + '@silverhand/ts-config-react': 3.0.0 '@types/color': ^3.0.3 '@types/jest': ^29.4.0 '@types/node': ^18.11.18 @@ -837,10 +837,10 @@ importers: zod: 3.20.2 devDependencies: '@jest/types': 29.3.1 - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/eslint-config-react': 2.0.1_hmb2mh7z5gwzirl3vhvm7ourtu + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q '@silverhand/essentials': 2.5.0 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 + '@silverhand/ts-config-react': 3.0.0_typescript@5.0.2 '@types/color': 3.0.3 '@types/jest': 29.4.0 '@types/node': 18.11.18 @@ -857,8 +857,8 @@ importers: packages/toolkit/language-kit: specifiers: '@jest/types': ^29.0.3 - '@silverhand/eslint-config': 2.0.1 - '@silverhand/ts-config': 2.0.3 + '@silverhand/eslint-config': 3.0.0 + '@silverhand/ts-config': 3.0.0 '@types/jest': ^29.4.0 '@types/node': ^18.11.18 eslint: ^8.34.0 @@ -872,8 +872,8 @@ importers: zod: 3.20.2 devDependencies: '@jest/types': 29.3.1 - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 '@types/jest': 29.4.0 '@types/node': 18.11.18 eslint: 8.34.0 @@ -899,12 +899,12 @@ importers: '@peculiar/webcrypto': ^1.3.3 '@react-spring/shared': ^9.6.1 '@react-spring/web': ^9.6.1 - '@silverhand/eslint-config': 2.0.1 - '@silverhand/eslint-config-react': 2.0.1 + '@silverhand/eslint-config': 3.0.0 + '@silverhand/eslint-config-react': 3.0.0 '@silverhand/essentials': ^2.5.0 '@silverhand/jest-config': 1.2.2 - '@silverhand/ts-config': 2.0.3 - '@silverhand/ts-config-react': 2.0.3 + '@silverhand/ts-config': 3.0.0 + '@silverhand/ts-config-react': 3.0.0 '@testing-library/react': ^14.0.0 '@types/color': ^3.0.3 '@types/jest': ^29.4.0 @@ -964,12 +964,12 @@ importers: '@peculiar/webcrypto': 1.3.3 '@react-spring/shared': 9.6.1_react@18.2.0 '@react-spring/web': 9.6.1_biqbaboplfbrettd7655fr4n2y - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - '@silverhand/eslint-config-react': 2.0.1_ilijqvcenf77xe3iaontyufqu4 + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config-react': 3.0.0_ilijqvcenf77xe3iaontyufqu4 '@silverhand/essentials': 2.5.0 '@silverhand/jest-config': 1.2.2_44ttdtjaknnkcgzh5px4h2qxl4 - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 - '@silverhand/ts-config-react': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 + '@silverhand/ts-config-react': 3.0.0_typescript@5.0.2 '@testing-library/react': 14.0.0_biqbaboplfbrettd7655fr4n2y '@types/color': 3.0.3 '@types/jest': 29.4.0 @@ -1168,7 +1168,7 @@ packages: convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 - json5: 2.2.1 + json5: 2.2.3 lodash: 4.17.21 resolve: 1.22.1 semver: 5.7.1 @@ -1194,7 +1194,7 @@ packages: convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 - json5: 2.2.1 + json5: 2.2.3 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -1515,7 +1515,7 @@ packages: resolution: {integrity: sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.9 + regenerator-runtime: 0.13.11 /@babel/runtime/7.19.4: resolution: {integrity: sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==} @@ -1952,16 +1952,21 @@ packages: postcss-selector-parser: 6.0.11 dev: true - /@eslint-community/eslint-utils/4.1.2_eslint@8.34.0: - resolution: {integrity: sha512-7qELuQWWjVDdVsFQ5+beUl+KPczrEDA7S3zM4QUd/bJl7oXgsmpXaEVqrRTnOBqenOV4rWf2kVZk2Ot085zPWA==} + /@eslint-community/eslint-utils/4.3.0_eslint@8.34.0: + resolution: {integrity: sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: eslint: 8.34.0 eslint-visitor-keys: 3.3.0 dev: true + /@eslint-community/regexpp/4.4.0: + resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + /@eslint/eslintrc/1.4.1: resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2703,7 +2708,7 @@ packages: dependencies: '@lezer/common': 0.15.12 '@lezer/lr': 0.15.8 - json5: 2.2.1 + json5: 2.2.3 dev: true /@msgpackr-extract/msgpackr-extract-darwin-arm64/2.2.0: @@ -3359,7 +3364,7 @@ packages: '@parcel/source-map': 2.1.1 '@parcel/utils': 2.8.3 browserslist: 4.21.4 - json5: 2.2.1 + json5: 2.2.3 nullthrows: 1.1.1 semver: 5.7.1 transitivePeerDependencies: @@ -3436,7 +3441,7 @@ packages: engines: {node: '>= 12.0.0', parcel: ^2.8.3} dependencies: '@parcel/plugin': 2.8.3_@parcel+core@2.8.3 - json5: 2.2.1 + json5: 2.2.3 transitivePeerDependencies: - '@parcel/core' dev: true @@ -3728,35 +3733,13 @@ packages: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} dev: true - /@silverhand/eslint-config-react/2.0.1_hmb2mh7z5gwzirl3vhvm7ourtu: - resolution: {integrity: sha512-mQ8+9+JdJ9OlExlF3oamyXCzJ9YTj7u8p999w1Lc1ZHsBTe2u/FxgN14+aWlJ1P0YDtcepNykALAX0a7/1CYKA==} + /@silverhand/eslint-config-react/3.0.0_ilijqvcenf77xe3iaontyufqu4: + resolution: {integrity: sha512-6d1I3BK5KoRT/yWsByYpqmHTMfCZakuGKR+sDNhBNCFaElZDaTHSizb3wN7dY2DVs6VDfTnZG1sva+U+VYk3zg==} engines: {node: ^18.12.0} peerDependencies: stylelint: ^15.0.0 dependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q - eslint-config-xo-react: 0.27.0_xjjcxp76ccxcu2rtkp4ut3zfjy - eslint-plugin-jsx-a11y: 6.6.1_eslint@8.34.0 - eslint-plugin-react: 7.31.10_eslint@8.34.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.34.0 - stylelint: 15.0.0 - stylelint-config-xo-scss: 0.15.0_fjjhkehkplgtfpeiyp4aw74d4a - transitivePeerDependencies: - - eslint - - eslint-import-resolver-webpack - - postcss - - prettier - - supports-color - - typescript - dev: true - - /@silverhand/eslint-config-react/2.0.1_ilijqvcenf77xe3iaontyufqu4: - resolution: {integrity: sha512-mQ8+9+JdJ9OlExlF3oamyXCzJ9YTj7u8p999w1Lc1ZHsBTe2u/FxgN14+aWlJ1P0YDtcepNykALAX0a7/1CYKA==} - engines: {node: ^18.12.0} - peerDependencies: - stylelint: ^15.0.0 - dependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q eslint-config-xo-react: 0.27.0_xjjcxp76ccxcu2rtkp4ut3zfjy eslint-plugin-jsx-a11y: 6.6.1_eslint@8.34.0 eslint-plugin-react: 7.31.10_eslint@8.34.0 @@ -3772,13 +3755,13 @@ packages: - typescript dev: true - /@silverhand/eslint-config-react/2.0.1_xy6uwdposyujrlafdregyrl22m: - resolution: {integrity: sha512-mQ8+9+JdJ9OlExlF3oamyXCzJ9YTj7u8p999w1Lc1ZHsBTe2u/FxgN14+aWlJ1P0YDtcepNykALAX0a7/1CYKA==} + /@silverhand/eslint-config-react/3.0.0_xy6uwdposyujrlafdregyrl22m: + resolution: {integrity: sha512-6d1I3BK5KoRT/yWsByYpqmHTMfCZakuGKR+sDNhBNCFaElZDaTHSizb3wN7dY2DVs6VDfTnZG1sva+U+VYk3zg==} engines: {node: ^18.12.0} peerDependencies: stylelint: ^15.0.0 dependencies: - '@silverhand/eslint-config': 2.0.1_f5srfdki6doc7lvdu3rizy6f2q + '@silverhand/eslint-config': 3.0.0_f5srfdki6doc7lvdu3rizy6f2q eslint-config-xo-react: 0.27.0_xjjcxp76ccxcu2rtkp4ut3zfjy eslint-plugin-jsx-a11y: 6.6.1_eslint@8.34.0 eslint-plugin-react: 7.31.10_eslint@8.34.0 @@ -3794,31 +3777,31 @@ packages: - typescript dev: true - /@silverhand/eslint-config/2.0.1_f5srfdki6doc7lvdu3rizy6f2q: - resolution: {integrity: sha512-EUJseDVhvJUlEdr0dtPTbwCdooasPTLzXDNq3mGB3YEglbXyfh+2LMVgYCzNfZC1AFp6mdf0gdkAKeKhHodY0A==} + /@silverhand/eslint-config/3.0.0_f5srfdki6doc7lvdu3rizy6f2q: + resolution: {integrity: sha512-vVcTniAfrLNhFBUebsTlcFxpJ0BttpDKRZ6lv6Z9PCOk4PyMSPPmNjEMLpaBekG1idLr1CDUJfKVZmtASBegXA==} engines: {node: ^18.12.0} peerDependencies: eslint: ^8.34.0 prettier: ^2.8.2 dependencies: '@silverhand/eslint-plugin-fp': 2.5.0_eslint@8.34.0 - '@typescript-eslint/eslint-plugin': 5.40.0_ppyrexifh2c7ckrlwv3p42dk5i - '@typescript-eslint/parser': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/eslint-plugin': 5.56.0_ftvidnylzkqlsgegxlccclav64 + '@typescript-eslint/parser': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva eslint: 8.34.0 - eslint-config-prettier: 8.5.0_eslint@8.34.0 + eslint-config-prettier: 8.8.0_eslint@8.34.0 eslint-config-xo: 0.42.0_eslint@8.34.0 - eslint-config-xo-typescript: 0.53.0_hqevzacvl2z6rrkk22ybjlwvzq - eslint-import-resolver-typescript: 3.5.1_w7dy265x2bmlgtc6kmsfumkjde + eslint-config-xo-typescript: 0.56.0_v6o634bokf3r542qujbzqcgwa4 + eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm eslint-plugin-consistent-default-export-name: 0.0.15 eslint-plugin-eslint-comments: 3.2.0_eslint@8.34.0 - eslint-plugin-import: 2.26.0_7acvpkap2crzb63j3epkkcikb4 + eslint-plugin-import: 2.27.5_c7h6di73sfsvtokru7qne2vi5y eslint-plugin-no-use-extend-native: 0.5.0 eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_tgj6q6crlj7y24j3aycgzuhnii + eslint-plugin-prettier: 4.2.1_jconwxx2oyjg5lthwwzj36ffwa eslint-plugin-promise: 6.1.0_eslint@8.34.0 eslint-plugin-sql: 2.1.0_eslint@8.34.0 eslint-plugin-unicorn: 45.0.2_eslint@8.34.0 - eslint-plugin-unused-imports: 2.0.0_czsqqwqapes7i6tgh3gb7mfbz4 + eslint-plugin-unused-imports: 2.0.0_szgi4oubnshn2qcajsva64qruu prettier: 2.8.4 transitivePeerDependencies: - eslint-import-resolver-webpack @@ -3871,8 +3854,8 @@ packages: - typescript dev: true - /@silverhand/jest-config/2.0.1_jest@29.5.0: - resolution: {integrity: sha512-91dsrfD6M/IdFcfDc9yqclmviLphpUw/H7N0yMMYEJVx9JM4pMfTAEqgeon014Zxx7SKbvsxKuUarIZxungLPg==} + /@silverhand/jest-config/3.0.0_jest@29.5.0: + resolution: {integrity: sha512-5ezkX1/EVQiL2Y3lMY3jLT00GvyRgNKWAB/LIToVN0BQPnasdzKV6sSn2wrQD6XY3lNvR9TBdZajGmG/jtcRjA==} engines: {node: ^18.12.0} peerDependencies: jest: ^29.0.0 || ^29.1.2 @@ -3882,21 +3865,21 @@ packages: jest: 29.5.0_@types+node@18.11.18 dev: true - /@silverhand/ts-config-react/2.0.3_typescript@5.0.2: - resolution: {integrity: sha512-qJk601yt4pQThr8LMknIYm/53MmrD40k9LvJUxlEnjIlQqEat4rp8+Q7Ebmy5IA53U22m42k5nJeAtDpQxhKAg==} + /@silverhand/ts-config-react/3.0.0_typescript@5.0.2: + resolution: {integrity: sha512-zQL7kB6ropASS9/p7/g9PEsOIPAwjI20EVER8hShfV1jDURK9zXGDlbAhZbxLNS1n3z2AyPE+0ELEMZ7aIntRA==} engines: {node: ^18.12.0} peerDependencies: - typescript: ^4.9.4 + typescript: ^5.0.0 dependencies: - '@silverhand/ts-config': 2.0.3_typescript@5.0.2 + '@silverhand/ts-config': 3.0.0_typescript@5.0.2 typescript: 5.0.2 dev: true - /@silverhand/ts-config/2.0.3_typescript@5.0.2: - resolution: {integrity: sha512-98m+7b2gUIkV5AgpwiMRbnYjclkZYGZnNrLioTtvYtKWz3TZZ6EFTVPK1isSrCwSUuYzx38+QNSVi89t4G1IDA==} + /@silverhand/ts-config/3.0.0_typescript@5.0.2: + resolution: {integrity: sha512-rt4jbxx3JyJ97i/tpMXOSMSk76Ahgt4HycXtlLgbISAlfX1he/VK82Wh4vmUAUu21sV7W9JcK+T2krvV5ILpIA==} engines: {node: ^18.12.0} peerDependencies: - typescript: ^4.9.4 + typescript: ^5.0.0 dependencies: typescript: 5.0.2 dev: true @@ -4345,7 +4328,7 @@ packages: /@types/is-ci/3.0.0: resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} dependencies: - ci-info: 3.5.0 + ci-info: 3.8.0 dev: true /@types/istanbul-lib-coverage/2.0.4: @@ -4703,8 +4686,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/5.40.0_ppyrexifh2c7ckrlwv3p42dk5i: - resolution: {integrity: sha512-FIBZgS3DVJgqPwJzvZTuH4HNsZhHMa9SjxTKAZTlMsPw/UzpEjcf9f4dfgDJEHjK+HboUJo123Eshl6niwEm/Q==} + /@typescript-eslint/eslint-plugin/5.56.0_ftvidnylzkqlsgegxlccclav64: + resolution: {integrity: sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -4714,14 +4697,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/type-utils': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva - '@typescript-eslint/utils': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva + '@eslint-community/regexpp': 4.4.0 + '@typescript-eslint/parser': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/scope-manager': 5.56.0 + '@typescript-eslint/type-utils': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/utils': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva debug: 4.3.4 eslint: 8.34.0 + grapheme-splitter: 1.0.4 ignore: 5.2.4 - regexpp: 3.2.0 + natural-compare-lite: 1.4.0 semver: 7.3.8 tsutils: 3.21.0_typescript@5.0.2 typescript: 5.0.2 @@ -4729,8 +4714,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.40.0_qxbo2xm47qt6fxnlmgbosp4hva: - resolution: {integrity: sha512-Ah5gqyX2ySkiuYeOIDg7ap51/b63QgWZA7w6AHtFrag7aH0lRQPbLzUjk0c9o5/KZ6JRkTTDKShL4AUrQa6/hw==} + /@typescript-eslint/parser/5.56.0_qxbo2xm47qt6fxnlmgbosp4hva: + resolution: {integrity: sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -4739,9 +4724,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/typescript-estree': 5.40.0_typescript@5.0.2 + '@typescript-eslint/scope-manager': 5.56.0 + '@typescript-eslint/types': 5.56.0 + '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.0.2 debug: 4.3.4 eslint: 8.34.0 typescript: 5.0.2 @@ -4749,16 +4734,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.40.0: - resolution: {integrity: sha512-d3nPmjUeZtEWRvyReMI4I1MwPGC63E8pDoHy0BnrYjnJgilBD3hv7XOiETKLY/zTwI7kCnBDf2vWTRUVpYw0Uw==} + /@typescript-eslint/scope-manager/5.56.0: + resolution: {integrity: sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/visitor-keys': 5.40.0 + '@typescript-eslint/types': 5.56.0 + '@typescript-eslint/visitor-keys': 5.56.0 dev: true - /@typescript-eslint/type-utils/5.40.0_qxbo2xm47qt6fxnlmgbosp4hva: - resolution: {integrity: sha512-nfuSdKEZY2TpnPz5covjJqav+g5qeBqwSHKBvz7Vm1SAfy93SwKk/JeSTymruDGItTwNijSsno5LhOHRS1pcfw==} + /@typescript-eslint/type-utils/5.56.0_qxbo2xm47qt6fxnlmgbosp4hva: + resolution: {integrity: sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -4767,8 +4752,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.40.0_typescript@5.0.2 - '@typescript-eslint/utils': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.0.2 + '@typescript-eslint/utils': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva debug: 4.3.4 eslint: 8.34.0 tsutils: 3.21.0_typescript@5.0.2 @@ -4777,13 +4762,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.40.0: - resolution: {integrity: sha512-V1KdQRTXsYpf1Y1fXCeZ+uhjW48Niiw0VGt4V8yzuaDTU8Z1Xl7yQDyQNqyAFcVhpYXIVCEuxSIWTsLDpHgTbw==} + /@typescript-eslint/types/5.56.0: + resolution: {integrity: sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.40.0_typescript@5.0.2: - resolution: {integrity: sha512-b0GYlDj8TLTOqwX7EGbw2gL5EXS2CPEWhF9nGJiGmEcmlpNBjyHsTwbqpyIEPVpl6br4UcBOYlcI2FJVtJkYhg==} + /@typescript-eslint/typescript-estree/5.56.0_typescript@5.0.2: + resolution: {integrity: sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -4791,8 +4776,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/visitor-keys': 5.40.0 + '@typescript-eslint/types': 5.56.0 + '@typescript-eslint/visitor-keys': 5.56.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -4803,30 +4788,31 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.40.0_qxbo2xm47qt6fxnlmgbosp4hva: - resolution: {integrity: sha512-MO0y3T5BQ5+tkkuYZJBjePewsY+cQnfkYeRqS6tPh28niiIwPnQ1t59CSRcs1ZwJJNOdWw7rv9pF8aP58IMihA==} + /@typescript-eslint/utils/5.56.0_qxbo2xm47qt6fxnlmgbosp4hva: + resolution: {integrity: sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: + '@eslint-community/eslint-utils': 4.3.0_eslint@8.34.0 '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/typescript-estree': 5.40.0_typescript@5.0.2 + '@types/semver': 7.3.12 + '@typescript-eslint/scope-manager': 5.56.0 + '@typescript-eslint/types': 5.56.0 + '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.0.2 eslint: 8.34.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.40.0: - resolution: {integrity: sha512-ijJ+6yig+x9XplEpG2K6FUdJeQGGj/15U3S56W9IqXKJqleuD7zJ2AX/miLezwxpd7ZxDAqO87zWufKg+RPZyQ==} + /@typescript-eslint/visitor-keys/5.56.0: + resolution: {integrity: sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.40.0 + '@typescript-eslint/types': 5.56.0 eslint-visitor-keys: 3.3.0 dev: true @@ -5076,8 +5062,8 @@ packages: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} dev: true - /array-includes/3.1.5: - resolution: {integrity: sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==} + /array-includes/3.1.6: + resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -5092,8 +5078,8 @@ packages: engines: {node: '>=8'} dev: true - /array.prototype.flat/1.3.0: - resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} + /array.prototype.flat/1.3.1: + resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -5102,8 +5088,8 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /array.prototype.flatmap/1.3.0: - resolution: {integrity: sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==} + /array.prototype.flatmap/1.3.1: + resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -6276,17 +6262,6 @@ packages: resolution: {integrity: sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==} dev: true - /debug/2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: true - /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -6776,8 +6751,8 @@ packages: lodash.zip: 4.2.0 dev: true - /eslint-config-prettier/8.5.0_eslint@8.34.0: - resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + /eslint-config-prettier/8.8.0_eslint@8.34.0: + resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -6798,17 +6773,17 @@ packages: eslint-plugin-react-hooks: 4.6.0_eslint@8.34.0 dev: true - /eslint-config-xo-typescript/0.53.0_hqevzacvl2z6rrkk22ybjlwvzq: - resolution: {integrity: sha512-IJ1n70egMPTou/41HoGGFbLf/2WCsVW5lSUxOSklrR8T1221fMRPVJxIVZ3evr8R+N5wR6uzg/0uzSymwWA5Bg==} + /eslint-config-xo-typescript/0.56.0_v6o634bokf3r542qujbzqcgwa4: + resolution: {integrity: sha512-JOuV9M6R0BphdWome5SiolbsZFpw5DX83HgUaIUoEZwkk0hDv+fmPoHNc3KwmoON5QEkuBxlIbW0o3PifzPCuw==} engines: {node: '>=12'} peerDependencies: - '@typescript-eslint/eslint-plugin': '>=5.31.0' - '@typescript-eslint/parser': '>=5.31.0' + '@typescript-eslint/eslint-plugin': '>=5.43.0' + '@typescript-eslint/parser': '>=5.43.0' eslint: '>=8.0.0' typescript: '>=4.4' dependencies: - '@typescript-eslint/eslint-plugin': 5.40.0_ppyrexifh2c7ckrlwv3p42dk5i - '@typescript-eslint/parser': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/eslint-plugin': 5.56.0_ftvidnylzkqlsgegxlccclav64 + '@typescript-eslint/parser': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva eslint: 8.34.0 typescript: 5.0.2 dev: true @@ -6823,18 +6798,19 @@ packages: eslint: 8.34.0 dev: true - /eslint-import-resolver-node/0.3.6: - resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} + /eslint-import-resolver-node/0.3.7: + resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 + is-core-module: 2.11.0 resolve: 1.22.1 transitivePeerDependencies: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.1_w7dy265x2bmlgtc6kmsfumkjde: - resolution: {integrity: sha512-U7LUjNJPYjNsHvAUAkt/RU3fcTSpbllA0//35B4eLYTX74frmOepbt7F7J3D1IGtj9k21buOpaqtDd4ZlS/BYQ==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + /eslint-import-resolver-typescript/3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm: + resolution: {integrity: sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' eslint-plugin-import: '*' @@ -6842,17 +6818,17 @@ packages: debug: 4.3.4 enhanced-resolve: 5.10.0 eslint: 8.34.0 - eslint-plugin-import: 2.26.0_7acvpkap2crzb63j3epkkcikb4 + eslint-plugin-import: 2.27.5_c7h6di73sfsvtokru7qne2vi5y get-tsconfig: 4.2.0 globby: 13.1.2 - is-core-module: 2.10.0 + is-core-module: 2.11.0 is-glob: 4.0.3 synckit: 0.8.4 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_qoky5e4xynt4i3srlsoanlvvri: + /eslint-module-utils/2.7.4_v4ufnal6atdzs6lwplbrbj5hoe: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -6873,11 +6849,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva + '@typescript-eslint/parser': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva debug: 3.2.7 eslint: 8.34.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.1_w7dy265x2bmlgtc6kmsfumkjde + eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm transitivePeerDependencies: - supports-color dev: true @@ -6912,8 +6888,8 @@ packages: ignore: 5.2.4 dev: true - /eslint-plugin-import/2.26.0_7acvpkap2crzb63j3epkkcikb4: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + /eslint-plugin-import/2.27.5_c7h6di73sfsvtokru7qne2vi5y: + resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -6922,20 +6898,22 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_qxbo2xm47qt6fxnlmgbosp4hva - array-includes: 3.1.5 - array.prototype.flat: 1.3.0 - debug: 2.6.9 + '@typescript-eslint/parser': 5.56.0_qxbo2xm47qt6fxnlmgbosp4hva + array-includes: 3.1.6 + array.prototype.flat: 1.3.1 + array.prototype.flatmap: 1.3.1 + debug: 3.2.7 doctrine: 2.1.0 eslint: 8.34.0 - eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_qoky5e4xynt4i3srlsoanlvvri + eslint-import-resolver-node: 0.3.7 + eslint-module-utils: 2.7.4_v4ufnal6atdzs6lwplbrbj5hoe has: 1.0.3 - is-core-module: 2.10.0 + is-core-module: 2.11.0 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.5 + object.values: 1.1.6 resolve: 1.22.1 + semver: 6.3.0 tsconfig-paths: 3.14.1 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -6951,7 +6929,7 @@ packages: dependencies: '@babel/runtime': 7.19.4 aria-query: 4.2.2 - array-includes: 3.1.5 + array-includes: 3.1.6 ast-types-flow: 0.0.7 axe-core: 4.4.3 axobject-query: 2.2.0 @@ -6990,7 +6968,7 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-prettier/4.2.1_tgj6q6crlj7y24j3aycgzuhnii: + /eslint-plugin-prettier/4.2.1_jconwxx2oyjg5lthwwzj36ffwa: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -7002,7 +6980,7 @@ packages: optional: true dependencies: eslint: 8.34.0 - eslint-config-prettier: 8.5.0_eslint@8.34.0 + eslint-config-prettier: 8.8.0_eslint@8.34.0 prettier: 2.8.4 prettier-linter-helpers: 1.0.0 dev: true @@ -7031,8 +7009,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - array-includes: 3.1.5 - array.prototype.flatmap: 1.3.0 + array-includes: 3.1.6 + array.prototype.flatmap: 1.3.1 doctrine: 2.1.0 eslint: 8.34.0 estraverse: 5.3.0 @@ -7041,7 +7019,7 @@ packages: object.entries: 1.1.5 object.fromentries: 2.0.5 object.hasown: 1.1.1 - object.values: 1.1.5 + object.values: 1.1.6 prop-types: 15.8.1 resolve: 2.0.0-next.4 semver: 6.3.0 @@ -7071,7 +7049,7 @@ packages: eslint: '>=8.28.0' dependencies: '@babel/helper-validator-identifier': 7.19.1 - '@eslint-community/eslint-utils': 4.1.2_eslint@8.34.0 + '@eslint-community/eslint-utils': 4.3.0_eslint@8.34.0 ci-info: 3.8.0 clean-regexp: 1.0.0 eslint: 8.34.0 @@ -7089,7 +7067,7 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-unused-imports/2.0.0_czsqqwqapes7i6tgh3gb7mfbz4: + /eslint-plugin-unused-imports/2.0.0_szgi4oubnshn2qcajsva64qruu: resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -7099,7 +7077,7 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.40.0_ppyrexifh2c7ckrlwv3p42dk5i + '@typescript-eslint/eslint-plugin': 5.56.0_ftvidnylzkqlsgegxlccclav64 eslint: 8.34.0 eslint-rule-composer: 0.3.0 dev: true @@ -7641,7 +7619,7 @@ packages: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} dependencies: - graceful-fs: 4.2.9 + graceful-fs: 4.2.10 jsonfile: 6.1.0 universalify: 2.0.0 dev: true @@ -7950,10 +7928,6 @@ packages: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true - /graceful-fs/4.2.9: - resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==} - dev: true - /grapheme-splitter/1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true @@ -8582,11 +8556,11 @@ packages: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true dependencies: - ci-info: 3.5.0 + ci-info: 3.8.0 dev: true - /is-core-module/2.10.0: - resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} + /is-core-module/2.11.0: + resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 @@ -9793,7 +9767,7 @@ packages: resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==} engines: {node: '>=4.0'} dependencies: - array-includes: 3.1.5 + array-includes: 3.1.6 object.assign: 4.1.4 dev: true @@ -10973,10 +10947,6 @@ packages: engines: {node: '>=4'} dev: true - /ms/2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: true - /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -11024,6 +10994,10 @@ packages: engines: {node: ^14 || ^16 || >=18} hasBin: true + /natural-compare-lite/1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + /natural-compare/1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -11167,7 +11141,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.10.0 + is-core-module: 2.11.0 semver: 7.3.8 validate-npm-package-license: 3.0.4 dev: true @@ -11266,8 +11240,8 @@ packages: es-abstract: 1.20.4 dev: true - /object.values/1.1.5: - resolution: {integrity: sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==} + /object.values/1.1.6: + resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -11936,15 +11910,6 @@ packages: postcss: 8.4.14 dev: true - /postcss-scss/4.0.5_postcss@8.4.18: - resolution: {integrity: sha512-F7xpB6TrXyqUh3GKdyB4Gkp3QL3DDW1+uI+gxx/oJnUt/qXI4trj5OGlp9rOKdoABGULuqtqeG+3HEVQk4DjmA==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.3.3 - dependencies: - postcss: 8.4.18 - dev: true - /postcss-scss/4.0.5_postcss@8.4.6: resolution: {integrity: sha512-F7xpB6TrXyqUh3GKdyB4Gkp3QL3DDW1+uI+gxx/oJnUt/qXI4trj5OGlp9rOKdoABGULuqtqeG+3HEVQk4DjmA==} engines: {node: '>=12.0'} @@ -12819,9 +12784,6 @@ packages: /regenerator-runtime/0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - /regenerator-runtime/0.13.9: - resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} - /regexp-tree/0.1.24: resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} hasBin: true @@ -12994,7 +12956,7 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -13002,7 +12964,7 @@ packages: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -13459,7 +13421,7 @@ packages: engines: {node: '>=6'} hasBin: true dependencies: - array.prototype.flat: 1.3.0 + array.prototype.flat: 1.3.1 breakword: 1.0.5 grapheme-splitter: 1.0.4 strip-ansi: 6.0.1 @@ -13800,20 +13762,6 @@ packages: - postcss dev: true - /stylelint-config-xo-scss/0.15.0_fjjhkehkplgtfpeiyp4aw74d4a: - resolution: {integrity: sha512-X9WD8cDofWFWy3uaKdwwm+DjEvgI/+h7AtlaPagkhNAeOWH/GFQoeciBvNvyJ8tB1p00SoIzCn2IIOIKXCbxYA==} - engines: {node: '>=12'} - peerDependencies: - stylelint: '>=14.5.1 || ^15.0.0' - dependencies: - postcss-scss: 4.0.5_postcss@8.4.18 - stylelint: 15.0.0 - stylelint-config-xo: 0.21.1_stylelint@15.0.0 - stylelint-scss: 4.3.0_stylelint@15.0.0 - transitivePeerDependencies: - - postcss - dev: true - /stylelint-config-xo/0.21.1_stylelint@15.0.0: resolution: {integrity: sha512-ORyxhq/Yutg27NgYlStkbXhK+Lz1SqZJDqV9Y2oWcfRFcDdgVAyM6ic7frOW00UH+OFyuGpTdIbTNTtVgsWpcw==} engines: {node: '>=12'}