@zgeoff/mcp-auth 0.2.0 → 0.2.1

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.
@@ -0,0 +1 @@
1
+ import 'reflect-metadata';
@@ -1,4 +1,4 @@
1
- import 'reflect-metadata';
1
+ import './load-reflect-polyfill.ts';
2
2
  import type { Store } from '../store/open-store.ts';
3
3
  import type { PasskeyID } from '../types.ts';
4
4
  interface AssertionCheck {
@@ -1,4 +1,4 @@
1
- import 'reflect-metadata';
1
+ import './load-reflect-polyfill.ts';
2
2
  import type { PasskeyID } from '../types.ts';
3
3
  interface RegistrationCheck {
4
4
  readonly credential: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/mcp-auth",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner",
5
5
  "keywords": [
6
6
  "better-auth",
@@ -0,0 +1,5 @@
1
+ // A module that imports the polyfill beside an ES module, such as simplewebauthn,
2
+ // loads it too late in a bundle that wraps modules in lazy inits: Bun runs the
3
+ // ESM inits before the CommonJS require. Its own module makes it an ESM init.
4
+ // oxlint-disable-next-line import/no-unassigned-import -- the polyfill is a side effect
5
+ import 'reflect-metadata';
@@ -1,6 +1,6 @@
1
1
  // The certificate code of simplewebauthn needs the polyfill loaded first, and a compiled binary does not load it.
2
2
  // oxlint-disable-next-line import/no-unassigned-import -- the polyfill is a side effect
3
- import 'reflect-metadata';
3
+ import './load-reflect-polyfill.ts';
4
4
  import { verifyAuthenticationResponse } from '@simplewebauthn/server';
5
5
  import type {
6
6
  AuthenticationResponseJSON,
@@ -1,6 +1,6 @@
1
1
  // The certificate code of simplewebauthn needs the polyfill loaded first, and a compiled binary does not load it.
2
2
  // oxlint-disable-next-line import/no-unassigned-import -- the polyfill is a side effect
3
- import 'reflect-metadata';
3
+ import './load-reflect-polyfill.ts';
4
4
  import type { RegistrationResponseJSON } from '@simplewebauthn/server';
5
5
  import { verifyRegistrationResponse } from '@simplewebauthn/server';
6
6
  import { toTagged } from '@zgeoff/std';