diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 0000000..8bb86ab --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,38 @@ +name: Prepare +description: Install and build the app + +runs: + using: 'composite' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2.0.1 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + shell: bash + run: pnpm install diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..8be00f7 --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1 @@ +github: [directus, benhaynes, rijkvanzanten] diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..15cb2a4 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,31 @@ +name: Check + +on: + pull_request: + branches: ['main'] + push: + branches: ['main'] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1b48dbd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Push Release + +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: read + +jobs: + release: + permissions: + contents: write + name: Build & Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Build dist + run: pnpm build + + - name: Publish Packages + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}" + pnpm publish --access=public --no-git-checks + + - name: GitHub Release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6232a2..6ffee02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: 5.4 specifiers: - '@directus/sdk': 9.14.1 + '@directus/sdk': 10.2.0 eslint-config-prettier: ^8.5.0 gatsby-source-filesystem: 4.13.0 gatsby-source-graphql: 4.13.0 @@ -58,48 +58,12 @@ packages: regenerator-runtime: 0.13.10 dev: false - /@directus/sdk/9.14.1: - resolution: {integrity: sha512-WKZ1KXtSVSnpsJQL4fto9yXQ69pAvCEBFYIR+Ew61aJ1612TzVTqNfgmTNM21LRrZ5S7hqPMCXCBkQ34tJAqRw==} + /@directus/sdk/10.2.0: + resolution: {integrity: sha512-q+b26PWd0PlFpy/ZvXaixAHAf1Y99aRyHZ1PYGIBeYkEQ04jfyNVs9Eh3sMWU8FLGzOqM6JUc2fYfQ69lhRg7g==} dependencies: - '@directus/shared': 9.14.1_axios@0.24.0 - axios: 0.24.0 + axios: 0.27.2 transitivePeerDependencies: - - '@types/express' - - '@types/geojson' - - '@types/pino' - debug - - express - - geojson - - knex - - knex-schema-inspector - - pino - - vue - - vue-i18n - - vue-router - dev: false - - /@directus/shared/9.14.1_axios@0.24.0: - resolution: {integrity: sha512-m37bcJjmeFda3S6zxi7mMLT54a9QzgjGBPSzLlV6djIlFBMCX9bkkHi8UBZPHUmehASFDLDnCcFJjyyXjYQ4Mw==} - peerDependencies: - '@types/express': '*' - '@types/geojson': '*' - '@types/pino': '*' - axios: '*' - express: '*' - geojson: '*' - knex: '*' - knex-schema-inspector: '*' - pino: '*' - vue: '3' - vue-i18n: '9' - vue-router: '4' - dependencies: - axios: 0.24.0 - date-fns: 2.24.0 - fs-extra: 10.0.0 - joi: 17.4.2 - lodash: 4.17.21 - micromustache: 8.0.3 dev: false /@graphql-tools/batch-execute/8.5.1: @@ -262,16 +226,6 @@ packages: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dev: false - /@hapi/hoek/9.3.0: - resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} - dev: false - - /@hapi/topo/5.1.0: - resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} - dependencies: - '@hapi/hoek': 9.3.0 - dev: false - /@lmdb/lmdb-darwin-arm64/2.5.3: resolution: {integrity: sha512-RXwGZ/0eCqtCY8FLTM/koR60w+MXyvBUpToXiIyjOcBnC81tAlTUHrRUavCEWPI9zc9VgvpK3+cbumPyR8BSuA==} cpu: [arm64] @@ -487,10 +441,11 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false - /axios/0.24.0: - resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} + /axios/0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} dependencies: follow-redirects: 1.15.2 + form-data: 4.0.0 transitivePeerDependencies: - debug dev: false @@ -704,15 +659,6 @@ packages: mime-types: 2.1.35 dev: false - /fs-extra/10.0.0: - resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==} - engines: {node: '>=12'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: false - /fs-extra/10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -962,16 +908,6 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: false - /joi/17.4.2: - resolution: {integrity: sha512-Lm56PP+n0+Z2A2rfRvsfWVDXGEWjXxatPopkQ8qQ5mxCEhwHG+Ettgg5o98FFaxilOxozoa14cFhrE/hOzh/Nw==} - dependencies: - '@hapi/hoek': 9.3.0 - '@hapi/topo': 5.1.0 - '@sideway/address': 4.1.4 - '@sideway/formula': 3.0.0 - '@sideway/pinpoint': 2.0.0 - dev: false - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: false @@ -1026,10 +962,6 @@ packages: resolution: {integrity: sha512-NZQIJJL5Rb9lMJ0Yl1JoVr9GSdo4HTPsUEWsSFzB8dE8DSoiLCVavWZPi7Rnlv/o73u6I24S/XYc/NmG4l8EKA==} dev: false - /lodash/4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: false - /loose-envify/1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -1060,11 +992,6 @@ packages: hasBin: true dev: false - /micromustache/8.0.3: - resolution: {integrity: sha512-SXjrEPuYNtWq0reR9LR2nHdzdQx/3re9HPcDGjm00L7hi2RsH5KMRBhYEBvPdyQC51RW/2TznjwX/sQLPPyHNw==} - engines: {node: '>=8'} - dev: false - /mime-db/1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'}