@polyv/request-plugin-polyv-business 2.2.0 → 2.3.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.
Files changed (3) hide show
  1. package/judge.d.ts +1 -1
  2. package/judge.js +2 -2
  3. package/package.json +4 -4
package/judge.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare function isWatchViewerRequest(url: string): boolean;
17
17
  /**
18
18
  * 是否频道接口
19
19
  *
20
- * 判断地址:/live/v4/channel
20
+ * 判断地址:/live/v4/channel、/live/v3/channel
21
21
  *
22
22
  * 插入参数:channelId
23
23
  */
package/judge.js CHANGED
@@ -21,12 +21,12 @@ export function isWatchViewerRequest(url) {
21
21
  /**
22
22
  * 是否频道接口
23
23
  *
24
- * 判断地址:/live/v4/channel
24
+ * 判断地址:/live/v4/channel、/live/v3/channel
25
25
  *
26
26
  * 插入参数:channelId
27
27
  */
28
28
  export function isChannelRequest(url) {
29
- return url.indexOf('/live/v4/channel') !== -1;
29
+ return /\/live\/v[34]\/channel/.test(url);
30
30
  }
31
31
  /**
32
32
  * 是否 v3 接口,/live/v3 开头的接口,使用 'token' 入参
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@polyv/request-plugin-polyv-business",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
- "@polyv/request-core": "2.2.0",
7
- "@polyv/request-plugin-authorize-token": "2.2.0",
8
- "@polyv/request-plugin-global-params": "2.2.0"
6
+ "@polyv/request-core": "2.3.0",
7
+ "@polyv/request-plugin-authorize-token": "2.3.0",
8
+ "@polyv/request-plugin-global-params": "2.3.0"
9
9
  },
10
10
  "types": "./index.d.ts"
11
11
  }