Skip to content

Commit 94359e9

Browse files
fix: update chitragupta module to use double quotes and ensure logger.ts has consistent import style
fix: modify device cache to store live response data correctly
1 parent 981aa5d commit 94359e9

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
declare module 'chitragupta' {
2-
interface FormatterOptions {
3-
level: string;
4-
message: string;
5-
meta: any;
6-
}
7-
8-
export class Chitragupta {
9-
static jsonLogFormatter(options: FormatterOptions): string;
10-
}
11-
}
1+
declare module "chitragupta" {
2+
interface FormatterOptions {
3+
level: string;
4+
message: string;
5+
meta: any;
6+
}
7+
8+
export class Chitragupta {
9+
static jsonLogFormatter(options: FormatterOptions): string;
10+
}
11+
}

src/lib/chitragupta-logger/logger.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as winston from 'winston';
2-
import { TransformableInfo } from 'logform';
3-
import { Chitragupta } from 'chitragupta';
1+
import * as winston from "winston";
2+
import { TransformableInfo } from "logform";
3+
import { Chitragupta } from "chitragupta";
44

55
interface ChitraguptaOptions {
66
level: string;
@@ -14,12 +14,12 @@ const jsonLogFormatter = winston.format.printf(
1414

1515
const options: ChitraguptaOptions = {
1616
level,
17-
message: message as string,
17+
message: message as string,
1818
meta,
1919
};
2020

2121
return Chitragupta.jsonLogFormatter(options);
22-
}
22+
},
2323
);
2424

2525
const logger: winston.Logger = winston.createLogger({
@@ -30,4 +30,4 @@ const logger: winston.Logger = winston.createLogger({
3030
],
3131
});
3232

33-
export default logger;
33+
export default logger;

src/lib/device-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function getDevicesAndBrowsers(
5858
}
5959

6060
cache = {
61-
[type]: liveRes,
61+
[type]: liveRes.data,
6262
};
6363
fs.writeFileSync(CACHE_FILE, JSON.stringify(cache), "utf8");
6464

0 commit comments

Comments
 (0)