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.2 to 2.8.0

scratch/text.txt

11

CHANGELOG.md

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

## [v2.8.0](https://github.com/anvilco/node-anvil/compare/v2.7.2...v2.8.0)
### Merged
- Allow passing ratelimit options to the client [`#41`](https://github.com/anvilco/node-anvil/pull/41)
### Commits
- Add options to readme [`8eae1cb`](https://github.com/anvilco/node-anvil/commit/8eae1cb468158cf40f75567454bbdc17cf457b55)
- comment update [`b338322`](https://github.com/anvilco/node-anvil/commit/b3383222af2e0d53456e56d310bfe09b84a9bfec)
## [v2.7.2](https://github.com/anvilco/node-anvil/compare/v2.7.1...v2.7.2)

@@ -12,0 +23,0 @@

2

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

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

@@ -242,3 +242,5 @@ # Anvil API Client for Node

{
apiKey: <your_api_key> // Required. Your API key from your Anvil organization settings
apiKey: <your_api_key>, // Required. Your API key from your Anvil organization settings
requestLimit: 40, // Set to 2 when using the development API key
requestLimitMS: 1000,
}

@@ -245,0 +247,0 @@ ```

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

const textFile = path.resolve(__dirname, 'text.txt')
const mimeTxt = 'text/plain'

@@ -63,39 +64,39 @@

// },
{
msg: 'Sneaky files of type xml are not allowed.',
filePath: sneakyXmlFile,
formDataAppendOptions: {
// filename: 'excellent.xml',
contentType: mimeJpg,
},
},
{
msg: 'Sneaky files of type xml without extension are not allowed.',
filePath: sneakyXmlFile,
formDataAppendOptions: {
filename: 'svg-without-extension',
contentType: mimeJpg,
},
},
{
msg: 'Declared SVGs are not allowed',
filePath: svgFile,
},
{
msg: 'Sneaky SVGs are not allowed',
filePath: sneakySvgFile,
formDataAppendOptions: {
filename: 'whatami',
// contentType: mimeJpg,
},
},
{
msg: 'Secret SVGs are not allowed',
filePath: secretlySvgFile,
// formDataAppendOptions: {
// // filename: 'whatami',
// // contentType: mimeJpg,
// },
},
// {
// msg: 'Sneaky files of type xml are not allowed.',
// filePath: sneakyXmlFile,
// formDataAppendOptions: {
// // filename: 'excellent.xml',
// contentType: mimeJpg,
// },
// },
// {
// msg: 'Sneaky files of type xml without extension are not allowed.',
// filePath: sneakyXmlFile,
// formDataAppendOptions: {
// filename: 'svg-without-extension',
// contentType: mimeJpg,
// },
// },
// {
// msg: 'Declared SVGs are not allowed',
// filePath: svgFile,
// },
// {
// msg: 'Sneaky SVGs are not allowed',
// filePath: sneakySvgFile,
// formDataAppendOptions: {
// filename: 'whatami',
// // contentType: mimeJpg,
// },
// },
// {
// msg: 'Secret SVGs are not allowed',
// filePath: secretlySvgFile,
// // formDataAppendOptions: {
// // // filename: 'whatami',
// // // contentType: mimeJpg,
// // },
// },
// {
// msg: 'File extension is determined to be JPG.',

@@ -107,2 +108,11 @@ // filePath: jpgFile,

// },
{
msg: 'Undetectable file type...should pass, but get uploaded to Google with octet',
// filePath: textFile,
filePath: sneakySvgFile,
formDataAppendOptions: {
contentType: mimeTxt,
// contentType: 'foo/bar',
},
},
]

@@ -109,0 +119,0 @@

@@ -46,2 +46,7 @@ const fs = require('fs')

userAgent: `${description}/${version}`,
// Production apiKey rate limits: 40 per second
// Development apiKey rate limits: 2 per second
requestLimit: 40,
requestLimitMS: 1000,
}

@@ -73,5 +78,4 @@

// Production apiKey rate limits: 200 in 5 seconds
this.requestLimit = 200
this.requestLimitMS = 5000
this.requestLimit = this.options.requestLimit
this.requestLimitMS = this.options.requestLimitMS
this.limiter = new RateLimiter(this.requestLimit, this.requestLimitMS, true)

@@ -78,0 +82,0 @@ }

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

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

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