@overmap-ai/core 1.0.16-fix-misc-issues.4 → 1.0.16-fix-misc-issues.6

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.
@@ -88,7 +88,6 @@ class OutboxCoordinator {
88
88
  debugLog("Adding request to outbox:", request2);
89
89
  this.graph.addNode(request2.payload.uuid, request2);
90
90
  if (request2.payload.blockers.length === 0 || this.graph.size() === 1) {
91
- debugLog("Request has no dependencies, or there are no other nodes in the graph");
92
91
  return;
93
92
  }
94
93
  for (const node of this.graph.overallOrder()) {
@@ -3332,6 +3331,7 @@ async function performRequest(action, client) {
3332
3331
  throw new Error("Request was marked for deletion");
3333
3332
  }
3334
3333
  await checkToken();
3334
+ console.debug("Done checking tokens");
3335
3335
  const defaultSettings = {
3336
3336
  queryParams: "",
3337
3337
  isAuthNeeded: true
@@ -3345,10 +3345,12 @@ async function performRequest(action, client) {
3345
3345
  let url = requestDetails.url;
3346
3346
  const file = attachmentHash ? await client.files.fetchCache(attachmentHash) : void 0;
3347
3347
  const accessToken = selectAccessToken(state);
3348
+ console.debug("A");
3348
3349
  if (attachmentHash && !file) {
3349
3350
  debugLog("Cannot upload uncached attachment:", attachmentHash);
3350
3351
  throw new Error(`Cannot upload file ${attachmentHash} because it's not cached.`);
3351
3352
  }
3353
+ console.debug("B");
3352
3354
  if ((!isExternalUrl || false) && !url.startsWith("http")) {
3353
3355
  debugLog("Prepending base URL to relative URL:", url);
3354
3356
  if (!url.startsWith("/") && !url.startsWith("blob:")) {
@@ -3356,6 +3358,7 @@ async function performRequest(action, client) {
3356
3358
  }
3357
3359
  url = client.API_URL + url;
3358
3360
  }
3361
+ console.debug("C");
3359
3362
  const addPayload = (req) => {
3360
3363
  if (attachmentHash) {
3361
3364
  const s3url = requestDetails.s3url;
@@ -3404,6 +3407,7 @@ async function performRequest(action, client) {
3404
3407
  if (headers) {
3405
3408
  requestToSend = requestToSend.set(headers);
3406
3409
  }
3410
+ console.debug("D");
3407
3411
  try {
3408
3412
  debugLog("Sending request:", requestDetails, "with params:", queryParams);
3409
3413
  return await requestToSend.query(queryParams);
@@ -3483,11 +3487,8 @@ class OfflineMiddleware {
3483
3487
  } else {
3484
3488
  console.debug(`All middleware finished with ${this.constructor.name}, performing request:`, action);
3485
3489
  const baseUrl = action.meta.offline.effect.BASE_URL;
3486
- debugLog("Base URL:", baseUrl);
3487
3490
  if (!clientStore)
3488
3491
  throw new Error("Client store not set");
3489
- debugLog("Client store is set");
3490
- debugLog("Performing request:", action);
3491
3492
  return performRequest(action, makeClient(baseUrl, clientStore));
3492
3493
  }
3493
3494
  }