fh-wfm-sync
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,80 +0,20 @@ | ||
FEEDHENRY END USER LICENSE AGREEMENT | ||
The MIT License (MIT) | ||
Copyright (c) 2016 Red Hat | ||
PLEASE READ THIS END USER LICENSE AGREEMENT CAREFULLY BEFORE USING | ||
THIS SOFTWARE. BY USING THIS SOFTWARE, YOU SIGNIFY YOUR ASSENT TO AND | ||
ACCEPTANCE OF THIS END USER LICENSE AGREEMENT AND ACKNOWLEDGE YOU HAVE | ||
READ AND UNDERSTAND THE TERMS. AN INDIVIDUAL ACTING ON BEHALF OF AN | ||
ENTITY REPRESENTS THAT HE OR SHE HAS THE AUTHORITY TO ENTER INTO THIS | ||
END USER LICENSE AGREEMENT ON BEHALF OF THAT ENTITY. IF YOU DO NOT | ||
ACCEPT THE TERMS OF THIS AGREEMENT, THEN YOU MUST NOT USE THE | ||
SOFTWARE. | ||
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: | ||
This end user license agreement ("EULA") governs the use of the | ||
software contained in those private repositories, located at | ||
http://github.com/feedhenry-staff, that contain a copy of this EULA, | ||
and any related updates, upgrades, versions, appearance, structure and | ||
organization (the "Software"), regardless of the delivery mechanism. | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
1. Relationship to NDA. You may use the Software only if You have also | ||
signed a Mutual Non-Disclosure Agreement with Red Hat, Inc. or one of | ||
its affiliates, as set forth at https://www.redhat.com/wapps/tnc/nda | ||
("NDA"). In the event of any conflict between the terms and conditions | ||
of this EULA and the NDA, the NDA shall take precedence. However, the | ||
NDA shall not be construed to expand the license terms governing the | ||
Software beyond what is stated in this EULA. | ||
2. License Grant. Subject to the terms of this EULA, Red Hat, | ||
Inc. and its affiliates ("Red Hat") grant to you ("You") a | ||
non-transferable, non-exclusive, worldwide, non-sublicensable, | ||
limited, revocable license to use the Software. You acquire only the | ||
right to use the Software and do not acquire any rights of | ||
ownership. Red Hat reserves all rights to the Software not expressly | ||
granted to You. This license grant does not limit Your rights under | ||
the license terms of any software that is subject to an open source | ||
license. If, at a later date, any portion of the Software is publicly | ||
released by Red Hat under an open source license, then this EULA shall | ||
automatically terminate as to such portion and the portion shall | ||
instead be licensed to You under such open source license. | ||
3. Intellectual Property Rights. The Software and each of its | ||
components are owned by Red Hat and other licensors and are protected | ||
under copyright law and other laws as applicable. Title to the | ||
Software and any component, or to any copy, modification, or merged | ||
portion shall remain with Red Hat and other licensors, subject to the | ||
applicable license. This EULA does not authorize You to: (a) copy, | ||
distribute, reproduce, use or allow third party access to the Software | ||
except as expressly authorized hereunder; (b) create a derivative work | ||
of any part of the Software; or (c) remove any trademarks, trade names | ||
or titles, copyright notices or any other proprietary marking on the | ||
Software. | ||
4. Use Limitation. All use of the Software shall be limited to review | ||
and testing purposes and not for production use. | ||
5. No Warranty. Except as specifically stated in this Section | ||
5, TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, THE SOFTWARE | ||
AND THE COMPONENTS ARE LICENSED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF | ||
MERCHANTABILITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE. | ||
6. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED UNDER | ||
APPLICABLE LAW, UNDER NO CIRCUMSTANCES WILL RED HAT OR ITS AFFILIATES | ||
BE LIABLE TO YOU FOR ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES, | ||
INCLUDING LOST PROFITS OR LOST SAVINGS ARISING OUT OF THE USE OR | ||
INABILITY TO USE THE SOFTWARE, EVEN IF RED HAT OR ITS AFFILIATES HAVE | ||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
6. General. If any provision of this EULA is held to be | ||
unenforceable, the enforceability of the remaining provisions shall | ||
not be affected. Any claim, controversy or dispute arising under or | ||
relating to this EULA shall be governed by the laws of the State of | ||
New York and of the United States, without regard to any conflict of | ||
laws provisions. The rights and obligations of the parties to this | ||
EULA shall not be governed by the United Nations Convention on the | ||
International Sale of Goods. | ||
Copyright 2016 Red Hat, Inc. "Red Hat" and "FeedHenry" are | ||
registered trademarks of Red Hat, Inc. | ||
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. |
{ | ||
"name": "fh-wfm-sync", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "An sync module for WFM", | ||
@@ -20,3 +20,3 @@ "main": "lib/angular/sync-ng.js", | ||
"author": "Sebastien Blanc, Brian Leathem", | ||
"license": "SEE LICENSE IN LICENSE.txt", | ||
"license": "MIT", | ||
"dependencies": { | ||
@@ -37,3 +37,3 @@ "lodash": "4.7.0", | ||
"fh-mbaas-api": "5.5.6", | ||
"fh-wfm-mediator": "0.0.12", | ||
"fh-wfm-mediator": "0.0.13", | ||
"mochify": "2.17.0", | ||
@@ -40,0 +40,0 @@ "nodemon": "1.9.1", |
# FeedHenry WFM sync | ||
A sync module for FeedHenry WFM. | ||
A sync module for FeedHenry WFM providing : | ||
- A Server-side sync module | ||
- A Front-end (Angular Service) sync module | ||
## Client-side usage | ||
## Running tests | ||
### Client-side usage (via broswerify) | ||
Startup a cloud server to run the tests against: | ||
#### Setup | ||
This module is packaged in a CommonJS format, exporting the name of the Angular namespace. The module can be included in an angular.js as follows: | ||
```javascript | ||
> npm run test-server | ||
angular.module('app', [ | ||
, require('fh-wfm-sync') | ||
... | ||
]) | ||
``` | ||
#### Integration | ||
In another termianl, run the tests: | ||
##### Angular service | ||
The sync service must first be initialized using the `syncService.init()`. Generally, the syncService will be injected into another Angular service (or in a config block) : | ||
```javascript | ||
> npm run test-phantom | ||
.factory('workorderSync', function($q, $timeout, syncService) { | ||
syncService.init($fh, config.syncOptions); | ||
}); | ||
``` | ||
Once initialized the syncService can manage a `dataset` : | ||
```javascript | ||
syncService.manage(config.datasetId, null, queryParams); | ||
``` | ||
Alternatively, run a watch to trigger test execution on file change: | ||
Checkout a full example [here](https://github.com/feedhenry-staff/wfm-workorder/blob/master/lib/angular/sync-service.js) | ||
## Usage in an express backend | ||
### Setup | ||
The server-side component of this WFM module exports a function that takes express and mediator instances as parameters, as in: | ||
```javascript | ||
> npm run test-watch | ||
var _ = require('lodash') | ||
, sync = require('fh-wfm-sync/lib/server') | ||
, config = require('./config') | ||
module.exports = function(mediator, app, mbaasApi) { | ||
sync.init(mediator, mbaasApi, config.datasetId, config.syncOptions); | ||
}; | ||
``` | ||
#### Sync config options | ||
Check a complete example [here](https://github.com/feedhenry-staff/wfm-workorder/blob/master/lib/config.js) | ||
```javascript | ||
{ | ||
datasetId : 'workorders', | ||
syncOptions : { | ||
"sync_frequency" : 5, | ||
"storage_strategy": "dom", | ||
"do_console_log": false | ||
} | ||
} | ||
``` |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict' | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict' | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict' | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
'use strict'; | ||
@@ -7,0 +2,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* CONFIDENTIAL | ||
* Copyright 2016 Red Hat, Inc. and/or its affiliates. | ||
* This is unpublished proprietary source code of Red Hat. | ||
**/ | ||
module.exports = [ | ||
@@ -7,0 +2,0 @@ { id: 1276001, user: 'john', workflowId: '0', type: 'Job Order', title: 'Footpath in disrepair', status: 'In Progress', startTimestamp: '2015-10-22T07:00:00Z', address: '118 N Peoria @N Chicago, IL 60607', summary: 'Please remove damaged kerb and SUPPLY AND FIX 1X DROP KERB CENTRE BN 125 X 150 cart away from site outside number 3.'}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
0
0
100
78
793111
23037