superscriptjs / sfacts Goto Github PK
View Code? Open in Web Editor NEWScripted fact system for SuperScript
License: MIT License
Scripted fact system for SuperScript
License: MIT License
Currently, passing the clean
option to load
or create
drops the entire mongo database. This can cause disastrous effects.
Clean should only drop the facts collection in the database and not affect the rest of the database. Currently, that collection is called mongodown
.
Currently it executes db.dropDatabase()
when clean is specified.
Changing to db.mongodown.drop()
would drop only the collection.
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
If triggered unexpectedly, it could cause catastrophic data loss.
All the shiniest node, mongo, superscript.
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} )
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.
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.
This code is currently released under the ISC license. The related modules are released under MIT.
Please change the license to MIT to standardize.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.