@jolibox/implement 1.1.16-beta.2 → 1.1.16-beta.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.
@@ -1,9 +1,9 @@
1
1
  Invoking: npm run clean && npm run build:esm && tsc
2
2
 
3
- > @jolibox/implement@1.1.16-beta.2 clean
3
+ > @jolibox/implement@1.1.16-beta.3 clean
4
4
  > rimraf ./dist
5
5
 
6
6
 
7
- > @jolibox/implement@1.1.16-beta.2 build:esm
7
+ > @jolibox/implement@1.1.16-beta.3 build:esm
8
8
  > BUILD_VERSION=$(node -p "require('./package.json').version") node esbuild.config.js --format=esm
9
9
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@jolibox/implement",
3
3
  "description": "This project is Jolibox JS-SDk implement for Native && H5",
4
- "version": "1.1.16-beta.2",
4
+ "version": "1.1.16-beta.3",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@jolibox/common": "1.1.16-beta.2",
10
- "@jolibox/types": "1.1.16-beta.2",
11
- "@jolibox/native-bridge": "1.1.16-beta.2",
9
+ "@jolibox/common": "1.1.16-beta.3",
10
+ "@jolibox/types": "1.1.16-beta.3",
11
+ "@jolibox/native-bridge": "1.1.16-beta.3",
12
12
  "localforage": "1.10.0",
13
13
  "@jolibox/ui": "1.0.0",
14
14
  "web-vitals": "4.2.4"
@@ -43,8 +43,13 @@ const wrapContext = () => {
43
43
  const defaultGameID = urlParams.get('mpId') ?? urlParams.get('appId') ?? urlParams.get('gameId') ?? '';
44
44
  const sessionId =
45
45
  env.clientSessionId ?? payloadJson?.sessionId ?? urlParams.get('sessionId') ?? defaultSessionId;
46
- const testAdsMode = !!(payloadJson?.testAdsMode ?? urlParams.get('testAdsMode') === 'true');
47
- const joliboxEnv = payloadJson?.joliboxEnv ?? urlParams.get('joliboxEnv') ?? 'production';
46
+ const testAdsMode = !!(
47
+ payloadJson?.testAdsMode ??
48
+ payloadJson?.__testAdsMode ??
49
+ urlParams.get('testAdsMode') === 'true'
50
+ );
51
+ const joliboxEnv =
52
+ payloadJson?.joliboxEnv ?? payloadJson?.__joliboxEnv ?? urlParams.get('joliboxEnv') ?? 'production';
48
53
  const testMode = joliboxEnv === 'staging';
49
54
  const channel = headerJson?.channel;
50
55
 
@@ -10,8 +10,8 @@ interface HeaderJson {
10
10
 
11
11
  interface PayloadJson {
12
12
  id?: string;
13
- testAdsMode?: boolean;
14
- joliboxEnv?: 'staging' | 'production';
13
+ testAdsMode?: boolean; // deprecated
14
+ joliboxEnv?: 'staging' | 'production'; // deprecated
15
15
  sessionId?: string;
16
16
  __mpType?: 'game' | 'miniApp';
17
17
  __orientation?: 'HORIZONTAL' | 'VERTICAL';
@@ -20,6 +20,8 @@ interface PayloadJson {
20
20
  __showStatusBar?: boolean;
21
21
  __shouldInterupt?: boolean;
22
22
  __from?: number; // 从哪个小程序打开的
23
+ __testAdsMode?: boolean;
24
+ __joliboxEnv?: 'staging' | 'production';
23
25
  }
24
26
 
25
27
  interface Signature {