isolated-externals-plugin
Advanced tools
Comparing version 2.1.0-refactor-externals-ee5e344.4 to 2.1.0
@@ -44,4 +44,5 @@ "use strict"; | ||
var schema_utils_1 = require("schema-utils"); | ||
var path_1 = __importDefault(require("path")); | ||
var externalsClasses_1 = require("./util/externalsClasses"); | ||
var path_1 = __importDefault(require("path")); | ||
var proxy_1 = require("./util/proxy"); | ||
var configSchema = { | ||
@@ -65,17 +66,4 @@ type: 'object', | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
var createGetProxy = function (orig, get) { | ||
return new Proxy({}, { | ||
get: function (target, key) { | ||
var args = []; | ||
for (var _i = 2; _i < arguments.length; _i++) { | ||
args[_i - 2] = arguments[_i]; | ||
} | ||
return get(target, key) || | ||
Reflect.get.apply(Reflect, __spreadArray([orig, key], __read(args), false)); | ||
}, | ||
}); | ||
}; | ||
var getPassthroughCompiler = function (compiler, normalModuleFactory, factorizeAsyncMock) { | ||
var nmfFactorizeProxy = createGetProxy(normalModuleFactory.hooks.factorize, function (target, key) { | ||
var nmfFactorizeProxy = (0, proxy_1.createGetProxy)(normalModuleFactory.hooks.factorize, function (target, key) { | ||
if (key === 'tapAsync') { | ||
@@ -85,3 +73,3 @@ return function (name, cb) { return factorizeAsyncMock(cb); }; | ||
}); | ||
var nmfHooksProxy = createGetProxy(normalModuleFactory.hooks, function (target, key) { | ||
var nmfHooksProxy = (0, proxy_1.createGetProxy)(normalModuleFactory.hooks, function (target, key) { | ||
if (key === 'factorize') { | ||
@@ -91,3 +79,3 @@ return nmfFactorizeProxy; | ||
}); | ||
var nmfProxy = createGetProxy(normalModuleFactory, function (target, key) { | ||
var nmfProxy = (0, proxy_1.createGetProxy)(normalModuleFactory, function (target, key) { | ||
if (key === 'hooks') { | ||
@@ -97,3 +85,3 @@ return nmfHooksProxy; | ||
}); | ||
var compileProxy = createGetProxy(compiler.hooks.compile, function (target, key) { | ||
var compileProxy = (0, proxy_1.createGetProxy)(compiler.hooks.compile, function (target, key) { | ||
if (key === 'tap') { | ||
@@ -105,3 +93,3 @@ return (function (name, fn) { | ||
}); | ||
var compilerHooksProxy = createGetProxy(compiler.hooks, function (target, key) { | ||
var compilerHooksProxy = (0, proxy_1.createGetProxy)(compiler.hooks, function (target, key) { | ||
if (key === 'compile') { | ||
@@ -111,3 +99,3 @@ return compileProxy; | ||
}); | ||
var stubbedCompiler = createGetProxy(compiler, function (target, key) { | ||
var stubbedCompiler = (0, proxy_1.createGetProxy)(compiler, function (target, key) { | ||
if (key === 'hooks') { | ||
@@ -114,0 +102,0 @@ return compilerHooksProxy; |
{ | ||
"name": "isolated-externals-plugin", | ||
"version": "2.1.0-refactor-externals-ee5e344.4", | ||
"version": "2.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
53369
20
1005
0