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

corvid-fake-local-mode-editor

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corvid-fake-local-mode-editor - npm Package Compare versions

Comparing version 0.1.31 to 0.1.32

2

package.json
{
"name": "corvid-fake-local-mode-editor",
"version": "0.1.31",
"version": "0.1.32",
"description": "",

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

@@ -20,2 +20,9 @@ const io = require("socket.io-client");

// TODO: refactor schemas to be something different than code. than we won't need to handle it in such a weird way
const isSchemaPath = filePath => filePath.startsWith(".schemas/");
const ensureSchemaStructure = schemaContent =>
JSON.stringify(JSON.parse(schemaContent));
const connectToLocalServer = port => {

@@ -187,3 +194,7 @@ return new Promise((resolve, reject) => {

(result, value) =>
Object.assign(result, { [value.path]: value.content }),
Object.assign(result, {
[value.path]: isSchemaPath(value.path)
? ensureSchemaStructure(value.content)
: value.content
}),
{}

@@ -204,2 +215,5 @@ )

const modifyCodeFile = (filePath, content) => {
if (isSchemaPath(filePath)) {
content = ensureSchemaStructure(content);
}
set_(editorState.codeFiles.current, filePath.split("/"), content);

@@ -230,10 +244,2 @@ };

const modifyCollectionSchema = (collectionName, newContent) => {
set_(
editorState.codeFiles.current,
[".schemas", `${collectionName}.json`],
newContent
);
};
const registerDocumentChange = cb => {

@@ -280,3 +286,2 @@ editorState.documentChangesLocally.push(cb);

deletePageCodeFile,
modifyCollectionSchema,
registerDocumentChange,

@@ -283,0 +288,0 @@ registerCodeChange,

@@ -141,3 +141,3 @@ const merge_ = require("lodash/merge");

path: `.schemas/${collectionName}.json`,
content: schema
content: JSON.stringify(schema)
});

@@ -144,0 +144,0 @@

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