@envseal/core 0.1.1 → 0.1.2

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/dist/broker.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createHmac } from 'node:crypto';
2
- import { SepError, isSepError, asSecret, zero } from '@envseal/protocol';
2
+ import { SepError, isSepError, zero } from '@envseal/protocol';
3
3
  import { getProvider, findKey } from '@envseal/registry';
4
4
  import { selectPrompter } from '@envseal/prompters';
5
5
  import { projectPaths, loadOrCreateSalt } from './paths.js';
@@ -12,7 +12,6 @@ import { runWithSecrets } from './exec.js';
12
12
  import { getSink } from './sinks/registry.js';
13
13
  import { getValidation, recordValidation } from './validation-state.js';
14
14
  import { scanText, secretInRequestError } from './guard.js';
15
- const LENGTH_BUCKETS = ['<8', '8-16', '16-32', '32-48', '48-64', '64-128', '128+'];
16
15
  function getLengthBucket(length) {
17
16
  if (length < 8)
18
17
  return '<8';
@@ -121,7 +120,6 @@ export class Broker {
121
120
  };
122
121
  }
123
122
  async declare(input) {
124
- const manifest = loadManifest(this.paths) ?? emptyManifest();
125
123
  const withDefaults = input.entries.map((entry) => {
126
124
  if (entry.format || entry.provider || entry.verify) {
127
125
  return entry;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './paths.js';
2
2
  export * from './manifest.js';
3
+ export * from './guard.js';
3
4
  export * from './presence.js';
4
5
  export * from './redact.js';
5
6
  export * from './tickets.js';
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './paths.js';
2
2
  export * from './manifest.js';
3
+ export * from './guard.js';
3
4
  export * from './presence.js';
4
5
  export * from './redact.js';
5
6
  export * from './tickets.js';
package/dist/tickets.js CHANGED
@@ -92,7 +92,7 @@ export class TicketStore {
92
92
  }
93
93
  this.expireIfDue(record);
94
94
  let settled = false;
95
- let timeout;
95
+ const timer = {};
96
96
  const listener = () => {
97
97
  if (record.state !== 'pending')
98
98
  finish();
@@ -103,8 +103,8 @@ export class TicketStore {
103
103
  settled = true;
104
104
  this.unsubscribe(ticket, listener);
105
105
  this.pendingAwaits.delete(finish);
106
- if (timeout !== undefined)
107
- clearTimeout(timeout);
106
+ if (timer.handle !== undefined)
107
+ clearTimeout(timer.handle);
108
108
  resolvePromise(this.toOutcome(record));
109
109
  };
110
110
  if (record.state !== 'pending') {
@@ -115,7 +115,7 @@ export class TicketStore {
115
115
  // own expiry.
116
116
  const untilExpiry = Math.max(0, record.expiresAt - Date.now());
117
117
  const delay = Math.min(Math.max(0, timeoutMs), untilExpiry, MAX_TIMER_MS);
118
- timeout = setTimeout(() => {
118
+ timer.handle = setTimeout(() => {
119
119
  this.expireIfDue(record);
120
120
  finish();
121
121
  }, delay);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envseal/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -22,10 +22,10 @@
22
22
  "dependencies": {
23
23
  "jsonc-parser": "^3.3.1",
24
24
  "ulid": "^2.3.0",
25
- "@envseal/protocol": "0.1.1",
26
- "@envseal/registry": "0.1.1",
27
- "@envseal/prompters": "0.1.1",
28
- "@envseal/detector": "0.1.1"
25
+ "@envseal/registry": "0.1.2",
26
+ "@envseal/prompters": "0.1.2",
27
+ "@envseal/detector": "0.1.2",
28
+ "@envseal/protocol": "0.1.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "fast-check": "^3.23.1"