@open-mercato/channel-resend 0.11.1-develop.8417.1.36c73b01e6 → 0.11.1-develop.8419.1.6d358af5ff
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.
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { validateAdapterCapabilities } from "@open-mercato/core/modules/communication_channels/lib/adapter-compat";
|
|
2
|
+
import { defineProcessDiRegistrar, registerProcessActivation } from "@open-mercato/shared/lib/di/process-registrar";
|
|
1
3
|
import { asValue } from "awilix";
|
|
2
4
|
import {
|
|
3
5
|
hasChannelAdapter,
|
|
@@ -6,16 +8,28 @@ import {
|
|
|
6
8
|
import { getResendChannelAdapter } from "./lib/adapter.js";
|
|
7
9
|
import { registerResendSystemEmailConfigResolver } from "./lib/system-email-config.js";
|
|
8
10
|
import { channelResendHealthCheck } from "./lib/health.js";
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function registerWithActivation(container, activate) {
|
|
12
|
+
activate(() => {
|
|
13
|
+
registerResendSystemEmailConfigResolver();
|
|
14
|
+
});
|
|
15
|
+
activate(() => {
|
|
16
|
+
if (!hasChannelAdapter("resend")) {
|
|
17
|
+
registerChannelAdapter(getResendChannelAdapter());
|
|
18
|
+
}
|
|
19
|
+
}, () => {
|
|
20
|
+
if (!hasChannelAdapter("resend")) validateAdapterCapabilities(getResendChannelAdapter());
|
|
21
|
+
});
|
|
14
22
|
container.register({
|
|
15
23
|
channelResendAdapter: asValue(getResendChannelAdapter()),
|
|
16
24
|
channelResendHealthCheck: asValue(channelResendHealthCheck)
|
|
17
25
|
});
|
|
18
26
|
}
|
|
27
|
+
function register(container) {
|
|
28
|
+
registerWithActivation(container, (activate) => activate());
|
|
29
|
+
}
|
|
30
|
+
defineProcessDiRegistrar((container) => {
|
|
31
|
+
registerWithActivation(container, (activate, validate) => registerProcessActivation(container, activate, validate));
|
|
32
|
+
}, { legacy: register });
|
|
19
33
|
export {
|
|
20
34
|
register
|
|
21
35
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/channel_resend/di.ts"],
|
|
4
|
-
"sourcesContent": ["import { asValue } from 'awilix'\nimport type { AppContainer } from '@open-mercato/shared/lib/di/container'\nimport {\n hasChannelAdapter,\n registerChannelAdapter,\n} from '@open-mercato/core/modules/communication_channels/lib/adapter-registry-singleton'\nimport { getResendChannelAdapter } from './lib/adapter'\nimport { registerResendSystemEmailConfigResolver } from './lib/system-email-config'\nimport { channelResendHealthCheck } from './lib/health'\n\
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,+BAA+B;AACxC,SAAS,+CAA+C;AACxD,SAAS,gCAAgC;
|
|
4
|
+
"sourcesContent": ["import { validateAdapterCapabilities } from '@open-mercato/core/modules/communication_channels/lib/adapter-compat'\nimport { defineProcessDiRegistrar, registerProcessActivation } from '@open-mercato/shared/lib/di/process-registrar'\nimport { asValue } from 'awilix'\nimport type { AppContainer } from '@open-mercato/shared/lib/di/container'\nimport {\n hasChannelAdapter,\n registerChannelAdapter,\n} from '@open-mercato/core/modules/communication_channels/lib/adapter-registry-singleton'\nimport { getResendChannelAdapter } from './lib/adapter'\nimport { registerResendSystemEmailConfigResolver } from './lib/system-email-config'\nimport { channelResendHealthCheck } from './lib/health'\n\nfunction registerWithActivation(container: AppContainer, activate: (callback: () => void, validate?: () => void) => void) {\n activate(() => {\n registerResendSystemEmailConfigResolver()\n })\n activate(() => {\n if (!hasChannelAdapter('resend')) {\n registerChannelAdapter(getResendChannelAdapter())\n }\n }, () => {\n if (!hasChannelAdapter('resend')) validateAdapterCapabilities(getResendChannelAdapter())\n })\n container.register({\n channelResendAdapter: asValue(getResendChannelAdapter()),\n channelResendHealthCheck: asValue(channelResendHealthCheck),\n })\n}\n\nexport function register(container: AppContainer): void {\n registerWithActivation(container, (activate) => activate())\n}\n\ndefineProcessDiRegistrar((container: AppContainer) => {\n registerWithActivation(container, (activate, validate) => registerProcessActivation(container, activate, validate))\n}, { legacy: register })\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mCAAmC;AAC5C,SAAS,0BAA0B,iCAAiC;AACpE,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,+BAA+B;AACxC,SAAS,+CAA+C;AACxD,SAAS,gCAAgC;AAEzC,SAAS,uBAAuB,WAAyB,UAAiE;AACxH,WAAS,MAAM;AACb,4CAAwC;AAAA,EAC1C,CAAC;AACD,WAAS,MAAM;AACb,QAAI,CAAC,kBAAkB,QAAQ,GAAG;AAChC,6BAAuB,wBAAwB,CAAC;AAAA,IAClD;AAAA,EACF,GAAG,MAAM;AACP,QAAI,CAAC,kBAAkB,QAAQ,EAAG,6BAA4B,wBAAwB,CAAC;AAAA,EACzF,CAAC;AACD,YAAU,SAAS;AAAA,IACjB,sBAAsB,QAAQ,wBAAwB,CAAC;AAAA,IACvD,0BAA0B,QAAQ,wBAAwB;AAAA,EAC5D,CAAC;AACH;AAEO,SAAS,SAAS,WAA+B;AACtD,yBAAuB,WAAW,CAAC,aAAa,SAAS,CAAC;AAC5D;AAEA,yBAAyB,CAAC,cAA4B;AACpD,yBAAuB,WAAW,CAAC,UAAU,aAAa,0BAA0B,WAAW,UAAU,QAAQ,CAAC;AACpH,GAAG,EAAE,QAAQ,SAAS,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/channel-resend",
|
|
3
|
-
"version": "0.11.1-develop.
|
|
3
|
+
"version": "0.11.1-develop.8419.1.6d358af5ff",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,21 +50,21 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@open-mercato/core": "0.11.1-develop.
|
|
53
|
+
"@open-mercato/core": "0.11.1-develop.8419.1.6d358af5ff",
|
|
54
54
|
"resend": "^6.24.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@mikro-orm/postgresql": "^7.0.14",
|
|
58
|
-
"@open-mercato/ai-assistant": "0.11.1-develop.
|
|
59
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
60
|
-
"@open-mercato/ui": "0.11.1-develop.
|
|
58
|
+
"@open-mercato/ai-assistant": "0.11.1-develop.8419.1.6d358af5ff",
|
|
59
|
+
"@open-mercato/shared": "0.11.1-develop.8419.1.6d358af5ff",
|
|
60
|
+
"@open-mercato/ui": "0.11.1-develop.8419.1.6d358af5ff",
|
|
61
61
|
"react": "^19.0.0",
|
|
62
62
|
"react-dom": "^19.0.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@open-mercato/ai-assistant": "0.11.1-develop.
|
|
66
|
-
"@open-mercato/shared": "0.11.1-develop.
|
|
67
|
-
"@open-mercato/ui": "0.11.1-develop.
|
|
65
|
+
"@open-mercato/ai-assistant": "0.11.1-develop.8419.1.6d358af5ff",
|
|
66
|
+
"@open-mercato/shared": "0.11.1-develop.8419.1.6d358af5ff",
|
|
67
|
+
"@open-mercato/ui": "0.11.1-develop.8419.1.6d358af5ff",
|
|
68
68
|
"@types/jest": "^30.0.0",
|
|
69
69
|
"@types/react": "^19.2.18",
|
|
70
70
|
"@types/react-dom": "^19.2.5",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { validateAdapterCapabilities } from '@open-mercato/core/modules/communication_channels/lib/adapter-compat'
|
|
2
|
+
import { defineProcessDiRegistrar, registerProcessActivation } from '@open-mercato/shared/lib/di/process-registrar'
|
|
1
3
|
import { asValue } from 'awilix'
|
|
2
4
|
import type { AppContainer } from '@open-mercato/shared/lib/di/container'
|
|
3
5
|
import {
|
|
@@ -8,13 +10,27 @@ import { getResendChannelAdapter } from './lib/adapter'
|
|
|
8
10
|
import { registerResendSystemEmailConfigResolver } from './lib/system-email-config'
|
|
9
11
|
import { channelResendHealthCheck } from './lib/health'
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
function registerWithActivation(container: AppContainer, activate: (callback: () => void, validate?: () => void) => void) {
|
|
14
|
+
activate(() => {
|
|
15
|
+
registerResendSystemEmailConfigResolver()
|
|
16
|
+
})
|
|
17
|
+
activate(() => {
|
|
18
|
+
if (!hasChannelAdapter('resend')) {
|
|
19
|
+
registerChannelAdapter(getResendChannelAdapter())
|
|
20
|
+
}
|
|
21
|
+
}, () => {
|
|
22
|
+
if (!hasChannelAdapter('resend')) validateAdapterCapabilities(getResendChannelAdapter())
|
|
23
|
+
})
|
|
16
24
|
container.register({
|
|
17
25
|
channelResendAdapter: asValue(getResendChannelAdapter()),
|
|
18
26
|
channelResendHealthCheck: asValue(channelResendHealthCheck),
|
|
19
27
|
})
|
|
20
28
|
}
|
|
29
|
+
|
|
30
|
+
export function register(container: AppContainer): void {
|
|
31
|
+
registerWithActivation(container, (activate) => activate())
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
defineProcessDiRegistrar((container: AppContainer) => {
|
|
35
|
+
registerWithActivation(container, (activate, validate) => registerProcessActivation(container, activate, validate))
|
|
36
|
+
}, { legacy: register })
|