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

@anvilco/anvil

Package Overview
Dependencies
Maintainers
6
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anvilco/anvil - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

scratch/logo-mark.svg

6

CHANGELOG.md

@@ -10,2 +10,8 @@ # Changelog

## [v2.7.2](https://github.com/anvilco/node-anvil/compare/v2.7.1...v2.7.2)
### Merged
- allow null values for forge update mutation [`#37`](https://github.com/anvilco/node-anvil/pull/37)
## [v2.7.1](https://github.com/anvilco/node-anvil/compare/v2.6.1...v2.7.1)

@@ -12,0 +18,0 @@

2

package.json
{
"name": "@anvilco/anvil",
"version": "2.7.1",
"version": "2.7.2",
"description": "Anvil API Client",

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

@@ -16,12 +16,20 @@ const { client } = require('./base')

const xml1 = 'application/xml'
const xml2 = 'text/xml'
const xmlFile = './scratch/note.xml'
const mimeTxt = 'text/plain'
const jpg = 'image/jpg'
const jpgFile = './scratch/excellent.png'
const mimeXml1 = 'application/xml'
const mimeXml2 = 'text/xml'
const pdfFile = './scratch/anvil-finovate-non-qualified.pdf'
const pdf = 'application/pdf'
const xmlFile = path.resolve(__dirname, 'note.xml')
const sneakyXmlFile = path.resolve(__dirname, 'xml-not.txt')
const svgFile = path.resolve(__dirname, 'logo-mark.svg')
const sneakySvgFile = path.resolve(__dirname, 'svg-not.jpg')
const secretlySvgFile = path.resolve(__dirname, 'svgsecretly')
const mimeJpg = 'image/jpg'
const jpgFile = path.resolve(__dirname, 'excellent.png')
const pdfFile = path.resolve(__dirname, 'anvil-finovate-non-qualified.pdf')
const mimePdf = 'application/pdf'
let formDataAppendOptions = {

@@ -33,31 +41,67 @@ contentType: 'image/jpg',

const examples = [
// {
// msg: 'Should not error',
// filePath: pdfFile,
// },
// {
// msg: 'Uh oh, it looks like something is wrong with this file. Please ensure the file extension has not been changed.',
// filePath: pdfFile,
// formDataAppendOptions: {
// contentType: mimeJpg,
// },
// },
// {
// msg: 'Filenames with .xml extensions are not allowed',
// filePath: jpgFile,
// formDataAppendOptions: {
// filename: 'excellent.xml',
// },
// },
// {
// msg: 'Files of type xml are not allowed.',
// filePath: xmlFile,
// },
{
msg: 'Should not error',
filePath: pdfFile,
},
{
msg: 'Uh oh, it looks like something is wrong with this file. Please ensure the file extension has not been changed.',
filePath: pdfFile,
msg: 'Sneaky files of type xml are not allowed.',
filePath: sneakyXmlFile,
formDataAppendOptions: {
contentType: jpg,
// filename: 'excellent.xml',
contentType: mimeJpg,
},
},
{
msg: 'Filenames with .xml extensions are not allowed',
filePath: jpgFile,
msg: 'Sneaky files of type xml without extension are not allowed.',
filePath: sneakyXmlFile,
formDataAppendOptions: {
filename: 'excellent.xml',
filename: 'svg-without-extension',
contentType: mimeJpg,
},
},
{
msg: 'Uh oh, it looks like something is wrong with this file. Please ensure the file extension exists.',
filePath: jpgFile,
msg: 'Declared SVGs are not allowed',
filePath: svgFile,
},
{
msg: 'Sneaky SVGs are not allowed',
filePath: sneakySvgFile,
formDataAppendOptions: {
filename: 'excellent',
filename: 'whatami',
// contentType: mimeJpg,
},
},
{
msg: 'Files of type xml are not allowed.',
filePath: xmlFile,
msg: 'Secret SVGs are not allowed',
filePath: secretlySvgFile,
// formDataAppendOptions: {
// // filename: 'whatami',
// // contentType: mimeJpg,
// },
},
// {
// msg: 'File extension is determined to be JPG.',
// filePath: jpgFile,
// formDataAppendOptions: {
// filename: 'excellent',
// },
// },
]

@@ -64,0 +108,0 @@

@@ -11,3 +11,3 @@ const fs = require('fs')

function graphQLUploadSchemaIsValid (schema, parent, key) {
if (typeof schema === 'undefined') {
if (schema == null) { //schema is null or undefined
return true

@@ -14,0 +14,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