javascript-solid-server 0.0.192 → 0.0.194
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 +1 -1
- package/src/handlers/resource.js +85 -13
- package/src/idp/cookies.js +49 -0
- package/src/idp/credentials.js +9 -0
- package/src/idp/interactions.js +6 -16
- package/src/idp/provider.js +33 -3
- package/src/server.js +2 -0
- package/test/vary-cache-headers.test.js +59 -0
- package/.claude/settings.local.json +0 -236
package/package.json
CHANGED
package/src/handlers/resource.js
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
canAcceptInput,
|
|
11
11
|
toJsonLd,
|
|
12
12
|
fromJsonLd,
|
|
13
|
-
RDF_TYPES
|
|
13
|
+
RDF_TYPES,
|
|
14
|
+
getVaryHeader
|
|
14
15
|
} from '../rdf/conneg.js';
|
|
15
16
|
import { emitChange } from '../notifications/events.js';
|
|
16
17
|
import { checkIfMatch, checkIfNoneMatchForGet, checkIfNoneMatchForWrite } from '../utils/conditional.js';
|
|
@@ -119,6 +120,22 @@ function parseRangeHeader(rangeHeader, fileSize) {
|
|
|
119
120
|
return { start, end };
|
|
120
121
|
}
|
|
121
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Compute a content-type-aware ETag. When mashlib will wrap an RDF
|
|
125
|
+
* resource in HTML, the response body differs from the raw resource,
|
|
126
|
+
* so the ETag must differ too — otherwise browsers confuse cached
|
|
127
|
+
* JSON-LD with the HTML variant despite Vary: Accept (#456).
|
|
128
|
+
*/
|
|
129
|
+
function getMashlibEtag(request, stats, storagePath) {
|
|
130
|
+
const storedType = stats.isDirectory ? 'application/ld+json' : getContentType(storagePath);
|
|
131
|
+
const willServeMashlib =
|
|
132
|
+
shouldServeMashlib(request, request.mashlibEnabled, storedType);
|
|
133
|
+
const effectiveEtag = willServeMashlib
|
|
134
|
+
? stats.etag.replace(/"$/, '-html"')
|
|
135
|
+
: stats.etag;
|
|
136
|
+
return { willServeMashlib, effectiveEtag };
|
|
137
|
+
}
|
|
138
|
+
|
|
122
139
|
/**
|
|
123
140
|
* Handle GET request
|
|
124
141
|
*/
|
|
@@ -134,11 +151,18 @@ export async function handleGet(request, reply) {
|
|
|
134
151
|
return reply.code(404).send({ error: 'Not Found' });
|
|
135
152
|
}
|
|
136
153
|
|
|
137
|
-
|
|
154
|
+
const { willServeMashlib, effectiveEtag } = getMashlibEtag(request, stats, storagePath);
|
|
155
|
+
|
|
156
|
+
// For non-containers, check If-None-Match early using the effective
|
|
157
|
+
// ETag. For containers, defer the check until we know which branch
|
|
158
|
+
// (index.html vs listing vs mashlib) will run — each uses a
|
|
159
|
+
// different ETag source (#456).
|
|
138
160
|
const ifNoneMatch = request.headers['if-none-match'];
|
|
139
|
-
if (ifNoneMatch) {
|
|
140
|
-
const check = checkIfNoneMatchForGet(ifNoneMatch,
|
|
161
|
+
if (ifNoneMatch && !stats.isDirectory) {
|
|
162
|
+
const check = checkIfNoneMatchForGet(ifNoneMatch, effectiveEtag);
|
|
141
163
|
if (!check.ok && check.notModified) {
|
|
164
|
+
reply.header('ETag', effectiveEtag);
|
|
165
|
+
reply.header('Vary', getVaryHeader(request.connegEnabled, request.mashlibEnabled));
|
|
142
166
|
return reply.code(304).send();
|
|
143
167
|
}
|
|
144
168
|
}
|
|
@@ -158,6 +182,17 @@ export async function handleGet(request, reply) {
|
|
|
158
182
|
const content = await storage.read(indexPath);
|
|
159
183
|
const indexStats = await storage.stat(indexPath);
|
|
160
184
|
|
|
185
|
+
// Deferred 304 check for index.html containers (#456)
|
|
186
|
+
const indexEtag = indexStats?.etag || stats.etag;
|
|
187
|
+
if (ifNoneMatch) {
|
|
188
|
+
const check = checkIfNoneMatchForGet(ifNoneMatch, indexEtag);
|
|
189
|
+
if (!check.ok && check.notModified) {
|
|
190
|
+
reply.header('ETag', indexEtag);
|
|
191
|
+
reply.header('Vary', getVaryHeader(connegEnabled, request.mashlibEnabled));
|
|
192
|
+
return reply.code(304).send();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
161
196
|
// Pick the negotiated RDF type using q-aware Accept parsing. The
|
|
162
197
|
// naive `acceptHeader.includes('text/turtle')` we used to do here
|
|
163
198
|
// ignored q-weights — `Accept: application/ld+json, text/turtle;q=0.1`
|
|
@@ -251,6 +286,16 @@ export async function handleGet(request, reply) {
|
|
|
251
286
|
}
|
|
252
287
|
|
|
253
288
|
// No index.html, return JSON-LD container listing
|
|
289
|
+
// Deferred 304 check for container listings (#456)
|
|
290
|
+
if (ifNoneMatch) {
|
|
291
|
+
const check = checkIfNoneMatchForGet(ifNoneMatch, effectiveEtag);
|
|
292
|
+
if (!check.ok && check.notModified) {
|
|
293
|
+
reply.header('ETag', effectiveEtag);
|
|
294
|
+
reply.header('Vary', getVaryHeader(connegEnabled, request.mashlibEnabled));
|
|
295
|
+
return reply.code(304).send();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
254
299
|
const entries = await storage.listContainer(storagePath);
|
|
255
300
|
const jsonLd = generateContainerJsonLd(resourceUrl, entries || []);
|
|
256
301
|
|
|
@@ -273,7 +318,7 @@ export async function handleGet(request, reply) {
|
|
|
273
318
|
);
|
|
274
319
|
const headers = getAllHeaders({
|
|
275
320
|
isContainer: true,
|
|
276
|
-
etag:
|
|
321
|
+
etag: effectiveEtag,
|
|
277
322
|
contentType: 'text/html',
|
|
278
323
|
origin,
|
|
279
324
|
resourceUrl,
|
|
@@ -410,7 +455,7 @@ export async function handleGet(request, reply) {
|
|
|
410
455
|
);
|
|
411
456
|
const headers = getAllHeaders({
|
|
412
457
|
isContainer: false,
|
|
413
|
-
etag:
|
|
458
|
+
etag: effectiveEtag,
|
|
414
459
|
contentType: 'text/html',
|
|
415
460
|
origin,
|
|
416
461
|
resourceUrl,
|
|
@@ -595,6 +640,8 @@ export async function handleHead(request, reply) {
|
|
|
595
640
|
const origin = request.headers.origin;
|
|
596
641
|
const connegEnabled = request.connegEnabled || false;
|
|
597
642
|
let contentType;
|
|
643
|
+
let headEtag = stats.etag;
|
|
644
|
+
let isMashlibResponse = false;
|
|
598
645
|
|
|
599
646
|
if (stats.isDirectory) {
|
|
600
647
|
const indexPath = storagePath.endsWith('/') ? `${storagePath}index.html` : `${storagePath}/index.html`;
|
|
@@ -615,9 +662,6 @@ export async function handleHead(request, reply) {
|
|
|
615
662
|
if (wantsTurtle) {
|
|
616
663
|
contentType = 'text/turtle';
|
|
617
664
|
} else if (wantsJsonLd) {
|
|
618
|
-
// For an index.html container, only override to JSON-LD if the
|
|
619
|
-
// Accept header explicitly asked for JSON; otherwise fall back
|
|
620
|
-
// to text/html so HEAD matches the index.html that GET serves.
|
|
621
665
|
const explicitJson = EXPLICIT_JSON_RE.test(acceptHeader);
|
|
622
666
|
contentType = (indexExists && !explicitJson) ? 'text/html' : 'application/ld+json';
|
|
623
667
|
} else {
|
|
@@ -628,20 +672,48 @@ export async function handleHead(request, reply) {
|
|
|
628
672
|
} else {
|
|
629
673
|
contentType = 'application/ld+json';
|
|
630
674
|
}
|
|
675
|
+
|
|
676
|
+
if (indexExists) {
|
|
677
|
+
// Mirror GET: containers with index.html use the index file's ETag
|
|
678
|
+
const indexStats = await storage.stat(indexPath);
|
|
679
|
+
headEtag = indexStats?.etag || stats.etag;
|
|
680
|
+
} else if (shouldServeMashlib(request, request.mashlibEnabled, 'application/ld+json')) {
|
|
681
|
+
// Container listing via mashlib — suffix the ETag (#456)
|
|
682
|
+
headEtag = stats.etag.replace(/"$/, '-html"');
|
|
683
|
+
contentType = 'text/html';
|
|
684
|
+
isMashlibResponse = true;
|
|
685
|
+
}
|
|
631
686
|
} else {
|
|
632
|
-
|
|
687
|
+
const { willServeMashlib, effectiveEtag } = getMashlibEtag(request, stats, storagePath);
|
|
688
|
+
headEtag = effectiveEtag;
|
|
689
|
+
isMashlibResponse = willServeMashlib;
|
|
690
|
+
contentType = willServeMashlib ? 'text/html' : getContentType(storagePath);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// Check If-None-Match using the final ETag (#456)
|
|
694
|
+
const ifNoneMatch = request.headers['if-none-match'];
|
|
695
|
+
if (ifNoneMatch) {
|
|
696
|
+
const check = checkIfNoneMatchForGet(ifNoneMatch, headEtag);
|
|
697
|
+
if (!check.ok && check.notModified) {
|
|
698
|
+
reply.header('ETag', headEtag);
|
|
699
|
+
reply.header('Vary', getVaryHeader(connegEnabled, request.mashlibEnabled));
|
|
700
|
+
return reply.code(304).send();
|
|
701
|
+
}
|
|
633
702
|
}
|
|
634
703
|
|
|
635
704
|
const headers = getAllHeaders({
|
|
636
705
|
isContainer: stats.isDirectory,
|
|
637
|
-
etag:
|
|
706
|
+
etag: headEtag,
|
|
638
707
|
contentType,
|
|
639
708
|
origin,
|
|
640
709
|
resourceUrl,
|
|
641
|
-
connegEnabled
|
|
710
|
+
connegEnabled,
|
|
711
|
+
mashlibEnabled: request.mashlibEnabled
|
|
642
712
|
});
|
|
643
713
|
|
|
644
|
-
|
|
714
|
+
// Content-Length: only set when the file size matches the response body.
|
|
715
|
+
// Mashlib HTML and containers are dynamically generated.
|
|
716
|
+
if (!stats.isDirectory && !isMashlibResponse) {
|
|
645
717
|
headers['Content-Length'] = stats.size;
|
|
646
718
|
}
|
|
647
719
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared cookie helpers for the IdP module.
|
|
3
|
+
*
|
|
4
|
+
* JSS doesn't register @fastify/cookie, so we emit Set-Cookie headers
|
|
5
|
+
* directly. oidc-provider sets four session cookies (_session,
|
|
6
|
+
* _session.sig, _session.legacy, _session.legacy.sig); all four must
|
|
7
|
+
* be expired together to fully clear the browser's session state.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const SESSION_COOKIE_NAMES = [
|
|
11
|
+
'_session',
|
|
12
|
+
'_session.sig',
|
|
13
|
+
'_session.legacy',
|
|
14
|
+
'_session.legacy.sig',
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function buildExpiredHeaders(secure) {
|
|
18
|
+
const attrs = 'Path=/; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; SameSite=Lax'
|
|
19
|
+
+ (secure ? '; Secure' : '');
|
|
20
|
+
return SESSION_COOKIE_NAMES.map((name) => `${name}=; ${attrs}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Expire oidc-provider session cookies on a Fastify reply.
|
|
25
|
+
*
|
|
26
|
+
* Used by account deletion (credentials.js) and account switching
|
|
27
|
+
* (interactions.js) to prevent stale session references from crashing
|
|
28
|
+
* oidc-provider's consent check (#452).
|
|
29
|
+
*
|
|
30
|
+
* @param {object} reply - Fastify reply object
|
|
31
|
+
* @param {object} [request] - Fastify request (used to detect HTTPS)
|
|
32
|
+
*/
|
|
33
|
+
export function expireSessionCookies(reply, request) {
|
|
34
|
+
const secure = request?.protocol === 'https' || process.env.NODE_ENV === 'production';
|
|
35
|
+
reply.header('Set-Cookie', buildExpiredHeaders(secure));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Expire oidc-provider session cookies on a Koa context.
|
|
40
|
+
*
|
|
41
|
+
* Used by renderError in provider.js for stale-session recovery,
|
|
42
|
+
* where the response object is a Koa ctx, not a Fastify reply.
|
|
43
|
+
*
|
|
44
|
+
* @param {object} ctx - Koa context object
|
|
45
|
+
*/
|
|
46
|
+
export function expireSessionCookiesKoa(ctx) {
|
|
47
|
+
const secure = ctx.secure || process.env.NODE_ENV === 'production';
|
|
48
|
+
ctx.set('Set-Cookie', buildExpiredHeaders(secure));
|
|
49
|
+
}
|
package/src/idp/credentials.js
CHANGED
|
@@ -11,6 +11,7 @@ import { authenticate, findByUsername, findByWebId, updatePassword, verifyPasswo
|
|
|
11
11
|
import { getJwks } from './keys.js';
|
|
12
12
|
import { getWebIdFromRequestAsync } from '../auth/token.js';
|
|
13
13
|
import { accountDeletePage } from './views.js';
|
|
14
|
+
import { expireSessionCookies } from './cookies.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Handle POST /idp/credentials
|
|
@@ -364,6 +365,10 @@ export async function handleDeleteAccount(request, reply, options = {}) {
|
|
|
364
365
|
// and rationale (#391 pass 2 / pass 3).
|
|
365
366
|
const { purged } = await deleteAccountAndOptionallyPurge(request, account, purgeData);
|
|
366
367
|
|
|
368
|
+
// Expire OIDC session cookies so the browser doesn't send stale
|
|
369
|
+
// references on the next login attempt (#452).
|
|
370
|
+
expireSessionCookies(reply, request);
|
|
371
|
+
|
|
367
372
|
reply.header('Cache-Control', 'no-store');
|
|
368
373
|
reply.header('Pragma', 'no-cache');
|
|
369
374
|
return {
|
|
@@ -547,6 +552,10 @@ export async function handleAccountDeleteForm(request, reply, options = {}) {
|
|
|
547
552
|
|
|
548
553
|
const { purged } = await deleteAccountAndOptionallyPurge(request, account, purgeData);
|
|
549
554
|
|
|
555
|
+
// Expire OIDC session cookies so the browser doesn't send stale
|
|
556
|
+
// references on the next login attempt (#452).
|
|
557
|
+
expireSessionCookies(reply, request);
|
|
558
|
+
|
|
550
559
|
// If the user asked for a purge but it didn't run (fs.remove threw,
|
|
551
560
|
// path-relative check rejected, etc.), surface that on the success
|
|
552
561
|
// page. Account deletion succeeded — don't roll that back — but the
|
package/src/idp/interactions.js
CHANGED
|
@@ -9,6 +9,7 @@ import * as storage from '../storage/filesystem.js';
|
|
|
9
9
|
import { createPodStructure } from '../handlers/container.js';
|
|
10
10
|
import { validateInvite } from './invites.js';
|
|
11
11
|
import { verifyNostrAuth, getNostrPubkey, verifyNostrPubkeyAgainstWebId } from '../auth/nostr.js';
|
|
12
|
+
import { expireSessionCookies } from './cookies.js';
|
|
12
13
|
|
|
13
14
|
// Security: Maximum body size for IdP form submissions (1MB)
|
|
14
15
|
const MAX_BODY_SIZE = 1024 * 1024;
|
|
@@ -348,22 +349,10 @@ export async function handleSwitchAccount(request, reply, provider) {
|
|
|
348
349
|
const ttl = Math.max(1, interaction.exp - Math.floor(Date.now() / 1000));
|
|
349
350
|
await interaction.save(ttl);
|
|
350
351
|
|
|
351
|
-
// Clear the user-agent's session
|
|
352
|
-
//
|
|
353
|
-
// session cookie has a paired `.sig`. The `.legacy` variant is
|
|
354
|
-
// created during identifier rotation and likewise has its own
|
|
355
|
-
// `.sig`. Clearing all four keeps the browser fully tidy. JSS
|
|
356
|
-
// doesn't register @fastify/cookie, so we emit Set-Cookie headers
|
|
357
|
-
// directly with an expired Expires + Max-Age=0. Server-side state
|
|
358
|
-
// is already gone via session.destroy() above — these expirations
|
|
352
|
+
// Clear the user-agent's session cookies. Server-side state is
|
|
353
|
+
// already gone via session.destroy() above — these expirations
|
|
359
354
|
// are belt-and-suspenders.
|
|
360
|
-
|
|
361
|
-
reply.header('Set-Cookie', [
|
|
362
|
-
`_session=; ${expired}`,
|
|
363
|
-
`_session.sig=; ${expired}`,
|
|
364
|
-
`_session.legacy=; ${expired}`,
|
|
365
|
-
`_session.legacy.sig=; ${expired}`,
|
|
366
|
-
]);
|
|
355
|
+
expireSessionCookies(reply, request);
|
|
367
356
|
|
|
368
357
|
// 303 See Other — explicitly forces the UA to issue GET on the
|
|
369
358
|
// Location target. 302 leaves it ambiguous (and some legacy UAs
|
|
@@ -543,7 +532,8 @@ export async function handleRegisterPost(request, reply, issuer, inviteOnly = fa
|
|
|
543
532
|
}
|
|
544
533
|
|
|
545
534
|
// Create pod structure
|
|
546
|
-
await createPodStructure(username, webId, podUri, issuer
|
|
535
|
+
await createPodStructure(username, webId, podUri, issuer, 0,
|
|
536
|
+
{ provisionKeys: request.provisionKeys === true });
|
|
547
537
|
|
|
548
538
|
// Create account
|
|
549
539
|
await createAccount({
|
package/src/idp/provider.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createAdapter } from './adapter.js';
|
|
|
8
8
|
import { getJwks, getCookieKeys } from './keys.js';
|
|
9
9
|
import { getAccountForProvider } from './accounts.js';
|
|
10
10
|
import { validateExternalUrl } from '../utils/ssrf.js';
|
|
11
|
+
import { expireSessionCookiesKoa } from './cookies.js';
|
|
11
12
|
|
|
12
13
|
// Cache for fetched client documents
|
|
13
14
|
const clientDocumentCache = new Map();
|
|
@@ -264,8 +265,16 @@ export async function createProvider(issuer) {
|
|
|
264
265
|
// Auto-approve consent by loading/creating grants automatically
|
|
265
266
|
// This skips the consent prompt for all clients (appropriate for test/dev servers)
|
|
266
267
|
loadExistingGrant: async (ctx) => {
|
|
267
|
-
//
|
|
268
|
-
|
|
268
|
+
// Guard: if session or client is missing (e.g. stale cookies after
|
|
269
|
+
// account deletion), bail out early so oidc-provider doesn't crash
|
|
270
|
+
// calling getOIDCScopeEncountered() on an undefined grant (#452).
|
|
271
|
+
if (!ctx.oidc.session || !ctx.oidc.client) {
|
|
272
|
+
return undefined;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Check if there's an existing grant for this client/account pair.
|
|
276
|
+
// Optional chain: grantIdFor may be absent on a stale session stub.
|
|
277
|
+
const grantId = ctx.oidc.session.grantIdFor?.(ctx.oidc.client.clientId);
|
|
269
278
|
|
|
270
279
|
if (grantId) {
|
|
271
280
|
const existingGrant = await ctx.oidc.provider.Grant.find(grantId);
|
|
@@ -275,7 +284,7 @@ export async function createProvider(issuer) {
|
|
|
275
284
|
}
|
|
276
285
|
|
|
277
286
|
// Auto-approve: create a new grant with all requested scopes
|
|
278
|
-
if (ctx.oidc.session
|
|
287
|
+
if (ctx.oidc.session.accountId) {
|
|
279
288
|
const grant = new ctx.oidc.provider.Grant({
|
|
280
289
|
accountId: ctx.oidc.session.accountId,
|
|
281
290
|
clientId: ctx.oidc.client.clientId,
|
|
@@ -393,6 +402,27 @@ export async function createProvider(issuer) {
|
|
|
393
402
|
|
|
394
403
|
// Render errors
|
|
395
404
|
renderError: async (ctx, out, error) => {
|
|
405
|
+
// Stale session recovery (#452): when oidc-provider crashes because
|
|
406
|
+
// a deleted account's session/grant is still in the browser cookies,
|
|
407
|
+
// expire those cookies and redirect back to the same URL. The retry
|
|
408
|
+
// starts with a clean session and succeeds. The `_stale_retry` param
|
|
409
|
+
// prevents infinite redirect loops — only try once.
|
|
410
|
+
const isStaleSessionCrash = out.error === 'server_error' &&
|
|
411
|
+
error instanceof TypeError &&
|
|
412
|
+
/Cannot read properties of undefined/.test(error?.message);
|
|
413
|
+
const reqUrl = ctx.req?.originalUrl || ctx.request?.url || ctx.url || '';
|
|
414
|
+
const alreadyRetried = reqUrl.includes('_stale_retry=1');
|
|
415
|
+
|
|
416
|
+
// Only redirect browser GETs (authorization endpoint). POST/token/
|
|
417
|
+
// userinfo are programmatic — clients won't follow redirects or
|
|
418
|
+
// honor Set-Cookie, so just fall through to the error page.
|
|
419
|
+
if (isStaleSessionCrash && !alreadyRetried && ctx.method === 'GET') {
|
|
420
|
+
expireSessionCookiesKoa(ctx);
|
|
421
|
+
const separator = reqUrl.includes('?') ? '&' : '?';
|
|
422
|
+
ctx.redirect(`${reqUrl}${separator}_stale_retry=1`);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
|
|
396
426
|
ctx.type = 'html';
|
|
397
427
|
ctx.body = `
|
|
398
428
|
<!DOCTYPE html>
|
package/src/server.js
CHANGED
|
@@ -265,6 +265,7 @@ export function createServer(options = {}) {
|
|
|
265
265
|
fastify.decorateRequest('mashlibVersion', null);
|
|
266
266
|
fastify.decorateRequest('mashlibModule', null);
|
|
267
267
|
fastify.decorateRequest('defaultQuota', null);
|
|
268
|
+
fastify.decorateRequest('provisionKeys', null);
|
|
268
269
|
fastify.decorateRequest('config', null);
|
|
269
270
|
fastify.decorateRequest('liveReloadEnabled', null);
|
|
270
271
|
fastify.decorateRequest('singleUser', null);
|
|
@@ -280,6 +281,7 @@ export function createServer(options = {}) {
|
|
|
280
281
|
request.mashlibVersion = mashlibVersion;
|
|
281
282
|
request.mashlibModule = mashlibModule;
|
|
282
283
|
request.defaultQuota = defaultQuota;
|
|
284
|
+
request.provisionKeys = provisionKeysEnabled;
|
|
283
285
|
request.config = { public: options.public, readOnly: options.readOnly };
|
|
284
286
|
request.liveReloadEnabled = liveReloadEnabled;
|
|
285
287
|
request.singleUser = singleUser;
|
|
@@ -83,6 +83,65 @@ describe('Vary / Cache-Control consistency (#315)', () => {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
it('mashlib HTML ETag differs from raw RDF ETag (#456)', async () => {
|
|
87
|
+
const htmlRes = await request('/varytest/public/card.jsonld', {
|
|
88
|
+
headers: { Accept: 'text/html,*/*;q=0.8' }
|
|
89
|
+
});
|
|
90
|
+
const jsonRes = await request('/varytest/public/card.jsonld', {
|
|
91
|
+
headers: { Accept: 'application/ld+json' }
|
|
92
|
+
});
|
|
93
|
+
const htmlEtag = htmlRes.headers.get('etag');
|
|
94
|
+
const jsonEtag = jsonRes.headers.get('etag');
|
|
95
|
+
assert.ok(htmlEtag, 'HTML variant should have ETag');
|
|
96
|
+
assert.ok(jsonEtag, 'JSON-LD variant should have ETag');
|
|
97
|
+
assert.notStrictEqual(htmlEtag, jsonEtag,
|
|
98
|
+
'mashlib HTML and raw JSON-LD must have different ETags');
|
|
99
|
+
assert.ok(htmlEtag.endsWith('-html"'),
|
|
100
|
+
`HTML ETag should end with -html", got: ${htmlEtag}`);
|
|
101
|
+
assert.ok(!jsonEtag.includes('-html'),
|
|
102
|
+
`JSON-LD ETag should not contain -html, got: ${jsonEtag}`);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('If-None-Match with HTML ETag does not 304 the JSON-LD variant (#456)', async () => {
|
|
106
|
+
const htmlRes = await request('/varytest/public/card.jsonld', {
|
|
107
|
+
headers: { Accept: 'text/html,*/*;q=0.8' }
|
|
108
|
+
});
|
|
109
|
+
const htmlEtag = htmlRes.headers.get('etag');
|
|
110
|
+
// Use the HTML ETag to request JSON-LD — should NOT get 304
|
|
111
|
+
const jsonRes = await request('/varytest/public/card.jsonld', {
|
|
112
|
+
headers: { Accept: 'application/ld+json', 'If-None-Match': htmlEtag }
|
|
113
|
+
});
|
|
114
|
+
assert.strictEqual(jsonRes.status, 200,
|
|
115
|
+
'JSON-LD request with HTML ETag should get 200, not 304');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('If-None-Match with JSON-LD ETag does not 304 the HTML variant (#456)', async () => {
|
|
119
|
+
const jsonRes = await request('/varytest/public/card.jsonld', {
|
|
120
|
+
headers: { Accept: 'application/ld+json' }
|
|
121
|
+
});
|
|
122
|
+
const jsonEtag = jsonRes.headers.get('etag');
|
|
123
|
+
// Use the JSON-LD ETag to request HTML — should NOT get 304
|
|
124
|
+
const htmlRes = await request('/varytest/public/card.jsonld', {
|
|
125
|
+
headers: { Accept: 'text/html,*/*;q=0.8', 'If-None-Match': jsonEtag }
|
|
126
|
+
});
|
|
127
|
+
assert.strictEqual(htmlRes.status, 200,
|
|
128
|
+
'HTML request with JSON-LD ETag should get 200, not 304');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('HEAD returns same ETag as GET for each variant (#456)', async () => {
|
|
132
|
+
for (const accept of ['text/html,*/*;q=0.8', 'application/ld+json']) {
|
|
133
|
+
const getRes = await request('/varytest/public/card.jsonld', {
|
|
134
|
+
headers: { Accept: accept }
|
|
135
|
+
});
|
|
136
|
+
const headRes = await request('/varytest/public/card.jsonld', {
|
|
137
|
+
method: 'HEAD',
|
|
138
|
+
headers: { Accept: accept }
|
|
139
|
+
});
|
|
140
|
+
assert.strictEqual(headRes.headers.get('etag'), getRes.headers.get('etag'),
|
|
141
|
+
`HEAD and GET ETags must match for Accept: ${accept}`);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
86
145
|
it('container index.html data-island variants also carry revalidating Cache-Control', async () => {
|
|
87
146
|
// Publish an index.html with a JSON-LD data island; conneg should extract
|
|
88
147
|
// and serve it as Turtle/JSON-LD. Those variants were missing
|
|
@@ -1,236 +0,0 @@
|
|
|
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(NODE_OPTIONS=\"--test-name-pattern='should allow any authenticated'\" npm test:*)",
|
|
230
|
-
"Bash(node --test:*)",
|
|
231
|
-
"Bash(git commit -m \"$\\(cat <<''EOF''\ntest: add coverage for acl:AuthenticatedAgent\n\nAdd test to verify that acl:AuthenticatedAgent works correctly:\n- Denies anonymous/unauthenticated access\n- Allows the resource owner\n- Allows ANY authenticated user \\(key distinction from private ACLs\\)\n\nFixes #58\nEOF\n\\)\")",
|
|
232
|
-
"Bash(timeout 60 node --test:*)",
|
|
233
|
-
"Bash(timeout 45 node --test:*)"
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
}
|