{"_id":"@blinkmobile/evergreen-sdk","_rev":"7-4e97d9f096e9f7d025e321a3f8e3d3ff","name":"@blinkmobile/evergreen-sdk","description":"A Module to handle getting and using an evergreen update made with the Blink Buildbots","dist-tags":{"latest":"1.0.0-alpha.2"},"versions":{"1.0.0-alpha.1":{"name":"@blinkmobile/evergreen-sdk","description":"A Module to handle getting and using an evergreen update made with the Blink Buildbots","version":"1.0.0-alpha.1","author":{"name":"BlinkMobile","email":"developers@blinkmobile.com.au","url":"https://github.com/blinkmobile"},"bugs":{"url":"https://github.com/blinkmobile/evergreen-sdk/issues"},"contributors":[{"name":"Simon Dobie","email":"simondobie23@gmail.com","url":"https://github.com/simonmarklar"},{"name":"Matt Carroll","email":"mat.carroll139@gmail.com.au","url":"https://github.com/mymattcarroll"}],"dependencies":{"whatwg-fetch":"^2.0.3"},"devDependencies":{"babel-cli":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-es2015-modules-commonjs":"^6.26.0","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","babel-preset-flow":"^6.23.0","clean-webpack-plugin":"^0.1.16","eslint":"^4.5.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","fixpack":"^2.3.1","flow-bin":"^0.57.0","http-server":"^0.10.0","jest":"^21.0.0","webpack":"^3.5.5"},"engines":{"node":">=8","npm":">=5"},"files":["dist","src"],"homepage":"https://github.com/blinkmobile/evergreen-sdk#readme","jest":{"verbose":true,"collectCoverage":true,"coverageThreshold":{"global":{"lines":80}}},"jsnext:main":"src/evergreen-updater.js","keywords":["blinkmobile","cordova","evergreen","ionic","mobile"],"license":"ISC","main":"dist/bm-evergreen-updater-legacy.js","module":"src/evergreen-updater.js","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/blinkmobile/evergreen-sdk.git"},"scripts":{"build":"npm run test && webpack","eslint":"eslint --fix --cache .","fixpack":"fixpack","flow":"flow check","jest":"jest","posttest":"npm run fixpack","prepublish":"npm run build","pretest":"npm run eslint && npm run flow","test":"npm run jest"},"unpkg":"dist/bm-evergreen-updater-legacy.min.js","gitHead":"c655b01ce9935b9caa45b023c58203467205968c","_id":"@blinkmobile/evergreen-sdk@1.0.0-alpha.1","_npmVersion":"5.5.1","_nodeVersion":"6.11.0","_npmUser":{"name":"blinkmobile-admin","email":"ron@blinkmobile.com.au"},"dist":{"integrity":"sha512-l9OYw3v3o+cWifM0QbmgRPNLIBAE+VUEen+oAqwMrOBsV81+wIAsTgCOS8kPibNCnprbX/JSgRhpblGeqnYn9Q==","shasum":"acc8b18340675ff6d9081e5f88f2306ba2a1f77d","tarball":"https://registry.npmjs.org/@blinkmobile/evergreen-sdk/-/evergreen-sdk-1.0.0-alpha.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZneW3HHgzrFdkcks3eWOjUp1SKivmtxf7WyHi10P8uAIhAJrKYB6ZkOYt9rpfjf3aJCMXrZea6DtbUUDMVScE9y5H"}]},"maintainers":[{"name":"blinkmobile-admin","email":"ron@blinkmobile.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/evergreen-sdk-1.0.0-alpha.1.tgz_1508798066540_0.39653487293981016"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-alpha.2":{"name":"@blinkmobile/evergreen-sdk","description":"A Module to handle getting and using an evergreen update made with the Blink Buildbots","version":"1.0.0-alpha.2","author":{"name":"BlinkMobile","email":"developers@blinkmobile.com.au","url":"https://github.com/blinkmobile"},"bugs":{"url":"https://github.com/blinkmobile/evergreen-sdk/issues"},"contributors":[{"name":"Simon Dobie","email":"simondobie23@gmail.com","url":"https://github.com/simonmarklar"},{"name":"Matt Carroll","email":"mat.carroll139@gmail.com.au","url":"https://github.com/mymattcarroll"}],"dependencies":{"whatwg-fetch":"^2.0.3"},"devDependencies":{"babel-cli":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-es2015-modules-commonjs":"^6.26.0","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","babel-preset-flow":"^6.23.0","clean-webpack-plugin":"^0.1.16","eslint":"^4.5.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","fixpack":"^2.3.1","flow-bin":"^0.57.0","http-server":"^0.10.0","jest":"^21.0.0","webpack":"^3.5.5"},"engines":{"node":">=8","npm":">=5"},"files":["dist","src"],"homepage":"https://github.com/blinkmobile/evergreen-sdk#readme","jest":{"verbose":true,"collectCoverage":true,"coverageThreshold":{"global":{"lines":80}}},"jsnext:main":"src/evergreen-updater.js","keywords":["blinkmobile","cordova","evergreen","ionic","mobile"],"license":"ISC","main":"dist/bm-evergreen-updater-legacy.js","module":"src/evergreen-updater.js","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/blinkmobile/evergreen-sdk.git"},"scripts":{"build":"npm run test && webpack","eslint":"eslint --fix --cache .","fixpack":"fixpack","flow":"flow check","jest":"jest","posttest":"npm run fixpack","prepublish":"npm run build","pretest":"npm run eslint && npm run flow","test":"npm run jest"},"unpkg":"dist/bm-evergreen-updater-legacy.min.js","gitHead":"07c30a1f40328cc812f99c873b5be6ac08210089","_id":"@blinkmobile/evergreen-sdk@1.0.0-alpha.2","_npmVersion":"5.5.1","_nodeVersion":"6.11.0","_npmUser":{"name":"blinkmobile-admin","email":"ron@blinkmobile.com.au"},"dist":{"integrity":"sha512-Xwz8nrdwYWTr/n+/z+KFoBNAsvO5v7J/xQumDuWpxbZFifAJ8o3EMHmS63oxcILdmAUpjHOicumqqhxtQf1saw==","shasum":"b568c3f990e15da0d19177f757bce9b0de9f9d02","tarball":"https://registry.npmjs.org/@blinkmobile/evergreen-sdk/-/evergreen-sdk-1.0.0-alpha.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDatanG29ZfIAsH7YNi8ru7ZFWjaFif2ZwYzIWvns+FwgIgC1+7ofQOeBDzRHeCmzvtYKuwruqQCOPoRICM49cbeIg="}]},"maintainers":[{"email":"2017@mx.kynan.net.au","name":"k7n4n5t3w4rt"},{"email":"simondobie23@gmail.com","name":"simon_marklar"},{"email":"ron@blinkmobile.com.au","name":"blinkmobile-admin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/evergreen-sdk-1.0.0-alpha.2.tgz_1508800512113_0.44502984010614455"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# Evergreen updater [![npm](https://img.shields.io/npm/v/@blinkmobile/evergreen-sdk.svg?maxAge=2592000)](https://www.npmjs.com/package/@blinkmobile/evergreen-sdk) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/blinkmobile/evergreen-sdk?branch=master&svg=true)](https://ci.appveyor.com/project/blinkmobile/evergreen-sdk) [![Travis CI Status](https://travis-ci.org/blinkmobile/evergreen-sdk.svg?branch=master)](https://travis-ci.org/blinkmobile/evergreen-sdk) [![Greenkeeper badge](https://badges.greenkeeper.io/blinkmobile/evergreen-sdk.svg)](https://greenkeeper.io/)\n\nA Module to handle getting and using an evergreen update made with the [Blink Buildbots](https://github.com/blinkmobile/buildbot-cli)\n\n## Installation\n\n`npm i --save @blinkmobile/evergreen-sdk`\n\n## Prerequisites\n\n-   Apache Cordova\n-   [ionic-plugin-deploy](https://www.npmjs.com/package/ionic-plugin-deploy)\n\n## Usage\n\nFor iOS < 10 and older Android projects `dist/bm-evergreen-updater-legacy.js` should be used. This includes the [WhatWG fetch pollyfil](https://github.com/github/fetch) and is transpiled from ES6 to ES5. ES6 builds using `import` will include `src/evergreen-updater.js`\n\nYou must make sure the `deviceready` event from cordova has fired before using this plugin\n\n```javascript\nconst EvergreenUpdater = require('@blinkmobile/evergreen-sdk')\n\ndocument.addEventListener('deviceready', function () {\n  const eu = new EvergreenUpdater({ appId: 'appId', tenantId: 'blinkTenantId' })\n\n  eu.check().then((updateAvailable) => {\n    if (updateAvailable) {\n      return eu.download().then(() => eu.restart())\n    }\n  })\n})\n```\n\n## API\n\n### Constructor (options: object)\n\n-   `options.appId`: Your Cordova app id from `config.xml`\n-   `options.tenantId`: Your Blink Mobile Tenant Id\n-   `options.ionicDeploy`: The Ionic Deploy plugin (optional, will use window.IonicDeploy if not specified)\n-   `options.platformId`: The cordova platform id (optional, will use cordova.platformId if not specified)\n\n\n### check `() => Promise<boolean>`\n\nResolves with `true` if an update is available, `false` if not\n\n### download `(progressCB: function(stage: string, progress: number)) => Promise<void>`\n\n-   `progressCB`: called whenever Ionic Deploy reports progress. `stage` will be one of 'download' or 'extract', `progress` is the percent complete for that particular stage\n\nResolves on successful download, rejects if an error occurred\n\n### restart `() => void`\n\nApplies the update and restarts the app\n","maintainers":[{"email":"aaronroworth@gmail.com","name":"aaronroworth"},{"email":"ron@blinkmobile.com.au","name":"blinkmobile-admin"},{"email":"kizaonline@gmail.com","name":"kizaonline"},{"email":"matt.carroll139@gmail.com","name":"mymattcarroll"},{"email":"simondobie23@gmail.com","name":"simon_marklar"}],"time":{"modified":"2023-08-23T01:50:14.812Z","created":"2017-10-23T22:34:26.614Z","1.0.0-alpha.1":"2017-10-23T22:34:26.614Z","1.0.0-alpha.2":"2017-10-23T23:15:12.178Z"},"homepage":"https://github.com/blinkmobile/evergreen-sdk#readme","keywords":["blinkmobile","cordova","evergreen","ionic","mobile"],"repository":{"type":"git","url":"git+https://github.com/blinkmobile/evergreen-sdk.git"},"contributors":[{"name":"Simon Dobie","email":"simondobie23@gmail.com","url":"https://github.com/simonmarklar"},{"name":"Matt Carroll","email":"mat.carroll139@gmail.com.au","url":"https://github.com/mymattcarroll"}],"author":{"name":"BlinkMobile","email":"developers@blinkmobile.com.au","url":"https://github.com/blinkmobile"},"bugs":{"url":"https://github.com/blinkmobile/evergreen-sdk/issues"},"license":"ISC","readmeFilename":"README.md"}