Revert "ui(angular): dependency security cleanup"

This reverts commit 2893d68383.
This commit is contained in:
Alexandr Stelnykovych
2025-09-04 15:33:49 +03:00
parent 2893d68383
commit 74f549e562
9 changed files with 2495 additions and 951 deletions

View File

@@ -95,6 +95,10 @@ Run `ng build` to build the project. The build artifacts will be stored in the `
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
### Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
### Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -127,6 +127,18 @@
"scripts": []
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "portmaster:serve"
},
"configurations": {
"production": {
"devServerTarget": "portmaster:serve:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {

View File

@@ -0,0 +1,36 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};

View File

@@ -0,0 +1,23 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('portmaster app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});

View File

@@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}

View File

@@ -0,0 +1,14 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
"zip-dist": "node pack.js",
"chrome-extension": "cross-env NODE_ENV=production ng build --configuration production portmaster-chrome-extension",
"chrome-extension:dev": "ng build --configuration development portmaster-chrome-extension --watch",
"build": "npm run build-libs && cross-env NODE_ENV=production ng build --configuration production --base-href /ui/modules/portmaster/",
"build": "npm run build-libs && NODE_ENV=production ng build --configuration production --base-href /ui/modules/portmaster/",
"build-tauri": "npm run build-libs && cross-env NODE_ENV=production ng build --configuration production tauri-builtin",
"serve-tauri-builtin": "ng serve tauri-builtin --port 4100",
"serve-app": "ng serve --port 4200 --proxy-config ./proxy.json",
@@ -96,9 +96,10 @@
"postcss-import": "^15.1.0",
"postcss-loader": "^7.3.0",
"postcss-scss": "^4.0.6",
"protractor": "~7.0.0",
"tailwindcss": "^3.3.2",
"ts-node": "^10.9.1",
"typescript": "5.0.4",
"typescript": "4.9",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-ext-reloader": "^1.1.9",
"zip-a-folder": "^1.1.5"

View File

@@ -4,22 +4,22 @@ Check latest versions of tauri packages and update them accordingly (https://cra
Cargo.toml:
```toml
[build-dependencies]
tauri-build = { version = "x.x.x-beta.19", features = [] } # Update to latest
tauri-build = { version = "2.0.0-beta.19", features = [] } # Update to latest
[dependencies]
# Tauri
tauri = { version = "x.x.x-beta.24", features = ["tray-icon", "image-png", "config-json5", "devtools"] } # Update to latest
tauri-plugin-shell = "x.x.x-beta"
tauri-plugin-dialog = "x.x.x-beta"
tauri-plugin-clipboard-manager = "x.x.x-beta"
tauri-plugin-os = "x.x.x-beta"
tauri-plugin-single-instance = "x.x.x-beta"
tauri-plugin-cli = "x.x.x-beta"
tauri-plugin-notification = "x.x.x-beta"
tauri-plugin-log = "x.x.x-beta"
tauri-plugin-window-state = "x.x.x-beta"
tauri = { version = "2.0.0-beta.24", features = ["tray-icon", "image-png", "config-json5", "devtools"] } # Update to latest
tauri-plugin-shell = "2.0.0-beta"
tauri-plugin-dialog = "2.0.0-beta"
tauri-plugin-clipboard-manager = "2.0.0-beta"
tauri-plugin-os = "2.0.0-beta"
tauri-plugin-single-instance = "2.0.0-beta"
tauri-plugin-cli = "2.0.0-beta"
tauri-plugin-notification = "2.0.0-beta"
tauri-plugin-log = "2.0.0-beta"
tauri-plugin-window-state = "2.0.0-beta"
tauri-cli = "x.x.x-beta.21" # Update to latest
tauri-cli = "2.0.0-beta.21" # Update to latest
```
Run: