Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand All @@ -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=

Expand All @@ -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
Expand Down
5 changes: 1 addition & 4 deletions app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ module.exports = {
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
]
}
]
}
3 changes: 0 additions & 3 deletions app/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: ['@babel/plugin-proposal-private-methods']
}
3 changes: 1 addition & 2 deletions app/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions app/public/index.html → app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<!-- Set document.baseURI -->
<base href="<%= BASE_URL %>" target="_self">
<link rel="icon" href="/favicon.png">
<title>Name Request</title>
</head>
<body>
Expand All @@ -17,6 +15,6 @@
</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="module" src="/src/main.ts"></script>
</body>
</html>
14 changes: 0 additions & 14 deletions app/jest.config.js

This file was deleted.

69 changes: 32 additions & 37 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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"
]
}
}
25 changes: 18 additions & 7 deletions app/patches/sbc-common-components@3.0.15-c.patch
Original file line number Diff line number Diff line change
@@ -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 @@
<nav>
<ul>
<li><a href="/">Home</a></li>
- <li><a href="https://www.release-notes.bcregistry.gov.bc.ca" target="_blank">Release Notes</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/disclaimer" target="_blank">Disclaimer</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/privacy" target="_blank">Privacy</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/accessibility" target="_blank">Accessibility</a></li>
diff --git a/src/util/interceptors.ts b/src/util/interceptors.ts
index 4db4ab9c6bc08453cd7448fb0027f8e3e5963ffc..0ceb22186ca02407914a2049df4c1aba72b87102 100644
--- a/src/util/interceptors.ts
index 4db4ab9c6bc08453cd7448fb0027f8e3e5963ffc..8c4b038ac42c0d3d16015c4e0258eae182b89bf0 100644
--- a/src/util/interceptors.ts
+++ b/src/util/interceptors.ts
@@ -5,6 +5,11 @@ import { SessionStorageKeys } from './constants'
@@ -4,6 +4,10 @@ import { SessionStorageKeys } from './constants'

export function addAxiosInterceptors (axiosInstance: AxiosInstance): AxiosInstance {
axiosInstance.interceptors.request.use(config => {
const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)
+ const authGatewayApiKey = process.env.VUE_APP_AUTH_API_KEY
+
+ const authGatewayApiKey = import.meta.env.VUE_APP_AUTH_API_KEY
+ if (authGatewayApiKey && config.url.includes(ConfigHelper.getAuthAPIUrl())) {
+ config.headers['x-apikey'] = authGatewayApiKey
+ }
const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)
if (token) {
config.headers.Authorization = `Bearer ${token}`
}
Loading
Loading