diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 32068a2..0000000 --- a/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# For now, tag everyone who wants to participate -* @deso-protocol/reviewers diff --git a/Caddyfile b/Caddyfile deleted file mode 100644 index e782a4b..0000000 --- a/Caddyfile +++ /dev/null @@ -1,46 +0,0 @@ -# Global caddy config options must be first -{ - admin off - auto_https off -} - -# Bind to port 82 -:82 - -# Serve static files -file_server - -# Fallback to index.html for everything but assets -@html { - not path *.js *.css *.png *.svg *.ttf *.woff2 - - file index.html -} - -handle_errors { - header Cache-Control no-store -} - -rewrite @html {http.matchers.file.relative} - -# Don't cache index.html and set CSP -header @html Cache-Control no-store -header @html Content-Security-Policy " - default-src 'self'; - connect-src - {$DOMAIN:https://node.deso.org}/api/v0/get-users-stateless - {$DOMAIN:https://node.deso.org}/api/v0/get-app-state - {$DOMAIN:https://node.deso.org}/api/v0/get-referral-info-for-referral-hash - {$DOMAIN:https://node.deso.org}/api/v0/get-user-derived-keys - {$DOMAIN:https://node.deso.org}/api/v0/get-transaction-spending - {$DOMAIN:https://node.deso.org}/api/v0/send-phone-number-verification-text - {$DOMAIN:https://node.deso.org}/api/v0/submit-phone-number-verification-code - img-src 'self' - {$DOMAIN:https://node.deso.org}/api/v0/get-single-profile-picture/; - style-src 'self' 'unsafe-inline' - https://fonts.googleapis.com - https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css; - font-src 'self' - https://fonts.googleapis.com - https://fonts.gstatic.com - https://ka-f.fontawesome.com;" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 36b1ddd..0000000 --- a/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM node:14.15.5-alpine3.13 AS identity - -WORKDIR /identity - -RUN apk add git - -COPY ./package.json . -COPY ./package-lock.json . -COPY ./.npmrc . - -# use yarn to upgrade npm -RUN yarn global add npm@7 - -# install frontend dependencies before copying the frontend code -# into the container so we get docker cache benefits -RUN npm install - -# don't allow any dependencies with vulnerabilities -#RUN npx audit-ci --low - -# running ngcc before build_prod lets us utilize the docker -# cache and significantly speeds up builds without requiring us -# to import/export the node_modules folder from the container -RUN npm run ngcc - -COPY ./angular.json . -COPY ./tsconfig.json . -COPY ./tsconfig.app.json . -COPY ./webpack.config.js . -COPY ./tslint.json . -COPY ./src ./src - -RUN npm run build_prod - -# build minified version of frontend, served using caddy -FROM caddy:2.3.0-alpine - -WORKDIR /identity - -COPY ./Caddyfile . -COPY --from=identity /identity/dist/identity . - -ENTRYPOINT ["caddy", "run"] diff --git a/angular.json b/angular.json index 908c072..d8708e8 100644 --- a/angular.json +++ b/angular.json @@ -88,23 +88,6 @@ "browserTarget": "identity:build" } }, - "test": { - "builder": "@angular-bulders/custom-webpack:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] - } - }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { diff --git a/example/frontend/CODEOWNERS b/example/frontend/CODEOWNERS deleted file mode 100644 index 32068a2..0000000 --- a/example/frontend/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# For now, tag everyone who wants to participate -* @deso-protocol/reviewers diff --git a/example/frontend/Caddyfile b/example/frontend/Caddyfile deleted file mode 100644 index cb717d8..0000000 --- a/example/frontend/Caddyfile +++ /dev/null @@ -1,83 +0,0 @@ -# Global caddy config options must be first -{ - admin off - auto_https off -} - -# Bind to port 80 -:80 - -# Serve static files -file_server - -# Fallback to index.html for everything but assets -@html { - not path *.js *.css *.png *.jpg *.svg *.pdf *.eot *.ttf *.woff *.woff2 *.webmanifest - - file index.html -} - -handle_errors { - header Cache-Control no-store -} - -rewrite @html {http.matchers.file.relative} - -# Don't cache index.html and set CSP -header @html Cache-Control no-store -header @html Content-Security-Policy " - default-src 'self'; - connect-src 'self' - node.deso.org - amp.deso.org - bithunt.deso.org - https://altumbase.com - localhost:* - https://api.blockchain.com/ticker - https://api.blockchain.com/mempool/fees - https://ka-f.fontawesome.com/ - bitcoinfees.earn.com - api.blockcypher.com - api.testwyre.com - api.sendwyre.com - https://videodelivery.net - https://upload.videodelivery.net; - script-src 'self' - https://kit.fontawesome.com/070ca4195b.js - https://ka-f.fontawesome.com/; - style-src 'self' - 'unsafe-inline' - https://fonts.googleapis.com - https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css; - img-src 'self' - data: - i.imgur.com - images.deso.org - quickchart.io - arweave.net - *.arweave.net - *.pearl.app - cloudflare-ipfs.com; - font-src 'self' - https://fonts.googleapis.com - https://fonts.gstatic.com - https://ka-f.fontawesome.com; - frame-src 'self' - localhost:* - identity.deso.org - identity.deso.blue - identity.deso.green - https://geo.captcha-delivery.com - https://www.youtube.com - https://youtube.com - https://player.vimeo.com - https://www.tiktok.com - https://giphy.com - https://open.spotify.com - https://w.soundcloud.com - https://player.twitch.tv - https://clips.twitch.tv - pay.testwyre.com - pay.sendwyre.com - https://iframe.videodelivery.net; - frame-ancestors 'self';" diff --git a/example/frontend/Dockerfile b/example/frontend/Dockerfile deleted file mode 100644 index 9a25208..0000000 --- a/example/frontend/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -FROM node:14.15.5-alpine3.13 AS frontend - -WORKDIR /frontend - -# install git -RUN apk add git - -# use yarn to upgrade npm -RUN yarn global add npm@7 - -COPY ./package.json . -COPY ./package-lock.json . -COPY ./.npmrc . - -# install frontend dependencies before copying the frontend code -# into the container so we get docker cache benefits -RUN npm install - -# don't allow any dependencies with vulnerabilities -#RUN npx audit-ci --low - -# running ngcc before build_prod lets us utilize the docker -# cache and significantly speeds up builds without requiring us -# to import/export the node_modules folder from the container -RUN npm run ngcc - -COPY ./angular.json . -COPY ./tsconfig.json . -COPY ./src ./src - -# use --build-arg index=index.custom.html to specify a custom index.html file -ARG index=index.html - -# overwrite default index file with custom file -COPY ./src/$index ./src/index.html - -# use --build-arg environment=custom to specify a custom environment -ARG environment=prod - -# overwrite default environment file with custom file -COPY ./src/environments/environment.$environment.ts ./src/environments/environment.prod.ts - -RUN npm run build_prod - -# build minified version of frontend, served using caddy -FROM caddy:2.3.0-alpine - -WORKDIR /frontend - -COPY ./Caddyfile . -COPY --from=frontend /frontend/dist . - -# We use a run.sh script so that we can pass environment variables -# to it. -COPY ./run.sh . - -# Default options overrideable by docker-compose -ENV CADDY_FILE "/frontend/Caddyfile" - -ENTRYPOINT ["/frontend/run.sh"] diff --git a/example/frontend/run.sh b/example/frontend/run.sh deleted file mode 100755 index 280493e..0000000 --- a/example/frontend/run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -echo "Loading Caddy config from file: ${CADDY_FILE}" - -caddy run --config ${CADDY_FILE} diff --git a/example/frontend/src/karma.conf.js b/example/frontend/src/karma.conf.js deleted file mode 100644 index 2cf3267..0000000 --- a/example/frontend/src/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - 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-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../coverage/electron-angular-app'), - reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index 7cd0011..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,44 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces - }, - coverageReporter: { - dir: require('path').join(__dirname, './coverage/identity'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -};