From 878f00c2f8a76226ebf8999707e85f67f1ca1e84 Mon Sep 17 00:00:00 2001 From: Keith Date: Fri, 25 Oct 2013 10:43:29 -0400 Subject: [PATCH 1/2] Allow default action for touch events Added a flag to touch event.preventDefault(). Allows touch events to show action such as dragging and scrolling in html canvas. Use compile flag -D flambe_allow_touch_default --- src/flambe/platform/html/HtmlPlatform.hx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/flambe/platform/html/HtmlPlatform.hx b/src/flambe/platform/html/HtmlPlatform.hx index 3470c1ef..11f237da 100644 --- a/src/flambe/platform/html/HtmlPlatform.hx +++ b/src/flambe/platform/html/HtmlPlatform.hx @@ -135,7 +135,9 @@ class HtmlPlatform switch (event.type) { case "touchstart", "MSPointerDown": - event.preventDefault(); + #if !flambe_allow_touch_default + event.preventDefault(); + #end if (HtmlUtil.SHOULD_HIDE_MOBILE_BROWSER) { HtmlUtil.hideMobileBrowser(); } @@ -147,7 +149,9 @@ class HtmlPlatform } case "touchmove", "MSPointerMove": - event.preventDefault(); + #if !flambe_allow_touch_default + event.preventDefault(); + #end for (touch in changedTouches) { var x = getX(touch, bounds); var y = getY(touch, bounds); @@ -156,6 +160,9 @@ class HtmlPlatform } case "touchend", "touchcancel", "MSPointerUp": + #if !flambe_allow_touch_default + event.preventDefault(); + #end for (touch in changedTouches) { var x = getX(touch, bounds); var y = getY(touch, bounds); From 0a6785a39837eac4a4f618ef07d91ff98ca0c91b Mon Sep 17 00:00:00 2001 From: Rob Adams Date: Fri, 26 Mar 2021 10:47:42 -0400 Subject: [PATCH 2/2] Update CLI node dependencies to remove vulnerabilities --- command/data/embedder/flambe.js | 12 +- command/data/firefox/index.html | 20 + command/data/scaffold/Project.hxproj | 4 +- command/data/scaffold/flambe.yaml | 48 +- command/data/scaffold/icons/128x128.png | Bin 0 -> 16682 bytes command/data/scaffold/src/urgame/Main.hx | 2 +- command/data/scaffold/web/index.html | 2 +- command/flambe.js | 28 +- command/index.js | 260 ++++++++-- command/package-lock.json | 585 +++++++++++++++++++++++ command/package.json | 60 ++- 11 files changed, 932 insertions(+), 89 deletions(-) create mode 100644 command/data/firefox/index.html create mode 100644 command/data/scaffold/icons/128x128.png create mode 100644 command/package-lock.json diff --git a/command/data/embedder/flambe.js b/command/data/embedder/flambe.js index f4f3036f..cfe78d9f 100644 --- a/command/data/embedder/flambe.js +++ b/command/data/embedder/flambe.js @@ -7,9 +7,6 @@ */ var flambe = {}; -/** @define {string} */ -flambe.FLASH_VERSION = "11"; - /** * Embed a Flambe game into the page. * @@ -45,8 +42,12 @@ flambe.embed = function (urls, elementId) { switch (ext) { case "swf": + var flashVersion = "11.2"; + if ((pref == null || pref == "flash") - && swfobject.hasFlashPlayerVersion(flambe.FLASH_VERSION)) { + && swfobject.hasFlashPlayerVersion(flashVersion) + // Android Flash is old and busted + && !/\bAndroid\b/.exec(navigator.userAgent)) { // SWFObject replaces the element it's given, so create a temporary inner element // for parity with JS @@ -64,10 +65,9 @@ flambe.embed = function (urls, elementId) { }; } - swfobject.embedSWF(url, swf.id, "100%", "100%", flambe.FLASH_VERSION, null, {}, { + swfobject.embedSWF(url, swf.id, "100%", "100%", flashVersion, null, {}, { allowScriptAccess: "always", allowFullScreen: "true", - fullscreenOnSelection: "true", wmode: "direct" }, {id: swf.id, name: swf.id}); return true; diff --git a/command/data/firefox/index.html b/command/data/firefox/index.html new file mode 100644 index 00000000..245106c0 --- /dev/null +++ b/command/data/firefox/index.html @@ -0,0 +1,20 @@ + + + + + + + + +
+ +
+ + diff --git a/command/data/scaffold/Project.hxproj b/command/data/scaffold/Project.hxproj index 46b136c5..ff4d16e3 100644 --- a/command/data/scaffold/Project.hxproj +++ b/command/data/scaffold/Project.hxproj @@ -46,14 +46,14 @@ - cmd /c flambe build --$(BuildConfig) + cmd /c flambe build $(TargetBuild) --$(BuildConfig) diff --git a/command/data/scaffold/flambe.yaml b/command/data/scaffold/flambe.yaml index b8196903..5817d5da 100644 --- a/command/data/scaffold/flambe.yaml +++ b/command/data/scaffold/flambe.yaml @@ -1,37 +1,49 @@ -# The name, version and identifier, for mobile app packaging +# Basic information about the game. name: Your Game +description: A short one-line description. + +# Information about the game developer. +developer: + name: Your Company Name + url: http://yourwebsite.com + +# The game's unique identifier. +id: com.yourdomain.yourgame + +# The game's version string. version: 1.0.0 -id: com.urdomain.urgame -# The main class name +# The main class name. main: urgame.Main -# The platform to use when invoking `run` or `build` with no arguments +# The platform to use when invoking `run` or `build` with no arguments. default_platform: flash -# Additional flags to pass to the Haxe compiler +# The initial orientation and fullscreen state on mobile devices. +orientation: portrait +fullscreen: true + +# Additional flags to pass to the Haxe compiler. # haxe_flags: -lib nape -D foobar -# Additional paths to include in the build +# Additional paths to include in the build. # extra_paths: # assets: dir1 dir2 # libs: dir1 dir2 # src: ../dir1 ../dir2 # web: ["dir1 with spaces", "dir2"] -# The initial orientation and fullscreen state -orientation: portrait -fullscreen: true - -# Android-specific configuration +# Android-specific configuration. android: # https://developer.android.com/guide/topics/manifest/manifest-intro.html AndroidManifest.xml: | + # The signing password for certs/android.p12 + password: password -# iOS-specific configuration +# iOS-specific configuration. ios: # http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference Info.plist: | @@ -42,3 +54,15 @@ ios: UIPrerenderedIcon + # The signing password for certs/ios-development.p12 + password: password + +# Firefox App-specific configuration. +firefox: + # https://developer.mozilla.org/en-US/docs/Web/Apps/Manifest + manifest.webapp: + { + default_locale: "en", + # type: "privileged", + # permissions: [...] + } diff --git a/command/data/scaffold/icons/128x128.png b/command/data/scaffold/icons/128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..a7183f7bb04cb8d5da9060dcfef7fa7522251b3e GIT binary patch literal 16682 zcmV*VKw7_vP)Px#AY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF* zm;eA5Z<1fdMgRZ+24YJ`L;(K){{a7>y{D4^000SaNLh0L0DA}k0DA}lcqAR6002NA zNklRO!x3*Vr?Ook!?TaPbT5Q?I#!G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Oxs)E`qr-NufIOk*4COD9v+VR`}>V$Syf}q9?N>_fbV~L9blp1k~WCMLNM4# zS-J?3j%!UU3@xt4Q--u9WL!nNCv>HRH?4r4oQLJuItYD2QIqkBHsAMH}bA` zy^BJjz^+}pc-!0FMzvZcolf(}Q|_PhTCp0uGvAW?zy1E>jq7!NwB3Q{2dI{~MwFx^ zmZVxG7o`Fz1|tJQ6I}x%T_f`l0|P5VLn{+gT?11q1A`<16`*<~4Y~O#nQ4`{H3<98 Q*#pwy>FVdQ&MBb@0QKH4TmS$7 literal 0 HcmV?d00001 diff --git a/command/data/scaffold/src/urgame/Main.hx b/command/data/scaffold/src/urgame/Main.hx index 5820ee7b..270fb237 100644 --- a/command/data/scaffold/src/urgame/Main.hx +++ b/command/data/scaffold/src/urgame/Main.hx @@ -15,7 +15,7 @@ class Main System.init(); // Load up the compiled pack in the assets directory named "bootstrap" - var manifest = Manifest.build("bootstrap"); + var manifest = Manifest.fromAssets("bootstrap"); var loader = System.loadAssetPack(manifest); loader.get(onSuccess); } diff --git a/command/data/scaffold/web/index.html b/command/data/scaffold/web/index.html index 6328d308..f74e06f4 100644 --- a/command/data/scaffold/web/index.html +++ b/command/data/scaffold/web/index.html @@ -4,7 +4,7 @@ Your Game - + diff --git a/command/flambe.js b/command/flambe.js index 264a21d5..fa034ad6 100755 --- a/command/flambe.js +++ b/command/flambe.js @@ -60,6 +60,7 @@ cmd.setDefaults({action: function (args) { var addCommonArguments = function (parser) { parser.addArgument(["--debug"], {action: "storeTrue", help: "Build in debug mode."}); parser.addArgument(["--fdb-host"], {help: "The address AIR apps should connect to for debugging."}); + parser.addArgument(["--haxe-server"], {help: "Connect to a Haxe compiler server at this address/port."}); // For FlashDevelop, does absolutely nothing parser.addArgument(["--release"], {action: "storeTrue", help: argparse.Const.SUPPRESS}); @@ -76,7 +77,13 @@ cmd.setDefaults({action: function (args) { catchErrors( flambe.loadConfig(args.config) .then(function (config) { - return flambe.run(config, args.platform, {debug: args.debug, noBuild: args.no_build, fdbHost: args.fdb_host, noFdb: args.no_fdb}); + return flambe.run(config, args.platform, { + debug: args.debug, + fdbHost: args.fdb_host, + haxeServer: args.haxe_server, + noBuild: args.no_build, + noFdb: args.no_fdb, + }); })); }}); @@ -89,7 +96,11 @@ cmd.setDefaults({action: function (args) { catchErrors( flambe.loadConfig(args.config) .then(function (config) { - return flambe.build(config, args.platforms, {debug: args.debug, fdbHost: args.fdb_host}); + return flambe.build(config, args.platforms, { + debug: args.debug, + fdbHost: args.fdb_host, + haxeServer: args.haxe_server, + }); })); }}); @@ -115,6 +126,19 @@ cmd.setDefaults({action: function () { })); }}); +var cmd = commands.addParser("haxe-flags", {help: "Show Haxe compiler completion flags.", + description: "For IDE implementors, prints flags that can be passed to the Haxe compiler for code completion." +}); +cmd.addArgument(["platform"], {metavar: "platform", nargs: "?", + help: "A platform to target. Choose from " + flambe.PLATFORMS.join(", ") + ". If omitted, 'default_platform' from flambe.yaml will be used."}); +cmd.setDefaults({action: function () { + catchErrors( + flambe.loadConfig(args.config) + .then(function (config) { + console.log(flambe.getHaxeFlags(config, args.platform).join("\n")); + })); +}}); + var cmd = commands.addParser("update", {help: "Update to the latest Flambe version.", description: "Upgrade to the latest version of Flambe, or downgrade to an earlier version. This command should be run as root/Administrator.", aliases: ["upgrade"]}); diff --git a/command/index.js b/command/index.js index b54b3cdf..d29887e0 100644 --- a/command/index.js +++ b/command/index.js @@ -18,7 +18,10 @@ var HAXE_COMPILER_PORT = 6000; var HTTP_PORT = 7000; var SOCKET_PORT = HTTP_PORT+1; -exports.PLATFORMS = ["html", "flash", "android", "ios"]; +// The minimum SWF version for browser Flash. For AIR, we always use the latest +var SWF_VERSION = "11.2"; + +exports.PLATFORMS = ["html", "flash", "android", "ios", "firefox"]; exports.VERSION = JSON.parse(fs.readFileSync(__dirname + "/package.json")).version; @@ -30,7 +33,12 @@ exports.loadConfig = function (file) { }) .then(function (text) { var yaml = require("js-yaml"); - return yaml.safeLoad(text.toString()); + // yaml barfs on tab indentation, replace with spaces. This can lead to problems with + // mixed tabs/spaces on multiline values though... + var converted = text.toString().replace(/^\t+/gm, function (tabs) { + return tabs.replace(/\t/g, " "); + }); + return yaml.safeLoad(converted); }); return promise; }; @@ -99,6 +107,10 @@ exports.run = function (config, platform, opts) { return p; }) break; + + case "firefox": + console.log("Open "+path.resolve("build/firefox")+" from about:app-manager in Firefox."); + return Q.resolve(); } }; @@ -176,39 +188,56 @@ exports.build = function (config, platforms, opts) { return flags; }; + var buildJS = function (opts) { + var target = opts.target; + var outputDir = opts.outputDir; + var assetFlags = opts.assetFlags; + + var assetDir = outputDir + "/assets"; + var unminified = CACHE_DIR + target + ".unminified.js"; + var js = outputDir + "/targets/main-" + target + ".js"; + + wrench.mkdirSyncRecursive(outputDir); + + var jsFlags = ["-D", target, "-D", "js-es5", "-D", "js-flatten"]; + var flags = commonFlags.concat(jsFlags).concat(assetFlags); + if (debug) { + return haxe(flags.concat(["-D", "source-map-content", "-js", js])); + } else { + // Minify release builds + return haxe(flags.concat(["-js", unminified])) + .then(function () { + return minify([unminified], js, {strict: true}); + }) + .then(function () { + // Delete the source map file produced by debug builds + return Q.nfcall(fs.unlink, js+".map") + .catch(function () { + // Ignore errors + }); + }); + } + }; + var buildHtml = function () { - var htmlFlags = ["-D", "html", "-D", "js-flatten"]; - var unminified = CACHE_DIR+"main-html.unminified.js"; - var js = "build/web/targets/main-html.js"; + var outputDir = "build/web"; - return prepareWeb() - .then(function () { return prepareAssets("build/web/assets") }) + return prepareWeb(outputDir) + .then(function () { return prepareAssets(outputDir+"/assets") }) .then(function (assetFlags) { - console.log("Building: " + js); - var flags = commonFlags.concat(assetFlags).concat(htmlFlags); - if (debug) { - return haxe(flags.concat(["-js", js])); - } else { - // Minify release builds - return haxe(flags.concat(["-js", unminified])) - .then(function () { - return minify([unminified], js, {strict: true}); - }) - .then(function () { - // Delete the source map file produced by debug builds - return Q.nfcall(fs.unlink, js+".map") - .catch(function () { - // Ignore errors - }); - }); - } + console.log("Building: " + outputDir); + return buildJS({ + target: "html", + outputDir: outputDir, + assetFlags: assetFlags, + }); }); }; var buildFlash = function () { var swf = "build/web/targets/main-flash.swf"; var flashFlags = swfFlags(false).concat([ - "-swf-version", "11", "-swf", swf]); + "-swf-version", SWF_VERSION, "-swf", swf]); return prepareWeb() .then(function () { return prepareAssets("build/web/assets") }) @@ -231,7 +260,7 @@ exports.build = function (config, platforms, opts) { var generateAirXml = function (swf, output) { var xmldom = require("xmldom"); var xml = - "\n" + + "\n" + " "+get(config, "id")+"\n" + " "+get(config, "version")+"\n" + " "+get(config, "name")+"\n" + @@ -254,6 +283,7 @@ exports.build = function (config, platforms, opts) { " \n" + + " high\n" + " \n" + ""; var doc = new xmldom.DOMParser().parseFromString(xml); @@ -316,15 +346,20 @@ exports.build = function (config, platforms, opts) { console.log("Building: " + apk); var swf = "main-android.swf"; - var cert = CACHE_DIR+"air/certificate-android.p12"; var xml = CACHE_DIR+"air/config-android.xml"; + var cert = "certs/android.p12"; + var password = get(config, "android password", "password"); + return buildAir(["-D", "android", "-swf", CACHE_DIR+"air/"+swf]) .then(function () { - // Generate a dummy certificate if it doesn't exist if (!fs.existsSync(cert)) { - return adt(["-certificate", "-cn", "SelfSign", "-validityPeriod", "25", "2048-RSA", - cert, "password"]); + // Generate a dummy certificate if it doesn't exist + cert = CACHE_DIR+"air/certificate-android.p12"; + if (!fs.existsSync(cert)) { + return adt(["-certificate", "-cn", "SelfSign", "-validityPeriod", "25", + "2048-RSA", cert, password]); + } } }) .then(function () { @@ -337,10 +372,13 @@ exports.build = function (config, platforms, opts) { } else { androidFlags.push("-target", "apk-captive-runtime"); } - androidFlags.push("-storetype", "pkcs12", "-keystore", cert, "-storepass", "password", - apk, xml); + androidFlags.push("-storetype", "pkcs12", "-keystore", cert, + "-storepass", password, apk, xml); androidFlags = androidFlags.concat(pathOptions); androidFlags.push("-C", CACHE_DIR+"air", swf, "assets"); + if (fs.existsSync("android")) { + androidFlags.push("-C", "android", "."); + } return adt(androidFlags); }); }; @@ -365,26 +403,75 @@ exports.build = function (config, platforms, opts) { } else { iosFlags.push("-target", "ipa-ad-hoc"); } - // TODO(bruno): Make these cert options configurable - iosFlags.push("-storetype", "pkcs12", "-keystore", cert, "-storepass", "password", - "-provisioning-profile", mobileProvision, ipa, xml); + iosFlags.push("-storetype", "pkcs12", "-keystore", cert, + "-storepass", get(config, "ios password", "password"), + "-provisioning-profile", mobileProvision, + "-useLegacyAOT", "yes", // https://github.com/ncannasse/hxsl/issues/32 + ipa, xml); iosFlags = iosFlags.concat(pathOptions); iosFlags.push("-C", CACHE_DIR+"air", swf, "assets"); + if (fs.existsSync("ios")) { + iosFlags.push("-C", "ios", "."); + } return adt(iosFlags); }); }; + var buildFirefox = function () { + var outputDir = "build/firefox"; + wrench.mkdirSyncRecursive(outputDir+"/targets"); + + return prepareAssets(outputDir+"/assets") + .then(function (assetFlags) { + console.log("Building: " + outputDir); + return buildJS({ + target: "firefox", + outputDir: outputDir, + assetFlags: assetFlags, + }); + }) + .then(function () { + return copyDirs(DATA_DIR+"firefox", outputDir); + }) + .then(function () { + if (fs.existsSync("icons")) { + return copyDirs("icons", outputDir+"/icons"); + } + }) + .then(function () { + var manifest = { + name: get(config, "name"), + description: get(config, "description"), + developer: { + name: get(config, "developer name"), + url: get(config, "developer url"), + }, + version: get(config, "version"), + launch_path: "/index.html", + orientation: get(config, "orientation", "portrait").toLowerCase() == "portrait" ? + ["portrait", "portrait-secondary"] : ["landscape", "landscape-secondary"], + fullscreen: ""+get(config, "fullscreen", true), + icons: {}, + }; + findIcons("icons").forEach(function (icon) { + manifest.icons[icon.size] = "/"+icon.image; + }); + + // Copy any additional fields into manifest from 2DKit.yaml + clone(get(config, "firefox manifest.webapp", {}), manifest); + + fs.writeFileSync(outputDir+"/manifest.webapp", JSON.stringify(manifest)); + }); + }; + wrench.mkdirSyncRecursive(CACHE_DIR); - var connectFlags = ["--connect", HAXE_COMPILER_PORT]; + var connectFlags = ["--connect", opts.haxeServer || HAXE_COMPILER_PORT]; return haxe(connectFlags, {check: false, verbose: false, output: false}) .then(function (code) { - // Hide the compilation server behind an environment variable for now until stable - if ("FLAMBE_HAXE_SERVER" in process.env) { - // Use a Haxe compilation server if available - if (code == 0) { - commonFlags = commonFlags.concat(connectFlags); - } + // Use a Haxe compilation server if available + if (code == 0) { + commonFlags = commonFlags.concat(connectFlags); } commonFlags.push("-main", get(config, "main")); @@ -406,6 +493,7 @@ exports.build = function (config, platforms, opts) { flash: buildFlash, android: buildAndroid, ios: buildIos, + firefox: buildFirefox, }; var promise = Q(); platforms.forEach(function (platform, idx) { @@ -544,6 +632,48 @@ var fdb = function (commands) { }; exports.fdb = fdb; +var getHaxeFlags = function (config, platform) { + if (platform == null) { + platform = get(config, "default_platform", "flash"); + } + checkPlatforms([platform]); + + var flags = [ + "-main", get(config, "main"), + "-lib", "flambe", + "-swf-version", SWF_VERSION, + "-D", "flash-strict", + "--no-output", + ]; + + switch (platform) { + case "android": case "ios": + flags.push("-D", "air"); + // Fall through + case "flash": + flags.push("-swf", "no-output.swf"); + break; + default: + flags.push("-js", "no-output.js"); + break; + } + if (platform != "flash") { + flags.push("-D", platform); + } + + flags = flags.concat(toArray(get(config, "haxe_flags", []))); + getAllPaths(config, "src").forEach(function (srcPath) { + flags.push("-cp", srcPath); + }); + getAllPaths(config, "libs").forEach(function (libPath) { + forEachFileIn(libPath, function (file) { + flags.push("-swf-lib-extern", libPath+"/"+file); + }); + }); + return flags; +} +exports.getHaxeFlags = getHaxeFlags; + var Server = function () { }; exports.Server = Server; @@ -551,15 +681,17 @@ exports.Server = Server; Server.prototype.start = function () { var self = this; var connect = require("connect"); + var bodyParser = require("body-parser"); + var logger = require("morgan"); + var compression = require("compression"); + var serveStatic = require("serve-static"); + var http = require("http"); var url = require("url"); var websocket = require("websocket"); - // Hide the compilation server behind an environment variable for now until stable - if ("FLAMBE_HAXE_SERVER" in process.env) { - // Fire up a Haxe compiler server, ignoring all output. It's fine if this command fails, the - // build will fallback to not using a compiler server - spawn("haxe", ["--wait", HAXE_COMPILER_PORT], {stdio: "ignore"}); - } + // Fire up a Haxe compiler server, ignoring all output. It's fine if this command fails, the + // build will fallback to not using a compiler server + spawn("haxe", ["--wait", HAXE_COMPILER_PORT], {stdio: "ignore"}); // Start a static HTTP server var host = "0.0.0.0"; @@ -589,9 +721,9 @@ Server.prototype.start = function () { next(); } }) - .use(connect.logger("tiny")) - .use(connect.compress()) - .use(connect.static("build/web")) + .use(logger("tiny")) + .use(compression()) + .use(serveStatic("build/web")) .listen(HTTP_PORT, host); console.log("Serving on http://localhost:%s", HTTP_PORT); @@ -784,3 +916,27 @@ var getIP = function () { } return ip; }; + +var clone = function (from, into) { + into = into || {}; + for (var key in from) { + into[key] = from[key]; + } + return into; +}; + +var findIcons = function (dir) { + var icons = []; + fs.readdirSync(dir).forEach(function (file) { + // Only include properly named square icons + var match = file.match(/^(\d+)x\1\.png$/); + if (match) { + icons.push({ + size: match[1], + image: dir+"/"+file, + }); + } + // TODO(bruno): Warn if not matched? + }); + return icons; +}; diff --git a/command/package-lock.json b/command/package-lock.json new file mode 100644 index 00000000..7ad36c54 --- /dev/null +++ b/command/package-lock.json @@ -0,0 +1,585 @@ +{ + "name": "flambe", + "version": "4.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "adm-zip": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.4.tgz", + "integrity": "sha512-GMQg1a1cAegh+/EgWbz+XHZrwB467iB/IgtToldvxs7Xa5Br8mPmvCeRfY/Un2fLzrlIPt6Yu7Cej+8Ut9TGPg==" + }, + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "requires": { + "underscore": "~1.7.0", + "underscore.string": "~2.4.0" + } + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + } + } + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + } + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" + }, + "mime-types": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "requires": { + "mime-db": "1.46.0" + } + }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "ncp": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "open": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.0.0.tgz", + "integrity": "sha512-/yb5mVZBz7mHLySMiSj2DcLtMBbFPJk5JBKEkHVZFxZAPzeg3L026O0T+lbdz1B2nyDnkClRSwRQJdeVUIF7zw==", + "requires": { + "is-wsl": "^1.1.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "q": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/q/-/q-0.9.7.tgz", + "integrity": "sha1-TeLmyzspCIyeTLwDv51C+5bOL3U=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + }, + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utf-8-validate": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz", + "integrity": "sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "watch": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.8.0.tgz", + "integrity": "sha1-G7DupT3v5uYh6cjGPANYAH7L28w=" + }, + "websocket": { + "version": "1.0.33", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.33.tgz", + "integrity": "sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "wrench": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/wrench/-/wrench-1.5.9.tgz", + "integrity": "sha1-QRaRxjqbJTGxcAJnJ5veyiOyFCo=" + }, + "xmldom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==" + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + } + } +} diff --git a/command/package.json b/command/package.json index 93a2b85e..d7085f78 100644 --- a/command/package.json +++ b/command/package.json @@ -1,27 +1,58 @@ { + "_from": "flambe", + "_id": "flambe@4.1.0", + "_inBundle": false, + "_integrity": "sha1-L44sQRTj+2iMQqRMmE4cU4mLew4=", + "_location": "/flambe", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "flambe", + "name": "flambe", + "escapedName": "flambe", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/flambe/-/flambe-4.1.0.tgz", + "_shasum": "2f8e2c4114e3fb688c42a44c984e1c53898b7b0e", + "_spec": "flambe", + "_where": "H:\\Work\\Nick\\Arcade", "author": { - "email": "b@aduros.com", "name": "Bruno Garcia", + "email": "b@aduros.com", "url": "https://twitter.com/b_garcia" }, - "bin": "flambe.js", + "bin": { + "flambe": "flambe.js" + }, "bugs": { - "email": "flambe@googlegroups.com", - "url": "https://github.com/aduros/flambe/issues" + "url": "https://github.com/aduros/flambe/issues", + "email": "flambe@googlegroups.com" }, + "bundleDependencies": false, "dependencies": { - "adm-zip": "~0.4.3", + "adm-zip": "~0.5.2", "argparse": "~0.1.15", - "connect": "~2.8.3", - "js-yaml": "~2.1.0", + "body-parser": "^1.19.0", + "compression": "^1.7.4", + "connect": "^3.7.0", + "js-yaml": "~3.13.1", + "morgan": "^1.10.0", "ncp": "~0.4.2", - "open": "~0.0.3", + "open": "~6.0.0", "q": "~0.9.6", + "serve-static": "^1.14.1", "watch": "~0.8.0", - "websocket": "~1.0.8", + "websocket": "^1.0.33", "wrench": "~1.5.1", - "xmldom": "~0.1.16" + "xmldom": "~0.5.0" }, + "deprecated": false, "description": "Rapidly cook up games for HTML5 and Flash.", "engines": { "node": ">=0.8.0" @@ -31,6 +62,9 @@ "main": "index.js", "name": "flambe", "preferGlobal": true, - "repository": "https://github.com/aduros/flambe", - "version": "3.1.1" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/aduros/flambe.git" + }, + "version": "4.1.0" +}