aspida
Advanced tools
Comparing version 0.21.1 to 0.21.2
import { AspidaConfig } from './getConfigs'; | ||
declare const _default: ({ input, baseURL, trailingSlash, outputEachDir }: AspidaConfig, isFirstBuild: boolean) => { | ||
declare const _default: ({ input, baseURL, trailingSlash, outputEachDir }: AspidaConfig) => { | ||
text: string; | ||
@@ -4,0 +4,0 @@ filePath: string; |
@@ -71,3 +71,5 @@ "use strict"; | ||
}; | ||
exports.default = (function (_a, isFirstBuild) { | ||
var prevNamedFiles = []; | ||
var prevTypeAliasFiles = []; | ||
exports.default = (function (_a) { | ||
var input = _a.input, baseURL = _a.baseURL, trailingSlash = _a.trailingSlash, outputEachDir = _a.outputEachDir; | ||
@@ -92,14 +94,16 @@ var direntTree = getDirentTree_1.getDirentTree(input); | ||
} | ||
if (isFirstBuild) { | ||
var namedFiles = listNamedFiles(direntTree); | ||
var typeAliasFiles = listTypeAliasFiles(direntTree); | ||
if (namedFiles.length) { | ||
console.log("aspida \u001B[43m\u001B[30mWARN\u001B[0m {endpoint}.ts format is deprecated. Please rename the following files\n " + namedFiles.join('\n ')); | ||
} | ||
if (typeAliasFiles.length) { | ||
console.log("aspida \u001B[43m\u001B[30mWARN\u001B[0m {endpoint}@{Type Alias}.ts format is deprecated. Please rename the following names\n " + typeAliasFiles.join('\n ')); | ||
} | ||
var namedFiles = listNamedFiles(direntTree); | ||
var diffNamedFiles = namedFiles.filter(function (f) { return !prevNamedFiles.includes(f); }); | ||
var typeAliasFiles = listTypeAliasFiles(direntTree); | ||
var diffTypeAliasFiles = typeAliasFiles.filter(function (f) { return !prevTypeAliasFiles.includes(f); }); | ||
if (diffNamedFiles.length) { | ||
console.log("aspida \u001B[43m\u001B[30mWARN\u001B[0m {endpoint}.ts format is deprecated. Please rename the following files\n " + diffNamedFiles.join('\n ')); | ||
} | ||
if (diffTypeAliasFiles.length) { | ||
console.log("aspida \u001B[43m\u001B[30mWARN\u001B[0m {endpoint}@{Type Alias}.ts format is deprecated. Please rename the following names\n " + diffTypeAliasFiles.join('\n ')); | ||
} | ||
prevNamedFiles = namedFiles; | ||
prevTypeAliasFiles = typeAliasFiles; | ||
return templates; | ||
}); | ||
//# sourceMappingURL=buildTemplate.js.map |
@@ -15,3 +15,3 @@ "use strict"; | ||
return getConfigs_1.getConfigs(config) | ||
.flatMap(function (c) { return buildTemplate_1.default(c, true); }) | ||
.flatMap(function (c) { return buildTemplate_1.default(c); }) | ||
.forEach(writeRouteFile_1.default); | ||
@@ -21,6 +21,6 @@ }; | ||
return getConfigs_1.getConfigs(config).map(function (c) { | ||
buildTemplate_1.default(c, true).forEach(writeRouteFile_1.default); | ||
return watchInputDir_1.default(c.input, function () { return buildTemplate_1.default(c, false).forEach(writeRouteFile_1.default); }); | ||
buildTemplate_1.default(c).forEach(writeRouteFile_1.default); | ||
return watchInputDir_1.default(c.input, function () { return buildTemplate_1.default(c).forEach(writeRouteFile_1.default); }); | ||
}); | ||
}; | ||
//# sourceMappingURL=commands.js.map |
{ | ||
"name": "aspida", | ||
"version": "0.21.1", | ||
"version": "0.21.2", | ||
"description": "TypeScript friendly HTTP client wrapper for the browser and node.js", | ||
@@ -5,0 +5,0 @@ "author": "Solufa <solufa2020@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
93348
941