From 3e435ecbf824f9d1dd3f424827969cb918b01c73 Mon Sep 17 00:00:00 2001 From: calebboyd Date: Sun, 13 Aug 2017 17:33:09 -0500 Subject: [PATCH] chore: beta 6 --- package.json | 2 +- src/compiler.ts | 4 ++++ src/options.ts | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index da1ff68..678d887 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nexe", "description": "Create a single executable out of your Node.js application", "license": "MIT", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.6", "contributors": [ "Craig Condon (http://crcn.io)", "Jared Allard ", diff --git a/src/compiler.ts b/src/compiler.ts index dbc7b04..09a9e00 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -231,6 +231,10 @@ export class NexeCompiler { const contents = inflate(this._getPayload(header), +header.paddingSize) + tail const file = await compiler.readFileAsync('lib/_third_party_main.js') file.contents += '\n' + contents + const mod = Buffer.byteLength(file.contents) % 16 + if (mod) { + file.contents += ' '.repeat(16 - mod) + } } async compileAsync() { diff --git a/src/options.ts b/src/options.ts index 6938ad2..fd64f9a 100644 --- a/src/options.ts +++ b/src/options.ts @@ -104,7 +104,8 @@ const alias = { l: 'loglevel' } const argv = parseArgv(process.argv, { alias, default: defaults }) -const help = ` +const help = + ` nexe --help CLI OPTIONS -b --build -- build from source @@ -131,7 +132,7 @@ nexe --help CLI OPTIONS --silent -- disable logging --verbose -- set logging to verbose - -* variable key name * option can be used more than once`.trim() + '\n' + -* variable key name * option can be used more than once`.trim() + EOL function flattenFilter(...args: any[]): string[] { return ([] as string[]).concat(...args).filter(x => x) @@ -182,7 +183,7 @@ function extractName(options: NexeOptions) { function normalizeOptionsAsync(input: Partial) { if (argv.help || argv._.some((x: string) => x === 'version')) { - process.stderr.write(argv.help ? help : '2.0.0-beta.4' + EOL, () => process.exit(0)) + process.stderr.write(argv.help ? help : '2.0.0-beta.6' + EOL, () => process.exit(0)) } const options = Object.assign({}, defaults, input) as NexeOptions