@solidstarters/solid-core 1.2.3 → 1.2.5

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.
Files changed (40) hide show
  1. package/dist/config/{redis.options.d.ts → cache.options.d.ts} +1 -1
  2. package/dist/config/cache.options.d.ts.map +1 -0
  3. package/dist/config/cache.options.js +36 -0
  4. package/dist/config/cache.options.js.map +1 -0
  5. package/dist/config/common.config.d.ts +5 -4
  6. package/dist/config/common.config.d.ts.map +1 -1
  7. package/dist/config/common.config.js +0 -2
  8. package/dist/config/common.config.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/seeders/seed-data/solid-core-metadata.json +68 -2
  12. package/dist/services/file.service.d.ts +2 -0
  13. package/dist/services/file.service.d.ts.map +1 -1
  14. package/dist/services/file.service.js +14 -0
  15. package/dist/services/file.service.js.map +1 -1
  16. package/dist/services/rabbitmq-publisher.service.d.ts +3 -1
  17. package/dist/services/rabbitmq-publisher.service.d.ts.map +1 -1
  18. package/dist/services/rabbitmq-publisher.service.js +27 -26
  19. package/dist/services/rabbitmq-publisher.service.js.map +1 -1
  20. package/dist/services/rabbitmq-subscriber.service.d.ts +4 -2
  21. package/dist/services/rabbitmq-subscriber.service.d.ts.map +1 -1
  22. package/dist/services/rabbitmq-subscriber.service.js +20 -25
  23. package/dist/services/rabbitmq-subscriber.service.js.map +1 -1
  24. package/dist/solid-core-cli.module.js +2 -2
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +1 -1
  27. package/src/config/cache.options.ts +36 -0
  28. package/src/config/common.config.ts +6 -2
  29. package/src/index.ts +1 -1
  30. package/src/seeders/seed-data/solid-core-metadata.json +69 -3
  31. package/src/services/file.service.ts +13 -4
  32. package/src/services/rabbitmq-publisher.service.ts +30 -9
  33. package/src/services/rabbitmq-subscriber.service.ts +23 -14
  34. package/src/solid-core-cli.module.ts +1 -1
  35. package/.env +0 -114
  36. package/dist/config/redis.options.d.ts.map +0 -1
  37. package/dist/config/redis.options.js +0 -22
  38. package/dist/config/redis.options.js.map +0 -1
  39. package/solidstarters-solid-core-1.2.5.tgz +0 -0
  40. package/src/config/redis.options.ts +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidstarters/solid-core",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,36 @@
1
+ import { CacheModuleAsyncOptions } from '@nestjs/cache-manager';
2
+ import { ConfigModule, ConfigService } from '@nestjs/config';
3
+ import { redisStore } from 'cache-manager-redis-store';
4
+ import { isNumber } from 'class-validator';
5
+
6
+ export const RedisOptions: CacheModuleAsyncOptions = {
7
+ isGlobal: true,
8
+ imports: [ConfigModule],
9
+ useFactory: async (configService: ConfigService) => {
10
+ if (!isRedisConfigured(configService)) {
11
+ return {
12
+ ttl: 0
13
+ } // This defaults to in-memory cache
14
+ }
15
+ const store = await createRedisStore(configService);
16
+ return {
17
+ store: () => store,
18
+ };
19
+ },
20
+ inject: [ConfigService],
21
+ };
22
+
23
+ async function createRedisStore(configService: ConfigService<Record<string, unknown>, false>) {
24
+ return await redisStore({
25
+ socket: {
26
+ host: configService.get<string>('REDIS_HOST'),
27
+ port: parseInt(configService.get<string>('REDIS_PORT')!),
28
+ },
29
+ });
30
+ }
31
+
32
+ function isRedisConfigured(configService: ConfigService): boolean {
33
+ const host = configService.get<string>('REDIS_HOST');
34
+ const port = configService.get<string>('REDIS_PORT');
35
+ return host && port && isNumber(parseInt(port));
36
+ }
@@ -36,9 +36,13 @@ export default registerAs('common', () => {
36
36
  awsS3Credentials: {
37
37
  S3_AWS_ACCESS_KEY: process.env.S3_AWS_ACCESS_KEY,
38
38
  S3_AWS_SECRET_KEY: process.env.S3_AWS_SECRET_KEY,
39
- S3_AWS_BUCKET_NAME: process.env.S3_AWS_BUCKET_NAME,
40
- S3_AWS_REGION_HOST: process.env.S3_AWS_REGION_HOST,
41
39
  S3_AWS_REGION_NAME: process.env.S3_AWS_REGION_NAME
42
40
  }
43
41
  };
44
42
  });
