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

@magnetarjs/core

Package Overview
Dependencies
Maintainers
2
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magnetarjs/core - npm Package Compare versions

Comparing version 0.10.1 to 0.11.0

24

dist/index.js

@@ -250,2 +250,11 @@ "use strict";

}
function getExistsFromDataStore(globalConfig, collectionPath, docId) {
const localStoreName = globalConfig.localStoreName;
throwIfNolocalStoreName(localStoreName);
const getModuleExists = globalConfig.stores[localStoreName].getModuleExists;
if (!getModuleExists) {
throw new Error("The data store did not provide a getModuleExists function!");
}
return getModuleExists({ collectionPath, docId });
}
function getCountFromDataStore(moduleConfig, globalConfig, collectionPath) {

@@ -362,3 +371,4 @@ const localStoreName = globalConfig.localStoreName;

let stopExecution = false;
const doOnFetchFns = modifyReadResponseMap.added;
const doOnAddedFns = modifyReadResponseMap.added;
const doOnFetchFns = [];
const doOnFetchCountFns = [];

@@ -406,2 +416,5 @@ const collectionFetchResult = /* @__PURE__ */ new Map();

}
if (actionName === "fetch" && docId) {
doOnFetchFns.forEach((fn) => fn(void 0, "error"));
}
throw resultFromPlugin;

@@ -435,3 +448,7 @@ }

for (const docMetaData of docs) {
const docResult = executeOnFns(doOnFetchFns, docMetaData.data, [docMetaData]);
const docResult = executeOnFns(
[...doOnAddedFns, ...doOnFetchFns],
docMetaData.data,
[docMetaData]
);
if (docResult)

@@ -788,3 +805,4 @@ collectionFetchResult.set(docMetaData.id, docResult);

return proxify(moduleInstance, {
data: () => getDataFromDataStore(moduleConfig, globalConfig, collectionPath, docId)
data: () => getDataFromDataStore(moduleConfig, globalConfig, collectionPath, docId),
exists: () => getExistsFromDataStore(globalConfig, collectionPath, docId)
});

@@ -791,0 +809,0 @@ }

8

package.json
{
"name": "@magnetarjs/core",
"version": "0.10.1",
"version": "0.11.0",
"sideEffects": false,

@@ -23,4 +23,4 @@ "description": "Magnetar core library.",

"dependencies": {
"@magnetarjs/types": "0.10.1",
"@magnetarjs/utils": "0.10.1",
"@magnetarjs/types": "0.11.0",
"@magnetarjs/utils": "0.11.0",
"getorset-anything": "^0.0.3",

@@ -31,3 +31,3 @@ "is-what": "^4.1.7",

"devDependencies": {
"@magnetarjs/test-utils": "0.10.1"
"@magnetarjs/test-utils": "0.11.0"
},

@@ -34,0 +34,0 @@ "keywords": [

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