@stackframe/stack 2.6.38 → 2.7.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/CHANGELOG.md +22 -0
- package/dist/components-page/stack-handler.d.mts +4 -4
- package/dist/components-page/stack-handler.d.ts +4 -4
- package/dist/esm/index.js +15 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/stack-app.js +36 -8
- package/dist/esm/lib/stack-app.js.map +1 -1
- package/dist/generated/quetzal-translations.d.mts +2 -2
- package/dist/generated/quetzal-translations.d.ts +2 -2
- package/dist/index.d.mts +15 -14
- package/dist/index.d.ts +15 -14
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/stack-app.d.mts +15 -0
- package/dist/lib/stack-app.d.ts +15 -0
- package/dist/lib/stack-app.js +35 -7
- package/dist/lib/stack-app.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @stackframe/stack
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Various changes
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @stackframe/stack-shared@2.7.0
|
|
13
|
+
- @stackframe/stack-ui@2.7.0
|
|
14
|
+
- @stackframe/stack-sc@2.7.0
|
|
15
|
+
|
|
16
|
+
## 2.6.39
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @stackframe/stack-shared@2.6.39
|
|
22
|
+
- @stackframe/stack-ui@2.6.39
|
|
23
|
+
- @stackframe/stack-sc@2.6.39
|
|
24
|
+
|
|
3
25
|
## 2.6.38
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StackServerApp } from '../lib/stack-app.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import { SignUp } from './sign-up.mjs';
|
|
2
|
+
import { AccountSettings } from './account-settings.mjs';
|
|
4
3
|
import { EmailVerification } from './email-verification.mjs';
|
|
5
|
-
import { PasswordReset } from './password-reset.mjs';
|
|
6
4
|
import { ForgotPassword } from './forgot-password.mjs';
|
|
7
|
-
import {
|
|
5
|
+
import { PasswordReset } from './password-reset.mjs';
|
|
6
|
+
import { SignIn } from './sign-in.mjs';
|
|
7
|
+
import { SignUp } from './sign-up.mjs';
|
|
8
8
|
import { ErrorPage } from './error-page.mjs';
|
|
9
9
|
import { MagicLinkCallback } from './magic-link-callback.mjs';
|
|
10
10
|
import { OAuthCallback } from './oauth-callback.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StackServerApp } from '../lib/stack-app.js';
|
|
2
|
-
import {
|
|
3
|
-
import { SignUp } from './sign-up.js';
|
|
2
|
+
import { AccountSettings } from './account-settings.js';
|
|
4
3
|
import { EmailVerification } from './email-verification.js';
|
|
5
|
-
import { PasswordReset } from './password-reset.js';
|
|
6
4
|
import { ForgotPassword } from './forgot-password.js';
|
|
7
|
-
import {
|
|
5
|
+
import { PasswordReset } from './password-reset.js';
|
|
6
|
+
import { SignIn } from './sign-in.js';
|
|
7
|
+
import { SignUp } from './sign-up.js';
|
|
8
8
|
import { ErrorPage } from './error-page.js';
|
|
9
9
|
import { MagicLinkCallback } from './magic-link-callback.js';
|
|
10
10
|
import { OAuthCallback } from './oauth-callback.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// src/index.tsx
|
|
2
|
-
import { default as default2 } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { default as default3 } from "./components-page/stack-handler";
|
|
5
|
-
import { StackTheme } from "./providers/theme-provider";
|
|
2
|
+
import { default as default2 } from "./components-page/stack-handler";
|
|
3
|
+
import { useStackApp, useUser } from "./lib/hooks";
|
|
6
4
|
export * from "./lib/stack-app";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { EmailVerification } from "./components-page/email-verification";
|
|
10
|
-
import { PasswordReset } from "./components-page/password-reset";
|
|
11
|
-
import { ForgotPassword } from "./components-page/forgot-password";
|
|
12
|
-
import { MessageCard } from "./components/message-cards/message-card";
|
|
13
|
-
import { UserButton } from "./components/user-button";
|
|
5
|
+
import { default as default3 } from "./providers/stack-provider";
|
|
6
|
+
import { StackTheme } from "./providers/theme-provider";
|
|
14
7
|
import { AccountSettings } from "./components-page/account-settings";
|
|
15
8
|
import { AuthPage } from "./components-page/auth-page";
|
|
9
|
+
import { EmailVerification } from "./components-page/email-verification";
|
|
10
|
+
import { ForgotPassword } from "./components-page/forgot-password";
|
|
11
|
+
import { PasswordReset } from "./components-page/password-reset";
|
|
12
|
+
import { SignIn } from "./components-page/sign-in";
|
|
13
|
+
import { SignUp } from "./components-page/sign-up";
|
|
16
14
|
import { CredentialSignIn } from "./components/credential-sign-in";
|
|
17
15
|
import { CredentialSignUp } from "./components/credential-sign-up";
|
|
16
|
+
import { UserAvatar } from "./components/elements/user-avatar";
|
|
18
17
|
import { MagicLinkSignIn } from "./components/magic-link-sign-in";
|
|
18
|
+
import { MessageCard } from "./components/message-cards/message-card";
|
|
19
19
|
import { OAuthButton } from "./components/oauth-button";
|
|
20
20
|
import { OAuthButtonGroup } from "./components/oauth-button-group";
|
|
21
|
+
import { UserButton } from "./components/user-button";
|
|
21
22
|
import {
|
|
22
23
|
SelectedTeamSwitcher
|
|
23
24
|
} from "./components/selected-team-switcher";
|
|
@@ -36,9 +37,10 @@ export {
|
|
|
36
37
|
SelectedTeamSwitcher,
|
|
37
38
|
SignIn,
|
|
38
39
|
SignUp,
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
default2 as StackHandler,
|
|
41
|
+
default3 as StackProvider,
|
|
41
42
|
StackTheme,
|
|
43
|
+
UserAvatar,
|
|
42
44
|
UserButton,
|
|
43
45
|
useStackApp,
|
|
44
46
|
useUser
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx"],"sourcesContent":["export { default as
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx"],"sourcesContent":["export { default as StackHandler } from \"./components-page/stack-handler\";\nexport { useStackApp, useUser } from \"./lib/hooks\";\nexport * from './lib/stack-app';\nexport { default as StackProvider } from \"./providers/stack-provider\";\nexport { StackTheme } from './providers/theme-provider';\n\nexport { AccountSettings } from \"./components-page/account-settings\";\nexport { AuthPage } from \"./components-page/auth-page\";\nexport { EmailVerification } from \"./components-page/email-verification\";\nexport { ForgotPassword } from \"./components-page/forgot-password\";\nexport { PasswordReset } from \"./components-page/password-reset\";\nexport { SignIn } from \"./components-page/sign-in\";\nexport { SignUp } from \"./components-page/sign-up\";\nexport { CredentialSignIn as CredentialSignIn } from \"./components/credential-sign-in\";\nexport { CredentialSignUp as CredentialSignUp } from \"./components/credential-sign-up\";\nexport { UserAvatar } from \"./components/elements/user-avatar\";\nexport { MagicLinkSignIn as MagicLinkSignIn } from \"./components/magic-link-sign-in\";\nexport { MessageCard } from \"./components/message-cards/message-card\";\nexport { OAuthButton } from \"./components/oauth-button\";\nexport { OAuthButtonGroup } from \"./components/oauth-button-group\";\nexport { UserButton } from \"./components/user-button\";\n\nexport {\n SelectedTeamSwitcher\n} from \"./components/selected-team-switcher\";\n\n"],"mappings":";AAAA,SAAoB,WAAXA,gBAA+B;AACxC,SAAS,aAAa,eAAe;AACrC,cAAc;AACd,SAAoB,WAAXA,gBAAgC;AACzC,SAAS,kBAAkB;AAE3B,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAA6B,wBAAwB;AACrD,SAA6B,wBAAwB;AACrD,SAAS,kBAAkB;AAC3B,SAA4B,uBAAuB;AACnD,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,OACK;","names":["default"]}
|
|
@@ -14,7 +14,7 @@ import { deepPlainEquals, filterUndefined, omit } from "@stackframe/stack-shared
|
|
|
14
14
|
import { neverResolve, runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
|
|
15
15
|
import { suspend, suspendIfSsr } from "@stackframe/stack-shared/dist/utils/react";
|
|
16
16
|
import { Result } from "@stackframe/stack-shared/dist/utils/results";
|
|
17
|
-
import { Store } from "@stackframe/stack-shared/dist/utils/stores";
|
|
17
|
+
import { Store, storeLock } from "@stackframe/stack-shared/dist/utils/stores";
|
|
18
18
|
import { mergeScopeStrings } from "@stackframe/stack-shared/dist/utils/strings";
|
|
19
19
|
import { getRelativePart, isRelative } from "@stackframe/stack-shared/dist/utils/urls";
|
|
20
20
|
import { generateUuid } from "@stackframe/stack-shared/dist/utils/uuids";
|
|
@@ -25,7 +25,7 @@ import { constructRedirectUrl } from "../utils/url";
|
|
|
25
25
|
import { addNewOAuthProviderOrScope, callOAuthCallback, signInWithOAuth } from "./auth";
|
|
26
26
|
import { createBrowserCookieHelper, createCookieHelper, deleteCookieClient, getCookieClient, setOrDeleteCookie, setOrDeleteCookieClient } from "./cookie";
|
|
27
27
|
var NextNavigation = scrambleDuringCompileTime(NextNavigationUnscrambled);
|
|
28
|
-
var clientVersion = "js @stackframe/stack@2.
|
|
28
|
+
var clientVersion = "js @stackframe/stack@2.7.0";
|
|
29
29
|
function getUrls(partial) {
|
|
30
30
|
const handler = partial.handler ?? "/handler";
|
|
31
31
|
const home = partial.home ?? "/";
|
|
@@ -1252,12 +1252,14 @@ var _StackClientAppImpl = class __StackClientAppImpl {
|
|
|
1252
1252
|
return false;
|
|
1253
1253
|
}
|
|
1254
1254
|
async _signOut(session, options) {
|
|
1255
|
-
await
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1255
|
+
await storeLock.withWriteLock(async () => {
|
|
1256
|
+
await this._interface.signOut(session);
|
|
1257
|
+
if (options?.redirectUrl) {
|
|
1258
|
+
await _redirectTo(options.redirectUrl);
|
|
1259
|
+
} else {
|
|
1260
|
+
await this.redirectToAfterSignOut();
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1261
1263
|
}
|
|
1262
1264
|
async signOut(options) {
|
|
1263
1265
|
const user = await this.getUser();
|
|
@@ -1899,6 +1901,9 @@ var _StackAdminAppImpl = class extends _StackServerAppImpl {
|
|
|
1899
1901
|
this._svixTokenCache = createCache(async () => {
|
|
1900
1902
|
return await this._interface.getSvixToken();
|
|
1901
1903
|
});
|
|
1904
|
+
this._metricsCache = createCache(async () => {
|
|
1905
|
+
return await this._interface.getMetrics();
|
|
1906
|
+
});
|
|
1902
1907
|
}
|
|
1903
1908
|
_adminOwnedProjectFromCrud(data, onRefresh) {
|
|
1904
1909
|
if (this._tokenStoreInit !== null) {
|
|
@@ -2108,6 +2113,29 @@ var _StackAdminAppImpl = class extends _StackServerAppImpl {
|
|
|
2108
2113
|
async _refreshApiKeys() {
|
|
2109
2114
|
await this._apiKeysCache.refresh([]);
|
|
2110
2115
|
}
|
|
2116
|
+
get [stackAppInternalsSymbol]() {
|
|
2117
|
+
return {
|
|
2118
|
+
...super[stackAppInternalsSymbol],
|
|
2119
|
+
useMetrics: () => {
|
|
2120
|
+
return useAsyncCache(this._metricsCache, [], "useMetrics()");
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
}
|
|
2124
|
+
async sendTestEmail(options) {
|
|
2125
|
+
const response = await this._interface.sendTestEmail({
|
|
2126
|
+
recipient_email: options.recipientEmail,
|
|
2127
|
+
email_config: {
|
|
2128
|
+
...options.emailConfig,
|
|
2129
|
+
sender_email: options.emailConfig.senderEmail,
|
|
2130
|
+
sender_name: options.emailConfig.senderName
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
2133
|
+
if (response.success) {
|
|
2134
|
+
return Result.ok(void 0);
|
|
2135
|
+
} else {
|
|
2136
|
+
return Result.error({ errorMessage: response.error_message ?? throwErr("Email test error not specified") });
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2111
2139
|
};
|
|
2112
2140
|
function contactChannelCreateOptionsToCrud(userId, options) {
|
|
2113
2141
|
return {
|