Skip to content

Commit d9b6413

Browse files
committed
chore: revert plugin type changes
1 parent 2fefb14 commit d9b6413

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

lib/build/types.d.ts

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import type { CookieHandlerInput } from "supertokens-web-js/utils/cookieHandler/
4646
import type NormalisedURLDomain from "supertokens-web-js/utils/normalisedURLDomain";
4747
import type NormalisedURLPath from "supertokens-web-js/utils/normalisedURLPath";
4848
import type { WindowHandlerInput } from "supertokens-web-js/utils/windowHandler/types";
49-
import type { SuperTokensPlugin as SuperTokensPluginWebJS } from "supertokens-web-js";
5049

5150
type SuccessRedirectContextCommon = {
5251
recipeId:
@@ -532,8 +531,12 @@ export type PluginRouteHandler = {
532531
handler: () => JSX.Element;
533532
};
534533

535-
export type SuperTokensPlugin = SuperTokensPluginWebJS & {
534+
// TODO: this should probably derive from the web-js version
535+
export type SuperTokensPlugin = {
536+
id: string;
537+
version?: string;
536538
compatibleAuthReactSDKVersions?: string | string[]; // match the syntax of the engines field in package.json
539+
compatibleWebJSSDKVersions?: string | string[]; // match the syntax of the engines field in package.json
537540
init?: (config: SuperTokensPublicConfig, allPlugins: SuperTokensPublicPlugin[], sdkVersion: string) => void;
538541
dependencies?: (
539542
config: SuperTokensPublicConfig,
@@ -555,6 +558,7 @@ export type SuperTokensPlugin = SuperTokensPluginWebJS & {
555558
| PluginRouteHandler[];
556559

557560
config?: (config: SuperTokensPublicConfig) => Omit<SuperTokensPublicConfig, "appInfo"> | undefined;
561+
exports?: Record<string, any>;
558562
};
559563

560564
export const nonPublicConfigProperties = ["experimental"] as const;

0 commit comments

Comments
 (0)