Skip to content

Commit

Permalink
add some logs to request of declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
etefaghian committed May 25, 2021
1 parent d7792f4 commit 3bd80ba
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion declarations/request/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const getRequestDeclarations = async (dirPath?: string) => {
| Ts interface: file://${__dirname}/declarations/request/schema.ts
-------------------------------------------------------------
`,
0xd257ff
0x0fffc3
)}
`);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { SourceFile, log } from "../../../../deps.ts";

export async function constructFVDetails(sourceFile: SourceFile) {
log.info(
sourceFile.getFilePath().split("functions")[1].replace(".fn.ts", "")
`in construction of details: ${sourceFile
.getFilePath()
.split("functions")[1]
.replace(".fn.ts", "")}`
);
const typePath = sourceFile.getFilePath().replace(".fn.", ".type.");
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { exObIterator } from "../tsMorph/exObIterator.ts";
import { getImpSourceFile } from "../tsMorph/getImpSourceFile.ts";
import { constructFVDetails } from "./constructFVDetails.ts";
import { SourceFile, SyntaxKind } from "../../../../deps.ts";
import { SourceFile, SyntaxKind, log } from "../../../../deps.ts";

/**
* @function
* construct doits from mod.ts files
* @param sourceFile
* @param _modelName
* @param modelName
*/
export async function constructFVDoits(
sourceFile: SourceFile,
_modelName: string
modelName: string
) {
log.info(`in construction of doits for model: ${modelName}`);
const objectIterator = sourceFile?.getFirstDescendantByKind(
SyntaxKind.ElementAccessExpression
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function constructFVModels(sourceFile: SourceFile) {
res.name = listOfFn.name;
(res.doits = await constructFVDoits(
getImpSourceFile(sourceFile, listOfFn.functionName!),
listOfFn.functionName!
listOfFn.name!
)),
results.push(res);
}
Expand Down
2 changes: 1 addition & 1 deletion declarations/schema/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const getSchemaDeclarations = async (dirPath?: string) => {
${rgb24(
`
-------------------------------------------------------------
| schema: file://${__dirname}/declarations/schema/schema.ts
| Ts interface: file://${__dirname}/declarations/schema/schema.ts
-------------------------------------------------------------
`,
0xadfc03
Expand Down

0 comments on commit 3bd80ba

Please sign in to comment.