diff --git a/.angular-cli.json b/.angular-cli.json
deleted file mode 100644
index 45162d2987..0000000000
--- a/.angular-cli.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
- "project": {
- "name": "ang-bell-app"
- },
- "apps": [
- {
- "root": "src",
- "outDir": "dist",
- "assets": ["assets", "manifest.json"],
- "index": "index.html",
- "main": "main.ts",
- "polyfills": "polyfills.ts",
- "test": "test.ts",
- "tsconfig": "tsconfig.app.json",
- "testTsconfig": "tsconfig.spec.json",
- "prefix": "app",
- "styles": [
- "../node_modules/material-design-icons/iconfont/material-icons.css",
- "styles.scss"
- ],
- "environmentSource": "environments/environment.ts",
- "environments": {
- "dev": "environments/environment.ts",
- "prod": "environments/environment.prod.ts",
- "test": "environments/environment.test.ts"
- },
- "serviceWorker": true
- }
- ],
- "e2e": {
- "protractor": {
- "config": "./protractor.conf.js"
- }
- },
- "lint": [
- {
- "project": "src/tsconfig.app.json"
- },
- {
- "project": "src/tsconfig.spec.json"
- },
- {
- "project": "e2e/tsconfig.e2e.json"
- }
- ],
- "test": {
- "karma": {
- "config": "./karma.conf.js"
- }
- },
- "defaults": {
- "styleExt": "scss",
- "class": {
- "spec": false
- },
- "component": {
- "spec": true,
- "inlineStyle": false,
- "inlineTemplate": false
- },
- "serve": {
- "port": 3000,
- "host": "0.0.0.0"
- },
- "poll": true
- }
-}
diff --git a/Vagrantfile b/Vagrantfile
index 2edd80d1ff..8c13e384fc 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -88,6 +88,11 @@ Vagrant.configure(2) do |config|
#docker pull portainer/portainer
#sudo docker run -d -p 9000:9000 --name treehouse -v /var/run/docker.sock:/var/run/docker.sock portainer:portainer
+ # Install latest version of npm and node for Angular 6
+ add-apt-repository "deb https://deb.nodesource.com/node_8.x stretch main"
+ sudo apt update
+ sudo apt upgrade -y
+
# Add CouchDB Docker
sudo docker run -d -p 5984:5984 -p 5986:5986 --name planet -v /srv/data/bell:/usr/local/var/lib/couchdb -v /srv/log/bell:/usr/local/var/log/couchdb couchdb:2.1.1
# Install Angular CLI
diff --git a/angular.json b/angular.json
new file mode 100644
index 0000000000..395733e7f9
--- /dev/null
+++ b/angular.json
@@ -0,0 +1,151 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "ang-bell-app": {
+ "root": "",
+ "sourceRoot": "src",
+ "projectType": "application",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "dist",
+ "index": "src/index.html",
+ "main": "src/main.ts",
+ "tsConfig": "src/tsconfig.app.json",
+ "polyfills": "src/polyfills.ts",
+ "assets": [
+ "src/assets",
+ "src/manifest.json"
+ ],
+ "styles": [
+ "node_modules/material-design-icons/iconfont/material-icons.css",
+ "src/styles.scss"
+ ],
+ "scripts": []
+ },
+ "configurations": {
+ "production": {
+ "optimization": true,
+ "outputHashing": "all",
+ "sourceMap": false,
+ "extractCss": true,
+ "namedChunks": false,
+ "aot": true,
+ "extractLicenses": true,
+ "vendorChunk": false,
+ "buildOptimizer": true,
+ "serviceWorker": true,
+ "ngswConfigPath": "src/ngsw-config.json",
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.prod.ts"
+ }
+ ]
+ },
+ "test": {
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.test.ts"
+ }
+ ]
+ }
+ }
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "browserTarget": "ang-bell-app:build",
+ "port": 3000,
+ "host": "0.0.0.0"
+ },
+ "configurations": {
+ "production": {
+ "browserTarget": "ang-bell-app:build:production"
+ },
+ "test": {
+ "browserTarget": "ang-bell-app:build:test"
+ }
+ }
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "ang-bell-app:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "src/test.ts",
+ "karmaConfig": "./karma.conf.js",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "src/tsconfig.spec.json",
+ "scripts": [],
+ "styles": [
+ "node_modules/material-design-icons/iconfont/material-icons.css",
+ "src/styles.scss"
+ ],
+ "assets": [
+ "src/assets",
+ "src/manifest.json"
+ ]
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": [
+ "src/tsconfig.app.json",
+ "src/tsconfig.spec.json"
+ ],
+ "exclude": []
+ }
+ }
+ }
+ },
+ "ang-bell-app-e2e": {
+ "root": "",
+ "sourceRoot": "",
+ "projectType": "application",
+ "architect": {
+ "e2e": {
+ "builder": "@angular-devkit/build-angular:protractor",
+ "options": {
+ "protractorConfig": "./protractor.conf.js",
+ "devServerTarget": "ang-bell-app:serve"
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": [
+ "e2e/tsconfig.e2e.json"
+ ],
+ "exclude": []
+ }
+ }
+ }
+ }
+ },
+ "defaultProject": "ang-bell-app",
+ "schematics": {
+ "@schematics/angular:class": {
+ "spec": false
+ },
+ "@schematics/angular:component": {
+ "spec": true,
+ "inlineStyle": false,
+ "inlineTemplate": false,
+ "prefix": "app",
+ "styleext": "scss"
+ },
+ "@schematics/angular:directive": {
+ "prefix": "app"
+ }
+ }
+}
diff --git a/docker/db-init/Dockerfile b/docker/db-init/Dockerfile
index ab5210f2a5..8deed11dab 100644
--- a/docker/db-init/Dockerfile
+++ b/docker/db-init/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:6.11-alpine
+FROM node:8.11.2-alpine
RUN apk update ;\
apk add --no-cache bash curl git jq ca-certificates;\
diff --git a/docker/db-init/crosscompile_db-init.sh b/docker/db-init/crosscompile_db-init.sh
index 0799409ac7..66d1c392c6 100755
--- a/docker/db-init/crosscompile_db-init.sh
+++ b/docker/db-init/crosscompile_db-init.sh
@@ -24,7 +24,7 @@ echo "Building db-init for ${ARCH}"
if [[ "${ACT}" == "install" ]]; then
apt-get update -qq
apt-get install -y curl gnupg
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
+ curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs build-essential ${PACKAGES}
npm install "--arch=${TRIPLE}" -g add-cors-to-couchdb
else
diff --git a/docker/planet/Dockerfile b/docker/planet/Dockerfile
index 8cae4eb570..930ad24f76 100644
--- a/docker/planet/Dockerfile
+++ b/docker/planet/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:6.11-alpine as builder
+FROM node:8.11.2-alpine as builder
LABEL maintainer="sahil@ole.org,mappuji@ole.org"
WORKDIR /ng-app
diff --git a/docker/planet/crosscompile_planet.sh b/docker/planet/crosscompile_planet.sh
index 513bef8a56..0a1fd7112a 100644
--- a/docker/planet/crosscompile_planet.sh
+++ b/docker/planet/crosscompile_planet.sh
@@ -25,12 +25,12 @@ if [[ "${ACT}" == "install" ]]; then
echo "Install stage"
apt-get update -qq
apt-get install -y curl gnupg
- curl -sL https://deb.nodesource.com/setup_6.x | bash -
+ curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs build-essential ${PACKAGES}
npm install "--arch=${TRIPLE}"
elif [[ "${ACT}" == "build" ]]; then
echo "Build the angular app in production mode stage"
- $(npm bin)/ng build "--arch=${TRIPLE}" --prod
+ $(npm bin)/ng build --prod
else
echo "Error: No action Specified"
fi
diff --git a/karma.conf.js b/karma.conf.js
index 4d9ab9d948..f5b200ca7c 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -4,19 +4,19 @@
module.exports = function (config) {
config.set({
basePath: '',
- frameworks: ['jasmine', '@angular/cli'],
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
- require('@angular/cli/plugins/karma')
+ require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
- reports: [ 'html', 'lcovonly' ],
+ dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
diff --git a/package.json b/package.json
index 4a12c7046a..e3ec5b5a52 100644
--- a/package.json
+++ b/package.json
@@ -12,43 +12,44 @@
"v-test": "vagrant ssh -- -t 'cd /vagrant;ng test'",
"htmlhint": "./node_modules/htmlhint-ng2/bin/htmlhint --config .htmlhintrc",
"sass-lint": "./node_modules/sass-lint/bin/sass-lint.js -c ./sass-lint.yml -v -q",
- "lint": "ng lint --type-check",
- "lint-all": "npm run sass-lint && ng lint --type-check && npm run htmlhint",
+ "lint": "ng lint ang-bell-app --type-check",
+ "lint-all": "npm run sass-lint && ng lint ang-bell-app --type-check && npm run htmlhint",
"v-lint": "vagrant ssh -- -t 'cd /vagrant;npm run lint -s'",
- "v-lint-fix": "vagrant ssh -- -t 'cd /vagrant;ng lint --fix --type-check'",
+ "v-lint-fix": "vagrant ssh -- -t 'cd /vagrant;ng lint ang-bell-app --fix --type-check'",
"e2e": "ng e2e --environment test",
"v-e2e": "vagrant ssh -- -t 'cd /vagrant;ng e2e --environment test'",
"install-hooks": "cp -a git-hooks/. .git/hooks/"
},
"private": true,
"dependencies": {
- "@angular/animations": "5.2.5",
- "@angular/cdk": "^5.0.4",
- "@angular/common": "5.2.5",
- "@angular/compiler": "5.2.5",
- "@angular/core": "5.2.5",
- "@angular/forms": "5.2.5",
- "@angular/material": "^5.0.4",
- "@angular/platform-browser": "5.2.5",
- "@angular/platform-browser-dynamic": "5.2.5",
- "@angular/platform-server": "5.2.5",
- "@angular/router": "5.2.5",
- "@angular/service-worker": "^5.2.1",
+ "@angular/animations": "6.0.3",
+ "@angular/cdk": "^6.0.0",
+ "@angular/common": "6.0.3",
+ "@angular/compiler": "6.0.3",
+ "@angular/core": "6.0.3",
+ "@angular/forms": "6.0.3",
+ "@angular/material": "^6.0.0",
+ "@angular/platform-browser": "6.0.3",
+ "@angular/platform-browser-dynamic": "6.0.3",
+ "@angular/platform-server": "6.0.3",
+ "@angular/router": "6.0.3",
+ "@angular/service-worker": "6.0.3",
"@types/cropperjs": "^1.1.2",
"core-js": "^2.5.1",
"cropperjs": "^1.3.4",
"jszip": "^3.1.5",
"material-design-icons": "^3.0.1",
"material-icons": "^0.1.0",
- "mime-types": "^2.1.17",
+ "mime": "^2.3.1",
"ngx-img": "^10.15.0",
- "rxjs": "5.5.2",
- "zone.js": "^0.8.18"
+ "rxjs": "^6.2.0",
+ "zone.js": "~0.8.26"
},
"devDependencies": {
- "@angular/cli": "1.7.0",
- "@angular/compiler-cli": "5.2.5",
- "@angular/language-service": "5.2.5",
+ "@angular-devkit/build-angular": "~0.6.6",
+ "@angular/cli": "^6.0.7",
+ "@angular/compiler-cli": "6.0.3",
+ "@angular/language-service": "6.0.3",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
@@ -69,6 +70,6 @@
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"tslint-eslint-rules": "^4.1.1",
- "typescript": "~2.6.2"
+ "typescript": "2.7.2"
}
}
diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts
index 708a3e9f2d..0be8976886 100644
--- a/src/app/community/community.component.ts
+++ b/src/app/community/community.component.ts
@@ -3,8 +3,7 @@ import { CouchService } from '../shared/couchdb.service';
import { DialogsPromptComponent } from '../shared/dialogs/dialogs-prompt.component';
import { MatTableDataSource, MatPaginator, MatDialog, MatSort } from '@angular/material';
import { switchMap, map } from 'rxjs/operators';
-import { forkJoin } from 'rxjs/observable/forkJoin';
-import { of } from 'rxjs/observable/of';
+import { forkJoin, of } from 'rxjs';
import { findDocuments } from '../shared/mangoQueries';
import { filterSpecificFields, composeFilterFunctions, filterDropdowns } from '../shared/table-helpers';
import { DialogsViewComponent } from '../shared/dialogs/dialogs-view.component';
diff --git a/src/app/configuration/configuration-guard.service.ts b/src/app/configuration/configuration-guard.service.ts
index 47590ba817..dc714329fd 100644
--- a/src/app/configuration/configuration-guard.service.ts
+++ b/src/app/configuration/configuration-guard.service.ts
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { CouchService } from '../shared/couchdb.service';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@Injectable()
diff --git a/src/app/configuration/configuration.component.html b/src/app/configuration/configuration.component.html
index 0afc1512ca..dea19c099a 100644
--- a/src/app/configuration/configuration.component.html
+++ b/src/app/configuration/configuration.component.html
@@ -23,14 +23,14 @@