@allegiant/core
Advanced tools
Comparing version 0.0.7 to 0.0.8
13
index.js
@@ -158,6 +158,3 @@ /* | ||
// default modules | ||
this.loadModules(defaultModules.concat( | ||
Object.entries(options).filter(obj => !filteredOptions.includes(obj[0])) | ||
) | ||
); | ||
this.loadModules(defaultModules.concat(Object.entries(options).filter(obj => !filteredOptions.includes(obj[0])))); | ||
this.binder(); | ||
@@ -251,8 +248,9 @@ | ||
await this.awaitEvent(conn, 'serve', 'dynamic'); | ||
this._finalize(conn, await endpoint.handler.apply(conn, Object.values(endpoint.params[2]))); | ||
conn.status = await endpoint.handler.apply(conn, Object.values(endpoint.params[2])); | ||
} else { | ||
await this.awaitEvent(conn, 'serve', 'static'); | ||
} | ||
this._finalize(conn, true); | ||
} | ||
} | ||
@@ -283,3 +281,4 @@ get(uri, handler=false) { | ||
conn.fin = true; | ||
conn.end(conn.content.length > 0 ? conn.content : ''); | ||
conn.writeHead(conn.statusCode, conn.getStatusMessage(conn.statusCode)) | ||
.end(conn.content.length > 0 ? conn.content : null); | ||
} else { | ||
@@ -286,0 +285,0 @@ console.log("WARNING: CONNECTION ALREADY ENDED: ", conn.uri); // eslint-disable-line |
{ | ||
"name": "@allegiant/core", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Small modular, effective app framework", | ||
@@ -5,0 +5,0 @@ "author": "echopoint <echopoint@tutanota.com>", |
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
39841
11
583