@ai-ecoverse/slicc-shared-web 2.10.1 → 2.10.3

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.
Files changed (2) hide show
  1. package/harness/cdn.mjs +6 -0
  2. package/package.json +4 -4
package/harness/cdn.mjs CHANGED
@@ -96,9 +96,15 @@ export async function cdn(cdp, remotes) {
96
96
  const failure = { requestId, responseCode: state.status, responseHeaders: cors };
97
97
  return cdp.send('Fetch.fulfillRequest', failure);
98
98
  }
99
+ let refused = 0;
99
100
  const body = await download(request.url).catch((error) => {
101
+ refused = Number(/^(4\d\d) /.exec(error.message)?.[1] ?? 0);
100
102
  console.warn(`harness: could not serve ${request.url}: ${error.message}`);
101
103
  });
104
+ if (refused) {
105
+ const answer = { requestId, responseCode: refused, responseHeaders: cors };
106
+ return cdp.send('Fetch.fulfillRequest', answer);
107
+ }
102
108
  if (!body) return cdp.send('Fetch.failRequest', { requestId, errorReason: 'Failed' });
103
109
  const sent = Buffer.from(body);
104
110
  if (state.corrupt) sent[sent.length - 1] ^= 0xff;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "description": "Shared Renovate, Biome, TypeScript, lefthook and GitHub Actions configuration, plus the CDP integration-test harness, for SLICC's web repos",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -66,12 +66,12 @@
66
66
  "release": "semantic-release"
67
67
  },
68
68
  "devDependencies": {
69
- "@ai-ecoverse/slicc-browsers": "1.18.7",
70
- "@ai-ecoverse/slicc-cdp": "1.31.3",
69
+ "@ai-ecoverse/slicc-browsers": "1.18.8",
70
+ "@ai-ecoverse/slicc-cdp": "1.31.4",
71
71
  "@biomejs/biome": "2.5.15",
72
72
  "lefthook": "2.2.2",
73
73
  "monocart-coverage-reports": "2.13.2",
74
- "pnpm": "12.13.0",
74
+ "pnpm": "12.14.0",
75
75
  "semantic-release": "25.0.9"
76
76
  },
77
77
  "peerDependencies": {