Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-vault!342
  • Loading branch information
godenzim committed May 6, 2022
2 parents 7df4dcc + c4ef422 commit 240b425
Show file tree
Hide file tree
Showing 18 changed files with 4,183 additions and 5,623 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

Expand Down
48 changes: 24 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variables:
stages:
- build
- test
- qa
# - qa
- native_build
- native_test
- publish
Expand Down Expand Up @@ -76,29 +76,29 @@ test_android:
after_script:
- docker rm -f maven-runner-$CI_PIPELINE_ID || true

qa:
stage: qa
script:
- docker create --name qa-$CI_PIPELINE_ID $GOOGLE_TAG yarn sonar-scanner -- -X
-Dsonar.typescript.lcov.reportPaths=lcov.info
-Dsonar.typescript.tslint.reportPaths=lintReport.json
-Dsonar.test.inclusions=**/*.spec.ts
-Dsonar.tests=src/
-Dsonar.exclusions=**/node_modules/**,**/*.spec.ts,src/assets/libs/**
-Dsonar.sources=src/
-Dsonar.host.url=$SONAR_URL
-Dsonar.login=$SONAR_LOGIN
-Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.gitlab.project_id=$CI_PROJECT_ID
-Dsonar.branch.name=$CI_BUILD_REF_NAME
- docker cp lcov.info qa-$CI_PIPELINE_ID:/app/lcov.info
- docker cp lintReport.json qa-$CI_PIPELINE_ID:/app/lintReport.json
- docker start -a qa-$CI_PIPELINE_ID
after_script:
- docker rm -f qa-$CI_PIPELINE_ID || true
tags:
- docker
# qa:
# stage: qa
# script:
# - docker create --name qa-$CI_PIPELINE_ID $GOOGLE_TAG yarn sonar-scanner -- -X
# -Dsonar.typescript.lcov.reportPaths=lcov.info
# -Dsonar.typescript.tslint.reportPaths=lintReport.json
# -Dsonar.test.inclusions=**/*.spec.ts
# -Dsonar.tests=src/
# -Dsonar.exclusions=**/node_modules/**,**/*.spec.ts,src/assets/libs/**
# -Dsonar.sources=src/
# -Dsonar.host.url=$SONAR_URL
# -Dsonar.login=$SONAR_LOGIN
# -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
# -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
# -Dsonar.gitlab.project_id=$CI_PROJECT_ID
# -Dsonar.branch.name=$CI_BUILD_REF_NAME
# - docker cp lcov.info qa-$CI_PIPELINE_ID:/app/lcov.info
# - docker cp lintReport.json qa-$CI_PIPELINE_ID:/app/lintReport.json
# - docker start -a qa-$CI_PIPELINE_ID
# after_script:
# - docker rm -f qa-$CI_PIPELINE_ID || true
# tags:
# - docker

build_ios:
stage: native_build
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ FROM node:16.13.1
RUN apt-get update && apt-get install -yq libgconf-2-4 bzip2 build-essential libxtst6
RUN apt-get install -yq git

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
RUN echo "deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse \
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse \
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" | tee /etc/apt/sources.list.d/multiverse.list

# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
# installs, work.
RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst libglu1 libxss1 \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst libglu1 ttf-freefont libxss1 libglib2.0-0 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y curl \
Expand All @@ -26,7 +32,6 @@ COPY install-build-deps.js /app
COPY install-test-deps.js /app
COPY package.json /app
COPY yarn.lock /app
COPY config /app/config
COPY apply-diagnostic-modules.js /app

RUN yarn install-test-dependencies
Expand All @@ -43,9 +48,6 @@ COPY . /app
# set to production
RUN export NODE_ENV=production

# post-install hook, to be safe if it got cached
RUN node config/patch_crypto.js

# build
RUN yarn build:prod

Expand Down
31 changes: 10 additions & 21 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
Expand All @@ -14,7 +14,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
Expand Down Expand Up @@ -48,7 +47,13 @@
"input": "src/app/app.scss"
}
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -61,9 +66,7 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -88,7 +91,8 @@
],
"progress": false
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand All @@ -100,7 +104,6 @@
"browserTarget": "app:build:production"
},
"ci": {
"progress": false
}
}
},
Expand Down Expand Up @@ -139,13 +142,6 @@
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
Expand Down Expand Up @@ -190,13 +186,6 @@
"devServerTarget": "app:serve:ci"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions build/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ WORKDIR /app
RUN yarn global add ionic@5.4.0 @capacitor/core@3.2.5 @capacitor/cli@3.2.5 && yarn cache clean --force && yarn global add n && n 16.13.1

