@effectstream/utils 0.100.19 → 0.100.21

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/package.json +1 -1
  2. package/src/config.ts +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effectstream/utils",
3
- "version": "0.100.19",
3
+ "version": "0.100.21",
4
4
  "license": "MIT",
5
5
  "homepage": "https://effectstream.github.io/docs/",
6
6
  "repository": {
package/src/config.ts CHANGED
@@ -239,6 +239,13 @@ const definitions: Record<string, ConfigDefinition> = {
239
239
  defaultValue: undefined,
240
240
  description: "Enable PGLite Debug/Verbose mode. Example: '1'",
241
241
  },
242
+ ALLOW_NO_PG_IVM: {
243
+ key: "ALLOW_NO_PG_IVM",
244
+ type: "boolean",
245
+ defaultValue: false,
246
+ description:
247
+ "Permits the engine to start when the pg_ivm extension is not installed, falling back to plain SQL views over the trigger-maintained intermediate tables. Intended for dev/test and low-volume apps only — the fallback degrades sharply on high-cardinality data. Production deployments should install pg_ivm. ('true' or 'false')",
248
+ },
242
249
  OTEL_COLLECTOR_PORT: {
243
250
  key: "OTEL_COLLECTOR_PORT",
244
251
  type: "number",
@@ -307,6 +314,13 @@ const definitions: Record<string, ConfigDefinition> = {
307
314
  description:
308
315
  "Snapshot retention: keep one snapshot per day for this many days. Snapshots older than this are deleted. Default: 7.",
309
316
  },
317
+ EFFECTSTREAM_COALESCE_EMPTY_BLOCKS: {
318
+ key: "EFFECTSTREAM_COALESCE_EMPTY_BLOCKS",
319
+ type: "boolean",
320
+ defaultValue: false,
321
+ description:
322
+ "Fold consecutive empty catch-up blocks into one DB transaction when behind the chain tip. Default: false.",
323
+ },
310
324
  } as const;
311
325
 
312
326
  type ENV_TYPES = string | number | boolean | undefined;
@@ -405,6 +419,9 @@ export class ENV {
405
419
  static get DEBUG_PGLITE(): number {
406
420
  return ENV.getConfig(definitions.DEBUG_PGLITE);
407
421
  }
422
+ static get ALLOW_NO_PG_IVM(): boolean {
423
+ return ENV.getConfig(definitions.ALLOW_NO_PG_IVM);
424
+ }
408
425
  static get OTEL_COLLECTOR_PORT(): number {
409
426
  return ENV.getConfig(definitions.OTEL_COLLECTOR_PORT);
410
427
  }
@@ -441,6 +458,9 @@ export class ENV {
441
458
  static get EFFECTSTREAM_SNAPSHOT_LAST_N_DAYS(): number {
442
459
  return ENV.getConfig(definitions.EFFECTSTREAM_SNAPSHOT_LAST_N_DAYS);
443
460
  }
461
+ static get EFFECTSTREAM_COALESCE_EMPTY_BLOCKS(): boolean {
462
+ return ENV.getConfig(definitions.EFFECTSTREAM_COALESCE_EMPTY_BLOCKS);
463
+ }
444
464
 
445
465
  public static getConfig<T>(config: ConfigDefinition): T {
446
466
  switch (config.type) {