New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@markprompt/core

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markprompt/core - npm Package Compare versions

Comparing version 0.22.0 to 0.22.1

33

dist/chat.js

@@ -71,2 +71,20 @@ import defaults from 'defaults';

});
const data = parseEncodedJSONHeader(res, 'x-markprompt-data');
if (res.headers.get('Content-Type')?.includes('application/json')) {
const json = await res.json();
if (isChatCompletion(json) && isMarkpromptMetadata(data)) {
return { ...json.choices[0].message, ...data };
}
else {
if (isMarkpromptMetadata(data)) {
yield data;
}
throw new Error('Malformed response from Markprompt API', {
cause: json,
});
}
}
if (isMarkpromptMetadata(data)) {
yield data;
}
if (!res.ok || !res.body) {

@@ -91,17 +109,2 @@ if (options.signal?.aborted) {

}
const data = parseEncodedJSONHeader(res, 'x-markprompt-data');
if (res.headers.get('Content-Type')?.includes('application/json')) {
const json = await res.json();
if (isChatCompletion(json) && isMarkpromptMetadata(data)) {
return { ...json.choices[0].message, ...data };
}
else {
throw new Error('Malformed response from Markprompt API', {
cause: json,
});
}
}
if (isMarkpromptMetadata(data)) {
yield data;
}
// eslint-disable-next-line prefer-const

@@ -108,0 +111,0 @@ let completion = {};

{
"name": "@markprompt/core",
"version": "0.22.0",
"version": "0.22.1",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc