mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
refactor: remove shared packages (#1946)
* refactor: remove shared packages * refactor: fix error
This commit is contained in:
parent
2f373db8e4
commit
42586eff88
81 changed files with 144 additions and 1248 deletions
|
@ -1,24 +0,0 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.0-beta.9](https://github.com/logto-io/logto/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @logto/connector-core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.8](https://github.com/logto-io/logto/compare/v1.0.0-beta.6...v1.0.0-beta.8) (2022-09-01)
|
||||
|
||||
**Note:** Version bump only for package @logto/connector-core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.6](https://github.com/logto-io/logto/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2022-08-30)
|
||||
|
||||
**Note:** Version bump only for package @logto/connector-core
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"name": "@logto/connector-core",
|
||||
"version": "1.0.0-beta.9",
|
||||
"main": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"typings": "./lib/index.d.ts",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"dev": "tsc --watch --preserveWatchOutput --incremental",
|
||||
"build": "rm -rf lib/ && tsc",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"prepack": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@silverhand/essentials": "^1.2.0",
|
||||
"zod": "^3.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@silverhand/eslint-config": "1.0.0",
|
||||
"@silverhand/ts-config": "1.0.0",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.21.0",
|
||||
"lint-staged": "^13.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
import { ZodType } from 'zod';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from './types';
|
||||
|
||||
export * from './types';
|
||||
|
||||
export function validateConfig<T>(config: unknown, guard: ZodType): asserts config is T {
|
||||
const result = guard.safeParse(config);
|
||||
|
||||
if (!result.success) {
|
||||
throw new ConnectorError(ConnectorErrorCodes.InvalidConfig, result.error);
|
||||
}
|
||||
}
|
||||
|
||||
export const parseJson = (
|
||||
jsonString: string,
|
||||
errorCode: ConnectorErrorCodes = ConnectorErrorCodes.InvalidResponse,
|
||||
errorPayload?: unknown
|
||||
) => {
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return JSON.parse(jsonString);
|
||||
} catch {
|
||||
throw new ConnectorError(errorCode, errorPayload ?? jsonString);
|
||||
}
|
||||
};
|
|
@ -1,113 +0,0 @@
|
|||
import type { LanguageKey } from '@logto/shared';
|
||||
import { Nullable } from '@silverhand/essentials';
|
||||
import { z, ZodType } from 'zod';
|
||||
|
||||
// MARK: Foundation
|
||||
export enum ConnectorType {
|
||||
Email = 'Email',
|
||||
Sms = 'Sms',
|
||||
Social = 'Social',
|
||||
}
|
||||
|
||||
export enum ConnectorPlatform {
|
||||
Native = 'Native',
|
||||
Universal = 'Universal',
|
||||
Web = 'Web',
|
||||
}
|
||||
|
||||
type I18nPhrases = { en: string } & {
|
||||
[K in Exclude<LanguageKey, 'en'>]?: string;
|
||||
};
|
||||
|
||||
export enum ConnectorErrorCodes {
|
||||
General = 'general',
|
||||
InvalidMetadata = 'invalid_metadata',
|
||||
UnexpectedType = 'unexpected_type',
|
||||
InvalidConfigGuard = 'invalid_config_guard',
|
||||
InvalidRequestParameters = 'invalid_request_parameters',
|
||||
InsufficientRequestParameters = 'insufficient_request_parameters',
|
||||
InvalidConfig = 'invalid_config',
|
||||
InvalidResponse = 'invalid_response',
|
||||
TemplateNotFound = 'template_not_found',
|
||||
NotImplemented = 'not_implemented',
|
||||
SocialAuthCodeInvalid = 'social_auth_code_invalid',
|
||||
SocialAccessTokenInvalid = 'social_invalid_access_token',
|
||||
SocialIdTokenInvalid = 'social_invalid_id_token',
|
||||
AuthorizationFailed = 'authorization_failed',
|
||||
}
|
||||
|
||||
export class ConnectorError extends Error {
|
||||
public code: ConnectorErrorCodes;
|
||||
public data: unknown;
|
||||
|
||||
constructor(code: ConnectorErrorCodes, data?: unknown) {
|
||||
const message = typeof data === 'string' ? data : 'Connector error occurred.';
|
||||
super(message);
|
||||
this.code = code;
|
||||
this.data = typeof data === 'string' ? { message: data } : data;
|
||||
}
|
||||
}
|
||||
|
||||
export enum MessageTypes {
|
||||
SignIn = 'SignIn',
|
||||
Register = 'Register',
|
||||
ForgotPassword = 'ForgotPassword',
|
||||
Test = 'Test',
|
||||
}
|
||||
|
||||
export const messageTypesGuard = z.nativeEnum(MessageTypes);
|
||||
|
||||
export type ConnectorMetadata = {
|
||||
id: string;
|
||||
target: string;
|
||||
platform: Nullable<ConnectorPlatform>;
|
||||
name: I18nPhrases;
|
||||
logo: string;
|
||||
logoDark: Nullable<string>;
|
||||
description: I18nPhrases;
|
||||
readme: string;
|
||||
configTemplate: string;
|
||||
};
|
||||
|
||||
export type BaseConnector<Type extends ConnectorType> = {
|
||||
type: Type;
|
||||
metadata: ConnectorMetadata;
|
||||
configGuard: ZodType;
|
||||
};
|
||||
|
||||
export type CreateConnector<T extends BaseConnector<ConnectorType>> = (options: {
|
||||
getConfig: GetConnectorConfig;
|
||||
}) => Promise<T>;
|
||||
|
||||
export type GetConnectorConfig = (id: string) => Promise<unknown>;
|
||||
|
||||
export type AllConnector = SmsConnector | EmailConnector | SocialConnector;
|
||||
|
||||
// MARK: SMS + Email connector
|
||||
export type SmsConnector = BaseConnector<ConnectorType.Sms> & {
|
||||
sendMessage: SendMessageFunction;
|
||||
};
|
||||
|
||||
export type EmailConnector = BaseConnector<ConnectorType.Email> & {
|
||||
sendMessage: SendMessageFunction;
|
||||
};
|
||||
|
||||
export type SendMessageFunction = (
|
||||
data: { to: string; type: MessageTypes; payload: { code: string } },
|
||||
config?: unknown
|
||||
) => Promise<unknown>;
|
||||
|
||||
// MARK: Social connector
|
||||
export type SocialConnector = BaseConnector<ConnectorType.Social> & {
|
||||
getAuthorizationUri: GetAuthorizationUri;
|
||||
getUserInfo: GetUserInfo;
|
||||
};
|
||||
|
||||
export type GetAuthorizationUri = (payload: {
|
||||
state: string;
|
||||
redirectUri: string;
|
||||
}) => Promise<string>;
|
||||
|
||||
export type GetUserInfo = (
|
||||
data: unknown
|
||||
) => Promise<{ id: string } & Record<string, string | boolean | number | undefined>>;
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "@silverhand/ts-config/tsconfig.base",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"declaration": true
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
"@logto/phrases-ui": "^1.0.0-beta.9",
|
||||
"@logto/react": "1.0.0-beta.5",
|
||||
"@logto/schemas": "^1.0.0-beta.9",
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@parcel/core": "2.7.0",
|
||||
"@parcel/transformer-mdx": "2.7.0",
|
||||
|
@ -79,7 +79,7 @@
|
|||
"stylelint": "^14.9.1",
|
||||
"swr": "^1.3.0",
|
||||
"typescript": "^4.7.4",
|
||||
"zod": "^3.14.3"
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"alias": {
|
||||
"@/*": "./src/$1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getBasename, UserScope } from '@logto/core-kit';
|
||||
import { LogtoProvider } from '@logto/react';
|
||||
import { adminConsoleApplicationId, managementResource } from '@logto/schemas/lib/seeds';
|
||||
import { getBasename, UserScope } from '@logto/shared';
|
||||
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
|
||||
import { SWRConfig } from 'swr';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import Step from '@mdx/components/Step';
|
|||
import Tabs from '@mdx/components/Tabs';
|
||||
import TabItem from '@mdx/components/TabItem';
|
||||
import Alert from '@/components/Alert';
|
||||
import { generateRandomString } from '@logto/shared';
|
||||
import { generateRandomString } from '@logto/core-kit';
|
||||
|
||||
<Step
|
||||
title="Add dependencies"
|
||||
|
|
|
@ -3,7 +3,7 @@ import Step from '@mdx/components/Step';
|
|||
import Tabs from '@mdx/components/Tabs';
|
||||
import TabItem from '@mdx/components/TabItem';
|
||||
import Alert from '@/components/Alert';
|
||||
import { generateRandomString } from '@logto/shared';
|
||||
import { generateRandomString } from '@logto/core-kit';
|
||||
|
||||
<Step
|
||||
title="添加依赖"
|
||||
|
|
|
@ -3,7 +3,7 @@ import Step from '@mdx/components/Step';
|
|||
import Tabs from '@mdx/components/Tabs';
|
||||
import TabItem from '@mdx/components/TabItem';
|
||||
import Alert from '@/components/Alert';
|
||||
import { generateRandomString } from '@logto/shared';
|
||||
import { generateRandomString } from '@logto/core-kit';
|
||||
|
||||
<Step
|
||||
title="Add Logto SDK as a dependency"
|
||||
|
|
|
@ -3,7 +3,7 @@ import Step from '@mdx/components/Step';
|
|||
import Tabs from '@mdx/components/Tabs';
|
||||
import TabItem from '@mdx/components/TabItem';
|
||||
import Alert from '@/components/Alert';
|
||||
import { generateRandomString } from '@logto/shared';
|
||||
import { generateRandomString } from '@logto/core-kit';
|
||||
|
||||
<Step
|
||||
title="将 Logto SDK 添加至依赖"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@use '@logto/shared/scss/console-themes' as themes;
|
||||
@use '@logto/core-kit/scss/console-themes' as themes;
|
||||
|
||||
.light {
|
||||
@include themes.light;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
@use '@logto/shared/scss/console-themes' as themes;
|
||||
@use '@logto/core-kit/scss/console-themes' as themes;
|
||||
|
||||
.app {
|
||||
position: absolute;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { languageKeys } from '@logto/core-kit';
|
||||
import { useLogto } from '@logto/react';
|
||||
import { AppearanceMode } from '@logto/schemas';
|
||||
import { languageKeys } from '@logto/shared';
|
||||
import { Nullable, Optional } from '@silverhand/essentials';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import useSWR from 'swr';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { LanguageKey } from '@logto/core-kit';
|
||||
import resources from '@logto/phrases';
|
||||
import type { LanguageKey } from '@logto/shared';
|
||||
import i18next from 'i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { phoneRegEx, emailRegEx } from '@logto/core-kit';
|
||||
import { ConnectorType } from '@logto/schemas';
|
||||
import { phoneRegEx, emailRegEx } from '@logto/shared';
|
||||
import classNames from 'classnames';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getDefaultLanguage } from '@logto/core-kit';
|
||||
import { ConnectorResponse, ConnectorType } from '@logto/schemas';
|
||||
import { getDefaultLanguage } from '@logto/shared';
|
||||
import { conditional } from '@silverhand/essentials';
|
||||
import i18next from 'i18next';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getDefaultLanguage } from '@logto/core-kit';
|
||||
import { languageOptions } from '@logto/phrases';
|
||||
import { AppearanceMode } from '@logto/schemas';
|
||||
import { getDefaultLanguage } from '@logto/shared';
|
||||
import classNames from 'classnames';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { toast } from 'react-hot-toast';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { generateDarkColor } from '@logto/shared';
|
||||
import { generateDarkColor } from '@logto/core-kit';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { Controller, useFormContext } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { LanguageKey } from '@logto/core-kit';
|
||||
import { languageOptions } from '@logto/phrases-ui';
|
||||
import {
|
||||
AppearanceMode,
|
||||
|
@ -5,7 +6,6 @@ import {
|
|||
ConnectorMetadata,
|
||||
SignInExperience,
|
||||
} from '@logto/schemas';
|
||||
import type { LanguageKey } from '@logto/shared';
|
||||
import { conditional } from '@silverhand/essentials';
|
||||
import classNames from 'classnames';
|
||||
import dayjs from 'dayjs';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { usernameRegEx } from '@logto/core-kit';
|
||||
import { User } from '@logto/schemas';
|
||||
import { usernameRegEx } from '@logto/shared';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
@use '@logto/shared/scss/fonts';
|
||||
@use '@logto/core-kit/scss/fonts';
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
"test:report": "codecov -F core"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/connector-core": "^1.0.0-beta.9",
|
||||
"@logto/connector-kit": "^1.0.0-beta.11",
|
||||
"@logto/phrases": "^1.0.0-beta.9",
|
||||
"@logto/schemas": "^1.0.0-beta.9",
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"@silverhand/essentials": "^1.2.0",
|
||||
"chalk": "^4",
|
||||
"dayjs": "^1.10.5",
|
||||
|
@ -62,7 +62,7 @@
|
|||
"snake-case": "^3.0.4",
|
||||
"snakecase-keys": "^5.1.0",
|
||||
"tar": "^6.1.11",
|
||||
"zod": "^3.14.3"
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^5.0.0",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorPlatform } from '@logto/connector-core';
|
||||
import { ConnectorPlatform } from '@logto/connector-kit';
|
||||
import { Connector, ConnectorMetadata, ConnectorType } from '@logto/schemas';
|
||||
import { any } from 'zod';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-core';
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
const notImplemented = () => {
|
||||
throw new ConnectorError(ConnectorErrorCodes.NotImplemented);
|
||||
|
|
|
@ -2,7 +2,7 @@ import { existsSync } from 'fs';
|
|||
import { readdir } from 'fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
import { AllConnector, CreateConnector, validateConfig } from '@logto/connector-core';
|
||||
import { AllConnector, CreateConnector, validateConfig } from '@logto/connector-kit';
|
||||
import chalk from 'chalk';
|
||||
|
||||
import envSet from '@/env-set';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AllConnector } from '@logto/connector-core';
|
||||
import { AllConnector } from '@logto/connector-kit';
|
||||
import { Connector, PasscodeType } from '@logto/schemas';
|
||||
import { z } from 'zod';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ConnectorError,
|
||||
ConnectorErrorCodes,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-core';
|
||||
} from '@logto/connector-kit';
|
||||
|
||||
import RequestError from '@/errors/RequestError';
|
||||
import { findAllConnectors } from '@/queries/connector';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorType } from '@logto/connector-core';
|
||||
import { ConnectorType } from '@logto/connector-kit';
|
||||
import { Passcode, PasscodeType } from '@logto/schemas';
|
||||
import { any } from 'zod';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
ConnectorErrorCodes,
|
||||
EmailConnector,
|
||||
SmsConnector,
|
||||
} from '@logto/connector-core';
|
||||
} from '@logto/connector-kit';
|
||||
import { Passcode, PasscodeType } from '@logto/schemas';
|
||||
import { customAlphabet, nanoid } from 'nanoid';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-core';
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import RequestError from '@/errors/RequestError';
|
||||
import { createContextWithRouteParameters } from '@/utils/test-utils';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-core';
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import { conditional } from '@silverhand/essentials';
|
||||
import { Middleware } from 'koa';
|
||||
import { z } from 'zod';
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
import { userClaims } from '@logto/core-kit';
|
||||
import { CustomClientMetadataKey } from '@logto/schemas';
|
||||
import { userClaims } from '@logto/shared';
|
||||
import Koa from 'koa';
|
||||
import mount from 'koa-mount';
|
||||
import { Provider, errors } from 'oidc-provider';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { idTokenClaims, UserClaim, userinfoClaims, UserScope } from '@logto/core-kit';
|
||||
import { User } from '@logto/schemas';
|
||||
import { idTokenClaims, UserClaim, userinfoClaims, UserScope } from '@logto/shared';
|
||||
import { Nullable } from '@silverhand/essentials';
|
||||
import { ClaimsParameterMember } from 'oidc-provider';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { passwordRegEx, usernameRegEx } from '@logto/core-kit';
|
||||
import { arbitraryObjectGuard, userInfoSelectFields } from '@logto/schemas';
|
||||
import { passwordRegEx, usernameRegEx } from '@logto/shared';
|
||||
import { has } from '@silverhand/essentials';
|
||||
import pick from 'lodash.pick';
|
||||
import { literal, object, string } from 'zod';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { EmailConnector, MessageTypes, SmsConnector } from '@logto/connector-core';
|
||||
import { EmailConnector, MessageTypes, SmsConnector } from '@logto/connector-kit';
|
||||
import { ConnectorType } from '@logto/schemas';
|
||||
import { any } from 'zod';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { MessageTypes } from '@logto/connector-core';
|
||||
import { MessageTypes } from '@logto/connector-kit';
|
||||
import { emailRegEx, phoneRegEx } from '@logto/core-kit';
|
||||
import { arbitraryObjectGuard, ConnectorResponse, Connectors, ConnectorType } from '@logto/schemas';
|
||||
import { emailRegEx, phoneRegEx } from '@logto/shared';
|
||||
import { object, string } from 'zod';
|
||||
|
||||
import { getLogtoConnectorById, getLogtoConnectors } from '@/connectors';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-core';
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import { ConnectorType } from '@logto/schemas';
|
||||
|
||||
import {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { dateRegex } from '@logto/shared';
|
||||
import { dateRegex } from '@logto/core-kit';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { object, string } from 'zod';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { emailRegEx, phoneRegEx } from '@logto/core-kit';
|
||||
import { PasscodeType } from '@logto/schemas';
|
||||
import { emailRegEx, phoneRegEx } from '@logto/shared';
|
||||
import { Provider } from 'oidc-provider';
|
||||
import { object, string } from 'zod';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorType } from '@logto/connector-core';
|
||||
import { ConnectorType } from '@logto/connector-kit';
|
||||
import { User } from '@logto/schemas';
|
||||
import { Provider } from 'oidc-provider';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { redirectUriRegEx } from '@logto/core-kit';
|
||||
import { ConnectorType, userInfoSelectFields } from '@logto/schemas';
|
||||
import { redirectUriRegEx } from '@logto/shared';
|
||||
import pick from 'lodash.pick';
|
||||
import { Provider } from 'oidc-provider';
|
||||
import { object, string, unknown } from 'zod';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { passwordRegEx, usernameRegEx } from '@logto/core-kit';
|
||||
import { UserRole } from '@logto/schemas';
|
||||
import { adminConsoleApplicationId } from '@logto/schemas/lib/seeds';
|
||||
import { passwordRegEx, usernameRegEx } from '@logto/shared';
|
||||
import { Provider } from 'oidc-provider';
|
||||
import { object, string } from 'zod';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { languageKeys } from '@logto/core-kit';
|
||||
import { CreateSignInExperience, SignInExperience, SignInMethodState } from '@logto/schemas';
|
||||
import { languageKeys } from '@logto/shared';
|
||||
|
||||
import {
|
||||
mockAliyunDmConnector,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorMetadata } from '@logto/connector-core';
|
||||
import { ConnectorMetadata } from '@logto/connector-kit';
|
||||
import { SignInMode } from '@logto/schemas';
|
||||
import {
|
||||
adminConsoleApplicationId,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"@logto/phrases": "^1.0.0-beta.9",
|
||||
"@logto/react": "1.0.0-beta.5",
|
||||
"@logto/schemas": "^1.0.0-beta.9",
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"@parcel/core": "2.7.0",
|
||||
"@parcel/transformer-sass": "2.7.0",
|
||||
"@silverhand/eslint-config": "1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
@use '@logto/shared/scss/fonts';
|
||||
@use '@logto/shared/scss/console-themes' as themes;
|
||||
@use '@logto/core-kit/scss/fonts';
|
||||
@use '@logto/core-kit/scss/console-themes' as themes;
|
||||
|
||||
.app {
|
||||
.card {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { LanguageKey } from '@logto/core-kit';
|
||||
import resources from '@logto/phrases';
|
||||
import type { LanguageKey } from '@logto/shared';
|
||||
import i18next from 'i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createRoot } from 'react-dom/client';
|
||||
// eslint-disable-next-line import/no-unassigned-import
|
||||
import '@logto/shared/declaration';
|
||||
import '@logto/core-kit/declaration';
|
||||
|
||||
import App from './App';
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"url": "https://github.com/logto-io/logto/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"@silverhand/essentials": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { LanguageKey, languageKeyGuard } from '@logto/shared';
|
||||
import { LanguageKey, languageKeyGuard } from '@logto/core-kit';
|
||||
|
||||
/* Copied from i18next/index.d.ts */
|
||||
export type Resource = Record<LanguageKey, ResourceLanguage>;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"url": "https://github.com/logto-io/logto/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"@silverhand/essentials": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { LanguageKey, languageKeyGuard } from '@logto/shared';
|
||||
import { LanguageKey, languageKeyGuard } from '@logto/core-kit';
|
||||
|
||||
/* Copied from i18next/index.d.ts */
|
||||
export type Resource = Record<LanguageKey, ResourceLanguage>;
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"dependencies": {
|
||||
"@logto/connector-core": "^1.0.0-beta.9",
|
||||
"@logto/connector-kit": "^1.0.0-beta.11",
|
||||
"@logto/phrases": "^1.0.0-beta.9",
|
||||
"@logto/phrases-ui": "^1.0.0-beta.9",
|
||||
"@logto/shared": "^1.0.0-beta.9",
|
||||
"zod": "^3.14.3"
|
||||
"@logto/core-kit": "^1.0.0-beta.11",
|
||||
"zod": "^3.18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { hexColorRegEx, languageKeys } from '@logto/shared';
|
||||
import { hexColorRegEx, languageKeys } from '@logto/core-kit';
|
||||
import { z } from 'zod';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { generateDarkColor } from '@logto/shared';
|
||||
import { generateDarkColor } from '@logto/core-kit';
|
||||
|
||||
import { CreateSignInExperience, SignInMode } from '../db-entries';
|
||||
import { BrandingStyle, SignInMethodState } from '../foundations';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { BaseConnector, ConnectorMetadata, ConnectorType } from '@logto/connector-core';
|
||||
import { BaseConnector, ConnectorMetadata, ConnectorType } from '@logto/connector-kit';
|
||||
|
||||
import { Connector } from '../db-entries';
|
||||
|
||||
export type { ConnectorMetadata } from '@logto/connector-core';
|
||||
export { ConnectorType, ConnectorPlatform } from '@logto/connector-core';
|
||||
export type { ConnectorMetadata } from '@logto/connector-kit';
|
||||
export { ConnectorType, ConnectorPlatform } from '@logto/connector-kit';
|
||||
|
||||
export type ConnectorResponse = Connector &
|
||||
Omit<BaseConnector<ConnectorType>, 'configGuard' | 'metadata'> &
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.0-beta.9](https://github.com/logto-io/logto/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-09-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Portuguese translation ([f268ecb](https://github.com/logto-io/logto/commit/f268ecb1a8d57d1e33225bec8852f3bc377dd478))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **console,ui:** fix locale guard issue in settings page ([e200578](https://github.com/logto-io/logto/commit/e2005780a39fa7b5f5c5e406f37805913b684c18))
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.8](https://github.com/logto-io/logto/compare/v1.0.0-beta.6...v1.0.0-beta.8) (2022-09-01)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.6](https://github.com/logto-io/logto/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2022-08-30)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.5](https://github.com/logto-io/logto/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-08-19)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.4](https://github.com/logto-io/logto/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-08-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **shared:** fix dark color generator ([#1719](https://github.com/logto-io/logto/issues/1719)) ([3deb98c](https://github.com/logto-io/logto/commit/3deb98c18dfe54abda53e6de7592f40924e1f2f3))
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.3](https://github.com/logto-io/logto/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-08-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **console:** add Next.js integration guide in admin console ([7d3f947](https://github.com/logto-io/logto/commit/7d3f94738f495de98464d23b6fdf18214d59005e))
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.1](https://github.com/logto-io/logto/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-07-19)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-beta.0](https://github.com/logto-io/logto/compare/v1.0.0-alpha.4...v1.0.0-beta.0) (2022-07-14)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.0-alpha.3](https://github.com/logto-io/logto/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-07-07)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### [0.1.2-alpha.5](https://github.com/logto-io/logto/compare/v0.1.2-alpha.4...v0.1.2-alpha.5) (2022-07-03)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### [0.1.2-alpha.1](https://github.com/logto-io/logto/compare/v0.1.2-alpha.0...v0.1.2-alpha.1) (2022-07-02)
|
||||
|
||||
**Note:** Version bump only for package @logto/shared
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### [0.1.1-alpha.0](https://github.com/logto-io/logto/compare/v0.1.0-internal...v0.1.1-alpha.0) (2022-07-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **console,ui:** generate dark mode color in console ([#1231](https://github.com/logto-io/logto/issues/1231)) ([f72b21d](https://github.com/logto-io/logto/commit/f72b21d1602ab0fb35ef3e7d84f6c8ebd7e18b08))
|
||||
* **console:** add details summary component in guides ([693c4f0](https://github.com/logto-io/logto/commit/693c4f0422eb312190f2c7b0673e3ceaa8c41213))
|
||||
* **core,shared:** get /dashboard/users/active ([#953](https://github.com/logto-io/logto/issues/953)) ([1420bb2](https://github.com/logto-io/logto/commit/1420bb28cec9c0e20b4d0645a58e436135f87c83))
|
||||
* **demo-app:** implement (part 2) ([85a055e](https://github.com/logto-io/logto/commit/85a055efa4358cfb69c0d74f7aeaeb0bade024af))
|
||||
* **demo-app:** implementation ([#982](https://github.com/logto-io/logto/issues/982)) ([7f4f4f8](https://github.com/logto-io/logto/commit/7f4f4f84addf8a25c3d30f1ac3ceeef460afcf17))
|
||||
* **demo-app:** init ([#979](https://github.com/logto-io/logto/issues/979)) ([ad0aa8e](https://github.com/logto-io/logto/commit/ad0aa8e0c20a8d60f095b477e942b724fb53ca7d))
|
||||
* **shared,phrases-ui:** not allow hyphens in username ([#1319](https://github.com/logto-io/logto/issues/1319)) ([5e81966](https://github.com/logto-io/logto/commit/5e819665c7c1d584ff5cff25e4e0723122be78b2))
|
||||
* update field check rules ([#854](https://github.com/logto-io/logto/issues/854)) ([85a407c](https://github.com/logto-io/logto/commit/85a407c5f6f76fed0513acd6fb41943413935b5a))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `lint:report` script ([#730](https://github.com/logto-io/logto/issues/730)) ([3b17324](https://github.com/logto-io/logto/commit/3b17324d189b2fe47985d0bee8b37b4ef1dbdd2b))
|
||||
* **console:** dashboard chart style ([#1177](https://github.com/logto-io/logto/issues/1177)) ([cf47044](https://github.com/logto-io/logto/commit/cf470446e4458e748bbf6384adb96d69805a1991)), closes [#1178](https://github.com/logto-io/logto/issues/1178)
|
||||
* **console:** new platform tab colors ([#1158](https://github.com/logto-io/logto/issues/1158)) ([1bb770f](https://github.com/logto-io/logto/commit/1bb770fd1fa364f12c1c56a8542d36a3cf9647fe))
|
||||
* **core:** remove name regex ([#1109](https://github.com/logto-io/logto/issues/1109)) ([a790248](https://github.com/logto-io/logto/commit/a790248c091e444614652b08b05686e9934cb639))
|
77
packages/shared/declaration/dom.d.ts
vendored
77
packages/shared/declaration/dom.d.ts
vendored
|
@ -1,77 +0,0 @@
|
|||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
||||
type InputType =
|
||||
| 'button'
|
||||
| 'checkbox'
|
||||
| 'color'
|
||||
| 'date'
|
||||
| 'datetime-local'
|
||||
| 'email'
|
||||
| 'file'
|
||||
| 'hidden'
|
||||
| 'image'
|
||||
| 'month'
|
||||
| 'number'
|
||||
| 'password'
|
||||
| 'radio'
|
||||
| 'range'
|
||||
| 'reset'
|
||||
| 'search'
|
||||
| 'submit'
|
||||
| 'tel'
|
||||
| 'text'
|
||||
| 'time'
|
||||
| 'url'
|
||||
| 'week';
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute
|
||||
type AutoCompleteType =
|
||||
| 'name'
|
||||
| 'honorific-prefix'
|
||||
| 'given-name'
|
||||
| 'additional-name'
|
||||
| 'family-name'
|
||||
| 'honorific-suffix'
|
||||
| 'nickname'
|
||||
| 'username'
|
||||
| 'new-password'
|
||||
| 'current-password'
|
||||
| 'one-time-code'
|
||||
| 'organization-title'
|
||||
| 'organization'
|
||||
| 'street-address'
|
||||
| 'address-line1'
|
||||
| 'address-line2'
|
||||
| 'address-line3'
|
||||
| 'address-level4'
|
||||
| 'address-level3'
|
||||
| 'address-level2'
|
||||
| 'address-level1'
|
||||
| 'country'
|
||||
| 'country-name'
|
||||
| 'postal-code'
|
||||
| 'cc-name'
|
||||
| 'cc-given-name'
|
||||
| 'cc-additional-name'
|
||||
| 'cc-family-name'
|
||||
| 'cc-number'
|
||||
| 'cc-exp'
|
||||
| 'cc-exp-month'
|
||||
| 'cc-exp-year'
|
||||
| 'cc-csc'
|
||||
| 'cc-type'
|
||||
| 'transaction-currency'
|
||||
| 'transaction-amount'
|
||||
| 'language'
|
||||
| 'bday'
|
||||
| 'bday-day'
|
||||
| 'bday-month'
|
||||
| 'bday-year'
|
||||
| 'sex'
|
||||
| 'url'
|
||||
| 'photo'
|
||||
| 'mobile';
|
||||
|
||||
// TO-DO: remove me
|
||||
interface Body {
|
||||
json<T>(): Promise<T>;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
/* eslint-disable import/no-unassigned-import */
|
||||
import './react-app.d';
|
||||
import './dom.d';
|
||||
/* eslint-enable import/no-unassigned-import */
|
65
packages/shared/declaration/react-app.d.ts
vendored
65
packages/shared/declaration/react-app.d.ts
vendored
|
@ -1,65 +0,0 @@
|
|||
// Copied from react-scripts/lib/react-app.d.ts
|
||||
|
||||
declare module '*.avif' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.bmp' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.gif' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.jpg' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.jpeg' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.png' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.webp' {
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.svg' {
|
||||
import * as React from 'react';
|
||||
|
||||
export const ReactComponent: React.FunctionComponent<
|
||||
React.SVGProps<SVGSVGElement> & { title?: string }
|
||||
>;
|
||||
|
||||
const source: string;
|
||||
export default source;
|
||||
}
|
||||
|
||||
declare module '*.module.css' {
|
||||
const classes: Readonly<Record<string, string>>;
|
||||
export default classes;
|
||||
export = classes;
|
||||
}
|
||||
|
||||
declare module '*.module.scss' {
|
||||
const classes: Readonly<Record<string, string>>;
|
||||
export default classes;
|
||||
export = classes;
|
||||
}
|
||||
|
||||
declare module '*.module.sass' {
|
||||
const classes: Readonly<Record<string, string>>;
|
||||
export default classes;
|
||||
export = classes;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"name": "@logto/shared",
|
||||
"version": "1.0.0-beta.9",
|
||||
"main": "lib/index.js",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"declaration",
|
||||
"lib",
|
||||
"scss"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"prepack": "pnpm build",
|
||||
"stylelint": "stylelint \"scss/**/*.scss\""
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"color": "^4.2.3",
|
||||
"nanoid": "^3.1.23",
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@silverhand/eslint-config": "1.0.0",
|
||||
"@silverhand/eslint-config-react": "1.0.0",
|
||||
"@silverhand/essentials": "^1.2.0",
|
||||
"@silverhand/ts-config": "1.0.0",
|
||||
"@silverhand/ts-config-react": "1.0.0",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/node": "^16.3.1",
|
||||
"eslint": "^8.21.0",
|
||||
"lint-staged": "^13.0.0",
|
||||
"postcss": "^8.4.6",
|
||||
"prettier": "^2.7.1",
|
||||
"stylelint": "^14.9.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand/react"
|
||||
},
|
||||
"stylelint": {
|
||||
"extends": "@silverhand/eslint-config-react/.stylelintrc"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
@mixin light {
|
||||
// tonal palettes
|
||||
--color-all-0: #000;
|
||||
--color-all-100: #fff;
|
||||
--color-primary-10: #190064;
|
||||
--color-primary-20: #2d009d;
|
||||
--color-primary-30: #4300da;
|
||||
--color-primary-40: #5d34f2;
|
||||
--color-primary-50: #7958ff;
|
||||
--color-primary-60: #947dff;
|
||||
--color-primary-70: #af9eff;
|
||||
--color-primary-80: #cabeff;
|
||||
--color-primary-90: #e6deff;
|
||||
--color-primary-95: #f5eeff;
|
||||
--color-primary-99: #fffbff;
|
||||
--color-secondary-10: #201c00;
|
||||
--color-secondary-20: #373100;
|
||||
--color-secondary-30: #4f4700;
|
||||
--color-secondary-40: #695f00;
|
||||
--color-secondary-50: #847900;
|
||||
--color-secondary-60: #9f930d;
|
||||
--color-secondary-70: #baad2d;
|
||||
--color-secondary-80: #d7c947;
|
||||
--color-secondary-90: #f4e560;
|
||||
--color-secondary-95: #fff480;
|
||||
--color-secondary-99: #fffbf7;
|
||||
--color-tertiary-10: #350041;
|
||||
--color-tertiary-20: #560068;
|
||||
--color-tertiary-30: #7b0093;
|
||||
--color-tertiary-40: #9927af;
|
||||
--color-tertiary-50: #b545ca;
|
||||
--color-tertiary-60: #d361e7;
|
||||
--color-tertiary-70: #f07eff;
|
||||
--color-tertiary-80: #faabff;
|
||||
--color-tertiary-90: #ffd5ff;
|
||||
--color-tertiary-95: #ffeafe;
|
||||
--color-tertiary-99: #fcfcfc;
|
||||
--color-error-10: #410001;
|
||||
--color-error-20: #680003;
|
||||
--color-error-30: #930006;
|
||||
--color-error-40: #ba1b1b;
|
||||
--color-error-50: #dd3730;
|
||||
--color-error-60: #ff5449;
|
||||
--color-error-70: #ff897a;
|
||||
--color-error-80: #ffb4a9;
|
||||
--color-error-90: #ffdad4;
|
||||
--color-error-95: #ffede9;
|
||||
--color-error-99: #fcfcfc;
|
||||
--color-neutral-10: #191c1d;
|
||||
--color-neutral-20: #2d3132;
|
||||
--color-neutral-30: #444748;
|
||||
--color-neutral-40: #5c5f60;
|
||||
--color-neutral-50: #747778;
|
||||
--color-neutral-60: #8e9192;
|
||||
--color-neutral-70: #a9acac;
|
||||
--color-neutral-80: #c4c7c7;
|
||||
--color-neutral-90: #e0e3e3;
|
||||
--color-neutral-95: #eff1f1;
|
||||
--color-neutral-99: #f7f8f8;
|
||||
--color-neutral-variant-10: #1b1b22;
|
||||
--color-neutral-variant-20: #302f38;
|
||||
--color-neutral-variant-30: #47464e;
|
||||
--color-neutral-variant-40: #5f5d67;
|
||||
--color-neutral-variant-50: #78767f;
|
||||
--color-neutral-variant-60: #928f9a;
|
||||
--color-neutral-variant-70: #adaab4;
|
||||
--color-neutral-variant-80: #c9c5d0;
|
||||
--color-neutral-variant-90: #e5e1ec;
|
||||
--color-neutral-variant-95: #f3effa;
|
||||
--color-neutral-variant-99: #fffbff;
|
||||
--color-success-10: #002106;
|
||||
--color-success-20: #00390b;
|
||||
--color-success-30: #005314;
|
||||
--color-success-40: #116d26;
|
||||
--color-success-50: #32873d;
|
||||
--color-success-60: #4ea254;
|
||||
--color-success-70: #68be6c;
|
||||
--color-success-80: #83da85;
|
||||
--color-success-90: #9fe79f;
|
||||
--color-success-95: #bdefbd;
|
||||
--color-success-99: #ebf9eb;
|
||||
--color-alert-10: #2b1700;
|
||||
--color-alert-20: #472a00;
|
||||
--color-alert-30: #663e00;
|
||||
--color-alert-40: #865300;
|
||||
--color-alert-50: #a76900;
|
||||
--color-alert-60: #ca8000;
|
||||
--color-alert-70: #eb9918;
|
||||
--color-alert-80: #ffb95a;
|
||||
--color-alert-90: #ffddb5;
|
||||
--color-alert-95: #ffeedc;
|
||||
--color-alert-99: #fff5eb;
|
||||
|
||||
// color aliases
|
||||
--color-primary: var(--color-primary-40);
|
||||
--color-on-primary: var(--color-all-100);
|
||||
--color-primary-container: var(--color-primary-90);
|
||||
--color-on-primary-container: var(--color-primary-10);
|
||||
--color-secondary: var(--color-secondary-40);
|
||||
--color-on-secondary: var(--color-all-100);
|
||||
--color-secondary-container: var(--color-secondary-30);
|
||||
--color-on-secondary-container: var(--color-secondary-10);
|
||||
--color-tertiary: var(--color-tertiary-40);
|
||||
--color-on-tertiary: var(--color-all-100);
|
||||
--color-tertiary-container: var(--color-tertiary-90);
|
||||
--color-on-tertiary-container: var(--color-tertiary-10);
|
||||
--color-error: var(--color-error-40);
|
||||
--color-on-error: var(--color-all-100);
|
||||
--color-error-container: var(--color-error-90);
|
||||
--color-on-error-container: var(--color-error-10);
|
||||
--color-background: var(--color-neutral-99);
|
||||
--color-on-background: var(--color-neutral-10);
|
||||
--color-surface: var(--color-neutral-99);
|
||||
--color-surface-1: #ecebf6; // Neutral-99 + 2% Neutral-Variant-50 + 5% Primary-40
|
||||
--color-surface-2: #e8e6f6; // Neutral-99 + 2% Neutral-Variant-50 + 8% Primary-40
|
||||
--color-surface-3: #e3e0f6; // Neutral-99 + 2% Neutral-Variant-50 + 11% Primary-40
|
||||
--color-surface-4: #dfdaf5; // Neutral-99 + 2% Neutral-Variant-50 + 14% Primary-40
|
||||
--color-surface-5: #dcd6f5; // Neutral-99 + 2% Neutral-Variant-50 + 16% Primary-40
|
||||
--color-on-surface: var(--color-neutral-10);
|
||||
--color-surface-variant: var(--color-neutral-variant-90);
|
||||
--color-on-surface-variant: var(--color-neutral-variant-30);
|
||||
--color-outline: var(--color-neutral-variant-50);
|
||||
--color-primary-hover: var(--color-primary-50);
|
||||
--color-primary-pressed: var(--color-primary-30);
|
||||
--color-danger-hover: var(--color-error-50);
|
||||
--color-danger-pressed: var(--color-error-30);
|
||||
--color-text: var(--color-neutral-10);
|
||||
--color-text-link: var(--color-primary-40);
|
||||
--color-icon: var(--color-neutral-50);
|
||||
--color-caption: var(--color-neutral-50);
|
||||
--color-border: var(--color-neutral-80);
|
||||
--color-divider: var(--color-neutral-90);
|
||||
--color-disabled: var(--color-neutral-80);
|
||||
--color-base: var(--color-surface-1);
|
||||
--color-layer-1: var(--color-all-100);
|
||||
--color-layer-2: var(--color-neutral-95);
|
||||
--color-float: var(--color-all-100);
|
||||
--color-layer-light: var(--color-neutral-99);
|
||||
--color-inverse-surface: var(--color-neutral-20);
|
||||
--color-inverse-on-surface: var(--color-neutral-95);
|
||||
--color-inverse-primary: var(--color-primary-50);
|
||||
--color-shadow: var(--color-all-100);
|
||||
--color-white: #fff;
|
||||
--color-button-icon: var(--color-primary-80);
|
||||
--color-icon-background: var(--color-neutral-variant-95);
|
||||
--color-hover: rgba(25, 28, 29, 8%); // 8% Neutral-10
|
||||
--color-pressed: rgba(25, 28, 29, 12%); // 12% Neutral-10
|
||||
--color-focused: rgba(25, 28, 29, 16%); // 16% Neutral-10
|
||||
--color-hover-variant: rgba(93, 52, 242, 8%); // 8% Primary-40
|
||||
--color-pressed-variant: rgba(93, 52, 242, 12%); // 12% Primary-40
|
||||
--color-focused-variant: rgba(93, 52, 242, 16%); // 16% Primary-40
|
||||
|
||||
// Shadows
|
||||
--shadow-1: 0 4px 8px rgba(0, 0, 0, 8%);
|
||||
--shadow-2: 0 4px 12px rgba(0, 0, 0, 12%);
|
||||
--shadow-2-reversed: 0 -4px 12px rgba(0, 0, 0, 12%);
|
||||
--shadow-3: 0 4px 16px rgba(0, 0, 0, 20%);
|
||||
|
||||
// Client specific variables (not available in design system)
|
||||
--color-danger-toast-background: var(--color-error-95);
|
||||
--color-danger-focused: rgba(186, 27, 27, 16%); // 16% Error-40
|
||||
--color-tooltip-background: #34353f; // dark theme Surface-4
|
||||
--color-tooltip-text: var(--color-neutral-99);
|
||||
--color-overlay: rgba(0, 0, 0, 30%);
|
||||
--color-drawer-overlay: rgba(0, 0, 0, 40%);
|
||||
--color-guide-dropdown-background: var(--color-white);
|
||||
--color-guide-dropdown-border: var(--color-border);
|
||||
--color-skeleton-shimmer-rgb: 255, 255, 255; // rgb of Layer-1
|
||||
}
|
||||
|
||||
@mixin dark {
|
||||
// tonal palettes
|
||||
--color-all-0: #fff;
|
||||
--color-all-100: #000;
|
||||
--color-primary-10: #fffbff;
|
||||
--color-primary-20: #f5eeff;
|
||||
--color-primary-30: #e6deff;
|
||||
--color-primary-40: #cabeff;
|
||||
--color-primary-50: #af9eff;
|
||||
--color-primary-60: #947dff;
|
||||
--color-primary-70: #7958ff;
|
||||
--color-primary-80: #5d34f2;
|
||||
--color-primary-90: #4300da;
|
||||
--color-primary-95: #2d009d;
|
||||
--color-primary-99: #190064;
|
||||
--color-secondary-10: #fffbf7;
|
||||
--color-secondary-20: #fff480;
|
||||
--color-secondary-30: #f4e560;
|
||||
--color-secondary-40: #d7c947;
|
||||
--color-secondary-50: #baad2d;
|
||||
--color-secondary-60: #9f930d;
|
||||
--color-secondary-70: #847900;
|
||||
--color-secondary-80: #695f00;
|
||||
--color-secondary-90: #4f4700;
|
||||
--color-secondary-95: #373100;
|
||||
--color-secondary-99: #201c00;
|
||||
--color-tertiary-10: #fcfcfc;
|
||||
--color-tertiary-20: #ffeafe;
|
||||
--color-tertiary-30: #ffd5ff;
|
||||
--color-tertiary-40: #faabff;
|
||||
--color-tertiary-50: #f07eff;
|
||||
--color-tertiary-60: #d361e7;
|
||||
--color-tertiary-70: #b545ca;
|
||||
--color-tertiary-80: #9927af;
|
||||
--color-tertiary-90: #7b0093;
|
||||
--color-tertiary-95: #560068;
|
||||
--color-tertiary-99: #350041;
|
||||
--color-error-10: #fcfcfc;
|
||||
--color-error-20: #ffede9;
|
||||
--color-error-30: #ffdad4;
|
||||
--color-error-40: #ffb4a9;
|
||||
--color-error-50: #ff897a;
|
||||
--color-error-60: #ff5449;
|
||||
--color-error-70: #dd3730;
|
||||
--color-error-80: #ba1b1b;
|
||||
--color-error-90: #930006;
|
||||
--color-error-95: #680003;
|
||||
--color-error-99: #410001;
|
||||
--color-neutral-10: #f7f8f8;
|
||||
--color-neutral-20: #eff1f1;
|
||||
--color-neutral-30: #e0e3e3;
|
||||
--color-neutral-40: #c4c7c7;
|
||||
--color-neutral-50: #a9acac;
|
||||
--color-neutral-60: #8e9192;
|
||||
--color-neutral-70: #747778;
|
||||
--color-neutral-80: #5c5f60;
|
||||
--color-neutral-90: #444748;
|
||||
--color-neutral-95: #2d3132;
|
||||
--color-neutral-99: #191c1d;
|
||||
--color-neutral-variant-10: #fffbff;
|
||||
--color-neutral-variant-20: #f3effa;
|
||||
--color-neutral-variant-30: #e5e1ec;
|
||||
--color-neutral-variant-40: #c9c5d0;
|
||||
--color-neutral-variant-50: #adaab4;
|
||||
--color-neutral-variant-60: #928f9a;
|
||||
--color-neutral-variant-70: #78767f;
|
||||
--color-neutral-variant-80: #5f5d67;
|
||||
--color-neutral-variant-90: #47464e;
|
||||
--color-neutral-variant-95: #302f38;
|
||||
--color-neutral-variant-99: #1b1b22;
|
||||
--color-success-10: #ebf9eb;
|
||||
--color-success-20: #bdefbd;
|
||||
--color-success-30: #9fe79f;
|
||||
--color-success-40: #83da85;
|
||||
--color-success-50: #68be6c;
|
||||
--color-success-60: #4ea254;
|
||||
--color-success-70: #32873d;
|
||||
--color-success-80: #116d26;
|
||||
--color-success-90: #005314;
|
||||
--color-success-95: #00390b;
|
||||
--color-success-99: #002106;
|
||||
--color-alert-10: #fff5eb;
|
||||
--color-alert-20: #ffeedc;
|
||||
--color-alert-30: #ffddb5;
|
||||
--color-alert-40: #ffb95a;
|
||||
--color-alert-50: #eb9918;
|
||||
--color-alert-60: #ca8000;
|
||||
--color-alert-70: #a76900;
|
||||
--color-alert-80: #865300;
|
||||
--color-alert-90: #663e00;
|
||||
--color-alert-95: #472a00;
|
||||
--color-alert-99: #2b1700;
|
||||
|
||||
// color aliases
|
||||
--color-primary: var(--color-primary-70);
|
||||
--color-on-primary: var(--color-all-0);
|
||||
--color-primary-container: var(--color-primary-30);
|
||||
--color-on-primary-container: var(--color-primary-30);
|
||||
--color-secondary: var(--color-secondary-70);
|
||||
--color-on-secondary: var(--color-all-0);
|
||||
--color-secondary-container: var(--color-secondary-90);
|
||||
--color-on-secondary-container: var(--color-secondary-30);
|
||||
--color-tertiary: var(--color-tertiary-70);
|
||||
--color-on-tertiary: var(--color-all-0);
|
||||
--color-tertiary-container: var(--color-tertiary-90);
|
||||
--color-on-tertiary-container: var(--color-tertiary-30);
|
||||
--color-error: var(--color-error-70);
|
||||
--color-on-error: var(--color-all-0);
|
||||
--color-error-container: var(--color-error-90);
|
||||
--color-on-error-container: var(--color-error-30);
|
||||
--color-background: var(--color-neutral-99);
|
||||
--color-on-background: var(--color-neutral-10);
|
||||
--color-surface: var(--color-neutral-99);
|
||||
--color-surface-1: #25272b; // Neutral-99 + 2% Neutral-40 + 5% Primary-80
|
||||
--color-surface-2: #2a2c32; // Neutral-99 + 2% Neutral-40 + 8% Primary-80
|
||||
--color-surface-3: #2f3039; // Neutral-99 + 2% Neutral-40 + 11% Primary-80
|
||||
--color-surface-4: #34353f; // Neutral-99 + 2% Neutral-40 + 14% Primary-80
|
||||
--color-surface-5: #383844; // Neutral-99 + 2% Neutral-40 + 16% Primary-80
|
||||
--color-on-surface: var(--color-neutral-10);
|
||||
--color-surface-variant: var(--color-neutral-variant-90);
|
||||
--color-on-surface-variant: var(--color-neutral-variant-40);
|
||||
--color-outline: var(--color-neutral-variant-60);
|
||||
--color-primary-hover: var(--color-primary-60);
|
||||
--color-primary-pressed: var(--color-primary-80);
|
||||
--color-danger-hover: var(--color-error-60);
|
||||
--color-danger-pressed: var(--color-error-80);
|
||||
--color-text: var(--color-neutral-10);
|
||||
--color-text-link: var(--color-primary-40);
|
||||
--color-icon: var(--color-neutral-50);
|
||||
--color-caption: var(--color-neutral-50);
|
||||
--color-border: var(--color-neutral-80);
|
||||
--color-divider: var(--color-neutral-90);
|
||||
--color-disabled: var(--color-neutral-80);
|
||||
--color-base: var(--color-surface);
|
||||
--color-layer-1: var(--color-surface-2);
|
||||
--color-layer-2: var(--color-surface-4);
|
||||
--color-float: var(--color-surface-4);
|
||||
--color-layer-light: var(--color-surface-4);
|
||||
--color-inverse-surface: var(--color-neutral-20);
|
||||
--color-inverse-on-surface: var(--color-neutral-95);
|
||||
--color-inverse-primary: var(--color-primary-80);
|
||||
--color-shadow: var(--color-all-100);
|
||||
--color-white: #fff;
|
||||
--color-button-icon: var(--color-primary-20);
|
||||
--color-icon-background: #3a3b59;
|
||||
--color-hover: rgba(247, 248, 248, 8%); // 8% Neutral-10
|
||||
--color-pressed: rgba(247, 248, 248, 12%); // 12% Neutral-10
|
||||
--color-focused: rgba(247, 248, 248, 16%); // 16% Neutral-10
|
||||
--color-hover-variant: rgba(202, 190, 255, 8%); // 8% Primary-40
|
||||
--color-pressed-variant: rgba(202, 190, 255, 12%); // 12% Primary-40
|
||||
--color-focused-variant: rgba(202, 190, 255, 16%); // 16% Primary-40
|
||||
|
||||
// Shadows
|
||||
--shadow-1: 0 4px 8px rgba(0, 0, 0, 8%);
|
||||
--shadow-2: 0 4px 12px rgba(0, 0, 0, 12%);
|
||||
--shadow-2-reversed: 0 -4px 12px rgba(0, 0, 0, 12%);
|
||||
--shadow-3: 0 4px 16px rgba(0, 0, 0, 20%);
|
||||
|
||||
// Client specific variables (not available in design system)
|
||||
--color-danger-toast-background: var(--color-error-99);
|
||||
--color-danger-focused: rgba(255, 180, 169, 16%); // 16% Error-40
|
||||
--color-tooltip-background: var(--color-surface-4);
|
||||
--color-tooltip-text: var(--color-neutral-10);
|
||||
--color-overlay: rgba(0, 0, 0, 30%);
|
||||
--color-drawer-overlay: rgba(0, 0, 0, 60%);
|
||||
--color-guide-dropdown-background: var(--color-neutral-variant-80);
|
||||
--color-guide-dropdown-border: var(--color-neutral-variant-70);
|
||||
--color-skeleton-shimmer-rgb: 42, 44, 50; // rgb of Layer-1
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
$font-family:
|
||||
-apple-system,
|
||||
system-ui,
|
||||
'BlinkMacSystemFont',
|
||||
'Segoe UI',
|
||||
'Roboto',
|
||||
'Helvetica Neue',
|
||||
'Helvetica',
|
||||
'Arial',
|
||||
sans-serif,
|
||||
'Apple Color Emoji';
|
||||
|
||||
:root {
|
||||
--font-family: #{$font-family};
|
||||
--font-headline-large: 600 32px/40px #{$font-family};
|
||||
--font-headline-medium: 600 28px/36px #{$font-family};
|
||||
--font-headline-small: 600 24px/32px #{$font-family};
|
||||
--font-title-large: 600 20px/28px #{$font-family};
|
||||
--font-title-medium: 600 16px/24px #{$font-family};
|
||||
--font-title-small: 600 14px/20px #{$font-family};
|
||||
--font-label-large: 500 14px/20px #{$font-family};
|
||||
--font-label-medium: 500 12px/16px #{$font-family};
|
||||
--font-label-small: 500 11px/16px #{$font-family};
|
||||
--font-body-large: 400 16px/24px #{$font-family};
|
||||
--font-body-medium: 400 14px/20px #{$font-family};
|
||||
--font-body-small: 400 12px/16px #{$font-family};
|
||||
--font-subhead-1: 500 16px/24px #{$font-family};
|
||||
--font-subhead-2: 500 14px/20px #{$font-family};
|
||||
--font-subhead-cap: 700 12px/16px #{$font-family};
|
||||
--font-subhead-cap-small: 700 10px/16px #{$font-family};
|
||||
--font-button: 500 14px/20px #{$font-family};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
export * from './utilities';
|
||||
export * from './regex';
|
||||
export * from './language';
|
||||
export * from './scope';
|
|
@ -1,11 +0,0 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
import { fallback } from './utilities/zod';
|
||||
|
||||
export const languageKeys = ['en', 'fr', 'pt-PT', 'zh-CN', 'tr-TR', 'ko-KR'] as const;
|
||||
export const languageKeyGuard = z.enum(languageKeys);
|
||||
export type LanguageKey = z.infer<typeof languageKeyGuard>;
|
||||
|
||||
export const getDefaultLanguage = (language: string): LanguageKey => {
|
||||
return languageKeyGuard.or(fallback<LanguageKey>('en')).parse(language);
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
export const emailRegEx = /^\S+@\S+\.\S+$/;
|
||||
export const phoneRegEx = /^\d+$/;
|
||||
export const usernameRegEx = /^[A-Z_a-z]\w*$/;
|
||||
export const passwordRegEx = /^.{6,}$/;
|
||||
export const redirectUriRegEx = /^https?:\/\//;
|
||||
export const hexColorRegEx = /^#[\da-f]{3}([\da-f]{3})?$/i;
|
||||
export const dateRegex = /^\d{4}(-\d{2}){2}/;
|
|
@ -1,85 +0,0 @@
|
|||
export enum PreservedScope {
|
||||
OpenId = 'openid',
|
||||
OfflineAccess = 'offline_access',
|
||||
}
|
||||
|
||||
export type UserClaim =
|
||||
| 'name'
|
||||
| 'picture'
|
||||
| 'username'
|
||||
| 'role_names'
|
||||
| 'email'
|
||||
| 'email_verified'
|
||||
| 'phone_number'
|
||||
| 'phone_number_verified'
|
||||
| 'custom_data'
|
||||
| 'identities';
|
||||
|
||||
/**
|
||||
* Scopes for ID Token and Userinfo Endpoint.
|
||||
*/
|
||||
export enum UserScope {
|
||||
/**
|
||||
* Scope for basic user info.
|
||||
*
|
||||
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
||||
*/
|
||||
Profile = 'profile',
|
||||
/**
|
||||
* Scope for user email address.
|
||||
*
|
||||
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
||||
*/
|
||||
Email = 'email',
|
||||
/**
|
||||
* Scope for user phone number.
|
||||
*
|
||||
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
||||
*/
|
||||
Phone = 'phone',
|
||||
/**
|
||||
* Scope for user's custom data.
|
||||
*
|
||||
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
||||
*/
|
||||
CustomData = 'custom_data',
|
||||
/**
|
||||
* Scope for user's social identity details.
|
||||
*
|
||||
* See {@link idTokenClaims} for mapped claims in ID Token and {@link userinfoClaims} for additional claims in Userinfo Endpoint.
|
||||
*/
|
||||
Identities = 'identities',
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapped claims that ID Token includes.
|
||||
*/
|
||||
export const idTokenClaims: Readonly<Record<UserScope, UserClaim[]>> = Object.freeze({
|
||||
[UserScope.Profile]: ['name', 'picture', 'username', 'role_names'],
|
||||
[UserScope.Email]: ['email', 'email_verified'],
|
||||
[UserScope.Phone]: ['phone_number', 'phone_number_verified'],
|
||||
[UserScope.CustomData]: [],
|
||||
[UserScope.Identities]: [],
|
||||
});
|
||||
|
||||
/**
|
||||
* Additional claims that Userinfo Endpoint returns.
|
||||
*/
|
||||
export const userinfoClaims: Readonly<Record<UserScope, UserClaim[]>> = Object.freeze({
|
||||
[UserScope.Profile]: [],
|
||||
[UserScope.Email]: [],
|
||||
[UserScope.Phone]: [],
|
||||
[UserScope.CustomData]: ['custom_data'],
|
||||
[UserScope.Identities]: ['identities'],
|
||||
});
|
||||
|
||||
export const userClaims: Readonly<Record<UserScope, UserClaim[]>> = Object.freeze(
|
||||
// Hard to infer type directly, use `as` for a workaround.
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
Object.fromEntries(
|
||||
Object.values(UserScope).map((current) => [
|
||||
current,
|
||||
[...idTokenClaims[current], ...userinfoClaims[current]],
|
||||
])
|
||||
) as Record<UserScope, UserClaim[]>
|
||||
);
|
|
@ -1,17 +0,0 @@
|
|||
import color from 'color';
|
||||
|
||||
// Color hsl lighten/darken takes percentage value only, need to implement absolute value update
|
||||
export const absoluteLighten = (baseColor: color, delta: number) => {
|
||||
const hslArray = baseColor.hsl().round().array();
|
||||
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, (hslArray[2] ?? 0) + delta], 'hsl');
|
||||
};
|
||||
|
||||
export const absoluteDarken = (baseColor: color, delta: number) => {
|
||||
const hslArray = baseColor.hsl().round().array();
|
||||
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, (hslArray[2] ?? 0) - delta], 'hsl');
|
||||
};
|
||||
|
||||
export const generateDarkColor = (lightColor: string) =>
|
||||
absoluteLighten(color(lightColor), 10).hex();
|
|
@ -1,9 +0,0 @@
|
|||
import { existsSync, readFileSync } from 'fs';
|
||||
|
||||
export const getFileContents = (filePath: string, fallbackContent: string): string => {
|
||||
if (existsSync(filePath)) {
|
||||
return readFileSync(filePath, 'utf8');
|
||||
}
|
||||
|
||||
return fallbackContent;
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
export * from './file';
|
||||
export * from './react-router';
|
||||
export * from './color';
|
||||
export * from './string';
|
||||
export * from './zod';
|
|
@ -1,6 +0,0 @@
|
|||
export const getBasename = (prefix: string, developmentPort: string): string => {
|
||||
const isBasenameNeeded =
|
||||
process.env.NODE_ENV !== 'development' || process.env.PORT === developmentPort;
|
||||
|
||||
return isBasenameNeeded ? '/' + prefix : '';
|
||||
};
|
|
@ -1,6 +0,0 @@
|
|||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
export const generateRandomString = (
|
||||
size: number,
|
||||
alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
): string => customAlphabet(alphabet, size)();
|
|
@ -1,15 +0,0 @@
|
|||
import { any } from 'zod';
|
||||
|
||||
/**
|
||||
* https://github.com/colinhacks/zod/issues/316#issuecomment-850906479
|
||||
* Create a schema matches anything and returns a value. Use it with `or`:
|
||||
*
|
||||
* const schema = zod.number();
|
||||
* const tolerant = schema.or(fallback(-1));
|
||||
*
|
||||
* schema.parse('foo') // => ZodError
|
||||
* tolerant.parse('foo') // -1
|
||||
*/
|
||||
export function fallback<T>(value: T) {
|
||||
return any().transform(() => value);
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig",
|
||||
"include": ["src"],
|
||||
"exclude": ["src/**/*.test.ts"]
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"extends": "@silverhand/ts-config/tsconfig.base",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src", "declaration"]
|
||||
}
|
|
@ -82,6 +82,6 @@
|
|||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"dependencies": {
|
||||
"@logto/shared": "^1.0.0-beta.9"
|
||||
"@logto/core-kit": "^1.0.0-beta.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getDefaultLanguage } from '@logto/core-kit';
|
||||
import { ConnectorMetadata } from '@logto/schemas';
|
||||
import { getDefaultLanguage } from '@logto/shared';
|
||||
import { useState, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { absoluteDarken, absoluteLighten } from '@logto/shared';
|
||||
import { absoluteDarken, absoluteLighten } from '@logto/core-kit';
|
||||
import color from 'color';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { LanguageKey } from '@logto/core-kit';
|
||||
import { SignInExperience, ConnectorMetadata, AppearanceMode } from '@logto/schemas';
|
||||
import type { LanguageKey } from '@logto/shared';
|
||||
|
||||
export type UserFlow = 'sign-in' | 'register';
|
||||
export type SignInMethod = 'username' | 'email' | 'sms' | 'social';
|
||||
|
|
171
pnpm-lock.yaml
generated
171
pnpm-lock.yaml
generated
|
@ -18,39 +18,14 @@ importers:
|
|||
lerna: 5.0.0
|
||||
typescript: 4.7.4
|
||||
|
||||
packages/connector-core:
|
||||
specifiers:
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
'@silverhand/ts-config': 1.0.0
|
||||
'@types/node': ^16.3.1
|
||||
eslint: ^8.21.0
|
||||
lint-staged: ^13.0.0
|
||||
prettier: ^2.7.1
|
||||
typescript: ^4.7.4
|
||||
zod: ^3.14.3
|
||||
dependencies:
|
||||
'@logto/shared': link:../shared
|
||||
'@silverhand/essentials': 1.2.0
|
||||
zod: 3.14.3
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
'@silverhand/ts-config': 1.0.0_typescript@4.7.4
|
||||
'@types/node': 16.11.12
|
||||
eslint: 8.21.0
|
||||
lint-staged: 13.0.0
|
||||
prettier: 2.7.1
|
||||
typescript: 4.7.4
|
||||
|
||||
packages/console:
|
||||
specifiers:
|
||||
'@fontsource/roboto-mono': ^4.5.7
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@logto/phrases': ^1.0.0-beta.9
|
||||
'@logto/phrases-ui': ^1.0.0-beta.9
|
||||
'@logto/react': 1.0.0-beta.5
|
||||
'@logto/schemas': ^1.0.0-beta.9
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@mdx-js/react': ^1.6.22
|
||||
'@parcel/core': 2.7.0
|
||||
'@parcel/transformer-mdx': 2.7.0
|
||||
|
@ -107,14 +82,14 @@ importers:
|
|||
stylelint: ^14.9.1
|
||||
swr: ^1.3.0
|
||||
typescript: ^4.7.4
|
||||
zod: ^3.14.3
|
||||
zod: ^3.18.0
|
||||
devDependencies:
|
||||
'@fontsource/roboto-mono': 4.5.7
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@logto/phrases': link:../phrases
|
||||
'@logto/phrases-ui': link:../phrases-ui
|
||||
'@logto/react': 1.0.0-beta.5_react@18.2.0
|
||||
'@logto/schemas': link:../schemas
|
||||
'@logto/shared': link:../shared
|
||||
'@mdx-js/react': 1.6.22_react@18.2.0
|
||||
'@parcel/core': 2.7.0
|
||||
'@parcel/transformer-mdx': 2.7.0_qpbak7zubdfpxpruk62f7gjw7u
|
||||
|
@ -171,14 +146,14 @@ importers:
|
|||
stylelint: 14.9.1
|
||||
swr: 1.3.0_react@18.2.0
|
||||
typescript: 4.7.4
|
||||
zod: 3.14.3
|
||||
zod: 3.18.0
|
||||
|
||||
packages/core:
|
||||
specifiers:
|
||||
'@logto/connector-core': ^1.0.0-beta.9
|
||||
'@logto/connector-kit': ^1.0.0-beta.11
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@logto/phrases': ^1.0.0-beta.9
|
||||
'@logto/schemas': ^1.0.0-beta.9
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@shopify/jest-koa-mocks': ^5.0.0
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
|
@ -249,12 +224,12 @@ importers:
|
|||
supertest: ^6.2.2
|
||||
tar: ^6.1.11
|
||||
typescript: ^4.7.4
|
||||
zod: ^3.14.3
|
||||
zod: ^3.18.0
|
||||
dependencies:
|
||||
'@logto/connector-core': link:../connector-core
|
||||
'@logto/connector-kit': 1.0.0-beta.11
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@logto/phrases': link:../phrases
|
||||
'@logto/schemas': link:../schemas
|
||||
'@logto/shared': link:../shared
|
||||
'@silverhand/essentials': 1.2.0
|
||||
chalk: 4.1.2
|
||||
dayjs: 1.10.7
|
||||
|
@ -292,7 +267,7 @@ importers:
|
|||
snake-case: 3.0.4
|
||||
snakecase-keys: 5.1.2
|
||||
tar: 6.1.11
|
||||
zod: 3.14.3
|
||||
zod: 3.18.0
|
||||
devDependencies:
|
||||
'@shopify/jest-koa-mocks': 5.0.0
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
|
@ -330,10 +305,10 @@ importers:
|
|||
|
||||
packages/demo-app:
|
||||
specifiers:
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@logto/phrases': ^1.0.0-beta.9
|
||||
'@logto/react': 1.0.0-beta.5
|
||||
'@logto/schemas': ^1.0.0-beta.9
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@parcel/core': 2.7.0
|
||||
'@parcel/transformer-sass': 2.7.0
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
|
@ -356,10 +331,10 @@ importers:
|
|||
stylelint: ^14.9.1
|
||||
typescript: ^4.7.4
|
||||
devDependencies:
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@logto/phrases': link:../phrases
|
||||
'@logto/react': 1.0.0-beta.5_react@18.2.0
|
||||
'@logto/schemas': link:../schemas
|
||||
'@logto/shared': link:../shared
|
||||
'@parcel/core': 2.7.0
|
||||
'@parcel/transformer-sass': 2.7.0_@parcel+core@2.7.0
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
|
@ -436,7 +411,7 @@ importers:
|
|||
|
||||
packages/phrases:
|
||||
specifiers:
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
'@silverhand/ts-config': 1.0.0
|
||||
|
@ -445,7 +420,7 @@ importers:
|
|||
prettier: ^2.7.1
|
||||
typescript: ^4.7.4
|
||||
dependencies:
|
||||
'@logto/shared': link:../shared
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@silverhand/essentials': 1.2.0
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
|
@ -457,7 +432,7 @@ importers:
|
|||
|
||||
packages/phrases-ui:
|
||||
specifiers:
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
'@silverhand/ts-config': 1.0.0
|
||||
|
@ -466,7 +441,7 @@ importers:
|
|||
prettier: ^2.7.1
|
||||
typescript: ^4.7.4
|
||||
dependencies:
|
||||
'@logto/shared': link:../shared
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@silverhand/essentials': 1.2.0
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
|
@ -478,10 +453,10 @@ importers:
|
|||
|
||||
packages/schemas:
|
||||
specifiers:
|
||||
'@logto/connector-core': ^1.0.0-beta.9
|
||||
'@logto/connector-kit': ^1.0.0-beta.11
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@logto/phrases': ^1.0.0-beta.9
|
||||
'@logto/phrases-ui': ^1.0.0-beta.9
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
'@silverhand/jest-config': 1.0.0
|
||||
|
@ -499,13 +474,13 @@ importers:
|
|||
prettier: ^2.7.1
|
||||
ts-node: ^10.9.1
|
||||
typescript: ^4.7.4
|
||||
zod: ^3.14.3
|
||||
zod: ^3.18.0
|
||||
dependencies:
|
||||
'@logto/connector-core': link:../connector-core
|
||||
'@logto/connector-kit': 1.0.0-beta.11
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@logto/phrases': link:../phrases
|
||||
'@logto/phrases-ui': link:../phrases-ui
|
||||
'@logto/shared': link:../shared
|
||||
zod: 3.14.3
|
||||
zod: 3.18.0
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
'@silverhand/essentials': 1.2.0
|
||||
|
@ -525,49 +500,12 @@ importers:
|
|||
ts-node: 10.9.1_ccwudyfw5se7hgalwgkzhn2yp4
|
||||
typescript: 4.7.4
|
||||
|
||||
packages/shared:
|
||||
specifiers:
|
||||
'@silverhand/eslint-config': 1.0.0
|
||||
'@silverhand/eslint-config-react': 1.0.0
|
||||
'@silverhand/essentials': ^1.2.0
|
||||
'@silverhand/ts-config': 1.0.0
|
||||
'@silverhand/ts-config-react': 1.0.0
|
||||
'@types/color': ^3.0.3
|
||||
'@types/node': ^16.3.1
|
||||
color: ^4.2.3
|
||||
eslint: ^8.21.0
|
||||
lint-staged: ^13.0.0
|
||||
nanoid: ^3.1.23
|
||||
postcss: ^8.4.6
|
||||
prettier: ^2.7.1
|
||||
stylelint: ^14.9.1
|
||||
typescript: ^4.7.4
|
||||
zod: ^3.18.0
|
||||
dependencies:
|
||||
color: 4.2.3
|
||||
nanoid: 3.3.4
|
||||
zod: 3.18.0
|
||||
devDependencies:
|
||||
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
|
||||
'@silverhand/eslint-config-react': 1.0.0_qoomm4vc6ijs52fnjlal4yoenm
|
||||
'@silverhand/essentials': 1.2.0
|
||||
'@silverhand/ts-config': 1.0.0_typescript@4.7.4
|
||||
'@silverhand/ts-config-react': 1.0.0_typescript@4.7.4
|
||||
'@types/color': 3.0.3
|
||||
'@types/node': 16.11.12
|
||||
eslint: 8.21.0
|
||||
lint-staged: 13.0.0
|
||||
postcss: 8.4.14
|
||||
prettier: 2.7.1
|
||||
stylelint: 14.9.1
|
||||
typescript: 4.7.4
|
||||
|
||||
packages/ui:
|
||||
specifiers:
|
||||
'@logto/core-kit': ^1.0.0-beta.11
|
||||
'@logto/phrases': ^1.0.0-beta.9
|
||||
'@logto/phrases-ui': ^1.0.0-beta.9
|
||||
'@logto/schemas': ^1.0.0-beta.9
|
||||
'@logto/shared': ^1.0.0-beta.9
|
||||
'@parcel/core': 2.7.0
|
||||
'@parcel/transformer-sass': 2.7.0
|
||||
'@parcel/transformer-svg-react': 2.7.0
|
||||
|
@ -617,7 +555,7 @@ importers:
|
|||
typescript: ^4.7.4
|
||||
use-debounced-loader: ^0.1.1
|
||||
dependencies:
|
||||
'@logto/shared': link:../shared
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
devDependencies:
|
||||
'@logto/phrases': link:../phrases
|
||||
'@logto/phrases-ui': link:../phrases-ui
|
||||
|
@ -1696,6 +1634,7 @@ packages:
|
|||
pacote: 13.4.1
|
||||
semver: 7.3.7
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -1726,6 +1665,7 @@ packages:
|
|||
p-waterfall: 2.1.1
|
||||
semver: 7.3.7
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -1866,6 +1806,7 @@ packages:
|
|||
whatwg-url: 8.7.0
|
||||
yargs-parser: 20.2.4
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2063,6 +2004,7 @@ packages:
|
|||
npm-registry-fetch: 9.0.0
|
||||
npmlog: 4.1.2
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2092,6 +2034,7 @@ packages:
|
|||
pify: 5.0.0
|
||||
read-package-json: 3.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2130,6 +2073,7 @@ packages:
|
|||
npmlog: 4.1.2
|
||||
tar: 6.1.11
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2228,6 +2172,7 @@ packages:
|
|||
pacote: 13.4.1
|
||||
semver: 7.3.7
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: true
|
||||
|
@ -2273,6 +2218,7 @@ packages:
|
|||
'@npmcli/run-script': 3.0.2
|
||||
npmlog: 4.1.2
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2374,6 +2320,7 @@ packages:
|
|||
slash: 3.0.0
|
||||
write-json-file: 4.3.0
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: true
|
||||
|
@ -2464,6 +2411,23 @@ packages:
|
|||
superstruct: 0.16.0
|
||||
dev: true
|
||||
|
||||
/@logto/connector-kit/1.0.0-beta.11:
|
||||
resolution: {integrity: sha512-XEOLfgeF+ltBnDyVpTHGjkH3phXmty9xJj0ezA/VeCRDuR4hhCq68ijQdCDa6dunrHKZTK3Oh3jk/QK7lrTFdQ==}
|
||||
engines: {node: ^16.0.0}
|
||||
dependencies:
|
||||
'@logto/core-kit': 1.0.0-beta.11
|
||||
'@silverhand/essentials': 1.2.0
|
||||
zod: 3.18.0
|
||||
dev: false
|
||||
|
||||
/@logto/core-kit/1.0.0-beta.11:
|
||||
resolution: {integrity: sha512-QbU6RfvkUqkRBysfJDtcs+zVqrOhVEQfA1GvaAryypZfXXXY/GwxTgWxjmDNvpj0NkdbCHHd/HlDv4pMAPPnWQ==}
|
||||
engines: {node: ^16.0.0}
|
||||
dependencies:
|
||||
color: 4.2.3
|
||||
nanoid: 3.3.4
|
||||
zod: 3.18.0
|
||||
|
||||
/@logto/js/1.0.0-beta.5:
|
||||
resolution: {integrity: sha512-LjFLyqh14IGE/IboFiuwFWLAupbDBO/4iEJ8ZGQIP2tEMJ3pvKwrzZN2sUCuJ0rpQGVCctT08bAlBEzJGhtM5g==}
|
||||
dependencies:
|
||||
|
@ -2603,6 +2567,7 @@ packages:
|
|||
treeverse: 2.0.0
|
||||
walk-up-path: 1.0.0
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2638,6 +2603,8 @@ packages:
|
|||
promise-retry: 2.0.1
|
||||
semver: 7.3.7
|
||||
which: 2.0.2
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
dev: true
|
||||
|
||||
/@npmcli/installed-package-contents/1.0.7:
|
||||
|
@ -2668,6 +2635,7 @@ packages:
|
|||
pacote: 13.4.1
|
||||
semver: 7.3.7
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -2719,6 +2687,7 @@ packages:
|
|||
node-gyp: 9.0.0
|
||||
read-package-json-fast: 2.0.3
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -3771,6 +3740,7 @@ packages:
|
|||
stylelint-config-xo-scss: 0.15.0_eqpuutlgonckfyjzwkrpusdvaa
|
||||
transitivePeerDependencies:
|
||||
- eslint
|
||||
- eslint-import-resolver-webpack
|
||||
- postcss
|
||||
- prettier
|
||||
- supports-color
|
||||
|
@ -3791,6 +3761,7 @@ packages:
|
|||
stylelint-config-xo-scss: 0.15.0_uyk3cwxn3favstz4untq233szu
|
||||
transitivePeerDependencies:
|
||||
- eslint
|
||||
- eslint-import-resolver-webpack
|
||||
- postcss
|
||||
- prettier
|
||||
- supports-color
|
||||
|
@ -3858,7 +3829,7 @@ packages:
|
|||
'@jest/types': 28.1.3
|
||||
deepmerge: 4.2.2
|
||||
identity-obj-proxy: 3.0.0
|
||||
jest: 28.1.3_@types+node@16.11.12
|
||||
jest: 28.1.3_k5ytkvaprncdyzidqqws5bqksq
|
||||
jest-matcher-specific-error: 1.0.0
|
||||
jest-transform-stub: 2.0.0
|
||||
ts-jest: 28.0.7_lhw3xkmzugq5tscs3x2ndm4sby
|
||||
|
@ -5391,6 +5362,8 @@ packages:
|
|||
ssri: 8.0.1
|
||||
tar: 6.1.11
|
||||
unique-filename: 1.1.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
dev: true
|
||||
|
||||
/cacache/16.1.0:
|
||||
|
@ -5415,6 +5388,8 @@ packages:
|
|||
ssri: 9.0.1
|
||||
tar: 6.1.11
|
||||
unique-filename: 1.1.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
dev: true
|
||||
|
||||
/cache-content-type/1.0.1:
|
||||
|
@ -10064,6 +10039,7 @@ packages:
|
|||
import-local: 3.1.0
|
||||
npmlog: 4.1.2
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: true
|
||||
|
@ -10098,6 +10074,7 @@ packages:
|
|||
npm-package-arg: 8.1.5
|
||||
npm-registry-fetch: 11.0.0
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -10111,6 +10088,7 @@ packages:
|
|||
semver: 7.3.7
|
||||
ssri: 8.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -10415,6 +10393,7 @@ packages:
|
|||
socks-proxy-agent: 6.1.1
|
||||
ssri: 9.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -10438,6 +10417,7 @@ packages:
|
|||
socks-proxy-agent: 5.0.1
|
||||
ssri: 8.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -10462,6 +10442,7 @@ packages:
|
|||
socks-proxy-agent: 6.1.1
|
||||
ssri: 8.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -11362,6 +11343,7 @@ packages:
|
|||
tar: 6.1.11
|
||||
which: 2.0.2
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -11545,6 +11527,7 @@ packages:
|
|||
minizlib: 2.1.2
|
||||
npm-package-arg: 8.1.5
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -11560,6 +11543,7 @@ packages:
|
|||
npm-package-arg: 9.0.2
|
||||
proc-log: 2.0.1
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -11576,6 +11560,7 @@ packages:
|
|||
minizlib: 2.1.2
|
||||
npm-package-arg: 8.1.5
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -11981,6 +11966,7 @@ packages:
|
|||
ssri: 9.0.1
|
||||
tar: 6.1.11
|
||||
transitivePeerDependencies:
|
||||
- bluebird
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
|
@ -12705,6 +12691,11 @@ packages:
|
|||
|
||||
/promise-inflight/1.0.1:
|
||||
resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=}
|
||||
peerDependencies:
|
||||
bluebird: '*'
|
||||
peerDependenciesMeta:
|
||||
bluebird:
|
||||
optional: true
|
||||
dev: true
|
||||
|
||||
/promise-retry/2.0.1:
|
||||
|
@ -14864,7 +14855,7 @@ packages:
|
|||
'@jest/types': 28.1.3
|
||||
bs-logger: 0.2.6
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
jest: 28.1.3_@types+node@16.11.12
|
||||
jest: 28.1.3_k5ytkvaprncdyzidqqws5bqksq
|
||||
jest-util: 28.1.3
|
||||
json5: 2.2.1
|
||||
lodash.memoize: 4.1.2
|
||||
|
@ -15747,12 +15738,8 @@ packages:
|
|||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/zod/3.14.3:
|
||||
resolution: {integrity: sha512-OzwRCSXB1+/8F6w6HkYHdbuWysYWnAF4fkRgKDcSFc54CE+Sv0rHXKfeNUReGCrHukm1LNpi6AYeXotznhYJbQ==}
|
||||
|
||||
/zod/3.18.0:
|
||||
resolution: {integrity: sha512-gwTm8RfUCe8l9rDwN5r2A17DkAa8Ez4Yl4yXqc5VqeGaXaJahzYYXbTwvhroZi0SNBqTwh/bKm2N0mpCzuw4bA==}
|
||||
dev: false
|
||||
|
||||
/zwitch/1.0.5:
|
||||
resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
|
||||
|
|
Loading…
Add table
Reference in a new issue