Skip to content

Commit

Permalink
Merge branch 'master' into patrickhlauke-issue5525
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke authored Oct 12, 2023
2 parents 1fb80ac + 77d7813 commit 452f735
Show file tree
Hide file tree
Showing 1,931 changed files with 127,238 additions and 33,988 deletions.
92 changes: 59 additions & 33 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"plugin:import/recommended",
"plugin:import/typescript",
"prettier",
"plugin:rxjs/recommended"
"plugin:rxjs/recommended",
"plugin:storybook/recommended"
],
"settings": {
"import/parsers": {
Expand All @@ -33,20 +34,14 @@
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-this-alias": [
"error",
{
"allowedNames": ["self"]
}
{ "accessibility": "no-public" }
],
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-this-alias": ["error", { "allowedNames": ["self"] }],
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"no-console": "error",
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
"import/order": [
Expand Down Expand Up @@ -90,22 +85,21 @@
"error",
{
"zones": [
// Do not allow angular/node code to be imported into common
{
// avoid specific frameworks or large dependencies in common
"target": "./libs/common/**/*",
"from": "./libs/angular/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/node/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/importer/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/exporter/**/*"
"from": [
// Angular
"./libs/angular/**/*",
"./node_modules/@angular*/**/*",

// Node
"./libs/node/**/*",

// Import/export
"./libs/importer/**/*",
"./libs/exporter/**/*"
]
}
]
}
Expand Down Expand Up @@ -135,6 +129,18 @@
"tailwindcss/no-contradicting-classname": "error"
}
},
{
"files": ["libs/angular/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/angular/*", "src/**/*"] }]
}
},
{
"files": ["libs/auth/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/auth/*", "src/**/*"] }]
}
},
{
"files": ["libs/common/src/**/*.ts"],
"rules": {
Expand All @@ -144,13 +150,22 @@
{
"files": ["libs/components/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/components/*", "src/**/*"] }]
"no-restricted-imports": [
"error",
{ "patterns": ["@bitwarden/components/*", "src/**/*", "@bitwarden/angular/*"] }
]
}
},
{
"files": ["libs/angular/src/**/*.ts"],
"files": ["libs/exporter/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/angular/*", "src/**/*"] }]
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/exporter/*", "src/**/*"] }]
}
},
{
"files": ["libs/importer/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/importer/*", "src/**/*"] }]
}
},
{
Expand All @@ -160,15 +175,26 @@
}
},
{
"files": ["libs/importer/src/**/*.ts"],
"files": ["libs/vault/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/importer/*", "src/**/*"] }]
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/vault/*", "src/**/*"] }]
}
},
{
"files": ["libs/exporter/src/**/*.ts"],
"files": ["apps/browser/src/**/*.ts", "libs/**/*.ts"],
"excludedFiles": "apps/browser/src/autofill/{content,notification}/**/*.ts",
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/exporter/*", "src/**/*"] }]
"no-restricted-syntax": [
"error",
{
"message": "Using addListener in the browser popup produces a memory leak in Safari, use `BrowserApi.messageListener` instead",
"selector": "CallExpression > [object.object.object.name='chrome'][object.object.property.name='runtime'][object.property.name='onMessage'][property.name='addListener']"
},
{
"message": "Using addListener in the browser popup produces a memory leak in Safari, use `BrowserApi.storageChangeListener` instead",
"selector": "CallExpression > [object.object.object.name='chrome'][object.object.property.name='storage'][object.property.name='onChanged'][property.name='addListener']"
}
]
}
}
]
Expand Down
59 changes: 56 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# The following owners will be the default owners for everything in the repo.
# Unless a later match takes precedence
# @bitwarden/team-leads
* @bitwarden/tech-leads

## Secrets Manager team files ##
bitwarden_license/bit-web/src/app/secrets-manager @bitwarden/team-secrets-manager-dev
Expand All @@ -13,9 +13,11 @@ bitwarden_license/bit-web/src/app/secrets-manager @bitwarden/team-secrets-manage
apps/browser/src/auth @bitwarden/team-auth-dev
apps/cli/src/auth @bitwarden/team-auth-dev
apps/desktop/src/auth @bitwarden/team-auth-dev
apps/web/src/auth @bitwarden/team-auth-dev
apps/web/src/app/auth @bitwarden/team-auth-dev
libs/auth @bitwarden/team-auth-dev
# web connectors used for auth
apps/web/src/connectors @bitwarden/team-auth-dev
bitwarden_license/bit-web/src/app/auth @bitwarden/team-auth-dev
libs/angular/src/auth @bitwarden/team-auth-dev
libs/common/src/auth @bitwarden/team-auth-dev

Expand All @@ -31,13 +33,13 @@ libs/exporter @bitwarden/team-tools-dev
libs/importer @bitwarden/team-tools-dev

