@ekino/rendr-core
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,4 +5,8 @@ "use strict"; | ||
} | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var types_1 = require("./types"); | ||
var url_parse_1 = __importDefault(require("url-parse")); | ||
__export(require("./types")); | ||
@@ -104,2 +108,15 @@ function isObject(data) { | ||
exports.createPage = createPage; | ||
function createContext(req, res) { | ||
var url = url_parse_1.default(req.url, true); | ||
var ctx = { | ||
pathname: url.pathname, | ||
query: url.query, | ||
params: {}, | ||
asPath: req.url, | ||
req: req, | ||
res: res | ||
}; | ||
return ctx; | ||
} | ||
exports.createContext = createContext; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ekino/rendr-core", | ||
"license": "MIT", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/lib/index.js", | ||
@@ -21,3 +21,7 @@ "typing": "dist/lib/index.d.ts", | ||
}, | ||
"gitHead": "73ca8c1550eed4eb59c0ed6b6e32624d3831000f" | ||
"dependencies": { | ||
"@types/url-parse": "^1.4.3", | ||
"url-parse": "^1.4.7" | ||
}, | ||
"gitHead": "e47969dc3d679d3c010ff0c96f992046bbb59580" | ||
} |
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
5118
119
2
+ Added@types/url-parse@^1.4.3
+ Addedurl-parse@^1.4.7
+ Added@types/url-parse@1.4.11(transitive)
+ Addedquerystringify@2.2.0(transitive)
+ Addedrequires-port@1.0.0(transitive)
+ Addedurl-parse@1.5.10(transitive)