Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9d7f62d81 | ||
|
|
11e0613165 | ||
|
|
77c3d2bbb8 | ||
|
|
784a67afff | ||
|
|
19a092dd31 | ||
|
|
4c2f74949b | ||
|
|
a3fc3782ef | ||
|
|
cdc93f032a | ||
|
|
7dd15ed064 | ||
|
|
d169434157 | ||
|
|
6efed72bf2 | ||
|
|
15db311801 | ||
|
|
82d509129b | ||
|
|
939d838e35 | ||
|
|
6de4ce58c4 |
2
.github/workflows/quality-checks.yaml
vendored
2
.github/workflows/quality-checks.yaml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Quality checks
|
name: Quality checks
|
||||||
|
|
||||||
on: push
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
|||||||
1
.github/workflows/security-checks.yaml
vendored
1
.github/workflows/security-checks.yaml
vendored
@@ -2,6 +2,7 @@ name: Security checks
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0'
|
- cron: '0 0 * * 0'
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/test.yaml
vendored
7
.github/workflows/test.yaml
vendored
@@ -1,10 +1,13 @@
|
|||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on: push
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-tests:
|
run-tests:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos, ubuntu, windows]
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|||||||
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,5 +1,25 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.7.5 (2020-09-14)
|
||||||
|
|
||||||
|
* fix reverting (reinstalling) capabilities not working | [commit](https://github.com/undergroundwires/privacy.sexy/commit/939d838e3535bb1c9b00c8ea9dacb735ae41d700)
|
||||||
|
* fix tests and checks are not running on PRs | [commit](https://github.com/undergroundwires/privacy.sexy/commit/82d509129b4e4a5df4b84786a0d6842a7d26e888)
|
||||||
|
* fix the recycling bin option (#32) | [commit](https://github.com/undergroundwires/privacy.sexy/commit/15db3118012a172a2191a2afad57084a65b34642)
|
||||||
|
* fix rendering issue in older edge/IE | [commit](https://github.com/undergroundwires/privacy.sexy/commit/6efed72bf25c2ddf0901caab7f22966ca13cd47a)
|
||||||
|
* fix pasting in search bar after page load showing no results | [commit](https://github.com/undergroundwires/privacy.sexy/commit/d1694341578288eeaf8b80caf9296a38d76789f0)
|
||||||
|
* fix typo | [commit](https://github.com/undergroundwires/privacy.sexy/commit/7dd15ed06433e0e6583ab0fa46a683ce6554bbea)
|
||||||
|
|
||||||
|
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.7.4...0.7.5)
|
||||||
|
|
||||||
|
## 0.7.4 (2020-09-12)
|
||||||
|
|
||||||
|
* fix checked checkbox has blue border | [commit](https://github.com/undergroundwires/privacy.sexy/commit/4ae385b7fcea9014a68442714b7d99e2ee7df7d0)
|
||||||
|
* fix spectre protection getting single lined #31 | [commit](https://github.com/undergroundwires/privacy.sexy/commit/22b23a9ece446c7f9abd4ede293051eb616ad50a)
|
||||||
|
* fix missing reg value in denying app access to account | [commit](https://github.com/undergroundwires/privacy.sexy/commit/3c13a9e837e06e097450b31d7eb0c0e6bf20cefb)
|
||||||
|
* fix wrong path in clear all firefox user profile settings | [commit](https://github.com/undergroundwires/privacy.sexy/commit/ee66196d9a60f27d17ae7f62d02b4f119a47e6e0)
|
||||||
|
|
||||||
|
[compare](https://github.com/undergroundwires/privacy.sexy/compare/0.7.3...0.7.4)
|
||||||
|
|
||||||
## 0.7.3 (2020-09-12)
|
## 0.7.3 (2020-09-12)
|
||||||
|
|
||||||
* fix vscode settings file override and add more configs | [commit](https://github.com/undergroundwires/privacy.sexy/commit/a0d61728ead04b4455437f85820121a848db9e00)
|
* fix vscode settings file override and add more configs | [commit](https://github.com/undergroundwires/privacy.sexy/commit/a0d61728ead04b4455437f85820121a848db9e00)
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -15,21 +15,20 @@
|
|||||||
## Get started
|
## Get started
|
||||||
|
|
||||||
- Online version: [https://privacy.sexy](https://privacy.sexy)
|
- Online version: [https://privacy.sexy](https://privacy.sexy)
|
||||||
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.3/privacy.sexy-Setup-0.7.3.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.3/privacy.sexy-0.7.3.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.3/privacy.sexy-0.7.3.dmg)
|
- or download latest desktop version for [Windows](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-Setup-0.7.5.exe), [Linux](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-0.7.5.AppImage), [macOS](https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.5/privacy.sexy-0.7.5.dmg)
|
||||||
- 💡 Come back regularly to apply latest version for stronger privacy and security.
|
- 💡 Come back regularly to apply latest version for stronger privacy and security.
|
||||||
|
|
||||||
[](https://privacy.sexy)
|
[](https://privacy.sexy)
|
||||||
|
|
||||||
## Why
|
## Why
|
||||||
|
|
||||||
- You don't need to run any compiled software that has access to your system, just run the generated scripts.
|
- Rich tweak pool to harden security & privacy of the OS and other software on it
|
||||||
- Have full visibility into what the tweaks do as you enable them.
|
- Free (both free as in beer and free as in speech)
|
||||||
- Ability to revert applied scripts
|
- No need to run any compiled software that has access to your system, just run the generated scripts
|
||||||
|
- Have full visibility into what the tweaks do as you enable them
|
||||||
|
- Ability to revert (undo) applied scripts
|
||||||
- Easily extendable
|
- Easily extendable
|
||||||
- Everything is open-sourced including both application and infrastructure
|
- Everything is open-source and automated (both application and its infrastructure)
|
||||||
- Fully automated CI/CD pipeline using GitHub actions
|
|
||||||
- to AWS for provisioning serverless infrastructure
|
|
||||||
- for building and sharing the desktop applications
|
|
||||||
|
|
||||||
## Extend scripts
|
## Extend scripts
|
||||||
|
|
||||||
@@ -49,8 +48,8 @@
|
|||||||
- Development: `npm run serve` to compile & hot-reload for development.
|
- Development: `npm run serve` to compile & hot-reload for development.
|
||||||
- Production: `npm run build` to prepare files for distribution.
|
- Production: `npm run build` to prepare files for distribution.
|
||||||
- Or run using Docker:
|
- Or run using Docker:
|
||||||
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.3 .`
|
1. Build: `docker build -t undergroundwires/privacy.sexy:0.7.5 .`
|
||||||
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.3 undergroundwires/privacy.sexy:0.7.3`
|
2. Run: `docker run -it -p 8080:80 --rm --name privacy.sexy-0.7.5 undergroundwires/privacy.sexy:0.7.5`
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
|||||||
1453
package-lock.json
generated
1453
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
49
package.json
49
package.json
@@ -1,9 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "privacy.sexy",
|
"name": "privacy.sexy",
|
||||||
"version": "0.7.3",
|
"version": "0.7.5",
|
||||||
"author": "undergroundwires",
|
"author": "undergroundwires",
|
||||||
"description": "Enforce privacy & security best-practices on Windows, because privacy is sexy 🍑🍆",
|
"description": "Enforce privacy & security best-practices on Windows, because privacy is sexy 🍑🍆",
|
||||||
|
"homepage": "https://privacy.sexy",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/undergroundwires/privacy.sexy.git"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
@@ -21,44 +26,44 @@
|
|||||||
},
|
},
|
||||||
"main": "background.js",
|
"main": "background.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.30",
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||||
"@fortawesome/free-brands-svg-icons": "^5.14.0",
|
"@fortawesome/free-brands-svg-icons": "^5.15.1",
|
||||||
"@fortawesome/free-regular-svg-icons": "^5.14.0",
|
"@fortawesome/free-regular-svg-icons": "^5.15.1",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.14.0",
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||||
"@fortawesome/vue-fontawesome": "^0.1.10",
|
"@fortawesome/vue-fontawesome": "^2.0.0",
|
||||||
"ace-builds": "^1.4.12",
|
"ace-builds": "^1.4.12",
|
||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"liquor-tree": "^0.2.70",
|
"liquor-tree": "^0.2.70",
|
||||||
"v-tooltip": "2.0.2",
|
"v-tooltip": "2.0.2",
|
||||||
"vue": "^2.6.12",
|
"vue": "^2.6.12",
|
||||||
"vue-class-component": "^7.2.5",
|
"vue-class-component": "^7.2.6",
|
||||||
"vue-js-modal": "^2.0.0-rc.6",
|
"vue-js-modal": "^2.0.0-rc.6",
|
||||||
"vue-property-decorator": "^9.0.0"
|
"vue-property-decorator": "^9.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ace": "0.0.43",
|
"@types/ace": "0.0.44",
|
||||||
"@types/chai": "^4.2.12",
|
"@types/chai": "^4.2.14",
|
||||||
"@types/file-saver": "^2.0.1",
|
"@types/file-saver": "^2.0.1",
|
||||||
"@types/mocha": "^8.0.3",
|
"@types/mocha": "^8.0.3",
|
||||||
"@vue/cli-plugin-typescript": "^4.5.4",
|
"@vue/cli-plugin-typescript": "^4.5.7",
|
||||||
"@vue/cli-plugin-unit-mocha": "^4.5.4",
|
"@vue/cli-plugin-unit-mocha": "^4.5.7",
|
||||||
"@vue/cli-service": "^4.5.4",
|
"@vue/cli-service": "^4.5.7",
|
||||||
"@vue/test-utils": "1.0.4",
|
"@vue/test-utils": "1.1.0",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"electron": "^10.1.0",
|
"electron": "^10.1.3",
|
||||||
"electron-devtools-installer": "^3.1.1",
|
"electron-devtools-installer": "^3.1.1",
|
||||||
"electron-log": "^4.2.4",
|
"electron-log": "^4.2.4",
|
||||||
"electron-updater": "^4.3.4",
|
"electron-updater": "^4.3.5",
|
||||||
"js-yaml-loader": "^1.2.2",
|
"js-yaml-loader": "^1.2.2",
|
||||||
"markdownlint-cli": "^0.23.2",
|
"markdownlint-cli": "^0.24.0",
|
||||||
"remark-cli": "^8.0.1",
|
"remark-cli": "^9.0.0",
|
||||||
"remark-lint-no-dead-urls": "^1.1.0",
|
"remark-lint-no-dead-urls": "^1.1.0",
|
||||||
"remark-preset-lint-consistent": "^3.0.1",
|
"remark-preset-lint-consistent": "^4.0.0",
|
||||||
"remark-validate-links": "^10.0.2",
|
"remark-validate-links": "^10.0.2",
|
||||||
"sass": "^1.26.10",
|
"sass": "^1.27.0",
|
||||||
"sass-loader": "^10.0.1",
|
"sass-loader": "^10.0.3",
|
||||||
"typescript": "^4.0.2",
|
"typescript": "^4.0.3",
|
||||||
"vue-cli-plugin-electron-builder": "^2.0.0-rc.4",
|
"vue-cli-plugin-electron-builder": "^2.0.0-rc.4",
|
||||||
"vue-template-compiler": "^2.6.12",
|
"vue-template-compiler": "^2.6.12",
|
||||||
"yaml-lint": "^1.2.4"
|
"yaml-lint": "^1.2.4"
|
||||||
|
|||||||
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OperatingSystem } from '../OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
import { DetectorBuilder } from './DetectorBuilder';
|
import { DetectorBuilder } from './DetectorBuilder';
|
||||||
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
import { IBrowserOsDetector } from './IBrowserOsDetector';
|
||||||
import { OperatingSystem } from '../OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
export class DetectorBuilder {
|
export class DetectorBuilder {
|
||||||
private readonly existingPartsInUserAgent = new Array<string>();
|
private readonly existingPartsInUserAgent = new Array<string>();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OperatingSystem } from '../OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
export interface IBrowserOsDetector {
|
export interface IBrowserOsDetector {
|
||||||
detect(userAgent: string): OperatingSystem;
|
detect(userAgent: string): OperatingSystem;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { BrowserOsDetector } from './BrowserOs/BrowserOsDetector';
|
import { BrowserOsDetector } from './BrowserOs/BrowserOsDetector';
|
||||||
import { IBrowserOsDetector } from './BrowserOs/IBrowserOsDetector';
|
import { IBrowserOsDetector } from './BrowserOs/IBrowserOsDetector';
|
||||||
import { IEnvironment } from './IEnvironment';
|
import { IEnvironment } from './IEnvironment';
|
||||||
import { OperatingSystem } from './OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
interface IEnvironmentVariables {
|
interface IEnvironmentVariables {
|
||||||
readonly window: Window & typeof globalThis;
|
readonly window: Window & typeof globalThis;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OperatingSystem } from './OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
export interface IEnvironment {
|
export interface IEnvironment {
|
||||||
isDesktop: boolean;
|
isDesktop: boolean;
|
||||||
|
|||||||
@@ -1,24 +1,35 @@
|
|||||||
import { Category } from '@/domain/Category';
|
import { Category } from '@/domain/Category';
|
||||||
import { Application } from '@/domain/Application';
|
import { Application } from '@/domain/Application';
|
||||||
import { IApplication } from '@/domain/IApplication';
|
import { IApplication } from '@/domain/IApplication';
|
||||||
|
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||||
import { ApplicationYaml } from 'js-yaml-loader!./../application.yaml';
|
import { ApplicationYaml } from 'js-yaml-loader!./../application.yaml';
|
||||||
import { parseCategory } from './CategoryParser';
|
import { parseCategory } from './CategoryParser';
|
||||||
|
import { ProjectInformation } from '../../domain/ProjectInformation';
|
||||||
|
|
||||||
export function parseApplication(content: ApplicationYaml): IApplication {
|
|
||||||
|
export function parseApplication(content: ApplicationYaml, env: NodeJS.ProcessEnv = process.env): IApplication {
|
||||||
validate(content);
|
validate(content);
|
||||||
const categories = new Array<Category>();
|
const categories = new Array<Category>();
|
||||||
for (const action of content.actions) {
|
for (const action of content.actions) {
|
||||||
const category = parseCategory(action);
|
const category = parseCategory(action);
|
||||||
categories.push(category);
|
categories.push(category);
|
||||||
}
|
}
|
||||||
|
const info = readAppInformation(env);
|
||||||
const app = new Application(
|
const app = new Application(
|
||||||
content.name,
|
info,
|
||||||
content.repositoryUrl,
|
|
||||||
process.env.VUE_APP_VERSION,
|
|
||||||
categories);
|
categories);
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function readAppInformation(environment): IProjectInformation {
|
||||||
|
return new ProjectInformation(
|
||||||
|
environment.VUE_APP_NAME,
|
||||||
|
environment.VUE_APP_VERSION,
|
||||||
|
environment.VUE_APP_REPOSITORY_URL,
|
||||||
|
environment.VUE_APP_HOMEPAGE_URL,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function validate(content: ApplicationYaml): void {
|
function validate(content: ApplicationYaml): void {
|
||||||
if (!content) {
|
if (!content) {
|
||||||
throw new Error('application is null or undefined');
|
throw new Error('application is null or undefined');
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export class ApplicationState implements IApplicationState {
|
|||||||
/** Initially selected scripts */
|
/** Initially selected scripts */
|
||||||
public readonly defaultScripts: Script[]) {
|
public readonly defaultScripts: Script[]) {
|
||||||
this.selection = new UserSelection(app, defaultScripts.map((script) => new SelectedScript(script, false)));
|
this.selection = new UserSelection(app, defaultScripts.map((script) => new SelectedScript(script, false)));
|
||||||
this.code = new ApplicationCode(this.selection, app.version);
|
this.code = new ApplicationCode(this.selection, app.info.version);
|
||||||
this.filter = new UserFilter(app);
|
this.filter = new UserFilter(app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { IFilterResult } from './IFilterResult';
|
|||||||
import { ISignal } from '@/infrastructure/Events/Signal';
|
import { ISignal } from '@/infrastructure/Events/Signal';
|
||||||
|
|
||||||
export interface IUserFilter {
|
export interface IUserFilter {
|
||||||
|
readonly currentFilter: IFilterResult | undefined;
|
||||||
readonly filtered: ISignal<IFilterResult>;
|
readonly filtered: ISignal<IFilterResult>;
|
||||||
readonly filterRemoved: ISignal<void>;
|
readonly filterRemoved: ISignal<void>;
|
||||||
setFilter(filter: string): void;
|
setFilter(filter: string): void;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { Signal } from '@/infrastructure/Events/Signal';
|
|||||||
export class UserFilter implements IUserFilter {
|
export class UserFilter implements IUserFilter {
|
||||||
public readonly filtered = new Signal<IFilterResult>();
|
public readonly filtered = new Signal<IFilterResult>();
|
||||||
public readonly filterRemoved = new Signal<void>();
|
public readonly filterRemoved = new Signal<void>();
|
||||||
|
public currentFilter: IFilterResult | undefined;
|
||||||
|
|
||||||
constructor(private application: IApplication) {
|
constructor(private application: IApplication) {
|
||||||
|
|
||||||
@@ -28,11 +29,12 @@ export class UserFilter implements IUserFilter {
|
|||||||
filteredCategories,
|
filteredCategories,
|
||||||
filter,
|
filter,
|
||||||
);
|
);
|
||||||
|
this.currentFilter = matches;
|
||||||
this.filtered.notify(matches);
|
this.filtered.notify(matches);
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeFilter(): void {
|
public removeFilter(): void {
|
||||||
|
this.currentFilter = undefined;
|
||||||
this.filterRemoved.notify();
|
this.filterRemoved.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
# Structure documented in "./application.yaml.d.ts" (as code)
|
# Structure documented in "./application.yaml.d.ts" (as code)
|
||||||
name: privacy.sexy
|
|
||||||
repositoryUrl: https://github.com/undergroundwires/privacy.sexy
|
|
||||||
actions:
|
actions:
|
||||||
-
|
-
|
||||||
category: Privacy cleanup
|
category: Privacy cleanup
|
||||||
@@ -376,15 +374,14 @@ actions:
|
|||||||
del "%TEMP%\List.txt" /s /f /q
|
del "%TEMP%\List.txt" /s /f /q
|
||||||
del "%TEMP%\tokensonly.txt" /s /f /q
|
del "%TEMP%\tokensonly.txt" /s /f /q
|
||||||
-
|
-
|
||||||
# If somebody is on LTSC 2019 then DefaultUser0 Account is by default created on Installation as telemetry account.
|
name: Delete controversial default0 user
|
||||||
# Hence it must be removed . if by default this account is not found on other builds of win10 then it will not affect any functionality of OS & will ignore it
|
docs: https://github.com/undergroundwires/privacy.sexy/issues/30
|
||||||
name: Delete default0 ghost telemetry user
|
|
||||||
recommend: true
|
recommend: true
|
||||||
code: net user defaultuser0 /delete 2>nul
|
code: net user defaultuser0 /delete 2>nul
|
||||||
-
|
-
|
||||||
name: Empty trash bin
|
name: Empty trash bin
|
||||||
recommend: false
|
recommend: false
|
||||||
code: rd /s %systemdrive%\$Recycle.bin
|
code: Powershell -Command "$bin = (New-Object -ComObject Shell.Application).NameSpace(10);$bin.items() | ForEach { Write-Host "Deleting $($_.Name) from Recycle Bin"; Remove-Item $_.Path -Recurse -Force}"
|
||||||
-
|
-
|
||||||
name: Enable Reset Base in Dism Component Store
|
name: Enable Reset Base in Dism Component Store
|
||||||
recommend: true
|
recommend: true
|
||||||
@@ -429,10 +426,10 @@ actions:
|
|||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: Disable Customer Experience Improvement (CEIP/SQM)
|
name: Disable Customer Experience Improvement (CEIP/SQM)
|
||||||
|
docs: https://docs.microsoft.com/en-us/windows/win32/devnotes/ceipenable
|
||||||
recommend: true
|
recommend: true
|
||||||
code: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "0" /f
|
code: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "0" /f
|
||||||
revertCode: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "1" /f
|
revertCode: reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d "1" /f
|
||||||
docs: https://docs.microsoft.com/en-us/windows/win32/devnotes/ceipenable
|
|
||||||
-
|
-
|
||||||
name: Disable Application Impact Telemetry (AIT)
|
name: Disable Application Impact Telemetry (AIT)
|
||||||
recommend: true
|
recommend: true
|
||||||
@@ -463,8 +460,8 @@ actions:
|
|||||||
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /ENABLE
|
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /ENABLE
|
||||||
-
|
-
|
||||||
name: Disable Webcam Telemetry (devicecensus.exe)
|
name: Disable Webcam Telemetry (devicecensus.exe)
|
||||||
recommend: true
|
|
||||||
docs: https://www.ghacks.net/2019/09/23/what-is-devicecensus-exe-on-windows-10-and-why-does-it-need-internet-connectivity/
|
docs: https://www.ghacks.net/2019/09/23/what-is-devicecensus-exe-on-windows-10-and-why-does-it-need-internet-connectivity/
|
||||||
|
recommend: true
|
||||||
code: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /DISABLE
|
code: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /DISABLE
|
||||||
revertCode: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /ENABLE
|
revertCode: schtasks /change /TN "Microsoft\Windows\Device Information\Device" /ENABLE
|
||||||
-
|
-
|
||||||
@@ -475,12 +472,13 @@ actions:
|
|||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /DISABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /DISABLE
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /DISABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /DISABLE
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v Debugger /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v "Debugger" /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
|
||||||
revertCode: |-
|
revertCode: |-
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /ENABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /ENABLE
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /ENABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /ENABLE
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /ENABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /ENABLE
|
||||||
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /ENABLE
|
schtasks /change /TN "Microsoft\Windows\Application Experience\AitAgent" /ENABLE
|
||||||
|
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe" /v "Debugger" /f
|
||||||
-
|
-
|
||||||
name: Disable telemetry in data collection policy
|
name: Disable telemetry in data collection policy
|
||||||
recommend: true
|
recommend: true
|
||||||
@@ -1149,17 +1147,40 @@ actions:
|
|||||||
recommend: true
|
recommend: true
|
||||||
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableActivityFeed" /d "0" /t REG_DWORD /f
|
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableActivityFeed" /d "0" /t REG_DWORD /f
|
||||||
-
|
-
|
||||||
name: Disable Windows Insider Program
|
category: Disable Windows Insider Program
|
||||||
recommend: true
|
children:
|
||||||
code: |-
|
-
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
|
name: Disable Windows Insider Service
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
|
docs: http://revertservice.com/10/wisvc/
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
|
recommend: true
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
|
code: sc stop "wisvc" & sc config "wisvc" start=disabled
|
||||||
reg add "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /t "REG_DWORD" /d "1" /f
|
revertCode: sc config "wisvc" start=demand
|
||||||
sc stop "wisvc" & sc config "wisvc" start=disabled
|
-
|
||||||
|
name: Do not let Microsoft try features on this build
|
||||||
|
docs: https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.DataCollection::EnableExperimentation
|
||||||
|
recommend: true
|
||||||
|
code: |-
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /t "REG_DWORD" /d 0 /f
|
||||||
|
revertCode: |-
|
||||||
|
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableExperimentation" /f
|
||||||
|
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /f
|
||||||
|
reg delete "HKLM\SOFTWARE\Microsoft\PolicyManager\default\System\AllowExperimentation" /v "value" /f
|
||||||
|
-
|
||||||
|
name: Disable getting preview builds of Windows
|
||||||
|
docs: https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.AllowBuildPreview::AllowBuildPreview
|
||||||
|
recommend: true
|
||||||
|
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f
|
||||||
|
revertCode: reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /f
|
||||||
|
-
|
||||||
|
name: Remove "Windows Insider Program" from Settings
|
||||||
|
docs: https://www.askvg.com/windows-10-tip-remove-windows-insider-program-section-from-settings-page/
|
||||||
|
code: reg add "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /t "REG_DWORD" /d "1" /f
|
||||||
|
revertCode: reg delete "HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility" /v "HideInsiderPage" /f
|
||||||
-
|
-
|
||||||
category: Disable cloud sync
|
category: Disable cloud sync
|
||||||
|
docs: https://support.microsoft.com/en-us/help/4026102/windows-10-about-sync-settings
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: Disable all settings sync
|
name: Disable all settings sync
|
||||||
@@ -1222,7 +1243,9 @@ actions:
|
|||||||
-
|
-
|
||||||
name: Disable Language Setting Sync
|
name: Disable Language Setting Sync
|
||||||
recommend: true
|
recommend: true
|
||||||
code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v Enabled /d 0 /f
|
docs: https://www.tenforums.com/tutorials/4077-turn-off-sync-settings-microsoft-account-windows-10-a.html
|
||||||
|
code: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v "Enabled" /d 0 /f
|
||||||
|
revertCode: reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /t REG_DWORD /v "Enabled" /d 1 /f
|
||||||
-
|
-
|
||||||
category: Configure programs
|
category: Configure programs
|
||||||
children:
|
children:
|
||||||
@@ -1266,21 +1289,24 @@ actions:
|
|||||||
-
|
-
|
||||||
name: Disable visual studio telemetry
|
name: Disable visual studio telemetry
|
||||||
recommend: true
|
recommend: true
|
||||||
code: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v TurnOffSwitch /t REG_DWORD /d 1 /f
|
code: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 1 /f
|
||||||
|
revertCode: reg add "HKCU\Software\Microsoft\VisualStudio\Telemetry" /v "TurnOffSwitch" /t REG_DWORD /d 0 /f
|
||||||
-
|
-
|
||||||
name: Disable Visual Studio feedback
|
name: Disable Visual Studio feedback
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
code: |-
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableFeedbackDialog /t REG_DWORD /d 1 /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 1 /f
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableEmailInput /t REG_DWORD /d 1 /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 1 /f
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v DisableScreenshotCapture /t REG_DWORD /d 1 /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 1 /f
|
||||||
|
revertCode: |-
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableFeedbackDialog" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableEmailInput" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\VisualStudio\Feedback" /v "DisableScreenshotCapture" /t REG_DWORD /d 0 /f
|
||||||
-
|
-
|
||||||
name: Stop and disable Visual Studio Standard Collector Service
|
name: Stop and disable Visual Studio Standard Collector Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
code: sc stop "VSStandardCollectorService150" & sc config "VSStandardCollectorService150" start=disabled
|
||||||
sc stop "VSStandardCollectorService150"
|
revertCode: sc config "VSStandardCollectorService150" start=auto & sc start "VSStandardCollectorService150"
|
||||||
net stop VSStandardCollectorService150 2>nul
|
|
||||||
sc config "VSStandardCollectorService150" start=disabled
|
|
||||||
-
|
-
|
||||||
category: Configure Windows Defender
|
category: Configure Windows Defender
|
||||||
children:
|
children:
|
||||||
@@ -1313,7 +1339,7 @@ actions:
|
|||||||
-
|
-
|
||||||
name: Do not send file samples for further analysis
|
name: Do not send file samples for further analysis
|
||||||
recommend: true
|
recommend: true
|
||||||
docc:
|
doc:
|
||||||
- https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-defender#defender-submitsamplesconsent
|
- https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-defender#defender-submitsamplesconsent
|
||||||
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f
|
code: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f
|
||||||
revertCode: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 1 /f
|
revertCode: reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 1 /f
|
||||||
@@ -1515,7 +1541,7 @@ actions:
|
|||||||
# sc stop "ClickToRunSvc" & sc config "ClickToRunSvc" start=disabled
|
# sc stop "ClickToRunSvc" & sc config "ClickToRunSvc" start=disabled
|
||||||
# revertCode: |-
|
# revertCode: |-
|
||||||
# schtasks /change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /ENABLE
|
# schtasks /change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /ENABLE
|
||||||
# sc config "ClickToRunSvc" start=auto
|
# sc config "ClickToRunSvc" start=auto & sc start "ClickToRunSvc"
|
||||||
-
|
-
|
||||||
name: Disable Subscription Heartbeat
|
name: Disable Subscription Heartbeat
|
||||||
recommend: false
|
recommend: false
|
||||||
@@ -1641,9 +1667,9 @@ actions:
|
|||||||
-
|
-
|
||||||
name: Disable Chrome metrics reporting
|
name: Disable Chrome metrics reporting
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
docs: https://www.stigviewer.com/stig/google_chrome_v23_windows/2013-01-11/finding/V-35780
|
||||||
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
code: reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
||||||
reg add "HKCU\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /t REG_DWORD /d 0 /f
|
revertCode: reg delete "HKLM\SOFTWARE\Policies\Google\Chrome" /v "MetricsReportingEnabled" /f
|
||||||
-
|
-
|
||||||
category: Configure Mozilla Firefox telemetry
|
category: Configure Mozilla Firefox telemetry
|
||||||
children:
|
children:
|
||||||
@@ -1677,27 +1703,38 @@ actions:
|
|||||||
code: |-
|
code: |-
|
||||||
sc stop "gupdate" & sc config "gupdate" start=disabled
|
sc stop "gupdate" & sc config "gupdate" start=disabled
|
||||||
sc stop "gupdatem" & sc config "gupdatem" start=disabled
|
sc stop "gupdatem" & sc config "gupdatem" start=disabled
|
||||||
schtasks /Change /DISABLE /TN "GoogleUpdateTaskMachineCore"
|
schtasks /change /disable /tn "GoogleUpdateTaskMachineCore"
|
||||||
schtasks /Change /DISABLE /TN "GoogleUpdateTaskMachineUA"
|
schtasks /change /disable /tn "GoogleUpdateTaskMachineUA"
|
||||||
|
revertCode: |-
|
||||||
|
sc config "gupdate" start=auto & sc start "gupdate"
|
||||||
|
sc config "gupdatem" start=auto & sc start "gupdatem"
|
||||||
|
schtasks /Change /enable /tn "GoogleUpdateTaskMachineCore"
|
||||||
|
schtasks /change /enable /tn "GoogleUpdateTaskMachineUA"
|
||||||
-
|
-
|
||||||
name: Disable Adobe Acrobat update service
|
name: Disable Adobe Acrobat update service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
code: |-
|
||||||
sc stop "AdobeARMservice" & sc config AdobeARMservice start=disabled
|
sc stop "AdobeARMservice" & sc config "AdobeARMservice" start=disabled
|
||||||
sc stop "adobeupdateservice" & sc config adobeupdateservice start=disabled
|
sc stop "adobeupdateservice" & sc config "adobeupdateservice" start=disabled
|
||||||
sc stop "adobeflashplayerupdatesvc" & sc config adobeflashplayerupdatesvc start=disabled
|
sc stop "adobeflashplayerupdatesvc" & sc config "adobeflashplayerupdatesvc" start=disabled
|
||||||
schtasks /change /tn "Adobe Acrobat Update Task" /disable
|
schtasks /change /tn "Adobe Acrobat Update Task" /disable
|
||||||
schtasks /change /tn "Adobe Flash Player Updater" /disable
|
schtasks /change /tn "Adobe Flash Player Updater" /disable
|
||||||
|
revertCode: |-
|
||||||
|
sc config "AdobeARMservice" start=auto & sc start "AdobeARMservice"
|
||||||
|
sc config "adobeupdateservice" start=auto & sc start "adobeupdateservice"
|
||||||
|
sc config "adobeflashplayerupdatesvc" start=auto & sc start "adobeflashplayerupdatesvc"
|
||||||
|
schtasks /change /tn "Adobe Acrobat Update Task" /enable
|
||||||
|
schtasks /change /tn "Adobe Flash Player Updater" /enable
|
||||||
-
|
-
|
||||||
name: Disable Razer Game Scanner Service
|
name: Disable Razer Game Scanner Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
code: sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
|
||||||
sc stop "Razer Game Scanner Service" & sc config "Razer Game Scanner Service" start=disabled
|
revertCode: sc config "Razer Game Scanner Service" start=demand
|
||||||
-
|
-
|
||||||
name: Disable Logitech Gaming Registry Service
|
name: Disable Logitech Gaming Registry Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: |-
|
code: sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
|
||||||
sc stop "LogiRegistryService" & sc config "LogiRegistryService" start=disabled
|
revertCode: sc config "LogiRegistryService" start=auto & sc start "LogiRegistryService"
|
||||||
-
|
-
|
||||||
name: Disable Dropbox auto update service
|
name: Disable Dropbox auto update service
|
||||||
recommend: true
|
recommend: true
|
||||||
@@ -1706,6 +1743,11 @@ actions:
|
|||||||
sc stop "dbupdatem" & sc config "dbupdatem" start=disabled
|
sc stop "dbupdatem" & sc config "dbupdatem" start=disabled
|
||||||
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineCore"
|
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineCore"
|
||||||
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineUA"
|
schtasks /Change /DISABLE /TN "DropboxUpdateTaskMachineUA"
|
||||||
|
revertCode: |-
|
||||||
|
sc config "dbupdate" start=auto & sc start "dbupdate"
|
||||||
|
sc config "dbupdatem" start=auto & sc start "dbupdatem"
|
||||||
|
schtasks /Change /ENABLE /TN "DropboxUpdateTaskMachineCore"
|
||||||
|
schtasks /Change /ENABLE /TN "DropboxUpdateTaskMachineUA"
|
||||||
-
|
-
|
||||||
category: Disable Media Player data collection
|
category: Disable Media Player data collection
|
||||||
children:
|
children:
|
||||||
@@ -2075,7 +2117,7 @@ actions:
|
|||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" /t "REG_DWORD" /d "3" /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" /t "REG_DWORD" /d "3" /f
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" /t "REG_DWORD" /d "0" /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" /t "REG_DWORD" /d "0" /f
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" /t "REG_DWORD" /d "0" /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" /t "REG_DWORD" /d "0" /f
|
||||||
sc config "UsoSvc" start=auto
|
sc config "UsoSvc" start=auto & sc start "UsoSvc"
|
||||||
-
|
-
|
||||||
category: UI for privacy
|
category: UI for privacy
|
||||||
children:
|
children:
|
||||||
@@ -2251,47 +2293,56 @@ actions:
|
|||||||
name: Delivery Optimization (P2P Windows Updates)
|
name: Delivery Optimization (P2P Windows Updates)
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "DoSvc" & sc config "DoSvc" start=disabled
|
code: sc stop "DoSvc" & sc config "DoSvc" start=disabled
|
||||||
|
revertCode: sc config "DoSvc" start=auto & sc start "DoSvc"
|
||||||
-
|
-
|
||||||
name: Microsoft Windows Live ID Service
|
name: Microsoft Windows Live ID Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "wlidsvc" & sc config "wlidsvc" start=demand
|
code: sc stop "wlidsvc" & sc config "wlidsvc" start=demand
|
||||||
|
revertCode: sc config "wlidsvc" start=demand
|
||||||
-
|
-
|
||||||
name: Program Compatibility Assistant Service
|
name: Program Compatibility Assistant Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "PcaSvc" & sc config "PcaSvc" start=disabled
|
code: sc stop "PcaSvc" & sc config "PcaSvc" start=disabled
|
||||||
|
revertCode: sc config "PcaSvc" start=demand
|
||||||
-
|
-
|
||||||
name: Downloaded Maps Manager
|
name: Downloaded Maps Manager
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "MapsBroker" & sc config "MapsBroker" start=disabled
|
code: sc stop "MapsBroker" & sc config "MapsBroker" start=disabled
|
||||||
|
revertCode: sc config "MapsBroker" start=auto & sc start "MapsBroker"
|
||||||
-
|
-
|
||||||
name: Microsoft Retail Demo experience
|
name: Microsoft Retail Demo experience
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "RetailDemo" & sc config "RetailDemo" start=disabled
|
code: sc stop "RetailDemo" & sc config "RetailDemo" start=disabled
|
||||||
|
revertCode: sc config "RetailDemo" start=demand
|
||||||
-
|
-
|
||||||
name: Mail, contact, calendar and user data synchronization.
|
category: Mail, contact, calendar and user data synchronization
|
||||||
recommend: false
|
children:
|
||||||
code: |-
|
-
|
||||||
sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
|
name: User Data Storage (UnistoreSvc) Service
|
||||||
sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
|
code: sc stop "UnistoreSvc" & sc config "UnistoreSvc" start=disabled
|
||||||
reg add HKLM\SYSTEM\CurrentControlSet\Services\OneSyncSvc /V Start /t REG_DWORD /d "0x4" /f
|
revertCode: sc config "UnistoreSvc" start=demand
|
||||||
|
-
|
||||||
|
name: Sync Host (OneSyncSvc) Service Service
|
||||||
|
code: sc stop "OneSyncSvc" & sc config "OneSyncSvc" start=disabled
|
||||||
|
revertCode: sc config "OneSyncSvc" start=auto & sc start "OneSyncSvc"
|
||||||
-
|
-
|
||||||
name: Contact data indexing
|
name: Contact data indexing
|
||||||
recommend: false
|
code: sc stop "PimIndexMaintenanceSvc" & sc config "PimIndexMaintenanceSvc" start=disabled
|
||||||
code: |-
|
revertCode: sc config "PimIndexMaintenanceSvc" start=demand
|
||||||
sc stop "PimIndexMaintenanceSvc" & sc config "PimIndexMaintenanceSvc" start=disabled
|
|
||||||
-
|
-
|
||||||
name: App user data access
|
name: App user data access
|
||||||
recommend: false
|
|
||||||
code: sc stop "UserDataSvc" & sc config "UserDataSvc" start=disabled
|
code: sc stop "UserDataSvc" & sc config "UserDataSvc" start=disabled
|
||||||
|
revertCode: sc config "UserDataSvc" start=demand
|
||||||
-
|
-
|
||||||
name: Text messaging
|
name: Text messaging
|
||||||
recommend: false
|
|
||||||
code: sc stop "MessagingService" & sc config "MessagingService" start=disabled
|
code: sc stop "MessagingService" & sc config "MessagingService" start=disabled
|
||||||
|
revertCode: sc config "MessagingService" start=demand
|
||||||
-
|
-
|
||||||
name: Windows Push Notification Service
|
name: Windows Push Notification Service
|
||||||
recommend: true
|
recommend: true
|
||||||
docs: https://en.wikipedia.org/wiki/Windows_Push_Notification_Service#Privacy_Issue
|
docs: https://en.wikipedia.org/wiki/Windows_Push_Notification_Service#Privacy_Issue
|
||||||
code: sc stop "WpnService" & sc config "WpnService" start=disabled
|
code: sc stop "WpnService" & sc config "WpnService" start=disabled
|
||||||
|
revertCode: sc config "WpnService" start=auto & sc start "WpnService"
|
||||||
-
|
-
|
||||||
category: Disable Xbox services
|
category: Disable Xbox services
|
||||||
children:
|
children:
|
||||||
@@ -2299,7 +2350,7 @@ actions:
|
|||||||
name: Xbox Live Auth Manager
|
name: Xbox Live Auth Manager
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "XblAuthManager" & sc config "XblAuthManager" start=disabled
|
code: sc stop "XblAuthManager" & sc config "XblAuthManager" start=disabled
|
||||||
revetCode: sc config "XblAuthManager" start=demand
|
revertCode: sc config "XblAuthManager" start=demand
|
||||||
-
|
-
|
||||||
name: Xbox Live Game Save
|
name: Xbox Live Game Save
|
||||||
recommend: true
|
recommend: true
|
||||||
@@ -2309,13 +2360,13 @@ actions:
|
|||||||
name: Xbox Live Networking Service
|
name: Xbox Live Networking Service
|
||||||
recommend: true
|
recommend: true
|
||||||
code: sc stop "XboxNetApiSvc" & sc config "XboxNetApiSvc" start=disabled
|
code: sc stop "XboxNetApiSvc" & sc config "XboxNetApiSvc" start=disabled
|
||||||
revetCode: sc config "XboxNetApiSvc" start=demand
|
revertCode: sc config "XboxNetApiSvc" start=demand
|
||||||
-
|
-
|
||||||
name: Volume Shadow Copy Service
|
name: Volume Shadow Copy Service
|
||||||
recommend: true
|
recommend: true
|
||||||
docs: https://docs.microsoft.com/en-us/windows-server/storage/file-server/volume-shadow-copy-service
|
docs: https://docs.microsoft.com/en-us/windows-server/storage/file-server/volume-shadow-copy-service
|
||||||
code: sc stop "VSS" & sc config "VSS" start=disabled
|
code: sc stop "VSS" & sc config "VSS" start=disabled
|
||||||
revertCode: sc config "vss" start=auto
|
revertCode: sc config "VSS" start=demand
|
||||||
-
|
-
|
||||||
category: Remove bloatware
|
category: Remove bloatware
|
||||||
children:
|
children:
|
||||||
@@ -2870,7 +2921,7 @@ actions:
|
|||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSyncNGSC" /d 0 /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSyncNGSC" /d 0 /f
|
||||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSync" /d 0 /f
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /t REG_DWORD /v "DisableFileSync" /d 0 /f
|
||||||
-
|
-
|
||||||
name: Prevent automatical OneDrive install for current user
|
name: Prevent automatic OneDrive install for current user
|
||||||
code: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
|
code: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
|
||||||
revertCode: |-
|
revertCode: |-
|
||||||
if %PROCESSOR_ARCHITECTURE%==x86 (
|
if %PROCESSOR_ARCHITECTURE%==x86 (
|
||||||
@@ -2924,9 +2975,9 @@ actions:
|
|||||||
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
||||||
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
dism /Online /Disable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
||||||
revertCode: |-
|
revertCode: |-
|
||||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
|
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x64" /NoRestart
|
||||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-x84" /NoRestart
|
||||||
revertCode: dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
dism /Online /Enable-Feature /FeatureName:"Internet-Explorer-Optional-amd64" /NoRestart
|
||||||
recommend: false
|
recommend: false
|
||||||
-
|
-
|
||||||
name: Legacy Components feature
|
name: Legacy Components feature
|
||||||
@@ -3067,44 +3118,44 @@ actions:
|
|||||||
-
|
-
|
||||||
name: DirectX Configuration Database capability
|
name: DirectX Configuration Database capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "DirectX.Configuration.Database*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "DirectX.Configuration.Database*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "DirectX.Configuration.Database*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"DirectX.Configuration.Database*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Internet Explorer 11 capability
|
name: Internet Explorer 11 capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Browser.InternetExplorer*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Browser.InternetExplorer*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Browser.InternetExplorer*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Browser.InternetExplorer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Math Recognizer capability
|
name: Math Recognizer capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "MathRecognizer*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "MathRecognizer*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "MathRecognizer*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"MathRecognizer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: OneSync capability (breaks Mail, People, and Calendar)
|
name: OneSync capability (breaks Mail, People, and Calendar)
|
||||||
docs: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/features-on-demand-non-language-fod#onesync
|
docs: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/features-on-demand-non-language-fod#onesync
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OneCoreUAP.OneSync*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "OneCoreUAP.OneSync*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OneCoreUAP.OneSync*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OneCoreUAP.OneSync*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: OpenSSH client capability
|
name: OpenSSH client capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Client*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Client*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Client*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OpenSSH.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: PowerShell ISE capability
|
name: PowerShell ISE capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.PowerShell.ISE*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.PowerShell.ISE*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.PowerShell.ISE*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.PowerShell.ISE*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Print Management Console capability
|
name: Print Management Console capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Management.Console*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Management.Console*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Management.Console*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.Management.Console*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Quick Assist capability
|
name: Quick Assist capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.Support.QuickAssist*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.Support.QuickAssist*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.Support.QuickAssist*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.Support.QuickAssist*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Steps Recorder capability
|
name: Steps Recorder capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.StepsRecorder*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.StepsRecorder*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.StepsRecorder*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.StepsRecorder*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Windows Fax and Scan capability
|
name: Windows Fax and Scan capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Fax.Scan*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Fax.Scan*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.Fax.Scan*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.Fax.Scan*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
# Following are excluded because:
|
# Following are excluded because:
|
||||||
# 1. They are not widely considered as "bloatware" as the community
|
# 1. They are not widely considered as "bloatware" as the community
|
||||||
# 2. Do not have known privacy issues
|
# 2. Do not have known privacy issues
|
||||||
@@ -3112,190 +3163,190 @@ actions:
|
|||||||
# -
|
# -
|
||||||
# name: WordPad capability
|
# name: WordPad capability
|
||||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.WordPad*" | Remove-WindowsCapability -Online"
|
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.WordPad*" | Remove-WindowsCapability -Online"
|
||||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.WordPad*" | Add-WindowsCapability -Online"
|
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.WordPad*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
# -
|
# -
|
||||||
# name: Paint capability
|
# name: Paint capability
|
||||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.MSPaint*" | Remove-WindowsCapability -Online"
|
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.MSPaint*" | Remove-WindowsCapability -Online"
|
||||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.MSPaint*" | Add-WindowsCapability -Online"
|
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.MSPaint*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
# -
|
# -
|
||||||
# name: Notepad capability
|
# name: Notepad capability
|
||||||
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.Notepad*" | Remove-WindowsCapability -Online"
|
# code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.Notepad*" | Remove-WindowsCapability -Online"
|
||||||
# revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.Notepad*" | Add-WindowsCapability -Online"
|
# revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.Notepad*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Not preinstalled
|
category: Not preinstalled
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: .NET Framework capability
|
name: .NET Framework capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "NetFX3*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "NetFX3*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "NetFX3*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"NetFX3*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Mixed Reality capability
|
name: Mixed Reality capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Analog.Holographic.Desktop*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Analog.Holographic.Desktop*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Analog.Holographic.Desktop*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Analog.Holographic.Desktop*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Wireless Display capability
|
name: Wireless Display capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.WirelessDisplay.Connect*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "App.WirelessDisplay.Connect*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "App.WirelessDisplay.Connect*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"App.WirelessDisplay.Connect*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Accessibility - Braille Support capability
|
name: Accessibility - Braille Support capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Accessibility.Braille*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Accessibility.Braille*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Accessibility.Braille*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Accessibility.Braille*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Developer Mode capability
|
name: Developer Mode capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.DeveloperMode.Core*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.DeveloperMode.Core*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.DeveloperMode.Core*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Tools.DeveloperMode.Core*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Graphics Tools capability
|
name: Graphics Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.Graphics.DirectX*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.Graphics.DirectX*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Tools.Graphics.DirectX*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Tools.Graphics.DirectX*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: IrDA capability
|
name: IrDA capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Network.Irda*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Network.Irda*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Network.Irda*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Network.Irda*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Microsoft WebDriver capability
|
name: Microsoft WebDriver capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.WebDriver*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.WebDriver*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.WebDriver*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.WebDriver*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: MSIX Packaging Tool Driver capability
|
name: MSIX Packaging Tool Driver capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Msix.PackagingTool.Driver*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Msix.PackagingTool.Driver*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Msix.PackagingTool.Driver*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Msix.PackagingTool.Driver*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Networking tools
|
category: Networking tools
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: RAS Connection Manager Administration Kit (CMAK) capability
|
name: RAS Connection Manager Administration Kit (CMAK) capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "RasCMAK.Client*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "RasCMAK.Client*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "RasCMAK.Client*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"RasCMAK.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: RIP Listener capability
|
name: RIP Listener capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "RIP.Listener*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "RIP.Listener*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "RIP.Listener*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"RIP.Listener*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Simple Network Management Protocol (SNMP) capability
|
name: Simple Network Management Protocol (SNMP) capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "SNMP.Client*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "SNMP.Client*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "SNMP.Client*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"SNMP.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: SNMP WMI Provider capability
|
name: SNMP WMI Provider capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "WMI-SNMP-Provider.Client*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "WMI-SNMP-Provider.Client*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "WMI-SNMP-Provider.Client*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"WMI-SNMP-Provider.Client*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: OpenSSH Server capability
|
name: OpenSSH Server capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Server*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Server*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "OpenSSH.Server*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"OpenSSH.Server*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Printing
|
category: Printing
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: Enterprise Cloud Print capability
|
name: Enterprise Cloud Print capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.EnterpriseCloudPrint*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.EnterpriseCloudPrint*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.EnterpriseCloudPrint*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.EnterpriseCloudPrint*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Mopria Cloud Service capability
|
name: Mopria Cloud Service capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.MopriaCloudService*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Print.MopriaCloudService*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Print.MopriaCloudService*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Print.MopriaCloudService*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Remote server administration tools (RSAT)
|
category: Remote server administration tools (RSAT)
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: Active Directory Domain Services and Lightweight Directory Services Tools capability
|
name: Active Directory Domain Services and Lightweight Directory Services Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.ActiveDirectory.DS-LDS.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: BitLocker Drive Encryption Administration Utilities capability
|
name: BitLocker Drive Encryption Administration Utilities capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.BitLocker.Recovery.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.BitLocker.Recovery.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.BitLocker.Recovery.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.BitLocker.Recovery.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Active Directory Certificate Services Tools v
|
name: Active Directory Certificate Services Tools v
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.CertificateServices.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.CertificateServices.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.CertificateServices.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.CertificateServices.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: DHCP Server Tools capability
|
name: DHCP Server Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.DHCP.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.DHCP.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.DHCP.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.DHCP.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: DNS Server Tools capability
|
name: DNS Server Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Dns.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Dns.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Dns.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.Dns.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Failover Clustering Tools capability
|
name: Failover Clustering Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FailoverCluster.Management.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FailoverCluster.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FailoverCluster.Management.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.FailoverCluster.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: File Services Tools capability
|
name: File Services Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FileServices.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FileServices.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.FileServices.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.FileServices.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Group Policy Management Tools capability
|
name: Group Policy Management Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.GroupPolicy.Management.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.GroupPolicy.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: IP Address Management (IPAM) Client capability
|
name: IP Address Management (IPAM) Client capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.IPAM.Client.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.IPAM.Client.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.IPAM.Client.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.IPAM.Client.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Data Center Bridging LLDP Tools capability
|
name: Data Center Bridging LLDP Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.LLDP.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.LLDP.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.LLDP.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.LLDP.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Network Controller Management Tools capability
|
name: Network Controller Management Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkController.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkController.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkController.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.NetworkController.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Network Load Balancing Tools capability
|
name: Network Load Balancing Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkLoadBalancing.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkLoadBalancing.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.NetworkLoadBalancing.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.NetworkLoadBalancing.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Remote Access Management Tools capability
|
name: Remote Access Management Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.RemoteAccess.Management.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.RemoteAccess.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.RemoteAccess.Management.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.RemoteAccess.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Server Manager Tools
|
name: Server Manager Tools
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ServerManager.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ServerManager.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.ServerManager.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.ServerManager.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Shielded VM Tools capability
|
name: Shielded VM Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Shielded.VM.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Shielded.VM.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.Shielded.VM.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.Shielded.VM.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Storage Replica Module for Windows PowerShell capability
|
name: Storage Replica Module for Windows PowerShell capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageReplica.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageReplica.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageReplica.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.StorageReplica.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Volume Activation Tools capability
|
name: Volume Activation Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.VolumeActivation.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.VolumeActivation.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.VolumeActivation.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.VolumeActivation.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Windows Server Update Services Tools capability
|
name: Windows Server Update Services Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.WSUS.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.WSUS.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.WSUS.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.WSUS.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Storage Migration Service Management Tools capability
|
name: Storage Migration Service Management Tools capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageMigrationService.Management.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageMigrationService.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.StorageMigrationService.Management.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.StorageMigrationService.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Systems Insights Module for Windows PowerShell capability
|
name: Systems Insights Module for Windows PowerShell capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.SystemInsights.Management.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.SystemInsights.Management.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Rsat.SystemInsights.Management.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.SystemInsights.Management.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Storage
|
category: Storage
|
||||||
children:
|
children:
|
||||||
-
|
-
|
||||||
name: Windows Storage Management capability
|
name: Windows Storage Management capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.StorageManagement*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.StorageManagement*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.Windows.StorageManagement*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.Windows.StorageManagement*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: OneCore Storage Management capability
|
name: OneCore Storage Management capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.OneCore.StorageManagement*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.OneCore.StorageManagement*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Microsoft.OneCore.StorageManagement*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Microsoft.OneCore.StorageManagement*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: Windows Emergency Management Services and Serial Console capability
|
name: Windows Emergency Management Services and Serial Console capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Windows.Desktop.EMS-SAC.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
name: XPS Viewer capability
|
name: XPS Viewer capability
|
||||||
code: Powershell -Command "Get-WindowsCapability -Online -Name "XPS.Viewer*" | Remove-WindowsCapability -Online"
|
code: Powershell -Command "Get-WindowsCapability -Online -Name "XPS.Viewer*" | Remove-WindowsCapability -Online"
|
||||||
revertCode: Powershell -Command "Get-WindowsCapability -Online -Name "XPS.Viewer*" | Add-WindowsCapability -Online"
|
revertCode: Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"XPS.Viewer*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online"
|
||||||
-
|
-
|
||||||
category: Advanced settings
|
category: Advanced settings
|
||||||
children:
|
children:
|
||||||
@@ -3347,4 +3398,4 @@ actions:
|
|||||||
code: |-
|
code: |-
|
||||||
del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
||||||
copy "%~dpnx0" "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat"
|
copy "%~dpnx0" "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat"
|
||||||
revertCode: del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
revertCode: del /f /q %AppData%\Microsoft\Windows\Start Menu\Programs\Startup\privacy-cleanup.bat
|
||||||
|
|||||||
2
src/application/application.yaml.d.ts
vendored
2
src/application/application.yaml.d.ts
vendored
@@ -19,8 +19,6 @@ declare module 'js-yaml-loader!*' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ApplicationYaml {
|
export interface ApplicationYaml {
|
||||||
name: string;
|
|
||||||
repositoryUrl: string;
|
|
||||||
actions: ReadonlyArray<YamlCategory>;
|
actions: ReadonlyArray<YamlCategory>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { IEntity } from '../infrastructure/Entity/IEntity';
|
|||||||
import { ICategory } from './ICategory';
|
import { ICategory } from './ICategory';
|
||||||
import { IScript } from './IScript';
|
import { IScript } from './IScript';
|
||||||
import { IApplication } from './IApplication';
|
import { IApplication } from './IApplication';
|
||||||
|
import { IProjectInformation } from './IProjectInformation';
|
||||||
|
|
||||||
export class Application implements IApplication {
|
export class Application implements IApplication {
|
||||||
public get totalScripts(): number { return this.flattened.allScripts.length; }
|
public get totalScripts(): number { return this.flattened.allScripts.length; }
|
||||||
@@ -10,13 +11,11 @@ export class Application implements IApplication {
|
|||||||
private readonly flattened: IFlattenedApplication;
|
private readonly flattened: IFlattenedApplication;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public readonly name: string,
|
public readonly info: IProjectInformation,
|
||||||
public readonly repositoryUrl: string,
|
|
||||||
public readonly version: string,
|
|
||||||
public readonly actions: ReadonlyArray<ICategory>) {
|
public readonly actions: ReadonlyArray<ICategory>) {
|
||||||
if (!name) { throw Error('Application has no name'); }
|
if (!info) {
|
||||||
if (!repositoryUrl) { throw Error('Application has no repository url'); }
|
throw new Error('info is undefined');
|
||||||
if (!version) { throw Error('Version cannot be empty'); }
|
}
|
||||||
this.flattened = flatten(actions);
|
this.flattened = flatten(actions);
|
||||||
ensureValid(this.flattened);
|
ensureValid(this.flattened);
|
||||||
ensureNoDuplicates(this.flattened.allCategories);
|
ensureNoDuplicates(this.flattened.allCategories);
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { IScript } from '@/domain/IScript';
|
import { IScript } from '@/domain/IScript';
|
||||||
import { ICategory } from '@/domain/ICategory';
|
import { ICategory } from '@/domain/ICategory';
|
||||||
|
import { IProjectInformation } from './IProjectInformation';
|
||||||
|
|
||||||
export interface IApplication {
|
export interface IApplication {
|
||||||
readonly name: string;
|
readonly info: IProjectInformation;
|
||||||
readonly repositoryUrl: string;
|
|
||||||
readonly version: string;
|
|
||||||
readonly totalScripts: number;
|
readonly totalScripts: number;
|
||||||
readonly totalCategories: number;
|
readonly totalCategories: number;
|
||||||
readonly actions: ReadonlyArray<ICategory>;
|
readonly actions: ReadonlyArray<ICategory>;
|
||||||
|
|||||||
11
src/domain/IProjectInformation.ts
Normal file
11
src/domain/IProjectInformation.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { OperatingSystem } from './OperatingSystem';
|
||||||
|
export interface IProjectInformation {
|
||||||
|
readonly name: string;
|
||||||
|
readonly version: string;
|
||||||
|
readonly repositoryUrl: string;
|
||||||
|
readonly homepage: string;
|
||||||
|
readonly feedbackUrl: string;
|
||||||
|
readonly releaseUrl: string;
|
||||||
|
readonly repositoryWebUrl: string;
|
||||||
|
getDownloadUrl(os: OperatingSystem): string;
|
||||||
|
}
|
||||||
55
src/domain/ProjectInformation.ts
Normal file
55
src/domain/ProjectInformation.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import { IProjectInformation } from './IProjectInformation';
|
||||||
|
import { OperatingSystem } from './OperatingSystem';
|
||||||
|
|
||||||
|
export class ProjectInformation implements IProjectInformation {
|
||||||
|
public readonly repositoryWebUrl: string;
|
||||||
|
constructor(
|
||||||
|
public readonly name: string,
|
||||||
|
public readonly version: string,
|
||||||
|
public readonly repositoryUrl: string,
|
||||||
|
public readonly homepage: string,
|
||||||
|
) {
|
||||||
|
if (!name) {
|
||||||
|
throw new Error('name is undefined');
|
||||||
|
}
|
||||||
|
if (!version || +version <= 0) {
|
||||||
|
throw new Error('version should be higher than zero');
|
||||||
|
}
|
||||||
|
if (!repositoryUrl) {
|
||||||
|
throw new Error('repositoryUrl is undefined');
|
||||||
|
}
|
||||||
|
if (!homepage) {
|
||||||
|
throw new Error('homepage is undefined');
|
||||||
|
}
|
||||||
|
this.repositoryWebUrl = getWebUrl(this.repositoryUrl);
|
||||||
|
}
|
||||||
|
public getDownloadUrl(os: OperatingSystem): string {
|
||||||
|
return `${this.repositoryWebUrl}/releases/download/${this.version}/${getFileName(os, this.version)}`;
|
||||||
|
}
|
||||||
|
public get feedbackUrl(): string {
|
||||||
|
return `${this.repositoryWebUrl}/issues`;
|
||||||
|
}
|
||||||
|
public get releaseUrl(): string {
|
||||||
|
return `${this.repositoryWebUrl}/releases/tag/${this.version}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWebUrl(gitUrl: string) {
|
||||||
|
if (gitUrl.endsWith('.git')) {
|
||||||
|
return gitUrl.substring(0, gitUrl.length - 4);
|
||||||
|
}
|
||||||
|
return gitUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFileName(os: OperatingSystem, version: string): string {
|
||||||
|
switch (os) {
|
||||||
|
case OperatingSystem.Linux:
|
||||||
|
return `privacy.sexy-${version}.AppImage`;
|
||||||
|
case OperatingSystem.macOS:
|
||||||
|
return `privacy.sexy-${version}.dmg`;
|
||||||
|
case OperatingSystem.Windows:
|
||||||
|
return `privacy.sexy-Setup-${version}.exe`;
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported os: ${OperatingSystem[os]}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
import { ApplicationBootstrapper } from './presentation/Bootstrapping/ApplicationBootstrapper';
|
import { ApplicationBootstrapper } from './presentation/Bootstrapping/ApplicationBootstrapper';
|
||||||
|
import 'core-js/fn/array/flat-map'; // Here until Vue 3 & CLI v4 https://github.com/vuejs/vue-cli/issues/3834
|
||||||
|
|
||||||
new ApplicationBootstrapper()
|
new ApplicationBootstrapper()
|
||||||
.bootstrap(Vue);
|
.bootstrap(Vue);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
state.filter.filtered.on(this.handleFiltered);
|
state.filter.filtered.on(this.handleFiltered);
|
||||||
// Update initial state
|
// Update initial state
|
||||||
await this.initializeNodesAsync(this.categoryId);
|
await this.initializeNodesAsync(this.categoryId);
|
||||||
|
await this.initializeFilter(state.filter.currentFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async toggleNodeSelectionAsync(event: INodeSelectedEvent) {
|
public async toggleNodeSelectionAsync(event: INodeSelectedEvent) {
|
||||||
@@ -84,6 +85,14 @@
|
|||||||
(category: ICategory) => node.id === getCategoryNodeId(category));
|
(category: ICategory) => node.id === getCategoryNodeId(category));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private initializeFilter(currentFilter: IFilterResult | undefined) {
|
||||||
|
if (!currentFilter) {
|
||||||
|
this.handleFilterRemoved();
|
||||||
|
} else {
|
||||||
|
this.handleFiltered(currentFilter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private handleSelectionChanged(selectedScripts: ReadonlyArray<SelectedScript>): void {
|
private handleSelectionChanged(selectedScripts: ReadonlyArray<SelectedScript>): void {
|
||||||
this.selectedNodeIds = selectedScripts
|
this.selectedNodeIds = selectedScripts
|
||||||
.map((node) => node.id);
|
.map((node) => node.id);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
Node,
|
Node,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class SelectableTree extends Vue {
|
export default class SelectableTree extends Vue { // Keep it stateless to make it easier to switch out
|
||||||
@Prop() public filterPredicate?: FilterPredicate;
|
@Prop() public filterPredicate?: FilterPredicate;
|
||||||
@Prop() public filterText?: string;
|
@Prop() public filterText?: string;
|
||||||
@Prop() public selectedNodeIds?: ReadonlyArray<string>;
|
@Prop() public selectedNodeIds?: ReadonlyArray<string>;
|
||||||
|
|||||||
@@ -72,10 +72,9 @@
|
|||||||
public isSearching = false;
|
public isSearching = false;
|
||||||
public searchHasMatches = false;
|
public searchHasMatches = false;
|
||||||
|
|
||||||
|
|
||||||
public async mounted() {
|
public async mounted() {
|
||||||
const state = await this.getCurrentStateAsync();
|
const state = await this.getCurrentStateAsync();
|
||||||
this.repositoryUrl = state.app.repositoryUrl;
|
this.repositoryUrl = state.app.info.repositoryWebUrl;
|
||||||
state.filter.filterRemoved.on(() => {
|
state.filter.filterRemoved.on(() => {
|
||||||
this.isSearching = false;
|
this.isSearching = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ const NothingChosenCode =
|
|||||||
.appendCommentLine(' 📙 Come back regularly to apply latest version for stronger privacy and security.')
|
.appendCommentLine(' 📙 Come back regularly to apply latest version for stronger privacy and security.')
|
||||||
.appendLine()
|
.appendLine()
|
||||||
.appendCommentLine('-- 🧐 Why privacy.sexy')
|
.appendCommentLine('-- 🧐 Why privacy.sexy')
|
||||||
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other softwares on it.')
|
.appendCommentLine(' ✔️ Rich tweak pool to harden security & privacy of the OS and other software on it.')
|
||||||
.appendCommentLine(' ✔️ You don\'t need to run any compiled software on your system, just run the generated scripts.')
|
.appendCommentLine(' ✔️ No need to run any compiled software on your system, just run the generated scripts.')
|
||||||
.appendCommentLine(' ✔️ Have full visibility into what the tweaks do as you enable them.')
|
.appendCommentLine(' ✔️ Have full visibility into what the tweaks do as you enable them.')
|
||||||
.appendCommentLine(' ✔️ Free software, 100% transparency: both application & infrastructure code are open-sourced.')
|
.appendCommentLine(' ✔️ Open-source and free (both free as in beer and free as in speech).')
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
import { Component, Vue } from 'vue-property-decorator';
|
||||||
import { Environment } from '@/application/Environment/Environment';
|
import { Environment } from '@/application/Environment/Environment';
|
||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
import DownloadUrlListItem from './DownloadUrlListItem.vue';
|
import DownloadUrlListItem from './DownloadUrlListItem.vue';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
import { Component, Prop, Watch } from 'vue-property-decorator';
|
import { Component, Prop, Watch } from 'vue-property-decorator';
|
||||||
import { StatefulVue } from '@/presentation/StatefulVue';
|
import { StatefulVue } from '@/presentation/StatefulVue';
|
||||||
import { Environment } from '@/application/Environment/Environment';
|
import { Environment } from '@/application/Environment/Environment';
|
||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class DownloadUrlListItem extends StatefulVue {
|
export default class DownloadUrlListItem extends StatefulVue {
|
||||||
@@ -39,7 +39,7 @@ export default class DownloadUrlListItem extends StatefulVue {
|
|||||||
|
|
||||||
private async getDownloadUrlAsync(os: OperatingSystem): Promise<string> {
|
private async getDownloadUrlAsync(os: OperatingSystem): Promise<string> {
|
||||||
const state = await this.getCurrentStateAsync();
|
const state = await this.getCurrentStateAsync();
|
||||||
return `${state.app.repositoryUrl}/releases/download/${state.app.version}/${getFileName(os, state.app.version)}`;
|
return state.app.info.getDownloadUrl(os);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,18 +62,6 @@ function getOperatingSystemName(os: OperatingSystem): string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFileName(os: OperatingSystem, version: string): string {
|
|
||||||
switch (os) {
|
|
||||||
case OperatingSystem.Linux:
|
|
||||||
return `privacy.sexy-${version}.AppImage`;
|
|
||||||
case OperatingSystem.macOS:
|
|
||||||
return `privacy.sexy-${version}.dmg`;
|
|
||||||
case OperatingSystem.Windows:
|
|
||||||
return `privacy.sexy-Setup-${version}.exe`;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unsupported os: ${OperatingSystem[os]}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ export default class TheFooter extends StatefulVue {
|
|||||||
|
|
||||||
public async mounted() {
|
public async mounted() {
|
||||||
const state = await this.getCurrentStateAsync();
|
const state = await this.getCurrentStateAsync();
|
||||||
this.repositoryUrl = state.app.repositoryUrl;
|
this.repositoryUrl = state.app.info.repositoryWebUrl;
|
||||||
this.feedbackUrl = `${state.app.repositoryUrl}/issues`;
|
this.feedbackUrl = state.app.info.feedbackUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="footer__section">
|
<div class="footer__section">
|
||||||
<span v-if="isDesktop" class="footer__section__item">
|
<span v-if="isDesktop" class="footer__section__item">
|
||||||
<font-awesome-icon class="icon" :icon="['fas', 'globe']" />
|
<font-awesome-icon class="icon" :icon="['fas', 'globe']" />
|
||||||
<span>Online version at <a href="https://privacy.sexy" target="_blank">https://privacy.sexy</a></span>
|
<span>Online version at <a :href="homepageUrl" target="_blank">{{ homepageUrl }}</a></span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="footer__section__item">
|
<span v-else class="footer__section__item">
|
||||||
<DownloadUrlList />
|
<DownloadUrlList />
|
||||||
@@ -66,6 +66,7 @@ export default class TheFooter extends StatefulVue {
|
|||||||
public repositoryUrl: string = '';
|
public repositoryUrl: string = '';
|
||||||
public releaseUrl: string = '';
|
public releaseUrl: string = '';
|
||||||
public feedbackUrl: string = '';
|
public feedbackUrl: string = '';
|
||||||
|
public homepageUrl: string = '';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@@ -74,12 +75,15 @@ export default class TheFooter extends StatefulVue {
|
|||||||
|
|
||||||
public async mounted() {
|
public async mounted() {
|
||||||
const state = await this.getCurrentStateAsync();
|
const state = await this.getCurrentStateAsync();
|
||||||
this.version = state.app.version;
|
const info = state.app.info;
|
||||||
this.repositoryUrl = state.app.repositoryUrl;
|
this.version = info.version;
|
||||||
this.releaseUrl = `${state.app.repositoryUrl}/releases/tag/${state.app.version}`;
|
this.homepageUrl = info.homepage;
|
||||||
this.feedbackUrl = `${state.app.repositoryUrl}/issues`;
|
this.repositoryUrl = info.repositoryWebUrl;
|
||||||
|
this.releaseUrl = info.releaseUrl;
|
||||||
|
this.feedbackUrl = info.feedbackUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default class TheHeader extends StatefulVue {
|
|||||||
|
|
||||||
public async mounted() {
|
public async mounted() {
|
||||||
const state = await this.getCurrentStateAsync();
|
const state = await this.getCurrentStateAsync();
|
||||||
this.title = state.app.name;
|
this.title = state.app.info.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
import { BrowserOsDetector } from '@/application/Environment/BrowserOs/BrowserOsDetector';
|
import { BrowserOsDetector } from '@/application/Environment/BrowserOs/BrowserOsDetector';
|
||||||
import { BrowserOsTestCases } from './BrowserOsTestCases';
|
import { BrowserOsTestCases } from './BrowserOsTestCases';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
interface IBrowserOsTestCase {
|
interface IBrowserOsTestCase {
|
||||||
userAgent: string;
|
userAgent: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
interface IDesktopTestCase {
|
interface IDesktopTestCase {
|
||||||
processPlatform: string;
|
processPlatform: string;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { IBrowserOsDetector } from '@/application/Environment/BrowserOs/IBrowserOsDetector';
|
import { IBrowserOsDetector } from '@/application/Environment/BrowserOs/IBrowserOsDetector';
|
||||||
import { OperatingSystem } from '@/application/Environment/OperatingSystem';
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
import { DesktopOsTestCases } from './DesktopOsTestCases';
|
import { DesktopOsTestCases } from './DesktopOsTestCases';
|
||||||
import { Environment } from '@/application/Environment/Environment';
|
import { Environment } from '@/application/Environment/Environment';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import 'mocha';
|
|||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { parseCategory } from '@/application/Parser/CategoryParser';
|
import { parseCategory } from '@/application/Parser/CategoryParser';
|
||||||
|
|
||||||
declare var process;
|
|
||||||
|
|
||||||
describe('ApplicationParser', () => {
|
describe('ApplicationParser', () => {
|
||||||
describe('parseApplication', () => {
|
describe('parseApplication', () => {
|
||||||
it('can parse current application file', () => {
|
it('can parse current application file', () => {
|
||||||
@@ -16,74 +14,64 @@ describe('ApplicationParser', () => {
|
|||||||
expect(() => parseApplication(undefined)).to.throw('application is null or undefined');
|
expect(() => parseApplication(undefined)).to.throw('application is null or undefined');
|
||||||
});
|
});
|
||||||
it('throws when undefined actions', () => {
|
it('throws when undefined actions', () => {
|
||||||
const sut: ApplicationYaml = {
|
const sut: ApplicationYaml = { actions: undefined };
|
||||||
name: 'test',
|
|
||||||
repositoryUrl: 'https://privacy.sexy',
|
|
||||||
actions: undefined,
|
|
||||||
};
|
|
||||||
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
||||||
});
|
});
|
||||||
it('throws when has no actions', () => {
|
it('throws when has no actions', () => {
|
||||||
const sut: ApplicationYaml = {
|
const sut: ApplicationYaml = { actions: [] };
|
||||||
name: 'test',
|
|
||||||
repositoryUrl: 'https://privacy.sexy',
|
|
||||||
actions: [],
|
|
||||||
};
|
|
||||||
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
expect(() => parseApplication(sut)).to.throw('application does not define any action');
|
||||||
});
|
});
|
||||||
it('returns expected name', () => {
|
describe('information', () => {
|
||||||
// arrange
|
it('returns expected repository version', () => {
|
||||||
const expected = 'test-app-name';
|
// arrange
|
||||||
const sut: ApplicationYaml = {
|
const expected = 'expected-version';
|
||||||
name: expected,
|
const env = getProcessEnvironmentStub();
|
||||||
repositoryUrl: 'https://privacy.sexy',
|
env.VUE_APP_VERSION = expected;
|
||||||
actions: [ getTestCategory() ],
|
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||||
};
|
// act
|
||||||
// act
|
const actual = parseApplication(sut, env).info.version;
|
||||||
const actual = parseApplication(sut).name;
|
// assert
|
||||||
// assert
|
expect(actual).to.be.equal(expected);
|
||||||
expect(actual).to.be.equal(actual);
|
});
|
||||||
});
|
it('returns expected repository url', () => {
|
||||||
it('returns expected repository url', () => {
|
// arrange
|
||||||
// arrange
|
const expected = 'https://expected-repository.url';
|
||||||
const expected = 'https://privacy.sexy';
|
const env = getProcessEnvironmentStub();
|
||||||
const sut: ApplicationYaml = {
|
env.VUE_APP_REPOSITORY_URL = expected;
|
||||||
name: 'name',
|
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||||
repositoryUrl: expected,
|
// act
|
||||||
actions: [ getTestCategory() ],
|
const actual = parseApplication(sut, env).info.repositoryUrl;
|
||||||
};
|
// assert
|
||||||
// act
|
expect(actual).to.be.equal(expected);
|
||||||
const actual = parseApplication(sut).repositoryUrl;
|
});
|
||||||
// assert
|
it('returns expected name', () => {
|
||||||
expect(actual).to.be.equal(actual);
|
// arrange
|
||||||
});
|
const expected = 'expected-app-name';
|
||||||
it('returns expected repository version', () => {
|
const env = getProcessEnvironmentStub();
|
||||||
// arrange
|
env.VUE_APP_NAME = expected;
|
||||||
const expected = '1.0.0';
|
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||||
process = {
|
// act
|
||||||
env: {
|
const actual = parseApplication(sut, env).info.name;
|
||||||
VUE_APP_VERSION: expected,
|
// assert
|
||||||
},
|
expect(actual).to.be.equal(expected);
|
||||||
};
|
});
|
||||||
const sut: ApplicationYaml = {
|
it('returns expected homepage url', () => {
|
||||||
name: 'name',
|
// arrange
|
||||||
repositoryUrl: 'https://privacy.sexy',
|
const expected = 'https://expected.sexy';
|
||||||
actions: [ getTestCategory() ],
|
const env = getProcessEnvironmentStub();
|
||||||
};
|
env.VUE_APP_HOMEPAGE_URL = expected;
|
||||||
// act
|
const sut: ApplicationYaml = { actions: [ getTestCategory() ] };
|
||||||
const actual = parseApplication(sut).version;
|
// act
|
||||||
// assert
|
const actual = parseApplication(sut, env).info.homepage;
|
||||||
expect(actual).to.be.equal(actual);
|
// assert
|
||||||
|
expect(actual).to.be.equal(expected);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
it('parses actions', () => {
|
it('parses actions', () => {
|
||||||
// arrange
|
// arrange
|
||||||
const actions = [ getTestCategory('test1'), getTestCategory('test2') ];
|
const actions = [ getTestCategory('test1'), getTestCategory('test2') ];
|
||||||
const expected = [ parseCategory(actions[0]), parseCategory(actions[1]) ];
|
const expected = [ parseCategory(actions[0]), parseCategory(actions[1]) ];
|
||||||
const sut: ApplicationYaml = {
|
const sut: ApplicationYaml = { actions };
|
||||||
name: 'name',
|
|
||||||
repositoryUrl: 'https://privacy.sexy',
|
|
||||||
actions,
|
|
||||||
};
|
|
||||||
// act
|
// act
|
||||||
const actual = parseApplication(sut).actions;
|
const actual = parseApplication(sut).actions;
|
||||||
// assert
|
// assert
|
||||||
@@ -113,3 +101,12 @@ function getTestScript(scriptName: string): YamlScript {
|
|||||||
recommend: true,
|
recommend: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getProcessEnvironmentStub(): NodeJS.ProcessEnv {
|
||||||
|
return {
|
||||||
|
VUE_APP_VERSION: 'stub-version',
|
||||||
|
VUE_APP_NAME: 'stub-name',
|
||||||
|
VUE_APP_REPOSITORY_URL: 'stub-repository-url',
|
||||||
|
VUE_APP_HOMEPAGE_URL: 'stub-homepage-url',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,129 +7,156 @@ import 'mocha';
|
|||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
|
|
||||||
describe('UserFilter', () => {
|
describe('UserFilter', () => {
|
||||||
it('signals when removing filter', () => {
|
describe('removeFilter', () => {
|
||||||
// arrange
|
it('signals when removing filter', () => {
|
||||||
let isCalled = false;
|
|
||||||
const sut = new UserFilter(new ApplicationStub());
|
|
||||||
sut.filterRemoved.on(() => isCalled = true);
|
|
||||||
// act
|
|
||||||
sut.removeFilter();
|
|
||||||
// assert
|
|
||||||
expect(isCalled).to.be.equal(true);
|
|
||||||
});
|
|
||||||
it('signals when no matches', () => {
|
|
||||||
// arrange
|
|
||||||
let actual: IFilterResult;
|
|
||||||
const nonMatchingFilter = 'non matching filter';
|
|
||||||
const sut = new UserFilter(new ApplicationStub());
|
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
|
||||||
// act
|
|
||||||
sut.setFilter(nonMatchingFilter);
|
|
||||||
// assert
|
|
||||||
expect(actual.hasAnyMatches()).be.equal(false);
|
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(0);
|
|
||||||
expect(actual.query).to.equal(nonMatchingFilter);
|
|
||||||
});
|
|
||||||
describe('signals when script matches', () => {
|
|
||||||
it('code matches', () => {
|
|
||||||
// arrange
|
// arrange
|
||||||
const code = 'HELLO world';
|
let isCalled = false;
|
||||||
const filter = 'Hello WoRLD';
|
const sut = new UserFilter(new ApplicationStub());
|
||||||
let actual: IFilterResult;
|
sut.filterRemoved.on(() => isCalled = true);
|
||||||
const script = new ScriptStub('id').withCode(code);
|
|
||||||
const category = new CategoryStub(33).withScript(script);
|
|
||||||
const sut = new UserFilter(new ApplicationStub()
|
|
||||||
.withAction(category));
|
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
|
||||||
// act
|
// act
|
||||||
sut.setFilter(filter);
|
sut.removeFilter();
|
||||||
// assert
|
// assert
|
||||||
expect(actual.hasAnyMatches()).be.equal(true);
|
expect(isCalled).to.be.equal(true);
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
|
||||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
|
||||||
expect(actual.query).to.equal(filter);
|
|
||||||
});
|
});
|
||||||
it('revertCode matches', () => {
|
it('currentFilter is undefined', () => {
|
||||||
// arrange
|
// arrange
|
||||||
const revertCode = 'HELLO world';
|
const sut = new UserFilter(new ApplicationStub());
|
||||||
const filter = 'Hello WoRLD';
|
|
||||||
let actual: IFilterResult;
|
|
||||||
const script = new ScriptStub('id').withRevertCode(revertCode);
|
|
||||||
const category = new CategoryStub(33).withScript(script);
|
|
||||||
const sut = new UserFilter(new ApplicationStub()
|
|
||||||
.withAction(category));
|
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
|
||||||
// act
|
// act
|
||||||
sut.setFilter(filter);
|
sut.removeFilter();
|
||||||
// assert
|
// assert
|
||||||
expect(actual.hasAnyMatches()).be.equal(true);
|
expect(sut.currentFilter).to.be.equal(undefined);
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
|
||||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
|
||||||
expect(actual.query).to.equal(filter);
|
|
||||||
});
|
|
||||||
it('name matches', () => {
|
|
||||||
// arrange
|
|
||||||
const name = 'HELLO world';
|
|
||||||
const filter = 'Hello WoRLD';
|
|
||||||
let actual: IFilterResult;
|
|
||||||
const script = new ScriptStub('id').withName(name);
|
|
||||||
const category = new CategoryStub(33).withScript(script);
|
|
||||||
const sut = new UserFilter(new ApplicationStub()
|
|
||||||
.withAction(category));
|
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
|
||||||
// act
|
|
||||||
sut.setFilter(filter);
|
|
||||||
// assert
|
|
||||||
expect(actual.hasAnyMatches()).be.equal(true);
|
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(0);
|
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
|
||||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
|
||||||
expect(actual.query).to.equal(filter);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('signals when category matches', () => {
|
describe('setFilter', () => {
|
||||||
// arrange
|
it('signals when no matches', () => {
|
||||||
const categoryName = 'HELLO world';
|
// arrange
|
||||||
const filter = 'Hello WoRLD';
|
let actual: IFilterResult;
|
||||||
let actual: IFilterResult;
|
const nonMatchingFilter = 'non matching filter';
|
||||||
const category = new CategoryStub(55).withName(categoryName);
|
const sut = new UserFilter(new ApplicationStub());
|
||||||
const sut = new UserFilter(new ApplicationStub()
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
.withAction(category));
|
// act
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
sut.setFilter(nonMatchingFilter);
|
||||||
// act
|
// assert
|
||||||
sut.setFilter(filter);
|
expect(actual.hasAnyMatches()).be.equal(false);
|
||||||
// assert
|
expect(actual.query).to.equal(nonMatchingFilter);
|
||||||
expect(actual.hasAnyMatches()).be.equal(true);
|
});
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
it('sets currentFilter as expected when no matches', () => {
|
||||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
// arrange
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(0);
|
const nonMatchingFilter = 'non matching filter';
|
||||||
expect(actual.query).to.equal(filter);
|
const sut = new UserFilter(new ApplicationStub());
|
||||||
});
|
// act
|
||||||
it('signals when category and script matches', () => {
|
sut.setFilter(nonMatchingFilter);
|
||||||
// arrange
|
// assert
|
||||||
const matchingText = 'HELLO world';
|
const actual = sut.currentFilter;
|
||||||
const filter = 'Hello WoRLD';
|
expect(actual.hasAnyMatches()).be.equal(false);
|
||||||
let actual: IFilterResult;
|
expect(actual.query).to.equal(nonMatchingFilter);
|
||||||
const script = new ScriptStub('script')
|
});
|
||||||
.withName(matchingText);
|
describe('signals when script matches', () => {
|
||||||
const category = new CategoryStub(55)
|
it('code matches', () => {
|
||||||
.withName(matchingText)
|
// arrange
|
||||||
.withScript(script);
|
const code = 'HELLO world';
|
||||||
const app = new ApplicationStub()
|
const filter = 'Hello WoRLD';
|
||||||
.withAction(category);
|
let actual: IFilterResult;
|
||||||
const sut = new UserFilter(app);
|
const script = new ScriptStub('id').withCode(code);
|
||||||
sut.filtered.on((filterResult) => actual = filterResult);
|
const category = new CategoryStub(33).withScript(script);
|
||||||
// act
|
const sut = new UserFilter(new ApplicationStub()
|
||||||
sut.setFilter(filter);
|
.withAction(category));
|
||||||
// assert
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
expect(actual.hasAnyMatches()).be.equal(true);
|
// act
|
||||||
expect(actual.categoryMatches).to.have.lengthOf(1);
|
sut.setFilter(filter);
|
||||||
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
// assert
|
||||||
expect(actual.scriptMatches).to.have.lengthOf(1);
|
expect(actual.hasAnyMatches()).be.equal(true);
|
||||||
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||||
expect(actual.query).to.equal(filter);
|
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||||
|
expect(actual.query).to.equal(filter);
|
||||||
|
expect(sut.currentFilter).to.deep.equal(actual);
|
||||||
|
});
|
||||||
|
it('revertCode matches', () => {
|
||||||
|
// arrange
|
||||||
|
const revertCode = 'HELLO world';
|
||||||
|
const filter = 'Hello WoRLD';
|
||||||
|
let actual: IFilterResult;
|
||||||
|
const script = new ScriptStub('id').withRevertCode(revertCode);
|
||||||
|
const category = new CategoryStub(33).withScript(script);
|
||||||
|
const sut = new UserFilter(new ApplicationStub()
|
||||||
|
.withAction(category));
|
||||||
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
|
// act
|
||||||
|
sut.setFilter(filter);
|
||||||
|
// assert
|
||||||
|
expect(actual.hasAnyMatches()).be.equal(true);
|
||||||
|
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||||
|
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||||
|
expect(actual.query).to.equal(filter);
|
||||||
|
expect(sut.currentFilter).to.deep.equal(actual);
|
||||||
|
});
|
||||||
|
it('name matches', () => {
|
||||||
|
// arrange
|
||||||
|
const name = 'HELLO world';
|
||||||
|
const filter = 'Hello WoRLD';
|
||||||
|
let actual: IFilterResult;
|
||||||
|
const script = new ScriptStub('id').withName(name);
|
||||||
|
const category = new CategoryStub(33).withScript(script);
|
||||||
|
const sut = new UserFilter(new ApplicationStub()
|
||||||
|
.withAction(category));
|
||||||
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
|
// act
|
||||||
|
sut.setFilter(filter);
|
||||||
|
// assert
|
||||||
|
expect(actual.hasAnyMatches()).be.equal(true);
|
||||||
|
expect(actual.categoryMatches).to.have.lengthOf(0);
|
||||||
|
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||||
|
expect(actual.query).to.equal(filter);
|
||||||
|
expect(sut.currentFilter).to.deep.equal(actual);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('signals when category matches', () => {
|
||||||
|
// arrange
|
||||||
|
const categoryName = 'HELLO world';
|
||||||
|
const filter = 'Hello WoRLD';
|
||||||
|
let actual: IFilterResult;
|
||||||
|
const category = new CategoryStub(55).withName(categoryName);
|
||||||
|
const sut = new UserFilter(new ApplicationStub()
|
||||||
|
.withAction(category));
|
||||||
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
|
// act
|
||||||
|
sut.setFilter(filter);
|
||||||
|
// assert
|
||||||
|
expect(actual.hasAnyMatches()).be.equal(true);
|
||||||
|
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||||
|
expect(actual.scriptMatches).to.have.lengthOf(0);
|
||||||
|
expect(actual.query).to.equal(filter);
|
||||||
|
expect(sut.currentFilter).to.deep.equal(actual);
|
||||||
|
});
|
||||||
|
it('signals when category and script matches', () => {
|
||||||
|
// arrange
|
||||||
|
const matchingText = 'HELLO world';
|
||||||
|
const filter = 'Hello WoRLD';
|
||||||
|
let actual: IFilterResult;
|
||||||
|
const script = new ScriptStub('script')
|
||||||
|
.withName(matchingText);
|
||||||
|
const category = new CategoryStub(55)
|
||||||
|
.withName(matchingText)
|
||||||
|
.withScript(script);
|
||||||
|
const app = new ApplicationStub()
|
||||||
|
.withAction(category);
|
||||||
|
const sut = new UserFilter(app);
|
||||||
|
sut.filtered.on((filterResult) => actual = filterResult);
|
||||||
|
// act
|
||||||
|
sut.setFilter(filter);
|
||||||
|
// assert
|
||||||
|
expect(actual.hasAnyMatches()).be.equal(true);
|
||||||
|
expect(actual.categoryMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.categoryMatches[0]).to.deep.equal(category);
|
||||||
|
expect(actual.scriptMatches).to.have.lengthOf(1);
|
||||||
|
expect(actual.scriptMatches[0]).to.deep.equal(script);
|
||||||
|
expect(actual.query).to.equal(filter);
|
||||||
|
expect(sut.currentFilter).to.deep.equal(actual);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { ScriptStub } from './../stubs/ScriptStub';
|
import { ScriptStub } from './../stubs/ScriptStub';
|
||||||
import { CategoryStub } from './../stubs/CategoryStub';
|
import { CategoryStub } from './../stubs/CategoryStub';
|
||||||
import { Application } from './../../../src/domain/Application';
|
import { Application } from '@/domain/Application';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
|
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||||
|
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||||
|
|
||||||
describe('Application', () => {
|
describe('Application', () => {
|
||||||
it('getRecommendedScripts returns as expected', () => {
|
it('getRecommendedScripts returns as expected', () => {
|
||||||
@@ -11,53 +13,56 @@ describe('Application', () => {
|
|||||||
new ScriptStub('S3').withIsRecommended(true),
|
new ScriptStub('S3').withIsRecommended(true),
|
||||||
new ScriptStub('S4').withIsRecommended(true),
|
new ScriptStub('S4').withIsRecommended(true),
|
||||||
];
|
];
|
||||||
const sut = new Application('name', 'repo', '0.1.0', [
|
const sut = new Application(createInformation(), [
|
||||||
new CategoryStub(3).withScripts(expected[0], new ScriptStub('S1').withIsRecommended(false)),
|
new CategoryStub(3).withScripts(expected[0], new ScriptStub('S1').withIsRecommended(false)),
|
||||||
new CategoryStub(2).withScripts(expected[1], new ScriptStub('S2').withIsRecommended(false)),
|
new CategoryStub(2).withScripts(expected[1], new ScriptStub('S2').withIsRecommended(false)),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// act
|
// act
|
||||||
const actual = sut.getRecommendedScripts();
|
const actual = sut.getRecommendedScripts();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(expected[0]).to.deep.equal(actual[0]);
|
expect(expected[0]).to.deep.equal(actual[0]);
|
||||||
expect(expected[1]).to.deep.equal(actual[1]);
|
expect(expected[1]).to.deep.equal(actual[1]);
|
||||||
});
|
});
|
||||||
it('cannot construct without categories', () => {
|
describe('parameter validation', () => {
|
||||||
// arrange
|
it('cannot construct without categories', () => {
|
||||||
const categories = [];
|
// arrange
|
||||||
|
const categories = [];
|
||||||
// act
|
// act
|
||||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
function construct() { return new Application(createInformation(), categories); }
|
||||||
|
// assert
|
||||||
// assert
|
expect(construct).to.throw('Application must consist of at least one category');
|
||||||
expect(construct).to.throw('Application must consist of at least one category');
|
});
|
||||||
});
|
it('cannot construct without scripts', () => {
|
||||||
it('cannot construct without scripts', () => {
|
// arrange
|
||||||
// arrange
|
const categories = [
|
||||||
const categories = [
|
new CategoryStub(3),
|
||||||
new CategoryStub(3),
|
new CategoryStub(2),
|
||||||
new CategoryStub(2),
|
];
|
||||||
];
|
// act
|
||||||
|
function construct() { return new Application(createInformation(), categories); }
|
||||||
// act
|
// assert
|
||||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
expect(construct).to.throw('Application must consist of at least one script');
|
||||||
|
});
|
||||||
// assert
|
it('cannot construct without any recommended scripts', () => {
|
||||||
expect(construct).to.throw('Application must consist of at least one script');
|
// arrange
|
||||||
});
|
const categories = [
|
||||||
it('cannot construct without any recommended scripts', () => {
|
new CategoryStub(3).withScripts(new ScriptStub('S1').withIsRecommended(false)),
|
||||||
// arrange
|
new CategoryStub(2).withScripts(new ScriptStub('S2').withIsRecommended(false)),
|
||||||
const categories = [
|
];
|
||||||
new CategoryStub(3).withScripts(new ScriptStub('S1').withIsRecommended(false)),
|
// act
|
||||||
new CategoryStub(2).withScripts(new ScriptStub('S2').withIsRecommended(false)),
|
function construct() { return new Application(createInformation(), categories); }
|
||||||
];
|
// assert
|
||||||
|
expect(construct).to.throw('Application must consist of at least one recommended script');
|
||||||
// act
|
});
|
||||||
function construct() { return new Application('name', 'repo', '0.1.0', categories); }
|
it('cannot construct without information', () => {
|
||||||
|
// arrange
|
||||||
// assert
|
const categories = [new CategoryStub(1).withScripts(new ScriptStub('S1').withIsRecommended(true))];
|
||||||
expect(construct).to.throw('Application must consist of at least one recommended script');
|
const information = undefined;
|
||||||
|
// act
|
||||||
|
function construct() { return new Application(information, categories); }
|
||||||
|
// assert
|
||||||
|
expect(construct).to.throw('info is undefined');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
it('totalScripts counts right', () => {
|
it('totalScripts counts right', () => {
|
||||||
// arrange
|
// arrange
|
||||||
@@ -67,9 +72,9 @@ describe('Application', () => {
|
|||||||
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
||||||
];
|
];
|
||||||
// act
|
// act
|
||||||
const application = new Application('name', 'repo', '0.1.0', categories);
|
const sut = new Application(createInformation(), categories);
|
||||||
// assert
|
// assert
|
||||||
expect(application.totalScripts).to.equal(4);
|
expect(sut.totalScripts).to.equal(4);
|
||||||
});
|
});
|
||||||
it('totalCategories counts right', () => {
|
it('totalCategories counts right', () => {
|
||||||
// arrange
|
// arrange
|
||||||
@@ -79,8 +84,22 @@ describe('Application', () => {
|
|||||||
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
new CategoryStub(3).withCategories(new CategoryStub(4).withScripts(new ScriptStub('S4'))),
|
||||||
];
|
];
|
||||||
// act
|
// act
|
||||||
const application = new Application('name', 'repo', '0.1.0', categories);
|
const sut = new Application(createInformation(), categories);
|
||||||
// assert
|
// assert
|
||||||
expect(application.totalCategories).to.equal(4);
|
expect(sut.totalCategories).to.equal(4);
|
||||||
|
});
|
||||||
|
it('sets information as expected', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = createInformation();
|
||||||
|
// act
|
||||||
|
const sut = new Application(
|
||||||
|
expected,
|
||||||
|
[new CategoryStub(1).withScripts(new ScriptStub('S1').withIsRecommended(true))]);
|
||||||
|
// assert
|
||||||
|
expect(sut.info).to.deep.equal(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function createInformation(): IProjectInformation {
|
||||||
|
return new ProjectInformation('name', 'repo', '0.1.0', 'homepage');
|
||||||
|
}
|
||||||
|
|||||||
128
tests/unit/domain/ProjectInformation.spec.ts
Normal file
128
tests/unit/domain/ProjectInformation.spec.ts
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
import 'mocha';
|
||||||
|
import { expect } from 'chai';
|
||||||
|
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||||
|
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||||
|
|
||||||
|
describe('ProjectInformation', () => {
|
||||||
|
it('sets name as expected', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-name';
|
||||||
|
const sut = new ProjectInformation(expected, 'version', 'repositoryUrl', 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.name;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('sets version as expected', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-version';
|
||||||
|
const sut = new ProjectInformation('name', expected, 'repositoryUrl', 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.version;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('sets repositoryUrl as expected', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-repository-url';
|
||||||
|
const sut = new ProjectInformation('name', 'version', expected, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.repositoryUrl;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
describe('sets repositoryWebUrl as expected', () => {
|
||||||
|
it('sets repositoryUrl when it does not end with .git', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-repository-url';
|
||||||
|
const sut = new ProjectInformation('name', 'version', expected, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.repositoryWebUrl;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('removes ".git" from the end when it ends with ".git"', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-repository-url';
|
||||||
|
const sut = new ProjectInformation('name', 'version', `${expected}.git`, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.repositoryWebUrl;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it('sets homepage as expected', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'expected-homepage';
|
||||||
|
const sut = new ProjectInformation('name', 'version', 'repositoryUrl', expected);
|
||||||
|
// act
|
||||||
|
const actual = sut.homepage;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('sets feedbackUrl to github issues page', () => {
|
||||||
|
// arrange
|
||||||
|
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||||
|
const expected = 'https://github.com/undergroundwires/privacy.sexy/issues';
|
||||||
|
const sut = new ProjectInformation('name', 'version', repositoryUrl, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.feedbackUrl;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('sets releaseUrl to github releases page', () => {
|
||||||
|
// arrange
|
||||||
|
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||||
|
const version = '0.7.2';
|
||||||
|
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/tag/0.7.2';
|
||||||
|
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.releaseUrl;
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
describe('getDownloadUrl', () => {
|
||||||
|
it('gets expected url for macOS', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.dmg';
|
||||||
|
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||||
|
const version = '0.7.2';
|
||||||
|
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.getDownloadUrl(OperatingSystem.macOS);
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('gets expected url for Linux', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-0.7.2.AppImage';
|
||||||
|
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||||
|
const version = '0.7.2';
|
||||||
|
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.getDownloadUrl(OperatingSystem.Linux);
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('gets expected url for Windows', () => {
|
||||||
|
// arrange
|
||||||
|
const expected = 'https://github.com/undergroundwires/privacy.sexy/releases/download/0.7.2/privacy.sexy-Setup-0.7.2.exe';
|
||||||
|
const repositoryUrl = 'https://github.com/undergroundwires/privacy.sexy.git';
|
||||||
|
const version = '0.7.2';
|
||||||
|
const sut = new ProjectInformation('name', version, repositoryUrl, 'homepage');
|
||||||
|
// act
|
||||||
|
const actual = sut.getDownloadUrl(OperatingSystem.Windows);
|
||||||
|
// assert
|
||||||
|
expect(actual).to.equal(expected);
|
||||||
|
});
|
||||||
|
it('throws when OS is unknown', () => {
|
||||||
|
// arrange
|
||||||
|
const sut = new ProjectInformation('name', 'version', 'repositoryUrl', 'homepage');
|
||||||
|
const os = OperatingSystem.Unknown;
|
||||||
|
// act
|
||||||
|
const act = () => sut.getDownloadUrl(os);
|
||||||
|
// assert
|
||||||
|
expect(act).to.throw(`Unsupported os: ${OperatingSystem[os]}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
import { IApplication, ICategory, IScript } from '@/domain/IApplication';
|
import { IApplication, ICategory, IScript } from '@/domain/IApplication';
|
||||||
|
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||||
|
|
||||||
export class ApplicationStub implements IApplication {
|
export class ApplicationStub implements IApplication {
|
||||||
public totalScripts = 0;
|
public totalScripts = 0;
|
||||||
public totalCategories = 0;
|
public totalCategories = 0;
|
||||||
public readonly name = 'StubApplication';
|
public readonly info = new ProjectInformation('StubApplication', '0.1.0', 'https://github.com/undergroundwires/privacy.sexy', 'https://privacy.sexy');
|
||||||
public readonly repositoryUrl = 'https://privacy.sexy';
|
|
||||||
public readonly version = '0.1.0';
|
|
||||||
public readonly actions = new Array<ICategory>();
|
public readonly actions = new Array<ICategory>();
|
||||||
|
|
||||||
public withAction(category: ICategory): ApplicationStub {
|
public withAction(category: ICategory): ApplicationStub {
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
process.env.VUE_APP_VERSION = require('./package.json').version;
|
const packageJson = require('./package.json');
|
||||||
|
|
||||||
|
process.env.VUE_APP_VERSION = packageJson.version;
|
||||||
|
process.env.VUE_APP_NAME = packageJson.name;
|
||||||
|
process.env.VUE_APP_REPOSITORY_URL = packageJson.repository.url;
|
||||||
|
process.env.VUE_APP_HOMEPAGE_URL = packageJson.homepage;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
pluginOptions: {
|
pluginOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user