mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-09 11:14:29 +02:00
task: Upgrade to biome 1.5, moving files list to joined config variable
This commit is contained in:
parent
dcf539f4f7
commit
bad699a4da
70
biome.json
70
biome.json
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/1.4.0/schema.json",
|
"$schema": "https://biomejs.dev/schemas/1.5.0/schema.json",
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
@ -27,6 +27,7 @@
|
|||||||
},
|
},
|
||||||
"suspicious": {
|
"suspicious": {
|
||||||
"noExplicitAny": "off",
|
"noExplicitAny": "off",
|
||||||
|
"noImplicitAnyLet": "off",
|
||||||
"noExtraNonNullAssertion": "off",
|
"noExtraNonNullAssertion": "off",
|
||||||
"noRedeclare": "off",
|
"noRedeclare": "off",
|
||||||
"noPrototypeBuiltins": "off",
|
"noPrototypeBuiltins": "off",
|
||||||
@ -37,56 +38,39 @@
|
|||||||
"noDelete": "off"
|
"noDelete": "off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ignore": [
|
"ignore": []
|
||||||
"node_modules",
|
|
||||||
"docker",
|
|
||||||
"bundle.js",
|
|
||||||
"website/blog",
|
|
||||||
"website/build",
|
|
||||||
"website/core",
|
|
||||||
"website/docs",
|
|
||||||
"website/i18n/*.js",
|
|
||||||
"website/pages",
|
|
||||||
"website/translated_docs",
|
|
||||||
"website",
|
|
||||||
"setupJest.js",
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"src/migrations/*.js",
|
|
||||||
"src/test/examples/*.json",
|
|
||||||
"website/**/*.js",
|
|
||||||
"coverage",
|
|
||||||
"CHANGELOG.md"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"organizeImports": {
|
"organizeImports": {
|
||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"indentStyle": "space",
|
"indentStyle": "space",
|
||||||
"ignore": [
|
|
||||||
"node_modules",
|
|
||||||
"docker",
|
|
||||||
"bundle.js",
|
|
||||||
"website/blog",
|
|
||||||
"website/build",
|
|
||||||
"website/core",
|
|
||||||
"website/docs",
|
|
||||||
"website/i18n/*.js",
|
|
||||||
"website/pages",
|
|
||||||
"website/translated_docs",
|
|
||||||
"website",
|
|
||||||
"setupJest.js",
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"src/migrations/*.js",
|
|
||||||
"src/migrations/*.json",
|
|
||||||
"src/test/examples/*.json",
|
|
||||||
"website/**/*.js",
|
|
||||||
"coverage"
|
|
||||||
],
|
|
||||||
"indentWidth": 4
|
"indentWidth": 4
|
||||||
},
|
},
|
||||||
|
"files": {
|
||||||
|
"ignore": [
|
||||||
|
"src/migrations/*.json",
|
||||||
|
"**/node_modules",
|
||||||
|
"**/docker",
|
||||||
|
"**/bundle.js",
|
||||||
|
"**/website/blog",
|
||||||
|
"**/website/build",
|
||||||
|
"**/website/core",
|
||||||
|
"**/website/docs",
|
||||||
|
"**/website/i18n/*.js",
|
||||||
|
"**/website/pages",
|
||||||
|
"**/website/translated_docs",
|
||||||
|
"**/website",
|
||||||
|
"**/setupJest.js",
|
||||||
|
"**/dist",
|
||||||
|
"**/build",
|
||||||
|
"**/src/migrations/*.js",
|
||||||
|
"**/src/test/examples/*.json",
|
||||||
|
"**/website/**/*.js",
|
||||||
|
"**/coverage",
|
||||||
|
"**/CHANGELOG.md"
|
||||||
|
]
|
||||||
|
},
|
||||||
"javascript": {
|
"javascript": {
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"semicolons": "always",
|
"semicolons": "always",
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
"gen:api:sandbox": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" UNLEASH_OPENAPI_URL=https://sandbox.getunleash.io/demo2/docs/openapi.json yarn run gen:api"
|
"gen:api:sandbox": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" UNLEASH_OPENAPI_URL=https://sandbox.getunleash.io/demo2/docs/openapi.json yarn run gen:api"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.4.1",
|
"@biomejs/biome": "1.5.0",
|
||||||
"@codemirror/lang-json": "6.0.1",
|
"@codemirror/lang-json": "6.0.1",
|
||||||
"@emotion/react": "11.11.3",
|
"@emotion/react": "11.11.3",
|
||||||
"@emotion/styled": "11.11.0",
|
"@emotion/styled": "11.11.0",
|
||||||
|
@ -56,7 +56,11 @@ export const ApplicationList = () => {
|
|||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
id: 'Icon',
|
id: 'Icon',
|
||||||
Cell: ({ row: { original: { icon } } }: any) => (
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { icon },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<IconCell
|
<IconCell
|
||||||
icon={
|
icon={
|
||||||
<Avatar>
|
<Avatar>
|
||||||
@ -72,7 +76,9 @@ export const ApplicationList = () => {
|
|||||||
accessor: 'appName',
|
accessor: 'appName',
|
||||||
width: '50%',
|
width: '50%',
|
||||||
Cell: ({
|
Cell: ({
|
||||||
row: { original: { appName, description } },
|
row: {
|
||||||
|
original: { appName, description },
|
||||||
|
},
|
||||||
}: any) => (
|
}: any) => (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
title={appName}
|
title={appName}
|
||||||
|
@ -80,7 +80,6 @@ export const MultiActionButton: FC<{
|
|||||||
}}
|
}}
|
||||||
open={open}
|
open={open}
|
||||||
anchorEl={anchorRef.current}
|
anchorEl={anchorRef.current}
|
||||||
role={undefined}
|
|
||||||
transition
|
transition
|
||||||
disablePortal
|
disablePortal
|
||||||
>
|
>
|
||||||
|
@ -137,7 +137,12 @@ export const ChangeRequestsTabs = ({
|
|||||||
.includes(feature.name.toLowerCase()),
|
.includes(feature.name.toLowerCase()),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
Cell: ({ value, row: { original: { title } } }: any) => (
|
Cell: ({
|
||||||
|
value,
|
||||||
|
row: {
|
||||||
|
original: { title },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<FeaturesCell
|
<FeaturesCell
|
||||||
project={projectId}
|
project={projectId}
|
||||||
value={value}
|
value={value}
|
||||||
|
@ -71,7 +71,11 @@ const ContextList: VFC = () => {
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
width: '70%',
|
width: '70%',
|
||||||
Cell: ({ row: { original: { name, description } } }: any) => (
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name, description },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
title={name}
|
title={name}
|
||||||
to={`/context/edit/${name}`}
|
to={`/context/edit/${name}`}
|
||||||
@ -91,7 +95,11 @@ const ContextList: VFC = () => {
|
|||||||
Header: 'Actions',
|
Header: 'Actions',
|
||||||
id: 'Actions',
|
id: 'Actions',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
Cell: ({ row: { original: { name } } }: any) => (
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<ContextActionsCell
|
<ContextActionsCell
|
||||||
name={name}
|
name={name}
|
||||||
onDelete={() => {
|
onDelete={() => {
|
||||||
|
@ -211,8 +211,7 @@ export const DemoSteps = ({
|
|||||||
const currentStep = currentTopic.steps[step];
|
const currentStep = currentTopic.steps[step];
|
||||||
if (!currentStep) return;
|
if (!currentStep) return;
|
||||||
|
|
||||||
setTimeout(
|
setTimeout(() => {
|
||||||
() => {
|
|
||||||
if (
|
if (
|
||||||
currentStep.href &&
|
currentStep.href &&
|
||||||
!location.pathname.endsWith(currentStep.href.split('?')[0])
|
!location.pathname.endsWith(currentStep.href.split('?')[0])
|
||||||
@ -220,9 +219,7 @@ export const DemoSteps = ({
|
|||||||
navigate(currentStep.href);
|
navigate(currentStep.href);
|
||||||
}
|
}
|
||||||
waitForLoad(currentStep);
|
waitForLoad(currentStep);
|
||||||
},
|
}, currentStep.delay ?? 0);
|
||||||
currentStep.delay ?? 0,
|
|
||||||
);
|
|
||||||
}, [topic, step]);
|
}, [topic, step]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -70,7 +70,11 @@ export const EnvironmentVariantsTable = ({
|
|||||||
{
|
{
|
||||||
Header: 'Weight',
|
Header: 'Weight',
|
||||||
accessor: 'weight',
|
accessor: 'weight',
|
||||||
Cell: ({ row: { original: { name, weight } } }: any) => {
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name, weight },
|
||||||
|
},
|
||||||
|
}: any) => {
|
||||||
return (
|
return (
|
||||||
<TextCell data-testid={`VARIANT_WEIGHT_${name}`}>
|
<TextCell data-testid={`VARIANT_WEIGHT_${name}`}>
|
||||||
{calculateVariantWeight(weight)} %
|
{calculateVariantWeight(weight)} %
|
||||||
|
@ -54,7 +54,11 @@ export const FeatureTypesList = () => {
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
width: '90%',
|
width: '90%',
|
||||||
Cell: ({ row: { original: { name, description } } }: any) => {
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name, description },
|
||||||
|
},
|
||||||
|
}: any) => {
|
||||||
return (
|
return (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
data-loading
|
data-loading
|
||||||
|
@ -5,12 +5,10 @@ import { Typography, styled } from '@mui/material';
|
|||||||
import { IntegrationIcon } from '../IntegrationList/IntegrationIcon/IntegrationIcon';
|
import { IntegrationIcon } from '../IntegrationList/IntegrationIcon/IntegrationIcon';
|
||||||
import { Markdown } from 'component/common/Markdown/Markdown';
|
import { Markdown } from 'component/common/Markdown/Markdown';
|
||||||
|
|
||||||
const StyledHowDoesItWorkSection = styled(StyledRaisedSection)(
|
const StyledHowDoesItWorkSection = styled(StyledRaisedSection)(({ theme }) => ({
|
||||||
({ theme }) => ({
|
|
||||||
fontSize: theme.fontSizes.smallBody,
|
fontSize: theme.fontSizes.smallBody,
|
||||||
gap: theme.spacing(1.5),
|
gap: theme.spacing(1.5),
|
||||||
}),
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
interface IIntegrationHowToSectionProps {
|
interface IIntegrationHowToSectionProps {
|
||||||
provider?: Pick<AddonTypeSchema, 'howTo' | 'name'>;
|
provider?: Pick<AddonTypeSchema, 'howTo' | 'name'>;
|
||||||
|
@ -117,7 +117,11 @@ export const VariantInformation: VFC<IVariantInformationProps> = ({
|
|||||||
const COLUMNS = [
|
const COLUMNS = [
|
||||||
{
|
{
|
||||||
id: 'Icon',
|
id: 'Icon',
|
||||||
Cell: ({ row: { original: { selected } } }: any) => (
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { selected },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<>
|
<>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={selected}
|
condition={selected}
|
||||||
@ -132,9 +136,11 @@ const COLUMNS = [
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
searchable: true,
|
searchable: true,
|
||||||
Cell: ({ row: { original: { name } } }: any) => (
|
Cell: ({
|
||||||
<TextCell>{name}</TextCell>
|
row: {
|
||||||
),
|
original: { name },
|
||||||
|
},
|
||||||
|
}: any) => <TextCell>{name}</TextCell>,
|
||||||
maxWidth: 175,
|
maxWidth: 175,
|
||||||
width: 175,
|
width: 175,
|
||||||
},
|
},
|
||||||
@ -144,8 +150,10 @@ const COLUMNS = [
|
|||||||
sortType: 'alphanumeric',
|
sortType: 'alphanumeric',
|
||||||
searchable: true,
|
searchable: true,
|
||||||
maxWidth: 75,
|
maxWidth: 75,
|
||||||
Cell: ({ row: { original: { weight } } }: any) => (
|
Cell: ({
|
||||||
<TextCell>{weight}</TextCell>
|
row: {
|
||||||
),
|
original: { weight },
|
||||||
|
},
|
||||||
|
}: any) => <TextCell>{weight}</TextCell>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -57,7 +57,11 @@ export const ProjectDoraMetrics = () => {
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
width: '40%',
|
width: '40%',
|
||||||
Cell: ({ row: { original: { name } } }: any) => {
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name },
|
||||||
|
},
|
||||||
|
}: any) => {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
data-loading
|
data-loading
|
||||||
|
@ -102,7 +102,6 @@ const strategyListItem = (
|
|||||||
{`${formatStrategyNameParens(
|
{`${formatStrategyNameParens(
|
||||||
strategy,
|
strategy,
|
||||||
)} — in change request `}
|
)} — in change request `}
|
||||||
|
|
||||||
<StyledLink
|
<StyledLink
|
||||||
to={formatChangeRequestPath(strategy.projectId, id)}
|
to={formatChangeRequestPath(strategy.projectId, id)}
|
||||||
target='_blank'
|
target='_blank'
|
||||||
|
@ -134,7 +134,6 @@ const strategyListItem = (
|
|||||||
{`${formatStrategyNameParens(
|
{`${formatStrategyNameParens(
|
||||||
strategy,
|
strategy,
|
||||||
)} — in change request `}
|
)} — in change request `}
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
to={formatChangeRequestPath(strategy.projectId, id)}
|
to={formatChangeRequestPath(strategy.projectId, id)}
|
||||||
target='_blank'
|
target='_blank'
|
||||||
|
@ -184,7 +184,11 @@ const getColumns = () => [
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
width: '60%',
|
width: '60%',
|
||||||
Cell: ({ row: { original: { name, description, id } } }: any) => (
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name, description, id },
|
||||||
|
},
|
||||||
|
}: any) => (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
title={name}
|
title={name}
|
||||||
to={`/segments/edit/${id}`}
|
to={`/segments/edit/${id}`}
|
||||||
|
@ -256,7 +256,9 @@ export const StrategiesList = () => {
|
|||||||
accessor: (row: any) => formatStrategyName(row.name),
|
accessor: (row: any) => formatStrategyName(row.name),
|
||||||
width: '90%',
|
width: '90%',
|
||||||
Cell: ({
|
Cell: ({
|
||||||
row: { original: { name, description, deprecated } },
|
row: {
|
||||||
|
original: { name, description, deprecated },
|
||||||
|
},
|
||||||
}: any) => {
|
}: any) => {
|
||||||
return (
|
return (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
|
@ -77,7 +77,11 @@ export const TagTypeList = () => {
|
|||||||
Header: 'Name',
|
Header: 'Name',
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
width: '90%',
|
width: '90%',
|
||||||
Cell: ({ row: { original: { name, description } } }: any) => {
|
Cell: ({
|
||||||
|
row: {
|
||||||
|
original: { name, description },
|
||||||
|
},
|
||||||
|
}: any) => {
|
||||||
return (
|
return (
|
||||||
<LinkCell
|
<LinkCell
|
||||||
data-loading
|
data-loading
|
||||||
|
@ -119,17 +119,12 @@ declare module '@mui/material/styles' {
|
|||||||
variants: string[];
|
variants: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
|
|
||||||
interface Theme extends CustomTheme {}
|
interface Theme extends CustomTheme {}
|
||||||
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
|
|
||||||
interface ThemeOptions extends CustomTheme {}
|
interface ThemeOptions extends CustomTheme {}
|
||||||
|
|
||||||
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
|
|
||||||
interface Palette extends CustomPalette {}
|
interface Palette extends CustomPalette {}
|
||||||
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
|
|
||||||
interface PaletteOptions extends CustomPalette {}
|
interface PaletteOptions extends CustomPalette {}
|
||||||
|
|
||||||
// biome-ignore lint/suspicious/noEmptyInterface: <explanation>
|
|
||||||
interface TypeBackground extends CustomTypeBackground {}
|
interface TypeBackground extends CustomTypeBackground {}
|
||||||
|
|
||||||
/* Extend the background object from MUI */
|
/* Extend the background object from MUI */
|
||||||
|
@ -517,47 +517,59 @@
|
|||||||
"@babel/helper-validator-identifier" "^7.22.20"
|
"@babel/helper-validator-identifier" "^7.22.20"
|
||||||
to-fast-properties "^2.0.0"
|
to-fast-properties "^2.0.0"
|
||||||
|
|
||||||
"@biomejs/biome@1.4.1":
|
"@biomejs/biome@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.4.1.tgz#b698c67ea8cd8141c8e27f857c8e6e794320a251"
|
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.0.tgz#8cc7006861618b601fe4c37429e9aee58e277328"
|
||||||
integrity sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg==
|
integrity sha512-ln+o5jbs109qpeDoA+5n+vlAPai3DhlK0tHtZXzQvu4tswFgxNiJCeIXmlW1DYHziTmtBImV3Y0uhbm2iVSE3Q==
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
"@biomejs/cli-darwin-arm64" "1.4.1"
|
"@biomejs/cli-darwin-arm64" "1.5.0"
|
||||||
"@biomejs/cli-darwin-x64" "1.4.1"
|
"@biomejs/cli-darwin-x64" "1.5.0"
|
||||||
"@biomejs/cli-linux-arm64" "1.4.1"
|
"@biomejs/cli-linux-arm64" "1.5.0"
|
||||||
"@biomejs/cli-linux-x64" "1.4.1"
|
"@biomejs/cli-linux-arm64-musl" "1.5.0"
|
||||||
"@biomejs/cli-win32-arm64" "1.4.1"
|
"@biomejs/cli-linux-x64" "1.5.0"
|
||||||
"@biomejs/cli-win32-x64" "1.4.1"
|
"@biomejs/cli-linux-x64-musl" "1.5.0"
|
||||||
|
"@biomejs/cli-win32-arm64" "1.5.0"
|
||||||
|
"@biomejs/cli-win32-x64" "1.5.0"
|
||||||
|
|
||||||
"@biomejs/cli-darwin-arm64@1.4.1":
|
"@biomejs/cli-darwin-arm64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.4.1.tgz#75f9c3c9b1abed8836c8f7bc8cd23ba153fb93d1"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.0.tgz#794ea67d348a3f95747e41c6bbbc1145937359ce"
|
||||||
integrity sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w==
|
integrity sha512-3+D7axf04dpadGMOaqb2q+zyQnhWW0o/Imt7TJBWsoE0N3/+28Wht8g3UEHHcUL5FPuGIfsE+NcYntBaaAsEIg==
|
||||||
|
|
||||||
"@biomejs/cli-darwin-x64@1.4.1":
|
"@biomejs/cli-darwin-x64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.4.1.tgz#672fcce2d339de3bb7a7bd2997e94f03121a28a3"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.0.tgz#ee8ad47984bf08bdbd09cf5cf7b1d0856af8b0f3"
|
||||||
integrity sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g==
|
integrity sha512-8k5aaLWE/B6ZAXLC+z/Vwh9ogyiSaiRIfvg+F9foxuneHl2R/D/2Iy7pvd3Yoi4Kf6/MBdowekPVezGP4/Kbcw==
|
||||||
|
|
||||||
"@biomejs/cli-linux-arm64@1.4.1":
|
"@biomejs/cli-linux-arm64-musl@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.4.1.tgz#c816206089ad29ce866c58a6e00e9d3d64a3529d"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.0.tgz#94af114a283b2e40cd56ec39bbc087dd752b9da4"
|
||||||
integrity sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ==
|
integrity sha512-+1B3J8tWLTOvP3+00Cap+XhEXMvxwCHvVfuywUsB7Sqd66NWic3wKJuGbGcS3PuCWtGuIFsiQMNAGqiOXG4uBQ==
|
||||||
|
|
||||||
"@biomejs/cli-linux-x64@1.4.1":
|
"@biomejs/cli-linux-arm64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.4.1.tgz#2639daeab1be205cfe444a8d5a3f76aa3a59b956"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.0.tgz#a173b20a9c85f7b5a69824f7fd8227274fa181d0"
|
||||||
integrity sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ==
|
integrity sha512-RiecxG71E1jnqiJZ3FaikVBDRkk2ohIxBo0O4o68g87y6Hug//G0S83sj6Wqyn8DgKMCRWQg+XYMgk5CwLVowA==
|
||||||
|
|
||||||
"@biomejs/cli-win32-arm64@1.4.1":
|
"@biomejs/cli-linux-x64-musl@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.4.1.tgz#ed5e749b2e0987cf16b545beaa01be6980ae8ce1"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.0.tgz#5431e874954eedf8e95851a61c87ba755353fb74"
|
||||||
integrity sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg==
|
integrity sha512-4S2rLluc0WT+XTbLTgcm9+5EEFwJmoGiUEzR6N0P2sIjZD8c5KNf9Ou46BP1Pdg5AgqV+IIClGPK1I80ApSh1Q==
|
||||||
|
|
||||||
"@biomejs/cli-win32-x64@1.4.1":
|
"@biomejs/cli-linux-x64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.4.1.tgz#dd8ee6e14a5d74cbeb2eb9824a43c61bb5c460e4"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.0.tgz#273dc39c8dea8ce02e0bb842355ffb9a7e94b201"
|
||||||
integrity sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA==
|
integrity sha512-TlTsG+ptSmnDTUsAAYsXyGOXMcFiF8SiwhPdj4YsNkJRgx9M2curEVcTVm66FINIPK6VJTUcEDahFlx3NPUOzA==
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-arm64@1.5.0":
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.0.tgz#fd4ec29be7774dc5392fb765c25a7a8e378fee9a"
|
||||||
|
integrity sha512-sWOi1SR+YqJuXElBncGRnWBR7IN7ni6GQY4Zm/vTpP6nVA0dX5C301eQUW1N/VnFQb6fyrJTcBslDUKyemsN/g==
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-x64@1.5.0":
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.0.tgz#aa74ea06cef041049027aaa0462bff5facc42b7f"
|
||||||
|
integrity sha512-OoqgUXyzmRwX466bklOsWS7WdcvWtBuxF94DXATNe7bUiBa2tlW8QX7VVZvPnMKH57E5J619AkB3b5fhzyUhXA==
|
||||||
|
|
||||||
"@braintree/sanitize-url@^6.0.0":
|
"@braintree/sanitize-url@^6.0.0":
|
||||||
version "6.0.2"
|
version "6.0.2"
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@apidevtools/swagger-parser": "10.1.0",
|
"@apidevtools/swagger-parser": "10.1.0",
|
||||||
"@babel/core": "7.23.7",
|
"@babel/core": "7.23.7",
|
||||||
"@biomejs/biome": "1.4.1",
|
"@biomejs/biome": "1.5.0",
|
||||||
"@swc/core": "1.3.102",
|
"@swc/core": "1.3.102",
|
||||||
"@swc/jest": "0.2.29",
|
"@swc/jest": "0.2.29",
|
||||||
"@types/bcryptjs": "2.4.6",
|
"@types/bcryptjs": "2.4.6",
|
||||||
|
@ -19,9 +19,9 @@ class PermissionError extends UnleashError {
|
|||||||
.map((perm) => `"${perm}"`)
|
.map((perm) => `"${perm}"`)
|
||||||
.join(', ')}`;
|
.join(', ')}`;
|
||||||
|
|
||||||
const message =
|
const message = `You don't have the required permissions to perform this operation. To perform this action, you need ${permissionsMessage}${
|
||||||
`You don't have the required permissions to perform this operation. To perform this action, you need ${permissionsMessage}` +
|
environment ? ` in the "${environment}" environment.` : `.`
|
||||||
(environment ? ` in the "${environment}" environment.` : `.`);
|
}`;
|
||||||
|
|
||||||
super(message);
|
super(message);
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@ interface IRouteOptionsNonGet extends IRouteOptionsBase {
|
|||||||
type IRouteOptions = IRouteOptionsNonGet | IRouteOptionsGet;
|
type IRouteOptions = IRouteOptionsNonGet | IRouteOptionsGet;
|
||||||
|
|
||||||
const checkPermission =
|
const checkPermission =
|
||||||
(permission: Permission = []) => async (req, res, next) => {
|
(permission: Permission = []) =>
|
||||||
|
async (req, res, next) => {
|
||||||
const permissions = (
|
const permissions = (
|
||||||
Array.isArray(permission) ? permission : [permission]
|
Array.isArray(permission) ? permission : [permission]
|
||||||
).filter((p) => p !== NONE);
|
).filter((p) => p !== NONE);
|
||||||
|
@ -17,16 +17,19 @@ export const parseFile: (file: string, data: string) => any = (
|
|||||||
export const filterExisting: (
|
export const filterExisting: (
|
||||||
keepExisting: boolean,
|
keepExisting: boolean,
|
||||||
existingArray: any[],
|
existingArray: any[],
|
||||||
) => (item: any) => boolean = (keepExisting, existingArray = []) => (item) => {
|
) => (item: any) => boolean =
|
||||||
|
(keepExisting, existingArray = []) =>
|
||||||
|
(item) => {
|
||||||
if (keepExisting) {
|
if (keepExisting) {
|
||||||
const found = existingArray.find((t) => t.name === item.name);
|
const found = existingArray.find((t) => t.name === item.name);
|
||||||
return !found;
|
return !found;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const filterEqual: (existingArray: any[]) => (item: any) => boolean =
|
export const filterEqual: (existingArray: any[]) => (item: any) => boolean =
|
||||||
(existingArray = []) => (item) => {
|
(existingArray = []) =>
|
||||||
|
(item) => {
|
||||||
const toggle = existingArray.find((t) => t.name === item.name);
|
const toggle = existingArray.find((t) => t.name === item.name);
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
return JSON.stringify(toggle) !== JSON.stringify(item);
|
return JSON.stringify(toggle) !== JSON.stringify(item);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
export interface OmitKeys {
|
export interface OmitKeys {
|
||||||
<T extends object, K extends [...(keyof T)[]]>(obj: T, ...keys: K): {
|
<T extends object, K extends [...(keyof T)[]]>(
|
||||||
|
obj: T,
|
||||||
|
...keys: K
|
||||||
|
): {
|
||||||
[K2 in Exclude<keyof T, K[number]>]: T[K2];
|
[K2 in Exclude<keyof T, K[number]>]: T[K2];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
80
yarn.lock
80
yarn.lock
@ -616,47 +616,59 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@biomejs/biome@1.4.1":
|
"@biomejs/biome@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.4.1.tgz#b698c67ea8cd8141c8e27f857c8e6e794320a251"
|
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.0.tgz#8cc7006861618b601fe4c37429e9aee58e277328"
|
||||||
integrity sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg==
|
integrity sha512-ln+o5jbs109qpeDoA+5n+vlAPai3DhlK0tHtZXzQvu4tswFgxNiJCeIXmlW1DYHziTmtBImV3Y0uhbm2iVSE3Q==
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
"@biomejs/cli-darwin-arm64" "1.4.1"
|
"@biomejs/cli-darwin-arm64" "1.5.0"
|
||||||
"@biomejs/cli-darwin-x64" "1.4.1"
|
"@biomejs/cli-darwin-x64" "1.5.0"
|
||||||
"@biomejs/cli-linux-arm64" "1.4.1"
|
"@biomejs/cli-linux-arm64" "1.5.0"
|
||||||
"@biomejs/cli-linux-x64" "1.4.1"
|
"@biomejs/cli-linux-arm64-musl" "1.5.0"
|
||||||
"@biomejs/cli-win32-arm64" "1.4.1"
|
"@biomejs/cli-linux-x64" "1.5.0"
|
||||||
"@biomejs/cli-win32-x64" "1.4.1"
|
"@biomejs/cli-linux-x64-musl" "1.5.0"
|
||||||
|
"@biomejs/cli-win32-arm64" "1.5.0"
|
||||||
|
"@biomejs/cli-win32-x64" "1.5.0"
|
||||||
|
|
||||||
"@biomejs/cli-darwin-arm64@1.4.1":
|
"@biomejs/cli-darwin-arm64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.4.1.tgz#75f9c3c9b1abed8836c8f7bc8cd23ba153fb93d1"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.0.tgz#794ea67d348a3f95747e41c6bbbc1145937359ce"
|
||||||
integrity sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w==
|
integrity sha512-3+D7axf04dpadGMOaqb2q+zyQnhWW0o/Imt7TJBWsoE0N3/+28Wht8g3UEHHcUL5FPuGIfsE+NcYntBaaAsEIg==
|
||||||
|
|
||||||
"@biomejs/cli-darwin-x64@1.4.1":
|
"@biomejs/cli-darwin-x64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.4.1.tgz#672fcce2d339de3bb7a7bd2997e94f03121a28a3"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.0.tgz#ee8ad47984bf08bdbd09cf5cf7b1d0856af8b0f3"
|
||||||
integrity sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g==
|
integrity sha512-8k5aaLWE/B6ZAXLC+z/Vwh9ogyiSaiRIfvg+F9foxuneHl2R/D/2Iy7pvd3Yoi4Kf6/MBdowekPVezGP4/Kbcw==
|
||||||
|
|
||||||
"@biomejs/cli-linux-arm64@1.4.1":
|
"@biomejs/cli-linux-arm64-musl@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.4.1.tgz#c816206089ad29ce866c58a6e00e9d3d64a3529d"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.0.tgz#94af114a283b2e40cd56ec39bbc087dd752b9da4"
|
||||||
integrity sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ==
|
integrity sha512-+1B3J8tWLTOvP3+00Cap+XhEXMvxwCHvVfuywUsB7Sqd66NWic3wKJuGbGcS3PuCWtGuIFsiQMNAGqiOXG4uBQ==
|
||||||
|
|
||||||
"@biomejs/cli-linux-x64@1.4.1":
|
"@biomejs/cli-linux-arm64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.4.1.tgz#2639daeab1be205cfe444a8d5a3f76aa3a59b956"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.0.tgz#a173b20a9c85f7b5a69824f7fd8227274fa181d0"
|
||||||
integrity sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ==
|
integrity sha512-RiecxG71E1jnqiJZ3FaikVBDRkk2ohIxBo0O4o68g87y6Hug//G0S83sj6Wqyn8DgKMCRWQg+XYMgk5CwLVowA==
|
||||||
|
|
||||||
"@biomejs/cli-win32-arm64@1.4.1":
|
"@biomejs/cli-linux-x64-musl@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.4.1.tgz#ed5e749b2e0987cf16b545beaa01be6980ae8ce1"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.0.tgz#5431e874954eedf8e95851a61c87ba755353fb74"
|
||||||
integrity sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg==
|
integrity sha512-4S2rLluc0WT+XTbLTgcm9+5EEFwJmoGiUEzR6N0P2sIjZD8c5KNf9Ou46BP1Pdg5AgqV+IIClGPK1I80ApSh1Q==
|
||||||
|
|
||||||
"@biomejs/cli-win32-x64@1.4.1":
|
"@biomejs/cli-linux-x64@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.4.1.tgz#dd8ee6e14a5d74cbeb2eb9824a43c61bb5c460e4"
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.0.tgz#273dc39c8dea8ce02e0bb842355ffb9a7e94b201"
|
||||||
integrity sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA==
|
integrity sha512-TlTsG+ptSmnDTUsAAYsXyGOXMcFiF8SiwhPdj4YsNkJRgx9M2curEVcTVm66FINIPK6VJTUcEDahFlx3NPUOzA==
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-arm64@1.5.0":
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.0.tgz#fd4ec29be7774dc5392fb765c25a7a8e378fee9a"
|
||||||
|
integrity sha512-sWOi1SR+YqJuXElBncGRnWBR7IN7ni6GQY4Zm/vTpP6nVA0dX5C301eQUW1N/VnFQb6fyrJTcBslDUKyemsN/g==
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-x64@1.5.0":
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.0.tgz#aa74ea06cef041049027aaa0462bff5facc42b7f"
|
||||||
|
integrity sha512-OoqgUXyzmRwX466bklOsWS7WdcvWtBuxF94DXATNe7bUiBa2tlW8QX7VVZvPnMKH57E5J619AkB3b5fhzyUhXA==
|
||||||
|
|
||||||
"@colors/colors@1.5.0":
|
"@colors/colors@1.5.0":
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user