molly-db 1.0.22 → 1.0.23

Sign up to get free protection for your applications and to get access to all the features.
package/main.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const worker = require('worker_threads');
2
- const fetch = require('axios');
3
2
  const url = require('url');
4
3
  const fs = require('fs');
5
4
 
package/module/_init_.js CHANGED
@@ -5,7 +5,7 @@ function fillDB( _db, _table, _path ){
5
5
  let _itr = undefined;
6
6
 
7
7
  if( (/^http/).test(_path) ){ try{
8
- const stream = await fetch.get(_path,{responseType:'stream'});
8
+ const stream = await fetch(_path,{responseType:'stream'});
9
9
  _itr = readline.createInterface({
10
10
  input: stream.data
11
11
  })
@@ -33,7 +33,7 @@ function fillDB( _db, _table, _path ){
33
33
  const path = `${query.path}/_init_.json`;
34
34
 
35
35
  if( (/^http/).test(query.path) ){
36
- const stream = await fetch.get(path);
36
+ const stream = await fetch(path);
37
37
  db._init_ = stream.data;
38
38
  } else{
39
39
  db._buff_ = fs.readFileSync( path );
@@ -2,8 +2,8 @@ const worker = require('worker_threads');
2
2
  const readline = require('readline');
3
3
  const crypto = require('./_crypto_');
4
4
  const { Buffer } = require('buffer');
5
+ const fetch = require('molly-fetch');
5
6
  const cluster = require('cluster');
6
- const fetch = require('axios');
7
7
  const http = require('http');
8
8
  const url = require('url');
9
9
  const fs = require('fs');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "MIT",
3
3
  "main": "main.js",
4
- "version": "1.0.22",
4
+ "version": "1.0.23",
5
5
  "name": "molly-db",
6
6
  "author": "bececrazy",
7
7
  "scripts": {
@@ -9,9 +9,9 @@
9
9
  },
10
10
  "repository": "https://github.com/EDBC-REPO-NPM/Molly-db",
11
11
  "dependencies": {
12
- "axios": "^0.27.2",
13
12
  "crypto-js": "^4.1.1",
14
- "fs": "^0.0.1-security"
13
+ "fs": "^0.0.1-security",
14
+ "molly-fetch": "^1.0.12"
15
15
  },
16
16
  "description": "Molly-db is a free and open source library for nodejs that allow you create a lightweight encrypted database using Json files",
17
17
  "keywords": [