graphile-cache 4.9.1 → 4.9.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.
@@ -7,8 +7,8 @@ exports.createGraphileInstance = void 0;
7
7
  const node_http_1 = require("node:http");
8
8
  const logger_1 = require("@pgpmjs/logger");
9
9
  const express_1 = __importDefault(require("express"));
10
- const postgraphile_1 = require("postgraphile");
11
10
  const v4_1 = require("grafserv/express/v4");
11
+ const postgraphile_1 = require("postgraphile");
12
12
  const log = new logger_1.Logger('graphile-cache:create');
13
13
  /**
14
14
  * Create a PostGraphile v5 instance backed by grafserv/express.
@@ -1,8 +1,8 @@
1
1
  import { createServer } from 'node:http';
2
2
  import { Logger } from '@pgpmjs/logger';
3
3
  import express from 'express';
4
- import { postgraphile } from 'postgraphile';
5
4
  import { grafserv } from 'grafserv/express/v4';
5
+ import { postgraphile } from 'postgraphile';
6
6
  const log = new Logger('graphile-cache:create');
7
7
  /**
8
8
  * Create a PostGraphile v5 instance backed by grafserv/express.
@@ -1,6 +1,6 @@
1
- import { EventEmitter } from 'events';
2
- import { parseEnvNumber } from '12factor-env';
3
1
  import { Logger } from '@pgpmjs/logger';
2
+ import { parseEnvNumber } from '12factor-env';
3
+ import { EventEmitter } from 'events';
4
4
  import { LRUCache } from 'lru-cache';
5
5
  import { pgCache } from 'pg-cache';
6
6
  const log = new Logger('graphile-cache');
package/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  // Main exports from graphile-cache package
2
2
  export {
3
- // Cache instance and entry type
4
- graphileCache, closeAllCaches,
5
- // Time constants
6
- ONE_HOUR_MS, FIVE_MINUTES_MS,
7
3
  // Event emitter for cache events
8
- CacheEventEmitter, cacheEvents, getCacheConfig, getCacheStats,
4
+ CacheEventEmitter, cacheEvents,
9
5
  // Clear matching entries
10
- clearMatchingEntries } from './graphile-cache';
6
+ clearMatchingEntries, closeAllCaches, FIVE_MINUTES_MS, getCacheConfig, getCacheStats,
7
+ // Cache instance and entry type
8
+ graphileCache,
9
+ // Time constants
10
+ ONE_HOUR_MS } from './graphile-cache';
11
11
  // Factory for creating PostGraphile v5 instances
12
12
  export { createGraphileInstance } from './create-instance';
13
13
  // Generic module config cache for plugin lookups
@@ -10,8 +10,8 @@
10
10
  * - Named logging for debugging
11
11
  * - clear() hook for future LISTEN/NOTIFY invalidation
12
12
  */
13
- import { LRUCache } from 'lru-cache';
14
13
  import { Logger } from '@pgpmjs/logger';
