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

@dangreaves/groq-query-builder

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dangreaves/groq-query-builder - npm Package Compare versions

Comparing version 0.13.0 to 0.13.1

4

dist/index.d.ts

@@ -38,3 +38,3 @@ import { Logger } from 'pino';

type SanityParams = Record<string, string | number | null> | undefined;
declare function makeSafeSanityFetch(fn: (query: string, params?: SanityParams) => Promise<any>, { logger, validationMode, }?: {
declare function makeSafeSanityFetch(fn: (query: string, params?: SanityParams) => Promise<any>, { validationMode, logger, }?: {
logger?: Logger;

@@ -54,3 +54,3 @@ validationMode?: "ERROR" | "WARN";

*/
type TCollection<T extends TSchema = TSchema> = TArray<T extends TObject ? TIntersect<[T, TObject<{
type TCollection<T extends TSchema = TSchema> = TArray<T extends TObject | TUnion ? TIntersect<[T, TObject<{
_key: TNullable<TString>;

@@ -57,0 +57,0 @@ }>]> : T> & {

@@ -23,4 +23,4 @@ var __defProp = Object.defineProperty;

function makeSafeSanityFetch(fn, {
logger = pino(),
validationMode = "ERROR"
validationMode = "ERROR",
logger = pino({ level: "info" })
} = {}) {

@@ -109,4 +109,8 @@ return async function fetchSanity(schema, params) {

}
if (TypeGuard.IsObject(this.__inner_schema__)) {
groq.push(`{_key,...@${this.__inner_schema__.serialize?.() ?? ""}}`);
const innerGroq = this.__inner_schema__.serialize?.();
if (innerGroq) {
if (TypeGuard.IsObject(this.__inner_schema__) || TypeGuard.IsUnion(this.__inner_schema__)) {
groq.push(`{_key,...@${innerGroq}}`);
} else
groq.push(innerGroq);
}

@@ -113,0 +117,0 @@ return groq.join("");

{
"name": "@dangreaves/groq-query-builder",
"version": "0.13.0",
"version": "0.13.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": {

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