New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

wind-script-cli

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wind-script-cli - npm Package Compare versions

Comparing version
0.0.13
to
0.0.14
init-copy/helloworld.ws

Sorry, the diff of this file is not supported yet

+3
# [WindScipt](https://github.com/Slouchwind/WindScript) Package \<name\>
这是由 WindScript Package Manager 初始化的项目
const ws = require("wind-script");
const project = new ws.WSrun();
project
.setCode(`Str E = This is an error message;
E==> E;`)
.run();
const ws = require("wind-script");
const project = new ws.WSrun();
project
.setPath(__dirname, "./helloworld.ws")
.run();
+9
-19

@@ -19,12 +19,11 @@ #!/usr/bin/env node

.option("-d, --debug", "display the debug info", false)
.option("-g, --get <path>", "display all [argument] File at <path>")
.action((argument, options) => {
.action((arg, opts) => {
//debug
if (options.debug) {
console.log("argument: ", argument);
console.log(options);
if (opts.debug) {
console.log("argument: ", arg);
console.log(opts);
}
//none or only debug
if (argument === undefined && options.get === undefined) {
if (arg === undefined) {
const read = readline.createInterface({

@@ -52,17 +51,8 @@ input: process.stdin,

else {
if (argument !== undefined) {
if (options.get !== undefined) {
var get = lib.objectToTable(lib.getFileList(options.get, argument));
get.forEach((value) => console.log(value));
console.log(`\nThere is ${get.length - 1} ${argument.toUpperCase()} File at the path "${path.resolve(options.get)}"`);
}
else {
const wsFile = new ws.WSrun(options.debug);
wsFile
.setPath(path.resolve(argument))
.run();
}
}
const wsFile = new ws.WSrun(opts.debug);
wsFile
.setPath(path.resolve(arg))
.run();
}
})
.parse();
{
"name": "wind-script-cli",
"version": "0.0.13",
"version": "0.0.14",
"description": "WindScript Command Line Tool",

@@ -5,0 +5,0 @@ "keywords": [

+18
-9

@@ -13,3 +13,3 @@ #!/usr/bin/env node

var errText = (command, err) => colorText(`${command.toUpperCase()} ERR: ${err.syscall} error`, "0;91")
var errText = (command, err) => colorText(`${command.toUpperCase()} ERR: 函数 ${err.syscall} 错误`, "0;91")

@@ -19,3 +19,3 @@ program

.description("WindScript Package Manager")
.option("-d --debug", "display the debug info", false)
.option("-d --debug", "显示debug信息", false)
.action((opts, cmd) => {

@@ -27,3 +27,3 @@ if (opts.debug) {

if (opts.help === undefined) {
console.log(`run "wspm ${cmd.commands[0]._helpShortFlag}"`);
console.log(`输入"wspm ${cmd.commands[0]._helpShortFlag}"获取帮助`);
}

@@ -34,4 +34,4 @@ })

.command("init <name>")
.description("Init a new WindScript Package and name as <name>")
.option("-d --debug", "display the debug info", false)
.description("以 <name> 作为名字初始化WindScript包")
.option("-d --debug", "显示debug信息", false)
.action((arg_name, opts, cmd) => {

@@ -45,3 +45,4 @@ if (opts.debug) {

if (!(dir.includes(arg_name) && fs.statSync(`./${arg_name}`).isDirectory())) fs.mkdirSync(`./${arg_name}`);
lib.copyDir(path.resolve(__dirname, "./src/template"), `./${arg_name}`);
else console.log(`已包含目录 ${arg_name}`);
lib.copyDir(path.resolve(__dirname, "./init-copy"), `./${arg_name}`);
fs.readFile(`./${arg_name}/helloworld.ws`, (err, data) => {

@@ -55,2 +56,10 @@ if (err) console.log(errText("init", err));

});
fs.readFile(`./${arg_name}/README.md`, (err, data) => {
if (err) console.log(errText("init", err));
else {
fs.writeFile(`./${arg_name}/README.md`, data.toString().replace(/\\<name\\>/g, arg_name), (err) => {
if (err) console.log(errText("init", err));
});
}
});
})

@@ -60,4 +69,4 @@

.command("list <extname> [path]")
.description("List file with <extname> in [path]")
.option("-d --debug", "display the debug info", false)
.description("列出 [path] 路径下扩展名为 <extname> 文件")
.option("-d --debug", "显示debug信息", false)
.action((arg_ext, arg_path, opts, cmd) => {

@@ -83,5 +92,5 @@ if (opts.debug) {

});
console.log(`\nThere is ${list.length - 1} ${arg_ext.toUpperCase()} File at the path ${colorText(path.resolve(arg_path), "0;94")}`);
console.log(`\n有 ${list.length - 1} 个 ${arg_ext.toUpperCase()} 文件在 ${colorText(path.resolve(arg_path), "0;94")} 路径下`);
})
program.parse();

Sorry, the diff of this file is not supported yet

const ws = require("wind-script");
const project = new ws.WSrun();
project
.setCode(`Str E = This is an error message;
E==> E;`)
.run();
const ws = require("wind-script");
const project = new ws.WSrun();
project
.setPath(__dirname, "./helloworld.ws")
.run();