Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/core/lib/cache/drivers/inMemory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ export class InMemoryDriver implements CacheDriver {

async get<T>(key: string): Promise<T> {
await this.initialiseModules();
const cacheKey = `${this.options.prefix}:::${key}`;
return this.client.get(cacheKey);
const value = await this.client.get(`${this.options.prefix}:::${key}`);
if (!value) return null;
try {
return JSON.parse(value);
} catch (e) {
return value;
}
}

async set(
Expand Down
1 change: 0 additions & 1 deletion packages/core/lib/console/inquirer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class Inquirer {
const answers = await prompt([
{ name: 'question', message: question, type: 'input' },
]);
console.log(answers);
return answers['question'];
}

Expand Down
2 changes: 0 additions & 2 deletions packages/core/lib/mailer/providers/mailgun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export class MailgunProvider implements BaseProvider {
})),
});

console.log(report);

return;
}

Expand Down
3 changes: 0 additions & 3 deletions packages/core/lib/rest/http-server/route-explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ export class RouteExplorer {

if (!pathMethod) return;

console.log(instance.constructor);
console.log(controllerKey, methodPath, pathMethod, key);

const fullHttpPath = joinRoute(controllerKey, methodPath);
return { method: pathMethod, path: fullHttpPath };
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/lib/scheduler/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './metadata.js';
export * from './worker.js';
export * from './decorator.js';
export * from './schedule.js';
export * from './frequency.js';
1 change: 0 additions & 1 deletion packages/core/lib/scheduler/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class SchedulerRegistry {

options?.name && schedule.name(options.name);
schedule.cron(cronExpression);
console.log(this.schedules);
}

static register(name: string, schedule: Schedule): void {
Expand Down
18 changes: 0 additions & 18 deletions packages/core/lib/scheduler/worker.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/core/lib/storage/drivers/s3Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ export class S3Storage implements StorageDriver {
}

getStream(filePath: string): ReadStream {
console.log('file path ===> ', filePath);
throw new Error('Method not implemented.');
}

listDir(path: string): Promise<Record<string, any>> {
console.log(path);
throw new Error('Method not implemented.');
}

Expand Down Expand Up @@ -293,7 +291,6 @@ export class S3Storage implements StorageDriver {
params?: Record<string, any>,
): Promise<string> {
this.initialiseModules();
console.log(path, ttlInMins, params);
throw new Error('Method not implemented.');
}

Expand Down
2 changes: 0 additions & 2 deletions packages/core/lib/utils/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ export class Obj {

static hash(obj: Record<string, any>): string {
const sortedObj = this.sort(obj);
console.log(sortedObj);
const jsonString = JSON.stringify(sortedObj);
console.log(jsonString);
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intentjs/core",
"version": "0.1.59",
"version": "0.1.60",
"description": "Core module for Intent",
"repository": {
"type": "git",
Expand Down
Loading