@logto/connector-github 1.3.0 → 1.4.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/lib/constant.d.ts +6 -1
- package/lib/index.js +589 -677
- package/lib/types.d.ts +20 -0
- package/package.json +26 -2
package/lib/types.d.ts
CHANGED
|
@@ -13,6 +13,26 @@ export declare const githubConfigGuard: z.ZodObject<{
|
|
|
13
13
|
scope?: string | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
export type GithubConfig = z.infer<typeof githubConfigGuard>;
|
|
16
|
+
/**
|
|
17
|
+
* This guard is used to validate the response from the GitHub API when requesting the user's email addresses.
|
|
18
|
+
* Ref: https://docs.github.com/en/rest/users/emails?apiVersion=2022-11-28#list-email-addresses-for-the-authenticated-user
|
|
19
|
+
*/
|
|
20
|
+
export declare const emailAddressGuard: z.ZodObject<{
|
|
21
|
+
email: z.ZodString;
|
|
22
|
+
primary: z.ZodBoolean;
|
|
23
|
+
verified: z.ZodBoolean;
|
|
24
|
+
visibility: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
email: string;
|
|
27
|
+
primary: boolean;
|
|
28
|
+
verified: boolean;
|
|
29
|
+
visibility: string | null;
|
|
30
|
+
}, {
|
|
31
|
+
email: string;
|
|
32
|
+
primary: boolean;
|
|
33
|
+
verified: boolean;
|
|
34
|
+
visibility: string | null;
|
|
35
|
+
}>;
|
|
16
36
|
export declare const accessTokenResponseGuard: z.ZodObject<{
|
|
17
37
|
access_token: z.ZodString;
|
|
18
38
|
scope: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/connector-github",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Github web connector implementation.",
|
|
5
5
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@logto/connector-kit": "^3.0.0",
|
|
8
|
-
"
|
|
8
|
+
"@silverhand/essentials": "^2.9.0",
|
|
9
|
+
"ky": "^1.2.3",
|
|
10
|
+
"query-string": "^9.0.0",
|
|
11
|
+
"snakecase-keys": "^8.0.0",
|
|
12
|
+
"zod": "^3.22.4"
|
|
9
13
|
},
|
|
10
14
|
"main": "./lib/index.js",
|
|
11
15
|
"module": "./lib/index.js",
|
|
@@ -37,6 +41,26 @@
|
|
|
37
41
|
"publishConfig": {
|
|
38
42
|
"access": "public"
|
|
39
43
|
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
46
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
48
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
49
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
50
|
+
"@silverhand/ts-config": "6.0.0",
|
|
51
|
+
"@types/node": "^20.11.20",
|
|
52
|
+
"@types/supertest": "^6.0.2",
|
|
53
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
54
|
+
"eslint": "^8.56.0",
|
|
55
|
+
"lint-staged": "^15.0.2",
|
|
56
|
+
"nock": "14.0.0-beta.6",
|
|
57
|
+
"prettier": "^3.0.0",
|
|
58
|
+
"rollup": "^4.12.0",
|
|
59
|
+
"rollup-plugin-output-size": "^1.3.0",
|
|
60
|
+
"supertest": "^7.0.0",
|
|
61
|
+
"typescript": "^5.3.3",
|
|
62
|
+
"vitest": "^1.4.0"
|
|
63
|
+
},
|
|
40
64
|
"scripts": {
|
|
41
65
|
"precommit": "lint-staged",
|
|
42
66
|
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|