43
+
44
+ export interface AwsS3Config {
45
+ S3_AWS_ACCESS_KEY: string;
46
+ S3_AWS_SECRET_KEY: string;
47
+ S3_AWS_REGION_NAME: string;
48
+ }
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ export * from './commands/seed.command'
8
8
  export * from './config/app-builder.config'
9
9
  export * from './config/common.config'
10
10
  export * from './config/iam.config'
11
- export * from './config/redis.options'
11
+ export * from './config/cache.options'
12
12
 
13
13
  export * from './decorators/active-user.decorator'
14
14
  export * from './decorators/auth.decorator'
@@ -2539,7 +2539,40 @@
2539
2539
  "enableGlobalSearch": true,
2540
2540
  "create": true,
2541
2541
  "edit": true,
2542
- "delete": true
2542
+ "delete": true,
2543
+ "rowButtons": [
2544
+ {
2545
+ "attrs": {
2546
+ "className": "pi pi-cog",
2547
+ "label": ""
2548
+ },
2549
+ "action": {
2550
+ "title": "",
2551
+ "body": "",
2552
+ "confirmBtnLabel": "Generate Code",
2553
+ "cancelBtnLabel": "Cancel",
2554
+ "customComponent": "core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction",
2555
+ "customComponentIsSystem": true,
2556
+ "endpoint": ""
2557
+ }
2558
+ }
2559
+ ],
2560
+ "headerButtons": [
2561
+ {
2562
+ "attrs": {
2563
+ "className": "pi pi-cog",
2564
+ "label": ""
2565
+ },
2566
+ "action": {
2567
+ "title": "",
2568
+ "body": "",
2569
+ "confirmBtnLabel": "Generate Code",
2570
+ "cancelBtnLabel": "Cancel",
2571
+ "customComponent": "GenerateModuleCode",
2572
+ "endpoint": ""
2573
+ }
2574
+ }
2575
+ ]
2543
2576
  },
