@aiquants/auth-react-router 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.d.mts +37 -4
- package/dist/admin.d.ts +37 -4
- package/dist/admin.js +1 -1
- package/dist/admin.js.map +1 -1
- package/dist/admin.mjs +1 -1
- package/dist/admin.mjs.map +1 -1
- package/dist/styles/auth-react-router.standalone.css +1 -1
- package/package.json +6 -6
- package/src/admin/labels.ts +4 -0
- package/src/admin/server.ts +40 -4
- package/src/admin/ui.tsx +62 -2
- package/src/admin/views.tsx +44 -4
package/dist/admin.d.mts
CHANGED
|
@@ -280,6 +280,8 @@ type UserAdminLabels = {
|
|
|
280
280
|
syncQueued: string;
|
|
281
281
|
/** 同じ範囲の要求が既に待っていて、積まれなかったことの説明。 */
|
|
282
282
|
syncAlreadyPending: string;
|
|
283
|
+
/** 連携は作れたが、その直後の同期要求を積めなかったときの告知。 */
|
|
284
|
+
linkSyncNotQueued: string;
|
|
283
285
|
/** 同期が滞っていることの警告。停止はセキュリティ事象である。 */
|
|
284
286
|
staleWarning: string;
|
|
285
287
|
disabledWarning: string;
|
|
@@ -631,6 +633,15 @@ type UserAdminCatalogSnapshot = AuthDirectoryCatalogSnapshot;
|
|
|
631
633
|
* 何も積まれていないので、待っている行が誰にも拾われなければ何も起きない。
|
|
632
634
|
*/
|
|
633
635
|
type UserAdminSyncRequestOutcome = "queued" | "already-pending";
|
|
636
|
+
/**
|
|
637
|
+
* What the sync request made right after a link was created did.
|
|
638
|
+
* 連携の直後に積む同期要求が行ったこと。
|
|
639
|
+
*
|
|
640
|
+
* `not-queued` は **連携は成功したが要求は積めなかった** ことを表す。要求の失敗を連携の失敗として
|
|
641
|
+
* 投げると、運用者には「連携に失敗した」と伝わる一方で上流所有のグループは既に増えている。
|
|
642
|
+
* 連携の結果と要求の結果は別の事実なので、別の値で運ぶ。
|
|
643
|
+
*/
|
|
644
|
+
type UserAdminLinkSyncOutcome = UserAdminSyncRequestOutcome | "not-queued";
|
|
634
645
|
/**
|
|
635
646
|
* Why the upstream catalog could not be listed, classified for display.
|
|
636
647
|
* 上流の候補一覧を引けなかった理由を、表示のために分類したもの。
|
|
@@ -725,25 +736,47 @@ declare function createUserAdminApp(config: UserAdminAppConfig): {
|
|
|
725
736
|
syncRequest?: undefined;
|
|
726
737
|
} | {
|
|
727
738
|
ok: boolean;
|
|
728
|
-
syncRequest:
|
|
739
|
+
syncRequest: UserAdminLinkSyncOutcome;
|
|
729
740
|
} | {
|
|
730
741
|
ok: boolean;
|
|
731
742
|
error: string;
|
|
732
743
|
}>;
|
|
733
744
|
};
|
|
734
745
|
|
|
746
|
+
/**
|
|
747
|
+
* How the console keeps itself current while "sync now" requests are waiting for the job.
|
|
748
|
+
* 「今すぐ同期」の要求がジョブを待っている間、画面が自分を最新に保つ間隔と上限。
|
|
749
|
+
*
|
|
750
|
+
* The loader only re-runs after the console's own submissions, so a request the job finishes a few
|
|
751
|
+
* seconds later would stay invisible until a reload. While at least one request is pending the
|
|
752
|
+
* console re-validates every `intervalMs`, and gives up after `maxMs` so a deployment with no job
|
|
753
|
+
* consuming the queue does not poll forever from every open tab.
|
|
754
|
+
* ローダーは自分の送信のあとにしか再実行されないため、ジョブが数秒後に終えた要求はリロードまで
|
|
755
|
+
* 見えない。未処理の要求が 1 件でもある間は `intervalMs` ごとに再検証し、`maxMs` で諦める
|
|
756
|
+
* (キューを消化するジョブが居ない配備で、開いている全タブが永久に叩き続けないため)。
|
|
757
|
+
*/
|
|
758
|
+
type PendingSyncPolling = {
|
|
759
|
+
/** Milliseconds between re-validations. 再検証の間隔 (ミリ秒)。 */
|
|
760
|
+
intervalMs: number;
|
|
761
|
+
/** Milliseconds after which polling stops for an unchanged pending count. 件数が変わらないまま諦めるまでの時間 (ミリ秒)。 */
|
|
762
|
+
maxMs: number;
|
|
763
|
+
};
|
|
764
|
+
/** Defaults: every 3 seconds, for up to 5 minutes. 既定値 (3 秒ごと、最長 5 分)。 */
|
|
765
|
+
declare const DEFAULT_PENDING_SYNC_POLLING: PendingSyncPolling;
|
|
735
766
|
type UserAdminShellProps = {
|
|
736
767
|
children?: React__default.ReactNode;
|
|
737
768
|
renderHeader?: (props: {
|
|
738
769
|
title: string;
|
|
739
770
|
annotation: React__default.ReactNode;
|
|
740
771
|
}) => React__default.ReactNode;
|
|
772
|
+
/** Polling while sync requests are pending; defaults to {@link DEFAULT_PENDING_SYNC_POLLING}. 未処理中のポーリング設定。 */
|
|
773
|
+
pendingSyncPolling?: PendingSyncPolling;
|
|
741
774
|
};
|
|
742
775
|
/**
|
|
743
776
|
* Shell layout for user administration pages with header annotation delegation.
|
|
744
777
|
* ヘッダー注釈委譲を備えたユーザー管理ページのシェルレイアウト。
|
|
745
778
|
*/
|
|
746
|
-
declare function UserAdminShell({ children, renderHeader }: UserAdminShellProps): React__default.JSX.Element;
|
|
779
|
+
declare function UserAdminShell({ children, renderHeader, pendingSyncPolling }: UserAdminShellProps): React__default.JSX.Element;
|
|
747
780
|
|
|
748
781
|
/**
|
|
749
782
|
* @module admin/views
|
|
@@ -795,6 +828,6 @@ type AuthUserAdminAppViewProps = UserAdminShellProps;
|
|
|
795
828
|
* Top-level application view component for the user administration UI (`/users/*`).
|
|
796
829
|
* ユーザー管理 UI 全体を描画するトップレベルコンポーネント。
|
|
797
830
|
*/
|
|
798
|
-
declare function AuthUserAdminAppView({ renderHeader }?: AuthUserAdminAppViewProps): React__default.JSX.Element;
|
|
831
|
+
declare function AuthUserAdminAppView({ renderHeader, pendingSyncPolling }?: AuthUserAdminAppViewProps): React__default.JSX.Element;
|
|
799
832
|
|
|
800
|
-
export { AllowlistView, AuthUserAdminAppView, type AuthUserAdminAppViewProps, DirectoryView, GroupMembersView, GroupsView, type PartialUserAdminLabels, type UserAdminAccess, type UserAdminAppConfig, type UserAdminCatalog, type UserAdminCatalogFailure, type UserAdminCatalogGroup, type UserAdminCatalogSnapshot, type UserAdminGuards, UserAdminInputError, type UserAdminLabels, type UserAdminLoaderData, UserAdminOperatorError, type UserAdminPermission, UserAdminShell, type UserAdminShellProps, type UserAdminStore, type UserAdminSyncRequestOutcome, UsersView, createInMemoryUserAdminStore, createUserAdminApp, defaultUserAdminLabels, jaUserAdminLabels, normalizeUpstreamKey, resolveUserAdminLabels, userAdminAccessFor, userAdminIntents };
|
|
833
|
+
export { AllowlistView, AuthUserAdminAppView, type AuthUserAdminAppViewProps, DEFAULT_PENDING_SYNC_POLLING, DirectoryView, GroupMembersView, GroupsView, type PartialUserAdminLabels, type PendingSyncPolling, type UserAdminAccess, type UserAdminAppConfig, type UserAdminCatalog, type UserAdminCatalogFailure, type UserAdminCatalogGroup, type UserAdminCatalogSnapshot, type UserAdminGuards, UserAdminInputError, type UserAdminLabels, type UserAdminLinkSyncOutcome, type UserAdminLoaderData, UserAdminOperatorError, type UserAdminPermission, UserAdminShell, type UserAdminShellProps, type UserAdminStore, type UserAdminSyncRequestOutcome, UsersView, createInMemoryUserAdminStore, createUserAdminApp, defaultUserAdminLabels, jaUserAdminLabels, normalizeUpstreamKey, resolveUserAdminLabels, userAdminAccessFor, userAdminIntents };
|
package/dist/admin.d.ts
CHANGED
|
@@ -280,6 +280,8 @@ type UserAdminLabels = {
|
|
|
280
280
|
syncQueued: string;
|
|
281
281
|
/** 同じ範囲の要求が既に待っていて、積まれなかったことの説明。 */
|
|
282
282
|
syncAlreadyPending: string;
|
|
283
|
+
/** 連携は作れたが、その直後の同期要求を積めなかったときの告知。 */
|
|
284
|
+
linkSyncNotQueued: string;
|
|
283
285
|
/** 同期が滞っていることの警告。停止はセキュリティ事象である。 */
|
|
284
286
|
staleWarning: string;
|
|
285
287
|
disabledWarning: string;
|
|
@@ -631,6 +633,15 @@ type UserAdminCatalogSnapshot = AuthDirectoryCatalogSnapshot;
|
|
|
631
633
|
* 何も積まれていないので、待っている行が誰にも拾われなければ何も起きない。
|
|
632
634
|
*/
|
|
633
635
|
type UserAdminSyncRequestOutcome = "queued" | "already-pending";
|
|
636
|
+
/**
|
|
637
|
+
* What the sync request made right after a link was created did.
|
|
638
|
+
* 連携の直後に積む同期要求が行ったこと。
|
|
639
|
+
*
|
|
640
|
+
* `not-queued` は **連携は成功したが要求は積めなかった** ことを表す。要求の失敗を連携の失敗として
|
|
641
|
+
* 投げると、運用者には「連携に失敗した」と伝わる一方で上流所有のグループは既に増えている。
|
|
642
|
+
* 連携の結果と要求の結果は別の事実なので、別の値で運ぶ。
|
|
643
|
+
*/
|
|
644
|
+
type UserAdminLinkSyncOutcome = UserAdminSyncRequestOutcome | "not-queued";
|
|
634
645
|
/**
|
|
635
646
|
* Why the upstream catalog could not be listed, classified for display.
|
|
636
647
|
* 上流の候補一覧を引けなかった理由を、表示のために分類したもの。
|
|
@@ -725,25 +736,47 @@ declare function createUserAdminApp(config: UserAdminAppConfig): {
|
|
|
725
736
|
syncRequest?: undefined;
|
|
726
737
|
} | {
|
|
727
738
|
ok: boolean;
|
|
728
|
-
syncRequest:
|
|
739
|
+
syncRequest: UserAdminLinkSyncOutcome;
|
|
729
740
|
} | {
|
|
730
741
|
ok: boolean;
|
|
731
742
|
error: string;
|
|
732
743
|
}>;
|
|
733
744
|
};
|
|
734
745
|
|
|
746
|
+
/**
|
|
747
|
+
* How the console keeps itself current while "sync now" requests are waiting for the job.
|
|
748
|
+
* 「今すぐ同期」の要求がジョブを待っている間、画面が自分を最新に保つ間隔と上限。
|
|
749
|
+
*
|
|
750
|
+
* The loader only re-runs after the console's own submissions, so a request the job finishes a few
|
|
751
|
+
* seconds later would stay invisible until a reload. While at least one request is pending the
|
|
752
|
+
* console re-validates every `intervalMs`, and gives up after `maxMs` so a deployment with no job
|
|
753
|
+
* consuming the queue does not poll forever from every open tab.
|
|
754
|
+
* ローダーは自分の送信のあとにしか再実行されないため、ジョブが数秒後に終えた要求はリロードまで
|
|
755
|
+
* 見えない。未処理の要求が 1 件でもある間は `intervalMs` ごとに再検証し、`maxMs` で諦める
|
|
756
|
+
* (キューを消化するジョブが居ない配備で、開いている全タブが永久に叩き続けないため)。
|
|
757
|
+
*/
|
|
758
|
+
type PendingSyncPolling = {
|
|
759
|
+
/** Milliseconds between re-validations. 再検証の間隔 (ミリ秒)。 */
|
|
760
|
+
intervalMs: number;
|
|
761
|
+
/** Milliseconds after which polling stops for an unchanged pending count. 件数が変わらないまま諦めるまでの時間 (ミリ秒)。 */
|
|
762
|
+
maxMs: number;
|
|
763
|
+
};
|
|
764
|
+
/** Defaults: every 3 seconds, for up to 5 minutes. 既定値 (3 秒ごと、最長 5 分)。 */
|
|
765
|
+
declare const DEFAULT_PENDING_SYNC_POLLING: PendingSyncPolling;
|
|
735
766
|
type UserAdminShellProps = {
|
|
736
767
|
children?: React__default.ReactNode;
|
|
737
768
|
renderHeader?: (props: {
|
|
738
769
|
title: string;
|
|
739
770
|
annotation: React__default.ReactNode;
|
|
740
771
|
}) => React__default.ReactNode;
|
|
772
|
+
/** Polling while sync requests are pending; defaults to {@link DEFAULT_PENDING_SYNC_POLLING}. 未処理中のポーリング設定。 */
|
|
773
|
+
pendingSyncPolling?: PendingSyncPolling;
|
|
741
774
|
};
|
|
742
775
|
/**
|
|
743
776
|
* Shell layout for user administration pages with header annotation delegation.
|
|
744
777
|
* ヘッダー注釈委譲を備えたユーザー管理ページのシェルレイアウト。
|
|
745
778
|
*/
|
|
746
|
-
declare function UserAdminShell({ children, renderHeader }: UserAdminShellProps): React__default.JSX.Element;
|
|
779
|
+
declare function UserAdminShell({ children, renderHeader, pendingSyncPolling }: UserAdminShellProps): React__default.JSX.Element;
|
|
747
780
|
|
|
748
781
|
/**
|
|
749
782
|
* @module admin/views
|
|
@@ -795,6 +828,6 @@ type AuthUserAdminAppViewProps = UserAdminShellProps;
|
|
|
795
828
|
* Top-level application view component for the user administration UI (`/users/*`).
|
|
796
829
|
* ユーザー管理 UI 全体を描画するトップレベルコンポーネント。
|
|
797
830
|
*/
|
|
798
|
-
declare function AuthUserAdminAppView({ renderHeader }?: AuthUserAdminAppViewProps): React__default.JSX.Element;
|
|
831
|
+
declare function AuthUserAdminAppView({ renderHeader, pendingSyncPolling }?: AuthUserAdminAppViewProps): React__default.JSX.Element;
|
|
799
832
|
|
|
800
|
-
export { AllowlistView, AuthUserAdminAppView, type AuthUserAdminAppViewProps, DirectoryView, GroupMembersView, GroupsView, type PartialUserAdminLabels, type UserAdminAccess, type UserAdminAppConfig, type UserAdminCatalog, type UserAdminCatalogFailure, type UserAdminCatalogGroup, type UserAdminCatalogSnapshot, type UserAdminGuards, UserAdminInputError, type UserAdminLabels, type UserAdminLoaderData, UserAdminOperatorError, type UserAdminPermission, UserAdminShell, type UserAdminShellProps, type UserAdminStore, type UserAdminSyncRequestOutcome, UsersView, createInMemoryUserAdminStore, createUserAdminApp, defaultUserAdminLabels, jaUserAdminLabels, normalizeUpstreamKey, resolveUserAdminLabels, userAdminAccessFor, userAdminIntents };
|
|
833
|
+
export { AllowlistView, AuthUserAdminAppView, type AuthUserAdminAppViewProps, DEFAULT_PENDING_SYNC_POLLING, DirectoryView, GroupMembersView, GroupsView, type PartialUserAdminLabels, type PendingSyncPolling, type UserAdminAccess, type UserAdminAppConfig, type UserAdminCatalog, type UserAdminCatalogFailure, type UserAdminCatalogGroup, type UserAdminCatalogSnapshot, type UserAdminGuards, UserAdminInputError, type UserAdminLabels, type UserAdminLinkSyncOutcome, type UserAdminLoaderData, UserAdminOperatorError, type UserAdminPermission, UserAdminShell, type UserAdminShellProps, type UserAdminStore, type UserAdminSyncRequestOutcome, UsersView, createInMemoryUserAdminStore, createUserAdminApp, defaultUserAdminLabels, jaUserAdminLabels, normalizeUpstreamKey, resolveUserAdminLabels, userAdminAccessFor, userAdminIntents };
|