Compare commits

..

4 Commits

8 changed files with 13387 additions and 10 deletions

View File

@ -1,3 +1,2 @@
.idea/
dist/
node_modules/

5
Dockerfile.local-build Normal file
View File

@ -0,0 +1,5 @@
FROM nginx:mainline-alpine
COPY ./dist/cic-staff-client /usr/share/nginx/html
EXPOSE 80

View File

@ -4,6 +4,19 @@ An angular admin web client for managing users and transactions in the CIC netwo
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.
## Node 17 Specific Dev/Build Environment
* In `package.json:dependencies` -> `"cic-client-meta": "file:./tmp/cic-client-meta-0.0.7-alpha.6.tgz",`
* in `package.json:scripts` -> `"start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev",`
Building Docker images:
```bash
# bump package if making a change
$ yarn build:prod
$ docker build -t cic-staff-client:latest -f Dockerfile.local-build .
```
## Angular CLI
Run `npm install -g @angular/cli` to install the angular CLI.

View File

@ -1,13 +1,13 @@
{
"name": "cic-staff-client",
"version": "0.0.0",
"version": "0.2.0",
"scripts": {
"config:dev": "ts-node set-env.ts --environment=dev",
"config:prod": "ts-node set-env.ts --environment=prod",
"start:dev": "ng serve -c dev",
"start:prod": "ng serve --prod",
"build:dev": "ng build -c dev",
"build:prod": "ng build --prod",
"start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev",
"start:prod": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve --prod",
"build:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng build -c dev",
"build:prod": "export NODE_OPTIONS=--openssl-legacy-provider; ng build --prod",
"start:pwa": "npm run build:prod && http-server -p 4200 dist/cic-staff-client",
"test": "ng test",
"format:check": "prettier --config ./.prettierrc --list-different src/**/*.{ts,js,json,css,scss,html}",
@ -37,10 +37,10 @@
"@angular/router": "~10.2.0",
"@angular/service-worker": "~10.2.0",
"@cicnet/cic-client": "^0.1.6",
"@cicnet/schemas-data-validator": "*",
"@cicnet/schemas-data-validator": "1.0.0-alpha.3",
"@popperjs/core": "^2.5.4",
"bootstrap": "^4.5.3",
"cic-client-meta": "0.0.7-alpha.6",
"cic-client-meta": "file:./pkg/cic-client-meta-0.0.7-alpha.6.tgz",
"ethers": "^5.0.31",
"http-server": "^0.12.3",
"jquery": "^3.5.1",

Binary file not shown.

View File

@ -76,12 +76,15 @@ export class AuthService {
};
const options = {
headers,
credentials: 'include' as RequestCredentials,
};
return fetch(environment.cicMetaUrl, options);
}
getChallenge(): Promise<any> {
return fetch(environment.cicMetaUrl).then((response) => {
return fetch(environment.cicMetaUrl, {
credentials: 'include',
}).then((response) => {
if (response.status === 401) {
const authHeader: string = response.headers.get('WWW-Authenticate');
return hobaParseChallengeHeader(authHeader);

View File

@ -6,7 +6,8 @@ export const environment = {
logLevel: NgxLoggerLevel.DEBUG,
serverLogLevel: NgxLoggerLevel.OFF,
loggingUrl: '',
cicMetaUrl: 'https://meta-auth.dev.grassrootseconomics.net:443',
// This should match the cic-auth-helper
cicMetaUrl: 'http://127.0.0.1:5555',
publicKeysUrl: 'https://dev.grassrootseconomics.net/.well-known/publickeys/',
cicCacheUrl: 'https://cache.dev.grassrootseconomics.net',
web3Provider: 'wss://bloxberg-ws.dev.grassrootseconomics.net',

13356
yarn.lock Normal file

File diff suppressed because it is too large Load Diff