Compare commits

...

3 Commits

Author SHA1 Message Date
undergroundwires
efd63ff85d Bump dependencies to latest
Purge unused dependencies.

Update dependencies to latest except:

- ts-lint. Keep locked to 9.0.1 because that's the latest version that
  works with Webpack 4 that's still used by
  vue-cli-plugin-electron-builder.
- Keep eslint at version 7 because tests cannot be run/compiled with
  version 7, see eslint/eslint#15678, vuejs/vue-cli#6759.

Newer versions of ESLint modules do not allow linebreak after or before
= operator (operator-linebreak). This commit also changes files to
comply with it.

Closes #116, #119, #122, #130.
2022-03-08 18:03:19 +01:00
undergroundwires
242a497e7d Bump node environment to 16.x
- Bump setup-node action to v2.
- Use composite actions to reuse same setting. This is preferred over
  reusable templates because reusable templates are on job-level but
  setting up node should be a step.
2022-03-07 21:38:30 +01:00
undergroundwires
05a6a84c37 Add donation information 2022-03-05 13:10:27 +01:00
18 changed files with 1842 additions and 1948 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: undergroundwires

8
.github/actions/setup-node/action.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
runs:
using: composite
steps:
-
name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.x

View File

@@ -18,9 +18,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: Install dependencies name: Install dependencies
run: npm ci run: npm ci
@@ -42,9 +40,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: Install dependencies name: Install dependencies
run: npm ci run: npm ci

View File

@@ -19,9 +19,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup node - name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Lint - name: Lint

View File

@@ -16,9 +16,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: NPM audit name: NPM audit
run: exit "$(npm audit)" # Since node 15.x, it does not fail with error if we don't explicitly exit run: exit "$(npm audit)" # Since node 15.x, it does not fail with error if we don't explicitly exit

View File

@@ -20,9 +20,7 @@ jobs:
- name: Checkout to bump commit - name: Checkout to bump commit
run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)" run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)"
- name: Setup node - name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run unit tests - name: Run unit tests

View File

@@ -1,8 +1,8 @@
name: release-site name: release-site
on: on:
release: release:
types: [created] # will be triggered when a NON-draft release is created and published. types: [created] # will be triggered when a NON-draft release is created and published.
jobs: jobs:
aws-deploy: # see: https://github.com/undergroundwires/aws-static-site-with-cd aws-deploy: # see: https://github.com/undergroundwires/aws-static-site-with-cd
@@ -77,30 +77,28 @@ jobs:
name: "App: Checkout" name: "App: Checkout"
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
path: site path: app
ref: master # otherwise we don't get version bump commit ref: master # otherwise we don't get version bump commit
- -
name: "App: Setup node" name: "App: Setup node"
uses: actions/setup-node@v1 uses: ./app/.github/actions/setup-node
with:
node-version: 15.x
- -
name: "App: Install dependencies" name: "App: Install dependencies"
run: npm ci run: npm ci
working-directory: site working-directory: app
- -
name: "App: Run unit tests" name: "App: Run unit tests"
run: npm run test:unit run: npm run test:unit
working-directory: site working-directory: app
- -
name: "App: Build" name: "App: Build"
run: npm run build run: npm run build
working-directory: site working-directory: app
- -
name: "App: Deploy to S3" name: "App: Deploy to S3"
run: >- run: >-
bash "aws/scripts/deploy/deploy-to-s3.sh" \ bash "aws/scripts/deploy/deploy-to-s3.sh" \
--folder site/dist \ --folder app/dist \
--web-stack-name privacysexy-web-stack --web-stack-s3-name-output-name S3BucketName \ --web-stack-name privacysexy-web-stack --web-stack-s3-name-output-name S3BucketName \
--storage-class ONEZONE_IA \ --storage-class ONEZONE_IA \
--role-arn ${{secrets.AWS_S3_SITE_DEPLOYMENT_ROLE_ARN}} \ --role-arn ${{secrets.AWS_S3_SITE_DEPLOYMENT_ROLE_ARN}} \

View File

@@ -17,9 +17,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: Install dependencies name: Install dependencies
run: npm ci run: npm ci

View File

@@ -19,9 +19,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Setup node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: Install dependencies name: Install dependencies
run: npm ci run: npm ci

View File

@@ -16,10 +16,8 @@ jobs:
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- -
name: Setup node name: Set-up node
uses: actions/setup-node@v1 uses: ./.github/actions/setup-node
with:
node-version: 15.x
- -
name: Install dependencies name: Install dependencies
run: npm ci run: npm ci

View File

