moonflower 1.6.0 → 1.6.2

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.
Files changed (28) hide show
  1. package/dist/openapi/analyzerModule/analyzerModule.cjs +1 -1
  2. package/dist/openapi/analyzerModule/analyzerModule.cjs.map +1 -1
  3. package/dist/openapi/analyzerModule/analyzerModule.d.ts.map +1 -1
  4. package/dist/openapi/analyzerModule/analyzerModule.mjs +21 -21
  5. package/dist/openapi/analyzerModule/analyzerModule.mjs.map +1 -1
  6. package/dist/openapi/analyzerModule/getSourceFileTimestamp.cjs +1 -1
  7. package/dist/openapi/analyzerModule/getSourceFileTimestamp.cjs.map +1 -1
  8. package/dist/openapi/analyzerModule/getSourceFileTimestamp.d.ts +1 -1
  9. package/dist/openapi/analyzerModule/getSourceFileTimestamp.d.ts.map +1 -1
  10. package/dist/openapi/analyzerModule/getSourceFileTimestamp.mjs +43 -32
  11. package/dist/openapi/analyzerModule/getSourceFileTimestamp.mjs.map +1 -1
  12. package/dist/openapi/analyzerModule/nodeParsers.cjs +1 -1
  13. package/dist/openapi/analyzerModule/nodeParsers.cjs.map +1 -1
  14. package/dist/openapi/analyzerModule/nodeParsers.d.ts.map +1 -1
  15. package/dist/openapi/analyzerModule/nodeParsers.mjs +241 -222
  16. package/dist/openapi/analyzerModule/nodeParsers.mjs.map +1 -1
  17. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.cjs +1 -1
  18. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.cjs.map +1 -1
  19. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.d.ts +4 -2
  20. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.d.ts.map +1 -1
  21. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.mjs +10 -14
  22. package/dist/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/src/openapi/analyzerModule/analyzerModule.ts +1 -3
  25. package/src/openapi/analyzerModule/getSourceFileTimestamp.ts +52 -37
  26. package/src/openapi/analyzerModule/nodeParsers.ts +57 -22
  27. package/src/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.spec.ts +12 -3
  28. package/src/openapi/discoveryModule/discoverRouterFiles/discoverRouterFiles.ts +2 -7
