@ahoo-wang/fetcher-generator 3.2.6 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/sourceFiles.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("commander"),a=require("./index.cjs");require("@ahoo-wang/fetcher");require("yaml");require("fs");require("path");class f{getTimestamp(){return new Date().toTimeString().slice(0,8)}info(e,...t){const o=this.getTimestamp();t.length>0?console.log(`[${o}] ℹ️ ${e}`,...t):console.log(`[${o}] ℹ️ ${e}`)}success(e,...t){const o=this.getTimestamp();t.length>0?console.log(`[${o}] ✅ ${e}`,...t):console.log(`[${o}] ✅ ${e}`)}error(e,...t){const o=this.getTimestamp();t.length>0?console.error(`[${o}] ❌ ${e}`,...t):console.error(`[${o}] ❌ ${e}`)}progress(e,t=0,...o){const i=this.getTimestamp(),r=" ".repeat(t);o.length>0?console.log(`[${i}] 🔄 ${r}${e}`,...o):console.log(`[${i}] 🔄 ${r}${e}`)}progressWithCount(e,t,o,i=0,...r){const s=this.getTimestamp(),p=" ".repeat(i),l=`[${e}/${t}]`;r.length>0?console.log(`[${s}] 🔄 ${p}${l} ${o}`,...r):console.log(`[${s}] 🔄 ${p}${l} ${o}`)}}function h(n){if(!n)return!1;try{const e=new URL(n);return e.protocol==="http:"||e.protocol==="https:"}catch{return n.length>0}}async function $(n){const e=new f;process.on("SIGINT",()=>{e.error("Generation interrupted by user"),process.exit(130)}),h(n.input)||(e.error("Invalid input: must be a valid file path or HTTP/HTTPS URL"),process.exit(2));try{e.info("Starting code generation...");const t={inputPath:n.input,outputDir:n.output,configPath:n.config,tsConfigFilePath:n.tsConfigFilePath,logger:e};await new a.CodeGenerator(t).generate(),e.success(`Code generation completed successfully! Files generated in: ${n.output}`)}catch(t){e.error(`Error during code generation:
|
|
3
|
-
`,t),process.exit(1)}}const d="3.2.
|
|
3
|
+
`,t),process.exit(1)}}const d="3.2.8",m={version:d};function u(){return c.program.name("fetcher-generator").description("OpenAPI Specification TypeScript code generator for Wow").version(m.version,"-v, --version"),c.program.command("generate").description("Generate TypeScript code from OpenAPI specification").requiredOption("-i, --input <file>","Input OpenAPI specification file path or URL (http/https)").option("-o, --output <path>","Output directory path","src/generated").option("-c, --config <file>","Configuration file path",a.DEFAULT_CONFIG_PATH).option("-t, --ts-config-file-path <file>","TypeScript configuration file path").action($),c.program}function g(){u().parse()}g();exports.runCLI=g;exports.setupCLI=u;
|
|
4
4
|
//# sourceMappingURL=cli.cjs.map
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("ts-morph"),f=require("@ahoo-wang/fetcher"),z=require("@ahoo-wang/fetcher-wow"),H=require("yaml"),xe=require("fs"),L=require("path");function T(n){return n.$ref.split("/").pop()}function S(n,e){const t=T(n);return e.schemas?.[t]}function Y(n,e){const t=T(n);return e.requestBodies?.[t]}function Z(n,e){const t=T(n);return e.parameters?.[t]}function v(n,e){return{key:T(n),schema:S(n,e)}}const Ae=/[-_'\s.]+/;function D(n){return n.split(Ae)}function X(n){return Array.isArray(n)?n.flatMap(e=>B(D(e))):B(D(n))}function B(n){return n.flatMap(e=>{if(e.length===0)return[];const t=[];let o="";for(let r=0;r<e.length;r++){const i=e[r],s=/[A-Z]/.test(i),a=r>0&&/[a-z]/.test(e[r-1]);s&&a&&o?(t.push(o),o=i):o+=i}return o&&t.push(o),t})}function R(n){return n===""||n.length===0?"":X(n).filter(t=>t.length>0).map(t=>{const o=t.charAt(0),r=t.slice(1);return(/[a-zA-Z]/.test(o)?o.toUpperCase():o)+r.toLowerCase()}).join("")}function h(n){const e=R(n);return e.charAt(0).toLowerCase()+e.slice(1)}function ee(n){return n===""||Array.isArray(n)&&n.length===0?"":X(n).filter(t=>t.length>0).map(t=>t.toUpperCase()).join("_")}function O(n){return/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(n)?n:`'${n}'`}function Ce(n){return/^\d+$/.test(n)?`NUM_${n}`:O(ee(n))}function g(n){return!!(n&&typeof n=="object"&&"$ref"in n)}function _(n,e){if(e&&!g(e)&&e.content)return e.content[n]?.schema}function te(n){return _(f.ContentTypeValues.APPLICATION_JSON,n)}function Pe(n){return _(f.ContentTypeValues.TEXT_EVENT_STREAM,n)}function $e(n){return _("*/*",n)}const Te=["string","number","integer","boolean","null"];function ne(n){return Array.isArray(n)?!0:Te.includes(n)}function U(n){return Array.isArray(n.enum)&&n.enum.length>0}function I(n){return n.type==="object"&&!!n.properties}function b(n){return n.type==="array"&&!!n.items}function ve(n){return Array.isArray(n.anyOf)&&n.anyOf.length>0}function Ie(n){return Array.isArray(n.oneOf)&&n.oneOf.length>0}function M(n){return Array.isArray(n.allOf)&&n.allOf.length>0}function J(n){return ve(n)||Ie(n)||M(n)}function Ee(n){return n.includes("|")||n.includes("&")?`(${n})[]`:`${n}[]`}function Se(n){return n.type==="object"&&!n.properties&&n.additionalProperties!==void 0}function Re(n){return n.type!=="object"?!1:n.properties?Object.keys(n.properties).length===0:!0}function we(n){return n.readOnly===!0}function w(n){if(Array.isArray(n))return n.map(e=>w(e)).join(" | ");switch(n){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"any"}}function Ne(n){if(!I(n))return[];const e=n.required||[];return Object.keys(n.properties).filter(t=>!e.includes(t))}function De(n,e){return n.operation.operationId&&e.operation.operationId?n.operation.operationId.localeCompare(e.operation.operationId):n.path&&e.path?n.path.localeCompare(e.path):n.method&&e.method?n.method.localeCompare(e.method):0}function oe(n){const e=[];for(const[t,o]of Object.entries(n))re(o).forEach(r=>{e.push({method:r.method,operation:r.operation,path:t})});return e.sort(De)}function re(n){return[{method:"get",operation:n.get},{method:"put",operation:n.put},{method:"post",operation:n.post},{method:"delete",operation:n.delete},{method:"options",operation:n.options},{method:"head",operation:n.head},{method:"patch",operation:n.patch},{method:"trace",operation:n.trace}].filter(({operation:e})=>e!==void 0)}function G(n){return n.responses[200]}function Q(n){const e=G(n);return te(e)}function Oe(n,e){return n.parameters?n.parameters.map(t=>g(t)?Z(t,e):t).filter(t=>t.in==="path"):[]}const be="string";function ie(n){return!n.schema||g(n.schema)||!n.schema.type||!ne(n.schema.type)?be:w(n.schema.type)}function se(n){return n.startsWith("http://")||n.startsWith("https://")?Me(n):qe(n)}async function Me(n){return await(await fetch(n)).text()}function qe(n){return new Promise((e,t)=>{xe.readFile(n,"utf-8",(o,r)=>{o?t(o):e(r)})})}async function Fe(n){const e=await se(n);switch(ae(e)){case"json":return JSON.parse(e);case"yaml":return H.parse(e);default:throw new Error(`Unsupported file format: ${n}`)}}async function je(n){const e=await se(n);switch(ae(e)){case"json":return JSON.parse(e);case"yaml":return H.parse(e);default:throw new Error(`Unsupported file format: ${n}`)}}function ae(n){const e=n.trimStart();if(e.startsWith("{")||e.startsWith("["))return"json";if(e.startsWith("-")||e.startsWith("%YAML"))return"yaml";try{return JSON.parse(e),"json"}catch{if(e.length>0)return"yaml"}throw new Error("Unable to infer file format")}const ce="types.ts",_e="@";function Ge(n){return f.combineURLs(n.path,ce)}function ge(n,e,t){const o=f.combineURLs(e,t),r=n.getSourceFile(o);return r||n.createSourceFile(o,"",{overwrite:!0})}function P(n,e,t){let o=n.getImportDeclaration(r=>r.getModuleSpecifierValue()===e);o||(o=n.addImportDeclaration({moduleSpecifier:e})),t.forEach(r=>{o.getNamedImports().some(s=>s.getName()===r)||o.addNamedImport(r)})}function m(n,e,t){if(t.path.startsWith(_e)){P(n,t.path,[t.name]);return}const o=n.getDirectoryPath(),r=L.join(e,t.path,ce);let i=L.relative(o,r);i=i.replace(/\.ts$/,""),i.startsWith(".")||(i="./"+i),P(n,i,[t.name])}function We(n,e,t,o){n.path!==o.path&&m(e,t,o)}function pe(n,e=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("ts-morph"),f=require("@ahoo-wang/fetcher"),z=require("@ahoo-wang/fetcher-wow"),H=require("yaml"),xe=require("fs"),L=require("path");function T(n){return n.$ref.split("/").pop()}function S(n,e){const t=T(n);return e.schemas?.[t]}function Y(n,e){const t=T(n);return e.requestBodies?.[t]}function Z(n,e){const t=T(n);return e.parameters?.[t]}function v(n,e){return{key:T(n),schema:S(n,e)}}const Ae=/[-_'\s.]+/;function D(n){return n.split(Ae)}function X(n){return Array.isArray(n)?n.flatMap(e=>B(D(e))):B(D(n))}function B(n){return n.flatMap(e=>{if(e.length===0)return[];const t=[];let o="";for(let r=0;r<e.length;r++){const i=e[r],s=/[A-Z]/.test(i),a=r>0&&/[a-z]/.test(e[r-1]);s&&a&&o?(t.push(o),o=i):o+=i}return o&&t.push(o),t})}function R(n){return n===""||n.length===0?"":X(n).filter(t=>t.length>0).map(t=>{const o=t.charAt(0),r=t.slice(1);return(/[a-zA-Z]/.test(o)?o.toUpperCase():o)+r.toLowerCase()}).join("")}function h(n){const e=R(n);return e.charAt(0).toLowerCase()+e.slice(1)}function ee(n){return n===""||Array.isArray(n)&&n.length===0?"":X(n).filter(t=>t.length>0).map(t=>t.toUpperCase()).join("_")}function O(n){return/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(n)?n:`'${n}'`}function Ce(n){return/^\d+$/.test(n)?`NUM_${n}`:O(ee(n))}function g(n){return!!(n&&typeof n=="object"&&"$ref"in n)}function _(n,e){if(e&&!g(e)&&e.content)return e.content[n]?.schema}function te(n){return _(f.ContentTypeValues.APPLICATION_JSON,n)}function Pe(n){return _(f.ContentTypeValues.TEXT_EVENT_STREAM,n)}function $e(n){return _("*/*",n)}const Te=["string","number","integer","boolean","null"];function ne(n){return Array.isArray(n)?!0:Te.includes(n)}function U(n){return Array.isArray(n.enum)&&n.enum.length>0}function I(n){return n.type==="object"&&!!n.properties}function b(n){return n.type==="array"&&!!n.items}function ve(n){return Array.isArray(n.anyOf)&&n.anyOf.length>0}function Ie(n){return Array.isArray(n.oneOf)&&n.oneOf.length>0}function M(n){return Array.isArray(n.allOf)&&n.allOf.length>0}function J(n){return ve(n)||Ie(n)||M(n)}function Ee(n){return n.includes("|")||n.includes("&")?`(${n})[]`:`${n}[]`}function Se(n){return n.type==="object"&&!n.properties&&n.additionalProperties!==void 0}function Re(n){return n.type!=="object"?!1:n.properties?Object.keys(n.properties).length===0:!0}function we(n){return n.readOnly===!0}function w(n){if(Array.isArray(n))return n.map(e=>w(e)).join(" | ");switch(n){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"any"}}function Ne(n){if(!I(n))return[];const e=n.required||[];return Object.keys(n.properties).filter(t=>!e.includes(t))}function De(n,e){return n.operation.operationId&&e.operation.operationId?n.operation.operationId.localeCompare(e.operation.operationId):n.path&&e.path?n.path.localeCompare(e.path):n.method&&e.method?n.method.localeCompare(e.method):0}function oe(n){const e=[];for(const[t,o]of Object.entries(n))re(o).forEach(r=>{e.push({method:r.method,operation:r.operation,path:t})});return e.sort(De)}function re(n){return[{method:"get",operation:n.get},{method:"put",operation:n.put},{method:"post",operation:n.post},{method:"delete",operation:n.delete},{method:"options",operation:n.options},{method:"head",operation:n.head},{method:"patch",operation:n.patch},{method:"trace",operation:n.trace}].filter(({operation:e})=>e!==void 0)}function G(n){return n.responses[200]}function Q(n){const e=G(n);return te(e)}function Oe(n,e){return n.parameters?n.parameters.map(t=>g(t)?Z(t,e):t).filter(t=>t.in==="path"):[]}const be="string";function ie(n){return!n.schema||g(n.schema)||!n.schema.type||!ne(n.schema.type)?be:w(n.schema.type)}function se(n){return n.startsWith("http://")||n.startsWith("https://")?Me(n):qe(n)}async function Me(n){return await(await fetch(n)).text()}function qe(n){return new Promise((e,t)=>{xe.readFile(n,"utf-8",(o,r)=>{o?t(o):e(r)})})}async function Fe(n){const e=await se(n);switch(ae(e)){case"json":return JSON.parse(e);case"yaml":return H.parse(e);default:throw new Error(`Unsupported file format: ${n}`)}}async function je(n){const e=await se(n);switch(ae(e)){case"json":return JSON.parse(e);case"yaml":return H.parse(e);default:throw new Error(`Unsupported file format: ${n}`)}}function ae(n){const e=n.trimStart();if(e.startsWith("{")||e.startsWith("["))return"json";if(e.startsWith("-")||e.startsWith("%YAML"))return"yaml";try{return JSON.parse(e),"json"}catch{if(e.length>0)return"yaml"}throw new Error("Unable to infer file format")}const ce="types.ts",_e="@";function Ge(n){return f.combineURLs(n.path,ce)}function ge(n,e,t){const o=f.combineURLs(e,t),r=n.getSourceFile(o);return r||n.createSourceFile(o,"",{overwrite:!0})}function P(n,e,t){let o=n.getImportDeclaration(r=>r.getModuleSpecifierValue()===e);o||(o=n.addImportDeclaration({moduleSpecifier:e})),t.forEach(r=>{o.getNamedImports().some(s=>s.getName()===r)||o.addNamedImport(r)})}function m(n,e,t){if(t.path.startsWith(_e)){P(n,t.path,[t.name]);return}const o=n.getDirectoryPath(),r=L.join(e,t.path,ce);let i=L.relative(o,r);i=i.replace(/\.ts$/,""),i=i.replace(/\\/g,"/"),i.startsWith(".")||(i="./"+i),P(n,i,[t.name])}function We(n,e,t,o){n.path!==o.path&&m(e,t,o)}function pe(n,e=`
|
|
2
2
|
`){if(!Array.isArray(n))return;const t=n.filter(o=>typeof o=="string"&&o.length>0);return t.length>0?t.join(e):void 0}function $(n,e){const t=pe(e);t&&n.addJsDoc(t)}function W(n,e){const t=[n.title,n.description];return e&&t.push(`- key: ${e}`),n.format&&t.push(`- format: ${n.format}`),V(t,n,"default"),V(t,n,"example"),Le(t,n),Be(t,n),Ue(t,n),t}function ke(n,e,t){const o=W(e,t);$(n,o)}function ze(n,e,t){const o=W(e,t);ue(o,"schema",e),$(n,o)}function V(n,e,t){const o=e[t];if(o){if(typeof o!="object"){n.push(`- ${t}: \`${o}\``);return}ue(n,t,o)}}function ue(n,e,t){n.push(`- ${e}: `),n.push("```json"),n.push(JSON.stringify(t,null,2)),n.push("```")}function Le(n,e){const t=["- Numeric Constraints"];e.minimum!==void 0&&t.push(` - minimum: ${e.minimum}`),e.maximum!==void 0&&t.push(` - maximum: ${e.maximum}`),e.exclusiveMinimum!==void 0&&t.push(` - exclusiveMinimum: ${e.exclusiveMinimum}`),e.exclusiveMaximum!==void 0&&t.push(` - exclusiveMaximum: ${e.exclusiveMaximum}`),e.multipleOf!==void 0&&t.push(` - multipleOf: ${e.multipleOf}`),t.length!==1&&n.push(...t)}function Be(n,e){const t=["- String Constraints"];e.minLength!==void 0&&t.push(` - minLength: ${e.minLength}`),e.maxLength!==void 0&&t.push(` - maxLength: ${e.maxLength}`),e.pattern!==void 0&&t.push(` - pattern: ${e.pattern}`),t.length!==1&&n.push(...t)}function Ue(n,e){const t=["- Array Constraints"];e.minItems!==void 0&&t.push(` - minItems: ${e.minItems}`),e.maxItems!==void 0&&t.push(` - maxItems: ${e.maxItems}`),e.uniqueItems!==void 0&&t.push(` - uniqueItems: ${e.uniqueItems}`),t.length!==1&&n.push(...t)}function Je(n){const e=n.split(".");return e.length!=2||e[0].length===0||e[1].length===0?null:e}function Qe(n){const e=Je(n.name);return e?{tag:n,contextAlias:e[0],aggregateName:e[1]}:null}function Ve(n){const e=n?.map(o=>Qe(o)).filter(o=>o!==null);if(!e)return new Map;const t=new Map;return e.forEach(o=>{t.set(o.tag.name,{aggregate:o,commands:new Map,events:new Map})}),t}function Ke(n){if(!n)return null;const e=n.split(".");return e.length!=3?null:e[2]}const He="#/components/responses/wow.CommandOk",Ye="#/components/parameters/wow.id";class Ze{constructor(e){this.openAPI=e,this.aggregates=Ve(e.tags),this.build()}aggregates;build(){const e=oe(this.openAPI.paths);for(const t of e)this.commands(t.path,t),this.state(t.operation),this.events(t.operation),this.fields(t.operation)}resolve(){const e=new Map;for(const t of this.aggregates.values()){if(!t.state||!t.fields)continue;const o=t.aggregate.contextAlias;let r=e.get(o);r||(r=new Set,e.set(o,r)),r.add(t)}return e}commands(e,t){const o=t.operation;if(o.operationId==="wow.command.send")return;const r=Ke(o.operationId);if(!r)return;const i=G(o);if(!i||!g(i)||i.$ref!==He||!o.requestBody)return;const s=o.parameters??[],a=s.filter(l=>g(l)&&l.$ref===Ye).at(0),c=s.filter(l=>!g(l)&&l.in==="path");if(a){const l=Z(a,this.openAPI.components);c.push(l)}const p=o.requestBody.content[f.ContentTypeValues.APPLICATION_JSON].schema,A=v(p,this.openAPI.components);A.schema.title=A.schema.title||o.summary,A.schema.description=A.schema.description||o.description;const ye={name:r,method:t.method,path:e,pathParameters:c,summary:o.summary,description:o.description,schema:A,operation:o};o.tags?.forEach(l=>{const k=this.aggregates.get(l);k&&k.commands.set(r,ye)})}state(e){if(!e.operationId?.endsWith(".snapshot_state.single"))return;const t=Q(e);if(!g(t))return;const o=v(t,this.openAPI.components);e.tags?.forEach(r=>{const i=this.aggregates.get(r);i&&(i.state=o)})}events(e){if(!this.openAPI.components||!e.operationId?.endsWith(".event.list_query"))return;const t=Q(e);if(g(t))return;const o=t?.items;if(!g(o))return;const i=S(o,this.openAPI.components).properties.body.items.anyOf.map(s=>{const a=s.title,c=s.properties.name.const,u=s.properties.body,p=v(u,this.openAPI.components);return p.schema.title=p.schema.title||s.title,{title:a,name:c,schema:p}});e.tags?.forEach(s=>{const a=this.aggregates.get(s);a&&i.forEach(c=>{a.events.set(c.name,c)})})}fields(e){if(!this.openAPI.components||!e.operationId?.endsWith(".snapshot.count"))return;const o=Y(e.requestBody,this.openAPI.components).content[f.ContentTypeValues.APPLICATION_JSON].schema,i=S(o,this.openAPI.components).properties?.field,s=v(i,this.openAPI.components);e.tags?.forEach(a=>{const c=this.aggregates.get(a);c&&(c.fields=s)})}}const x="@ahoo-wang/fetcher-wow",Xe={"wow.command.CommandResult":"CommandResult","wow.command.CommandResultArray":"CommandResultArray","wow.MessageHeaderSqlType":"MessageHeaderSqlType","wow.api.BindingError":"BindingError","wow.api.DefaultErrorInfo":"ErrorInfo","wow.api.RecoverableType":"RecoverableType","wow.api.command.DefaultDeleteAggregate":"DeleteAggregate","wow.api.command.DefaultRecoverAggregate":"RecoverAggregate","wow.api.messaging.FunctionInfoData":"FunctionInfo","wow.api.messaging.FunctionKind":"FunctionKind","wow.api.modeling.AggregateId":"AggregateId","wow.api.query.Condition":"Condition","wow.api.query.ConditionOptions":"ConditionOptions","wow.api.query.ListQuery":"ListQuery","wow.api.query.Operator":"Operator","wow.api.query.PagedQuery":"PagedQuery","wow.api.query.Pagination":"Pagination","wow.api.query.Projection":"Projection","wow.api.query.Sort":"FieldSort","wow.api.query.Sort.Direction":"SortDirection","wow.command.CommandStage":"CommandStage","wow.command.SimpleWaitSignal":"WaitSignal","wow.configuration.Aggregate":"Aggregate","wow.configuration.BoundedContext":"BoundedContext","wow.configuration.WowMetadata":"WowMetadata","wow.modeling.DomainEvent":"DomainEvent","wow.openapi.BatchResult":"BatchResult","wow.messaging.CompensationTarget":"CompensationTarget"};function d(n){if(!n)return{name:"",path:"/"};const e=Xe[n];if(e)return{name:e,path:x};const t=n.split(".");let o=-1;for(let c=0;c<t.length;c++)if(t[c]&&/^[A-Z]/.test(t[c])){o=c;break}const r=t.slice(0,o),i=r.length>0?`/${r.join("/")}`:"/",s=t.slice(o);return{name:R(s),path:i}}function E(n){const e=T(n);return d(e)}function N(n){return`${ee(n)}_BOUNDED_CONTEXT_ALIAS`}class et{constructor(e,t,o,r){this.modelInfo=e,this.sourceFile=t,this.keySchema=o,this.outputDir=r}generate(){const e=this.process();e&&ze(e,this.keySchema.schema,this.keySchema.key)}process(){const{schema:e}=this.keySchema;return U(e)?this.processEnum(e):I(e)?this.processInterface(e):b(e)?this.processArray(e):M(e)?this.processIntersection(e):J(e)?this.processComposition(e):this.processTypeAlias(e)}resolveReference(e){const t=E(e);return We(this.modelInfo,this.sourceFile,this.outputDir,t),t}resolveAdditionalProperties(e){return e.additionalProperties===void 0||e.additionalProperties===!1?"":e.additionalProperties===!0?"[key: string]: any":`[key: string]: ${this.resolveType(e.additionalProperties)}`}resolvePropertyDefinitions(e){const{properties:t}=e;return Object.entries(t).map(([o,r])=>{const i=this.resolveType(r),s=O(o);if(!g(r)){const a=W(r),c=pe(a,`
|
|
3
3
|
* `);if(c)return`
|
|
4
4
|
/**
|