From c5788f51802d31b0c871cddef52a25a373bf06ce Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:37:26 -0500 Subject: [PATCH 1/9] Exercises 1 - 4 passed all tests --- abi-matthews-gordon/.gitignore | 130 +++ abi-matthews-gordon/01/README.md | 9 + abi-matthews-gordon/01/exercise.test.js | 24 + abi-matthews-gordon/02/README.md | 9 + abi-matthews-gordon/02/exercise.test.js | 28 + abi-matthews-gordon/03/README.md | 8 + abi-matthews-gordon/03/exercise.test.js | 29 + abi-matthews-gordon/04/README.md | 7 + abi-matthews-gordon/04/exercise.test.js | 22 + abi-matthews-gordon/05/README.md | 3 + abi-matthews-gordon/05/exercise.test.js | 18 + abi-matthews-gordon/06/README.md | 29 + abi-matthews-gordon/06/exercise.test.js | 45 + abi-matthews-gordon/07/README.md | 5 + abi-matthews-gordon/07/exercise.test.js | 28 + abi-matthews-gordon/08/README.md | 13 + abi-matthews-gordon/08/exercise.test.js | 43 + abi-matthews-gordon/package-lock.json | 1181 +++++++++++++++++++++++ abi-matthews-gordon/package.json | 16 + abi-matthews-gordon/vitest.config.js | 11 + 20 files changed, 1658 insertions(+) create mode 100644 abi-matthews-gordon/.gitignore create mode 100644 abi-matthews-gordon/01/README.md create mode 100644 abi-matthews-gordon/01/exercise.test.js create mode 100644 abi-matthews-gordon/02/README.md create mode 100644 abi-matthews-gordon/02/exercise.test.js create mode 100644 abi-matthews-gordon/03/README.md create mode 100644 abi-matthews-gordon/03/exercise.test.js create mode 100644 abi-matthews-gordon/04/README.md create mode 100644 abi-matthews-gordon/04/exercise.test.js create mode 100644 abi-matthews-gordon/05/README.md create mode 100644 abi-matthews-gordon/05/exercise.test.js create mode 100644 abi-matthews-gordon/06/README.md create mode 100644 abi-matthews-gordon/06/exercise.test.js create mode 100644 abi-matthews-gordon/07/README.md create mode 100644 abi-matthews-gordon/07/exercise.test.js create mode 100644 abi-matthews-gordon/08/README.md create mode 100644 abi-matthews-gordon/08/exercise.test.js create mode 100644 abi-matthews-gordon/package-lock.json create mode 100644 abi-matthews-gordon/package.json create mode 100644 abi-matthews-gordon/vitest.config.js diff --git a/abi-matthews-gordon/.gitignore b/abi-matthews-gordon/.gitignore new file mode 100644 index 0000000..6a7d6d8 --- /dev/null +++ b/abi-matthews-gordon/.gitignore @@ -0,0 +1,130 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/abi-matthews-gordon/01/README.md b/abi-matthews-gordon/01/README.md new file mode 100644 index 0000000..92136f0 --- /dev/null +++ b/abi-matthews-gordon/01/README.md @@ -0,0 +1,9 @@ +Assignment Ex 01 + +In this exercise, you can expected to check if a positive number is a multiple 5 or a multiple of 9 + + +Here is a visual of what is expected: + +![Ex 01](https://raw.githubusercontent.com/QualityWorksCG/javascript-and-git-automation-bootcamp/main/media/ex-01.png) + diff --git a/abi-matthews-gordon/01/exercise.test.js b/abi-matthews-gordon/01/exercise.test.js new file mode 100644 index 0000000..9dfdb6a --- /dev/null +++ b/abi-matthews-gordon/01/exercise.test.js @@ -0,0 +1,24 @@ +describe('Exercise 01', () => { + test('01. Check if a positive number is a multiple of 5 or 9', () => { + /** + * You are expected to return a boolean value + */ + + function multipleOf5Or9(positiveNumber) { + + // "%" returns the remainder when the first operator is divided by the second operator + if(positiveNumber % 5 == 0 || positiveNumber % 9 == 0){ + return true; + } + return false; + } + + // Test cases + expect(multipleOf5Or9(10)).toBe(true); + expect(multipleOf5Or9(20)).toBe(true); + expect(multipleOf5Or9(21)).toBe(false); + expect(multipleOf5Or9(36)).toBe(true); + expect(multipleOf5Or9(22)).toBe(false); + expect(multipleOf5Or9(23)).toBe(false); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/02/README.md b/abi-matthews-gordon/02/README.md new file mode 100644 index 0000000..39e6845 --- /dev/null +++ b/abi-matthews-gordon/02/README.md @@ -0,0 +1,9 @@ +Assignment Ex 02 + +Create a new string by taking the last 3 letters of an existing string and adding those letters at the back and the front of the new string. + +Bear in mind that the existing string should be more than 3 characters + +Here is a visual of what is expected: + +![Ex 02](https://raw.githubusercontent.com/QualityWorksCG/javascript-and-git-automation-bootcamp/main/media/ex-02.png) \ No newline at end of file diff --git a/abi-matthews-gordon/02/exercise.test.js b/abi-matthews-gordon/02/exercise.test.js new file mode 100644 index 0000000..d6406c3 --- /dev/null +++ b/abi-matthews-gordon/02/exercise.test.js @@ -0,0 +1,28 @@ +describe('02', () => { + it('02. Create a new string from any string by taking the last 3 letters of that string and adding it to the front and back.', () => { + /** + * If the length of the string is less than 3, return false. + * + * Remember we discussed splice() method in the previous exercise. + */ + + function lastThree(str) { + + if(str.length < 3){ + return false; + } + + //the "substring" finds a substring(part of a string) + //therefore, i am finding a part of the string that begins at the length minus three + let result = str.substring(str.length-3); + + return result + str + result; + + } + + // Test cases + expect(lastThree('hello')).toBe('llohellollo'); + expect(lastThree('wor')).toBe('worworwor'); + expect(lastThree('qw')).toBe(false); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/03/README.md b/abi-matthews-gordon/03/README.md new file mode 100644 index 0000000..517b6fe --- /dev/null +++ b/abi-matthews-gordon/03/README.md @@ -0,0 +1,8 @@ +Assignment Ex 03 + +Check between two integers which the difference is 6, the sum of them makes 6 or any of them is 6. + + +Here is a visual of what is expected: + +![Ex 03](https://raw.githubusercontent.com/QualityWorksCG/javascript-and-git-automation-bootcamp/main/media/03-ex.png) diff --git a/abi-matthews-gordon/03/exercise.test.js b/abi-matthews-gordon/03/exercise.test.js new file mode 100644 index 0000000..d9ad1ae --- /dev/null +++ b/abi-matthews-gordon/03/exercise.test.js @@ -0,0 +1,29 @@ +describe('03', () => { + it('03. Check if any of two number is 6, if the sum of them makes 6 or if the difference is 6', () => { + + function isSix(x, y) { + + if (x == 6 || y == 6) { + + return true; + + //"Math.abs" return the absolute value of a number (a number without the negative) + } else if (x + y == 6 || Math.abs(x - y) == 6) { + + return true; + + } + return false; + + } + + // Test cases + expect(isSix(6, 0)).toBe(true); + expect(isSix(0, 6)).toBe(true); + expect(isSix(3, 3)).toBe(true); + expect(isSix(3, 4)).toBe(false); + expect(isSix(3, 9)).toBe(true); + expect(isSix(3, 3)).toBe(true); + expect(isSix(3, 3)).toBe(true); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/04/README.md b/abi-matthews-gordon/04/README.md new file mode 100644 index 0000000..6a14fa0 --- /dev/null +++ b/abi-matthews-gordon/04/README.md @@ -0,0 +1,7 @@ +Assignment Ex 04 + +Check if an array of 3 items, contains a 5 or 2 + +Here is a visual: + +![Ex 04](https://raw.githubusercontent.com/QualityWorksCG/javascript-and-git-automation-bootcamp/main/media/04-ex.png) \ No newline at end of file diff --git a/abi-matthews-gordon/04/exercise.test.js b/abi-matthews-gordon/04/exercise.test.js new file mode 100644 index 0000000..b7896cf --- /dev/null +++ b/abi-matthews-gordon/04/exercise.test.js @@ -0,0 +1,22 @@ +describe('04', () => { + test('Check if an array of 3 items, contains a 5 or 2', () => { + + const arrayIncludes5Or2 = (array) => { + + if (array.includes(5) || array.includes(2)) { + + return true; + } + return false; + } + + // Test cases + expect(arrayIncludes5Or2([1, 2, 3])).toBe(true); + expect(arrayIncludes5Or2([1, 4, 3])).toBe(false); + expect(arrayIncludes5Or2([1, 4, 5])).toBe(true); + expect(arrayIncludes5Or2([1, 4, 6])).toBe(false); + expect(arrayIncludes5Or2([1, 4, 7])).toBe(false); + expect(arrayIncludes5Or2([1, 4, 8])).toBe(false); + expect(arrayIncludes5Or2([1, 4, 9])).toBe(false); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/05/README.md b/abi-matthews-gordon/05/README.md new file mode 100644 index 0000000..04c0698 --- /dev/null +++ b/abi-matthews-gordon/05/README.md @@ -0,0 +1,3 @@ +Assignment Ex 05 + +Take an array of any length and add all elements to return a sum \ No newline at end of file diff --git a/abi-matthews-gordon/05/exercise.test.js b/abi-matthews-gordon/05/exercise.test.js new file mode 100644 index 0000000..b00a829 --- /dev/null +++ b/abi-matthews-gordon/05/exercise.test.js @@ -0,0 +1,18 @@ +describe('05', () => { + it('Take an array of any length and add all elements to return a sum', () => { + + + const sum = (array) => { + // Your code here + + } + + // Test cases + expect(sum([1, 2, 3])).toBe(6); + expect(sum([1, 4, 3, 50, 10])).toBe(68); + expect(sum([1, 4, 5, 6, 7, 8, 9, 10])).toBe(50); + expect(sum([1, 4, 6, 7, 8, 9, 10])).toBe(45); + expect(sum([1, 4, 7, 8, 9, 10])).toBe(39); + expect(sum([1, 4, 8, 9, 10])).toBe(32); + }); +}) \ No newline at end of file diff --git a/abi-matthews-gordon/06/README.md b/abi-matthews-gordon/06/README.md new file mode 100644 index 0000000..1d86941 --- /dev/null +++ b/abi-matthews-gordon/06/README.md @@ -0,0 +1,29 @@ +You just got a new Job as a teacher, and you have a bunch of exam paper to mark. + +From the following list of papers check if each individual one is submitted, and if so send that paper for marking which is a async function. + +```js +const listOfPapers = [ + { + subject: "Math", + wasSubmitted: true, + markPaper: () => { + + } + }, + { + subject: "Geology", + wasSubmitted: true, + markPaper: () => { + + } + }, + { + subject: "Social Studies", + wasSubmitted: false, + markPaper: () => { + + } + }, +] +``` \ No newline at end of file diff --git a/abi-matthews-gordon/06/exercise.test.js b/abi-matthews-gordon/06/exercise.test.js new file mode 100644 index 0000000..7ef6b30 --- /dev/null +++ b/abi-matthews-gordon/06/exercise.test.js @@ -0,0 +1,45 @@ +describe('06', () => { + + // Tip: Use setTimeout to delay the execution of marking + + const listOfPapers = [ + { + subject: "Maths", + wasSubmitted: true, + markPaper: () => { + // add a promise here that resolves after 2 seconds + // and print "Maths paper marked" + } + }, + { + subject: "Geology", + wasSubmitted: true, + markPaper: () => { + // add a promise here that resolves after 2 seconds + // and print "Geology paper marked" + } + }, + { + subject: "Social Studies", + wasSubmitted: false, + markPaper: () => { + // add a promise here that resolves after 2 seconds + // and print "Social Studies paper marked" + } + }, + ] + + it('Check if a paper was submitted, and if yes, wait for it to be marked', async () => { + const spyOnLog = vi.spyOn(console, 'log'); + + // Your code here + + + expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked"); + expect(spyOnLog).toHaveBeenCalledWith("Geology paper marked"); + expect(spyOnLog).not.toHaveBeenCalledWith("Social Studies paper marked"); + expect(listOfPapers[0].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[1].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[2].markPaper()).toBeInstanceOf(Promise); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/07/README.md b/abi-matthews-gordon/07/README.md new file mode 100644 index 0000000..8c0630c --- /dev/null +++ b/abi-matthews-gordon/07/README.md @@ -0,0 +1,5 @@ +An Array has lots of methods that you can use. In the bootcamp you learn about +iterating an array using for keyword, but you can iterate an array with an array method + + +Using the "forEach" array method, print the current element \ No newline at end of file diff --git a/abi-matthews-gordon/07/exercise.test.js b/abi-matthews-gordon/07/exercise.test.js new file mode 100644 index 0000000..9517e93 --- /dev/null +++ b/abi-matthews-gordon/07/exercise.test.js @@ -0,0 +1,28 @@ +describe('07', () => { + test('Using the "forEach" array method, print the current element', () => { + const spyOnLog = vi.spyOn(console, 'log'); + /** + * You are expected to use the forEach array method + * + * You are expected to use the console.log() method + * + * You are expected to use the template literal syntax + * Example: `The current element is ....` + */ + const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + + // Your code here + + // Test cases + expect(spyOnLog).toHaveBeenCalledWith('The current element is 1'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 2'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 3'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 4'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 5'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 6'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 7'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 8'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 9'); + expect(spyOnLog).toHaveBeenCalledWith('The current element is 10'); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/08/README.md b/abi-matthews-gordon/08/README.md new file mode 100644 index 0000000..ff47abe --- /dev/null +++ b/abi-matthews-gordon/08/README.md @@ -0,0 +1,13 @@ +When working with classes, you normally have common traits or properties in your Parent and children from that parent would have specific treats. + +You are the manager of a new Vehicle company + +And you need to create different kind of cars to list in your inventory. + +1. Create a Vehicle parent + - wheels as a property + - bodyType as a property + +2. Create different kind of vehicles from the parent + - each vehicle should have a color + - each vehicle should have a method called "whatIsMyName" that prints the vehicle name \ No newline at end of file diff --git a/abi-matthews-gordon/08/exercise.test.js b/abi-matthews-gordon/08/exercise.test.js new file mode 100644 index 0000000..27f006c --- /dev/null +++ b/abi-matthews-gordon/08/exercise.test.js @@ -0,0 +1,43 @@ +describe('08', () => { + /** + * You are the manager of a new Vehicle company + * + * And you need to create different kind of cars to list in your inventory. + * + * 1. Create a Vehicle parent + * - wheels as a property + * - bodyType as a property + * + * 2. Create different kind of vehicles from the parent + * - each vehicle should have a color + * - each vehicle should have a method called "whatIsMyName" that return the bodyType of the vehicle + * - Example: "I am a sedan" + */ + + test('Create a Vehicle class, and create different type of vehicles that extends', () => { + // Your code here + + + // Expected outcome for the child classes + const car = new Car('red', 4, 'sedan'); + const truck = new Truck('blue', 6, 'pickup'); + const motorcycle = new Motorcycle('green', 2, 'motorcycle'); + + + // Test cases + expect(car.wheels).toBe(4); + expect(car.bodyType).toBe('sedan'); + expect(car.color).toBe('red'); + expect(car.whatIsMyName()).toBe('I am a sedan'); + + expect(truck.wheels).toBe(6); + expect(truck.bodyType).toBe('pickup'); + expect(truck.color).toBe('blue'); + expect(truck.whatIsMyName()).toBe('I am a pickup'); + + expect(motorcycle.wheels).toBe(2); + expect(motorcycle.bodyType).toBe('motorcycle'); + expect(motorcycle.color).toBe('green'); + expect(motorcycle.whatIsMyName()).toBe('I am a motorcycle'); + }); +}); \ No newline at end of file diff --git a/abi-matthews-gordon/package-lock.json b/abi-matthews-gordon/package-lock.json new file mode 100644 index 0000000..f192f80 --- /dev/null +++ b/abi-matthews-gordon/package-lock.json @@ -0,0 +1,1181 @@ +{ + "name": "javascript-and-git-workbook", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "javascript-and-git-workbook", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "dotenv": "^16.0.3", + "vitest": "^0.24.3" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.12.tgz", + "integrity": "sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz", + "integrity": "sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==" + }, + "node_modules/@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/node": { + "version": "18.11.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.3.tgz", + "integrity": "sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==" + }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "engines": { + "node": "*" + } + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.12.tgz", + "integrity": "sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.15.12", + "@esbuild/linux-loong64": "0.15.12", + "esbuild-android-64": "0.15.12", + "esbuild-android-arm64": "0.15.12", + "esbuild-darwin-64": "0.15.12", + "esbuild-darwin-arm64": "0.15.12", + "esbuild-freebsd-64": "0.15.12", + "esbuild-freebsd-arm64": "0.15.12", + "esbuild-linux-32": "0.15.12", + "esbuild-linux-64": "0.15.12", + "esbuild-linux-arm": "0.15.12", + "esbuild-linux-arm64": "0.15.12", + "esbuild-linux-mips64le": "0.15.12", + "esbuild-linux-ppc64le": "0.15.12", + "esbuild-linux-riscv64": "0.15.12", + "esbuild-linux-s390x": "0.15.12", + "esbuild-netbsd-64": "0.15.12", + "esbuild-openbsd-64": "0.15.12", + "esbuild-sunos-64": "0.15.12", + "esbuild-windows-32": "0.15.12", + "esbuild-windows-64": "0.15.12", + "esbuild-windows-arm64": "0.15.12" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz", + "integrity": "sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz", + "integrity": "sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz", + "integrity": "sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz", + "integrity": "sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz", + "integrity": "sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz", + "integrity": "sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz", + "integrity": "sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz", + "integrity": "sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz", + "integrity": "sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz", + "integrity": "sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz", + "integrity": "sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz", + "integrity": "sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz", + "integrity": "sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz", + "integrity": "sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz", + "integrity": "sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz", + "integrity": "sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz", + "integrity": "sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz", + "integrity": "sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz", + "integrity": "sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz", + "integrity": "sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "engines": { + "node": "*" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/local-pkg": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", + "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/postcss": { + "version": "8.4.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", + "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "2.78.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", + "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-literal": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-0.4.2.tgz", + "integrity": "sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw==", + "dependencies": { + "acorn": "^8.8.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tinybench": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz", + "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==" + }, + "node_modules/tinypool": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.0.tgz", + "integrity": "sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/vite": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz", + "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==", + "dependencies": { + "esbuild": "^0.15.9", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "less": "*", + "sass": "*", + "stylus": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.24.3.tgz", + "integrity": "sha512-aM0auuPPgMSstWvr851hB74g/LKaKBzSxcG3da7ejfZbx08Y21JpZmbmDYrMTCGhVZKqTGwzcnLMwyfz2WzkhQ==", + "dependencies": { + "@types/chai": "^4.3.3", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "chai": "^4.3.6", + "debug": "^4.3.4", + "local-pkg": "^0.4.2", + "strip-literal": "^0.4.2", + "tinybench": "^2.3.0", + "tinypool": "^0.3.0", + "tinyspy": "^1.0.2", + "vite": "^3.0.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": ">=v14.16.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@vitest/browser": "*", + "@vitest/ui": "*", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + } + }, + "dependencies": { + "@esbuild/android-arm": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.12.tgz", + "integrity": "sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz", + "integrity": "sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw==", + "optional": true + }, + "@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==" + }, + "@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "requires": { + "@types/chai": "*" + } + }, + "@types/node": { + "version": "18.11.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.3.tgz", + "integrity": "sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A==" + }, + "acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "^4.0.0" + } + }, + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + }, + "esbuild": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.12.tgz", + "integrity": "sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng==", + "requires": { + "@esbuild/android-arm": "0.15.12", + "@esbuild/linux-loong64": "0.15.12", + "esbuild-android-64": "0.15.12", + "esbuild-android-arm64": "0.15.12", + "esbuild-darwin-64": "0.15.12", + "esbuild-darwin-arm64": "0.15.12", + "esbuild-freebsd-64": "0.15.12", + "esbuild-freebsd-arm64": "0.15.12", + "esbuild-linux-32": "0.15.12", + "esbuild-linux-64": "0.15.12", + "esbuild-linux-arm": "0.15.12", + "esbuild-linux-arm64": "0.15.12", + "esbuild-linux-mips64le": "0.15.12", + "esbuild-linux-ppc64le": "0.15.12", + "esbuild-linux-riscv64": "0.15.12", + "esbuild-linux-s390x": "0.15.12", + "esbuild-netbsd-64": "0.15.12", + "esbuild-openbsd-64": "0.15.12", + "esbuild-sunos-64": "0.15.12", + "esbuild-windows-32": "0.15.12", + "esbuild-windows-64": "0.15.12", + "esbuild-windows-arm64": "0.15.12" + } + }, + "esbuild-android-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz", + "integrity": "sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==", + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz", + "integrity": "sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA==", + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz", + "integrity": "sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q==", + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz", + "integrity": "sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw==", + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz", + "integrity": "sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw==", + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz", + "integrity": "sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g==", + "optional": true + }, + "esbuild-linux-32": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz", + "integrity": "sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA==", + "optional": true + }, + "esbuild-linux-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz", + "integrity": "sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA==", + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz", + "integrity": "sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A==", + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz", + "integrity": "sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ==", + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz", + "integrity": "sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A==", + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz", + "integrity": "sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg==", + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz", + "integrity": "sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA==", + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz", + "integrity": "sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww==", + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz", + "integrity": "sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w==", + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz", + "integrity": "sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw==", + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz", + "integrity": "sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg==", + "optional": true + }, + "esbuild-windows-32": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz", + "integrity": "sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw==", + "optional": true + }, + "esbuild-windows-64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz", + "integrity": "sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA==", + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz", + "integrity": "sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA==", + "optional": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "local-pkg": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", + "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==" + }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "requires": { + "get-func-name": "^2.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "postcss": { + "version": "8.4.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", + "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==", + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "rollup": { + "version": "2.78.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", + "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "requires": { + "fsevents": "~2.3.2" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, + "strip-literal": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-0.4.2.tgz", + "integrity": "sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw==", + "requires": { + "acorn": "^8.8.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "tinybench": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz", + "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==" + }, + "tinypool": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.0.tgz", + "integrity": "sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==" + }, + "tinyspy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==" + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, + "vite": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz", + "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==", + "requires": { + "esbuild": "^0.15.9", + "fsevents": "~2.3.2", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + } + }, + "vitest": { + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.24.3.tgz", + "integrity": "sha512-aM0auuPPgMSstWvr851hB74g/LKaKBzSxcG3da7ejfZbx08Y21JpZmbmDYrMTCGhVZKqTGwzcnLMwyfz2WzkhQ==", + "requires": { + "@types/chai": "^4.3.3", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "chai": "^4.3.6", + "debug": "^4.3.4", + "local-pkg": "^0.4.2", + "strip-literal": "^0.4.2", + "tinybench": "^2.3.0", + "tinypool": "^0.3.0", + "tinyspy": "^1.0.2", + "vite": "^3.0.0" + } + } + } +} diff --git a/abi-matthews-gordon/package.json b/abi-matthews-gordon/package.json new file mode 100644 index 0000000..a024e2c --- /dev/null +++ b/abi-matthews-gordon/package.json @@ -0,0 +1,16 @@ +{ + "name": "javascript-and-git-workbook", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "vitest run", + "exercise": "node ../setup/scripts.js" + }, + "author": "Dimitri Harding", + "license": "ISC", + "dependencies": { + "dotenv": "^16.0.3", + "vitest": "^0.24.3" + } +} diff --git a/abi-matthews-gordon/vitest.config.js b/abi-matthews-gordon/vitest.config.js new file mode 100644 index 0000000..8c5659b --- /dev/null +++ b/abi-matthews-gordon/vitest.config.js @@ -0,0 +1,11 @@ +import { defineConfig, configDefaults } from 'vitest/config' + +export default defineConfig({ + test: { + include: [...configDefaults.include, '**/*.{activity}.js'], + exclude: [...configDefaults.exclude], + globals: true, + silent: false, + setupFiles: ['../setup'], + } +}) \ No newline at end of file From beceadba8e0d15a36f41bd85e88e355574cb0012 Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 17:33:07 -0500 Subject: [PATCH 2/9] Exercises 5 passed all tests --- abi-matthews-gordon/05/exercise.test.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/abi-matthews-gordon/05/exercise.test.js b/abi-matthews-gordon/05/exercise.test.js index b00a829..bd9effc 100644 --- a/abi-matthews-gordon/05/exercise.test.js +++ b/abi-matthews-gordon/05/exercise.test.js @@ -2,9 +2,27 @@ describe('05', () => { it('Take an array of any length and add all elements to return a sum', () => { + // const sum = (array) => { + + // let total = 0; + + // for (let i = 0; i < array.length; i++) { + + // total += array[i]; + // } + + // return total; + // } + const sum = (array) => { - // Your code here + const total = array.reduce((sumKeeper, value) => { + + return sumKeeper + value; + + }, 0); + + return total; } // Test cases From 76055d13fcc90519819ec521805d59521fb6ea6a Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 17:44:45 -0500 Subject: [PATCH 3/9] Exercises 5 passed all 3 tests --- abi-matthews-gordon/05/exercise.test.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/abi-matthews-gordon/05/exercise.test.js b/abi-matthews-gordon/05/exercise.test.js index bd9effc..01ae114 100644 --- a/abi-matthews-gordon/05/exercise.test.js +++ b/abi-matthews-gordon/05/exercise.test.js @@ -1,7 +1,7 @@ describe('05', () => { it('Take an array of any length and add all elements to return a sum', () => { - + //first attempt uses a regular for loop // const sum = (array) => { // let total = 0; @@ -12,8 +12,11 @@ describe('05', () => { // } // return total; - // } + // } + + //second attempt uses the reduce method to iterate over the array + //it is also optimized for performance const sum = (array) => { const total = array.reduce((sumKeeper, value) => { @@ -25,6 +28,20 @@ describe('05', () => { return total; } + + // //third & simplier attempt uses a for..of loop to iterate over the array + // const sum = (array) => { + + // let total = 0; + + // for(const value of array){ + + // total += value; + // } + // return total; + // } + + // Test cases expect(sum([1, 2, 3])).toBe(6); expect(sum([1, 4, 3, 50, 10])).toBe(68); From 681ec2d6ecab0ee33af641584ebb9b7598186fd5 Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:34:08 -0500 Subject: [PATCH 4/9] Exercises 6 passed all tests --- abi-matthews-gordon/06/exercise.test.js | 58 ++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/abi-matthews-gordon/06/exercise.test.js b/abi-matthews-gordon/06/exercise.test.js index 7ef6b30..961ea3a 100644 --- a/abi-matthews-gordon/06/exercise.test.js +++ b/abi-matthews-gordon/06/exercise.test.js @@ -7,8 +7,20 @@ describe('06', () => { subject: "Maths", wasSubmitted: true, markPaper: () => { + // add a promise here that resolves after 2 seconds // and print "Maths paper marked" + return new Promise((resolve, reject) => { + + setTimeout(() => resolve("Math paper marked"), 2000); + + }).then( + + function(result){ + + console.log(result); + } + ); } }, { @@ -17,6 +29,17 @@ describe('06', () => { markPaper: () => { // add a promise here that resolves after 2 seconds // and print "Geology paper marked" + return new Promise((resolve, reject) => { + + setTimeout(() => resolve("Geology paper marked"), 2000); + + }).then( + + function(result){ + + console.log(result); + } + ); } }, { @@ -25,6 +48,17 @@ describe('06', () => { markPaper: () => { // add a promise here that resolves after 2 seconds // and print "Social Studies paper marked" + return new Promise((resolve, reject) => { + + setTimeout(() => resolve("Social Studies paper marked"), 2000); + + }).then( + + function(result){ + + console.log(result); + } + ); } }, ] @@ -32,14 +66,24 @@ describe('06', () => { it('Check if a paper was submitted, and if yes, wait for it to be marked', async () => { const spyOnLog = vi.spyOn(console, 'log'); - // Your code here + for(let paper of listOfPapers){ + + if(paper.wasSubmitted){ + + paper.markPaper(); + } + } + + setTimeout(() => { + + expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked"); + expect(spyOnLog).toHaveBeenCalledWith("Geology paper marked"); + expect(spyOnLog).not.toHaveBeenCalledWith("Social Studies paper marked"); + expect(listOfPapers[0].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[1].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[2].markPaper()).toBeInstanceOf(Promise); + }, 2050); //given more time to ensure it doesn't run before the code it's waiting on - expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked"); - expect(spyOnLog).toHaveBeenCalledWith("Geology paper marked"); - expect(spyOnLog).not.toHaveBeenCalledWith("Social Studies paper marked"); - expect(listOfPapers[0].markPaper()).toBeInstanceOf(Promise); - expect(listOfPapers[1].markPaper()).toBeInstanceOf(Promise); - expect(listOfPapers[2].markPaper()).toBeInstanceOf(Promise); }); }); \ No newline at end of file From 9fc5e56be7a062b16e4e7ff9468eaf4e58e3f1b6 Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:00:26 -0500 Subject: [PATCH 5/9] Exercises 7 passed all tests --- abi-matthews-gordon/07/exercise.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abi-matthews-gordon/07/exercise.test.js b/abi-matthews-gordon/07/exercise.test.js index 9517e93..b7fa5aa 100644 --- a/abi-matthews-gordon/07/exercise.test.js +++ b/abi-matthews-gordon/07/exercise.test.js @@ -11,7 +11,11 @@ describe('07', () => { */ const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - // Your code here + array.forEach( (currentValue) => { + + console.log(`The current element is ${currentValue}`); + }) + // Test cases expect(spyOnLog).toHaveBeenCalledWith('The current element is 1'); From 74898f57fc6c74392a17d114c87b1e2f7a845bf8 Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:34:46 -0500 Subject: [PATCH 6/9] Exercises 8 passed all tests --- abi-matthews-gordon/08/exercise.test.js | 82 +++++++++++++++++++------ 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/abi-matthews-gordon/08/exercise.test.js b/abi-matthews-gordon/08/exercise.test.js index 27f006c..e14fb79 100644 --- a/abi-matthews-gordon/08/exercise.test.js +++ b/abi-matthews-gordon/08/exercise.test.js @@ -15,29 +15,73 @@ describe('08', () => { */ test('Create a Vehicle class, and create different type of vehicles that extends', () => { - // Your code here + class Vehicle { - // Expected outcome for the child classes - const car = new Car('red', 4, 'sedan'); - const truck = new Truck('blue', 6, 'pickup'); - const motorcycle = new Motorcycle('green', 2, 'motorcycle'); + constructor(wheels, bodyType) { + this.wheels = wheels; + this.bodyType = bodyType; + } + } + class Car extends Vehicle { - // Test cases - expect(car.wheels).toBe(4); - expect(car.bodyType).toBe('sedan'); - expect(car.color).toBe('red'); - expect(car.whatIsMyName()).toBe('I am a sedan'); + constructor(color, wheels, bodyType){ + super(wheels, bodyType); + this.color = color; + } - expect(truck.wheels).toBe(6); - expect(truck.bodyType).toBe('pickup'); - expect(truck.color).toBe('blue'); - expect(truck.whatIsMyName()).toBe('I am a pickup'); + whatIsMyName(){ + return "I am a " + this.bodyType; + } + } - expect(motorcycle.wheels).toBe(2); - expect(motorcycle.bodyType).toBe('motorcycle'); - expect(motorcycle.color).toBe('green'); - expect(motorcycle.whatIsMyName()).toBe('I am a motorcycle'); - }); + class Truck extends Vehicle { + + constructor(color, wheels, bodyType){ + super(wheels, bodyType); + this.color = color; + } + + whatIsMyName(){ + return "I am a " + this.bodyType; + } + } + + class Motorcycle extends Vehicle { + + constructor(color, wheels, bodyType){ + super(wheels, bodyType); + this.color = color; + } + + whatIsMyName(){ + return "I am a " + this.bodyType; + } + } + + + + // Expected outcome for the child classes + const car = new Car('red', 4, 'sedan'); + const truck = new Truck('blue', 6, 'pickup'); + const motorcycle = new Motorcycle('green', 2, 'motorcycle'); + + + // Test cases + expect(car.wheels).toBe(4); + expect(car.bodyType).toBe('sedan'); + expect(car.color).toBe('red'); + expect(car.whatIsMyName()).toBe('I am a sedan'); + + expect(truck.wheels).toBe(6); + expect(truck.bodyType).toBe('pickup'); + expect(truck.color).toBe('blue'); + expect(truck.whatIsMyName()).toBe('I am a pickup'); + + expect(motorcycle.wheels).toBe(2); + expect(motorcycle.bodyType).toBe('motorcycle'); + expect(motorcycle.color).toBe('green'); + expect(motorcycle.whatIsMyName()).toBe('I am a motorcycle'); + }); }); \ No newline at end of file From 989f7c1350df9e0106fa7eeffa20f66cc050421d Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:43:14 -0500 Subject: [PATCH 7/9] All test passed --- abi-matthews-gordon/08/exercise.test.js | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/abi-matthews-gordon/08/exercise.test.js b/abi-matthews-gordon/08/exercise.test.js index e14fb79..a6873b2 100644 --- a/abi-matthews-gordon/08/exercise.test.js +++ b/abi-matthews-gordon/08/exercise.test.js @@ -26,62 +26,62 @@ describe('08', () => { class Car extends Vehicle { - constructor(color, wheels, bodyType){ + constructor(color, wheels, bodyType) { super(wheels, bodyType); this.color = color; } - whatIsMyName(){ + whatIsMyName() { return "I am a " + this.bodyType; } } class Truck extends Vehicle { - constructor(color, wheels, bodyType){ + constructor(color, wheels, bodyType) { super(wheels, bodyType); this.color = color; } - whatIsMyName(){ + whatIsMyName() { return "I am a " + this.bodyType; } } class Motorcycle extends Vehicle { - constructor(color, wheels, bodyType){ + constructor(color, wheels, bodyType) { super(wheels, bodyType); this.color = color; } - whatIsMyName(){ + whatIsMyName() { return "I am a " + this.bodyType; } } - // Expected outcome for the child classes - const car = new Car('red', 4, 'sedan'); - const truck = new Truck('blue', 6, 'pickup'); - const motorcycle = new Motorcycle('green', 2, 'motorcycle'); + // Expected outcome for the child classes + const car = new Car('red', 4, 'sedan'); + const truck = new Truck('blue', 6, 'pickup'); + const motorcycle = new Motorcycle('green', 2, 'motorcycle'); - // Test cases - expect(car.wheels).toBe(4); - expect(car.bodyType).toBe('sedan'); - expect(car.color).toBe('red'); - expect(car.whatIsMyName()).toBe('I am a sedan'); + // Test cases + expect(car.wheels).toBe(4); + expect(car.bodyType).toBe('sedan'); + expect(car.color).toBe('red'); + expect(car.whatIsMyName()).toBe('I am a sedan'); - expect(truck.wheels).toBe(6); - expect(truck.bodyType).toBe('pickup'); - expect(truck.color).toBe('blue'); - expect(truck.whatIsMyName()).toBe('I am a pickup'); + expect(truck.wheels).toBe(6); + expect(truck.bodyType).toBe('pickup'); + expect(truck.color).toBe('blue'); + expect(truck.whatIsMyName()).toBe('I am a pickup'); - expect(motorcycle.wheels).toBe(2); - expect(motorcycle.bodyType).toBe('motorcycle'); - expect(motorcycle.color).toBe('green'); - expect(motorcycle.whatIsMyName()).toBe('I am a motorcycle'); - }); + expect(motorcycle.wheels).toBe(2); + expect(motorcycle.bodyType).toBe('motorcycle'); + expect(motorcycle.color).toBe('green'); + expect(motorcycle.whatIsMyName()).toBe('I am a motorcycle'); + }); }); \ No newline at end of file From 14427cc6209f20bdb351d10935a0f14cfedc377a Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Mon, 31 Oct 2022 13:09:17 -0500 Subject: [PATCH 8/9] whatIsMyName method moved to parent class --- abi-matthews-gordon/06/exercise.test.js | 1 - abi-matthews-gordon/08/exercise.test.js | 21 ++++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/abi-matthews-gordon/06/exercise.test.js b/abi-matthews-gordon/06/exercise.test.js index 961ea3a..d6b1ab5 100644 --- a/abi-matthews-gordon/06/exercise.test.js +++ b/abi-matthews-gordon/06/exercise.test.js @@ -7,7 +7,6 @@ describe('06', () => { subject: "Maths", wasSubmitted: true, markPaper: () => { - // add a promise here that resolves after 2 seconds // and print "Maths paper marked" return new Promise((resolve, reject) => { diff --git a/abi-matthews-gordon/08/exercise.test.js b/abi-matthews-gordon/08/exercise.test.js index a6873b2..e1152eb 100644 --- a/abi-matthews-gordon/08/exercise.test.js +++ b/abi-matthews-gordon/08/exercise.test.js @@ -22,6 +22,10 @@ describe('08', () => { this.wheels = wheels; this.bodyType = bodyType; } + + whatIsMyName() { + return "I am a " + this.bodyType; + } } class Car extends Vehicle { @@ -29,11 +33,7 @@ describe('08', () => { constructor(color, wheels, bodyType) { super(wheels, bodyType); this.color = color; - } - - whatIsMyName() { - return "I am a " + this.bodyType; - } + } } class Truck extends Vehicle { @@ -41,11 +41,7 @@ describe('08', () => { constructor(color, wheels, bodyType) { super(wheels, bodyType); this.color = color; - } - - whatIsMyName() { - return "I am a " + this.bodyType; - } + } } class Motorcycle extends Vehicle { @@ -54,14 +50,9 @@ describe('08', () => { super(wheels, bodyType); this.color = color; } - - whatIsMyName() { - return "I am a " + this.bodyType; - } } - // Expected outcome for the child classes const car = new Car('red', 4, 'sedan'); const truck = new Truck('blue', 6, 'pickup'); From bbf71dbfda947bafbae9c61229daa0b2011dc613 Mon Sep 17 00:00:00 2001 From: Abi Matthews-Gordon <60277772+AbiMatthews-Gordon@users.noreply.github.com> Date: Mon, 31 Oct 2022 13:51:58 -0500 Subject: [PATCH 9/9] await method added to markPaper --- abi-matthews-gordon/06/exercise.test.js | 61 +++++++++++++------------ 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/abi-matthews-gordon/06/exercise.test.js b/abi-matthews-gordon/06/exercise.test.js index d6b1ab5..41cfb34 100644 --- a/abi-matthews-gordon/06/exercise.test.js +++ b/abi-matthews-gordon/06/exercise.test.js @@ -11,15 +11,16 @@ describe('06', () => { // and print "Maths paper marked" return new Promise((resolve, reject) => { - setTimeout(() => resolve("Math paper marked"), 2000); + setTimeout(() => resolve("Maths paper marked"), 2000); - }).then( + }); + // .then( - function(result){ + // function(result){ - console.log(result); - } - ); + // console.log(result); + // } + // ); } }, { @@ -32,13 +33,14 @@ describe('06', () => { setTimeout(() => resolve("Geology paper marked"), 2000); - }).then( + }); + // .then( - function(result){ + // function(result){ - console.log(result); - } - ); + // console.log(result); + // } + // ); } }, { @@ -51,13 +53,14 @@ describe('06', () => { setTimeout(() => resolve("Social Studies paper marked"), 2000); - }).then( + }); + // .then( - function(result){ + // function(result){ - console.log(result); - } - ); + // console.log(result); + // } + // ); } }, ] @@ -65,24 +68,26 @@ describe('06', () => { it('Check if a paper was submitted, and if yes, wait for it to be marked', async () => { const spyOnLog = vi.spyOn(console, 'log'); - for(let paper of listOfPapers){ + for (let paper of listOfPapers) { - if(paper.wasSubmitted){ + if (paper.wasSubmitted) { - paper.markPaper(); + let result = await paper.markPaper(); + + console.log(result); } } - setTimeout(() => { - - expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked"); - expect(spyOnLog).toHaveBeenCalledWith("Geology paper marked"); - expect(spyOnLog).not.toHaveBeenCalledWith("Social Studies paper marked"); - expect(listOfPapers[0].markPaper()).toBeInstanceOf(Promise); - expect(listOfPapers[1].markPaper()).toBeInstanceOf(Promise); - expect(listOfPapers[2].markPaper()).toBeInstanceOf(Promise); + //setTimeout(() => { + + expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked"); + expect(spyOnLog).toHaveBeenCalledWith("Geology paper marked"); + expect(spyOnLog).not.toHaveBeenCalledWith("Social Studies paper marked"); + expect(listOfPapers[0].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[1].markPaper()).toBeInstanceOf(Promise); + expect(listOfPapers[2].markPaper()).toBeInstanceOf(Promise); - }, 2050); //given more time to ensure it doesn't run before the code it's waiting on + //}, 2050); //given more time to ensure it doesn't run before the code it's waiting on }); }); \ No newline at end of file