@djangocfg/api 2.1.626 → 2.1.628
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/auth.cjs +6 -3
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +8 -1
- package/dist/auth.d.ts +8 -1
- package/dist/auth.mjs +6 -3
- package/dist/auth.mjs.map +1 -1
- package/dist/index.cjs +0 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +0 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/auth/__tests__/trace.test.ts +13 -1
- package/src/auth/index.ts +2 -0
- package/src/auth/trace.ts +5 -2
package/dist/auth.d.cts
CHANGED
|
@@ -63,6 +63,13 @@ declare function dumpAuthTrace(): string;
|
|
|
63
63
|
* The generated auth store forwards through `globalThis.__cfgAuthTrace` and queues until this runs.
|
|
64
64
|
*/
|
|
65
65
|
declare function installAuthTrace(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Count the copies of this package in the page. More than one means the bundle holds duplicates (pnpm peer-set
|
|
68
|
+
* variants, a dual ESM/CJS load): the contexts are shared (`sharedContext`), but the build should still be fixed.
|
|
69
|
+
* Visible as `dup.copy` in the trace and once in the console.
|
|
70
|
+
* Called once by the auth entry (`src/auth/index.ts`), not by this module (see below).
|
|
71
|
+
*/
|
|
72
|
+
declare function registerAuthCopy(): void;
|
|
66
73
|
|
|
67
74
|
type SessionStatus = 'authenticated' | 'anonymous';
|
|
68
75
|
type SessionSnapshot = {
|
|
@@ -1609,5 +1616,5 @@ declare const Analytics: {
|
|
|
1609
1616
|
setUser(userId: string | null): void;
|
|
1610
1617
|
};
|
|
1611
1618
|
|
|
1612
|
-
export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, AccountsProvider, Analytics, AnalyticsCategory, AnalyticsEvent, AuthContext, AuthProvider, OAUTH_PROVIDER_IDS, authLogger, authTrace, beginTwoFactorChallenge, clearAuthTrace, clearOAuthAttempt, clearProfileCache, consumeSavedRedirect, decodeBase64, dumpAuthTrace, encodeBase64, endTwoFactorChallenge, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, installAuthTrace, isAllowedAuthPath, isForbidden, isOAuthProviderId, logAuthFailure, logger, normalizePath, peekSavedRedirect, readAuthTrace, readOAuthFailure, resetAuthTraceForTests, resolveAuthError, resolveAuthStatus, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useOAuthLogin, useOAuthProviders, useQueryParams, useSession, useSessionStorage, useTimezone, useTwoFactor, useTwoFactorChallenge, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
|
|
1619
|
+
export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, AccountsProvider, Analytics, AnalyticsCategory, AnalyticsEvent, AuthContext, AuthProvider, OAUTH_PROVIDER_IDS, authLogger, authTrace, beginTwoFactorChallenge, clearAuthTrace, clearOAuthAttempt, clearProfileCache, consumeSavedRedirect, decodeBase64, dumpAuthTrace, encodeBase64, endTwoFactorChallenge, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, installAuthTrace, isAllowedAuthPath, isForbidden, isOAuthProviderId, logAuthFailure, logger, normalizePath, peekSavedRedirect, readAuthTrace, readOAuthFailure, registerAuthCopy, resetAuthTraceForTests, resolveAuthError, resolveAuthStatus, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useOAuthLogin, useOAuthProviders, useQueryParams, useSession, useSessionStorage, useTimezone, useTwoFactor, useTwoFactorChallenge, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
|
|
1613
1620
|
export type { AccountsContextValue, AnalyticsCategoryType, AnalyticsEventType, AnalyticsSink, AuthConfig, AuthContextType, AuthErrorCopy, AuthErrorKey, AuthFormAutoSubmit, AuthFormReturn, AuthFormState, AuthFormStateHandlers, AuthFormSubmitHandlers, AuthFormValidation, AuthProviderProps, AuthStateInput, AuthStatus, AuthStep, DeleteAccountResult, GuardInput, OAuthClientErrorCode, OAuthErrorCode, OAuthFailure, OAuthFailureCode, OAuthProviderId, OAuthUser, OTPRequestConsent, OTPRequestResult, PasswordLoginOptions, PasswordLoginResult, PatchedCfgUserUpdateRequest, ProfileCacheOptions, SessionSnapshot, SessionStatus, TraceEntry, TraceFields, TwoFactorChallenge, TwoFactorDevice, TwoFactorSetupData, UseAuthFormOptions, UseAuthFormStateReturn, UseAutoAuthOptions, UseDeleteAccountReturn, UseGithubAuthOptions, UseGithubAuthReturn, UseOAuthLoginOptions, UseOAuthLoginReturn, UseOAuthProvidersReturn, UseTimezoneReturn, UseTwoFactorOptions, UseTwoFactorReturn, UseTwoFactorSetupOptions, UseTwoFactorSetupReturn, UseTwoFactorStatusReturn, UseTwoFactorVerifyOptions, UseTwoFactorVerifyReturn, UserProfile, WebmailLink };
|
package/dist/auth.d.ts
CHANGED
|
@@ -63,6 +63,13 @@ declare function dumpAuthTrace(): string;
|
|
|
63
63
|
* The generated auth store forwards through `globalThis.__cfgAuthTrace` and queues until this runs.
|
|
64
64
|
*/
|
|
65
65
|
declare function installAuthTrace(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Count the copies of this package in the page. More than one means the bundle holds duplicates (pnpm peer-set
|
|
68
|
+
* variants, a dual ESM/CJS load): the contexts are shared (`sharedContext`), but the build should still be fixed.
|
|
69
|
+
* Visible as `dup.copy` in the trace and once in the console.
|
|
70
|
+
* Called once by the auth entry (`src/auth/index.ts`), not by this module (see below).
|
|
71
|
+
*/
|
|
72
|
+
declare function registerAuthCopy(): void;
|
|
66
73
|
|
|
67
74
|
type SessionStatus = 'authenticated' | 'anonymous';
|
|
68
75
|
type SessionSnapshot = {
|
|
@@ -1609,5 +1616,5 @@ declare const Analytics: {
|
|
|
1609
1616
|
setUser(userId: string | null): void;
|
|
1610
1617
|
};
|
|
1611
1618
|
|
|
1612
|
-
export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, AccountsProvider, Analytics, AnalyticsCategory, AnalyticsEvent, AuthContext, AuthProvider, OAUTH_PROVIDER_IDS, authLogger, authTrace, beginTwoFactorChallenge, clearAuthTrace, clearOAuthAttempt, clearProfileCache, consumeSavedRedirect, decodeBase64, dumpAuthTrace, encodeBase64, endTwoFactorChallenge, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, installAuthTrace, isAllowedAuthPath, isForbidden, isOAuthProviderId, logAuthFailure, logger, normalizePath, peekSavedRedirect, readAuthTrace, readOAuthFailure, resetAuthTraceForTests, resolveAuthError, resolveAuthStatus, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useOAuthLogin, useOAuthProviders, useQueryParams, useSession, useSessionStorage, useTimezone, useTwoFactor, useTwoFactorChallenge, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
|
|
1619
|
+
export { AUTH_CONSTANTS, AUTH_ERROR_KEYS, AccountsProvider, Analytics, AnalyticsCategory, AnalyticsEvent, AuthContext, AuthProvider, OAUTH_PROVIDER_IDS, authLogger, authTrace, beginTwoFactorChallenge, clearAuthTrace, clearOAuthAttempt, clearProfileCache, consumeSavedRedirect, decodeBase64, dumpAuthTrace, encodeBase64, endTwoFactorChallenge, formatAuthError, getCacheMetadata, getCachedProfile, hasValidCache, installAuthTrace, isAllowedAuthPath, isForbidden, isOAuthProviderId, logAuthFailure, logger, normalizePath, peekSavedRedirect, readAuthTrace, readOAuthFailure, registerAuthCopy, resetAuthTraceForTests, resolveAuthError, resolveAuthStatus, resolveGuardIsAuthenticated, resolveGuardIsLoading, setAnalyticsSink, setCachedProfile, shouldRedirectToAuth, useAccountsContext, useAuth, useAuthForm, useAuthFormState, useAuthRedirectManager, useAuthValidation, useAutoAuth, useBase64, useCfgRouter, useDeleteAccount, useGithubAuth, useLocalStorage, useOAuthLogin, useOAuthProviders, useQueryParams, useSession, useSessionStorage, useTimezone, useTwoFactor, useTwoFactorChallenge, useTwoFactorSetup, useTwoFactorStatus, useTwoFactorVerify, validateEmail, validateIdentifier };
|
|
1613
1620
|
export type { AccountsContextValue, AnalyticsCategoryType, AnalyticsEventType, AnalyticsSink, AuthConfig, AuthContextType, AuthErrorCopy, AuthErrorKey, AuthFormAutoSubmit, AuthFormReturn, AuthFormState, AuthFormStateHandlers, AuthFormSubmitHandlers, AuthFormValidation, AuthProviderProps, AuthStateInput, AuthStatus, AuthStep, DeleteAccountResult, GuardInput, OAuthClientErrorCode, OAuthErrorCode, OAuthFailure, OAuthFailureCode, OAuthProviderId, OAuthUser, OTPRequestConsent, OTPRequestResult, PasswordLoginOptions, PasswordLoginResult, PatchedCfgUserUpdateRequest, ProfileCacheOptions, SessionSnapshot, SessionStatus, TraceEntry, TraceFields, TwoFactorChallenge, TwoFactorDevice, TwoFactorSetupData, UseAuthFormOptions, UseAuthFormStateReturn, UseAutoAuthOptions, UseDeleteAccountReturn, UseGithubAuthOptions, UseGithubAuthReturn, UseOAuthLoginOptions, UseOAuthLoginReturn, UseOAuthProvidersReturn, UseTimezoneReturn, UseTwoFactorOptions, UseTwoFactorReturn, UseTwoFactorSetupOptions, UseTwoFactorSetupReturn, UseTwoFactorStatusReturn, UseTwoFactorVerifyOptions, UseTwoFactorVerifyReturn, UserProfile, WebmailLink };
|
package/dist/auth.mjs
CHANGED
|
@@ -191,7 +191,7 @@ function installAuthTrace() {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
__name(installAuthTrace, "installAuthTrace");
|
|
194
|
-
function
|
|
194
|
+
function registerAuthCopy() {
|
|
195
195
|
if (!hasWindow) return;
|
|
196
196
|
const g = globalThis;
|
|
197
197
|
const n = (g.__cfgAuthCopies ?? 0) + 1;
|
|
@@ -203,8 +203,7 @@ function registerCopy() {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
__name(
|
|
207
|
-
registerCopy();
|
|
206
|
+
__name(registerAuthCopy, "registerAuthCopy");
|
|
208
207
|
installAuthTrace();
|
|
209
208
|
|
|
210
209
|
// src/auth/context/AuthContext.tsx
|
|
@@ -5741,6 +5740,9 @@ function resolveGuardIsAuthenticated(s) {
|
|
|
5741
5740
|
return !s.requireAuth || s.isAuthenticated;
|
|
5742
5741
|
}
|
|
5743
5742
|
__name(resolveGuardIsAuthenticated, "resolveGuardIsAuthenticated");
|
|
5743
|
+
|
|
5744
|
+
// src/auth/index.ts
|
|
5745
|
+
registerAuthCopy();
|
|
5744
5746
|
export {
|
|
5745
5747
|
AUTH_CONSTANTS,
|
|
5746
5748
|
AUTH_ERROR_KEYS,
|
|
@@ -5776,6 +5778,7 @@ export {
|
|
|
5776
5778
|
peekSavedRedirect,
|
|
5777
5779
|
readAuthTrace,
|
|
5778
5780
|
readOAuthFailure,
|
|
5781
|
+
registerAuthCopy,
|
|
5779
5782
|
resetAuthTraceForTests,
|
|
5780
5783
|
resolveAuthError,
|
|
5781
5784
|
resolveAuthStatus,
|