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

@stackbit/sdk

Package Overview
Dependencies
Maintainers
11
Versions
422
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.1.11 to 0.1.12

2

dist/config/config-schema.d.ts

@@ -11,2 +11,4 @@ import Joi from 'joi';

contentFile: string;
uploadAssets?: boolean;
assetsDirectory?: string;
spaceIdEnvVar?: string;

@@ -13,0 +15,0 @@ accessTokenEnvVar?: string;

4

dist/config/config-schema.js

@@ -80,5 +80,7 @@ "use strict";

contentFile: joi_1.default.string().required(),
uploadAssets: joi_1.default.boolean(),
assetsDirectory: joi_1.default.string(),
spaceIdEnvVar: joi_1.default.string(),
accessTokenEnvVar: joi_1.default.string()
});
}).and('uploadAssets', 'assetsDirectory');
const sanityImportSchema = joi_1.default.object({

@@ -85,0 +87,0 @@ type: joi_1.default.string().valid('sanity').required(),

@@ -11,6 +11,10 @@ "use strict";

const lodash_1 = __importDefault(require("lodash"));
const packageJson = require('../../package.json');
async function writeConfig({ dirPath, config }) {
const yamlConfig = convertToYamlConfig({ config });
const filePath = path_1.default.join(dirPath, 'stackbit.yaml');
await fs_extra_1.default.outputFile(filePath, js_yaml_1.default.dump(yamlConfig));
const yamlString = js_yaml_1.default.dump(yamlConfig);
const info = `# This file was generated by @stackbit/sdk v${packageJson.version}\n# To learn more about stackbit.yaml please visit https://www.stackbit.com/docs/stackbit-yaml/\n`;
const data = info + yamlString;
await fs_extra_1.default.outputFile(filePath, data);
}

@@ -17,0 +21,0 @@ exports.writeConfig = writeConfig;

{
"name": "@stackbit/sdk",
"version": "0.1.11",
"version": "0.1.12",
"description": "Stackbit SDK",

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

@@ -90,2 +90,4 @@ import Joi from 'joi';

contentFile: string;
uploadAssets?: boolean;
assetsDirectory?: string;
spaceIdEnvVar?: string;

@@ -98,5 +100,7 @@ accessTokenEnvVar?: string;

contentFile: Joi.string().required(),
uploadAssets: Joi.boolean(),
assetsDirectory: Joi.string(),
spaceIdEnvVar: Joi.string(),
accessTokenEnvVar: Joi.string()
});
}).and('uploadAssets', 'assetsDirectory');

@@ -103,0 +107,0 @@ export interface SanityImport {

@@ -8,2 +8,3 @@ import path from 'path';

import { YamlConfig, YamlModel, YamlModels } from './config-schema';
const packageJson = require('../../package.json');

@@ -18,3 +19,6 @@ export interface WriteConfigOptions {

const filePath = path.join(dirPath, 'stackbit.yaml');
await fse.outputFile(filePath, yaml.dump(yamlConfig));
const yamlString = yaml.dump(yamlConfig);
const info = `# This file was generated by @stackbit/sdk v${packageJson.version}\n# To learn more about stackbit.yaml please visit https://www.stackbit.com/docs/stackbit-yaml/\n`;
const data = info + yamlString;
await fse.outputFile(filePath, data);
}

@@ -21,0 +25,0 @@

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