From 4858d182faebbd867a6acdc28663558f9c50ffc3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Apr 2024 10:11:39 +0200 Subject: [PATCH 1/5] Fix app icon component re-use --- desktop/angular/src/app/shared/app-icon/app-icon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/angular/src/app/shared/app-icon/app-icon.ts b/desktop/angular/src/app/shared/app-icon/app-icon.ts index 826c89c0..e9a32ce1 100644 --- a/desktop/angular/src/app/shared/app-icon/app-icon.ts +++ b/desktop/angular/src/app/shared/app-icon/app-icon.ts @@ -94,7 +94,7 @@ export class AppIconComponent implements OnInit, OnDestroy { this._profile = p || null; if (this.initDone) { - this.updateView(true); + this.updateView(); } } get profile(): IDandName | null | undefined { From 0e69fefa637a319eaa23dc8b15cc277105bc1695 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Apr 2024 10:25:36 +0200 Subject: [PATCH 2/5] Do not cache angular lib builds --- Earthfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Earthfile b/Earthfile index a6265aee..716fee92 100644 --- a/Earthfile +++ b/Earthfile @@ -217,9 +217,9 @@ angular-base: COPY assets/data ./assets IF [ "${configuration}" = "production" ] - RUN npm run build-libs + RUN --no-cache npm run build-libs ELSE - RUN npm run build-libs:dev + RUN --no-cache npm run build-libs:dev END # Explicitly cache here. From fc7e11e456d24cea037869cf9120e4ff6941191c Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Apr 2024 10:25:52 +0200 Subject: [PATCH 3/5] Keep timestamps of build artifacts --- Earthfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Earthfile b/Earthfile index 716fee92..5d9d3394 100644 --- a/Earthfile +++ b/Earthfile @@ -90,16 +90,16 @@ go-update-deps: RUN go get -u ./.. RUN go mod tidy - SAVE ARTIFACT go.mod AS LOCAL go.mod - SAVE ARTIFACT --if-exists go.sum AS LOCAL go.sum + SAVE ARTIFACT --keep-ts go.mod AS LOCAL go.mod + SAVE ARTIFACT --keep-ts --if-exists go.sum AS LOCAL go.sum # mod-tidy runs 'go mod tidy', saving go.mod and go.sum locally. mod-tidy: FROM +go-base RUN go mod tidy - SAVE ARTIFACT go.mod AS LOCAL go.mod - SAVE ARTIFACT --if-exists go.sum AS LOCAL go.sum + SAVE ARTIFACT --keep-ts go.mod AS LOCAL go.mod + SAVE ARTIFACT --keep-ts --if-exists go.sum AS LOCAL go.sum # go-build runs 'go build ./cmds/...', saving artifacts locally. # If --CMDS is not set, it defaults to building portmaster-start, portmaster-core and hub @@ -130,10 +130,10 @@ go-build: DO +GO_ARCH_STRING --goos="${GOOS}" --goarch="${GOARCH}" --goarm="${GOARM}" FOR bin IN $(ls -1 "/tmp/build/") - SAVE ARTIFACT "/tmp/build/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${bin}" + SAVE ARTIFACT --keep-ts "/tmp/build/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${bin}" END - SAVE ARTIFACT "/tmp/build/" ./output + SAVE ARTIFACT --keep-ts "/tmp/build/" ./output # Test one or more go packages. # Test are always run as -short, as "long" tests require a full desktop system. @@ -241,11 +241,11 @@ angular-project: RUN --no-cache ./node_modules/.bin/ng build --configuration ${configuration} --base-href ${baseHref} "${project}" RUN --no-cache cwd=$(pwd) && cd "${dist}" && zip -r "${cwd}/${project}.zip" ./ - SAVE ARTIFACT "${dist}" "./output/${project}" + SAVE ARTIFACT --keep-ts "${dist}" "./output/${project}" # Save portmaster UI as local artifact. IF [ "${project}" = "portmaster" ] - SAVE ARTIFACT "./${project}.zip" AS LOCAL ${outputDir}/all/${project}-ui.zip + SAVE ARTIFACT --keep-ts "./${project}.zip" AS LOCAL ${outputDir}/all/${project}-ui.zip END # Build the angular projects (portmaster-UI and tauri-builtin) in dev mode @@ -441,7 +441,7 @@ tauri-build: END # Save output binary as local artifact. IF [ -f "target/${target}/release/${bin}" ] - SAVE ARTIFACT "target/${target}/release/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${outbin}" + SAVE ARTIFACT --keep-ts "target/${target}/release/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${outbin}" END END From e2652d0934f44ded34ac1697c90954b6f4564d42 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Apr 2024 10:26:08 +0200 Subject: [PATCH 4/5] Add new ready api endpoint --- .../safing/portmaster-api/src/lib/debug-api.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop/angular/projects/safing/portmaster-api/src/lib/debug-api.service.ts b/desktop/angular/projects/safing/portmaster-api/src/lib/debug-api.service.ts index f0617943..36d3cd4f 100644 --- a/desktop/angular/projects/safing/portmaster-api/src/lib/debug-api.service.ts +++ b/desktop/angular/projects/safing/portmaster-api/src/lib/debug-api.service.ts @@ -18,6 +18,12 @@ export class DebugAPI { }) } + ready(): Observable { + return this.http.get(`${this.httpAPI}/v1/ready`, { + responseType: 'text' + }) + } + getStack(): Observable { return this.http.get(`${this.httpAPI}/v1/debug/stack`, { responseType: 'text' From 8c85259cc168c26f7948fac0b4528f525e8903e0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Apr 2024 10:28:56 +0200 Subject: [PATCH 5/5] Bump UI version --- desktop/angular/package-lock.json | 4 ++-- desktop/angular/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/angular/package-lock.json b/desktop/angular/package-lock.json index 48bce952..2d89a425 100644 --- a/desktop/angular/package-lock.json +++ b/desktop/angular/package-lock.json @@ -1,12 +1,12 @@ { "name": "portmaster", - "version": "0.8.5", + "version": "0.8.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "portmaster", - "version": "0.8.5", + "version": "0.8.6", "dependencies": { "@angular/animations": "^16.0.1", "@angular/cdk": "^16.0.1", diff --git a/desktop/angular/package.json b/desktop/angular/package.json index 7a743ea1..e784196e 100644 --- a/desktop/angular/package.json +++ b/desktop/angular/package.json @@ -1,6 +1,6 @@ { "name": "portmaster", - "version": "0.8.5", + "version": "0.8.6", "scripts": { "ng": "ng", "start": "npm install && npm run build-libs:dev && ng serve --proxy-config ./proxy.json",