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

@easyv/cli

Package Overview
Dependencies
Maintainers
0
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyv/cli - npm Package Compare versions

Comparing version 1.14.4 to 1.15.0-beta.0

2

package.json
{
"name": "@easyv/cli",
"version": "1.14.4",
"version": "1.15.0-beta.0",
"description": "Easy[V] component tools",

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

@@ -13,5 +13,29 @@ const chalk = require('chalk');

const crypto = require('crypto');
const inquirer = require('inquirer');
const { request } = require('./utils/request');
const getConfigAssets = require('./utils/getAssets')
const getConfigAssets = require('./utils/getAssets');
async function getUpdateLog(names) {
const logMap = {};
for (const moduleName of names) {
console.log(chalk.blue(`\n输入组件 ${moduleName} 的更新信息:\n`));
const answer = await inquirer.prompt([
{
type: 'editor',
name: 'message',
message: '请输入版本更新日志内容:',
validate: function (value) {
if (!value) return '请输入更新日志内容(若无更新内容请输入空格)';
if (value.length > 4000)
return `您的字符内容已超出限制(4000字符以内),请修改后重新上传:\n${value}`;
return true;
},
},
]);
logMap[moduleName] = answer.message;
}
return logMap;
}
async function publishComponent({

@@ -24,2 +48,3 @@ moduleName,

removeConsole,
logContent,
}) {

@@ -41,4 +66,4 @@ const { file, base } = await build(moduleName, {

? new https.Agent({
rejectUnauthorized: false,
})
rejectUnauthorized: false,
})
: null,

@@ -50,3 +75,3 @@ };

// 先上传打包文件
await request(host + '/api/v3/upload/constant', {
await request(host + 'api/easyv/v5/constants/upload', {
...commonOption,

@@ -64,3 +89,3 @@ formData: {

});
const body = await request(host + '/api/v3/constant/add', {
const body = await request(host + 'api/easyv/v5/constants/create', {
...commonOption,

@@ -70,6 +95,4 @@ method: 'POST',

isMobile,
moduleInfo: Object.assign(
base,
{ staticResources }
),
moduleInfo: Object.assign(base, { staticResources }),
message: logContent,
},

@@ -87,12 +110,11 @@ });

}
// moduleName重复时,更新已存在组件
if (body.message === '2001') {
const result = await request(host + '/api/v3/constant/update', {
const result = await request(host + 'api/easyv/v5/constants/upgrade', {
...commonOption,
method: 'POST',
method: 'PATCH',
body: {
isMobile,
moduleInfo: Object.assign(
base,
{ staticResources }
),
moduleInfo: Object.assign(base, { staticResources }),
message: logContent,
},

@@ -177,2 +199,3 @@ });

const token = await getToken();
const logMap = await getUpdateLog(name);

@@ -188,2 +211,3 @@ await Promise.all(

removeConsole,
logContent: logMap[moduleName],
});

@@ -190,0 +214,0 @@ }),

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