@@ -1 +1 @@
1
- {"version":3,"file":"getSourceFileTimestamp.mjs","sources":["../../../src/openapi/analyzerModule/getSourceFileTimestamp.ts"],"sourcesContent":["import fs from 'fs'\nimport { SourceFile, SyntaxKind } from 'ts-morph'\n\nimport { formatTimestamp, Logger } from '../../utils/logger'\n\nexport type TimestampCache = Record<string, { dependencies: SourceFile[] }>\n\n/**\n * Per-run cache of file mtimes keyed by absolute path. Router files share large parts of their\n * transitive import graphs (common types, utils, models), so without this the same dependency gets\n * `statSync`-ed once per importing router — tens of thousands of redundant syscalls across a project\n * with dozens of routers. mtimes don't change mid-run, so memoizing is safe.\n */\nexport type MtimeCache = Map<string, number>\n\nexport function getSourceFileTimestamp(\n\tsourceFile: SourceFile,\n\ttimestampCache: TimestampCache,\n\tmtimeCache: MtimeCache = new Map(),\n) {\n\tconst dependencies = getFileDependencies(sourceFile, timestampCache)\n\tconst timestamps = dependencies.map((dep) => {\n\t\tconst depPath = dep.getFilePath()\n\t\tconst cached = mtimeCache.get(depPath)\n\t\tif (cached !== undefined) {\n\t\t\treturn cached\n\t\t}\n\t\tconst mtime = fs.statSync(depPath).mtimeMs\n\t\tmtimeCache.set(depPath, mtime)\n\t\treturn mtime\n\t})\n\tconst latestTimestamp = Math.max(...timestamps)\n\n\tconst fileName = sourceFile.getFilePath().split('/').pop()\n\tconst depsCount = dependencies.length\n\tLogger.debug(\n\t\t`[${fileName}] Found ${depsCount} imports, latest touched at ${formatTimestamp(latestTimestamp)}.`,\n\t)\n\n\treturn latestTimestamp\n}\n\nfunction getFileDependencies(sourceFile: SourceFile, timestampCache: TimestampCache): SourceFile[] {\n\tconst fileName = sourceFile.getFilePath().split('/').pop()\n\tif (!fileName) {\n\t\treturn []\n\t}\n\n\tconst cacheHit = timestampCache[sourceFile.getFilePath()]\n\tif (cacheHit) {\n\t\treturn cacheHit.dependencies\n\t}\n\n\t// Initialize cache entry early to prevent circular dependencies\n\ttimestampCache[sourceFile.getFilePath()] = { dependencies: [] }\n\n\ttry {\n\t\tconst results = [sourceFile]\n\n\t\tconst importDeclarations = sourceFile.getDescendantsOfKind(SyntaxKind.ImportDeclaration)\n\n\t\tfor (const declaration of importDeclarations) {\n\t\t\tconst importedSourceFile = declaration.getModuleSpecifierSourceFile()\n\t\t\tif (!importedSourceFile) {\n\t\t\t\tLogger.debug(`[${fileName}] Could not resolve import ${declaration.getModuleSpecifierValue()}.`)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tconst deps = getFileDependencies(importedSourceFile, timestampCache)\n\t\t\tresults.push(...deps)\n\t\t}\n\n\t\ttimestampCache[sourceFile.getFilePath()] = { dependencies: results }\n\t\treturn results\n\t} catch (error) {\n\t\tLogger.warn(`[${fileName}] Caught an error while processing imports:`, error)\n\t\ttimestampCache[sourceFile.getFilePath()] = { dependencies: [] }\n\t\treturn []\n\t}\n}\n"],"names":["getSourceFileTimestamp","sourceFile","timestampCache","mtimeCache","dependencies","getFileDependencies","timestamps","dep","depPath","cached","mtime","fs","latestTimestamp","fileName","depsCount","Logger","formatTimestamp","cacheHit","results","importDeclarations","SyntaxKind","declaration","importedSourceFile","deps","error"],"mappings":";;;AAeO,SAASA,EACfC,GACAC,GACAC,IAAyB,oBAAI,OAC5B;AACK,QAAAC,IAAeC,EAAoBJ,GAAYC,CAAc,GAC7DI,IAAaF,EAAa,IAAI,CAACG,MAAQ;AACtC,UAAAC,IAAUD,EAAI,YAAY,GAC1BE,IAASN,EAAW,IAAIK,CAAO;AACrC,QAAIC,MAAW;AACP,aAAAA;AAER,UAAMC,IAAQC,EAAG,SAASH,CAAO,EAAE;AACxB,WAAAL,E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api/analyzerModule/getSourceFileTimestamp.ts"],"sourcesContent":["import fs from 'fs'\nimport { SourceFile, ts } from 'ts-morph'\n\nimport { formatTimestamp, Logger } from '../../utils/logger'\n\nexport type TimestampCache = Record<string, { dependencies: string[] }>\nexport type MtimeCache = Map<string, number>\n\nconst resolutionHost: ts.ModuleResolutionHost = ts.sys\nconst resolutionCacheByOptions = new WeakMap<ts.CompilerOptions, ts.ModuleResolutionCache>()\n\nconst getResolutionCache = (options: ts.CompilerOptions): ts.ModuleResolutionCache => {\n\tlet cache = resolutionCacheByOptions.get(options)\n\tif (!cache) {\n\t\tcache = ts.createModuleResolutionCache(ts.sys.getCurrentDirectory(), (fileName) => fileName, options)\n\t\tresolutionCacheByOptions.set(options, cache)\n\t}\n\treturn cache\n}\n\nexport function getSourceFileTimestamp(\n\tsourceFile: SourceFile,\n\ttimestampCache: TimestampCache,\n\tmtimeCache: MtimeCache = new Map(),\n) {\n\tconst compilerOptions = sourceFile.getProject().getCompilerOptions()\n\tconst dependencies = getFileDependencies(sourceFile.getFilePath(), compilerOptions, timestampCache)\n\tconst timestamps = dependencies.map((depPath) => {\n\t\tconst cached = mtimeCache.get(depPath)\n\t\tif (cached !== undefined) {\n\t\t\treturn cached\n\t\t}\n\t\tconst mtime = fs.statSync(depPath).mtimeMs\n\t\tmtimeCache.set(depPath, mtime)\n\t\treturn mtime\n\t})\n\tconst latestTimestamp = Math.max(...timestamps)\n\n\tconst fileName = sourceFile.getFilePath().split('/').pop()\n\tLogger.debug(\n\t\t`[${fileName}] Found ${dependencies.length} imports, latest touched at ${formatTimestamp(latestTimestamp)}.`,\n\t)\n\n\treturn latestTimestamp\n}\n\nfunction getFileDependencies(\n\tfilePath: string,\n\toptions: ts.CompilerOptions,\n\ttimestampCache: TimestampCache,\n): string[] {\n\tconst cacheHit = timestampCache[filePath]\n\tif (cacheHit) {\n\t\treturn cacheHit.dependencies\n\t}\n\n\ttimestampCache[filePath] = { dependencies: [filePath] }\n\n\tconst fileName = filePath.split('/').pop()\n\tconst sourceText = ts.sys.readFile(filePath)\n\tif (sourceText === undefined) {\n\t\treturn timestampCache[filePath].dependencies\n\t}\n\n\ttry {\n\t\tconst closure = new Set<string>([filePath])\n\t\tconst { importedFiles } = ts.preProcessFile(sourceText, true, true)\n\t\tconst resolutionCache = getResolutionCache(options)\n\n\t\tfor (const imported of importedFiles) {\n\t\t\tconst { resolvedModule } = ts.resolveModuleName(\n\t\t\t\timported.fileName,\n\t\t\t\tfilePath,\n\t\t\t\toptions,\n\t\t\t\tresolutionHost,\n\t\t\t\tresolutionCache,\n\t\t\t)\n\t\t\tif (!resolvedModule) {\n\t\t\t\tLogger.debug(`[${fileName}] Could not resolve import ${imported.fileName}.`)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const dep of getFileDependencies(resolvedModule.resolvedFileName, options, timestampCache)) {\n\t\t\t\tclosure.add(dep)\n\t\t\t}\n\t\t}\n\n\t\tconst dependencies = [...closure]\n\t\ttimestampCache[filePath] = { dependencies }\n\t\treturn dependencies\n\t} catch (error) {\n\t\tLogger.warn(`[${fileName}] Caught an error while processing imports:`, error)\n\t\ttimestampCache[filePath] = { dependencies: [filePath] }\n\t\treturn timestampCache[filePath].dependencies\n\t}\n}\n"],"names":["resolutionHost","ts","resolutionCacheByOptions","getResolutionCache","options","cache","fileName","getSourceFileTimestamp","sourceFile","timestampCache","mtimeCache","compilerOptions","dependencies","getFileDependencies","timestamps","depPath","cached","mtime","fs","latestTimestamp","Logger","formatTimestamp","filePath","cacheHit","sourceText","closure","importedFiles","resolutionCache","imported","resolvedModule","dep","error"],"mappings":";;;AAQA,MAAMA,IAA0CC,EAAG,KAC7CC,wBAA+B,QAAsD,GAErFC,IAAqB,CAACC,MAA0D;AACjF,MAAAC,IAAQH,EAAyB,IAAIE,CAAO;AAChD,SAAKC,MACIA,IAAAJ,EAAG,4BAA4BA,EAAG,IAAI,uBAAuB,CAACK,MAAaA,GAAUF,CAAO,GAC3EF,EAAA,IAAIE,G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,MACD;AACA,UAAI,CAACE,GAAgB;AACpB,QAAAT,EAAO,MAAM,IAAId,CAAQ,8BAA8BsB,EAAS,QAAQ,GAAG;AAC3E;AAAA,MAAA;AAED,iBAAWE,KAAOjB,EAAoBgB,EAAe,kBAAkBzB,GAASK,CAAc;AAC7F,QAAAgB,EAAQ,IAAIK,CAAG;AAAA,IAChB;AAGK,UAAAlB,IAAe,CAAC,GAAGa,CAAO;AACjB,WAAAhB,EAAAa,CAAQ,IAAI,EAAE,cAAAV,EAAa,GACnCA;AAAA,WACCmB,GAAO;AACf,WAAAX,EAAO,KAAK,IAAId,CAAQ,+CAA+CyB,CAAK,GAC5EtB,EAAea,CAAQ,IAAI,EAAE,cAAc,CAACA,CAAQ,EAAE,GAC/Cb,EAAea,CAAQ,EAAE;AAAA,EAAA;AAElC;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("ts-morph"),x=require("../../utils/logger.cjs"),U=require("../manager/OpenApiManager.cjs"),A=new WeakMap,V=new WeakMap,R=new WeakMap,c=e=>{const i=A.get(e);if(i)return i;if(e.getKind()===t.SyntaxKind.Identifier){const n=e.asKind(t.SyntaxKind.Identifier).getImplementations()[0]?.getNode();if(n){const d=n.getParent().getLastChild();if(d===e)throw new Error("Recursive implementation found");const y=c(d);return A.set(e,y),y}const s=e.asKind(t.SyntaxKind.Identifier).getDefinitions()[0]?.getNode();if(s){const d=s.getParent().getLastChild();if(d===e)throw new Error("Recursive implementation found");const y=c(d);return A.set(e,y),y}throw new Error("No implementation nor definition available")}return A.set(e,e),e},h=e=>{const i=e.getChildrenOfKind(t.SyntaxKind.Identifier);return i.length===2?c(i[1]):e.getChildren().reverse().find(s=>s.getKind()!==t.SyntaxKind.GreaterThanToken&&s.getKind()!==t.SyntaxKind.CommaToken&&s.getKind()!==t.SyntaxKind.SemicolonToken)},L=e=>{const i=e.getFirstChildByKind(t.SyntaxKind.SyntaxList);return i.isKind(t.SyntaxKind.SyntaxList)?f(i.getFirstChild()):f(i)},f=e=>{const i=V.get(e);if(i!==void 0)return i;const n=_(e);return V.set(e,n),n},_=e=>{const i=e.getSymbol()?.getName();if(i&&U.OpenApiManager.getInstance().hasExposedModel(i))return[{role:"ref",shape:i,optional:!1}];const n=c(e);if(n.asKind(t.SyntaxKind.UndefinedKeyword))return"undefined";const a=n.asKind(t.SyntaxKind.LiteralType);if(a){if(a.getFirstChildByKind(t.SyntaxKind.TrueKeyword))return"true";if(a.getFirstChildByKind(t.SyntaxKind.FalseKeyword))return"false"}if(n.asKind(t.SyntaxKind.BooleanKeyword)||n.asKind(t.SyntaxKind.TrueKeyword)||n.asKind(t.SyntaxKind.FalseKeyword))return"boolean";if(n.asKind(t.SyntaxKind.StringKeyword)||n.asKind(t.SyntaxKind.StringLiteral))return"string";if(n.asKind(t.SyntaxKind.NumberKeyword)||n.asKind(t.SyntaxKind.NumericLiteral))return"number";if(n.asKind(t.SyntaxKind.BigIntKeyword)||n.asKind(t.SyntaxKind.BigIntLiteral))return"bigint";const r=n.asKind(t.SyntaxKind.TypeLiteral);if(r)return r.getFirstChildByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertySignature).map(k=>{const O=k.getFirstChildByKind(t.SyntaxKind.Identifier),v=h(k),M=O.getNextSiblingIfKind(t.SyntaxKind.QuestionToken);return{role:"property",identifier:O.getText(),shape:f(v),optional:v.getType().isNullable()||!!M}});const g=n.asKind(t.SyntaxKind.TypeReference);if(g)return f(g.getFirstChild());if(n.asKind(t.SyntaxKind.PropertyAccessExpression)){const P=c(n.getLastChild());return u(P.asKind(t.SyntaxKind.CallExpression).getReturnType(),P)}const K=n.asKind(t.SyntaxKind.UnionType);if(K)return u(K.getType(),n);const T=n.asKind(t.SyntaxKind.TypeQuery);if(T)return f(T.getLastChild());const C=n.asKind(t.SyntaxKind.QualifiedName);if(C)return f(C.getLastChild());const m=n.asKind(t.SyntaxKind.CallExpression);if(m)return u(m.getReturnType(),m);const B=n.asKind(t.SyntaxKind.AwaitExpression);if(B)return f(B.getChildAtIndex(1));const I=n.asKind(t.SyntaxKind.AsExpression);if(I)return f(I.getChildAtIndex(2));const D=n.getSourceFile().getFilePath().split("/").pop();return x.Logger.warn(`[${D}] Unknown node type: ${n.getKindName()}`),"unknown_1"},j=e=>e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).map(a=>{const d=a.getFirstChild(),y=(()=>{if(d.isKind(t.SyntaxKind.Identifier))return d.getText();if(d.isKind(t.SyntaxKind.StringLiteral))return d.getLiteralText();const r=a.getSourceFile().getFilePath().split("/").pop();return x.Logger.warn(`[${r}] Unknown identifier name: ${d.getText()}`),"unknown_30"})(),o=a.getLastChild(),l=c(o);return{role:"property",identifier:y,shape:N(l),optional:w(l),description:S(l,"description"),errorMessage:S(l,"errorMessage")}})||[],b=e=>{const i=e.asKind(t.SyntaxKind.CallExpression);return i?(i.getReturnType().getSymbol()?.getName()??"").startsWith("Zod"):!1},$=e=>{const i=e.asKind(t.SyntaxKind.CallExpression),n=i.getReturnType(),s=n.getProperty("_output");if(s)return u(s.getTypeAtLocation(i),i);const a=e.getSourceFile().getFilePath().split("/").pop(),d=n.getSymbol()?.getName()??"";return x.Logger.warn(`[${a}] Unknown zod type: ${d}`),"unknown_zod"},N=e=>{if(b(e))return $(e);const i=e.getParent().getFirstChildByKind(t.SyntaxKind.AsExpression);if(i){const r=i.getLastChildByKind(t.SyntaxKind.TypeReference);return L(r)}const n=e.getParent().getFirstChildByKind(t.SyntaxKind.TypeReference);if(n)return L(n);if(e.getParent().getChildrenOfKind(t.SyntaxKind.SyntaxList).length>=2){const r=e.getParent().getFirstChildByKind(t.SyntaxKind.SyntaxList).getFirstChild();return f(r)}const s=e.getParent().getFirstChildByKind(t.SyntaxKind.CallExpression);if(s){const r=c(s.getFirstChildByKind(t.SyntaxKind.SyntaxList).getFirstChild()),g=r.getParent().getFirstChildByKind(t.SyntaxKind.TypeReference);if(g)return u(g.getType(),g,[]);const p=r.getParent().getFirstChildByKind(t.SyntaxKind.ObjectLiteralExpression);if(p)return N(p);if(r.getKind()===t.SyntaxKind.CallExpression||r.getKind()===t.SyntaxKind.IntersectionType)return N(r);const K=e.getSourceFile().getFilePath().split("/").pop();return x.Logger.warn(`[${K}] Unknown call expression argument: ${r.getKindName()}`),"unknown_3"}const d=e.getFirstChildByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).find(r=>r.getFirstChildByKind(t.SyntaxKind.Identifier)?.getText()==="parse");if(d){const r=h(d).asKind(t.SyntaxKind.ArrowFunction).getReturnType();return u(r,d)}const y=e.getFirstChildByKind(t.SyntaxKind.SyntaxList)?.getFirstChildByKind(t.SyntaxKind.ImportType);if(y){const r=y.getLastChildByKind(t.SyntaxKind.GreaterThanToken).getChildIndex(),g=y.getChildAtIndex(r-1);return f(g.getFirstChild())}const o=e.isKind(t.SyntaxKind.IntersectionType)?e:e.getParent()?.isKind(t.SyntaxKind.VariableDeclaration)?e.getParent()?.getFirstChildByKind(t.SyntaxKind.IntersectionType):null;if(o){const r=o.getFirstChildByKind(t.SyntaxKind.TypeReference);if(r)return L(r)}const l=e.getSourceFile().getFilePath().split("/").pop();return x.Logger.warn(`[${l}] Unknown import type node`),"unknown_2"},w=e=>{if(b(e))return(e.asKind(t.SyntaxKind.CallExpression).getReturnType().getSymbol()?.getName()??"")==="ZodOptional";const i=e.asKind(t.SyntaxKind.CallExpression);if(i){const a=i.getFirstChildByKind(t.SyntaxKind.Identifier);if(a?.getText()==="OptionalParam")return!0;if(a?.getText()==="RequiredParam")return!1;const d=i.getFirstChildByKind(t.SyntaxKind.SyntaxList),y=c(d.getFirstChild());return w(y)}return e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).some(a=>a.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText()==="optional"?h(a).getKind()===t.SyntaxKind.TrueKeyword:!1)},S=(e,i)=>{if(b(e))return"";const n=c(e),s=n.asKind(t.SyntaxKind.CallExpression);if(s){const g=s.getLastChildByKind(t.SyntaxKind.SyntaxList);return S(g,i)}const a=n.asKind(t.SyntaxKind.SyntaxList);if(a)return a.getChildren().map(p=>S(p,i)).find(p=>!!p&&p!=="unknown_25")||"";const d=n.asKind(t.SyntaxKind.ObjectLiteralExpression);if(d){const p=E(d).find(K=>K.identifier===i);return p?Array.isArray(p.value)?"array":p.value||"":""}const y=n.asKind(t.SyntaxKind.IntersectionType);if(y)return y.getTypeNodes().flatMap(g=>S(g,i)).filter(g=>!!g&&g!=="unknown_25")[0]||"unknown_27";const o=n.asKind(t.SyntaxKind.TypeLiteral);if(o)return S(o.getFirstChildByKind(t.SyntaxKind.SyntaxList),i);const l=n.asKind(t.SyntaxKind.PropertySignature);if(l&&n.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText()===i)return h(l).getFirstDescendantByKind(t.SyntaxKind.StringLiteral).getLiteralText();const r=n.getSourceFile().getFilePath().split("/").pop();return x.Logger.dev(`[${r}] Unknown property string value node ${n.getKindName()}`),"unknown_25"},q=e=>{const i=e.getSymbol();if(!e.isObject()||!i)return!1;const n=e.getTypeArguments();return i.getName()==="Promise"&&n.length===1},u=(e,i,n=[])=>{const s=e.getAliasSymbol()?.getName();if(s&&U.OpenApiManager.getInstance().hasExposedModel(s))return[{role:"ref",shape:s,optional:!1}];const a=q(e)?e.getTypeArguments()[0]:e;if(n.some(l=>l===a))return"circular";const d=a.compilerType,y=R.get(d);if(y!==void 0)return y;const o=Q(a,i,n);return R.set(d,o),o},Q=(e,i,n)=>{const s=n.concat(e);if(e.getText()==="void")return"void";if(e.isAny())return"any";if(e.isUnknown())return"unknown";if(e.isNull())return"null";if(e.isUndefined())return"undefined";if(e.isBoolean()||e.isBooleanLiteral())return"boolean";if(e.isStringLiteral())return[{role:"literal_string",shape:String(e.getLiteralValue()),optional:!1}];if(e.isNumberLiteral())return[{role:"literal_number",shape:String(e.getLiteralValue()),optional:!1}];if(e.isString()||e.isTemplateLiteral())return"string";if(e.isNumber())return"number";if(e.getText()==="bigint")return"bigint";if(e.isTuple())return[{role:"tuple",shape:e.getTupleElements().map(o=>({role:"tuple_entry",shape:u(o,i,s),optional:!1})),optional:!1}];if(e.isArray())return[{role:"array",shape:u(e.getArrayElementType(),i,s),optional:!1}];if(e.isObject()){const o=e.getNumberIndexType(),r=e.getBaseTypes()?.find(g=>g.isArray());if(r)return[{role:"array",shape:u(r.getArrayElementType()??o,i,s),optional:!1}]}const a=e.getSymbol()?.getName(),d=new Set(["Buffer","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","ArrayBuffer","SharedArrayBuffer","ReadableStream"]);if(e.isObject()&&a&&d.has(a))return[{role:"buffer",shape:"buffer",optional:!1}];if(e.isObject()&&a==="RegExp")return"string";if(e.isObject()&&a==="Map"){const l=e.getTypeArguments()[1];return[{role:"record",shape:l?u(l,i,s):"unknown",optional:!1}]}if(e.isObject()&&a==="Set"){const l=e.getTypeArguments()[0];return[{role:"array",shape:l?u(l,i,s):"unknown",optional:!1}]}if(e.isObject()&&e.getProperties().length===0){const o=e.getAliasTypeArguments()[1]??e.getStringIndexType();if(o)return[{role:"record",shape:u(o,i,s),optional:!1}]}if(e.isObject())return a==="Date"||e.getText()==="Date"?"Date":e.getProperties().map(o=>{const l=o.getValueDeclaration()||o.getDeclarations()[0],r=u(o.getTypeAtLocation(i),i,s);if(!l)return{role:"property",identifier:o.getName(),shape:r,optional:!1};if(!(l.asKind(t.SyntaxKind.PropertySignature)||l.asKind(t.SyntaxKind.PropertyAssignment)||l.asKind(t.SyntaxKind.ShorthandPropertyAssignment)))return{role:"property",identifier:o.getName(),shape:r,optional:!1};const p=o.getTypeAtLocation(i).isNullable();return{role:"property",identifier:o.getName(),shape:r,optional:p}}).filter(o=>o.shape!=="undefined");if(e.isUnion()){const l=e.getUnionTypes().map(p=>({role:"union_entry",shape:u(p,i,s),optional:!1})).filter((p,K,T)=>!T.find((C,m)=>C.shape===p.shape&&m>K)),r=l.some(p=>p.shape==="undefined"),g=l.filter(p=>p.shape!=="undefined");return g.length===1?g[0].shape:[{role:"union",shape:g,optional:r}]}if(e.isIntersection())return e.getIntersectionTypes().map(r=>u(r,i,s)).filter(r=>typeof r!="string").reduce((r,g)=>[...r,...g],[]);const y=i.getSourceFile().getFilePath().split("/").pop();return x.Logger.warn(`[${y}] Unknown type shape node ${e.getText()}`),"unknown_5"},F=e=>{if(e.isKind(t.SyntaxKind.Identifier))return F(c(e));if(e.isKind(t.SyntaxKind.StringLiteral))return e.getLiteralValue();if(e.isKind(t.SyntaxKind.ArrayLiteralExpression))return e.forEachChildAsArray().map(n=>F(n));if(e.isKind(t.SyntaxKind.PropertyAccessExpression))return F(h(e));if(e.isKind(t.SyntaxKind.ObjectLiteralExpression))return E(e);const i=e.getSourceFile().getFilePath().split("/").pop();return x.Logger.dev(`[${i}] Unknown literal value node ${e.getKindName()}`),"unknown_6"},W=e=>{const i=e.getFirstDescendantByKind(t.SyntaxKind.CallExpression);if(!i)return null;const n=i.getArguments()[0];if(!n)return null;const s=n.getType();return s.isStringLiteral()?s.getLiteralValue():null},E=e=>e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).map(a=>{const y=a.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText(),o=a.getLastChild(),l=c(o),r=F(l);return{identifier:y,value:r}})||[];exports.findNodeImplementation=c;exports.findPropertyAssignmentValueNode=h;exports.getProperTypeShape=u;exports.getRecursiveNodeShape=f;exports.getShapeOfValidatorLiteral=j;exports.getTypeReferenceShape=L;exports.getValidatorPropertyOptionality=w;exports.getValidatorPropertyShape=N;exports.getValidatorPropertyStringValue=S;exports.getValuesOfObjectLiteral=E;exports.resolveEndpointPath=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("ts-morph"),S=require("../../utils/logger.cjs"),_=require("../manager/OpenApiManager.cjs"),A=new WeakMap,R=new WeakMap,M=new WeakMap,U=new WeakMap,q=e=>{const n=e.getSymbol();if(n)return(n.getAliasedSymbol()??n).compilerSymbol},u=e=>{const n=A.get(e);if(n)return n;if(e.getKind()===t.SyntaxKind.Identifier){const i=q(e);if(i){const l=U.get(i);if(l)return A.set(e,l),l}const s=(()=>{const l=e.asKind(t.SyntaxKind.Identifier).getImplementations()[0]?.getNode();if(l){const o=l.getParent().getLastChild();if(o===e)throw new Error("Recursive implementation found");return u(o)}const y=e.asKind(t.SyntaxKind.Identifier).getDefinitions()[0]?.getNode();if(y){const o=y.getParent().getLastChild();if(o===e)throw new Error("Recursive implementation found");return u(o)}throw new Error("No implementation nor definition available")})();return i&&U.set(i,s),A.set(e,s),s}return A.set(e,e),e},h=e=>{const n=e.getChildrenOfKind(t.SyntaxKind.Identifier);return n.length===2?u(n[1]):e.getChildren().reverse().find(d=>d.getKind()!==t.SyntaxKind.GreaterThanToken&&d.getKind()!==t.SyntaxKind.CommaToken&&d.getKind()!==t.SyntaxKind.SemicolonToken)},b=e=>{const n=e.getFirstChildByKind(t.SyntaxKind.SyntaxList);return n.isKind(t.SyntaxKind.SyntaxList)?f(n.getFirstChild()):f(n)},f=e=>{const n=R.get(e);if(n!==void 0)return n;const i=W(e);return R.set(e,i),i},W=e=>{const n=e.getSymbol()?.getName();if(n&&_.OpenApiManager.getInstance().hasExposedModel(n))return[{role:"ref",shape:n,optional:!1}];const i=u(e);if(i.asKind(t.SyntaxKind.UndefinedKeyword))return"undefined";const s=i.asKind(t.SyntaxKind.LiteralType);if(s){if(s.getFirstChildByKind(t.SyntaxKind.TrueKeyword))return"true";if(s.getFirstChildByKind(t.SyntaxKind.FalseKeyword))return"false"}if(i.asKind(t.SyntaxKind.BooleanKeyword)||i.asKind(t.SyntaxKind.TrueKeyword)||i.asKind(t.SyntaxKind.FalseKeyword))return"boolean";if(i.asKind(t.SyntaxKind.StringKeyword)||i.asKind(t.SyntaxKind.StringLiteral))return"string";if(i.asKind(t.SyntaxKind.NumberKeyword)||i.asKind(t.SyntaxKind.NumericLiteral))return"number";if(i.asKind(t.SyntaxKind.BigIntKeyword)||i.asKind(t.SyntaxKind.BigIntLiteral))return"bigint";const r=i.asKind(t.SyntaxKind.TypeLiteral);if(r)return r.getFirstChildByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertySignature).map(v=>{const O=v.getFirstChildByKind(t.SyntaxKind.Identifier),V=h(v),$=O.getNextSiblingIfKind(t.SyntaxKind.QuestionToken);return{role:"property",identifier:O.getText(),shape:f(V),optional:V.getType().isNullable()||!!$}});const g=i.asKind(t.SyntaxKind.TypeReference);if(g)return f(g.getFirstChild());if(i.asKind(t.SyntaxKind.PropertyAccessExpression)){const F=u(i.getLastChild());return c(F.asKind(t.SyntaxKind.CallExpression).getReturnType(),F)}const K=i.asKind(t.SyntaxKind.UnionType);if(K)return c(K.getType(),i);const T=i.asKind(t.SyntaxKind.TypeQuery);if(T)return f(T.getLastChild());const C=i.asKind(t.SyntaxKind.QualifiedName);if(C)return f(C.getLastChild());const m=i.asKind(t.SyntaxKind.CallExpression);if(m)return c(m.getReturnType(),m);const I=i.asKind(t.SyntaxKind.AwaitExpression);if(I)return f(I.getChildAtIndex(1));const k=i.asKind(t.SyntaxKind.AsExpression);if(k)return f(k.getChildAtIndex(2));const j=i.getSourceFile().getFilePath().split("/").pop();return S.Logger.warn(`[${j}] Unknown node type: ${i.getKindName()}`),"unknown_1"},Q=e=>e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).map(s=>{const l=s.getFirstChild(),y=(()=>{if(l.isKind(t.SyntaxKind.Identifier))return l.getText();if(l.isKind(t.SyntaxKind.StringLiteral))return l.getLiteralText();const r=s.getSourceFile().getFilePath().split("/").pop();return S.Logger.warn(`[${r}] Unknown identifier name: ${l.getText()}`),"unknown_30"})(),a=s.getLastChild(),o=u(a);return{role:"property",identifier:y,shape:N(o),optional:B(o),description:x(o,"description"),errorMessage:x(o,"errorMessage")}})||[],D=new WeakMap,P=e=>{const n=D.get(e);if(n)return n;const i=e.asKindOrThrow(t.SyntaxKind.CallExpression).getReturnType();return D.set(e,i),i},w=e=>{const n=e.asKind(t.SyntaxKind.CallExpression);return n?(P(n).getSymbol()?.getName()??"").startsWith("Zod"):!1},Z=e=>{const n=e.asKind(t.SyntaxKind.CallExpression),i=P(n),d=i.getProperty("_output");if(d)return c(d.getTypeAtLocation(n),n);const s=e.getSourceFile().getFilePath().split("/").pop(),l=i.getSymbol()?.getName()??"";return S.Logger.warn(`[${s}] Unknown zod type: ${l}`),"unknown_zod"},N=e=>{if(w(e))return Z(e);const n=e.getParent().getFirstChildByKind(t.SyntaxKind.AsExpression);if(n){const r=n.getLastChildByKind(t.SyntaxKind.TypeReference);return b(r)}const i=e.getParent().getFirstChildByKind(t.SyntaxKind.TypeReference);if(i)return b(i);if(e.getParent().getChildrenOfKind(t.SyntaxKind.SyntaxList).length>=2){const r=e.getParent().getFirstChildByKind(t.SyntaxKind.SyntaxList).getFirstChild();return f(r)}const d=e.getParent().getFirstChildByKind(t.SyntaxKind.CallExpression);if(d){const r=u(d.getFirstChildByKind(t.SyntaxKind.SyntaxList).getFirstChild()),g=r.getParent().getFirstChildByKind(t.SyntaxKind.TypeReference);if(g)return c(g.getType(),g,[]);const p=r.getParent().getFirstChildByKind(t.SyntaxKind.ObjectLiteralExpression);if(p)return N(p);if(r.getKind()===t.SyntaxKind.CallExpression||r.getKind()===t.SyntaxKind.IntersectionType)return N(r);const K=e.getSourceFile().getFilePath().split("/").pop();return S.Logger.warn(`[${K}] Unknown call expression argument: ${r.getKindName()}`),"unknown_3"}const l=e.getFirstChildByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).find(r=>r.getFirstChildByKind(t.SyntaxKind.Identifier)?.getText()==="parse");if(l){const r=h(l).asKind(t.SyntaxKind.ArrowFunction).getReturnType();return c(r,l)}const y=e.getFirstChildByKind(t.SyntaxKind.SyntaxList)?.getFirstChildByKind(t.SyntaxKind.ImportType);if(y){const r=y.getLastChildByKind(t.SyntaxKind.GreaterThanToken).getChildIndex(),g=y.getChildAtIndex(r-1);return f(g.getFirstChild())}const a=e.isKind(t.SyntaxKind.IntersectionType)?e:e.getParent()?.isKind(t.SyntaxKind.VariableDeclaration)?e.getParent()?.getFirstChildByKind(t.SyntaxKind.IntersectionType):null;if(a){const r=a.getFirstChildByKind(t.SyntaxKind.TypeReference);if(r)return b(r)}const o=e.getSourceFile().getFilePath().split("/").pop();return S.Logger.warn(`[${o}] Unknown import type node`),"unknown_2"},B=e=>{if(w(e)){const s=e.asKind(t.SyntaxKind.CallExpression);return(P(s).getSymbol()?.getName()??"")==="ZodOptional"}const n=e.asKind(t.SyntaxKind.CallExpression);if(n){const s=n.getFirstChildByKind(t.SyntaxKind.Identifier);if(s?.getText()==="OptionalParam")return!0;if(s?.getText()==="RequiredParam")return!1;const l=n.getFirstChildByKind(t.SyntaxKind.SyntaxList),y=u(l.getFirstChild());return B(y)}return e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).some(s=>s.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText()==="optional"?h(s).getKind()===t.SyntaxKind.TrueKeyword:!1)},x=(e,n)=>{if(w(e))return"";const i=u(e),d=i.asKind(t.SyntaxKind.CallExpression);if(d){const g=d.getLastChildByKind(t.SyntaxKind.SyntaxList);return x(g,n)}const s=i.asKind(t.SyntaxKind.SyntaxList);if(s)return s.getChildren().map(p=>x(p,n)).find(p=>!!p&&p!=="unknown_25")||"";const l=i.asKind(t.SyntaxKind.ObjectLiteralExpression);if(l){const p=E(l).find(K=>K.identifier===n);return p?Array.isArray(p.value)?"array":p.value||"":""}const y=i.asKind(t.SyntaxKind.IntersectionType);if(y)return y.getTypeNodes().flatMap(g=>x(g,n)).filter(g=>!!g&&g!=="unknown_25")[0]||"unknown_27";const a=i.asKind(t.SyntaxKind.TypeLiteral);if(a)return x(a.getFirstChildByKind(t.SyntaxKind.SyntaxList),n);const o=i.asKind(t.SyntaxKind.PropertySignature);if(o&&i.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText()===n)return h(o).getFirstDescendantByKind(t.SyntaxKind.StringLiteral).getLiteralText();const r=i.getSourceFile().getFilePath().split("/").pop();return S.Logger.dev(`[${r}] Unknown property string value node ${i.getKindName()}`),"unknown_25"},G=e=>{const n=e.getSymbol();if(!e.isObject()||!n)return!1;const i=e.getTypeArguments();return n.getName()==="Promise"&&i.length===1},c=(e,n,i=[])=>{const d=e.getAliasSymbol()?.getName();if(d&&_.OpenApiManager.getInstance().hasExposedModel(d))return[{role:"ref",shape:d,optional:!1}];const s=G(e)?e.getTypeArguments()[0]:e;if(i.some(o=>o===s))return"circular";const l=s.compilerType,y=M.get(l);if(y!==void 0)return y;const a=z(s,n,i);return M.set(l,a),a},z=(e,n,i)=>{const d=i.concat(e);if(e.getText()==="void")return"void";if(e.isAny())return"any";if(e.isUnknown())return"unknown";if(e.isNull())return"null";if(e.isUndefined())return"undefined";if(e.isBoolean()||e.isBooleanLiteral())return"boolean";if(e.isStringLiteral())return[{role:"literal_string",shape:String(e.getLiteralValue()),optional:!1}];if(e.isNumberLiteral())return[{role:"literal_number",shape:String(e.getLiteralValue()),optional:!1}];if(e.isString()||e.isTemplateLiteral())return"string";if(e.isNumber())return"number";if(e.getText()==="bigint")return"bigint";if(e.isTuple())return[{role:"tuple",shape:e.getTupleElements().map(a=>({role:"tuple_entry",shape:c(a,n,d),optional:!1})),optional:!1}];if(e.isArray())return[{role:"array",shape:c(e.getArrayElementType(),n,d),optional:!1}];if(e.isObject()){const a=e.getNumberIndexType(),r=e.getBaseTypes()?.find(g=>g.isArray());if(r)return[{role:"array",shape:c(r.getArrayElementType()??a,n,d),optional:!1}]}const s=e.getSymbol()?.getName(),l=new Set(["Buffer","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","ArrayBuffer","SharedArrayBuffer","ReadableStream"]);if(e.isObject()&&s&&l.has(s))return[{role:"buffer",shape:"buffer",optional:!1}];if(e.isObject()&&s==="RegExp")return"string";if(e.isObject()&&s==="Map"){const o=e.getTypeArguments()[1];return[{role:"record",shape:o?c(o,n,d):"unknown",optional:!1}]}if(e.isObject()&&s==="Set"){const o=e.getTypeArguments()[0];return[{role:"array",shape:o?c(o,n,d):"unknown",optional:!1}]}if(e.isObject()&&e.getProperties().length===0){const a=e.getAliasTypeArguments()[1]??e.getStringIndexType();if(a)return[{role:"record",shape:c(a,n,d),optional:!1}]}if(e.isObject())return s==="Date"||e.getText()==="Date"?"Date":e.getProperties().map(a=>{const o=a.getValueDeclaration()||a.getDeclarations()[0],r=c(a.getTypeAtLocation(n),n,d);if(!o)return{role:"property",identifier:a.getName(),shape:r,optional:!1};if(!(o.asKind(t.SyntaxKind.PropertySignature)||o.asKind(t.SyntaxKind.PropertyAssignment)||o.asKind(t.SyntaxKind.ShorthandPropertyAssignment)))return{role:"property",identifier:a.getName(),shape:r,optional:!1};const p=a.getTypeAtLocation(n).isNullable();return{role:"property",identifier:a.getName(),shape:r,optional:p}}).filter(a=>a.shape!=="undefined");if(e.isUnion()){const o=e.getUnionTypes().map(p=>({role:"union_entry",shape:c(p,n,d),optional:!1})).filter((p,K,T)=>!T.find((C,m)=>C.shape===p.shape&&m>K)),r=o.some(p=>p.shape==="undefined"),g=o.filter(p=>p.shape!=="undefined");return g.length===1?g[0].shape:[{role:"union",shape:g,optional:r}]}if(e.isIntersection())return e.getIntersectionTypes().map(r=>c(r,n,d)).filter(r=>typeof r!="string").reduce((r,g)=>[...r,...g],[]);const y=n.getSourceFile().getFilePath().split("/").pop();return S.Logger.warn(`[${y}] Unknown type shape node ${e.getText()}`),"unknown_5"},L=e=>{if(e.isKind(t.SyntaxKind.Identifier))return L(u(e));if(e.isKind(t.SyntaxKind.StringLiteral))return e.getLiteralValue();if(e.isKind(t.SyntaxKind.ArrayLiteralExpression))return e.forEachChildAsArray().map(i=>L(i));if(e.isKind(t.SyntaxKind.PropertyAccessExpression))return L(h(e));if(e.isKind(t.SyntaxKind.ObjectLiteralExpression))return E(e);const n=e.getSourceFile().getFilePath().split("/").pop();return S.Logger.dev(`[${n}] Unknown literal value node ${e.getKindName()}`),"unknown_6"},H=e=>{const n=e.getFirstDescendantByKind(t.SyntaxKind.CallExpression);if(!n)return null;const i=n.getArguments()[0];if(!i)return null;const d=i.getType();return d.isStringLiteral()?d.getLiteralValue():null},E=e=>e.getFirstDescendantByKind(t.SyntaxKind.SyntaxList).getChildrenOfKind(t.SyntaxKind.PropertyAssignment).map(s=>{const y=s.getFirstDescendantByKind(t.SyntaxKind.Identifier).getText(),a=s.getLastChild(),o=u(a),r=L(o);return{identifier:y,value:r}})||[];exports.findNodeImplementation=u;exports.findPropertyAssignmentValueNode=h;exports.getProperTypeShape=c;exports.getRecursiveNodeShape=f;exports.getShapeOfValidatorLiteral=Q;exports.getTypeReferenceShape=b;exports.getValidatorPropertyOptionality=B;exports.getValidatorPropertyShape=N;exports.getValidatorPropertyStringValue=x;exports.getValuesOfObjectLiteral=E;exports.resolveEndpointPath=H;
2
2
  //# sourceMappingURL=nodeParsers.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeParsers.cjs","sources":["../../../src/openapi/analyzerModule/nodeParsers.ts"],"sourcesContent":["import {\n\tNode,\n\tPropertyAccessExpression,\n\tPropertyAssignment,\n\tPropertySignature,\n\tShorthandPropertyAssignment,\n\tSyntaxKind,\n\tts,\n\tType,\n\tTypeReferenceNode,\n} from 'ts-morph'\n\nimport { Logger } from '../../utils/logger'\nimport { OpenApiManager } from '../manager/OpenApiManager'\nimport { ShapeOfProperty, ShapeOfType, ShapeOfUnionEntry } from './types'\n\nconst implementationCache = new WeakMap<Node, Node>()\nconst nodeShapeCache = new WeakMap<Node, ShapeOfType['shape']>()\nconst typeShapeCache = new WeakMap<object, ShapeOfType['shape']>()\n\nexport const findNodeImplementation = (node: Node): Node => {\n\tconst cached = implementationCache.get(node)\n\tif (cached) {\n\t\treturn cached\n\t}\n\n\tif (node.getKind() === SyntaxKind.Identifier) {\n\t\tconst implementationNode = node.asKind(SyntaxKind.Identifier)!.getImplementations()[0]?.getNode()\n\t\tif (implementationNode) {\n\t\t\tconst implementationParentNode = implementationNode.getParent()!\n\t\t\tconst assignmentValueNode = implementationParentNode.getLastChild()!\n\t\t\tif (assignmentValueNode === node) {\n\t\t\t\tthrow new Error('Recursive implementation found')\n\t\t\t}\n\t\t\tconst result = findNodeImplementation(assignmentValueNode)\n\t\t\timplementationCache.set(node, result)\n\t\t\treturn result\n\t\t}\n\n\t\tconst definitionNode = node.asKind(SyntaxKind.Identifier)!.getDefinitions()[0]?.getNode()\n\t\tif (definitionNode) {\n\t\t\tconst definitionParentNode = definitionNode.getParent()!\n\t\t\tconst assignmentValueNode = definitionParentNode.getLastChild()!\n\t\t\tif (assignmentValueNode === node) {\n\t\t\t\tthrow new Error('Recursive implementation found')\n\t\t\t}\n\t\t\tconst result = findNodeImplementation(assignmentValueNode)\n\t\t\timplementationCache.set(node, result)\n\t\t\treturn result\n\t\t}\n\t\tthrow new Error('No implementation nor definition available')\n\t}\n\n\timplementationCache.set(node, node)\n\treturn node\n}\n\nexport const findPropertyAssignmentValueNode = (\n\tnode:\n\t\t| PropertyAssignment\n\t\t| TypeReferenceNode\n\t\t| PropertySignature\n\t\t| PropertyAccessExpression\n\t\t| ShorthandPropertyAssignment,\n): Node => {\n\tconst identifierChildren = node.getChildrenOfKind(SyntaxKind.Identifier)\n\tif (identifierChildren.length === 2) {\n\t\treturn findNodeImplementation(identifierChildren[1])\n\t}\n\tconst lastMatchingChild = node.getChildren().reverse()\n\treturn lastMatchingChild.find(\n\t\t(child) =>\n\t\t\tchild.getKind() !== SyntaxKind.GreaterThanToken &&\n\t\t\tchild.getKind() !== SyntaxKind.CommaToken &&\n\t\t\tchild.getKind() !== SyntaxKind.SemicolonToken,\n\t)!\n}\n\nexport const getTypeReferenceShape = (node: TypeReferenceNode): ShapeOfType['shape'] => {\n\tconst firstChild = node.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\tif (firstChild.isKind(SyntaxKind.SyntaxList)) {\n\t\treturn getRecursiveNodeShape(firstChild.getFirstChild()!)\n\t} else {\n\t\treturn getRecursiveNodeShape(firstChild)\n\t}\n}\n\nexport const getRecursiveNodeShape = (nodeOrReference: Node): ShapeOfType['shape'] => {\n\tconst cached = nodeShapeCache.get(nodeOrReference)\n\tif (cached !== undefined) {\n\t\treturn cached\n\t}\n\tconst result = computeRecursiveNodeShape(nodeOrReference)\n\tnodeShapeCache.set(nodeOrReference, result)\n\treturn result\n}\n\nconst computeRecursiveNodeShape = (nodeOrReference: Node): ShapeOfType['shape'] => {\n\tconst typeName = nodeOrReference.getSymbol()?.getName()\n\tif (typeName && OpenApiManager.getInstance().hasExposedModel(typeName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'ref',\n\t\t\t\tshape: typeName,\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tconst node = findNodeImplementation(nodeOrReference)\n\n\t// Undefined\n\tconst undefinedNode = node.asKind(SyntaxKind.UndefinedKeyword)\n\tif (undefinedNode) {\n\t\treturn 'undefined'\n\t}\n\n\t// Literal type\n\tconst literalNode = node.asKind(SyntaxKind.LiteralType)\n\tif (literalNode) {\n\t\tif (literalNode.getFirstChildByKind(SyntaxKind.TrueKeyword)) {\n\t\t\treturn 'true'\n\t\t}\n\t\tif (literalNode.getFirstChildByKind(SyntaxKind.FalseKeyword)) {\n\t\t\treturn 'false'\n\t\t}\n\t}\n\n\t// Boolean literal\n\tconst booleanLiteralNode =\n\t\tnode.asKind(SyntaxKind.BooleanKeyword) ||\n\t\tnode.asKind(SyntaxKind.TrueKeyword) ||\n\t\tnode.asKind(SyntaxKind.FalseKeyword)\n\tif (booleanLiteralNode) {\n\t\treturn 'boolean'\n\t}\n\n\t// String literal\n\tconst stringLiteralNode = node.asKind(SyntaxKind.StringKeyword) || node.asKind(SyntaxKind.StringLiteral)\n\tif (stringLiteralNode) {\n\t\treturn 'string'\n\t}\n\n\t// Number literal\n\tconst numberLiteralNode = node.asKind(SyntaxKind.NumberKeyword) || node.asKind(SyntaxKind.NumericLiteral)\n\tif (numberLiteralNode) {\n\t\treturn 'number'\n\t}\n\n\t// BigInt literal\n\tconst bigIntNode = node.asKind(SyntaxKind.BigIntKeyword) || node.asKind(SyntaxKind.BigIntLiteral)\n\tif (bigIntNode) {\n\t\treturn 'bigint'\n\t}\n\n\t// Type literal\n\tconst typeLiteralNode = node.asKind(SyntaxKind.TypeLiteral)\n\tif (typeLiteralNode) {\n\t\tconst properties = typeLiteralNode\n\t\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t\t.getChildrenOfKind(SyntaxKind.PropertySignature)\n\n\t\tconst propertyShapes = properties.map((propNode) => {\n\t\t\tconst identifier = propNode.getFirstChildByKind(SyntaxKind.Identifier)!\n\t\t\tconst valueNode = findPropertyAssignmentValueNode(propNode)\n\t\t\tconst questionMarkToken = identifier.getNextSiblingIfKind(SyntaxKind.QuestionToken)\n\t\t\treturn {\n\t\t\t\trole: 'property' as const,\n\t\t\t\tidentifier: identifier.getText(),\n\t\t\t\tshape: getRecursiveNodeShape(valueNode),\n\t\t\t\toptional: valueNode.getType().isNullable() || !!questionMarkToken,\n\t\t\t}\n\t\t})\n\t\treturn propertyShapes\n\t}\n\n\t// Type reference\n\tconst typeReferenceNode = node.asKind(SyntaxKind.TypeReference)\n\tif (typeReferenceNode) {\n\t\treturn getRecursiveNodeShape(typeReferenceNode.getFirstChild()!)\n\t}\n\n\t// Property access expression\n\tconst propertyAccessNode = node.asKind(SyntaxKind.PropertyAccessExpression)\n\tif (propertyAccessNode) {\n\t\tconst lastChild = findNodeImplementation(node.getLastChild()!)\n\t\treturn getProperTypeShape(lastChild.asKind(SyntaxKind.CallExpression)!.getReturnType(), lastChild)\n\t}\n\n\t// Union type\n\tconst unionTypeNode = node.asKind(SyntaxKind.UnionType)\n\tif (unionTypeNode) {\n\t\treturn getProperTypeShape(unionTypeNode.getType(), node)\n\t}\n\n\t// Typeof query\n\tconst typeQueryNode = node.asKind(SyntaxKind.TypeQuery)\n\tif (typeQueryNode) {\n\t\treturn getRecursiveNodeShape(typeQueryNode.getLastChild()!)\n\t}\n\n\t// Qualified name\n\tconst qualifiedNameNode = node.asKind(SyntaxKind.QualifiedName)\n\tif (qualifiedNameNode) {\n\t\treturn getRecursiveNodeShape(qualifiedNameNode.getLastChild()!)\n\t}\n\n\t// Call expression\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\treturn getProperTypeShape(callExpressionNode.getReturnType(), callExpressionNode)\n\t}\n\n\t// Await expression\n\tconst awaitExpressionNode = node.asKind(SyntaxKind.AwaitExpression)\n\tif (awaitExpressionNode) {\n\t\treturn getRecursiveNodeShape(awaitExpressionNode.getChildAtIndex(1)!)\n\t}\n\n\t// 'As' Expression\n\tconst asExpressionNode = node.asKind(SyntaxKind.AsExpression)\n\tif (asExpressionNode) {\n\t\treturn getRecursiveNodeShape(asExpressionNode.getChildAtIndex(2)!)\n\t}\n\n\t// TODO\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown node type: ${node.getKindName()}`)\n\treturn 'unknown_1'\n}\n\nexport const getShapeOfValidatorLiteral = (\n\tobjectLiteralNode: Node<ts.ObjectLiteralExpression>,\n): (ShapeOfProperty & { description: string; errorMessage: string })[] => {\n\tconst syntaxListNode = objectLiteralNode.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\tconst properties = assignmentNodes.map((node) => {\n\t\tconst identifierNode = node.getFirstChild()!\n\t\tconst identifierName = (() => {\n\t\t\tif (identifierNode.isKind(SyntaxKind.Identifier)) {\n\t\t\t\treturn identifierNode.getText()\n\t\t\t}\n\t\t\tif (identifierNode.isKind(SyntaxKind.StringLiteral)) {\n\t\t\t\treturn identifierNode.getLiteralText()\n\t\t\t}\n\t\t\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\t\t\tLogger.warn(`[${fileName}] Unknown identifier name: ${identifierNode.getText()}`)\n\t\t\treturn 'unknown_30'\n\t\t})()\n\n\t\tconst assignmentValueNode = node.getLastChild()!\n\t\tconst innerLiteralNode = findNodeImplementation(assignmentValueNode)\n\n\t\treturn {\n\t\t\trole: 'property' as const,\n\t\t\tidentifier: identifierName,\n\t\t\tshape: getValidatorPropertyShape(innerLiteralNode),\n\t\t\toptional: getValidatorPropertyOptionality(innerLiteralNode),\n\t\t\tdescription: getValidatorPropertyStringValue(innerLiteralNode, 'description'),\n\t\t\terrorMessage: getValidatorPropertyStringValue(innerLiteralNode, 'errorMessage'),\n\t\t}\n\t})\n\n\treturn properties || []\n}\n\nconst isZodCallExpression = (node: Node): boolean => {\n\tconst callExpression = node.asKind(SyntaxKind.CallExpression)\n\tif (!callExpression) {\n\t\treturn false\n\t}\n\tconst returnType = callExpression.getReturnType()\n\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\treturn typeName.startsWith('Zod')\n}\n\nconst getZodCallShape = (node: Node): ShapeOfType['shape'] => {\n\tconst callExpression = node.asKind(SyntaxKind.CallExpression)!\n\tconst returnType = callExpression.getReturnType()\n\tconst outputProp = returnType.getProperty('_output')\n\tif (outputProp) {\n\t\treturn getProperTypeShape(outputProp.getTypeAtLocation(callExpression), callExpression)\n\t}\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\tLogger.warn(`[${fileName}] Unknown zod type: ${typeName}`)\n\treturn 'unknown_zod'\n}\n\nexport const getValidatorPropertyShape = (innerLiteralNode: Node): ShapeOfType['shape'] => {\n\t// Zod validator (e.g. z.number(), z.string(), z.object({...}), z.array(...))\n\tif (isZodCallExpression(innerLiteralNode)) {\n\t\treturn getZodCallShape(innerLiteralNode)\n\t}\n\n\t// Inline definition with `as Validator<...>` clause\n\tconst inlineValidatorAsExpression = innerLiteralNode\n\t\t.getParent()!\n\t\t.getFirstChildByKind(SyntaxKind.AsExpression)\n\tif (inlineValidatorAsExpression) {\n\t\tconst typeReference = inlineValidatorAsExpression.getLastChildByKind(SyntaxKind.TypeReference)!\n\t\treturn getTypeReferenceShape(typeReference)\n\t}\n\n\t// Variable with `: Validator<...>` clause\n\tconst childTypeReferenceNode = innerLiteralNode.getParent()!.getFirstChildByKind(SyntaxKind.TypeReference)\n\tif (childTypeReferenceNode) {\n\t\treturn getTypeReferenceShape(childTypeReferenceNode)\n\t}\n\n\t// `RequiredParam<...>` inline call expression\n\tif (innerLiteralNode.getParent()!.getChildrenOfKind(SyntaxKind.SyntaxList).length >= 2) {\n\t\tconst typeNode = innerLiteralNode\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t\t.getFirstChild()!\n\t\treturn getRecursiveNodeShape(typeNode)\n\t}\n\n\t// `RequestParam | RequiredParam | OptionalParam` call expression\n\tconst childCallExpressionNode = innerLiteralNode.getParent()!.getFirstChildByKind(SyntaxKind.CallExpression)\n\tif (childCallExpressionNode) {\n\t\tconst callExpressionArgument = findNodeImplementation(\n\t\t\tchildCallExpressionNode.getFirstChildByKind(SyntaxKind.SyntaxList)!.getFirstChild()!,\n\t\t)\n\n\t\t// Param is a type reference\n\t\tconst typeReferenceNode = callExpressionArgument\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.TypeReference)!\n\t\tif (typeReferenceNode) {\n\t\t\treturn getProperTypeShape(typeReferenceNode.getType(), typeReferenceNode, [])\n\t\t}\n\n\t\tconst thingyNode = callExpressionArgument\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.ObjectLiteralExpression)!\n\t\tif (thingyNode) {\n\t\t\treturn getValidatorPropertyShape(thingyNode)\n\t\t}\n\n\t\tif (callExpressionArgument.getKind() === SyntaxKind.CallExpression) {\n\t\t\treturn getValidatorPropertyShape(callExpressionArgument)\n\t\t}\n\n\t\tif (callExpressionArgument.getKind() === SyntaxKind.IntersectionType) {\n\t\t\treturn getValidatorPropertyShape(callExpressionArgument)\n\t\t}\n\n\t\tconst fileName = innerLiteralNode.getSourceFile().getFilePath().split('/').pop()\n\t\tLogger.warn(`[${fileName}] Unknown call expression argument: ${callExpressionArgument.getKindName()}`)\n\t\treturn 'unknown_3'\n\t}\n\n\t// Attempting to infer type from `parse` function\n\tconst innerNodePropertyAssignments = innerLiteralNode\n\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t.getChildrenOfKind(SyntaxKind.PropertyAssignment)\n\tconst parsePropertyAssignment = innerNodePropertyAssignments.find((prop) => {\n\t\treturn prop.getFirstChildByKind(SyntaxKind.Identifier)?.getText() === 'parse'\n\t})\n\tif (parsePropertyAssignment) {\n\t\tconst returnType = findPropertyAssignmentValueNode(parsePropertyAssignment)\n\t\t\t.asKind(SyntaxKind.ArrowFunction)!\n\t\t\t.getReturnType()\n\t\treturn getProperTypeShape(returnType, parsePropertyAssignment)\n\t}\n\n\t// Import statement\n\tconst importTypeNode = innerLiteralNode\n\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)\n\t\t?.getFirstChildByKind(SyntaxKind.ImportType)\n\tif (importTypeNode) {\n\t\tconst indexOfGreaterThanToken = importTypeNode\n\t\t\t.getLastChildByKind(SyntaxKind.GreaterThanToken)!\n\t\t\t.getChildIndex()\n\t\tconst targetSyntaxList = importTypeNode.getChildAtIndex(indexOfGreaterThanToken - 1)\n\t\treturn getRecursiveNodeShape(targetSyntaxList.getFirstChild()!)\n\t}\n\n\t// Intersection type with Validator\n\tconst intersectionType = innerLiteralNode.isKind(SyntaxKind.IntersectionType)\n\t\t? innerLiteralNode\n\t\t: innerLiteralNode.getParent()?.isKind(SyntaxKind.VariableDeclaration)\n\t\t\t? innerLiteralNode.getParent()?.getFirstChildByKind(SyntaxKind.IntersectionType)\n\t\t\t: null\n\n\tif (intersectionType) {\n\t\tconst validatorType = intersectionType.getFirstChildByKind(SyntaxKind.TypeReference)\n\t\tif (validatorType) {\n\t\t\treturn getTypeReferenceShape(validatorType)\n\t\t}\n\t}\n\n\tconst fileName = innerLiteralNode.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown import type node`)\n\n\treturn 'unknown_2'\n}\n\nexport const getValidatorPropertyOptionality = (node: Node): boolean => {\n\tif (isZodCallExpression(node)) {\n\t\tconst callExpression = node.asKind(SyntaxKind.CallExpression)!\n\t\tconst returnType = callExpression.getReturnType()\n\t\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\t\tif (typeName === 'ZodOptional') {\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\tconst identifierNode = callExpressionNode.getFirstChildByKind(SyntaxKind.Identifier)\n\t\tif (identifierNode?.getText() === 'OptionalParam') {\n\t\t\treturn true\n\t\t} else if (identifierNode?.getText() === 'RequiredParam') {\n\t\t\treturn false\n\t\t}\n\n\t\tconst syntaxListNode = callExpressionNode.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\tconst literalExpression = findNodeImplementation(syntaxListNode.getFirstChild()!)\n\t\treturn getValidatorPropertyOptionality(literalExpression)\n\t}\n\n\tconst syntaxListNode = node.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\treturn assignmentNodes.some((node) => {\n\t\tconst identifierNode = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tconst identifierName = identifierNode.getText()\n\n\t\tif (identifierName === 'optional') {\n\t\t\tconst value = findPropertyAssignmentValueNode(node)\n\t\t\treturn value.getKind() === SyntaxKind.TrueKeyword\n\t\t}\n\t\treturn false\n\t})\n}\n\nexport const getValidatorPropertyStringValue = (\n\tnodeOrReference: Node,\n\tname: 'description' | 'errorMessage',\n): string => {\n\tif (isZodCallExpression(nodeOrReference)) {\n\t\treturn ''\n\t}\n\n\tconst node = findNodeImplementation(nodeOrReference)\n\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\tconst targetChild = callExpressionNode.getLastChildByKind(SyntaxKind.SyntaxList)!\n\t\treturn getValidatorPropertyStringValue(targetChild, name)\n\t}\n\n\tconst syntaxListNode = node.asKind(SyntaxKind.SyntaxList)\n\tif (syntaxListNode) {\n\t\tconst children = syntaxListNode.getChildren().map((c) => getValidatorPropertyStringValue(c, name))\n\t\treturn children.find((value) => !!value && value !== 'unknown_25') || ''\n\t}\n\n\tconst objectLiteralNode = node.asKind(SyntaxKind.ObjectLiteralExpression)\n\tif (objectLiteralNode) {\n\t\tconst values = getValuesOfObjectLiteral(objectLiteralNode)\n\t\tconst targetValue = values.find((value) => value.identifier === name)\n\t\tif (!targetValue) {\n\t\t\treturn ''\n\t\t}\n\t\tif (Array.isArray(targetValue.value)) {\n\t\t\treturn 'array'\n\t\t}\n\t\treturn targetValue.value || ''\n\t}\n\n\tconst intersectionTypeNode = node.asKind(SyntaxKind.IntersectionType)\n\tif (intersectionTypeNode) {\n\t\treturn (\n\t\t\tintersectionTypeNode\n\t\t\t\t.getTypeNodes()\n\t\t\t\t.flatMap((t) => getValidatorPropertyStringValue(t, name))\n\t\t\t\t.filter((v) => !!v && v !== 'unknown_25')[0] || 'unknown_27'\n\t\t)\n\t}\n\n\tconst typeLiteralNode = node.asKind(SyntaxKind.TypeLiteral)\n\tif (typeLiteralNode) {\n\t\treturn getValidatorPropertyStringValue(typeLiteralNode.getFirstChildByKind(SyntaxKind.SyntaxList)!, name)\n\t}\n\n\tconst propertySignatureNode = node.asKind(SyntaxKind.PropertySignature)\n\tif (propertySignatureNode) {\n\t\tconst identifier = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tif (identifier.getText() === name) {\n\t\t\tconst targetNode = findPropertyAssignmentValueNode(propertySignatureNode).getFirstDescendantByKind(\n\t\t\t\tSyntaxKind.StringLiteral,\n\t\t\t)!\n\t\t\treturn targetNode.getLiteralText()\n\t\t}\n\t}\n\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.dev(`[${fileName}] Unknown property string value node ${node.getKindName()}`)\n\treturn 'unknown_25'\n}\n\nconst isPromise = (type: Type) => {\n\tconst symbol = type.getSymbol()\n\tif (!type.isObject() || !symbol) {\n\t\treturn false\n\t}\n\tconst args = type.getTypeArguments()\n\treturn symbol.getName() === 'Promise' && args.length === 1\n}\n\nexport const getProperTypeShape = (\n\ttypeOrPromise: Type,\n\tatLocation: Node,\n\tstack: Type[] = [],\n): ShapeOfType['shape'] => {\n\tconst typeName = typeOrPromise.getAliasSymbol()?.getName()\n\tif (typeName && OpenApiManager.getInstance().hasExposedModel(typeName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'ref',\n\t\t\t\tshape: typeName,\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tconst type = isPromise(typeOrPromise) ? typeOrPromise.getTypeArguments()[0] : typeOrPromise\n\n\tif (stack.some((previousType) => previousType === type)) {\n\t\treturn 'circular'\n\t}\n\n\tconst cacheKey = type.compilerType\n\tconst cached = typeShapeCache.get(cacheKey)\n\tif (cached !== undefined) {\n\t\treturn cached\n\t}\n\tconst result = computeProperTypeShape(type, atLocation, stack)\n\ttypeShapeCache.set(cacheKey, result)\n\treturn result\n}\n\nconst computeProperTypeShape = (type: Type, atLocation: Node, stack: Type[]): ShapeOfType['shape'] => {\n\tconst nextStack = stack.concat(type)\n\n\tif (type.getText() === 'void') {\n\t\treturn 'void'\n\t}\n\n\tif (type.isAny()) {\n\t\treturn 'any'\n\t}\n\n\tif (type.isUnknown()) {\n\t\treturn 'unknown'\n\t}\n\n\tif (type.isNull()) {\n\t\treturn 'null'\n\t}\n\n\tif (type.isUndefined()) {\n\t\treturn 'undefined'\n\t}\n\n\tif (type.isBoolean() || type.isBooleanLiteral()) {\n\t\treturn 'boolean'\n\t}\n\n\tif (type.isStringLiteral()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'literal_string' as const,\n\t\t\t\tshape: String(type.getLiteralValue()!),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isNumberLiteral()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'literal_number' as const,\n\t\t\t\tshape: String(type.getLiteralValue()!),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isString() || type.isTemplateLiteral()) {\n\t\treturn 'string'\n\t}\n\n\tif (type.isNumber()) {\n\t\treturn 'number'\n\t}\n\n\tif (type.getText() === 'bigint') {\n\t\treturn 'bigint'\n\t}\n\n\tif (type.isTuple()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'tuple' as const,\n\t\t\t\tshape: type.getTupleElements().map((t) => ({\n\t\t\t\t\trole: 'tuple_entry' as const,\n\t\t\t\t\tshape: getProperTypeShape(t, atLocation, nextStack),\n\t\t\t\t\toptional: false,\n\t\t\t\t})),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isArray()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'array' as const,\n\t\t\t\tshape: getProperTypeShape(type.getArrayElementType()!, atLocation, nextStack),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\t// Handles `interface Foo extends Array<T>` (e.g. Prisma's JsonArray)\n\t// which fails type.isArray() but is still array-like\n\tif (type.isObject()) {\n\t\tconst arrayElementType = type.getNumberIndexType()\n\t\tconst baseTypes = type.getBaseTypes()\n\t\tconst arrayBase = baseTypes?.find((base) => base.isArray())\n\t\tif (arrayBase) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\trole: 'array' as const,\n\t\t\t\t\tshape: getProperTypeShape(\n\t\t\t\t\t\tarrayBase.getArrayElementType() ?? arrayElementType!,\n\t\t\t\t\t\tatLocation,\n\t\t\t\t\t\tnextStack,\n\t\t\t\t\t),\n\t\t\t\t\toptional: false,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t}\n\n\tconst typeSymbolName = type.getSymbol()?.getName()\n\n\tconst bufferLikeTypes = new Set([\n\t\t'Buffer',\n\t\t'Uint8Array',\n\t\t'Int8Array',\n\t\t'Uint8ClampedArray',\n\t\t'Int16Array',\n\t\t'Uint16Array',\n\t\t'Int32Array',\n\t\t'Uint32Array',\n\t\t'Float32Array',\n\t\t'Float64Array',\n\t\t'BigInt64Array',\n\t\t'BigUint64Array',\n\t\t'ArrayBuffer',\n\t\t'SharedArrayBuffer',\n\t\t'ReadableStream',\n\t])\n\n\tif (type.isObject() && typeSymbolName && bufferLikeTypes.has(typeSymbolName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'buffer' as const,\n\t\t\t\tshape: 'buffer',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'RegExp') {\n\t\treturn 'string'\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'Map') {\n\t\tconst typeArgs = type.getTypeArguments()\n\t\tconst valueType = typeArgs[1]\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'record' as const,\n\t\t\t\tshape: valueType ? getProperTypeShape(valueType, atLocation, nextStack) : 'unknown',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'Set') {\n\t\tconst typeArgs = type.getTypeArguments()\n\t\tconst elementType = typeArgs[0]\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'array' as const,\n\t\t\t\tshape: elementType ? getProperTypeShape(elementType, atLocation, nextStack) : 'unknown',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && type.getProperties().length === 0) {\n\t\tconst targetType = type.getAliasTypeArguments()[1] ?? type.getStringIndexType()\n\t\tif (targetType) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\trole: 'record' as const,\n\t\t\t\t\tshape: getProperTypeShape(targetType, atLocation, nextStack),\n\t\t\t\t\toptional: false,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t}\n\n\tif (type.isObject()) {\n\t\tif (typeSymbolName === 'Date' || type.getText() === 'Date') {\n\t\t\treturn 'Date'\n\t\t}\n\t\treturn type\n\t\t\t.getProperties()\n\t\t\t.map((prop) => {\n\t\t\t\tconst valueDeclaration = prop.getValueDeclaration() || prop.getDeclarations()[0]!\n\t\t\t\tconst shape = getProperTypeShape(prop.getTypeAtLocation(atLocation), atLocation, nextStack)\n\t\t\t\tif (!valueDeclaration) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\t\tshape,\n\t\t\t\t\t\toptional: false,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst valueDeclarationNode =\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.PropertySignature) ||\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.PropertyAssignment) ||\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.ShorthandPropertyAssignment)\n\n\t\t\t\tif (!valueDeclarationNode) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\t\tshape,\n\t\t\t\t\t\toptional: false,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst isOptional = prop.getTypeAtLocation(atLocation).isNullable()\n\n\t\t\t\treturn {\n\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\tshape,\n\t\t\t\t\toptional: isOptional,\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((val) => val.shape !== 'undefined')\n\t}\n\n\tif (type.isUnion()) {\n\t\tconst unfilteredShapes: ShapeOfUnionEntry[] = type.getUnionTypes().map((type) => ({\n\t\t\trole: 'union_entry',\n\t\t\tshape: getProperTypeShape(type, atLocation, nextStack),\n\t\t\toptional: false,\n\t\t}))\n\n\t\tconst dedupedShapes = unfilteredShapes.filter(\n\t\t\t(type, index, arr) => !arr.find((dup, dupIndex) => dup.shape === type.shape && dupIndex > index),\n\t\t)\n\t\tconst isNullable = dedupedShapes.some((shape) => shape.shape === 'undefined')\n\t\tconst shapes = dedupedShapes.filter((shape) => shape.shape !== 'undefined')\n\t\tif (shapes.length === 1) {\n\t\t\treturn shapes[0].shape\n\t\t}\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'union',\n\t\t\t\tshape: shapes,\n\t\t\t\toptional: isNullable,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isIntersection()) {\n\t\tconst children = type.getIntersectionTypes()\n\t\tconst shapesOfChildren = children\n\t\t\t.map((child) => getProperTypeShape(child, atLocation, nextStack))\n\t\t\t.filter((shape) => typeof shape !== 'string') as ShapeOfProperty[][]\n\t\treturn shapesOfChildren.reduce<ShapeOfType[]>((total, current) => [...total, ...current], [])\n\t}\n\n\tconst fileName = atLocation.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown type shape node ${type.getText()}`)\n\treturn 'unknown_5'\n}\n\nconst getLiteralValueOfNode = (node: Node): string | string[] | unknown[] => {\n\tif (node.isKind(SyntaxKind.Identifier)) {\n\t\treturn getLiteralValueOfNode(findNodeImplementation(node))\n\t} else if (node.isKind(SyntaxKind.StringLiteral)) {\n\t\treturn node.getLiteralValue()\n\t} else if (node.isKind(SyntaxKind.ArrayLiteralExpression)) {\n\t\treturn node.forEachChildAsArray().map((child) => getLiteralValueOfNode(child)) as string[]\n\t} else if (node.isKind(SyntaxKind.PropertyAccessExpression)) {\n\t\treturn getLiteralValueOfNode(findPropertyAssignmentValueNode(node))\n\t} else if (node.isKind(SyntaxKind.ObjectLiteralExpression)) {\n\t\treturn getValuesOfObjectLiteral(node)\n\t}\n\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.dev(`[${fileName}] Unknown literal value node ${node.getKindName()}`)\n\n\treturn 'unknown_6'\n}\n\nexport const resolveEndpointPath = (node: Node): string | null => {\n\tconst callExpression = node.getFirstDescendantByKind(SyntaxKind.CallExpression)\n\tif (!callExpression) return null\n\n\tconst firstArg = callExpression.getArguments()[0]\n\tif (!firstArg) return null\n\n\tconst argType = firstArg.getType()\n\tif (argType.isStringLiteral()) {\n\t\treturn argType.getLiteralValue() as string\n\t}\n\n\treturn null\n}\n\nexport const getValuesOfObjectLiteral = (objectLiteralNode: Node<ts.ObjectLiteralExpression>) => {\n\tconst syntaxListNode = objectLiteralNode.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\tconst properties = assignmentNodes.map((node) => {\n\t\tconst identifierNode = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tconst identifierName = identifierNode.getText()\n\n\t\tconst assignmentValueNode = node.getLastChild()!\n\t\tconst targetNode = findNodeImplementation(assignmentValueNode)\n\t\tconst value = getLiteralValueOfNode(targetNode)\n\n\t\treturn {\n\t\t\tidentifier: identifierName,\n\t\t\tvalue,\n\t\t}\n\t})\n\n\treturn properties || []\n}\n"],"names":["implementationCache","nodeShapeCache","typeShapeCache","findNodeImplementation","node","cached","SyntaxKind","implementationNode","assignmentValueNode","result","definitionNode","findPropertyAssignmentValueNode","identifierChildren","child","getTypeReferenceShape","firstChild","getRecursiveNodeShape","nodeOrReference","computeRecursiveNodeShape","typeName","OpenApiManager","literalNode","typeLiteralNode","propNode","identifier","valueNode","questionMarkToken","typeReferenceNode","lastChild","getProperTypeShape","unionTypeNode","typeQueryNode","qualifiedNameNode","callExpressionNode","awaitExpressionNode","asExpressionNode","fileName","Logger","getShapeOfValidatorLiteral","objectLiteralNode","identifierNode","identifierName","innerLiteralNode","getValidatorPropertyShape","getValidatorPropertyOptionality","getValidatorPropertyStringValue","isZodCallExpression","callExpression","getZodCallShape","returnType","outputProp","inlineValidatorAsExpression","typeReference","childTypeReferenceNode","typeNode","childCallExpressionNode","callExpressionArgument","thingyNode","parsePropertyAssignment","prop","importTypeNode","indexOfGreaterThanToken","targetSyntaxList","intersectionType","validatorType","syntaxListNode","literalExpression","name","targetChild","c","value","targetValue","getValuesOfObjectLiteral","intersectionTypeNode","t","v","propertySignatureNode","isPromise","type","symbol","args","typeOrPromise","atLocation","stack","previousType","cacheKey","computeProperTypeShape","nextStack","arrayElementType","arrayBase","base","typeSymbolName","bufferLikeTypes","valueType","elementType","targetType","valueDeclaration","shape","isOptional","val","dedupedShapes","index","arr","dup","dupIndex","isNullable","shapes","total","current","getLiteralValueOfNode","resolveEndpointPath","firstArg","argType","targetNode"],"mappings":"2LAgBMA,MAA0B,QAC1BC,MAAqB,QACrBC,MAAqB,QAEdC,EAA0BC,GAAqB,CACrD,MAAAC,EAASL,EAAoB,IAAII,CAAI,EAC3C,GAAIC,EACI,OAAAA,EAGR,GAAID,EAAK,YAAcE,EAAAA,WAAW,WAAY,CACvC,MAAAC,EAAqBH,EAAK,OAAOE,EAAW,WAAA,UAAU,EAAG,mBAAmB,EAAE,CAAC,GAAG,QAAQ,EAChG,GAAIC,EAAoB,CAEjB,MAAAC,EAD2BD,EAAmB,UAAU,EACT,aAAa,EAClE,GAAIC,IAAwBJ,EACrB,MAAA,IAAI,MAAM,gCAAgC,EAE3C,MAAAK,EAASN,EAAuBK,CAAmB,EACrC,OAAAR,EAAA,IAAII,EAAMK,CAAM,EAC7BA,CAAA,CAGF,MAAAC,EAAiBN,EAA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Aa,EAAE,CAAC,EAC5C,GAAA,CAACgE,EAAiB,OAAA,KAEhB,MAAAC,EAAUD,EAAS,QAAQ,EAC7B,OAAAC,EAAQ,kBACJA,EAAQ,gBAAgB,EAGzB,IACR,EAEaxC,EAA4BjC,GACjBA,EAAkB,yBAAyBjC,EAAAA,WAAW,UAAU,EAChD,kBAAkBA,EAAAA,WAAW,kBAAkB,EAEnD,IAAKF,GAAS,CAE1C,MAAAqC,EADiBrC,EAAK,yBAAyBE,EAAAA,WAAW,UAAU,EACpC,QAAQ,EAExCE,EAAsBJ,EAAK,aAAa,EACxC6G,EAAa9G,EAAuBK,CAAmB,EACvD8D,EAAQuC,EAAsBI,CAAU,EAEvC,MAAA,CACN,WAAYxE,EACZ,MAAA6B,CACD,CAAA,CACA,GAEoB,CAAC"}
