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

@sanity/export

Package Overview
Dependencies
Maintainers
7
Versions
1044
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/export - npm Package Compare versions

Comparing version 0.133.0-realtime-block-editor.72c3aa98 to 0.133.0-realtime-block-editor.8efe50ed

.npmignore

13

lib/AssetHandler.js

@@ -5,2 +5,6 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -92,7 +96,10 @@

if (isAsset && action === ACTION_REWRITE) {
const assetId = item.asset._ref;
const asset = item.asset,
other = _objectWithoutProperties(item, ['asset']);
const assetId = asset._ref;
if (isModernAsset(assetId)) {
const assetType = getAssetType(item);
const filePath = `${assetType}s/${generateFilename(assetId)}`;
return { _sanityAsset: `${assetType}@file://./${filePath}` };
return _extends({ _sanityAsset: `${assetType}@file://./${filePath}` }, other);
}

@@ -103,3 +110,3 @@

const filePath = `${type}s/${generateFilename(assetId)}`;
return { _sanityAsset: `${type}@file://./${filePath}` };
return _extends({ _sanityAsset: `${type}@file://./${filePath}` }, other);
}

@@ -106,0 +113,0 @@

{
"name": "@sanity/export",
"version": "0.133.0-realtime-block-editor.72c3aa98",
"version": "0.133.0-realtime-block-editor.8efe50ed",
"description": "Export Sanity documents and assets",

@@ -35,3 +35,3 @@ "main": "lib/export.js",

"devDependencies": {
"@sanity/client": "0.133.0-realtime-block-editor.72c3aa98",
"@sanity/client": "0.133.0-realtime-block-editor.8efe50ed",
"decompress": "^4.2.0",

@@ -38,0 +38,0 @@ "jest": "^22.1.4",

@@ -144,7 +144,8 @@ const path = require('path')

if (isAsset && action === ACTION_REWRITE) {
const assetId = item.asset._ref
const {asset, ...other} = item
const assetId = asset._ref
if (isModernAsset(assetId)) {
const assetType = getAssetType(item)
const filePath = `${assetType}s/${generateFilename(assetId)}`
return {_sanityAsset: `${assetType}@file://./${filePath}`}
return {_sanityAsset: `${assetType}@file://./${filePath}`, ...other}
}

@@ -155,3 +156,3 @@

const filePath = `${type}s/${generateFilename(assetId)}`
return {_sanityAsset: `${type}@file://./${filePath}`}
return {_sanityAsset: `${type}@file://./${filePath}`, ...other}
}

@@ -158,0 +159,0 @@

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