@jskit-ai/connectors-catalog 0.2.37 → 0.2.39
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/package.json +2 -2
- package/test/resend.test.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/connectors-catalog",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "Provider definitions and focused API operations for JSKIT connectors.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@aws-sdk/client-redshift-data": "3.1128.0",
|
|
126
126
|
"@aws-sdk/client-s3": "3.1128.0",
|
|
127
127
|
"@aws-sdk/s3-request-presigner": "3.1128.0",
|
|
128
|
-
"@jskit-ai/connectors-core": "0.2.
|
|
128
|
+
"@jskit-ai/connectors-core": "0.2.38",
|
|
129
129
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
130
130
|
"@smithy/fetch-http-handler": "5.8.0",
|
|
131
131
|
"jose": "^6.1.3",
|
package/test/resend.test.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import test from "node:test";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
import { createLocalAuthService, createLocalFileBackend } from "../../auth-provider-local-core/src/server/lib/index.js";
|
|
4
|
+
import { createLocalAuthService, createLocalDeliveries, createLocalFileBackend } from "../../auth-provider-local-core/src/server/lib/index.js";
|
|
5
5
|
import { localServiceOptions } from "../../auth-provider-local-core/test-support/localService.js";
|
|
6
6
|
import { readFile, rm } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
@@ -82,14 +82,19 @@ test("documented application wiring sends auth recovery through the Resend adapt
|
|
|
82
82
|
// Evaluate only the trusted repository example to keep application wiring verified.
|
|
83
83
|
const createRecoverySender = new Function("createHash", `${example.replace('import { createHash } from "node:crypto";', "")}\nreturn createRecoverySender;`)(createHash);
|
|
84
84
|
const sender = createRecoverySender({ connections: service, context, integrationId: "mail", from: input.from });
|
|
85
|
+
const options = localServiceOptions({ env: { APP_PUBLIC_URL: "https://app.example.com" }, emailRecovery: true });
|
|
86
|
+
const deliveries = createLocalDeliveries({ logger: options.logger });
|
|
85
87
|
const auth = createLocalAuthService({
|
|
86
|
-
...
|
|
88
|
+
...options,
|
|
87
89
|
backend: createLocalFileBackend({ storeDir: path.join(directory, "auth") }),
|
|
90
|
+
deliveries,
|
|
88
91
|
recoverySender: sender
|
|
89
92
|
});
|
|
90
93
|
await auth.register({ email: "person@example.com", password: "correct horse battery staple" });
|
|
91
94
|
const result = await auth.requestPasswordReset({ email: "person@example.com" });
|
|
92
95
|
assert.equal(result.recoveryUrl, undefined);
|
|
96
|
+
// Local auth sends the email after it has answered.
|
|
97
|
+
assert.equal(await deliveries.settled(), true);
|
|
93
98
|
assert.equal(requests.length, 2);
|
|
94
99
|
const body = JSON.parse(requests[1].init.body);
|
|
95
100
|
assert.deepEqual(body.to, ["person@example.com"]);
|