1
+ {"version":3,"file":"nodeParsers.cjs","sources":["../../../src/openapi/analyzerModule/nodeParsers.ts"],"sourcesContent":["import {\n\tNode,\n\tPropertyAccessExpression,\n\tPropertyAssignment,\n\tPropertySignature,\n\tShorthandPropertyAssignment,\n\tSyntaxKind,\n\tts,\n\tType,\n\tTypeReferenceNode,\n} from 'ts-morph'\n\nimport { Logger } from '../../utils/logger'\nimport { OpenApiManager } from '../manager/OpenApiManager'\nimport { ShapeOfProperty, ShapeOfType, ShapeOfUnionEntry } from './types'\n\nconst implementationCache = new WeakMap<Node, Node>()\nconst nodeShapeCache = new WeakMap<Node, ShapeOfType['shape']>()\nconst typeShapeCache = new WeakMap<object, ShapeOfType['shape']>()\n\nconst implementationBySymbolCache = new WeakMap<ts.Symbol, Node>()\n\nconst getCanonicalSymbol = (node: Node): ts.Symbol | undefined => {\n\tconst symbol = node.getSymbol()\n\tif (!symbol) {\n\t\treturn undefined\n\t}\n\treturn (symbol.getAliasedSymbol() ?? symbol).compilerSymbol\n}\n\nexport const findNodeImplementation = (node: Node): Node => {\n\tconst cached = implementationCache.get(node)\n\tif (cached) {\n\t\treturn cached\n\t}\n\n\tif (node.getKind() === SyntaxKind.Identifier) {\n\t\tconst symbol = getCanonicalSymbol(node)\n\t\tif (symbol) {\n\t\t\tconst cachedBySymbol = implementationBySymbolCache.get(symbol)\n\t\t\tif (cachedBySymbol) {\n\t\t\t\timplementationCache.set(node, cachedBySymbol)\n\t\t\t\treturn cachedBySymbol\n\t\t\t}\n\t\t}\n\n\t\tconst resolve = (): Node => {\n\t\t\tconst implementationNode = node.asKind(SyntaxKind.Identifier)!.getImplementations()[0]?.getNode()\n\t\t\tif (implementationNode) {\n\t\t\t\tconst implementationParentNode = implementationNode.getParent()!\n\t\t\t\tconst assignmentValueNode = implementationParentNode.getLastChild()!\n\t\t\t\tif (assignmentValueNode === node) {\n\t\t\t\t\tthrow new Error('Recursive implementation found')\n\t\t\t\t}\n\t\t\t\treturn findNodeImplementation(assignmentValueNode)\n\t\t\t}\n\n\t\t\tconst definitionNode = node.asKind(SyntaxKind.Identifier)!.getDefinitions()[0]?.getNode()\n\t\t\tif (definitionNode) {\n\t\t\t\tconst definitionParentNode = definitionNode.getParent()!\n\t\t\t\tconst assignmentValueNode = definitionParentNode.getLastChild()!\n\t\t\t\tif (assignmentValueNode === node) {\n\t\t\t\t\tthrow new Error('Recursive implementation found')\n\t\t\t\t}\n\t\t\t\treturn findNodeImplementation(assignmentValueNode)\n\t\t\t}\n\t\t\tthrow new Error('No implementation nor definition available')\n\t\t}\n\n\t\tconst result = resolve()\n\t\tif (symbol) {\n\t\t\timplementationBySymbolCache.set(symbol, result)\n\t\t}\n\t\timplementationCache.set(node, result)\n\t\treturn result\n\t}\n\n\timplementationCache.set(node, node)\n\treturn node\n}\n\nexport const findPropertyAssignmentValueNode = (\n\tnode:\n\t\t| PropertyAssignment\n\t\t| TypeReferenceNode\n\t\t| PropertySignature\n\t\t| PropertyAccessExpression\n\t\t| ShorthandPropertyAssignment,\n): Node => {\n\tconst identifierChildren = node.getChildrenOfKind(SyntaxKind.Identifier)\n\tif (identifierChildren.length === 2) {\n\t\treturn findNodeImplementation(identifierChildren[1])\n\t}\n\tconst lastMatchingChild = node.getChildren().reverse()\n\treturn lastMatchingChild.find(\n\t\t(child) =>\n\t\t\tchild.getKind() !== SyntaxKind.GreaterThanToken &&\n\t\t\tchild.getKind() !== SyntaxKind.CommaToken &&\n\t\t\tchild.getKind() !== SyntaxKind.SemicolonToken,\n\t)!\n}\n\nexport const getTypeReferenceShape = (node: TypeReferenceNode): ShapeOfType['shape'] => {\n\tconst firstChild = node.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\tif (firstChild.isKind(SyntaxKind.SyntaxList)) {\n\t\treturn getRecursiveNodeShape(firstChild.getFirstChild()!)\n\t} else {\n\t\treturn getRecursiveNodeShape(firstChild)\n\t}\n}\n\nexport const getRecursiveNodeShape = (nodeOrReference: Node): ShapeOfType['shape'] => {\n\tconst cached = nodeShapeCache.get(nodeOrReference)\n\tif (cached !== undefined) {\n\t\treturn cached\n\t}\n\tconst result = computeRecursiveNodeShape(nodeOrReference)\n\tnodeShapeCache.set(nodeOrReference, result)\n\treturn result\n}\n\nconst computeRecursiveNodeShape = (nodeOrReference: Node): ShapeOfType['shape'] => {\n\tconst typeName = nodeOrReference.getSymbol()?.getName()\n\tif (typeName && OpenApiManager.getInstance().hasExposedModel(typeName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'ref',\n\t\t\t\tshape: typeName,\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tconst node = findNodeImplementation(nodeOrReference)\n\n\t// Undefined\n\tconst undefinedNode = node.asKind(SyntaxKind.UndefinedKeyword)\n\tif (undefinedNode) {\n\t\treturn 'undefined'\n\t}\n\n\t// Literal type\n\tconst literalNode = node.asKind(SyntaxKind.LiteralType)\n\tif (literalNode) {\n\t\tif (literalNode.getFirstChildByKind(SyntaxKind.TrueKeyword)) {\n\t\t\treturn 'true'\n\t\t}\n\t\tif (literalNode.getFirstChildByKind(SyntaxKind.FalseKeyword)) {\n\t\t\treturn 'false'\n\t\t}\n\t}\n\n\t// Boolean literal\n\tconst booleanLiteralNode =\n\t\tnode.asKind(SyntaxKind.BooleanKeyword) ||\n\t\tnode.asKind(SyntaxKind.TrueKeyword) ||\n\t\tnode.asKind(SyntaxKind.FalseKeyword)\n\tif (booleanLiteralNode) {\n\t\treturn 'boolean'\n\t}\n\n\t// String literal\n\tconst stringLiteralNode = node.asKind(SyntaxKind.StringKeyword) || node.asKind(SyntaxKind.StringLiteral)\n\tif (stringLiteralNode) {\n\t\treturn 'string'\n\t}\n\n\t// Number literal\n\tconst numberLiteralNode = node.asKind(SyntaxKind.NumberKeyword) || node.asKind(SyntaxKind.NumericLiteral)\n\tif (numberLiteralNode) {\n\t\treturn 'number'\n\t}\n\n\t// BigInt literal\n\tconst bigIntNode = node.asKind(SyntaxKind.BigIntKeyword) || node.asKind(SyntaxKind.BigIntLiteral)\n\tif (bigIntNode) {\n\t\treturn 'bigint'\n\t}\n\n\t// Type literal\n\tconst typeLiteralNode = node.asKind(SyntaxKind.TypeLiteral)\n\tif (typeLiteralNode) {\n\t\tconst properties = typeLiteralNode\n\t\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t\t.getChildrenOfKind(SyntaxKind.PropertySignature)\n\n\t\tconst propertyShapes = properties.map((propNode) => {\n\t\t\tconst identifier = propNode.getFirstChildByKind(SyntaxKind.Identifier)!\n\t\t\tconst valueNode = findPropertyAssignmentValueNode(propNode)\n\t\t\tconst questionMarkToken = identifier.getNextSiblingIfKind(SyntaxKind.QuestionToken)\n\t\t\treturn {\n\t\t\t\trole: 'property' as const,\n\t\t\t\tidentifier: identifier.getText(),\n\t\t\t\tshape: getRecursiveNodeShape(valueNode),\n\t\t\t\toptional: valueNode.getType().isNullable() || !!questionMarkToken,\n\t\t\t}\n\t\t})\n\t\treturn propertyShapes\n\t}\n\n\t// Type reference\n\tconst typeReferenceNode = node.asKind(SyntaxKind.TypeReference)\n\tif (typeReferenceNode) {\n\t\treturn getRecursiveNodeShape(typeReferenceNode.getFirstChild()!)\n\t}\n\n\t// Property access expression\n\tconst propertyAccessNode = node.asKind(SyntaxKind.PropertyAccessExpression)\n\tif (propertyAccessNode) {\n\t\tconst lastChild = findNodeImplementation(node.getLastChild()!)\n\t\treturn getProperTypeShape(lastChild.asKind(SyntaxKind.CallExpression)!.getReturnType(), lastChild)\n\t}\n\n\t// Union type\n\tconst unionTypeNode = node.asKind(SyntaxKind.UnionType)\n\tif (unionTypeNode) {\n\t\treturn getProperTypeShape(unionTypeNode.getType(), node)\n\t}\n\n\t// Typeof query\n\tconst typeQueryNode = node.asKind(SyntaxKind.TypeQuery)\n\tif (typeQueryNode) {\n\t\treturn getRecursiveNodeShape(typeQueryNode.getLastChild()!)\n\t}\n\n\t// Qualified name\n\tconst qualifiedNameNode = node.asKind(SyntaxKind.QualifiedName)\n\tif (qualifiedNameNode) {\n\t\treturn getRecursiveNodeShape(qualifiedNameNode.getLastChild()!)\n\t}\n\n\t// Call expression\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\treturn getProperTypeShape(callExpressionNode.getReturnType(), callExpressionNode)\n\t}\n\n\t// Await expression\n\tconst awaitExpressionNode = node.asKind(SyntaxKind.AwaitExpression)\n\tif (awaitExpressionNode) {\n\t\treturn getRecursiveNodeShape(awaitExpressionNode.getChildAtIndex(1)!)\n\t}\n\n\t// 'As' Expression\n\tconst asExpressionNode = node.asKind(SyntaxKind.AsExpression)\n\tif (asExpressionNode) {\n\t\treturn getRecursiveNodeShape(asExpressionNode.getChildAtIndex(2)!)\n\t}\n\n\t// TODO\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown node type: ${node.getKindName()}`)\n\treturn 'unknown_1'\n}\n\nexport const getShapeOfValidatorLiteral = (\n\tobjectLiteralNode: Node<ts.ObjectLiteralExpression>,\n): (ShapeOfProperty & { description: string; errorMessage: string })[] => {\n\tconst syntaxListNode = objectLiteralNode.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\tconst properties = assignmentNodes.map((node) => {\n\t\tconst identifierNode = node.getFirstChild()!\n\t\tconst identifierName = (() => {\n\t\t\tif (identifierNode.isKind(SyntaxKind.Identifier)) {\n\t\t\t\treturn identifierNode.getText()\n\t\t\t}\n\t\t\tif (identifierNode.isKind(SyntaxKind.StringLiteral)) {\n\t\t\t\treturn identifierNode.getLiteralText()\n\t\t\t}\n\t\t\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\t\t\tLogger.warn(`[${fileName}] Unknown identifier name: ${identifierNode.getText()}`)\n\t\t\treturn 'unknown_30'\n\t\t})()\n\n\t\tconst assignmentValueNode = node.getLastChild()!\n\t\tconst innerLiteralNode = findNodeImplementation(assignmentValueNode)\n\n\t\treturn {\n\t\t\trole: 'property' as const,\n\t\t\tidentifier: identifierName,\n\t\t\tshape: getValidatorPropertyShape(innerLiteralNode),\n\t\t\toptional: getValidatorPropertyOptionality(innerLiteralNode),\n\t\t\tdescription: getValidatorPropertyStringValue(innerLiteralNode, 'description'),\n\t\t\terrorMessage: getValidatorPropertyStringValue(innerLiteralNode, 'errorMessage'),\n\t\t}\n\t})\n\n\treturn properties || []\n}\n\nconst returnTypeCache = new WeakMap<Node, Type>()\nconst getCallReturnType = (callExpression: Node): Type => {\n\tconst cached = returnTypeCache.get(callExpression)\n\tif (cached) {\n\t\treturn cached\n\t}\n\tconst result = callExpression.asKindOrThrow(SyntaxKind.CallExpression).getReturnType()\n\treturnTypeCache.set(callExpression, result)\n\treturn result\n}\n\nconst isZodCallExpression = (node: Node): boolean => {\n\tconst callExpression = node.asKind(SyntaxKind.CallExpression)\n\tif (!callExpression) {\n\t\treturn false\n\t}\n\tconst returnType = getCallReturnType(callExpression)\n\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\treturn typeName.startsWith('Zod')\n}\n\nconst getZodCallShape = (node: Node): ShapeOfType['shape'] => {\n\tconst callExpression = node.asKind(SyntaxKind.CallExpression)!\n\tconst returnType = getCallReturnType(callExpression)\n\tconst outputProp = returnType.getProperty('_output')\n\tif (outputProp) {\n\t\treturn getProperTypeShape(outputProp.getTypeAtLocation(callExpression), callExpression)\n\t}\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\tLogger.warn(`[${fileName}] Unknown zod type: ${typeName}`)\n\treturn 'unknown_zod'\n}\n\nexport const getValidatorPropertyShape = (innerLiteralNode: Node): ShapeOfType['shape'] => {\n\t// Zod validator (e.g. z.number(), z.string(), z.object({...}), z.array(...))\n\tif (isZodCallExpression(innerLiteralNode)) {\n\t\treturn getZodCallShape(innerLiteralNode)\n\t}\n\n\t// Inline definition with `as Validator<...>` clause\n\tconst inlineValidatorAsExpression = innerLiteralNode\n\t\t.getParent()!\n\t\t.getFirstChildByKind(SyntaxKind.AsExpression)\n\tif (inlineValidatorAsExpression) {\n\t\tconst typeReference = inlineValidatorAsExpression.getLastChildByKind(SyntaxKind.TypeReference)!\n\t\treturn getTypeReferenceShape(typeReference)\n\t}\n\n\t// Variable with `: Validator<...>` clause\n\tconst childTypeReferenceNode = innerLiteralNode.getParent()!.getFirstChildByKind(SyntaxKind.TypeReference)\n\tif (childTypeReferenceNode) {\n\t\treturn getTypeReferenceShape(childTypeReferenceNode)\n\t}\n\n\t// `RequiredParam<...>` inline call expression\n\tif (innerLiteralNode.getParent()!.getChildrenOfKind(SyntaxKind.SyntaxList).length >= 2) {\n\t\tconst typeNode = innerLiteralNode\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t\t.getFirstChild()!\n\t\treturn getRecursiveNodeShape(typeNode)\n\t}\n\n\t// `RequestParam | RequiredParam | OptionalParam` call expression\n\tconst childCallExpressionNode = innerLiteralNode.getParent()!.getFirstChildByKind(SyntaxKind.CallExpression)\n\tif (childCallExpressionNode) {\n\t\tconst callExpressionArgument = findNodeImplementation(\n\t\t\tchildCallExpressionNode.getFirstChildByKind(SyntaxKind.SyntaxList)!.getFirstChild()!,\n\t\t)\n\n\t\t// Param is a type reference\n\t\tconst typeReferenceNode = callExpressionArgument\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.TypeReference)!\n\t\tif (typeReferenceNode) {\n\t\t\treturn getProperTypeShape(typeReferenceNode.getType(), typeReferenceNode, [])\n\t\t}\n\n\t\tconst thingyNode = callExpressionArgument\n\t\t\t.getParent()!\n\t\t\t.getFirstChildByKind(SyntaxKind.ObjectLiteralExpression)!\n\t\tif (thingyNode) {\n\t\t\treturn getValidatorPropertyShape(thingyNode)\n\t\t}\n\n\t\tif (callExpressionArgument.getKind() === SyntaxKind.CallExpression) {\n\t\t\treturn getValidatorPropertyShape(callExpressionArgument)\n\t\t}\n\n\t\tif (callExpressionArgument.getKind() === SyntaxKind.IntersectionType) {\n\t\t\treturn getValidatorPropertyShape(callExpressionArgument)\n\t\t}\n\n\t\tconst fileName = innerLiteralNode.getSourceFile().getFilePath().split('/').pop()\n\t\tLogger.warn(`[${fileName}] Unknown call expression argument: ${callExpressionArgument.getKindName()}`)\n\t\treturn 'unknown_3'\n\t}\n\n\t// Attempting to infer type from `parse` function\n\tconst innerNodePropertyAssignments = innerLiteralNode\n\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\t.getChildrenOfKind(SyntaxKind.PropertyAssignment)\n\tconst parsePropertyAssignment = innerNodePropertyAssignments.find((prop) => {\n\t\treturn prop.getFirstChildByKind(SyntaxKind.Identifier)?.getText() === 'parse'\n\t})\n\tif (parsePropertyAssignment) {\n\t\tconst returnType = findPropertyAssignmentValueNode(parsePropertyAssignment)\n\t\t\t.asKind(SyntaxKind.ArrowFunction)!\n\t\t\t.getReturnType()\n\t\treturn getProperTypeShape(returnType, parsePropertyAssignment)\n\t}\n\n\t// Import statement\n\tconst importTypeNode = innerLiteralNode\n\t\t.getFirstChildByKind(SyntaxKind.SyntaxList)\n\t\t?.getFirstChildByKind(SyntaxKind.ImportType)\n\tif (importTypeNode) {\n\t\tconst indexOfGreaterThanToken = importTypeNode\n\t\t\t.getLastChildByKind(SyntaxKind.GreaterThanToken)!\n\t\t\t.getChildIndex()\n\t\tconst targetSyntaxList = importTypeNode.getChildAtIndex(indexOfGreaterThanToken - 1)\n\t\treturn getRecursiveNodeShape(targetSyntaxList.getFirstChild()!)\n\t}\n\n\t// Intersection type with Validator\n\tconst intersectionType = innerLiteralNode.isKind(SyntaxKind.IntersectionType)\n\t\t? innerLiteralNode\n\t\t: innerLiteralNode.getParent()?.isKind(SyntaxKind.VariableDeclaration)\n\t\t\t? innerLiteralNode.getParent()?.getFirstChildByKind(SyntaxKind.IntersectionType)\n\t\t\t: null\n\n\tif (intersectionType) {\n\t\tconst validatorType = intersectionType.getFirstChildByKind(SyntaxKind.TypeReference)\n\t\tif (validatorType) {\n\t\t\treturn getTypeReferenceShape(validatorType)\n\t\t}\n\t}\n\n\tconst fileName = innerLiteralNode.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown import type node`)\n\n\treturn 'unknown_2'\n}\n\nexport const getValidatorPropertyOptionality = (node: Node): boolean => {\n\tif (isZodCallExpression(node)) {\n\t\tconst callExpression = node.asKind(SyntaxKind.CallExpression)!\n\t\tconst returnType = getCallReturnType(callExpression)\n\t\tconst typeName = returnType.getSymbol()?.getName() ?? ''\n\t\tif (typeName === 'ZodOptional') {\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\tconst identifierNode = callExpressionNode.getFirstChildByKind(SyntaxKind.Identifier)\n\t\tif (identifierNode?.getText() === 'OptionalParam') {\n\t\t\treturn true\n\t\t} else if (identifierNode?.getText() === 'RequiredParam') {\n\t\t\treturn false\n\t\t}\n\n\t\tconst syntaxListNode = callExpressionNode.getFirstChildByKind(SyntaxKind.SyntaxList)!\n\t\tconst literalExpression = findNodeImplementation(syntaxListNode.getFirstChild()!)\n\t\treturn getValidatorPropertyOptionality(literalExpression)\n\t}\n\n\tconst syntaxListNode = node.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\treturn assignmentNodes.some((node) => {\n\t\tconst identifierNode = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tconst identifierName = identifierNode.getText()\n\n\t\tif (identifierName === 'optional') {\n\t\t\tconst value = findPropertyAssignmentValueNode(node)\n\t\t\treturn value.getKind() === SyntaxKind.TrueKeyword\n\t\t}\n\t\treturn false\n\t})\n}\n\nexport const getValidatorPropertyStringValue = (\n\tnodeOrReference: Node,\n\tname: 'description' | 'errorMessage',\n): string => {\n\tif (isZodCallExpression(nodeOrReference)) {\n\t\treturn ''\n\t}\n\n\tconst node = findNodeImplementation(nodeOrReference)\n\n\tconst callExpressionNode = node.asKind(SyntaxKind.CallExpression)\n\tif (callExpressionNode) {\n\t\tconst targetChild = callExpressionNode.getLastChildByKind(SyntaxKind.SyntaxList)!\n\t\treturn getValidatorPropertyStringValue(targetChild, name)\n\t}\n\n\tconst syntaxListNode = node.asKind(SyntaxKind.SyntaxList)\n\tif (syntaxListNode) {\n\t\tconst children = syntaxListNode.getChildren().map((c) => getValidatorPropertyStringValue(c, name))\n\t\treturn children.find((value) => !!value && value !== 'unknown_25') || ''\n\t}\n\n\tconst objectLiteralNode = node.asKind(SyntaxKind.ObjectLiteralExpression)\n\tif (objectLiteralNode) {\n\t\tconst values = getValuesOfObjectLiteral(objectLiteralNode)\n\t\tconst targetValue = values.find((value) => value.identifier === name)\n\t\tif (!targetValue) {\n\t\t\treturn ''\n\t\t}\n\t\tif (Array.isArray(targetValue.value)) {\n\t\t\treturn 'array'\n\t\t}\n\t\treturn targetValue.value || ''\n\t}\n\n\tconst intersectionTypeNode = node.asKind(SyntaxKind.IntersectionType)\n\tif (intersectionTypeNode) {\n\t\treturn (\n\t\t\tintersectionTypeNode\n\t\t\t\t.getTypeNodes()\n\t\t\t\t.flatMap((t) => getValidatorPropertyStringValue(t, name))\n\t\t\t\t.filter((v) => !!v && v !== 'unknown_25')[0] || 'unknown_27'\n\t\t)\n\t}\n\n\tconst typeLiteralNode = node.asKind(SyntaxKind.TypeLiteral)\n\tif (typeLiteralNode) {\n\t\treturn getValidatorPropertyStringValue(typeLiteralNode.getFirstChildByKind(SyntaxKind.SyntaxList)!, name)\n\t}\n\n\tconst propertySignatureNode = node.asKind(SyntaxKind.PropertySignature)\n\tif (propertySignatureNode) {\n\t\tconst identifier = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tif (identifier.getText() === name) {\n\t\t\tconst targetNode = findPropertyAssignmentValueNode(propertySignatureNode).getFirstDescendantByKind(\n\t\t\t\tSyntaxKind.StringLiteral,\n\t\t\t)!\n\t\t\treturn targetNode.getLiteralText()\n\t\t}\n\t}\n\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.dev(`[${fileName}] Unknown property string value node ${node.getKindName()}`)\n\treturn 'unknown_25'\n}\n\nconst isPromise = (type: Type) => {\n\tconst symbol = type.getSymbol()\n\tif (!type.isObject() || !symbol) {\n\t\treturn false\n\t}\n\tconst args = type.getTypeArguments()\n\treturn symbol.getName() === 'Promise' && args.length === 1\n}\n\nexport const getProperTypeShape = (\n\ttypeOrPromise: Type,\n\tatLocation: Node,\n\tstack: Type[] = [],\n): ShapeOfType['shape'] => {\n\tconst typeName = typeOrPromise.getAliasSymbol()?.getName()\n\tif (typeName && OpenApiManager.getInstance().hasExposedModel(typeName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'ref',\n\t\t\t\tshape: typeName,\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tconst type = isPromise(typeOrPromise) ? typeOrPromise.getTypeArguments()[0] : typeOrPromise\n\n\tif (stack.some((previousType) => previousType === type)) {\n\t\treturn 'circular'\n\t}\n\n\tconst cacheKey = type.compilerType\n\tconst cached = typeShapeCache.get(cacheKey)\n\tif (cached !== undefined) {\n\t\treturn cached\n\t}\n\tconst result = computeProperTypeShape(type, atLocation, stack)\n\ttypeShapeCache.set(cacheKey, result)\n\treturn result\n}\n\nconst computeProperTypeShape = (type: Type, atLocation: Node, stack: Type[]): ShapeOfType['shape'] => {\n\tconst nextStack = stack.concat(type)\n\n\tif (type.getText() === 'void') {\n\t\treturn 'void'\n\t}\n\n\tif (type.isAny()) {\n\t\treturn 'any'\n\t}\n\n\tif (type.isUnknown()) {\n\t\treturn 'unknown'\n\t}\n\n\tif (type.isNull()) {\n\t\treturn 'null'\n\t}\n\n\tif (type.isUndefined()) {\n\t\treturn 'undefined'\n\t}\n\n\tif (type.isBoolean() || type.isBooleanLiteral()) {\n\t\treturn 'boolean'\n\t}\n\n\tif (type.isStringLiteral()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'literal_string' as const,\n\t\t\t\tshape: String(type.getLiteralValue()!),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isNumberLiteral()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'literal_number' as const,\n\t\t\t\tshape: String(type.getLiteralValue()!),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isString() || type.isTemplateLiteral()) {\n\t\treturn 'string'\n\t}\n\n\tif (type.isNumber()) {\n\t\treturn 'number'\n\t}\n\n\tif (type.getText() === 'bigint') {\n\t\treturn 'bigint'\n\t}\n\n\tif (type.isTuple()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'tuple' as const,\n\t\t\t\tshape: type.getTupleElements().map((t) => ({\n\t\t\t\t\trole: 'tuple_entry' as const,\n\t\t\t\t\tshape: getProperTypeShape(t, atLocation, nextStack),\n\t\t\t\t\toptional: false,\n\t\t\t\t})),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isArray()) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'array' as const,\n\t\t\t\tshape: getProperTypeShape(type.getArrayElementType()!, atLocation, nextStack),\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\t// Handles `interface Foo extends Array<T>` (e.g. Prisma's JsonArray)\n\t// which fails type.isArray() but is still array-like\n\tif (type.isObject()) {\n\t\tconst arrayElementType = type.getNumberIndexType()\n\t\tconst baseTypes = type.getBaseTypes()\n\t\tconst arrayBase = baseTypes?.find((base) => base.isArray())\n\t\tif (arrayBase) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\trole: 'array' as const,\n\t\t\t\t\tshape: getProperTypeShape(\n\t\t\t\t\t\tarrayBase.getArrayElementType() ?? arrayElementType!,\n\t\t\t\t\t\tatLocation,\n\t\t\t\t\t\tnextStack,\n\t\t\t\t\t),\n\t\t\t\t\toptional: false,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t}\n\n\tconst typeSymbolName = type.getSymbol()?.getName()\n\n\tconst bufferLikeTypes = new Set([\n\t\t'Buffer',\n\t\t'Uint8Array',\n\t\t'Int8Array',\n\t\t'Uint8ClampedArray',\n\t\t'Int16Array',\n\t\t'Uint16Array',\n\t\t'Int32Array',\n\t\t'Uint32Array',\n\t\t'Float32Array',\n\t\t'Float64Array',\n\t\t'BigInt64Array',\n\t\t'BigUint64Array',\n\t\t'ArrayBuffer',\n\t\t'SharedArrayBuffer',\n\t\t'ReadableStream',\n\t])\n\n\tif (type.isObject() && typeSymbolName && bufferLikeTypes.has(typeSymbolName)) {\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'buffer' as const,\n\t\t\t\tshape: 'buffer',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'RegExp') {\n\t\treturn 'string'\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'Map') {\n\t\tconst typeArgs = type.getTypeArguments()\n\t\tconst valueType = typeArgs[1]\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'record' as const,\n\t\t\t\tshape: valueType ? getProperTypeShape(valueType, atLocation, nextStack) : 'unknown',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && typeSymbolName === 'Set') {\n\t\tconst typeArgs = type.getTypeArguments()\n\t\tconst elementType = typeArgs[0]\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'array' as const,\n\t\t\t\tshape: elementType ? getProperTypeShape(elementType, atLocation, nextStack) : 'unknown',\n\t\t\t\toptional: false,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isObject() && type.getProperties().length === 0) {\n\t\tconst targetType = type.getAliasTypeArguments()[1] ?? type.getStringIndexType()\n\t\tif (targetType) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\trole: 'record' as const,\n\t\t\t\t\tshape: getProperTypeShape(targetType, atLocation, nextStack),\n\t\t\t\t\toptional: false,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t}\n\n\tif (type.isObject()) {\n\t\tif (typeSymbolName === 'Date' || type.getText() === 'Date') {\n\t\t\treturn 'Date'\n\t\t}\n\t\treturn type\n\t\t\t.getProperties()\n\t\t\t.map((prop) => {\n\t\t\t\tconst valueDeclaration = prop.getValueDeclaration() || prop.getDeclarations()[0]!\n\t\t\t\tconst shape = getProperTypeShape(prop.getTypeAtLocation(atLocation), atLocation, nextStack)\n\t\t\t\tif (!valueDeclaration) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\t\tshape,\n\t\t\t\t\t\toptional: false,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst valueDeclarationNode =\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.PropertySignature) ||\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.PropertyAssignment) ||\n\t\t\t\t\tvalueDeclaration.asKind(SyntaxKind.ShorthandPropertyAssignment)\n\n\t\t\t\tif (!valueDeclarationNode) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\t\tshape,\n\t\t\t\t\t\toptional: false,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst isOptional = prop.getTypeAtLocation(atLocation).isNullable()\n\n\t\t\t\treturn {\n\t\t\t\t\trole: 'property' as const,\n\t\t\t\t\tidentifier: prop.getName(),\n\t\t\t\t\tshape,\n\t\t\t\t\toptional: isOptional,\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((val) => val.shape !== 'undefined')\n\t}\n\n\tif (type.isUnion()) {\n\t\tconst unfilteredShapes: ShapeOfUnionEntry[] = type.getUnionTypes().map((type) => ({\n\t\t\trole: 'union_entry',\n\t\t\tshape: getProperTypeShape(type, atLocation, nextStack),\n\t\t\toptional: false,\n\t\t}))\n\n\t\tconst dedupedShapes = unfilteredShapes.filter(\n\t\t\t(type, index, arr) => !arr.find((dup, dupIndex) => dup.shape === type.shape && dupIndex > index),\n\t\t)\n\t\tconst isNullable = dedupedShapes.some((shape) => shape.shape === 'undefined')\n\t\tconst shapes = dedupedShapes.filter((shape) => shape.shape !== 'undefined')\n\t\tif (shapes.length === 1) {\n\t\t\treturn shapes[0].shape\n\t\t}\n\t\treturn [\n\t\t\t{\n\t\t\t\trole: 'union',\n\t\t\t\tshape: shapes,\n\t\t\t\toptional: isNullable,\n\t\t\t},\n\t\t]\n\t}\n\n\tif (type.isIntersection()) {\n\t\tconst children = type.getIntersectionTypes()\n\t\tconst shapesOfChildren = children\n\t\t\t.map((child) => getProperTypeShape(child, atLocation, nextStack))\n\t\t\t.filter((shape) => typeof shape !== 'string') as ShapeOfProperty[][]\n\t\treturn shapesOfChildren.reduce<ShapeOfType[]>((total, current) => [...total, ...current], [])\n\t}\n\n\tconst fileName = atLocation.getSourceFile().getFilePath().split('/').pop()\n\tLogger.warn(`[${fileName}] Unknown type shape node ${type.getText()}`)\n\treturn 'unknown_5'\n}\n\nconst getLiteralValueOfNode = (node: Node): string | string[] | unknown[] => {\n\tif (node.isKind(SyntaxKind.Identifier)) {\n\t\treturn getLiteralValueOfNode(findNodeImplementation(node))\n\t} else if (node.isKind(SyntaxKind.StringLiteral)) {\n\t\treturn node.getLiteralValue()\n\t} else if (node.isKind(SyntaxKind.ArrayLiteralExpression)) {\n\t\treturn node.forEachChildAsArray().map((child) => getLiteralValueOfNode(child)) as string[]\n\t} else if (node.isKind(SyntaxKind.PropertyAccessExpression)) {\n\t\treturn getLiteralValueOfNode(findPropertyAssignmentValueNode(node))\n\t} else if (node.isKind(SyntaxKind.ObjectLiteralExpression)) {\n\t\treturn getValuesOfObjectLiteral(node)\n\t}\n\n\tconst fileName = node.getSourceFile().getFilePath().split('/').pop()\n\tLogger.dev(`[${fileName}] Unknown literal value node ${node.getKindName()}`)\n\n\treturn 'unknown_6'\n}\n\nexport const resolveEndpointPath = (node: Node): string | null => {\n\tconst callExpression = node.getFirstDescendantByKind(SyntaxKind.CallExpression)\n\tif (!callExpression) return null\n\n\tconst firstArg = callExpression.getArguments()[0]\n\tif (!firstArg) return null\n\n\tconst argType = firstArg.getType()\n\tif (argType.isStringLiteral()) {\n\t\treturn argType.getLiteralValue() as string\n\t}\n\n\treturn null\n}\n\nexport const getValuesOfObjectLiteral = (objectLiteralNode: Node<ts.ObjectLiteralExpression>) => {\n\tconst syntaxListNode = objectLiteralNode.getFirstDescendantByKind(SyntaxKind.SyntaxList)!\n\tconst assignmentNodes = syntaxListNode.getChildrenOfKind(SyntaxKind.PropertyAssignment)!\n\n\tconst properties = assignmentNodes.map((node) => {\n\t\tconst identifierNode = node.getFirstDescendantByKind(SyntaxKind.Identifier)!\n\t\tconst identifierName = identifierNode.getText()\n\n\t\tconst assignmentValueNode = node.getLastChild()!\n\t\tconst targetNode = findNodeImplementation(assignmentValueNode)\n\t\tconst value = getLiteralValueOfNode(targetNode)\n\n\t\treturn {\n\t\t\tidentifier: identifierName,\n\t\t\tvalue,\n\t\t}\n\t})\n\n\treturn properties || []\n}\n"],"names":["implementationCache","nodeShapeCache","typeShapeCache","implementationBySymbolCache","getCanonicalSymbol","node","symbol","findNodeImplementation","cached","SyntaxKind","cachedBySymbol","result","implementationNode","assignmentValueNode","definitionNode","findPropertyAssignmentValueNode","identifierChildren","child","getTypeReferenceShape","firstChild","getRecursiveNodeShape","nodeOrReference","computeRecursiveNodeShape","typeName","OpenApiManager","literalNode","typeLiteralNode","propNode","identifier","valueNode","questionMarkToken","typeReferenceNode","lastChild","getProperTypeShape","unionTypeNode","typeQueryNode","qualifiedNameNode","callExpressionNode","awaitExpressionNode","asExpressionNode","fileName","Logger","getShapeOfValidatorLiteral","objectLiteralNode","identifierNode","identifierName","innerLiteralNode","getValidatorPropertyShape","getValidatorPropertyOptionality","getValidatorPropertyStringValue","returnTypeCache","getCallReturnType","callExpression","isZodCallExpression","getZodCallShape","returnType","outputProp","inlineValidatorAsExpression","typeReference","childTypeReferenceNode","typeNode","childCallExpressionNode","callExpressionArgument","thingyNode","parsePropertyAssignment","prop","importTypeNode","indexOfGreaterThanToken","targetSyntaxList","intersectionType","validatorType","syntaxListNode","literalExpression","name","targetChild","c","value","targetValue","getValuesOfObjectLiteral","intersectionTypeNode","t","v","propertySignatureNode","isPromise","type","args","typeOrPromise","atLocation","stack","previousType","cacheKey","computeProperTypeShape","nextStack","arrayElementType","arrayBase","base","typeSymbolName","bufferLikeTypes","valueType","elementType","targetType","valueDeclaration","shape","isOptional","val","dedupedShapes","index","arr","dup","dupIndex","isNullable","shapes","total","current","getLiteralValueOfNode","resolveEndpointPath","firstArg","argType","targetNode"],"mappings":"2LAgBMA,MAA0B,QAC1BC,MAAqB,QACrBC,MAAqB,QAErBC,MAAkC,QAElCC,EAAsBC,GAAsC,CAC3D,MAAAC,EAASD,EAAK,UAAU,EAC9B,GAAKC,EAGG,OAAAA,EAAO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