From 55b70653f142d7490efbfbcd4088e48d4941b449 Mon Sep 17 00:00:00 2001 From: EPortman <169073732+EPortman@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:00:25 -0700 Subject: [PATCH 1/7] solr feature branch - part 1 (#842) --- app/src/store/actions.ts | 77 ++++++++-------------------------------- 1 file changed, 14 insertions(+), 63 deletions(-) diff --git a/app/src/store/actions.ts b/app/src/store/actions.ts index ca52b9767..93cf6d9a2 100644 --- a/app/src/store/actions.ts +++ b/app/src/store/actions.ts @@ -8,7 +8,6 @@ import { Location, NameCheckAnalysisJurisdiction, NameCheckAnalysisType, - NameCheckConflictType, NameCheckErrorType, NrAffiliationErrors, NrRequestActionCodes, @@ -781,38 +780,22 @@ export const setHotjarUserId = ({ commit }, hotjarUserId: string): void => { commit('mutateHotjarUserId', hotjarUserId) } -/** - * Name Check actions - * FUTURE: move these into a factory if converting to composition api - */ -const getMatchesExact = async ( - { commit }, - token: string, - cleanedName: string -): Promise> => { - const exactResp = await NamexServices.axios.get(`${appBaseURL}/exact-match?query=` + cleanedName, { - headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' } - }).catch(() => { - commit('mutateNameCheckErrorAdd', NameCheckErrorType.ERROR_EXACT) - return null - }) - return exactResp?.data ? parseExactNames(exactResp.data) : [] -} - const getMatchesSimilar = async ( { commit }, token: string, - cleanedName: string, - exactNames: Array -): Promise> => { - const synonymResp = await NamexServices.axios.get(`${appBaseURL}/requests/synonymbucket/` + cleanedName + '/*', { + cleanedName: string +): Promise<{ names: Array, exactNames: Array }> => { + const synonymResp = await NamexServices.axios.get(`${appBaseURL}/requests/possible-conflicts/${cleanedName}`, { headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' } }).catch(() => { commit('mutateNameCheckErrorAdd', NameCheckErrorType.ERROR_SIMILAR) return null }) - if (synonymResp?.data) synonymResp.data.exactNames = exactNames || [] - return synonymResp?.data ? parseSynonymNames(synonymResp.data) : [] + + return { + names: synonymResp.data.names || [], + exactNames: synonymResp.data.exactNames || [] + } } const getMatchesRestricted = async ( @@ -821,7 +804,7 @@ const getMatchesRestricted = async ( cleanedName: string ): Promise => { const restrictedResp = await NamexServices.axios.get( - `${appBaseURL}/documents:restricted_words?content=${cleanedName}`, + `${appBaseURL}/documents/restricted-words?content=${cleanedName}`, { headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' } } ).catch(() => { commit('mutateNameCheckErrorAdd', NameCheckErrorType.ERROR_RESTRICTED) @@ -941,13 +924,12 @@ const getQuickSearch = async ( headers: { Authorization: `Basic ${encodedAuth}`, 'content-type': 'application/x-www-form-urlencoded' } }) const token = tokenResp.data.access_token - const exactNames = checks.exact ? await getMatchesExact({ commit }, token, cleanedName.exactMatch) : [] - // pass in exactNames so that we can check for duplicates - const synonymNames = ( + const { names, exactNames } = ( checks.similar - ? await getMatchesSimilar({ commit }, token, cleanedName.synonymMatch, exactNames) - : [] + ? await getMatchesSimilar({ commit }, token, cleanedName.synonymMatch) + : { names: [], exactNames: [] } ) + const parsedRestrictedResp: ParsedRestrictedResponseIF = ( checks.restricted ? await getMatchesRestricted({ commit, getters }, token, cleanedName.restrictedMatch) @@ -956,7 +938,7 @@ const getQuickSearch = async ( return { exactNames: exactNames, - synonymNames: synonymNames, + synonymNames: names, restrictedWords: parsedRestrictedResp.restrictedWords, conditionalWords: parsedRestrictedResp.conditionalWords, conditionalInstructions: parsedRestrictedResp.conditionalInstructions @@ -985,15 +967,6 @@ export const nameCheckClearError = ({ commit }, key: NameCheckErrorType): void = commit('mutateNameCheckErrorClear', key) } -const parseExactNames = (json: { names: [string] }): Array => { - const nameObjs = json?.names || [] - const names = [] - for (let i = 0; i < nameObjs.length; i++) { - names.push({ name: `${nameObjs[i]['name']}`, type: NameCheckConflictType.EXACT }) - } - return names -} - const parseRestrictedWords = ({ getters }, resp: RestrictedResponseIF): ParsedRestrictedResponseIF => { const phrases = resp.restricted_words_conditions const parsedResp: ParsedRestrictedResponseIF = { @@ -1041,28 +1014,6 @@ const parseRestrictedWords = ({ getters }, resp: RestrictedResponseIF): ParsedRe return parsedResp } -const parseSynonymNames = ( - json: { - names: Array, - exactNames: Array - }): Array => { - const duplicateNames = [] - for (let i = 0; i < json.exactNames.length; i++) { - duplicateNames.push(json.exactNames[i].name) - } - const nameObjs = json.names - const names = [] - for (let i = 0; i < nameObjs.length; i++) { - if (nameObjs[i]['name_info']['id']) { - const name = nameObjs[i]['name_info']['name'] - if (!duplicateNames.includes(name)) { - names.push({ name: name, type: NameCheckConflictType.SIMILAR }) - } - } - } - return names -} - export const setDesignation = ({ commit }, designation: string): void => { commit('mutateDesignation', designation) } From ae3f33a5eb060b0751ee42ecef4fccf06676062c Mon Sep 17 00:00:00 2001 From: Hrvoje Fekete Date: Thu, 22 Jan 2026 12:05:47 -0800 Subject: [PATCH 2/7] Feature solr merged (#860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 30381 cleaned up some env keys and fixed breadcrumbs (#843) * - deleted obsolete key VUE_APP_BUSINESSES_URL - app = 5.5.46 - fixed Business Registry URL in Affiliation Error Modal - fixed Staff Dashboard breadcrumb * - updated browserslist --------- Co-authored-by: Severin Beauvais * 30656 Updated LaunchDarkly module to support orgs (#844) * - app version = 5.6.0 - imported latest LD JS client SDK v3.9.0 - updated UpdateUserMixin to create contexts - updated featureFlags module to use contexts * - renamed updateUser -> updateLaunchDarkly - used getter instead of computing KC roles again - combined updateUser + updateLaunchDarkly - renamed featureFlags.ts -> launchDarkly.ts - misc cleanup --------- Co-authored-by: Severin Beauvais * 30554 DBA NR magic link (#846) Co-authored-by: bobby * 29274 Upgraded to Vite (#845) * - misc cleanup - updated babel config file - moved index.html from /public to / - updated index.html - deleted obsolete jest config file - app version = 5.7.0 - updated scripts in package file - deleted obsolete dependencies - added necessary dependencies - recreated pnpm lock file - updated patch to use import.meta - deleted obsolete postcss config file - added robots file - replaced process.env -> import.meta.env - replaced JEST_WORKER_ID -> VITEST - added woff2 fonts - updated font sources in CSS - replaced getBaseUrl with direct sessionstorage.getItem() - fixed some image sources - deleted obsolete payment-utils.ts - changed getConfig to non-async - added vuetify css import - changed v-img to img - deleted unused isJestRunning computed - replaced appBaseURL -> namexApiUrl - added check for valid user/org before callling UpdateLdUser - added BASE_URL to session storage - added NAMEX_API_URL to session storage - updated Vuetify import - deleted appBaseURL export - deleted commented-out console.log - commented out unneeded console.log (for now) - updated unit tests - updated types in tsconfig file - added vite config file - updated vue config file * - fixed v-icon size and color --------- Co-authored-by: Severin Beauvais * Modify README for pnpm version and commands Update pnpm installation and development commands * 30987 Upgraded to Pinia (#847) * - app version = 5.8.0 - installed Pinia dependencies - updated Getter and Action decorators - misc cleanup - created Filing Types enum - created Error interface - created Payment models - removed unneeded await for store actions - converted Vuex Modules to separate stores - created getStores plugin - cleaned up error store - cleaned up payment store - delete env config - deleted obsolete properties from main store state - deleted unneeded stateModel property - refactored actions and mutations into "sub store" - refactored getters into "sub store" - refactored state into "sub store" - created new Pinia main store from sub stores - now call mutations as functions instead of "commit" - misc cleanup / type fixes - moved getXXX in main.ts - attached Vuex store to Vue instance - mocked Vuex store for unit tests - updated misc comments - final commit with store as 3 sub-stores * - changed actions back to exported functions - changed getters back to exported functions - changed state back to exported const - updated store definition - misc fixes and cleanup - updated Reg Search API URL in example env * - changed getNrState to return NrState - cleaned up some typings - changed getNrId to return number * - attached Vuetify to Vue - use current Vuetify instance to get breakpoint * - small vault comment fixes - approve building "vue-demi" to solve "missing export" issue * - fixed "cannot read null key properties" * - updated lockfile - updated pnpm lock file - lock file with pnpm v9 * - added exclude in Vite config --------- Co-authored-by: Severin Beauvais * 31112 define disabled wait time and change priority wait time to Days (#851) * define disabled wait time and change priority wait time to Days * update * lint error * Update * linting * update * 30032 - NR Payments - Renewal Payments do not have option to add Folio Number (#853) * bugfix: Add folio number to RENEW payment when the first payment already had it - bump version to 5.8.3 * chore: Update folio number assignment logic to use PaymentAction.CREATE filter * cleanup * 29381 - xpro name allowed length increased from 40 to 60 (#852) * Update `MRAS_MAX_LENGTH` constant to 60 in new-request constants * version bump * chore: bump version to 5.8.3 * Add new FF for priority wait time tooltip (#855) * 2551 update priority tooltips (#856) * update priority tooltips * Remove unnecessary newline in stats.vue * 29381 - rules and validation updates in name field (#857) * fix: name input rules logic and add xpro validation - add validation/disable button in sub search modal * fix: correct defaultRules return order in name input component * fix: update search button logic and add xpro name validation - Update `isSearchBtnDisabled` logic for button disablement - Add `isValidXproName` getter for XPRO name length validation * chore: bump version to 5.8.6 and remove unused import in search component * fix: adjust max length validation for XPRO name flow - Use dynamic max length based on `isXproFlow` condition. * 31568 - remove Release Notes link from the footer (#858) * Update `MRAS_MAX_LENGTH` constant to 60 in new-request constants * version bump * chore: bump version to 5.8.3 * fix: remove "Release Notes" link from footer and update sbc-common-components patch * build lock with pnpm 9 --------- Co-authored-by: Séverin Beauvais Co-authored-by: Severin Beauvais Co-authored-by: bobdev-94 Co-authored-by: bobby Co-authored-by: eve-git <54647458+eve-git@users.noreply.github.com> --- README.md | 4 +- app/.env.example | 7 +- app/.eslintrc.js | 5 +- app/babel.config.js | 3 - app/devops/vaults.env | 3 +- app/{public => }/index.html | 6 +- app/jest.config.js | 14 - app/package.json | 69 +- .../sbc-common-components@3.0.15-c.patch | 25 +- app/pnpm-lock.yaml | 14819 ++++------------ app/postcss.config.js | 5 - app/public/robots.txt | 2 + app/src/App.vue | 68 +- app/src/assets/fonts/BCSans-Bold.woff2 | Bin 0 -> 234276 bytes app/src/assets/fonts/BCSans-BoldItalic.woff2 | Bin 0 -> 243980 bytes app/src/assets/fonts/BCSans-Italic.woff2 | Bin 0 -> 238396 bytes app/src/assets/fonts/BCSans-Regular.woff2 | Bin 0 -> 231836 bytes app/src/assets/styles/base.scss | 33 +- app/src/assets/styles/layout.scss | 4 +- .../advanced-search-retrieve.vue | 15 +- .../advanced-search/advanced-search-table.vue | 7 +- app/src/components/common/app-title-cols.vue | 5 +- .../components/common/applicant-info-1.vue | 43 +- .../components/common/applicant-info-2.vue | 32 +- .../components/common/applicant-info-3.vue | 42 +- .../components/common/applicant-info-nav.vue | 19 +- app/src/components/common/link-row.vue | 11 +- app/src/components/common/names-capture.vue | 49 +- app/src/components/common/request-details.vue | 9 +- .../components/dialogs/advanced-search.vue | 10 +- .../components/dialogs/affiliation-error.vue | 11 +- app/src/components/dialogs/cancel.vue | 18 +- app/src/components/dialogs/conditions.vue | 9 +- .../dialogs/confirm-name-request.vue | 32 +- .../dialogs/create-business-error.vue | 15 +- app/src/components/dialogs/error.vue | 17 +- .../dialogs/exit-incomplete-payment.vue | 7 +- app/src/components/dialogs/exit.vue | 9 +- app/src/components/dialogs/help-me-choose.vue | 8 +- .../components/dialogs/mras-search-info.vue | 37 +- .../components/dialogs/name-check-issues.vue | 7 +- .../components/dialogs/nr-not-required.vue | 7 +- .../components/dialogs/payment-complete.vue | 22 +- .../dialogs/pick-entity-or-conversion.vue | 38 +- app/src/components/dialogs/receipts.vue | 13 +- app/src/components/dialogs/refund.vue | 18 +- app/src/components/dialogs/renew.vue | 26 +- app/src/components/dialogs/resubmit.vue | 30 +- app/src/components/dialogs/retry.vue | 22 +- .../dialogs/societies-info-dialog.vue | 9 +- app/src/components/dialogs/upgrade.vue | 24 +- .../existing-request-display.vue | 38 +- .../existing-request-edit.vue | 14 +- .../existing-request-search.vue | 29 +- .../invalid-action-message.vue | 9 +- .../existing-request/name-request-details.vue | 14 +- .../existing-request/names-gray-box.vue | 10 +- .../existing-request/nr-approved-gray-box.vue | 9 +- .../lower-info-area/lower-container.vue | 15 +- .../lower-info-area/name-build-info.vue | 8 +- .../lower-info-area/new-and-better-way.vue | 10 +- .../components/new-request/business-fetch.vue | 16 +- .../new-request/business-lookup.vue | 8 +- app/src/components/new-request/constants.ts | 2 +- app/src/components/new-request/grey-box.vue | 25 +- .../components/new-request/main-container.vue | 15 +- .../name-check/name-check-conflicts.vue | 7 +- .../name-check/name-check-tab-content.vue | 5 +- .../new-request/name-check/name-check.vue | 65 +- .../name-check/quick-search-names.vue | 1 - app/src/components/new-request/name-input.vue | 59 +- .../new-request/quick-search-names.vue | 7 +- app/src/components/new-request/search.vue | 25 +- app/src/components/new-request/stats.vue | 69 +- .../entity-cannot-be-auto-analyzed.vue | 33 +- .../submit-request/reserve-submit.vue | 39 +- .../submit-request/submission-tabs.vue | 14 +- .../new-request/submit-request/timeout.vue | 7 +- .../components/payment/payment-confirm.vue | 5 +- app/src/components/payment/payment-utils.ts | 3 - app/src/components/payment/staff-payment.vue | 10 +- app/src/components/tabs.vue | 13 +- app/src/config.ts | 6 + .../payment => enums}/filing-types.ts | 0 app/src/enums/index.ts | 1 + app/src/interfaces/env-config.ts | 3 - app/src/interfaces/error-interface.ts | 4 + app/src/interfaces/index.ts | 3 +- app/src/interfaces/models.ts | 2 +- .../payment-models.ts} | 6 +- app/src/interfaces/state-interface.ts | 8 +- app/src/list-data/designations.ts | 3 +- app/src/main.ts | 31 +- app/src/mixins/action-mixin.ts | 13 +- app/src/mixins/common-mixin.ts | 15 +- app/src/mixins/date-mixin.ts | 8 +- app/src/mixins/displayed-component-mixin.ts | 21 +- app/src/mixins/load-keycloak-roles-mixin.ts | 5 +- app/src/mixins/nr-affiliation-mixin.ts | 24 +- app/src/mixins/payment-mixin.ts | 145 +- app/src/mixins/payment-session-mixin.ts | 2 +- app/src/mixins/search-mixin.ts | 112 +- app/src/mixins/update-user-mixin.ts | 56 +- app/src/modules/error/index.ts | 16 - app/src/modules/error/store/actions.ts | 22 - app/src/modules/error/store/getters.ts | 17 - app/src/modules/error/store/index.ts | 16 - app/src/modules/error/store/mutations.ts | 37 - app/src/modules/error/store/types.ts | 7 - app/src/modules/payment/index.ts | 10 - app/src/modules/payment/store/actions.ts | 65 - app/src/modules/payment/store/getters.ts | 60 - app/src/modules/payment/store/index.ts | 68 - app/src/modules/payment/store/mutations.ts | 60 - app/src/modules/payment/store/types.ts | 49 - app/src/plugins/getConfig.ts | 87 +- app/src/plugins/getStores.ts | 20 + app/src/plugins/index.ts | 3 +- app/src/plugins/interceptors.ts | 2 +- .../{featureFlags.ts => launchDarkly.ts} | 36 +- app/src/plugins/vuetify.ts | 2 +- app/src/resources/breadcrumb-resources.ts | 4 +- app/src/router/router.ts | 9 +- app/src/services/business-lookup-services.ts | 2 +- app/src/services/business-services.ts | 7 +- app/src/services/namex-services.ts | 140 +- app/src/store/actions.ts | 963 +- app/src/store/config.ts | 4 - app/src/store/error-store.ts | 62 + app/src/store/getters.ts | 236 +- app/src/store/index.ts | 40 +- app/src/store/mutations.ts | 282 +- app/src/store/payment-store.ts | 247 + app/src/store/state.ts | 6 +- app/src/store/store.ts | 11 + app/src/views/auth/Signin.vue | 4 +- app/src/views/auth/Signout.vue | 2 +- app/src/views/landing.vue | 19 +- app/tests/setup.ts | 8 +- app/tests/unit/App.spec.ts | 7 +- app/tests/unit/analyze-results.spec.ts | 2 +- app/tests/unit/date-mixin.spec.ts | 4 +- .../unit/dialogs/staff-payment-error.spec.ts | 2 +- app/tests/unit/search.spec.ts | 3 +- app/tsconfig.json | 4 +- app/vite.config.js | 73 + app/vue.config.js | 41 +- 147 files changed, 6233 insertions(+), 13266 deletions(-) rename app/{public => }/index.html (72%) delete mode 100644 app/jest.config.js delete mode 100644 app/postcss.config.js create mode 100644 app/public/robots.txt create mode 100644 app/src/assets/fonts/BCSans-Bold.woff2 create mode 100644 app/src/assets/fonts/BCSans-BoldItalic.woff2 create mode 100644 app/src/assets/fonts/BCSans-Italic.woff2 create mode 100644 app/src/assets/fonts/BCSans-Regular.woff2 delete mode 100644 app/src/components/payment/payment-utils.ts create mode 100644 app/src/config.ts rename app/src/{modules/payment => enums}/filing-types.ts (100%) delete mode 100644 app/src/interfaces/env-config.ts create mode 100644 app/src/interfaces/error-interface.ts rename app/src/{modules/payment/models.ts => interfaces/payment-models.ts} (84%) delete mode 100644 app/src/modules/error/index.ts delete mode 100755 app/src/modules/error/store/actions.ts delete mode 100755 app/src/modules/error/store/getters.ts delete mode 100755 app/src/modules/error/store/index.ts delete mode 100755 app/src/modules/error/store/mutations.ts delete mode 100644 app/src/modules/error/store/types.ts delete mode 100755 app/src/modules/payment/index.ts delete mode 100755 app/src/modules/payment/store/actions.ts delete mode 100755 app/src/modules/payment/store/getters.ts delete mode 100755 app/src/modules/payment/store/index.ts delete mode 100755 app/src/modules/payment/store/mutations.ts delete mode 100644 app/src/modules/payment/store/types.ts create mode 100644 app/src/plugins/getStores.ts rename app/src/plugins/{featureFlags.ts => launchDarkly.ts} (66%) delete mode 100644 app/src/store/config.ts create mode 100644 app/src/store/error-store.ts create mode 100644 app/src/store/payment-store.ts create mode 100644 app/src/store/store.ts create mode 100644 app/vite.config.js diff --git a/README.md b/README.md index a7e7e678a..4b12c53eb 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ ## Project setup ``` -npm install -g pnpm +npm install -g pnpm@9 pnpm install ``` ### Compiles and hot-reloads for development ``` -pnpm run serve +pnpm run dev ``` ### Compiles and minifies for production diff --git a/app/.env.example b/app/.env.example index a65f1327b..6fc434521 100644 --- a/app/.env.example +++ b/app/.env.example @@ -3,7 +3,6 @@ VUE_APP_PATH="/" #vaults web-url VUE_APP_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/" VUE_APP_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/" -VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/" VUE_APP_CORPORATE_ONLINE_URL="https://www.corporateonline.gov.bc.ca" VUE_APP_BUSINESS_DASH_URL="https://dev.business-dashboard.bcregistry.gov.bc.ca/" VUE_APP_BUSINESS_REGISTRY_URL="https://dev.business-registry-dashboard.bcregistry.gov.bc.ca/" @@ -27,7 +26,7 @@ VUE_APP_NAMEX_API_VERSION="/api/v1" VUE_APP_NAMEX_API_KEY= VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca" VUE_APP_STATUS_API_VERSION="/api/v1" -VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-search" +VUE_APP_REGISTRIES_SEARCH_API_URL="https://test.api.connect.gov.bc.ca/registry-search-dev" VUE_APP_REGISTRIES_SEARCH_API_VERSION_2="/api/v2" VUE_APP_REGISTRIES_SEARCH_API_KEY= @@ -40,9 +39,9 @@ VUE_APP_KEYCLOAK_REALM="bcregistry" VUE_APP_KEYCLOAK_CLIENTID="name-requests-web" VUE_APP_AUTH_TOKEN_URL="https://dev.loginproxy.gov.bc.ca/auth/realms/bcregistry/protocol/openid-connect/token" -#vaults webchat +#vaults name-request VUE_APP_HOTJAR_ID="" -VUE_APP_QUICK_SEARCH_PUBLIC_ID="" +VUE_APP_QUICK_SEARCH_PUBLIC_ID="namex-solr-service-account" VUE_APP_QUICK_SEARCH_PUBLIC_SECRET="" #vaults webchat diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 53d4a57e8..33acdc9e5 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -47,10 +47,7 @@ module.exports = { files: [ '**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], - env: { - jest: true - } + ] } ] } diff --git a/app/babel.config.js b/app/babel.config.js index 053075b1a..6925be40b 100644 --- a/app/babel.config.js +++ b/app/babel.config.js @@ -1,6 +1,3 @@ module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ], plugins: ['@babel/plugin-proposal-private-methods'] } diff --git a/app/devops/vaults.env b/app/devops/vaults.env index d8ced22fc..cd9e81721 100644 --- a/app/devops/vaults.env +++ b/app/devops/vaults.env @@ -4,7 +4,6 @@ VUE_APP_PATH=/ #vaults web-url VUE_APP_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL" VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL" -VUE_APP_BUSINESSES_URL="op://web-url/$APP_ENV/business/BUSINESSES_URL" VUE_APP_CORPORATE_ONLINE_URL="op://web-url/$APP_ENV/bcregistry/COLIN_URL" VUE_APP_BUSINESS_DASH_URL="op://web-url/$APP_ENV/business-dash/BUSINESS_DASH_URL" VUE_APP_BUSINESS_REGISTRY_URL="op://web-url/$APP_ENV/business-registry-ui/BUSINESS_REGISTRY_URL" @@ -41,7 +40,7 @@ VUE_APP_KEYCLOAK_REALM="op://keycloak/$APP_ENV/base/KEYCLOAK_REALMNAME" VUE_APP_KEYCLOAK_CLIENTID="op://keycloak/$APP_ENV/name-requests-web/UI_KEYCLOAK_RESOURCE_NAME" VUE_APP_AUTH_TOKEN_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_TOKEN_URL" -#vaults webchat +#vaults name-request VUE_APP_HOTJAR_ID="op://name-request/$APP_ENV/ui/HOTJAR_ID" VUE_APP_QUICK_SEARCH_PUBLIC_ID="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_ID" VUE_APP_QUICK_SEARCH_PUBLIC_SECRET="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_SECRET" diff --git a/app/public/index.html b/app/index.html similarity index 72% rename from app/public/index.html rename to app/index.html index 8a288deb6..72459311a 100644 --- a/app/public/index.html +++ b/app/index.html @@ -4,9 +4,7 @@ - - - + Name Request @@ -17,6 +15,6 @@
- + diff --git a/app/jest.config.js b/app/jest.config.js deleted file mode 100644 index 06918bfbf..000000000 --- a/app/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - globals: { - 'ts-jest': { - diagnostics: false, - isolatedModules: true, - babelConfig: true - } - }, - preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', - setupFiles: ['/tests/setup.ts'], - // notify: true, - // notifyMode: 'always', - transformIgnorePatterns: [] -} diff --git a/app/package.json b/app/package.json index b94f5431e..70b7095cc 100644 --- a/app/package.json +++ b/app/package.json @@ -1,17 +1,19 @@ { "name": "name-request", - "version": "5.5.45", + "version": "5.8.7", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", "scripts": { - "serve": "vue-cli-service serve", - "build": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build", - "test": "vue-cli-service test:unit --verbose --coverage", - "test:unit": "vue-cli-service test:unit --testPathPattern --coverage", - "lint": "vue-cli-service lint", - "lint:nofix": "vue-cli-service lint --no-fix", - "build-check": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build" + "dev": "vite", + "build": "vite build", + "build-check": "vite build", + "preview": "vite preview --port 8080", + "lint": "eslint . --ext js,ts,vue --no-fix", + "test": "vitest run", + "test:unit": "vitest run", + "test:watch": "vitest watch", + "test:coverage": "vitest run --coverage" }, "dependencies": { "@babel/compat-data": "^7.24.4", @@ -25,18 +27,18 @@ "@bcrs-shared-components/web-chat": "2.0.0", "@mdi/font": "^4.9.95", "axios": "^0.27.2", - "babel-plugin-transform-decorators": "^6.24.1", "core-js": "^3.37.0", "http-status-codes": "^1.4.0", - "launchdarkly-js-client-sdk": "^2.24.2", + "launchdarkly-js-client-sdk": "^3.9.0", "lodash": "^4.17.21", + "pinia": "^2.0.35", + "pinia-class": "^0.0.3", "qs": "^6.12.1", "quill": "^2.0.0", "remove-accents": "^0.4.4", "sbc-common-components": "3.0.15-c", - "style-loader": "^1.3.0", - "tslib": "^2.6.2", - "vue": "2.7.10", + "tslib": "^2.8.1", + "vue": "2.7.16", "vue-contenteditable": "^1.0.2", "vue-hotjar": "^1.4.0", "vue-quill-editor": "^3.0.6", @@ -46,49 +48,42 @@ }, "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.18.6", - "@types/jest": "^27.5.2", - "@types/lodash": "^4.17.0", - "@types/node": "^20.12.7", + "@esbuild-plugins/node-modules-polyfill": "0.2.2", + "@pinia/testing": "^0.0.16", + "@types/lodash": "^4.17.7", + "@types/node": "^20.19.18", "@types/sinon": "^10.0.20", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "@volar-plugins/vetur": "latest", - "@vue/cli-plugin-babel": "^5.0.8", - "@vue/cli-plugin-eslint": "^5.0.8", - "@vue/cli-plugin-router": "^5.0.8", - "@vue/cli-plugin-typescript": "^5.0.8", - "@vue/cli-plugin-unit-jest": "^5.0.8", - "@vue/cli-plugin-vuex": "^5.0.8", - "@vue/cli-service": "^5.0.8", + "@vitejs/plugin-vue2": "^2.2.0", "@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-typescript": "^9.1.0", "@vue/test-utils": "^1.3.6", - "@vue/vue2-jest": "^27.0.0", "cross-env": "^7.0.3", "eslint": "~7.32.0", "eslint-plugin-vue": "^8.7.1", "eslint-plugin-vuetify": "^1.1.0", + "jsdom": "^22.1.0", "json-server": "^0.15.1", - "postcss-loader": "^8.1.1", - "sass": "~1.32.13", - "sass-loader": "^10.5.2", + "sass": "~1.59.3", "sinon": "^14.0.2", - "ts-jest": "^27.1.5", "typescript": "4.5.5", - "vue-class-component": "^7.2.6", - "vue-cli-plugin-vuetify": "^2.5.8", + "vite": "4.5.2", + "vite-plugin-environment": "^1.1.3", + "vitest": "0.33.0", + "volar-service-vetur": "^0.0.62", "vue-debounce-decorator": "^1.0.1", "vue-property-decorator": "^9.1.2", - "vue-template-compiler": "2.7.10", - "vuetify-loader": "^1.9.2", + "vue-test-utils-helpers": "git+https://github.com/bcgov/vue-test-utils-helpers.git", "vuex-class": "^0.3.2", - "vuex-module-decorators": "^1.2.0", - "webpack": "~5.78.0", - "webpack-bundle-analyzer": "^3.9.0" + "vuex-module-decorators": "^1.2.0" }, "pnpm": { "patchedDependencies": { "sbc-common-components@3.0.15-c": "patches/sbc-common-components@3.0.15-c.patch" - } + }, + "onlyBuiltDependencies": [ + "vue-demi" + ] } } diff --git a/app/patches/sbc-common-components@3.0.15-c.patch b/app/patches/sbc-common-components@3.0.15-c.patch index 01244b0b4..48cb46b05 100644 --- a/app/patches/sbc-common-components@3.0.15-c.patch +++ b/app/patches/sbc-common-components@3.0.15-c.patch @@ -1,16 +1,27 @@ +diff --git a/src/components/SbcFooter.vue b/src/components/SbcFooter.vue +index 6fa4d2304bce52930cb6ed1007c108ba2dee30b2..15cacbeec27ff058eabaa3feb006416829ebc1d1 100644 +--- a/src/components/SbcFooter.vue ++++ b/src/components/SbcFooter.vue +@@ -4,7 +4,6 @@ +