diff --git a/.github/workflows/build-lesspass-pure-package.yml b/.github/workflows/build-lesspass-pure-package.yml deleted file mode 100644 index 8accc0d..0000000 --- a/.github/workflows/build-lesspass-pure-package.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: build-lesspass-pure-package - -on: - push: - paths: - - "packages/lesspass-pure/**" - - "!packages/lesspass-pure/dist/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: git hash - run: | - git rev-parse HEAD - - name: test lesspass-pure package - run: | - yarn install - yarn workspace lesspass-pure run test - - build-and-commit-and-push: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - with: - ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: build lesspass-pure package - run: | - cd packages/lesspass-pure - yarn install - yarn build - - name: commit build and push - run: | - git config --global user.name 'botsito' - git config --global user.email 'botsito@lesspass.com' - git add . - git commit -m "Auto build for lesspass-pure" - git push diff --git a/.github/workflows/cli-publish.yml b/.github/workflows/cli-publish.yml new file mode 100644 index 0000000..309fce4 --- /dev/null +++ b/.github/workflows/cli-publish.yml @@ -0,0 +1,21 @@ +name: cli-publish +on: + workflow_run: + workflows: ["cli-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + - run: | + cd cli + ./deploy + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/cli-test.yml b/.github/workflows/cli-test.yml new file mode 100644 index 0000000..537dbc8 --- /dev/null +++ b/.github/workflows/cli-test.yml @@ -0,0 +1,24 @@ +name: cli-test +on: + push: + paths: + - "cli/**" + pull_request: + paths: + - "cli/**" +jobs: + test: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: + - "3.6" + - "3.8" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: cd cli + - run: ./test diff --git a/.github/workflows/containers-publish.yml b/.github/workflows/containers-publish.yml new file mode 100644 index 0000000..f7f139d --- /dev/null +++ b/.github/workflows/containers-publish.yml @@ -0,0 +1,19 @@ +name: containers-publish +on: + workflow_run: + workflows: ["containers-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: deploy containers + run: | + cd containers + ./deploy + env: + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} diff --git a/.github/workflows/containers-test.yml b/.github/workflows/containers-test.yml new file mode 100644 index 0000000..0bead1d --- /dev/null +++ b/.github/workflows/containers-test.yml @@ -0,0 +1,45 @@ +name: containers-test +on: + push: + paths: + - "containers/**" + - "packages/lesspass-site/**" + pull_request: + paths: + - "containers/**" + - "packages/lesspass-site/**" +jobs: + test-backend: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - run: | + cd containers/backend + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python manage.py test + test-site: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-site run test + test-integration: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - run: | + cd containers + ./test diff --git a/.github/workflows/deploy-cli.yml b/.github/workflows/deploy-cli.yml deleted file mode 100644 index 4765b67..0000000 --- a/.github/workflows/deploy-cli.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-cli - -on: - push: - paths: - - "cli/lesspass/version.py" - -jobs: - test-cli: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.6" - - name: test cli - run: | - cd cli - ./test - - deploy-cli: - runs-on: ubuntu-18.04 - needs: test-cli - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.6" - - name: deploy cli - run: | - cd cli - ./deploy - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/deploy-containers.yml b/.github/workflows/deploy-containers.yml deleted file mode 100644 index 64b8a80..0000000 --- a/.github/workflows/deploy-containers.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: deploy-containers - -on: - push: - paths: - - "containers/**" - - "packages/lesspass-site/**" - -jobs: - test-containers: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: test containers - run: | - cd containers - ./test - - deploy-containers: - runs-on: ubuntu-18.04 - needs: test-containers - steps: - - uses: actions/checkout@v2 - - name: deploy containers - run: | - cd containers - ./deploy - env: - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} diff --git a/.github/workflows/deploy-lesspass-crypto-package.yml b/.github/workflows/deploy-lesspass-crypto-package.yml deleted file mode 100644 index cb5c7ae..0000000 --- a/.github/workflows/deploy-lesspass-crypto-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-lesspass-crypto-package - -on: - push: - paths: - - "packages/lesspass-crypto/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass-crypto package - run: | - yarn install - yarn workspace lesspass-crypto run test - - deploy: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: deploy lesspass-crypto package - run: | - cd packages - ./deploy lesspass-crypto - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-entropy-package.yml b/.github/workflows/deploy-lesspass-entropy-package.yml deleted file mode 100644 index c0e1f13..0000000 --- a/.github/workflows/deploy-lesspass-entropy-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-lesspass-entropy-package - -on: - push: - paths: - - "packages/lesspass-entropy/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass-entropy package - run: | - yarn install - yarn workspace lesspass-entropy run test - - deploy: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: deploy lesspass-entropy package - run: | - cd packages - ./deploy lesspass-entropy - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-fingerprint-package.yml b/.github/workflows/deploy-lesspass-fingerprint-package.yml deleted file mode 100644 index 0dba3da..0000000 --- a/.github/workflows/deploy-lesspass-fingerprint-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-lesspass-fingerprint-package - -on: - push: - paths: - - "packages/lesspass-fingerprint/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass-fingerprint package - run: | - yarn install - yarn workspace lesspass-fingerprint run test - - deploy: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: deploy lesspass-fingerprint package - run: | - cd packages - ./deploy lesspass-fingerprint - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-package.yml b/.github/workflows/deploy-lesspass-package.yml deleted file mode 100644 index 94725f6..0000000 --- a/.github/workflows/deploy-lesspass-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-lesspass-package - -on: - push: - paths: - - "packages/lesspass/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass package - run: | - yarn install - yarn workspace lesspass run test - - deploy: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: deploy lesspass package - run: | - cd packages - ./deploy lesspass - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-pure-package.yml b/.github/workflows/deploy-lesspass-pure-package.yml deleted file mode 100644 index 6c0ae34..0000000 --- a/.github/workflows/deploy-lesspass-pure-package.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: deploy-lesspass-pure-package - -on: - push: - paths: - - "packages/lesspass-pure/dist/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass-pure package - run: | - yarn install - yarn workspace lesspass-pure run test - - deploy: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: git hash - run: | - git rev-parse HEAD - - name: deploy lesspass-pure package - run: | - cd packages - ./deploy lesspass-pure - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-render-password-package.yml b/.github/workflows/deploy-lesspass-render-password-package.yml deleted file mode 100644 index 1b47ff0..0000000 --- a/.github/workflows/deploy-lesspass-render-password-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: deploy-lesspass-render-password-package - -on: - push: - paths: - - "packages/lesspass-render-password/**" - -jobs: - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test lesspass-render-password package - run: | - yarn install - yarn workspace lesspass-render-password run test - - deploy: - runs-on: ubuntu-18.04 - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: deploy lesspass-render-password package - run: | - cd packages - ./deploy lesspass-render-password - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-crypto-publish.yml b/.github/workflows/lesspass-crypto-publish.yml new file mode 100644 index 0000000..3d1c94b --- /dev/null +++ b/.github/workflows/lesspass-crypto-publish.yml @@ -0,0 +1,22 @@ +name: lesspass-crypto-publish +on: + workflow_run: + workflows: ["lesspass-crypto-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass-crypto run build + - run: yarn workspace lesspass-crypto run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-crypto-test.yml b/.github/workflows/lesspass-crypto-test.yml new file mode 100644 index 0000000..c75da35 --- /dev/null +++ b/.github/workflows/lesspass-crypto-test.yml @@ -0,0 +1,24 @@ +name: lesspass-crypto-test +on: + push: + paths: + - "packages/lesspass-crypto/**" + pull_request: + paths: + - "packages/lesspass-crypto/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-crypto run test diff --git a/.github/workflows/lesspass-entropy-publish.yml b/.github/workflows/lesspass-entropy-publish.yml new file mode 100644 index 0000000..1d79d76 --- /dev/null +++ b/.github/workflows/lesspass-entropy-publish.yml @@ -0,0 +1,21 @@ +name: lesspass-entropy-publish +on: + workflow_run: + workflows: ["lesspass-entropy-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass-entropy run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-entropy-test.yml b/.github/workflows/lesspass-entropy-test.yml new file mode 100644 index 0000000..74ca268 --- /dev/null +++ b/.github/workflows/lesspass-entropy-test.yml @@ -0,0 +1,24 @@ +name: lesspass-entropy-test +on: + push: + paths: + - "packages/lesspass-entropy/**" + pull_request: + paths: + - "packages/lesspass-entropy/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-entropy run test diff --git a/.github/workflows/lesspass-fingerprint-publish.yml b/.github/workflows/lesspass-fingerprint-publish.yml new file mode 100644 index 0000000..8ac713c --- /dev/null +++ b/.github/workflows/lesspass-fingerprint-publish.yml @@ -0,0 +1,22 @@ +name: lesspass-fingerprint-publish +on: + workflow_run: + workflows: ["lesspass-fingerprint-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass-fingerprint run build + - run: yarn workspace lesspass-fingerprint run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-fingerprint-test.yml b/.github/workflows/lesspass-fingerprint-test.yml new file mode 100644 index 0000000..6eeac9b --- /dev/null +++ b/.github/workflows/lesspass-fingerprint-test.yml @@ -0,0 +1,24 @@ +name: lesspass-fingerprint-test +on: + push: + paths: + - "packages/lesspass-fingerprint/**" + pull_request: + paths: + - "packages/lesspass-fingerprint/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-fingerprint run test diff --git a/.github/workflows/lesspass-publish.yml b/.github/workflows/lesspass-publish.yml new file mode 100644 index 0000000..06c10bc --- /dev/null +++ b/.github/workflows/lesspass-publish.yml @@ -0,0 +1,21 @@ +name: lesspass-publish +on: + workflow_run: + workflows: ["lesspass-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-pure-publish.yml b/.github/workflows/lesspass-pure-publish.yml new file mode 100644 index 0000000..070244c --- /dev/null +++ b/.github/workflows/lesspass-pure-publish.yml @@ -0,0 +1,22 @@ +name: lesspass-pure-publish +on: + workflow_run: + workflows: ["lesspass-pure-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass-pure run build + - run: yarn workspace lesspass-pure run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-pure-test.yml b/.github/workflows/lesspass-pure-test.yml new file mode 100644 index 0000000..aa92e95 --- /dev/null +++ b/.github/workflows/lesspass-pure-test.yml @@ -0,0 +1,24 @@ +name: lesspass-pure-test +on: + push: + paths: + - "packages/lesspass-pure/**" + pull_request: + paths: + - "packages/lesspass-pure/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-pure run test diff --git a/.github/workflows/lesspass-render-password-publish.yml b/.github/workflows/lesspass-render-password-publish.yml new file mode 100644 index 0000000..19f1853 --- /dev/null +++ b/.github/workflows/lesspass-render-password-publish.yml @@ -0,0 +1,21 @@ +name: lesspass-render-password-publish +on: + workflow_run: + workflows: ["lesspass-render-password-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + registry-url: "https://registry.npmjs.org" + - run: yarn install + - run: yarn workspace lesspass-render-password run publish + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/lesspass-render-password-test.yml b/.github/workflows/lesspass-render-password-test.yml new file mode 100644 index 0000000..7060b52 --- /dev/null +++ b/.github/workflows/lesspass-render-password-test.yml @@ -0,0 +1,24 @@ +name: lesspass-render-password-test +on: + push: + paths: + - "packages/lesspass-render-password/**" + pull_request: + paths: + - "packages/lesspass-render-password/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-render-password run test diff --git a/.github/workflows/lesspass-test.yml b/.github/workflows/lesspass-test.yml new file mode 100644 index 0000000..09fac8e --- /dev/null +++ b/.github/workflows/lesspass-test.yml @@ -0,0 +1,24 @@ +name: lesspass-test +on: + push: + paths: + - "packages/lesspass/**" + pull_request: + paths: + - "packages/lesspass/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass run test diff --git a/.github/workflows/lesspass-web-extension-publish.yml b/.github/workflows/lesspass-web-extension-publish.yml new file mode 100644 index 0000000..d1b990f --- /dev/null +++ b/.github/workflows/lesspass-web-extension-publish.yml @@ -0,0 +1,28 @@ +name: lesspass-web-extension-publish +on: + workflow_run: + workflows: ["lesspass-web-extension-test"] + branches: [main] + types: + - completed +jobs: + publish: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + - run: yarn install + - run: yarn --version + - run: ls packages/lesspass-web-extension/node_modules + - run: ls packages/lesspass-web-extension/node_modules/lesspass-pure + - run: yarn workspace lesspass-web-extension run build + - run: yarn workspace lesspass-web-extension run release + continue-on-error: true + env: + WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} + WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} + EXTENSION_ID: ${{ secrets.EXTENSION_ID }} + CLIENT_ID: ${{ secrets.CLIENT_ID }} + REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} diff --git a/.github/workflows/lesspass-web-extension-test.yml b/.github/workflows/lesspass-web-extension-test.yml new file mode 100644 index 0000000..926af48 --- /dev/null +++ b/.github/workflows/lesspass-web-extension-test.yml @@ -0,0 +1,24 @@ +name: lesspass-web-extension-test +on: + push: + paths: + - "packages/lesspass-web-extension/**" + pull_request: + paths: + - "packages/lesspass-web-extension/**" +jobs: + test: + name: Node.js ${{ matrix.node-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: + - "14" + - "16" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn workspace lesspass-web-extension run test diff --git a/.github/workflows/mobile-test.yml b/.github/workflows/mobile-test.yml new file mode 100644 index 0000000..660a8d9 --- /dev/null +++ b/.github/workflows/mobile-test.yml @@ -0,0 +1,20 @@ +name: mobile-test +on: + push: + paths: + - "mobile/**" + pull_request: + paths: + - "mobile/**" +jobs: + test-mobile: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14" + - run: | + cd mobile + yarn install + yarn test \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d0fab8e..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: test - -on: [push, pull_request] - -jobs: - test-packages: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - run: | - yarn install - yarn workspaces run test - - test-mobile: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "14" - - name: test mobile - run: | - cd mobile - yarn install - yarn test - - test-cli: - runs-on: ubuntu-18.04 - strategy: - max-parallel: 3 - matrix: - python-version: [3.6, 3.7, 3.8] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: test cli - run: | - cd cli - ./test - - test-backend: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: test backend - run: | - cd containers/backend - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - python manage.py test - - test-containers: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: test containers - run: | - cd containers - ./test diff --git a/bin/build_web_extensions b/bin/build_web_extensions deleted file mode 100755 index cb8fbf9..0000000 --- a/bin/build_web_extensions +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env bash - -RED='\033[0;31m' -NOCOLOR='\033[0m' - -function print_error { - echo -e "${RED}$1${NOCOLOR}" -} - -function check_current_directory_is_root { - if [ ! -f README.md ]; then - print_error "You seems to be in the wrong directory" - print_error "Execute this script from the root of lesspass with ./bin/${0##*/}" - exit 1 - fi -} - -function check_repository_is_clean { - git remote update - git add . - git status - git diff-index --quiet HEAD - if [ $? == 1 ] - then - print_error "Git repository not clean. Aborting." - exit 1 - fi - if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ] - then - print_error "Git branch diverged. Aborting." - exit 1 - fi -} - -function check_branch_is_main { - BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) - if [ $BRANCH_NAME != "main" ] - then - print_error "Current branch is not main. Aborting." - exit 1 - fi -} - -function check_bump_type_is_defined { - bump_type="${1}" - if [ "${bump_type}" != "major" ] && [ "${bump_type}" != "minor" ] && [ "${bump_type}" != "patch" ] - then - print_error "Error: No bump type specified (major, minor, patch). Aborting." - exit 1 - fi -} - -set +o errexit - -bump_type="${1:-}" -check_bump_type_is_defined ${bump_type} -check_branch_is_main -check_current_directory_is_root -check_repository_is_clean - -set -o errexit -set -o pipefail -set -o nounset - -function increment_version { - IFS='.' read -a versions <<< "${1}" - - major=${versions[0]} - minor=${versions[1]} - patch=${versions[2]} - - case "${2}" in - "major") - major=$((major + 1)) - minor=0 - patch=0 - ;; - "minor") - minor=$((minor + 1)) - patch=0 - ;; - "patch") - patch=$((patch + 1)) - ;; - esac - - new_version="$major.$minor.$patch" - echo ${new_version} -} - -function build { - pushd packages/lesspass-web-extension/ - yarn install - yarn upgrade --latest lesspass-pure - yarn build - popd -} - - -function commit { - git add . - git commit --message="Auto build for lesspass-web-extension" -} - -current_version=$( grep -m1 version packages/lesspass-web-extension/package.json | cut -d '"' -f4 ) -echo "Current lesspass-web-extension version is ${current_version}" -new_version=$( increment_version ${current_version} ${bump_type} ) -echo "New lesspass-web-extension version is ${new_version}" -latest_lesspass_pure_version=$( yarn info -s lesspass-pure version ) -echo "Latest lesspass-pure version is ${latest_lesspass_pure_version}" -sed -i -E "s/\"lesspass-pure\": \"([0-9]+)\.([0-9]+)\.([0-9]+)\"/\"lesspass-pure\": \"${latest_lesspass_pure_version}\"/g" packages/lesspass-web-extension/package.json -sed -i -E "s/\"version\": \"([0-9]+)\.([0-9]+)\.([0-9]+)\"/\"version\": \"${new_version}\"/g" packages/lesspass-web-extension/package.json -sed -i -E "s/\"version\": \"([0-9]+)\.([0-9]+)\.([0-9]+)\"/\"version\": \"${new_version}\"/g" packages/lesspass-web-extension/extension/manifest.json -build -commit diff --git a/bin/build_web_site b/bin/build_web_site deleted file mode 100755 index 9c1e241..0000000 --- a/bin/build_web_site +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env bash - -RED='\033[0;31m' -NOCOLOR='\033[0m' - -function print_error { - echo -e "${RED}$1${NOCOLOR}" -} - -function check_current_directory_is_root { - if [ ! -f README.md ]; then - print_error "You seems to be in the wrong directory" - print_error "Execute this script from the root of lesspass with ./bin/${0##*/}" - exit 1 - fi -} - -function check_repository_is_clean { - git remote update - git add . - git status - git diff-index --quiet HEAD - if [ $? == 1 ] - then - print_error "Git repository not clean. Aborting." - exit 1 - fi - if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ] - then - print_error "Git branch diverged. Aborting." - exit 1 - fi -} - -function check_branch_is_main { - BRANCH_NAME=$(git branch | grep \* | cut -d ' ' -f2) - if [ $BRANCH_NAME != "main" ] - then - print_error "Current branch is not main. Aborting." - exit 1 - fi -} - -function check_bump_type_is_defined { - bump_type="${1}" - if [ "${bump_type}" != "major" ] && [ "${bump_type}" != "minor" ] && [ "${bump_type}" != "patch" ] - then - print_error "Error: No bump type specified (major, minor, patch). Aborting." - exit 1 - fi -} - -set +o errexit - -bump_type="${1:-}" -check_bump_type_is_defined ${bump_type} -check_branch_is_main -check_current_directory_is_root -check_repository_is_clean - -set -o errexit -set -o pipefail -set -o nounset - -function increment_version { - IFS='.' read -a versions <<< "${1}" - - major=${versions[0]} - minor=${versions[1]} - patch=${versions[2]} - - case "${2}" in - "major") - major=$((major + 1)) - minor=0 - patch=0 - ;; - "minor") - minor=$((minor + 1)) - patch=0 - ;; - "patch") - patch=$((patch + 1)) - ;; - esac - - new_version="$major.$minor.$patch" - echo ${new_version} -} - -function build { - cd packages/lesspass-site - yarn install - yarn run build - cd ../../ -} - - -function commit { - git add . - git commit --message="Auto build for lesspass-site" -} - -current_version=$( grep -Po '(?<="version": ")[^"]*' packages/lesspass-site/package.json ) -echo "Current lesspass-site version is ${current_version}" -new_version=$( increment_version ${current_version} ${bump_type} ) -echo "New lesspass-site version is ${new_version}" -latest_lesspass_pure_version=$( yarn info -s lesspass-pure version ) -echo "Latest lesspass-pure version is ${latest_lesspass_pure_version}" -sed -i -E "s/\"lesspass-pure\": \"([0-9]+)\.([0-9]+)\.([0-9]+)\"/\"lesspass-pure\": \"${latest_lesspass_pure_version}\"/g" packages/lesspass-site/package.json -sed -i -E "s/\"version\": \"([0-9]+)\.([0-9]+)\.([0-9]+)\"/\"version\": \"${new_version}\"/g" packages/lesspass-site/package.json -build -commit diff --git a/bin/deploy_web_extensions b/bin/deploy_web_extensions deleted file mode 100755 index a3993e1..0000000 --- a/bin/deploy_web_extensions +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -function check_env_variables_are_setted { - if [ -z "${EXTENSION_ID}" ] || [ -z "${CLIENT_ID}" ] || [ -z "${REFRESH_TOKEN}" ] || [ -z "${WEB_EXT_API_KEY}" ] || [ -z "${WEB_EXT_API_SECRET}" ]; then - echo "Need to set EXTENSION_ID, CLIENT_ID, REFRESH_TOKEN, WEB_EXT_API_KEY and WEB_EXT_API_SECRET env variables to release web extensions" - exit 1 - fi -} - -set +o errexit - -check_env_variables_are_setted - -set -o errexit -set -o pipefail -set -o nounset - -function release_web_extensions { - cd packages/lesspass-web-extension - yarn install - yarn run release - commit=$( git rev-parse HEAD ) - wget http://github.com/lesspass/lesspass/archive/${commit}.zip - echo "Sources saved in ${commit}.zip" - echo "Upload them on https://addons.mozilla.org/en-US/developers/" -} - -release_web_extensions diff --git a/package.json b/package.json index fa0c7d9..f21b8db 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "packages/*" ], "nohoist": [ - "**/lesspass-pure" + "**/lesspass-pure", + "**/lesspass-pure/**" ] }, "devDependencies": { diff --git a/packages/deploy b/packages/deploy deleted file mode 100755 index 755c6a2..0000000 --- a/packages/deploy +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -if [ -z "${NPM_TOKEN}" ]; then - echo "Need to set NPM_TOKEN env variable to release node modules" - exit 1 -fi - -if [ $# -eq 0 ]; then - echo "No arguments provided" - exit 1 -fi - -touch ~/.npmrc -grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc || echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc -for project in $@ -do - pushd ${project} - yarn publish --non-interactive - pwd - popd -done diff --git a/packages/lesspass-crypto/package.json b/packages/lesspass-crypto/package.json index 0428fa4..62f807c 100644 --- a/packages/lesspass-crypto/package.json +++ b/packages/lesspass-crypto/package.json @@ -16,7 +16,7 @@ "build": "yarn clean && yarn build:cjs && yarn build:esm", "build:cjs": "tsc --module CommonJS --outDir dist/cjs", "build:esm": "tsc --module ESNext --outDir dist/esm --declaration", - "prepare": "npm run build" + "prepare": "yarn build" }, "jest": { "preset": "ts-jest/presets/default-esm", diff --git a/packages/lesspass-entropy/package.json b/packages/lesspass-entropy/package.json index 3b66e8f..799add5 100644 --- a/packages/lesspass-entropy/package.json +++ b/packages/lesspass-entropy/package.json @@ -17,6 +17,6 @@ "test:browser": "karma start test/karma.conf.js" }, "dependencies": { - "lesspass-crypto": "9.1.10" + "lesspass-crypto": "^9.2.0" } } \ No newline at end of file diff --git a/packages/lesspass-fingerprint/package.json b/packages/lesspass-fingerprint/package.json index e88b2d7..5a0b327 100644 --- a/packages/lesspass-fingerprint/package.json +++ b/packages/lesspass-fingerprint/package.json @@ -17,6 +17,6 @@ "test:browser": "karma start test/karma.conf.js" }, "dependencies": { - "lesspass-crypto": "9.1.10" + "lesspass-crypto": "^9.2.0" } } diff --git a/packages/lesspass-pure/.gitignore b/packages/lesspass-pure/.gitignore index bff0dbf..f2d90b5 100644 --- a/packages/lesspass-pure/.gitignore +++ b/packages/lesspass-pure/.gitignore @@ -1,2 +1,3 @@ +dist/ tests/e2e/videos tests/e2e/screenshots diff --git a/packages/lesspass-pure/dist/favicon.ico b/packages/lesspass-pure/dist/favicon.ico deleted file mode 100644 index dbb1143..0000000 Binary files a/packages/lesspass-pure/dist/favicon.ico and /dev/null differ diff --git a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.674f50d2.eot b/packages/lesspass-pure/dist/fonts/fontawesome-webfont.674f50d2.eot deleted file mode 100644 index e9f60ca..0000000 Binary files a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.674f50d2.eot and /dev/null differ diff --git a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.af7ae505.woff2 b/packages/lesspass-pure/dist/fonts/fontawesome-webfont.af7ae505.woff2 deleted file mode 100644 index 4d13fc6..0000000 Binary files a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.af7ae505.woff2 and /dev/null differ diff --git a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.b06871f2.ttf b/packages/lesspass-pure/dist/fonts/fontawesome-webfont.b06871f2.ttf deleted file mode 100644 index 35acda2..0000000 Binary files a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.b06871f2.ttf and /dev/null differ diff --git a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.fee66e71.woff b/packages/lesspass-pure/dist/fonts/fontawesome-webfont.fee66e71.woff deleted file mode 100644 index 400014a..0000000 Binary files a/packages/lesspass-pure/dist/fonts/fontawesome-webfont.fee66e71.woff and /dev/null differ diff --git a/packages/lesspass-pure/dist/img/fontawesome-webfont.912ec66d.svg b/packages/lesspass-pure/dist/img/fontawesome-webfont.912ec66d.svg deleted file mode 100644 index 855c845..0000000 --- a/packages/lesspass-pure/dist/img/fontawesome-webfont.912ec66d.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - diff --git a/packages/lesspass-pure/dist/index.html b/packages/lesspass-pure/dist/index.html deleted file mode 100644 index ae6ee8b..0000000 --- a/packages/lesspass-pure/dist/index.html +++ /dev/null @@ -1,12 +0,0 @@ -
LessPass version: {{ version }}
\n\n {{\n $t(\n \"New20210331\",\n \"I took over the development on LessPass, to fix bugs and improve the interface. I simplified the login page to correct the problem with the login url for the self-hosted version. The master password is encrypted by default before being sent to the server side. It is always possible to uncheck this option but only for connections.\"\n )\n }}\n
\nGuillaume
\n \n {{\n $t(\n \"WantToHelp\",\n \"Do you want to help me? Please feel free to contribute to LessPass\"\n )\n }}\n \n, or missing
. Bailing hydration and performing ' +\n 'full client-side render.'\n );\n }\n }\n // either not server-rendered, or hydration failed.\n // create an empty node and replace it\n oldVnode = emptyNodeAt(oldVnode);\n }\n\n // replacing existing element\n var oldElm = oldVnode.elm;\n var parentElm = nodeOps.parentNode(oldElm);\n\n // create new node\n createElm(\n vnode,\n insertedVnodeQueue,\n // extremely rare edge case: do not insert if old element is in a\n // leaving transition. Only happens when combining transition +\n // keep-alive + HOCs. (#4590)\n oldElm._leaveCb ? null : parentElm,\n nodeOps.nextSibling(oldElm)\n );\n\n // update parent placeholder node element, recursively\n if (isDef(vnode.parent)) {\n var ancestor = vnode.parent;\n var patchable = isPatchable(vnode);\n while (ancestor) {\n for (var i = 0; i < cbs.destroy.length; ++i) {\n cbs.destroy[i](ancestor);\n }\n ancestor.elm = vnode.elm;\n if (patchable) {\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\n cbs.create[i$1](emptyNode, ancestor);\n }\n // #6513\n // invoke insert hooks that may have been merged by create hooks.\n // e.g. for directives that uses the \"inserted\" hook.\n var insert = ancestor.data.hook.insert;\n if (insert.merged) {\n // start at index 1 to avoid re-invoking component mounted hook\n for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {\n insert.fns[i$2]();\n }\n }\n } else {\n registerRef(ancestor);\n }\n ancestor = ancestor.parent;\n }\n }\n\n // destroy old node\n if (isDef(parentElm)) {\n removeVnodes([oldVnode], 0, 0);\n } else if (isDef(oldVnode.tag)) {\n invokeDestroyHook(oldVnode);\n }\n }\n }\n\n invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\n return vnode.elm\n }\n}\n\n/* */\n\nvar directives = {\n create: updateDirectives,\n update: updateDirectives,\n destroy: function unbindDirectives (vnode) {\n updateDirectives(vnode, emptyNode);\n }\n};\n\nfunction updateDirectives (oldVnode, vnode) {\n if (oldVnode.data.directives || vnode.data.directives) {\n _update(oldVnode, vnode);\n }\n}\n\nfunction _update (oldVnode, vnode) {\n var isCreate = oldVnode === emptyNode;\n var isDestroy = vnode === emptyNode;\n var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\n var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\n\n var dirsWithInsert = [];\n var dirsWithPostpatch = [];\n\n var key, oldDir, dir;\n for (key in newDirs) {\n oldDir = oldDirs[key];\n dir = newDirs[key];\n if (!oldDir) {\n // new directive, bind\n callHook$1(dir, 'bind', vnode, oldVnode);\n if (dir.def && dir.def.inserted) {\n dirsWithInsert.push(dir);\n }\n } else {\n // existing directive, update\n dir.oldValue = oldDir.value;\n dir.oldArg = oldDir.arg;\n callHook$1(dir, 'update', vnode, oldVnode);\n if (dir.def && dir.def.componentUpdated) {\n dirsWithPostpatch.push(dir);\n }\n }\n }\n\n if (dirsWithInsert.length) {\n var callInsert = function () {\n for (var i = 0; i < dirsWithInsert.length; i++) {\n callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\n }\n };\n if (isCreate) {\n mergeVNodeHook(vnode, 'insert', callInsert);\n } else {\n callInsert();\n }\n }\n\n if (dirsWithPostpatch.length) {\n mergeVNodeHook(vnode, 'postpatch', function () {\n for (var i = 0; i < dirsWithPostpatch.length; i++) {\n callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\n }\n });\n }\n\n if (!isCreate) {\n for (key in oldDirs) {\n if (!newDirs[key]) {\n // no longer present, unbind\n callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);\n }\n }\n }\n}\n\nvar emptyModifiers = Object.create(null);\n\nfunction normalizeDirectives$1 (\n dirs,\n vm\n) {\n var res = Object.create(null);\n if (!dirs) {\n // $flow-disable-line\n return res\n }\n var i, dir;\n for (i = 0; i < dirs.length; i++) {\n dir = dirs[i];\n if (!dir.modifiers) {\n // $flow-disable-line\n dir.modifiers = emptyModifiers;\n }\n res[getRawDirName(dir)] = dir;\n dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\n }\n // $flow-disable-line\n return res\n}\n\nfunction getRawDirName (dir) {\n return dir.rawName || ((dir.name) + \".\" + (Object.keys(dir.modifiers || {}).join('.')))\n}\n\nfunction callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {\n var fn = dir.def && dir.def[hook];\n if (fn) {\n try {\n fn(vnode.elm, dir, vnode, oldVnode, isDestroy);\n } catch (e) {\n handleError(e, vnode.context, (\"directive \" + (dir.name) + \" \" + hook + \" hook\"));\n }\n }\n}\n\nvar baseModules = [\n ref,\n directives\n];\n\n/* */\n\nfunction updateAttrs (oldVnode, vnode) {\n var opts = vnode.componentOptions;\n if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {\n return\n }\n if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {\n return\n }\n var key, cur, old;\n var elm = vnode.elm;\n var oldAttrs = oldVnode.data.attrs || {};\n var attrs = vnode.data.attrs || {};\n // clone observed objects, as the user probably wants to mutate it\n if (isDef(attrs.__ob__)) {\n attrs = vnode.data.attrs = extend({}, attrs);\n }\n\n for (key in attrs) {\n cur = attrs[key];\n old = oldAttrs[key];\n if (old !== cur) {\n setAttr(elm, key, cur, vnode.data.pre);\n }\n }\n // #4391: in IE9, setting type can reset value for input[type=radio]\n // #6666: IE/Edge forces progress value down to 1 before setting a max\n /* istanbul ignore if */\n if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {\n setAttr(elm, 'value', attrs.value);\n }\n for (key in oldAttrs) {\n if (isUndef(attrs[key])) {\n if (isXlink(key)) {\n elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\n } else if (!isEnumeratedAttr(key)) {\n elm.removeAttribute(key);\n }\n }\n }\n}\n\nfunction setAttr (el, key, value, isInPre) {\n if (isInPre || el.tagName.indexOf('-') > -1) {\n baseSetAttr(el, key, value);\n } else if (isBooleanAttr(key)) {\n // set attribute for blank value\n // e.g. \n if (isFalsyAttrValue(value)) {\n el.removeAttribute(key);\n } else {\n // technically allowfullscreen is a boolean attribute for