From 1aec857bb02e12e9aa8299bcac9b9cc12e6ba33e Mon Sep 17 00:00:00 2001 From: Aliaksei Mazheika Date: Tue, 22 Aug 2023 17:05:13 +0100 Subject: [PATCH] Update project configuration (#39) * Updated project structure * Updated folder name --- .editorconfig | 2 +- .eslintrc.js | 3 - .github/workflows/editorconfig.yml | 29 +-- .github/workflows/lint.yml | 25 +-- .github/workflows/unit_tests.yml | 27 +-- README.md | 14 +- babel.config.js | 4 +- jest.config.js | 2 +- package.json | 3 +- solution-explanation.md | 15 -- src/App.vue | 64 +++--- src/assets/styles/global.scss | 33 +-- src/components/base/BaseBtn.vue | 95 ++++----- src/components/base/BaseCheckboxGroup.vue | 193 ++++++++--------- src/components/bottom-bar/BottomBar.vue | 145 ++++++------- src/components/bottom-bar/SelectionsBlock.vue | 176 ++++++++-------- .../bottom-bar/SelectionsBlockSelection.vue | 87 ++++---- src/components/top-bar/SearchField.vue | 118 +++++------ src/components/top-bar/TopBar.vue | 132 ++++++------ .../truck-elements/CombinationsTable.vue | 175 ++++++++++++++++ .../truck-elements/FoundedTruckElements.vue | 63 ++++++ .../truck-elems/CombinationsTable.vue | 181 ---------------- .../truck-elems/FoundedTruckElems.vue | 68 ------ src/configs/http.js | 2 +- src/main.js | 6 +- src/store/actions.js | 26 ++- src/store/getters.js | 12 +- src/store/index.js | 8 +- src/store/mutations.js | 37 ++-- src/store/state.js | 17 +- src/utils/helpers.js | 8 +- tests/unit/store/getters.spec.js | 54 ++--- tests/unit/store/mutations.spec.js | 198 +++++++++--------- vue.config.js | 6 +- yarn.lock | 151 ++++++++++++- 35 files changed, 1118 insertions(+), 1061 deletions(-) delete mode 100644 solution-explanation.md create mode 100644 src/components/truck-elements/CombinationsTable.vue create mode 100644 src/components/truck-elements/FoundedTruckElements.vue delete mode 100644 src/components/truck-elems/CombinationsTable.vue delete mode 100644 src/components/truck-elems/FoundedTruckElems.vue diff --git a/.editorconfig b/.editorconfig index e65ed6f..18fda66 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,7 @@ root = true [*.{js,vue}] indent_style = tab -indent_size = 4 +indent_size = 2 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true diff --git a/.eslintrc.js b/.eslintrc.js index a3b4d93..372e0a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,9 +7,7 @@ module.exports = { 'array-bracket-spacing': 'off', 'array-callback-return': 'off', 'arrow-parens': ['error', 'as-needed'], - 'brace-style': ['error', 'stroustrup'], 'class-methods-use-this': 'off', - 'comma-dangle': ['error', 'never'], 'consistent-return': 'off', 'func-names': ['error', 'as-needed'], 'function-paren-newline': 'off', @@ -19,7 +17,6 @@ module.exports = { 'import/prefer-default-export': 'off', 'import/no-cycle': 'off', 'indent': 'off', - 'key-spacing': ['error', { 'align': { 'on': 'colon', 'beforeColon': true, 'afterColon': true } }], 'linebreak-style': 'off', 'no-console': process.env.NODE_ENV === 'production' ? ['error', { allow: ['error'] }] : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml index 8143be6..4c07ffb 100644 --- a/.github/workflows/editorconfig.yml +++ b/.github/workflows/editorconfig.yml @@ -1,23 +1,24 @@ -name: EditorConfig +name: EditorConfig check -on: - push: - branches: - - master +on: ['push'] jobs: - lint: + editorconfig-check: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [12.x] steps: - - uses: actions/checkout@v2 - - uses: borales/actions-yarn@v2.0.0 + - uses: actions/checkout@v3 + + - name: Set Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Run install + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: install - - uses: borales/actions-yarn@v2.0.0 + + - name: Run unit tests + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: editorconfig:check diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f27310..1ed5fea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,23 +1,24 @@ name: Linting -on: - push: - branches: - - master +on: ['push'] jobs: lint: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [12.x] steps: - - uses: actions/checkout@v2 - - uses: borales/actions-yarn@v2.0.0 + - uses: actions/checkout@v3 + + - name: Set Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Run install + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: install - - uses: borales/actions-yarn@v2.0.0 + + - name: Run Lint + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: lint diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index cc6bae2..ec54fd0 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -1,23 +1,24 @@ name: Unit tests -on: - push: - branches: - - master +on: ['push'] jobs: - lint: + unit-tests: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [12.x] steps: - - uses: actions/checkout@v2 - - uses: borales/actions-yarn@v2.0.0 + - uses: actions/checkout@v3 + + - name: Set Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Run install + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: install - - uses: borales/actions-yarn@v2.0.0 + + - name: Run unit tests + uses: borales/actions-yarn@v4 with: - node-version: ${{ matrix.node-version }} cmd: test:unit diff --git a/README.md b/README.md index eea1f5a..243a108 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,19 @@ [![](https://github.com/alexmozheyko/truck-configurator/workflows/Linting/badge.svg)](https://github.com/alexmozheyko/truck-configurator/actions?query=workflow%3ALinting) [![](https://github.com/alexmozheyko/truck-configurator/workflows/EditorConfig/badge.svg)](https://github.com/alexmozheyko/truck-configurator/actions?query=workflow%3AEditorConfig) -### A prototype of solution that helps the engineers to visualize which components can be combined in accordance with sales department. -#### For solution explanations please visit [Solution explanation file](./solution-explanation.md) +## Description +To search for the necessary truck elements (external or internal), type a keyword in the search bar at the top of the screen. +When user selects at least one of the results presented in the table, the `Your selection` section appears at the bottom of the page. It is possible to delete any of the selected elements or all at once (note, that the `Your selection` section is hidden if there are no selected elements). + +The `View combinations` button enabled only if at least one internal and external element are selected (i.e. combinations can be made). When user clicks on `View combinations` button, a confirmation modal appears in accordance with the task. + +After clicking on `View combinations` button, user redirects to a page with possible combinations, which are shown in a table. +If combinations between the selected elements are not possible, the notification `No combinations found` appears. The search field on this page is blocked because search can only be done on the `Landing page`. + +On this page, user can also delete one or more selected items. After each deletion, possible combinations are updated to show relevant data. If user deletes the last selected item, he returns to the `Landing page`. He can also get back to the `Landing page` by clicking on the `Back` button. + +> The application is build using Vue.js (Vuex) and Bootstrap. It is fully mobile responsive and covered by unit tests. ## Build / run guide: diff --git a/babel.config.js b/babel.config.js index 98b0a6c..edcb05f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,5 @@ module.exports = { presets: [ - '@vue/cli-plugin-babel/preset' - ] + '@vue/cli-plugin-babel/preset', + ], }; diff --git a/jest.config.js b/jest.config.js index c69f142..344335a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,3 @@ module.exports = { - preset: '@vue/cli-plugin-unit-jest' + preset: '@vue/cli-plugin-unit-jest', }; diff --git a/package.json b/package.json index ff6946c..d7b6cbd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "truck-configurator", - "version": "1.0.0", + "version": "1.1.0", "private": true, + "author": "Aliaksei Mazheika", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", diff --git a/solution-explanation.md b/solution-explanation.md deleted file mode 100644 index 5602ae3..0000000 --- a/solution-explanation.md +++ /dev/null @@ -1,15 +0,0 @@ -# Solution explanation - -To search for the necessary truck elements (external or internal), type a keyword in the search bar at the top of the screen. -When user selects at least one of the results presented in the table, the `Your selection` section appears at the bottom of the page. It is possible to delete any of the selected elements or all at once (note, that the `Your selection` section is hidden if there are no selected elements). - -The `View combinations` button enabled only if at least one internal and external element are selected (i.e. combinations can be made). When user clicks on `View combinations` button, a confirmation modal appears in accordance with the task. - -> Business value of this confirmation modal raises questions: usually such a modal is shown if any irreversible actions are performed. In this case, there is no irreversible action: user can return to the previous page without losing data. Therefore, modal can be abandoned in future releases. - -After clicking on `View combinations` button, user redirects to a page with possible combinations, which are shown in a table. -If combinations between the selected elements are not possible, the notification `No combinations found` appears. The search field on this page is blocked because search can only be done on the `Landing page`. - -On this page, user can also delete one or more selected items. After each deletion, possible combinations are updated to show relevant data. If user deletes the last selected item, he returns to the `Landing page`. He can also get back to the `Landing page` by clicking on the `Back` button. - -> The application is build using Vue.js (Vuex) and Bootstrap. It is fully mobile responsive and covered by unit tests. diff --git a/src/App.vue b/src/App.vue index 26c150c..b26379a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,40 +12,38 @@ diff --git a/src/assets/styles/global.scss b/src/assets/styles/global.scss index b96962e..a38e4e1 100644 --- a/src/assets/styles/global.scss +++ b/src/assets/styles/global.scss @@ -1,25 +1,26 @@ // Color variables -$primary : #4b95d2; -$secondary : #dbdcdf; -$danger : #e84950; -$dark : #303c49; +$primary: #4b95d2; +$secondary: #dbdcdf; +$danger: #e84950; +$dark: #303c49; -@import 'node_modules/bootstrap/scss/bootstrap'; -@import 'node_modules/bootstrap-vue/src/index.scss'; +@import "node_modules/bootstrap/scss/bootstrap"; +@import "node_modules/bootstrap-vue/src/index.scss"; // Global variables :root { - --topbar-height: 8rem; + --topbar-height: 8rem; - @media (max-width: 576px) { - --topbar-height: 6rem; - } + @media (max-width: 576px) { + --topbar-height: 6rem; + } } -html, body { - height : 100%; - width : 100%; - font-family : 'Open Sans', sans-serif; - font-size : 16px; - overflow : hidden; +html, +body { + height: 100%; + width: 100%; + font-family: "Open Sans", sans-serif; + font-size: 16px; + overflow: hidden; } diff --git a/src/components/base/BaseBtn.vue b/src/components/base/BaseBtn.vue index 4818fc8..85cb1ef 100644 --- a/src/components/base/BaseBtn.vue +++ b/src/components/base/BaseBtn.vue @@ -1,66 +1,59 @@ diff --git a/src/components/base/BaseCheckboxGroup.vue b/src/components/base/BaseCheckboxGroup.vue index bd796e1..2859580 100644 --- a/src/components/base/BaseCheckboxGroup.vue +++ b/src/components/base/BaseCheckboxGroup.vue @@ -1,15 +1,12 @@ diff --git a/src/components/bottom-bar/BottomBar.vue b/src/components/bottom-bar/BottomBar.vue index c5efeec..9e27e0a 100644 --- a/src/components/bottom-bar/BottomBar.vue +++ b/src/components/bottom-bar/BottomBar.vue @@ -1,118 +1,101 @@ diff --git a/src/components/bottom-bar/SelectionsBlock.vue b/src/components/bottom-bar/SelectionsBlock.vue index 13e988b..b2623b9 100644 --- a/src/components/bottom-bar/SelectionsBlock.vue +++ b/src/components/bottom-bar/SelectionsBlock.vue @@ -1,30 +1,30 @@ diff --git a/src/components/bottom-bar/SelectionsBlockSelection.vue b/src/components/bottom-bar/SelectionsBlockSelection.vue index b1e831d..0456151 100644 --- a/src/components/bottom-bar/SelectionsBlockSelection.vue +++ b/src/components/bottom-bar/SelectionsBlockSelection.vue @@ -2,70 +2,65 @@
{{ title }} - + close
diff --git a/src/components/top-bar/SearchField.vue b/src/components/top-bar/SearchField.vue index 2a13d5b..4456c70 100644 --- a/src/components/top-bar/SearchField.vue +++ b/src/components/top-bar/SearchField.vue @@ -1,11 +1,11 @@ diff --git a/src/components/top-bar/TopBar.vue b/src/components/top-bar/TopBar.vue index 3e04f7b..5864391 100644 --- a/src/components/top-bar/TopBar.vue +++ b/src/components/top-bar/TopBar.vue @@ -1,11 +1,7 @@ diff --git a/src/components/truck-elements/CombinationsTable.vue b/src/components/truck-elements/CombinationsTable.vue new file mode 100644 index 0000000..fdd6852 --- /dev/null +++ b/src/components/truck-elements/CombinationsTable.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/components/truck-elements/FoundedTruckElements.vue b/src/components/truck-elements/FoundedTruckElements.vue new file mode 100644 index 0000000..2b9f71c --- /dev/null +++ b/src/components/truck-elements/FoundedTruckElements.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/components/truck-elems/CombinationsTable.vue b/src/components/truck-elems/CombinationsTable.vue deleted file mode 100644 index b1cc6e9..0000000 --- a/src/components/truck-elems/CombinationsTable.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - diff --git a/src/components/truck-elems/FoundedTruckElems.vue b/src/components/truck-elems/FoundedTruckElems.vue deleted file mode 100644 index cbe1312..0000000 --- a/src/components/truck-elems/FoundedTruckElems.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/src/configs/http.js b/src/configs/http.js index dc568be..94a045e 100644 --- a/src/configs/http.js +++ b/src/configs/http.js @@ -1,5 +1,5 @@ import axios from 'axios'; export const HTTP = axios.create({ - baseURL: 'http://localhost:8081/api/truck-elements/' + baseURL: 'http://localhost:8081/api/truck-elements/', }); diff --git a/src/main.js b/src/main.js index 529da4d..0439a98 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ -import Vue from 'vue'; +import Vue from 'vue'; import BootstrapVue from 'bootstrap-vue'; -import App from './App.vue'; +import App from './App.vue'; import store from './store'; import 'material-design-icons/iconfont/material-icons.css'; @@ -13,5 +13,5 @@ Vue.config.productionTip = false; new Vue({ store, - render: h => h(App) + render: h => h(App), }).$mount('#app'); diff --git a/src/store/actions.js b/src/store/actions.js index 8368320..80a4ef0 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -1,31 +1,31 @@ import { HTTP } from '@/configs/http'; const actions = { - async readInternalTruckElems({ commit, state }) { + async readInternalTruckElements({ commit, state }) { const { searchQuery } = state; if (!(searchQuery && searchQuery.length)) { - commit('fillInternalElems'); + commit('fillInternalElements'); return; } + try { const { data } = await HTTP.get(`internal/${ searchQuery }`); - commit('fillInternalElems', data); + commit('fillInternalElements', data); return data; - } - catch (errors) { + } catch (errors) { throw errors; } }, - async readExternalTruckElems({ commit, state }) { + async readExternalTruckElements({ commit, state }) { const { searchQuery } = state; if (!(searchQuery && searchQuery.length)) { - commit('fillExternalElems'); + commit('fillExternalElements'); return; } @@ -33,29 +33,27 @@ const actions = { try { const { data } = await HTTP.get(`external/${ searchQuery }`); - commit('fillExternalElems', data); + commit('fillExternalElements', data); return data; - } - catch (errors) { + } catch (errors) { throw errors; } }, async readPossibleCombinations({ commit, state }) { try { - const { data } = await HTTP.post('possible-combinations', state.selectedElems); + const { data } = await HTTP.post('possible-combinations', state.selectedElements); commit('fillCombinations', data); commit('updateSearchQuery'); commit('updateCombinationsPageState', true); return data; - } - catch (errors) { + } catch (errors) { throw errors; } - } + }, }; export default actions; diff --git a/src/store/getters.js b/src/store/getters.js index 5f814a6..dc8586e 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,17 +1,15 @@ const getters = { - selectedTruckElems({ selectedElems = {} }) { + selectedTruckElements({ selectedElements = {} }) { return function getElements(isExternal = false) { - return isExternal - ? selectedElems.externalElements - : selectedElems.internalElements; + return isExternal ? selectedElements.externalElements : selectedElements.internalElements; }; }, - selectedTruckElemsLength({ selectedElems = {} }) { - const { externalElements, internalElements } = selectedElems; + selectedTruckElementsLength({ selectedElements = {} }) { + const { externalElements, internalElements } = selectedElements; return externalElements.length + internalElements.length; - } + }, }; export default getters; diff --git a/src/store/index.js b/src/store/index.js index a79f743..348a601 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,10 +1,10 @@ import Vue from 'vue'; import Vuex from 'vuex'; -import actions from './actions'; -import getters from './getters'; +import actions from './actions'; +import getters from './getters'; import mutations from './mutations'; -import state from './state'; +import state from './state'; Vue.use(Vuex); @@ -12,5 +12,5 @@ export default new Vuex.Store({ actions, getters, mutations, - state + state, }); diff --git a/src/store/mutations.js b/src/store/mutations.js index dbe45cf..7fca499 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -1,27 +1,26 @@ const mutations = { - addTruckElemToSelected({ selectedElems }, { elem = {}, isExternal = false } = {}) { + addTruckElemToSelected({ selectedElements }, { elem = {}, isExternal = false } = {}) { if (isExternal) { - selectedElems.externalElements.push(elem); - } - else { - selectedElems.internalElements.push(elem); + selectedElements.externalElements.push(elem); + } else { + selectedElements.internalElements.push(elem); } }, - clearAllSelections({ selectedElems }) { - selectedElems.externalElements = []; - selectedElems.internalElements = []; + clearAllSelections({ selectedElements }) { + selectedElements.externalElements = []; + selectedElements.internalElements = []; }, - removeTruckElemFromSelected({ selectedElems }, { elem = {}, isExternal = false } = {}) { - const truckElems = isExternal - ? selectedElems.externalElements - : selectedElems.internalElements; + removeTruckElemFromSelected({ selectedElements }, { elem = {}, isExternal = false } = {}) { + const truckElements = isExternal + ? selectedElements.externalElements + : selectedElements.internalElements; - const targetElemIdx = truckElems.findIndex(({ name }) => name === elem.name); + const targetElemIdx = truckElements.findIndex(({ name }) => name === elem.name); if (targetElemIdx !== -1) { - truckElems.splice(targetElemIdx, 1); + truckElements.splice(targetElemIdx, 1); } }, @@ -29,12 +28,12 @@ const mutations = { state.combinations = combinations; }, - fillExternalElems(state, externalElems = []) { - state.externalElems = externalElems; + fillExternalElements(state, externalElements = []) { + state.externalElements = externalElements; }, - fillInternalElems(state, internalElems = []) { - state.internalElems = internalElems; + fillInternalElements(state, internalElements = []) { + state.internalElements = internalElements; }, updateCombinationsPageState(state, isCombinationsPage = false) { @@ -43,7 +42,7 @@ const mutations = { updateSearchQuery(state, searchQuery = '') { state.searchQuery = searchQuery; - } + }, }; export default mutations; diff --git a/src/store/state.js b/src/store/state.js index e70af80..33d4b69 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -1,16 +1,13 @@ const state = { - combinations : [], - externalElems : [], - internalElems : [], - - selectedElems: { - internalElements : [], - externalElements : [] + combinations: [], + externalElements: [], + internalElements: [], + selectedElements: { + internalElements: [], + externalElements: [], }, - searchQuery: '', - - isCombinationsPage: false + isCombinationsPage: false, }; export default state; diff --git a/src/utils/helpers.js b/src/utils/helpers.js index ad4d902..09462f7 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -10,10 +10,10 @@ function capitalizeFirstLetter(string = '') { function showErrorToast() { const content = 'Internal server error'; - const params = { - title : 'Error', - variant : 'danger', - autoHideDelay : 5000 + const params = { + title: 'Error', + variant: 'danger', + autoHideDelay: 5000, }; this.$bvToast.toast(content, params); diff --git a/tests/unit/store/getters.spec.js b/tests/unit/store/getters.spec.js index 5e18aec..85c457e 100644 --- a/tests/unit/store/getters.spec.js +++ b/tests/unit/store/getters.spec.js @@ -1,63 +1,63 @@ /* eslint-disable */ -import getters from '@/store//getters'; +import getters from "@/store//getters"; -/** Test cases on "selectedTruckElems" getter */ -describe('Getters: "selectedTruckElems" getter', () => { - const selectedElems = { - internalElements : [{ name: 'long-range cabin' }], - externalElements : [{ name: 'postal purpose' }] +/** Test cases on "selectedTruckElements" getter */ +describe('Getters: "selectedTruckElements" getter', () => { + const selectedElements = { + internalElements: [{ name: "long-range cabin" }], + externalElements: [{ name: "postal purpose" }] }; - const callGetter = getters.selectedTruckElems({ selectedElems }); + const callGetter = getters.selectedTruckElements({ selectedElements }); - it('returns external truck elements', () => { + it("returns external truck elements", () => { const isExternal = true; const result = callGetter(isExternal); - expect(result).toEqual(selectedElems.externalElements); + expect(result).toEqual(selectedElements.externalElements); }); - it('returns internal truck elements', () => { + it("returns internal truck elements", () => { const isExternal = false; const result = callGetter(isExternal); - expect(result).toEqual(selectedElems.internalElements); + expect(result).toEqual(selectedElements.internalElements); }); - it('returns internal truck elements if no option passed', () => { + it("returns internal truck elements if no option passed", () => { const result = callGetter(); - expect(result).toEqual(selectedElems.internalElements); + expect(result).toEqual(selectedElements.internalElements); }); }); -/** Test cases on "selectedTruckElemsLength" getter */ -describe('Getters: "selectedTruckElemsLength" getter', () => { - const selectedElems = { - internalElements : [{ name: 'long-range cabin' }, { name: 'mid-range cabin' }], - externalElements : [{ name: 'postal purpose' }] +/** Test cases on "selectedTruckElementsLength" getter */ +describe('Getters: "selectedTruckElementsLength" getter', () => { + const selectedElements = { + internalElements: [{ name: "long-range cabin" }, { name: "mid-range cabin" }], + externalElements: [{ name: "postal purpose" }] }; - const { selectedTruckElemsLength } = getters; + const { selectedTruckElementsLength } = getters; - it('returns total length of both truck element types', () => { - const length = selectedTruckElemsLength({ selectedElems }); + it("returns total length of both truck element types", () => { + const length = selectedTruckElementsLength({ selectedElements }); expect(length).toBe(3); }); - it('returns total length if no external elements', () => { - selectedElems.externalElements.length = 0; + it("returns total length if no external elements", () => { + selectedElements.externalElements.length = 0; - const length = selectedTruckElemsLength({ selectedElems }); + const length = selectedTruckElementsLength({ selectedElements }); expect(length).toBe(2); }); - it('returns total length if no both element types', () => { - selectedElems.internalElements.length = 0; + it("returns total length if no both element types", () => { + selectedElements.internalElements.length = 0; - const length = selectedTruckElemsLength({ selectedElems }); + const length = selectedTruckElementsLength({ selectedElements }); expect(length).toBe(0); }); diff --git a/tests/unit/store/mutations.spec.js b/tests/unit/store/mutations.spec.js index 53f9bc3..dfb5fef 100644 --- a/tests/unit/store/mutations.spec.js +++ b/tests/unit/store/mutations.spec.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import mutations from '@/store/mutations'; +import mutations from "@/store/mutations"; /** Test cases on "addTruckElemToSelected" mutation */ describe('Mutations: "addTruckElemToSelected" mutation', () => { @@ -7,65 +7,65 @@ describe('Mutations: "addTruckElemToSelected" mutation', () => { const { addTruckElemToSelected } = mutations; beforeEach(() => { - state.selectedElems = { - internalElements : [{ name: 'long-range cabin' }], - externalElements : [{ name: 'postal purpose' }] + state.selectedElements = { + internalElements: [{ name: "long-range cabin" }], + externalElements: [{ name: "postal purpose" }] }; }); - it('adds internal truck element to selected', () => { - const elem = { name: 'mid-range cabin' }; + it("adds internal truck element to selected", () => { + const elem = { name: "mid-range cabin" }; const isExternal = false; addTruckElemToSelected(state, { elem, isExternal }); - expect(state.selectedElems.internalElements.length).toBe(2); - expect(state.selectedElems.externalElements.length).toBe(1); + expect(state.selectedElements.internalElements.length).toBe(2); + expect(state.selectedElements.externalElements.length).toBe(1); }); - it('adds external truck element to selected', () => { - const elem = { name: 'logistics purpose' }; + it("adds external truck element to selected", () => { + const elem = { name: "logistics purpose" }; const isExternal = true; addTruckElemToSelected(state, { elem, isExternal }); - expect(state.selectedElems.internalElements.length).toBe(1); - expect(state.selectedElems.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(1); + expect(state.selectedElements.externalElements.length).toBe(2); }); it('adds external truck element to selected if no "isExternal" option passed', () => { - const elem = { name: 'construction purpose' }; + const elem = { name: "construction purpose" }; addTruckElemToSelected(state, { elem }); - expect(state.selectedElems.internalElements.length).toBe(2); - expect(state.selectedElems.externalElements.length).toBe(1); + expect(state.selectedElements.internalElements.length).toBe(2); + expect(state.selectedElements.externalElements.length).toBe(1); }); }); /** Test cases on "clearAllSelections" mutation */ describe('Mutations: "clearAllSelections" mutation', () => { const state = { - selectedElems: { - internalElements : [{ name: 'long-range cabin' }], - externalElements : [{ name: 'postal purpose' }] + selectedElements: { + internalElements: [{ name: "long-range cabin" }], + externalElements: [{ name: "postal purpose" }] } }; const { clearAllSelections } = mutations; - it('clears all selected elements', () => { + it("clears all selected elements", () => { clearAllSelections(state); - expect(state.selectedElems.internalElements).toEqual([]); - expect(state.selectedElems.externalElements).toEqual([]); + expect(state.selectedElements.internalElements).toEqual([]); + expect(state.selectedElements.externalElements).toEqual([]); }); - it('clears all selected elements even if they were empty', () => { + it("clears all selected elements even if they were empty", () => { clearAllSelections(state); - expect(state.selectedElems.internalElements).toEqual([]); - expect(state.selectedElems.externalElements).toEqual([]); + expect(state.selectedElements.internalElements).toEqual([]); + expect(state.selectedElements.externalElements).toEqual([]); }); }); @@ -75,73 +75,73 @@ describe('Mutations: "removeTruckElemFromSelected" mutation', () => { const { removeTruckElemFromSelected } = mutations; beforeEach(() => { - state.selectedElems = { - internalElements : [{ name: 'long-range cabin' }, { name: 'mid-range cabin' }], - externalElements : [{ name: 'postal purpose' }, { name: 'construction purpose' }] + state.selectedElements = { + internalElements: [{ name: "long-range cabin" }, { name: "mid-range cabin" }], + externalElements: [{ name: "postal purpose" }, { name: "construction purpose" }] }; }); - it('removes internal truck elem from selected', () => { - const elem = { name: 'long-range cabin' }; + it("removes internal truck elem from selected", () => { + const elem = { name: "long-range cabin" }; const isExternal = false; removeTruckElemFromSelected(state, { elem, isExternal }); - expect(state.selectedElems.externalElements.length).toBe(2); - expect(state.selectedElems.internalElements.length).toBe(1); - expect(state.selectedElems.internalElements[0].name).toBe('mid-range cabin'); + expect(state.selectedElements.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(1); + expect(state.selectedElements.internalElements[0].name).toBe("mid-range cabin"); }); - it('removes external truck elem from selected', () => { - const elem = { name: 'construction purpose' }; + it("removes external truck elem from selected", () => { + const elem = { name: "construction purpose" }; const isExternal = true; removeTruckElemFromSelected(state, { elem, isExternal }); - expect(state.selectedElems.internalElements.length).toBe(2); - expect(state.selectedElems.externalElements.length).toBe(1); - expect(state.selectedElems.externalElements[0].name).toBe('postal purpose'); + expect(state.selectedElements.internalElements.length).toBe(2); + expect(state.selectedElements.externalElements.length).toBe(1); + expect(state.selectedElements.externalElements[0].name).toBe("postal purpose"); }); - it('does nothing with internal elements if passed element not found', () => { - const elem = { name: 'superlong-range cabin' }; + it("does nothing with internal elements if passed element not found", () => { + const elem = { name: "superlong-range cabin" }; const isExternal = false; removeTruckElemFromSelected(state, { elem, isExternal }); - expect(state.selectedElems.externalElements.length).toBe(2); - expect(state.selectedElems.internalElements.length).toBe(2); - expect(state.selectedElems.internalElements[0].name).toBe('long-range cabin'); - expect(state.selectedElems.internalElements[1].name).toBe('mid-range cabin'); + expect(state.selectedElements.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(2); + expect(state.selectedElements.internalElements[0].name).toBe("long-range cabin"); + expect(state.selectedElements.internalElements[1].name).toBe("mid-range cabin"); }); - it('does nothing with external elements if passed element not found', () => { - const elem = { name: 'fake purpose' }; + it("does nothing with external elements if passed element not found", () => { + const elem = { name: "fake purpose" }; const isExternal = true; removeTruckElemFromSelected(state, { elem, isExternal }); - expect(state.selectedElems.externalElements.length).toBe(2); - expect(state.selectedElems.internalElements.length).toBe(2); - expect(state.selectedElems.externalElements[0].name).toBe('postal purpose'); - expect(state.selectedElems.externalElements[1].name).toBe('construction purpose'); + expect(state.selectedElements.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(2); + expect(state.selectedElements.externalElements[0].name).toBe("postal purpose"); + expect(state.selectedElements.externalElements[1].name).toBe("construction purpose"); }); it('removes internal truck elem from selected if no "isExternal" option passed', () => { - const elem = { name: 'long-range cabin' }; + const elem = { name: "long-range cabin" }; removeTruckElemFromSelected(state, { elem }); - expect(state.selectedElems.externalElements.length).toBe(2); - expect(state.selectedElems.internalElements.length).toBe(1); - expect(state.selectedElems.internalElements[0].name).toBe('mid-range cabin'); + expect(state.selectedElements.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(1); + expect(state.selectedElements.internalElements[0].name).toBe("mid-range cabin"); }); - it('does nothing with elements if no parameters passed', () => { + it("does nothing with elements if no parameters passed", () => { removeTruckElemFromSelected(state); - expect(state.selectedElems.externalElements.length).toBe(2); - expect(state.selectedElems.internalElements.length).toBe(2); + expect(state.selectedElements.externalElements.length).toBe(2); + expect(state.selectedElements.internalElements.length).toBe(2); }); }); @@ -153,15 +153,15 @@ describe('Mutations: "fillCombinations" mutation', () => { const { fillCombinations } = mutations; - it('fills combinations with passed value', () => { - const combinations = [{ internal: 'short-range cabin', external: 'postal purpose' }]; + it("fills combinations with passed value", () => { + const combinations = [{ internal: "short-range cabin", external: "postal purpose" }]; fillCombinations(state, combinations); expect(state.combinations).toEqual(combinations); }); - it('rewrites combinations if empty array passed', () => { + it("rewrites combinations if empty array passed", () => { const combinations = []; fillCombinations(state, combinations); @@ -169,8 +169,8 @@ describe('Mutations: "fillCombinations" mutation', () => { expect(state.combinations).toEqual([]); }); - it('fills combinations with empty array if no value', () => { - state.combinations = [{ internal: 'short-range cabin', external: 'postal purpose' }]; + it("fills combinations with empty array if no value", () => { + state.combinations = [{ internal: "short-range cabin", external: "postal purpose" }]; fillCombinations(state); @@ -178,69 +178,69 @@ describe('Mutations: "fillCombinations" mutation', () => { }); }); -/** Test cases on "fillExternalElems" mutation */ -describe('Mutations: "fillExternalElems" mutation', () => { +/** Test cases on "fillExternalElements" mutation */ +describe('Mutations: "fillExternalElements" mutation', () => { const state = { - externalElems: [] + externalElements: [] }; - const { fillExternalElems } = mutations; + const { fillExternalElements } = mutations; - it('fills external elements with passed value', () => { - const externalElems = [{ name: 'construction purpose' }, { name: 'postal purpose' }]; + it("fills external elements with passed value", () => { + const externalElements = [{ name: "construction purpose" }, { name: "postal purpose" }]; - fillExternalElems(state, externalElems); + fillExternalElements(state, externalElements); - expect(state.externalElems).toEqual(externalElems); + expect(state.externalElements).toEqual(externalElements); }); - it('rewrites external elements if empty array passed', () => { - const externalElems = []; + it("rewrites external elements if empty array passed", () => { + const externalElements = []; - fillExternalElems(state, externalElems); + fillExternalElements(state, externalElements); - expect(state.externalElems).toEqual([]); + expect(state.externalElements).toEqual([]); }); - it('fills external elements with empty array if no value', () => { - state.externalElems = [{ name: 'construction purpose' }]; + it("fills external elements with empty array if no value", () => { + state.externalElements = [{ name: "construction purpose" }]; - fillExternalElems(state); + fillExternalElements(state); - expect(state.externalElems).toEqual([]); + expect(state.externalElements).toEqual([]); }); }); -/** Test cases on "fillInternalElems" mutation */ -describe('Mutations: "fillInternalElems" mutation', () => { +/** Test cases on "fillInternalElements" mutation */ +describe('Mutations: "fillInternalElements" mutation', () => { const state = { - internalElems: [] + internalElements: [] }; - const { fillInternalElems } = mutations; + const { fillInternalElements } = mutations; - it('fills external elements with passed value', () => { - const internalElems = [{ name: 'long-range cabin' }, { name: 'short-range cabin' }]; + it("fills external elements with passed value", () => { + const internalElements = [{ name: "long-range cabin" }, { name: "short-range cabin" }]; - fillInternalElems(state, internalElems); + fillInternalElements(state, internalElements); - expect(state.internalElems).toEqual(internalElems); + expect(state.internalElements).toEqual(internalElements); }); - it('rewrites external elements if empty array passed', () => { - const internalElems = []; + it("rewrites external elements if empty array passed", () => { + const internalElements = []; - fillInternalElems(state, internalElems); + fillInternalElements(state, internalElements); - expect(state.internalElems).toEqual([]); + expect(state.internalElements).toEqual([]); }); - it('fills external elements with empty array if no value', () => { - state.internalElems = [{ name: 'long-range cabin' }]; + it("fills external elements with empty array if no value", () => { + state.internalElements = [{ name: "long-range cabin" }]; - fillInternalElems(state); + fillInternalElements(state); - expect(state.internalElems).toEqual([]); + expect(state.internalElements).toEqual([]); }); }); @@ -277,20 +277,20 @@ describe('Mutations: "updateCombinationsPageState" mutation', () => { /** Test cases on "updateSearchQuery" mutation */ describe('Mutations: "updateSearchQuery" mutation', () => { - const state = { searchQuery: '' }; + const state = { searchQuery: "" }; const { updateSearchQuery } = mutations; - it('sets "searchQuery" value (search by internal elems)', () => { - const searchQuery = 'long-range'; + it('sets "searchQuery" value (search by internal elements)', () => { + const searchQuery = "long-range"; updateSearchQuery(state, searchQuery); expect(state.searchQuery).toEqual(searchQuery); }); - it('sets "searchQuery" value (search by external elems)', () => { - const searchQuery = ' purpose'; + it('sets "searchQuery" value (search by external elements)', () => { + const searchQuery = " purpose"; updateSearchQuery(state, searchQuery); @@ -300,6 +300,6 @@ describe('Mutations: "updateSearchQuery" mutation', () => { it('sets "searchQuery" to empty string if no value passed', () => { updateSearchQuery(state); - expect(state.searchQuery).toBe(''); + expect(state.searchQuery).toBe(""); }); }); diff --git a/vue.config.js b/vue.config.js index 1b6eb1a..3c7a00b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,6 @@ module.exports = { devServer: { - port : 8081, - proxy : 'http://localhost:8080' - } + port: 8081, + proxy: 'http://localhost:8080', + }, }; diff --git a/yarn.lock b/yarn.lock index 136251b..12a592c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2392,6 +2392,11 @@ 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.x: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -2680,7 +2685,7 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -2898,6 +2903,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-exists-promise@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/command-exists-promise/-/command-exists-promise-2.0.2.tgz#7beecc4b218299f3c61fa69a4047aa0b36a64a99" + integrity sha512-T6PB6vdFrwnHXg/I0kivM3DqaCGZLjjYSOe0a5WgFKcz1sOnmOeIjnhQPXVXX3QjVbLyTJ85lJkX6lUpukTzaA== + commander@2.17.x: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -3438,6 +3448,13 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -4372,6 +4389,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" + figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -4587,6 +4611,15 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" +fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -4596,6 +4629,13 @@ fs-extra@^7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -4775,6 +4815,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -5649,6 +5694,15 @@ istanbul-reports@^2.2.6: dependencies: html-escaper "^2.0.0" +java-caller@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/java-caller/-/java-caller-2.7.0.tgz#7f1712301143868397a831ffb38994b40f1f74a9" + integrity sha512-ivU1m8AtysCiqjApz04JHSSJzrl+wEFt1jdJZifwN5tuF2ZXiDYHm3Tf3O9t2/7M0M8wupnU445+TR22oOosqQ== + dependencies: + debug "^4.3.4" + fs-extra "^10.1.0" + njre "^0.3.0" + javascript-stringify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-2.0.1.tgz#6ef358035310e35d667c675ed63d3eb7c1aa19e5" @@ -6229,6 +6283,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -6691,7 +6754,7 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -6717,6 +6780,14 @@ minipass-pipeline@^1.2.2: dependencies: minipass "^3.0.0" +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + minipass@^3.0.0, minipass@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" @@ -6724,6 +6795,13 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -6763,6 +6841,13 @@ mkdirp@0.x, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + mkdirp@^1.0.3, mkdirp@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -6785,16 +6870,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + ms@2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -6869,6 +6954,16 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +njre@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/njre/-/njre-0.3.0.tgz#23eb6186525672630d19a458b24cf23332138e05" + integrity sha512-ANkCU7uHWDup2vOX862nG7nDVxwjlmYll/UakBfi3j+NGFMQsAKIVevF9TyUeiV3Wk3qz5HPtDyL+uZwnoEC3Q== + dependencies: + command-exists-promise "^2.0.2" + node-fetch "^2.5.0" + tar "^4.4.8" + yauzl "^2.10.0" + no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" @@ -6889,6 +6984,13 @@ node-cache@^4.1.1: clone "2.x" lodash "^4.17.15" +node-fetch@^2.5.0: + version "2.6.13" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.13.tgz#a20acbbec73c2e09f9007de5cda17104122e0010" + integrity sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^2.6.0: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -7525,6 +7627,11 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +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" @@ -8569,7 +8676,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.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.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.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, 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== @@ -9336,6 +9443,19 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== +tar@^4.4.8: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + tar@^6.0.0: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -9726,6 +9846,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -10328,7 +10453,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -10394,6 +10519,14 @@ yargs@^15.0.0: y18n "^4.0.0" yargs-parser "^18.1.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" + yorkie@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yorkie/-/yorkie-2.0.0.tgz#92411912d435214e12c51c2ae1093e54b6bb83d9"