@develit-services/notification 5.0.0 → 5.1.0
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/service.cjs +6 -6
- package/dist/service.d.cts +2 -2
- package/dist/service.d.mts +2 -2
- package/dist/service.d.ts +2 -2
- package/dist/service.mjs +7 -7
- package/package.json +1 -1
package/dist/service.cjs
CHANGED
|
@@ -20,16 +20,16 @@ const notificationServiceConfig = serviceConfig.createTypedServiceConfigFactory(
|
|
|
20
20
|
NOTIFICATION_SERVICE_BINDINGS,
|
|
21
21
|
NOTIFICATION_SERVICE_QUEUE_CONSUMERS
|
|
22
22
|
);
|
|
23
|
-
function
|
|
24
|
-
return {
|
|
23
|
+
function createNotificationService(config) {
|
|
24
|
+
return (deployment, bindings) => ({
|
|
25
25
|
resourceName: "notification",
|
|
26
|
-
variables: config.vars[deployment.environment],
|
|
26
|
+
variables: config.vars[serviceConfig.configKeyFor(deployment.environment)],
|
|
27
27
|
bindings,
|
|
28
|
-
crons: config.triggers.crons[deployment.environment]
|
|
29
|
-
};
|
|
28
|
+
crons: config.triggers.crons[serviceConfig.configKeyFor(deployment.environment)]
|
|
29
|
+
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
exports.NOTIFICATION_SERVICE_BINDINGS = NOTIFICATION_SERVICE_BINDINGS;
|
|
33
33
|
exports.NOTIFICATION_SERVICE_QUEUE_CONSUMERS = NOTIFICATION_SERVICE_QUEUE_CONSUMERS;
|
|
34
|
-
exports.
|
|
34
|
+
exports.createNotificationService = createNotificationService;
|
|
35
35
|
exports.notificationServiceConfig = notificationServiceConfig;
|
package/dist/service.d.cts
CHANGED
|
@@ -77,7 +77,7 @@ declare const notificationServiceConfig: (project: string, version: string, opti
|
|
|
77
77
|
readonly maxBatchTimeout: 5;
|
|
78
78
|
readonly deadLetterQueueSuffix: "notifications-dlq";
|
|
79
79
|
}]>;
|
|
80
|
-
declare function
|
|
80
|
+
declare function createNotificationService(config: ReturnType<typeof notificationServiceConfig>): (deployment: Deployment, bindings: BindingsFromDescriptor<typeof NOTIFICATION_SERVICE_BINDINGS>) => {
|
|
81
81
|
resourceName: "notification";
|
|
82
82
|
variables: NotificationServiceVariables;
|
|
83
83
|
bindings: BindingsFromDescriptor<{
|
|
@@ -101,5 +101,5 @@ declare function notificationService(config: ReturnType<typeof notificationServi
|
|
|
101
101
|
crons: string[];
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS,
|
|
104
|
+
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS, createNotificationService, notificationServiceConfig };
|
|
105
105
|
export type { NotificationServiceVariables };
|
package/dist/service.d.mts
CHANGED
|
@@ -77,7 +77,7 @@ declare const notificationServiceConfig: (project: string, version: string, opti
|
|
|
77
77
|
readonly maxBatchTimeout: 5;
|
|
78
78
|
readonly deadLetterQueueSuffix: "notifications-dlq";
|
|
79
79
|
}]>;
|
|
80
|
-
declare function
|
|
80
|
+
declare function createNotificationService(config: ReturnType<typeof notificationServiceConfig>): (deployment: Deployment, bindings: BindingsFromDescriptor<typeof NOTIFICATION_SERVICE_BINDINGS>) => {
|
|
81
81
|
resourceName: "notification";
|
|
82
82
|
variables: NotificationServiceVariables;
|
|
83
83
|
bindings: BindingsFromDescriptor<{
|
|
@@ -101,5 +101,5 @@ declare function notificationService(config: ReturnType<typeof notificationServi
|
|
|
101
101
|
crons: string[];
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS,
|
|
104
|
+
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS, createNotificationService, notificationServiceConfig };
|
|
105
105
|
export type { NotificationServiceVariables };
|
package/dist/service.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ declare const notificationServiceConfig: (project: string, version: string, opti
|
|
|
77
77
|
readonly maxBatchTimeout: 5;
|
|
78
78
|
readonly deadLetterQueueSuffix: "notifications-dlq";
|
|
79
79
|
}]>;
|
|
80
|
-
declare function
|
|
80
|
+
declare function createNotificationService(config: ReturnType<typeof notificationServiceConfig>): (deployment: Deployment, bindings: BindingsFromDescriptor<typeof NOTIFICATION_SERVICE_BINDINGS>) => {
|
|
81
81
|
resourceName: "notification";
|
|
82
82
|
variables: NotificationServiceVariables;
|
|
83
83
|
bindings: BindingsFromDescriptor<{
|
|
@@ -101,5 +101,5 @@ declare function notificationService(config: ReturnType<typeof notificationServi
|
|
|
101
101
|
crons: string[];
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS,
|
|
104
|
+
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS, createNotificationService, notificationServiceConfig };
|
|
105
105
|
export type { NotificationServiceVariables };
|
package/dist/service.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createTypedServiceConfigFactory } from '@develit-io/platform-sdk/service-config';
|
|
1
|
+
import { createTypedServiceConfigFactory, configKeyFor } from '@develit-io/platform-sdk/service-config';
|
|
2
2
|
|
|
3
3
|
const NOTIFICATION_SERVICE_BINDINGS = {
|
|
4
4
|
SECRETS_STORE: { kind: "service", target: "secrets-store" },
|
|
@@ -18,13 +18,13 @@ const notificationServiceConfig = createTypedServiceConfigFactory()(
|
|
|
18
18
|
NOTIFICATION_SERVICE_BINDINGS,
|
|
19
19
|
NOTIFICATION_SERVICE_QUEUE_CONSUMERS
|
|
20
20
|
);
|
|
21
|
-
function
|
|
22
|
-
return {
|
|
21
|
+
function createNotificationService(config) {
|
|
22
|
+
return (deployment, bindings) => ({
|
|
23
23
|
resourceName: "notification",
|
|
24
|
-
variables: config.vars[deployment.environment],
|
|
24
|
+
variables: config.vars[configKeyFor(deployment.environment)],
|
|
25
25
|
bindings,
|
|
26
|
-
crons: config.triggers.crons[deployment.environment]
|
|
27
|
-
};
|
|
26
|
+
crons: config.triggers.crons[configKeyFor(deployment.environment)]
|
|
27
|
+
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS,
|
|
30
|
+
export { NOTIFICATION_SERVICE_BINDINGS, NOTIFICATION_SERVICE_QUEUE_CONSUMERS, createNotificationService, notificationServiceConfig };
|