From 66ea35b82ea01ef931a5574e409cfc27e9d33f9b Mon Sep 17 00:00:00 2001 From: Miguel de Leon Date: Fri, 28 Jun 2024 18:14:31 +0200 Subject: [PATCH 1/2] fix(all): eslint enavled on exmple + fix all lint problem --- .eslintrc | 19 +- example/.eslintignore | 1 + example/.eslintrc.cjs | 13 - example/cypress.config.ts | 10 +- example/cypress/support/commands.ts | 10 +- example/cypress/support/component.tsx | 14 +- example/cypress/support/index.d.ts | 5 +- example/src/.eslintrc | 0 example/src/App.tsx | 12 +- example/src/__tests__/addable-fields.cy.tsx | 173 +++-- .../src/__tests__/basic-form-context.cy.tsx | 156 ++-- example/src/__tests__/basic-form-hook.cy.tsx | 8 +- example/src/__tests__/edit-like.cy.tsx | 93 ++- example/src/__tests__/multi-steps.cy.tsx | 226 +++--- example/src/forms/addable-fields/index.tsx | 64 +- example/src/forms/addable-fields/schema.ts | 8 +- .../src/forms/basic-form-context/index.tsx | 38 +- .../src/forms/basic-form-context/schema.ts | 2 +- example/src/forms/basic-form-hook/index.tsx | 51 +- example/src/forms/basic-form-hook/schema.ts | 4 +- example/src/forms/context/api-context.tsx | 35 +- example/src/forms/context/use-fake-post.ts | 33 +- .../src/forms/context/use-get-fake-user.ts | 38 +- .../forms/context/use-handle-on-submit.tsx | 36 +- example/src/forms/edit-like/index.tsx | 43 +- example/src/forms/edit-like/schema.ts | 2 +- example/src/forms/multiple-steps/index.tsx | 19 +- example/src/forms/multiple-steps/schema.ts | 8 +- example/src/forms/multiple-steps/step-one.tsx | 47 +- .../src/forms/multiple-steps/step-three.tsx | 41 +- example/src/forms/multiple-steps/step-two.tsx | 35 +- .../multiple-steps/use-handle-next-step.ts | 35 +- example/src/forms/remove-all/index.tsx | 40 +- example/src/forms/remove-all/schema.ts | 2 +- example/src/helpers/message.ts | 8 +- example/src/helpers/use-autofocus.ts | 10 +- example/src/main.tsx | 2 +- example/vite.config.ts | 2 +- package.json | 2 + src/use-formbit.ts | 601 ++++++++------- tsconfig.json | 7 +- yarn.lock | 713 +++++++++++++++++- 42 files changed, 1693 insertions(+), 973 deletions(-) create mode 100644 example/.eslintignore delete mode 100644 example/.eslintrc.cjs create mode 100644 example/src/.eslintrc diff --git a/.eslintrc b/.eslintrc index 4d858d1..79cab8b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,18 +1,31 @@ { + "overrides": [ + { + "files": [ + "example/**/*.ts", + "example/**/*.tsx" + ] + } + ], "parser": "@typescript-eslint/parser", "plugins": [ "sonarjs", "@typescript-eslint", - "jest" + "jest", + "cypress" ], "extends": [ "standard", "standard-react", "plugin:sonarjs/recommended", + "plugin:cypress/recommended" ], "env": { + "browser": true, + "es2021": true, "node": true, - "jest": true + "jest": true, + "cypress/globals": true }, "parserOptions": { "ecmaVersion": 2020, @@ -28,6 +41,8 @@ }, "rules": { "no-unused-vars": "off", + "cypress/unsafe-to-chain-command": "off", + "sonarjs/no-duplicate-string": "off", "@typescript-eslint/no-unused-vars": [ "error", { diff --git a/example/.eslintignore b/example/.eslintignore new file mode 100644 index 0000000..225798f --- /dev/null +++ b/example/.eslintignore @@ -0,0 +1 @@ +cypress \ No newline at end of file diff --git a/example/.eslintrc.cjs b/example/.eslintrc.cjs deleted file mode 100644 index 81b15e1..0000000 --- a/example/.eslintrc.cjs +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react-hooks/recommended', - ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - plugins: ['react-refresh'], - rules: {}, -} diff --git a/example/cypress.config.ts b/example/cypress.config.ts index 03fba84..f0622c6 100644 --- a/example/cypress.config.ts +++ b/example/cypress.config.ts @@ -1,12 +1,12 @@ -import { defineConfig } from "cypress"; +import { defineConfig } from 'cypress' export default defineConfig({ component: { devServer: { - framework: "react", - bundler: "vite", + framework: 'react', + bundler: 'vite' }, viewportWidth: 1200, viewportHeight: 800 - }, -}); + } +}) diff --git a/example/cypress/support/commands.ts b/example/cypress/support/commands.ts index 2d018b8..ca185f9 100644 --- a/example/cypress/support/commands.ts +++ b/example/cypress/support/commands.ts @@ -36,16 +36,12 @@ // } // } +const getTab = (tab: string) => cy.get('[role="tab"]').contains(tab, { matchCase: false }) - - -const getTab = (tab: string) => cy.get(`[role="tab"]`).contains(tab, { matchCase: false }) - -const shouldSubmit = (...args: unknown[]) => cy.get('@console-log').should('be.calledWith','Submitted Form', ...args) +const shouldSubmit = (...args: unknown[]) => cy.get('@console-log').should('be.calledWith', 'Submitted Form', ...args) const shouldNotSubmit = () => { cy.get('@console-log').should('not.be.called') } const button = (text: string) => cy.get('button').contains(text, { matchCase: false }).parent() - -Cypress.Commands.addAll({ button, getTab, shouldSubmit, shouldNotSubmit}) +Cypress.Commands.addAll({ button, getTab, shouldSubmit, shouldNotSubmit }) diff --git a/example/cypress/support/component.tsx b/example/cypress/support/component.tsx index cb52d1f..2acaf37 100644 --- a/example/cypress/support/component.tsx +++ b/example/cypress/support/component.tsx @@ -19,21 +19,19 @@ // Import commands.js using ES2015 syntax: import './commands' +import { mount } from 'cypress/react18' + // Alternatively you can use CommonJS syntax: // require('./commands') - -global.process = global.process || {}; -global.process.env = global.process.env || {}; - -import { mount } from 'cypress/react18' - +global.process = global.process || {} +global.process.env = global.process.env || {} Cypress.Commands.add('mount', mount) beforeEach(() => { - cy.spy(window.console, 'log').as('console-log') + cy.spy(window.console, 'log').as('console-log') }) // Example use: -// cy.mount() \ No newline at end of file +// cy.mount() diff --git a/example/cypress/support/index.d.ts b/example/cypress/support/index.d.ts index 290110f..7fc999f 100644 --- a/example/cypress/support/index.d.ts +++ b/example/cypress/support/index.d.ts @@ -1,4 +1,5 @@ -import { mount } from "cypress/react18"; +/* eslint-disable no-undef */ +import { mount } from 'cypress/react18' declare global { namespace Cypress { @@ -10,4 +11,4 @@ declare global { shouldNotSubmit: () => void } } - } \ No newline at end of file + } diff --git a/example/src/.eslintrc b/example/src/.eslintrc new file mode 100644 index 0000000..e69de29 diff --git a/example/src/App.tsx b/example/src/App.tsx index 0510242..7bdbdc0 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,12 +1,12 @@ -import { Tabs } from "@radicalbit/radicalbit-design-system" +import { Tabs } from '@radicalbit/radicalbit-design-system' import { BasicFormContext } from './forms/basic-form-context' import { BasicFormHook } from './forms/basic-form-hook' import { MultipleStepsForm } from './forms/multiple-steps' import { AddableFieldsForm } from './forms/addable-fields' import { EditLikeForm } from './forms/edit-like' -import { FakeApiProvider } from "./forms/context/api-context" -import FormbitLogo from "./img/formbit-logo.svg" -import { WriteRemoveAllForm } from "./forms/remove-all" +import { FakeApiProvider } from './forms/context/api-context' +import FormbitLogo from './img/formbit-logo.svg' +import { WriteRemoveAllForm } from './forms/remove-all' enum EXAMPLES { CONTEXT = 'context', @@ -60,11 +60,11 @@ function App() { label: 'Write/Remove All Form', key: EXAMPLES.WRITEREMOVEALL, children: - }, + } ]} /> ) } -export default App \ No newline at end of file +export default App diff --git a/example/src/__tests__/addable-fields.cy.tsx b/example/src/__tests__/addable-fields.cy.tsx index d2e6a67..81e9522 100644 --- a/example/src/__tests__/addable-fields.cy.tsx +++ b/example/src/__tests__/addable-fields.cy.tsx @@ -1,118 +1,117 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('addable').click() + beforeEach(() => { + cy.mount() + cy.getTab('addable').click() + }) - }) + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') - }) + it('Add Friend Name input should exist', () => { + cy.get('input').eq(2).should('exist') + }) - it('Add Friend Name input should exist', () => { - cy.get('input').eq(2).should('exist') - }) + it('Add Friend Surname input should exist', () => { + cy.get('input').eq(3).should('exist') + }) - it('Add Friend Surname input should exist', () => { - cy.get('input').eq(3).should('exist') - }) + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('friendName') + cy.get('input').eq(3).as('friendSurname') + }) - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('friendName') - cy.get('input').eq(3).as('friendSurname') - }) + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + const friendName = '@friendName' - it('Should be submittable', () => { - cy.get('@name').type('Harry') - cy.get('@surname').type('Potter') - cy.get('@friendName').type('Ron') - cy.get('@friendSurname').type('Weasley') + it('Should be submittable', () => { + cy.get('@name').type('Harry') + cy.get('@surname').type('Potter') + cy.get(friendName).type('Ron') + cy.get('@friendSurname').type('Weasley') - cy.get('.c-form-multiple__add').click() + cy.get('.c-form-multiple__add').click() + cy.button('submit').click() - cy.button('submit').click() + cy.shouldSubmit({ name: 'Harry', surname: 'Potter', friends: [{ name: 'Ron', surname: 'Weasley' }] }) + }) - cy.shouldSubmit({ name: 'Harry', surname: 'Potter', friends: [{ name: 'Ron', surname: 'Weasley' }] }) - }) + it('Should not submit form when not valid', () => { + cy.get('@name').type('Harry') + cy.button('submit').click() - it('Should not submit form when not valid', () => { - cy.get('@name').type('Harry') - cy.button('submit').click() + cy.shouldNotSubmit() + }) + }) - cy.shouldNotSubmit() - }) - }) + describe('Reset', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('friendName') + cy.get('input').eq(3).as('friendSurname') + }) - describe('Reset', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('friendName') - cy.get('input').eq(3).as('friendSurname') - }) + it('Reset button should exist', () => { + cy.button('reset').should('exist') + }) - it('Reset button should exist', () => { - cy.button('reset').should('exist') - }) + describe('Can be reset to original state', () => { + it('Should reset name field', () => { + cy.get('@name').type('Ada') + cy.button('reset').click() - describe('Can be reset to original state', () => { - it('Should reset name field', () => { - cy.get('@name').type('Ada') - cy.button('reset').click() + cy.get('@name').should('be.empty') + }) - cy.get('@name').should('be.empty') - }) + it('Should reset surname field', () => { + cy.get('@surname').type('Lovelace') + cy.button('reset').click() - it('Should reset surname field', () => { - cy.get('@surname').type('Lovelace') - cy.button('reset').click() + cy.get('@surname').should('be.empty') + }) - cy.get('@surname').should('be.empty') - }) + const friendName = '@friendName' - describe('', () => { - beforeEach(() => { - cy.get('@friendName').type('Ron') - cy.get('@friendSurname').type('Weasley') + describe('', () => { + beforeEach(() => { + cy.get(friendName).type('Ron') + cy.get('@friendSurname').type('Weasley') - cy.get('.c-form-multiple__add').click() - }) + cy.get('.c-form-multiple__add').click() + }) - it('Should reset friend name field', () => { - cy.button('reset').click() + it('Should reset friend name field', () => { + cy.button('reset').click() - cy.get('@friendName').should('be.empty') - }) + cy.get(friendName).should('be.empty') + }) - it('Should reset friend surname field', () => { - cy.button('reset').click() + it('Should reset friend surname field', () => { + cy.button('reset').click() - cy.get('@friendName').should('be.empty') - }) - }) - }) + cy.get(friendName).should('be.empty') + }) }) - + }) }) - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/basic-form-context.cy.tsx b/example/src/__tests__/basic-form-context.cy.tsx index 5521f49..3160384 100644 --- a/example/src/__tests__/basic-form-context.cy.tsx +++ b/example/src/__tests__/basic-form-context.cy.tsx @@ -1,94 +1,90 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('context').click() - - }) - - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) - - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') - }) - - it('Age input should exist', () => { - cy.get('input').eq(2).should('exist') + beforeEach(() => { + cy.mount() + cy.getTab('context').click() + }) + + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) + + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) + + it('Age input should exist', () => { + cy.get('input').eq(2).should('exist') + }) + + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('age') + }) + + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) + + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) + + it('Should be submittable', () => { + cy.get('@name').type('Ada') + cy.get('@surname').type('Lovelace') + cy.get('@age').type('20') + + cy.button('submit').click() + + cy.shouldSubmit({ name: 'Ada', surname: 'Lovelace', age: 20 }) + }) + + it('Should not submit form when not valid', () => { + cy.get('@name').type('Ada') + cy.button('submit').click() + + cy.shouldNotSubmit() + }) }) - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('age') - }) - - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) - - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + describe('Reset', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('age') + }) - it('Should be submittable', () => { - cy.get('@name').type('Ada') - cy.get('@surname').type('Lovelace') - cy.get('@age').type('20') + it('Reset button should exist', () => { + cy.button('reset').should('exist') + }) - cy.button('submit').click() + describe('Can be reset to original state', () => { + it('Should reset name field', () => { + cy.get('@name').type('Ada') + cy.button('reset').click() - cy.shouldSubmit({ name: 'Ada', surname: 'Lovelace', age: 20 }) - }) - - it('Should not submit form when not valid', () => { - cy.get('@name').type('Ada') - cy.button('submit').click() - - cy.shouldNotSubmit() - }) + cy.get('@name').should('be.empty') }) - describe('Reset', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('age') - }) - - it('Reset button should exist', () => { - cy.button('reset').should('exist') - }) - - describe('Can be reset to original state', () => { - it('Should reset name field', () => { - cy.get('@name').type('Ada') - cy.button('reset').click() - - cy.get('@name').should('be.empty') - }) + it('Should reset surname field', () => { + cy.get('@surname').type('Lovelace') + cy.button('reset').click() - it('Should reset surname field', () => { - cy.get('@surname').type('Lovelace') - cy.button('reset').click() - - cy.get('@surname').should('be.empty') - }) + cy.get('@surname').should('be.empty') + }) - it('Should reset age field', () => { - cy.get('@age').type('20') - cy.button('reset').click() + it('Should reset age field', () => { + cy.get('@age').type('20') + cy.button('reset').click() - cy.get('@age').should('be.empty') - }) - }) + cy.get('@age').should('be.empty') }) + }) }) - - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/basic-form-hook.cy.tsx b/example/src/__tests__/basic-form-hook.cy.tsx index fac895f..fec893b 100644 --- a/example/src/__tests__/basic-form-hook.cy.tsx +++ b/example/src/__tests__/basic-form-hook.cy.tsx @@ -1,11 +1,9 @@ -import App from "../App" - +import App from '../App' describe('', () => { beforeEach(() => { cy.mount() cy.getTab('hook').click() - }) it('Name input should exist', () => { @@ -28,7 +26,7 @@ describe('', () => { }) it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") + cy.button('submit').should('be.disabled') }) it('Should be submittable', () => { @@ -75,4 +73,4 @@ describe('', () => { }) }) }) -}) \ No newline at end of file +}) diff --git a/example/src/__tests__/edit-like.cy.tsx b/example/src/__tests__/edit-like.cy.tsx index f5b8066..8384167 100644 --- a/example/src/__tests__/edit-like.cy.tsx +++ b/example/src/__tests__/edit-like.cy.tsx @@ -1,64 +1,61 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('edit').click() - }) - - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') - }) + beforeEach(() => { + cy.mount() + cy.getTab('edit').click() + }) - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') - }) + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Email input should exist', () => { - cy.get('input').eq(2).should('exist') - }) + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') + }) - it('Should render skeleton on render', () => { - cy.get('.ant-skeleton-input').should('have.length', 3) - }) + it('Email input should exist', () => { + cy.get('input').eq(2).should('exist') + }) - describe('', () => { - describe('Submit', () => { - beforeEach(() => { - cy.get('.ant-skeleton-input').should('not.exist') + it('Should render skeleton on render', () => { + cy.get('.ant-skeleton-input').should('have.length', 3) + }) - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - cy.get('input').eq(2).as('email') - }) + describe('', () => { + describe('Submit', () => { + beforeEach(() => { + cy.get('.ant-skeleton-input').should('not.exist') - it('Submit button should exist', () => { - cy.button('submit').should('exist') - }) + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') + cy.get('input').eq(2).as('email') + }) - it('Submit button should be disabled when form is rendered', () => { - cy.button('submit').should("be.disabled") - }) + it('Submit button should exist', () => { + cy.button('submit').should('exist') + }) - it('Should be submittable', () => { - cy.get('@name').clear().type('Harry') - cy.get('@surname').clear().type('Potter') - cy.get('@email').clear().type('harry@potter.com') + it('Submit button should be disabled when form is rendered', () => { + cy.button('submit').should('be.disabled') + }) - cy.button('submit').click() + it('Should be submittable', () => { + cy.get('@name').clear().type('Harry') + cy.get('@surname').clear().type('Potter') + cy.get('@email').clear().type('harry@potter.com') - cy.shouldSubmit({ name: 'Harry', surname: 'Potter', email: 'harry@potter.com' }) - }) + cy.button('submit').click() - it('Should not submit form when not valid', () => { - cy.get('@name').clear() - cy.button('submit').click() + cy.shouldSubmit({ name: 'Harry', surname: 'Potter', email: 'harry@potter.com' }) + }) - cy.shouldNotSubmit() - }) - }) + it('Should not submit form when not valid', () => { + cy.get('@name').clear() + cy.button('submit').click() + cy.shouldNotSubmit() + }) }) - -}) \ No newline at end of file + }) +}) diff --git a/example/src/__tests__/multi-steps.cy.tsx b/example/src/__tests__/multi-steps.cy.tsx index 0506baa..fb2490d 100644 --- a/example/src/__tests__/multi-steps.cy.tsx +++ b/example/src/__tests__/multi-steps.cy.tsx @@ -1,165 +1,159 @@ -import App from "../App" - +import App from '../App' describe('', () => { - beforeEach(() => { - cy.mount() - cy.getTab('multi').click() + beforeEach(() => { + cy.mount() + cy.getTab('multi').click() + }) + + describe('', () => { + it('Name input should exist', () => { + cy.get('input').eq(0).should('exist') + }) + it('Surname input should exist', () => { + cy.get('input').eq(1).should('exist') }) - describe('', () => { - it('Name input should exist', () => { - cy.get('input').eq(0).should('exist') + describe('', () => { + describe('Next', () => { + beforeEach(() => { + cy.get('input').eq(0).as('name') + cy.get('input').eq(1).as('surname') }) - it('Surname input should exist', () => { - cy.get('input').eq(1).should('exist') + it('Next button should exist', () => { + cy.button('next').should('exist') }) - describe('', () => { - describe('Next', () => { - beforeEach(() => { - cy.get('input').eq(0).as('name') - cy.get('input').eq(1).as('surname') - }) - - it('Next button should exist', () => { - cy.button('next').should('exist') - }) + it('Should not submit form when not valid', () => { + cy.get('@name').type('Ada') + cy.button('next').click() - it('Should not submit form when not valid', () => { - cy.get('@name').type('Ada') - cy.button('next').click() - - cy.shouldNotSubmit() - }) - - it('Should be submittable', () => { - cy.get('@name').type('Ada') - cy.get('@surname').type('Lovelace') + cy.shouldNotSubmit() + }) - cy.button('next').click() + it('Should be submittable', () => { + cy.get('@name').type('Ada') + cy.get('@surname').type('Lovelace') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Age') - }) - }) + cy.button('next').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Age') }) + }) }) + }) + describe('', () => { + beforeEach(() => { + cy.get('input').eq(0).type('Ada') + cy.get('input').eq(1).type('Lovelace') - describe('', () => { - beforeEach(() => { - cy.get('input').eq(0).type('Ada') - cy.get('input').eq(1).type('Lovelace') + cy.button('next').click() + }) - cy.button('next').click() - }) + it('Age input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Age input should exist', () => { - cy.get('input').eq(0).should('exist') + describe('', () => { + describe('Back', () => { + it('Back button should exist', () => { + cy.button('prev').should('exist') }) - describe('', () => { - describe('Back', () => { - it('Back button should exist', () => { - cy.button('prev').should('exist') - }) + it('Back button should take to the prev form', () => { + cy.button('prev').click() - it('Back button should take to the prev form', () => { - cy.button('prev').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - - cy.button('next').click() - }) - }) - - describe('Next', () => { - beforeEach(() => { - cy.get('input').eq(0).as('age') - }) + cy.button('next').click() + }) + }) - it('Next button should exist', () => { - cy.button('next').should('exist') - }) + describe('Next', () => { + beforeEach(() => { + cy.get('input').eq(0).as('age') + }) - it('Should not submit form when not valid', () => { - cy.get('@age').type('10') - cy.button('next').click() + it('Next button should exist', () => { + cy.button('next').should('exist') + }) - cy.shouldNotSubmit() - }) + it('Should not submit form when not valid', () => { + cy.get('@age').type('10') + cy.button('next').click() - it('Should be submittable', () => { - cy.get('@age').type('20') + cy.shouldNotSubmit() + }) - cy.button('next').click() + it('Should be submittable', () => { + cy.get('@age').type('20') - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Email') - }) - }) + cy.button('next').click() + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Email') }) + }) }) + }) - describe('', () => { - beforeEach(() => { - cy.get('input').eq(0).type('Ada') - cy.get('input').eq(1).type('Lovelace') - - cy.button('next').click() + describe('', () => { + beforeEach(() => { + cy.get('input').eq(0).type('Ada') + cy.get('input').eq(1).type('Lovelace') - cy.get('input').eq(0).type('20') + cy.button('next').click() - cy.button('next').click() - }) + cy.get('input').eq(0).type('20') - it('Email input should exist', () => { - cy.get('input').eq(0).should('exist') - }) + cy.button('next').click() + }) - describe('', () => { - describe('Reset', () => { - it('Back button should exist', () => { - cy.button('reset').should('exist') - }) + it('Email input should exist', () => { + cy.get('input').eq(0).should('exist') + }) - it('Back button should take to the prev form', () => { - cy.button('reset').click() + describe('', () => { + describe('Reset', () => { + it('Back button should exist', () => { + cy.button('reset').should('exist') + }) - cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') - }) - }) + it('Back button should take to the prev form', () => { + cy.button('reset').click() - describe('Submit', () => { - beforeEach(() => { - cy.get('input').eq(0).as('email') - }) + cy.get('input').eq(0).should('have.attr', 'placeholder', 'Name') + }) + }) - it('Next button should exist', () => { - cy.button('submit').should('exist') - }) + describe('Submit', () => { + beforeEach(() => { + cy.get('input').eq(0).as('email') + }) - it('Should not submit form when not valid', () => { - cy.get('@email').type('invalid-email') - cy.button('submit').click() + it('Next button should exist', () => { + cy.button('submit').should('exist') + }) - cy.shouldNotSubmit() - }) + it('Should not submit form when not valid', () => { + cy.get('@email').type('invalid-email') + cy.button('submit').click() - it('Should be submittable', () => { - cy.get('@email').type('ada@lovelace.com') + cy.shouldNotSubmit() + }) - cy.button('submit').click() + it('Should be submittable', () => { + cy.get('@email').type('ada@lovelace.com') - cy.shouldSubmit({ - name: 'Ada', surname: 'Lovelace', age: 20, email: 'ada@lovelace.com' - }) - }) - }) + cy.button('submit').click() + cy.shouldSubmit({ + name: 'Ada', surname: 'Lovelace', age: 20, email: 'ada@lovelace.com' + }) }) + }) }) -}) \ No newline at end of file + }) +}) diff --git a/example/src/forms/addable-fields/index.tsx b/example/src/forms/addable-fields/index.tsx index f7d7bd4..87714b9 100644 --- a/example/src/forms/addable-fields/index.tsx +++ b/example/src/forms/addable-fields/index.tsx @@ -1,28 +1,28 @@ -import { faPlus, faXmark } from '@fortawesome/free-solid-svg-icons'; -import { FormbitContextProvider, useFormbitContext } from 'formbit'; +import { faPlus, faXmark } from '@fortawesome/free-solid-svg-icons' +import { FormbitContextProvider, useFormbitContext } from 'formbit' import { Button, FontAwesomeIcon, FormField, FormMultiple, Input, SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent, ChangeEventHandler, useRef, useState } from 'react'; -import * as yup from 'yup'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { schema } from './schema'; +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent, ChangeEventHandler, useRef, useState } from 'react' +import * as yup from 'yup' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from '../context/use-handle-on-submit' +import { schema } from './schema' type FormData = yup.InferType -const useAddableFieldsForm = () => useFormbitContext(); +const useAddableFieldsForm = () => useFormbitContext() export function AddableFieldsForm() { return ( - ); + ) } function BasicFormInner() { @@ -38,24 +38,22 @@ function BasicFormInner() { -
{friends?.map((_, i) => )}
- - ); + ) } function Name() { - const { form, error, write } = useAddableFieldsForm(); + const { form, error, write } = useAddableFieldsForm() - const [handleOnSubmit] = useHandleOnSubmit(); + const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus() @@ -70,14 +68,14 @@ function Name() { ref={ref} /> - ); + ) } function Surname() { - const { form, error, write } = useAddableFieldsForm(); - const [handleOnSubmit] = useHandleOnSubmit(); + const { form, error, write } = useAddableFieldsForm() + const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -95,14 +93,14 @@ function Surname() { function FriendInput() { const inputNameRef = useRef(null) - const { write, form, error } = useAddableFieldsForm(); + const { write, form, error } = useAddableFieldsForm() const friends = form?.friends ?? [] const [name, setName] = useState() const [surname, setSurname] = useState() - const handleChangeName: ChangeEventHandler = ({ target: { value } }) => setName(value); - const handleChangeSurname: ChangeEventHandler = ({ target: { value } }) => setSurname(value); + const handleChangeName: ChangeEventHandler = ({ target: { value } }) => setName(value) + const handleChangeSurname: ChangeEventHandler = ({ target: { value } }) => setSurname(value) const handleAddFriend = () => { write('friends', [...friends, { name, surname }]) @@ -111,7 +109,6 @@ function FriendInput() { inputNameRef.current?.focus() } - return ( } @@ -138,7 +135,7 @@ function FriendInput() { /> - ); + ) } function Friend({ index }: { index: number }) { @@ -147,16 +144,15 @@ function Friend({ index }: { index: number }) { const name = form.friends?.[index].name const surname = form.friends?.[index].surname - - const handleOnBlurFriendName = () => validate(`headers[${index}].name`); - const handleOnBlurFriendSurname = () => validate(`headers[${index}].surname`); + const handleOnBlurFriendName = () => validate(`headers[${index}].name`) + const handleOnBlurFriendSurname = () => validate(`headers[${index}].surname`) const handleOnChangeFriendName: ChangeEventHandler = - ({ target }) => write(`friends[${index}].key`, target.value); + ({ target }) => write(`friends[${index}].key`, target.value) const handleOnChangeFriendSurname: ChangeEventHandler = - ({ target }) => write(`friends[${index}].key`, target.value); + ({ target }) => write(`friends[${index}].key`, target.value) - const handleOnRemoveFriend = () => write('friends', form.friends?.filter((_, i) => index !== i)); + const handleOnRemoveFriend = () => write('friends', form.friends?.filter((_, i) => index !== i)) const errorMessage = error(`headers[${index}].name`) || error(`headers[${index}].surname`) @@ -182,9 +178,8 @@ function Friend({ index }: { index: number }) { ) } - function Actions() { - const { resetForm } = useAddableFieldsForm(); + const { resetForm } = useAddableFieldsForm() const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() @@ -197,5 +192,4 @@ function Actions() { Reset - } diff --git a/example/src/forms/addable-fields/schema.ts b/example/src/forms/addable-fields/schema.ts index 1a1e465..62fde23 100644 --- a/example/src/forms/addable-fields/schema.ts +++ b/example/src/forms/addable-fields/schema.ts @@ -6,11 +6,9 @@ export const schema = yup.object().shape({ friends: yup.array().of( yup.object().shape({ name: yup.string().min(2).required(), - surname: yup.string().min(2).required(), + surname: yup.string().min(2).required() }) ).required() -}); - - -export type FormData = yup.InferType +}) +export type FormData = yup.InferType diff --git a/example/src/forms/basic-form-context/index.tsx b/example/src/forms/basic-form-context/index.tsx index b770b97..08095ad 100644 --- a/example/src/forms/basic-form-context/index.tsx +++ b/example/src/forms/basic-form-context/index.tsx @@ -1,26 +1,26 @@ -import { FormbitContextProvider, useFormbitContext } from 'formbit'; +import { FormbitContextProvider, useFormbitContext } from 'formbit' import { Button, FormField, Input, InputNumber, SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from 'react'; -import * as yup from 'yup'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { schema } from './schema'; +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import * as yup from 'yup' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from '../context/use-handle-on-submit' +import { schema } from './schema' type FormData = yup.InferType -const useBasicFormContext = () => useFormbitContext(); +const useBasicFormContext = () => useFormbitContext() export function BasicFormContext() { return ( - ); + ) } function BasicFormInner() { @@ -36,15 +36,15 @@ function BasicFormInner() { - ); + ) } function Name() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useBasicFormContext() const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus() @@ -59,15 +59,15 @@ function Name() { required /> - ); + ) } function Surname() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useBasicFormContext() const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -87,7 +87,7 @@ function Age() { const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeAge = (value?: number | null) => write('age', value); + const handleOnChangeAge = (value?: number | null) => write('age', value) return ( @@ -105,7 +105,7 @@ function Age() { } function Actions() { - const { resetForm } = useBasicFormContext(); + const { resetForm } = useBasicFormContext() const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() @@ -125,4 +125,4 @@ function Actions() { ) -} \ No newline at end of file +} diff --git a/example/src/forms/basic-form-context/schema.ts b/example/src/forms/basic-form-context/schema.ts index f2c6408..d7bf56e 100644 --- a/example/src/forms/basic-form-context/schema.ts +++ b/example/src/forms/basic-form-context/schema.ts @@ -4,4 +4,4 @@ export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), age: yup.number().min(18).required() -}); \ No newline at end of file +}) diff --git a/example/src/forms/basic-form-hook/index.tsx b/example/src/forms/basic-form-hook/index.tsx index 2dd09fa..c59b483 100644 --- a/example/src/forms/basic-form-hook/index.tsx +++ b/example/src/forms/basic-form-hook/index.tsx @@ -1,15 +1,15 @@ -import useFormbit from 'formbit'; +import useFormbit from 'formbit' import { Button, FormField, Input, - SectionTitle, -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from 'react'; -import { usePost } from '../context/api-context'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { success } from '../../helpers/message'; -import { schema } from './schema'; + SectionTitle +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { usePost } from '../context/api-context' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { success } from '../../helpers/message' +import { schema } from './schema' type FieldProps = { value?: string, @@ -28,22 +28,30 @@ type ActionsProps = { export function BasicFormHook() { const [triggerMutation, isLoading] = usePost() - const { form, error, write, resetForm, submitForm, isFormInvalid, isDirty } = useFormbit({ initialValues: {}, yup: schema }); + const { + form, + error, + write, + resetForm, + submitForm, + isFormInvalid, + isDirty + } = useFormbit({ initialValues: {}, yup: schema }) - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) const isSubmitDisabled = isFormInvalid() || !isDirty const handleOnSubmit = () => { - if (isSubmitDisabled || isLoading) return; + if (isSubmitDisabled || isLoading) return submitForm(async ({ form }) => { await triggerMutation(form) success(form) resetForm() - }); - }; + }) + } return (
@@ -51,15 +59,19 @@ export function BasicFormHook() { - +
- ); + ) } - function Name({ value, error, onChange, onSubmit }: FieldProps) { const ref = useAutoFocus() @@ -74,7 +86,7 @@ function Name({ value, error, onChange, onSubmit }: FieldProps) { required />
- ); + ) } function Surname({ value, error, onChange, onSubmit }: FieldProps) { @@ -89,7 +101,6 @@ function Surname({ value, error, onChange, onSubmit }: FieldProps) { />
) - } function Actions({ onSubmit, onReset, isLoading, isDisabled }: ActionsProps) { diff --git a/example/src/forms/basic-form-hook/schema.ts b/example/src/forms/basic-form-hook/schema.ts index 9d167b6..adca0bf 100644 --- a/example/src/forms/basic-form-hook/schema.ts +++ b/example/src/forms/basic-form-hook/schema.ts @@ -2,5 +2,5 @@ import * as yup from 'yup' export const schema = yup.object().shape({ name: yup.string().min(2).required(), - surname: yup.string().min(2).required(), -}); \ No newline at end of file + surname: yup.string().min(2).required() +}) diff --git a/example/src/forms/context/api-context.tsx b/example/src/forms/context/api-context.tsx index 46fe43f..8b723bb 100644 --- a/example/src/forms/context/api-context.tsx +++ b/example/src/forms/context/api-context.tsx @@ -1,6 +1,6 @@ -import { PropsWithChildren, useContext, createContext } from "react" -import { useFakePost } from "./use-fake-post" -import { useGetFakeUser } from "./use-get-fake-user" +import { PropsWithChildren, useContext, createContext } from 'react' +import { useFakePost } from './use-fake-post' +import { useGetFakeUser } from './use-get-fake-user' type Context = { fakePost: ReturnType @@ -10,29 +10,28 @@ type Context = { const FakeApiContext = createContext(undefined) export function FakeApiProvider({ children }: PropsWithChildren) { - const fakePost = useFakePost() - const fakeUser = useGetFakeUser() + const fakePost = useFakePost() + const fakeUser = useGetFakeUser() - return {children} + return {children} } - export const useGetUser = () => { - const context = useContext(FakeApiContext) + const context = useContext(FakeApiContext) - if (!context) { - throw Error('FakeApiContext not found') - } + if (!context) { + throw Error('FakeApiContext not found') + } - return context.fakeUser + return context.fakeUser } export const usePost = () => { - const context = useContext(FakeApiContext) + const context = useContext(FakeApiContext) - if (!context) { - throw Error('FakeApiContext not found') - } + if (!context) { + throw Error('FakeApiContext not found') + } - return context.fakePost -} \ No newline at end of file + return context.fakePost +} diff --git a/example/src/forms/context/use-fake-post.ts b/example/src/forms/context/use-fake-post.ts index 7a6bfcc..75b4f42 100644 --- a/example/src/forms/context/use-fake-post.ts +++ b/example/src/forms/context/use-fake-post.ts @@ -1,21 +1,28 @@ -import { useState } from "react"; - -const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); +import { useState } from 'react' + +const sleep = (ms: number) => new Promise((resolve) => { + setTimeout(() => { + const success = true + if (success) { + resolve('Operation was successful!') + } else { + throw new Error('Operation failed') + } + }, ms) +}) export const useFakePost = () => { - const [isLoading, setIsLoading] = useState(false) + const [isLoading, setIsLoading] = useState(false) - const fakePost = async (body?: unknown) => { - setIsLoading(true) + const fakePost = async (body?: unknown) => { + setIsLoading(true) - await sleep(1000) + await sleep(1000) - setIsLoading(false) + setIsLoading(false) - return body - } + return body + } - return [fakePost, isLoading] as const + return [fakePost, isLoading] as const } - - diff --git a/example/src/forms/context/use-get-fake-user.ts b/example/src/forms/context/use-get-fake-user.ts index 662e6f0..9d69ac3 100644 --- a/example/src/forms/context/use-get-fake-user.ts +++ b/example/src/forms/context/use-get-fake-user.ts @@ -1,31 +1,29 @@ -import { useEffect, useState } from "react" +import { useEffect, useState } from 'react' const fakeUser = { - name: 'Ada', - surname: 'Lovelace', - email: 'ada@example.com' + name: 'Ada', + surname: 'Lovelace', + email: 'ada@example.com' } type User = Partial export const useGetFakeUser = () => { - const [user, setUser] = useState() - const [isLoading, setIsLoading] = useState(true) + const [user, setUser] = useState() + const [isLoading, setIsLoading] = useState(true) + useEffect(() => { + const fakeGet = () => { + setUser(fakeUser) + setIsLoading(false) + } - useEffect(() => { - const fakeGet = () => { - setUser(fakeUser) - setIsLoading(false) - } + const timeout = setTimeout(() => { + fakeGet() + }, 2000) - const timeout = setTimeout(() => { - fakeGet() - }, 2000) + return () => clearTimeout(timeout) + }, []) - return () => clearTimeout(timeout) - - }, []) - - return [user, isLoading] as const -} \ No newline at end of file + return [user, isLoading] as const +} diff --git a/example/src/forms/context/use-handle-on-submit.tsx b/example/src/forms/context/use-handle-on-submit.tsx index b15e4ef..53f095c 100644 --- a/example/src/forms/context/use-handle-on-submit.tsx +++ b/example/src/forms/context/use-handle-on-submit.tsx @@ -1,6 +1,6 @@ -import { useFormbitContext } from "formbit"; -import { success } from "../../helpers/message"; -import { usePost } from "./api-context"; +import { useFormbitContext } from 'formbit' +import { success } from '../../helpers/message' +import { usePost } from './api-context' type Context = { __metadata: { @@ -9,24 +9,24 @@ type Context = { } export const useHandleOnSubmit = () => { - const { form: { __metadata }, submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext(); + const { form: { __metadata }, submitForm, isFormInvalid, resetForm, isDirty } = useFormbitContext() - const [triggerMutation, isLoading] = usePost(); + const [triggerMutation, isLoading] = usePost() - const resetSteps = __metadata?.resetSteps; + const resetSteps = __metadata?.resetSteps - const isSubmitDisabled = isFormInvalid() || !isDirty; + const isSubmitDisabled = isFormInvalid() || !isDirty - const handleOnSubmit = () => { - if (isSubmitDisabled || isLoading) return; + const handleOnSubmit = () => { + if (isSubmitDisabled || isLoading) return - submitForm(async ({ form }) => { - await triggerMutation(form); - success(form); - resetForm(); - resetSteps?.(); - }); - }; + submitForm(async ({ form }) => { + await triggerMutation(form) + success(form) + resetForm() + resetSteps?.() + }) + } - return [handleOnSubmit, isSubmitDisabled, isLoading] as const; -} \ No newline at end of file + return [handleOnSubmit, isSubmitDisabled, isLoading] as const +} diff --git a/example/src/forms/edit-like/index.tsx b/example/src/forms/edit-like/index.tsx index 681718e..b78472a 100644 --- a/example/src/forms/edit-like/index.tsx +++ b/example/src/forms/edit-like/index.tsx @@ -1,17 +1,17 @@ -import { FormbitContextProvider, useFormbitContext } from 'formbit'; +import { FormbitContextProvider, useFormbitContext } from 'formbit' import { Button, FormField, Input, SectionTitle -} from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent, useEffect } from 'react'; -import * as yup from 'yup'; -import { FakeApiProvider, useGetUser } from '../context/api-context'; -import { useAutoFocus } from '../../helpers/use-autofocus'; -import { useHandleOnSubmit } from '../context/use-handle-on-submit'; -import { schema } from './schema'; +} from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent, useEffect } from 'react' +import * as yup from 'yup' +import { FakeApiProvider, useGetUser } from '../context/api-context' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from '../context/use-handle-on-submit' +import { schema } from './schema' type FormData = yup.InferType & { __metadata?: { @@ -19,7 +19,7 @@ type FormData = yup.InferType & { } } -const useEditLikeContext = () => useFormbitContext(); +const useEditLikeContext = () => useFormbitContext() export function EditLikeForm() { return ( @@ -28,7 +28,7 @@ export function EditLikeForm() { - ); + ) } function EditLikeInner() { @@ -53,17 +53,17 @@ function EditLikeInner() { - ); + ) } function Name() { const [, isLoading] = useGetUser() - const { form, error, write } = useEditLikeContext(); + const { form, error, write } = useEditLikeContext() - const [handleOnSubmit] = useHandleOnSubmit(); + const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus(isLoading) @@ -79,16 +79,16 @@ function Name() { ref={ref} /> - ); + ) } function Surname() { const [, isLoading] = useGetUser() - const { form, error, write } = useEditLikeContext(); + const { form, error, write } = useEditLikeContext() - const [handleOnSubmit] = useHandleOnSubmit(); + const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -108,9 +108,9 @@ function Email() { const [, isLoading] = useGetUser() const { form, error, write } = useEditLikeContext() - const [handleOnSubmit] = useHandleOnSubmit(); + const [handleOnSubmit] = useHandleOnSubmit() - const handleChangeEmail = (e: ChangeEvent) => write('email', e.target.value); + const handleChangeEmail = (e: ChangeEvent) => write('email', e.target.value) return ( @@ -140,5 +140,4 @@ function Actions() { Submit ) - } diff --git a/example/src/forms/edit-like/schema.ts b/example/src/forms/edit-like/schema.ts index 8b3cb73..25f4a34 100644 --- a/example/src/forms/edit-like/schema.ts +++ b/example/src/forms/edit-like/schema.ts @@ -4,4 +4,4 @@ export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), email: yup.string().email().required() -}); \ No newline at end of file +}) diff --git a/example/src/forms/multiple-steps/index.tsx b/example/src/forms/multiple-steps/index.tsx index cb42556..321b8a3 100644 --- a/example/src/forms/multiple-steps/index.tsx +++ b/example/src/forms/multiple-steps/index.tsx @@ -1,10 +1,10 @@ -import { FormbitContextProvider } from 'formbit'; -import { Steps } from "@radicalbit/radicalbit-design-system"; -import { useState } from 'react'; -import { schema } from './schema'; -import { StepOne } from './step-one'; -import { StepThree } from './step-three'; -import { StepTwo } from './step-two'; +import { FormbitContextProvider } from 'formbit' +import { Steps } from '@radicalbit/radicalbit-design-system' +import { useState } from 'react' +import { schema } from './schema' +import { StepOne } from './step-one' +import { StepThree } from './step-three' +import { StepTwo } from './step-two' const items = [{ title: 'Step One', @@ -53,8 +53,5 @@ export function MultipleStepsForm() { - ); + ) } - - - diff --git a/example/src/forms/multiple-steps/schema.ts b/example/src/forms/multiple-steps/schema.ts index d69c422..a06e224 100644 --- a/example/src/forms/multiple-steps/schema.ts +++ b/example/src/forms/multiple-steps/schema.ts @@ -4,9 +4,9 @@ export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), age: yup.number().min(18).required(), - email: yup.string().email().required(), - -}); + email: yup.string().email().required() + +}) export type FormData = yup.InferType & { __metadata: { @@ -15,4 +15,4 @@ export type FormData = yup.InferType & { prevStep?: () => void, resetSteps?: () => void } -} \ No newline at end of file +} diff --git a/example/src/forms/multiple-steps/step-one.tsx b/example/src/forms/multiple-steps/step-one.tsx index 596f3cd..0415f5e 100644 --- a/example/src/forms/multiple-steps/step-one.tsx +++ b/example/src/forms/multiple-steps/step-one.tsx @@ -1,15 +1,15 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, Input, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from "react"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { FormData } from "./schema"; -import { useHandleNextStep } from "./use-handle-next-step"; +import { useFormbitContext } from 'formbit' +import { Button, FormField, Input, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { FormData } from './schema' +import { useHandleNextStep } from './use-handle-next-step' -const useMultipleStepsForm = () => useFormbitContext(); +const useMultipleStepsForm = () => useFormbitContext() export function StepOne() { - return <> + return <>
@@ -23,15 +23,15 @@ export function StepOne() { } function Name() { - const { form, error, write } = useMultipleStepsForm(); + const { form, error, write } = useMultipleStepsForm() - const [handleOnNext] = useHandleNextStep(['name', 'surname']) + const [handleOnNext] = useHandleNextStep(['name', 'surname']) - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) - const ref = useAutoFocus() + const ref = useAutoFocus() - return ( + return ( - ); + ) } function Surname() { - const { form, error, write } = useMultipleStepsForm(); + const { form, error, write } = useMultipleStepsForm() - const [handleOnNext] = useHandleNextStep(['name', 'surname']) + const [handleOnNext] = useHandleNextStep(['name', 'surname']) - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) - return ( + return ( - ) + ) } function Actions() { - const [handleOnNext, isStepInvalid] = useHandleNextStep(['name', 'surname']) + const [handleOnNext, isStepInvalid] = useHandleNextStep(['name', 'surname']) - return ( + return ( - ) + ) } - diff --git a/example/src/forms/multiple-steps/step-three.tsx b/example/src/forms/multiple-steps/step-three.tsx index 0a9c2eb..eb3a06f 100644 --- a/example/src/forms/multiple-steps/step-three.tsx +++ b/example/src/forms/multiple-steps/step-three.tsx @@ -1,15 +1,15 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, Input, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { InputRef } from 'rc-input'; -import { ChangeEvent } from "react"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { useHandleOnSubmit } from "../context/use-handle-on-submit"; -import { FormData } from "./schema"; +import { useFormbitContext } from 'formbit' +import { Button, FormField, Input, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { InputRef } from 'rc-input' +import { ChangeEvent } from 'react' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { useHandleOnSubmit } from '../context/use-handle-on-submit' +import { FormData } from './schema' -const useMultipleStepsForm = () => useFormbitContext(); +const useMultipleStepsForm = () => useFormbitContext() export function StepThree() { - return <> + return <>
@@ -21,15 +21,15 @@ export function StepThree() { } function Email() { - const { form, error, write } = useMultipleStepsForm(); + const { form, error, write } = useMultipleStepsForm() - const [handleOnSubmit] = useHandleOnSubmit(); + const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeEmail = (e: ChangeEvent) => write('email', e.target.value); + const handleOnChangeEmail = (e: ChangeEvent) => write('email', e.target.value) - const ref = useAutoFocus() + const ref = useAutoFocus() - return ( + return ( - ); + ) } function Actions() { - const { form: { __metadata } } = useMultipleStepsForm(); + const { form: { __metadata } } = useMultipleStepsForm() - const handleReset = __metadata?.resetSteps; + const handleReset = __metadata?.resetSteps - const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit(); + const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() - return <> + return <> @@ -59,5 +59,4 @@ function Actions() { Reset - -} \ No newline at end of file +} diff --git a/example/src/forms/multiple-steps/step-two.tsx b/example/src/forms/multiple-steps/step-two.tsx index d579a2b..be33e21 100644 --- a/example/src/forms/multiple-steps/step-two.tsx +++ b/example/src/forms/multiple-steps/step-two.tsx @@ -1,14 +1,13 @@ -import { useFormbitContext } from "formbit"; -import { Button, FormField, InputNumber, SectionTitle } from "@radicalbit/radicalbit-design-system"; -import { useAutoFocus } from "../../helpers/use-autofocus"; -import { FormData } from "./schema"; -import { useHandleNextStep } from "./use-handle-next-step"; +import { useFormbitContext } from 'formbit' +import { Button, FormField, InputNumber, SectionTitle } from '@radicalbit/radicalbit-design-system' +import { useAutoFocus } from '../../helpers/use-autofocus' +import { FormData } from './schema' +import { useHandleNextStep } from './use-handle-next-step' - -const useMultipleStepsForm = () => useFormbitContext(); +const useMultipleStepsForm = () => useFormbitContext() export function StepTwo() { - return <> + return <>
@@ -20,15 +19,15 @@ export function StepTwo() { } function Age() { - const { form, error, write } = useMultipleStepsForm() + const { form, error, write } = useMultipleStepsForm() - const [handleOnNext] = useHandleNextStep(['age']) + const [handleOnNext] = useHandleNextStep(['age']) - const handleOnChangeInputNumber = (value?: number | null) => write('age', value); + const handleOnChangeInputNumber = (value?: number | null) => write('age', value) - const ref = useAutoFocus() + const ref = useAutoFocus() - return ( + return (
- ); + ) } function Name() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useBasicFormContext() const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value); + const handleOnChangeName = (e: ChangeEvent) => write('name', e.target.value) const ref = useAutoFocus() @@ -59,15 +59,15 @@ function Name() { required /> - ); + ) } function Surname() { - const { form, error, write } = useBasicFormContext(); + const { form, error, write } = useBasicFormContext() const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value); + const handleOnChangeSurname = (e: ChangeEvent) => write('surname', e.target.value) return ( @@ -87,7 +87,7 @@ function Age() { const [handleOnSubmit] = useHandleOnSubmit() - const handleOnChangeAge = (value?: number | null) => write('age', value); + const handleOnChangeAge = (value?: number | null) => write('age', value) return ( @@ -105,13 +105,13 @@ function Age() { } function Actions() { - const { resetForm, removeAll, writeAll } = useBasicFormContext(); + const { resetForm, removeAll, writeAll } = useBasicFormContext() const [handleOnSubmit, isSubmitDisabled, isLoading] = useHandleOnSubmit() const handleRemoveAll = () => removeAll(['name', 'surname']) - const handlWriteAll = () => writeAll([['name', 'Johnny'], ['surname','Doey']]) + const handlWriteAll = () => writeAll([['name', 'Johnny'], ['surname', 'Doey']]) return ( <> @@ -138,4 +138,4 @@ function Actions() { ) -} \ No newline at end of file +} diff --git a/example/src/forms/remove-all/schema.ts b/example/src/forms/remove-all/schema.ts index f2c6408..d7bf56e 100644 --- a/example/src/forms/remove-all/schema.ts +++ b/example/src/forms/remove-all/schema.ts @@ -4,4 +4,4 @@ export const schema = yup.object().shape({ name: yup.string().min(2).required(), surname: yup.string().min(2).required(), age: yup.number().min(18).required() -}); \ No newline at end of file +}) diff --git a/example/src/helpers/message.ts b/example/src/helpers/message.ts index 61ed8d1..bc64320 100644 --- a/example/src/helpers/message.ts +++ b/example/src/helpers/message.ts @@ -1,6 +1,6 @@ -import { Message } from "@radicalbit/radicalbit-design-system" +import { Message } from '@radicalbit/radicalbit-design-system' export const success = (json: Record) => { - Message.success('Form Sent') - console.log('Submitted Form', json) -} \ No newline at end of file + Message.success('Form Sent') + console.log('Submitted Form', json) +} diff --git a/example/src/helpers/use-autofocus.ts b/example/src/helpers/use-autofocus.ts index 321feff..6022c19 100644 --- a/example/src/helpers/use-autofocus.ts +++ b/example/src/helpers/use-autofocus.ts @@ -1,12 +1,12 @@ -import { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react' -type InputLike = Pick +type InputLike = Pick export const useAutoFocus = (shouldRefocus?: unknown) => { const ref = useRef(null) useEffect(() => { - ref.current?.focus(); - }, [ref, shouldRefocus]); + ref.current?.focus() + }, [ref, shouldRefocus]) return ref -}; +} diff --git a/example/src/main.tsx b/example/src/main.tsx index 3d7150d..c4fc9bb 100644 --- a/example/src/main.tsx +++ b/example/src/main.tsx @@ -6,5 +6,5 @@ import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( - , + ) diff --git a/example/vite.config.ts b/example/vite.config.ts index 5a33944..b1b5f91 100644 --- a/example/vite.config.ts +++ b/example/vite.config.ts @@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react()] }) diff --git a/package.json b/package.json index 7ee5f14..84cd5de 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "eslint-config-react-app": "^7.0.1", "eslint-config-standard": "^17.1.0", "eslint-config-standard-react": "^13.0.0", + "eslint-plugin-cypress": "^3.3.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^27.9.0", "eslint-plugin-n": "^16.6.2", @@ -78,6 +79,7 @@ "typescript-eslint": "^7.4.0" }, "dependencies": { + "cypress": "^13.12.0", "uuid": "^10.0.0", "yup": "^1.4.0" }, diff --git a/src/use-formbit.ts b/src/use-formbit.ts index e5c018e..f2cabe6 100644 --- a/src/use-formbit.ts +++ b/src/use-formbit.ts @@ -1,7 +1,5 @@ import objLeaves from './helpers/obj-leaves' -import { - useCallback, useRef, useState -} from 'react' +import { useCallback, useRef, useState } from 'react' import { ACTIONS } from './helpers/constants' import { Check, @@ -34,9 +32,9 @@ import { cloneDeep, get, isEmpty, omit, set } from 'lodash' import { v4 as uuidv4 } from 'uuid' type UseFormbitParams = { - initialValues?: Partial, - yup: ValidationSchema -} + initialValues?: Partial; + yup: ValidationSchema; +}; export default ({ initialValues = {}, @@ -69,7 +67,9 @@ export default ({ } setWriter((w) => { - const { form: { __metadata } } = w + const { + form: { __metadata } + } = w const newValues = { ...values, __metadata } return { @@ -83,7 +83,9 @@ export default ({ }) }, []) - const setSchema = useCallback((newSchema: ValidationSchema) => { schemaRef.current = newSchema }, []) + const setSchema = useCallback((newSchema: ValidationSchema) => { + schemaRef.current = newSchema + }, []) const setError: SetError = useCallback((path, value) => { setWriter((w) => { @@ -95,158 +97,192 @@ export default ({ const executeCb = useExecuteCallbacks>(writer, setError) - const writeOrRemove: WriteOrRemove = useCallback(( - path, - value, - { - noLiveValidation = false, - pathsToValidate = [], - successCallback, - errorCallback, - options = {} - } = {}, - action - ) => { - const newUUID = (function getUUID() { - if (successCallback || errorCallback) { - return uuidv4() - } + const writeOrRemove: WriteOrRemove = useCallback( + ( + path, + value, + { + noLiveValidation = false, + pathsToValidate = [], + successCallback, + errorCallback, + options = {} + } = {}, + action + ) => { + const newUUID = (function getUUID() { + if (successCallback || errorCallback) { + return uuidv4() + } - return undefined - })() + return undefined + })() - setWriter((w) => { - const liveValidationPaths = noLiveValidation ? [] : Object.keys(w.liveValidation) - const paths = pathsToValidate.concat(liveValidationPaths) + setWriter((w) => { + const liveValidationPaths = noLiveValidation + ? [] + : Object.keys(w.liveValidation) + const paths = pathsToValidate.concat(liveValidationPaths) + + const form = (function execute() { + switch (action) { + case ACTIONS.write: + return set(cloneDeep(w.form), path, value) - const form = (function execute() { - switch (action) { - case ACTIONS.write: return set(cloneDeep(w.form), path, value) + case ACTIONS.remove: + return omit>(cloneDeep(w.form), path) - case ACTIONS.remove: return omit>(cloneDeep(w.form), path) + default: + return cloneDeep(w.form) + } + })() - default: return cloneDeep(w.form) + const newWriter: Writer> = { + ...w, + form, + isDirty: true } - }()) - const newWriter: Writer> = { ...w, form, isDirty: true } + if (paths.length === 0) { + newUUID && executeCb(newUUID, successCallback) - if (paths.length === 0) { - newUUID && executeCb(newUUID, successCallback) + return newWriter + } - return newWriter - } + // Teardown errors + const cleanErrors = paths.reduce( + (acc, key) => set(acc, key, undefined), + cloneDeep(newWriter.errors) + ) - // Teardown errors - const cleanErrors = paths.reduce( - (acc, key) => set(acc, key, undefined), - cloneDeep(newWriter.errors) - ) + // VALIDATE + const inner = validateSyncAll( + paths, + schemaRef.current, + newWriter.form, + options + ) - // VALIDATE - const inner = validateSyncAll(paths, schemaRef.current, newWriter.form, options) + if (isEmpty(inner)) { + const neww = { ...newWriter, errors: cleanErrors } - if (isEmpty(inner)) { - const neww = { ...newWriter, errors: cleanErrors } + newUUID && executeCb(newUUID, successCallback) - newUUID && executeCb(newUUID, successCallback) + return neww + } - return neww - } + const errors = inner.reduce( + (acc, { path: innerPath, message }) => + innerPath ? set(acc, innerPath, message) : acc, + cleanErrors + ) - const errors = inner.reduce( - (acc, { path: innerPath, message }) => innerPath ? set(acc, innerPath, message) : acc, - cleanErrors - ) + const liveValidation: LiveValidation = inner.reduce( + (acc, { path: innerPath }) => + innerPath ? { ...acc, [innerPath]: true } : acc, + newWriter.liveValidation + ) - const liveValidation: LiveValidation = inner.reduce( - (acc, { path: innerPath }) => innerPath ? ({ ...acc, [innerPath]: true }) : acc, - newWriter.liveValidation - ) + const neww = { ...newWriter, errors, liveValidation } - const neww = { ...newWriter, errors, liveValidation } + newUUID && executeCb(newUUID, errorCallback) - newUUID && executeCb(newUUID, errorCallback) + return neww + }) + }, + [executeCb] + ) - return neww - }) - }, [executeCb]) - - const write: Write = useCallback((path, value, options) => - writeOrRemove(path, value, options, ACTIONS.write), [writeOrRemove]) - - const remove: Remove = useCallback((path, options) => - writeOrRemove(path, undefined, options, ACTIONS.remove), [writeOrRemove]) - - const writeAll: WriteAll = useCallback(( - arr, - { - noLiveValidation = false, - pathsToValidate = [], - successCallback, - errorCallback, - options = {} - } = {} - ) => { - const newUUID = (function getUUID() { - if (successCallback || errorCallback) { - return uuidv4() - } + const write: Write = useCallback( + (path, value, options) => + writeOrRemove(path, value, options, ACTIONS.write), + [writeOrRemove] + ) - return undefined - })() + const remove: Remove = useCallback( + (path, options) => writeOrRemove(path, undefined, options, ACTIONS.remove), + [writeOrRemove] + ) - setWriter((w) => { - const liveValidationPaths = noLiveValidation ? [] : Object.keys(w.liveValidation) - const paths = pathsToValidate.concat(liveValidationPaths) + const writeAll: WriteAll = useCallback( + ( + arr, + { + noLiveValidation = false, + pathsToValidate = [], + successCallback, + errorCallback, + options = {} + } = {} + ) => { + const newUUID = (function getUUID() { + if (successCallback || errorCallback) { + return uuidv4() + } - const form = arr.reduce( - (acc, [key, val]) => set(acc, key, val), - cloneDeep(w.form) - ) + return undefined + })() - const newWriter = { ...w, form, isDirty: true } + setWriter((w) => { + const liveValidationPaths = noLiveValidation + ? [] + : Object.keys(w.liveValidation) + const paths = pathsToValidate.concat(liveValidationPaths) - if (paths.length === 0) { - newUUID && executeCb(newUUID, successCallback) + const form = arr.reduce( + (acc, [key, val]) => set(acc, key, val), + cloneDeep(w.form) + ) - return newWriter - } + const newWriter = { ...w, form, isDirty: true } - // Teardown errors - const cleanErrors = paths.reduce( - (acc, key) => set(acc, key, undefined), - cloneDeep(newWriter.errors) - ) + if (paths.length === 0) { + newUUID && executeCb(newUUID, successCallback) - // VALIDATE ALL - const inner = validateSyncAll(paths, schemaRef.current, newWriter.form, options) + return newWriter + } - if (isEmpty(inner)) { - const neww = { ...newWriter, errors: cleanErrors } + // Teardown errors + const cleanErrors = paths.reduce( + (acc, key) => set(acc, key, undefined), + cloneDeep(newWriter.errors) + ) - newUUID && executeCb(newUUID, successCallback) + // VALIDATE ALL + const inner = validateSyncAll( + paths, + schemaRef.current, + newWriter.form, + options + ) - return neww - } + if (isEmpty(inner)) { + const neww = { ...newWriter, errors: cleanErrors } - const errors = inner.reduce( - (acc, { path = '', message }) => set(acc, path, message), - cleanErrors - ) + newUUID && executeCb(newUUID, successCallback) - const liveValidation: LiveValidation = inner.reduce( - (acc, { path = '' }) => ({ ...acc, [path]: true }), - newWriter.liveValidation - ) + return neww + } + + const errors = inner.reduce( + (acc, { path = '', message }) => set(acc, path, message), + cleanErrors + ) + + const liveValidation: LiveValidation = inner.reduce( + (acc, { path = '' }) => ({ ...acc, [path]: true }), + newWriter.liveValidation + ) - const neww = { ...newWriter, errors, liveValidation } + const neww = { ...newWriter, errors, liveValidation } - newUUID && executeCb(newUUID, errorCallback) + newUUID && executeCb(newUUID, errorCallback) - return neww - }) - }, [executeCb]) + return neww + }) + }, + [executeCb] + ) const removeAll: RemoveAll = useCallback( ( @@ -268,7 +304,9 @@ export default ({ })() setWriter((w) => { - const liveValidationPaths = noLiveValidation ? [] : Object.keys(w.liveValidation) + const liveValidationPaths = noLiveValidation + ? [] + : Object.keys(w.liveValidation) const paths = pathsToValidate.concat(liveValidationPaths) const form = arr.reduce( @@ -288,7 +326,12 @@ export default ({ cloneDeep(newWriter.errors) ) - const inner = validateSyncAll(pathsToValidate, schemaRef.current, newWriter.form, options) + const inner = validateSyncAll( + pathsToValidate, + schemaRef.current, + newWriter.form, + options + ) if (isEmpty(inner)) { const neww = { ...newWriter, errors: cleanErrors } @@ -316,190 +359,197 @@ export default ({ [executeCb] ) - const validate: Validate = useCallback(( - path, - { - successCallback, - errorCallback, - options - } = {} - ) => { - const newUUID = (function getUUID() { - if (successCallback || errorCallback) { - return uuidv4() - } + const validate: Validate = useCallback( + (path, { successCallback, errorCallback, options } = {}) => { + const newUUID = (function getUUID() { + if (successCallback || errorCallback) { + return uuidv4() + } - return undefined - })() + return undefined + })() - setWriter((w) => { - // Teardown errors - const cleanErrors = set(cloneDeep(w.errors), path, undefined) + setWriter((w) => { + // Teardown errors + const cleanErrors = set(cloneDeep(w.errors), path, undefined) + + // VALIDATE + const inner = validateSyncAll( + [path], + schemaRef.current, + w.form, + options + ) + + if (isEmpty(inner)) { + const neww = { ...w, errors: cleanErrors } + + newUUID && executeCb(newUUID, successCallback) + + return neww + } - // VALIDATE - const inner = validateSyncAll([path], schemaRef.current, w.form, options) + const errors = inner.reduce( + (acc, { path: errorPath = '', message }) => + set(acc, errorPath, message), + cleanErrors + ) - if (isEmpty(inner)) { - const neww = { ...w, errors: cleanErrors } + const liveValidation: LiveValidation = inner.reduce( + (acc, { path: errorPath = '' }) => ({ ...acc, [errorPath]: true }), + w.liveValidation + ) - newUUID && executeCb(newUUID, successCallback) + const neww = { ...w, errors, liveValidation } + + newUUID && executeCb(newUUID, errorCallback) return neww - } + }) + }, + [executeCb] + ) - const errors = inner.reduce( - (acc, { path: errorPath = '', message }) => set(acc, errorPath, message), - cleanErrors - ) + const validateAll: ValidateAll = useCallback( + (paths, { successCallback, errorCallback, options } = {}) => { + const newUUID = (function getUUID() { + if (successCallback || errorCallback) { + return uuidv4() + } - const liveValidation: LiveValidation = inner.reduce( - (acc, { path: errorPath = '' }) => ({ ...acc, [errorPath]: true }), - w.liveValidation - ) + return undefined + })() - const neww = { ...w, errors, liveValidation } + setWriter((w) => { + // Teardown errors + const cleanErrors = paths.reduce( + (acc, path) => set(acc, path, undefined), + cloneDeep(w.errors) + ) - newUUID && executeCb(newUUID, errorCallback) + // VALIDATE ALL + const inner = validateSyncAll( + paths, + schemaRef.current, + w.form, + options + ) - return neww - }) - }, [executeCb]) - - const validateAll: ValidateAll = useCallback(( - paths, - { successCallback, errorCallback, options } = {} - ) => { - const newUUID = (function getUUID() { - if (successCallback || errorCallback) { - return uuidv4() - } + if (isEmpty(inner)) { + const neww = { ...w, errors: cleanErrors } - return undefined - })() + newUUID && executeCb(newUUID, successCallback) - setWriter((w) => { - // Teardown errors - const cleanErrors = paths.reduce( - (acc, path) => set(acc, path, undefined), - cloneDeep(w.errors) - ) + return neww + } + + const errors = inner.reduce( + (acc, { path = '', message }) => set(acc, path, message), + cleanErrors + ) - // VALIDATE ALL - const inner = validateSyncAll(paths, schemaRef.current, w.form, options) + const liveValidation: LiveValidation = inner.reduce( + (acc, { path = '' }) => ({ ...acc, [path]: true }), + w.liveValidation + ) - if (isEmpty(inner)) { - const neww = { ...w, errors: cleanErrors } + const neww = { ...w, errors, liveValidation } - newUUID && executeCb(newUUID, successCallback) + newUUID && executeCb(newUUID, errorCallback) return neww - } + }) + }, + [executeCb] + ) - const errors = inner.reduce( - (acc, { path = '', message }) => set(acc, path, message), - cleanErrors - ) + const check: Check> = useCallback( + (json, { successCallback, errorCallback, options } = {}) => { + try { + schema.validateSync(json, { abortEarly: false, ...options }) + successCallback?.(json, writer, setError) - const liveValidation: LiveValidation = inner.reduce( - (acc, { path = '' }) => ({ ...acc, [path]: true }), - w.liveValidation - ) + return undefined + } catch (e) { + if (isValidationError(e)) { + const { inner } = e - const neww = { ...w, errors, liveValidation } + errorCallback?.(json, inner, writer, setError) - newUUID && executeCb(newUUID, errorCallback) + return inner + } - return neww - }) - }, [executeCb]) - - const check: Check> = useCallback(( - json, - { - successCallback, - errorCallback, - options - } = {} - ) => { - try { - schema.validateSync(json, { abortEarly: false, ...options }) - successCallback?.(json, writer, setError) - - return undefined - } catch (e) { - if (isValidationError(e)) { - const { inner } = e - - errorCallback?.(json, inner, writer, setError) - - return inner + return undefined } + }, + [schema, setError, writer] + ) - return undefined - } - }, [schema, setError, writer]) - - const privateValidateForm: PrivateValidateForm> = useCallback(( - successCallback, - errorCallback, - { isDirty: _, options } = {} - ) => { - const newUUID = (function getUUID() { - if (successCallback || errorCallback) { - return uuidv4() - } + const privateValidateForm: PrivateValidateForm> = useCallback( + (successCallback, errorCallback, { isDirty: _, options } = {}) => { + const newUUID = (function getUUID() { + if (successCallback || errorCallback) { + return uuidv4() + } - return undefined - })() + return undefined + })() - setWriter((w) => { - try { - // abortEarly: false as default is to be retrocompatible - schemaRef.current.validateSync(w.form, { abortEarly: false, ...options }) + setWriter((w) => { + try { + // abortEarly: false as default is to be retrocompatible + schemaRef.current.validateSync(w.form, { + abortEarly: false, + ...options + }) - newUUID && executeCb(newUUID, successCallback) + newUUID && executeCb(newUUID, successCallback) - return { ...w, errors: {} } - } catch (e) { - if (!isValidationError(e)) { - // Checking if error is not formbit-related (e.g. a bug inside the successCallback) - console.error(e) - return w - } + return { ...w, errors: {} } + } catch (e) { + if (!isValidationError(e)) { + // Checking if error is not formbit-related (e.g. a bug inside the successCallback) + console.error(e) + return w + } - const { inner } = e + const { inner } = e - const errors = inner.reduce( - (acc, { message, path = '' }) => set(acc, path, message), - {} - ) + const errors = inner.reduce( + (acc, { message, path = '' }) => set(acc, path, message), + {} + ) - const liveValidation: LiveValidation = inner.reduce( - (acc, { path = '' }) => ({ ...acc, [path]: true }), - w.liveValidation - ) + const liveValidation: LiveValidation = inner.reduce( + (acc, { path = '' }) => ({ ...acc, [path]: true }), + w.liveValidation + ) - const newWriter = { ...w, errors, liveValidation } + const newWriter = { ...w, errors, liveValidation } - newUUID && executeCb(newUUID, errorCallback) + newUUID && executeCb(newUUID, errorCallback) - return newWriter - } - }) - }, [executeCb]) + return newWriter + } + }) + }, + [executeCb] + ) - const validateForm: ValidateForm> = useCallback((successCallback, errorCallback, options = {}) => - privateValidateForm( - successCallback, - errorCallback, - { options } - ), [privateValidateForm]) + const validateForm: ValidateForm> = useCallback( + (successCallback, errorCallback, options = {}) => + privateValidateForm(successCallback, errorCallback, { options }), + [privateValidateForm] + ) - const submitForm: SubmitForm = - useCallback((successCallback, errorCallback, options = {}) => { + const submitForm: SubmitForm = useCallback( + (successCallback, errorCallback, options = {}) => { const fn = () => setWriter((w) => ({ ...w, isDirty: false })) - const successCallbackAndClearIsDirty: SuccessCallback> = (a, b) => { + const successCallbackAndClearIsDirty: SuccessCallback> = ( + a, + b + ) => { // Success callback is called only if the form is valid so we can safely cast a as Writer const writer = a as Writer @@ -514,7 +564,9 @@ export default ({ errorCallback, { options } ) - }, [privateValidateForm]) + }, + [privateValidateForm] + ) const resetForm = useCallback(() => { setWriter((w) => ({ @@ -536,7 +588,10 @@ export default ({ return objLeaves(e).some((leaf) => get(e, leaf)) }, [writer.errors]) - const error: ErrorFn = useCallback((path: string) => get(writer.errors, path, undefined), [writer.errors]) + const error: ErrorFn = useCallback( + (path: string) => get(writer.errors, path, undefined), + [writer.errors] + ) const liveValidation: LiveValidationFn = useCallback( (path: string) => get(writer.liveValidation, path, undefined), diff --git a/tsconfig.json b/tsconfig.json index 86679cc..34b1b3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "declarationDir": "./dist/", "target": "es5", "lib": [ + "ES2020", "dom", "dom.iterable", "esnext", @@ -20,7 +21,11 @@ "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve" + "jsx": "preserve", + "types": [ + "dom", + "cypress" + ] }, "include": [ "src", diff --git a/yarn.lock b/yarn.lock index 9229203..bb785b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2203,6 +2203,11 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + "@csstools/normalize.css@*": version "12.1.1" resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-12.1.1.tgz#f0ad221b7280f3fc814689786fd9ee092776ef8f" @@ -2314,6 +2319,38 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== +"@cypress/request@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" + integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + http-signature "~1.3.6" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + performance-now "^2.1.0" + qs "6.10.4" + safe-buffer "^5.1.2" + tough-cookie "^4.1.3" + tunnel-agent "^0.6.0" + uuid "^8.3.2" + +"@cypress/xvfb@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a" + integrity sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q== + dependencies: + debug "^3.1.0" + lodash.once "^4.1.1" + "@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -3374,6 +3411,16 @@ "@types/mime" "*" "@types/node" "*" +"@types/sinonjs__fake-timers@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" + integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== + +"@types/sizzle@^2.3.2": + version "2.3.8" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.8.tgz#518609aefb797da19bf222feb199e8f653ff7627" + integrity sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg== + "@types/sockjs@^0.3.33": version "0.3.36" resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" @@ -3427,6 +3474,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + "@typescript-eslint/eslint-plugin@7.4.0", "@typescript-eslint/eslint-plugin@^5.4.3", "@typescript-eslint/eslint-plugin@^5.5.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" @@ -3811,6 +3865,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -3862,7 +3924,12 @@ anchor-markdown-header@^0.6.0: dependencies: emoji-regex "~10.1.0" -ansi-escapes@^4.2.1, ansi-escapes@^4.3.1: +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -3949,6 +4016,11 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +arch@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" + integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== + arg@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" @@ -4127,11 +4199,28 @@ asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + ast-types-flow@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6" integrity sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + async@^2.6.1: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -4139,7 +4228,7 @@ async@^2.6.1: dependencies: lodash "^4.17.14" -async@^3.2.3: +async@^3.2.0, async@^3.2.3: version "3.2.5" resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== @@ -4191,6 +4280,16 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== + +aws4@^1.8.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.13.0.tgz#d9b802e9bb9c248d7be5f7f5ef178dc3684e9dcc" + integrity sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g== + axe-core@=4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" @@ -4413,11 +4512,23 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== + dependencies: + tweetnacl "^0.14.3" + bfj@^7.0.2: version "7.1.0" resolved "https://registry.yarnpkg.com/bfj/-/bfj-7.1.0.tgz#c5177d522103f9040e1b12980fe8c38cf41d3f8b" @@ -4444,6 +4555,11 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +blob-util@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" + integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== + bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -4553,11 +4669,24 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer@^5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builtin-modules@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" @@ -4585,6 +4714,11 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +cachedir@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.4.0.tgz#7fef9cf7367233d7c88068fe6e34ed0d355a610d" + integrity sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ== + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -4686,6 +4820,11 @@ case-sensitive-paths-webpack-plugin@^2.4.0: resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw== +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== + ccount@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" @@ -4752,6 +4891,11 @@ character-reference-invalid@^1.0.0: resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== +check-more-types@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" + integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== + check-types@^11.2.3: version "11.2.3" resolved "https://registry.yarnpkg.com/check-types/-/check-types-11.2.3.tgz#1ffdf68faae4e941fce252840b1787b8edc93b71" @@ -4794,6 +4938,35 @@ clean-css@^5.2.2: dependencies: source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table3@~0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" + integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -4872,12 +5045,12 @@ colorette@^1.2.1, colorette@^1.2.2: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== -colorette@^2.0.10: +colorette@^2.0.10, colorette@^2.0.16: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -4894,6 +5067,11 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -5037,6 +5215,11 @@ core-js@^3.19.2: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.36.1.tgz#c97a7160ebd00b2de19e62f4bbd3406ab720e578" integrity sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA== +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -5397,11 +5580,66 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +cypress@^13.12.0: + version "13.12.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.12.0.tgz#1a4ea89b7fa6855e32bc02eaf5e25fc45b9e273f" + integrity sha512-udzS2JilmI9ApO/UuqurEwOvThclin5ntz7K0BtnHBs+tg2Bl9QShLISXpSEMDv/u8b6mqdoAdyKeZiSqKWL8g== + dependencies: + "@cypress/request" "^3.0.0" + "@cypress/xvfb" "^1.2.4" + "@types/sinonjs__fake-timers" "8.1.1" + "@types/sizzle" "^2.3.2" + arch "^2.2.0" + blob-util "^2.0.2" + bluebird "^3.7.2" + buffer "^5.7.1" + cachedir "^2.3.0" + chalk "^4.1.0" + check-more-types "^2.24.0" + cli-cursor "^3.1.0" + cli-table3 "~0.6.1" + commander "^6.2.1" + common-tags "^1.8.0" + dayjs "^1.10.4" + debug "^4.3.4" + enquirer "^2.3.6" + eventemitter2 "6.4.7" + execa "4.1.0" + executable "^4.1.1" + extract-zip "2.0.1" + figures "^3.2.0" + fs-extra "^9.1.0" + getos "^3.2.1" + is-ci "^3.0.1" + is-installed-globally "~0.4.0" + lazy-ass "^1.6.0" + listr2 "^3.8.3" + lodash "^4.17.21" + log-symbols "^4.0.0" + minimist "^1.2.8" + ospath "^1.2.2" + pretty-bytes "^5.6.0" + process "^0.11.10" + proxy-from-env "1.0.0" + request-progress "^3.0.0" + semver "^7.5.3" + supports-color "^8.1.1" + tmp "~0.2.1" + untildify "^4.0.0" + yauzl "^2.10.0" + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== + dependencies: + assert-plus "^1.0.0" + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -5438,6 +5676,11 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" +dayjs@^1.10.4: + version "1.11.11" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.11.tgz#dfe0e9d54c5f8b68ccf8ca5f72ac603e7e5ed59e" + integrity sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg== + debug@2.6.9, debug@^2.6.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -5452,7 +5695,7 @@ debug@4, debug@^4.0.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -debug@^3.2.7: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -5778,6 +6021,14 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -5845,6 +6096,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + enhanced-resolve@^5.16.0: version "5.16.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" @@ -5853,6 +6111,14 @@ enhanced-resolve@^5.16.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -6182,6 +6448,13 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" +eslint-plugin-cypress@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-3.3.0.tgz#4ab963193d21ad22aca8379e1d15ba02619ae8db" + integrity sha512-HPHMPzYBIshzJM8wqgKSKHG2p/8R0Gbg4Pb3tcdC9WrmkuqxiKxSKbjunUrajhV5l7gCIFrh1P7C7GuBqH6YuQ== + dependencies: + globals "^13.20.0" + eslint-plugin-es-x@^7.5.0: version "7.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.6.0.tgz#ccee7a4556c0f816d1ae88fd0eea21540e8ccd65" @@ -6537,6 +6810,11 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== + eventemitter3@^4.0.0, eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -6547,6 +6825,21 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +execa@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -6562,6 +6855,13 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +executable@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" + integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== + dependencies: + pify "^2.2.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -6625,11 +6925,32 @@ express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" -extend@^3.0.0: +extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -6694,6 +7015,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + figures@^1.0.1: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -6702,6 +7030,13 @@ figures@^1.0.1: escape-string-regexp "^1.0.5" object-assign "^4.1.0" +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -6851,6 +7186,11 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== + fork-ts-checker-webpack-plugin@^6.5.0: version "6.5.3" resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz#eda2eff6e22476a2688d10661688c47f611b37f3" @@ -6879,6 +7219,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + format@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" @@ -6917,7 +7266,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0, fs-extra@^9.0.1: +fs-extra@^9.0.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -7029,6 +7378,13 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-stream@^5.0.0, get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -7058,6 +7414,20 @@ get-tsconfig@^4.7.0: dependencies: resolve-pkg-maps "^1.0.0" +getos@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" + integrity sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q== + dependencies: + async "^3.2.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== + dependencies: + assert-plus "^1.0.0" + gh-pages@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-2.2.0.tgz#74ebeaca8d2b9a11279dcbd4a39ddfff3e6caa24" @@ -7135,6 +7505,13 @@ glob@^7.1.1, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +global-dirs@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.1.tgz#0c488971f066baceda21447aecb1a8b911d22485" + integrity sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA== + dependencies: + ini "2.0.0" + global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -7156,7 +7533,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0, globals@^13.24.0: +globals@^13.19.0, globals@^13.20.0, globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== @@ -7519,6 +7896,15 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" +http-signature@~1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" + integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== + dependencies: + assert-plus "^1.0.0" + jsprim "^2.0.2" + sshpk "^1.14.1" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -7527,6 +7913,11 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -7581,6 +7972,11 @@ identity-obj-proxy@^3.0.0: dependencies: harmony-reflect "^1.4.6" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^5.1.1: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" @@ -7653,6 +8049,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" @@ -7676,6 +8077,11 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -7806,6 +8212,13 @@ is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== +is-ci@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== + dependencies: + ci-info "^3.2.0" + is-color-stop@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" @@ -7921,6 +8334,14 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-installed-globally@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== + dependencies: + global-dirs "^3.0.0" + is-path-inside "^3.0.2" + is-map@^2.0.2, is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" @@ -7966,7 +8387,7 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.3: +is-path-inside@^3.0.2, is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -8079,11 +8500,16 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" -is-typedarray@^1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-weakmap@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" @@ -8126,6 +8552,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" @@ -8765,6 +9196,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== + jsdom@^16.6.0: version "16.7.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" @@ -8833,7 +9269,7 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@^0.4.0: +json-schema@0.4.0, json-schema@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== @@ -8843,6 +9279,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -8909,6 +9350,16 @@ jsonpointer@^5.0.0: resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== +jsprim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-2.0.2.tgz#77ca23dbcd4135cd364800d22ff82c2185803d4d" + integrity sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + "jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.2.0" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz#41108d2cec408c3453c1bbe8a4aae9e1e2bd8f82" @@ -8969,6 +9420,11 @@ launch-editor@^2.6.0: picocolors "^1.0.0" shell-quote "^1.8.1" +lazy-ass@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" + integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -9005,6 +9461,20 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +listr2@^3.8.3: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.1" + through "^2.3.8" + wrap-ansi "^7.0.0" + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -9094,6 +9564,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.once@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -9109,6 +9584,24 @@ lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-symbols@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + longest-streak@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" @@ -9489,7 +9982,7 @@ mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -9569,6 +10062,11 @@ minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +minimist@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" @@ -9746,7 +10244,7 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npm-run-path@^4.0.1: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -9942,14 +10440,14 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -9989,6 +10487,11 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +ospath@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" + integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -10029,6 +10532,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-queue@^6.3.0: version "6.6.2" resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" @@ -10188,6 +10698,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -10218,7 +10733,7 @@ pidtree@^0.3.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== -pify@^2.0.0, pify@^2.3.0: +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -11210,7 +11725,7 @@ pretty-bytes@^3.0.0: dependencies: number-is-nan "^1.0.0" -pretty-bytes@^5.3.0, pretty-bytes@^5.4.1: +pretty-bytes@^5.3.0, pretty-bytes@^5.4.1, pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== @@ -11256,6 +11771,11 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + promise.series@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" @@ -11307,11 +11827,24 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A== + psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -11322,6 +11855,13 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@6.10.4: + version "6.10.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" + integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== + dependencies: + side-channel "^1.0.4" + qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -11758,6 +12298,13 @@ repeat-string@^1.0.0: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== +request-progress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" + integrity sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg== + dependencies: + throttleit "^1.0.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -11866,6 +12413,14 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -11876,6 +12431,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -12023,6 +12583,13 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rxjs@^7.5.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + sade@^1.7.3: version "1.7.4" resolved "https://registry.yarnpkg.com/sade/-/sade-1.7.4.tgz#ea681e0c65d248d2095c90578c03ca0bb1b54691" @@ -12045,7 +12612,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12064,7 +12631,7 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -12373,6 +12940,24 @@ slash@^4.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -12505,6 +13090,21 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +sshpk@^1.14.1: + version "1.18.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + stable@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" @@ -12867,7 +13467,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: +supports-color@^8.0.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -13053,6 +13653,16 @@ throat@^6.0.1: resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" integrity sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ== +throttleit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.1.tgz#304ec51631c3b770c65c6c6f76938b384000f4d5" + integrity sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ== + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + thunky@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" @@ -13076,6 +13686,11 @@ tiny-glob@^0.2.6: globalyzer "0.1.0" globrex "^0.1.2" +tmp@~0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -13113,6 +13728,16 @@ tough-cookie@^4.0.0: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -13184,6 +13809,11 @@ tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== +tslib@^2.1.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -13191,6 +13821,18 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -13475,6 +14117,11 @@ unquote@~1.1.1: resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + upath@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" @@ -13570,6 +14217,15 @@ vendors@^1.0.0: resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + vfile-message@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" @@ -14061,6 +14717,15 @@ workbox-window@6.6.1: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -14148,6 +14813,14 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 9000dbd4d9a03de552dd42e872fe9e19e63f4d44 Mon Sep 17 00:00:00 2001 From: Miguel de Leon Date: Mon, 1 Jul 2024 15:32:53 +0200 Subject: [PATCH 2/2] fix: delete eslintrc in example --- example/src/.eslintrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 example/src/.eslintrc diff --git a/example/src/.eslintrc b/example/src/.eslintrc deleted file mode 100644 index e69de29..0000000