Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c9c9b5a0a3 |
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nexe",
|
"name": "nexe",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "nexe",
|
"name": "nexe",
|
||||||
"description": "Create a single executable out of your Node.js application",
|
"description": "Create a single executable out of your Node.js application",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
|
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
|
||||||
"Jared Allard <jaredallard@outlook.com>",
|
"Jared Allard <jaredallard@outlook.com>",
|
||||||
|
|||||||
+6
-5
@@ -31,14 +31,15 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) {
|
|||||||
}
|
}
|
||||||
originalFsMethods = Object.assign({}, fs)
|
originalFsMethods = Object.assign({}, fs)
|
||||||
nexeBinary = binary
|
nexeBinary = binary
|
||||||
const { blobPath, resources: manifest } = binary
|
const { blobPath, resources: manifest } = binary,
|
||||||
const { resourceStart, stat } = binary.layout
|
{ resourceStart, stat } = binary.layout,
|
||||||
const directories: { [key: string]: { [key: string]: boolean } } = {},
|
directories: { [key: string]: { [key: string]: boolean } } = {},
|
||||||
notAFile = '!@#$%^&*',
|
notAFile = '!@#$%^&*',
|
||||||
isWin = process.platform.startsWith('win'),
|
isWin = process.platform.startsWith('win'),
|
||||||
isString = (x: any): x is string => typeof x === 'string' || x instanceof String,
|
isString = (x: any): x is string => typeof x === 'string' || x instanceof String,
|
||||||
noop = () => {},
|
noop = () => {},
|
||||||
path = require('path')
|
path = require('path'),
|
||||||
|
baseDir = path.dirname(process.execPath)
|
||||||
|
|
||||||
let log = (text: string) => true
|
let log = (text: string) => true
|
||||||
if ((process.env.DEBUG || '').toLowerCase().includes('nexe:require')) {
|
if ((process.env.DEBUG || '').toLowerCase().includes('nexe:require')) {
|
||||||
@@ -52,7 +53,7 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) {
|
|||||||
if (!isString(filepath)) {
|
if (!isString(filepath)) {
|
||||||
return notAFile
|
return notAFile
|
||||||
}
|
}
|
||||||
let key = path.resolve(filepath)
|
let key = path.resolve(baseDir, filepath)
|
||||||
|
|
||||||
if (isWin && key.substr(1, 2) === ':\\') {
|
if (isWin && key.substr(1, 2) === ':\\') {
|
||||||
key = key[0].toUpperCase() + key.substr(1)
|
key = key[0].toUpperCase() + key.substr(1)
|
||||||
|
|||||||
+5
-1
@@ -22,7 +22,11 @@ export default function(compiler: NexeCompiler, next: () => Promise<void>) {
|
|||||||
compiler.shims.push(
|
compiler.shims.push(
|
||||||
wrap(`
|
wrap(`
|
||||||
if (!process.send) {
|
if (!process.send) {
|
||||||
process.argv.splice(1,0, require.resolve(${JSON.stringify(compiler.entrypoint)}))
|
const path = require('path')
|
||||||
|
const entry = path.resolve(path.dirname(process.execPath),${JSON.stringify(
|
||||||
|
compiler.entrypoint
|
||||||
|
)})
|
||||||
|
process.argv.splice(1,0, entry)
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user