@basaltkit/auth 1.6.2 → 1.6.4

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.
@@ -1,4 +1,4 @@
1
- import { type BasaltRoute } from '@basaltkit/fastify';
1
+ import { type BasaltRoute } from '@basaltkit/http';
2
2
  import { OAuth, type OAuthOptions, type OAuthProvider } from './oauth.js';
3
3
  export declare const OAUTH: import("@basaltkit/core").Token<OAuth>;
4
4
  export interface OAuthPluginOptions extends Omit<OAuthOptions, never> {
@@ -1,5 +1,5 @@
1
1
  import { createToken, ctx, definePlugin } from '@basaltkit/core';
2
- import { route } from '@basaltkit/fastify';
2
+ import { route } from '@basaltkit/http';
3
3
  import { z } from 'zod';
4
4
  import { AUTH } from './plugin.js';
5
5
  import { OAuth, stripTrailingSlashes } from './oauth.js';
package/dist/plugin.js CHANGED
@@ -39,6 +39,9 @@ export function authPlugin(options) {
39
39
  throw new AuthRequiredError();
40
40
  };
41
41
  metadata.add('http:guards', guard);
42
+ // Claim `meta.auth` so the adapters' boot check knows this key is
43
+ // enforced (routes declaring it without this plugin fail loud at boot).
44
+ metadata.add('http:guarded-meta', 'auth');
42
45
  },
43
46
  });
44
47
  }
package/dist/routes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type BasaltRoute } from '@basaltkit/fastify';
1
+ import { type BasaltRoute } from '@basaltkit/http';
2
2
  /**
3
3
  * Ready-made auth routes — register them in fastifyPlugin({ routes }):
4
4
  * register · login · refresh · logout · me, plus email verification
package/dist/routes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ctx, BasaltError } from '@basaltkit/core';
2
- import { route } from '@basaltkit/fastify';
2
+ import { route } from '@basaltkit/http';
3
3
  import { z } from 'zod';
4
4
  import { AUTH } from './plugin.js';
5
5
  import { API_KEYS } from './apikeys-plugin.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basaltkit/auth",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Authentication for Basalt: password hashing, JWT with refresh rotation and reuse detection, sessions, ready-made /auth routes and route guards.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,8 +14,8 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@basaltkit/core": "^1.1.2",
18
- "@basaltkit/fastify": "^1.6.1"
17
+ "@basaltkit/core": "^1.3.0",
18
+ "@basaltkit/http": "^1.12.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "zod": "^3.24.0 || ^4.0.0"
@@ -25,6 +25,7 @@
25
25
  "typescript": "^7.0.2",
26
26
  "vitest": "^4.1.11",
27
27
  "zod": "^3.24.0 || ^4.0.0",
28
+ "@basaltkit/fastify": "^1.8.0",
28
29
  "@basaltkit/tsconfig": "^0.24.0"
29
30
  },
30
31
  "publishConfig": {