mirror of
https://github.com/directus/directus.git
synced 2026-01-10 10:48:00 -05:00
Blackbox tests restructuring (#18122)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
21
.github/actions/prepare-test-env/action.yml
vendored
21
.github/actions/prepare-test-env/action.yml
vendored
@@ -1,21 +0,0 @@
|
||||
name: Prepare Test Env
|
||||
description: Prepare the test environment
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Prepare
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
# See https://github.com/pnpm/pnpm/issues/6300
|
||||
- name: Disable peer deduplication
|
||||
shell: bash
|
||||
run: pnpm config --location=project set dedupe-peer-dependents=false
|
||||
|
||||
- name: Reinstall production dependencies only
|
||||
shell: bash
|
||||
run: pnpm install --prod
|
||||
|
||||
- name: Reinstall dev dependencies in workspace root
|
||||
shell: bash
|
||||
run: pnpm install --workspace-root --dev
|
||||
3
.github/actions/prepare/action.yml
vendored
3
.github/actions/prepare/action.yml
vendored
@@ -45,6 +45,7 @@ runs:
|
||||
- name: Build
|
||||
if: inputs.build == 'true'
|
||||
shell: bash
|
||||
run: pnpm run -r --workspace-concurrency=1 build
|
||||
run: pnpm run build
|
||||
env:
|
||||
npm_config_workspace_concurrency: '1'
|
||||
NODE_OPTIONS: --max_old_space_size=6144
|
||||
|
||||
12
.github/workflows/blackbox-main.yml
vendored
12
.github/workflows/blackbox-main.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- api/**
|
||||
- tests-blackbox/**
|
||||
- tests/blackbox/**
|
||||
- packages/**
|
||||
- package.json
|
||||
- pnpm-lock.yaml
|
||||
@@ -40,8 +40,8 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare test env
|
||||
uses: ./.github/actions/prepare-test-env
|
||||
- name: Prepare
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Install Oracle client
|
||||
if: matrix.vendor == 'oracle'
|
||||
@@ -56,13 +56,13 @@ jobs:
|
||||
- name: Start services (SQLite)
|
||||
if: matrix.vendor == 'sqlite3'
|
||||
run:
|
||||
docker compose -f tests-blackbox/docker-compose.yml up auth-saml redis minio minio-mc -d --quiet-pull --wait
|
||||
docker compose -f tests/blackbox/docker-compose.yml up auth-saml redis minio minio-mc -d --quiet-pull --wait
|
||||
|
||||
- name: Start services (other vendors)
|
||||
if: matrix.vendor != 'sqlite3'
|
||||
run:
|
||||
docker compose -f tests-blackbox/docker-compose.yml up ${{ matrix.vendor }} auth-saml redis minio minio-mc -d
|
||||
docker compose -f tests/blackbox/docker-compose.yml up ${{ matrix.vendor }} auth-saml redis minio minio-mc -d
|
||||
--quiet-pull --wait
|
||||
|
||||
- name: Run tests
|
||||
run: TEST_DB=${{ matrix.vendor }} pnpm run -w test:blackbox
|
||||
run: TEST_DB=${{ matrix.vendor }} pnpm run test:blackbox
|
||||
|
||||
10
.github/workflows/blackbox-pr.yml
vendored
10
.github/workflows/blackbox-pr.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- api/**
|
||||
- tests-blackbox/**
|
||||
- tests/blackbox/**
|
||||
- packages/**
|
||||
- package.json
|
||||
- pnpm-lock.yaml
|
||||
@@ -27,12 +27,12 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare test env
|
||||
uses: ./.github/actions/prepare-test-env
|
||||
- name: Prepare
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Start services
|
||||
run:
|
||||
docker compose -f tests-blackbox/docker-compose.yml up auth-saml redis minio minio-mc -d --quiet-pull --wait
|
||||
docker compose -f tests/blackbox/docker-compose.yml up auth-saml redis minio minio-mc -d --quiet-pull --wait
|
||||
|
||||
- name: Run tests
|
||||
run: TEST_DB=sqlite3 pnpm run -w test:blackbox
|
||||
run: TEST_DB=sqlite3 pnpm run test:blackbox
|
||||
|
||||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Run Tests
|
||||
run: pnpm -r test
|
||||
run: pnpm test
|
||||
|
||||
analyze:
|
||||
name: CodeQL Analysis
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Publish packages to NPM
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: pnpm -r publish --access=public --no-git-checks
|
||||
run: pnpm --recursive publish --access=public --no-git-checks
|
||||
|
||||
build-images:
|
||||
name: Build Images
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -10,6 +10,7 @@ storybook-static
|
||||
coverage
|
||||
*.tsbuildinfo
|
||||
**/.vitepress/cache
|
||||
**/.vitepress/.temp
|
||||
.thumbsmith
|
||||
|
||||
# Dotenv configs
|
||||
@@ -20,7 +21,6 @@ coverage
|
||||
npm-debug.log
|
||||
debug
|
||||
.clinic
|
||||
/tests-blackbox/server-log-*
|
||||
|
||||
# IDEs / Editors
|
||||
.vscode
|
||||
@@ -37,10 +37,11 @@ debug
|
||||
# Temporary files
|
||||
TODO
|
||||
|
||||
# Directus data
|
||||
# Directus
|
||||
/schema.yaml
|
||||
/schema.json
|
||||
/uploads
|
||||
/api/uploads
|
||||
/api/extensions
|
||||
/tests/blackbox/uploads
|
||||
/tests/blackbox/server-log-*
|
||||
*.db
|
||||
|
||||
@@ -69,9 +69,7 @@
|
||||
"cli": "NODE_ENV=development SERVE_APP=false tsx src/cli/run.ts",
|
||||
"dev": "NODE_ENV=development SERVE_APP=false tsx watch --clear-screen=false src/start.ts",
|
||||
"start": "node cli.js start",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:watch": "vitest"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"dependencies": {
|
||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||
@@ -207,6 +205,7 @@
|
||||
"@types/sanitize-html": "2.9.0",
|
||||
"@types/sharp": "0.31.1",
|
||||
"@types/stream-json": "1.7.3",
|
||||
"@types/supertest": "2.0.12",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@types/uuid-validate": "0.0.1",
|
||||
"@types/wellknown": "0.5.4",
|
||||
@@ -214,6 +213,7 @@
|
||||
"copyfiles": "2.4.1",
|
||||
"form-data": "4.0.0",
|
||||
"knex-mock-client": "2.0.0",
|
||||
"supertest": "6.3.3",
|
||||
"typescript": "4.9.5",
|
||||
"vitest": "0.29.3"
|
||||
},
|
||||
|
||||
@@ -16,7 +16,11 @@ export function mergePermissions(strategy: 'and' | 'or', ...permissions: Permiss
|
||||
return Array.from(mergedPermissions);
|
||||
}
|
||||
|
||||
export function mergePermission(strategy: 'and' | 'or', currentPerm: Permission, newPerm: Permission) {
|
||||
export function mergePermission(
|
||||
strategy: 'and' | 'or',
|
||||
currentPerm: Permission,
|
||||
newPerm: Permission
|
||||
): Omit<Permission, 'id' | 'system'> {
|
||||
const logicalKey = `_${strategy}` as keyof LogicalFilterOR | keyof LogicalFilterAND;
|
||||
|
||||
let permissions = currentPerm.permissions;
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
"build-storybook": "storybook build",
|
||||
"dev": "vite --clearScreen false",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:watch": "vitest"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.21.3",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@directus/docs",
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"main": "dist/index.js",
|
||||
"exports": {
|
||||
|
||||
37
package.json
37
package.json
@@ -1,51 +1,22 @@
|
||||
{
|
||||
"name": "directus-monorepo",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"./app",
|
||||
"./api",
|
||||
"./packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "pnpm --recursive --filter '!docs' run build",
|
||||
"format": "prettier --write \"**/*.{md,y?(a)ml,json}\"",
|
||||
"lint": "eslint .",
|
||||
"test:blackbox": "jest tests -c tests-blackbox/jest.config.js",
|
||||
"test:blackbox:watch": "jest tests -c tests-blackbox/jest.config.js --watch",
|
||||
"posttest:blackbox:watch": "ts-node --project ./tests-blackbox/tsconfig.json --transpile-only ./tests-blackbox/setup/teardown.ts"
|
||||
"test": "pnpm --recursive --filter '!tests-blackbox' test",
|
||||
"test:blackbox": "pnpm --filter directus deploy --prod dist && pnpm --filter tests-blackbox test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@directus/constants": "workspace:*",
|
||||
"@directus/types": "workspace:*",
|
||||
"@directus/utils": "workspace:*",
|
||||
"@types/jest": "29.4.4",
|
||||
"@types/js-yaml": "4.0.5",
|
||||
"@types/lodash": "4.14.191",
|
||||
"@types/seedrandom": "3.0.5",
|
||||
"@types/supertest": "2.0.12",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.55.0",
|
||||
"@typescript-eslint/parser": "5.55.0",
|
||||
"autocannon": "7.10.0",
|
||||
"axios": "1.3.4",
|
||||
"eslint": "8.36.0",
|
||||
"eslint-config-prettier": "8.7.0",
|
||||
"eslint-plugin-jest": "27.2.1",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-vue": "9.9.0",
|
||||
"globby": "11.1.0",
|
||||
"jest": "29.5.0",
|
||||
"jest-environment-node": "29.5.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"json-to-graphql-query": "2.2.5",
|
||||
"knex": "2.4.2",
|
||||
"listr2": "5.0.8",
|
||||
"lodash": "4.17.21",
|
||||
"prettier": "2.8.4",
|
||||
"seedrandom": "3.0.5",
|
||||
"supertest": "6.3.3",
|
||||
"ts-jest": "29.0.5",
|
||||
"typescript": "4.9.5",
|
||||
"uuid": "9.0.0"
|
||||
"prettier": "2.8.4"
|
||||
},
|
||||
"packageManager": "pnpm@8.1.0",
|
||||
"engines": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Shared Vue composables for Directus use",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Shared exceptions in Directus",
|
||||
"repository": {
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"dependencies": {
|
||||
"@directus/composables": "workspace:*",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "pnpm build -w --preserveWatchOutput --incremental"
|
||||
"dev": "tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"knex": "2.4.2"
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Azure file storage abstraction for `@directus/storage`",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Cloudinary file storage abstraction for `@directus/storage`",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "GCS file storage abstraction for `@directus/storage`",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Local file storage abstraction for `@directus/storage`",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "S3 file storage abstraction for `@directus/storage`",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Object storage abstraction layer for Directus",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Check if an update is available for a given package",
|
||||
"repository": {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc --project browser/tsconfig.json && tsc --project node/tsconfig.json && tsc --project shared/tsconfig.json",
|
||||
"dev": "concurrently \"tsc --watch --project browser/tsconfig.json\" \"tsc --watch --project node/tsconfig.json\" \"tsc --watch --project shared/tsconfig.json\"",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
"test": "vitest --watch=false"
|
||||
},
|
||||
"description": "Utilities shared between the Directus packages",
|
||||
"repository": {
|
||||
|
||||
328
pnpm-lock.yaml
generated
328
pnpm-lock.yaml
generated
@@ -4,45 +4,12 @@ importers:
|
||||
|
||||
.:
|
||||
devDependencies:
|
||||
'@directus/constants':
|
||||
specifier: workspace:*
|
||||
version: link:packages/constants
|
||||
'@directus/types':
|
||||
specifier: workspace:*
|
||||
version: link:packages/types
|
||||
'@directus/utils':
|
||||
specifier: workspace:*
|
||||
version: link:packages/utils
|
||||
'@types/jest':
|
||||
specifier: 29.4.4
|
||||
version: 29.4.4
|
||||
'@types/js-yaml':
|
||||
specifier: 4.0.5
|
||||
version: 4.0.5
|
||||
'@types/lodash':
|
||||
specifier: 4.14.191
|
||||
version: 4.14.191
|
||||
'@types/seedrandom':
|
||||
specifier: 3.0.5
|
||||
version: 3.0.5
|
||||
'@types/supertest':
|
||||
specifier: 2.0.12
|
||||
version: 2.0.12
|
||||
'@types/uuid':
|
||||
specifier: 9.0.1
|
||||
version: 9.0.1
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: 5.55.0
|
||||
version: 5.55.0(@typescript-eslint/parser@5.55.0)(eslint@8.36.0)(typescript@4.9.5)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: 5.55.0
|
||||
version: 5.55.0(eslint@8.36.0)(typescript@4.9.5)
|
||||
autocannon:
|
||||
specifier: 7.10.0
|
||||
version: 7.10.0
|
||||
axios:
|
||||
specifier: 1.3.4
|
||||
version: 1.3.4
|
||||
eslint:
|
||||
specifier: 8.36.0
|
||||
version: 8.36.0
|
||||
@@ -51,55 +18,16 @@ importers:
|
||||
version: 8.7.0(eslint@8.36.0)
|
||||
eslint-plugin-jest:
|
||||
specifier: 27.2.1
|
||||
version: 27.2.1(@typescript-eslint/eslint-plugin@5.55.0)(eslint@8.36.0)(jest@29.5.0)(typescript@4.9.5)
|
||||
version: 27.2.1(@typescript-eslint/eslint-plugin@5.55.0)(eslint@8.36.0)(typescript@4.9.5)
|
||||
eslint-plugin-prettier:
|
||||
specifier: 4.2.1
|
||||
version: 4.2.1(eslint-config-prettier@8.7.0)(eslint@8.36.0)(prettier@2.8.4)
|
||||
eslint-plugin-vue:
|
||||
specifier: 9.9.0
|
||||
version: 9.9.0(eslint@8.36.0)
|
||||
globby:
|
||||
specifier: 11.1.0
|
||||
version: 11.1.0
|
||||
jest:
|
||||
specifier: 29.5.0
|
||||
version: 29.5.0
|
||||
jest-environment-node:
|
||||
specifier: 29.5.0
|
||||
version: 29.5.0
|
||||
js-yaml:
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0
|
||||
json-to-graphql-query:
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
knex:
|
||||
specifier: 2.4.2
|
||||
version: 2.4.2(mysql@2.18.1)(pg@8.10.0)(sqlite3@5.1.6)(tedious@15.1.3)
|
||||
listr2:
|
||||
specifier: 5.0.8
|
||||
version: 5.0.8
|
||||
lodash:
|
||||
specifier: 4.17.21
|
||||
version: 4.17.21
|
||||
prettier:
|
||||
specifier: 2.8.4
|
||||
version: 2.8.4
|
||||
seedrandom:
|
||||
specifier: 3.0.5
|
||||
version: 3.0.5
|
||||
supertest:
|
||||
specifier: 6.3.3
|
||||
version: 6.3.3
|
||||
ts-jest:
|
||||
specifier: 29.0.5
|
||||
version: 29.0.5(@babel/core@7.21.3)(jest@29.5.0)(typescript@4.9.5)
|
||||
typescript:
|
||||
specifier: 4.9.5
|
||||
version: 4.9.5
|
||||
uuid:
|
||||
specifier: 9.0.0
|
||||
version: 9.0.0
|
||||
|
||||
api:
|
||||
dependencies:
|
||||
@@ -403,7 +331,7 @@ importers:
|
||||
version: 2.18.1
|
||||
nodemailer-mailgun-transport:
|
||||
specifier: 2.1.5
|
||||
version: 2.1.5(lodash@4.17.21)
|
||||
version: 2.1.5
|
||||
nodemailer-sendgrid:
|
||||
specifier: 1.0.3
|
||||
version: 1.0.3
|
||||
@@ -525,6 +453,9 @@ importers:
|
||||
'@types/stream-json':
|
||||
specifier: 1.7.3
|
||||
version: 1.7.3
|
||||
'@types/supertest':
|
||||
specifier: 2.0.12
|
||||
version: 2.0.12
|
||||
'@types/uuid':
|
||||
specifier: 9.0.1
|
||||
version: 9.0.1
|
||||
@@ -546,6 +477,9 @@ importers:
|
||||
knex-mock-client:
|
||||
specifier: 2.0.0
|
||||
version: 2.0.0(knex@2.4.2)
|
||||
supertest:
|
||||
specifier: 6.3.3
|
||||
version: 6.3.3
|
||||
typescript:
|
||||
specifier: 4.9.5
|
||||
version: 4.9.5
|
||||
@@ -1407,6 +1341,75 @@ importers:
|
||||
specifier: 0.29.3
|
||||
version: 0.29.3(happy-dom@8.9.0)(sass@1.59.3)
|
||||
|
||||
tests/blackbox:
|
||||
devDependencies:
|
||||
'@directus/types':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/types
|
||||
'@types/jest':
|
||||
specifier: 29.4.4
|
||||
version: 29.4.4
|
||||
'@types/js-yaml':
|
||||
specifier: 4.0.5
|
||||
version: 4.0.5
|
||||
'@types/lodash':
|
||||
specifier: 4.14.191
|
||||
version: 4.14.191
|
||||
'@types/seedrandom':
|
||||
specifier: 3.0.5
|
||||
version: 3.0.5
|
||||
'@types/supertest':
|
||||
specifier: 2.0.12
|
||||
version: 2.0.12
|
||||
'@types/uuid':
|
||||
specifier: 9.0.1
|
||||
version: 9.0.1
|
||||
autocannon:
|
||||
specifier: 7.10.0
|
||||
version: 7.10.0
|
||||
axios:
|
||||
specifier: 1.3.4
|
||||
version: 1.3.4
|
||||
globby:
|
||||
specifier: 11.1.0
|
||||
version: 11.1.0
|
||||
jest:
|
||||
specifier: 29.5.0
|
||||
version: 29.5.0
|
||||
jest-environment-node:
|
||||
specifier: 29.5.0
|
||||
version: 29.5.0
|
||||
js-yaml:
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0
|
||||
json-to-graphql-query:
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
knex:
|
||||
specifier: 2.4.2
|
||||
version: 2.4.2
|
||||
listr2:
|
||||
specifier: 5.0.8
|
||||
version: 5.0.8
|
||||
lodash:
|
||||
specifier: 4.17.21
|
||||
version: 4.17.21
|
||||
seedrandom:
|
||||
specifier: 3.0.5
|
||||
version: 3.0.5
|
||||
supertest:
|
||||
specifier: 6.3.3
|
||||
version: 6.3.3
|
||||
ts-jest:
|
||||
specifier: 29.0.5
|
||||
version: 29.0.5(@babel/core@7.21.3)(jest@29.5.0)(typescript@4.9.5)
|
||||
typescript:
|
||||
specifier: 4.9.5
|
||||
version: 4.9.5
|
||||
uuid:
|
||||
specifier: 9.0.0
|
||||
version: 9.0.0
|
||||
|
||||
packages:
|
||||
|
||||
/@algolia/autocomplete-core@1.7.4:
|
||||
@@ -4949,13 +4952,6 @@ packages:
|
||||
jest-mock: 29.5.0
|
||||
dev: true
|
||||
|
||||
/@jest/expect-utils@29.4.2:
|
||||
resolution: {integrity: sha512-Dd3ilDJpBnqa0GiPN7QrudVs0cczMMHtehSo2CSTjm3zdHx0RcpmhFNVEltuEFeqfLIyWKFI224FsMSQ/nsJQA==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
jest-get-type: 29.4.2
|
||||
dev: true
|
||||
|
||||
/@jest/expect-utils@29.5.0:
|
||||
resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -5034,13 +5030,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@jest/schemas@29.4.2:
|
||||
resolution: {integrity: sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@sinclair/typebox': 0.25.21
|
||||
dev: true
|
||||
|
||||
/@jest/schemas@29.4.3:
|
||||
resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -5100,18 +5089,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@jest/types@29.4.2:
|
||||
resolution: {integrity: sha512-CKlngyGP0fwlgC1BRUtPZSiWLBhyS9dKwKmyGxk8Z6M82LBEGB2aLQSg+U1MyLsU+M7UjnlLllBM2BLWKVm/Uw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/schemas': 29.4.3
|
||||
'@types/istanbul-lib-coverage': 2.0.4
|
||||
'@types/istanbul-reports': 3.0.1
|
||||
'@types/node': 18.15.3
|
||||
'@types/yargs': 17.0.22
|
||||
chalk: 4.1.2
|
||||
dev: true
|
||||
|
||||
/@jest/types@29.5.0:
|
||||
resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -7001,8 +6978,8 @@ packages:
|
||||
/@types/jest@29.4.4:
|
||||
resolution: {integrity: sha512-qezb65VIH7X1wobSnd6Lvdve7PXSyQRa3dljTkhTtDhi603RvHQCshSlJcuyMLHJpeHgY3NKwvDJWxMOOHxGDQ==}
|
||||
dependencies:
|
||||
expect: 29.4.2
|
||||
pretty-format: 29.4.2
|
||||
expect: 29.5.0
|
||||
pretty-format: 29.5.0
|
||||
dev: true
|
||||
|
||||
/@types/js-yaml@4.0.5:
|
||||
@@ -9225,7 +9202,7 @@ packages:
|
||||
/console-control-strings@1.1.0:
|
||||
resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}
|
||||
|
||||
/consolidate@0.15.1(lodash@4.17.21):
|
||||
/consolidate@0.15.1:
|
||||
resolution: {integrity: sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==}
|
||||
engines: {node: '>= 0.10.0'}
|
||||
peerDependencies:
|
||||
@@ -9391,7 +9368,6 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
bluebird: 3.7.2
|
||||
lodash: 4.17.21
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
@@ -9445,10 +9421,6 @@ packages:
|
||||
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
/cookiejar@2.1.3:
|
||||
resolution: {integrity: sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==}
|
||||
dev: true
|
||||
|
||||
/cookiejar@2.1.4:
|
||||
resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==}
|
||||
dev: true
|
||||
@@ -9904,11 +9876,6 @@ packages:
|
||||
resolution: {integrity: sha512-WDCaSzHMtayCIEa2hPq0rL8ds603SKNzMzNXU0kbLM7kzXoaXaKeHgPXJHKjKMxxnozKLMsg+rES7hC6Lxe7iA==}
|
||||
dev: true
|
||||
|
||||
/diff-sequences@29.4.2:
|
||||
resolution: {integrity: sha512-R6P0Y6PrsH3n4hUXxL3nns0rbRk6Q33js3ygJBeEpbzLzgcNuJ61+u0RXasFpTKISw99TxUzFnumSnRLsjhLaw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/diff-sequences@29.4.3:
|
||||
resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -10338,7 +10305,7 @@ packages:
|
||||
eslint: 8.36.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.55.0)(eslint@8.36.0)(jest@29.5.0)(typescript@4.9.5):
|
||||
/eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.55.0)(eslint@8.36.0)(typescript@4.9.5):
|
||||
resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
@@ -10354,7 +10321,6 @@ packages:
|
||||
'@typescript-eslint/eslint-plugin': 5.55.0(@typescript-eslint/parser@5.55.0)(eslint@8.36.0)(typescript@4.9.5)
|
||||
'@typescript-eslint/utils': 5.50.0(eslint@8.36.0)(typescript@4.9.5)
|
||||
eslint: 8.36.0
|
||||
jest: 29.5.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
@@ -10602,17 +10568,6 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
dev: false
|
||||
|
||||
/expect@29.4.2:
|
||||
resolution: {integrity: sha512-+JHYg9O3hd3RlICG90OPVjRkPBoiUH7PxvDVMnRiaq1g6JUgZStX514erMl0v2Dc5SkfVbm7ztqbd6qHHPn+mQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/expect-utils': 29.4.2
|
||||
jest-get-type: 29.4.2
|
||||
jest-matcher-utils: 29.4.2
|
||||
jest-message-util: 29.4.2
|
||||
jest-util: 29.5.0
|
||||
dev: true
|
||||
|
||||
/expect@29.5.0:
|
||||
resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -12329,16 +12284,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/jest-diff@29.4.2:
|
||||
resolution: {integrity: sha512-EK8DSajVtnjx9sa1BkjZq3mqChm2Cd8rIzdXkQMA8e0wuXq53ypz6s5o5V8HRZkoEt2ywJ3eeNWFKWeYr8HK4g==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
diff-sequences: 29.4.2
|
||||
jest-get-type: 29.4.3
|
||||
pretty-format: 29.5.0
|
||||
dev: true
|
||||
|
||||
/jest-diff@29.5.0:
|
||||
resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -12379,11 +12324,6 @@ packages:
|
||||
jest-util: 29.5.0
|
||||
dev: true
|
||||
|
||||
/jest-get-type@29.4.2:
|
||||
resolution: {integrity: sha512-vERN30V5i2N6lqlFu4ljdTqQAgrkTFMC9xaIIfOPYBw04pufjXRty5RuXBiB1d72tGbURa/UgoiHB90ruOSivg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/jest-get-type@29.4.3:
|
||||
resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -12416,16 +12356,6 @@ packages:
|
||||
pretty-format: 29.5.0
|
||||
dev: true
|
||||
|
||||
/jest-matcher-utils@29.4.2:
|
||||
resolution: {integrity: sha512-EZaAQy2je6Uqkrm6frnxBIdaWtSYFoR8SVb2sNLAtldswlR/29JAgx+hy67llT3+hXBaLB0zAm5UfeqerioZyg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
jest-diff: 29.4.2
|
||||
jest-get-type: 29.4.2
|
||||
pretty-format: 29.5.0
|
||||
dev: true
|
||||
|
||||
/jest-matcher-utils@29.5.0:
|
||||
resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -12436,21 +12366,6 @@ packages:
|
||||
pretty-format: 29.5.0
|
||||
dev: true
|
||||
|
||||
/jest-message-util@29.4.2:
|
||||
resolution: {integrity: sha512-SElcuN4s6PNKpOEtTInjOAA8QvItu0iugkXqhYyguRvQoXapg5gN+9RQxLAkakChZA7Y26j6yUCsFWN+hlKD6g==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.18.6
|
||||
'@jest/types': 29.5.0
|
||||
'@types/stack-utils': 2.0.1
|
||||
chalk: 4.1.2
|
||||
graceful-fs: 4.2.10
|
||||
micromatch: 4.0.5
|
||||
pretty-format: 29.5.0
|
||||
slash: 3.0.0
|
||||
stack-utils: 2.0.6
|
||||
dev: true
|
||||
|
||||
/jest-message-util@29.5.0:
|
||||
resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -12513,7 +12428,7 @@ packages:
|
||||
jest-util: 29.5.0
|
||||
jest-validate: 29.5.0
|
||||
resolve: 1.22.1
|
||||
resolve.exports: 2.0.0
|
||||
resolve.exports: 2.0.2
|
||||
slash: 3.0.0
|
||||
dev: true
|
||||
|
||||
@@ -12607,18 +12522,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/jest-util@29.4.1:
|
||||
resolution: {integrity: sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 29.4.2
|
||||
'@types/node': 18.15.3
|
||||
chalk: 4.1.2
|
||||
ci-info: 3.7.1
|
||||
graceful-fs: 4.2.10
|
||||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
||||
/jest-util@29.5.0:
|
||||
resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -13053,6 +12956,52 @@ packages:
|
||||
lodash.clonedeep: 4.5.0
|
||||
dev: true
|
||||
|
||||
/knex@2.4.2:
|
||||
resolution: {integrity: sha512-tMI1M7a+xwHhPxjbl/H9K1kHX+VncEYcvCx5K00M16bWvpYPKAZd6QrCu68PtHAdIZNQPWZn0GVhqVBEthGWCg==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
better-sqlite3: '*'
|
||||
mysql: '*'
|
||||
mysql2: '*'
|
||||
pg: '*'
|
||||
pg-native: '*'
|
||||
sqlite3: '*'
|
||||
tedious: '*'
|
||||
peerDependenciesMeta:
|
||||
better-sqlite3:
|
||||
optional: true
|
||||
mysql:
|
||||
optional: true
|
||||
mysql2:
|
||||
optional: true
|
||||
pg:
|
||||
optional: true
|
||||
pg-native:
|
||||
optional: true
|
||||
sqlite3:
|
||||
optional: true
|
||||
tedious:
|
||||
optional: true
|
||||
dependencies:
|
||||
colorette: 2.0.19
|
||||
commander: 9.5.0
|
||||
debug: 4.3.4
|
||||
escalade: 3.1.1
|
||||
esm: 3.2.25
|
||||
get-package-type: 0.1.0
|
||||
getopts: 2.3.0
|
||||
interpret: 2.2.0
|
||||
lodash: 4.17.21
|
||||
pg-connection-string: 2.5.0
|
||||
rechoir: 0.8.0
|
||||
resolve-from: 5.0.0
|
||||
tarn: 3.0.2
|
||||
tildify: 2.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/knex@2.4.2(mysql@2.18.1)(pg@8.10.0)(sqlite3@5.1.6)(tedious@15.1.3):
|
||||
resolution: {integrity: sha512-tMI1M7a+xwHhPxjbl/H9K1kHX+VncEYcvCx5K00M16bWvpYPKAZd6QrCu68PtHAdIZNQPWZn0GVhqVBEthGWCg==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -14406,11 +14355,11 @@ packages:
|
||||
resolution: {integrity: sha512-71UV2HRUP+djvHpdyatiuv+Y1o8hI4ZI7bMfuuoACMLR1JJCErM4WXAclNeHd6BgHXkqeqnnAk3wpDkSQWmFXw==}
|
||||
dev: false
|
||||
|
||||
/nodemailer-mailgun-transport@2.1.5(lodash@4.17.21):
|
||||
/nodemailer-mailgun-transport@2.1.5:
|
||||
resolution: {integrity: sha512-hF7POkaxFgMvYEd5aHLaQJI2511ld+aQlQi7JH6bGjhjlZ33cIbTB9PimlIrLu5XC3z76Kde6e65OIwL9lOdTA==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
consolidate: 0.15.1(lodash@4.17.21)
|
||||
consolidate: 0.15.1
|
||||
form-data: 4.0.0
|
||||
mailgun.js: 8.0.6
|
||||
transitivePeerDependencies:
|
||||
@@ -15658,15 +15607,6 @@ packages:
|
||||
react-is: 17.0.2
|
||||
dev: true
|
||||
|
||||
/pretty-format@29.4.2:
|
||||
resolution: {integrity: sha512-qKlHR8yFVCbcEWba0H0TOC8dnLlO4vPlyEjRPw31FZ2Rupy9nLa8ZLbYny8gWEl8CkEhJqAE6IzdNELTBVcBEg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/schemas': 29.4.2
|
||||
ansi-styles: 5.2.0
|
||||
react-is: 18.2.0
|
||||
dev: true
|
||||
|
||||
/pretty-format@29.5.0:
|
||||
resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -16413,8 +16353,8 @@ packages:
|
||||
protocol-buffers-schema: 3.6.0
|
||||
dev: true
|
||||
|
||||
/resolve.exports@2.0.0:
|
||||
resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==}
|
||||
/resolve.exports@2.0.2:
|
||||
resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
@@ -17491,7 +17431,7 @@ packages:
|
||||
deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731)
|
||||
dependencies:
|
||||
component-emitter: 1.3.0
|
||||
cookiejar: 2.1.3
|
||||
cookiejar: 2.1.4
|
||||
debug: 4.3.4
|
||||
fast-safe-stringify: 2.1.1
|
||||
form-data: 4.0.0
|
||||
@@ -18016,7 +17956,7 @@ packages:
|
||||
bs-logger: 0.2.6
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
jest: 29.5.0
|
||||
jest-util: 29.4.1
|
||||
jest-util: 29.5.0
|
||||
json5: 2.2.3
|
||||
lodash.memoize: 4.1.2
|
||||
make-error: 1.3.6
|
||||
|
||||
@@ -3,3 +3,4 @@ packages:
|
||||
- api
|
||||
- docs
|
||||
- packages/*
|
||||
- tests/*
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"target": "ES2019",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "../",
|
||||
"strict": true,
|
||||
"lib": ["es2019"],
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@directus/cli/*": ["../packages/cli/src/*"],
|
||||
"@directus/create-directus-project/*": ["../packages/create-directus-project/src/*"],
|
||||
"@directus/storage/*": ["../packages/storage/src/*"],
|
||||
"@directus/storage-driver-azure/*": ["../packages/storage-driver-azure/src/*"],
|
||||
"@directus/storage-driver-local/*": ["../packages/storage-driver-local/src/*"],
|
||||
"@directus/storage-driver-cloudinary/*": ["../packages/storage-driver-cloudinary/src/*"],
|
||||
"@directus/storage-driver-gcs/*": ["../packages/storage-driver-gcs/src/*"],
|
||||
"@directus/storage-driver-s3/*": ["../packages/storage-driver-s3/src/*"],
|
||||
"@directus/extension-sdk/*": ["../packages/extension-sdk/src/*"],
|
||||
"@directus/format-title/*": ["../packages/format-title/src/*"],
|
||||
"@directus/gatsby-source-directus/*": ["../packages/gatsby-source-directus/src/*"],
|
||||
"@directus/schema/*": ["../packages/schema/src/*"],
|
||||
"@directus/sdk/*": ["../packages/sdk/src/*"],
|
||||
"@directus/specs/*": ["../packages/specs/*"],
|
||||
"@common/*": ["./common/*"],
|
||||
"@query/*": ["./query/*"],
|
||||
"@schema/*": ["./schema/*"],
|
||||
"@utils/*": ["./utils/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist", "extensions"]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 863 KiB After Width: | Height: | Size: 863 KiB |
@@ -1,4 +1,5 @@
|
||||
import { Knex } from 'knex';
|
||||
import path from 'node:path';
|
||||
import { promisify } from 'util';
|
||||
import { allVendors } from './get-dbs-to-test';
|
||||
|
||||
@@ -11,8 +12,13 @@ export type Config = {
|
||||
envs: Env;
|
||||
};
|
||||
|
||||
const migrationsDir = './tests-blackbox/setup/migrations';
|
||||
const seedsDir = './tests-blackbox/setup/seeds';
|
||||
export const paths = {
|
||||
cli: path.join(__dirname, '..', '..', '..', 'dist', 'cli'),
|
||||
cwd: path.join(__dirname, '..'),
|
||||
};
|
||||
|
||||
const migrationsDir = './setup/migrations';
|
||||
const seedsDir = './setup/seeds';
|
||||
|
||||
const knexConfig = {
|
||||
waitTestSQL: 'SELECT 1',
|
||||
@@ -70,7 +76,7 @@ const directusConfig = {
|
||||
DB_EXCLUDE_TABLES: 'knex_migrations,knex_migrations_lock,spatial_ref_sys,sysdiagrams',
|
||||
MAX_RELATIONAL_DEPTH: '5',
|
||||
MAX_PAYLOAD_SIZE: '10mb',
|
||||
EXTENSIONS_PATH: './tests-blackbox/extensions',
|
||||
EXTENSIONS_PATH: './extensions',
|
||||
ASSETS_TRANSFORM_MAX_CONCURRENT: '2',
|
||||
MAX_BATCH_MUTATION: '100', // Must be in multiples of 10 for tests
|
||||
ACCESS_TOKEN_TTL: '25d', // should be larger than 24.86 days to test Expires value larger than 32-bit signed integer
|
||||
@@ -1,12 +1,12 @@
|
||||
import config, { getUrl } from '@common/config';
|
||||
import config, { getUrl, paths } from '@common/config';
|
||||
import vendors from '@common/get-dbs-to-test';
|
||||
import * as common from '@common/index';
|
||||
import { TestLogger } from '@common/test-logger';
|
||||
import { awaitDirectusConnection } from '@utils/await-connection';
|
||||
import { ChildProcess, spawn } from 'child_process';
|
||||
import { EnumType } from 'json-to-graphql-query';
|
||||
import knex from 'knex';
|
||||
import type { Knex } from 'knex';
|
||||
import knex from 'knex';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import request from 'supertest';
|
||||
|
||||
@@ -28,7 +28,7 @@ describe('Logger Redact Tests', () => {
|
||||
for (const vendor of vendors) {
|
||||
databases.set(vendor, knex(config.knexConfig[vendor]!));
|
||||
|
||||
const server = spawn('node', ['api/cli', 'start'], { env: env[vendor] });
|
||||
const server = spawn('node', [paths.cli, 'start'], { cwd: paths.cwd, env: env[vendor] });
|
||||
directusInstances[vendor] = server;
|
||||
|
||||
promises.push(awaitDirectusConnection(Number(env[vendor].PORT)));
|
||||
31
tests/blackbox/package.json
Normal file
31
tests/blackbox/package.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "tests-blackbox",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@directus/types": "workspace:*",
|
||||
"@types/jest": "29.4.4",
|
||||
"@types/js-yaml": "4.0.5",
|
||||
"@types/lodash": "4.14.191",
|
||||
"@types/seedrandom": "3.0.5",
|
||||
"@types/supertest": "2.0.12",
|
||||
"@types/uuid": "9.0.1",
|
||||
"autocannon": "7.10.0",
|
||||
"axios": "1.3.4",
|
||||
"globby": "11.1.0",
|
||||
"jest": "29.5.0",
|
||||
"jest-environment-node": "29.5.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"json-to-graphql-query": "2.2.5",
|
||||
"knex": "2.4.2",
|
||||
"listr2": "5.0.8",
|
||||
"lodash": "4.17.21",
|
||||
"seedrandom": "3.0.5",
|
||||
"supertest": "6.3.3",
|
||||
"ts-jest": "29.0.5",
|
||||
"typescript": "4.9.5",
|
||||
"uuid": "9.0.0"
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,20 @@
|
||||
|
||||
Make sure the containers for the databases are running by running `docker compose up -d` in this folder.
|
||||
|
||||
Directus needs to be deployed with `pnpm --filter directus deploy --prod dist`. When using the `test:blackbox` script in the workspace root (`pnpm -w run test:blackbox`) this is already done.
|
||||
|
||||
## Running tests locally
|
||||
|
||||
Run `npm run test:blackbox` to run the blackbox tests for every supported database vendor.
|
||||
Run `pnpm -w run test:blackbox` to run the blackbox tests for every supported database vendor.
|
||||
|
||||
Prepend `TEST_SAVE_LOGS=trace` to get trace logs at `server-logs-*` in this folder.
|
||||
|
||||
### Testing a specific database
|
||||
|
||||
Provide a csv of database drivers in the `TEST_DB` environment variable to test specific databases:
|
||||
|
||||
```
|
||||
TEST_DB=cockroachdb npm run test:blackbox
|
||||
TEST_DB=cockroachdb pnpm -w run test:blackbox
|
||||
```
|
||||
|
||||
### Using an existing Directus instance
|
||||
@@ -22,15 +26,8 @@ The test suite will spin up a fresh copy of the Directus API from the current bu
|
||||
Directus, set the `TEST_LOCAL` flag:
|
||||
|
||||
```
|
||||
TEST_DB=cockroachdb TEST_LOCAL=true npm run test:blackbox
|
||||
TEST_DB=cockroachdb TEST_LOCAL=true pnpm -w run test:blackbox
|
||||
```
|
||||
|
||||
This will use `127.0.0.1:8055` as the URL for every test. Note: make sure to connect your local Directus database
|
||||
instance to the test database container found in docker-compose in this folder.
|
||||
|
||||
### Watching for (test) changes
|
||||
|
||||
Use `npm run test:blackbox:watch` to enable Jest's `--watch` mode, especially useful in combination with the flags
|
||||
above.
|
||||
|
||||
This _does not_ watch changes to Directus; it only watches changes to the tests.
|
||||
@@ -1,12 +1,12 @@
|
||||
import config, { Env, getUrl } from '@common/config';
|
||||
import config, { Env, getUrl, paths } from '@common/config';
|
||||
import vendors from '@common/get-dbs-to-test';
|
||||
import request from 'supertest';
|
||||
import knex from 'knex';
|
||||
import type { Knex } from 'knex';
|
||||
import { spawn, ChildProcess } from 'child_process';
|
||||
import { awaitDirectusConnection } from '@utils/await-connection';
|
||||
import * as common from '@common/index';
|
||||
import { awaitDirectusConnection } from '@utils/await-connection';
|
||||
import { ChildProcess, spawn } from 'child_process';
|
||||
import type { Knex } from 'knex';
|
||||
import knex from 'knex';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import request from 'supertest';
|
||||
|
||||
describe('Schema Caching Tests', () => {
|
||||
const databases = new Map<string, Knex>();
|
||||
@@ -20,47 +20,47 @@ describe('Schema Caching Tests', () => {
|
||||
for (const vendor of vendors) {
|
||||
databases.set(vendor, knex(config.knexConfig[vendor]!));
|
||||
|
||||
const env = cloneDeep(config.envs);
|
||||
env[vendor].CACHE_ENABLED = 'true';
|
||||
env[vendor].CACHE_AUTO_PURGE = 'true';
|
||||
env[vendor].CACHE_SCHEMA = 'true';
|
||||
env[vendor].CACHE_STORE = 'memory';
|
||||
env[vendor].CACHE_NAMESPACE = 'directus-schema-cache';
|
||||
env[vendor].MESSENGER_STORE = 'redis';
|
||||
env[vendor].MESSENGER_NAMESPACE = `directus-${vendor}`;
|
||||
env[vendor].MESSENGER_REDIS = `redis://localhost:6108/4`;
|
||||
const env1 = cloneDeep(config.envs);
|
||||
env1[vendor].CACHE_ENABLED = 'true';
|
||||
env1[vendor].CACHE_AUTO_PURGE = 'true';
|
||||
env1[vendor].CACHE_SCHEMA = 'true';
|
||||
env1[vendor].CACHE_STORE = 'memory';
|
||||
env1[vendor].CACHE_NAMESPACE = 'directus-schema-cache';
|
||||
env1[vendor].MESSENGER_STORE = 'redis';
|
||||
env1[vendor].MESSENGER_NAMESPACE = `directus-${vendor}`;
|
||||
env1[vendor].MESSENGER_REDIS = `redis://localhost:6108/4`;
|
||||
|
||||
const env2 = cloneDeep(env);
|
||||
env2[vendor].CACHE_NAMESPACE = env[vendor].CACHE_NAMESPACE + '2';
|
||||
const env2 = cloneDeep(env1);
|
||||
env2[vendor].CACHE_NAMESPACE = env1[vendor].CACHE_NAMESPACE + '2';
|
||||
|
||||
const env3 = cloneDeep(env);
|
||||
env3[vendor].CACHE_NAMESPACE = env[vendor].CACHE_NAMESPACE + '3';
|
||||
const env3 = cloneDeep(env1);
|
||||
env3[vendor].CACHE_NAMESPACE = env1[vendor].CACHE_NAMESPACE + '3';
|
||||
delete env3[vendor].MESSENGER_STORE;
|
||||
delete env3[vendor].MESSENGER_NAMESPACE;
|
||||
delete env3[vendor].MESSENGER_REDIS;
|
||||
|
||||
const env4 = cloneDeep(env3);
|
||||
env4[vendor].CACHE_NAMESPACE = env[vendor].CACHE_NAMESPACE + '4';
|
||||
env4[vendor].CACHE_NAMESPACE = env1[vendor].CACHE_NAMESPACE + '4';
|
||||
|
||||
const newServerPort = Number(env[vendor]!.PORT) + 150;
|
||||
const newServerPort1 = Number(env1[vendor]!.PORT) + 150;
|
||||
const newServerPort2 = Number(env2[vendor]!.PORT) + 200;
|
||||
const newServerPort3 = Number(env3[vendor]!.PORT) + 250;
|
||||
const newServerPort4 = Number(env4[vendor]!.PORT) + 300;
|
||||
|
||||
env[vendor]!.PORT = String(newServerPort);
|
||||
env1[vendor]!.PORT = String(newServerPort1);
|
||||
env2[vendor]!.PORT = String(newServerPort2);
|
||||
env3[vendor]!.PORT = String(newServerPort3);
|
||||
env4[vendor]!.PORT = String(newServerPort4);
|
||||
|
||||
const server = spawn('node', ['api/cli', 'start'], { env: env[vendor] });
|
||||
const server2 = spawn('node', ['api/cli', 'start'], { env: env2[vendor] });
|
||||
const server3 = spawn('node', ['api/cli', 'start'], { env: env3[vendor] });
|
||||
const server4 = spawn('node', ['api/cli', 'start'], { env: env4[vendor] });
|
||||
const server1 = spawn('node', [paths.cli, 'start'], { cwd: paths.cwd, env: env1[vendor] });
|
||||
const server2 = spawn('node', [paths.cli, 'start'], { cwd: paths.cwd, env: env2[vendor] });
|
||||
const server3 = spawn('node', [paths.cli, 'start'], { cwd: paths.cwd, env: env3[vendor] });
|
||||
const server4 = spawn('node', [paths.cli, 'start'], { cwd: paths.cwd, env: env4[vendor] });
|
||||
|
||||
tzDirectus[vendor] = [server, server2, server3, server4];
|
||||
envs[vendor] = [env, env2, env3, env4];
|
||||
tzDirectus[vendor] = [server1, server2, server3, server4];
|
||||
envs[vendor] = [env1, env2, env3, env4];
|
||||
|
||||
promises.push(awaitDirectusConnection(newServerPort));
|
||||
promises.push(awaitDirectusConnection(newServerPort1));
|
||||
promises.push(awaitDirectusConnection(newServerPort2));
|
||||
promises.push(awaitDirectusConnection(newServerPort3));
|
||||
promises.push(awaitDirectusConnection(newServerPort4));
|
||||
@@ -84,15 +84,15 @@ describe('Schema Caching Tests', () => {
|
||||
describe('schema change propagates across nodes using messenger', () => {
|
||||
it.each(vendors)('%s', async (vendor) => {
|
||||
// Setup
|
||||
const env = envs[vendor][0];
|
||||
const env1 = envs[vendor][0];
|
||||
const env2 = envs[vendor][1];
|
||||
|
||||
await common.CreateCollection(vendor, { collection: newCollectionName, env });
|
||||
await common.CreateCollection(vendor, { collection: newCollectionName, env: env1 });
|
||||
|
||||
await request(getUrl(vendor, env))
|
||||
await request(getUrl(vendor, env1))
|
||||
.post(`/utils/cache/clear`)
|
||||
.set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
await request(getUrl(vendor, env)).get(`/fields`).set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
await request(getUrl(vendor, env1)).get(`/fields`).set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
|
||||
await request(getUrl(vendor, env2))
|
||||
.post(`/utils/cache/clear`)
|
||||
@@ -100,18 +100,18 @@ describe('Schema Caching Tests', () => {
|
||||
await request(getUrl(vendor, env2)).get(`/fields`).set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
|
||||
// Action
|
||||
const responseBefore = await request(getUrl(vendor, env))
|
||||
const responseBefore = await request(getUrl(vendor, env1))
|
||||
.get(`/collections/${newCollectionName}`)
|
||||
.set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
const responseBefore2 = await request(getUrl(vendor, env2))
|
||||
.get(`/collections/${newCollectionName}`)
|
||||
.set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
|
||||
await request(getUrl(vendor, env))
|
||||
await request(getUrl(vendor, env1))
|
||||
.delete(`/collections/${newCollectionName}`)
|
||||
.set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
|
||||
const responseAfter = await request(getUrl(vendor, env))
|
||||
const responseAfter = await request(getUrl(vendor, env1))
|
||||
.get(`/collections/${newCollectionName}`)
|
||||
.set('Authorization', `Bearer ${common.USER.ADMIN.TOKEN}`);
|
||||
const responseAfter2 = await request(getUrl(vendor, env2))
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { PrimaryKeyType, PRIMARY_KEY_TYPES } from '@common/index';
|
||||
import { load as loadYaml } from 'js-yaml';
|
||||
import { version as currentDirectusVersion } from '../../../api/package.json';
|
||||
import { version as currentDirectusVersion } from '../../../../api/package.json';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
describe('Schema Snapshots', () => {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user