javascript-solid-server 0.0.79 → 0.0.81
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/.claude/settings.local.json +283 -0
- package/README.md +3 -3
- package/package.json +1 -3
- package/src/ap/store.js +38 -63
- package/src/idp/accounts.js +2 -7
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"WebSearch",
|
|
5
|
+
"WebFetch(domain:github.com)",
|
|
6
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
7
|
+
"Bash(cat:*)",
|
|
8
|
+
"WebFetch(domain:www.inrupt.com)",
|
|
9
|
+
"Bash(npm install:*)",
|
|
10
|
+
"Bash(timeout 3 node:*)",
|
|
11
|
+
"Bash(PORT=3030 timeout 3 node:*)",
|
|
12
|
+
"Bash(git commit:*)",
|
|
13
|
+
"Bash(pkill:*)",
|
|
14
|
+
"Bash(curl:*)",
|
|
15
|
+
"Bash(npm test:*)",
|
|
16
|
+
"Bash(git add:*)",
|
|
17
|
+
"WebFetch(domain:solid.github.io)",
|
|
18
|
+
"Bash(node:*)",
|
|
19
|
+
"WebFetch(domain:solidservers.org)",
|
|
20
|
+
"WebFetch(domain:solid-contrib.github.io)",
|
|
21
|
+
"Bash(git clone:*)",
|
|
22
|
+
"Bash(chmod:*)",
|
|
23
|
+
"Bash(JSS_PORT=4000 JSS_CONNEG=true node bin/jss.js:*)",
|
|
24
|
+
"Bash(find:*)",
|
|
25
|
+
"Bash(timeout 5 node:*)",
|
|
26
|
+
"Bash(npm view:*)",
|
|
27
|
+
"Bash(npm ls:*)",
|
|
28
|
+
"Bash(timeout 10 node:*)",
|
|
29
|
+
"Bash(npm run test:cth:*)",
|
|
30
|
+
"Bash(__NEW_LINE__ curl -s -X POST http://localhost:4000/.pods )",
|
|
31
|
+
"Bash(lsof:*)",
|
|
32
|
+
"Bash(xargs kill -9)",
|
|
33
|
+
"Bash(docker:*)",
|
|
34
|
+
"Bash(solidproject/conformance-test-harness )",
|
|
35
|
+
"Bash(timeout 30 node:*)",
|
|
36
|
+
"Bash(timeout 20 node:*)",
|
|
37
|
+
"Bash(timeout 25 node:*)",
|
|
38
|
+
"Bash(JSS_PORT=4000 JSS_CONNEG=true timeout 5 node:*)",
|
|
39
|
+
"Bash(pgrep:*)",
|
|
40
|
+
"Bash(python3:*)",
|
|
41
|
+
"Bash(ls:*)",
|
|
42
|
+
"Bash(timeout 15 node:*)",
|
|
43
|
+
"Bash(echo 'No .idp folder' echo find /home/melvin/remote/github.com/JavaScriptSolidServer/JavaScriptSolidServer/data/.idp/ -name *.json)",
|
|
44
|
+
"Bash(echo '=== Interactions ===' ls -la /home/melvin/remote/github.com/JavaScriptSolidServer/JavaScriptSolidServer/data/.idp/interaction/ echo echo '=== Latest interaction ===' cat /home/melvin/remote/github.com/JavaScriptSolidServer/JavaScriptSolidServer/data/.idp/interaction/*.json)",
|
|
45
|
+
"Bash(1 echo \"\" echo \"=== Server errors ===\" grep -E \"(error|Error)\" /tmp/jss.log)",
|
|
46
|
+
"Bash(echo 'Server not ready' curl -s -X POST http://localhost:4000/.pods -H 'Content-Type: application/json' -d {\"\"name\"\":\"\"alice\"\",\"\"email\"\":\"\"alice@example.com\"\",\"\"password\"\":\"\"alicepassword123\"\"})",
|
|
47
|
+
"Bash(head -1 curl -s -X POST http://localhost:4000/.pods -H \"Content-Type: application/json\" -d '{\"\"\"\"name\"\"\"\":\"\"\"\"bob\"\"\"\",\"\"\"\"email\"\"\"\":\"\"\"\"bob@example.com\"\"\"\",\"\"\"\"password\"\"\"\":\"\"\"\"bobpassword123\"\"\"\"}')",
|
|
48
|
+
"Bash(xargs:*)",
|
|
49
|
+
"Bash(fuser:*)",
|
|
50
|
+
"Bash(kill:*)",
|
|
51
|
+
"Bash(ACCESS_TOKEN=\"eyJhbGciOiJFUzI1NiIsImtpZCI6IjQwY2U0YzIzLWY2OWQtNDU4NS05ODg2LTE4MDQzZWIyZjU2ZCJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjQwMDAvIiwic3ViIjoiYjhlZjY5YWUtODc0ZS00MDg5LThiMDktOGQwY2QyM2VlZWY3IiwiYXVkIjoic29saWQiLCJ3ZWJpZCI6Imh0dHA6Ly9sb2NhbGhvc3Q0MDAwL2FsaWNlLyNtZSIsImlhdCI6MTc2NjgyOTQ5MiwiZXhwIjoxNzY2ODMzMDkyLCJqdGkiOiIwMWY4ODVlZS05ZjY2LTQ3M2MtYmZkNC05MWM4ZGU3NGJhZjYiLCJjbGllbnRfaWQiOiJjcmVkZW50aWFsc19jbGllbnQiLCJzY29wZSI6Im9wZW5pZCB3ZWJpZCJ9.DYTlSRkORyDN28XtXk-zbR7xNLViD97KkPqUKb6chV860BaIgwa1suif4TxHQDnK_ejvbvmZ46_n5WwwRnf_Zw\" curl -sI -X PUT http://localhost:4000/alice/cth-test/ -H \"Content-Type: text/turtle\" -H \"Authorization: Bearer $ACCESS_TOKEN\")",
|
|
52
|
+
"Bash(timeout 60 docker run:*)",
|
|
53
|
+
"Bash(rm:*)",
|
|
54
|
+
"Bash(mkdir:*)",
|
|
55
|
+
"WebFetch(domain:communitysolidserver.github.io)",
|
|
56
|
+
"WebFetch(domain:solidos.github.io)",
|
|
57
|
+
"WebFetch(domain:solidcommunity.net)",
|
|
58
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
59
|
+
"Bash(pm2 list:*)",
|
|
60
|
+
"Bash(pm2 logs:*)",
|
|
61
|
+
"Bash(pm2 restart:*)",
|
|
62
|
+
"Bash(timeout 60 npm test:*)",
|
|
63
|
+
"Bash(pm2 stop:*)",
|
|
64
|
+
"Bash(pm2 delete:*)",
|
|
65
|
+
"Bash(pm2 start:*)",
|
|
66
|
+
"Bash(DATA_ROOT=/home/melvin/jss/data pm2 start:*)",
|
|
67
|
+
"Bash(pm2 save:*)",
|
|
68
|
+
"Bash(gh issue create:*)",
|
|
69
|
+
"Bash(gh issue view:*)",
|
|
70
|
+
"Bash(gh issue edit:*)",
|
|
71
|
+
"WebFetch(domain:nostrcg.github.io)",
|
|
72
|
+
"WebFetch(domain:melvincarvalho.github.io)",
|
|
73
|
+
"WebFetch(domain:dev.to)",
|
|
74
|
+
"WebFetch(domain:solidproject.org)",
|
|
75
|
+
"WebFetch(domain:www.w3.org)",
|
|
76
|
+
"Bash(wc:*)",
|
|
77
|
+
"Bash(TOKEN=\"eyJraW5kIjoyNzIzNSwidGFncyI6W1sidSIsImh0dHA6Ly9sb2NhbGhvc3Q6NDAwMC9kZW1vL25vc3RyLXpvbmUvIl0sWyJtZXRob2QiLCJHRVQiXV0sImNyZWF0ZWRfYXQiOjE3NjY5MzQ1NjksImNvbnRlbnQiOiIiLCJwdWJrZXkiOiI4OTg5OWNmOWEyNGE5ZTdlMTNmODU3MGRkMGI1MmJiOTQyMjllNDI2OGM1MGQ1OWZhNjdhMzQ0MGQ0NmFhZTdkIiwiaWQiOiJiNTUyMDUyOTVmYmQwYzhjZDYwMzk1NTgwOWYxZGM5Y2MwMjdlY2U4N2NjYmNlNzcwNWY2MjdmNmQ0ODk1MGJkIiwic2lnIjoiOWYzN2Y0NzIyZDlkNmFmZGQ5OTNkYTM0MDg2MWQ2YzQ4MmY1NzQ1MmFmZTIwZmY2YmI5OTAxNGIwOTU3NjUwMWZiNTgyZjEzNzNlZmVhNjI4ZDI5ZjlhMzhmZTgyODU0ODlmMzAzYzlmYmJjYWE0OTQxZjUyZGZlMWYxNzVkOWMifQ==\")",
|
|
78
|
+
"WebFetch(domain:solid-lite.org)",
|
|
79
|
+
"Bash(git push:*)",
|
|
80
|
+
"WebFetch(domain:linkedwebstorage.com)",
|
|
81
|
+
"WebFetch(domain:w3c.github.io)",
|
|
82
|
+
"WebFetch(domain:socialdocs.org)",
|
|
83
|
+
"WebFetch(domain:nosdav.com)",
|
|
84
|
+
"WebFetch(domain:sandy-mount.com)",
|
|
85
|
+
"WebFetch(domain:ditto.pub)",
|
|
86
|
+
"WebFetch(domain:blocktrails.org)",
|
|
87
|
+
"WebFetch(domain:microfed.org)",
|
|
88
|
+
"WebFetch(domain:soliddocs.org)",
|
|
89
|
+
"WebFetch(domain:agenticalliance.com)",
|
|
90
|
+
"WebFetch(domain:activitypub.rocks)",
|
|
91
|
+
"WebFetch(domain:nostrgit.org)",
|
|
92
|
+
"Bash(convert:*)",
|
|
93
|
+
"WebFetch(domain:instantdomainsearch.com)",
|
|
94
|
+
"Bash(for domain in jss.dev jss.sh jss.io jss.app solidserver.dev solid-server.dev)",
|
|
95
|
+
"Bash(do echo -n '$domain: ')",
|
|
96
|
+
"Bash(whois $domain)",
|
|
97
|
+
"Bash(done)",
|
|
98
|
+
"Bash(for domain in jss.dev jss.sh jss.io jss.app solidserver.dev)",
|
|
99
|
+
"Bash(host:*)",
|
|
100
|
+
"WebFetch(domain:nostr-components.github.io)",
|
|
101
|
+
"Bash(ssh melvincarvalho.com \"pm2 list && echo ''---HAPROXY---'' && cat /etc/haproxy/haproxy.cfg 2>/dev/null | grep -A5 ''melvin\\|backend\\|frontend\\|acl host''\")",
|
|
102
|
+
"Bash(ssh:*)",
|
|
103
|
+
"Bash(time curl -s --connect-timeout 10 https://melvin.solid.live/credit/count.ttl)",
|
|
104
|
+
"Bash(time curl -s --connect-timeout 10 https://melvin.solid.live/)",
|
|
105
|
+
"Bash(time curl:*)",
|
|
106
|
+
"Bash(time curl -s 'https://melvin.solid.live/credit/count.ttl')",
|
|
107
|
+
"Bash(grep:*)",
|
|
108
|
+
"Bash(scp:*)",
|
|
109
|
+
"Bash(for i in 1 2 3)",
|
|
110
|
+
"Bash(do echo \"Attempt $i:\")",
|
|
111
|
+
"Bash(for i in 1 2 3 4 5)",
|
|
112
|
+
"Bash(do curl -so /dev/null -w \"%{http_code} \" https://melvincarvalho.com/js/handlemutation.js)",
|
|
113
|
+
"Bash(for i in 1 2 3 4 5 6 7 8 9 10)",
|
|
114
|
+
"Bash(if [ ! -d \"jose\" ])",
|
|
115
|
+
"Bash(then git clone --depth 1 --branch v0.7.0 https://github.com/solid/jose.git)",
|
|
116
|
+
"Bash(fi)",
|
|
117
|
+
"Bash(timeout 45 node:*)",
|
|
118
|
+
"Bash(gh issue list:*)",
|
|
119
|
+
"Bash(DATA_ROOT=/tmp/jss-git-test JSS_PORT=4444 timeout 3 node:*)",
|
|
120
|
+
"Bash(pm2 show:*)",
|
|
121
|
+
"Bash(git config:*)",
|
|
122
|
+
"Bash(npm version:*)",
|
|
123
|
+
"Bash(git init:*)",
|
|
124
|
+
"Bash(gh repo create:*)",
|
|
125
|
+
"Bash(./bin/git-credential-nostr generate:*)",
|
|
126
|
+
"Bash(./bin/git-credential-nostr get:*)",
|
|
127
|
+
"Bash(git-credential-nostr:*)",
|
|
128
|
+
"Bash(git branch:*)",
|
|
129
|
+
"Bash(GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push:*)",
|
|
130
|
+
"Bash(GIT_CURL_VERBOSE=1 git push:*)",
|
|
131
|
+
"Bash(git reset:*)",
|
|
132
|
+
"Bash(echo:*)",
|
|
133
|
+
"Bash(unset DATA_ROOT)",
|
|
134
|
+
"Bash(timeout 30 npm test:*)",
|
|
135
|
+
"Bash(/home/melvin/remote/github.com/JavaScriptSolidServer/git-credential-nostr/bin/git-credential-nostr acl:*)",
|
|
136
|
+
"Bash(npm cache clean:*)",
|
|
137
|
+
"Bash(git checkout:*)",
|
|
138
|
+
"Bash(gh gist edit:*)",
|
|
139
|
+
"Bash(gh gist view:*)",
|
|
140
|
+
"Bash(./bin/git-credential-nostr acl:*)",
|
|
141
|
+
"Bash(DATA_ROOT=/tmp/jss-git-test/data node:*)",
|
|
142
|
+
"Bash(git remote set-url:*)",
|
|
143
|
+
"Bash(for:*)",
|
|
144
|
+
"Bash(^/**\" | head -1 | sed ''''s/.*\\* //'''')\")",
|
|
145
|
+
"Bash(if [ ! -d \"node-solid-server\" ])",
|
|
146
|
+
"Bash(then git clone --depth 1 https://github.com/nodeSolidServer/node-solid-server.git)",
|
|
147
|
+
"Bash(node test-local-nss2.js:*)",
|
|
148
|
+
"Bash(npm test)",
|
|
149
|
+
"Bash(repos.json)",
|
|
150
|
+
"Bash(*.log)",
|
|
151
|
+
"Bash(node --check:*)",
|
|
152
|
+
"Bash(gh repo view:*)",
|
|
153
|
+
"Bash(noskey --help:*)",
|
|
154
|
+
"Bash(npx noskey --help:*)",
|
|
155
|
+
"Bash(noskey:*)",
|
|
156
|
+
"Bash(node -e:*)",
|
|
157
|
+
"Bash(node src/publish.js:*)",
|
|
158
|
+
"Bash(git remote add:*)",
|
|
159
|
+
"Bash(git fetch:*)",
|
|
160
|
+
"Bash(git rev-parse:*)",
|
|
161
|
+
"Bash(f502f06c1d7553f4b7159e8d57a1e14819dc3053b59399e080882cc8e6bb62ad )",
|
|
162
|
+
"Bash(798715377357003683b979b41c5d99c0312e6e788d789f0d5df710465483aa3e )",
|
|
163
|
+
"Bash(f810e7491da3390109ddc13a74a1fff985ba3a4735024f2b714c12d213f5ea11 )",
|
|
164
|
+
"Bash(1 )",
|
|
165
|
+
"Bash(911912000 )",
|
|
166
|
+
"Bash(4ccef8c68cf18f8f156a0bb017dfd6e0cc7ebf1672fa2d769e02e2efc700328b 1000000 )",
|
|
167
|
+
"Bash(798715377357003683b979b41c5d99c0312e6e788d789f0d5df710465483aa3e 910911000 )",
|
|
168
|
+
"Bash(~/.gitmark/faucet.txt)",
|
|
169
|
+
"Bash(blocktrails --version:*)",
|
|
170
|
+
"Bash(blocktrails --help:*)",
|
|
171
|
+
"Bash(blocktrails show:*)",
|
|
172
|
+
"Bash(git restore:*)",
|
|
173
|
+
"Bash(npm show:*)",
|
|
174
|
+
"WebFetch(domain:gitlab.com)",
|
|
175
|
+
"Bash(gh repo edit:*)",
|
|
176
|
+
"WebFetch(domain:blocktrails.github.io)",
|
|
177
|
+
"Bash(jq:*)",
|
|
178
|
+
"Bash(SOLID_SYNC=true timeout 45 node:*)",
|
|
179
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm status)",
|
|
180
|
+
"Bash(SOLID_SYNC=true ANCHOR=true timeout 8 node:*)",
|
|
181
|
+
"Bash(SOLID_SYNC=true ANCHOR=true node:*)",
|
|
182
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm diff src/watcher.js)",
|
|
183
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm add src/watcher.js)",
|
|
184
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm commit -m \"$\\(cat <<''EOF''\nAdd transfer API and HTTP 402 middleware\n\n- Add POST /transfer endpoint for user-to-user token transfers\n- Add verify402Payment middleware for token-gated APIs\n- Add GET /api/quote demo endpoint \\(costs 1 GSAT\\)\n- Add GET /balance/:did and GET /state endpoints\n- Fix anchor function to use encodeBech32m for address derivation\n- Remove OP_RETURN from anchor tx \\(state hash stored in state.json\\)\nEOF\n\\)\")",
|
|
185
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm push)",
|
|
186
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm add demo.html src/watcher.js debug.html paywall.html transfer.html)",
|
|
187
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm commit -m \"$\\(cat <<''EOF''\nAdd NIP-98 paywall, transfer, withdraw, and debug pages\n\n- Implement NIP-98 \\(kind 27235\\) for HTTP 402 authentication\n- Add paywall.html demo page showing NIP-98 flow\n- Add transfer.html for user-to-user GSAT transfers\n- Add debug.html with anchors, state, verify, withdraw, and users tabs\n- Add POST /withdraw endpoint for sats → Bitcoin address\n- Add navigation to demo.html linking all pages\nEOF\n\\)\")",
|
|
188
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm add test-amm.mjs package.json)",
|
|
189
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm commit -m \"$\\(cat <<''EOF''\nAdd AMM tests for math, signatures, and NIP-98\n\n- AMM math tests \\(calculateGsatOut, calculateSatsOut, slippage, k invariant\\)\n- Signature verification tests \\(sell, transfer, withdraw requests\\)\n- NIP-98 event creation, verification, and encoding tests\n- Update package.json with test script\nEOF\n\\)\")",
|
|
190
|
+
"Bash(SOLID_SYNC=true node src/watcher.js:*)",
|
|
191
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm add demo.html src/watcher.js)",
|
|
192
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm commit -m \"$\\(cat <<''EOF''\nAdd smart polling with manual deposit check\n\n- Change poll interval from 30s to 10 minutes\n- Add POST /check endpoint for manual deposit scan\n- Add 10-second rate limit between manual checks\n- Add \"Check Deposits\" button to demo.html\nEOF\n\\)\")",
|
|
193
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm add:*)",
|
|
194
|
+
"Bash(git -C /home/melvin/remote/github.com/blocktrails/gitmark-amm commit -m \"Use blocktrails npm package instead of local path\")",
|
|
195
|
+
"Bash(for addr in tb1pdypd4k38q4x0qz5x7hqavjhfpgt2n4tm0egggx587aafqn3wsnds8gm3yf tb1pqxmrkvuyea9v7vv323tmptjfle5tj9y6cpe5g8wqvlz6d5xmfhlqctx7py tb1p0fv2683x2j5htf9n7fkpmxsy4h7yuxmetelq2c6vp8u2zw9rhp2s5kha7v)",
|
|
196
|
+
"Bash(do echo -n \"$addr: \" curl -s \"https://mempool.space/testnet4/api/address/$addr\")",
|
|
197
|
+
"WebFetch(domain:webledgers.org)",
|
|
198
|
+
"Bash(npm pack:*)",
|
|
199
|
+
"Bash(npm info:*)",
|
|
200
|
+
"Bash(tar:*)",
|
|
201
|
+
"Bash(TEST_API=1 API_URL=https://api.solid.social node:*)",
|
|
202
|
+
"Bash(webledgers show:*)",
|
|
203
|
+
"Bash(webledgers set-balance:*)",
|
|
204
|
+
"Bash(ssh melvincarvalho.com \"pm2 list | grep jss\")",
|
|
205
|
+
"Bash(ssh melvincarvalho.com \"cd /home/ubuntu/jss && git pull && pm2 restart jss\")",
|
|
206
|
+
"WebFetch(domain:registry.npmjs.org)",
|
|
207
|
+
"WebFetch(domain:solid-chat.com)",
|
|
208
|
+
"WebFetch(domain:developer.chrome.com)",
|
|
209
|
+
"WebFetch(domain:css-tricks.com)",
|
|
210
|
+
"Bash(node bin/jss.js:*)",
|
|
211
|
+
"WebFetch(domain:nostr.social)",
|
|
212
|
+
"Bash(xargs curl -s)",
|
|
213
|
+
"Bash(ssh phone:*)",
|
|
214
|
+
"Bash(dig:*)",
|
|
215
|
+
"WebFetch(domain:fonstr.com)",
|
|
216
|
+
"Bash(node -e \"import\\(''nostr-tools''\\).then\\(m => console.log\\(Object.keys\\(m\\).join\\(''\\\\n''\\)\\)\\)\":*)",
|
|
217
|
+
"Bash(gh repo list:*)",
|
|
218
|
+
"Bash(gh search:*)",
|
|
219
|
+
"Bash(__NEW_LINE__ echo \"\")",
|
|
220
|
+
"WebFetch(domain:webfinger.net)",
|
|
221
|
+
"Bash(npm update:*)",
|
|
222
|
+
"Bash(timeout 8 node:*)",
|
|
223
|
+
"Bash(gh pr view:*)",
|
|
224
|
+
"Bash(gh pr diff:*)",
|
|
225
|
+
"Bash(gh pr review:*)",
|
|
226
|
+
"Bash(gh api:*)",
|
|
227
|
+
"Bash(gh pr comment:*)",
|
|
228
|
+
"Bash(git pull:*)",
|
|
229
|
+
"Bash(gh pr:*)",
|
|
230
|
+
"Bash(node --test:*)",
|
|
231
|
+
"Bash(TOKEN_SECRET=test node --test:*)",
|
|
232
|
+
"Bash(gh search issues:*)",
|
|
233
|
+
"Bash(timeout 60 bash:*)",
|
|
234
|
+
"Bash(timeout 90 bash -c:*)",
|
|
235
|
+
"Bash(git commit -m \"$\\(cat <<''EOF''\nsecurity: add ACL check on WebSocket subscription requests\n\nCheck WAC read permission before allowing subscription to prevent\ninformation leakage via notifications. Unauthorized subscriptions\nnow receive ''err <url> forbidden'' response.\n\nSecurity improvements:\n- Check ACL read access before allowing subscription\n- Validate URLs are on this server \\(prevents SSRF-like probing\\)\n- Add subscription limit and URL length validation\n\nFixes #62\nEOF\n\\)\")",
|
|
236
|
+
"Bash(gh repo fork:*)",
|
|
237
|
+
"Bash(timeout 180 npm test:*)",
|
|
238
|
+
"Bash(git show:*)",
|
|
239
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline -30 -- \"test/integration/acl-tls-test.mjs\" \"test-esm/integration/acl-tls-test.js\")",
|
|
240
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --follow -30 -- \"test/integration/acl-tls-test.mjs\")",
|
|
241
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server show 778095ad --stat)",
|
|
242
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server show 778095ad)",
|
|
243
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server show b183c7a0)",
|
|
244
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --before=\"2019-10-29\" --after=\"2019-10-01\" -20)",
|
|
245
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server show 1a92a912 --stat)",
|
|
246
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --all --grep=jaxoncreed)",
|
|
247
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --author=\"jaxoncreed\" -30)",
|
|
248
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --author=\"[Dd]mitri\" -20)",
|
|
249
|
+
"Bash(git -C /home/melvin/remote/github.com/nodeSolidServer/node-solid-server log --oneline --all --grep=\"oidc\" -20)",
|
|
250
|
+
"Bash(npm install)",
|
|
251
|
+
"Bash(timeout 60 npx mocha:*)",
|
|
252
|
+
"Bash(timeout 120 npx mocha:*)",
|
|
253
|
+
"Bash(timeout 30 npx mocha:*)",
|
|
254
|
+
"Bash(openssl x509:*)",
|
|
255
|
+
"Bash(gh pr checks:*)",
|
|
256
|
+
"Bash(gh run view:*)",
|
|
257
|
+
"Bash(gh pr edit:*)",
|
|
258
|
+
"WebFetch(domain:patch-diff.githubusercontent.com)",
|
|
259
|
+
"Bash(git rebase:*)",
|
|
260
|
+
"Bash(timeout 10 npm start)",
|
|
261
|
+
"Bash(node bin/jss.js start:*)",
|
|
262
|
+
"Bash(ssh solid.social \"cd /var/www/jss && git pull && pm2 restart jss\")",
|
|
263
|
+
"Bash(ssh solid.social:*)",
|
|
264
|
+
"Bash(git -C /tmp/lws-server log --oneline --all -20)",
|
|
265
|
+
"Bash(git -C /tmp/lws-server branch -a)",
|
|
266
|
+
"Bash(git -C /tmp/lws-server show-branch -a)",
|
|
267
|
+
"WebFetch(domain:web-platform-tests.org)",
|
|
268
|
+
"Bash(file:*)",
|
|
269
|
+
"WebFetch(domain:karate.apache.org)",
|
|
270
|
+
"WebFetch(domain:restfulapi.net)",
|
|
271
|
+
"Bash(npm run test:jss:*)",
|
|
272
|
+
"Bash(node /home/melvin/remote/github.com/JavaScriptSolidServer/JavaScriptSolidServer/bin/jss.js start:*)",
|
|
273
|
+
"Bash(VERBOSE=true npm run test:jss:*)",
|
|
274
|
+
"Bash(npm whoami:*)",
|
|
275
|
+
"Bash(node bin/lws-test.js:*)",
|
|
276
|
+
"Bash(timeout 2 node:*)",
|
|
277
|
+
"Bash(node index.js:*)",
|
|
278
|
+
"Bash(timeout 3 npx lws-server@0.0.3:*)",
|
|
279
|
+
"Bash(npx lws-server@0.0.3)",
|
|
280
|
+
"Bash(node /tmp/jssd/verify-spacing.js:*)"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ A minimal, fast, JSON-LD native Solid server.
|
|
|
60
60
|
|
|
61
61
|
### Android/Termux
|
|
62
62
|
|
|
63
|
-
JSS runs on Android via Termux
|
|
63
|
+
JSS runs on Android via Termux (uses pure JavaScript `bcryptjs` for compatibility):
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
pkg install nodejs git
|
|
@@ -1045,9 +1045,9 @@ Minimal dependencies for a fast, secure server:
|
|
|
1045
1045
|
- **jose** - JWT/JWK handling for Solid-OIDC
|
|
1046
1046
|
- **n3** - Turtle parsing (only used when conneg enabled)
|
|
1047
1047
|
- **oidc-provider** - OpenID Connect Identity Provider (only when IdP enabled)
|
|
1048
|
-
- **
|
|
1048
|
+
- **bcryptjs** - Password hashing (only when IdP enabled)
|
|
1049
1049
|
- **microfed** - ActivityPub primitives (only when activitypub enabled)
|
|
1050
|
-
- **
|
|
1050
|
+
- **sql.js** - SQLite storage for federation data (WASM, cross-platform)
|
|
1051
1051
|
|
|
1052
1052
|
## License
|
|
1053
1053
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javascript-solid-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"description": "A minimal, fast Solid server",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,9 +27,7 @@
|
|
|
27
27
|
"@fastify/rate-limit": "^9.1.0",
|
|
28
28
|
"@fastify/websocket": "^8.3.1",
|
|
29
29
|
"@simplewebauthn/server": "^13.2.2",
|
|
30
|
-
"bcrypt": "^6.0.0",
|
|
31
30
|
"bcryptjs": "^3.0.3",
|
|
32
|
-
"better-sqlite3": "^12.5.0",
|
|
33
31
|
"commander": "^14.0.2",
|
|
34
32
|
"fastify": "^4.29.1",
|
|
35
33
|
"fs-extra": "^11.2.0",
|
package/src/ap/store.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* ActivityPub SQLite Storage
|
|
3
3
|
* Persistence layer for federation data
|
|
4
4
|
*
|
|
5
|
-
* Uses
|
|
6
|
-
*
|
|
5
|
+
* Uses sql.js (WASM) for cross-platform compatibility
|
|
6
|
+
* Works on Android/Termux, Windows, and all platforms
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'
|
|
@@ -11,7 +11,6 @@ import { dirname } from 'path'
|
|
|
11
11
|
|
|
12
12
|
let db = null
|
|
13
13
|
let dbPath = null
|
|
14
|
-
let usingSqlJs = false
|
|
15
14
|
|
|
16
15
|
// SQL schema
|
|
17
16
|
const SCHEMA = `
|
|
@@ -59,7 +58,7 @@ const SCHEMA = `
|
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* Initialize the database
|
|
62
|
-
*
|
|
61
|
+
* Uses sql.js (WASM) for cross-platform compatibility
|
|
63
62
|
* @param {string} path - Path to SQLite file
|
|
64
63
|
*/
|
|
65
64
|
export async function initStore(path = 'data/activitypub.db') {
|
|
@@ -71,43 +70,31 @@ export async function initStore(path = 'data/activitypub.db') {
|
|
|
71
70
|
|
|
72
71
|
dbPath = path
|
|
73
72
|
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const initSqlJs = (await import('sql.js')).default
|
|
86
|
-
const SQL = await initSqlJs()
|
|
87
|
-
|
|
88
|
-
// Load existing database if it exists
|
|
89
|
-
if (existsSync(path)) {
|
|
90
|
-
const buffer = readFileSync(path)
|
|
91
|
-
db = new SQL.Database(buffer)
|
|
92
|
-
} else {
|
|
93
|
-
db = new SQL.Database()
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
db.run(SCHEMA)
|
|
97
|
-
usingSqlJs = true
|
|
98
|
-
|
|
99
|
-
// Save initial database
|
|
100
|
-
saveDatabase()
|
|
101
|
-
|
|
102
|
-
return db
|
|
73
|
+
// Use sql.js (WASM, works everywhere)
|
|
74
|
+
const initSqlJs = (await import('sql.js')).default
|
|
75
|
+
const SQL = await initSqlJs()
|
|
76
|
+
|
|
77
|
+
// Load existing database if it exists
|
|
78
|
+
if (existsSync(path)) {
|
|
79
|
+
const buffer = readFileSync(path)
|
|
80
|
+
db = new SQL.Database(buffer)
|
|
81
|
+
} else {
|
|
82
|
+
db = new SQL.Database()
|
|
103
83
|
}
|
|
84
|
+
|
|
85
|
+
db.run(SCHEMA)
|
|
86
|
+
|
|
87
|
+
// Save initial database
|
|
88
|
+
saveDatabase()
|
|
89
|
+
|
|
90
|
+
return db
|
|
104
91
|
}
|
|
105
92
|
|
|
106
93
|
/**
|
|
107
94
|
* Save sql.js database to disk
|
|
108
95
|
*/
|
|
109
96
|
function saveDatabase() {
|
|
110
|
-
if (
|
|
97
|
+
if (db && dbPath) {
|
|
111
98
|
const data = db.export()
|
|
112
99
|
const buffer = Buffer.from(data)
|
|
113
100
|
writeFileSync(dbPath, buffer)
|
|
@@ -124,45 +111,33 @@ export function getStore() {
|
|
|
124
111
|
return db
|
|
125
112
|
}
|
|
126
113
|
|
|
127
|
-
// Helper
|
|
114
|
+
// Helper functions for sql.js API
|
|
128
115
|
function runStmt(sql, params = []) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
saveDatabase()
|
|
132
|
-
} else {
|
|
133
|
-
db.prepare(sql).run(...params)
|
|
134
|
-
}
|
|
116
|
+
db.run(sql, params)
|
|
117
|
+
saveDatabase()
|
|
135
118
|
}
|
|
136
119
|
|
|
137
120
|
function getOne(sql, params = []) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const row = stmt.getAsObject()
|
|
143
|
-
stmt.free()
|
|
144
|
-
return row
|
|
145
|
-
}
|
|
121
|
+
const stmt = db.prepare(sql)
|
|
122
|
+
stmt.bind(params)
|
|
123
|
+
if (stmt.step()) {
|
|
124
|
+
const row = stmt.getAsObject()
|
|
146
125
|
stmt.free()
|
|
147
|
-
return
|
|
148
|
-
} else {
|
|
149
|
-
return db.prepare(sql).get(...params)
|
|
126
|
+
return row
|
|
150
127
|
}
|
|
128
|
+
stmt.free()
|
|
129
|
+
return null
|
|
151
130
|
}
|
|
152
131
|
|
|
153
132
|
function getAll(sql, params = []) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
results.push(stmt.getAsObject())
|
|
160
|
-
}
|
|
161
|
-
stmt.free()
|
|
162
|
-
return results
|
|
163
|
-
} else {
|
|
164
|
-
return db.prepare(sql).all(...params)
|
|
133
|
+
const results = []
|
|
134
|
+
const stmt = db.prepare(sql)
|
|
135
|
+
stmt.bind(params)
|
|
136
|
+
while (stmt.step()) {
|
|
137
|
+
results.push(stmt.getAsObject())
|
|
165
138
|
}
|
|
139
|
+
stmt.free()
|
|
140
|
+
return results
|
|
166
141
|
}
|
|
167
142
|
|
|
168
143
|
// Followers
|
package/src/idp/accounts.js
CHANGED
|
@@ -4,13 +4,8 @@
|
|
|
4
4
|
* Email is optional - internally uses username@jss if not provided
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
try {
|
|
10
|
-
bcrypt = await import('bcrypt').then(m => m.default);
|
|
11
|
-
} catch {
|
|
12
|
-
bcrypt = await import('bcryptjs').then(m => m.default);
|
|
13
|
-
}
|
|
7
|
+
// Use bcryptjs for cross-platform compatibility (works on Android/Termux/Windows)
|
|
8
|
+
const bcrypt = await import('bcryptjs').then(m => m.default);
|
|
14
9
|
import crypto from 'crypto';
|
|
15
10
|
import fs from 'fs-extra';
|
|
16
11
|
import path from 'path';
|