@stackframe/stack-shared 1.2.1 → 2.0.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/helpers/fetch-token.d.ts +0 -1
- package/dist/helpers/password.d.ts +0 -1
- package/dist/hooks/use-async-external-store.d.ts +0 -1
- package/dist/hooks/use-strict-memo.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/interface/adminInterface.d.ts +0 -1
- package/dist/interface/clientInterface.d.ts +2 -2
- package/dist/interface/clientInterface.d.ts.map +1 -1
- package/dist/interface/clientInterface.js +1 -0
- package/dist/interface/serverInterface.d.ts +0 -1
- package/dist/utils/arrays.d.ts +0 -1
- package/dist/utils/bytes.d.ts +0 -1
- package/dist/utils/caches.d.ts +0 -1
- package/dist/utils/crypto.d.ts +0 -1
- package/dist/utils/dates.d.ts +0 -1
- package/dist/utils/dom.d.ts +0 -1
- package/dist/utils/env.d.ts +0 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +8 -0
- package/dist/utils/errors.d.ts +0 -1
- package/dist/utils/html.d.ts +0 -1
- package/dist/utils/json.d.ts +0 -1
- package/dist/utils/jwt.d.ts +0 -1
- package/dist/utils/maps.d.ts +0 -1
- package/dist/utils/math.d.ts +0 -1
- package/dist/utils/numbers.d.ts +0 -1
- package/dist/utils/objects.d.ts +0 -1
- package/dist/utils/password.d.ts +0 -1
- package/dist/utils/promises.d.ts +0 -1
- package/dist/utils/react.d.ts +2 -3
- package/dist/utils/react.d.ts.map +1 -1
- package/dist/utils/react.js +7 -4
- package/dist/utils/results.d.ts +0 -1
- package/dist/utils/stores.d.ts +0 -1
- package/dist/utils/strings.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -1
- package/dist/utils/uuids.d.ts +0 -1
- package/package.json +1 -1
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
* The most recent value will be kept from garbage collection until one of the dependencies becomes unreachable. This may be true even after the component no longer renders. Be wary of memory leaks.
|
|
5
5
|
*/
|
|
6
6
|
export declare function useStrictMemo<T>(callback: () => T, dependencies: any[]): T;
|
|
7
|
-
//# sourceMappingURL=use-strict-memo.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export { StackClientInterface, UserJson as UserJson, UserCustomizableJson, Clien
|
|
|
2
2
|
export { StackServerInterface, ServerUserJson, ServerUserCustomizableJson, } from "./interface/serverInterface";
|
|
3
3
|
export { StackAdminInterface, ApiKeySetBaseJson, ApiKeySetFirstViewJson, ApiKeySetJson, } from "./interface/adminInterface";
|
|
4
4
|
export { fetchTokenPrefix } from "./helpers/fetch-token";
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as oauth from 'oauth4webapi';
|
|
1
2
|
import { SignInErrorCode, SignUpErrorCode, EmailVerificationLinkErrorCode, PasswordResetLinkErrorCode, KnownErrorCode } from "../utils/types";
|
|
2
3
|
import { Result } from "../utils/results";
|
|
3
4
|
import { ReadonlyJson } from '../utils/json';
|
|
@@ -131,7 +132,7 @@ export declare class StackClientInterface {
|
|
|
131
132
|
signInWithCredential(email: string, password: string, tokenStore: TokenStore): Promise<SignInErrorCode | undefined>;
|
|
132
133
|
signUpWithCredential(email: string, password: string, emailVerificationRedirectUrl: string, tokenStore: TokenStore): Promise<SignUpErrorCode | undefined>;
|
|
133
134
|
getOAuthUrl(provider: string, redirectUrl: string, codeChallenge: string, state: string): Promise<string>;
|
|
134
|
-
callOAuthCallback(oauthParams: URLSearchParams, redirectUri: string, codeVerifier: string, state: string, tokenStore: TokenStore): Promise<
|
|
135
|
+
callOAuthCallback(oauthParams: URLSearchParams, redirectUri: string, codeVerifier: string, state: string, tokenStore: TokenStore): Promise<oauth.OAuth2TokenEndpointResponse>;
|
|
135
136
|
signOut(tokenStore: TokenStore): Promise<void>;
|
|
136
137
|
getClientUserByToken(tokenStore: TokenStore): Promise<Result<UserJson>>;
|
|
137
138
|
getClientProject(): Promise<Result<ClientProjectJson>>;
|
|
@@ -140,4 +141,3 @@ export declare class StackClientInterface {
|
|
|
140
141
|
createProject(project: Pick<ProjectJson, "displayName" | "description">, tokenStore: TokenStore): Promise<ProjectJson>;
|
|
141
142
|
}
|
|
142
143
|
export declare function getProductionModeErrors(project: ProjectJson): ProductionModeError[];
|
|
143
|
-
//# sourceMappingURL=clientInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientInterface.d.ts","sourceRoot":"","sources":["../../src/interface/clientInterface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clientInterface.d.ts","sourceRoot":"","sources":["../../src/interface/clientInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAGL,eAAe,EACf,eAAe,EAKf,8BAA8B,EAG9B,0BAA0B,EAC1B,cAAc,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAe,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAa,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,oBAAoB,GAAG;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,YAA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ACb,QAAQ,EAAE,MAAM,EAChB,4BAA4B,EAAE,MAAM,EACpC,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IA6BjC,WAAW,CACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IA0BZ,iBAAiB,CACrB,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,UAAU;IAkDlB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB9C,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAWvE,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAOtD,6BAA6B,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,UAAU,EAAE,UAAU;IAc3F,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAU5D,aAAa,CACjB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,aAAa,CAAC,EACzD,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,WAAW,CAAC;CAmBxB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,mBAAmB,EAAE,CA0CnF"}
|
|
@@ -329,6 +329,7 @@ export class StackClientInterface {
|
|
|
329
329
|
accessToken: result.access_token ?? null,
|
|
330
330
|
refreshToken: result.refresh_token ?? old?.refreshToken ?? null,
|
|
331
331
|
}));
|
|
332
|
+
return result;
|
|
332
333
|
}
|
|
333
334
|
async signOut(tokenStore) {
|
|
334
335
|
const tokenObj = await tokenStore.getOrWait();
|
|
@@ -28,4 +28,3 @@ export declare class StackServerInterface extends StackClientInterface {
|
|
|
28
28
|
setServerUserCustomizableData(userId: string, update: Partial<ServerUserCustomizableJson>): Promise<void>;
|
|
29
29
|
deleteServerUser(userId: string): Promise<void>;
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=serverInterface.d.ts.map
|
package/dist/utils/arrays.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export declare function range(startInclusive: number, endExclusive: number, step
|
|
|
8
8
|
export declare function rotateLeft(arr: readonly any[], n: number): any[];
|
|
9
9
|
export declare function rotateRight(arr: readonly any[], n: number): any[];
|
|
10
10
|
export declare function shuffle<T>(arr: readonly T[]): T[];
|
|
11
|
-
//# sourceMappingURL=arrays.d.ts.map
|
package/dist/utils/bytes.d.ts
CHANGED
package/dist/utils/caches.d.ts
CHANGED
package/dist/utils/crypto.d.ts
CHANGED
package/dist/utils/dates.d.ts
CHANGED
|
@@ -10,4 +10,3 @@ export declare function fromNowDetailed(date: Date): {
|
|
|
10
10
|
* Returns a string representation of the given date in the format expected by the `datetime-local` input type.
|
|
11
11
|
*/
|
|
12
12
|
export declare function getInputDatetimeLocalString(date: Date): string;
|
|
13
|
-
//# sourceMappingURL=dates.d.ts.map
|
package/dist/utils/dom.d.ts
CHANGED
package/dist/utils/env.d.ts
CHANGED
package/dist/utils/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUnD"}
|
package/dist/utils/env.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { throwErr } from "./errors";
|
|
2
|
+
import { deindent } from "./strings";
|
|
2
3
|
/**
|
|
3
4
|
* Returns the environment variable with the given name, throwing an error if it's undefined or the empty string.
|
|
4
5
|
*/
|
|
5
6
|
export function getEnvVariable(name) {
|
|
7
|
+
if (typeof window !== 'undefined') {
|
|
8
|
+
throw new Error(deindent `
|
|
9
|
+
Can't use getEnvVariable on the client because Next.js transpiles expressions of the kind process.env.XYZ at build-time on the client.
|
|
10
|
+
|
|
11
|
+
Use process.env.XYZ directly instead.
|
|
12
|
+
`);
|
|
13
|
+
}
|
|
6
14
|
return (process.env[name] ?? throwErr(`Missing environment variable: ${name}`)) || throwErr(`Empty environment variable: ${name}`);
|
|
7
15
|
}
|
package/dist/utils/errors.d.ts
CHANGED
package/dist/utils/html.d.ts
CHANGED
package/dist/utils/json.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export type ReadonlyJson = null | boolean | number | string | readonly ReadonlyJ
|
|
|
8
8
|
export declare function isJson(value: unknown): value is Json;
|
|
9
9
|
export declare function parseJson(json: string): Result<Json>;
|
|
10
10
|
export declare function stringifyJson(json: Json): Result<string>;
|
|
11
|
-
//# sourceMappingURL=json.d.ts.map
|
package/dist/utils/jwt.d.ts
CHANGED
package/dist/utils/maps.d.ts
CHANGED
package/dist/utils/math.d.ts
CHANGED
package/dist/utils/numbers.d.ts
CHANGED
package/dist/utils/objects.d.ts
CHANGED
package/dist/utils/password.d.ts
CHANGED
package/dist/utils/promises.d.ts
CHANGED
|
@@ -48,4 +48,3 @@ export type RateLimitOptions = {
|
|
|
48
48
|
export declare function rateLimited<T>(func: () => Promise<T>, options: RateLimitOptions): () => Promise<T>;
|
|
49
49
|
export declare function throttled<T, A extends any[]>(func: (...args: A) => Promise<T>, delayMs: number): (...args: A) => Promise<T>;
|
|
50
50
|
export {};
|
|
51
|
-
//# sourceMappingURL=promises.d.ts.map
|
package/dist/utils/react.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare function getNodeText(node: React.ReactNode): string;
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function suspend(): never;
|
|
9
9
|
/**
|
|
10
|
-
* Use this in a component or a hook to disable SSR.
|
|
10
|
+
* Use this in a component or a hook to disable SSR. Should be wrapped in a Suspense boundary, or it will throw an error.
|
|
11
11
|
*/
|
|
12
|
-
export declare function suspendIfSsr(): void;
|
|
13
|
-
//# sourceMappingURL=react.d.ts.map
|
|
12
|
+
export declare function suspendIfSsr(caller?: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/utils/react.tsx"],"names":[],"mappings":";AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAczD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,KAAK,CAG/B;AAGD;;GAEG;AACH,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/utils/react.tsx"],"names":[],"mappings":";AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAczD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,KAAK,CAG/B;AAGD;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,QAoB3C"}
|
package/dist/utils/react.js
CHANGED
|
@@ -26,18 +26,21 @@ export function suspend() {
|
|
|
26
26
|
throw new Error("Somehow a Promise that never resolves was resolved?");
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Use this in a component or a hook to disable SSR.
|
|
29
|
+
* Use this in a component or a hook to disable SSR. Should be wrapped in a Suspense boundary, or it will throw an error.
|
|
30
30
|
*/
|
|
31
|
-
export function suspendIfSsr() {
|
|
31
|
+
export function suspendIfSsr(caller) {
|
|
32
32
|
if (typeof window === "undefined") {
|
|
33
33
|
const error = Object.assign(new Error(deindent `
|
|
34
|
-
This code path
|
|
34
|
+
${caller ?? "This code path"} attempted to display a loading indicator during SSR by falling back to the nearest Suspense boundary. If you see this error, it means no Suspense boundary was found, and no loading indicator could be displayed. Make sure you are not catching this error with try-catch, and that the component is rendered inside a Suspense boundary, for example by adding a \`loading.tsx\` file in your app directory.
|
|
35
35
|
|
|
36
|
-
See: https://
|
|
36
|
+
See: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
|
|
37
|
+
|
|
38
|
+
More information on SSR and Suspense boundaries: https://react.dev/reference/react/Suspense#providing-a-fallback-for-server-errors-and-client-only-content
|
|
37
39
|
`), {
|
|
38
40
|
// set the digest so nextjs doesn't log the error
|
|
39
41
|
// https://github.com/vercel/next.js/blob/d01d6d9c35a8c2725b3d74c1402ab76d4779a6cf/packages/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts#L14
|
|
40
42
|
digest: "BAILOUT_TO_CLIENT_SIDE_RENDERING",
|
|
43
|
+
reason: caller ?? "suspendIfSsr()",
|
|
41
44
|
});
|
|
42
45
|
throw error;
|
|
43
46
|
}
|
package/dist/utils/results.d.ts
CHANGED
package/dist/utils/stores.d.ts
CHANGED
package/dist/utils/strings.d.ts
CHANGED
|
@@ -38,4 +38,3 @@ export declare function trimLines(s: string): string;
|
|
|
38
38
|
export declare function templateIdentity(strings: TemplateStringsArray | readonly string[], ...values: any[]): string;
|
|
39
39
|
export declare function deindent(code: string): string;
|
|
40
40
|
export declare function deindent(strings: TemplateStringsArray | readonly string[], ...values: any[]): string;
|
|
41
|
-
//# sourceMappingURL=strings.d.ts.map
|
package/dist/utils/types.d.ts
CHANGED
package/dist/utils/uuids.d.ts
CHANGED