workshopper-adventure
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -57,2 +57,4 @@ const i18n = require('i18n-core') | ||
var translator = root.lang(lang, true) | ||
// TODO: _excercises is unused... is this ok? | ||
// eslint-disable-next-line | ||
var result = i18n(i18nExtend(translator, { | ||
@@ -95,5 +97,2 @@ get: function (key) { | ||
// TODO: _excercises is unused... is this ok? | ||
// eslint-disable-next-line | ||
var _exercises = [] | ||
root.fallback = function (key) { | ||
@@ -113,5 +112,2 @@ return '?' + key + '?' | ||
} | ||
result.updateExercises = function (exercises) { | ||
_exercises = exercises | ||
} | ||
result.lang = function () { | ||
@@ -118,0 +114,0 @@ return lang |
@@ -133,3 +133,2 @@ const path = require('path') | ||
this.exercises.push(meta.name) | ||
this.i18n.updateExercises(this.exercises) | ||
this._meta[meta.id] = meta | ||
@@ -139,2 +138,3 @@ meta.number = this.exercises.length | ||
} | ||
WA.prototype.getVersionString = function () { | ||
@@ -141,0 +141,0 @@ return this.options.name + '@' + this.options.version |
@@ -0,12 +1,24 @@ | ||
var after = require('after') | ||
exports.menu = false | ||
exports.handler = function (shop, args) { | ||
shop.run(args, null, function (err, pass, stream) { | ||
stream | ||
.appendChain(err) | ||
.pipe(require('../mseePipe')()) | ||
.pipe(process.stdout) | ||
.on('end', function () { | ||
process.exit(pass && !err ? 0 : 1) | ||
}) | ||
var error | ||
var passed | ||
var exit = after(2, function () { | ||
if (error) { | ||
console.log(err.stack || err) | ||
} | ||
process.exit(passed && !error ? 0 : 1) | ||
}) | ||
var stream = shop.run(args, null, function (err, pass) { | ||
if (err) { | ||
console.log(err) | ||
} | ||
error = err | ||
passed = pass | ||
exit() | ||
}) | ||
stream = stream.pipe(require('../mseePipe')()) | ||
stream.on('end', exit) | ||
stream.pipe(process.stdout, {end: false}) | ||
} |
{ | ||
"name": "workshopper-adventure", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "A terminal workshop runner framework (adventure compatible)", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
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
144274
2915