Comparing version 0.0.8 to 0.0.9
@@ -1,2 +0,13 @@ | ||
import Posterior from 'posterior'; | ||
export declare const Genesis: Posterior.Requester; | ||
import * as Posterior from 'posterior'; | ||
export declare type GenesisConfig = Posterior.InputConfig & { | ||
rest: boolean; | ||
}; | ||
export declare class GenesisClient { | ||
Base: Posterior.Requester; | ||
Service: Posterior.Requester; | ||
cfg: GenesisConfig; | ||
constructor(config?: { | ||
[key: string]: any; | ||
}); | ||
private configure(key, value, override?); | ||
} |
@@ -1,30 +0,50 @@ | ||
import Posterior from 'posterior'; | ||
import store from 'store2'; | ||
import * as xml2js from 'xml2js'; | ||
const defaultConfig = { | ||
soap: true, | ||
baseURL: 'http://eshademo.cloudapp.net', | ||
}; | ||
const config = store.get('demo.config', defaultConfig); | ||
export const Genesis = Posterior({ | ||
url: config.baseURL, | ||
method: config.soap ? 'POST' : 'GET', | ||
json: !config.soap, | ||
headers: config.soap | ||
? { | ||
'Content-Type': 'text/xml', | ||
import * as Posterior from 'posterior'; | ||
import * as store from 'store2'; | ||
import WSDL from './WSDL'; | ||
export class GenesisClient { | ||
constructor(config) { | ||
this.cfg = store.get('Genesis.config', {}); | ||
if (config) { | ||
for (const key in config) { | ||
this.cfg[key] = config[key]; | ||
} | ||
} | ||
: {}, | ||
Children: { | ||
Query: { | ||
url: '/query', | ||
}, | ||
Edit: {}, | ||
}, | ||
}); | ||
this.configure('url', 'http://eshademo.cloudapp.net', false); | ||
this.configure('method', this.cfg.rest ? 'GET' : 'POST', false); | ||
this.configure('json', this.cfg.rest, false); | ||
this.configure('headers', this.cfg.rest | ||
? {} | ||
: { | ||
'Content-Type': 'text/xml', | ||
}, false); | ||
this.Base = Posterior(this.cfg); | ||
this.Service = this.Base.extend({ | ||
method: { root: true, value: 'GET' }, | ||
auto: true, | ||
singleton: true, | ||
then: function (xml) { | ||
const wsdl = new WSDL(xml); | ||
window[this._fn.cfg.name.toLowerCase()] = wsdl; | ||
return wsdl; | ||
}, | ||
Children: { | ||
Query: { | ||
url: 'query.wsdl', | ||
}, | ||
Edit: { | ||
url: 'edit.wsdl', | ||
}, | ||
}, | ||
}, 'Service'); | ||
} | ||
configure(key, value, override = true) { | ||
if (override === true || !(key in this.cfg)) { | ||
this.cfg[key] = value; | ||
} | ||
} | ||
} | ||
if (window && document.body.hasAttribute('debug')) { | ||
window.Genesis = Genesis; | ||
window.GenesisClient = GenesisClient; | ||
window.store = store; | ||
window.xml2js = xml2js; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXNpcy1iYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2dlbmVzaXMtYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLFNBQVMsTUFBTSxXQUFXLENBQUM7QUFDbEMsT0FBTyxLQUFLLE1BQU0sUUFBUSxDQUFDO0FBQzNCLE9BQU8sS0FBSyxNQUFNLE1BQU0sUUFBUSxDQUFDO0FBRWpDLE1BQU0sYUFBYSxHQUFHO0lBQ3BCLElBQUksRUFBRSxJQUFJO0lBQ1YsT0FBTyxFQUFFLDhCQUE4QjtDQUN4QyxDQUFDO0FBQ0YsTUFBTSxNQUFNLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsYUFBYSxDQUFDLENBQUM7QUFDdkQsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLFNBQVMsQ0FBQztJQUMvQixHQUFHLEVBQUUsTUFBTSxDQUFDLE9BQU87SUFDbkIsTUFBTSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSztJQUNwQyxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUMsSUFBSTtJQUNsQixPQUFPLEVBQUUsTUFBTSxDQUFDLElBQUk7UUFDbEIsQ0FBQyxDQUFDO1lBQ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FBYyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQyxHQUFHLElBQUksQ0FBQztnQkFDeEQsTUFBTSxDQUFDLElBQUksQ0FBQztZQUNkLENBQUM7WUFDRCxRQUFRLEVBQUU7Z0JBQ1IsS0FBSyxFQUFFO29CQUNMLEdBQUcsRUFBRSxZQUFZO2lCQUNsQjtnQkFDRCxJQUFJLEVBQUU7b0JBQ0osR0FBRyxFQUFFLFdBQVc7aUJBQ2pCO2FBQ0Y7U0FDRixFQUNELFNBQVMsQ0FDVixDQUFDO0lBQ0osQ0FBQztJQUVPLFNBQVMsQ0FBQyxHQUFXLEVBQUUsS0FBVSxFQUFFLFdBQW9CLElBQUk7UUFDakUsRUFBRSxDQUFDLENBQUMsUUFBUSxLQUFLLElBQUksSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDM0MsSUFBSSxDQUFDLEdBQVcsQ0FBQyxHQUFHLENBQUMsR0FBRyxLQUFLLENBQUM7UUFDakMsQ0FBQztJQUNILENBQUM7Q0FDRjtBQUdELEVBQUUsQ0FBQyxDQUFDLE1BQU0sSUFBSSxRQUFRLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakQsTUFBYyxDQUFDLGFBQWEsR0FBRyxhQUFhLENBQUM7SUFDN0MsTUFBYyxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7QUFDaEMsQ0FBQyJ9 |
@@ -0,1 +1,5 @@ | ||
import * as SOAP from './SOAP'; | ||
import * as WSDL from './WSDL'; | ||
import * as XML from './XML'; | ||
export * from './genesis-base'; | ||
export { XML, SOAP, WSDL }; |
@@ -0,2 +1,6 @@ | ||
import * as SOAP from './SOAP'; | ||
import * as WSDL from './WSDL'; | ||
import * as XML from './XML'; | ||
export * from './genesis-base'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQyJ9 | ||
export { XML, SOAP, WSDL }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxRQUFRLENBQUM7QUFDL0IsT0FBTyxLQUFLLElBQUksTUFBTSxRQUFRLENBQUM7QUFDL0IsT0FBTyxLQUFLLEdBQUcsTUFBTSxPQUFPLENBQUM7QUFFN0IsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixPQUFPLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQyJ9 |
{ | ||
"name": "gersemi", | ||
"title": "TypeScript Client for Genesis API", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "gersemi", | ||
@@ -42,17 +42,18 @@ "license": "MIT", | ||
"dependencies": { | ||
"posterior": "^0.21.1", | ||
"store2": "^2.5.9", | ||
"xml2js": "^0.4.19" | ||
"case": "^1.5.4", | ||
"moment": "^2.20.1", | ||
"posterior": "^0.21.5", | ||
"store2": "^2.5.11" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^20.0.5", | ||
"@types/jest": "^22.0.1", | ||
"@types/node": "^8.0.0", | ||
"@types/xml2js": "^0.4.0", | ||
"bump-cli": "^1.1.3", | ||
"coveralls": "^2.0.0", | ||
"jest": "^20.0.4", | ||
"jest": "^22.0.1", | ||
"jest-environment-jsdom": "^22.0.1", | ||
"jest-environment-node-debug": "^2.0.0", | ||
"prettier": "^1.5.2", | ||
"rimraf": "^2.0.0", | ||
"ts-jest": "^20.0.7", | ||
"ts-jest": "^22.0.1", | ||
"ts-node": "^3.2.0", | ||
@@ -63,5 +64,2 @@ "tslint": "^5.0.0", | ||
}, | ||
"peerDependencies": { | ||
"typescript": "^2.6.2" | ||
}, | ||
"engines": { | ||
@@ -79,4 +77,4 @@ "node": ">=6.0.0" | ||
], | ||
"testEnvironment": "node" | ||
"testEnvironment": "jsdom" | ||
} | ||
} |
@@ -36,4 +36,4 @@ [![Build Status](https://travis-ci.org/esha/gersemi.svg?branch=master)](https://travis-ci.org/esha/gersemi.svg?branch=master) | ||
### Release History | ||
* 2017-10 [v0.0.5][] (development) | ||
* 2018-01 [v0.0.9][] (development) | ||
[v0.0.5]: https://github.com/esha/posterior/tree/0.0.5 | ||
[v0.0.9]: https://github.com/esha/posterior/tree/0.0.9 |
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
28709
13
373
1
+ Addedcase@^1.5.4
+ Addedmoment@^2.20.1
+ Addedcase@1.6.3(transitive)
+ Addedmoment@2.30.1(transitive)
- Removedxml2js@^0.4.19
- Removedsax@1.4.1(transitive)
- Removedtypescript@2.9.2(transitive)
- Removedxml2js@0.4.23(transitive)
- Removedxmlbuilder@11.0.1(transitive)
Updatedposterior@^0.21.5
Updatedstore2@^2.5.11