Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vmm/cli

Package Overview
Dependencies
Maintainers
6
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vmm/cli - npm Package Compare versions

Comparing version 2.1.43 to 2.1.45

2

package.json
{
"name": "@vmm/cli",
"version": "2.1.43",
"version": "2.1.45",
"description": "vmm cli interface",

@@ -5,0 +5,0 @@ "author": {

@@ -43,43 +43,2 @@ const fs = require('fs-extra')

// const proxyMiddle = createProxyMiddleware({
// target: 'http://localhost:9000',
// ws: true
// })
// const serviceFn = require('@vmm/user-service/service.js')
// const mountProxy = (app) => {
// let ProxyJson = {};
// try {
// ProxyJson = fs.readJSONSync(PROXY_JSON);
// } catch (e) {
// console.log('proxy file not found, please run vmm update before vmm serve err- ', e)
// }
// for (let pkgName in ProxyJson) {
// const info = ProxyJson[pkgName]
// // 后台调试模式,proxy转发
// if (info.type === 'proxy') {
// const target = info.value
// const url = `/api/${pkgName}/*`
// app.use(url, createProxyMiddleware(
// `/api/${pkgName}/*`, {
// target,
// ws: true
// }))
// } else if (info.type === 'mount') { // 挂载模式,挂载到主服务
// try {
// // let currentPath = execSync('pwd').toString().trim()
// // service路径
// let serviceJs = path.resolve(`./public/npm/${pkgName}@${info.value}/service.js`);
// runServiceVm(serviceJs, app, {})
// } catch (e) {
// console.log(`Run Service ${pkgName} Failed:`, e)
// process.exit(1)
// }
// }
// }
// }
module.exports = function (app, server) {

@@ -89,3 +48,3 @@ // 解析 public/html/index.html

parseHtmlMeta(fs.readFileSync('./public/index.html', 'utf8')).filter(v => v.name === 'vmm-service').forEach((service) => {
if (typeof service.debug === 'string' && server.debug.length > 0) {
if (typeof service.debug === 'string' && service.debug.length > 0) {
const target = service.debug.match(/^http:\/\//) ? service.debug : `http://localhost:${service.debug}`

@@ -92,0 +51,0 @@ console.log(`\nPROXY DEBUG: connect ${service.package} ${target} `)

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