@moonbase.sh/react 1.3.0 → 1.4.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/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -67,7 +67,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
67
67
|
var import_storefront_api13 = require("@moonbase.sh/storefront-api");
|
|
68
68
|
|
|
69
69
|
// package.json
|
|
70
|
-
var version = "1.
|
|
70
|
+
var version = "1.4.0";
|
|
71
71
|
|
|
72
72
|
// src/storefront.ts
|
|
73
73
|
var import_storefront_api5 = require("@moonbase.sh/storefront-api");
|
|
@@ -149,8 +149,8 @@ function createAuth(storefront, internals) {
|
|
|
149
149
|
setPassword: (currentPassword, newPassword) => storefront.client.identity.setPassword(currentPassword, newPassword),
|
|
150
150
|
forgotPassword: (email) => storefront.client.identity.forgotPassword(email),
|
|
151
151
|
resetPassword: (email, newPassword, code) => storefront.client.identity.resetPassword(email, newPassword, code),
|
|
152
|
-
confirmAccount: (email, code) => confirmOnce("account", email, code, async () => {
|
|
153
|
-
const result = await storefront.client.identity.confirmAccount(email, code);
|
|
152
|
+
confirmAccount: (email, code, returnPath) => confirmOnce("account", email, code, async () => {
|
|
153
|
+
const result = await storefront.client.identity.confirmAccount(email, code, returnPath);
|
|
154
154
|
if (result.status === "SignedIn") {
|
|
155
155
|
setUser(import_storefront_api.schemas.identity.userSchema.parse(storefront.client.tokenStore.user));
|
|
156
156
|
refreshCatalog();
|
package/dist/index.d.cts
CHANGED
|
@@ -38,7 +38,7 @@ interface StorefrontAuth {
|
|
|
38
38
|
* confirming as it loads can be run twice by React. The same goes for `confirmEmail` and
|
|
39
39
|
* `confirmEmailChange`.
|
|
40
40
|
*/
|
|
41
|
-
confirmAccount: (email: string, code: string) => Promise<UserAccountConfirmed>;
|
|
41
|
+
confirmAccount: (email: string, code: string, returnPath?: string) => Promise<UserAccountConfirmed>;
|
|
42
42
|
confirmEmail: (email: string, code: string) => Promise<void>;
|
|
43
43
|
confirmEmailChange: (email: string, code: string) => Promise<User | null>;
|
|
44
44
|
getConnectionUrl: (provider: ConnectableAccountProvider, redirectUri: string, loginId?: string) => Promise<string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ interface StorefrontAuth {
|
|
|
38
38
|
* confirming as it loads can be run twice by React. The same goes for `confirmEmail` and
|
|
39
39
|
* `confirmEmailChange`.
|
|
40
40
|
*/
|
|
41
|
-
confirmAccount: (email: string, code: string) => Promise<UserAccountConfirmed>;
|
|
41
|
+
confirmAccount: (email: string, code: string, returnPath?: string) => Promise<UserAccountConfirmed>;
|
|
42
42
|
confirmEmail: (email: string, code: string) => Promise<void>;
|
|
43
43
|
confirmEmailChange: (email: string, code: string) => Promise<User | null>;
|
|
44
44
|
getConnectionUrl: (provider: ConnectableAccountProvider, redirectUri: string, loginId?: string) => Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { MoonbaseClient } from "@moonbase.sh/storefront-api";
|
|
3
3
|
|
|
4
4
|
// package.json
|
|
5
|
-
var version = "1.
|
|
5
|
+
var version = "1.4.0";
|
|
6
6
|
|
|
7
7
|
// src/storefront.ts
|
|
8
8
|
import {
|
|
@@ -121,8 +121,8 @@ function createAuth(storefront, internals) {
|
|
|
121
121
|
setPassword: (currentPassword, newPassword) => storefront.client.identity.setPassword(currentPassword, newPassword),
|
|
122
122
|
forgotPassword: (email) => storefront.client.identity.forgotPassword(email),
|
|
123
123
|
resetPassword: (email, newPassword, code) => storefront.client.identity.resetPassword(email, newPassword, code),
|
|
124
|
-
confirmAccount: (email, code) => confirmOnce("account", email, code, async () => {
|
|
125
|
-
const result = await storefront.client.identity.confirmAccount(email, code);
|
|
124
|
+
confirmAccount: (email, code, returnPath) => confirmOnce("account", email, code, async () => {
|
|
125
|
+
const result = await storefront.client.identity.confirmAccount(email, code, returnPath);
|
|
126
126
|
if (result.status === "SignedIn") {
|
|
127
127
|
setUser(schemas.identity.userSchema.parse(storefront.client.tokenStore.user));
|
|
128
128
|
refreshCatalog();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "Package to let you build React storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"react": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@moonbase.sh/storefront-api": "3.
|
|
19
|
+
"@moonbase.sh/storefront-api": "3.21.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^22.5.4",
|