npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ows-ionic-plugin-deploy

v0.6.8

Published

Ionic Deploy Plugin

Downloads

7

Readme

OWS custom

Because of the security reason, source code must be update to internal server. So this version is primarily custom the address of update server, so have to change function check version info.

Update info save in the version.json at path server_address/autoupdate/channel_tag/version.json. Structure of version.json exactly is the UpdateResponse of parseUpdate function.

The bunch of code to update is the zip file of www/* in ionic project. Upload to url of data of version.json response.

Finally, exit function added for use case where redirect method occur an error on ios with wkwebview.

Installation

cordova plugin add ows-ionic-plugin-deploy

Ionic Cloud Deploy Plugin (legacy)

This is the plugin for Ionic Cloud Deploy, which is now superseded by Ionic Pro Deploy.

We strongly recommend migrating to the new version of Deploy which has resolved a number of issues and is in active development. Migration is straightforward, please refer to the Cloud -> Pro Migration Guide for a walkthrough.

For documentation on Legacy Deploy, see the legacy docs for more detailed information.

Reporting issues with this plugin

Please file a ticket with support for any issues with this plugin: http://ionicframework.com/support

We will not see github issues filed here and will not be able to respond to them in any timely manner.


Legacy plugin instructions

Installation

See our docs for installation steps.

Cordova Plugin API

IonicDeploy

  • this Cordova plugin defines a new global IonicDeploy object

  • this object exposes the following methods

init (appId: String, serverUrl: String)

  • appId: String
  • serverUrl: String

Example:

IonicDeploy.init('org.cordova.helloworld', 'https://helloworld.org/deploy')

check (appId, channelTag, onSuccess, onError)

  • appId: String
  • channelTag: String
  • onSuccess: CheckHandler
  • onError: ErrorHandler

Contact the remote IonicDeploy service (as configured during IonicDeploy.init(...)) and passes the result along to IonicDeploy.init(...).

CheckHandler (result)
  • result: String

  • if result is the string "true", then a new update is available

ErrorHandler (error)

parseUpdate (appId, response, onSuccess, onError)

  • appId: String
  • response: UpdateResponse
  • onSuccess: CheckHandler
  • onError: ErrorHandler

Determine whether an update is available, by checking the provided response data. Store metadata from available updates for future calls to IonicDeploy.download(...).

This function is useful for testing, and also for using a custom remote update service. For all other use cases, you should just use IonicDeploy.check(...).

UpdateResponse
interface UpdateResponse {
  data: {
    available: Boolean,
    compatible: Boolean,
    snapshot: String, // (unique per update, e.g. UUID)
    url: String // (URL to download)
  }
}

download (appId, onSuccess, onError)

  • appId: String
  • onSuccess: DownloadHandler
  • onError: ErrorHandler

Using the metadata from a recent IonicDeploy.check(...) (or IonicDeploy.parseUpdate(...)), download and store an available update ZIP file.

DownloadHandler (result)
  • result: String or Number

If result is a numeric value, it communicates progress. If result is the string "true", it communicates completion.

extract (appId, onSuccess, onError)

  • appId: String
  • onSuccess: ExtractHandler
  • onError: ErrorHandler

Unpack and apply the update ZIP file from a recent IonicDeploy.download(...). After the app is terminated / destroyed by the operating system, the update will take effect.

The contents of the ZIP file should be the contents of the platform-specific "www" directory from a Cordova project. This directory is regenerated during cordova build.

ExtractHandler (result)
  • result: String or Number

If result is a numeric value, it communicates progress. If result is the string "done", it communicates completion.

redirect (appId)

  • appId: String

Navigate the webview to the version provided by a recent IonicDeploy.extract(...). This is useful for use cases where it is undesirable to wait for the operating system to terminate / destroy the app.

Any unsaved user data / state will be lost, so design your UX and/or data persistence approach accordingly.

exit (appId) (IOS only)

  • appId: String

Absolutely exit the app. When install both ionic plugin deploy and wkwebview into app, after dowloaded and extracted, app can't redirect to newest version due to an webview error. Luckily, cold restart app will active the newest version.