Merge branch 'dev' into docs-apiKeys

This commit is contained in:
Konsti Wohlwend 2025-04-22 11:25:19 -07:00 committed by GitHub
commit 369b06e7a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
52 changed files with 324 additions and 31 deletions

View File

@ -1,5 +1,21 @@
# @stackframe/stack-backend
## 2.8.7
### Patch Changes
- @stackframe/stack-emails@2.8.7
- @stackframe/stack-shared@2.8.7
## 2.8.6
### Patch Changes
- Various changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-emails@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-backend",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"clean": "rimraf src/generated && rimraf .next && rimraf node_modules",

View File

@ -1,5 +1,24 @@
# @stackframe/stack-dashboard
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
- @stackframe/stack-emails@2.8.7
- @stackframe/stack-shared@2.8.7
- @stackframe/stack-ui@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-ui@2.8.6
- @stackframe/stack@2.8.6
- @stackframe/stack-emails@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-dashboard",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"clean": "rimraf .next && rimraf node_modules",

View File

@ -1,5 +1,9 @@
# @stackframe/dev-launchpad
## 2.8.7
## 2.8.6
## 2.8.5
## 2.8.4

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/dev-launchpad",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "serve -p 8100 -s public",

View File

@ -1,5 +1,20 @@
# @stackframe/e2e-tests
## 2.8.7
### Patch Changes
- @stackframe/js@2.8.7
- @stackframe/stack-shared@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/js@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/e2e-tests",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"type": "module",
"scripts": {

View File

@ -1,5 +1,17 @@
# @stackframe/mcp-server
## 2.8.7
### Patch Changes
- @stackframe/js@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/js@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/mcp-server",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"type": "module",
"bin": {

View File

@ -1,5 +1,9 @@
# @stackframe/mock-oauth-server
## 2.8.7
## 2.8.6
## 2.8.5
## 2.8.4

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/mock-oauth-server",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"main": "index.js",
"scripts": {

View File

@ -1,5 +1,9 @@
# @stackframe/docs
## 2.8.7
## 2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/docs",
"version": "2.8.5",
"version": "2.8.7",
"description": "",
"main": "index.js",
"private": true,

View File

@ -1,5 +1,17 @@
# @stackframe/example-cjs-test
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/example-cjs-test",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "next dev --port 8110",

View File

@ -1,5 +1,23 @@
# @stackframe/example-demo-app
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
- @stackframe/stack-shared@2.8.7
- @stackframe/stack-ui@2.8.7
## 2.8.6
### Patch Changes
- Various changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-ui@2.8.6
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/example-demo-app",
"version": "2.8.5",
"version": "2.8.7",
"description": "",
"private": true,
"scripts": {

View File

@ -1,5 +1,22 @@
# @stackframe/docs-examples
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
- @stackframe/stack-shared@2.8.7
- @stackframe/stack-ui@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-ui@2.8.6
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/docs-examples",
"version": "2.8.5",
"version": "2.8.7",
"description": "",
"private": true,
"scripts": {

View File

@ -1,5 +1,17 @@
# @stackframe/e-commerce-demo
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/e-commerce-demo",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "next dev --port 8111",

View File

@ -1,5 +1,17 @@
# @stackframe/js-example
## 2.8.7
### Patch Changes
- @stackframe/js@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/js@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/js-example",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"description": "",
"main": "index.js",

View File

@ -1,5 +1,17 @@
# @stackframe/example-middleware-demo
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/example-middleware-demo",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "next dev --port 8112",

View File

@ -1,5 +1,17 @@
# @stackframe/example-partial-prerendering
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/example-partial-prerendering",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "next dev --port 8109",

View File

@ -1,5 +1,17 @@
# react-example
## 2.8.7
### Patch Changes
- @stackframe/react@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/react@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,7 +1,7 @@
{
"name": "react-example",
"private": true,
"version": "2.8.5",
"version": "2.8.7",
"type": "module",
"scripts": {
"dev": "vite --force --port 8120",

View File

@ -1,5 +1,17 @@
# @stackframe/example-supabase
## 2.8.7
### Patch Changes
- @stackframe/stack@2.8.7
## 2.8.6
### Patch Changes
- @stackframe/stack@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/example-supabase",
"version": "2.8.5",
"version": "2.8.7",
"private": true,
"scripts": {
"dev": "next dev --turbo --port 8115",

View File

@ -1,5 +1,18 @@
# @stackframe/init-stack
## 2.8.7
### Patch Changes
- @stackframe/stack-shared@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/init-stack",
"version": "2.8.5",
"version": "2.8.7",
"description": "The setup wizard for Stack. https://stack-auth.com",
"main": "dist/index.js",
"type": "module",

View File

@ -1,7 +1,7 @@
{
"//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY",
"name": "@stackframe/js",
"version": "2.8.5",
"version": "2.8.7",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{
"//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY",
"name": "@stackframe/react",
"version": "2.8.5",
"version": "2.8.7",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -1,5 +1,20 @@
# @stackframe/stack-emails
## 2.8.7
### Patch Changes
- @stackframe/stack-shared@2.8.7
- @stackframe/stack-ui@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-ui@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-emails",
"version": "2.8.5",
"version": "2.8.7",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"private": true,

View File

@ -1,5 +1,9 @@
# @stackframe/stack-sc
## 2.8.7
## 2.8.6
## 2.8.5
## 2.8.4

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-sc",
"version": "2.8.5",
"version": "2.8.7",
"exports": {
"./force-react-server": {
"types": "./dist/index.react-server.d.ts",

View File

@ -1,5 +1,13 @@
# @stackframe/stack-shared
## 2.8.7
## 2.8.6
### Patch Changes
- Various changes
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-shared",
"version": "2.8.5",
"version": "2.8.7",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",

View File

@ -290,10 +290,38 @@ export const passwordSchema = yupString().max(70);
* `emailSchema` instead until we do the DB migration.
*/
// eslint-disable-next-line no-restricted-syntax
export const strictEmailSchema = (message: string | undefined) => yupString().email(message).matches(/^[^.].*@.*\.[^.][^.]+$/, message);
export const strictEmailSchema = (message: string | undefined) => yupString().email(message).matches(/^[^.]+(\.[^.]+)*@.*\.[^.][^.]+$/, message);
// eslint-disable-next-line no-restricted-syntax
export const emailSchema = yupString().email();
import.meta.vitest?.test('strictEmailSchema', ({ expect }) => {
const validEmails = [
"a@example.com",
"abc@example.com",
"a.b@example.com",
"throwaway.mail+token@example.com",
"email-alt-dash@demo-mail.com",
"test-account@weird-domain.net",
"%!~&+{}=|`#@domain.test",
"admin@a.longtldexample",
];
for (const email of validEmails) {
expect(strictEmailSchema(undefined).validateSync(email)).toBe(email);
}
const invalidEmails = [
"test@localhost",
"test@gmail",
"test@gmail.com.a",
"test@gmail.a",
"test.@example.com",
"test..test@example.com",
".test@example.com",
];
for (const email of invalidEmails) {
expect(() => strictEmailSchema(undefined).validateSync(email)).toThrow();
}
});
// Request auth
export const clientOrHigherAuthTypeSchema = yupString().oneOf(['client', 'server', 'admin']).defined();
export const serverOrHigherAuthTypeSchema = yupString().oneOf(['server', 'admin']).defined();

View File

@ -1,5 +1,19 @@
# @stackframe/stack-ui
## 2.8.7
### Patch Changes
- @stackframe/stack-shared@2.8.7
## 2.8.6
### Patch Changes
- Various changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
## 2.8.5
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@stackframe/stack-ui",
"version": "2.8.5",
"version": "2.8.7",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": false,

View File

@ -1,7 +1,7 @@
{
"//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY",
"name": "@stackframe/stack",
"version": "2.8.5",
"version": "2.8.7",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -1,5 +1,23 @@
# @stackframe/stack
## 2.8.7
### Patch Changes
- Various changes
- @stackframe/stack-sc@2.8.7
- @stackframe/stack-shared@2.8.7
- @stackframe/stack-ui@2.8.7
## 2.8.6
### Patch Changes
- Updated dependencies
- @stackframe/stack-shared@2.8.6
- @stackframe/stack-ui@2.8.6
- @stackframe/stack-sc@2.8.6
## 2.8.5
### Patch Changes

View File

@ -11,7 +11,7 @@
"//": "NEXT_LINE_PLATFORM template",
"private": true,
"version": "2.8.5",
"version": "2.8.7",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -2,7 +2,7 @@
"//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY",
"name": "@stackframe/template",
"private": true,
"version": "2.8.5",
"version": "2.8.7",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -22,4 +22,5 @@ export { OAuthButton } from "./components/oauth-button";
export { OAuthButtonGroup } from "./components/oauth-button-group";
export { SelectedTeamSwitcher } from "./components/selected-team-switcher";
export { UserButton } from "./components/user-button";
export { CliAuthConfirmation } from "./components-page/cli-auth-confirm";
// END_PLATFORM

View File

@ -60,7 +60,7 @@ const NextNavigation = scrambleDuringCompileTime(NextNavigationUnscrambled);
const process = (globalThis as any).process ?? { env: {} }; // THIS_LINE_PLATFORM js react
const allClientApps = new Map<string, [checkString: string, app: StackClientApp<any, any>]>();
const allClientApps = new Map<string, [checkString: string | undefined, app: StackClientApp<any, any>]>();
export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, ProjectId extends string = string> implements StackClientApp<HasTokenStore, ProjectId> {
/**
@ -315,7 +315,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
if (allClientApps.has(this._uniqueIdentifier)) {
throw new StackAssertionError("A Stack client app with the same unique identifier already exists");
}
allClientApps.set(this._uniqueIdentifier, [this._options.checkString ?? "default check string", this]);
allClientApps.set(this._uniqueIdentifier, [this._options.checkString ?? undefined, this]);
}
/**
@ -1839,7 +1839,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
const existing = allClientApps.get(json.uniqueIdentifier);
if (existing) {
const [existingCheckString, clientApp] = existing;
if (existingCheckString !== providedCheckString) {
if (existingCheckString !== undefined && existingCheckString !== providedCheckString) {
throw new StackAssertionError("The provided app JSON does not match the configuration of the existing client app with the same unique identifier", { providedObj: json, existingString: existingCheckString });
}
return clientApp as any;

View File

@ -1,4 +1,3 @@
import "client-only"; // THIS_LINE_PLATFORM next
import React from "react";
import { TranslationContext } from "../providers/translation-provider-client";