@jetlinks-web/core 1.0.1 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",
@@ -13,16 +13,18 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@types/lodash-es": "^4.17.7",
17
- "@types/node": "^20.2.5",
18
- "axios": "^1.4.0",
19
- "jetlinks-ui-components": "^1.0.26",
20
16
  "lodash-es": "^4.17.21",
17
+ "axios": "^1.4.0",
21
18
  "rxjs": "^7.8.1",
22
- "@jetlinks/constants": "npm:@jetlinks-web/constants@^1.0.0",
23
- "@jetlinks/router": "npm:@jetlinks-web/router@^1.0.0",
24
- "@jetlinks/types": "npm:@jetlinks-web/types@^1.0.0",
25
- "@jetlinks/utils": "npm:@jetlinks-web/utils@^1.0.0"
19
+ "@jetlinks-web/router": "^1.0.5",
20
+ "@jetlinks-web/constants": "^1.0.1",
21
+ "@jetlinks-web/types": "^1.0.1",
22
+ "@jetlinks-web/utils": "^1.0.3"
23
+ },
24
+ "devDependencies": {
25
+ "@types/lodash-es": "^4.17.7",
26
+ "@types/node": "^20.2.5",
27
+ "jetlinks-ui-components": "^1.0.34-8"
26
28
  },
27
29
  "publishConfig": {
28
30
  "registry": "https://registry.npmjs.org/",
@@ -1,6 +1,6 @@
1
- import { TOKEN_KEY } from '@jetlinks/constants'
2
- import { getToken } from '@jetlinks/utils'
3
- import { jumpLogin } from '@jetlinks/router'
1
+ import { TOKEN_KEY, BASE_API } from '@jetlinks-web/constants'
2
+ import { getToken } from '@jetlinks-web/utils'
3
+ import { jumpLogin } from '@jetlinks-web/router'
4
4
  import axios from 'axios'
5
5
  import type {
6
6
  AxiosRequestConfig,
@@ -11,7 +11,7 @@ import type {
11
11
  } from 'axios'
12
12
  import { notification as Notification } from 'jetlinks-ui-components'
13
13
  import { isFunction } from 'lodash-es'
14
- import type { AxiosResponseRewrite } from '@jetlinks/types'
14
+ import type { AxiosResponseRewrite } from '@jetlinks-web/types'
15
15
 
16
16
  export interface ContextOptions {
17
17
  filterUrl?: string[]
@@ -32,14 +32,13 @@ export class Axios {
32
32
 
33
33
  constructor(options: CreateAxiosOptions) {
34
34
  this.options = options
35
- const api = import.meta.env.VITE_APP_BASE_API
36
35
  this.axiosInstance = axios.create({
37
36
  withCredentials: false,
38
37
  timeout: 1000 * 15,
39
- baseURL: api
38
+ baseURL: BASE_API
40
39
  })
41
40
  this.axiosInstance.interceptors.request.use(
42
- this.request.bind(this),
41
+ this.request.bind(this),
43
42
  this.errorHandler.bind(this)
44
43
  )
45
44
  this.axiosInstance.interceptors.response.use(