## Vault team files ##
apps/browser/src/autofill @bitwarden/team-vault-dev
apps/browser/src/vault @bitwarden/team-vault-dev
apps/cli/src/vault @bitwarden/team-vault-dev
apps/desktop/src/vault @bitwarden/team-vault-dev
apps/web/src/app/vault @bitwarden/team-vault-dev
libs/angular/src/vault @bitwarden/team-vault-dev
libs/common/src/vault @bitwarden/team-vault-dev
libs/vault @bitwarden/team-vault-dev

## Admin Console team files ##
apps/browser/src/admin-console @bitwarden/team-admin-console-dev
Expand All @@ -52,3 +54,54 @@ libs/common/src/admin-console @bitwarden/team-admin-console-dev
apps/web/src/app/billing @bitwarden/team-billing-dev
libs/angular/src/billing @bitwarden/team-billing-dev
libs/common/src/billing @bitwarden/team-billing-dev

## Platform team files ##
apps/browser/src/platform @bitwarden/team-platform-dev
apps/cli/src/platform @bitwarden/team-platform-dev
apps/desktop/src/platform @bitwarden/team-platform-dev
apps/web/src/app/platform @bitwarden/team-platform-dev
libs/angular/src/platform @bitwarden/team-platform-dev
libs/common/src/platform @bitwarden/team-platform-dev
# Node-specifc platform files
libs/node @bitwarden/team-platform-dev
# Web utils used across app and connectors
apps/web/src/utils/ @bitwarden/team-platform-dev
# Web core and shared files
apps/web/src/app/core @bitwarden/team-platform-dev
apps/web/src/app/shared @bitwarden/team-platform-dev
apps/web/src/translation-constants.ts @bitwarden/team-platform-dev

## Autofill team files ##
apps/browser/src/autofill @bitwarden/team-autofill-dev

## Component Library ##
.storybook @bitwarden/team-component-library
libs/components @bitwarden/team-component-library

## Desktop native module ##
apps/desktop/desktop_native @bitwarden/team-platform-dev

## Multiple file owners ##
apps/browser/package.json
apps/browser/src/manifest.json
apps/browser/src/manifest.v3.json

apps/cli/package.json

apps/desktop/package.json
apps/desktop/src/package-lock.json
apps/desktop/src/package.json

/apps/web/config
/apps/web/package.json

package-lock.json

## Locales ##
apps/browser/src/_locales/en/messages.json
apps/cli/src/locales/en/messages.json
apps/desktop/src/locales/en/messages.json
apps/web/src/locales/en/messages.json

