fms-admin-client
A client designed to provide a framework for interactions with FileMaker Server Admin Tools.
For in depth documentation head to the docs
Installation
npm install --save fms-admin-client
> fms-admin-client@0.0.2 test /Users/luidelaparra/Documents/Development/fms-admin-client
> nyc _mocha --recursive ./tests --timeout=30000 && npm run coverage
Clone Capabilities
1) should clone a file to a temp directory
list Capabilities
2) should pause a database
3) should resume a database
4) should close a database
5) should open a database
list Capabilities
6) should return an array from a list file request
7) should return an array from a list schedule request
8) should return an array from a list client request
9) should reject if it can not list the request
Service Capabilities
10) should throw an error if the service is already running
11) should stop the service
12) should throw an error if the service is not running
13) should start the service
Storage Capabilities
14) should allow an instance to be created
15) should allow an instance to be saved.
16) should allow an instance to be recalled
✓ should allow insances to be listed
17) should allow you to remove an instance
1 passing (60ms)
17 failing
1) Clone Capabilities
should clone a file to a temp directory:
TypeError: admin.clone is not a function
at Context.it (tests/clone.test.js:44:25)
at Context.done (tests/clone.test.js:40:5)
2) list Capabilities
should pause a database:
TypeError: Cannot read property 'pause' of undefined
at Context.it (tests/database.test.js:44:29)
at Context.done (tests/database.test.js:40:5)
3) list Capabilities
should resume a database:
TypeError: Cannot read property 'resume' of undefined
at Context.it (tests/database.test.js:47:29)
at Context.done (tests/database.test.js:40:5)
4) list Capabilities
should close a database:
TypeError: Cannot read property 'close' of undefined
at Context.it (tests/database.test.js:50:29)
at Context.done (tests/database.test.js:40:5)
5) list Capabilities
should open a database:
TypeError: Cannot read property 'open' of undefined
at Context.it (tests/database.test.js:53:29)
at Context.done (tests/database.test.js:40:5)
6) list Capabilities
should return an array from a list file request:
TypeError: admin.list is not a function
at Context.it (tests/list.test.js:44:25)
at Context.done (tests/list.test.js:40:5)
7) list Capabilities
should return an array from a list schedule request:
TypeError: admin.list is not a function
at Context.it (tests/list.test.js:47:25)
at Context.done (tests/list.test.js:40:5)
8) list Capabilities
should return an array from a list client request:
TypeError: admin.list is not a function
at Context.it (tests/list.test.js:50:25)
at Context.done (tests/list.test.js:40:5)
9) list Capabilities
should reject if it can not list the request:
TypeError: admin.list is not a function
at Context.it (tests/list.test.js:54:13)
at Context.done (tests/list.test.js:40:5)
10) Service Capabilities
should throw an error if the service is already running:
TypeError: Cannot read property 'start' of undefined
at Context.it (tests/service.test.js:44:29)
at Context.done (tests/service.test.js:40:5)
11) Service Capabilities
should stop the service:
TypeError: Cannot read property 'stop' of undefined
at Context.it (tests/service.test.js:50:29)
at Context.done (tests/service.test.js:40:5)
12) Service Capabilities
should throw an error if the service is not running:
TypeError: Cannot read property 'stop' of undefined
at Context.it (tests/service.test.js:58:10)
at Context.done (tests/service.test.js:40:5)
13) Service Capabilities
should start the service:
TypeError: Cannot read property 'start' of undefined
at Context.it (tests/service.test.js:67:29)
at Context.done (tests/service.test.js:40:5)
14) Storage Capabilities
should allow an instance to be created:
AssertionError: expected { Object (_schema, _id, ...) } to have keys '_schema', 'cli', and '_id'
+ expected - actual
[
"_id"
"_schema"
- "api"
"cli"
- "migration"
- "password"
- "user"
]
at getBasePromise.then.then.newArgs (node_modules/chai-as-promised/lib/chai-as-promised.js:302:22)
at <anonymous>
15) Storage Capabilities
should allow an instance to be saved.:
ValidationError: Key admins.cli is required, but got undefined
at /Users/luidelaparra/Documents/Development/fms-admin-client/node_modules/marpat/lib/base-document.js:195:15
at Array.forEach (<anonymous>)
at Admin.validate (node_modules/marpat/lib/base-document.js:139:26)
at Promise.all.then (node_modules/marpat/lib/document.js:38:14)
at <anonymous>
16) Storage Capabilities
should allow an instance to be recalled:
AssertionError: expected null to be an object
17) Storage Capabilities
should allow you to remove an instance:
AssertionError: expected 0 to equal 1
+ expected - actual
-0
+1
at getBasePromise.then.then.newArgs (node_modules/chai-as-promised/lib/chai-as-promised.js:302:22)
at <anonymous>
-----------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-----------------------|----------|----------|----------|----------|-------------------|
All files | 30.68 | 0 | 7.89 | 32.53 | |
fms-admin-client | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
fms-admin-client/src | 29.07 | 0 | 7.89 | 30.86 | |
admin.model.js | 81.82 | 100 | 66.67 | 81.82 | 43,47 |
cli.model.js | 14.29 | 0 | 0 | 15 |... 36,137,142,151 |
credentials.model.js | 50 | 100 | 0 | 50 | 11,12 |
index.js | 100 | 100 | 100 | 100 | |
migration.model.js | 22.22 | 0 | 11.11 | 25 |... 59,60,64,65,69 |
-----------------------|----------|----------|----------|----------|-------------------|
npm ERR! code ELIFECYCLE
npm ERR! errno 17
npm ERR! fms-admin-client@0.0.2 test: `nyc _mocha --recursive ./tests --timeout=30000 && npm run coverage`
npm ERR! Exit status 17
npm ERR!
npm ERR! Failed at the fms-admin-client@0.0.2 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/luidelaparra/.npm/_logs/2018-10-30T05_49_18_327Z-debug.log
Dependencies
- fs-extra: fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
- child-process-promise: Simple wrapper around the "child_process" module that makes use of promises
- lodash: Lodash modular utilities.
- marpat: A class-based ES6 ODM for Mongo-like databases.
- string-to-stream: Convert a string into a stream (streams2)
Dev Dependencies
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- chai-as-promised: Extends Chai with assertions about promises.
- colors: get colors in your node.js console
- coveralls: takes json-cov output into stdin and POSTs to coveralls.io
- dotenv: Loads environment variables from .env file
- eslint: An AST-based pattern checker for JavaScript.
- eslint-config-google: ESLint shareable config for the Google style
- eslint-config-prettier: Turns off all rules that are unnecessary or might conflict with Prettier.
- eslint-plugin-prettier: Runs prettier as an eslint rule
- jsdoc: An API documentation generator for JavaScript.
- minami: Clean and minimal JSDoc 3 Template / Theme
- mocha: simple, flexible, fun test framework
- mocha-lcov-reporter: LCOV reporter for Mocha
- mos: A pluggable module that injects content into your markdown files via hidden JavaScript snippets
- mos-plugin-dependencies: A mos plugin that creates dependencies sections
- mos-plugin-execute: Mos plugin to inline a process output
- mos-plugin-installation: A mos plugin for creating installation section
- mos-plugin-license: A mos plugin for generating a license section
- mos-plugin-snippet: A mos plugin for embedding snippets from files
- nyc: the Istanbul command line interface
- prettier: Prettier is an opinionated code formatter
- varium: A strict parser and validator of environment config variables
License
MIT © Lui de la Parra