javascript-solid-server 0.0.59 → 0.0.60
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/README.md +18 -1
- package/package.json +1 -1
- package/src/handlers/git.js +3 -2
- package/src/idp/accounts.js +7 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A minimal, fast, JSON-LD native Solid server.
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
### Implemented (v0.0.
|
|
9
|
+
### Implemented (v0.0.60)
|
|
10
10
|
|
|
11
11
|
- **LDP CRUD Operations** - GET, PUT, POST, DELETE, HEAD
|
|
12
12
|
- **N3 Patch** - Solid's native patch format for RDF updates
|
|
@@ -52,6 +52,23 @@ A minimal, fast, JSON-LD native Solid server.
|
|
|
52
52
|
|
|
53
53
|
- Node.js 18+
|
|
54
54
|
|
|
55
|
+
### Android/Termux
|
|
56
|
+
|
|
57
|
+
JSS runs on Android via Termux with automatic `bcryptjs` fallback:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pkg install nodejs git
|
|
61
|
+
npm install -g javascript-solid-server
|
|
62
|
+
jss start --port 8080 --nostr --git
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use PM2 for persistence:
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g pm2
|
|
68
|
+
pm2 start jss -- start --port 8080 --nostr --git
|
|
69
|
+
pm2 save
|
|
70
|
+
```
|
|
71
|
+
|
|
55
72
|
### Installation
|
|
56
73
|
|
|
57
74
|
```bash
|
package/package.json
CHANGED
package/src/handlers/git.js
CHANGED
|
@@ -34,8 +34,9 @@ function extractRepoPath(urlPath) {
|
|
|
34
34
|
.replace(/\/git-upload-pack$/, '')
|
|
35
35
|
.replace(/\/git-receive-pack$/, '');
|
|
36
36
|
|
|
37
|
-
// Remove leading slash
|
|
38
|
-
|
|
37
|
+
// Remove leading slash, use '.' for root
|
|
38
|
+
const result = cleanPath.replace(/^\//, '');
|
|
39
|
+
return result === '' ? '.' : result;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
package/src/idp/accounts.js
CHANGED
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
* Email is optional - internally uses username@jss if not provided
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// Try native bcrypt, fall back to pure JS bcryptjs (for Android/Termux)
|
|
8
|
+
let bcrypt;
|
|
9
|
+
try {
|
|
10
|
+
bcrypt = await import('bcrypt').then(m => m.default);
|
|
11
|
+
} catch {
|
|
12
|
+
bcrypt = await import('bcryptjs').then(m => m.default);
|
|
13
|
+
}
|
|
8
14
|
import crypto from 'crypto';
|
|
9
15
|
import fs from 'fs-extra';
|
|
10
16
|
import path from 'path';
|