Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markprompt/web

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markprompt/web - npm Package Compare versions

Comparing version 0.2.2-beta3 to 0.2.2-beta4

42

index.js
import './markprompt-content';
const required = ['projectKey'];
const optional = [
'completionsUrl',
'dark',
'iDontKnowMessage',
'model',
'placeholder',
'completionsUrl',
'dark',
'iDontKnowMessage',
'model',
'placeholder',
];
(async () => {
const root = document.createElement('markprompt-content');
const markprompt = window.markprompt;
for (let key of required) {
if (
!(markprompt === null || markprompt === void 0 ? void 0 : markprompt[key])
) {
throw new Error(`Missing Markprompt configuration option: ${key}`);
const root = document.createElement('markprompt-content');
const markprompt = window.markprompt;
console.log('markprompt', JSON.stringify(markprompt, null, 2));
for (let key of required) {
console.log('key', key, 'markprompt?.[key]', markprompt === null || markprompt === void 0 ? void 0 : markprompt[key]);
if (!(markprompt === null || markprompt === void 0 ? void 0 : markprompt[key])) {
throw new Error(`!!! Missing Markprompt configuration option: ${key}`);
}
root.setAttribute(key, markprompt[key]);
}
root.setAttribute(key, markprompt[key]);
}
for (let key of optional) {
if (
!(markprompt === null || markprompt === void 0 ? void 0 : markprompt[key])
)
continue;
root.setAttribute(key, markprompt[key]);
}
document.body.appendChild(root);
for (let key of optional) {
if (!(markprompt === null || markprompt === void 0 ? void 0 : markprompt[key]))
continue;
root.setAttribute(key, markprompt[key]);
}
document.body.appendChild(root);
})();

@@ -34,3 +34,3 @@ import { OpenAIModelId } from '@markprompt/core';

if (!markprompt?.[key]) {
throw new Error(`Missing Markprompt configuration option: ${key}`);
throw new Error(`!!! Missing Markprompt configuration option: ${key}`);
}

@@ -37,0 +37,0 @@

{
"name": "@markprompt/web",
"version": "0.2.2-beta3",
"version": "0.2.2-beta4",
"description": "Prompt web component for Markprompt",

@@ -5,0 +5,0 @@ "main": "index.js",

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