2544
2577
  "children": [
2545
2578
  {
@@ -2698,7 +2731,40 @@
2698
2731
  "enableGlobalSearch": true,
2699
2732
  "create": true,
2700
2733
  "edit": true,
2701
- "delete": true
2734
+ "delete": true,
2735
+ "rowButtons": [
2736
+ {
2737
+ "attrs": {
2738
+ "className": "pi pi-cog",
2739
+ "label": ""
2740
+ },
2741
+ "action": {
2742
+ "title": "",
2743
+ "body": "",
2744
+ "confirmBtnLabel": "Generate Code",
2745
+ "cancelBtnLabel": "Cancel",
2746
+ "customComponent": "core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction",
2747
+ "customComponentIsSystem": true,
2748
+ "endpoint": ""
2749
+ }
2750
+ }
2751
+ ],
2752
+ "headerButtons": [
2753
+ {
2754
+ "attrs": {
2755
+ "className": "pi pi-cog",
2756
+ "label": ""
2757
+ },
2758
+ "action": {
2759
+ "title": "",
2760
+ "body": "",
2761
+ "confirmBtnLabel": "Generate Code",
2762
+ "cancelBtnLabel": "Cancel",
2763
+ "customComponent": "GenerateModelCode",
2764
+ "endpoint": ""
2765
+ }
2766
+ }
2767
+ ]
2702
2768
  },
2703
2769
  "children": [
2704
2770
  {
@@ -3712,7 +3778,7 @@
3712
3778
  "attrs": {
3713
3779
  "name": "roles",
3714
3780
  "renderMode": "checkbox",
3715
- "inlineCreateAutoSave":"true",
3781
+ "inlineCreateAutoSave": "true",
3716
3782
  "renderModeCheckboxPreprocessor": "MenuItemMetadataRolesFormFieldPreprocessor",
3717
3783
  "inlineCreate": "true",
3718
3784
  "inlineCreateLayout": {
@@ -3,7 +3,7 @@ import * as fs from 'fs';
3
3
  // import * as AWS from 'aws-sdk';
4
4
  import { S3Client, PutObjectCommand, DeleteObjectCommand, ObjectCannedACL } from '@aws-sdk/client-s3';
5
5
  import { ConfigType } from '@nestjs/config';
6
- import commonConfig from '../config/common.config';
6
+ import commonConfig, { AwsS3Config } from '../config/common.config';
7
7
 
8
8
 
9
9
 
@@ -18,14 +18,13 @@ export class FileService {
18
18
  private readonly commonConfiguration: ConfigType<typeof commonConfig>,
19
19
 
20
20
  ) {
21
+ if (!this.isValidS3Config(this.commonConfiguration.awsS3Credentials)) { return }
21
22
  this.s3Client = new S3Client({
22
23
  region: this.commonConfiguration.awsS3Credentials.S3_AWS_REGION_NAME,
23
24
  credentials: {
24
25
  accessKeyId: this.commonConfiguration.awsS3Credentials.S3_AWS_ACCESS_KEY,
25
26
  secretAccessKey: this.commonConfiguration.awsS3Credentials.S3_AWS_SECRET_KEY,
26
27
  },
27
- // endpoint: `https://${process.env.S3_AWS_BUCKET_NAME}.s3.${process.env.S3_AWS_REGION_NAME}.amazonaws.com`, // Correct regional endpoint
28
-
29
28
  });
30
29
  }
31
30
 
@@ -84,6 +83,7 @@ export class FileService {
84
83
  }
85
84
 
86
85
  async copyToS3(filePath: string, ContentType: string, fileName: string, bucketName: string): Promise<string> {
86
+ this.checkIfS3ClientExists();
87
87
  try {
88
88
  // Read Image File TO Fetch Buffer
89
89
  const data = await this.readImageFile(filePath);
@@ -109,7 +109,12 @@ export class FileService {
109
109
  }
110
110
  }
111
111
 
112
+ private checkIfS3ClientExists() {
113
+ if (!this.s3Client) { throw new Error('S3 Client not initialized. Please check the S3 configuration'); }
114
+ }
115
+
112
116
  async copyToS3WithPublic(filePath: string, ContentType: string, fileName: string, bucketName: string): Promise<string> {
117
+ this.checkIfS3ClientExists();
113
118
  try {
114
119
  // Read Image File TO Fetch Buffer
115
120
  const data = await this.readImageFile(filePath);
@@ -136,7 +141,7 @@ export class FileService {
136
141
  }
137
142
 
138
143
  async deleteFromS3(fileName: string, bucketName: string): Promise<string> {
139
-
144
+ this.checkIfS3ClientExists();
140
145
  const params = {
141
146
  Bucket: bucketName, // your S3 bucket name
142
147
  Key: fileName // the name of the file you want to delete
@@ -146,4 +151,8 @@ export class FileService {
146
151
  const response = await this.s3Client.send(command);
147
152
  return fileName
148
153
  }
154
+
155
+ private isValidS3Config(config: AwsS3Config): boolean {
156
+ return !!config.S3_AWS_ACCESS_KEY && !!config.S3_AWS_SECRET_KEY && !!config.S3_AWS_REGION_NAME;
157
+ }
149
158
  }
@@ -1,30 +1,50 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
- import { Injectable, Logger } from '@nestjs/common';
1
+ import { Logger } from '@nestjs/common';
3
2
  import * as amqp from 'amqplib';
3
+ import { v4 as uuidv4 } from 'uuid';
4
+ import { QueuesModuleOptions } from "../interfaces";
4
5
  import { QueueMessage, QueuePublisher } from '../interfaces/mq';
5
6
  import { MqMessageQueueService } from './mq-message-queue.service';
6
7
  import { MqMessageService } from './mq-message.service';
7
- import { QueuesModuleOptions } from "../interfaces";
8
8
 
9
- @Injectable()
10
9
  export abstract class RabbitMqPublisher<T> implements QueuePublisher<T> { // TODO This can be made a generic type for better type visibility
11
10
  private readonly logger = new Logger(RabbitMqPublisher.name);
11
+ private readonly url: string;
12
+ private readonly serviceRole: string;
12
13
 
13
14
  constructor(
14
15
  protected readonly mqMessageService: MqMessageService,
15
16
  protected readonly mqMessageQueueService: MqMessageQueueService,
16
17
  ) {
17
- const url = process.env.QUEUES_RABBIT_MQ_URL;
18
- this.logger.debug(`RabbitMqPublisher instance created with options: ${JSON.stringify(this.options())} and url: ${url}`);
18
+ this.url = process.env.QUEUES_RABBIT_MQ_URL;
19
+ this.serviceRole = process.env.QUEUES_SERVICE_ROLE;
20
+ if (!this.url) {
21
+ this.logger.debug('RabbitMqPublisher url is not defined in the environment variables');
22
+ }
23
+ if (!this.serviceRole) {
24
+ this.logger.debug('Queue service Role is not defined in the environment variables');
25
+ }
26
+ this.logger.debug(`RabbitMqPublisher instance created with options: ${JSON.stringify(this.options())} and url: ${this.url}`);
19
27
  }
20
28
 
21
29
  abstract options(): QueuesModuleOptions;
22
30
 
23
31
  async publish(message: QueueMessage<T>): Promise<string> {
24
- const url = process.env.QUEUES_RABBIT_MQ_URL;
25
- this.logger.debug(`RabbitMqPublisher publishing with options: ${JSON.stringify(this.options())} and url: ${url}`);
32
+ if (!this.url) {
33
+ this.logger.error('RabbitMqPublisher url is not defined in the environment variables');
34
+ throw new Error('RabbitMqPublisher url is not defined in the environment variables');
35
+ }
36
+ if (!this.serviceRole) {
37
+ this.logger.error('Queue service Role is not defined in the environment variables');
38
+ throw new Error('Queue service Role is not defined in the environment variables');
39
+ }
40
+ if (this.serviceRole === 'subscriber') {
41
+ this.logger.error('Queue service Role is subscriber, cannot publish messages');
42
+ throw new Error('Queue service Role is subscriber, cannot publish messages');
43
+ }
44
+
45
+ this.logger.debug(`RabbitMqPublisher publishing with options: ${JSON.stringify(this.options())} and url: ${this.url}`);
26
46
 
27
- const connection = await amqp.connect(url);
47
+ const connection = await amqp.connect(this.url);
28
48
  // this.logger.debug(`RabbitMqPublisher publisher connected options: ${JSON.stringify(this.options())} and url: ${url}`);
29
49
 
30
50
  const channel = await connection.createChannel();
@@ -117,5 +137,6 @@ export abstract class RabbitMqPublisher<T> implements QueuePublisher<T> { // TOD
117
137
  }
118
138
 
119
139
  }
140
+
120
141
 
121
142
  }
@@ -1,41 +1,50 @@
1
- import { Injectable, Logger, OnModuleInit } from '@nestjs/common';
1
+ import { Logger, OnModuleInit } from '@nestjs/common';
2
2
  import * as amqp from 'amqplib';
3
+ import { QueuesModuleOptions } from "../interfaces";
3
4
  import { QueueMessage, QueueSubscriber } from '../interfaces/mq';
4
- import { MqMessageService } from './mq-message.service';
5
5
  import { MqMessageQueueService } from './mq-message-queue.service';
6
- import { QueuesModuleOptions } from "../interfaces";
6
+ import { MqMessageService } from './mq-message.service';
7
7
 
8
8
 
9
- @Injectable()
10
9
  export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscriber<T> { // TODO This can be made a generic type for better type visibility
11
10
  private readonly logger = new Logger(RabbitMqSubscriber.name);
11
+ private readonly url: string;
12
+ private readonly serviceRole: string;
12
13
 
13
14
  constructor(
14
15
  protected readonly mqMessageService: MqMessageService,
15
16
  protected readonly mqMessageQueueService: MqMessageQueueService,
16
17
  ) {
18
+ this.url = process.env.QUEUES_RABBIT_MQ_URL;
19
+ this.serviceRole = process.env.SERVICE_ROLE;
20
+ if (!this.url) {
21
+ this.logger.debug('RabbitMqPublisher url is not defined in the environment variables');
22
+ }
23
+ if (!this.serviceRole) {
24
+ this.logger.debug('Queue service Role is not defined in the environment variables');
25
+ }
26
+ this.logger.debug(`RabbitMqSubscriber instance created with options: ${JSON.stringify(this.options())} and url: ${this.url}`);
17
27
  }
18
28
 
19
29
  abstract subscribe(message: QueueMessage<T>);
20
30
 
21
31
  abstract options(): QueuesModuleOptions;
22
32
 
23
- // setReceiveHandler(receiveHandler: (message: any) => Promise<any>): void {
24
- // this.options.receive = receiveHandler; // Overwrite the default receive handler
25
- // }
26
-
27
33
  async onModuleInit(): Promise<void> {
28
34
  // we will start subscriber only if the current service role is subscriber.
29
- if (['both', 'subscriber'].includes(process.env.QUEUES_SERVICE_ROLE)) {
30
-
31
- const url = process.env.QUEUES_RABBIT_MQ_URL;
32
- if (!url) {
35
+ if (['both', 'subscriber'].includes(this.serviceRole)) {
36
+ if (!this.url) {
37
+ this.logger.error('RabbitMqPublisher url is not defined in the environment variables');
38
+ throw new Error('RabbitMqPublisher url is not defined in the environment variables');
39
+ }
40
+
41
+ if (!this.url) {
33
42
  this.logger.warn(`Unable to create RabbitMqSubscriber instance: ${JSON.stringify(this.options())} as rabbitmq url is not configured.`);
34
43
  return;
35
44
  }
36
45
 
37
46
  // this.logger.debug(`RabbitMqSubscriber instance created with options: ${JSON.stringify(this.options())} and url: ${url}`);
38
- const connection = await amqp.connect(url);
47
+ const connection = await amqp.connect(this.url);
39
48
  // this.logger.debug(`RabbitMqSubscriber connection established: ${JSON.stringify(this.options())} and url: ${url}`);
40
49
 
41
50
  const channel = await connection.createChannel();
@@ -104,7 +113,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
104
113
  {},
105
114
  );
106
115
 
107
- this.logger.debug(`RabbitMqSubscriber ready to consume messages: ${JSON.stringify(this.options())} and url: ${url}`);
116
+ this.logger.debug(`RabbitMqSubscriber ready to consume messages: ${JSON.stringify(this.options())} and url: ${this.url}`);
108
117
  }
109
118
 
110
119
  }
@@ -5,7 +5,7 @@ import { WinstonLoggerConfig } from './winston.logger';
5
5
  import { WinstonModule } from 'nest-winston';
6
6
  import { CacheModule } from '@nestjs/cache-manager';
7
7
  import { EventEmitterModule } from '@nestjs/event-emitter';
8
- import { RedisOptions } from './config/redis.options';
8
+ import { RedisOptions } from './config/cache.options';
9
9
  import { ConfigModule } from '@nestjs/config';
10
10
  import Joi from '@hapi/joi';
11
11
 
package/.env DELETED
@@ -1,114 +0,0 @@
1
- ENV=prod
2
- PORT=3000
3
-
4
- # - - - - - - - - - -
5
- # General
6
- # - - - - - - - - - -
7
- SOLID_APP_NAME=Example Solid App
8
- SOLID_APP_WEBSITE_URL=http://example.com
9
- SOLID_DYNAMIC_MODULES_TO_EXCLUDE=logicloop,address-master,solid-address-master,queues,rl-lead-middleware,srmd-tracker
10
-
11
- # Default database instance.
12
- DEFAULT_DATABASE_USER=oswald
13
- DEFAULT_DATABASE_PASSWORD=oswald
14
- DEFAULT_DATABASE_NAME=sss_new
15
- DEFAULT_DATABASE_PORT=5432
16
- DEFAULT_DATABASE_HOST=localhost
17
- DEFAULT_DATABASE_SYNCHRONIZE=true
18
- DEFAULT_DATABASE_LOGGING=true
19
-
20
- # Redis
21
- REDIS_HOST=localhost
22
- REDIS_PORT=6379
23
-
24
- # Queues
25
- RABBIT_MQ_URL=amqp://127.0.0.1:5672
26
- QUEUES_SERVICE_ROLE=both
27
-
28
- #Mongo Connection
29
- MONGO_DB_CONN_STRING=mongodb://localhost:27017/
30
-
31
- RADIX_MODEL_ASSETS_BUCKET_NAME=radix-model-assets-public
32
-
33
- # - - - - - - - - - -
34
- # App builder
35
- # - - - - - - - - - -
36
- # AB_MODULE_METADATA_SEEDER_FILES=module-metadata/solid-address-master/address-master-metadata.json,src/radix/seeders/seed-data/radix-payload-field-clean-v3.json,module-metadata/srmd-tracker/srmd-health-tracker-metadata.json
37
-
38
- # - - - - - - - - - -
39
- # IAM
40
- # - - - - - - - - - -
41
- IAM_PASSWORD_LESS_REGISTRATION=true
42
- IAM_PASSWORD_LESS_REGISTRATION_VALIDATE_WHAT=transactional
43
- IAM_ALLOW_PUBLIC_REGISTRATION=true
44
- IAM_ACTIVATE_USER_ON_REGISTRATION=true
45
- IAM_DEFAULT_ROLE=Admin
46
-
47
- # IAM > Google OAuth
48
- IAM_GOOGLE_OAUTH_CLIENT_ID=210036511862-8mv1rt3s63qj0v8jj3t0gf0l04r1alek.apps.googleusercontent.com
49
- IAM_GOOGLE_OAUTH_CLIENT_SECRET=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
50
- IAM_GOOGLE_OAUTH_CALLBACK_URL=http://localhost:3000/api/iam/google/connect/callback
51
- IAM_GOOGLE_OAUTH_REDIRECT_URL=http://localhost:3000/api/iam/google/dummy-redirect
52
- # GOOGLE_OAUTH_CALLBACK_URL=https://5f27-2a00-23c7-9d8c-9a01-c16c-56e2-7f20-6632.ngrok-free.app/api/iam/google/connect/callback
53
-
54
- # IAM > JWT...
55
- IAM_JWT_SECRET=234lkjsdf09283490238lsijeflkjsdklfjslkdjfs098234905238oikljsdflkjdsflkndscnm
56
- IAM_JWT_TOKEN_AUDIENCE=http://localhost:3000
57
- IAM_JWT_TOKEN_ISSUER=Solid Starters
58
- # (temporarily kept access token as 1 week & refresh token as 2 days. Need to change it to 20 mins & 7 days respectively)
59
- IAM_JWT_ACCESS_TOKEN_TTL=604800
60
- IAM_JWT_REFRESH_TOKEN_TTL=172800
61
-
62
- # - - - - - - - - - -
63
- # Common
64
- # - - - - - - - - - -
65
- # Email
66
- COMMON_EMAIL_PROVIDER=SMTPEmailService
67
- COMMON_EMAIL_SHOULD_QUEUE=true
68
- COMMON_EMAIL_TEMPLATE_SEEDER_FILES=solid-config/common-email-templates.json
69
- COMMON_SMS_PROVIDER=Msg91SMSService
70
- COMMON_SMS_SHOULD_QUEUE=true
71
- COMMON_SMS_TEMPLATE_SEEDER_FILES=solid-config/common-sms-templates.json
72
-
73
- # Common > smtpMail
74
- COMMON_SMTP_EMAIL_FROM="no-reply@logicloop.io"
75
- COMMON_SMTP_EMAIL_SMTP_HOST=email-smtp.ap-south-1.amazonaws.com
76
- COMMON_SMTP_EMAIL_SMTP_PORT=587
77
- COMMON_SMTP_EMAIL_USERNAME=AKIAXPOXASL4FQJ3OXWQ
78
- COMMON_SMTP_EMAIL_PASSWORD=BLqF+iPc9GvFpCIasGS3t2oAX9Z3b28eXXA/8yCAee8a
79
-
80
-
81
- # Common > SMS
82
- COMMON_MSG91_SMS_URL=https://control.msg91.com/api/v5
83
- COMMON_MSG91_SMS_API_KEY=426543ANpowsDBkj46698d2f2P1
84
- #COMMON_MSG91_SMS_TEMPLATE_ID=666bd246d6fc051047560595
85
-
86
- # Common > Whatsapp
87
- COMMON_WHATSAPP_API_URL=https://api.msg91.com/api/v5/whatsapp/whatsapp-outbound-message/bulk/
88
- COMMON_WHATSAPP_API_KEY=426543ANpowsDBkj46698d2f2P1
89
- COMMON_WHATSAPP_INTEGRATED_NUMBER=918928459284
90
-
91
- # Common > Short URL
92
- COMMON_SHORT_URL_API_URL=https://api.tinyurl.com
93
- COMMON_SHORT_URL_API_KEY=raIvcBAI4hQKfStV8J1zcDEbG8I1n8VmEauNLtXRM7J3oUWDn84gKMrzxEFb
94
- COMMON_SHORT_URL_DOMAIN=raheja.link
95
- COMMON_SHORT_URL_ENABLED=true
96
-
97
- # Lunaris config
98
- # Lunaris frontend URL
99
- LUNARIS_FRONTEND_URL=https://eoi.rahejalunaris.com
100
- # Cashfree config
101
- LUNARIS_CASHFREE_XCLIENT_ID=TEST102155697ec66b17c01fd31ae28596551201
102
- LUNARIS_CASHFREE_XCLIENT_SECRET=cfsk_ma_test_38ec3b8866e0352ebb53d9d3c99ce120_afb07648
103
- LUNARIS_CASHFREE_ENV=SANDBOX
104
- LUNARIS_GOLD_EOI_AMT=2.0
105
- LUNARIS_SILVER_EOI_AMT=1.0
106
- LUNARIS_GOLD_UPGRADE_EOI_AMT=1.0
107
- LUNARIS_CURENCY=INR
108
-
109
- #Aws
110
- S3_AWS_ACCESS_KEY=AKIAVY2PG4FCEPX4T3IY
111
- S3_AWS_SECRET_KEY=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
112
- S3_AWS_BUCKET_NAME=radix-dev-public
113
- S3_AWS_REGION_HOST=s3.ap-south-1.amazonaws.com
114
- S3_AWS_REGION_NAME=ap-south-1
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis.options.d.ts","sourceRoot":"","sources":["../../src/config/redis.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAIhE,eAAO,MAAM,YAAY,EAAE,uBAe1B,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedisOptions = void 0;
4
- const config_1 = require("@nestjs/config");
5
- const cache_manager_redis_store_1 = require("cache-manager-redis-store");
6
- exports.RedisOptions = {
7
- isGlobal: true,
8
- imports: [config_1.ConfigModule],
9
- useFactory: async (configService) => {
10
- const store = await (0, cache_manager_redis_store_1.redisStore)({
11
- socket: {
12
- host: configService.get('REDIS_HOST'),
13
- port: parseInt(configService.get('REDIS_PORT')),
14
- },
15
- });
16
- return {
17
- store: () => store,
18
- };
19
- },
20
- inject: [config_1.ConfigService],
21
- };
22
- //# sourceMappingURL=redis.options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis.options.js","sourceRoot":"","sources":["../../src/config/redis.options.ts"],"names":[],"mappings":";;;AACA,2CAA6D;AAC7D,yEAAuD;AAE1C,QAAA,YAAY,GAA4B;IACjD,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,CAAC,qBAAY,CAAC;IACvB,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAG,MAAM,IAAA,sCAAU,EAAC;YAC3B,MAAM,EAAE;gBACJ,IAAI,EAAE,aAAa,CAAC,GAAG,CAAS,YAAY,CAAC;gBAC7C,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAS,YAAY,CAAE,CAAC;aAC3D;SACJ,CAAC,CAAC;QACH,OAAO;YACH,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK;SACrB,CAAC;IACN,CAAC;IACD,MAAM,EAAE,CAAC,sBAAa,CAAC;CAC1B,CAAC"}
Binary file
@@ -1,20 +0,0 @@
1
- import { CacheModuleAsyncOptions } from '@nestjs/cache-manager';
2
- import { ConfigModule, ConfigService } from '@nestjs/config';
3
- import { redisStore } from 'cache-manager-redis-store';
4
-
5
- export const RedisOptions: CacheModuleAsyncOptions = {
6
- isGlobal: true,
7
- imports: [ConfigModule],
8
- useFactory: async (configService: ConfigService) => {
9
- const store = await redisStore({
10
- socket: {
11
- host: configService.get<string>('REDIS_HOST'),
12
- port: parseInt(configService.get<string>('REDIS_PORT')!),
13
- },
14
- });
15
- return {
16
- store: () => store,
17
- };
18
- },
19
- inject: [ConfigService],
20
- };