kinde-testkit 0.6.0 → 0.6.1
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/CHANGELOG.md +8 -0
- package/README.md +52 -0
- package/dist/chunk-33AHOLUN.js +183 -0
- package/dist/chunk-33AHOLUN.js.map +1 -0
- package/dist/chunk-GCOZVCZY.js +3430 -0
- package/dist/chunk-GCOZVCZY.js.map +1 -0
- package/dist/chunk-U2D47SCY.js +72 -0
- package/dist/chunk-U2D47SCY.js.map +1 -0
- package/dist/cli.js +50 -3561
- package/dist/cli.js.map +1 -0
- package/dist/cypress.cjs +4 -2
- package/dist/cypress.d.cts +2 -96
- package/dist/cypress.d.ts +3 -96
- package/dist/cypress.js +2 -3303
- package/dist/cypress.js.map +1 -1
- package/dist/handle-BERQZCyH.d.cts +32 -0
- package/dist/handle-Dh0UpIzG.d.ts +33 -0
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +7 -607
- package/dist/index.d.ts +8 -607
- package/dist/index.js +51 -3577
- package/dist/index.js.map +1 -1
- package/dist/jest.cjs +4 -2
- package/dist/jest.d.cts +5 -555
- package/dist/jest.d.ts +6 -555
- package/dist/jest.js +4 -3373
- package/dist/jest.js.map +1 -1
- package/dist/playwright.d.ts +2 -54
- package/dist/server-BiODgeoB.d.ts +185 -0
- package/dist/server-ciWIscoQ.d.cts +579 -0
- package/dist/vitest.d.ts +6 -555
- package/dist/vitest.js +5 -3376
- package/dist/vitest.js.map +1 -1
- package/dist/webhooks-DJyCsbdF.d.ts +397 -0
- package/package.json +3 -2
- package/dist/cypress-support.d.ts +0 -98
- package/dist/cypress.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/jest.cjs.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { x as KindePrincipal, y as KindeTestkit, F as FailureInjector, V as WebhookDispatcher, r as Directory, j as CoverageRecorder, f as ActivityLog, d as Scenario, J as ScenarioTokenOverrides, T as TestkitSeed } from './server-ciWIscoQ.cjs';
|
|
2
|
+
|
|
3
|
+
interface KindeTestAuth {
|
|
4
|
+
token: string | null;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
principal: KindePrincipal | null;
|
|
7
|
+
request: {
|
|
8
|
+
headers: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare function kindeTest(options: {
|
|
12
|
+
scenario: Scenario;
|
|
13
|
+
testkit?: KindeTestkit;
|
|
14
|
+
token?: ScenarioTokenOverrides;
|
|
15
|
+
}): Promise<KindeTestAuth>;
|
|
16
|
+
interface KindeTestkitHandle {
|
|
17
|
+
readonly url: string;
|
|
18
|
+
readonly issuer: string;
|
|
19
|
+
readonly jwksUri: string;
|
|
20
|
+
readonly testkit: KindeTestkit;
|
|
21
|
+
readonly failures: FailureInjector;
|
|
22
|
+
readonly webhooks: WebhookDispatcher;
|
|
23
|
+
readonly directory: Directory;
|
|
24
|
+
readonly coverage: CoverageRecorder;
|
|
25
|
+
readonly activity: ActivityLog;
|
|
26
|
+
readonly certificatePath: string | null;
|
|
27
|
+
auth(scenario: Scenario, token?: ScenarioTokenOverrides): Promise<KindeTestAuth>;
|
|
28
|
+
loadSeed(seed: TestkitSeed): void;
|
|
29
|
+
reset(): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { type KindeTestAuth as K, type KindeTestkitHandle as a, kindeTest as k };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as KindePrincipal, o as KindeTestkit, F as FailureInjector, w as WebhookDispatcher, S as Scenario, r as ScenarioTokenOverrides, T as TestkitSeed } from './webhooks-DJyCsbdF.js';
|
|
2
|
+
import { g as Directory, d as CoverageRecorder, A as ActivityLog } from './server-BiODgeoB.js';
|
|
3
|
+
|
|
4
|
+
interface KindeTestAuth {
|
|
5
|
+
token: string | null;
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
principal: KindePrincipal | null;
|
|
8
|
+
request: {
|
|
9
|
+
headers: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare function kindeTest(options: {
|
|
13
|
+
scenario: Scenario;
|
|
14
|
+
testkit?: KindeTestkit;
|
|
15
|
+
token?: ScenarioTokenOverrides;
|
|
16
|
+
}): Promise<KindeTestAuth>;
|
|
17
|
+
interface KindeTestkitHandle {
|
|
18
|
+
readonly url: string;
|
|
19
|
+
readonly issuer: string;
|
|
20
|
+
readonly jwksUri: string;
|
|
21
|
+
readonly testkit: KindeTestkit;
|
|
22
|
+
readonly failures: FailureInjector;
|
|
23
|
+
readonly webhooks: WebhookDispatcher;
|
|
24
|
+
readonly directory: Directory;
|
|
25
|
+
readonly coverage: CoverageRecorder;
|
|
26
|
+
readonly activity: ActivityLog;
|
|
27
|
+
readonly certificatePath: string | null;
|
|
28
|
+
auth(scenario: Scenario, token?: ScenarioTokenOverrides): Promise<KindeTestAuth>;
|
|
29
|
+
loadSeed(seed: TestkitSeed): void;
|
|
30
|
+
reset(): void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { type KindeTestAuth as K, type KindeTestkitHandle as a, kindeTest as k };
|
package/dist/index.cjs
CHANGED
|
@@ -1332,6 +1332,8 @@ async function generateKeyPair(alg, options) {
|
|
|
1332
1332
|
var TestkitError = class extends Error {
|
|
1333
1333
|
code;
|
|
1334
1334
|
details;
|
|
1335
|
+
/** The message without the details list. */
|
|
1336
|
+
summary;
|
|
1335
1337
|
constructor(code, message2, details = []) {
|
|
1336
1338
|
super(details.length > 0 ? `${message2}
|
|
1337
1339
|
|
|
@@ -1339,6 +1341,7 @@ ${details.map((d) => ` - ${d}`).join("\n")}` : message2);
|
|
|
1339
1341
|
this.name = "TestkitError";
|
|
1340
1342
|
this.code = code;
|
|
1341
1343
|
this.details = details;
|
|
1344
|
+
this.summary = message2;
|
|
1342
1345
|
}
|
|
1343
1346
|
toString() {
|
|
1344
1347
|
return `${this.code}
|
|
@@ -4632,7 +4635,7 @@ function sendError(res, error) {
|
|
|
4632
4635
|
return;
|
|
4633
4636
|
}
|
|
4634
4637
|
if (error instanceof TestkitError) {
|
|
4635
|
-
sendJson4(res, 400, { error: error.code, error_description: error.
|
|
4638
|
+
sendJson4(res, 400, { error: error.code, error_description: error.summary, details: error.details });
|
|
4636
4639
|
return;
|
|
4637
4640
|
}
|
|
4638
4641
|
sendJson4(res, 500, {
|
|
@@ -4914,4 +4917,3 @@ function decodeEntities(value) {
|
|
|
4914
4917
|
startKindeTestkit,
|
|
4915
4918
|
toKindeRole
|
|
4916
4919
|
});
|
|
4917
|
-
//# sourceMappingURL=index.cjs.map
|