14
+ import { LRUCache } from 'lru-cache';
15
15
  export class ModuleConfigCache {
16
16
  cache;
17
17
  log;
@@ -1,9 +1,9 @@
1
1
  import { EventEmitter } from 'events';
2
- import { LRUCache } from 'lru-cache';
3
2
  import type { Express } from 'express';
3
+ import type { GrafservBase } from 'grafserv';
4
4
  import type { Server as HttpServer } from 'http';
5
+ import { LRUCache } from 'lru-cache';
5
6
  import type { PostGraphileInstance } from 'postgraphile';
6
- import type { GrafservBase } from 'grafserv';
7
7
  export declare const ONE_HOUR_MS: number;
8
8
  export declare const FIVE_MINUTES_MS: number;
9
9
  export type EvictionReason = 'lru' | 'ttl' | 'manual';
package/graphile-cache.js CHANGED
@@ -4,9 +4,9 @@ exports.closeAllCaches = exports.graphileCache = exports.cacheEvents = exports.C
4
4
  exports.getCacheConfig = getCacheConfig;
5
5
  exports.getCacheStats = getCacheStats;
6
6
  exports.clearMatchingEntries = clearMatchingEntries;
7
- const events_1 = require("events");
8
- const _12factor_env_1 = require("12factor-env");
9
7
  const logger_1 = require("@pgpmjs/logger");
8
+ const _12factor_env_1 = require("12factor-env");
9
+ const events_1 = require("events");
10
10
  const lru_cache_1 = require("lru-cache");
11
11
  const pg_cache_1 = require("pg-cache");
12
12
  const log = new logger_1.Logger('graphile-cache');
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { graphileCache, GraphileCacheEntry, closeAllCaches, ONE_HOUR_MS, FIVE_MINUTES_MS, EvictionReason, CacheEventEmitter, CacheEvictionEvent, cacheEvents, CacheConfig, getCacheConfig, CacheStats, getCacheStats, clearMatchingEntries } from './graphile-cache';
1
+ export { CacheConfig, CacheEventEmitter, cacheEvents, CacheEvictionEvent, CacheStats, clearMatchingEntries, closeAllCaches, EvictionReason, FIVE_MINUTES_MS, getCacheConfig, getCacheStats, graphileCache, GraphileCacheEntry, ONE_HOUR_MS } from './graphile-cache';
2
2
  export { createGraphileInstance } from './create-instance';
3
3
  export { ModuleConfigCache, ModuleConfigCacheOptions } from './module-config-cache';
package/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModuleConfigCache = exports.createGraphileInstance = exports.clearMatchingEntries = exports.getCacheStats = exports.getCacheConfig = exports.cacheEvents = exports.CacheEventEmitter = exports.FIVE_MINUTES_MS = exports.ONE_HOUR_MS = exports.closeAllCaches = exports.graphileCache = void 0;
3
+ exports.ModuleConfigCache = exports.createGraphileInstance = exports.ONE_HOUR_MS = exports.graphileCache = exports.getCacheStats = exports.getCacheConfig = exports.FIVE_MINUTES_MS = exports.closeAllCaches = exports.clearMatchingEntries = exports.cacheEvents = exports.CacheEventEmitter = void 0;
4
4
  // Main exports from graphile-cache package
5
5
  var graphile_cache_1 = require("./graphile-cache");
6
- // Cache instance and entry type
7
- Object.defineProperty(exports, "graphileCache", { enumerable: true, get: function () { return graphile_cache_1.graphileCache; } });
8
- Object.defineProperty(exports, "closeAllCaches", { enumerable: true, get: function () { return graphile_cache_1.closeAllCaches; } });
9
- // Time constants
10
- Object.defineProperty(exports, "ONE_HOUR_MS", { enumerable: true, get: function () { return graphile_cache_1.ONE_HOUR_MS; } });
11
- Object.defineProperty(exports, "FIVE_MINUTES_MS", { enumerable: true, get: function () { return graphile_cache_1.FIVE_MINUTES_MS; } });
12
6
  // Event emitter for cache events
13
7
  Object.defineProperty(exports, "CacheEventEmitter", { enumerable: true, get: function () { return graphile_cache_1.CacheEventEmitter; } });
14
8
  Object.defineProperty(exports, "cacheEvents", { enumerable: true, get: function () { return graphile_cache_1.cacheEvents; } });
15
- Object.defineProperty(exports, "getCacheConfig", { enumerable: true, get: function () { return graphile_cache_1.getCacheConfig; } });
16
- Object.defineProperty(exports, "getCacheStats", { enumerable: true, get: function () { return graphile_cache_1.getCacheStats; } });
17
9
  // Clear matching entries
18
10
  Object.defineProperty(exports, "clearMatchingEntries", { enumerable: true, get: function () { return graphile_cache_1.clearMatchingEntries; } });
11
+ Object.defineProperty(exports, "closeAllCaches", { enumerable: true, get: function () { return graphile_cache_1.closeAllCaches; } });
12
+ Object.defineProperty(exports, "FIVE_MINUTES_MS", { enumerable: true, get: function () { return graphile_cache_1.FIVE_MINUTES_MS; } });
13
+ Object.defineProperty(exports, "getCacheConfig", { enumerable: true, get: function () { return graphile_cache_1.getCacheConfig; } });
14
+ Object.defineProperty(exports, "getCacheStats", { enumerable: true, get: function () { return graphile_cache_1.getCacheStats; } });
15
+ // Cache instance and entry type
16
+ Object.defineProperty(exports, "graphileCache", { enumerable: true, get: function () { return graphile_cache_1.graphileCache; } });
17
+ // Time constants
18
+ Object.defineProperty(exports, "ONE_HOUR_MS", { enumerable: true, get: function () { return graphile_cache_1.ONE_HOUR_MS; } });
19
19
  // Factory for creating PostGraphile v5 instances
20
20
  var create_instance_1 = require("./create-instance");
21
21
  Object.defineProperty(exports, "createGraphileInstance", { enumerable: true, get: function () { return create_instance_1.createGraphileInstance; } });
@@ -13,8 +13,8 @@
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ModuleConfigCache = void 0;
16
- const lru_cache_1 = require("lru-cache");
17
16
  const logger_1 = require("@pgpmjs/logger");
17
+ const lru_cache_1 = require("lru-cache");
18
18
  class ModuleConfigCache {
19
19
  cache;
20
20
  log;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-cache",
3
- "version": "4.9.1",
3
+ "version": "4.9.3",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PostGraphile v5 LRU cache with automatic pool cleanup integration",
6
6
  "main": "index.js",
@@ -29,13 +29,13 @@
29
29
  "test:watch": "jest --watch"
30
30
  },
31
31
  "dependencies": {
32
- "12factor-env": "^1.26.1",
33
- "@pgpmjs/logger": "^2.23.1",
32
+ "12factor-env": "^1.26.2",
33
+ "@pgpmjs/logger": "^2.23.3",
34
34
  "express": "^5.2.1",
35
35
  "grafserv": "1.0.0",
36
- "graphile-realtime-subscriptions": "^1.9.1",
36
+ "graphile-realtime-subscriptions": "^1.9.3",
37
37
  "lru-cache": "^11.2.7",
38
- "pg-cache": "^3.24.1",
38
+ "pg-cache": "^3.24.3",
39
39
  "postgraphile": "5.0.3"
40
40
  },
41
41
  "devDependencies": {
@@ -53,5 +53,5 @@
53
53
  "constructive",
54
54
  "v5"
55
55
  ],
56
- "gitHead": "b8d21445e1336136aacf826b178a06bec2b8a4c7"
56
+ "gitHead": "c20b6be96b39bf71c0e2df0f4b51e05deacd006b"
57
57
  }