@superfaceai/one-sdk
Advanced tools
Comparing version 3.0.0-alpha.12 to 3.0.0-alpha.13
@@ -187,8 +187,7 @@ import { WASI } from '@cloudflare/workers-wasi'; | ||
} | ||
// TODO: update to use batch endpoint when new brain is released | ||
await Promise.all(events.map(event => fetch(this.insightsUrl, { | ||
await fetch(`${this.insightsUrl}/batch`, { | ||
method: 'POST', | ||
body: event, | ||
body: '[' + events.join(',') + ']', | ||
headers | ||
}))); | ||
}); | ||
} | ||
@@ -195,0 +194,0 @@ async persistDeveloperDump(events) { |
@@ -129,22 +129,7 @@ import fs from 'node:fs/promises'; | ||
} | ||
// TODO: update to use batch endpoint when new brain is released | ||
// await fetch( | ||
// `${this.insightsUrl}/batch`, | ||
// { | ||
// method: 'POST', | ||
// body: '[' + events.join(',') + ']', | ||
// headers | ||
// } | ||
// ).then(res => console.trace(res)); | ||
await Promise.all(events.map(event => fetch(this.insightsUrl, { | ||
await fetch(`${this.insightsUrl}/batch`, { | ||
method: 'POST', | ||
body: event, | ||
body: '[' + events.join(',') + ']', | ||
headers | ||
}) | ||
// .then(res => res.text().then(body => { | ||
// const headers: [string, string][] = []; | ||
// res.headers.forEach((value, key) => headers.push([key, value])); | ||
// console.trace(res, headers, body); | ||
// })) | ||
)); | ||
}); | ||
} | ||
@@ -151,0 +136,0 @@ async persistDeveloperDump(events) { |
{ | ||
"name": "@superfaceai/one-sdk", | ||
"version": "3.0.0-alpha.12", | ||
"version": "3.0.0-alpha.13", | ||
"main": "node/index.js", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3819674
1887