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

@sanity/client

Package Overview
Dependencies
Maintainers
55
Versions
992
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/client - npm Package Compare versions

Comparing version 6.21.3-canary.0 to 6.21.3

2

dist/_chunks-es/resolveEditInfo.js

@@ -171,3 +171,3 @@ const rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reKeySegment = /_key\s*==\s*['"](.*)['"]/, reIndexTuple = /^\d*:\d*$/;

function resolveMapping(resultPath, csm) {
if (!(csm != null && csm.mappings))
if (!csm?.mappings)
return;

@@ -174,0 +174,0 @@ const resultMappingPath = jsonPath(jsonPathToMappingPath(resultPath));

@@ -88,3 +88,3 @@ import { C } from "./stegaClean.js";

function resolveMapping(resultPath, csm) {
if (!(csm != null && csm.mappings))
if (!csm?.mappings)
return;

@@ -248,10 +248,9 @@ const resultMappingPath = jsonPath(jsonPathToMappingPath(resultPath));

function stegaEncodeSourceMap(result, resultSourceMap, config) {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
const { filter, logger, enabled } = config;
if (!enabled) {
const msg = "config.enabled must be true, don't call this function otherwise";
throw (_a = logger == null ? void 0 : logger.error) == null || _a.call(logger, `[@sanity/client]: ${msg}`, { result, resultSourceMap, config }), new TypeError(msg);
throw logger?.error?.(`[@sanity/client]: ${msg}`, { result, resultSourceMap, config }), new TypeError(msg);
}
if (!resultSourceMap)
return (_b = logger == null ? void 0 : logger.error) == null || _b.call(logger, "[@sanity/client]: Missing Content Source Map from response body", {
return logger?.error?.("[@sanity/client]: Missing Content Source Map from response body", {
result,

@@ -263,3 +262,3 @@ resultSourceMap,

const msg = "config.studioUrl must be defined";
throw (_c = logger == null ? void 0 : logger.error) == null || _c.call(logger, `[@sanity/client]: ${msg}`, { result, resultSourceMap, config }), new TypeError(msg);
throw logger?.error?.(`[@sanity/client]: ${msg}`, { result, resultSourceMap, config }), new TypeError(msg);
}

@@ -311,12 +310,11 @@ const report = {

const isSkipping = report.skipped.length, isEncoding = report.encoded.length;
if ((isSkipping || isEncoding) && ((_d = (logger == null ? void 0 : logger.groupCollapsed) || logger.log) == null || _d("[@sanity/client]: Encoding source map into result"), (_e = logger.log) == null || _e.call(
logger,
if ((isSkipping || isEncoding) && ((logger?.groupCollapsed || logger.log)?.("[@sanity/client]: Encoding source map into result"), logger.log?.(
`[@sanity/client]: Paths encoded: ${report.encoded.length}, skipped: ${report.skipped.length}`
)), report.encoded.length > 0 && ((_f = logger == null ? void 0 : logger.log) == null || _f.call(logger, "[@sanity/client]: Table of encoded paths"), (_g = (logger == null ? void 0 : logger.table) || logger.log) == null || _g(report.encoded)), report.skipped.length > 0) {
)), report.encoded.length > 0 && (logger?.log?.("[@sanity/client]: Table of encoded paths"), (logger?.table || logger.log)?.(report.encoded)), report.skipped.length > 0) {
const skipped = /* @__PURE__ */ new Set();
for (const { path } of report.skipped)
skipped.add(path.replace(reKeySegment, "0").replace(/\[\d+\]/g, "[]"));
(_h = logger == null ? void 0 : logger.log) == null || _h.call(logger, "[@sanity/client]: List of skipped paths", [...skipped.values()]);
logger?.log?.("[@sanity/client]: List of skipped paths", [...skipped.values()]);
}
(isSkipping || isEncoding) && ((_i = logger == null ? void 0 : logger.groupEnd) == null || _i.call(logger));
(isSkipping || isEncoding) && logger?.groupEnd?.();
}

@@ -323,0 +321,0 @@ return resultWithStega;

{
"name": "@sanity/client",
"version": "6.21.3-canary.0",
"version": "6.21.3",
"description": "Client for retrieving, creating and patching data from Sanity.io",

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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