@hexclave/next 1.0.72 → 1.0.74
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/{admin-app-impl-DLqm4Zqy.d.ts → admin-app-impl-FZdANO62.d.ts} +15 -9
- package/dist/admin-app-impl-FZdANO62.d.ts.map +1 -0
- package/dist/clickmap/clickmap-core.d.ts +1 -1
- package/dist/clickmap/index.d.ts +1 -1
- package/dist/{client-app-DlKeB4SB.d.ts → client-app-BCT5p_70.d.ts} +12 -4
- package/dist/{client-app-DlKeB4SB.d.ts.map → client-app-BCT5p_70.d.ts.map} +1 -1
- package/dist/components/selected-team-switcher.d.ts +1 -1
- package/dist/components/team-icon.d.ts +1 -1
- package/dist/components/team-switcher.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.d.ts +1 -1
- package/dist/components-page/hexclave-handler-client.d.ts +1 -1
- package/dist/components-page/hexclave-handler.d.ts +1 -1
- package/dist/components-page/oauth-callback.js +3 -18
- package/dist/components-page/oauth-callback.js.map +1 -1
- package/dist/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/dev-tool/index.d.ts +1 -1
- package/dist/esm/components-page/oauth-callback.d.ts.map +1 -1
- package/dist/esm/components-page/oauth-callback.js +4 -19
- package/dist/esm/components-page/oauth-callback.js.map +1 -1
- package/dist/esm/lib/auth.d.ts.map +1 -1
- package/dist/esm/lib/auth.js +1 -1
- package/dist/esm/lib/auth.js.map +1 -1
- package/dist/esm/lib/auth.test.js +2 -2
- package/dist/esm/lib/auth.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +6 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +4 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.js +102 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +57 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +7 -4
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +44 -12
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.d.ts +13 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.js +15 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.test.js +25 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-back-state.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js +67 -12
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.test.js +87 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +9 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.d.ts +4 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.js +3 -0
- package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -1
- package/dist/esm/utils/url.js +10 -2
- package/dist/esm/utils/url.js.map +1 -1
- package/dist/esm/utils/url.test.d.ts +1 -0
- package/dist/esm/utils/url.test.js +28 -0
- package/dist/esm/utils/url.test.js.map +1 -0
- package/dist/{hexclave-provider-B_KtSfuf.d.ts → hexclave-provider-BKxi3Vy-.d.ts} +2 -2
- package/dist/{hexclave-provider-B_KtSfuf.d.ts.map → hexclave-provider-BKxi3Vy-.d.ts.map} +1 -1
- package/dist/{hooks-nHRIrxA9.d.ts → hooks-CUe5bc3s.d.ts} +2 -2
- package/dist/{hooks-nHRIrxA9.d.ts.map → hooks-CUe5bc3s.d.ts.map} +1 -1
- package/dist/{index-Dq4xsW7_.d.ts → index-B-MazpM_.d.ts} +5 -2
- package/dist/{index-Dq4xsW7_.d.ts.map → index-B-MazpM_.d.ts.map} +1 -1
- package/dist/{index-CsExJ_pK.d.ts → index-CvB7XacB.d.ts} +2 -2
- package/dist/{index-CsExJ_pK.d.ts.map → index-CvB7XacB.d.ts.map} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +1 -1
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/auth.test.js +2 -2
- package/dist/lib/auth.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +4 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.js +101 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +57 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +43 -11
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.d.ts +13 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.js +15 -0
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.test.js +24 -0
- package/dist/lib/hexclave-app/apps/implementations/redirect-back-state.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js +67 -12
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.test.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.test.js +86 -0
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.test.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +1 -1
- package/dist/lib/hexclave-app/index.d.ts +2 -2
- package/dist/lib/hexclave-app/project-configs/index.d.ts +1 -1
- package/dist/lib/hexclave-app/projects/index.d.ts +1 -1
- package/dist/lib/hexclave-app/projects/index.js +3 -0
- package/dist/lib/hexclave-app/projects/index.js.map +1 -1
- package/dist/lib/hexclave-app/teams/index.d.ts +1 -1
- package/dist/lib/hexclave-app/users/index.d.ts +1 -1
- package/dist/lib/hooks.d.ts +1 -1
- package/dist/oauth-callback-tCVTRbF2.d.ts.map +1 -1
- package/dist/providers/hexclave-context.d.ts +1 -1
- package/dist/providers/hexclave-provider-client.d.ts +1 -1
- package/dist/providers/hexclave-provider.d.ts +1 -1
- package/dist/pushed-config-error-overlay/index.d.ts +1 -1
- package/dist/{redirect-page-urls-NUHUchgR.d.ts → redirect-page-urls-BEWG0AtP.d.ts} +2 -1
- package/dist/redirect-page-urls-BEWG0AtP.d.ts.map +1 -0
- package/dist/utils/url.js +10 -2
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/url.test.d.ts +1 -0
- package/dist/utils/url.test.js +27 -0
- package/dist/utils/url.test.js.map +1 -0
- package/package.json +4 -4
- package/src/components-page/oauth-callback.tsx +0 -16
- package/src/lib/auth.test.ts +2 -2
- package/src/lib/auth.ts +3 -1
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +4 -1
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.automatic-side-effects.test.ts +126 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.ts +75 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +73 -16
- package/src/lib/hexclave-app/apps/implementations/redirect-back-state.test.ts +29 -1
- package/src/lib/hexclave-app/apps/implementations/redirect-back-state.ts +17 -0
- package/src/lib/hexclave-app/apps/implementations/redirect-page-urls.test.ts +119 -0
- package/src/lib/hexclave-app/apps/implementations/redirect-page-urls.ts +104 -12
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +12 -2
- package/src/lib/hexclave-app/project-configs/index.ts +4 -1
- package/src/lib/hexclave-app/projects/index.ts +3 -0
- package/src/utils/url.test.ts +54 -0
- package/src/utils/url.ts +12 -3
- package/dist/admin-app-impl-DLqm4Zqy.d.ts.map +0 -1
- package/dist/redirect-page-urls-NUHUchgR.d.ts.map +0 -1
|
@@ -37,6 +37,13 @@ type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId e
|
|
|
37
37
|
* the app is never used or disposed of immediately. To disable this behavior, set this option to true.
|
|
38
38
|
*/
|
|
39
39
|
noAutomaticPrefetch?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the constructor starts browser integrations and other automatic side effects. Defaults to `true`.
|
|
42
|
+
*
|
|
43
|
+
* Set this to `false` when the app is instantiated inside a custom dashboard. Explicit method calls remain
|
|
44
|
+
* available and can still perform their documented side effects.
|
|
45
|
+
*/
|
|
46
|
+
automaticSideEffects?: boolean;
|
|
40
47
|
/**
|
|
41
48
|
* Options for analytics and session recording. Replays are enabled by default;
|
|
42
49
|
* set `{ replays: { enabled: false } }` to opt out.
|
|
@@ -196,7 +203,8 @@ type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends s
|
|
|
196
203
|
replace?: boolean;
|
|
197
204
|
}): Promise<void>;
|
|
198
205
|
getRedirectToHandlerUrl(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<string>;
|
|
199
|
-
redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>;
|
|
206
|
+
redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>; /** Raw flow metadata only. Never navigate to this value without normal redirect validation. */
|
|
207
|
+
getRawAfterAuthReturnTo(): string | null;
|
|
200
208
|
signInWithTokens(tokens: {
|
|
201
209
|
accessToken: string;
|
|
202
210
|
refreshToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-app.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"mappings":";;;;;;;;;;;;KAgBY,gCAAA;EACV,OAAA;IAAqB,OAAA;IAAiB,MAAA;EAAA;EACtC,mBAAA,GAAsB,MAAA;EACtB,SAAA,GAAY,SAAA;EACZ,oBAAA;EACA,IAAA,GAAO,iBAAA;EACP,mBAAA,GAAsB,OAAA,CAAQ,mBAAA;EAC9B,UAAA,GAAa,cAAA,CAAe,aAAA;EAC5B,cAAA,GAAiB,cAAA;EACjB,YAAA,GAAe,cAAA;
|
|
1
|
+
{"version":3,"file":"client-app.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"mappings":";;;;;;;;;;;;KAgBY,gCAAA;EACV,OAAA;IAAqB,OAAA;IAAiB,MAAA;EAAA;EACtC,mBAAA,GAAsB,MAAA;EACtB,SAAA,GAAY,SAAA;EACZ,oBAAA;EACA,IAAA,GAAO,iBAAA;EACP,mBAAA,GAAsB,OAAA,CAAQ,mBAAA;EAC9B,UAAA,GAAa,cAAA,CAAe,aAAA;EAC5B,cAAA,GAAiB,cAAA;EACjB,YAAA,GAAe,cAAA;EA8BH;;;;;;;EArBZ,OAAA;EAyBiF;;;;;EA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AgB,MAAA;AAAA;EAAqB,MAAA;EAAgB,MAAA;AAAA;EAAqB,MAAA;EAAgB,gBAAA;AAAA,IAC7F,IAAA,WAGA,kBAAA,cAEC,OAAA,EAAS,8BAAA,GACV,oBAAA,UAGA,kBAAA,cAEC,OAAA,EAAS,8BAAA,GACV,oBAAA,+BAGqB,UAAA,OAAiB,IAAA,CAAK,WAAA,qCAAgD,OAAA,GAAU,iBAAA,KAAsB,OAAA,WAC3H,QAAA,CAAS,aAAA;EAAgC,UAAA,EAAY,cAAA;AAAA;EAAqB,UAAA,GAAa,cAAA;AAAA;;KAG/E,yBAAA;EAAA,2DAGe,cAAA,yDAEvB,OAAA,EAAS,gCAAA,CAAiC,aAAA,EAAe,SAAA,IAAa,cAAA,CAAe,aAAA,EAAe,SAAA;EAAA,KAClG,OAAA,EAAS,gCAAA,oBAAoD,cAAA;EAAA,CAEhE,0BAAA;IACC,cAAA,0DACE,IAAA,EAAM,kBAAA,CAAmB,aAAA,EAAe,SAAA,IACvC,cAAA,CAAe,aAAA,EAAe,SAAA;EAAA;AAAA;AAAA,KAGzB,mCAAA,4DAA+F,gCAAA,CAAiC,aAAA,EAAe,SAAA;AAAA,KAC/I,qBAAA,4DAAiF,kBAAA,CAAmB,aAAA,EAAe,SAAA;AAAA,KACnH,iBAAA,+EAAgG,cAAA,CAAe,aAAA,EAAe,SAAA;AAAA,KAC9H,4BAAA,GAA+B,yBAAyB;AAAA,cACvD,iBAAA,EAAmB,4BAAqD;;cAExE,cAAA,EAAgB,yBAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownErrors } from \"@hexclave/shared\";\nimport { CurrentUserCrud } from \"@hexclave/shared/dist/interface/crud/current-user\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, AuthLike, GetCurrentPartialUserOptions, GetCurrentUserOptions, HandlerUrlOptions, HandlerUrls, OAuthScopesOnSignIn, RedirectMethod, RedirectToOptions, ResolvedHandlerUrls, hexclaveAppInternalsSymbol, TokenStoreInit } from \"../../common\";\nimport type { RequestListener } from \"@hexclave/shared/dist/interface/client-interface\";\nimport { CustomerInvoicesList, CustomerInvoicesRequestOptions, CustomerProductsList, CustomerProductsRequestOptions, Item } from \"../../customers\";\nimport { Project } from \"../../projects\";\nimport { ProjectCurrentUser, SyncedPartialUser, TokenPartialUser } from \"../../users\";\nimport { _HexclaveClientAppImpl } from \"../implementations\";\nimport { AnalyticsOptions } from \"../implementations/session-replay\";\n\n/** @deprecated Use `HexclaveClientAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {\n baseUrl?: string | { browser: string, server: string },\n extraRequestHeaders?: Record<string, string>,\n projectId?: ProjectId,\n publishableClientKey?: string,\n urls?: HandlerUrlOptions,\n oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>,\n tokenStore?: TokenStoreInit<HasTokenStore>,\n redirectMethod?: RedirectMethod,\n inheritsFrom?: StackClientApp<any, any>,\n\n /**\n * Whether to show the Hexclave dev tool indicator in browser-like environments.\n *\n * - `true`: always show\n * - `false`: never show\n * - `\"auto\"` (default): show based on NODE_ENV or origin heuristics\n */\n devTool?: boolean | \"auto\",\n\n /**\n * By default, the Stack app will automatically prefetch some data from Stack's server when this app is first\n * constructed. This improves the performance of your app, but will create network requests that are unnecessary if\n * the app is never used or disposed of immediately. To disable this behavior, set this option to true.\n */\n noAutomaticPrefetch?: boolean,\n\n /**\n * Options for analytics and session recording. Replays are enabled by default;\n * set `{ replays: { enabled: false } }` to opt out.\n */\n analytics?: AnalyticsOptions,\n} & (\n { tokenStore: TokenStoreInit<HasTokenStore> } | { tokenStore?: undefined, inheritsFrom: StackClientApp<HasTokenStore, any> }\n) & (\n string extends ProjectId ? unknown : ({ projectId: ProjectId } | { inheritsFrom: StackClientApp<any, ProjectId> })\n);\n\n\n/** @deprecated Use `HexclaveClientAppJson` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined } & {\n uniqueIdentifier: string,\n // note: if you add more fields here, make sure to ensure the checkString in the constructor has/doesn't have them\n};\n\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & {\n readonly projectId: ProjectId,\n\n /**\n * The version of the Hexclave SDK.\n */\n readonly version: string,\n\n /**\n * @deprecated Do not use `app.urls` for navigation. It is static and does not include runtime redirect-back,\n * cross-domain auth, or sign-out state. Use the matching `redirectToXyz()` method instead, for example\n * `redirectToSignIn()`, `redirectToSignUp()`, `redirectToSignOut()`, or `redirectToAccountSettings()`.\n */\n readonly urls: Readonly<ResolvedHandlerUrls>,\n\n signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,\n signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"EmailPasswordMismatch\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signUpWithCredential(options: {\n email: string,\n password: string,\n noRedirect?: boolean,\n } & ({ noVerificationCallback: true } | { noVerificationCallback?: false, verificationCallbackUrl?: string })): Promise<Result<undefined, KnownErrors[\"UserWithEmailAlreadyExists\"] | KnownErrors[\"ContactChannelAlreadyUsedForAuthBySomeoneElse\"] | KnownErrors[\"PasswordRequirementsNotMet\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n signInWithPasskey(): Promise<Result<undefined, KnownErrors[\"PasskeyAuthenticationFailed\"] | KnownErrors[\"InvalidTotpCode\"] | KnownErrors[\"PasskeyWebAuthnError\"]>>,\n callOAuthCallback(): Promise<boolean>,\n promptCliLogin(options: { appUrl: string, expiresInMillis?: number, anonRefreshToken?: string, promptLink?: (url: string, loginCode: string) => void }): Promise<Result<string, KnownErrors[\"CliAuthError\"] | KnownErrors[\"CliAuthExpiredError\"] | KnownErrors[\"CliAuthUsedError\"]>>,\n sendForgotPasswordEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<undefined, KnownErrors[\"UserNotFound\"]>>,\n sendMagicLinkEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<{ nonce: string }, KnownErrors[\"RedirectUrlNotWhitelisted\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n resetPassword(options: { code: string, password: string }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyPasswordResetCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyTeamInvitationCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n acceptTeamInvitation(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n getTeamInvitationDetails(code: string): Promise<Result<{ teamDisplayName: string }, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n verifyEmail(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n signInWithMagicLink(code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signInWithMfa(otp: string, code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n\n redirectToOAuthCallback(): Promise<void>,\n\n getConvexClientAuth(options: HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }): (args: { forceRefreshToken: boolean }) => Promise<string | null>,\n getConvexHttpClientAuth(options: { tokenStore: TokenStoreInit }): Promise<string>,\n\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): ProjectCurrentUser<ProjectId>,\n useUser(options?: GetCurrentUserOptions<HasTokenStore>): ProjectCurrentUser<ProjectId> | null,\n\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options?: GetCurrentUserOptions<HasTokenStore>): Promise<ProjectCurrentUser<ProjectId> | null>,\n\n cancelSubscription(options: { productId: string, subscriptionId?: string } | { productId: string, subscriptionId?: string, teamId: string }): Promise<void>,\n\n // note: we don't special-case 'anonymous' here to return non-null, see GetPartialUserOptions for more details\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): Promise<SyncedPartialUser | TokenPartialUser | null>,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): SyncedPartialUser | TokenPartialUser | null,\n useNavigate(): (to: string) => void, // THIS_LINE_PLATFORM react-like\n\n [hexclaveAppInternalsSymbol]: {\n toClientJson(): StackClientAppJson<HasTokenStore, ProjectId>,\n setCurrentUser(userJsonPromise: Promise<CurrentUserCrud['Client']['Read'] | null>): void,\n getConstructorOptions(): StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined },\n sendSessionReplayBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n sendAnalyticsEventBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n addRequestListener(listener: RequestListener): () => void,\n sendRequest(path: string, requestOptions: RequestInit, requestType?: \"client\" | \"server\" | \"admin\"): Promise<Response>,\n getUrls(): Readonly<ResolvedHandlerUrls>,\n getRedirectMethod(): RedirectMethod,\n redirectToUrl(url: string | URL, options?: { replace?: boolean }): Promise<void>,\n getRedirectToHandlerUrl(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<string>,\n redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>,\n signInWithTokens(tokens: { accessToken: string, refreshToken: string }): Promise<void>,\n awaitPendingAuthResolutions(): Promise<void>,\n isTrustedRedirectUrl(url: string): Promise<boolean>,\n },\n }\n & AsyncStoreProperty<\"project\", [], Project, false>\n & AsyncStoreProperty<\n \"item\",\n [{ itemId: string, userId: string } | { itemId: string, teamId: string } | { itemId: string, customCustomerId: string }],\n Item,\n false\n >\n & AsyncStoreProperty<\n \"products\",\n [options: CustomerProductsRequestOptions],\n CustomerProductsList,\n true\n >\n & AsyncStoreProperty<\n \"invoices\",\n [options: CustomerInvoicesRequestOptions],\n CustomerInvoicesList,\n true\n >\n & { [K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void> }\n & AuthLike<HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }>\n);\n/** @deprecated Use `HexclaveClientAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructor = {\n new <\n TokenStoreType extends string,\n HasTokenStore extends (TokenStoreType extends {} ? true : boolean),\n ProjectId extends string\n >(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>,\n new(options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>,\n\n [hexclaveAppInternalsSymbol]: {\n fromClientJson<HasTokenStore extends boolean, ProjectId extends string>(\n json: StackClientAppJson<HasTokenStore, ProjectId>\n ): StackClientApp<HasTokenStore, ProjectId>,\n },\n};\nexport type HexclaveClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppJson<HasTokenStore, ProjectId>;\nexport type HexclaveClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackClientApp<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppConstructor = StackClientAppConstructor;\nexport const HexclaveClientApp: HexclaveClientAppConstructor = _HexclaveClientAppImpl;\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackClientApp: StackClientAppConstructor = HexclaveClientApp;\n"],"mappings":";;AAwLA,MAAa,oBAAkD;;AAE/D,MAAa,iBAA4C"}
|
|
1
|
+
{"version":3,"file":"client-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownErrors } from \"@hexclave/shared\";\nimport type { RequestListener } from \"@hexclave/shared/dist/interface/client-interface\";\nimport { CurrentUserCrud } from \"@hexclave/shared/dist/interface/crud/current-user\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, AuthLike, GetCurrentPartialUserOptions, GetCurrentUserOptions, HandlerUrlOptions, HandlerUrls, hexclaveAppInternalsSymbol, OAuthScopesOnSignIn, RedirectMethod, RedirectToOptions, ResolvedHandlerUrls, TokenStoreInit } from \"../../common\";\nimport { CustomerInvoicesList, CustomerInvoicesRequestOptions, CustomerProductsList, CustomerProductsRequestOptions, Item } from \"../../customers\";\nimport { Project } from \"../../projects\";\nimport { ProjectCurrentUser, SyncedPartialUser, TokenPartialUser } from \"../../users\";\nimport { _HexclaveClientAppImpl } from \"../implementations\";\nimport { AnalyticsOptions } from \"../implementations/session-replay\";\n\n/** @deprecated Use `HexclaveClientAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {\n baseUrl?: string | { browser: string, server: string },\n extraRequestHeaders?: Record<string, string>,\n projectId?: ProjectId,\n publishableClientKey?: string,\n urls?: HandlerUrlOptions,\n oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>,\n tokenStore?: TokenStoreInit<HasTokenStore>,\n redirectMethod?: RedirectMethod,\n inheritsFrom?: StackClientApp<any, any>,\n\n /**\n * Whether to show the Hexclave dev tool indicator in browser-like environments.\n *\n * - `true`: always show\n * - `false`: never show\n * - `\"auto\"` (default): show based on NODE_ENV or origin heuristics\n */\n devTool?: boolean | \"auto\",\n\n /**\n * By default, the Stack app will automatically prefetch some data from Stack's server when this app is first\n * constructed. This improves the performance of your app, but will create network requests that are unnecessary if\n * the app is never used or disposed of immediately. To disable this behavior, set this option to true.\n */\n noAutomaticPrefetch?: boolean,\n\n /**\n * Whether the constructor starts browser integrations and other automatic side effects. Defaults to `true`.\n *\n * Set this to `false` when the app is instantiated inside a custom dashboard. Explicit method calls remain\n * available and can still perform their documented side effects.\n */\n automaticSideEffects?: boolean,\n\n /**\n * Options for analytics and session recording. Replays are enabled by default;\n * set `{ replays: { enabled: false } }` to opt out.\n */\n analytics?: AnalyticsOptions,\n} & (\n { tokenStore: TokenStoreInit<HasTokenStore> } | { tokenStore?: undefined, inheritsFrom: StackClientApp<HasTokenStore, any> }\n) & (\n string extends ProjectId ? unknown : ({ projectId: ProjectId } | { inheritsFrom: StackClientApp<any, ProjectId> })\n);\n\n\n/** @deprecated Use `HexclaveClientAppJson` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined } & {\n uniqueIdentifier: string,\n // note: if you add more fields here, make sure to ensure the checkString in the constructor has/doesn't have them\n};\n\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & {\n readonly projectId: ProjectId,\n\n /**\n * The version of the Hexclave SDK.\n */\n readonly version: string,\n\n /**\n * @deprecated Do not use `app.urls` for navigation. It is static and does not include runtime redirect-back,\n * cross-domain auth, or sign-out state. Use the matching `redirectToXyz()` method instead, for example\n * `redirectToSignIn()`, `redirectToSignUp()`, `redirectToSignOut()`, or `redirectToAccountSettings()`.\n */\n readonly urls: Readonly<ResolvedHandlerUrls>,\n\n signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,\n signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"EmailPasswordMismatch\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signUpWithCredential(options: {\n email: string,\n password: string,\n noRedirect?: boolean,\n } & ({ noVerificationCallback: true } | { noVerificationCallback?: false, verificationCallbackUrl?: string })): Promise<Result<undefined, KnownErrors[\"UserWithEmailAlreadyExists\"] | KnownErrors[\"ContactChannelAlreadyUsedForAuthBySomeoneElse\"] | KnownErrors[\"PasswordRequirementsNotMet\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n signInWithPasskey(): Promise<Result<undefined, KnownErrors[\"PasskeyAuthenticationFailed\"] | KnownErrors[\"InvalidTotpCode\"] | KnownErrors[\"PasskeyWebAuthnError\"]>>,\n callOAuthCallback(): Promise<boolean>,\n promptCliLogin(options: { appUrl: string, expiresInMillis?: number, anonRefreshToken?: string, promptLink?: (url: string, loginCode: string) => void }): Promise<Result<string, KnownErrors[\"CliAuthError\"] | KnownErrors[\"CliAuthExpiredError\"] | KnownErrors[\"CliAuthUsedError\"]>>,\n sendForgotPasswordEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<undefined, KnownErrors[\"UserNotFound\"]>>,\n sendMagicLinkEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<{ nonce: string }, KnownErrors[\"RedirectUrlNotWhitelisted\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n resetPassword(options: { code: string, password: string }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyPasswordResetCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyTeamInvitationCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n acceptTeamInvitation(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n getTeamInvitationDetails(code: string): Promise<Result<{ teamDisplayName: string }, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n verifyEmail(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n signInWithMagicLink(code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signInWithMfa(otp: string, code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n\n redirectToOAuthCallback(): Promise<void>,\n\n getConvexClientAuth(options: HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }): (args: { forceRefreshToken: boolean }) => Promise<string | null>,\n getConvexHttpClientAuth(options: { tokenStore: TokenStoreInit }): Promise<string>,\n\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): ProjectCurrentUser<ProjectId>,\n useUser(options?: GetCurrentUserOptions<HasTokenStore>): ProjectCurrentUser<ProjectId> | null,\n\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options?: GetCurrentUserOptions<HasTokenStore>): Promise<ProjectCurrentUser<ProjectId> | null>,\n\n cancelSubscription(options: { productId: string, subscriptionId?: string } | { productId: string, subscriptionId?: string, teamId: string }): Promise<void>,\n\n // note: we don't special-case 'anonymous' here to return non-null, see GetPartialUserOptions for more details\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): Promise<SyncedPartialUser | TokenPartialUser | null>,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): SyncedPartialUser | TokenPartialUser | null,\n useNavigate(): (to: string) => void, // THIS_LINE_PLATFORM react-like\n\n [hexclaveAppInternalsSymbol]: {\n toClientJson(): StackClientAppJson<HasTokenStore, ProjectId>,\n setCurrentUser(userJsonPromise: Promise<CurrentUserCrud['Client']['Read'] | null>): void,\n getConstructorOptions(): StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined },\n sendSessionReplayBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n sendAnalyticsEventBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n addRequestListener(listener: RequestListener): () => void,\n sendRequest(path: string, requestOptions: RequestInit, requestType?: \"client\" | \"server\" | \"admin\"): Promise<Response>,\n getUrls(): Readonly<ResolvedHandlerUrls>,\n getRedirectMethod(): RedirectMethod,\n redirectToUrl(url: string | URL, options?: { replace?: boolean }): Promise<void>,\n getRedirectToHandlerUrl(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<string>,\n redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>,\n /** Raw flow metadata only. Never navigate to this value without normal redirect validation. */\n getRawAfterAuthReturnTo(): string | null,\n signInWithTokens(tokens: { accessToken: string, refreshToken: string }): Promise<void>,\n awaitPendingAuthResolutions(): Promise<void>,\n isTrustedRedirectUrl(url: string): Promise<boolean>,\n },\n }\n & AsyncStoreProperty<\"project\", [], Project, false>\n & AsyncStoreProperty<\n \"item\",\n [{ itemId: string, userId: string } | { itemId: string, teamId: string } | { itemId: string, customCustomerId: string }],\n Item,\n false\n >\n & AsyncStoreProperty<\n \"products\",\n [options: CustomerProductsRequestOptions],\n CustomerProductsList,\n true\n >\n & AsyncStoreProperty<\n \"invoices\",\n [options: CustomerInvoicesRequestOptions],\n CustomerInvoicesList,\n true\n >\n & { [K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void> }\n & AuthLike<HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }>\n);\n/** @deprecated Use `HexclaveClientAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructor = {\n new <\n TokenStoreType extends string,\n HasTokenStore extends (TokenStoreType extends {} ? true : boolean),\n ProjectId extends string\n >(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>,\n new(options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>,\n\n [hexclaveAppInternalsSymbol]: {\n fromClientJson<HasTokenStore extends boolean, ProjectId extends string>(\n json: StackClientAppJson<HasTokenStore, ProjectId>\n ): StackClientApp<HasTokenStore, ProjectId>,\n },\n};\nexport type HexclaveClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppJson<HasTokenStore, ProjectId>;\nexport type HexclaveClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackClientApp<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppConstructor = StackClientAppConstructor;\nexport const HexclaveClientApp: HexclaveClientAppConstructor = _HexclaveClientAppImpl;\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackClientApp: StackClientAppConstructor = HexclaveClientApp;\n"],"mappings":";;AAkMA,MAAa,oBAAkD;;AAE/D,MAAa,iBAA4C"}
|
|
@@ -60,9 +60,12 @@ type AdminOAuthProviderConfig = {
|
|
|
60
60
|
} | {
|
|
61
61
|
type: 'standard';
|
|
62
62
|
clientId: string;
|
|
63
|
-
clientSecret
|
|
63
|
+
clientSecret?: string;
|
|
64
64
|
facebookConfigId?: string;
|
|
65
65
|
microsoftTenantId?: string;
|
|
66
|
+
appleTeamId?: string;
|
|
67
|
+
appleKeyId?: string;
|
|
68
|
+
applePrivateKey?: string;
|
|
66
69
|
appleBundleIds?: string[];
|
|
67
70
|
} | {
|
|
68
71
|
type: 'custom_oidc';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../../src/lib/hexclave-app/project-configs/index.ts"],"mappings":";;;KAMY,aAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA,EAAgB,mBAAmB;EAAA,SACnC,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,mBAAA;EAAA,SACD,EAAE;AAAA;;;;KAMD,kBAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA;EAAA,SACA,cAAA,EAAgB,wBAAA;EAAA,SAChB,WAAA,GAAc,gBAAA;EAAA,SACd,UAAA;EAAA,SACA,OAAA,EAAS,iBAAA;EAAA,SACT,kBAAA;EAAA,SACA,6BAAA,EAA+B,mBAAA;EAAA,SAC/B,4BAAA,EAA8B,mBAAA;EAAA,SAC9B,sBAAA,EAAwB,mBAAA;EAAA,SACxB,yBAAA;EAAA,SACA,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,gBAAA;EAER,IAAA;EACA,UAAA;EACA,WAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;AAAA;EAGA,IAAA;AAAA;AAAA,KAIQ,iBAAA;EACV,MAAA;EACA,WAAW;AAAA;AAAA,KAGD,wBAAA;EACV,EAAA;AAAA;EAEM,IAAA;AAAA;EAEF,IAAA;EACA,QAAA;EACA,YAAA;EACA,gBAAA;EACA,iBAAA;EACA,cAAA;AAAA;EAGA,IAAA;EACA,QAAA;EACA,YAAA;EACA,SAAA;EACA,KAAA;EACA,WAAA;AAAA,KAEA,mBAAmB;AAAA,KAEb,+BAAA;EACV,OAAA;IACE,MAAA;IACA,WAAA;EAAA;EAEF,cAAA,GAAiB,wBAAA;EACjB,aAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,WAAA,GAAc,gBAAgB;EAC9B,UAAA;EACA,6BAAA;IAAkC,EAAA;EAAA;EAClC,4BAAA;IAAiC,EAAA;EAAA;EACjC,sBAAA;IAA2B,EAAA;EAAA;EAC3B,yBAAA;EACA,gBAAA;EACA,gBAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../../src/lib/hexclave-app/project-configs/index.ts"],"mappings":";;;KAMY,aAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA,EAAgB,mBAAmB;EAAA,SACnC,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,mBAAA;EAAA,SACD,EAAE;AAAA;;;;KAMD,kBAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA;EAAA,SACA,cAAA,EAAgB,wBAAA;EAAA,SAChB,WAAA,GAAc,gBAAA;EAAA,SACd,UAAA;EAAA,SACA,OAAA,EAAS,iBAAA;EAAA,SACT,kBAAA;EAAA,SACA,6BAAA,EAA+B,mBAAA;EAAA,SAC/B,4BAAA,EAA8B,mBAAA;EAAA,SAC9B,sBAAA,EAAwB,mBAAA;EAAA,SACxB,yBAAA;EAAA,SACA,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,gBAAA;EAER,IAAA;EACA,UAAA;EACA,WAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;AAAA;EAGA,IAAA;AAAA;AAAA,KAIQ,iBAAA;EACV,MAAA;EACA,WAAW;AAAA;AAAA,KAGD,wBAAA;EACV,EAAA;AAAA;EAEM,IAAA;AAAA;EAEF,IAAA;EACA,QAAA;EACA,YAAA;EACA,gBAAA;EACA,iBAAA;EACA,WAAA;EACA,UAAA;EACA,eAAA;EACA,cAAA;AAAA;EAGA,IAAA;EACA,QAAA;EACA,YAAA;EACA,SAAA;EACA,KAAA;EACA,WAAA;AAAA,KAEA,mBAAmB;AAAA,KAEb,+BAAA;EACV,OAAA;IACE,MAAA;IACA,WAAA;EAAA;EAEF,cAAA,GAAiB,wBAAA;EACjB,aAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,WAAA,GAAc,gBAAgB;EAC9B,UAAA;EACA,6BAAA;IAAkC,EAAA;EAAA;EAClC,4BAAA;IAAiC,EAAA;EAAA;EACjC,sBAAA;IAA2B,EAAA;EAAA;EAC3B,yBAAA;EACA,gBAAA;EACA,gBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../../src/lib/hexclave-app/projects/index.ts"],"mappings":";;;;;;;;;;AAmBA;;;KAAY,kBAAA;EACN,IAAA;EAA4B,KAAA;EAAe,IAAA;EAAc,MAAA;EAAgB,UAAA;EAAoB,cAAA;EAAwB,YAAA;AAAA;EACrH,IAAA;AAAA;EACA,IAAA;AAAA;AAAA,KAEM,iBAAA;;;AAIgB;EAA1B,MAAA,EAAQ,kBAAkB;AAAA;AAAA,KAIhB,OAAA;EAAA,SACD,EAAA;EAAA,SACA,WAAA;EAAA,SACA,wBAAA;EAAA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A;AAAA;AAAA,iBAEc,+BAAA,CAAgC,OAAA,EAAS,yBAAA,GAA4B,qBAAqB"}
|
|
@@ -26,6 +26,9 @@ function adminProjectUpdateOptionsToCrud(options) {
|
|
|
26
26
|
client_secret: p.clientSecret,
|
|
27
27
|
facebook_config_id: p.facebookConfigId,
|
|
28
28
|
microsoft_tenant_id: p.microsoftTenantId,
|
|
29
|
+
apple_team_id: p.appleTeamId,
|
|
30
|
+
apple_key_id: p.appleKeyId,
|
|
31
|
+
apple_private_key: p.applePrivateKey,
|
|
29
32
|
apple_bundle_ids: p.appleBundleIds
|
|
30
33
|
}
|
|
31
34
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/lib/hexclave-app/projects/index.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { ProductionModeError } from \"@hexclave/shared/dist/helpers/production-mode\";\nimport { AdminUserProjectsCrud, ProjectsCrud } from \"@hexclave/shared/dist/interface/crud/projects\";\nimport { ProjectOnboardingStatus } from \"@hexclave/shared/dist/schema-fields\";\n\nimport { CompleteConfig, EnvironmentConfigNormalizedOverride, EnvironmentConfigOverrideOverride } from \"@hexclave/shared/dist/config/schema\";\nimport type { AdminDeploymentDomainJson, AdminDeploymentEnvVarOptions, AdminDeploymentRunJson, AdminDeploymentServiceBuildOptions, AdminDeploymentServiceJson } from \"@hexclave/shared/dist/interface/admin-interface\";\nimport { StackAdminApp } from \"../apps/interfaces/admin-app\";\nimport { AdminProjectConfig, AdminProjectConfigUpdateOptions, ProjectConfig } from \"../project-configs\";\n\nexport type { AdminDeploymentDomainJson, AdminDeploymentEnvVarJson, AdminDeploymentEnvVarOptions, AdminDeploymentRunJson, AdminDeploymentServiceBuildOptions, AdminDeploymentServiceJson } from \"@hexclave/shared/dist/interface/admin-interface\";\n\n/**\n * SDK type for pushed config source (camelCase for SDK).\n * Represents where the branch config was pushed from.\n */\nexport type PushedConfigSource =\n | { type: \"pushed-from-github\", owner: string, repo: string, branch: string, commitHash: string, configFilePath: string, workflowPath?: string }\n | { type: \"pushed-from-unknown\" }\n | { type: \"unlinked\" };\n\nexport type PushConfigOptions = {\n /**\n * The source of this config push.\n */\n source: PushedConfigSource,\n};\n\n\nexport type Project = {\n readonly id: string,\n readonly displayName: string,\n readonly isDevelopmentEnvironment: boolean,\n readonly pushedConfigError: { message: string } | null,\n readonly configWarnings: { message: string }[],\n readonly config: ProjectConfig,\n};\n\nexport type AdminProject = {\n readonly id: string,\n readonly displayName: string,\n readonly description: string | null,\n readonly createdAt: Date,\n readonly isProductionMode: boolean,\n readonly isDevelopmentEnvironment: boolean,\n readonly ownerTeamId: string | null,\n readonly onboardingStatus: ProjectOnboardingStatus,\n readonly onboardingState: NonNullable<ProjectsCrud[\"Admin\"][\"Read\"][\"onboarding_state\"]> | null,\n readonly logoUrl: string | null | undefined,\n readonly logoFullUrl: string | null | undefined,\n readonly logoDarkModeUrl: string | null | undefined,\n readonly logoFullDarkModeUrl: string | null | undefined,\n\n readonly config: AdminProjectConfig,\n\n update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>,\n delete(this: AdminProject): Promise<void>,\n\n getConfig(this: AdminProject): Promise<CompleteConfig>,\n useConfig(this: AdminProject): CompleteConfig,\n\n /**\n * Updates the environment's config by merging the provided config into the existing config.\n *\n * Changes made with `updateConfig` always take precedence over those made with `pushConfig`, even if the `pushConfig`\n * config was pushed after the changes were made with `updateConfig`. This is best for environment-specific\n * configuration like secrets, API keys, and other values that you wouldn't push into a source repository.\n */\n // We have some strict types here in order to prevent accidental overwriting of a top-level property of a config object\n updateConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride,\n ): Promise<void>,\n\n /**\n * Pushes a config, replacing any previous config pushed with `pushConfig`.\n *\n * **Note:** This function does **not** replace any changes made with `updateConfig`. Changes made with\n * `updateConfig` always take precedence over those made with `pushConfig`, even if the `pushConfig`\n * config was pushed after the changes were made with `updateConfig`.\n *\n * This is useful for programmatically deploying configuration. More often than not, you'll want to use\n * `updateConfig` instead.\n */\n pushConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride,\n options: PushConfigOptions,\n ): Promise<void>,\n\n /**\n * Updates the pushed config by merging the provided config into the existing pushed config.\n *\n * **Warning:** This is almost always **not** the function you want to call. Changes made with\n * `updatePushedConfig` will be replaced entirely the next time `pushConfig` is called. Consider using\n * `pushConfig` to set the full pushed config, or `updateConfig` for environment-specific values that\n * should persist across pushes.\n *\n * This function is useful for making temporary modifications to the pushed config before the next push.\n */\n updatePushedConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride\n ): Promise<void>,\n\n /**\n * Gets the source metadata for the pushed config, indicating where it was pushed from.\n *\n * The source can be:\n * - `pushed-from-github`: Config was pushed from a GitHub repository\n * - `pushed-from-unknown`: Config was pushed via CLI but source details unknown\n * - `unlinked`: Config can be edited directly on the dashboard\n */\n getPushedConfigSource(this: AdminProject): Promise<PushedConfigSource>,\n\n /**\n * Unlinks the pushed config source, setting it to \"unlinked\".\n * This allows the config to be edited directly on the dashboard without external push restrictions.\n */\n unlinkPushedConfigSource(this: AdminProject): Promise<void>,\n\n /**\n * Resets (removes) specific keys from the config override at the specified level.\n * Uses the same nested key logic as the override algorithm: resetting key \"a.b\" also resets \"a.b.c\".\n *\n * This is useful when updating the pushed config (branch level) and wanting to remove the same keys\n * from the environment config override so that the branch config values take precedence.\n */\n resetConfigOverrideKeys(this: AdminProject, level: \"branch\" | \"environment\", keys: string[]): Promise<void>,\n\n /**\n * Gets the raw config override at the specified level (before merging/defaults).\n * Useful for inspecting exactly what's been set at each level.\n */\n getConfigOverride(this: AdminProject, level: \"branch\" | \"environment\"): Promise<Record<string, unknown>>,\n\n /**\n * Replaces the entire config override at the specified level.\n * For branch level, preserves the existing source metadata.\n */\n replaceConfigOverride(this: AdminProject, level: \"branch\" | \"environment\", config: Record<string, unknown>): Promise<void>,\n\n getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>,\n useProductionModeErrors(this: AdminProject): ProductionModeError[],\n\n /**\n * Lists the project's deployment services (definitions from the config,\n * merged with their operational state: deploy status, env vars, domains).\n */\n listDeploymentServices(this: AdminProject): Promise<AdminDeploymentServiceJson[]>,\n\n /**\n * Creates a new deployment service definition. Only available when the\n * project's config source is the dashboard (`unlinked`).\n */\n createDeploymentService(this: AdminProject, id: string, build: AdminDeploymentServiceBuildOptions): Promise<AdminDeploymentServiceJson>,\n\n /**\n * Updates a deployment service definition. Env vars are part of the\n * definition, so like the build fields they require the config source to be\n * the dashboard (`unlinked`); `env` replaces the service's whole env var\n * set. Secret env var VALUES are never set here — they are supplied at\n * deploy time via `hexclave deploy --secret <key>=<value>`.\n */\n updateDeploymentService(this: AdminProject, serviceId: string, update: AdminDeploymentServiceBuildOptions & {\n env?: Record<string, AdminDeploymentEnvVarOptions>,\n }): Promise<AdminDeploymentServiceJson>,\n\n /**\n * Deletes a deployment service, including its provisioned deployment target.\n * Only available when the project's config source is the dashboard.\n */\n deleteDeploymentService(this: AdminProject, serviceId: string): Promise<void>,\n\n /**\n * Lists the most recent deployment runs of a service, newest first.\n */\n listDeploymentRuns(this: AdminProject, serviceId: string, options?: { limit?: number }): Promise<AdminDeploymentRunJson[]>,\n\n /**\n * Returns the build logs of a deployment run collected so far (the server\n * follows a running build for a while before returning).\n */\n getDeploymentRunLogs(this: AdminProject, runId: string, options?: { signal?: AbortSignal }): Promise<string>,\n\n /**\n * Adds a custom domain to a deployment service.\n */\n addDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string, options?: { isPrimary?: boolean }): Promise<void>,\n\n /**\n * Returns a domain's verification state and the DNS records the user must\n * create. Poll this until `verified` is true.\n */\n getDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string): Promise<AdminDeploymentDomainJson>,\n\n /**\n * Removes a custom domain from a deployment service.\n */\n deleteDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string): Promise<void>,\n} & Project;\n\nexport type AdminOwnedProject = {\n readonly app: StackAdminApp<false>,\n} & AdminProject;\n\nexport type AdminProjectUpdateOptions = {\n displayName?: string,\n description?: string,\n isProductionMode?: boolean,\n onboardingStatus?: ProjectOnboardingStatus,\n /**\n * Updates `project.requirePublishableClientKey` in the project-level config override.\n */\n requirePublishableClientKey?: boolean,\n logoUrl?: string | null,\n logoFullUrl?: string | null,\n logoDarkModeUrl?: string | null,\n logoFullDarkModeUrl?: string | null,\n config?: AdminProjectConfigUpdateOptions,\n};\nexport function adminProjectUpdateOptionsToCrud(options: AdminProjectUpdateOptions): ProjectsCrud[\"Admin\"][\"Update\"] {\n return {\n display_name: options.displayName,\n description: options.description,\n is_production_mode: options.isProductionMode,\n onboarding_status: options.onboardingStatus,\n logo_url: options.logoUrl,\n logo_full_url: options.logoFullUrl,\n logo_dark_mode_url: options.logoDarkModeUrl,\n logo_full_dark_mode_url: options.logoFullDarkModeUrl,\n /**\n * NOTE: Do not update this config anymore. It's been superseded by the new config in schema.ts.\n * @deprecated\n */\n config: {\n domains: options.config?.domains?.map((d) => ({\n domain: d.domain,\n handler_path: d.handlerPath\n })),\n oauth_providers: options.config?.oauthProviders\n ?.filter((p): p is Exclude<typeof p, { type: 'custom_oidc' }> => p.type !== 'custom_oidc')\n .map((p) => ({\n id: p.id as any,\n type: p.type,\n ...(p.type === 'standard' && {\n client_id: p.clientId,\n client_secret: p.clientSecret,\n facebook_config_id: p.facebookConfigId,\n microsoft_tenant_id: p.microsoftTenantId,\n apple_bundle_ids: p.appleBundleIds,\n }),\n })),\n email_config: options.config?.emailConfig && (\n options.config.emailConfig.type === 'shared' ? {\n type: 'shared',\n } : {\n type: 'standard',\n host: options.config.emailConfig.host,\n port: options.config.emailConfig.port,\n username: options.config.emailConfig.username,\n password: options.config.emailConfig.password,\n sender_name: options.config.emailConfig.senderName,\n sender_email: options.config.emailConfig.senderEmail,\n }\n ),\n email_theme: options.config?.emailTheme,\n sign_up_enabled: options.config?.signUpEnabled,\n credential_enabled: options.config?.credentialEnabled,\n magic_link_enabled: options.config?.magicLinkEnabled,\n passkey_enabled: options.config?.passkeyEnabled,\n allow_localhost: options.config?.allowLocalhost,\n create_team_on_sign_up: options.config?.createTeamOnSignUp,\n client_team_creation_enabled: options.config?.clientTeamCreationEnabled,\n client_user_deletion_enabled: options.config?.clientUserDeletionEnabled,\n team_creator_default_permissions: options.config?.teamCreatorDefaultPermissions,\n team_member_default_permissions: options.config?.teamMemberDefaultPermissions,\n user_default_permissions: options.config?.userDefaultPermissions,\n oauth_account_merge_strategy: options.config?.oauthAccountMergeStrategy,\n allow_user_api_keys: options.config?.allowUserApiKeys,\n allow_team_api_keys: options.config?.allowTeamApiKeys,\n },\n };\n}\n\nexport type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {\n displayName: string,\n teamId: string,\n isDevelopmentEnvironment?: boolean,\n};\nexport function adminProjectCreateOptionsToCrud(options: AdminProjectCreateOptions): AdminUserProjectsCrud[\"Server\"][\"Create\"] {\n return {\n ...adminProjectUpdateOptionsToCrud(options),\n display_name: options.displayName,\n is_development_environment: options.isDevelopmentEnvironment,\n owner_team_id: options.teamId,\n };\n}\n"],"mappings":";AAgOA,SAAgB,gCAAgC,SAAqE;CACnH,OAAO;EACL,cAAc,QAAQ;EACtB,aAAa,QAAQ;EACrB,oBAAoB,QAAQ;EAC5B,mBAAmB,QAAQ;EAC3B,UAAU,QAAQ;EAClB,eAAe,QAAQ;EACvB,oBAAoB,QAAQ;EAC5B,yBAAyB,QAAQ;;;;;EAKjC,QAAQ;GACN,SAAS,QAAQ,QAAQ,SAAS,KAAK,OAAO;IAC5C,QAAQ,EAAE;IACV,cAAc,EAAE;GAClB,EAAE;GACF,iBAAiB,QAAQ,QAAQ,gBAC7B,QAAQ,MAAuD,EAAE,SAAS,aAAa,CAAC,CACzF,KAAK,OAAO;IACX,IAAI,EAAE;IACN,MAAM,EAAE;IACR,GAAI,EAAE,SAAS,cAAc;KAC3B,WAAW,EAAE;KACb,eAAe,EAAE;KACjB,oBAAoB,EAAE;KACtB,qBAAqB,EAAE;KACvB,kBAAkB,EAAE;IACtB;GACF,EAAE;GACJ,cAAc,QAAQ,QAAQ,gBAC5B,QAAQ,OAAO,YAAY,SAAS,WAAW,EAC7C,MAAM,SACR,IAAI;IACF,MAAM;IACN,MAAM,QAAQ,OAAO,YAAY;IACjC,MAAM,QAAQ,OAAO,YAAY;IACjC,UAAU,QAAQ,OAAO,YAAY;IACrC,UAAU,QAAQ,OAAO,YAAY;IACrC,aAAa,QAAQ,OAAO,YAAY;IACxC,cAAc,QAAQ,OAAO,YAAY;GAC3C;GAEF,aAAa,QAAQ,QAAQ;GAC7B,iBAAiB,QAAQ,QAAQ;GACjC,oBAAoB,QAAQ,QAAQ;GACpC,oBAAoB,QAAQ,QAAQ;GACpC,iBAAiB,QAAQ,QAAQ;GACjC,iBAAiB,QAAQ,QAAQ;GACjC,wBAAwB,QAAQ,QAAQ;GACxC,8BAA8B,QAAQ,QAAQ;GAC9C,8BAA8B,QAAQ,QAAQ;GAC9C,kCAAkC,QAAQ,QAAQ;GAClD,iCAAiC,QAAQ,QAAQ;GACjD,0BAA0B,QAAQ,QAAQ;GAC1C,8BAA8B,QAAQ,QAAQ;GAC9C,qBAAqB,QAAQ,QAAQ;GACrC,qBAAqB,QAAQ,QAAQ;EACvC;CACF;AACF;AAOA,SAAgB,gCAAgC,SAA+E;CAC7H,OAAO;EACL,GAAG,gCAAgC,OAAO;EAC1C,cAAc,QAAQ;EACtB,4BAA4B,QAAQ;EACpC,eAAe,QAAQ;CACzB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/lib/hexclave-app/projects/index.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { ProductionModeError } from \"@hexclave/shared/dist/helpers/production-mode\";\nimport { AdminUserProjectsCrud, ProjectsCrud } from \"@hexclave/shared/dist/interface/crud/projects\";\nimport { ProjectOnboardingStatus } from \"@hexclave/shared/dist/schema-fields\";\n\nimport { CompleteConfig, EnvironmentConfigNormalizedOverride, EnvironmentConfigOverrideOverride } from \"@hexclave/shared/dist/config/schema\";\nimport type { AdminDeploymentDomainJson, AdminDeploymentEnvVarOptions, AdminDeploymentRunJson, AdminDeploymentServiceBuildOptions, AdminDeploymentServiceJson } from \"@hexclave/shared/dist/interface/admin-interface\";\nimport { StackAdminApp } from \"../apps/interfaces/admin-app\";\nimport { AdminProjectConfig, AdminProjectConfigUpdateOptions, ProjectConfig } from \"../project-configs\";\n\nexport type { AdminDeploymentDomainJson, AdminDeploymentEnvVarJson, AdminDeploymentEnvVarOptions, AdminDeploymentRunJson, AdminDeploymentServiceBuildOptions, AdminDeploymentServiceJson } from \"@hexclave/shared/dist/interface/admin-interface\";\n\n/**\n * SDK type for pushed config source (camelCase for SDK).\n * Represents where the branch config was pushed from.\n */\nexport type PushedConfigSource =\n | { type: \"pushed-from-github\", owner: string, repo: string, branch: string, commitHash: string, configFilePath: string, workflowPath?: string }\n | { type: \"pushed-from-unknown\" }\n | { type: \"unlinked\" };\n\nexport type PushConfigOptions = {\n /**\n * The source of this config push.\n */\n source: PushedConfigSource,\n};\n\n\nexport type Project = {\n readonly id: string,\n readonly displayName: string,\n readonly isDevelopmentEnvironment: boolean,\n readonly pushedConfigError: { message: string } | null,\n readonly configWarnings: { message: string }[],\n readonly config: ProjectConfig,\n};\n\nexport type AdminProject = {\n readonly id: string,\n readonly displayName: string,\n readonly description: string | null,\n readonly createdAt: Date,\n readonly isProductionMode: boolean,\n readonly isDevelopmentEnvironment: boolean,\n readonly ownerTeamId: string | null,\n readonly onboardingStatus: ProjectOnboardingStatus,\n readonly onboardingState: NonNullable<ProjectsCrud[\"Admin\"][\"Read\"][\"onboarding_state\"]> | null,\n readonly logoUrl: string | null | undefined,\n readonly logoFullUrl: string | null | undefined,\n readonly logoDarkModeUrl: string | null | undefined,\n readonly logoFullDarkModeUrl: string | null | undefined,\n\n readonly config: AdminProjectConfig,\n\n update(this: AdminProject, update: AdminProjectUpdateOptions): Promise<void>,\n delete(this: AdminProject): Promise<void>,\n\n getConfig(this: AdminProject): Promise<CompleteConfig>,\n useConfig(this: AdminProject): CompleteConfig,\n\n /**\n * Updates the environment's config by merging the provided config into the existing config.\n *\n * Changes made with `updateConfig` always take precedence over those made with `pushConfig`, even if the `pushConfig`\n * config was pushed after the changes were made with `updateConfig`. This is best for environment-specific\n * configuration like secrets, API keys, and other values that you wouldn't push into a source repository.\n */\n // We have some strict types here in order to prevent accidental overwriting of a top-level property of a config object\n updateConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride,\n ): Promise<void>,\n\n /**\n * Pushes a config, replacing any previous config pushed with `pushConfig`.\n *\n * **Note:** This function does **not** replace any changes made with `updateConfig`. Changes made with\n * `updateConfig` always take precedence over those made with `pushConfig`, even if the `pushConfig`\n * config was pushed after the changes were made with `updateConfig`.\n *\n * This is useful for programmatically deploying configuration. More often than not, you'll want to use\n * `updateConfig` instead.\n */\n pushConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride,\n options: PushConfigOptions,\n ): Promise<void>,\n\n /**\n * Updates the pushed config by merging the provided config into the existing pushed config.\n *\n * **Warning:** This is almost always **not** the function you want to call. Changes made with\n * `updatePushedConfig` will be replaced entirely the next time `pushConfig` is called. Consider using\n * `pushConfig` to set the full pushed config, or `updateConfig` for environment-specific values that\n * should persist across pushes.\n *\n * This function is useful for making temporary modifications to the pushed config before the next push.\n */\n updatePushedConfig(\n this: AdminProject,\n config: EnvironmentConfigOverrideOverride\n ): Promise<void>,\n\n /**\n * Gets the source metadata for the pushed config, indicating where it was pushed from.\n *\n * The source can be:\n * - `pushed-from-github`: Config was pushed from a GitHub repository\n * - `pushed-from-unknown`: Config was pushed via CLI but source details unknown\n * - `unlinked`: Config can be edited directly on the dashboard\n */\n getPushedConfigSource(this: AdminProject): Promise<PushedConfigSource>,\n\n /**\n * Unlinks the pushed config source, setting it to \"unlinked\".\n * This allows the config to be edited directly on the dashboard without external push restrictions.\n */\n unlinkPushedConfigSource(this: AdminProject): Promise<void>,\n\n /**\n * Resets (removes) specific keys from the config override at the specified level.\n * Uses the same nested key logic as the override algorithm: resetting key \"a.b\" also resets \"a.b.c\".\n *\n * This is useful when updating the pushed config (branch level) and wanting to remove the same keys\n * from the environment config override so that the branch config values take precedence.\n */\n resetConfigOverrideKeys(this: AdminProject, level: \"branch\" | \"environment\", keys: string[]): Promise<void>,\n\n /**\n * Gets the raw config override at the specified level (before merging/defaults).\n * Useful for inspecting exactly what's been set at each level.\n */\n getConfigOverride(this: AdminProject, level: \"branch\" | \"environment\"): Promise<Record<string, unknown>>,\n\n /**\n * Replaces the entire config override at the specified level.\n * For branch level, preserves the existing source metadata.\n */\n replaceConfigOverride(this: AdminProject, level: \"branch\" | \"environment\", config: Record<string, unknown>): Promise<void>,\n\n getProductionModeErrors(this: AdminProject): Promise<ProductionModeError[]>,\n useProductionModeErrors(this: AdminProject): ProductionModeError[],\n\n /**\n * Lists the project's deployment services (definitions from the config,\n * merged with their operational state: deploy status, env vars, domains).\n */\n listDeploymentServices(this: AdminProject): Promise<AdminDeploymentServiceJson[]>,\n\n /**\n * Creates a new deployment service definition. Only available when the\n * project's config source is the dashboard (`unlinked`).\n */\n createDeploymentService(this: AdminProject, id: string, build: AdminDeploymentServiceBuildOptions): Promise<AdminDeploymentServiceJson>,\n\n /**\n * Updates a deployment service definition. Env vars are part of the\n * definition, so like the build fields they require the config source to be\n * the dashboard (`unlinked`); `env` replaces the service's whole env var\n * set. Secret env var VALUES are never set here — they are supplied at\n * deploy time via `hexclave deploy --secret <key>=<value>`.\n */\n updateDeploymentService(this: AdminProject, serviceId: string, update: AdminDeploymentServiceBuildOptions & {\n env?: Record<string, AdminDeploymentEnvVarOptions>,\n }): Promise<AdminDeploymentServiceJson>,\n\n /**\n * Deletes a deployment service, including its provisioned deployment target.\n * Only available when the project's config source is the dashboard.\n */\n deleteDeploymentService(this: AdminProject, serviceId: string): Promise<void>,\n\n /**\n * Lists the most recent deployment runs of a service, newest first.\n */\n listDeploymentRuns(this: AdminProject, serviceId: string, options?: { limit?: number }): Promise<AdminDeploymentRunJson[]>,\n\n /**\n * Returns the build logs of a deployment run collected so far (the server\n * follows a running build for a while before returning).\n */\n getDeploymentRunLogs(this: AdminProject, runId: string, options?: { signal?: AbortSignal }): Promise<string>,\n\n /**\n * Adds a custom domain to a deployment service.\n */\n addDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string, options?: { isPrimary?: boolean }): Promise<void>,\n\n /**\n * Returns a domain's verification state and the DNS records the user must\n * create. Poll this until `verified` is true.\n */\n getDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string): Promise<AdminDeploymentDomainJson>,\n\n /**\n * Removes a custom domain from a deployment service.\n */\n deleteDeploymentServiceDomain(this: AdminProject, serviceId: string, hostname: string): Promise<void>,\n} & Project;\n\nexport type AdminOwnedProject = {\n readonly app: StackAdminApp<false>,\n} & AdminProject;\n\nexport type AdminProjectUpdateOptions = {\n displayName?: string,\n description?: string,\n isProductionMode?: boolean,\n onboardingStatus?: ProjectOnboardingStatus,\n /**\n * Updates `project.requirePublishableClientKey` in the project-level config override.\n */\n requirePublishableClientKey?: boolean,\n logoUrl?: string | null,\n logoFullUrl?: string | null,\n logoDarkModeUrl?: string | null,\n logoFullDarkModeUrl?: string | null,\n config?: AdminProjectConfigUpdateOptions,\n};\nexport function adminProjectUpdateOptionsToCrud(options: AdminProjectUpdateOptions): ProjectsCrud[\"Admin\"][\"Update\"] {\n return {\n display_name: options.displayName,\n description: options.description,\n is_production_mode: options.isProductionMode,\n onboarding_status: options.onboardingStatus,\n logo_url: options.logoUrl,\n logo_full_url: options.logoFullUrl,\n logo_dark_mode_url: options.logoDarkModeUrl,\n logo_full_dark_mode_url: options.logoFullDarkModeUrl,\n /**\n * NOTE: Do not update this config anymore. It's been superseded by the new config in schema.ts.\n * @deprecated\n */\n config: {\n domains: options.config?.domains?.map((d) => ({\n domain: d.domain,\n handler_path: d.handlerPath\n })),\n oauth_providers: options.config?.oauthProviders\n ?.filter((p): p is Exclude<typeof p, { type: 'custom_oidc' }> => p.type !== 'custom_oidc')\n .map((p) => ({\n id: p.id as any,\n type: p.type,\n ...(p.type === 'standard' && {\n client_id: p.clientId,\n client_secret: p.clientSecret,\n facebook_config_id: p.facebookConfigId,\n microsoft_tenant_id: p.microsoftTenantId,\n apple_team_id: p.appleTeamId,\n apple_key_id: p.appleKeyId,\n apple_private_key: p.applePrivateKey,\n apple_bundle_ids: p.appleBundleIds,\n }),\n })),\n email_config: options.config?.emailConfig && (\n options.config.emailConfig.type === 'shared' ? {\n type: 'shared',\n } : {\n type: 'standard',\n host: options.config.emailConfig.host,\n port: options.config.emailConfig.port,\n username: options.config.emailConfig.username,\n password: options.config.emailConfig.password,\n sender_name: options.config.emailConfig.senderName,\n sender_email: options.config.emailConfig.senderEmail,\n }\n ),\n email_theme: options.config?.emailTheme,\n sign_up_enabled: options.config?.signUpEnabled,\n credential_enabled: options.config?.credentialEnabled,\n magic_link_enabled: options.config?.magicLinkEnabled,\n passkey_enabled: options.config?.passkeyEnabled,\n allow_localhost: options.config?.allowLocalhost,\n create_team_on_sign_up: options.config?.createTeamOnSignUp,\n client_team_creation_enabled: options.config?.clientTeamCreationEnabled,\n client_user_deletion_enabled: options.config?.clientUserDeletionEnabled,\n team_creator_default_permissions: options.config?.teamCreatorDefaultPermissions,\n team_member_default_permissions: options.config?.teamMemberDefaultPermissions,\n user_default_permissions: options.config?.userDefaultPermissions,\n oauth_account_merge_strategy: options.config?.oauthAccountMergeStrategy,\n allow_user_api_keys: options.config?.allowUserApiKeys,\n allow_team_api_keys: options.config?.allowTeamApiKeys,\n },\n };\n}\n\nexport type AdminProjectCreateOptions = Omit<AdminProjectUpdateOptions, 'displayName'> & {\n displayName: string,\n teamId: string,\n isDevelopmentEnvironment?: boolean,\n};\nexport function adminProjectCreateOptionsToCrud(options: AdminProjectCreateOptions): AdminUserProjectsCrud[\"Server\"][\"Create\"] {\n return {\n ...adminProjectUpdateOptionsToCrud(options),\n display_name: options.displayName,\n is_development_environment: options.isDevelopmentEnvironment,\n owner_team_id: options.teamId,\n };\n}\n"],"mappings":";AAgOA,SAAgB,gCAAgC,SAAqE;CACnH,OAAO;EACL,cAAc,QAAQ;EACtB,aAAa,QAAQ;EACrB,oBAAoB,QAAQ;EAC5B,mBAAmB,QAAQ;EAC3B,UAAU,QAAQ;EAClB,eAAe,QAAQ;EACvB,oBAAoB,QAAQ;EAC5B,yBAAyB,QAAQ;;;;;EAKjC,QAAQ;GACN,SAAS,QAAQ,QAAQ,SAAS,KAAK,OAAO;IAC5C,QAAQ,EAAE;IACV,cAAc,EAAE;GAClB,EAAE;GACF,iBAAiB,QAAQ,QAAQ,gBAC7B,QAAQ,MAAuD,EAAE,SAAS,aAAa,CAAC,CACzF,KAAK,OAAO;IACX,IAAI,EAAE;IACN,MAAM,EAAE;IACR,GAAI,EAAE,SAAS,cAAc;KAC3B,WAAW,EAAE;KACb,eAAe,EAAE;KACjB,oBAAoB,EAAE;KACtB,qBAAqB,EAAE;KACvB,eAAe,EAAE;KACjB,cAAc,EAAE;KAChB,mBAAmB,EAAE;KACrB,kBAAkB,EAAE;IACtB;GACF,EAAE;GACJ,cAAc,QAAQ,QAAQ,gBAC5B,QAAQ,OAAO,YAAY,SAAS,WAAW,EAC7C,MAAM,SACR,IAAI;IACF,MAAM;IACN,MAAM,QAAQ,OAAO,YAAY;IACjC,MAAM,QAAQ,OAAO,YAAY;IACjC,UAAU,QAAQ,OAAO,YAAY;IACrC,UAAU,QAAQ,OAAO,YAAY;IACrC,aAAa,QAAQ,OAAO,YAAY;IACxC,cAAc,QAAQ,OAAO,YAAY;GAC3C;GAEF,aAAa,QAAQ,QAAQ;GAC7B,iBAAiB,QAAQ,QAAQ;GACjC,oBAAoB,QAAQ,QAAQ;GACpC,oBAAoB,QAAQ,QAAQ;GACpC,iBAAiB,QAAQ,QAAQ;GACjC,iBAAiB,QAAQ,QAAQ;GACjC,wBAAwB,QAAQ,QAAQ;GACxC,8BAA8B,QAAQ,QAAQ;GAC9C,8BAA8B,QAAQ,QAAQ;GAC9C,kCAAkC,QAAQ,QAAQ;GAClD,iCAAiC,QAAQ,QAAQ;GACjD,0BAA0B,QAAQ,QAAQ;GAC1C,8BAA8B,QAAQ,QAAQ;GAC9C,qBAAqB,QAAQ,QAAQ;GACrC,qBAAqB,QAAQ,QAAQ;EACvC;CACF;AACF;AAOA,SAAgB,gCAAgC,SAA+E;CAC7H,OAAO;EACL,GAAG,gCAAgC,OAAO;EAC1C,cAAc,QAAQ;EACtB,4BAA4B,QAAQ;EACpC,eAAe,QAAQ;CACzB;AACF"}
|
package/dist/esm/utils/url.js
CHANGED
|
@@ -2,10 +2,18 @@ import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
|
|
|
2
2
|
//#region src/utils/url.ts
|
|
3
3
|
function constructRedirectUrl(redirectUrl, callbackUrlName) {
|
|
4
4
|
if (typeof window === "undefined" || !window.location) throw new HexclaveAssertionError(`${callbackUrlName} option is required in a non-browser environment.`, { redirectUrl });
|
|
5
|
-
const retainedQueryParams = [
|
|
5
|
+
const retainedQueryParams = [
|
|
6
|
+
"after_auth_return_to",
|
|
7
|
+
"hexclave_cross_domain_state",
|
|
8
|
+
"hexclave_cross_domain_code_challenge",
|
|
9
|
+
"hexclave_cross_domain_after_callback_redirect_url"
|
|
10
|
+
];
|
|
6
11
|
const currentUrl = new URL(window.location.href);
|
|
7
12
|
const url = redirectUrl ? new URL(redirectUrl, window.location.href) : new URL(window.location.href);
|
|
8
|
-
for (const param of retainedQueryParams)
|
|
13
|
+
for (const param of retainedQueryParams) {
|
|
14
|
+
const value = currentUrl.searchParams.get(param);
|
|
15
|
+
if (value != null) url.searchParams.set(param, value);
|
|
16
|
+
}
|
|
9
17
|
url.hash = "";
|
|
10
18
|
return url.toString();
|
|
11
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","names":[],"sources":["../../../src/utils/url.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\n\n\nexport function constructRedirectUrl(redirectUrl: URL | string | undefined, callbackUrlName: string) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (typeof window === 'undefined' || !window.location) {\n throw new HexclaveAssertionError(`${callbackUrlName} option is required in a non-browser environment.`, { redirectUrl });\n }\n\n const retainedQueryParams = [\"after_auth_return_to\"];\n const currentUrl = new URL(window.location.href);\n const url = redirectUrl ? new URL(redirectUrl, window.location.href) : new URL(window.location.href);\n for (const param of retainedQueryParams) {\n
|
|
1
|
+
{"version":3,"file":"url.js","names":[],"sources":["../../../src/utils/url.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\n\n\nexport function constructRedirectUrl(redirectUrl: URL | string | undefined, callbackUrlName: string) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (typeof window === 'undefined' || !window.location) {\n throw new HexclaveAssertionError(`${callbackUrlName} option is required in a non-browser environment.`, { redirectUrl });\n }\n\n // These parameters form one continuation. Keeping only after_auth_return_to can return to the\n // callback URL but cannot complete its cross-domain PKCE handoff after an email opens in a new\n // tab.\n const retainedQueryParams = [\n \"after_auth_return_to\",\n \"hexclave_cross_domain_state\",\n \"hexclave_cross_domain_code_challenge\",\n \"hexclave_cross_domain_after_callback_redirect_url\",\n ];\n const currentUrl = new URL(window.location.href);\n const url = redirectUrl ? new URL(redirectUrl, window.location.href) : new URL(window.location.href);\n for (const param of retainedQueryParams) {\n const value = currentUrl.searchParams.get(param);\n if (value != null) {\n url.searchParams.set(param, value);\n }\n }\n url.hash = \"\";\n return url.toString();\n}\n"],"mappings":";;AAOA,SAAgB,qBAAqB,aAAuC,iBAAyB;CAEnG,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,UAC3C,MAAM,IAAI,uBAAuB,GAAG,gBAAgB,oDAAoD,EAAE,YAAY,CAAC;CAMzH,MAAM,sBAAsB;EAC1B;EACA;EACA;EACA;CACF;CACA,MAAM,aAAa,IAAI,IAAI,OAAO,SAAS,IAAI;CAC/C,MAAM,MAAM,cAAc,IAAI,IAAI,aAAa,OAAO,SAAS,IAAI,IAAI,IAAI,IAAI,OAAO,SAAS,IAAI;CACnG,KAAK,MAAM,SAAS,qBAAqB;EACvC,MAAM,QAAQ,WAAW,aAAa,IAAI,KAAK;EAC/C,IAAI,SAAS,MACX,IAAI,aAAa,IAAI,OAAO,KAAK;CAErC;CACA,IAAI,OAAO;CACX,OAAO,IAAI,SAAS;AACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { constructRedirectUrl } from "./url.js";
|
|
3
|
+
//#region src/utils/url.test.ts
|
|
4
|
+
const previousWindow = Reflect.get(globalThis, "window");
|
|
5
|
+
const hadPreviousWindow = Reflect.has(globalThis, "window");
|
|
6
|
+
afterEach(() => {
|
|
7
|
+
if (hadPreviousWindow) Reflect.set(globalThis, "window", previousWindow);
|
|
8
|
+
else Reflect.deleteProperty(globalThis, "window");
|
|
9
|
+
});
|
|
10
|
+
describe("constructRedirectUrl", () => {
|
|
11
|
+
it("transports the complete cross-domain return state to an email callback", () => {
|
|
12
|
+
const currentUrl = new URL("https://hosted.example.test/handler/forgot-password");
|
|
13
|
+
currentUrl.searchParams.set("after_auth_return_to", "https://customer.example.test/handler/oauth-callback?hexclave_cross_domain_auth=1");
|
|
14
|
+
currentUrl.searchParams.set("hexclave_cross_domain_state", "outer-state");
|
|
15
|
+
currentUrl.searchParams.set("hexclave_cross_domain_code_challenge", "outer-challenge");
|
|
16
|
+
currentUrl.searchParams.set("hexclave_cross_domain_after_callback_redirect_url", "https://customer.example.test/dashboard");
|
|
17
|
+
Reflect.set(globalThis, "window", { location: { href: currentUrl.toString() } });
|
|
18
|
+
expect(new URL(constructRedirectUrl("/handler/password-reset#discarded", "callbackUrl")).toString()).toBe("https://hosted.example.test/handler/password-reset?after_auth_return_to=https%3A%2F%2Fcustomer.example.test%2Fhandler%2Foauth-callback%3Fhexclave_cross_domain_auth%3D1&hexclave_cross_domain_state=outer-state&hexclave_cross_domain_code_challenge=outer-challenge&hexclave_cross_domain_after_callback_redirect_url=https%3A%2F%2Fcustomer.example.test%2Fdashboard");
|
|
19
|
+
});
|
|
20
|
+
it("does not synthesize the forgot-password page as a return target", () => {
|
|
21
|
+
Reflect.set(globalThis, "window", { location: { href: "https://hosted.example.test/handler/forgot-password" } });
|
|
22
|
+
expect(constructRedirectUrl("/handler/password-reset", "callbackUrl")).toBe("https://hosted.example.test/handler/password-reset");
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export {};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=url.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.test.js","names":[],"sources":["../../../src/utils/url.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { afterEach, describe, expect, it } from \"vitest\";\nimport { constructRedirectUrl } from \"./url\";\n\nconst previousWindow = Reflect.get(globalThis, \"window\");\nconst hadPreviousWindow = Reflect.has(globalThis, \"window\");\n\nafterEach(() => {\n if (hadPreviousWindow) {\n Reflect.set(globalThis, \"window\", previousWindow);\n } else {\n Reflect.deleteProperty(globalThis, \"window\");\n }\n});\n\ndescribe(\"constructRedirectUrl\", () => {\n it(\"transports the complete cross-domain return state to an email callback\", () => {\n const currentUrl = new URL(\"https://hosted.example.test/handler/forgot-password\");\n currentUrl.searchParams.set(\"after_auth_return_to\", \"https://customer.example.test/handler/oauth-callback?hexclave_cross_domain_auth=1\");\n currentUrl.searchParams.set(\"hexclave_cross_domain_state\", \"outer-state\");\n currentUrl.searchParams.set(\"hexclave_cross_domain_code_challenge\", \"outer-challenge\");\n currentUrl.searchParams.set(\"hexclave_cross_domain_after_callback_redirect_url\", \"https://customer.example.test/dashboard\");\n Reflect.set(globalThis, \"window\", {\n location: {\n href: currentUrl.toString(),\n },\n });\n\n const callbackUrl = new URL(constructRedirectUrl(\"/handler/password-reset#discarded\", \"callbackUrl\"));\n\n expect(callbackUrl.toString()).toBe(\n \"https://hosted.example.test/handler/password-reset\"\n + \"?after_auth_return_to=https%3A%2F%2Fcustomer.example.test%2Fhandler%2Foauth-callback%3Fhexclave_cross_domain_auth%3D1\"\n + \"&hexclave_cross_domain_state=outer-state\"\n + \"&hexclave_cross_domain_code_challenge=outer-challenge\"\n + \"&hexclave_cross_domain_after_callback_redirect_url=https%3A%2F%2Fcustomer.example.test%2Fdashboard\",\n );\n });\n\n it(\"does not synthesize the forgot-password page as a return target\", () => {\n Reflect.set(globalThis, \"window\", {\n location: {\n href: \"https://hosted.example.test/handler/forgot-password\",\n },\n });\n\n expect(constructRedirectUrl(\"/handler/password-reset\", \"callbackUrl\")).toBe(\n \"https://hosted.example.test/handler/password-reset\",\n );\n });\n});\n"],"mappings":";;;AAOA,MAAM,iBAAiB,QAAQ,IAAI,YAAY,QAAQ;AACvD,MAAM,oBAAoB,QAAQ,IAAI,YAAY,QAAQ;AAE1D,gBAAgB;CACd,IAAI,mBACF,QAAQ,IAAI,YAAY,UAAU,cAAc;MAEhD,QAAQ,eAAe,YAAY,QAAQ;AAE/C,CAAC;AAED,SAAS,8BAA8B;CACrC,GAAG,gFAAgF;EACjF,MAAM,aAAa,IAAI,IAAI,qDAAqD;EAChF,WAAW,aAAa,IAAI,wBAAwB,mFAAmF;EACvI,WAAW,aAAa,IAAI,+BAA+B,aAAa;EACxE,WAAW,aAAa,IAAI,wCAAwC,iBAAiB;EACrF,WAAW,aAAa,IAAI,qDAAqD,yCAAyC;EAC1H,QAAQ,IAAI,YAAY,UAAU,EAChC,UAAU,EACR,MAAM,WAAW,SAAS,EAC5B,EACF,CAAC;EAID,OAAO,IAFiB,IAAI,qBAAqB,qCAAqC,aAAa,CAElF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAC7B,wWAKF;CACF,CAAC;CAED,GAAG,yEAAyE;EAC1E,QAAQ,IAAI,YAAY,UAAU,EAChC,UAAU,EACR,MAAM,sDACR,EACF,CAAC;EAED,OAAO,qBAAqB,2BAA2B,aAAa,CAAC,CAAC,CAAC,KACrE,oDACF;CACF,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as StackAdminApp, a as StackClientApp, z as StackServerApp } from "./client-app-
|
|
1
|
+
import { N as StackAdminApp, a as StackClientApp, z as StackServerApp } from "./client-app-BCT5p_70.js";
|
|
2
2
|
import { t as TranslationProvider } from "./translation-provider-WOaZXqAz.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
@@ -26,4 +26,4 @@ declare const HexclaveProvider: typeof NextStackProvider;
|
|
|
26
26
|
declare const StackProvider: typeof NextStackProvider;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { HexclaveProvider as n, StackProvider as r, ActiveProvider as t };
|
|
29
|
-
//# sourceMappingURL=hexclave-provider-
|
|
29
|
+
//# sourceMappingURL=hexclave-provider-BKxi3Vy-.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hexclave-provider-
|
|
1
|
+
{"version":3,"file":"hexclave-provider-BKxi3Vy-.d.ts","names":[],"sources":["../src/providers/hexclave-provider.tsx"],"mappings":";;;;;iBASS,iBAAA;EACP,QAAA;EACA,GAAA;EACA,IAAA;EACA;AAAA;EAEA,IAAA,GAAO,KAAA,CAAM,cAAA,QAAsB,mBAAA;;AARwB;;;;;EAe3D,oBAAA,GAAuB,MAAA;EACvB,QAAA,EAAU,KAAA,CAAM,SAAA;EAEhB,GAAA,EAAK,cAAA,SAAuB,cAAA,SAAuB,aAAA;AAAA,gCACpD,GAAA,CAAA,OAAA;AAAA,cAcK,cAAA,SAAc,iBAAoB;AAAA,cAI3B,gBAAA,SAAgB,iBAAiB;;cAEjC,aAAA,SAAa,iBAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as GetCurrentUserOptions } from "./common-B2gkWlXX.js";
|
|
2
|
-
import { a as StackClientApp, ht as CurrentUser, pt as CurrentInternalUser } from "./client-app-
|
|
2
|
+
import { a as StackClientApp, ht as CurrentUser, pt as CurrentInternalUser } from "./client-app-BCT5p_70.js";
|
|
3
3
|
//#region src/lib/hooks.d.ts
|
|
4
4
|
type GetUserOptions = GetCurrentUserOptions<true> & {
|
|
5
5
|
projectIdMustMatch?: string;
|
|
@@ -40,4 +40,4 @@ declare function useStackApp<ProjectId extends string>(options?: {
|
|
|
40
40
|
}): StackClientApp<true, ProjectId>;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { useStackApp as n, useUser as r, useHexclaveApp as t };
|
|
43
|
-
//# sourceMappingURL=hooks-
|
|
43
|
+
//# sourceMappingURL=hooks-CUe5bc3s.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-
|
|
1
|
+
{"version":3,"file":"hooks-CUe5bc3s.d.ts","names":[],"sources":["../src/lib/hooks.tsx"],"mappings":";;;KAQK,cAAA,GAAiB,qBAAiB;EACrC,kBAAkB;AAAA;;AAHwG;;;;iBAW5G,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,EAAA;EAA0B,kBAAA;AAAA,IAAmC,mBAAmB;AAAA,iBACpH,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,EAAA;AAAA,IAA6B,WAAW;AAAA,iBAC5E,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,kBAAA;AAAA,IAAmC,mBAAmB;AAAA,iBAC1F,OAAA,CAAQ,OAAA,GAAU,cAAA,GAAiB,WAAA,GAAc,mBAAA;AAHmE;AACpI;;;;AADoI,iBAqBpH,cAAA,2BAAyC,OAAA;EAAW,kBAAA,GAAqB,SAAA;AAAA,IAAmB,cAAA,OAAqB,SAAA;;;AApBrC;AAC5F;;;;iBAyCgB,WAAA,2BAAsC,OAAA;EAAW,kBAAA,GAAqB,SAAA;AAAA,IAAmB,cAAA,OAAqB,SAAA"}
|
|
@@ -60,9 +60,12 @@ type AdminOAuthProviderConfig = {
|
|
|
60
60
|
} | {
|
|
61
61
|
type: 'standard';
|
|
62
62
|
clientId: string;
|
|
63
|
-
clientSecret
|
|
63
|
+
clientSecret?: string;
|
|
64
64
|
facebookConfigId?: string;
|
|
65
65
|
microsoftTenantId?: string;
|
|
66
|
+
appleTeamId?: string;
|
|
67
|
+
appleKeyId?: string;
|
|
68
|
+
applePrivateKey?: string;
|
|
66
69
|
appleBundleIds?: string[];
|
|
67
70
|
} | {
|
|
68
71
|
type: 'custom_oidc';
|
|
@@ -103,4 +106,4 @@ type AdminProjectConfigUpdateOptions = {
|
|
|
103
106
|
};
|
|
104
107
|
//#endregion
|
|
105
108
|
export { AdminProjectConfigUpdateOptions as a, AdminProjectConfig as i, AdminEmailConfig as n, OAuthProviderConfig as o, AdminOAuthProviderConfig as r, ProjectConfig as s, AdminDomainConfig as t };
|
|
106
|
-
//# sourceMappingURL=index-
|
|
109
|
+
//# sourceMappingURL=index-B-MazpM_.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-B-MazpM_.d.ts","names":[],"sources":["../src/lib/hexclave-app/project-configs/index.ts"],"mappings":";;;KAMY,aAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA,EAAgB,mBAAmB;EAAA,SACnC,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,mBAAA;EAAA,SACD,EAAE;AAAA;;;;KAMD,kBAAA;EAAA,SACD,aAAA;EAAA,SACA,iBAAA;EAAA,SACA,gBAAA;EAAA,SACA,cAAA;EAAA,SACA,yBAAA;EAAA,SACA,yBAAA;EAAA,SACA,cAAA;EAAA,SACA,cAAA,EAAgB,wBAAA;EAAA,SAChB,WAAA,GAAc,gBAAA;EAAA,SACd,UAAA;EAAA,SACA,OAAA,EAAS,iBAAA;EAAA,SACT,kBAAA;EAAA,SACA,6BAAA,EAA+B,mBAAA;EAAA,SAC/B,4BAAA,EAA8B,mBAAA;EAAA,SAC9B,sBAAA,EAAwB,mBAAA;EAAA,SACxB,yBAAA;EAAA,SACA,gBAAA;EAAA,SACA,gBAAA;AAAA;AAAA,KAGC,gBAAA;EAER,IAAA;EACA,UAAA;EACA,WAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;AAAA;EAGA,IAAA;AAAA;AAAA,KAIQ,iBAAA;EACV,MAAA;EACA,WAAW;AAAA;AAAA,KAGD,wBAAA;EACV,EAAA;AAAA;EAEM,IAAA;AAAA;EAEF,IAAA;EACA,QAAA;EACA,YAAA;EACA,gBAAA;EACA,iBAAA;EACA,WAAA;EACA,UAAA;EACA,eAAA;EACA,cAAA;AAAA;EAGA,IAAA;EACA,QAAA;EACA,YAAA;EACA,SAAA;EACA,KAAA;EACA,WAAA;AAAA,KAEA,mBAAmB;AAAA,KAEb,+BAAA;EACV,OAAA;IACE,MAAA;IACA,WAAA;EAAA;EAEF,cAAA,GAAiB,wBAAA;EACjB,aAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,WAAA,GAAc,gBAAgB;EAC9B,UAAA;EACA,6BAAA;IAAkC,EAAA;EAAA;EAClC,4BAAA;IAAiC,EAAA;EAAA;EACjC,sBAAA;IAA2B,EAAA;EAAA;EAC3B,yBAAA;EACA,gBAAA;EACA,gBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as HandlerUrls } from "./common-B2gkWlXX.js";
|
|
2
|
-
import { Q as Team, a as StackClientApp } from "./client-app-
|
|
2
|
+
import { Q as Team, a as StackClientApp } from "./client-app-BCT5p_70.js";
|
|
3
3
|
import { t as AccountSettings } from "./account-settings-cTsj8rpJ.js";
|
|
4
4
|
import { t as CliAuthConfirmation } from "./cli-auth-confirm-BW3PYpKb.js";
|
|
5
5
|
import { t as EmailVerification } from "./email-verification-Cr_KKvtQ.js";
|
|
@@ -144,4 +144,4 @@ type TeamSwitcherProps<AllowNull extends boolean = false> = {
|
|
|
144
144
|
declare function TeamSwitcher<AllowNull extends boolean = false>(props: TeamSwitcherProps<AllowNull>): import("react/jsx-runtime").JSX.Element;
|
|
145
145
|
//#endregion
|
|
146
146
|
export { TeamSwitcher as a, StackHandler as c, getRedirectToPageResult as d, defineStackConfig as i, BaseHandlerProps as l, StackConfig as n, SelectedTeamSwitcher as o, defineHexclaveConfig as r, HexclaveHandler as s, HexclaveConfig as t, HexclaveHandlerClient as u };
|
|
147
|
-
//# sourceMappingURL=index-
|
|
147
|
+
//# sourceMappingURL=index-CvB7XacB.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CvB7XacB.d.ts","names":[],"sources":["../src/components-page/hexclave-handler-client.tsx","../src/components-page/hexclave-handler.tsx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KjF,eAAA,SAAe,WAAc;;cAG7B,YAAA,SAAY,WAAc;;;KC5BlC,UAAA;EACH,EAAA;EACA,WAAA;EACA,eAAA;AAAA;AAAA,KAGG,yBAAA;EACH,MAAA,IAAU,IAAA,EAAM,SAAA,gBAAyB,IAAA,UAAc,IAAA;EACvD,YAAA,GAAe,IAAA;EACf,oBAAA;EACA,SAAA,GAAY,SAAA;EACZ,SAAA;EACA,QAAA,IAAY,IAAA,EAAM,SAAA,gBAAyB,IAAA,UAAc,IAAA;EACzD,gBAAA;EAEA,QAAA;IACE,YAAA,GAAe,UAAA;EAAA;EAEjB,SAAA,GAAY,UAAA;EACZ,WAAA;IACE,MAAA;MACE,yBAAA;IAAA;EAAA;AAAA;AAAA,iBAKU,oBAAA,oCAAwD,KAAA,EAAO,yBAAyB,CAAC,SAAA,gCAAU,GAAA,CAAA,OAAA;;;KCZ9G,QAAA;EACH,EAAA;EACA,WAAA;EACA,eAAA;AAAA;AAAA,KAGG,iBAAA;EACH,IAAA,GAAO,IAAA;EACP,MAAA;EACA,KAAA,GAAQ,IAAA;EACR,SAAA,GAAY,SAAA;EACZ,SAAA;EACA,gBAAA;EACA,QAAA,IAAY,IAAA,EAAM,SAAA,gBAAyB,IAAA,UAAc,IAAA,KAAS,OAAA;EAElE,QAAA;IACE,IAAA,GAAO,QAAA;EAAA;EAET,SAAA,GAAY,QAAA;EACZ,WAAA;IACE,MAAA;MACE,yBAAA;IAAA;EAAA;AAAA;AAAA,iBAKU,YAAA,oCAAgD,KAAA,EAAO,iBAAiB,CAAC,SAAA,gCAAU,GAAA,CAAA,OAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { a as PlanUsageRow, i as PlanUsagePlanId, n as PlanUsageKind, r as PlanU
|
|
|
6
6
|
import { a as AdminWorkflowRunState, c as AdminWorkflowStepAttempt, d as AdminWorkflowUpgradeResult, f as AdminWorkflowVersion, i as AdminWorkflowRunDetails, l as AdminWorkflowSyncResult, n as AdminWorkflowDivergenceDiagnostic, o as AdminWorkflowRunsFilter, r as AdminWorkflowRun, s as AdminWorkflowStep, t as AdminWorkflow, u as AdminWorkflowTrigger } from "./workflows-DEb7pIuQ.js";
|
|
7
7
|
import { r as OAuthConnection, t as Connection } from "./index-C_kxyHao.js";
|
|
8
8
|
import { i as ServerContactChannel, t as ContactChannel } from "./index-DN04TjLM.js";
|
|
9
|
-
import { $ as TeamCreateOptions, B as StackServerAppConstructor, D as HexclaveAdminApp, E as EmailOutboxUpdateOptions, F as StackAdminAppConstructorOptions, H as EditableTeamMemberProfile, I as HexclaveServerApp, J as ServerTeamCreateOptions, K as ServerListUsersOptions, L as HexclaveServerAppConstructor, N as StackAdminApp, O as HexclaveAdminAppConstructor, Ot as User, P as StackAdminAppConstructor, Q as Team, R as HexclaveServerAppConstructorOptions, St as ServerUser, T as EmailOutboxListResult, U as ReceivedTeamInvitation, V as StackServerAppConstructorOptions, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, _ as AdminProjectCreateOptions, _t as OAuthProvider, a as StackClientApp, c as StackClientAppJson, d as AdminDeploymentEnvVarOptions, et as TeamInvitation, f as AdminDeploymentRunJson, ft as CurrentInternalServerUser, g as AdminProject, h as AdminOwnedProject, ht as CurrentUser, i as HexclaveClientAppJson, it as TeamUser, k as HexclaveAdminAppConstructorOptions, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, mt as CurrentServerUser, n as HexclaveClientAppConstructor, o as StackClientAppConstructor, p as AdminDeploymentServiceBuildOptions, pt as CurrentInternalUser, q as ServerTeam, r as HexclaveClientAppConstructorOptions, rt as TeamUpdateOptions, s as StackClientAppConstructorOptions, t as HexclaveClientApp, tt as TeamMemberProfile, u as AdminDeploymentEnvVarJson, ut as Auth, v as AdminProjectUpdateOptions, w as EmailOutboxListOptions, x as PushedConfigSource, xt as ServerOAuthProvider, y as Project, z as StackServerApp } from "./client-app-
|
|
10
|
-
import { a as AdminProjectConfigUpdateOptions, i as AdminProjectConfig, n as AdminEmailConfig, o as OAuthProviderConfig, r as AdminOAuthProviderConfig, s as ProjectConfig, t as AdminDomainConfig } from "./index-
|
|
9
|
+
import { $ as TeamCreateOptions, B as StackServerAppConstructor, D as HexclaveAdminApp, E as EmailOutboxUpdateOptions, F as StackAdminAppConstructorOptions, H as EditableTeamMemberProfile, I as HexclaveServerApp, J as ServerTeamCreateOptions, K as ServerListUsersOptions, L as HexclaveServerAppConstructor, N as StackAdminApp, O as HexclaveAdminAppConstructor, Ot as User, P as StackAdminAppConstructor, Q as Team, R as HexclaveServerAppConstructorOptions, St as ServerUser, T as EmailOutboxListResult, U as ReceivedTeamInvitation, V as StackServerAppConstructorOptions, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, _ as AdminProjectCreateOptions, _t as OAuthProvider, a as StackClientApp, c as StackClientAppJson, d as AdminDeploymentEnvVarOptions, et as TeamInvitation, f as AdminDeploymentRunJson, ft as CurrentInternalServerUser, g as AdminProject, h as AdminOwnedProject, ht as CurrentUser, i as HexclaveClientAppJson, it as TeamUser, k as HexclaveAdminAppConstructorOptions, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, mt as CurrentServerUser, n as HexclaveClientAppConstructor, o as StackClientAppConstructor, p as AdminDeploymentServiceBuildOptions, pt as CurrentInternalUser, q as ServerTeam, r as HexclaveClientAppConstructorOptions, rt as TeamUpdateOptions, s as StackClientAppConstructorOptions, t as HexclaveClientApp, tt as TeamMemberProfile, u as AdminDeploymentEnvVarJson, ut as Auth, v as AdminProjectUpdateOptions, w as EmailOutboxListOptions, x as PushedConfigSource, xt as ServerOAuthProvider, y as Project, z as StackServerApp } from "./client-app-BCT5p_70.js";
|
|
10
|
+
import { a as AdminProjectConfigUpdateOptions, i as AdminProjectConfig, n as AdminEmailConfig, o as OAuthProviderConfig, r as AdminOAuthProviderConfig, s as ProjectConfig, t as AdminDomainConfig } from "./index-B-MazpM_.js";
|
|
11
11
|
import { n as AnalyticsReplayOptions, t as AnalyticsOptions } from "./session-replay-CQ849yH1.js";
|
|
12
12
|
import { r as getPagePrompt } from "./url-targets-CWO0mjTr.js";
|
|
13
13
|
import { t as AccountSettings } from "./account-settings-cTsj8rpJ.js";
|
|
@@ -16,9 +16,9 @@ import { i as useCliAuthConfirmation, n as CliAuthConfirmationState, r as CliAut
|
|
|
16
16
|
import { t as EmailVerification } from "./email-verification-Cr_KKvtQ.js";
|
|
17
17
|
import { t as ForgotPassword } from "./forgot-password-B7RLLsC2.js";
|
|
18
18
|
import { t as PasswordReset } from "./password-reset-CxIuXeIx.js";
|
|
19
|
-
import { a as TeamSwitcher, c as StackHandler, i as defineStackConfig, n as StackConfig, o as SelectedTeamSwitcher, r as defineHexclaveConfig, s as HexclaveHandler, t as HexclaveConfig } from "./index-
|
|
20
|
-
import { n as useStackApp, r as useUser, t as useHexclaveApp } from "./hooks-
|
|
21
|
-
import { n as HexclaveProvider, r as StackProvider } from "./hexclave-provider-
|
|
19
|
+
import { a as TeamSwitcher, c as StackHandler, i as defineStackConfig, n as StackConfig, o as SelectedTeamSwitcher, r as defineHexclaveConfig, s as HexclaveHandler, t as HexclaveConfig } from "./index-CvB7XacB.js";
|
|
20
|
+
import { n as useStackApp, r as useUser, t as useHexclaveApp } from "./hooks-CUe5bc3s.js";
|
|
21
|
+
import { n as HexclaveProvider, r as StackProvider } from "./hexclave-provider-BKxi3Vy-.js";
|
|
22
22
|
import { n as StackTheme, t as HexclaveTheme } from "./theme-provider-D9_ngSbi.js";
|
|
23
23
|
import { t as AuthPage } from "./auth-page-YnM_LtbN.js";
|
|
24
24
|
import { t as SignIn } from "./sign-in-BT45jb_W.js";
|
package/dist/lib/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","names":[],"sources":["../../src/lib/auth.ts"],"mappings":";;;;iBAWsB,6BAAA,CACpB,KAAA,EAAO,uBAAA,EACP,OAAA;EACE,QAAA;EACA,WAAA;EACA,gBAAA;EACA,aAAA;AAAA,GAEF,OAAA,EAAS,eAAA,GACR,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","names":[],"sources":["../../src/lib/auth.ts"],"mappings":";;;;iBAWsB,6BAAA,CACpB,KAAA,EAAO,uBAAA,EACP,OAAA;EACE,QAAA;EACA,WAAA;EACA,gBAAA;EACA,aAAA;AAAA,GAEF,OAAA,EAAS,eAAA,GACR,OAAA;AAAA,iBA8JmB,iBAAA,CACpB,KAAA,EAAO,uBAAA,EACP,WAAA,UACA,OAAA;EACE,+BAAA;AAAA,IACD,OAAA"}
|
package/dist/lib/auth.js
CHANGED
|
@@ -12,7 +12,7 @@ async function getNewOAuthProviderOrScopeUrl(iface, options, session) {
|
|
|
12
12
|
provider: options.provider,
|
|
13
13
|
redirectUrl: (0, ___utils_url_js.constructRedirectUrl)(options.redirectUrl, "redirectUrl"),
|
|
14
14
|
errorRedirectUrl: (0, ___utils_url_js.constructRedirectUrl)(options.errorRedirectUrl, "errorRedirectUrl"),
|
|
15
|
-
afterCallbackRedirectUrl:
|
|
15
|
+
afterCallbackRedirectUrl: window.location.href,
|
|
16
16
|
codeChallenge,
|
|
17
17
|
state,
|
|
18
18
|
type: "link",
|
package/dist/lib/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":["KnownErrors","HexclaveAssertionError","KnownError","Result"],"sources":["../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, KnownErrors, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n afterCallbackRedirectUrl: constructRedirectUrl(window.location.href, \"afterCallbackRedirectUrl\"),\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nconst oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n\nfunction removeOAuthErrorParamsFromHistory(originalUrl: URL): void {\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n}\n\nfunction getProviderOAuthErrorFromUrl(originalUrl: URL): KnownError | null {\n const providerError = originalUrl.searchParams.get(\"error\");\n const providerErrorDescription = originalUrl.searchParams.get(\"error_description\");\n if (providerError == null && providerErrorDescription == null) {\n return null;\n }\n\n switch (providerError) {\n case \"access_denied\":\n case \"consent_required\": {\n return new KnownErrors.OAuthProviderAccessDenied();\n }\n case \"server_error\":\n case \"temporarily_unavailable\":\n default: {\n return new KnownErrors.OAuthProviderTemporarilyUnavailable();\n }\n }\n}\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n removeOAuthErrorParamsFromHistory(originalUrl);\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);\n if (providerOAuthError != null && !requiredParams.every(param => originalUrl.searchParams.has(param))) {\n removeOAuthErrorParamsFromHistory(originalUrl);\n return {\n type: \"known-error\",\n error: providerOAuthError,\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Hexclave found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Hexclave.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAAM,EAAE,eAAe,UAAU,OAAA,GAAA,YAAA,qBAAA,CAA2B;CAC5D,OAAO,MAAM,MAAM,YAAY;EAC7B,UAAU,QAAQ;EAClB,cAAA,GAAA,gBAAA,qBAAA,CAAkC,QAAQ,aAAa,aAAa;EACpE,mBAAA,GAAA,gBAAA,qBAAA,CAAuC,QAAQ,kBA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AC;CACJ,SAAS,GAAG;EACV,IAAID,iBAAAA,WAAW,aAAa,CAAC,GAC3B,MAAM;EAER,MAAM,IAAID,mCAAAA,uBAAuB,6DAA6D,EAAE,OAAO,EAAE,CAAC;CAC5G;AACF"}
|
|
1
|
+
{"version":3,"file":"auth.js","names":["KnownErrors","HexclaveAssertionError","KnownError","Result"],"sources":["../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, KnownErrors, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n // Unlike callback URLs, this is the final user-facing location and may legitimately use a\n // fragment for an account-settings tab. Preserve it exactly.\n afterCallbackRedirectUrl: window.location.href,\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nconst oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n\nfunction removeOAuthErrorParamsFromHistory(originalUrl: URL): void {\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n}\n\nfunction getProviderOAuthErrorFromUrl(originalUrl: URL): KnownError | null {\n const providerError = originalUrl.searchParams.get(\"error\");\n const providerErrorDescription = originalUrl.searchParams.get(\"error_description\");\n if (providerError == null && providerErrorDescription == null) {\n return null;\n }\n\n switch (providerError) {\n case \"access_denied\":\n case \"consent_required\": {\n return new KnownErrors.OAuthProviderAccessDenied();\n }\n case \"server_error\":\n case \"temporarily_unavailable\":\n default: {\n return new KnownErrors.OAuthProviderTemporarilyUnavailable();\n }\n }\n}\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n removeOAuthErrorParamsFromHistory(originalUrl);\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);\n if (providerOAuthError != null && !requiredParams.every(param => originalUrl.searchParams.has(param))) {\n removeOAuthErrorParamsFromHistory(originalUrl);\n return {\n type: \"known-error\",\n error: providerOAuthError,\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Hexclave found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Hexclave.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAAM,EAAE,eAAe,UAAU,OAAA,GAAA,YAAA,qBAAA,CAA2B;CAC5D,OAAO,MAAM,MAAM,YAAY;EAC7B,UAAU,QAAQ;EAClB,cAAA,GAAA,gBAAA,qBAAA,CAAkC,QAAQ,aAAa,aAAa;EACpE,mBAAA,GAAA,gBAAA,qBAAA,CAAuC,QAAQ,kBAAkB,kBAAkB;EAGnF,0BAA0B,OAAO,SAAS;EAC1C;EACA;EACA,MAAM;EACN;EACA,eAAe,QAAQ;CACzB,CAAC;AACH;AAmBA,MAAM,mBAAmB;CAAC;CAAS;CAAqB;CAAa;CAAW;AAAS;AAEzF,SAAS,kCAAkC,aAAwB;CACjE,MAAM,SAAS,IAAI,IAAI,WAAW;CAClC,KAAK,MAAM,SAAS,kBAClB,OAAO,aAAa,OAAO,KAAK;CAElC,OAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,OAAO,SAAS,CAAC;AACvD;AAEA,SAAS,6BAA6B,aAAqC;CACzE,MAAM,gBAAgB,YAAY,aAAa,IAAI,OAAO;CAC1D,MAAM,2BAA2B,YAAY,aAAa,IAAI,mBAAmB;CACjF,IAAI,iBAAiB,QAAQ,4BAA4B,MACvD,OAAO;CAGT,QAAQ,eAAR;EACE,KAAK;EACL,KAAK,oBACH,OAAO,IAAIA,iBAAAA,YAAY,0BAA0B;EAInD,SACE,OAAO,IAAIA,iBAAAA,YAAY,oCAAoC;CA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MAAM,SAAS,gBAClB,OAAO,aAAa,OAAO,KAAK;CASlC,OAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,OAAO,SAAS,CAAC;CAErD,OAAO;EACL,MAAM;EACN;EACA,cAAc,aAAa;EAC3B,OAAO;CACT;AACF;AAEA,eAAsB,kBACpB,OACA,aACA,SAGA;CAIA,MAAM,WAAW,gCAAgC,OAAO;CACxD,IAAI,CAAC,UAAU,OAAOC,oCAAAA,OAAO,GAAG,KAAA,CAAS;CACzC,IAAI,SAAS,SAAS,eACpB,MAAM,SAAS;CAMjB,IAAI;EACF,OAAOA,oCAAAA,OAAO,GAAG,MAAM,MAAM,kBAAkB;GAC7C,aAAa,SAAS,YAAY;GAClC,cAAA,GAAA,gBAAA,qBAAA,CAAkC,aAAa,aAAa;GAC5D,cAAc,SAAS;GACvB,OAAO,SAAS;EAClB,CAAC,CAAC;CACJ,SAAS,GAAG;EACV,IAAID,iBAAAA,WAAW,aAAa,CAAC,GAC3B,MAAM;EAER,MAAM,IAAID,mCAAAA,uBAAuB,6DAA6D,EAAE,OAAO,EAAE,CAAC;CAC5G;AACF"}
|
package/dist/lib/auth.test.js
CHANGED
|
@@ -24,7 +24,7 @@ function createTestInterface() {
|
|
|
24
24
|
}
|
|
25
25
|
(0, vitest.describe)("getNewOAuthProviderOrScopeUrl", () => {
|
|
26
26
|
(0, vitest.it)("returns the OAuth URL without performing navigation", async () => {
|
|
27
|
-
window.history.replaceState({}, "", "/account?after_auth_return_to=%2Fsettings");
|
|
27
|
+
window.history.replaceState({}, "", "/account?after_auth_return_to=%2Fsettings#connected-accounts");
|
|
28
28
|
const iface = createTestInterface();
|
|
29
29
|
const location = await (0, __auth_js.getNewOAuthProviderOrScopeUrl)(iface, {
|
|
30
30
|
provider: "github",
|
|
@@ -39,7 +39,7 @@ function createTestInterface() {
|
|
|
39
39
|
(0, vitest.expect)(`${url.origin}${url.pathname}`).toBe("https://api.example.com/api/v1/auth/oauth/authorize/github");
|
|
40
40
|
(0, vitest.expect)(Object.fromEntries(url.searchParams.entries())).toMatchInlineSnapshot(`
|
|
41
41
|
{
|
|
42
|
-
"after_callback_redirect_url": "http://localhost:3000/account?after_auth_return_to=%2Fsettings",
|
|
42
|
+
"after_callback_redirect_url": "http://localhost:3000/account?after_auth_return_to=%2Fsettings#connected-accounts",
|
|
43
43
|
"client_id": "00000000-0000-4000-8000-000000000000",
|
|
44
44
|
"client_secret": "pck_test",
|
|
45
45
|
"code_challenge": "<stripped code challenge>",
|