@jhits/plugin-dep 0.0.3 → 0.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jhits/plugin-dep",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "DEPRECATED: Legacy dependencies and shared logic for JHITS (Phase out in progress)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -8,6 +8,12 @@
8
8
  "main": "./src/index.ts",
9
9
  "types": "./src/index.ts",
10
10
  "sideEffects": false,
11
+ "browser": {
12
+ "./src/index.ts": "./src/index.ts",
13
+ "./src/actions.ts": false,
14
+ "./src/router.ts": false,
15
+ "./src/index.server.ts": false
16
+ },
11
17
  "exports": {
12
18
  ".": {
13
19
  "types": "./src/index.ts",
@@ -27,7 +33,8 @@
27
33
  "jsonwebtoken": "^9.0.2",
28
34
  "mongodb": "^7.0.0",
29
35
  "next-auth": "^4.24.13",
30
- "nodemailer": "^7.0.7"
36
+ "nodemailer": "^7.0.7",
37
+ "server-only": "^0.0.1"
31
38
  },
32
39
  "peerDependencies": {
33
40
  "next": ">=15.0.0"
@@ -42,7 +49,9 @@
42
49
  "typescript": "^5"
43
50
  },
44
51
  "files": [
45
- "src",
52
+ "src/**/*.{ts,tsx,json}",
53
+ "!src/**/*.md",
54
+ "!src/**/README.md",
46
55
  "package.json"
47
56
  ]
48
57
  }
package/src/actions.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  /**
2
2
  * Plugin Deprecated - Actions
3
3
  * Framework-agnostic business logic for deprecated client API routes
4
+ *
5
+ * SERVER-ONLY: This module must never be imported by client code
4
6
  */
5
7
 
8
+ import 'server-only';
9
+
6
10
  import { ObjectId } from 'mongodb';
7
11
  import { DepApiConfig } from './types';
8
12
  import bcrypt from 'bcryptjs';
package/src/index.ts CHANGED
@@ -12,3 +12,5 @@
12
12
  // Empty export - this plugin has no client-side code
13
13
  // Importing this will result in an empty module
14
14
  // Use '@jhits/plugin-dep/server' for server-side imports
15
+ export const isPluginDepLoaded = true;
16
+ export default {};
package/src/router.ts CHANGED
@@ -3,8 +3,12 @@
3
3
  /**
4
4
  * Plugin Deprecated - Router
5
5
  * Framework-agnostic router that routes API requests to business logic actions
6
+ *
7
+ * SERVER-ONLY: This module must never be imported by client code
6
8
  */
7
9
 
10
+ import 'server-only';
11
+
8
12
  import { NextRequest, NextResponse } from 'next/server';
9
13
  import { DepApiConfig } from './types';
10
14
  import * as actions from './actions';