New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

@mpxjs/api-proxy

Package Overview
Dependencies
Maintainers
3
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mpxjs/api-proxy - npm Package Compare versions

Comparing version 2.2.0 to 2.2.26

4

package.json
{
"name": "@mpxjs/api-proxy",
"version": "2.2.0",
"version": "2.2.26",
"description": "convert miniprogram API at each end",

@@ -30,3 +30,3 @@ "module": "src/index.js",

"homepage": "https://github.com/didi/mpx#readme",
"gitHead": "5aca2e9ac3597f2a0e9255fbe95b45f757118dde"
"gitHead": "5ed3e9b2b894ac02837d5292cc118c348e4d4a9b"
}

@@ -1,2 +0,2 @@

import { error } from '../utils'
import { error, getEnvObj } from '../utils'
import getWxToAliApi from './wxToAli'

@@ -13,11 +13,14 @@ import promisify from '../promisify'

}
const platforms = ['wx', 'ali', 'swan', 'qq', 'tt']
const cacheTarget = {}
const platforms = [
'__mpx_srcMode_wx',
'__mpx_srcMode_ali',
'__mpx_srcMode_swan',
'__mpx_srcMode_qq',
'__mpx_srcMode_tt'
]
Object.keys(target).forEach(key => {
cacheTarget[key] = target[key]
})
const envObj = getEnvObj()
function joinName (from = '', to = '') {
return `${from}_${to}`
return `${from.replace(/^__mpx_srcMode_/, '')}_${to}`
}

@@ -53,4 +56,4 @@

if (cacheTarget[api]) {
return cacheTarget[api].apply(target, args)
if (envObj[api]) {
return envObj[api].apply(target, args)
} else {

@@ -57,0 +60,0 @@ error(`当前环境不存在 ${api} 方法`)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc