Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bitwarden/clients into feature/de…
Browse files Browse the repository at this point in the history
…crypt-test

# Conflicts:
#	apps/web/src/app/settings/change-password.component.ts
  • Loading branch information
Hinton committed Jan 12, 2023
2 parents 3eec7ba + 23ec317 commit 43850ad
Show file tree
Hide file tree
Showing 906 changed files with 59,028 additions and 7,494 deletions.
12 changes: 1 addition & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,14 @@
"error",
{
"zones": [
// Do not allow angular/node/electron code to be imported into common
// Do not allow angular/node code to be imported into common
{
"target": "./libs/common/**/*",
"from": "./libs/angular/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/node/**/*"
},
{
"target": "./libs/common/**/*",
"from": "./libs/electron/**/*"
}
]
}
Expand Down Expand Up @@ -131,12 +127,6 @@
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/node/*", "src/**/*"] }]
}
},
{
"files": ["libs/electron/src/**/*.ts"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/electron/*", "src/**/*"] }]
}
}
]
}
54 changes: 0 additions & 54 deletions .github/whitelist-capital-letters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
./apps/browser/src/safari/desktop/Base.lproj
./apps/browser/src/services/vaultTimeout
./apps/browser/store/windows/Assets
./apps/desktop/src/models/nativeMessaging
./apps/desktop/src/models/nativeMessaging/encryptedMessagePayloads
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses
./libs/common/spec/misc/logInStrategies
./libs/common/src/abstractions/fileDownload
./libs/common/src/abstractions/userVerification
./libs/common/src/abstractions/vaultTimeout
./libs/common/src/emailForwarders
./libs/common/src/misc/logInStrategies
./libs/common/src/services/userVerification
./libs/common/src/services/vaultTimeout
Expand Down Expand Up @@ -112,12 +108,6 @@
./libs/common/src/enums/nativeMessagingVersion.ts
./libs/common/src/enums/cipherRepromptType.ts
./libs/common/src/enums/organizationUserType.ts
./libs/common/src/emailForwarders/fastmailForwarder.ts
./libs/common/src/emailForwarders/duckDuckGoForwarder.ts
./libs/common/src/emailForwarders/firefoxRelayForwarder.ts
./libs/common/src/emailForwarders/anonAddyForwarder.ts
./libs/common/src/emailForwarders/simpleLoginForwarder.ts
./libs/common/src/emailForwarders/forwarderOptions.ts
./libs/common/src/factories/accountFactory.ts
./libs/common/src/factories/globalStateFactory.ts
./libs/common/src/factories/stateFactory.ts
Expand Down Expand Up @@ -162,16 +152,6 @@
./libs/common/src/services/bitwardenFileUpload.service.ts
./libs/common/src/services/webCryptoFunction.service.ts
./libs/common/src/interfaces/IEncrypted.ts
./libs/electron/spec/services/electronLog.service.spec.ts
./libs/electron/src/baseMenu.ts
./libs/electron/src/services/electronLog.service.ts
./libs/electron/src/services/electronStorage.service.ts
./libs/electron/src/services/electronRendererMessaging.service.ts
./libs/electron/src/services/electronMainMessaging.service.ts
./libs/electron/src/services/electronPlatformUtils.service.ts
./libs/electron/src/services/electronRendererStorage.service.ts
./libs/electron/src/services/electronCrypto.service.ts
./libs/electron/src/services/electronRendererSecureStorage.service.ts
./README.md
./LICENSE_BITWARDEN.txt
./CONTRIBUTING.md
Expand All @@ -186,42 +166,9 @@
./apps/desktop/resources/appx/StoreLogo.png
./apps/desktop/resources/appx/Wide310x150Logo.png
./apps/desktop/resources/appx/Square44x44Logo.png
./apps/desktop/native-messaging-test-runner/src/ipcService.ts
./apps/desktop/native-messaging-test-runner/src/nativeMessageService.ts
./apps/desktop/native-messaging-test-runner/src/logUtils.ts
./apps/desktop/README.md
./apps/desktop/desktop_native/Cargo.toml
./apps/desktop/desktop_native/Cargo.lock
./apps/desktop/src/app/services/desktopFileDownloadService.ts
./apps/desktop/src/models/nativeMessaging/unencryptedCommand.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessage.ts
./apps/desktop/src/models/nativeMessaging/legacyMessageWrapper.ts
./apps/desktop/src/models/nativeMessaging/unencryptedMessage.ts
./apps/desktop/src/models/nativeMessaging/unencryptedMessageResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedCommand.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/successStatusResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/generateResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/failureStatusResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/cannotDecryptErrorResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/userStatusErrorResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/accountStatusResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/encryptedMessageResponse.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessageResponses/cipherResponse.ts
./apps/desktop/src/models/nativeMessaging/decryptedCommandData.ts
./apps/desktop/src/models/nativeMessaging/messageCommon.ts
./apps/desktop/src/models/nativeMessaging/legacyMessage.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessagePayloads/credentialUpdatePayload.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessagePayloads/passwordGeneratePayload.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessagePayloads/credentialCreatePayload.ts
./apps/desktop/src/models/nativeMessaging/encryptedMessagePayloads/credentialRetrievePayload.ts
./apps/desktop/src/main/desktopCredentialStorageListener.ts
./apps/desktop/src/main/powerMonitor.main.ts
./apps/desktop/src/main/nativeMessaging.main.ts
./apps/desktop/src/services/passwordReprompt.service.ts
./apps/desktop/src/services/encryptedMessageHandlerService.ts
./apps/desktop/src/services/nativeMessaging.service.ts
./apps/desktop/src/services/nativeMessageHandler.service.ts
./apps/cli/stores/chocolatey/tools/VERIFICATION.txt
./apps/cli/README.md
./apps/browser/README.md
Expand Down Expand Up @@ -260,7 +207,6 @@
./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/commands/autoFillActiveTabCommand.ts
./apps/browser/src/listeners/onCommandListener.ts
./apps/browser/src/listeners/onInstallListener.ts
./apps/browser/src/services/browserFileDownloadService.ts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
repo_url=https://github.com/$GITHUB_REPOSITORY.git
adj_build_num=${GITHUB_SHA:0:7}
echo "::set-output name=repo_url::$repo_url"
echo "::set-output name=adj_build_number::$adj_build_num"
echo "repo_url=$repo_url" >> $GITHUB_OUTPUT
echo "adj_build_number=$adj_build_num" >> $GITHUB_OUTPUT
locales-test:
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
name: dist-opera-MV3-${{ env._BUILD_NUMBER }}.zip
path: apps/browser/dist/dist-opera-mv3.zip
if-no-files-found: error

- name: Upload Chrome artifact
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
id: retrieve-version
run: |
PKG_VERSION=$(jq -r .version package.json)
echo "::set-output name=package_version::$PKG_VERSION"
echo "package_version=$PKG_VERSION" >> $GITHUB_OUTPUT
cli:
Expand All @@ -72,7 +72,7 @@ jobs:
- setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
_WIN_PKG_FETCH_VERSION: 16.15.0
_WIN_PKG_FETCH_VERSION: 16.16.0
_WIN_PKG_VERSION: 3.4
steps:
- name: Checkout repo
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,45 +87,45 @@ jobs:
id: retrieve-version
run: |
PKG_VERSION=$(jq -r .version src/package.json)
echo "::set-output name=package_version::$PKG_VERSION"
echo "package_version=$PKG_VERSION" >> $GITHUB_OUTPUT
- name: Increment Version
id: increment-version
run: |
BUILD_NUMBER=$(expr 3000 + $GITHUB_RUN_NUMBER)
echo "Setting build number to $BUILD_NUMBER"
echo "::set-output name=build_number::$BUILD_NUMBER"
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
- name: Get Version Channel
id: release-channel
run: |
case "${{ steps.retrieve-version.outputs.package_version }}" in
*"alpha"*)
echo "::set-output name=channel::alpha"
echo "channel=alpha" >> $GITHUB_OUTPUT
echo "[!] We do not yet support 'alpha'"
exit 1
;;
*"beta"*)
echo "::set-output name=channel::beta"
echo "channel=beta" >> $GITHUB_OUTPUT
;;
*)
echo "::set-output name=channel::latest"
echo "channel=latest" >> $GITHUB_OUTPUT
;;
esac
- name: Check if special branches exist
id: branch-check
run: |
if [[ $(git ls-remote --heads origin rc) ]]; then
echo "::set-output name=rc_branch_exists::1"
echo "rc_branch_exists=1" >> $GITHUB_OUTPUT
else
echo "::set-output name=rc_branch_exists::0"
echo "rc_branch_exists=0" >> $GITHUB_OUTPUT
fi
if [[ $(git ls-remote --heads origin hotfix-rc-desktop) ]]; then
echo "::set-output name=hotfix_branch_exists::1"
echo "hotfix_branch_exists=1" >> $GITHUB_OUTPUT
else
echo "::set-output name=hotfix_branch_exists::0"
echo "hotfix_branch_exists=0" >> $GITHUB_OUTPUT
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Get GitHub sha as version
id: version
run: echo "::set-output name=value::${GITHUB_SHA:0:7}"
run: echo "value=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT

build-artifacts:
name: Build artifacts
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
IMAGE_TAG=$IMAGE_TAG-$TAG_EXTENSION
fi
echo "::set-output name=value::$IMAGE_TAG"
echo "value=$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Tag image
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-desktop-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ jobs:
run: |
BUILD_NUMBER=$(expr 3000 + $GITHUB_RUN_NUMBER)
echo "Setting build number to $BUILD_NUMBER"
echo "::set-output name=build_number::$BUILD_NUMBER"
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
- name: Get Version Channel
id: release-channel
run: |
case "${{ steps.version.outputs.version }}" in
*"alpha"*)
echo "::set-output name=channel::alpha"
echo "channel=alpha" >> $GITHUB_OUTPUT
echo "[!] We do not yet support 'alpha'"
exit 1
;;
*"beta"*)
echo "::set-output name=channel::beta"
echo "channel=beta" >> $GITHUB_OUTPUT
;;
*)
echo "::set-output name=channel::latest"
echo "channel=latest" >> $GITHUB_OUTPUT
;;
esac
Expand All @@ -102,7 +102,7 @@ jobs:
git push -u origin $branch_name
echo "::set-output name=branch-name::$branch_name"
echo "branch-name=$branch_name" >> $GITHUB_OUTPUT
linux:
name: Linux Build
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ on:
required: true
default: true
type: boolean
electron_publish:
description: 'Publish electron to S3 bucket'
required: true
default: true
type: boolean
github_release:
description: 'Publish github release'
required: true
default: true
type: boolean

defaults:
run:
Expand Down Expand Up @@ -70,15 +80,15 @@ jobs:
run: |
case "${{ steps.version.outputs.version }}" in
*"alpha"*)
echo "::set-output name=channel::alpha"
echo "channel=alpha" >> $GITHUB_OUTPUT
echo "[!] We do not yet support 'alpha'"
exit 1
;;
*"beta"*)
echo "::set-output name=channel::beta"
echo "channel=beta" >> $GITHUB_OUTPUT
;;
*)
echo "::set-output name=channel::latest"
echo "channel=latest" >> $GITHUB_OUTPUT
;;
esac
Expand Down Expand Up @@ -136,6 +146,7 @@ jobs:
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive

- name: Set staged rollout percentage
if: ${{ github.event.inputs.electron_publish }}
env:
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
ROLLOUT_PCT: ${{ github.event.inputs.rollout_percentage }}
Expand All @@ -145,7 +156,7 @@ jobs:
echo "stagingPercentage: ${ROLLOUT_PCT}" >> apps/desktop/artifacts/${RELEASE_CHANNEL}-mac.yml
- name: Publish artifacts to S3
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
if: ${{ github.event.inputs.release_type != 'Dry Run' && github.event.inputs.electron_publish }}
env:
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.aws-electron-access-id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.aws-electron-access-key }}
Expand All @@ -159,7 +170,7 @@ jobs:
--quiet
- name: Publish artifacts to R2
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
if: ${{ github.event.inputs.release_type != 'Dry Run' && github.event.inputs.electron_publish }}
env:
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.r2-electron-access-id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.r2-electron-access-key }}
Expand All @@ -175,7 +186,7 @@ jobs:
- name: Create Release
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09
if: ${{ steps.release-channel.outputs.channel == 'latest' && github.event.inputs.release_type != 'Dry Run' }}
if: ${{ steps.release-channel.outputs.channel == 'latest' && github.event.inputs.release_type != 'Dry Run' && github.event.inputs.github_release }}
env:
PKG_VERSION: ${{ steps.version.outputs.version }}
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
Expand Down
Loading

0 comments on commit 43850ad

Please sign in to comment.