Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
+2
-2
| { | ||
| "name": "elm-hot", | ||
| "version": "1.0.1", | ||
| "version": "1.1.0", | ||
| "description": "Hot code swapping for Elm", | ||
@@ -31,5 +31,5 @@ "keywords": [ | ||
| "express": "^4.16.3", | ||
| "puppeteer": "^1.5.0", | ||
| "puppeteer": "^1.17.0", | ||
| "tap-xunit": "^2.3.0" | ||
| } | ||
| } |
+17
-10
@@ -54,3 +54,3 @@ //////////////////// HMR BEGIN //////////////////// | ||
| if (Object.keys(instances).length === 0) { | ||
| console.log("[elm-hot] Enabled"); | ||
| log("[elm-hot] Enabled"); | ||
| } | ||
@@ -79,3 +79,3 @@ | ||
| if (cancellers.length) { | ||
| console.log('[elm-hot] Killing ' + cancellers.length + ' running processes...'); | ||
| log('[elm-hot] Killing ' + cancellers.length + ' running processes...'); | ||
| try { | ||
@@ -91,2 +91,8 @@ cancellers.forEach(function (cancel) { | ||
| function log(message) { | ||
| if (module.hot.verbose) { | ||
| console.log(message) | ||
| } | ||
| } | ||
| function getId() { | ||
@@ -154,2 +160,3 @@ return ++uid; | ||
| dummyNode.setAttribute("data-elm-hot", "true"); | ||
| dummyNode.style.height = "inherit"; | ||
| var parentNode = node.parentNode; | ||
@@ -193,3 +200,3 @@ parentNode.replaceChild(dummyNode, node); | ||
| function swap(Elm, instance) { | ||
| console.log('[elm-hot] Hot-swapping module: ' + instance.path); | ||
| log('[elm-hot] Hot-swapping module: ' + instance.path); | ||
@@ -226,3 +233,3 @@ swappingInstance = instance; | ||
| } | ||
| console.log('[elm-hot] Reconnect ' + handlers.length + ' handler(s) to port \'' | ||
| log('[elm-hot] Reconnect ' + handlers.length + ' handler(s) to port \'' | ||
| + portName + '\' (' + instance.path + ').'); | ||
@@ -234,3 +241,3 @@ handlers.forEach(function (handler) { | ||
| delete instance.portSubscribes[portName]; | ||
| console.log('[elm-hot] Port was removed: ' + portName); | ||
| log('[elm-hot] Port was removed: ' + portName); | ||
| } | ||
@@ -241,11 +248,11 @@ }); | ||
| if (portName in elm.ports && 'send' in elm.ports[portName]) { | ||
| console.log('[elm-hot] Replace old port send with the new send'); | ||
| log('[elm-hot] Replace old port send with the new send'); | ||
| instance.portSends[portName] = elm.ports[portName].send; | ||
| } else { | ||
| delete instance.portSends[portName]; | ||
| console.log('[elm-hot] Port was removed: ' + portName); | ||
| log('[elm-hot] Port was removed: ' + portName); | ||
| } | ||
| }); | ||
| } else { | ||
| console.log('[elm-hot] Module was removed: ' + instance.path); | ||
| log('[elm-hot] Module was removed: ' + instance.path); | ||
| } | ||
@@ -271,3 +278,3 @@ | ||
| subscribe: function (handler) { | ||
| console.log('[elm-hot] ports.' + portName + '.subscribe called.'); | ||
| log('[elm-hot] ports.' + portName + '.subscribe called.'); | ||
| if (!portSubscribes[portName]) { | ||
@@ -282,3 +289,3 @@ portSubscribes[portName] = [handler]; | ||
| unsubscribe: function (handler) { | ||
| console.log('[elm-hot] ports.' + portName + '.unsubscribe called.'); | ||
| log('[elm-hot] ports.' + portName + '.unsubscribe called.'); | ||
| var list = portSubscribes[portName]; | ||
@@ -285,0 +292,0 @@ if (list && list.indexOf(handler) !== -1) { |
+3
-1
@@ -58,5 +58,7 @@ /* | ||
| module.hot.data = newData | ||
| } | ||
| }, | ||
| verbose: true | ||
| } | ||
| }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
847
0.83%454256
-1.96%83
-2.35%