@fabrix/spool-cart
Version:
Spool - eCommerce Spool for Fabrix
34 lines (33 loc) • 1.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const http = require("http");
const initialize_1 = require("../middleware/initialize");
const authenticate_1 = require("../middleware/authenticate");
const request_1 = require("../http/request");
exports = module.exports = function () {
exports.__monkeypatchNode();
return {
initialize: initialize_1.initialize,
authenticate: authenticate_1.authenticate
};
};
exports.__monkeypatchNode = function () {
http.IncomingMessage.prototype['loginCart'] =
http.IncomingMessage.prototype['logInCart'] = request_1.req.logInCart;
http.IncomingMessage.prototype['loginCustomer'] =
http.IncomingMessage.prototype['logInCustomer'] = request_1.req.logInCustomer;
http.IncomingMessage.prototype['loginShop'] =
http.IncomingMessage.prototype['logInShop'] = request_1.req.logInShop;
http.IncomingMessage.prototype['logoutCart'] =
http.IncomingMessage.prototype['logOutCart'] = request_1.req.logOutCart;
http.IncomingMessage.prototype['logoutCustomer'] =
http.IncomingMessage.prototype['logOutCustomer'] = request_1.req.logOutCustomer;
http.IncomingMessage.prototype['logoutShop'] =
http.IncomingMessage.prototype['logOutShop'] = request_1.req.logOutShop;
http.IncomingMessage.prototype['hasCart'] = request_1.req.hasCart;
http.IncomingMessage.prototype['hasNoCart'] = request_1.req.hasNoCart;
http.IncomingMessage.prototype['hasCustomer'] = request_1.req.hasCustomer;
http.IncomingMessage.prototype['hasNoCustomer'] = request_1.req.hasNoCustomer;
http.IncomingMessage.prototype['hasShop'] = request_1.req.hasShop;
http.IncomingMessage.prototype['hasNoShop'] = request_1.req.hasNoShop;
};