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

quest-runner

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quest-runner - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

4

bin.js

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

const code = '' + await fs.readFile(file);
const { task, step, play } = require('./index.js');
const { task, step, play, mode } = require('./index.js');
if ((argv.task || []).length > 0) mode.task = argv.task;
if ((argv.skip || []).length > 0) mode.skip = argv.skip;
eval(code);

@@ -84,0 +86,0 @@ const result = await play(argv ?? {});

@@ -35,2 +35,4 @@

const mode = {};
const task = (name, code, info) => {

@@ -112,8 +114,42 @@ if (typeof name === 'function') {

number++;
if (task.info != undefined && typeof task.info === 'object') {
if (typeof task.info.skip === 'boolean' && task.info.skip) {
continue;
let skip = false;
if (task.info != undefined && typeof task.info === 'object') {
if (task.info.skip === true) {
skip = true;
}
}
if (typeof mode.task === 'object' && Array.isArray(mode.task)) {
const value = (task.name ?? '').toLowerCase();
skip = true;
for (const check of mode.task) {
if (value === check.toLowerCase()) {
skip = false;
break;
}
}
}
if (!skip && typeof mode.skip === 'object' && Array.isArray(mode.skip)) {
const value = (task.name ?? '').toLowerCase();
for (const check of mode.skip) {
if (value === check.toLowerCase()) {
skip = true;
break;
}
}
}
if (skip && task.info != undefined && typeof task.info === 'object') {
if (task.info.always === true) {
skip = false;
}
}
if (skip) {
continue;
}
console.log(`${ansi.blueBright('TASK')} ${ansi.bgBlue(' ' + ansi.whiteBright(number) + ' ')}${task.name ? ' ' : ''}${task.name}`);

@@ -256,3 +292,4 @@ console.log();

step,
play
play,
mode,
};
const yargs = require('yargs/yargs')
const argv = yargs(process.argv.slice(2))
const { hideBin } = require('yargs/helpers');
const argv = yargs(hideBin(process.argv))
.boolean('version')

@@ -7,2 +8,6 @@ .boolean('help')

.boolean('silent')
.option('skip')
.array('skip')
.option('task')
.array('task')
.alias('V', 'version')

@@ -14,3 +19,5 @@ .alias('?', 'help')

.describe('silent', 'Silent mode')
.describe('skip', 'Skip task (may be used more than once)')
.describe('task', 'Run specified task (may be used more than once)')
.parse();
module.exports = argv;
{
"name": "quest-runner",
"version": "0.1.6",
"version": "0.1.7",
"description": "Tool for creating and processing logic flow scenarios",

@@ -5,0 +5,0 @@ "main": "index.js",

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