Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adjust API to be more simple, move extra non-essential functions off and mark as ‘internal’ - prep v0.2.0
- Loading branch information
Showing
12 changed files
with
134 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
= v0.1.2 | ||
#### Release Date: 08-18-2016 | ||
## v0.2.0 | ||
#### Release Date: - In Progress - | ||
The API has underwent minor changes: | ||
- `spirit.is_promise` is still there, but no longer covered under docs (considered internal api) | ||
- _All_ API under `spirit.node.utils` is now considered internal, they are still documented however | ||
- `spirit.node.is_Response` has moved to `spirit.node.utils.is_Response` | ||
|
||
#### Added: | ||
- Response.cookie | ||
The reason for the change is to slim down the public API to only the essentials. The functions affected were all utility functions (and simple in functionality) and mostly used internally, but was and still is provided as a convienance. | ||
|
||
#### Removed: | ||
- Response.location | ||
|
||
#### Bug Fixes: | ||
- Response.attachment wasn’t returning itself (this) | ||
- When production ENV was set and an error occured in which http adapter had to handle, it would strip the body but not it’s Content-Length. This would make it seem like the request froze (or client froze). | ||
## v0.1.2 | ||
#### Release Date: 08-18-2016 | ||
- Added Response.cookie | ||
- Removed Response.location | ||
- Fix Response.attachment wasn’t returning itself (this) | ||
- Fix When production ENV was set and an error occured in which http adapter had to handle, it would strip the body but not it’s Content-Length. This would make it seem like the request froze (or client froze). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
var core = require("./lib/core/core") | ||
var p_utils = require("./lib/core/promise_utils") | ||
|
||
//-- spirit.node | ||
var node_adapter = require("./lib/http/node_adapter") | ||
var response = require("./lib/http/response") | ||
var response_map = require("./lib/http/response-class") | ||
|
||
|
||
var node = response | ||
node.adapter = node_adapter.adapter | ||
node.Response = response_map.Response | ||
// is_Response has no camelCase alias as it'll overwrite | ||
// isResponse which is camelCase for is_response | ||
node.is_Response = response_map.is_Response | ||
|
||
node.utils = require("./lib/http/utils") | ||
node.utils.resolve_response = p_utils.resolve_response | ||
node.utils.resolveResponse = p_utils.resolve_response | ||
///////// setup node camelCase aliases | ||
node.isResponse = node.is_response | ||
node.makeStream = node.make_stream | ||
node.fileResponse = node.file_response | ||
node.errResponse = node.err_response | ||
|
||
// node http middleware | ||
//-- spirit.node.middleware | ||
node.middleware = { | ||
proxy: require("./lib/http/middleware/proxy"), | ||
// head: require("./lib/http/middleware/head"), | ||
ifmod: require("./lib/http/middleware/if-modified"), | ||
log: require("./lib/http/middleware/log") | ||
} | ||
|
||
//-- spirit.utils (Internal API but exported) | ||
// no camelCase aliases! | ||
node.utils = require("./lib/http/utils") | ||
node.utils.is_Response = response_map.is_Response | ||
node.utils.resolve_response = p_utils.resolve_response | ||
|
||
module.exports = { | ||
compose: core.compose, | ||
callp: p_utils.callp, | ||
|
||
is_promise: p_utils.is_promise, | ||
isPromise: p_utils.is_promise, | ||
is_promise: p_utils.is_promise, // exported but not documented | ||
|
||
node: node | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters