sy-api-pro 0.1.10 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,6 +35,7 @@ const config: ConfigModels = {
35
35
  deleteParentDTO: [], // (string | RegExp)[];
36
36
  },
37
37
  ],
38
+ apiHeaderTemplate: [], // api文件头部模版
38
39
  };
39
40
 
40
41
  module.exports = config;
package/bin/model.d.ts CHANGED
@@ -9,5 +9,6 @@ export interface ConfigModels {
9
9
  apiBaseName?: string;
10
10
  ignoreParamsDTO?: string[];
11
11
  deleteParentDTO?: (string | RegExp)[];
12
- }[]
12
+ }[];
13
+ apiHeaderTemplate: string[];
13
14
  }
package/dist/index.umd.js CHANGED
@@ -1,13 +1,13 @@
1
1
  (function(y,w){typeof exports=="object"&&typeof module!="undefined"?w(require("axios")):typeof define=="function"&&define.amd?define(["axios"],w):(y=typeof globalThis!="undefined"?globalThis:y||self,w(y.axios))})(this,function(y){"use strict";var N=(y,w,q)=>new Promise((p,m)=>{var c=$=>{try{j(q.next($))}catch(I){m(I)}},O=$=>{try{j(q.throw($))}catch(I){m(I)}},j=$=>$.done?p($.value):Promise.resolve($.value).then(c,O);j((q=q.apply(y,w)).next())});const w=a=>{var t;const n=(a||"").toLowerCase(),i={int:"number",integer:"number",long:"number",bigdecimal:"number",float:"number",double:"number",localdatetime:"string",date:"string",char:"string",byte:"string",short:"string",character:"string",string:"string",multipartfile:"string",boolean:"boolean",void:"void"},{listType:d}=((t=new RegExp("^list<(?<listType>.+)>$").exec(n))==null?void 0:t.groups)||{};return d?`Array<${i[d]||"any"}>`:i[n]||"any"},q=Object.freeze({_getDesc(a){const n=(a.title||"").trim();return n?` // ${n}`:""},getInterface:function({list:a,config:{ignoreParamsDTO:n,deleteParentDTO:i}}){const d=a.map((r,o)=>r.level===0&&!n.includes(r.type)?o:null).filter(r=>r!==null);return(d.length>0?d.concat(a.length).map((r,o,h)=>a.slice(r,h[o+1])):[a]).filter(r=>r.length).map(r=>{const o=r[0];if(o.json){const h=o.json.split(`
2
- `);return h.forEach((e,l)=>{var D;const g=new RegExp('(?<space>\\s*)"(?<name>[a-zA-Z0-9]+)"\\s?:\\s*"(?<desc>.*)".*$');if(g.test(e)){const{space:b,name:F,desc:T}=((D=g.exec(e))==null?void 0:D.groups)||{},v=(F||"").trim(),M=(T||"").trim(),L=a.filter(P=>(P.name||"").trim()+(P.title||"").trim()===v+M);if(L.length>=1){const[{type:P}]=L,R=o.required?"?":"",u=M?` // ${M}`:"";h[l]=e.replace(g,`${b+F+R}: ${w(P)};${u}`)}}/\s*"[a-zA-Z0-9]+"\s*:\s*.+$/.test(e)&&(h[l]=h[l].replace(/(\s*)"([a-zA-Z0-9]+)"\s?(:\s*.+)$/,"$1$2$3")),h[l]=h[l].replace(/(.*)\[\s+{$/,"$1Array<{").replace(/(.*)}\s*].*$/,"$1}>")}),i.some(e=>{const l=Object.prototype.toString.call(e);if(l==="[object RegExp]")return e.test(o.type);if(l==="[object String]")return e===o.type})?h.slice(1,-1).join(`
2
+ `);return h.forEach((e,l)=>{var D;const g=new RegExp('(?<space>\\s*)"(?<name>[a-zA-Z0-9]+)"\\s?:\\s*"(?<desc>.*)".*$');if(g.test(e)){const{space:b,name:F,desc:T}=((D=g.exec(e))==null?void 0:D.groups)||{},v=(F||"").trim(),L=(T||"").trim(),M=a.filter(P=>(P.name||"").trim()+(P.title||"").trim()===v+L);if(M.length>=1){const[{type:P}]=M,R=o.required?"?":"",u=L?` // ${L}`:"";h[l]=e.replace(g,`${b+F+R}: ${w(P)};${u}`)}}/\s*"[a-zA-Z0-9]+"\s*:\s*.+$/.test(e)&&(h[l]=h[l].replace(/(\s*)"([a-zA-Z0-9]+)"\s?(:\s*.+)$/,"$1$2$3")),h[l]=h[l].replace(/(.*)\[\s+{$/,"$1Array<{").replace(/(.*)}\s*].*$/,"$1}>")}),i.some(e=>{const l=Object.prototype.toString.call(e);if(l==="[object RegExp]")return e.test(o.type);if(l==="[object String]")return e===o.type})?h.slice(1,-1).join(`
3
3
  `):[` ${o.name}${o.required?"":"?"}: {${this._getDesc(o)}`,...h.slice(1,-1).map(e=>` ${e}`)," }"].join(`
4
- `)}else return` ${o.name}${o.required?"":"?"}: ${w(o.type)};${this._getDesc(o)}`})}}),p=require("fs"),m=require("path"),c=require("chalk");y.interceptors.response.use(a=>{var n,i;return(i=(n=a.data)==null?void 0:n.head)!=null&&i.successful?a:Promise.reject(a)},a=>{throw a});const O=class{constructor(n){this.config={api:"",creatBaseFile:!0,customMethodName:"",projectId:void 0,branchId:void 0,methodId:void 0,outputPath:"",outputDirName:"",apiBaseName:"",ignoreParamsDTO:[],deleteParentDTO:[]},this.apiList=[],this.enums=[],Object.assign(this.config,n),this.getApiData()}getApiData(){return N(this,null,function*(){const{api:n,branchId:i,projectId:d,outputDirName:t,outputPath:r,methodId:o,creatBaseFile:h}=this.config;try{const{data:s}=yield y.get(`${n}/api/project/getProjectWithBranchById?id=${d}`);this.config.outputPath=m.join(process.cwd(),r,t||s.body.name);const e=s.body.branchList.find(g=>g.id===i);if(e)console.log(c.blueBright(`【info】正在使用 branchName: ${e.name} branchId: ${i} methodId: ${o}`));else throw c.red(`【error】branchId ${i} 不存在`);const l=yield y.get(`${n}/api/method/getMethodById?id=${o}`);this.apiList=[l.data.body]}catch(s){console.log(c.red("【error】: 接口获取异常")),console.log(s);return}try{yield this.checkApiOutputDir()}catch(s){console.log(c.red("【error】: 检查输出目录异常")),console.log(s);return}h&&(yield this.creatBaseFile());try{yield this.createFile()}catch(s){console.log(c.red("【error】: createFile 异常")),console.log(s)}})}checkApiOutputDir(){const{outputPath:n}=this.config;console.log(c.blueBright(`【info】输出目录 ${n}`));try{p.statSync(n,{bigint:!0})}catch(i){p.mkdirSync(n,{recursive:!0})}}creatBaseFile(){return N(this,null,function*(){const{outputPath:n}=this.config,i=m.join(__dirname,"../template/api"),d=p.readdirSync(i),t=p.readdirSync(n);for(const r of d)if(!t.includes(r))try{const o=p.readFileSync(m.join(i,r));p.writeFileSync(m.join(n,r),o)}catch(o){console.log(c.red("【error】: 基础文件生成异常")),console.log(o)}})}createFile(){return N(this,null,function*(){const{apiBaseName:n,outputPath:i,customMethodName:d}=this.config;this.apiList.forEach(t=>{var L,P,R;const r=u=>u.replace(/(-[a-z])|(^[a-z])/g,f=>f.replace("-","").toLocaleUpperCase()),o=t.path.startsWith("/")?t.path:`/${t.path}`,h=n.startsWith("/")?n:`/${n}`,s=new RegExp(`(${h})?(/)?(?<apiDirName>[a-zA-Z0-9_]+)/.*$`),{apiDirName:e}=((L=s.exec(o))==null?void 0:L.groups)||{},l=d||t.name,g=r(`${e}-`+l);try{p.statSync(m.join(i,e)).isDirectory()}catch(u){p.mkdirSync(m.join(i,e))}let D="";try{D=p.readFileSync(m.join(i,e,"models.ts")).toString()}catch(u){p.writeFileSync(m.join(i,`./${e}/models.ts`),"")}let b=[],F=[];try{const u=q.getInterface({list:t.paramList||[],config:this.config});b=(P=t.paramList)!=null&&P.length&&u.length?[D?"":"/* ************************************************ */",`/** ${t.title} RequestModel */`,`export interface ${g}ReqModel {`,...u,"}",""]:[];const f=q.getInterface({list:t.returnList||[],config:this.config});F=(R=t.returnList)!=null&&R.length&&f.length?[b.length?"":"/* ************************************************ */",`/** ${t.title} ResponseModel */`,`export interface ${g}ResModel {`,...f,"}",""]:[]}catch(u){throw console.log(c.red(`【error】类型生成失败 projectId: ${this.config.projectId} methodId: ${t.id} path: ${o}`)),c.red(u)}D.includes(`export interface ${g}ReqModel {`)?console.log(c.yellowBright(`【warning】./${e}/models.ts 已存在 ${g}ReqModel`)):b.length&&(p.appendFileSync(m.join(i,`./${e}/models.ts`),b.join(`
4
+ `)}else return` ${o.name}${o.required?"":"?"}: ${w(o.type)};${this._getDesc(o)}`})}}),p=require("fs"),m=require("path"),c=require("chalk");y.interceptors.response.use(a=>{var n,i;return(i=(n=a.data)==null?void 0:n.head)!=null&&i.successful?a:Promise.reject(a)},a=>{throw a});const O=class{constructor(n){this.config={api:"",creatBaseFile:!0,customMethodName:"",projectId:void 0,branchId:void 0,methodId:void 0,outputPath:"",outputDirName:"",apiBaseName:"",ignoreParamsDTO:[],deleteParentDTO:[]},this.apiList=[],this.enums=[],Object.assign(this.config,n),this.getApiData()}getApiData(){return N(this,null,function*(){const{api:n,branchId:i,projectId:d,outputDirName:t,outputPath:r,methodId:o,creatBaseFile:h}=this.config;try{const{data:s}=yield y.get(`${n}/api/project/getProjectWithBranchById?id=${d}`);this.config.outputPath=m.join(process.cwd(),r,t||s.body.name);const e=s.body.branchList.find(g=>g.id===i);if(e)console.log(c.blueBright(`【info】正在使用 branchName: ${e.name} branchId: ${i} methodId: ${o}`));else throw c.red(`【error】branchId ${i} 不存在`);const l=yield y.get(`${n}/api/method/getMethodById?id=${o}`);this.apiList=[l.data.body]}catch(s){console.log(c.red("【error】: 接口获取异常")),console.log(s);return}try{yield this.checkApiOutputDir()}catch(s){console.log(c.red("【error】: 检查输出目录异常")),console.log(s);return}h&&(yield this.creatBaseFile());try{yield this.createFile()}catch(s){console.log(c.red("【error】: createFile 异常")),console.log(s)}})}checkApiOutputDir(){const{outputPath:n}=this.config;console.log(c.blueBright(`【info】输出目录 ${n}`));try{p.statSync(n,{bigint:!0})}catch(i){p.mkdirSync(n,{recursive:!0})}}creatBaseFile(){return N(this,null,function*(){const{outputPath:n}=this.config,i=m.join(__dirname,"../template/api"),d=p.readdirSync(i),t=p.readdirSync(n);for(const r of d)if(!t.includes(r))try{const o=p.readFileSync(m.join(i,r));p.writeFileSync(m.join(n,r),o)}catch(o){console.log(c.red("【error】: 基础文件生成异常")),console.log(o)}})}createFile(){return N(this,null,function*(){const{apiBaseName:n,outputPath:i,customMethodName:d}=this.config;this.apiList.forEach(t=>{var M,P,R;const r=u=>u.replace(/(-[a-z])|(^[a-z])/g,f=>f.replace("-","").toLocaleUpperCase()),o=t.path.startsWith("/")?t.path:`/${t.path}`,h=n.startsWith("/")?n:`/${n}`,s=new RegExp(`(${h})?(/)?(?<apiDirName>[a-zA-Z0-9_]+)/.*$`),{apiDirName:e}=((M=s.exec(o))==null?void 0:M.groups)||{},l=d||t.name,g=r(`${e}-`+l);try{p.statSync(m.join(i,e)).isDirectory()}catch(u){p.mkdirSync(m.join(i,e))}let D="";try{D=p.readFileSync(m.join(i,e,"models.ts")).toString()}catch(u){p.writeFileSync(m.join(i,`./${e}/models.ts`),"")}let b=[],F=[];try{const u=q.getInterface({list:t.paramList||[],config:this.config});b=(P=t.paramList)!=null&&P.length&&u.length?[D?"":"/* ************************************************ */",`/** ${t.title} RequestModel */`,`export interface ${g}ReqModel {`,...u,"}",""]:[];const f=q.getInterface({list:t.returnList||[],config:this.config});F=(R=t.returnList)!=null&&R.length&&f.length?[b.length?"":"/* ************************************************ */",`/** ${t.title} ResponseModel */`,`export interface ${g}ResModel {`,...f,"}",""]:[]}catch(u){throw console.log(c.red(`【error】类型生成失败 projectId: ${this.config.projectId} methodId: ${t.id} path: ${o}`)),c.red(u)}D.includes(`export interface ${g}ReqModel {`)?console.log(c.yellowBright(`【warning】./${e}/models.ts 已存在 ${g}ReqModel`)):b.length&&(p.appendFileSync(m.join(i,`./${e}/models.ts`),b.join(`
5
5
  `)),console.log(c.greenBright(`【success】./${e}/models.ts 成功添加 ${g}ReqModel`))),D.includes(`export interface ${g}ResModel {`)?console.log(c.yellowBright(`【warning】./${e}/models.ts 已存在 ${g}ResModel`)):F.length&&(p.appendFileSync(m.join(i,`./${e}/models.ts`),F.join(`
6
- `)),console.log(c.greenBright(`【success】./${e}/models.ts 成功添加 ${g}ResModel`)));const M=[t.title&&` /** ${t.title} */`,` ${l}(${b.length?`params: M.${g}ReqModel`:""}) {`,` return axios.${t.method.toLowerCase()}<ApiResponse<${F.length?`M.${g}ResModel`:"any"}>>(`,` \`\${ApiPrefix}${o}\`,`,b.length&&` ${["post","put","patch"].includes(t.method.toLowerCase())?"params":"{ params }"},`," );"," },"].filter(Boolean);/^[a-zA-Z]+$/.test((t.method||"").trim())||console.log(c.yellowBright(`【warning】接口请求类型异常,请手动补全 method:${t.method} path: ${o} methodId: ${this.config.methodId} projectId: ${this.config.projectId}`));try{const u=p.readFileSync(m.join(i,e,"api.ts")).toString(),f=u.split(`
7
- `);if(u.includes(` ${l}(`)){const B=f.findIndex(S=>S.includes(` ${l}(`)),A=f.findIndex((S,_)=>_>B&&S===" },");console.log(c.yellowBright([`【warning】./${e}/api.ts 已存在api`,...f.slice(B,A+1).map(S=>` ${S}`)].join(`
8
- `))),console.log(c.yellowBright(`【warning】当前需要生成的 path 为 ${o}, methodName 为 ${l}`))}else f.splice(f.map(B=>B.includes("}")).lastIndexOf(!0),0,M.join(`
6
+ `)),console.log(c.greenBright(`【success】./${e}/models.ts 成功添加 ${g}ResModel`)));const L=[t.title&&` /** ${t.title} */`,` ${l}(${b.length?`params: M.${g}ReqModel`:""}) {`,` return axios.${t.method.toLowerCase()}<ApiResponse<${F.length?`M.${g}ResModel`:"any"}>>(`,` \`\${ApiPrefix}${o}\`,`,b.length&&` ${["post","put","patch"].includes(t.method.toLowerCase())?"params":"{ params }"},`," );"," },"].filter(Boolean);/^[a-zA-Z]+$/.test((t.method||"").trim())||console.log(c.yellowBright(`【warning】接口请求类型异常,请手动补全 method:${t.method} path: ${o} methodId: ${this.config.methodId} projectId: ${this.config.projectId}`));try{const u=p.readFileSync(m.join(i,e,"api.ts")).toString(),f=u.split(`
7
+ `);if(!u.includes("import"))throw Error("null");if(u.includes(` ${l}(`)){const B=f.findIndex(S=>S.includes(` ${l}(`)),A=f.findIndex((S,_)=>_>B&&S===" },");console.log(c.yellowBright([`【warning】./${e}/api.ts 已存在api`,...f.slice(B,A+1).map(S=>` ${S}`)].join(`
8
+ `))),console.log(c.yellowBright(`【warning】当前需要生成的 path 为 ${o}, methodName 为 ${l}`))}else f.splice(f.map(B=>B.includes("}")).lastIndexOf(!0),0,L.join(`
9
9
  `)),p.writeFileSync(m.join(i,`./${e}/api.ts`),f.join(`
10
- `)),console.log(c.greenBright(`【success】./${e}/api.ts 成功添加 ${l}`))}catch(u){p.writeFileSync(m.join(i,`./${e}/api.ts`),["import axios from 'axios';","","import * as M from './models';","import { ApiResponse } from '../responseModel';","import { ApiPrefix } from '../apiPrefix';","","export * from './models';","",`export const ${r(e)}Api = {`,...M,"};",""].join(`
10
+ `)),console.log(c.greenBright(`【success】./${e}/api.ts 成功添加 ${l}`))}catch(u){p.writeFileSync(m.join(i,`./${e}/api.ts`),["import { axios, ApiResponse } from '../axios';","","import * as M from './models';","import { ApiPrefix } from '../apiPrefix';","","export * from './models';","",`export const ${r(e)}Api = {`,...L,"};",""].join(`
11
11
  `)),console.log(c.greenBright(`【success】./${e}/api.ts 成功添加 ${l}`));const f=p.readFileSync(m.join(i,"index.ts")).toString();if(!f.includes(`export * from './${e}/api'`)){const B=f.split(`
12
12
  `);B.push(`export * from './${e}/api';`);const A=B.slice(1).filter(Boolean);A.sort((S,_)=>S.localeCompare(_)),p.writeFileSync(m.join(i,"index.ts"),[B[0]||"","",...A,""].join(`
13
13
  `))}}})})}},j=require("fs"),$=require("path"),{program:I}=require("commander"),x=require("chalk");I.name("sy-api-pro").version(require($.resolve(__dirname,"../package.json")).version),I.command("init").description("初始化配置文件").option("-p, --path <char>","","./src/apis").action((a,n,i)=>{const d=$.join(process.cwd(),a.path),t=$.join(d,".api-config.ts");try{if(j.existsSync(d)||j.mkdirSync(d),j.existsSync(t))return console.log(x.yellowBright(`【warning】: ${t} 配置文件已存在`));const r=j.readFileSync($.join(__dirname,"../template/config/.api-config.ts"));j.writeFileSync(t,r),console.log(x.greenBright(`【success】: 配置文件已生成, 路径:${t}`))}catch(r){console.log(x.red("【error】: 配置文件生成异常")),console.log(r)}}),I.command("create").description("生成api文件及类型定义").requiredOption("-i, --id <id>","methodId").option("-n, --name <name>","customMethodName").requiredOption("--config <filePath>","configFilePath").requiredOption("--project-id <id>","projectId").action((a,n,i)=>{var e;const{id:d,name:t,config:r,projectId:o}=a;if(!d||!/^\d+$/.test(d))throw x.red("【error】请传入正确的 id");const h=require($.resolve(process.cwd(),r)),s=(h.projects||[]).find(l=>+l.projectId==+o);if(s){if(!s.branchId)throw x.red("【error】请传入正确的 branchId");if(!h.api)throw x.red("【error】请传入正确的 api");new O({api:h.api,creatBaseFile:(e=s.creatBaseFile)!=null?e:!0,methodId:d,customMethodName:t,outputPath:h.outputPath||"./src/apis",projectId:s.projectId,branchId:+s.branchId,outputDirName:s.outputDirName||"",apiBaseName:s.apiBaseName||"",ignoreParamsDTO:s.ignoreParamsDTO||[],deleteParentDTO:s.deleteParentDTO||[]})}else console.log(x.red(`【error】config 配置文件中 projects 未包含传入的 projectId ${o}`))}),I.parse()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sy-api-pro",
3
- "version": "0.1.10",
3
+ "version": "1.0.1",
4
4
  "main": "./bin/index.ts",
5
5
  "types": "./bin/model.d.ts",
6
6
  "bin": {
@@ -21,23 +21,22 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "build": "vite build",
24
- "api": "ts-node src/index.ts create --config ./src/.api-config.ts --project-id 804",
25
24
  "api2": "ts-node src/index.ts create --config ./src/.api-config.ts --project-id 801 -i 1758417",
25
+ "api3": "ts-node src/index.ts create --config ./src/.api-config.ts --project-id 801 -i 199003",
26
26
  "test:dist-init": "ts-node bin/index.ts init",
27
- "test:dist-create": "ts-node bin/index.ts create --config ./src/.api-config.ts --project-id 804",
28
27
  "test:dist-create2": "ts-node bin/index.ts create --config ./src/.api-config.ts --project-id 801"
29
28
  },
30
29
  "description": "...",
31
30
  "dependencies": {
32
- "@types/node": "^18.15.11",
33
- "axios": "^1.3.5",
31
+ "@types/node": "^20.1.5",
32
+ "axios": "^1.4.0",
34
33
  "chalk": "^4.1.2",
35
- "commander": "^10.0.0",
34
+ "commander": "^10.0.1",
36
35
  "ts-node": "^10.9.1",
37
36
  "typescript": "^5.0.4"
38
37
  },
39
38
  "devDependencies": {
40
39
  "rollup-plugin-terser": "^7.0.2",
41
- "vite": "^4.2.1"
40
+ "vite": "^4.3.6"
42
41
  }
43
42
  }
@@ -0,0 +1,32 @@
1
+ import Axios, { AxiosResponse } from 'axios';
2
+
3
+ import { ApiPrefix } from './apiPrefix';
4
+
5
+ export interface ApiResponse<T> {
6
+ // success: boolean;
7
+ // message: string;
8
+ // messageCode: string;
9
+ data: T;
10
+ [key: string]: any;
11
+ }
12
+
13
+ export const axios = Axios.create({
14
+ // 传入axios的配置项
15
+ });
16
+
17
+ axios.interceptors.request.use((config) => {
18
+ // ...
19
+ return config;
20
+ }, error => Promise.reject(error));
21
+
22
+ axios.interceptors.response.use((response: AxiosResponse) => {
23
+ if (!response.config.url?.startsWith(ApiPrefix)) return response;
24
+ //
25
+ // if (response.data?.success) {
26
+ // return response;
27
+ // }
28
+ console.log(response.data);
29
+ return Promise.reject(response);
30
+ }, (error) => {
31
+ console.error(error);
32
+ });
@@ -1 +1,3 @@
1
- import './interceptors';
1
+ import './axios';
2
+
3
+ export * from './index/api';
@@ -1,7 +1,7 @@
1
1
  import { ConfigModels } from 'sy-api-pro';
2
2
 
3
3
  const config: ConfigModels = {
4
- outputPath: null, // 路径相对工程根目录【默认:'./src/apis'】
4
+ // outputPath: null, // 路径相对工程根目录【默认:'./src/apis'】
5
5
  api: 'http://xxx.com', //
6
6
  projects: [
7
7
  {
@@ -1,19 +0,0 @@
1
- import axios, { AxiosResponse } from 'axios';
2
-
3
- import { ApiPrefix } from './apiPrefix';
4
-
5
- axios.interceptors.request.use(config => {
6
- return config;
7
- }, error => Promise.reject(error));
8
-
9
- axios.interceptors.response.use((response: AxiosResponse) => {
10
- if (!response.config.url?.startsWith(ApiPrefix)) return response;
11
- //
12
- // if (response.data?.success) {
13
- // return response;
14
- // }
15
- console.log(response.data);
16
- return Promise.reject(response);
17
- }, (error) => {
18
- console.error(error);
19
- });
@@ -1,7 +0,0 @@
1
- export interface ApiResponse<T> {
2
- // success: boolean;
3
- // message: string;
4
- // messageCode: string;
5
- data: T;
6
- [key: string]: any;
7
- }