Comparing version 2.1.43 to 2.1.45
{ | ||
"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} `) |
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
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
63583
1288