@@ -4,6 +4,12 @@
<!-- markdownlint-disable MD033 --> <!-- markdownlint-disable MD033 -->
<p align="center"> <p align="center">
<a href="https://undergroundwires.dev/donate?project=privacy.sexy">
<img
alt="donation badge"
src="https://undergroundwires.dev/img/badges/donate/flat.svg"
/>
</a>
<a href="https://github.com/undergroundwires/privacy.sexy/blob/master/CONTRIBUTING.md"> <a href="https://github.com/undergroundwires/privacy.sexy/blob/master/CONTRIBUTING.md">
<img <img
alt="contributions are welcome" alt="contributions are welcome"
@@ -118,9 +124,13 @@ Online version does not require to run any software on your computer. Offline ve
- **Extensible**. Effortlessly [extend scripts](./CONTRIBUTING.md#extend-scripts) with a custom designed [templating language](./docs/templating.md). - **Extensible**. Effortlessly [extend scripts](./CONTRIBUTING.md#extend-scripts) with a custom designed [templating language](./docs/templating.md).
- **Portable and simple**. Every script is independently executable without cross-dependencies. - **Portable and simple**. Every script is independently executable without cross-dependencies.
## Contributing ## Support
Contributions of any type are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) as starting point, it includes useful information like [how to add new scripts](./CONTRIBUTING.md#extend-scripts). **Sponsor 💕**. Consider sponsoring on [GitHub Sponsors](https://github.com/sponsors/undergroundwires), or you can donate using [other ways such as crypto or a coffee](https://undergroundwires.dev/donate).
**Star 🤩**. Feel free to give it a star ⭐ .
**Contribute 👷**. Contributions of any type are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) as the starting point. It includes useful information like [how to add new scripts](./CONTRIBUTING.md#extend-scripts).
## Development ## Development

View File

@@ -12,9 +12,9 @@ Everything that's merged in the master goes directly to production.
privacy.sexy uses [GitHub actions](https://github.com/features/actions) to define and run pipelines as code. privacy.sexy uses [GitHub actions](https://github.com/features/actions) to define and run pipelines as code.
GitHub workflows i.e. pipelines exist in [`/.github/.workflows/`](./../.github/workflows/) folder without any subfolders due to GitHub actions requirements [1] . GitHub workflows i.e. pipelines exist in [`/.github/workflows/`](./../.github/workflows/) folder without any subfolders due to GitHub actions requirements [1] .
[1]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows Local GitHub actions are defined in [`/.github/actions/`](./../.github/actions/) and used to reuse same workflow steps.
## Pipeline types ## Pipeline types

3614
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,20 +23,20 @@
}, },
"main": "background.js", "main": "background.js",
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-brands-svg-icons": "^6.0.0",
"@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^6.0.0",
"@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/vue-fontawesome": "^2.0.6", "@fortawesome/vue-fontawesome": "^2.0.6",
"@juggle/resize-observer": "^3.3.1", "@juggle/resize-observer": "^3.3.1",
"ace-builds": "^1.4.13", "ace-builds": "^1.4.14",
"core-js": "^3.18.3", "core-js": "^3.21.1",
"cross-fetch": "^3.1.4", "cross-fetch": "^3.1.5",
"electron-progressbar": "^2.0.1", "electron-progressbar": "^2.0.1",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"install": "^0.13.0", "install": "^0.13.0",
"liquor-tree": "^0.2.70", "liquor-tree": "^0.2.70",
"npm": "^8.1.1", "npm": "^8.5.3",
"v-tooltip": "2.1.3", "v-tooltip": "2.1.3",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-class-component": "^7.2.6", "vue-class-component": "^7.2.6",
@@ -44,49 +44,50 @@
"vue-property-decorator": "^9.1.2" "vue-property-decorator": "^9.1.2"
}, },
"devDependencies": { "devDependencies": {
"@types/ace": "0.0.47", "@types/ace": "^0.0.48",
"@types/chai": "^4.2.22", "@types/chai": "^4.3.0",
"@types/file-saver": "^2.0.3", "@types/file-saver": "^2.0.5",
"@types/mocha": "^9.0.0", "@types/mocha": "^9.1.0",
"@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.4.0", "@typescript-eslint/parser": "^5.13.0",
"@vue/cli-plugin-babel": "~5.0.0-rc.1", "@vue/cli-plugin-babel": "~5.0.1",
"@vue/cli-plugin-e2e-cypress": "~5.0.0-rc.1", "@vue/cli-plugin-e2e-cypress": "~5.0.1",
"@vue/cli-plugin-eslint": "~5.0.0-rc.1", "@vue/cli-plugin-eslint": "~5.0.1",
"@vue/cli-plugin-typescript": "~5.0.0-rc.1", "@vue/cli-plugin-typescript": "~5.0.1",
"@vue/cli-plugin-unit-mocha": "~5.0.0-rc.1", "@vue/cli-plugin-unit-mocha": "~5.0.1",
"@vue/cli-service": "~5.0.0-rc.1", "@vue/cli-service": "~5.0.1",
"@vue/eslint-config-airbnb": "^6.0.0", "@vue/eslint-config-airbnb": "^6.0.0",
"@vue/eslint-config-typescript": "^9.1.0", "@vue/eslint-config-typescript": "^10.0.0",
"@vue/test-utils": "1.2.2", "@vue/test-utils": "1.3.0",
"chai": "^4.3.4", "chai": "^4.3.6",
"cypress": "^8.3.0", "cypress": "^9.5.1",
"electron": "^15.3.0", "electron": "^17.1.0",
"electron-builder": "^22.14.13", "electron-builder": "^22.14.13",
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^3.2.0",
"electron-log": "^4.4.1", "electron-log": "^4.4.6",
"electron-updater": "^4.3.9", "electron-updater": "^5.0.0",
"eslint": "^7.32.0", "eslint": "7.32.0",
"eslint-plugin-import": "^2.25.3", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-vue": "^8.0.3", "eslint-plugin-vue": "^8.5.0",
"eslint-plugin-vuejs-accessibility": "^1.1.0", "eslint-plugin-vuejs-accessibility": "^1.1.1",
"js-yaml-loader": "^1.2.2", "js-yaml-loader": "^1.2.2",
"markdownlint-cli": "^0.29.0", "markdownlint-cli": "^0.31.1",
"remark-cli": "^10.0.0", "remark-cli": "^10.0.1",
"remark-lint-no-dead-urls": "^1.1.0", "remark-lint-no-dead-urls": "^1.1.0",
"remark-preset-lint-consistent": "^5.1.0", "remark-preset-lint-consistent": "^5.1.1",
"remark-validate-links": "^11.0.1", "remark-validate-links": "^11.0.2",
"sass": "^1.43.3", "sass": "^1.49.9",
"sass-loader": "10.2.0", "sass-loader": "^12.6.0",
"ts-loader": "9.0.1", "ts-loader": "9.0.1",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typescript": "^4.4.4", "typescript": "^4.6.2",
"vue-cli-plugin-electron-builder": "^2.1.1", "vue-cli-plugin-electron-builder": "^2.1.1",
"vue-template-compiler": "^2.6.14", "vue-template-compiler": "^2.6.14",
"yaml-lint": "^1.2.4" "yaml-lint": "^1.2.4"
}, },
"//devDependencies": { "//devDependencies": {
"ts-loader": "Here as workaround for vue-cli-plugin-electron-builder using older webpack 4" "ts-loader": "Here as workaround for vue-cli-plugin-electron-builder using older webpack 4",
"eslint": "Stuck at 7.32.0 because Vue CLI not supporting 8.x.x"
}, },
"homepage": "https://privacy.sexy", "homepage": "https://privacy.sexy",
"repository": { "repository": {

View File

@@ -2,8 +2,8 @@ import { IProjectInformation } from '@/domain/IProjectInformation';
import { ICodeSubstituter } from '@/application/Parser/ScriptingDefinition/ICodeSubstituter'; import { ICodeSubstituter } from '@/application/Parser/ScriptingDefinition/ICodeSubstituter';
export class CodeSubstituterStub implements ICodeSubstituter { export class CodeSubstituterStub implements ICodeSubstituter {
private readonly scenarios = private readonly scenarios = new Array<{
new Array<{ code: string, info: IProjectInformation, result: string }>(); code: string, info: IProjectInformation, result: string }>();
public substitute(code: string, info: IProjectInformation): string { public substitute(code: string, info: IProjectInformation): string {
const scenario = this.scenarios.find((s) => s.code === code && s.info === info); const scenario = this.scenarios.find((s) => s.code === code && s.info === info);

View File

@@ -1,8 +1,8 @@
import { IEnumParser } from '@/application/Common/Enum'; import { IEnumParser } from '@/application/Common/Enum';
export class EnumParserStub<T> implements IEnumParser<T> { export class EnumParserStub<T> implements IEnumParser<T> {
private readonly scenarios = private readonly scenarios = new Array<{
new Array<{ inputName: string, inputValue: string, outputValue: T }>(); inputName: string, inputValue: string, outputValue: T }>();
private defaultValue: T; private defaultValue: T;

View File

@@ -5,8 +5,8 @@ import { ISharedFunction } from '@/application/Parser/Script/Compiler/Function/I
import { FunctionCallArgumentCollectionStub } from '@tests/unit/shared/Stubs/FunctionCallArgumentCollectionStub'; import { FunctionCallArgumentCollectionStub } from '@tests/unit/shared/Stubs/FunctionCallArgumentCollectionStub';
export class ExpressionsCompilerStub implements IExpressionsCompiler { export class ExpressionsCompilerStub implements IExpressionsCompiler {
public readonly callHistory = public readonly callHistory = new Array<{
new Array<{ code: string, parameters: IReadOnlyFunctionCallArgumentCollection }>(); code: string, parameters: IReadOnlyFunctionCallArgumentCollection }>();
private readonly scenarios = new Array<ITestScenario>(); private readonly scenarios = new Array<ITestScenario>();

View File

@@ -5,8 +5,8 @@ import { IEventSource } from '@/infrastructure/Events/IEventSource';
import { EventSource } from '@/infrastructure/Events/EventSource'; import { EventSource } from '@/infrastructure/Events/EventSource';
export class UserSelectionStub implements IUserSelection { export class UserSelectionStub implements IUserSelection {
public readonly changed: IEventSource<readonly SelectedScript[]> = public readonly changed: IEventSource<readonly SelectedScript[]> = new EventSource<
new EventSource<readonly SelectedScript[]>(); readonly SelectedScript[]>();
public selectedScripts: readonly SelectedScript[] = []; public selectedScripts: readonly SelectedScript[] = [];