Add wrapper functions to mirror old CoffeeScript
This commit is contained in:
parent
78aff6a39f
commit
b547a38b3f
2 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
(function () {
|
||||||
var asar, asarStatsToFsStats, cachedArchives, child_process, fakeTime, getOrCreateArchive, gid, invalidArchiveError, nextInode, notDirError, notFoundError, overrideAPI, overrideAPISync, path, splitPath, uid, util,
|
var asar, asarStatsToFsStats, cachedArchives, child_process, fakeTime, getOrCreateArchive, gid, invalidArchiveError, nextInode, notDirError, notFoundError, overrideAPI, overrideAPISync, path, splitPath, uid, util,
|
||||||
hasProp = {}.hasOwnProperty;
|
hasProp = {}.hasOwnProperty;
|
||||||
|
|
||||||
|
@ -606,3 +607,4 @@ exports.wrapFsWithAsar = function(fs) {
|
||||||
overrideAPISync(fs, 'openSync');
|
overrideAPISync(fs, 'openSync');
|
||||||
return overrideAPISync(child_process, 'execFileSync');
|
return overrideAPISync(child_process, 'execFileSync');
|
||||||
};
|
};
|
||||||
|
})()
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
(function () {
|
||||||
return function(process, require, asarSource) {
|
return function(process, require, asarSource) {
|
||||||
var createArchive, source;
|
var createArchive, source;
|
||||||
createArchive = process.binding('atom_common_asar').createArchive;
|
createArchive = process.binding('atom_common_asar').createArchive;
|
||||||
|
@ -13,3 +14,4 @@ return function(process, require, asarSource) {
|
||||||
source['original-fs'] = source.fs;
|
source['original-fs'] = source.fs;
|
||||||
return source['fs'] = "var src = '(function (exports, require, module, __filename, __dirname) { ' +\n process.binding('natives')['original-fs'] +\n ' });';\nvar vm = require('vm');\nvar fn = vm.runInThisContext(src, { filename: 'fs.js' });\nfn(exports, require, module);\nvar asar = require('ATOM_SHELL_ASAR');\nasar.wrapFsWithAsar(exports);";
|
return source['fs'] = "var src = '(function (exports, require, module, __filename, __dirname) { ' +\n process.binding('natives')['original-fs'] +\n ' });';\nvar vm = require('vm');\nvar fn = vm.runInThisContext(src, { filename: 'fs.js' });\nfn(exports, require, module);\nvar asar = require('ATOM_SHELL_ASAR');\nasar.wrapFsWithAsar(exports);";
|
||||||
};
|
};
|
||||||
|
})()
|
||||||
|
|
Loading…
Reference in a new issue