@nestia/editor 8.0.1 → 8.0.3

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.
@@ -1209,9 +1209,9 @@ export default NESTIA_CONFIG;
1209
1209
  "homepage": "https://github.com/samchon/nestia-start#readme",
1210
1210
  "devDependencies": {
1211
1211
  "@autobe/interface": "^0.10.6",
1212
- "@nestia/benchmark": "^8.0.1",
1213
- "@nestia/e2e": "^8.0.1",
1214
- "@nestia/sdk": "^8.0.1",
1212
+ "@nestia/benchmark": "^8.0.3",
1213
+ "@nestia/e2e": "^8.0.3",
1214
+ "@nestia/sdk": "^8.0.3",
1215
1215
  "@nestjs/cli": "^11.0.10",
1216
1216
  "@rollup/plugin-terser": "^0.4.4",
1217
1217
  "@rollup/plugin-typescript": "^11.1.6",
@@ -1230,7 +1230,7 @@ export default NESTIA_CONFIG;
1230
1230
  "copy-webpack-plugin": "^11.0.0",
1231
1231
  "eslint-plugin-deprecation": "^3.0.0",
1232
1232
  "express": "^4.18.2",
1233
- "nestia": "^8.0.1",
1233
+ "nestia": "^8.0.3",
1234
1234
  "prettier": "^3.2.4",
1235
1235
  "prettier-plugin-prisma": "^5.0.0",
1236
1236
  "rimraf": "^3.0.2",
@@ -1247,8 +1247,8 @@ export default NESTIA_CONFIG;
1247
1247
  "write-file-webpack-plugin": "^4.5.1"
1248
1248
  },
1249
1249
  "dependencies": {
1250
- "@nestia/core": "^8.0.1",
1251
- "@nestia/fetcher": "^8.0.1",
1250
+ "@nestia/core": "^8.0.3",
1251
+ "@nestia/fetcher": "^8.0.3",
1252
1252
  "@nestjs/common": "^11.1.6",
1253
1253
  "@nestjs/core": "^11.1.6",
1254
1254
  "@nestjs/platform-express": "^11.1.6",
@@ -1357,7 +1357,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features:
1357
1357
  "README.md"
1358
1358
  ],
1359
1359
  "dependencies": {
1360
- "@nestia/fetcher": "^8.0.0",
1360
+ "@nestia/fetcher": "^8.0.2",
1361
1361
  "tgrid": "^1.2.0",
1362
1362
  "typia": "^9.7.2"
1363
1363
  }
@@ -2735,12 +2735,12 @@ print("npm run test:simulate", "Test with mockup simulator");
2735
2735
  "README.md"
2736
2736
  ],
2737
2737
  "dependencies": {
2738
- "@nestia/fetcher": "^8.0.1",
2738
+ "@nestia/fetcher": "^8.0.3",
2739
2739
  "tgrid": "^1.2.0",
2740
2740
  "typia": "^9.7.2"
2741
2741
  },
