initial commit
This commit is contained in:
21
node_modules/loophole/index.js
generated
vendored
Normal file
21
node_modules/loophole/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
// Minimal shim for legacy Atom packages running in modern Pulsar/Electron.
|
||||
// The real `loophole` package was historically used to bypass Atom's CSP
|
||||
// restrictions around `eval`/`new Function`. For this package, it's used as:
|
||||
// const loophole = require('loophole'); global.Function = loophole.Function;
|
||||
// So we provide a compatible surface area without pulling the full dependency.
|
||||
|
||||
function passthrough(callback) {
|
||||
if (typeof callback !== 'function') return callback;
|
||||
return callback();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
// Provide the native Function constructor.
|
||||
Function: global.Function,
|
||||
|
||||
// Common loophole API surface (no-op wrappers here).
|
||||
allowUnsafeEval: passthrough,
|
||||
allowUnsafeNewFunction: passthrough,
|
||||
};
|
||||
6
node_modules/loophole/package.json
generated
vendored
Normal file
6
node_modules/loophole/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "loophole",
|
||||
"version": "0.0.0-pulsar-shim",
|
||||
"main": "index.js",
|
||||
"private": true
|
||||
}
|
||||
Reference in New Issue
Block a user