@logto/connector-google 1.0.0-beta.11 → 1.0.0-beta.15

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.
@@ -1,3 +1,3 @@
1
- import { Config } from '@silverhand/jest-config';
1
+ import type { Config } from '@silverhand/jest-config';
2
2
  declare const config: Config.InitialOptions;
3
3
  export default config;
@@ -1,4 +1,4 @@
1
- import { ConnectorMetadata } from '@logto/connector-kit';
1
+ import type { ConnectorMetadata } from '@logto/connector-kit';
2
2
  export declare const authorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
3
3
  export declare const accessTokenEndpoint = "https://oauth2.googleapis.com/token";
4
4
  export declare const userInfoEndpoint = "https://openidconnect.googleapis.com/v1/userinfo";
@@ -2,8 +2,8 @@
2
2
  * The Implementation of OpenID Connect of Google Identity Platform.
3
3
  * https://developers.google.com/identity/protocols/oauth2/openid-connect
4
4
  */
5
- import { CreateConnector, SocialConnector } from '@logto/connector-kit';
6
- import { GoogleConfig } from './types';
5
+ import type { CreateConnector, SocialConnector } from '@logto/connector-kit';
6
+ import type { GoogleConfig } from './types';
7
7
  export declare const getAccessToken: (config: GoogleConfig, codeObject: {
8
8
  code: string;
9
9
  redirectUri: string;
@@ -9,7 +9,7 @@ export declare const googleConfigGuard: z.ZodObject<{
9
9
  clientId: string;
10
10
  clientSecret: string;
11
11
  }>;
12
- export declare type GoogleConfig = z.infer<typeof googleConfigGuard>;
12
+ export type GoogleConfig = z.infer<typeof googleConfigGuard>;
13
13
  export declare const accessTokenResponseGuard: z.ZodObject<{
14
14
  access_token: z.ZodString;
15
15
  scope: z.ZodString;
@@ -23,7 +23,7 @@ export declare const accessTokenResponseGuard: z.ZodObject<{
23
23
  access_token: string;
24
24
  token_type: string;
25
25
  }>;
26
- export declare type AccessTokenResponse = z.infer<typeof accessTokenResponseGuard>;
26
+ export type AccessTokenResponse = z.infer<typeof accessTokenResponseGuard>;
27
27
  export declare const userInfoResponseGuard: z.ZodObject<{
28
28
  sub: z.ZodString;
29
29
  name: z.ZodOptional<z.ZodString>;
@@ -52,7 +52,7 @@ export declare const userInfoResponseGuard: z.ZodObject<{
52
52
  locale?: string | undefined;
53
53
  sub: string;
54
54
  }>;
55
- export declare type UserInfoResponse = z.infer<typeof userInfoResponseGuard>;
55
+ export type UserInfoResponse = z.infer<typeof userInfoResponseGuard>;
56
56
  export declare const authResponseGuard: z.ZodObject<{
57
57
  code: z.ZodString;
58
58
  redirectUri: z.ZodString;
package/package.json CHANGED
@@ -1,51 +1,41 @@
1
1
  {
2
- "name": "@logto/connector-google",
3
- "version": "1.0.0-beta.11",
4
- "description": "Google web connector implementation.",
5
2
  "main": "./lib/index.js",
6
3
  "exports": "./lib/index.js",
7
- "author": "Silverhand Inc. <contact@silverhand.io>",
8
4
  "license": "MPL-2.0",
9
5
  "files": [
10
6
  "lib",
11
7
  "docs",
12
8
  "logo.svg",
13
- "README.md"
9
+ "logo-dark.svg"
14
10
  ],
15
- "scripts": {
16
- "precommit": "lint-staged",
17
- "build": "rm -rf lib/ && ncc build src/index.ts -o lib",
18
- "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
19
- "lint": "eslint --ext .ts src",
20
- "lint:report": "pnpm lint --format json --output-file report.json",
21
- "test": "jest",
22
- "test:coverage": "jest --coverage --silent",
23
- "prepack": "pnpm build"
24
- },
25
11
  "dependencies": {
26
- "@logto/connector-kit": "^1.0.0-beta.20",
12
+ "@logto/connector-kit": "1.0.0-beta.30",
27
13
  "@silverhand/essentials": "^1.2.0",
28
- "@silverhand/jest-config": "1.0.0",
29
14
  "got": "^11.8.2",
30
- "zod": "^3.14.3"
15
+ "snakecase-keys": "^5.1.0",
16
+ "zod": "^3.20.2"
31
17
  },
32
18
  "devDependencies": {
33
- "@jest/types": "^28.1.3",
34
- "@silverhand/eslint-config": "1.0.0",
35
- "@silverhand/ts-config": "1.0.0",
36
- "@types/jest": "^28.1.6",
19
+ "iconv-lite": "0.6.3",
20
+ "@jest/types": "^29.3.1",
21
+ "@silverhand/eslint-config": "1.3.0",
22
+ "@silverhand/ts-config": "1.2.1",
23
+ "@silverhand/jest-config": "1.2.2",
24
+ "@types/jest": "^29.2.4",
37
25
  "@types/node": "^16.3.1",
38
- "@vercel/ncc": "^0.34.0",
26
+ "@vercel/ncc": "^0.36.0",
27
+ "@types/supertest": "^2.0.11",
39
28
  "eslint": "^8.21.0",
40
- "jest": "^28.1.3",
29
+ "jest": "^29.3.1",
41
30
  "jest-matcher-specific-error": "^1.0.0",
42
31
  "lint-staged": "^13.0.0",
43
32
  "nock": "^13.2.2",
44
33
  "prettier": "^2.7.1",
45
- "typescript": "^4.7.4"
34
+ "supertest": "^6.2.2",
35
+ "typescript": "^4.9.4"
46
36
  },
47
37
  "engines": {
48
- "node": "^16.0.0"
38
+ "node": "^16.13.0 || ^18.12.0"
49
39
  },
50
40
  "eslintConfig": {
51
41
  "extends": "@silverhand"
@@ -54,5 +44,18 @@
54
44
  "publishConfig": {
55
45
  "access": "public"
56
46
  },
57
- "gitHead": "62c344b3983e465958ff1210cc9e0ea959002510"
58
- }
47
+ "name": "@logto/connector-google",
48
+ "version": "1.0.0-beta.15",
49
+ "description": "Google web connector implementation.",
50
+ "author": "Silverhand Inc. <contact@silverhand.io>",
51
+ "scripts": {
52
+ "package:sync": "cd ../../ && pnpm package:sync",
53
+ "precommit": "lint-staged",
54
+ "build": "rm -rf lib/ && ncc build src/index.ts -o lib",
55
+ "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
56
+ "lint": "eslint --ext .ts src",
57
+ "lint:report": "pnpm lint --format json --output-file report.json",
58
+ "test": "jest",
59
+ "test:coverage": "pnpm run test --coverage --silent"
60
+ }
61
+ }