Comparing version 0.3.1 to 0.4.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [0.4.0](https://github.com/aspidajs/aspida/compare/v0.3.1...v0.4.0) (2019-10-13) | ||
### Features | ||
* **builder:** format url string ([448b5f7](https://github.com/aspidajs/aspida/commit/448b5f7)) | ||
### [0.3.1](https://github.com/aspidajs/aspida/compare/v0.3.0...v0.3.1) (2019-10-13) | ||
@@ -7,0 +14,0 @@ |
@@ -118,10 +118,9 @@ "use strict"; | ||
var target = path_1.default.posix.join(mockDir, file); | ||
var valFn = indent + "'" + file | ||
var valFn = "" + indent + file | ||
.replace(/\.ts$/, '') | ||
.split('.') | ||
.map(function (f, i) { return (i > 0 ? "" + f.charAt(0).toUpperCase() + f.slice(1) : f); }) | ||
.join('') + "': {\n<% next %>\n" + indent + "}"; | ||
.replace(/(-|\.|!| |'|\*|\(|\))/g, '_') | ||
.replace(/^(\d)/, '$$$1') + ": {\n<% next %>\n" + indent + "}"; | ||
var newUrl = url + "/" + file.replace(/\.ts$/, ''); | ||
if (file.startsWith('_')) { | ||
valFn = indent + "'" + file.split('.')[0] + "': (val" + valCount + ": number | string) => ({\n<% next %>\n" + indent + "})"; | ||
valFn = "" + indent + file.replace(/\.ts$/, '') + ": (val" + valCount + ": number | string) => ({\n<% next %>\n" + indent + "})"; | ||
newUrl = url + "/${val" + valCount + "}"; | ||
@@ -128,0 +127,0 @@ valCount += 1; |
{ | ||
"name": "aspida", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "Type safe HTTP client for the browser and node.js", | ||
@@ -5,0 +5,0 @@ "author": "m-mitsuhide <m.mitsuhide@amatelus.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
32636
289