2742
2742
  "devDependencies": {
2743
- "@nestia/e2e": "^8.0.1",
2743
+ "@nestia/e2e": "^8.0.3",
2744
2744
  "@rollup/plugin-terser": "^0.4.4",
2745
2745
  "@rollup/plugin-typescript": "^11.1.6",
2746
2746
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
@@ -4761,10 +4761,10 @@ export namespace ArgumentParser {
4761
4761
  `).map(_0=>` * ${_0}`),""].join(`
4762
4762
  `),!0),sm),o.newLine=()=>ts$1.factory.createExpressionStatement(ts$1.factory.createIdentifier(`
4763
4763
  `)),o.write=sm=>{const u0=ts$1.createPrinter({newLine:ts$1.NewLineKind.LineFeed}).printFile(ts$1.factory.createSourceFile(sm.statements,ts$1.factory.createToken(ts$1.SyntaxKind.EndOfFileToken),ts$1.NodeFlags.None));return(sm.top??"")+u0}})(FilePrinter||(FilePrinter={}));var OpenApiTypeChecker;(function(o){o.isOneOf=sm=>sm.oneOf!==void 0,o.isNull=sm=>sm.type==="null",o.isConstant=sm=>sm.const!==void 0,o.isBoolean=sm=>sm.type==="boolean",o.isInteger=sm=>sm.type==="integer",o.isNumber=sm=>sm.type==="number",o.isString=sm=>sm.type==="string",o.isArray=sm=>sm.type==="array"&&sm.items!==void 0,o.isTuple=sm=>sm.type==="array"&&sm.prefixItems!==void 0,o.isObject=sm=>sm.type==="object",o.isReference=sm=>sm.$ref!==void 0,o.isUnknown=sm=>sm.type===void 0&&!o.isOneOf(sm)&&!o.isReference(sm)&&!o.isConstant(sm)})(OpenApiTypeChecker||(OpenApiTypeChecker={}));var StringUtil;(function(o){o.capitalize=sm=>sm[0].toUpperCase()+sm.slice(1).toLowerCase(),o.splitWithNormalization=sm=>sm.split("/").map(u0=>normalize(u0.trim())).filter(u0=>!!u0.length),o.escapeDuplicate=sm=>u0=>sm.includes(u0)?o.escapeDuplicate(sm)(`_${u0}`):u0,o.escapeNonVariable=sm=>{sm=escape(sm);for(const[u0,_0]of VARIABLE_REPLACERS)sm=sm.split(u0).join(_0);for(let u0=0;u0<=9;++u0)if(sm[0]===u0.toString()){sm="_"+sm;break}return sm===""?"_empty_":sm}})(StringUtil||(StringUtil={}));const escape=o=>(o=o.trim(),RESERVED.has(o)?`_${o}`:(o.length!==0&&"0"<=o[0]&&o[0]<="9"&&(o=`_${o}`),o)),normalize=o=>escape(o.split(".").join("_").split("-").join("_")),RESERVED=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","module","new","null","package","public","private","protected","return","super","switch","this","throw","true","try","typeof","var","void","while","with"]),VARIABLE_REPLACERS=[["`","_backquote_"],["!","_exclamation_"],["@","_at_"],["#","_hash_"],["$","_dollar_"],["%","_percent_"],["^","_caret_"],["&","_and_"],["*","_star_"],["(","_lparen_"],[")","_rparen_"],["-","_"],["+","_plus_"],["|","_or_"],["{","_blt_"],["}","_bgt_"],["<","_lt_"],[">","_gt_"],["[","_alt_"],["]","_agt_"],[",","_comma_"],["'","_singlequote_"],['"',"_doublequote_"],[" ","_space_"],["?","_question_"],[":","_colon_"],[";","_semicolon_"],["...","_rest_"]];var NestiaMigrateSchemaProgrammer;(function(o){o.write=P_=>{const Z_=[];if(OpenApiTypeChecker.isUnknown(P_.schema))return TypeFactory.keyword("any");const fy=OpenApiTypeChecker.isConstant(P_.schema)?sm({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isBoolean(P_.schema)?u0({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isInteger(P_.schema)?_0({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isNumber(P_.schema)?Q0({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isString(P_.schema)?a_({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isArray(P_.schema)?h_({components:P_.components,importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isTuple(P_.schema)?c_({components:P_.components,importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isObject(P_.schema)?k_({components:P_.components,importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isReference(P_.schema)?D_({importer:P_.importer,schema:P_.schema}):OpenApiTypeChecker.isOneOf(P_.schema)?O_({components:P_.components,importer:P_.importer,elements:P_.schema.oneOf}):OpenApiTypeChecker.isNull(P_.schema)?createNode("null"):TypeFactory.keyword("any");return Z_.push(fy),Z_.length===0?TypeFactory.keyword("any"):Z_.length===1?Z_[0]:ts$1.factory.createUnionTypeNode(Z_)};const sm=P_=>{const Z_=[ts$1.factory.createLiteralTypeNode(typeof P_.schema.const=="boolean"?P_.schema.const===!0?ts$1.factory.createTrue():ts$1.factory.createFalse():typeof P_.schema.const=="number"?P_.schema.const<0?ts$1.factory.createPrefixUnaryExpression(ts$1.SyntaxKind.MinusToken,ts$1.factory.createNumericLiteral(-P_.schema.const)):ts$1.factory.createNumericLiteral(P_.schema.const):ts$1.factory.createStringLiteral(P_.schema.const))];return writePlugin({importer:P_.importer,schema:P_.schema,regular:["const","title","description","deprecated","example","examples"],intersection:Z_}),Z_.length===1?Z_[0]:ts$1.factory.createIntersectionTypeNode(Z_)},u0=P_=>{const Z_=[TypeFactory.keyword("boolean")];return writePlugin({importer:P_.importer,regular:["default","title","description","deprecated","example","examples","type"],intersection:Z_,schema:P_.schema}),Z_.length===1?Z_[0]:ts$1.factory.createIntersectionTypeNode(Z_)},_0=P_=>e_({factory:()=>[TypeFactory.keyword("number"),P_.importer.tag("Type","int32")],importer:P_.importer,schema:P_.schema}),Q0=P_=>e_({factory:()=>[TypeFactory.keyword("number")],importer:P_.importer,schema:P_.schema}),e_=P_=>{const Z_=P_.factory();return P_.schema.default!==void 0&&Z_.push(P_.importer.tag("Default",P_.schema.default)),P_.schema.minimum!==void 0&&Z_.push(P_.importer.tag(P_.schema.exclusiveMinimum?"ExclusiveMinimum":"Minimum",P_.schema.minimum)),P_.schema.maximum!==void 0&&Z_.push(P_.importer.tag(P_.schema.exclusiveMaximum?"ExclusiveMaximum":"Maximum",P_.schema.maximum)),P_.schema.multipleOf!==void 0&&Z_.push(P_.importer.tag("MultipleOf",P_.schema.multipleOf)),writePlugin({importer:P_.importer,regular:["default","title","description","deprecated","example","examples","type","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"],intersection:Z_,schema:P_.schema}),Z_.length===1?Z_[0]:ts$1.factory.createIntersectionTypeNode(Z_)},a_=P_=>{if(P_.schema.format==="binary")return ts$1.factory.createTypeReferenceNode("File");const Z_=[TypeFactory.keyword("string")];return P_.schema.default!==void 0&&Z_.push(P_.importer.tag("Default",P_.schema.default)),P_.schema.minLength!==void 0&&Z_.push(P_.importer.tag("MinLength",P_.schema.minLength)),P_.schema.maxLength!==void 0&&Z_.push(P_.importer.tag("MaxLength",P_.schema.maxLength)),P_.schema.pattern!==void 0&&Z_.push(P_.importer.tag("Pattern",P_.schema.pattern)),P_.schema.format!==void 0&&FormatCheatSheet[P_.schema.format]!==void 0&&Z_.push(P_.importer.tag("Format",P_.schema.format)),P_.schema.contentMediaType!==void 0&&Z_.push(P_.importer.tag("ContentMediaType",P_.schema.contentMediaType)),writePlugin({importer:P_.importer,regular:["default","title","description","deprecated","example","examples","type","format","pattern","contentMediaType","minLength","maxLength"],intersection:Z_,schema:P_.schema}),Z_.length===1?Z_[0]:ts$1.factory.createIntersectionTypeNode(Z_)},h_=P_=>{const Z_=[ts$1.factory.createArrayTypeNode(o.write({components:P_.components,importer:P_.importer,schema:P_.schema.items}))];return P_.schema.minItems!==void 0&&Z_.push(P_.importer.tag("MinItems",P_.schema.minItems)),P_.schema.maxItems!==void 0&&Z_.push(P_.importer.tag("MaxItems",P_.schema.maxItems)),P_.schema.uniqueItems===!0&&Z_.push(P_.importer.tag("UniqueItems")),writePlugin({importer:P_.importer,regular:["items","uniqueItems","minItems","maxItems","title","description","deprecated","example","examples","type"],intersection:Z_,schema:P_.schema}),Z_.length===1?Z_[0]:ts$1.factory.createIntersectionTypeNode(Z_)},c_=P_=>{const fy=[ts$1.factory.createTupleTypeNode([...P_.schema.prefixItems.map(W_=>o.write({components:P_.components,importer:P_.importer,schema:W_})),...typeof P_.schema.additionalItems=="object"&&P_.schema.additionalItems!==null?[ts$1.factory.createRestTypeNode(o.write({components:P_.components,importer:P_.importer,schema:P_.schema.additionalItems}))]:P_.schema.additionalItems===!0?[ts$1.factory.createRestTypeNode(ts$1.factory.createArrayTypeNode(ts$1.factory.createKeywordTypeNode(ts$1.SyntaxKind.AnyKeyword)))]:[]])];return writePlugin({importer:P_.importer,regular:["uniqueItems","minItems","maxItems","title","description","deprecated","example","examples","type","prefixItems","additionalItems"],intersection:fy,schema:P_.schema}),fy.length===1?fy[0]:ts$1.factory.createIntersectionTypeNode(fy)},k_=P_=>{var W_;const Z_=()=>ts$1.factory.createTypeLiteralNode(Object.entries(P_.schema.properties??[]).map(([B_,H_],hy)=>{var cx,Y_;return[...hy!==0&&((cx=H_.title)!=null&&cx.length||(Y_=H_.description)!=null&&Y_.length)?[ts$1.factory.createIdentifier(`
4764
- `)]:[],y_({components:P_.components,importer:P_.importer,required:P_.schema.required??[],key:B_,value:H_})]}).flat()),fy=()=>ts$1.factory.createTypeLiteralNode([T_({components:P_.components,importer:P_.importer,schema:P_.schema.additionalProperties})]);return(W_=P_.schema.properties)!=null&&W_.length&&typeof P_.schema.additionalProperties=="object"?ts$1.factory.createIntersectionTypeNode([Z_(),fy()]):typeof P_.schema.additionalProperties=="object"?fy():Z_()},y_=P_=>FilePrinter.description(ts$1.factory.createPropertySignature(void 0,Escaper.variable(P_.key)?ts$1.factory.createIdentifier(P_.key):ts$1.factory.createStringLiteral(P_.key),P_.required.includes(P_.key)?void 0:ts$1.factory.createToken(ts$1.SyntaxKind.QuestionToken),o.write({components:P_.components,importer:P_.importer,schema:P_.value})),writeComment$1(P_.value)),T_=P_=>FilePrinter.description(ts$1.factory.createIndexSignature(void 0,[ts$1.factory.createParameterDeclaration(void 0,void 0,ts$1.factory.createIdentifier("key"),void 0,TypeFactory.keyword("string"))],o.write(P_)),writeComment$1(P_.schema)),D_=P_=>{if(P_.schema.$ref.startsWith("#/components/schemas")===!1)return TypeFactory.keyword("any");const Z_=P_.schema.$ref.split("/").slice(3).filter(fy=>fy.length!==0).map(StringUtil.escapeNonVariable).join("");return Z_===""?TypeFactory.keyword("any"):P_.importer.dto(Z_)},O_=P_=>ts$1.factory.createUnionTypeNode(P_.elements.map(Z_=>o.write({components:P_.components,importer:P_.importer,schema:Z_})))})(NestiaMigrateSchemaProgrammer||(NestiaMigrateSchemaProgrammer={}));const createNode=o=>ts$1.factory.createTypeReferenceNode(o),writeComment$1=o=>{var sm,u0;return[...(sm=o.description)!=null&&sm.length?[eraseCommentTags(o.description)]:[],...(u0=o.description)!=null&&u0.length&&(o.title!==void 0||o.deprecated===!0)?[""]:[],...o.title!==void 0?[`@title ${o.title}`]:[],...o.deprecated===!0?["@deprecated"]:[]].join(`
4764
+ `)]:[],y_({components:P_.components,importer:P_.importer,required:P_.schema.required??[],key:B_,value:H_})]}).flat()),fy=()=>ts$1.factory.createTypeLiteralNode([T_({components:P_.components,importer:P_.importer,schema:P_.schema.additionalProperties})]);return(W_=P_.schema.properties)!=null&&W_.length&&typeof P_.schema.additionalProperties=="object"?ts$1.factory.createIntersectionTypeNode([Z_(),fy()]):typeof P_.schema.additionalProperties=="object"?fy():Z_()},y_=P_=>{const Z_=o.write({components:P_.components,importer:P_.importer,schema:P_.value});return FilePrinter.description(ts$1.factory.createPropertySignature(void 0,Escaper.variable(P_.key)?ts$1.factory.createIdentifier(P_.key):ts$1.factory.createStringLiteral(P_.key),P_.required.includes(P_.key)?void 0:ts$1.factory.createToken(ts$1.SyntaxKind.QuestionToken),P_.required.includes(P_.key)?Z_:ts$1.isUnionTypeNode(Z_)?ts$1.factory.createUnionTypeNode([...Z_.types,ts$1.factory.createTypeReferenceNode("undefined")]):ts$1.factory.createUnionTypeNode([Z_,ts$1.factory.createTypeReferenceNode("undefined")])),writeComment$1(P_.value))},T_=P_=>FilePrinter.description(ts$1.factory.createIndexSignature(void 0,[ts$1.factory.createParameterDeclaration(void 0,void 0,ts$1.factory.createIdentifier("key"),void 0,TypeFactory.keyword("string"))],o.write(P_)),writeComment$1(P_.schema)),D_=P_=>{if(P_.schema.$ref.startsWith("#/components/schemas")===!1)return TypeFactory.keyword("any");const Z_=P_.schema.$ref.split("/").slice(3).filter(fy=>fy.length!==0).map(StringUtil.escapeNonVariable).join("");return Z_===""?TypeFactory.keyword("any"):P_.importer.dto(Z_)},O_=P_=>ts$1.factory.createUnionTypeNode(P_.elements.map(Z_=>o.write({components:P_.components,importer:P_.importer,schema:Z_})))})(NestiaMigrateSchemaProgrammer||(NestiaMigrateSchemaProgrammer={}));const createNode=o=>ts$1.factory.createTypeReferenceNode(o),writeComment$1=o=>{var sm,u0;return[...(sm=o.description)!=null&&sm.length?[eraseCommentTags(o.description)]:[],...(u0=o.description)!=null&&u0.length&&(o.title!==void 0||o.deprecated===!0)?[""]:[],...o.title!==void 0?[`@title ${o.title}`]:[],...o.deprecated===!0?["@deprecated"]:[]].join(`
4765
4765
  `).split("*/").join("*\\/")},eraseCommentTags=o=>o.split(`
4766
4766
  `).filter(u0=>COMMENT_TAGS.every(_0=>!u0.includes(_0))).join(`
4767
- `),writePlugin=o=>{const sm={};for(const[u0,_0]of Object.entries(o.schema))_0!==void 0&&o.regular.includes(u0)===!1&&(sm[u0]=_0);Object.keys(sm).length!==0&&o.intersection.push(o.importer.tag("JsonSchemaPlugin",sm))},COMMENT_TAGS=["@format","@pattern","@length","@minLength","@maxLength","@contentMediaType","@type","@minimum","@maximum","@exclusiveMinimum","@exclusiveMaximum","@multipleOf","@items","@minItems","@maxItems","@uniqueItems"];var NestiaMigrateApiFunctionProgrammer;(function(o){o.write=e_=>FilePrinter.description(ts$1.factory.createFunctionDeclaration([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword),ts$1.factory.createModifier(ts$1.SyntaxKind.AsyncKeyword)],void 0,e_.route.accessor.at(-1),void 0,o.writeParameterDeclarations(e_),ts$1.factory.createTypeReferenceNode("Promise",[ts$1.factory.createTypeReferenceNode(e_.route.success===null?"void":`${e_.route.accessor.at(-1)}.Response`)]),ts$1.factory.createBlock(u0(e_),!0)),sm(e_.config,e_.route)),o.writeParameterDeclarations=(e_,a_)=>{var c_;const h_=IdentifierFactory.parameter(a_??"connection",ts$1.factory.createTypeReferenceNode(e_.importer.external({type:"instance",library:"@nestia/fetcher",name:"IConnection"}),e_.route.headers?[ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Headers`)]:void 0));return e_.config.keyword===!0?(e_.route.parameters.length>0||!!e_.route.query||!!e_.route.body)===!1?[h_]:[h_,ts$1.factory.createParameterDeclaration(void 0,void 0,"props",void 0,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Props`))]:[h_,...e_.route.parameters.map(k_=>IdentifierFactory.parameter(k_.key,NestiaMigrateSchemaProgrammer.write({components:e_.components,importer:e_.importer,schema:k_.schema}))),...e_.route.query?[IdentifierFactory.parameter(e_.route.query.key,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Query`))]:[],...e_.route.body?[IdentifierFactory.parameter(e_.route.body.key,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Body`),(e_.route.body.type==="application/json"||e_.route.body.type==="text/plain")&&((c_=e_.route.operation().requestBody)==null?void 0:c_.required)===!1?ts$1.factory.createToken(ts$1.SyntaxKind.QuestionToken):void 0)]:[]]};const sm=(e_,a_)=>{var c_,k_;const h_=a_.comment();return[e_.keyword===!0?h_.split("@param ").join("@param props."):h_,`@path ${a_.emendedPath}`,`@${((c_=e_.author)==null?void 0:c_.tag)??"nestia"} ${((k_=e_.author)==null?void 0:k_.value)??"Generated by Nestia - https://github.com/samchon/nestia"}`].join(`
4767
+ `),writePlugin=o=>{const sm={};for(const[u0,_0]of Object.entries(o.schema))_0!==void 0&&o.regular.includes(u0)===!1&&u0.startsWith("x-")&&(sm[u0]=_0);Object.keys(sm).length!==0&&o.intersection.push(o.importer.tag("JsonSchemaPlugin",sm))},COMMENT_TAGS=["@format","@pattern","@length","@minLength","@maxLength","@contentMediaType","@type","@minimum","@maximum","@exclusiveMinimum","@exclusiveMaximum","@multipleOf","@items","@minItems","@maxItems","@uniqueItems"];var NestiaMigrateApiFunctionProgrammer;(function(o){o.write=e_=>FilePrinter.description(ts$1.factory.createFunctionDeclaration([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword),ts$1.factory.createModifier(ts$1.SyntaxKind.AsyncKeyword)],void 0,e_.route.accessor.at(-1),void 0,o.writeParameterDeclarations(e_),ts$1.factory.createTypeReferenceNode("Promise",[ts$1.factory.createTypeReferenceNode(e_.route.success===null?"void":`${e_.route.accessor.at(-1)}.Response`)]),ts$1.factory.createBlock(u0(e_),!0)),sm(e_.config,e_.route)),o.writeParameterDeclarations=(e_,a_)=>{var c_;const h_=IdentifierFactory.parameter(a_??"connection",ts$1.factory.createTypeReferenceNode(e_.importer.external({type:"instance",library:"@nestia/fetcher",name:"IConnection"}),e_.route.headers?[ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Headers`)]:void 0));return e_.config.keyword===!0?(e_.route.parameters.length>0||!!e_.route.query||!!e_.route.body)===!1?[h_]:[h_,ts$1.factory.createParameterDeclaration(void 0,void 0,"props",void 0,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Props`))]:[h_,...e_.route.parameters.map(k_=>IdentifierFactory.parameter(k_.key,NestiaMigrateSchemaProgrammer.write({components:e_.components,importer:e_.importer,schema:k_.schema}))),...e_.route.query?[IdentifierFactory.parameter(e_.route.query.key,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Query`))]:[],...e_.route.body?[IdentifierFactory.parameter(e_.route.body.key,ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Body`),(e_.route.body.type==="application/json"||e_.route.body.type==="text/plain")&&((c_=e_.route.operation().requestBody)==null?void 0:c_.required)===!1?ts$1.factory.createToken(ts$1.SyntaxKind.QuestionToken):void 0)]:[]]};const sm=(e_,a_)=>{var c_,k_;const h_=a_.comment();return[e_.keyword===!0?h_.split("@param ").join("@param props."):h_,`@path ${a_.emendedPath}`,`@${((c_=e_.author)==null?void 0:c_.tag)??"nestia"} ${((k_=e_.author)==null?void 0:k_.value)??"Generated by Nestia - https://github.com/samchon/nestia"}`].join(`
4768
4768
  `)},u0=e_=>{var D_,O_;const a_=!!((D_=e_.route.success)!=null&&D_["x-nestia-encrypted"]),h_=((O_=e_.route.body)==null?void 0:O_.type)??"application/json",c_=P_=>e_.config.keyword===!0?IdentifierFactory.access(ts$1.factory.createIdentifier("props"),P_):ts$1.factory.createIdentifier(P_),k_=()=>ts$1.factory.createAwaitExpression(ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(e_.importer.external({type:"instance",library:`@nestia/fetcher/lib/${a_?"EncryptedFetcher":"PlainFetcher"}`,name:a_?"EncryptedFetcher":"PlainFetcher"})),"fetch"),void 0,[h_&&h_!=="multipart/form-data"?ts$1.factory.createObjectLiteralExpression([ts$1.factory.createSpreadAssignment(ts$1.factory.createIdentifier("connection")),ts$1.factory.createPropertyAssignment("headers",ts$1.factory.createObjectLiteralExpression([ts$1.factory.createSpreadAssignment(IdentifierFactory.access(ts$1.factory.createIdentifier("connection"),"headers")),ts$1.factory.createPropertyAssignment(ts$1.factory.createStringLiteral("Content-Type"),ts$1.factory.createStringLiteral(h_))],!0))],!0):ts$1.factory.createIdentifier("connection"),ts$1.factory.createObjectLiteralExpression([ts$1.factory.createSpreadAssignment(IdentifierFactory.access(ts$1.factory.createIdentifier(e_.route.accessor.at(-1)),"METADATA")),ts$1.factory.createPropertyAssignment("path",ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(e_.route.accessor.at(-1)),"path"),void 0,_0(e_,!1))),ts$1.factory.createPropertyAssignment("status",ts$1.factory.createNull())],!0),...e_.route.body?[c_(e_.route.body.key)]:[]])),y_=e_.config.simulate!==!0?k_():ts$1.factory.createConditionalExpression(ts$1.factory.createStrictEquality(ts$1.factory.createTrue(),ts$1.factory.createIdentifier("connection.simulate")),void 0,ts$1.factory.createCallExpression(ts$1.factory.createIdentifier(`${e_.route.accessor.at(-1)}.simulate`),[],[ts$1.factory.createIdentifier("connection"),..._0(e_,!0)]),void 0,k_()),T_=Q0(e_.route.comment());return T_.length===0?[ts$1.factory.createReturnStatement(y_)]:[StatementFactory.constant({name:"output",type:ts$1.factory.createTypeReferenceNode(`${e_.route.accessor.at(-1)}.Response`),value:y_}),ts$1.factory.createExpressionStatement(ts$1.factory.createBinaryExpression(ts$1.factory.createIdentifier("connection.headers"),ts$1.factory.createToken(ts$1.SyntaxKind.QuestionQuestionEqualsToken),ts$1.factory.createObjectLiteralExpression([]))),...T_.map(P_=>ts$1.factory.createExpressionStatement(P_.type==="assign"?ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("Object.assign"),void 0,[ts$1.factory.createIdentifier("connection.headers"),ts$1.factory.createIdentifier(`output.${P_.accessor}`)]):ts$1.factory.createBinaryExpression(ts$1.factory.createIdentifier(`connection.headers${Escaper.variable(P_.property)?`.${P_.property}`:`[${JSON.stringify(P_.property)}]`}`),ts$1.factory.createToken(ts$1.SyntaxKind.EqualsToken),ts$1.factory.createIdentifier(`output.${P_.accessor}`)))),ts$1.factory.createReturnStatement(ts$1.factory.createIdentifier("output"))]},_0=(e_,a_)=>e_.route.parameters.length===0&&e_.route.query===null&&(a_===!1||e_.route.body===null)?[]:e_.config.keyword===!0?[ts$1.factory.createIdentifier("props")]:[...e_.route.parameters.map(h_=>ts$1.factory.createIdentifier(h_.key)),...e_.route.query?[ts$1.factory.createIdentifier(e_.route.query.key)]:[],...a_&&e_.route.body?[ts$1.factory.createIdentifier(e_.route.body.key)]:[]],Q0=e_=>{const a_=[];for(const h_ of e_.split(`
4769
4769
  `).map(c_=>c_.trim()))if(h_.startsWith("@setHeader ")){const c_=h_.substring(11).trim().split(/\s+/);c_.length>=2&&a_.push({type:"set",accessor:c_[0],property:c_[1]})}else if(h_.startsWith("@assignHeaders ")){const c_=h_.substring(15).trim();c_.length!==0&&a_.push({type:"assign",accessor:c_})}return a_}})(NestiaMigrateApiFunctionProgrammer||(NestiaMigrateApiFunctionProgrammer={}));var NestiaMigrateApiSimulationProgrammer;(function(o){o.random=_0=>{const Q0=_0.route.success?NestiaMigrateSchemaProgrammer.write({components:_0.components,importer:_0.importer,schema:_0.route.success.schema}):TypeFactory.keyword("void");return constant$1("random",ts$1.factory.createArrowFunction(void 0,void 0,[],Q0,void 0,ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(_0.importer.external({type:"default",library:"typia",name:"typia"})),"random"),[Q0],void 0)))},o.simulate=_0=>{const Q0=()=>ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("random"),void 0,void 0);return constant$1("simulate",ts$1.factory.createArrowFunction(void 0,void 0,NestiaMigrateApiFunctionProgrammer.writeParameterDeclarations(_0,_0.route.parameters.length===0&&_0.route.query===null&&_0.route.body===null?"_connection":void 0),ts$1.factory.createTypeReferenceNode(_0.route.success?"Response":"void"),void 0,ts$1.factory.createBlock([...sm(_0),ts$1.factory.createReturnStatement(Q0())],!0)))};const sm=_0=>{var c_;const Q0=k_=>_0.config.keyword===!0?IdentifierFactory.access(ts$1.factory.createIdentifier("props"),k_):ts$1.factory.createIdentifier(k_),e_=[..._0.route.parameters.map(k_=>({category:"param",name:k_.key,schema:NestiaMigrateSchemaProgrammer.write({components:_0.components,importer:_0.importer,schema:k_.schema})})),..._0.route.query?[{category:"query",name:_0.route.query.key,schema:NestiaMigrateSchemaProgrammer.write({components:_0.components,importer:_0.importer,schema:_0.route.query.schema})}]:[],..._0.route.body?[{category:"body",name:_0.route.body.key,schema:NestiaMigrateSchemaProgrammer.write({components:_0.components,importer:_0.importer,schema:_0.route.body.schema})}]:[]];if(e_.length===0)return[];const a_=StatementFactory.constant({name:"assert",value:ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(_0.importer.external({type:"instance",library:"@nestia/fetcher/lib/NestiaSimulator",name:"NestiaSimulator"})),"assert"),void 0,[ts$1.factory.createObjectLiteralExpression([ts$1.factory.createPropertyAssignment("method",ts$1.factory.createIdentifier("METADATA.method")),ts$1.factory.createPropertyAssignment("host",ts$1.factory.createIdentifier("connection.host")),ts$1.factory.createPropertyAssignment("path",NestiaMigrateApiNamespaceProgrammer.writePathCallExpression(_0.config,_0.route)),ts$1.factory.createPropertyAssignment("contentType",ts$1.factory.createStringLiteral(((c_=_0.route.success)==null?void 0:c_.type)??"application/json"))],!0)])}),h_=e_.map(k_=>ts$1.factory.createCallExpression((()=>{const y_=IdentifierFactory.access(ts$1.factory.createIdentifier("assert"),k_.category);return k_.category!=="param"?y_:ts$1.factory.createCallExpression(y_,void 0,[ts$1.factory.createStringLiteral(k_.name)])})(),void 0,[ts$1.factory.createArrowFunction(void 0,void 0,[],void 0,void 0,ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(_0.importer.external({type:"default",library:"typia",name:"typia"})),"assert"),void 0,[k_.category==="headers"?ts$1.factory.createIdentifier("connection.headers"):Q0(k_.name)]))])).map(ts$1.factory.createExpressionStatement);return[a_,u0(_0.importer,h_)]},u0=(_0,Q0)=>ts$1.factory.createTryStatement(ts$1.factory.createBlock(Q0,!0),ts$1.factory.createCatchClause("exp",ts$1.factory.createBlock([ts$1.factory.createIfStatement(ts$1.factory.createLogicalNot(ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(_0.external({type:"default",library:"typia",name:"typia"})),"is"),[ts$1.factory.createTypeReferenceNode(_0.external({type:"instance",library:"@nestia/fetcher",name:"HttpError"}))],[ts$1.factory.createIdentifier("exp")])),ts$1.factory.createThrowStatement(ts$1.factory.createIdentifier("exp"))),ts$1.factory.createReturnStatement(ts$1.factory.createAsExpression(ts$1.factory.createObjectLiteralExpression([ts$1.factory.createPropertyAssignment("success",ts$1.factory.createFalse()),ts$1.factory.createPropertyAssignment("status",ts$1.factory.createIdentifier("exp.status")),ts$1.factory.createPropertyAssignment("headers",ts$1.factory.createIdentifier("exp.headers")),ts$1.factory.createPropertyAssignment("data",ts$1.factory.createIdentifier("exp.toJSON().message"))],!0),TypeFactory.keyword("any")))],!0)),void 0)})(NestiaMigrateApiSimulationProgrammer||(NestiaMigrateApiSimulationProgrammer={}));const constant$1=(o,sm)=>ts$1.factory.createVariableStatement([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword)],ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration(ts$1.factory.createIdentifier(o),void 0,void 0,sm)],ts$1.NodeFlags.Const));var NestiaMigrateApiNamespaceProgrammer;(function(o){o.write=Q0=>{const e_=sm(Q0);return ts$1.factory.createModuleDeclaration([ts$1.factory.createToken(ts$1.SyntaxKind.ExportKeyword)],ts$1.factory.createIdentifier(Q0.route.accessor.at(-1)),ts$1.factory.createModuleBlock([...e_,...e_.length?[FilePrinter.newLine()]:[],u0(Q0),FilePrinter.newLine(),_0(Q0),...Q0.config.simulate===!0?[NestiaMigrateApiSimulationProgrammer.random(Q0),NestiaMigrateApiSimulationProgrammer.simulate(Q0)]:[]]),ts$1.NodeFlags.Namespace)},o.writePathCallExpression=(Q0,e_)=>ts$1.factory.createCallExpression(ts$1.factory.createIdentifier(`${e_.accessor.at(-1)}.path`),void 0,e_.parameters.length===0&&e_.query===null?[]:Q0.keyword===!0?[ts$1.factory.createIdentifier("props")]:[...e_.parameters,...e_.query?[e_.query]:[]].map(a_=>ts$1.factory.createIdentifier(a_.key)));const sm=Q0=>{const e_=[],a_=(h_,c_)=>e_.push(ts$1.factory.createTypeAliasDeclaration([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword)],h_,void 0,c_));return Q0.config.keyword===!0&&(Q0.route.parameters.length>0||Q0.route.query||Q0.route.body)&&a_("Props",NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:{type:"object",properties:Object.fromEntries([...Q0.route.parameters.map(h_=>[h_.key,{...h_.schema,title:h_.parameter().title,description:h_.parameter().description}]),...Q0.route.query?[[Q0.route.query.key,{...Q0.route.query.schema,title:Q0.route.query.title(),description:Q0.route.query.description()}]]:[],...Q0.route.body?[[Q0.route.body.key,{...Q0.route.body.schema,description:Q0.route.body.description()}]]:[]]),required:[...Q0.route.parameters.map(h_=>h_.key),...Q0.route.query?[Q0.route.query.key]:[],...Q0.route.body?[Q0.route.body.key]:[]]}})),Q0.route.headers&&a_("Headers",NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:Q0.route.headers.schema})),Q0.route.query&&a_("Query",NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:Q0.route.query.schema})),Q0.route.body&&a_("Body",NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:Q0.route.body.schema})),Q0.route.success&&a_("Response",NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:Q0.route.success.schema})),e_},u0=Q0=>{var e_,a_,h_;return constant("METADATA",ts$1.factory.createAsExpression(ts$1.factory.createObjectLiteralExpression([ts$1.factory.createPropertyAssignment("method",ts$1.factory.createStringLiteral(Q0.route.method.toUpperCase())),ts$1.factory.createPropertyAssignment("path",ts$1.factory.createStringLiteral(getPath(Q0.route))),ts$1.factory.createPropertyAssignment("request",Q0.route.body?LiteralFactory.write({type:Q0.route.body.type,encrypted:!!Q0.route.body["x-nestia-encrypted"]}):ts$1.factory.createNull()),ts$1.factory.createPropertyAssignment("response",Q0.route.method.toUpperCase()!=="HEAD"?LiteralFactory.write({type:((e_=Q0.route.success)==null?void 0:e_.type)??"application/json",encrypted:!!((a_=Q0.route.success)!=null&&a_["x-nestia-encrypted"])}):ts$1.factory.createNull()),...((h_=Q0.route.success)==null?void 0:h_.type)==="application/x-www-form-urlencoded"?[ts$1.factory.createPropertyAssignment("parseQuery",ts$1.factory.createCallExpression(ts$1.factory.createIdentifier(`${Q0.importer.external({type:"default",library:"typia",name:"typia"})}.http.createAssertQuery`),[NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:Q0.route.success.schema})],void 0))]:[]],!0),ts$1.factory.createTypeReferenceNode(ts$1.factory.createIdentifier("const"))))},_0=Q0=>{const e_=Q0.route.parameters.length===0&&Q0.route.query===null,a_=T_=>Q0.config.keyword===!0?IdentifierFactory.access(ts$1.factory.createIdentifier("props"),T_):ts$1.factory.createIdentifier(T_),h_=T_=>constant("path",ts$1.factory.createArrowFunction([],[],e_?[]:Q0.config.keyword===!0?[IdentifierFactory.parameter("props",Q0.route.body?ts$1.factory.createTypeReferenceNode("Omit",[ts$1.factory.createTypeReferenceNode("Props"),ts$1.factory.createLiteralTypeNode(ts$1.factory.createStringLiteral(Q0.route.body.key))]):ts$1.factory.createTypeReferenceNode("Props"))]:[...Q0.route.parameters.map(D_=>IdentifierFactory.parameter(D_.key,NestiaMigrateSchemaProgrammer.write({components:Q0.components,importer:Q0.importer,schema:D_.schema}))),...Q0.route.query?[IdentifierFactory.parameter(Q0.route.query.key,ts$1.factory.createTypeReferenceNode(`${Q0.route.accessor.at(-1)}.Query`))]:[]],void 0,void 0,T_)),c_=()=>{const T_=getPath(Q0.route),D_=T_.split(":");return D_.length===1?ts$1.factory.createStringLiteral(T_):ts$1.factory.createTemplateExpression(ts$1.factory.createTemplateHead(D_[0]),D_.slice(1).map((O_,P_,Z_)=>{const fy=O_.split("/")[0];return ts$1.factory.createTemplateSpan(ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("encodeURIComponent"),void 0,[ts$1.factory.createBinaryExpression(a_(Q0.route.parameters.find(W_=>W_.name===fy).key),ts$1.factory.createToken(ts$1.SyntaxKind.QuestionQuestionToken),ts$1.factory.createStringLiteral("null"))]),(P_!==Z_.length-1?ts$1.factory.createTemplateMiddle:ts$1.factory.createTemplateTail)(O_.substring(fy.length)))}))};if(!Q0.route.query)return h_(c_());const k_=T_=>Q0.route.parameters.find(D_=>D_.key===T_)!==void 0?k_("_"+T_):T_,y_=k_("variables");return h_(ts$1.factory.createBlock([local({name:y_,type:"URLSearchParams",expression:ts$1.factory.createNewExpression(ts$1.factory.createIdentifier("URLSearchParams"),[],[])}),ts$1.factory.createForOfStatement(void 0,ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration(ts$1.factory.createArrayBindingPattern([ts$1.factory.createBindingElement(void 0,void 0,ts$1.factory.createIdentifier("key"),void 0),ts$1.factory.createBindingElement(void 0,void 0,ts$1.factory.createIdentifier("value"),void 0)]),void 0,void 0,void 0)],ts$1.NodeFlags.Const),ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("Object.entries"),void 0,[ts$1.factory.createAsExpression(a_(Q0.route.query.key),TypeFactory.keyword("any"))]),ts$1.factory.createIfStatement(ts$1.factory.createStrictEquality(ts$1.factory.createIdentifier("undefined"),ts$1.factory.createIdentifier("value")),ts$1.factory.createContinueStatement(),ts$1.factory.createIfStatement(ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("Array.isArray"),void 0,[ts$1.factory.createIdentifier("value")]),ts$1.factory.createExpressionStatement(ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier("value"),ts$1.factory.createIdentifier("forEach")),void 0,[ts$1.factory.createArrowFunction(void 0,void 0,[IdentifierFactory.parameter("elem")],void 0,void 0,ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(y_),"append"),void 0,[ts$1.factory.createIdentifier("key"),ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("String"),void 0,[ts$1.factory.createIdentifier("elem")])]))])),ts$1.factory.createExpressionStatement(ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(y_),"set"),void 0,[ts$1.factory.createIdentifier("key"),ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("String"),void 0,[ts$1.factory.createIdentifier("value")])]))))),local({name:"location",type:"string",expression:c_()}),ts$1.factory.createReturnStatement(ts$1.factory.createConditionalExpression(ts$1.factory.createStrictEquality(ExpressionFactory.number(0),IdentifierFactory.access(ts$1.factory.createIdentifier(y_),"size")),void 0,ts$1.factory.createIdentifier("location"),void 0,ts$1.factory.createTemplateExpression(ts$1.factory.createTemplateHead(""),[ts$1.factory.createTemplateSpan(ts$1.factory.createIdentifier("location"),ts$1.factory.createTemplateMiddle("?")),ts$1.factory.createTemplateSpan(ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(y_),"toString"),void 0,void 0),ts$1.factory.createTemplateTail(""))])))],!0))}})(NestiaMigrateApiNamespaceProgrammer||(NestiaMigrateApiNamespaceProgrammer={}));const constant=(o,sm)=>ts$1.factory.createVariableStatement([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword)],ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration(o,void 0,void 0,sm)],ts$1.NodeFlags.Const)),getPath=o=>(o.emendedPath.startsWith("/")?"":"/")+o.emendedPath,local=o=>ts$1.factory.createVariableStatement([],ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration(o.name,void 0,ts$1.factory.createTypeReferenceNode(o.type),o.expression)],ts$1.NodeFlags.Const));var TypeLiteralFactory;(function(o){o.generate=h_=>typeof h_=="boolean"?_0(h_):typeof h_=="number"?u0(h_):typeof h_=="string"?sm(h_):typeof h_=="object"?h_===null?Q0():Array.isArray(h_)?e_(h_):a_(h_):ts$1.factory.createKeywordTypeNode(ts$1.SyntaxKind.AnyKeyword);const sm=h_=>ts$1.factory.createLiteralTypeNode(ts$1.factory.createStringLiteral(h_)),u0=h_=>ts$1.factory.createLiteralTypeNode(h_<0?ts$1.factory.createPrefixUnaryExpression(ts$1.SyntaxKind.MinusToken,ts$1.factory.createNumericLiteral(-h_)):ts$1.factory.createNumericLiteral(h_)),_0=h_=>ts$1.factory.createLiteralTypeNode(h_?ts$1.factory.createTrue():ts$1.factory.createFalse()),Q0=()=>ts$1.factory.createLiteralTypeNode(ts$1.factory.createNull()),e_=h_=>ts$1.factory.createTupleTypeNode(h_.map(o.generate)),a_=h_=>ts$1.factory.createTypeLiteralNode(Object.entries(h_).map(([c_,k_])=>ts$1.factory.createPropertySignature(void 0,Escaper.variable(c_)?ts$1.factory.createIdentifier(c_):ts$1.factory.createStringLiteral(c_),void 0,o.generate(k_))))})(TypeLiteralFactory||(TypeLiteralFactory={}));var MapUtil;(function(o){o.take=sm=>u0=>_0=>{const Q0=sm.get(u0);if(Q0)return Q0;const e_=_0();return sm.set(u0,e_),e_}})(MapUtil||(MapUtil={}));class NestiaMigrateImportProgrammer{constructor(){this.external_=new Map,this.dtos_=new Set}empty(){return this.external_.size===0&&this.dtos_.size===0}external(sm){const u0=MapUtil.take(this.external_)(sm.library)(()=>({default:null,instances:new Set})),_0=sm.name.split(".")[0];return sm.type==="default"?u0.default=sm.name:u0.instances.add(_0),_0}dto(sm,u0){const _0=sm.split(".")[0];return this.dtos_.add(_0),ts$1.factory.createTypeReferenceNode(u0!=null&&u0.length?ts$1.factory.createQualifiedName(ts$1.factory.createIdentifier(u0),ts$1.factory.createIdentifier(_0)):sm)}tag(sm,u0){const _0=this.external({type:"instance",library:"typia",name:"tags"});return ts$1.factory.createTypeReferenceNode(`${_0}.${sm}`,u0===void 0?[]:[TypeLiteralFactory.generate(u0)])}toStatements(sm,u0){return[...[...this.external_.entries()].map(([_0,Q0])=>ts$1.factory.createImportDeclaration(void 0,ts$1.factory.createImportClause(!1,Q0.default!==null?ts$1.factory.createIdentifier(Q0.default):void 0,Q0.instances.size?ts$1.factory.createNamedImports([...Q0.instances].map(e_=>ts$1.factory.createImportSpecifier(!1,void 0,ts$1.factory.createIdentifier(e_)))):void 0),ts$1.factory.createStringLiteral(_0))),...this.external_.size&&this.dtos_.size?[FilePrinter.newLine()]:[],...[...this.dtos_].filter(u0?_0=>_0!==u0.split(".")[0]:()=>!0).map(_0=>ts$1.factory.createImportDeclaration(void 0,ts$1.factory.createImportClause(!1,void 0,ts$1.factory.createNamedImports([ts$1.factory.createImportSpecifier(!1,void 0,ts$1.factory.createIdentifier(_0))])),ts$1.factory.createStringLiteral(sm(_0))))]}}var NestiaMigrateApiFileProgrammer;(function(o){o.write=sm=>{const u0=new NestiaMigrateImportProgrammer,_0=sm.routes.map(Q0=>[FilePrinter.newLine(),NestiaMigrateApiFunctionProgrammer.write({config:sm.config,components:sm.components,importer:u0,route:Q0}),NestiaMigrateApiNamespaceProgrammer.write({config:sm.config,components:sm.components,importer:u0,route:Q0})]).flat();return[...u0.toStatements(Q0=>`../${"../".repeat(sm.namespace.length)}structures/${Q0}`),...[...sm.children].map(Q0=>ts$1.factory.createExportDeclaration(void 0,!1,ts$1.factory.createNamespaceExport(ts$1.factory.createIdentifier(Q0)),ts$1.factory.createStringLiteral(`./${Q0}`),void 0)),..._0]}})(NestiaMigrateApiFileProgrammer||(NestiaMigrateApiFileProgrammer={}));var NestiaMigrateDtoProgrammer;(function(o){o.compose=_0=>{const Q0=new Map;for(const[e_,a_]of Object.entries(_0.components.schemas??{})){const h_=e_.split("/").filter(c_=>c_.length!==0).map(StringUtil.escapeNonVariable).join("");sm(Q0)(h_)(c_=>u0(_0.config)(_0.components)(c_)(h_,a_))}return Q0};const sm=_0=>Q0=>e_=>{const a_=Q0.split("."),h_={value:null};return a_.forEach((c_,k_)=>{h_.value=MapUtil.take(_0)(c_)(()=>({name:c_,children:new Map,programmer:null})),k_===a_.length-1&&(h_.value.programmer=e_),_0=h_.value.children}),h_},u0=_0=>Q0=>e_=>(a_,h_)=>FilePrinter.description(ts$1.factory.createTypeAliasDeclaration([ts$1.factory.createToken(ts$1.SyntaxKind.ExportKeyword)],a_.split(".").at(-1),[],NestiaMigrateSchemaProgrammer.write({components:Q0,importer:e_,schema:h_})),writeComment(_0)(h_,a_.indexOf(".")===-1))})(NestiaMigrateDtoProgrammer||(NestiaMigrateDtoProgrammer={}));const writeComment=o=>(sm,u0)=>{var _0,Q0,e_,a_;return[...(_0=sm.description)!=null&&_0.length?[sm.description]:[],...(Q0=sm.description)!=null&&Q0.length&&(sm.title!==void 0||sm.deprecated===!0)?[""]:[],...sm.title!==void 0?[`@title ${sm.title}`]:[],...sm.deprecated===!0?["@deprecated"]:[],...u0?[`@${((e_=o.author)==null?void 0:e_.tag)??"nestia"} ${((a_=o.author)==null?void 0:a_.value)??"Generated by Nestia - https://github.com/samchon/nestia"}`]:[]].join(`
4770
4770
  `).split("*/").join("*\\/")};var NestiaMigrateApiProgrammer;(function(o){o.write=_0=>{const Q0=new HashMap(a_=>hash(a_.join(".")),(a_,h_)=>a_.length===h_.length&&a_.join(".")===h_.join("."));for(const a_ of _0.application.routes){const h_=a_.accessor.slice(0,-1);let c_=Q0.take(h_,()=>({config:_0.config,components:_0.application.document().components,namespace:h_,routes:[],children:new Set}));c_.routes.push(a_),h_.forEach((k_,y_,T_)=>{const D_=h_.slice(0,T_.length-y_-1),O_=Q0.take(D_,()=>({config:_0.config,components:_0.application.document().components,namespace:D_,children:new Set,routes:[]}));O_.children.add(c_.namespace.at(-1)),c_=O_})}const e_=Object.fromEntries(Q0.toJSON().map(({second:a_})=>[`src/${_0.mode==="nest"?"api/":""}functional/${[...a_.namespace,"index.ts"].join("/")}`,FilePrinter.write({statements:NestiaMigrateApiFileProgrammer.write({...a_,config:_0.config,components:_0.application.document().components})})]));if(_0.mode==="sdk")for(const[a_,h_]of NestiaMigrateDtoProgrammer.compose({config:_0.config,components:_0.application.document().components}).entries())e_[`src/structures/${a_}.ts`]=FilePrinter.write({statements:sm(a_,h_)});return e_};const sm=(_0,Q0)=>{const e_=new NestiaMigrateImportProgrammer,a_=u0(e_,Q0);return a_.length===0?[]:[...e_.toStatements(h_=>`./${h_}`,_0),...e_.empty()?[]:[FilePrinter.newLine()],...a_]},u0=(_0,Q0)=>{const e_=[];if(Q0.programmer!==null&&e_.push(Q0.programmer(_0)),Q0.children.size!==0){const a_=[];for(const h_ of Q0.children.values())a_.push(...u0(_0,h_));e_.push(ts$1.factory.createModuleDeclaration([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword)],ts$1.factory.createIdentifier(Q0.name),ts$1.factory.createModuleBlock(a_),ts$1.NodeFlags.Namespace))}return e_.push(FilePrinter.newLine()),e_}})(NestiaMigrateApiProgrammer||(NestiaMigrateApiProgrammer={}));var NestiaMigrateE2eFunctionProgrammer;(function(o){o.write=u0=>ts$1.factory.createFunctionDeclaration([ts$1.factory.createModifier(ts$1.SyntaxKind.ExportKeyword),ts$1.factory.createModifier(ts$1.SyntaxKind.AsyncKeyword)],void 0,["test","api",...u0.route.accessor].join("_"),void 0,[IdentifierFactory.parameter("connection",ts$1.factory.createTypeReferenceNode(ts$1.factory.createQualifiedName(ts$1.factory.createIdentifier(u0.importer.external({type:"default",library:"@ORGANIZATION/PROJECT-api",name:"api"})),ts$1.factory.createIdentifier("IConnection"))))],void 0,ts$1.factory.createBlock(o.writeBody(u0),!0)),o.writeBody=u0=>[ts$1.factory.createVariableStatement([],ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration("output",void 0,u0.route.success?NestiaMigrateSchemaProgrammer.write({components:u0.components,importer:u0.importer,schema:u0.route.success.schema}):void 0,ts$1.factory.createAwaitExpression(sm(u0)))],ts$1.NodeFlags.Const)),ts$1.factory.createExpressionStatement(ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier(u0.importer.external({type:"default",library:"typia",name:"typia"})),"assert"),void 0,[ts$1.factory.createIdentifier("output")]))];const sm=u0=>{const _0=ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier("api.functional"),ts$1.factory.createIdentifier(u0.route.accessor.join("."))),Q0=ts$1.factory.createIdentifier("connection");if(u0.route.parameters.length===0&&u0.route.query===null&&u0.route.body===null)return ts$1.factory.createCallExpression(_0,void 0,[Q0]);const e_=ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier(u0.importer.external({type:"default",library:"typia",name:"typia"})),"random");return u0.config.keyword===!0?ts$1.factory.createCallExpression(_0,void 0,[Q0,LiteralFactory.write(Object.fromEntries([...u0.route.parameters,u0.route.query,u0.route.body].filter(a_=>a_!==null).map(({key:a_,schema:h_})=>[a_,ts$1.factory.createCallExpression(e_,[NestiaMigrateSchemaProgrammer.write({components:u0.components,importer:u0.importer,schema:h_})],void 0)])))]):ts$1.factory.createCallExpression(_0,void 0,[Q0,...[...u0.route.parameters,u0.route.query,u0.route.body].filter(a_=>!!a_).map(a_=>ts$1.factory.createCallExpression(e_,[NestiaMigrateSchemaProgrammer.write({components:u0.components,importer:u0.importer,schema:a_.schema})],void 0))])}})(NestiaMigrateE2eFunctionProgrammer||(NestiaMigrateE2eFunctionProgrammer={}));var NestiaMigrateApiStartProgrammer;(function(o){o.write=Q0=>{const e_=new NestiaMigrateImportProgrammer,a_=sm(Q0,e_,pick(Q0.application.routes)),h_=[...e_.toStatements(c_=>`@ORGANIZATION/PROJECT-api/lib/structures/${c_}`),FilePrinter.newLine(),ts$1.factory.createImportDeclaration(void 0,ts$1.factory.createImportClause(!1,void 0,ts$1.factory.createNamedImports([ts$1.factory.createImportSpecifier(!1,void 0,ts$1.factory.createIdentifier("TestGlobal"))])),ts$1.factory.createStringLiteral("./TestGlobal"),void 0),FilePrinter.newLine(),a_,ts$1.factory.createExpressionStatement(_0())];return{"test/start.ts":FilePrinter.write({statements:h_})}};const sm=(Q0,e_,a_)=>StatementFactory.constant({name:"main",value:ts$1.factory.createArrowFunction([ts$1.factory.createToken(ts$1.SyntaxKind.AsyncKeyword)],void 0,[],void 0,void 0,ts$1.factory.createBlock([u0(Q0,e_),...NestiaMigrateE2eFunctionProgrammer.writeBody({config:Q0.config,components:Q0.application.document().components,importer:e_,route:a_})],!0))}),u0=(Q0,e_)=>{var a_,h_,c_;return ts$1.factory.createVariableStatement(void 0,ts$1.factory.createVariableDeclarationList([ts$1.factory.createVariableDeclaration("connection",void 0,ts$1.factory.createTypeReferenceNode(ts$1.factory.createQualifiedName(ts$1.factory.createIdentifier(e_.external({type:"default",library:"@ORGANIZATION/PROJECT-api",name:"api"})),ts$1.factory.createIdentifier("IConnection"))),ts$1.factory.createObjectLiteralExpression([ts$1.factory.createSpreadAssignment(ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier("TestGlobal"),"connection"),void 0,void 0)),...(c_=(h_=(a_=Q0.application.document().servers)==null?void 0:a_[0])==null?void 0:h_.url)!=null&&c_.length?[ts$1.factory.createPropertyAssignment("host",ts$1.factory.createStringLiteral(Q0.application.document().servers[0].url))]:[],...Q0.config.simulate===!0?[ts$1.factory.createPropertyAssignment("simulate",ts$1.factory.createTrue())]:[]],!0))],ts$1.NodeFlags.Const))},_0=()=>ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createCallExpression(ts$1.factory.createIdentifier("main"),void 0,void 0),"catch"),void 0,[ts$1.factory.createArrowFunction(void 0,void 0,[IdentifierFactory.parameter("exp")],void 0,void 0,ts$1.factory.createBlock([ts$1.factory.createExpressionStatement(ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier("console"),"log"),void 0,[ts$1.factory.createIdentifier("exp")])),ts$1.factory.createExpressionStatement(ts$1.factory.createCallExpression(ts$1.factory.createPropertyAccessExpression(ts$1.factory.createIdentifier("process"),"exit"),void 0,[ts$1.factory.createPrefixMinus(ts$1.factory.createNumericLiteral("1"))]))],!0))])})(NestiaMigrateApiStartProgrammer||(NestiaMigrateApiStartProgrammer={}));const pick=o=>{const sm=Math.random()*o.length,u0=Math.min(o.length-1,Math.floor(sm));return o[u0]};var NestiaMigrateE2eProgrammer;(function(o){o.write=u0=>Object.fromEntries(u0.application.routes.map(_0=>sm(u0.config,u0.application.document().components,_0)).map(_0=>[`${_0.location}/${_0.file}`,_0.content]));const sm=(u0,_0,Q0)=>{const e_=new NestiaMigrateImportProgrammer,a_=NestiaMigrateE2eFunctionProgrammer.write({config:u0,components:_0,importer:e_,route:Q0}),h_=[...e_.toStatements(c_=>`@ORGANIZATION/PROJECT-api/lib/structures/${c_}`),FilePrinter.newLine(),a_];return{location:"test/features/api",file:`${["test","api",...Q0.accessor].join("_")}.ts`,content:FilePrinter.write({statements:h_})}}})(NestiaMigrateE2eProgrammer||(NestiaMigrateE2eProgrammer={}));var NestiaMigrateControllerAnalyzer;(function(o){o.analyze=sm=>{const u0=new Map;for(const Q0 of sm){const e_=Q0.operation()["x-samchon-controller"]??(Q0.accessor.length<=1?"__App":Q0.accessor.slice(0,-1).map(StringUtil.capitalize).join(""))+"Controller";MapUtil.take(u0)(e_)(()=>({name:e_,path:"@lazy",location:"@lazy",routes:[]})).routes.push(Q0)}const _0=[...u0.values()];for(const Q0 of _0){const e_=k_=>k_.emendedPath.split("/"),a_=k_=>e_(k_).filter(y_=>y_.length!==0&&y_[0]!==":"),h_=e_(Q0.routes[0]),c_=a_(Q0.routes[0]);for(const k_ of Q0.routes.slice(1))h_.splice(getSplitIndex(h_,e_(k_))),c_.splice(getSplitIndex(c_,a_(k_)));Q0.path=h_.join("/"),Q0.location=["src","controllers",...c_].join("/")}return _0}})(NestiaMigrateControllerAnalyzer||(NestiaMigrateControllerAnalyzer={}));const getSplitIndex=(o,sm)=>{const u0=Math.min(o.length,sm.length);for(let _0=0;_0<u0;++_0)if(o[_0]!==sm[_0])return _0;return u0};var NestiaMigrateNestMethodProgrammer;(function(o){o.write=a_=>{const h_=a_.route.success?NestiaMigrateSchemaProgrammer.write({components:a_.components,importer:a_.importer,schema:a_.route.success.schema}):TypeFactory.keyword("void"),c_=ts$1.factory.createMethodDeclaration([...u0(a_),ts$1.factory.createToken(ts$1.SyntaxKind.PublicKeyword),ts$1.factory.createToken(ts$1.SyntaxKind.AsyncKeyword)],void 0,a_.route.accessor.at(-1),void 0,void 0,_0(a_),ts$1.factory.createTypeReferenceNode("Promise",[h_]),ts$1.factory.createBlock([...[...a_.route.parameters.map(k_=>k_.key),...a_.route.headers?["headers"]:[],...a_.route.query?["query"]:[],...a_.route.body?["body"]:[]].map(k_=>ts$1.factory.createExpressionStatement(ts$1.factory.createIdentifier(k_))),ts$1.factory.createReturnStatement(ts$1.factory.createCallExpression(IdentifierFactory.access(ts$1.factory.createIdentifier(a_.importer.external({type:"default",library:"typia",name:"typia"})),"random"),[h_],void 0))],!0));return FilePrinter.description(c_,sm(a_.config,a_.route))};const sm=(a_,h_)=>{var c_,k_;return[h_.comment(),`@${((c_=a_.author)==null?void 0:c_.tag)??"nestia"} ${((k_=a_.author)==null?void 0:k_.value)??"Generated by Nestia - https://github.com/samchon/nestia"}`].join(`
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1.0, maximum-scale=3.0s"
7
7
  />
8
8
  <title>Nestia Editor</title>
9
- <script type="module" src="./assets/index-CrOrcFnU.js"></script>
9
+ <script type="module" src="./assets/index-DveqFDOT.js"></script>
10
10
  </head>
11
11
  <body style="width: 100%; height: 100%; margin: 0px; overflow: hidden;">
12
12
  <div id="root" style="width: 100%; height: 100%"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/editor",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "main": "lib/index.js",
5
5
  "module": "lib/index.mjs",
6
6
  "typings": "lib/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "homepage": "https://nestia.io",
37
37
  "dependencies": {
38
38
  "@mui/material": "^5.15.6",
39
- "@nestia/migrate": "^8.0.1",
39
+ "@nestia/migrate": "^8.0.3",
40
40
  "@samchon/openapi": "^4.5.0",
41
41
  "@stackblitz/sdk": "^1.11.0",
42
42
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",