@hylid/env 4.0.4 → 4.0.5

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.
@@ -35,4 +35,7 @@ export var webChecker = [{
35
35
  }, {
36
36
  name: CLIENT.DEMO,
37
37
  match: [NO_MINIPROGRAM, HAVE_GRIVER, /GriverDemo/]
38
+ }, {
39
+ name: CLIENT.WORLDFIRST,
40
+ match: [NO_MINIPROGRAM, NO_GRIVER, /worldFirst/]
38
41
  }];
@@ -28,6 +28,7 @@ export declare const CLIENT: {
28
28
  H5: string;
29
29
  WECHAT: string;
30
30
  TNGD_H5NG: string;
31
+ WORLDFIRST: string;
31
32
  };
32
33
  export declare const HAVE_MINIPROGRAM: RegExp;
33
34
  export declare const NO_MINIPROGRAM: RegExp;
package/lib/constants.js CHANGED
@@ -28,7 +28,8 @@ export var CLIENT = {
28
28
  KASPI: 'kaspi',
29
29
  H5: 'h5',
30
30
  WECHAT: 'wechat',
31
- TNGD_H5NG: 'tngdh5ng'
31
+ TNGD_H5NG: 'tngdh5ng',
32
+ WORLDFIRST: 'worldfirst'
32
33
  };
33
34
  export var HAVE_MINIPROGRAM = /miniprogram/i;
34
35
  export var NO_MINIPROGRAM = /^((?!miniprogram).)*$/i;
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@ export function getDefaultDiscernEnv() {
16
16
  } else {
17
17
  // 如果只设置了 client,默认是套壳场景
18
18
  client = setting.client || getName4MpWeb();
19
+ // TODO: 套壳与 H5 的区分方案有待落地, 添加异步获取 env 方法
19
20
  if (client) {
20
21
  platform = PLATFORM.MPWEB;
21
22
  } else {
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.0.4';
1
+ export default '4.0.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hylid/env",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib"