@arms/rum-core 0.0.25-beta.20 → 0.0.25-beta.21

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.
@@ -4,4 +4,4 @@ export declare function isMatchOption(item: unknown): item is MatchOption;
4
4
  * 如果值有一个选项匹配,则返回true。在比较字符串时,useStartsWith: true时将把值与选项的开始进行比较,而不是要求精确匹配。
5
5
  */
6
6
  export declare function matchList(list: MatchOption[], value: string, useStartsWith?: boolean): boolean;
7
- export declare function urlMatch(url: string, list?: MatchOption[]): boolean;
7
+ export declare function urlMatch(url: string, list?: MatchOption | MatchOption[]): boolean;
@@ -35,7 +35,10 @@ function urlMatch(url, list) {
35
35
  list = [];
36
36
  }
37
37
  try {
38
- var rules = [/https?:\/\/.*rum|retcode\.aliyuncs\.com/, /https?:\/\/.*log-global\.aliyuncs\.com/, /https?:\/\/.*\.mmstat\.com/].concat(list);
38
+ if (!(0, _is.isArray)(list)) {
39
+ list = [list];
40
+ }
41
+ var rules = [/https?:\/\/.*rum|retcode\.aliyuncs\.com/, /https?:\/\/.*log-global\.aliyuncs\.com/, /https?:\/\/.*\.mmstat\.com/, /data:(.+?)(;base64)?,(.+)$/].concat(list);
39
42
  return matchList(rules, url);
40
43
  } catch (e) {
41
44
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arms/rum-core",
3
- "version": "0.0.25-beta.20",
3
+ "version": "0.0.25-beta.21",
4
4
  "description": "arms rum javascript sdk core",
5
5
  "author": "guangli.fj <guangli.fj@alibaba-inc.com>",
6
6
  "license": "ISC",