GithubHelp home page GithubHelp logo

sfacts's People

Contributors

bensalilijames avatar laurian avatar silentrob avatar wehriam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfacts's Issues

Clean option drops entire mongo database

Currently, passing the clean option to load or create drops the entire mongo database. This can cause disastrous effects.

Expected Behavior

Clean should only drop the facts collection in the database and not affect the rest of the database. Currently, that collection is called mongodown.

Current Behavior

Currently it executes db.dropDatabase() when clean is specified.

Possible Solution

Changing to db.mongodown.drop() would drop only the collection.

Steps to Reproduce (for bugs)

Can test by creating a superscript bot, triggering an action that would create a fact, then triggering a load or create action with clean=true

Context

If triggered unexpectedly, it could cause catastrophic data loss.

Your Environment

All the shiniest node, mongo, superscript.

if use on Windows

Expected Behavior

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} )

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
  • Server type and version:
  • Operating System and version:
  • Link to your project:

Update leveldown dependency

The leveldown dependency is at ^0.10.2, meaning it will install 0.10.5. This causes node-gyp to blow up in Node 4.1.2. The latest leveldown is 1.4.2.

This is also causing the same problem in Superscript, too, unfortunately.

...
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                             ^
In file included from ../src/batch.cc:1:
In file included from /Users/me/.node-gyp/4.1.2/include/node/node.h:42:
/Users/me/.node-gyp/4.1.2/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/me/.node-gyp/4.1.2/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
    return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                             ^
9 errors generated.

...
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/nvm/0.25.4/versions/node/v4.1.2/bin/node" "/usr/local/opt/nvm/versions/node/v4.1.2/bin/npm" "i" "sfacts" "--save"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls leveldown
npm ERR! There is likely additional logging output above.

Allow option of mongodown - hosting leveldb in existing ss mongodb

Because production environments often don't persist local files, it would be helpful to be able to pass the mongourl of the existing superscript mongo instance as the leveldb host.

I encountered this problem hosting on heroku and have heard reports of it being an issue with AWS as well.

Release under MIT license

This code is currently released under the ISC license. The related modules are released under MIT.

Please change the license to MIT to standardize.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.