Skip to content

Commit b048a93

Browse files
committed
refactor(plugin-auth): list auth-manager.ts's published names in index.ts
index.ts re-exported auth-manager.ts with export *, so any module-level helper exported there for a module split out of it would be published. It now names the 14 exports auth-manager.ts already has, in declaration order, and a new export there is published only by adding it to the list. The published declarations and both entry points' export lists are unchanged. The cut 5 module header said index.ts re-exports auth-manager.ts whole. That sentence is reworded to say why its four declarations moved with the bodies; it is a comment, and no token of the file changes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr
1 parent 2b7c331 commit b048a93

2 files changed

Lines changed: 25 additions & 5 deletions

File tree

‎packages/plugins/plugin-auth/src/auth-manager-email-sms-delivery.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@
4343
* manager holds.
4444
*
4545
* The four module-level declarations move with the bodies rather than being
46-
* imported back: `index.ts` re-exports `auth-manager.ts` whole, so exporting
47-
* them from there would add them to the published surface, and a value import
48-
* of that file from here would be a cycle. Nothing re-exports this module, so
49-
* the published surface does not move.
46+
* imported back, because only these bodies read them. (`index.ts` lists the
47+
* names it publishes from `auth-manager.ts` one by one, so a helper exported
48+
* there in place for a module split out of it stays off the published
49+
* surface.) Nothing re-exports this module, so the published surface does not
50+
* move.
5051
*/
5152

5253
import type { StandardErrorCode } from '@objectstack/spec/api';

‎packages/plugins/plugin-auth/src/index.ts‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,26 @@ export * from './auth-plugin.js';
1313
// mounts ObjectQL without AuthPlugin (an app's or a plugin's test kit).
1414
// AuthPlugin registers the same manifest from the same builder.
1515
export * from './identity-objects-plugin.js';
16-
export * from './auth-manager.js';
16+
// [#25224] auth-manager.ts's published names, listed by name so that a
17+
// module-level helper it exports for the modules split out of it is not
18+
// published with them. A new export of auth-manager.ts is published only by
19+
// adding it here.
20+
export {
21+
DEFAULT_AUTH_BASE_PATH,
22+
readMcpServerEnabledEnv,
23+
resolveOidcProviderEnabled,
24+
resolveDcrEnabled,
25+
resolveScimEnabled,
26+
assertScimAdminCoherence,
27+
isOAuthEligibleBaseUrl,
28+
type InvitationPlacementServiceLike,
29+
readInvitationPlacementIntent,
30+
type AuthManagerOptions,
31+
ipMatchesRange,
32+
normalizeAuthEmailLocale,
33+
authEmailLocaleFromRequest,
34+
AuthManager,
35+
} from './auth-manager.js';
1736
export * from './ensure-default-organization.js';
1837
// [ADR-0131 D3 / D10 fate 3] The Default Organization's boot invariant, for the
1938
// v18 organization-ownership ceremony (`os migrate organization-ownership

0 commit comments

Comments
 (0)