@sbc-connect/nuxt-pay 0.6.7 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @sbc-connect/nuxt-pay
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#203](https://github.com/bcgov/connect-nuxt/pull/203) [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`0d043ed`](https://github.com/bcgov/connect-nuxt/commit/0d043ed037473ff381e0d3ca17065f11ca3b89d2), [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38)]:
12
+ - @sbc-connect/nuxt-auth@0.17.0
13
+
14
+ ## 0.6.8
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies []:
19
+ - @sbc-connect/nuxt-auth@0.16.7
20
+
3
21
  ## 0.6.7
4
22
 
5
23
  ### Patch Changes
@@ -1,28 +1,33 @@
1
- export default defineNuxtPlugin((nuxtApp) => {
2
- const rtc = nuxtApp.$config.public
3
- const payApiUrl = `${rtc.payApiUrl}${rtc.payApiVersion}`
4
- const appName = String(rtc.appName ?? '')
5
- const xApiKey = String(rtc.xApiKey ?? '')
1
+ export default defineNuxtPlugin({
2
+ name: 'pay-api',
3
+ order: -10,
4
+ parallel: true,
5
+ setup(nuxtApp): { provide: { payApi: ReturnType<typeof $fetch.create> } } {
6
+ const rtc = nuxtApp.$config.public
7
+ const payApiUrl = `${rtc.payApiUrl}${rtc.payApiVersion}`
8
+ const appName = rtc.appName
9
+ const xApiKey = rtc.xApiKey
6
10
 
7
- const api = $fetch.create({
8
- baseURL: payApiUrl as string,
9
- async onRequest({ options }) {
10
- const auth = useConnectAuth()
11
- const accountStore = useConnectAccountStore()
11
+ const api = $fetch.create({
12
+ baseURL: payApiUrl,
13
+ async onRequest({ options }) {
14
+ const auth = useConnectAuth()
15
+ const accountStore = useConnectAccountStore()
12
16
 
13
- const token = await auth.getToken()
14
- const accountId = accountStore.currentAccount.id
17
+ const token = await auth.getToken()
18
+ const accountId = accountStore.currentAccount.id
15
19
 
16
- options.headers.set('Authorization', `Bearer ${token}`)
17
- options.headers.set('App-Name', appName)
18
- options.headers.set('X-Apikey', xApiKey)
19
- options.headers.set('Account-Id', String(accountId))
20
- }
21
- })
20
+ options.headers.set('Authorization', `Bearer ${token}`)
21
+ options.headers.set('App-Name', appName)
22
+ options.headers.set('X-Apikey', xApiKey)
23
+ options.headers.set('Account-Id', String(accountId))
24
+ }
25
+ })
22
26
 
23
- return {
24
- provide: {
25
- payApi: api
27
+ return {
28
+ provide: {
29
+ payApi: api
30
+ }
26
31
  }
27
32
  }
28
33
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-pay",
3
3
  "type": "module",
4
- "version": "0.6.7",
4
+ "version": "0.7.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "github:bcgov/connect-nuxt"
@@ -9,17 +9,17 @@
9
9
  "license": "BSD-3-Clause",
10
10
  "main": "./nuxt.config.ts",
11
11
  "devDependencies": {
12
- "@axe-core/playwright": "4.11.3",
13
- "dotenv": "17.4.2",
14
- "nuxt": "4.4.8",
12
+ "@axe-core/playwright": "4.13.0",
13
+ "dotenv": "18.0.4",
14
+ "nuxt": "4.5.2",
15
15
  "typescript": "6.0.3",
16
- "vue-tsc": "3.3.1",
16
+ "vue-tsc": "3.3.11",
17
17
  "@sbc-connect/eslint-config": "0.0.8",
18
- "@sbc-connect/vitest-config": "0.2.0",
19
- "@sbc-connect/playwright-config": "0.2.1"
18
+ "@sbc-connect/playwright-config": "0.2.1",
19
+ "@sbc-connect/vitest-config": "0.2.0"
20
20
  },
21
21
  "dependencies": {
22
- "@sbc-connect/nuxt-auth": "0.16.6"
22
+ "@sbc-connect/nuxt-auth": "0.17.0"
23
23
  },
24
24
  "scripts": {
25
25
  "preinstall": "npx only-allow pnpm",