@mpxjs/api-proxy 2.9.14 → 2.9.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/api-proxy",
3
- "version": "2.9.14",
3
+ "version": "2.9.16",
4
4
  "description": "convert miniprogram API at each end",
5
5
  "module": "src/index.js",
6
6
  "types": "@types/index.d.ts",
@@ -39,5 +39,5 @@
39
39
  "dependencies": {
40
40
  "axios": "^0.21.1"
41
41
  },
42
- "gitHead": "e8ab845a544d2db0619a6a7d6c04d9d384d1a6ca"
42
+ "gitHead": "60cfd1708a61c925d5fc08cca0b31a06b2c4c160"
43
43
  }
@@ -0,0 +1,7 @@
1
+ function getEnterOptionsSync () {
2
+ my.getEnterOptionsSync()
3
+ }
4
+
5
+ export {
6
+ getEnterOptionsSync
7
+ }
@@ -0,0 +1,9 @@
1
+ import { getEnvObj, envError } from '../../../common/js'
2
+
3
+ const ENV_OBJ = getEnvObj()
4
+
5
+ const getEnterOptionsSync = ENV_OBJ.getEnterOptionsSync || envError('getEnterOptionsSync')
6
+
7
+ export {
8
+ getEnterOptionsSync
9
+ }
@@ -0,0 +1,12 @@
1
+ import { isBrowser, throwSSRWarning } from '../../../common/js'
2
+ function getEnterOptionsSync () {
3
+ if (!isBrowser) {
4
+ throwSSRWarning('getEnterOptionsSync API is running in non browser environments')
5
+ return
6
+ }
7
+ return global.__mpxEnterOptions || {}
8
+ }
9
+
10
+ export {
11
+ getEnterOptionsSync
12
+ }
@@ -104,3 +104,6 @@ export * from './api/video'
104
104
 
105
105
  // onWindowResize, offWindowResize
106
106
  export * from './api/window'
107
+
108
+ // getEnterOptionsSync
109
+ export * from './api/lifecycle'