@oxy.so/protocol 1.6.0 → 1.6.1

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": "@oxy.so/protocol",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Oxy Protocol — the app-agnostic base substrate: signed-record envelope, canonical JSON, signature/verification, and platform crypto. Reused by any Oxy app to decentralize its own content.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -158,16 +158,16 @@
158
158
  },
159
159
  "devDependencies": {
160
160
  "@react-native-async-storage/async-storage": "^3.1.1",
161
- "@types/express": "^4.17.25",
162
- "@types/node": "^22.20.1",
163
- "@types/supertest": "^6.0.2",
164
- "expo-crypto": "~56.0.3",
165
- "expo-modules-core": "~58.0.26",
166
- "expo-secure-store": "~57.0.4",
167
- "express": "^4.22.2",
168
- "jest": "^30.5.1",
169
- "supertest": "^7.0.0",
170
- "ts-jest": "^29.4.12",
171
- "typescript": "^5.9.2"
161
+ "@types/express": "^5.0.6",
162
+ "@types/node": "^26.6.6",
163
+ "@types/supertest": "^7.2.1",
164
+ "expo-crypto": "~58.0.7",
165
+ "expo-modules-core": "~58.0.30",
166
+ "expo-secure-store": "~58.0.2",
167
+ "express": "^5.3.0",
168
+ "jest": "^30.5.2",
169
+ "supertest": "^7.3.1",
170
+ "ts-jest": "^29.4.15",
171
+ "typescript": "~6.0.3"
172
172
  }
173
173
  }
@@ -432,11 +432,10 @@ describe('createNodeApp', () => {
432
432
  prev = id;
433
433
  }
434
434
 
435
- // `?since[]=<id1>&since[]=<id2>` arrives as a string[] — the handler must
436
- // take the FIRST value (a tampered array can never cause type confusion).
437
- const res = await request(app)
438
- .get('/oxy/log')
439
- .query({ 'since[]': [ids[0], ids[2]] });
435
+ // A repeated `?since=<id1>&since=<id2>` arrives as a string[] under every
436
+ // Express query parser — the handler must take the FIRST value (a tampered
437
+ // array can never cause type confusion).
438
+ const res = await request(app).get('/oxy/log').query(`since=${ids[0]}&since=${ids[2]}`);
440
439
  expect(res.status).toBe(200);
441
440
  // Cursor resolves off ids[0] → records strictly after seq 0 → [1, 2].
442
441
  expect(res.body.records.map((entry: { seq: number }) => entry.seq)).toEqual([1, 2]);
@@ -456,9 +455,7 @@ describe('createNodeApp', () => {
456
455
  prev = await computeRecordId(envelope);
457
456
  }
458
457
 
459
- const res = await request(app)
460
- .get('/oxy/log')
461
- .query({ 'limit[]': ['2', '99'] });
458
+ const res = await request(app).get('/oxy/log').query('limit=2&limit=99');
462
459
  expect(res.status).toBe(200);
463
460
  expect(res.body.records.map((entry: { seq: number }) => entry.seq)).toEqual([0, 1]);
464
461
  });
@@ -399,7 +399,7 @@ export function createNodeApp(deps: NodeAppDependencies): NodeApp {
399
399
  );
400
400
 
401
401
  // ── Serve a content-addressed blob ───────────────────────────────────────────
402
- app.get(`${NODE_BLOBS_PATH}/:hash`, async (req: Request, res: Response, next: NextFunction) => {
402
+ app.get(`${NODE_BLOBS_PATH}/:hash`, async (req, res, next) => {
403
403
  try {
404
404
  const hash = req.params.hash.toLowerCase();
405
405
  if (!SHA256_HEX.test(hash)) {