├── .gitignore ├── .travis.yml ├── License ├── Makefile ├── Readme.md ├── lib ├── builtin_modules.json └── sandboxed_module.js ├── package.json ├── scripts └── generate_builtin_modules_list.js └── test ├── fixture ├── bar.js ├── baz.js ├── builtinModules.js ├── coffeeClass.coffee ├── coreModule.js ├── criss.js ├── cross.js ├── exports.js ├── folder │ └── zap.js ├── foo.js ├── global.js ├── globalConstructors.js ├── globalVars.js ├── includeJson.js ├── json.json ├── jsonArray.json ├── leak.js ├── litcoffeeClass.litcoffee ├── local.js ├── moduleModule.js ├── moreGlobal.js ├── nativeStub.node ├── parent.js ├── recursiveNative.js ├── recursiveSourceTransformer.js ├── require.js ├── resolve.js ├── shebang.js └── stayStrict.js ├── integration ├── test-all-builtin-modules.js ├── test-basic.js ├── test-caching.js ├── test-coffee.js ├── test-configure.js ├── test-custom-source-transformer.js ├── test-exports.js ├── test-global-constructors.js ├── test-global-injection.js ├── test-global.js ├── test-istanbul.js ├── test-litcoffee.js ├── test-local-injection.js ├── test-local.js ├── test-module-module.js ├── test-native.js ├── test-parent.js ├── test-recursive-core-modules.js ├── test-recursive-crossed.js ├── test-recursive-disabled-source-transformer.js ├── test-recursive-disabled.js ├── test-recursive-global.js ├── test-recursive-json-resolve.js ├── test-recursive-json.js ├── test-recursive-native.js ├── test-recursive-source-transformer-disabled.js ├── test-recursive-source-transformer.js ├── test-recursive.js ├── test-require-injection.js ├── test-require.js ├── test-shebang.js └── test-stay-strict.js └── run.js /.gitignore: -------------------------------------------------------------------------------- 1 | *.un~ 2 | /node_modules 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/.travis.yml -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/License -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/Makefile -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/Readme.md -------------------------------------------------------------------------------- /lib/builtin_modules.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/lib/builtin_modules.json -------------------------------------------------------------------------------- /lib/sandboxed_module.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/lib/sandboxed_module.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/package.json -------------------------------------------------------------------------------- /scripts/generate_builtin_modules_list.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/scripts/generate_builtin_modules_list.js -------------------------------------------------------------------------------- /test/fixture/bar.js: -------------------------------------------------------------------------------- 1 | module.exports = 'bar'; 2 | -------------------------------------------------------------------------------- /test/fixture/baz.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/baz.js -------------------------------------------------------------------------------- /test/fixture/builtinModules.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/builtinModules.js -------------------------------------------------------------------------------- /test/fixture/coffeeClass.coffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/coffeeClass.coffee -------------------------------------------------------------------------------- /test/fixture/coreModule.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/coreModule.js -------------------------------------------------------------------------------- /test/fixture/criss.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/criss.js -------------------------------------------------------------------------------- /test/fixture/cross.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/cross.js -------------------------------------------------------------------------------- /test/fixture/exports.js: -------------------------------------------------------------------------------- 1 | module.exports = 'overwritten'; 2 | -------------------------------------------------------------------------------- /test/fixture/folder/zap.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/folder/zap.js -------------------------------------------------------------------------------- /test/fixture/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/foo.js -------------------------------------------------------------------------------- /test/fixture/global.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/global.js -------------------------------------------------------------------------------- /test/fixture/globalConstructors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/globalConstructors.js -------------------------------------------------------------------------------- /test/fixture/globalVars.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/globalVars.js -------------------------------------------------------------------------------- /test/fixture/includeJson.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/includeJson.js -------------------------------------------------------------------------------- /test/fixture/json.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/json.json -------------------------------------------------------------------------------- /test/fixture/jsonArray.json: -------------------------------------------------------------------------------- 1 | ["foo", "bar"] 2 | -------------------------------------------------------------------------------- /test/fixture/leak.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/leak.js -------------------------------------------------------------------------------- /test/fixture/litcoffeeClass.litcoffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/litcoffeeClass.litcoffee -------------------------------------------------------------------------------- /test/fixture/local.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/local.js -------------------------------------------------------------------------------- /test/fixture/moduleModule.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/moduleModule.js -------------------------------------------------------------------------------- /test/fixture/moreGlobal.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/moreGlobal.js -------------------------------------------------------------------------------- /test/fixture/nativeStub.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/nativeStub.node -------------------------------------------------------------------------------- /test/fixture/parent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/parent.js -------------------------------------------------------------------------------- /test/fixture/recursiveNative.js: -------------------------------------------------------------------------------- 1 | module.exports = require(__dirname + '/./nativeStub'); -------------------------------------------------------------------------------- /test/fixture/recursiveSourceTransformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/recursiveSourceTransformer.js -------------------------------------------------------------------------------- /test/fixture/require.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/require.js -------------------------------------------------------------------------------- /test/fixture/resolve.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/resolve.js -------------------------------------------------------------------------------- /test/fixture/shebang.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/fixture/shebang.js -------------------------------------------------------------------------------- /test/fixture/stayStrict.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function () { 4 | return this; 5 | }; 6 | -------------------------------------------------------------------------------- /test/integration/test-all-builtin-modules.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-all-builtin-modules.js -------------------------------------------------------------------------------- /test/integration/test-basic.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-basic.js -------------------------------------------------------------------------------- /test/integration/test-caching.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-caching.js -------------------------------------------------------------------------------- /test/integration/test-coffee.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-coffee.js -------------------------------------------------------------------------------- /test/integration/test-configure.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-configure.js -------------------------------------------------------------------------------- /test/integration/test-custom-source-transformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-custom-source-transformer.js -------------------------------------------------------------------------------- /test/integration/test-exports.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-exports.js -------------------------------------------------------------------------------- /test/integration/test-global-constructors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-global-constructors.js -------------------------------------------------------------------------------- /test/integration/test-global-injection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-global-injection.js -------------------------------------------------------------------------------- /test/integration/test-global.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-global.js -------------------------------------------------------------------------------- /test/integration/test-istanbul.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-istanbul.js -------------------------------------------------------------------------------- /test/integration/test-litcoffee.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-litcoffee.js -------------------------------------------------------------------------------- /test/integration/test-local-injection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-local-injection.js -------------------------------------------------------------------------------- /test/integration/test-local.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-local.js -------------------------------------------------------------------------------- /test/integration/test-module-module.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-module-module.js -------------------------------------------------------------------------------- /test/integration/test-native.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-native.js -------------------------------------------------------------------------------- /test/integration/test-parent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-parent.js -------------------------------------------------------------------------------- /test/integration/test-recursive-core-modules.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-core-modules.js -------------------------------------------------------------------------------- /test/integration/test-recursive-crossed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-crossed.js -------------------------------------------------------------------------------- /test/integration/test-recursive-disabled-source-transformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-disabled-source-transformer.js -------------------------------------------------------------------------------- /test/integration/test-recursive-disabled.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-disabled.js -------------------------------------------------------------------------------- /test/integration/test-recursive-global.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-global.js -------------------------------------------------------------------------------- /test/integration/test-recursive-json-resolve.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-json-resolve.js -------------------------------------------------------------------------------- /test/integration/test-recursive-json.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-json.js -------------------------------------------------------------------------------- /test/integration/test-recursive-native.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-native.js -------------------------------------------------------------------------------- /test/integration/test-recursive-source-transformer-disabled.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-source-transformer-disabled.js -------------------------------------------------------------------------------- /test/integration/test-recursive-source-transformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive-source-transformer.js -------------------------------------------------------------------------------- /test/integration/test-recursive.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-recursive.js -------------------------------------------------------------------------------- /test/integration/test-require-injection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-require-injection.js -------------------------------------------------------------------------------- /test/integration/test-require.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-require.js -------------------------------------------------------------------------------- /test/integration/test-shebang.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-shebang.js -------------------------------------------------------------------------------- /test/integration/test-stay-strict.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felixge/node-sandboxed-module/HEAD/test/integration/test-stay-strict.js -------------------------------------------------------------------------------- /test/run.js: -------------------------------------------------------------------------------- 1 | require('urun')(__dirname); 2 | --------------------------------------------------------------------------------