deepline 0.3.75 → 0.3.76

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.
@@ -199,7 +199,7 @@ export const SDK_RELEASE = {
199
199
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
- version: '0.3.75',
202
+ version: '0.3.76',
203
203
  updateSummary:
204
204
  'Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.',
205
205
  packageCapabilities: {
package/dist/cli/index.js CHANGED
@@ -1225,7 +1225,7 @@ var SDK_RELEASE = {
1225
1225
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1226
1226
  // getters keep their established compatibility behavior.
1227
1227
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1228
- version: "0.3.75",
1228
+ version: "0.3.76",
1229
1229
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1230
1230
  packageCapabilities: {
1231
1231
  updatePreferences: 1
@@ -8457,6 +8457,7 @@ function printCommandEnvelope(envelope, options = {}) {
8457
8457
  var EXIT_OK = 0;
8458
8458
  var EXIT_AUTH = 3;
8459
8459
  var EXIT_SERVER = 5;
8460
+ var AUTH_HTTP_TIMEOUT_MS = 1e4;
8460
8461
  function statusBannerLine(value) {
8461
8462
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
8462
8463
  const banner = value;
@@ -8623,30 +8624,37 @@ async function httpJson(method, url, apiKey, body) {
8623
8624
  if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
8624
8625
  const bypassToken = process.env.VERCEL_PROTECTION_BYPASS_TOKEN?.trim();
8625
8626
  if (bypassToken) headers["x-vercel-protection-bypass"] = bypassToken;
8626
- let response = null;
8627
8627
  let lastError = null;
8628
8628
  for (const candidateUrl of buildCandidateUrls2(url)) {
8629
+ const controller = new AbortController();
8630
+ let requestTimedOut = false;
8631
+ const timeout = setTimeout(() => {
8632
+ requestTimedOut = true;
8633
+ controller.abort();
8634
+ }, AUTH_HTTP_TIMEOUT_MS);
8629
8635
  try {
8630
- response = await fetch(candidateUrl, {
8636
+ const response = await fetch(candidateUrl, {
8631
8637
  method,
8632
8638
  headers,
8633
- body: body !== void 0 ? JSON.stringify(body) : void 0
8639
+ body: body !== void 0 ? JSON.stringify(body) : void 0,
8640
+ signal: controller.signal
8634
8641
  });
8635
- break;
8642
+ let data;
8643
+ try {
8644
+ data = await response.json();
8645
+ } catch (error) {
8646
+ if (controller.signal.aborted) throw error;
8647
+ data = {};
8648
+ }
8649
+ return { status: response.status, data };
8636
8650
  } catch (error) {
8637
8651
  lastError = error;
8652
+ if (requestTimedOut && method !== "GET") break;
8653
+ } finally {
8654
+ clearTimeout(timeout);
8638
8655
  }
8639
8656
  }
8640
- if (!response) {
8641
- throw lastError instanceof Error ? lastError : new Error(String(lastError));
8642
- }
8643
- let data;
8644
- try {
8645
- data = await response.json();
8646
- } catch {
8647
- data = {};
8648
- }
8649
- return { status: response.status, data };
8657
+ throw lastError instanceof Error ? lastError : new Error(String(lastError));
8650
8658
  }
8651
8659
  async function reportSetupCompleted(input2) {
8652
8660
  const apiKey = input2.authScope === "folder" ? resolveProjectApiKeyForBaseUrl(input2.baseUrl) : resolveGlobalApiKeyForBaseUrl(input2.baseUrl);
@@ -1210,7 +1210,7 @@ var SDK_RELEASE = {
1210
1210
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1211
1211
  // getters keep their established compatibility behavior.
1212
1212
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1213
- version: "0.3.75",
1213
+ version: "0.3.76",
1214
1214
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1215
1215
  packageCapabilities: {
1216
1216
  updatePreferences: 1
@@ -8454,6 +8454,7 @@ function printCommandEnvelope(envelope, options = {}) {
8454
8454
  var EXIT_OK = 0;
8455
8455
  var EXIT_AUTH = 3;
8456
8456
  var EXIT_SERVER = 5;
8457
+ var AUTH_HTTP_TIMEOUT_MS = 1e4;
8457
8458
  function statusBannerLine(value) {
8458
8459
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
8459
8460
  const banner = value;
@@ -8620,30 +8621,37 @@ async function httpJson(method, url, apiKey, body) {
8620
8621
  if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
8621
8622
  const bypassToken = process.env.VERCEL_PROTECTION_BYPASS_TOKEN?.trim();
8622
8623
  if (bypassToken) headers["x-vercel-protection-bypass"] = bypassToken;
8623
- let response = null;
8624
8624
  let lastError = null;
8625
8625
  for (const candidateUrl of buildCandidateUrls2(url)) {
8626
+ const controller = new AbortController();
8627
+ let requestTimedOut = false;
8628
+ const timeout = setTimeout(() => {
8629
+ requestTimedOut = true;
8630
+ controller.abort();
8631
+ }, AUTH_HTTP_TIMEOUT_MS);
8626
8632
  try {
8627
- response = await fetch(candidateUrl, {
8633
+ const response = await fetch(candidateUrl, {
8628
8634
  method,
8629
8635
  headers,
8630
- body: body !== void 0 ? JSON.stringify(body) : void 0
8636
+ body: body !== void 0 ? JSON.stringify(body) : void 0,
8637
+ signal: controller.signal
8631
8638
  });
8632
- break;
8639
+ let data;
8640
+ try {
8641
+ data = await response.json();
8642
+ } catch (error) {
8643
+ if (controller.signal.aborted) throw error;
8644
+ data = {};
8645
+ }
8646
+ return { status: response.status, data };
8633
8647
  } catch (error) {
8634
8648
  lastError = error;
8649
+ if (requestTimedOut && method !== "GET") break;
8650
+ } finally {
8651
+ clearTimeout(timeout);
8635
8652
  }
8636
8653
  }
8637
- if (!response) {
8638
- throw lastError instanceof Error ? lastError : new Error(String(lastError));
8639
- }
8640
- let data;
8641
- try {
8642
- data = await response.json();
8643
- } catch {
8644
- data = {};
8645
- }
8646
- return { status: response.status, data };
8654
+ throw lastError instanceof Error ? lastError : new Error(String(lastError));
8647
8655
  }
8648
8656
  async function reportSetupCompleted(input2) {
8649
8657
  const apiKey = input2.authScope === "folder" ? resolveProjectApiKeyForBaseUrl(input2.baseUrl) : resolveGlobalApiKeyForBaseUrl(input2.baseUrl);
package/dist/index.js CHANGED
@@ -832,7 +832,7 @@ var SDK_RELEASE = {
832
832
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
833
833
  // getters keep their established compatibility behavior.
834
834
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
835
- version: "0.3.75",
835
+ version: "0.3.76",
836
836
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
837
837
  packageCapabilities: {
838
838
  updatePreferences: 1
package/dist/index.mjs CHANGED
@@ -744,7 +744,7 @@ var SDK_RELEASE = {
744
744
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
745
745
  // getters keep their established compatibility behavior.
746
746
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
747
- version: "0.3.75",
747
+ version: "0.3.76",
748
748
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
749
749
  packageCapabilities: {
750
750
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.75",
3
+ "version": "0.3.76",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",