@junobuild/core-standalone 3.0.1-next-2025-11-08.1 → 3.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/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/auth/types/user.d.ts +1 -2
- package/dist/types/auth/utils/user.utils.d.ts +19 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import type { DeprecatedNfid, Provider, ProviderData, ProviderWithoutData } from
|
|
|
4
4
|
* All supported authentication providers, plus `undefined` for providers
|
|
5
5
|
* that do not include any associated metadata (see {@link ProviderWithoutData}).
|
|
6
6
|
*/
|
|
7
|
-
type UserProvider = Provider | undefined;
|
|
7
|
+
export type UserProvider = Provider | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* Data about the signed-in user.
|
|
10
10
|
*
|
|
@@ -49,4 +49,3 @@ export type UserDataWithoutProviderData<P extends UserProvider = UserProvider> =
|
|
|
49
49
|
* @template P Authentication provider (defaults to all).
|
|
50
50
|
*/
|
|
51
51
|
export type User<P extends UserProvider = UserProvider> = Doc<UserData<P>>;
|
|
52
|
-
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { User } from '../types/user';
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether a user signed in using WebAuthn.
|
|
4
|
+
*
|
|
5
|
+
* Acts as a type guard that narrows {@link User} to {@link User<'webauthn'>}.
|
|
6
|
+
*
|
|
7
|
+
* @param user - The user object to check.
|
|
8
|
+
* @returns True if the user signed in via WebAuthn.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isWebAuthnUser: (user: User) => user is User<"webauthn">;
|
|
11
|
+
/**
|
|
12
|
+
* Checks whether a user signed in using Google (OpenID).
|
|
13
|
+
*
|
|
14
|
+
* Acts as a type guard that narrows {@link User} to {@link User<'google'>}.
|
|
15
|
+
*
|
|
16
|
+
* @param user - The user object to check.
|
|
17
|
+
* @returns True if the user signed in via Google.
|
|
18
|
+
*/
|
|
19
|
+
export declare const isGoogleUser: (user: User) => user is User<"google">;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type * from './auth/types/progress';
|
|
|
16
16
|
export type * from './auth/types/provider';
|
|
17
17
|
export type * from './auth/types/user';
|
|
18
18
|
export * from './auth/types/webauthn';
|
|
19
|
+
export * from './auth/utils/user.utils';
|
|
19
20
|
export type * from './core/types/env';
|
|
20
21
|
export { ListOrder, ListPaginate, ListParams, ListResults } from './core/types/list';
|
|
21
22
|
export type * from './core/types/satellite';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/core-standalone",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "JavaScript core client for Juno with all dependencies bundled — no peer dependencies",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,4 +62,4 @@
|
|
|
62
62
|
"@junobuild/storage": "^2",
|
|
63
63
|
"@junobuild/utils": "*"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|