firestorm-db
Advanced tools
Comparing version 1.10.0 to 1.10.1
{ | ||
"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(() => { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
45040
5
814
301
3
14
1
+ Addedfirestorm-db@^1.10.0
+ Addedtype-fest@^2.12.2
+ Addedtype-fest@2.19.0(transitive)
Updatedaxios@^0.21.4