@mpxjs/api-proxy
Advanced tools
Comparing version 2.0.15 to 2.0.16
{ | ||
"name": "@mpxjs/api-proxy", | ||
"version": "2.0.15", | ||
"version": "2.0.16", | ||
"description": "convert miniprogram API at each end", | ||
@@ -29,4 +29,3 @@ "module": "src/index.js", | ||
}, | ||
"homepage": "https://github.com/didi/mpx#readme", | ||
"gitHead": "6af7968f36327428f8efff361355c2b54ad789b9" | ||
"homepage": "https://github.com/didi/mpx#readme" | ||
} |
@@ -7,7 +7,14 @@ import { getEnvObj } from './utils' | ||
const list = promisify(envObj, usePromise, whiteList) | ||
const platforms = ['wx', 'ali', 'swan', 'qq', 'tt'] | ||
Object.keys(list).forEach(key => { | ||
Object.keys(list).forEach(api => { | ||
try { | ||
target[key] = list[key] | ||
} catch (e) {} | ||
target[api] = (...args) => { | ||
const platform = args.pop() | ||
if (typeof platform !== 'string' || !~platforms.indexOf(platform)) { | ||
args.push(platform) | ||
} | ||
return list[api].apply(target, args) | ||
} | ||
} catch (e) {} // 支付宝不支持重写 call 方法 | ||
}) | ||
@@ -14,0 +21,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
753
29917
1