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

@saulx/selva

Package Overview
Dependencies
Maintainers
1
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saulx/selva - npm Package Compare versions

Comparing version 15.1.2 to 16.0.0

2

dist/src/connection/scripts.js

@@ -7,3 +7,3 @@ "use strict";

/* <BEGIN_INSERT_SCRIPTS */
'update-schema': '04a867e2db0e4ea31c849b038157c97bc5a9388d',
'update-schema': 'c5f9ceaecbeb560268cb1f2b9159d37e4378db2a',
/* <END_INSERT_SCRIPTS */

@@ -10,0 +10,0 @@ // END OF THE AUTOGENERATED PORTION

@@ -12,8 +12,17 @@ "use strict";

if (!selvaClient.servers.replicas[server.name]) {
selvaClient.servers.replicas[server.name] = [];
selvaClient.servers.replicas[server.name] = [Object.assign(Object.assign({}, server), { index: 0 })];
}
selvaClient.servers.replicas[server.name].splice(server.index === -1 ? 0 : server.index || 0, 0, server);
else if (!selvaClient.servers.replicas[server.name].find((s) => s.host === server.host &&
s.port === server.port &&
s.type === server.type)) {
selvaClient.servers.replicas[server.name].splice(server.index === -1 ? 0 : server.index || 0, 0, server);
}
}
else if (type === 'subscriptionManager') {
selvaClient.servers.subsManagers.splice(server.index === -1 ? 0 : server.index || 0, 0, server);
// TODO: should we be checking the server.ids instead?
if (!selvaClient.servers.subsManagers.find((s) => s.host === server.host &&
s.port === server.port &&
s.type === server.type)) {
selvaClient.servers.subsManagers.splice(server.index === -1 ? 0 : server.index || 0, 0, server);
}
}

@@ -20,0 +29,0 @@ else if (type === 'subscriptionRegistry') {

@@ -477,2 +477,7 @@ "use strict";

const results = await findFields(client, op, lang, ctx, fieldOpts, passedSchema);
// **SubscriptionMarker mgmt**
// Track ambiguous/implicit reference fields found in the query response that might need markers.
// If `op` contains a `$find` then we are already tracking it elsewhere as we know there may
// be references in the response.
const ambiguousReferenceFields = op.props['$find'] ? null : new Map(); // nodeId = [originField, ...fieldName(s)]
const allMappings = new Set(Object.keys(fieldMapping));

@@ -514,2 +519,8 @@ const result = [];

const casted = (0, _1.typeCast)(nestedValue, nestedId, nestedField, schema, lang);
if (ambiguousReferenceFields && nestedId != id && !ambiguousReferenceFields.get(id)) {
const destFields = op.props[field];
if (destFields) {
ambiguousReferenceFields.set(id, [field, ...Object.keys(destFields)]);
}
}
if (targetField) {

@@ -570,2 +581,15 @@ // TODO This won't work?

}
if (ambiguousReferenceFields) {
for (const v of ambiguousReferenceFields) {
const [id, [originField, ...fields]] = v;
if (await (0, _1.addMarker)(client, ctx, {
type: 'edge_field',
refField: originField,
id,
fields,
})) {
ctx.hasFindMarkers = true;
}
}
}
if (op.single) {

@@ -572,0 +596,0 @@ return result[0];

@@ -71,4 +71,4 @@ /// <reference types="node" />

}, query: UpdateQuery): Promise<boolean | void>;
set(setOpts: SetOptions, schema?: Schema): Promise<Id | undefined>;
setWithMeta(setOpts: SetOptions): Promise<SetMetaResponse | undefined>;
set(setOpts: SetOptions, schema?: Schema): Promise<Id>;
setWithMeta(setOpts: SetOptions): Promise<SetMetaResponse>;
delete(deleteOpts: DeleteOptions): Promise<number | string[]>;

@@ -81,3 +81,3 @@ digest(payload: string): string;

[field: string]: any;
} | null): Promise<SchemaMutations>;
} | null | undefined): Promise<SchemaMutations>;
waitUntilEvent(event: string): Promise<void>;

@@ -84,0 +84,0 @@ subscribeSchema(name?: string): Observable;

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

},
name: {
type: 'string',
},
children: {

@@ -16,0 +13,0 @@ type: 'references',

@@ -23,5 +23,2 @@ "use strict";

},
name: {
type: 'string',
},
children: {

@@ -28,0 +25,0 @@ type: 'references',

@@ -78,3 +78,3 @@ export declare type Id = string;

export declare type DeleteField = {
$delete: true;
$delete: boolean;
};

@@ -86,3 +86,3 @@ export declare type InputFields = Record<string, FieldInputSchema>;

fields?: InputFields;
$delete?: true;
$delete?: boolean;
meta?: any;

@@ -89,0 +89,0 @@ };

@@ -100,3 +100,3 @@ "use strict";

};
const toCArr = async (client, field, fields, schema, result, setObj, noRoot, lang) => {
const toCArr = async (client, field, fields, schema, result, setObj, lang) => {
if (!setObj) {

@@ -177,6 +177,4 @@ return '';

exports.default = async (client, schema, field, payload, result, fields, type, $lang) => {
let noRoot = field === 'parents';
const r = {};
const isEmpty = (v) => !v || !v.length;
// TODO: fix noRoot
if (typeof payload === 'object' &&

@@ -238,5 +236,2 @@ !Array.isArray(payload) &&

hasKeys = true;
if (field === 'parents') {
noRoot = payload[k];
}
}

@@ -255,5 +250,5 @@ else if (k === '$_itemCount') {

delete_all: r.delete_all || (!r.$add && !r.$delete && isEmpty(r.$value)),
$add: await toCArr(client, field, fields, schema, result, r.$add, noRoot, $lang),
$delete: await toCArr(client, field, fields, schema, result, r.$delete, noRoot, $lang),
$value: await toCArr(client, field, fields, schema, result, r.$value, noRoot, $lang),
$add: await toCArr(client, field, fields, schema, result, r.$add, $lang),
$delete: await toCArr(client, field, fields, schema, result, r.$delete, $lang),
$value: await toCArr(client, field, fields, schema, result, r.$value, $lang),
}));

@@ -274,3 +269,3 @@ }

}
const $value = await toCArr(client, field, fields, schema, result, r, noRoot, $lang);
const $value = await toCArr(client, field, fields, schema, result, r, $lang);
result.push('5', field, (0, data_record_1.createRecord)(modifyDataRecords_1.setRecordDefCstring, {

@@ -277,0 +272,0 @@ op_set_type: modifyDataRecords_1.OPT_SET_TYPE.reference,

@@ -78,3 +78,4 @@ "use strict";

// && (<any>payload.parents).$noRoot
if (payload.parents) {
const isNonEmpty = (v) => !!(v && v.length);
if (payload.parents && (payload.parents['$noRoot'] || Array.isArray(payload.parents) || payload.parents.$value || isNonEmpty(payload.parents['$add']))) {
result[0] += 'N';

@@ -81,0 +82,0 @@ }

{
"name": "@saulx/selva",
"version": "15.1.2",
"version": "16.0.0",
"main": "dist/src/index.js",

@@ -53,3 +53,3 @@ "scripts": {

"@types/pg": "^8.6.1",
"@saulx/selva-server": "15.1.2",
"@saulx/selva-server": "16.0.0",
"before-exit": "1.0.0",

@@ -56,0 +56,0 @@ "async-exec": "^1.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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