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.26.0 to 0.26.1

19

dist/chat.js

@@ -52,2 +52,10 @@ import defaults from 'defaults';

};
function checkAbortSignal(signal) {
if (signal?.aborted) {
if (signal.reason instanceof Error) {
throw signal.reason;
}
throw new Error(signal.reason);
}
}
export async function* submitChat(messages, projectKey, options = {}) {

@@ -85,2 +93,3 @@ if (!projectKey) {

const data = parseEncodedJSONHeader(res, 'x-markprompt-data');
checkAbortSignal(options.signal);
if (res.headers.get('Content-Type')?.includes('application/json')) {

@@ -114,5 +123,3 @@ const json = await res.json();

if (!res.ok || !res.body) {
if (options.signal?.aborted) {
throw new Error(options.signal.reason);
}
checkAbortSignal(options.signal);
const text = await res.text();

@@ -130,5 +137,3 @@ try {

}
if (options.signal?.aborted) {
throw new Error(options.signal.reason);
}
checkAbortSignal(options.signal);
// eslint-disable-next-line prefer-const

@@ -158,2 +163,3 @@ let completion = {};

mergeWith(completion, json.choices[0]?.delta, concatStrings);
checkAbortSignal(options.signal);
/**

@@ -166,2 +172,3 @@ * If we do not yield a structuredClone here, the completion object will

}
checkAbortSignal(options.signal);
if (isChatCompletionMessage(completion) && isMarkpromptMetadata(data)) {

@@ -168,0 +175,0 @@ return { ...completion, ...data };

{
"name": "@markprompt/core",
"version": "0.26.0",
"version": "0.26.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