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

@platformatic/client

Package Overview
Dependencies
Maintainers
6
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/client - npm Package Compare versions

Comparing version 1.20.0 to 1.20.1

42

index.js

@@ -140,6 +140,2 @@ 'use strict'

function whereOrClauseIsComplexObject (orClause) {
return (Array.isArray(orClause) && typeof orClause[0] !== 'string')
}
async function buildCallFunction (spec, baseUrl, path, method, methodMeta, throwOnError, openTelemetry, fullRequest, fullResponse, validateResponse, queryParser) {

@@ -183,20 +179,3 @@ await $RefParser.dereference(spec)

if (isArrayQueryParam(param)) {
if (param.name === 'where.or' && whereOrClauseIsComplexObject(args.query[param.name])) {
// parse the object from
// [
// { id: { eq: 1 },
// { title: { eq: 'Matrix' },
// ]
// to ['id.eq=1|title.eq=Matrix']
const stringArray = []
for (const c of args.query[param.name]) {
const field = Object.keys(c)[0]
const [op, value] = Object.entries(c[field])[0]
stringArray.push(`${field}.${op}=${value}`)
}
query.append(param.name, `(${stringArray.join('|')})`)
} else {
args.query[param.name].forEach((p) => query.append(param.name, p))
}
args.query[param.name].forEach((p) => query.append(param.name, p))
} else {

@@ -221,20 +200,3 @@ query.append(param.name, args.query[param.name])

if (isArrayQueryParam(param)) {
if (param.name === 'where.or' && whereOrClauseIsComplexObject(body['where.or'])) {
// parse the object from
// [
// { id: { eq: 1 },
// { title: { eq: 'Matrix' },
// ]
// to ['id.eq=1|title.eq=Matrix']
const stringArray = []
for (const c of body[param.name]) {
const field = Object.keys(c)[0]
const [op, value] = Object.entries(c[field])[0]
stringArray.push(`${field}.${op}=${value}`)
}
query.append(param.name, `(${stringArray.join('|')})`)
} else {
body[param.name].forEach((p) => query.append(param.name, p))
}
body[param.name].forEach((p) => query.append(param.name, p))
} else {

@@ -241,0 +203,0 @@ query.append(param.name, body[param.name])

4

package.json
{
"name": "@platformatic/client",
"version": "1.20.0",
"version": "1.20.1",
"description": "A client for all platformatic backends",

@@ -28,3 +28,3 @@ "main": "index.js",

"typescript": "^5.3.3",
"@platformatic/telemetry": "1.20.0"
"@platformatic/telemetry": "1.20.1"
},

@@ -31,0 +31,0 @@ "dependencies": {

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