## DevOps team files ##
/.github/workflows @bitwarden/dept-devops
53 changes: 2 additions & 51 deletions .github/whitelist-capital-letters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
./apps/browser/src/safari/desktop/Assets.xcassets/AccentColor.colorset
./apps/browser/src/safari/desktop/Assets.xcassets/AppIcon.appiconset
./apps/browser/src/safari/desktop/Base.lproj
./apps/browser/src/services/vaultTimeout
./apps/browser/store/windows/Assets
./libs/common/src/abstractions/fileDownload
./libs/common/src/abstractions/userVerification
./libs/common/src/abstractions/vaultTimeout
./libs/common/src/services/vaultTimeout
./bitwarden_license/README.md
./libs/angular/src/directives/cipherListVirtualScroll.directive.ts
./libs/angular/src/scss/webfonts/Open_Sans-italic-700.woff
Expand All @@ -23,40 +18,14 @@
./libs/angular/src/validators/inputsFieldMatch.validator.ts
./libs/angular/src/validators/notAllowedValueAsync.validator.ts
./libs/angular/src/services/theming/themeBuilder.ts
./libs/angular/src/interfaces/selectOptions.ts
./libs/common/src/misc/nodeUtils.ts
./libs/common/src/misc/linkedFieldOption.decorator.ts
./libs/common/src/misc/serviceUtils.ts
./libs/common/src/misc/serviceUtils.spec.ts
./libs/common/src/factories/accountFactory.ts
./libs/common/src/factories/globalStateFactory.ts
./libs/common/src/factories/stateFactory.ts
./libs/common/src/abstractions/userVerification/userVerification.service.abstraction.ts
./libs/common/src/abstractions/userVerification/userVerification-api.service.abstraction.ts
./libs/common/src/abstractions/platformUtils.service.ts
./libs/common/src/abstractions/stateMigration.service.ts
./libs/common/src/abstractions/fileDownload/fileDownloadBuilder.ts
./libs/common/src/abstractions/fileDownload/fileDownload.service.ts
./libs/common/src/abstractions/fileDownload/fileDownloadRequest.ts
./libs/common/src/abstractions/formValidationErrors.service.ts
./libs/common/src/abstractions/vaultTimeout/vaultTimeoutSettings.service.ts
./libs/common/src/abstractions/vaultTimeout/vaultTimeout.service.ts
./libs/common/src/abstractions/cryptoFunction.service.ts
./libs/common/src/abstractions/anonymousHub.service.ts
./libs/common/src/abstractions/appId.service.ts
./libs/common/src/services/azureFileUpload.service.ts
./libs/common/src/services/stateMigration.service.ts
./libs/common/src/services/consoleLog.service.ts
./libs/common/src/services/formValidationErrors.service.ts
./libs/common/src/services/vaultTimeout/vaultTimeoutSettings.service.ts
./libs/common/src/services/vaultTimeout/vaultTimeout.service.ts
./libs/common/src/services/anonymousHub.service.ts
./libs/common/src/services/appId.service.ts
./libs/common/src/services/noopMessaging.service.ts
./libs/common/src/services/memoryStorage.service.ts
./libs/common/src/services/bitwardenFileUpload.service.ts
./libs/common/src/services/webCryptoFunction.service.ts
./libs/common/src/interfaces/IEncrypted.ts
./libs/auth/README.md
./libs/vault/README.md
./README.md
./LICENSE_BITWARDEN.txt
./CONTRIBUTING.md
Expand Down Expand Up @@ -93,7 +62,6 @@
./apps/browser/src/models/browserGroupingsComponentState.ts
./apps/browser/src/models/biometricErrors.ts
./apps/browser/src/browser/safariApp.ts
./apps/browser/src/browser/browserApi.ts
./apps/browser/src/safari/desktop/ViewController.swift
./apps/browser/src/safari/desktop/Assets.xcassets/AppIcon.appiconset/Contents.json
./apps/browser/src/safari/desktop/Assets.xcassets/AccentColor.colorset/Contents.json
Expand All @@ -104,21 +72,4 @@
./apps/browser/src/safari/safari/SafariWebExtensionHandler.swift
./apps/browser/src/safari/safari/Info.plist
./apps/browser/src/safari/desktop.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
./apps/browser/src/listeners/onCommandListener.ts
./apps/browser/src/listeners/onInstallListener.ts
./apps/browser/src/services/browserFileDownloadService.ts
./apps/browser/src/services/localBackedSessionStorage.service.spec.ts
./apps/browser/src/services/browserMessagingPrivateModeBackground.service.ts
./apps/browser/src/services/browserPlatformUtils.service.spec.ts
./apps/browser/src/services/browserMemoryStorage.service.ts
./apps/browser/src/services/vaultTimeout/vaultTimeout.service.ts
./apps/browser/src/services/browserCrypto.service.ts
./apps/browser/src/services/browserPlatformUtils.service.ts
./apps/browser/src/services/abstractions/abstractKeyGeneration.service.ts
./apps/browser/src/services/browserLocalStorage.service.ts
./apps/browser/src/services/localBackedSessionStorage.service.ts
./apps/browser/src/services/browserMessagingPrivateModePopup.service.ts
./apps/browser/src/services/browserMessaging.service.ts
./apps/browser/src/services/keyGeneration.service.ts
./apps/browser/src/services/abstractChromeStorageApi.service.ts
./SECURITY.md
42 changes: 42 additions & 0 deletions .github/workflows/auto-branch-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Auto Update Branch

on:
push:
branches:
- 'master'
- 'rc'
paths:
- 'apps/web/**'
- 'libs/**'
- '*'
- '!*.md'
- '!*.txt'
- '.github/workflows/build-web.yml'
workflow_dispatch:
inputs: {}

jobs:
update:
name: Update Branch
runs-on: ubuntu-22.04
env:
_BOT_EMAIL: [email protected]
_BOT_NAME: bitwarden-devops-bot
steps:
- name: Setup
id: setup
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT

- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: 'eu-web-${{ steps.setup.outputs.branch }}'
fetch-depth: 0

- name: Merge ${{ steps.setup.outputs.branch }}
run: |
git config --local user.email "${{ env._BOT_EMAIL }}"
git config --local user.name "${{ env._BOT_NAME }}"
git merge origin/${{ steps.setup.outputs.branch }}
git push
7 changes: 3 additions & 4 deletions .github/workflows/brew-bump-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Retrieve secrets
id: retrieve-secrets
uses: bitwarden/gh-actions/get-keyvault-secrets@c86ced0dc8c9daeecf057a6333e6f318db9c5a2b
uses: bitwarden/gh-actions/get-keyvault-secrets@f1125802b1ccae8c601d7c4f61ce39ea254b10c8
with:
keyvault: "bitwarden-ci"
secrets: "brew-bump-workflow-pat"
Expand All @@ -35,8 +35,7 @@ jobs:
token: ${{ steps.retrieve-secrets.outputs.brew-bump-workflow-pat }}
org: bitwarden
tap: Homebrew/homebrew-core
cask: bitwarden-cli
formula: bitwarden-cli
tag: ${{ github.ref }}
revision: ${{ github.sha }}
force: false
dryrun: true
force: true
Loading

0 comments on commit 452f735

Please sign in to comment.