@logto/connector-github 1.0.0-beta.9 → 1.1.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.
@@ -2,14 +2,17 @@ import { z } from 'zod';
2
2
  export declare const githubConfigGuard: z.ZodObject<{
3
3
  clientId: z.ZodString;
4
4
  clientSecret: z.ZodString;
5
+ scope: z.ZodOptional<z.ZodString>;
5
6
  }, "strip", z.ZodTypeAny, {
7
+ scope?: string | undefined;
6
8
  clientId: string;
7
9
  clientSecret: string;
8
10
  }, {
11
+ scope?: string | undefined;
9
12
  clientId: string;
10
13
  clientSecret: string;
11
14
  }>;
12
- export declare type GithubConfig = z.infer<typeof githubConfigGuard>;
15
+ export type GithubConfig = z.infer<typeof githubConfigGuard>;
13
16
  export declare const accessTokenResponseGuard: z.ZodObject<{
14
17
  access_token: z.ZodString;
15
18
  scope: z.ZodString;
@@ -23,7 +26,7 @@ export declare const accessTokenResponseGuard: z.ZodObject<{
23
26
  access_token: string;
24
27
  token_type: string;
25
28
  }>;
26
- export declare type AccessTokenResponse = z.infer<typeof accessTokenResponseGuard>;
29
+ export type AccessTokenResponse = z.infer<typeof accessTokenResponseGuard>;
27
30
  export declare const userInfoResponseGuard: z.ZodObject<{
28
31
  id: z.ZodNumber;
29
32
  avatar_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -40,7 +43,7 @@ export declare const userInfoResponseGuard: z.ZodObject<{
40
43
  name?: string | null | undefined;
41
44
  id: number;
42
45
  }>;
43
- export declare type UserInfoResponse = z.infer<typeof userInfoResponseGuard>;
46
+ export type UserInfoResponse = z.infer<typeof userInfoResponseGuard>;
44
47
  export declare const authorizationCallbackErrorGuard: z.ZodObject<{
45
48
  error: z.ZodString;
46
49
  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 d="M12 2.24658C9.62547 2.24668 7.32846 3.0917 5.51996 4.63043C3.71146 6.16916 2.5095 8.3012 2.12913 10.6451C1.74876 12.9889 2.21481 15.3917 3.4439 17.4233C4.67298 19.455 6.58488 20.9831 8.83752 21.7341C9.33752 21.8216 9.52502 21.5216 9.52502 21.2591C9.52502 21.0216 9.51251 20.2341 9.51251 19.3966C7 19.8591 6.35 18.7841 6.15 18.2216C5.92807 17.6745 5.57627 17.1897 5.125 16.8091C4.775 16.6216 4.275 16.1591 5.11249 16.1466C5.43227 16.1813 5.73898 16.2926 6.00663 16.471C6.27427 16.6494 6.49496 16.8897 6.65 17.1716C6.78677 17.4173 6.97068 17.6336 7.19119 17.8081C7.4117 17.9826 7.66447 18.1118 7.93503 18.1885C8.20559 18.2651 8.48861 18.2876 8.76788 18.2547C9.04714 18.2218 9.31717 18.134 9.56248 17.9966C9.60577 17.4882 9.83234 17.0129 10.2 16.6591C7.975 16.4091 5.65 15.5466 5.65 11.7216C5.63594 10.7278 6.00268 9.76619 6.675 9.03411C6.36928 8.17033 6.40505 7.2224 6.775 6.38411C6.775 6.38411 7.61247 6.1216 9.525 7.40911C11.1613 6.95909 12.8887 6.95909 14.525 7.40911C16.4375 6.10911 17.275 6.38411 17.275 6.38411C17.645 7.22238 17.6808 8.17034 17.375 9.03411C18.0493 9.76494 18.4164 10.7273 18.4 11.7216C18.4 15.5591 16.0625 16.4091 13.8375 16.6591C14.0761 16.901 14.2599 17.1914 14.3764 17.5106C14.4929 17.8298 14.5393 18.1704 14.5125 18.5091C14.5125 19.8466 14.5 20.9216 14.5 21.2591C14.5 21.5216 14.6875 21.8341 15.1875 21.7341C17.4362 20.977 19.3426 19.4453 20.5664 17.4126C21.7903 15.3799 22.2519 12.9784 21.8689 10.6368C21.4859 8.29523 20.2832 6.16595 18.4755 4.62909C16.6678 3.09223 14.3727 2.24782 12 2.24658Z" fill="white"/>
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 d="M12 2.2467C9.6255 2.2468 7.32849 3.09182 5.51999 4.63055C3.71149 6.16929 2.50953 8.30133 2.12916 10.6452C1.74879 12.989 2.21485 15.3918 3.44393 17.4235C4.67301 19.4551 6.58491 20.9832 8.83755 21.7342C9.33755 21.8217 9.52505 21.5217 9.52505 21.2592C9.52505 21.0217 9.51254 20.2342 9.51254 19.3967C7.00003 19.8592 6.35003 18.7842 6.15003 18.2217C5.9281 17.6747 5.5763 17.1899 5.12503 16.8092C4.77503 16.6217 4.27503 16.1592 5.11252 16.1467C5.4323 16.1814 5.73901 16.2927 6.00666 16.4711C6.2743 16.6495 6.49499 16.8899 6.65003 17.1717C6.7868 17.4174 6.97071 17.6337 7.19122 17.8082C7.41173 17.9827 7.6645 18.112 7.93506 18.1886C8.20562 18.2652 8.48864 18.2877 8.76791 18.2548C9.04717 18.2219 9.3172 18.1342 9.56251 17.9967C9.6058 17.4883 9.83237 17.013 10.2 16.6592C7.97503 16.4092 5.65003 15.5467 5.65003 11.7217C5.63597 10.7279 6.00271 9.76631 6.67503 9.03423C6.36931 8.17045 6.40508 7.22252 6.77503 6.38423C6.77503 6.38423 7.6125 6.12172 9.52503 7.40923C11.1613 6.95921 12.8887 6.95921 14.525 7.40923C16.4375 6.10923 17.275 6.38423 17.275 6.38423C17.645 7.22251 17.6808 8.17046 17.375 9.03423C18.0494 9.76506 18.4164 10.7275 18.4 11.7217C18.4 15.5592 16.0625 16.4092 13.8375 16.6592C14.0762 16.9011 14.26 17.1915 14.3764 17.5107C14.4929 17.83 14.5393 18.1705 14.5125 18.5092C14.5125 19.8468 14.5 20.9217 14.5 21.2592C14.5 21.5217 14.6875 21.8342 15.1875 21.7342C17.4362 20.9771 19.3426 19.4455 20.5664 17.4128C21.7903 15.38 22.2519 12.9785 21.8689 10.6369C21.4859 8.29535 20.2832 6.16608 18.4755 4.62922C16.6678 3.09235 14.3727 2.24794 12 2.2467Z" fill="black"/>
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,60 +1,51 @@
1
1
  {
2
2
  "name": "@logto/connector-github",
3
- "version": "1.0.0-beta.9",
3
+ "version": "1.1.0",
4
4
  "description": "Github web connector implementation.",
5
+ "author": "Silverhand Inc. <contact@silverhand.io>",
6
+ "dependencies": {
7
+ "@logto/connector-kit": "^1.1.0",
8
+ "query-string": "^8.0.0"
9
+ },
5
10
  "main": "./lib/index.js",
11
+ "module": "./lib/index.js",
6
12
  "exports": "./lib/index.js",
7
- "author": "Silverhand Inc. <contact@silverhand.io>",
8
13
  "license": "MPL-2.0",
14
+ "type": "module",
9
15
  "files": [
10
16
  "lib",
11
17
  "docs",
12
18
  "logo.svg",
13
- "README.md",
14
19
  "logo-dark.svg"
15
20
  ],
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
- "dependencies": {
27
- "@logto/connector-core": "^1.0.0-beta.9",
28
- "@silverhand/essentials": "^1.2.0",
29
- "@silverhand/jest-config": "1.0.0",
30
- "got": "^11.8.2",
31
- "query-string": "^7.0.1",
32
- "zod": "^3.14.3"
33
- },
34
- "devDependencies": {
35
- "@jest/types": "^28.1.3",
36
- "@silverhand/eslint-config": "1.0.0",
37
- "@silverhand/ts-config": "1.0.0",
38
- "@types/jest": "^28.1.6",
39
- "@types/node": "^16.3.1",
40
- "@vercel/ncc": "^0.34.0",
41
- "eslint": "^8.21.0",
42
- "jest": "^28.1.3",
43
- "jest-matcher-specific-error": "^1.0.0",
44
- "lint-staged": "^13.0.0",
45
- "nock": "^13.2.2",
46
- "prettier": "^2.7.1",
47
- "typescript": "^4.7.4"
48
- },
49
21
  "engines": {
50
- "node": "^16.0.0"
22
+ "node": "^18.12.0"
51
23
  },
52
24
  "eslintConfig": {
53
- "extends": "@silverhand"
25
+ "extends": "@silverhand",
26
+ "settings": {
27
+ "import/core-modules": [
28
+ "@silverhand/essentials",
29
+ "got",
30
+ "nock",
31
+ "snakecase-keys",
32
+ "zod"
33
+ ]
34
+ }
54
35
  },
55
36
  "prettier": "@silverhand/eslint-config/.prettierrc",
56
37
  "publishConfig": {
57
38
  "access": "public"
58
39
  },
59
- "gitHead": "697ab67225448d0752126c99e5d0b9348de56076"
60
- }
40
+ "scripts": {
41
+ "precommit": "lint-staged",
42
+ "build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
43
+ "build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
44
+ "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
45
+ "lint": "eslint --ext .ts src",
46
+ "lint:report": "pnpm lint --format json --output-file report.json",
47
+ "test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
48
+ "test": "pnpm build:test && pnpm test:only",
49
+ "test:ci": "pnpm test:only --silent --coverage"
50
+ }
51
+ }
@@ -1,4 +0,0 @@
1
- {
2
- "clientId": "<client-id>",
3
- "clientSecret": "<client-secret>"
4
- }
@@ -1,3 +0,0 @@
1
- import { Config } from '@silverhand/jest-config';
2
- declare const config: Config.InitialOptions;
3
- export default config;
@@ -1 +0,0 @@
1
- export {};
File without changes