Comparing version 0.20.3 to 0.21.0
@@ -5,3 +5,3 @@ var gulp = require('gulp'), | ||
gulp.task( 'eslint', function (callback) { | ||
return gulp.src( ['./lib/**/*.js', './generator/**/*.js', './*.js' ] ) | ||
return gulp.src( ['./lib/**/*.js', './*.js' ] ) | ||
.pipe( plugins.eslint() ) | ||
@@ -8,0 +8,0 @@ .pipe( plugins.eslint.format() ) |
{ | ||
"name": "floca", | ||
"version": "0.20.3", | ||
"version": "0.21.0", | ||
"description": "Enterprise-grade microservice solution for NodeJS", | ||
@@ -34,4 +34,2 @@ "keywords": [ | ||
"connect-rest": "^2.5.1", | ||
"esformatter": "^0.9.1", | ||
"fs-extra": "^0.26.5", | ||
"harcon": "^3.1.1", | ||
@@ -58,9 +56,5 @@ "harcon-radiation": "^3.1.3", | ||
}, | ||
"preferGlobal": true, | ||
"engines": { | ||
"node": ">= 4.0.0" | ||
}, | ||
"bin": { | ||
"floca": "CLI.js" | ||
} | ||
} |
108
README.md
@@ -46,3 +46,3 @@ # FLOCA | ||
$ npm install -g floca | ||
$ npm install floca | ||
@@ -52,17 +52,2 @@ | ||
#### Using the CLI tool: | ||
$ floca create demoApp | ||
$ cd demoApp | ||
$ npm install | ||
$ npm start | ||
The CLI tool will create a new folder 'demoApp', and will create all required subfolders and files in it. | ||
By executing those npm commands, your microservice is ready-to-serve! | ||
The initial project will contain: | ||
- a microservice | ||
- a Starter code | ||
- a preliminary package.json | ||
- a sample config for the microservices | ||
#### Creating own project: | ||
@@ -405,92 +390,2 @@ | ||
## CLI | ||
[floca](https://github.com/UpwardsMotion/floca) is delivered with an embedded CLI tool to aid project creation and management. | ||
Install floca with _-g_ switch: | ||
$ npm install -g floca | ||
This will give you the _floca_ command line statement | ||
#### Create Project | ||
To create a new project execute the following: | ||
$ floca create project <projectName> [--amqp] [--nsq] [--web] [--gulp] [--force] | ||
This will create a folder _projectName_ inside the execution folder and creates a minimal viable [floca](https://github.com/UpwardsMotion/floca) project using the transport provider you might pass. | ||
The project can be used right away: | ||
$ npm install | ||
$ npm start | ||
You can tell _floca_ to generate code for a web server if your project aims to serve pages. | ||
Gulp is also an project creational option if you need Gulp build scripts for your project. | ||
Extend the bus folder with entities and have a happy coding! | ||
#### Create Entity | ||
From the your floca working folder, you can create an Entity by CLI: | ||
$ floca create entity <entityName> [--rest] [--websocket] | ||
This will create a business entity JS file inside your _'bus'_ folder optionally with REST and/or Websocket ports opened. | ||
#### Create Service | ||
You can add service functions to your entities as shown below: | ||
$ floca create service <entityName> <serviceName> | ||
The JS file identified by the _"serviceName"_ will be opened and a JS flocal function will be added to with the name _"serviceName"_. | ||
You can address other entities from there in respect your business flow. | ||
#### Generate Test Mocha code | ||
If your project possesses the service entities you might want to use, the CLI tool can generate [Mocha](https://mochajs.org) tests for them: | ||
$ floca generate test --mocha | ||
This will execute a [floca](https://github.com/UpwardsMotion/floca) instance and all entities providing REST or Websocket interface will be associated with a test case. | ||
All code will be put to the file: _test/mochaTest_ | ||
Execute this statement to call mocha on tests: | ||
$ mocha test/mochaTest | ||
Tests are generated with _always accept_ behavior waiting for being unfold. | ||
## License | ||
(The MIT License) | ||
Copyright (c) 2016 Upwards Motion Ltd (1st Floor, 2 Woodberry Grove, Finchley, London N12 0DR; Company Registration No: 09074890) | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
## Bugs | ||
@@ -503,2 +398,3 @@ | ||
- 0.20.0: Big steps toward 1.0 | ||
- 0.9.0: Tons of fixes and improvements | ||
@@ -505,0 +401,0 @@ - 0.5.0: JWT integration added. |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
17
5
3
77510
20
814
400
- Removedesformatter@^0.9.1
- Removedfs-extra@^0.26.5
- Removedacorn-to-esprima@2.0.8(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-traverse@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedconcat-stream@1.6.2(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddebug@0.7.4(transitive)
- Removeddiff@1.4.0(transitive)
- Removeddisparity@2.0.0(transitive)
- Removedesformatter@0.9.6(transitive)
- Removedesformatter-parser@1.0.0(transitive)
- Removedesprima@2.7.3(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfs-extra@0.26.7(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@5.0.157.2.3(transitive)
- Removedglobals@9.18.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjs-tokens@3.0.2(transitive)
- Removedjsonfile@2.4.0(transitive)
- Removedklaw@1.3.1(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmout@0.11.11.2.4(transitive)
- Removednpm-path@1.1.0(transitive)
- Removednpm-run@2.0.0(transitive)
- Removednpm-which@2.0.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-shim@0.1.3(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedprotochain@1.0.5(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedrocambole@0.7.0(transitive)
- Removedrocambole-indent@2.0.4(transitive)
- Removedrocambole-linebreak@1.0.2(transitive)
- Removedrocambole-node@1.0.0(transitive)
- Removedrocambole-token@1.2.1(transitive)
- Removedrocambole-whitespace@1.0.0(transitive)
- Removedsemver@4.3.6(transitive)
- Removedserializerr@1.0.3(transitive)
- Removedspawn-sync@1.0.15(transitive)
- Removedstdin@0.0.1(transitive)
- Removedstrip-json-comments@0.1.3(transitive)
- Removedsupports-color@1.3.1(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedsync-exec@0.5.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removeduser-home@2.0.0(transitive)
- Removedwhich@1.3.1(transitive)