jscrambler-metro-plugin
Advanced tools
Comparing version 6.0.1 to 6.0.3
@@ -259,2 +259,4 @@ const {copy, emptyDir, mkdirp, readFile, writeFile} = require('fs-extra'); | ||
const bundlePath = getBundlePath(); | ||
// make sure jscrambler-metro-plugin is properly configure on metro bundler | ||
let calledByMetro = false; | ||
const fileNames = new Set(); | ||
@@ -276,2 +278,6 @@ const sourceMapFiles = []; | ||
try{ | ||
if (!calledByMetro) { | ||
throw new Error('*jscrambler-metro-plugin* was not properly configured on metro.config.js file. Please verify our documentation in https://docs.jscrambler.com/code-integrity/frameworks-and-libraries/react-native/integration.'); | ||
} | ||
console.log( | ||
@@ -302,2 +308,4 @@ instrument | ||
processModuleFilter(_module) { | ||
calledByMetro = true; | ||
const modulePath = _module.path; | ||
@@ -304,0 +312,0 @@ const shouldSkipModule = !validateModule(modulePath, config, projectRoot); |
@@ -228,6 +228,6 @@ const fs = require('fs'); | ||
const addBundleArgsToExcludeList = (chunk, excludeList) => { | ||
const regex = /\(([0-9a-zA-Z_,]+)\){$/gm; | ||
const regex = /\(([0-9a-zA-Z_,$ ]+)\)[ ]?{$/gm; | ||
const m = regex.exec(chunk); | ||
if (Array.isArray(m) && m.length > 1) { | ||
for (const arg of m[1].split(",")) { | ||
for (const arg of m[m.length - 1].split(",")) { | ||
if (!excludeList.includes(arg)) { | ||
@@ -234,0 +234,0 @@ excludeList.push(arg); |
{ | ||
"name": "jscrambler-metro-plugin", | ||
"version": "6.0.1", | ||
"version": "6.0.3", | ||
"description": "A plugin to use metro with Jscrambler", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27680
718