@logto/connector-github 1.0.0-beta.9 → 1.0.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/README.md +5 -80
- package/lib/{src/constant.d.ts → constant.d.ts} +1 -1
- package/lib/{src/index.d.ts → index.d.ts} +2 -2
- package/lib/index.js +662 -15499
- package/lib/{src/types.d.ts → types.d.ts} +5 -5
- package/logo-dark.svg +8 -1
- package/logo.svg +8 -1
- package/package.json +42 -32
- package/docs/config-template.json +0 -4
- package/lib/jest.config.d.ts +0 -3
- package/lib/src/index.test.d.ts +0 -1
- /package/lib/{src/mock.d.ts → mock.d.ts} +0 -0
|
@@ -9,21 +9,21 @@ export declare const githubConfigGuard: z.ZodObject<{
|
|
|
9
9
|
clientId: string;
|
|
10
10
|
clientSecret: string;
|
|
11
11
|
}>;
|
|
12
|
-
export
|
|
12
|
+
export type GithubConfig = z.infer<typeof githubConfigGuard>;
|
|
13
13
|
export declare const accessTokenResponseGuard: z.ZodObject<{
|
|
14
14
|
access_token: z.ZodString;
|
|
15
15
|
scope: z.ZodString;
|
|
16
16
|
token_type: z.ZodString;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
scope: string;
|
|
19
18
|
access_token: string;
|
|
19
|
+
scope: string;
|
|
20
20
|
token_type: string;
|
|
21
21
|
}, {
|
|
22
|
-
scope: string;
|
|
23
22
|
access_token: string;
|
|
23
|
+
scope: string;
|
|
24
24
|
token_type: string;
|
|
25
25
|
}>;
|
|
26
|
-
export
|
|
26
|
+
export type AccessTokenResponse = z.infer<typeof accessTokenResponseGuard>;
|
|
27
27
|
export declare const userInfoResponseGuard: z.ZodObject<{
|
|
28
28
|
id: z.ZodNumber;
|
|
29
29
|
avatar_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -40,7 +40,7 @@ export declare const userInfoResponseGuard: z.ZodObject<{
|
|
|
40
40
|
name?: string | null | undefined;
|
|
41
41
|
id: number;
|
|
42
42
|
}>;
|
|
43
|
-
export
|
|
43
|
+
export type UserInfoResponse = z.infer<typeof userInfoResponseGuard>;
|
|
44
44
|
export declare const authorizationCallbackErrorGuard: z.ZodObject<{
|
|
45
45
|
error: z.ZodString;
|
|
46
46
|
error_description: z.ZodString;
|
package/logo-dark.svg
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
2
|
+
<g clip-path="url(#clip0_865_12456)">
|
|
3
|
+
<path d="M11.9999 0.300049C9.15054 0.300167 6.39414 1.31419 4.22396 3.16068C2.05378 5.00717 0.61143 7.56562 0.154992 10.3783C-0.301447 13.1909 0.257812 16.0742 1.7327 18.5122C3.20759 20.9503 5.50186 22.7839 8.205 23.6851C8.80499 23.7902 9.02999 23.4302 9.02999 23.1151C9.02999 22.8301 9.01498 21.8851 9.01498 20.8801C5.99999 21.4351 5.22 20.1452 4.98 19.4702C4.71369 18.8137 4.29153 18.2319 3.75001 17.7751C3.33001 17.5501 2.73001 16.9951 3.73499 16.9801C4.11874 17.0218 4.48679 17.1553 4.80796 17.3694C5.12913 17.5835 5.39395 17.8719 5.57999 18.2101C5.74412 18.505 5.96481 18.7645 6.22942 18.9739C6.49403 19.1833 6.79736 19.3384 7.12202 19.4304C7.44669 19.5224 7.78631 19.5494 8.12143 19.5099C8.45655 19.4703 8.78058 19.3651 9.07494 19.2001C9.12689 18.5901 9.39877 18.0197 9.83996 17.5952C7.16998 17.2952 4.38 16.2601 4.38 11.6701C4.36314 10.4775 4.80322 9.32362 5.60999 8.44512C5.24313 7.40858 5.28606 6.27105 5.72999 5.26511C5.72999 5.26511 6.73495 4.95009 9.02997 6.49511C10.9935 5.95508 13.0664 5.95508 15.0299 6.49511C17.3249 4.9351 18.3299 5.26511 18.3299 5.26511C18.7739 6.27104 18.8168 7.40859 18.4499 8.44512C19.2591 9.32211 19.6996 10.477 19.6799 11.6701C19.6799 16.2751 16.8749 17.2952 14.2049 17.5952C14.4913 17.8854 14.7119 18.2339 14.8516 18.617C14.9914 19 15.0471 19.4087 15.0149 19.8152C15.0149 21.4202 14.9999 22.7102 14.9999 23.1152C14.9999 23.4302 15.2249 23.8052 15.8249 23.6852C18.5233 22.7766 20.811 20.9387 22.2796 18.4994C23.7482 16.0601 24.3021 13.1783 23.8425 10.3684C23.3829 7.55845 21.9397 5.00331 19.7705 3.15907C17.6012 1.31483 14.8472 0.301531 11.9999 0.300049Z" fill="white"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_865_12456">
|
|
7
|
+
<rect width="24" height="24" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
3
10
|
</svg>
|
package/logo.svg
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
2
|
+
<g clip-path="url(#clip0_865_12254)">
|
|
3
|
+
<path d="M11.9999 0.296021C9.15054 0.296139 6.39414 1.31016 4.22396 3.15665C2.05378 5.00314 0.61143 7.5616 0.154992 10.3742C-0.301447 13.1869 0.257812 16.0702 1.7327 18.5082C3.20759 20.9462 5.50186 22.7799 8.205 23.6811C8.80499 23.7861 9.02999 23.4261 9.02999 23.1111C9.02999 22.8261 9.01498 21.8811 9.01498 20.8761C5.99999 21.4311 5.22 20.1411 4.98 19.4661C4.71369 18.8096 4.29153 18.2279 3.75001 17.7711C3.33001 17.5461 2.73001 16.9911 3.73499 16.9761C4.11874 17.0178 4.48679 17.1513 4.80796 17.3654C5.12913 17.5795 5.39395 17.8679 5.57999 18.2061C5.74412 18.5009 5.96481 18.7605 6.22942 18.9699C6.49403 19.1793 6.79736 19.3344 7.12202 19.4264C7.44669 19.5183 7.78631 19.5453 8.12143 19.5058C8.45655 19.4663 8.78058 19.3611 9.07494 19.1961C9.12689 18.586 9.39877 18.0156 9.83996 17.5911C7.16998 17.2911 4.38 16.2561 4.38 11.6661C4.36314 10.4735 4.80322 9.31959 5.60999 8.44109C5.24313 7.40455 5.28606 6.26702 5.72999 5.26108C5.72999 5.26108 6.73495 4.94606 9.02997 6.49108C10.9935 5.95105 13.0664 5.95105 15.0299 6.49108C17.3249 4.93108 18.3299 5.26108 18.3299 5.26108C18.7739 6.26701 18.8168 7.40456 18.4499 8.44109C19.2591 9.31808 19.6996 10.473 19.6799 11.6661C19.6799 16.2711 16.8749 17.2911 14.2049 17.5911C14.4913 17.8814 14.7119 18.2299 14.8516 18.6129C14.9914 18.996 15.0471 19.4046 15.0149 19.8111C15.0149 21.4162 14.9999 22.7061 14.9999 23.1112C14.9999 23.4262 15.2249 23.8012 15.8249 23.6812C18.5233 22.7726 20.811 20.9346 22.2796 18.4954C23.7482 16.0561 24.3021 13.1743 23.8425 10.3643C23.3829 7.55442 21.9397 4.99929 19.7705 3.15505C17.6012 1.31081 14.8472 0.297502 11.9999 0.296021Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_865_12254">
|
|
7
|
+
<rect width="24" height="24" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
3
10
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@logto/connector-github",
|
|
3
|
-
"version": "1.0.0-beta.9",
|
|
4
|
-
"description": "Github web connector implementation.",
|
|
5
2
|
"main": "./lib/index.js",
|
|
3
|
+
"module": "./lib/index.js",
|
|
6
4
|
"exports": "./lib/index.js",
|
|
7
|
-
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
8
5
|
"license": "MPL-2.0",
|
|
6
|
+
"type": "module",
|
|
9
7
|
"files": [
|
|
10
8
|
"lib",
|
|
11
9
|
"docs",
|
|
12
10
|
"logo.svg",
|
|
13
|
-
"README.md",
|
|
14
11
|
"logo-dark.svg"
|
|
15
12
|
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"precommit": "lint-staged",
|
|
18
|
-
"build": "rm -rf lib/ && ncc build src/index.ts -o lib",
|
|
19
|
-
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
|
20
|
-
"lint": "eslint --ext .ts src",
|
|
21
|
-
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
22
|
-
"test": "jest",
|
|
23
|
-
"test:coverage": "jest --coverage --silent",
|
|
24
|
-
"prepack": "pnpm build"
|
|
25
|
-
},
|
|
26
13
|
"dependencies": {
|
|
27
|
-
"@logto/connector-
|
|
28
|
-
"@silverhand/essentials": "
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
14
|
+
"@logto/connector-kit": "^1.0.0",
|
|
15
|
+
"@silverhand/essentials": "2.1.0",
|
|
16
|
+
"got": "^12.5.3",
|
|
17
|
+
"snakecase-keys": "^5.1.0",
|
|
18
|
+
"zod": "^3.20.2",
|
|
19
|
+
"query-string": "^7.0.1"
|
|
33
20
|
},
|
|
34
21
|
"devDependencies": {
|
|
35
|
-
"@jest/types": "^
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
22
|
+
"@jest/types": "^29.3.1",
|
|
23
|
+
"@rollup/plugin-commonjs": "^24.0.0",
|
|
24
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
25
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
26
|
+
"@rollup/plugin-typescript": "^10.0.1",
|
|
27
|
+
"@silverhand/eslint-config": "1.3.0",
|
|
28
|
+
"@silverhand/ts-config": "1.2.1",
|
|
29
|
+
"@silverhand/jest-config": "1.2.2",
|
|
30
|
+
"@types/jest": "^29.2.4",
|
|
39
31
|
"@types/node": "^16.3.1",
|
|
40
|
-
"@
|
|
32
|
+
"@types/supertest": "^2.0.11",
|
|
41
33
|
"eslint": "^8.21.0",
|
|
42
|
-
"jest": "^
|
|
34
|
+
"jest": "^29.3.1",
|
|
43
35
|
"jest-matcher-specific-error": "^1.0.0",
|
|
44
36
|
"lint-staged": "^13.0.0",
|
|
45
37
|
"nock": "^13.2.2",
|
|
46
|
-
"prettier": "^2.
|
|
47
|
-
"
|
|
38
|
+
"prettier": "^2.8.1",
|
|
39
|
+
"rollup": "^3.8.0",
|
|
40
|
+
"rollup-plugin-summary": "^2.0.0",
|
|
41
|
+
"supertest": "^6.2.2",
|
|
42
|
+
"typescript": "^4.9.4"
|
|
48
43
|
},
|
|
49
44
|
"engines": {
|
|
50
|
-
"node": "^16.0.0"
|
|
45
|
+
"node": "^16.13.0 || ^18.12.0"
|
|
51
46
|
},
|
|
52
47
|
"eslintConfig": {
|
|
53
48
|
"extends": "@silverhand"
|
|
@@ -56,5 +51,20 @@
|
|
|
56
51
|
"publishConfig": {
|
|
57
52
|
"access": "public"
|
|
58
53
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
54
|
+
"name": "@logto/connector-github",
|
|
55
|
+
"version": "1.0.0",
|
|
56
|
+
"description": "Github web connector implementation.",
|
|
57
|
+
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
58
|
+
"scripts": {
|
|
59
|
+
"package:sync": "cd ../../ && pnpm package:sync",
|
|
60
|
+
"package:update": "cd ../../ && pnpm package:update",
|
|
61
|
+
"precommit": "lint-staged",
|
|
62
|
+
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json",
|
|
63
|
+
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
|
64
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
|
65
|
+
"lint": "eslint --ext .ts src",
|
|
66
|
+
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
67
|
+
"test": "pnpm build:test && NODE_OPTIONS=--experimental-vm-modules jest",
|
|
68
|
+
"test:coverage": "pnpm run test --coverage --silent"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/lib/jest.config.d.ts
DELETED
package/lib/src/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|