@anvilco/anvil
Advanced tools
Comparing version 2.7.1 to 2.7.2
@@ -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 @@ |
{ | ||
"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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
530986
30
1182
10034