@nxtedition/nxt-undici 6.2.10 → 6.2.11

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.
@@ -2,7 +2,7 @@ import { DatabaseSync } from 'node:sqlite'
2
2
  import assert from 'node:assert'
3
3
  import { parseRangeHeader } from './utils.js'
4
4
 
5
- const VERSION = 5
5
+ const VERSION = 6
6
6
 
7
7
  // 2gb
8
8
  const MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000
@@ -133,7 +133,6 @@ export class SqliteCacheStore {
133
133
  CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_method ON cacheInterceptorV${VERSION}(method);
134
134
  CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteAt ON cacheInterceptorV${VERSION}(deleteAt);
135
135
  CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_start ON cacheInterceptorV${VERSION}(start);
136
- CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_end ON cacheInterceptorV${VERSION}(end);
137
136
  `)
138
137
 
139
138
  this.#getValuesQuery = this.#db.prepare(`
@@ -154,7 +153,6 @@ export class SqliteCacheStore {
154
153
  url = ?
155
154
  AND method = ?
156
155
  AND start <= ?
157
- AND end >= ?
158
156
  ORDER BY
159
157
  deleteAt ASC
160
158
  `)
@@ -318,12 +316,7 @@ export class SqliteCacheStore {
318
316
  /**
319
317
  * @type {SqliteStoreValue[]}
320
318
  */
321
- const values = this.#getValuesQuery.all(
322
- makeValueUrl(key),
323
- method,
324
- range?.start ?? 0,
325
- range?.end ?? Number.MAX_SAFE_INTEGER,
326
- )
319
+ const values = this.#getValuesQuery.all(makeValueUrl(key), method, range?.start ?? 0)
327
320
 
328
321
  if (values.length === 0) {
329
322
  return undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "6.2.10",
3
+ "version": "6.2.11",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",