diff --git a/.gitignore b/.gitignore
index 9487a6da..a2efaec1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@ demo-angular/hooks
demo-angular/platforms
src/node_modules
src/hooks
+*.tgz
+package-lock.json
\ No newline at end of file
diff --git a/README.md b/README.md
index bd877d91..7581856c 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ You can also specify how many days after the update release you want to display
You need to add appversion plugins for this one to work:
```zsh
-tns plugin add nativescript-appversion
+tns plugin add @nativescript/appversion
```
## Installation
diff --git a/src/assign.helper.js b/src/assign.helper.js
deleted file mode 100644
index 95265b40..00000000
--- a/src/assign.helper.js
+++ /dev/null
@@ -1,10 +0,0 @@
-global.__assign =
- (this && this.__assign) ||
- Object.assign ||
- function(t) {
- for (let s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i]
- for (const p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]
- }
- return t
- }
diff --git a/src/package-lock.json b/src/package-lock.json
deleted file mode 100644
index f61a6828..00000000
--- a/src/package-lock.json
+++ /dev/null
@@ -1,533 +0,0 @@
-{
- "name": "nativescript-store-update",
- "version": "1.0.2",
- "lockfileVersion": 1,
- "requires": true,
- "dependencies": {
- "@angular/core": {
- "version": "4.3.6",
- "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.3.6.tgz",
- "integrity": "sha1-u6xj1o0Pe8s4nRKzQghlK+MofpY=",
- "dev": true,
- "requires": {
- "tslib": "1.7.1"
- }
- },
- "@types/moment": {
- "version": "2.13.0",
- "resolved": "https://registry.npmjs.org/@types/moment/-/moment-2.13.0.tgz",
- "integrity": "sha1-YE69GJvDvDShVIaJQE5hoqSqyJY=",
- "requires": {
- "moment": "2.18.1"
- }
- },
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
- "dev": true
- },
- "babel-code-frame": {
- "version": "6.26.0",
- "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
- "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
- "dev": true,
- "requires": {
- "chalk": "1.1.3",
- "esutils": "2.0.2",
- "js-tokens": "3.0.2"
- }
- },
- "balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "dev": true
- },
- "brace-expansion": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
- "dev": true,
- "requires": {
- "balanced-match": "1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "2.2.1",
- "escape-string-regexp": "1.0.5",
- "has-ansi": "2.0.0",
- "strip-ansi": "3.0.1",
- "supports-color": "2.0.0"
- }
- },
- "colors": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
- "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
- "dev": true
- },
- "commander": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
- "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "dev": true
- },
- "cycle": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
- "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=",
- "dev": true
- },
- "deep-equal": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz",
- "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=",
- "dev": true
- },
- "diff": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz",
- "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==",
- "dev": true
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
- },
- "eslint-plugin-prettier": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.2.0.tgz",
- "integrity": "sha512-LmIOP99A+BMeMYZoDeU196cV7FNIHJEjjWLARdz6JSTYmGK+HTEAVbJukPr/ZVOKPs5Hf7b10aXwSbty6Gqqsw==",
- "dev": true,
- "requires": {
- "fast-diff": "1.1.1",
- "jest-docblock": "20.0.3"
- }
- },
- "esutils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "dev": true
- },
- "eyes": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
- "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=",
- "dev": true
- },
- "fast-diff": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.1.tgz",
- "integrity": "sha1-CuoOTmBbaiGJ8Ok21Lf7rxt8/Zs=",
- "dev": true
- },
- "format": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz",
- "integrity": "sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs=",
- "dev": true
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
- },
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
- }
- },
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "dev": true,
- "requires": {
- "ansi-regex": "2.1.1"
- }
- },
- "i": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/i/-/i-0.3.5.tgz",
- "integrity": "sha1-HSuFQVjsgWkRPGy39raAHpniEdU=",
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dev": true,
- "requires": {
- "once": "1.4.0",
- "wrappy": "1.0.2"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
- "dev": true
- },
- "jest-docblock": {
- "version": "20.0.3",
- "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-20.0.3.tgz",
- "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=",
- "dev": true
- },
- "js-tokens": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
- "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true,
- "requires": {
- "brace-expansion": "1.1.8"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "moment": {
- "version": "2.18.1",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz",
- "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8="
- },
- "mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
- "dev": true
- },
- "nativescript-appversion": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/nativescript-appversion/-/nativescript-appversion-1.4.1.tgz",
- "integrity": "sha1-OpAo4zx35VVTlhk9KLweerdmG40="
- },
- "ncp": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz",
- "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=",
- "dev": true
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
- "requires": {
- "wrappy": "1.0.2"
- }
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "dev": true
- },
- "path-parse": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
- "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
- "dev": true
- },
- "pkginfo": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.0.tgz",
- "integrity": "sha1-NJ27f/04CB/K3AhT32h/DHdEzWU=",
- "dev": true
- },
- "prettier": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.6.0.tgz",
- "integrity": "sha512-oiy1f6Mrk5506IWaee64ruOJR8/BVzHwxF0R7B+FvhaU/L4eRfwZgwF+VTzaxcBBu/iYP/386Hxw9vFJjR/A5g==",
- "dev": true
- },
- "prompt": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz",
- "integrity": "sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4=",
- "dev": true,
- "requires": {
- "colors": "1.1.2",
- "pkginfo": "0.4.0",
- "read": "1.0.7",
- "revalidator": "0.1.8",
- "utile": "0.3.0",
- "winston": "2.1.1"
- }
- },
- "read": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz",
- "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=",
- "dev": true,
- "requires": {
- "mute-stream": "0.0.7"
- }
- },
- "resolve": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz",
- "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==",
- "dev": true,
- "requires": {
- "path-parse": "1.0.5"
- }
- },
- "revalidator": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz",
- "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=",
- "dev": true
- },
- "rimraf": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
- "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
- "dev": true,
- "requires": {
- "glob": "7.1.2"
- }
- },
- "rxjs": {
- "version": "5.4.3",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.3.tgz",
- "integrity": "sha512-fSNi+y+P9ss+EZuV0GcIIqPUK07DEaMRUtLJvdcvMyFjc9dizuDjere+A4V7JrLGnm9iCc+nagV/4QdMTkqC4A==",
- "dev": true,
- "requires": {
- "symbol-observable": "1.0.4"
- }
- },
- "semver": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
- "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
- "dev": true
- },
- "stack-trace": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
- "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
- "dev": true
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
- "requires": {
- "ansi-regex": "2.1.1"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- },
- "symbol-observable": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz",
- "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=",
- "dev": true
- },
- "tns-core-modules": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/tns-core-modules/-/tns-core-modules-3.1.1.tgz",
- "integrity": "sha1-ezicQt1sENstGt+8bJEDFwPlDdU=",
- "dev": true,
- "requires": {
- "tns-core-modules-widgets": "3.1.1"
- }
- },
- "tns-core-modules-widgets": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/tns-core-modules-widgets/-/tns-core-modules-widgets-3.1.1.tgz",
- "integrity": "sha1-M2691nlV6Im5GNsuzyRy/rVwh+A=",
- "dev": true
- },
- "tns-platform-declarations": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/tns-platform-declarations/-/tns-platform-declarations-3.1.1.tgz",
- "integrity": "sha1-ES3HusScnYe//OIEIiN1u1Jyfo8=",
- "dev": true
- },
- "tslib": {
- "version": "1.7.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz",
- "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=",
- "dev": true
- },
- "tslint": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.7.0.tgz",
- "integrity": "sha1-wl4NDJL6EgHCvDDoROCOaCtPNVI=",
- "dev": true,
- "requires": {
- "babel-code-frame": "6.26.0",
- "colors": "1.1.2",
- "commander": "2.11.0",
- "diff": "3.3.1",
- "glob": "7.1.2",
- "minimatch": "3.0.4",
- "resolve": "1.4.0",
- "semver": "5.4.1",
- "tslib": "1.7.1",
- "tsutils": "2.8.2"
- }
- },
- "tslint-config-prettier": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.4.0.tgz",
- "integrity": "sha512-xTbGkzOLBlHpClyuIJgQlqOByi8Z+Tv0RH/4yoSnk3TvjwGUZ7foc3Jn/5DvrsQWb5e66YHOr6I84rrgjx9rsA==",
- "dev": true
- },
- "tslint-plugin-prettier": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/tslint-plugin-prettier/-/tslint-plugin-prettier-1.1.0.tgz",
- "integrity": "sha512-bFLyVb2MMgrfF1cZtfQmz/a42NeTMgaBgDDjyXvg2NJL2mcql359oCiJiX5HPQ+kbDBMKu779i5R3c3wrVqRqw==",
- "dev": true,
- "requires": {
- "eslint-plugin-prettier": "2.2.0",
- "tslib": "1.7.1"
- }
- },
- "tsutils": {
- "version": "2.8.2",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.8.2.tgz",
- "integrity": "sha1-LBSGukMSYIRbCsb5Aq/Z1wio6mo=",
- "dev": true,
- "requires": {
- "tslib": "1.7.1"
- }
- },
- "typescript": {
- "version": "2.3.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz",
- "integrity": "sha1-PTgyGCgjHkNPKHUUlZw3qCtin0I=",
- "dev": true
- },
- "utile": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz",
- "integrity": "sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo=",
- "dev": true,
- "requires": {
- "async": "0.9.2",
- "deep-equal": "0.2.2",
- "i": "0.3.5",
- "mkdirp": "0.5.1",
- "ncp": "1.0.1",
- "rimraf": "2.6.1"
- }
- },
- "winston": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz",
- "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=",
- "dev": true,
- "requires": {
- "async": "1.0.0",
- "colors": "1.0.3",
- "cycle": "1.0.3",
- "eyes": "0.1.8",
- "isstream": "0.1.2",
- "pkginfo": "0.3.1",
- "stack-trace": "0.0.10"
- },
- "dependencies": {
- "async": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
- "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=",
- "dev": true
- },
- "colors": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
- "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
- "dev": true
- },
- "pkginfo": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz",
- "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=",
- "dev": true
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
- },
- "zone.js": {
- "version": "0.8.17",
- "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.17.tgz",
- "integrity": "sha1-TF5RhahX2o2nk9rzkZNxxaNrKgs=",
- "dev": true
- }
- }
-}
diff --git a/src/package.json b/src/package.json
index 695ec4ce..ba353d4d 100644
--- a/src/package.json
+++ b/src/package.json
@@ -1,13 +1,13 @@
{
"name": "nativescript-store-update",
- "version": "1.0.2",
+ "version": "2.0.0",
"description": "Keep your {N} App updated.",
"main": "store-update",
"typings": "index.d.ts",
"nativescript": {
"platforms": {
- "android": "3.0.0",
- "ios": "3.0.0"
+ "android": "6.0.0",
+ "ios": "6.0.0"
}
},
"scripts": {
@@ -47,28 +47,29 @@
"homepage": "https://github.com/chronogolf/nativescript-store-update",
"readmeFilename": "README.md",
"peerDependencies": {
- "tns-core-modules": "^3.0.0",
- "nativescript-appversion": "^1.4.1"
+ "@nativescript/core": "~7.0.0",
+ "@nativescript/appversion": "~2.0.0"
},
"devDependencies": {
- "@angular/core": "^4.3.6",
+ "@angular/core": "~10.1.0",
"format": "^0.2.2",
"prettier": "^1.6.0",
"prompt": "^1.0.0",
"rimraf": "^2.5.0",
- "rxjs": "^5.4.3",
- "tns-core-modules": "^3.1.0",
- "tns-platform-declarations": "^3.1.0",
- "tslint": "^5.7.0",
- "tslint-config-prettier": "^1.4.0",
- "tslint-plugin-prettier": "^1.1.0",
- "typescript": "~2.3.0",
- "zone.js": "^0.8.17"
+ "rxjs": "^6.6.0",
+ "@nativescript/core": "~7.0.0",
+ "@nativescript/types": "~7.0.0",
+ "@nativescript/webpack": "~3.0.0",
+ "tslint": "^6.1.3",
+ "tslint-config-prettier": "^1.18.0",
+ "tslint-plugin-prettier": "^2.3.0",
+ "typescript": "~3.9.0",
+ "zone.js": "~0.11.1"
},
"dependencies": {
"@types/moment": "^2.13.0",
- "moment": "2.18.1",
- "nativescript-appversion": "^1.4.1"
+ "moment": "~2.29.0",
+ "@nativescript/appversion": "~2.0.0"
},
"bootstrapper": "nativescript-plugin-seed"
}
diff --git a/src/references.d.ts b/src/references.d.ts
index 1e5e9616..d7433268 100644
--- a/src/references.d.ts
+++ b/src/references.d.ts
@@ -1,2 +1 @@
-///
-///
+///
diff --git a/src/store-update.android.ts b/src/store-update.android.ts
index 690aab08..bed031d0 100644
--- a/src/store-update.android.ts
+++ b/src/store-update.android.ts
@@ -1,5 +1,4 @@
-import * as app from 'tns-core-modules/application'
-import * as utils from 'tns-core-modules/utils/utils'
+import { Application, Utils } from '@nativescript/core'
import { GooglePlayHelper } from './helpers'
import { IGoogleStoreResult, IStoreUpdateConfig } from './interfaces'
@@ -9,7 +8,7 @@ export * from './constants'
export * from './helpers'
export * from './interfaces'
-app.on(app.resumeEvent, () => {
+Application.on(Application.resumeEvent, () => {
StoreUpdate.checkForUpdate()
})
@@ -42,7 +41,7 @@ export class StoreUpdate {
protected static _openStore() {
const storeUrl = `market://details?id=${StoreUpdate._common.getBundleId()}`
- utils.openUrl(storeUrl)
+ Utils.openUrl(storeUrl)
}
/*
diff --git a/src/store-update.common.ts b/src/store-update.common.ts
index 568c00c1..9820bd52 100644
--- a/src/store-update.common.ts
+++ b/src/store-update.common.ts
@@ -1,13 +1,7 @@
-require('./assign.helper')
-
import * as moment from 'moment'
-import * as app from 'tns-core-modules/application'
-import * as appSettings from 'tns-core-modules/application-settings'
-import { Observable } from 'tns-core-modules/data/observable'
-import { device } from 'tns-core-modules/platform'
+import { Application, ApplicationSettings, Observable, Device, Dialogs, ConfirmOptions } from '@nativescript/core'
-import { getAppIdSync, getVersionCodeSync, getVersionNameSync } from 'nativescript-appversion'
-import { confirm, ConfirmOptions } from 'tns-core-modules/ui/dialogs'
+import { getAppIdSync, getVersionCodeSync, getVersionNameSync } from '@nativescript/appversion'
import { AlertTypesConstants, UpdateTypesConstants } from './constants'
import { LocalesHelper, VersionHelper } from './helpers'
@@ -69,7 +63,7 @@ export class StoreUpdateCommon {
}
setVersionAsSkipped(version: string) {
- appSettings.setString(LAST_VERSION_SKIPPED_KEY, version)
+ ApplicationSettings.setString(LAST_VERSION_SKIPPED_KEY, version)
}
triggerAlertForUpdate(version: string) {
@@ -123,11 +117,11 @@ export class StoreUpdateCommon {
switch (alertType) {
case AlertTypesConstants.FORCE: {
const options: ConfirmOptions = this.buildDialogOptions({ skippable: false })
- return confirm(options)
+ return Dialogs.confirm(options)
}
case AlertTypesConstants.OPTION: {
const options: ConfirmOptions = this.buildDialogOptions()
- return confirm(options)
+ return Dialogs.confirm(options)
}
default:
return Promise.reject(null)
@@ -159,7 +153,7 @@ export class StoreUpdateCommon {
this._onConfirmed = conf.onConfirmed
this._alertOptions = conf.alertOptions
- LocalesHelper.changeLang(device.language)
+ LocalesHelper.changeLang(Device.language)
}
private _isAppStoreVersionNewer(storeVersion: string): boolean {
@@ -168,7 +162,7 @@ export class StoreUpdateCommon {
}
private _isCurrentVersionSkipped(currentAppStoreVersion: string): boolean {
- const lastVersionSkipped = appSettings.getString(LAST_VERSION_SKIPPED_KEY)
+ const lastVersionSkipped = ApplicationSettings.getString(LAST_VERSION_SKIPPED_KEY)
return currentAppStoreVersion === lastVersionSkipped
}
diff --git a/src/store-update.ios.ts b/src/store-update.ios.ts
index 2a3439d1..06ea4ea5 100644
--- a/src/store-update.ios.ts
+++ b/src/store-update.ios.ts
@@ -1,6 +1,4 @@
-import * as app from 'tns-core-modules/application'
-import * as http from 'tns-core-modules/http'
-import * as utils from 'tns-core-modules/utils/utils'
+import { Application, Http, Utils } from '@nativescript/core'
import { AppStoreHelper } from './helpers'
import { IAppleStoreResult, IStoreUpdateConfig } from './interfaces'
import { StoreUpdateCommon } from './store-update.common'
@@ -25,7 +23,7 @@ export class StoreUpdate {
})
//Hook into resume event to check for version
- app.on(app.resumeEvent, function (args) {
+ Application.on(Application.resumeEvent, function (args) {
StoreUpdate.checkForUpdate();
});
}
@@ -44,7 +42,7 @@ export class StoreUpdate {
protected static _openStore() {
// App Path
- utils.openUrl(
+ Utils.openUrl(
NSURL.URLWithString(`itms-apps${StoreUpdate._trackViewUrl.slice(5)}`).absoluteString
)
}
diff --git a/src/tsconfig.json b/src/tsconfig.json
index c2fb0a17..33dd58df 100644
--- a/src/tsconfig.json
+++ b/src/tsconfig.json
@@ -1,13 +1,14 @@
{
"compilerOptions": {
- "target": "es5",
- "module": "commonjs",
+ "target": "es2017",
+ "module": "esnext",
+ "moduleResolution": "node",
"declaration": true,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
- "lib": ["es2015", "es2017", "dom"],
+ "lib": ["es2017", "dom"],
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": false,