Browse Source

Merge branch 'master' into update-ast-action

update-ast-action
MtnBurrit0 2 years ago committed by GitHub
parent
commit
9fa3747fd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      .github/CODEOWNERS
  2. 148
      .github/workflows/build.yml
  3. 2
      .github/workflows/enforce-labels.yml
  4. 65
      .github/workflows/release.yml
  5. 18
      .github/workflows/version-bump.yml
  6. 2
      .github/workflows/workflow-linter.yml
  7. 2
      README.md
  8. 6
      jslib/angular/src/components/callout.component.html
  9. 4
      jslib/common/src/enums/importOptions.ts
  10. 5019
      package-lock.json
  11. 56
      package.json
  12. 4
      src/app/tabs/dashboard.component.html
  13. 2
      src/app/tabs/more.component.html
  14. 2
      src/package.json
  15. 5
      webpack.main.js
  16. 14
      webpack.renderer.js

15
.github/CODEOWNERS

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
# Please sort into logical groups with comment headers. Sort groups in order of specificity.
# For example, default owners should always be the first group.
# Sort lines alphabetically within these groups to avoid accidentally adding duplicates.
#
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# Default file owners.
* @bitwarden/team-admin-console-dev
# DevOps for Actions and other workflow changes.
.github/workflows @bitwarden/dept-devops
.github/secrets @bitwarden/dept-devops
# Multiple Owners
**/package.json

148
.github/workflows/build.yml

@ -13,10 +13,10 @@ on: @@ -13,10 +13,10 @@ on:
jobs:
cloc:
name: CLOC
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up CLOC
run: |
@ -29,23 +29,23 @@ jobs: @@ -29,23 +29,23 @@ jobs:
setup:
name: Setup
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
package_version: ${{ steps.retrieve-version.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Get Package Version
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
linux-cli:
name: Build Linux CLI
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
@ -53,10 +53,10 @@ jobs: @@ -53,10 +53,10 @@ jobs:
_PKG_FETCH_VERSION: 3.4
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -94,10 +94,12 @@ jobs: @@ -94,10 +94,12 @@ jobs:
run: npm run dist:cli:lin
- name: Zip
run: zip -j ./dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip ./dist-cli/linux/bwdc ./keytar/linux/build/Release/keytar.node
run: zip -j dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip dist-cli/linux/bwdc keytar/linux/build/Release/keytar.node
- name: Create checksums
run: sha256sum ./dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip | cut -d " " -f 1 > ./dist-cli/bwdc-linux-sha256-$_PACKAGE_VERSION.txt
run: |
shasum -a 256 dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip | \
cut -d " " -f 1 > dist-cli/bwdc-linux-sha256-$_PACKAGE_VERSION.txt
- name: Version Test
run: |
@ -122,14 +124,14 @@ jobs: @@ -122,14 +124,14 @@ jobs:
fi
- name: Upload Linux Zip to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
path: ./dist-cli/bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
if-no-files-found: error
- name: Upload Linux checksum to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
path: ./dist-cli/bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
@ -138,7 +140,7 @@ jobs: @@ -138,7 +140,7 @@ jobs:
macos-cli:
name: Build Mac CLI
runs-on: macos-11
runs-on: macos-12
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
@ -146,10 +148,10 @@ jobs: @@ -146,10 +148,10 @@ jobs:
_PKG_FETCH_VERSION: 3.4
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -187,10 +189,12 @@ jobs: @@ -187,10 +189,12 @@ jobs:
run: npm run dist:cli:mac
- name: Zip
run: zip -j ./dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip ./dist-cli/macos/bwdc ./keytar/macos/build/Release/keytar.node
run: zip -j dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip dist-cli/macos/bwdc keytar/macos/build/Release/keytar.node
- name: Create checksums
run: sha256sum ./dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip | cut -d " " -f 1 > ./dist-cli/bwdc-macos-sha256-$_PACKAGE_VERSION.txt
run: |
shasum -a 256 dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip | \
cut -d " " -f 1 > dist-cli/bwdc-macos-sha256-$_PACKAGE_VERSION.txt
- name: Version Test
run: |
@ -208,23 +212,22 @@ jobs: @@ -208,23 +212,22 @@ jobs:
fi
- name: Upload Mac Zip to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
path: ./dist-cli/bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
if-no-files-found: error
- name: Upload Mac checksum to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
path: ./dist-cli/bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
if-no-files-found: error
windows-cli:
name: Build Windows CLI
runs-on: windows-2019
runs-on: windows-2022
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
@ -232,7 +235,7 @@ jobs: @@ -232,7 +235,7 @@ jobs:
_WIN_PKG_VERSION: 3.4
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Windows builder
run: |
@ -240,7 +243,7 @@ jobs: @@ -240,7 +243,7 @@ jobs:
choco install reshack --no-progress
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -334,15 +337,17 @@ jobs: @@ -334,15 +337,17 @@ jobs:
- name: Zip
shell: cmd
run: 7z a ./dist-cli/bwdc-windows-%_PACKAGE_VERSION%.zip ./dist-cli/windows/bwdc.exe ./keytar/windows/keytar.node
run: |
7z a .\dist-cli\bwdc-windows-%_PACKAGE_VERSION%.zip .\dist-cli\windows\bwdc.exe .\keytar\windows\keytar.node
- name: Version Test
shell: pwsh
run: |
Expand-Archive -Path "./dist-cli/bwdc-windows-${env:_PACKAGE_VERSION}.zip" -DestinationPath "./test/windows"
$testVersion = Invoke-Expression '& ./test/windows/bwdc.exe -v'
echo "version: $env:_PACKAGE_VERSION"
Expand-Archive -Path "dist-cli\bwdc-windows-${{ env._PACKAGE_VERSION }}.zip" -DestinationPath "test\windows"
$testVersion = Invoke-Expression '& .\test\windows\bwdc.exe -v'
echo "version: ${env:_PACKAGE_VERSION}"
echo "testVersion: $testVersion"
if($testVersion -ne $env:_PACKAGE_VERSION) {
if ($testVersion -ne ${env:_PACKAGE_VERSION}) {
Throw "Version test failed."
}
@ -352,14 +357,14 @@ jobs: @@ -352,14 +357,14 @@ jobs:
-t sha256 | Out-File ./dist-cli/bwdc-windows-sha256-${env:_PACKAGE_VERSION}.txt
- name: Upload Windows Zip to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
path: ./dist-cli/bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
if-no-files-found: error
- name: Upload Windows checksum to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
path: ./dist-cli/bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
@ -368,21 +373,17 @@ jobs: @@ -368,21 +373,17 @@ jobs:
windows-gui:
name: Build Windows GUI
runs-on: windows-2019
runs-on: windows-2022
needs: setup
env:
NODE_OPTIONS: --max_old_space_size=4096
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up dotnet
uses: actions/setup-dotnet@9211491ffb35dd6a6657ca4f45d43dfe6e97c829 # v3.0.3
with:
dotnet-version: '6.0.x'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -393,24 +394,17 @@ jobs: @@ -393,24 +394,17 @@ jobs:
npm install -g node-gyp
node-gyp install $(node -v)
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Print environment
run: |
node --version
npm --version
- name: Install AST
uses: bitwarden/gh-actions/install-ast@dfc4cc6b2a38bd189db29cd88b9381a143b04dfc
uses: bitwarden/gh-actions/install-ast@main
- name: Install Node dependencies
run: npm install
# - name: Run linter
# run: npm run lint
- name: Build & Sign
run: npm run dist:win
env:
@ -422,28 +416,28 @@ jobs: @@ -422,28 +416,28 @@ jobs:
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
- name: Upload Portable Executable to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
path: ./dist/Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
if-no-files-found: error
- name: Upload Installer Executable to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
if-no-files-found: error
- name: Upload Installer Executable Blockmap to GitHub
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe.blockmap
if-no-files-found: error
- name: Upload latest auto-update artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: latest.yml
path: ./dist/latest.yml
@ -452,16 +446,17 @@ jobs: @@ -452,16 +446,17 @@ jobs:
linux-gui:
name: Build Linux GUI
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: setup
env:
NODE_OPTIONS: --max_old_space_size=4096
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -472,9 +467,6 @@ jobs: @@ -472,9 +467,6 @@ jobs:
npm install -g node-gyp
node-gyp install $(node -v)
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Set up environment
run: |
sudo apt-get update
@ -491,14 +483,14 @@ jobs: @@ -491,14 +483,14 @@ jobs:
run: npm run dist:lin
- name: Upload AppImage
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
if-no-files-found: error
- name: Upload latest auto-update artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: latest-linux.yml
path: ./dist/latest-linux.yml
@ -507,16 +499,17 @@ jobs: @@ -507,16 +499,17 @@ jobs:
macos-gui:
name: Build MacOS GUI
runs-on: macos-11
runs-on: macos-12
needs: setup
env:
NODE_OPTIONS: --max_old_space_size=4096
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
@ -527,9 +520,6 @@ jobs: @@ -527,9 +520,6 @@ jobs:
npm install -g node-gyp
node-gyp install $(node -v)
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Print environment
run: |
node --version
@ -588,9 +578,6 @@ jobs: @@ -588,9 +578,6 @@ jobs:
- name: Install Node dependencies
run: npm install
# - name: Run linter
# run: npm run lint
- name: Build application
run: npm run dist:mac
env:
@ -598,28 +585,28 @@ jobs: @@ -598,28 +585,28 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Upload .zip artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
if-no-files-found: error
- name: Upload .dmg artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
if-no-files-found: error
- name: Upload .dmg Blockmap artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg.blockmap
if-no-files-found: error
- name: Upload latest auto-update artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: latest-mac.yml
path: ./dist/latest-mac.yml
@ -628,7 +615,7 @@ jobs: @@ -628,7 +615,7 @@ jobs:
check-failures:
name: Check for failures
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- cloc
- setup
@ -669,7 +656,7 @@ jobs: @@ -669,7 +656,7 @@ jobs:
exit 1
fi
- name: Login to Azure - Prod Subscription
- name: Login to Azure - CI subscription
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
if: failure()
with:
@ -677,18 +664,11 @@ jobs: @@ -677,18 +664,11 @@ jobs:
- name: Retrieve secrets
id: retrieve-secrets
uses: bitwarden/gh-actions/get-keyvault-secrets@main
if: failure()
env:
KEYVAULT: bitwarden-ci
SECRETS: |
devops-alerts-slack-webhook-url
run: |
for i in ${SECRETS//,/ }
do
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv)
echo "::add-mask::$VALUE"
echo "::set-output name=$i::$VALUE"
done
with:
keyvault: "bitwarden-ci"
secrets: "devops-alerts-slack-webhook-url"
- name: Notify Slack on failure
uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0

2
.github/workflows/enforce-labels.yml

@ -7,7 +7,7 @@ on: @@ -7,7 +7,7 @@ on:
jobs:
enforce-label:
name: EnforceLabel
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Enforce Label
uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2

65
.github/workflows/release.yml

@ -17,8 +17,13 @@ on: @@ -17,8 +17,13 @@ on:
jobs:
setup:
name: Setup
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
release-version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Branch check
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
run: |
@ -29,37 +34,19 @@ jobs: @@ -29,37 +34,19 @@ jobs:
exit 1
fi
- name: Checkout repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Retrieve Directory Connector release version
id: retrieve-version
run: |
PKG_VERSION=$(jq -r .version src/package.json)
echo "::set-output name=package_version::$PKG_VERSION"
- name: Check to make sure Mobile release version has been bumped
if: ${{ github.event.inputs.release_type == 'Initial Release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_ver=$(hub release -L 1 -f '%T')
latest_ver=${latest_ver:1}
echo "Latest version: $latest_ver"
ver=${{ steps.retrieve-version.outputs.package_version }}
echo "Version: $ver"
if [ "$latest_ver" = "$ver" ]; then
echo "Version has not been bumped!"
exit 1
fi
shell: bash
- name: Get branch name
id: branch
run: |
BRANCH_NAME=$(basename ${{ github.ref }})
echo "::set-output name=branch-name::$BRANCH_NAME"
- name: Check Release Version
id: version
uses: bitwarden/gh-actions/release-version-check@main
with:
release-type: ${{ github.event.inputs.release_type }}
project-type: ts
file: src/package.json
release:
name: Release
runs-on: ubuntu-22.04
needs: setup
steps:
- name: Create GitHub deployment
uses: chrnorm/deployment-action@d42cde7132fcec920de534fffc3be83794335c00 # v2.0.5
id: deployment
@ -67,20 +54,20 @@ jobs: @@ -67,20 +54,20 @@ jobs:
token: '${{ secrets.GITHUB_TOKEN }}'
initial-status: 'in_progress'
environment: 'production'
description: 'Deployment ${{ steps.retrieve-version.outputs.package_version }} from branch ${{ steps.branch.outputs.branch-name }}'
description: 'Deployment ${{ needs.setup.outputs.release-version }} from branch ${{ github.ref_name }}'
task: release
- name: Download all artifacts
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
uses: bitwarden/gh-actions/download-artifacts@main
with:
workflow: build.yml
workflow_conclusion: success
branch: ${{ steps.branch.outputs.branch-name }}
branch: ${{ github.ref_name }}
- name: Download all artifacts
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
uses: bitwarden/gh-actions/download-artifacts@main
with:
workflow: build.yml
workflow_conclusion: success
@ -88,9 +75,9 @@ jobs: @@ -88,9 +75,9 @@ jobs:
- name: Create release
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
env:
PKG_VERSION: ${{ steps.retrieve-version.outputs.package_version }}
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
with:
artifacts: "./bwdc-windows-${{ env.PKG_VERSION }}.zip,
./bwdc-macos-${{ env.PKG_VERSION }}.zip,
@ -114,7 +101,7 @@ jobs: @@ -114,7 +101,7 @@ jobs:
body: "<insert release notes here>"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
- name: Update deployment status to Success
if: ${{ success() }}
uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1

18
.github/workflows/version-bump.yml

@ -11,11 +11,11 @@ on: @@ -11,11 +11,11 @@ on:
jobs:
bump_version:
name: "Create version_bump_${{ github.event.inputs.version_number }} branch"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Branch
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to Azure - Prod Subscription
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
with:
@ -23,18 +23,18 @@ jobs: @@ -23,18 +23,18 @@ jobs:
- name: Retrieve secrets
id: retrieve-secrets
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: "bitwarden-ci"
secrets: "github-gpg-private-key, github-gpg-private-key-passphrase"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41 # v5.3.0
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
with:
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}
git_user_signingkey: true
git_commit_gpgsign: true
git_commit_gpgsign: true
- name: Create Version Branch
run: |
@ -42,12 +42,12 @@ jobs: @@ -42,12 +42,12 @@ jobs:
git push -u origin version_bump_${{ github.event.inputs.version_number }}
- name: Checkout Version Branch
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
ref: version_bump_${{ github.event.inputs.version_number }}
- name: Bump Version - Package
uses: bitwarden/gh-actions/version-bump@72594be690a4e7bfa87b1402b2aedc75acdbff12
uses: bitwarden/gh-actions/version-bump@main
with:
version: ${{ github.event.inputs.version_number }}
file_path: "./src/package.json"
@ -80,6 +80,6 @@ jobs: @@ -80,6 +80,6 @@ jobs:
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [X] Other
## Objective
Automated version bump to ${{ github.event.inputs.version_number }}"

2
.github/workflows/workflow-linter.yml

@ -8,4 +8,4 @@ on: @@ -8,4 +8,4 @@ on:
jobs:
call-workflow:
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@72594be690a4e7bfa87b1402b2aedc75acdbff12
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@c970b0fb89bd966749280e832928db62040812bf

2
README.md

@ -48,7 +48,7 @@ We provide detailed documentation and examples for using the Directory Connector @@ -48,7 +48,7 @@ We provide detailed documentation and examples for using the Directory Connector
**Requirements**
- [Node.js](https://nodejs.org) v16.13.1 (LTS)
- [Node.js](https://nodejs.org) v18 (LTS)
- Windows users: To compile the native node modules used in the app you will need the Visual C++ toolset, available through the standard Visual Studio installer (recommended) or by installing [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools) through `npm`. See more at [Compiling native Addon modules](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules).
**Run the app**

6
jslib/angular/src/components/callout.component.html

@ -12,10 +12,10 @@ @@ -12,10 +12,10 @@
{{ enforcedPolicyMessage }}
<ul>
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
{{ "policyInEffectMinComplexity" | i18n: getPasswordScoreAlertDisplay() }}
{{ "policyInEffectMinComplexity" | i18n : getPasswordScoreAlertDisplay() }}
</li>
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
{{ "policyInEffectMinLength" | i18n: enforcedPolicyOptions?.minLength.toString() }}
{{ "policyInEffectMinLength" | i18n : enforcedPolicyOptions?.minLength.toString() }}
</li>
<li *ngIf="enforcedPolicyOptions?.requireUpper">
{{ "policyInEffectUppercase" | i18n }}
@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
{{ "policyInEffectNumbers" | i18n }}
</li>
<li *ngIf="enforcedPolicyOptions?.requireSpecial">
{{ "policyInEffectSpecial" | i18n: "!@#$%^&*" }}
{{ "policyInEffectSpecial" | i18n : "!@#$%^&*" }}
</li>
</ul>
</div>

4
jslib/common/src/enums/importOptions.ts

@ -70,5 +70,5 @@ export const regularImportOptions = [ @@ -70,5 +70,5 @@ export const regularImportOptions = [
] as const;
export type ImportType =
| typeof featuredImportOptions[number]["id"]
| typeof regularImportOptions[number]["id"];
| (typeof featuredImportOptions)[number]["id"]
| (typeof regularImportOptions)[number]["id"];

5019
package-lock.json generated

File diff suppressed because it is too large Load Diff

56
package.json

@ -67,33 +67,33 @@ @@ -67,33 +67,33 @@
"test:jslib:watch:all": "jest --watchAll"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.2.8",
"@angular-devkit/build-angular": "15.2.9",
"@angular/compiler-cli": "15.2.9",
"@angular/platform-browser-dynamic": "15.2.9",
"@fluffy-spoon/substitute": "1.208.0",
"@microsoft/microsoft-graph-types": "2.33.0",
"@ngtools/webpack": "15.2.8",
"@microsoft/microsoft-graph-types": "2.38.0",
"@ngtools/webpack": "15.2.9",
"@types/inquirer": "8.2.6",
"@types/jest": "29.5.2",
"@types/jest": "29.5.4",
"@types/ldapjs": "2.2.5",
"@types/lowdb": "1.0.11",
"@types/lunr": "2.3.4",
"@types/node-fetch": "2.6.4",
"@types/node-forge": "1.3.2",
"@types/node": "18.16.17",
"@types/papaparse": "5.3.7",
"@types/node-forge": "1.3.4",
"@types/node": "18.17.12",
"@types/papaparse": "5.3.8",
"@types/proper-lockfile": "4.1.2",
"@types/tldjs": "2.3.1",
"@types/zxcvbn": "4.4.1",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"clean-webpack-plugin": "4.0.0",
"commander": "7.2.0",
"concurrently": "6.5.1",
"concurrently": "8.2.1",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"electron-builder": "22.14.13",
"electron-builder": "24.6.3",
"electron-log": "4.4.8",
"electron-notarize": "1.2.2",
"electron-rebuild": "3.2.9",
@ -101,16 +101,16 @@ @@ -101,16 +101,16 @@
"electron-store": "8.1.0",
"electron-updater": "5.3.0",
"electron": "18.3.15",
"eslint-config-prettier": "8.8.0",
"eslint-config-prettier": "8.10.0",
"eslint-import-resolver-typescript": "2.7.1",
"eslint-plugin-import": "2.27.5",
"eslint": "8.42.0",
"eslint-plugin-import": "2.28.1",
"eslint": "8.48.0",
"form-data": "4.0.0",
"html-loader": "3.1.2",
"html-webpack-plugin": "5.5.3",
"husky": "8.0.3",
"jest-preset-angular": "13.1.1",
"jest": "29.5.0",
"jest": "29.6.4",
"jsdom": "22.1.0",
"lint-staged": "12.5.0",
"mini-css-extract-plugin": "2.7.6",
@ -123,11 +123,11 @@ @@ -123,11 +123,11 @@
"rimraf": "3.0.2",
"rxjs": "7.8.1",
"sass-loader": "12.6.0",
"sass": "1.63.3",
"sass": "1.66.1",
"tapable": "1.1.3",
"ts-loader": "9.4.3",
"ts-loader": "9.4.4",
"ts-node": "10.9.1",
"tsconfig-paths-webpack-plugin": "4.0.1",
"tsconfig-paths-webpack-plugin": "4.1.0",
"tsconfig-paths": "3.14.2",
"ttypescript": "1.5.15",
"typemoq": "2.1.0",
@ -136,13 +136,13 @@ @@ -136,13 +136,13 @@
"webpack-cli": "5.1.4",
"webpack-merge": "5.9.0",
"webpack-node-externals": "3.0.0",
"webpack": "5.86.0",
"zone.js": "0.13.0"
"webpack": "5.88.2",
"zone.js": "0.13.1"
},
"dependencies": {
"@angular/animations": "15.2.9",
"@angular/cdk": "15.2.9",
"@angular/cli": "15.2.8",
"@angular/cli": "15.2.9",
"@angular/common": "15.2.9",
"@angular/compiler": "15.2.9",
"@angular/core": "15.2.9",
@ -154,32 +154,32 @@ @@ -154,32 +154,32 @@
"@bitwarden/jslib-common": "file:jslib/common",
"@bitwarden/jslib-electron": "file:jslib/electron",
"@bitwarden/jslib-node": "file:jslib/node",
"@microsoft/microsoft-graph-client": "3.0.5",
"@microsoft/signalr": "5.0.17",
"@microsoft/signalr-protocol-msgpack": "5.0.17",
"@microsoft/microsoft-graph-client": "3.0.6",
"@microsoft/signalr": "7.0.10",
"@microsoft/signalr-protocol-msgpack": "7.0.10",
"big-integer": "1.6.51",
"bootstrap": "4.6.2",
"browser-hrtime": "1.1.8",
"chalk": "4.1.2",
"commander": "7.2.0",
"core-js": "3.31.0",
"core-js": "3.32.1",
"duo_web_sdk": "git+https://github.com/duosecurity/duo_web_sdk.git",
"form-data": "4.0.0",
"googleapis": "73.0.0",
"https-proxy-agent": "5.0.1",
"inquirer": "8.2.5",
"inquirer": "8.2.6",
"keytar": "7.9.0",
"ldapjs": "2.3.3",
"lowdb": "1.0.0",
"lunr": "2.3.9",
"ngx-toastr": "16.2.0",
"node-fetch": "2.6.11",
"node-fetch": "2.7.0",
"open": "8.4.2",
"papaparse": "5.4.1",
"proper-lockfile": "4.1.2",
"rxjs": "7.8.1",
"tldjs": "2.3.1",
"zone.js": "0.13.0",
"zone.js": "0.13.1",
"zxcvbn": "4.4.2"
},
"engines": {

4
src/app/tabs/dashboard.component.html

@ -4,11 +4,11 @@ @@ -4,11 +4,11 @@
<p>
{{ "lastGroupSync" | i18n }}:
<span *ngIf="!lastGroupSync">-</span>
{{ lastGroupSync | date: "medium" }}
{{ lastGroupSync | date : "medium" }}
<br />
{{ "lastUserSync" | i18n }}:
<span *ngIf="!lastUserSync">-</span>
{{ lastUserSync | date: "medium" }}
{{ lastUserSync | date : "medium" }}
</p>
<p>
{{ "syncStatus" | i18n }}:

2
src/app/tabs/more.component.html

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<p>
{{ "bitwardenDirectoryConnector" | i18n }}
<br />
{{ "version" | i18n: version }} <br />
{{ "version" | i18n : version }} <br />
&copy; Bitwarden Inc. LLC 2015-{{ year }}
</p>
<button

2
src/package.json

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
"name": "@bitwarden/directory-connector",
"productName": "Bitwarden Directory Connector",
"description": "Sync your user directory to your Bitwarden organization.",
"version": "2022.11.0",
"version": "2023.10.0",
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
"homepage": "https://bitwarden.com",
"license": "GPL-3.0",

5
webpack.main.js

@ -57,7 +57,10 @@ const main = { @@ -57,7 +57,10 @@ const main = {
],
}),
],
externals: [nodeExternals()],
externals: {
"electron-reload": "commonjs2 electron-reload",
keytar: "commonjs2 keytar",
},
};
module.exports = merge(common, main);

14
webpack.renderer.js

@ -10,7 +10,19 @@ const common = { @@ -10,7 +10,19 @@ const common = {
module: {
rules: [
{
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
test: /\.[cm]?js$/,
use: [
{
loader: "babel-loader",
options: {
configFile: false,
plugins: ["@angular/compiler-cli/linker/babel"],
},
},
],
},
{
test: /\.[jt]sx?$/,
loader: "@ngtools/webpack",
},
{

Loading…
Cancel
Save