Giter Club home page Giter Club logo

ionicpro-deploy's Introduction

Ionic Pro Deploy Build Status Maintainability Test Coverage

Access the Ionic Pro Deploy API using Promises and/or Observable based methods.

Usage

Installation

  1. Ensure you have the Ionic Pro Plugin installed see their Setup Docs

  2. Install this module by running the following command: npm i --save ionicpro-deploy

  3. Import IonicProDeployModule in the @NgModule where it is to be used.

import { IonicProDeployModule } from 'ionicpro-deploy';

@NgModule({
  ...
  imports: [
    ...
    IonicProDeployModule.forRoot()
  ]
})

Optionally, an IonicProConfig object can be passed to use a different app configuration than that provided during installation of the plugin.

imports: [
  ...
  IonicProDeployModule.forRoot({
    channel: 'Development'
  })
]
  1. Inject IonicProDeployService as a dependency in the constructor of the object in which it will be used.
  @Component({
    ...
  })
  export class MyAwesomePage {

    constructor(private proDeploy: IonicProDeployService) {
      ...
    }
  } 

Usage

The following methods are available for use from the injected provider.

init(config)

Initialize the deploy plugin

Parameters

config: IonicProConfig

  • App configuration

check()

Check for updates from specified channel

Returns: Promise<(boolean|string)>

  • Resolves with boolean:
    • true
      • if updates are available and compatible with the current binary version
    • false
      • if updates are available but incompatible with the current binary version
      • or currently unable to check for updates
  • Rejects with error message string
    • if update information is not available

download()

Download an available and compatible update

Returns: Observable<number>

  • Emits the download percentage
  • completes when download complete

update()

Complete a full update cycle (download, extract) with or without redirect

Parameters

autoReload: boolean

  • TRUE: Redirect when complete (default)
  • FALSE: Complete with no redirect

Returns: Observable<UpdateProgress>

  • Emits the download then extract percentage and the step being completed
interface UpdateProgress {
  /** Name of the step being completed */
  step: string;
  /** Percent progress for the current step */
  percent: number;
}

extract()

Extract a downloaded archive

Returns: Observable<number>

  • Emits the extract percentage
  • completes when download complete

redirect()

Redirect to the latest version of the app on this device


info()

Retrieve information about the current installed build


getVersions()

List downloaded versions on this device


deleteVersion(version)

Delete a downloaded version on this device

Parameters

version: string

  • UUID of the deploy version downloaded to device

ionicpro-deploy's People

Contributors

jwelmac avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.