# Install app dependencies, using wildcard if package-lock exists and copy capacitor configs and ionic configs
COPY package.json yarn.lock apply-diagnostic-modules.js capacitor.config.ts ionic.config.json /app
COPY config /app/config
COPY package.json yarn.lock apply-diagnostic-modules.js capacitor.config.ts ionic.config.json /app/

# install dependencies
# run ionic android build
Expand All @@ -27,9 +26,6 @@ RUN yarn install --frozen-lockfile && mkdir www && ionic info
# Bundle app source
COPY . /app

# post-install hook, to be safe if it got cached
RUN node config/patch_crypto.js

# set version code
ARG BUILD_NR
RUN sed -i -e "s/versionCode 1/versionCode $BUILD_NR/g" /app/android/app/build.gradle
Expand Down
13 changes: 0 additions & 13 deletions config/patch_crypto.js

This file was deleted.

105 changes: 56 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"serve": "ionic serve --external",
"start": "ng serve",
"build": "ng build",
"build:prod": "ng build --prod",
"build:no-sapling": "yarn remove-sapling && yarn prepare-prod-build && ng build --prod",
"build:prod": "ng build --configuration production",
"build:no-sapling": "yarn remove-sapling && yarn prepare-prod-build && ng build --configuration production",
"build:stats": "ng build --stats-json",
"build:analyze": "yarn build:stats && webpack-bundle-analyzer ./www/stats.json",
"build:electron": "ng build --base-href=./",
"build:electron:prod": "ng build --base-href=./ --prod",
"build:electron:prod": "ng build --base-href=./ --configuration production",
"test": "ng test",
"test-ci": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng test --code-coverage --watch=false",
"lint": "ng lint",
"lint-ci": "ng lint app --format json > ./lintReport.json || true",
"lint-fix": "tslint --fix --project tsconfig.json",
"e2e": "ng e2e",
"postinstall": "jetifier && node apply-diagnostic-modules.js && node config/patch_crypto.js || true",
"postinstall": "jetifier && node apply-diagnostic-modules.js",
"sonar-scanner": "sonar-scanner",
"prettier": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"remove-sapling": "replace './assets/sapling/sapling-' './assets/no-sapling-web/sapling-' ./src/app/app.component.ts",
Expand All @@ -39,14 +39,14 @@
"dependencies": {
"@airgap/angular-core": "0.0.28",
"@airgap/angular-ngrx": "0.0.28",
"@airgap/coinlib-core": "0.13.1",
"@airgap/coinlib-core": "0.13.2",
"@airgap/sapling-wasm": "0.0.7",
"@angular/common": "^11.2.9",
"@angular/core": "^11.2.9",
"@angular/forms": "^11.2.9",
"@angular/platform-browser": "^11.2.9",
"@angular/platform-browser-dynamic": "^11.2.9",
"@angular/router": "^11.2.9",
"@angular/common": "13.2.5",
"@angular/core": "13.2.5",
"@angular/forms": "13.2.5",
"@angular/platform-browser": "13.2.5",
"@angular/platform-browser-dynamic": "13.2.5",
"@angular/router": "13.2.5",
"@capacitor/android": "^3.2.5",
"@capacitor/app": "^1.0.5",
"@capacitor/app-launcher": "^1.0.6",
Expand All @@ -56,17 +56,17 @@
"@capacitor/ios": "^3.2.5",
"@capacitor/splash-screen": "^1.1.5",
"@capacitor/status-bar": "^1.0.5",
"@download/blockies": "^1.0.3",
"@download/blockies": "1.0.3",
"@ethereumjs/tx": "^3.4.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/device-motion": "^5.19.1",
"@ionic-native/diagnostic": "^5.7.0",
"@ionic/angular": "5.6.4",
"@ionic/core": "5.6.4",
"@ionic/storage": "^2.2.0",
"@ionic-native/core": "5.36.0",
"@ionic-native/device-motion": "5.36.0",
"@ionic-native/diagnostic": "5.36.0",
"@ionic/angular": "6.0.10",
"@ionic/core": "6.0.10",
"@ionic/storage": "2.2.0",
"@keystonehq/bc-ur-registry": "0.4.4",
"@keystonehq/bc-ur-registry-eth": "0.7.5",
"@ngraveio/bc-ur": "^1.1.3",
"@ngraveio/bc-ur": "1.1.6",
"@ngrx/component-store": "^10.1.2",
"@ngrx/effects": "^10.1.2",
"@ngrx/store": "^10.1.2",
Expand All @@ -92,6 +92,7 @@
"moment": "^2.27.0",
"myetherwallet-blockies": "^0.1.1",
"ngx-moment": "^5.0.0",
"process": "0.11.10",
"rxjs": "~6.6.7",
"secrets.js-grempe": "^1.1.0",
"tslib": "^1.10.0",
Expand All @@ -100,40 +101,46 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1102.8",
"@angular-devkit/build-angular": "~0.1102.8",
"@angular-devkit/core": "^11.2.9",
"@angular-devkit/schematics": "^11.2.9",
"@angular/cli": "~11.2.9",
"@angular/compiler": "~11.2.9",
"@angular/compiler-cli": "~11.2.9",
"@angular/language-service": "~11.2.9",
"@angular-devkit/architect": "0.1302.5",
"@angular-devkit/build-angular": "13.2.5",
"@angular-devkit/core": "13.2.5",
"@angular-devkit/schematics": "13.2.5",
"@angular/cli": "13.2.5",
"@angular/compiler": "13.2.5",
"@angular/compiler-cli": "13.2.5",
"@angular/language-service": "13.2.5",
"@capacitor/cli": "3.2.5",
"@ionic/angular-toolkit": "3.1.1",
"@ionic/cli": "6.13.1",
"@types/node": "^12.11.1",
"jetifier": "^1.6.6",
"replace": "^1.1.0",
"sonarqube-scanner": "2.6.0",
"typescript": "~4.0.5"
"@ionic/angular-toolkit": "6.0.0",
"@ionic/cli": "6.18.2",
"@types/node": "17.0.21",
"crypto-browserify": "3.12.0",
"jetifier": "1.6.6",
"path-browserify": "1.0.1",
"replace": "1.2.1",
"sonarqube-scanner": "2.8.1",
"stream-browserify": "3.0.0",
"typescript": "4.4.4"
},
"buildDependencies": {
"@angular-devkit/architect": "^0.1102.8",
"@angular-devkit/build-angular": "~0.1102.8",
"@angular-devkit/core": "^11.2.9",
"@angular-devkit/schematics": "^11.2.9",
"@angular/cli": "~11.2.9",
"@angular/compiler": "~11.2.9",
"@angular/compiler-cli": "~11.2.9",
"@angular/language-service": "~11.2.9",
"@angular-devkit/architect": "0.1302.5",
"@angular-devkit/build-angular": "13.2.5",
"@angular-devkit/core": "13.2.5",
"@angular-devkit/schematics": "13.2.5",
"@angular/cli": "13.2.5",
"@angular/compiler": "13.2.5",
"@angular/compiler-cli": "13.2.5",
"@angular/language-service": "13.2.5",
"@capacitor/cli": "3.2.5",
"@ionic/angular-toolkit": "3.1.1",
"@ionic/cli": "6.13.1",
"@types/node": "^12.11.1",
"jetifier": "^1.6.6",
"replace": "^1.1.0",
"sonarqube-scanner": "2.6.0",
"typescript": "~4.0.5"
"@ionic/angular-toolkit": "6.0.0",
"@ionic/cli": "6.18.2",
"@types/node": "17.0.21",
"crypto-browserify": "3.12.0",
"jetifier": "1.6.6",
"path-browserify": "1.0.1",
"replace": "1.2.1",
"sonarqube-scanner": "2.8.1",
"stream-browserify": "3.0.0",
"typescript": "4.4.4"
},
"testDependencies": {
"@types/core-js": "^2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/verify-key/verify-key.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
height: calc(60% - 36px);
}
.secret--container-40 {
height: calc(40%- 36px);
height: calc(40% - 36px);
}
hr {
border: 2px dashed var(--ion-color-primary);
Expand Down
Loading

0 comments on commit 240b425

Please sign in to comment.