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

firestorm-db

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firestorm-db - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

src/index.js

28

package.json
{
"name": "firestorm-db",
"version": "1.10.0",
"version": "1.10.1",
"description": "Self hosted Firestore-like database with API endpoints based on micro bulk operations",

@@ -8,8 +8,10 @@ "main": "index.js",

"php_start": "node tests/php_setup.js",
"test": "./node_modules/.bin/mocha -b tests/**/*.spec.js",
"test": "./node_modules/.bin/mocha tests/**/*.spec.js",
"php_stop": "sh tests/php_server_kill.sh",
"full": "npm run php_start && npm run test ; npm run php_stop",
"full": "npm run php_stop ; npm run php_start && npm run test ; npm run php_stop",
"local_tests": "sudo act -P ubuntu-latest=shivammathur/node:latest",
"jsdoc": "jsdoc -a all -c jsdoc.json -R README.md index.js -d docs/jsdoc",
"nodemon_jsdoc": "nodemon -x npm run jsdoc --watch index.js --watch jsdoc.json"
"jsdoc": "jsdoc -a all -c jsdoc.json -R README.md src/index.js -d docs/jsdoc",
"nodemon_jsdoc": "nodemon -x npm run jsdoc --watch src/index.js --watch jsdoc.json",
"types": "npx tsc",
"cov": "npm run php_stop ; npm run php_start && nyc --reporter=text mocha tests/**/*.spec.js; npm run php_stop"
},

@@ -35,12 +37,15 @@ "repository": {

"files": [
"index.js"
"src/index.js",
"typings/index.d.ts"
],
"dependencies": {
"axios": "^0.21.1"
"axios": "^0.21.4",
"firestorm-db": "^1.10.0",
"type-fest": "^2.12.2"
},
"devDependencies": {
"chai": "^4.3.4",
"form-data": "^4.0.0",
"crypto": "^1.0.1",
"docdash": "^1.2.0",
"form-data": "^4.0.0",
"fs": "0.0.1-security",

@@ -52,5 +57,8 @@ "fs-extra": "^10.0.0",

"mocha": "^9.1.3",
"nyc": "^15.1.0",
"path": "^0.12.7",
"recursive-copy": "^2.0.11"
}
"recursive-copy": "^2.0.11",
"typescript": "^4.5.5"
},
"types": "typings/index.d.ts"
}

@@ -203,2 +203,10 @@ <div align="center">

### File rights
The PHP scripts creates folders and files. So if the php user doesn't have the rights to write, the script will fail.
You can give rights to a folder with the following command:
```
sudo chown -R www-data "/path/to/uploads/"
```
### Upload a file

@@ -208,3 +216,3 @@

File content can be a [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) or an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
File content can be a [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob), a [Buffer](https://nodejs.org/api/buffer.html) or an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).

@@ -220,4 +228,4 @@ You have an overwrite option in order to avoid big mistakes or allow user with unique file names.

form.append('path', '/quote.txt')
form.append('file', 'but your kids are gonna love it.', 'quote.txt')
form.append('overwrite', false) // override optional argument (defaults to false)
form.append('file', 'but your kids are gonna love it.', 'quote.txt') // make sure to set a temporary name to the file
form.append('overwrite', 'true') // override optional argument (do not append to set to false)
const uploadPromise = firestorm.files.upload(form)

@@ -260,3 +268,3 @@

const deletePromise = firestorm.files.delete('/quote.txt")
const deletePromise = firestorm.files.delete('/quote.txt')

@@ -263,0 +271,0 @@ deletePromise.then(() => {

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