@dench.com/cli 2.8.5 → 2.8.6-staging.178

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.
@@ -127,6 +127,14 @@ export type SearchJobsBody = {
127
127
  pageToken?: string;
128
128
  };
129
129
 
130
+ /**
131
+ * FullEnrich hard cases run 40–120s end to end; a 90s budget produced
132
+ * spurious "No data returned" failures for jobs that later completed (and
133
+ * charged). 150s covers the observed tail while the 2s interval keeps
134
+ * fast results snappy.
135
+ */
136
+ const DEFAULT_POLL_TIMEOUT_MS = 150000;
137
+
130
138
  export type EnrichmentGatewayOptions = {
131
139
  apiKey?: string;
132
140
  baseUrl?: string;
@@ -134,7 +142,7 @@ export type EnrichmentGatewayOptions = {
134
142
  fetchImpl?: FetchLike;
135
143
  /** Override the poll interval (ms) for testing. Default: 2000. */
136
144
  pollIntervalMs?: number;
137
- /** Override the poll timeout (ms) for testing. Default: 30000. */
145
+ /** Override the poll timeout (ms) for testing. Default: 150000. */
138
146
  pollTimeoutMs?: number;
139
147
  /**
140
148
  * Optional abort signal — propagated to fetch and short-circuits the polling
@@ -448,9 +456,7 @@ async function pollForPersonResult(
448
456
  options: EnrichmentGatewayOptions,
449
457
  ): Promise<Record<string, unknown>> {
450
458
  const pollIntervalMs = options.pollIntervalMs ?? 2000;
451
- // Default 90s: FullEnrich jobs for hard-to-find contacts can take 40–120s.
452
- // 30s was too short and caused spurious "No data returned" FatalErrors.
453
- const pollTimeoutMs = options.pollTimeoutMs ?? 90000;
459
+ const pollTimeoutMs = options.pollTimeoutMs ?? DEFAULT_POLL_TIMEOUT_MS;
454
460
  const deadline = Date.now() + pollTimeoutMs;
455
461
 
456
462
  while (Date.now() < deadline) {
@@ -640,7 +646,7 @@ async function pollForBulkPersonResults(
640
646
  options: EnrichmentGatewayOptions,
641
647
  ): Promise<void> {
642
648
  const pollIntervalMs = options.pollIntervalMs ?? 2000;
643
- const pollTimeoutMs = options.pollTimeoutMs ?? 90000;
649
+ const pollTimeoutMs = options.pollTimeoutMs ?? DEFAULT_POLL_TIMEOUT_MS;
644
650
  const deadline = Date.now() + pollTimeoutMs;
645
651
 
646
652
  // Slots that this chunk is responsible for — anything still missing after
@@ -882,7 +888,7 @@ async function pollForReverseEmailResults(
882
888
  options: EnrichmentGatewayOptions,
883
889
  ): Promise<void> {
884
890
  const pollIntervalMs = options.pollIntervalMs ?? 2000;
885
- const pollTimeoutMs = options.pollTimeoutMs ?? 90000;
891
+ const pollTimeoutMs = options.pollTimeoutMs ?? DEFAULT_POLL_TIMEOUT_MS;
886
892
  const deadline = Date.now() + pollTimeoutMs;
887
893
 
888
894
  const ownedIndexes = emails
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dench.com/cli",
3
- "version": "2.8.5",
3
+ "version": "2.8.6-staging.178",
4
4
  "description": "Dench agent workspace CLI.",
5
5
  "type": "module",
6
6
  "bin": {