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

@stackbit/sdk

Package Overview
Dependencies
Maintainers
16
Versions
424
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackbit/sdk - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

24

dist/config/config-loader.js

@@ -288,8 +288,10 @@ "use strict";

var _a;
// do not define filePath for singleton pages
if (model.file) {
return;
let filePath;
if (model.filePath) {
filePath = model.filePath;
}
let filePath = model === null || model === void 0 ? void 0 : model.filePath;
if (!filePath) {
else if (model.file) {
filePath = model.file;
}
else {
const urlPath = model.urlPath;

@@ -311,8 +313,10 @@ if (urlPath === '/') {

var _a;
// do not define filePath for singleton files
if (model.file) {
return;
let filePath;
if (model.filePath) {
filePath = model.filePath;
}
let filePath = model === null || model === void 0 ? void 0 : model.filePath;
if (!filePath) {
else if (model.file) {
filePath = model.file;
}
else {
const folder = lodash_1.default.trim(lodash_1.default.get(model, 'folder'), '/');

@@ -319,0 +323,0 @@ filePath = lodash_1.default.trim(`${folder}/{slug}.json`, '/');

{
"name": "@stackbit/sdk",
"version": "0.2.10",
"version": "0.2.11",
"description": "Stackbit SDK",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -355,8 +355,8 @@ import path from 'path';

function updatePageFilePath(model: PageModel, config: Config) {
// do not define filePath for singleton pages
if (model.file) {
return;
}
let filePath = model?.filePath;
if (!filePath) {
let filePath;
if (model.filePath) {
filePath = model.filePath;
} else if (model.file) {
filePath = model.file;
} else {
const urlPath = model.urlPath;

@@ -376,8 +376,8 @@ if (urlPath === '/') {

function updateDataFilePath(model: DataModel, config: Config) {
// do not define filePath for singleton files
if (model.file) {
return;
}
let filePath = model?.filePath;
if (!filePath) {
let filePath;
if (model.filePath) {
filePath = model.filePath;
} else if (model.file) {
filePath = model.file;
} else {
const folder = _.trim(_.get(model, 'folder'), '/');

@@ -384,0 +384,0 @@ filePath = _.trim(`${folder}/{slug}.json`, '/');

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