@td-design/pont-engine
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -70,3 +70,3 @@ "use strict"; | ||
mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.forEach(inter => { | ||
@@ -76,3 +76,3 @@ currMod[utils_1.getFileName(inter.name, this.surrounding)] = generator.getInterfaceContent.bind(generator, inter); | ||
}); | ||
if (mod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) { | ||
if (mod.interfaces.some(inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || ''))) { | ||
const modName = utils_1.reviseModName(mod.name); | ||
@@ -355,3 +355,3 @@ mods[modName] = currMod; | ||
${mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.map(inter => { | ||
@@ -364,3 +364,3 @@ return `import * as ${inter.name} from './${inter.name}';`; | ||
${mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.map(inter => inter.name) | ||
@@ -381,3 +381,3 @@ .join(', \n')} | ||
${this.dataSource.mods | ||
.filter(curMod => curMod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) | ||
.filter(curMod => curMod.interfaces.some(inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || ''))) | ||
.map(mod => utils_1.reviseModName(mod.name)) | ||
@@ -390,3 +390,3 @@ .join(', \n')} | ||
${this.dataSource.mods | ||
.filter(curMod => curMod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) | ||
.filter(curMod => curMod.interfaces.some(inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || ''))) | ||
.map(mod => { | ||
@@ -393,0 +393,0 @@ const modName = utils_1.reviseModName(mod.name); |
@@ -284,3 +284,3 @@ "use strict"; | ||
const standardInterfaces = modInterfaces | ||
.filter(item => (item.interfaceType || '') === interfaceType) | ||
.filter(item => interfaceType === '' || interfaceType === (item.interfaceType || '')) | ||
.map(inter => { | ||
@@ -363,3 +363,3 @@ return SwaggerInterface.transformSwaggerV3Interface2Standard(inter, usingOperationId, samePath, defNames); | ||
const standardInterfaces = modInterfaces | ||
.filter(item => (item.interfaceType || '') === interfaceType) | ||
.filter(item => interfaceType === '' || interfaceType === (item.interfaceType || '')) | ||
.map(inter => { | ||
@@ -366,0 +366,0 @@ return SwaggerInterface.transformSwaggerInterface2Standard(inter, usingOperationId, samePath, defNames, compileTempateKeyword); |
{ | ||
"name": "@td-design/pont-engine", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "pont swagger typescript API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -97,3 +97,3 @@ /** | ||
mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.forEach(inter => { | ||
@@ -103,3 +103,5 @@ currMod[getFileName(inter.name, this.surrounding)] = generator.getInterfaceContent.bind(generator, inter); | ||
}); | ||
if (mod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) { | ||
if ( | ||
mod.interfaces.some(inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || '')) | ||
) { | ||
const modName = reviseModName(mod.name); | ||
@@ -469,3 +471,3 @@ mods[modName] = currMod; | ||
${mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.map(inter => { | ||
@@ -478,3 +480,3 @@ return `import * as ${inter.name} from './${inter.name}';`; | ||
${mod.interfaces | ||
.filter(curInter => (curInter.interfaceType || '') === this.interfaceType) | ||
.filter(curInter => this.interfaceType === '' || this.interfaceType === (curInter.interfaceType || '')) | ||
.map(inter => inter.name) | ||
@@ -499,3 +501,7 @@ .join(', \n')} | ||
${this.dataSource.mods | ||
.filter(curMod => curMod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) | ||
.filter(curMod => | ||
curMod.interfaces.some( | ||
inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || '') | ||
) | ||
) | ||
.map(mod => reviseModName(mod.name)) | ||
@@ -509,3 +515,7 @@ .join(', \n')} | ||
${this.dataSource.mods | ||
.filter(curMod => curMod.interfaces.some(inter => (inter.interfaceType || '') === this.interfaceType)) | ||
.filter(curMod => | ||
curMod.interfaces.some( | ||
inter => this.interfaceType === '' || this.interfaceType === (inter.interfaceType || '') | ||
) | ||
) | ||
.map(mod => { | ||
@@ -512,0 +522,0 @@ const modName = reviseModName(mod.name); |
@@ -462,3 +462,3 @@ import { StandardDataSource, Interface, Mod, BaseClass, Property, StandardDataType } from '../standard'; | ||
const standardInterfaces = modInterfaces | ||
.filter(item => (item.interfaceType || '') === interfaceType) | ||
.filter(item => interfaceType === '' || interfaceType === (item.interfaceType || '')) | ||
.map(inter => { | ||
@@ -570,3 +570,3 @@ return SwaggerInterface.transformSwaggerV3Interface2Standard(inter, usingOperationId, samePath, defNames); | ||
const standardInterfaces = modInterfaces | ||
.filter(item => (item.interfaceType || '') === interfaceType) | ||
.filter(item => interfaceType === '' || interfaceType === (item.interfaceType || '')) | ||
.map(inter => { | ||
@@ -573,0 +573,0 @@ return SwaggerInterface.transformSwaggerInterface2Standard( |
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
422378
8305