@studiocms/google 0.1.0-beta.31 → 0.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.
- package/dist/effect/google.d.ts +3 -3
- package/dist/effect/google.js +5 -7
- package/package.json +5 -3
package/dist/effect/google.d.ts
CHANGED
|
@@ -30,11 +30,11 @@ declare const GoogleUser_base: Schema.Class<GoogleUser, {
|
|
|
30
30
|
export declare class GoogleUser extends GoogleUser_base {
|
|
31
31
|
}
|
|
32
32
|
declare const GoogleOAuthAPI_base: Effect.Service.Class<GoogleOAuthAPI, "GoogleOAuthAPI", {
|
|
33
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<import("studiocms/lib/auth/verify-email").VerifyEmail,
|
|
33
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<import("studiocms/lib/auth/verify-email").VerifyEmail, import("studiocms/sdk/base").DBClientInitializationError | import("studiocms/sdk/base").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect/smtp").SMTPError, never>, import("effect/Layer").Layer<Platform.HttpClient.HttpClient, never, never>];
|
|
34
34
|
readonly effect: Effect.Effect<{
|
|
35
35
|
initSession: (context: APIContext) => Effect.Effect<Response, import("effect/ConfigError").ConfigError | import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
36
|
-
initCallback: (context: APIContext) => Effect.Effect<Response,
|
|
37
|
-
}, import("
|
|
36
|
+
initCallback: (context: APIContext) => Effect.Effect<Response, any, never>;
|
|
37
|
+
}, import("studiocms/sdk/base").DBClientInitializationError | import("studiocms/sdk/base").SDKInitializationError | import("effect/ConfigError").ConfigError | import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, import("studiocms/lib/auth/verify-email").VerifyEmail | Platform.HttpClient.HttpClient>;
|
|
38
38
|
}>;
|
|
39
39
|
/**
|
|
40
40
|
* Provides Google OAuth authentication effects for the StudioCMS API.
|
package/dist/effect/google.js
CHANGED
|
@@ -41,13 +41,11 @@ class GoogleOAuthAPI extends Effect.Service()("GoogleOAuthAPI", {
|
|
|
41
41
|
}
|
|
42
42
|
}).pipe(
|
|
43
43
|
Effect.flatMap(Platform.HttpClientResponse.schemaBodyJson(GoogleUser)),
|
|
44
|
-
Effect.
|
|
45
|
-
(error) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
})
|
|
50
|
-
)
|
|
44
|
+
Effect.mapError(
|
|
45
|
+
(error) => new ValidateAuthCodeError({
|
|
46
|
+
provider: GoogleOAuthAPI.ProviderID,
|
|
47
|
+
message: `Failed to fetch user info: ${error.message}`
|
|
48
|
+
})
|
|
51
49
|
)
|
|
52
50
|
);
|
|
53
51
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiocms/google",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Add Google OAuth Support to your StudioCMS project with ease!",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "withstudiocms",
|
|
@@ -55,14 +55,16 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"astro": "^5.12.9",
|
|
58
|
-
"effect": "^3.19.
|
|
58
|
+
"effect": "^3.19.14",
|
|
59
59
|
"vite": "^6.3.4",
|
|
60
|
-
"studiocms": "0.1.0
|
|
60
|
+
"studiocms": "0.1.0"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "buildkit build 'src/**/*.{ts,astro,css,json,png}'",
|
|
64
64
|
"dev": "buildkit dev 'src/**/*.{ts,astro,css,json,png}'",
|
|
65
65
|
"typecheck": "tspc -p tsconfig.tspc.json",
|
|
66
|
+
"effect-check": "pnpm effect-language-service diagnostics --project tsconfig.tspc.json",
|
|
67
|
+
"ci:effect-check": "pnpm effect-check --format github-actions",
|
|
66
68
|
"test": "vitest"
|
|
67
69
|
}
|
|
68
70
|
}
|