@solidxai/core 0.1.10-beta.3 → 0.1.10-beta.4
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/dist/controllers/action-metadata.controller.js +1 -1
- package/dist/controllers/action-metadata.controller.js.map +1 -1
- package/dist/controllers/facebook-authentication.controller.js +1 -1
- package/dist/controllers/facebook-authentication.controller.js.map +1 -1
- package/dist/controllers/google-authentication.controller.js +1 -1
- package/dist/controllers/google-authentication.controller.js.map +1 -1
- package/dist/controllers/menu-item-metadata.controller.js +1 -1
- package/dist/controllers/menu-item-metadata.controller.js.map +1 -1
- package/dist/controllers/microsoft-authentication.controller.js +1 -1
- package/dist/controllers/microsoft-authentication.controller.js.map +1 -1
- package/dist/controllers/mq-message-queue.controller.js +1 -1
- package/dist/controllers/mq-message-queue.controller.js.map +1 -1
- package/dist/controllers/mq-message.controller.js +1 -1
- package/dist/controllers/mq-message.controller.js.map +1 -1
- package/dist/controllers/view-metadata.controller.js +1 -1
- package/dist/controllers/view-metadata.controller.js.map +1 -1
- package/dist/entities/chatter-message-details.entity.d.ts.map +1 -1
- package/dist/entities/chatter-message-details.entity.js +0 -1
- package/dist/entities/chatter-message-details.entity.js.map +1 -1
- package/dist/helpers/field-crud-managers/BigIntFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.js.map +1 -1
- package/dist/helpers/module-metadata-helper.service.js.map +1 -1
- package/dist/jobs/database/chatter-queue-subscriber-database.service.d.ts.map +1 -1
- package/dist/jobs/database/chatter-queue-subscriber-database.service.js +3 -3
- package/dist/jobs/database/chatter-queue-subscriber-database.service.js.map +1 -1
- package/dist/jobs/database/trigger-mcp-client-subscriber-database.service.js.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.d.ts.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.js +3 -3
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.js.map +1 -1
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.d.ts.map +1 -1
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.js +3 -3
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.js.map +1 -1
- package/dist/repository/security-rule.repository.js.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +13 -2
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +5 -5
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts +6 -3
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +23 -35
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/csv.service.js.map +1 -1
- package/dist/services/dashboard.service.js.map +1 -1
- package/dist/services/database/database-bootstrap.service.js.map +1 -1
- package/dist/services/excel.service.js.map +1 -1
- package/dist/services/export-transaction.service.js.map +1 -1
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/fixtures.service.js.map +1 -1
- package/dist/services/import-transaction.service.js.map +1 -1
- package/dist/services/list-of-values.service.js.map +1 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +3 -13
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/queues/database-publisher.service.js +3 -3
- package/dist/services/queues/database-publisher.service.js.map +1 -1
- package/dist/services/queues/database-subscriber.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-publisher.service.js +3 -3
- package/dist/services/queues/rabbitmq-publisher.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.js.map +1 -1
- package/dist/services/queues/redis-publisher.service.d.ts.map +1 -1
- package/dist/services/queues/redis-publisher.service.js +4 -1
- package/dist/services/queues/redis-publisher.service.js.map +1 -1
- package/dist/services/queues/redis-subscriber.service.js.map +1 -1
- package/dist/services/role-metadata.service.js.map +1 -1
- package/dist/services/scheduled-jobs/scheduler.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +58 -8
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +21 -4
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/services/sms/TwilioSMSService.js.map +1 -1
- package/dist/services/solid-introspect.service.js.map +1 -1
- package/dist/services/user-activity-history.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +17 -2
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
- package/dist/subscribers/security-rule.subscriber.d.ts.map +1 -1
- package/dist/subscribers/security-rule.subscriber.js.map +1 -1
- package/dist/subscribers/view-metadata.subscriber.js.map +1 -1
- package/dist/testing/core/testing-engine.js.map +1 -1
- package/dist/testing/reporter/webhook-reporter.js.map +1 -1
- package/dist-tests/api/authenticate.spec.js +119 -0
- package/dist-tests/api/authenticate.spec.js.map +1 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
- package/dist-tests/api/ping.spec.js +21 -0
- package/dist-tests/api/ping.spec.js.map +1 -0
- package/dist-tests/helpers/auth.js +41 -0
- package/dist-tests/helpers/auth.js.map +1 -0
- package/dist-tests/helpers/env.js +11 -0
- package/dist-tests/helpers/env.js.map +1 -0
- package/docs/grouping-enhancements.md +89 -0
- package/docs/java-spring/README.md +3 -0
- package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
- package/docs/seed-changes.md +65 -0
- package/docs/test-data-workflow.md +200 -0
- package/docs/type-declaration-import-issue.md +24 -0
- package/package.json +1 -1
- package/src/controllers/action-metadata.controller.ts +1 -1
- package/src/controllers/facebook-authentication.controller.ts +1 -1
- package/src/controllers/google-authentication.controller.ts +1 -1
- package/src/controllers/menu-item-metadata.controller.ts +1 -1
- package/src/controllers/microsoft-authentication.controller.ts +1 -1
- package/src/controllers/mq-message-queue.controller.ts +1 -1
- package/src/controllers/mq-message.controller.ts +1 -1
- package/src/controllers/view-metadata.controller.ts +1 -1
- package/src/entities/chatter-message-details.entity.ts +1 -2
- package/src/helpers/field-crud-managers/BigIntFieldCrudManager.ts +1 -1
- package/src/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.ts +1 -1
- package/src/helpers/module-metadata-helper.service.ts +1 -1
- package/src/jobs/database/chatter-queue-subscriber-database.service.ts +4 -2
- package/src/jobs/database/trigger-mcp-client-subscriber-database.service.ts +1 -1
- package/src/jobs/rabbitmq/chatter-queue-subscriber.service.ts +4 -2
- package/src/jobs/redis/chatter-queue-subscriber-redis.service.ts +10 -3
- package/src/repository/security-rule.repository.ts +1 -1
- package/src/seeders/module-metadata-seeder.service.ts +4 -4
- package/src/seeders/permission-metadata-seeder.service.ts +1 -1
- package/src/seeders/seed-data/solid-core-metadata.json +13 -2
- package/src/services/authentication.service.ts +19 -31
- package/src/services/chatter-message.service.ts +28 -38
- package/src/services/crud.service.ts +1 -1
- package/src/services/csv.service.ts +1 -1
- package/src/services/dashboard.service.ts +1 -1
- package/src/services/database/database-bootstrap.service.ts +1 -1
- package/src/services/excel.service.ts +1 -1
- package/src/services/export-transaction.service.ts +2 -2
- package/src/services/field-metadata.service.ts +1 -1
- package/src/services/fixtures.service.ts +2 -2
- package/src/services/import-transaction.service.ts +2 -2
- package/src/services/list-of-values.service.ts +1 -1
- package/src/services/model-metadata.service.ts +22 -21
- package/src/services/module-metadata.service.ts +7 -7
- package/src/services/queues/database-publisher.service.ts +4 -4
- package/src/services/queues/database-subscriber.service.ts +1 -1
- package/src/services/queues/rabbitmq-publisher.service.ts +7 -7
- package/src/services/queues/rabbitmq-subscriber.service.ts +8 -8
- package/src/services/queues/redis-publisher.service.ts +7 -4
- package/src/services/queues/redis-subscriber.service.ts +4 -4
- package/src/services/role-metadata.service.ts +1 -1
- package/src/services/scheduled-jobs/scheduler.service.ts +5 -5
- package/src/services/settings/default-settings-provider.service.ts +21 -4
- package/src/services/sms/TwilioSMSService.ts +2 -2
- package/src/services/solid-introspect.service.ts +2 -2
- package/src/services/user-activity-history.service.ts +1 -1
- package/src/services/view-metadata.service.ts +25 -8
- package/src/subscribers/computed-entity-field.subscriber.ts +1 -1
- package/src/subscribers/security-rule.subscriber.ts +8 -8
- package/src/subscribers/view-metadata.subscriber.ts +1 -1
- package/src/testing/core/testing-engine.ts +2 -2
- package/src/testing/reporter/webhook-reporter.ts +1 -1
- package/.claude/settings.local.json +0 -15
- package/src/services/1.js +0 -6
|
@@ -22,12 +22,12 @@ export abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePubl
|
|
|
22
22
|
protected readonly mqMessageQueueService: MqMessageQueueService,
|
|
23
23
|
) {
|
|
24
24
|
this.url = process.env.QUEUES_RABBIT_MQ_URL;
|
|
25
|
-
this.serviceRole = process.env.QUEUES_SERVICE_ROLE;
|
|
25
|
+
this.serviceRole = process.env.QUEUES_SERVICE_ROLE || 'both';
|
|
26
26
|
if (!this.url) {
|
|
27
27
|
this.logger.debug('RabbitMqPublisher url is not defined in the environment variables');
|
|
28
28
|
}
|
|
29
|
-
if (!
|
|
30
|
-
this.logger.debug('
|
|
29
|
+
if (!process.env.QUEUES_SERVICE_ROLE) {
|
|
30
|
+
this.logger.debug('QUEUES_SERVICE_ROLE is not defined. Defaulting RabbitMqPublisher service role to "both".');
|
|
31
31
|
}
|
|
32
32
|
// this.logger.debug(`RabbitMqPublisher instance created with options: ${JSON.stringify(this.options())} and url: ${this.url}`);
|
|
33
33
|
}
|
|
@@ -118,7 +118,7 @@ export abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePubl
|
|
|
118
118
|
if (this.channel) {
|
|
119
119
|
try {
|
|
120
120
|
await this.channel.close();
|
|
121
|
-
} catch (err) {
|
|
121
|
+
} catch (err: any) {
|
|
122
122
|
this.logger.warn(
|
|
123
123
|
`RabbitMqPublisher error closing channel: ${(err as Error).message}`,
|
|
124
124
|
);
|
|
@@ -130,7 +130,7 @@ export abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePubl
|
|
|
130
130
|
if (this.connection) {
|
|
131
131
|
try {
|
|
132
132
|
await this.connection.close();
|
|
133
|
-
} catch (err) {
|
|
133
|
+
} catch (err: any) {
|
|
134
134
|
this.logger.warn(
|
|
135
135
|
`RabbitMqPublisher error closing connection: ${(err as Error).message}`,
|
|
136
136
|
);
|
|
@@ -189,7 +189,7 @@ export abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePubl
|
|
|
189
189
|
// }
|
|
190
190
|
// await channel.waitForConfirms();
|
|
191
191
|
// this.logger.debug('RabbitMqPublisher Message published successfully');
|
|
192
|
-
} catch (err) {
|
|
192
|
+
} catch (err: any) {
|
|
193
193
|
this.logger.error(`RabbitMqPublisher Message publish failed: ${JSON.stringify(err)}`);
|
|
194
194
|
if (err instanceof Error) {
|
|
195
195
|
this.logger.error(`RabbitMqPublisher Error stack: ${err.stack}`);
|
|
@@ -224,7 +224,7 @@ export abstract class RabbitMqPublisher<T> implements OnModuleDestroy, QueuePubl
|
|
|
224
224
|
mqMessageQueueId: mqMessageQueue.id,
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
catch (error) {
|
|
227
|
+
catch (error: any) {
|
|
228
228
|
this.logger.error(error.message, error.stack);
|
|
229
229
|
}
|
|
230
230
|
|
|
@@ -107,7 +107,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
107
107
|
this.logger.log(`RabbitMqSubscriber for queue ${queueName} is disabled because it does not match QUEUES_QUEUE_NAME_REGEX_TO_ENABLE=${queueNameRegex}`);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
} catch (error) {
|
|
110
|
+
} catch (error: any) {
|
|
111
111
|
this.logger.error(`Invalid QUEUES_QUEUE_NAME_REGEX_TO_ENABLE regex "${queueNameRegex}". Subscriber for queue ${queueName} will not start.`);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
116
116
|
const namespacedQueueName = buildNamespacedQueueName(queueName);
|
|
117
117
|
try {
|
|
118
118
|
await this.connectAndConsume(namespacedQueueName);
|
|
119
|
-
} catch (err) {
|
|
119
|
+
} catch (err: any) {
|
|
120
120
|
this.logger.error(`Failed to connect to RabbitMQ for queue ${namespacedQueueName}: ${(err as Error).message}`, (err as Error).stack);
|
|
121
121
|
this.triggerReconnect(namespacedQueueName, 'initial connection failure');
|
|
122
122
|
}
|
|
@@ -142,7 +142,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
142
142
|
let connection: amqp.Connection;
|
|
143
143
|
try {
|
|
144
144
|
connection = await this.establishConnection();
|
|
145
|
-
} catch (err) {
|
|
145
|
+
} catch (err: any) {
|
|
146
146
|
this.logger.error(`Failed to connect to RabbitMQ for queue ${queueName}: ${(err as Error).message}`, (err as Error).stack);
|
|
147
147
|
throw err;
|
|
148
148
|
}
|
|
@@ -210,7 +210,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
210
210
|
const messageContentString = rawMessage.content.toString();
|
|
211
211
|
message = JSON.parse(messageContentString) as QueueMessage<T>;
|
|
212
212
|
this.logger.debug(`rabbitmq subscriber received message with id: ${message.messageId} for queue ${queueName}`);
|
|
213
|
-
} catch (error) {
|
|
213
|
+
} catch (error: any) {
|
|
214
214
|
this.logger.error(`Invalid JSON message on queue ${queueName}: ${(error as Error).message}`);
|
|
215
215
|
await this.publishToFailedQueue(queueName, rawMessage.content, channel, error);
|
|
216
216
|
channel.ack(rawMessage);
|
|
@@ -223,7 +223,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
223
223
|
|
|
224
224
|
try {
|
|
225
225
|
await this.processMessage(message, rawMessage, channel, queueName);
|
|
226
|
-
} catch (error) {
|
|
226
|
+
} catch (error: any) {
|
|
227
227
|
await this.handleProcessingError(message, rawMessage, channel, error, queueName);
|
|
228
228
|
}
|
|
229
229
|
},
|
|
@@ -277,7 +277,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
277
277
|
channel.sendToQueue(failedQueue, body, errorMessage ? {
|
|
278
278
|
headers: { 'x-error': errorMessage }
|
|
279
279
|
} : undefined);
|
|
280
|
-
} catch (err) {
|
|
280
|
+
} catch (err: any) {
|
|
281
281
|
this.logger.error(`Failed to publish to failed queue ${failedQueue}: ${(err as Error).message}`);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -302,7 +302,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
302
302
|
this.reconnectAttempt = 0;
|
|
303
303
|
this.logger.log(`RabbitMqSubscriber reconnected for queue ${queueName}`);
|
|
304
304
|
return;
|
|
305
|
-
} catch (err) {
|
|
305
|
+
} catch (err: any) {
|
|
306
306
|
this.reconnectAttempt += 1;
|
|
307
307
|
const delay = this.backoff();
|
|
308
308
|
this.logger.warn(`RabbitMqSubscriber reconnect failed for queue ${queueName}; retrying in ${delay}ms`);
|
|
@@ -485,7 +485,7 @@ export abstract class RabbitMqSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
485
485
|
// - If timeoutPromise rejects first, we fail fast with timeout error.
|
|
486
486
|
// This ensures we mark DB status via normal error handling before broker ack-timeout.
|
|
487
487
|
return await Promise.race([subscribePromise, timeoutPromise]);
|
|
488
|
-
} catch (error) {
|
|
488
|
+
} catch (error: any) {
|
|
489
489
|
const errorMessage = (error as Error)?.message || String(error);
|
|
490
490
|
this.logger.error(
|
|
491
491
|
`Subscriber execution failed for queue ${queueName} and messageId ${messageId}: ${errorMessage}`,
|
|
@@ -16,7 +16,10 @@ export abstract class RedisPublisher<T> implements OnModuleDestroy, QueuePublish
|
|
|
16
16
|
protected readonly mqMessageService: MqMessageService,
|
|
17
17
|
protected readonly mqMessageQueueService: MqMessageQueueService,
|
|
18
18
|
) {
|
|
19
|
-
this.serviceRole = process.env.QUEUES_SERVICE_ROLE;
|
|
19
|
+
this.serviceRole = process.env.QUEUES_SERVICE_ROLE || 'both';
|
|
20
|
+
if (!process.env.QUEUES_SERVICE_ROLE) {
|
|
21
|
+
this.logger.debug('QUEUES_SERVICE_ROLE is not defined. Defaulting RedisPublisher service role to "both".');
|
|
22
|
+
}
|
|
20
23
|
if (!process.env.QUEUES_REDIS_URL) {
|
|
21
24
|
this.logger.debug('RedisPublisher: QUEUES_REDIS_URL is not defined in the environment variables');
|
|
22
25
|
}
|
|
@@ -65,7 +68,7 @@ export abstract class RedisPublisher<T> implements OnModuleDestroy, QueuePublish
|
|
|
65
68
|
const client = this.getClient();
|
|
66
69
|
await client.publish(namespacedQueueName, JSON.stringify(message));
|
|
67
70
|
this.logger.debug(`RedisPublisher published message ${message.messageId} to channel ${namespacedQueueName}`);
|
|
68
|
-
} catch (err) {
|
|
71
|
+
} catch (err: any) {
|
|
69
72
|
this.logger.error(`RedisPublisher failed to publish message: ${(err as Error).message}`, (err as Error).stack);
|
|
70
73
|
}
|
|
71
74
|
|
|
@@ -87,8 +90,8 @@ export abstract class RedisPublisher<T> implements OnModuleDestroy, QueuePublish
|
|
|
87
90
|
parentEntity: message.parentEntity,
|
|
88
91
|
mqMessageQueueId: mqMessageQueue.id,
|
|
89
92
|
});
|
|
90
|
-
} catch (error) {
|
|
93
|
+
} catch (error: any) {
|
|
91
94
|
this.logger.error(error.message, error.stack);
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
}
|
|
97
|
+
}
|
|
@@ -53,7 +53,7 @@ export abstract class RedisSubscriber<T> implements OnModuleInit, OnModuleDestro
|
|
|
53
53
|
);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
} catch (error) {
|
|
56
|
+
} catch (error: any) {
|
|
57
57
|
this.logger.error(
|
|
58
58
|
`Invalid QUEUES_QUEUE_NAME_REGEX_TO_ENABLE regex "${queueNameRegex}". Subscriber for queue ${queueName} will not start.`,
|
|
59
59
|
);
|
|
@@ -95,7 +95,7 @@ export abstract class RedisSubscriber<T> implements OnModuleInit, OnModuleDestro
|
|
|
95
95
|
let message: QueueMessage<T> = null;
|
|
96
96
|
try {
|
|
97
97
|
message = JSON.parse(rawMessage) as QueueMessage<T>;
|
|
98
|
-
} catch (error) {
|
|
98
|
+
} catch (error: any) {
|
|
99
99
|
this.logger.error(`RedisSubscriber invalid JSON on channel ${channel}: ${(error as Error).message}`);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
@@ -106,7 +106,7 @@ export abstract class RedisSubscriber<T> implements OnModuleInit, OnModuleDestro
|
|
|
106
106
|
|
|
107
107
|
try {
|
|
108
108
|
await this.processMessage(message);
|
|
109
|
-
} catch (error) {
|
|
109
|
+
} catch (error: any) {
|
|
110
110
|
await this.handleProcessingError(message, error, channel);
|
|
111
111
|
}
|
|
112
112
|
});
|
|
@@ -150,7 +150,7 @@ export abstract class RedisSubscriber<T> implements OnModuleInit, OnModuleDestro
|
|
|
150
150
|
try {
|
|
151
151
|
await this.connectAndSubscribe(channel);
|
|
152
152
|
this.logger.log(`RedisSubscriber reconnected for channel ${channel}`);
|
|
153
|
-
} catch (err) {
|
|
153
|
+
} catch (err: any) {
|
|
154
154
|
this.triggerReconnect(channel, `reconnect failed: ${(err as Error).message}`);
|
|
155
155
|
}
|
|
156
156
|
}, delay);
|
|
@@ -36,7 +36,7 @@ export class SchedulerServiceImpl implements ISchedulerService {
|
|
|
36
36
|
if (jobsRegexToEnable && jobsRegexToEnable !== "all") {
|
|
37
37
|
try {
|
|
38
38
|
jobsRegex = new RegExp(jobsRegexToEnable);
|
|
39
|
-
} catch (error) {
|
|
39
|
+
} catch (error: any) {
|
|
40
40
|
this.logger.error(`Invalid SOLID_SCHEDULER_JOBS_REGEX_TO_ENABLE regex "${jobsRegexToEnable}". Scheduler loop will skip this run.`);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
@@ -101,7 +101,7 @@ export class SchedulerServiceImpl implements ISchedulerService {
|
|
|
101
101
|
|
|
102
102
|
await this.scheduledJobRepo.save(job);
|
|
103
103
|
this.logger.log(`[${now.getTime()}]: scheduler service finished running job: ${job.job}`);
|
|
104
|
-
} catch (err) {
|
|
104
|
+
} catch (err: any) {
|
|
105
105
|
this.logger.error(`[${now.getTime()}]: scheduler service failed to run job ${job.job}`, err.stack);
|
|
106
106
|
} finally {
|
|
107
107
|
this.runningJobs.delete(jobKey);
|
|
@@ -153,7 +153,7 @@ export class SchedulerServiceImpl implements ISchedulerService {
|
|
|
153
153
|
try {
|
|
154
154
|
const parsed = JSON.parse(dayOfWeek);
|
|
155
155
|
return Array.isArray(parsed) ? parsed : [];
|
|
156
|
-
} catch (error) {
|
|
156
|
+
} catch (error: any) {
|
|
157
157
|
this.logger.warn(`Invalid dayOfWeek JSON '${dayOfWeek}'`, error as any);
|
|
158
158
|
return [];
|
|
159
159
|
}
|
|
@@ -217,10 +217,10 @@ export class SchedulerServiceImpl implements ISchedulerService {
|
|
|
217
217
|
if (runAfterNext.getTime() - nextRun.getTime() < 60000) {
|
|
218
218
|
throw new Error('Cron expression interval must be at least 1 minute');
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
this.logger.log(`Custom cron '${job.cronExpression}' next run: ${nextRun}`);
|
|
222
222
|
return nextRun;
|
|
223
|
-
} catch (error) {
|
|
223
|
+
} catch (error: any) {
|
|
224
224
|
this.logger.error(`Invalid cron expression for job ${job.scheduleName}: ${job.cronExpression}. Reason: ${(error as Error).message}`);
|
|
225
225
|
// Fallback to daily if cron parsing fails
|
|
226
226
|
return new Date(base.getTime() + 24 * 60 * 60 * 1000);
|
|
@@ -724,7 +724,11 @@ const getSolidCoreSettings = (isProd: boolean) =>
|
|
|
724
724
|
label: "Registration Validation Type",
|
|
725
725
|
group: "authentication-settings",
|
|
726
726
|
sortOrder: 30,
|
|
727
|
-
controlType: "
|
|
727
|
+
controlType: "selectionStatic",
|
|
728
|
+
options: [
|
|
729
|
+
{ label: "Email", value: "email" },
|
|
730
|
+
{ label: "Mobile", value: "mobile" },
|
|
731
|
+
],
|
|
728
732
|
},
|
|
729
733
|
{
|
|
730
734
|
moduleName: "solid-core",
|
|
@@ -734,7 +738,12 @@ const getSolidCoreSettings = (isProd: boolean) =>
|
|
|
734
738
|
label: "Login Validation Type",
|
|
735
739
|
group: "authentication-settings",
|
|
736
740
|
sortOrder: 40,
|
|
737
|
-
controlType: "
|
|
741
|
+
controlType: "selectionStatic",
|
|
742
|
+
options: [
|
|
743
|
+
{ label: "Email", value: "email" },
|
|
744
|
+
{ label: "Mobile", value: "mobile" },
|
|
745
|
+
{ label: "Selectable", value: "selectable" },
|
|
746
|
+
],
|
|
738
747
|
},
|
|
739
748
|
{
|
|
740
749
|
moduleName: "solid-core",
|
|
@@ -899,7 +908,11 @@ const getSolidCoreSettings = (isProd: boolean) =>
|
|
|
899
908
|
(
|
|
900
909
|
process.env.IAM_SEND_WELCOME_EMAIL_ON_SIGNUP ?? "false"
|
|
901
910
|
).toLowerCase() === "true",
|
|
902
|
-
level: SettingLevel.
|
|
911
|
+
level: SettingLevel.SystemAdminEditable,
|
|
912
|
+
label: "Send Welcome Email On Signup",
|
|
913
|
+
group: "authentication-settings",
|
|
914
|
+
sortOrder: 180,
|
|
915
|
+
controlType: "boolean",
|
|
903
916
|
},
|
|
904
917
|
{
|
|
905
918
|
moduleName: "solid-core",
|
|
@@ -908,7 +921,11 @@ const getSolidCoreSettings = (isProd: boolean) =>
|
|
|
908
921
|
(
|
|
909
922
|
process.env.IAM_SEND_WELCOME_SMS_ON_SIGNUP ?? "false"
|
|
910
923
|
).toLowerCase() === "true",
|
|
911
|
-
level: SettingLevel.
|
|
924
|
+
level: SettingLevel.SystemAdminEditable,
|
|
925
|
+
label: "Send Welcome SMS On Signup",
|
|
926
|
+
group: "authentication-settings",
|
|
927
|
+
sortOrder: 190,
|
|
928
|
+
controlType: "boolean",
|
|
912
929
|
},
|
|
913
930
|
{
|
|
914
931
|
moduleName: "solid-core",
|
|
@@ -69,7 +69,7 @@ export class TwilioSMSService implements ISMS {
|
|
|
69
69
|
try {
|
|
70
70
|
const bodyTemplate = Handlebars.compile(smsTemplate.body);
|
|
71
71
|
body = bodyTemplate(templateParams);
|
|
72
|
-
} catch (error) {
|
|
72
|
+
} catch (error: any) {
|
|
73
73
|
throw new Error('Unable to compile sms template body');
|
|
74
74
|
}
|
|
75
75
|
// Finally send the email.
|
|
@@ -110,7 +110,7 @@ export class TwilioSMSService implements ISMS {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
return r;
|
|
113
|
-
} catch (error) {
|
|
113
|
+
} catch (error: any) {
|
|
114
114
|
throw new Error(error);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -197,7 +197,7 @@ export class SolidIntrospectService implements OnApplicationBootstrap {
|
|
|
197
197
|
let ds: DataSource | undefined;
|
|
198
198
|
try {
|
|
199
199
|
ds = this.moduleRef.get<DataSource>(token, { strict: false });
|
|
200
|
-
} catch (err) {
|
|
200
|
+
} catch (err: any) {
|
|
201
201
|
this.logger.warn(`DataSource token for "${dsName ?? 'default'}" not found: ${err?.message ?? err}`);
|
|
202
202
|
}
|
|
203
203
|
if (!ds) {
|
|
@@ -209,7 +209,7 @@ export class SolidIntrospectService implements OnApplicationBootstrap {
|
|
|
209
209
|
if (!ds.isInitialized) {
|
|
210
210
|
try {
|
|
211
211
|
await ds.initialize(); // only if you need to initialize here; in many apps datasources are created earlier
|
|
212
|
-
} catch (err) {
|
|
212
|
+
} catch (err: any) {
|
|
213
213
|
this.logger.error(`Failed to initialize DataSource "${dsName}": ${err}`);
|
|
214
214
|
continue;
|
|
215
215
|
}
|
|
@@ -134,6 +134,7 @@ export class ViewMetadataService extends CRUDService<ViewMetadata> {
|
|
|
134
134
|
let viewModes = [];
|
|
135
135
|
const menuItemModelId = menuItem?.action?.model?.id;
|
|
136
136
|
const menuItemModuleId = menuItem?.module?.id;
|
|
137
|
+
const collectionViewTypes = ['card', 'list', 'kanban', 'tree'];
|
|
137
138
|
if (menuItemModelId && menuItemModuleId) {
|
|
138
139
|
const actionQb = await this.actionMetadataService.repo.createSecurityRuleAwareQueryBuilder('action');
|
|
139
140
|
const actionsForViewModes = await actionQb
|
|
@@ -142,16 +143,32 @@ export class ViewMetadataService extends CRUDService<ViewMetadata> {
|
|
|
142
143
|
.leftJoinAndSelect('action.view', 'view')
|
|
143
144
|
.where('model.id = :modelId', { modelId: menuItemModelId })
|
|
144
145
|
.andWhere('module.id = :moduleId', { moduleId: menuItemModuleId })
|
|
145
|
-
.andWhere('view.type IN (:...viewTypes)', { viewTypes:
|
|
146
|
+
.andWhere('view.type IN (:...viewTypes)', { viewTypes: collectionViewTypes })
|
|
146
147
|
.getMany();
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
const canonicalActionsByViewType = new Map();
|
|
150
|
+
for (const actionItem of actionsForViewModes) {
|
|
151
|
+
const resolvedViewType = actionItem.view?.type;
|
|
152
|
+
if (!resolvedViewType || canonicalActionsByViewType.has(resolvedViewType)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
canonicalActionsByViewType.set(resolvedViewType, actionItem);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (action?.view?.type && collectionViewTypes.includes(action.view.type) && action?.id) {
|
|
159
|
+
canonicalActionsByViewType.set(action.view.type, action);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
viewModes = collectionViewTypes
|
|
163
|
+
.map((resolvedViewType) => canonicalActionsByViewType.get(resolvedViewType))
|
|
164
|
+
.filter(Boolean)
|
|
165
|
+
.map(actionItem => ({
|
|
166
|
+
type: actionItem.view?.type ?? '',
|
|
167
|
+
menuItemId: menuItem.id,
|
|
168
|
+
menuItemName: menuItem.displayName,
|
|
169
|
+
actionId: actionItem.id ?? '',
|
|
170
|
+
actionName: actionItem.displayName ?? '',
|
|
171
|
+
}));
|
|
155
172
|
}
|
|
156
173
|
|
|
157
174
|
const viewId = action?.view?.id
|
|
@@ -142,7 +142,7 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
142
142
|
const providerInstance = provider.instance as IEntityPreComputeFieldProvider<any, any, any>; // IEntityComputedFieldProvider
|
|
143
143
|
const computedValue = await providerInstance.preComputeValue(entity, computedFieldMetadata); //FIXME There should some way to check/assert if the provider actually has a postComputeAndSaveValue
|
|
144
144
|
return computedValue; //TODO: This line here is just for backward compatibility, once the pre compute interface is change to return void, we will get rid of it.
|
|
145
|
-
} catch (error) {
|
|
145
|
+
} catch (error: any) {
|
|
146
146
|
throw new InternalServerErrorException(`Error evaluating computed field ${computedFieldMetadata.fieldName} for model ${computedFieldMetadata.modelName} for triggered entity ${entity.constructor.name}: ${error.message}`);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -27,19 +27,19 @@ export class SecurityRuleSubscriber implements EntitySubscriberInterface<Securit
|
|
|
27
27
|
async afterInsert(event: InsertEvent<SecurityRule>) {
|
|
28
28
|
await this.saveSecurityRules(event);
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
async afterUpdate(event: UpdateEvent<SecurityRule>) {
|
|
32
32
|
await this.saveSecurityRules(event);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
async saveSecurityRules(event: UpdateEvent<SecurityRule
|
|
35
|
+
async saveSecurityRules(event: UpdateEvent<SecurityRule> | InsertEvent<SecurityRule>) {
|
|
36
36
|
const securityRule = event.entity as SecurityRule;
|
|
37
37
|
const modelMetadata = event.entity.modelMetadata;
|
|
38
38
|
if (!modelMetadata) {
|
|
39
39
|
this.logger.error(`Model metadata not found for security rule with id ${event.entity.id}`);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
const modelMetadataRepo = this.dataSource.getRepository(ModelMetadata);
|
|
44
44
|
const populatedModelMetadata = await modelMetadataRepo.findOne({
|
|
45
45
|
where: {
|
|
@@ -58,7 +58,7 @@ export class SecurityRuleSubscriber implements EntitySubscriberInterface<Securit
|
|
|
58
58
|
const filePath = await this.moduleMetadataHelperService.getModuleMetadataFilePath(populatedModelMetadata.module.name);
|
|
59
59
|
try {
|
|
60
60
|
await fs.access(filePath);
|
|
61
|
-
} catch (error) {
|
|
61
|
+
} catch (error: any) {
|
|
62
62
|
// FIXME - Should we actually delete the security rule here, if the file is not found?
|
|
63
63
|
this.logger.error(`File not found at path: ${filePath}`);
|
|
64
64
|
return;
|
|
@@ -67,13 +67,13 @@ export class SecurityRuleSubscriber implements EntitySubscriberInterface<Securit
|
|
|
67
67
|
|
|
68
68
|
if (metaData.securityRules) {
|
|
69
69
|
const securityRuleIndex = metaData.securityRules?.findIndex((ruleFromFile: { name: string }) => ruleFromFile.name === securityRule.name);
|
|
70
|
-
const {id, roleId, modelMetadataId, ...requiredDto} = await this.securityRuleRepo.toDto(securityRule)
|
|
71
|
-
metaData.securityRules[securityRuleIndex] = {...requiredDto, securityRuleConfig: JSON.parse(securityRule.securityRuleConfig)}
|
|
70
|
+
const { id, roleId, modelMetadataId, ...requiredDto } = await this.securityRuleRepo.toDto(securityRule)
|
|
71
|
+
metaData.securityRules[securityRuleIndex] = { ...requiredDto, securityRuleConfig: JSON.parse(securityRule.securityRuleConfig) }
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
const securityRules = []
|
|
75
|
-
const {id, roleId, modelMetadataId, ...requiredDto} = await this.securityRuleRepo.toDto(securityRule)
|
|
76
|
-
securityRules.push({...requiredDto, securityRuleConfig: JSON.parse(securityRule.securityRuleConfig)})
|
|
75
|
+
const { id, roleId, modelMetadataId, ...requiredDto } = await this.securityRuleRepo.toDto(securityRule)
|
|
76
|
+
securityRules.push({ ...requiredDto, securityRuleConfig: JSON.parse(securityRule.securityRuleConfig) })
|
|
77
77
|
metaData.securityRules = securityRules
|
|
78
78
|
}
|
|
79
79
|
// Write the updated object back to the file
|
|
@@ -43,7 +43,7 @@ export class ViewMetadataSubsciber implements EntitySubscriberInterface<ViewMeta
|
|
|
43
43
|
const filePath = await this.moduleMetadataHelperService.getModuleMetadataFilePath(viewMetadata.model.module.name);
|
|
44
44
|
try {
|
|
45
45
|
await fs.access(filePath);
|
|
46
|
-
} catch (error) {
|
|
46
|
+
} catch (error: any) {
|
|
47
47
|
this.logger.error(`File not found at path: ${filePath}`);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
@@ -57,7 +57,7 @@ export class TestingEngine {
|
|
|
57
57
|
} else {
|
|
58
58
|
await execute();
|
|
59
59
|
}
|
|
60
|
-
} catch (err) {
|
|
60
|
+
} catch (err: any) {
|
|
61
61
|
scenarioError = err;
|
|
62
62
|
} finally {
|
|
63
63
|
const durationMs = Date.now() - scenarioStart;
|
|
@@ -108,7 +108,7 @@ export class TestingEngine {
|
|
|
108
108
|
// console.log(`Step ${resolvedStep.name} attempting to saveAs ${resolvedStep.saveAs}`, JSON.stringify(result));
|
|
109
109
|
ctx.resources.set(resolvedStep.saveAs, result);
|
|
110
110
|
}
|
|
111
|
-
} catch (err) {
|
|
111
|
+
} catch (err: any) {
|
|
112
112
|
stepError = err;
|
|
113
113
|
throw err;
|
|
114
114
|
} finally {
|
|
@@ -109,7 +109,7 @@ export class WebhookReporter extends ConsoleReporter {
|
|
|
109
109
|
if (!response.ok) {
|
|
110
110
|
console.warn(`[WebhookReporter] Webhook returned ${response.status}`);
|
|
111
111
|
}
|
|
112
|
-
} catch (err) {
|
|
112
|
+
} catch (err: any) {
|
|
113
113
|
console.warn(`[WebhookReporter] Failed to deliver test results: ${err}`);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(node -e:*)",
|
|
5
|
-
"WebFetch(domain:docs.solidxai.com)",
|
|
6
|
-
"WebFetch(domain:github.com)",
|
|
7
|
-
"Read(//Users/oswald/projects/Solid_Starters/solidctl/**)",
|
|
8
|
-
"Read(//Users/oswald/projects/Solid_Starters/**)",
|
|
9
|
-
"Bash(find /Users/oswald/projects/Solid_Starters/solid-core-module -type d -name migration* -o -name *database*)"
|
|
10
|
-
],
|
|
11
|
-
"additionalDirectories": [
|
|
12
|
-
"/Users/oswald/projects/Solid_Starters/solidctl"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
}
|
package/src/services/1.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
1. Do i need to create a storeStreams method for aws service too?
|
|
2
|
-
- Handle later
|
|
3
|
-
2. queues handling -> if queues is enabled by default, i.e triggerExport(exportTransactionEntity.id).
|
|
4
|
-
- startExport should either return the data or return the transaction id
|
|
5
|
-
3. How to handle scenarios wherein, nested related exist.(do i need to only get the userkey)
|
|
6
|
-
- show the userKey
|