@jolibox/implement 1.1.15 → 1.1.16-beta.2
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/implement.build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Invoking: npm run clean && npm run build:esm && tsc
|
|
2
2
|
|
|
3
|
-
> @jolibox/implement@1.1.
|
|
3
|
+
> @jolibox/implement@1.1.16-beta.2 clean
|
|
4
4
|
> rimraf ./dist
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
> @jolibox/implement@1.1.
|
|
7
|
+
> @jolibox/implement@1.1.16-beta.2 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.
|
|
4
|
+
"version": "1.1.16-beta.2",
|
|
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.
|
|
10
|
-
"@jolibox/types": "1.1.
|
|
11
|
-
"@jolibox/native-bridge": "1.1.
|
|
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",
|
|
12
12
|
"localforage": "1.10.0",
|
|
13
13
|
"@jolibox/ui": "1.0.0",
|
|
14
14
|
"web-vitals": "4.2.4"
|
|
@@ -73,6 +73,12 @@ function addWebviewReadyListener() {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
function addI18nChangedListener() {
|
|
77
|
+
onNative('onI18nChanged', ({ language }) => {
|
|
78
|
+
hostEmitter.emit('onI18nChanged', { i18n: language });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
function handleTaskTracker(duration?: number) {
|
|
77
83
|
// 只有小游戏场景需要上报进度
|
|
78
84
|
if (context.mpType === 'game') {
|
|
@@ -164,6 +170,7 @@ export function config(): void {
|
|
|
164
170
|
addShowAdListener();
|
|
165
171
|
addDoExitLoader();
|
|
166
172
|
addWebviewReadyListener();
|
|
173
|
+
addI18nChangedListener();
|
|
167
174
|
fetchMetaConfig();
|
|
168
175
|
cleanStyles = initializeNativeEnv();
|
|
169
176
|
}
|
|
@@ -6,7 +6,7 @@ import { context } from '@/common/context';
|
|
|
6
6
|
* inner fetch
|
|
7
7
|
*/
|
|
8
8
|
const defaultHeaders: Record<string, string> = {
|
|
9
|
-
'x-user-agent': xUserAgent()
|
|
9
|
+
// 'x-user-agent': xUserAgent()
|
|
10
10
|
};
|
|
11
11
|
if (context.hostUserInfo?.token) {
|
|
12
12
|
defaultHeaders['x-joli-token'] = context.hostUserInfo.token;
|