@@ -182,6 +182,2 @@ /* | ||
| var listener = app.listen(process.env.PORT, () => { | ||
| debug("Running on port", listener.address().port); | ||
| }); | ||
| manifestEvents.on("change", changedData => { | ||
@@ -231,2 +227,4 @@ debug("updating manifest in server"); | ||
| }); | ||
| return app; | ||
| }; |
+11
-4
| const Manifest = require("./manifest"); | ||
| const startRouter = require("./router"); | ||
| const Router = require("./router"); | ||
| const path = require("path"); | ||
@@ -10,6 +10,7 @@ const fs = require("fs"); | ||
| const pkg = require("../package"); | ||
| const debug = require("debug")("core"); | ||
| const setupEnvVariables = require("./utils/setupEnvVars"); | ||
| const ISDEV = process.env.NODE_ENV !== "production"; | ||
| module.exports = async function server(sourcePath, cwd) { | ||
| module.exports = async function server(sourcePath, cwd, resolveRouter) { | ||
| setupEnvVariables(sourcePath, cwd); | ||
@@ -25,3 +26,8 @@ | ||
| startRouter(sourcePath, manifest); | ||
| var app = Router(sourcePath, manifest); | ||
| if (!resolveRouter) { | ||
| var listener = app.listen(process.env.PORT, () => { | ||
| debug("Running on port", listener.address().port); | ||
| }); | ||
| } | ||
@@ -63,5 +69,6 @@ // clear any `zero build` configs to avoid confusion | ||
| hasResolved = true; | ||
| resolve(); | ||
| if (resolveRouter) resolve(app); | ||
| else resolve(); | ||
| }); | ||
| }); | ||
| }; |
+6
-6
| { | ||
| "name": "zero", | ||
| "version": "1.1.19", | ||
| "version": "1.1.20", | ||
| "description": "", | ||
@@ -28,6 +28,6 @@ "main": "lib/index.js", | ||
| "yarn": ">=1.17.3", | ||
| "zero-builder-process": "^1.1.19", | ||
| "zero-builders-map": "^1.1.19", | ||
| "zero-dep-tree-js": "^1.1.17", | ||
| "zero-handlers-map": "^1.1.17" | ||
| "zero-builder-process": "^1.1.20", | ||
| "zero-builders-map": "^1.1.20", | ||
| "zero-dep-tree-js": "^1.1.20", | ||
| "zero-handlers-map": "^1.1.20" | ||
| }, | ||
@@ -39,3 +39,3 @@ "bundledDependencies": [], | ||
| }, | ||
| "gitHead": "0f7f870ba25169b5aee535756c8e7b03ff727ace" | ||
| "gitHead": "efc9966441bf9cf5338d260aeb434e1e83365490" | ||
| } |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 13 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 13 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
64935
0.23%1387
0.36%Updated
Updated
Updated
Updated