2023-04-18 06:24:44 +03:00
|
|
|
{
|
|
|
|
"name": "@affine/server",
|
|
|
|
"private": true,
|
2023-12-20 11:10:42 +03:00
|
|
|
"version": "0.11.0",
|
2023-04-18 06:24:44 +03:00
|
|
|
"description": "Affine Node.js server",
|
|
|
|
"type": "module",
|
2023-04-19 02:14:25 +03:00
|
|
|
"bin": {
|
|
|
|
"run-test": "./scripts/run-test.ts"
|
|
|
|
},
|
2023-04-18 06:24:44 +03:00
|
|
|
"scripts": {
|
2023-08-03 10:10:02 +03:00
|
|
|
"build": "tsc",
|
2024-01-03 13:56:54 +03:00
|
|
|
"start": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution node ./src/index.ts",
|
2023-04-18 06:24:44 +03:00
|
|
|
"dev": "nodemon ./src/index.ts",
|
2023-09-01 22:41:29 +03:00
|
|
|
"test": "ava --concurrency 1 --serial",
|
|
|
|
"test:coverage": "c8 ava --concurrency 1 --serial",
|
2023-10-27 12:31:52 +03:00
|
|
|
"postinstall": "prisma generate",
|
2024-01-03 13:56:54 +03:00
|
|
|
"data-migration": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution node ./src/data/app.ts",
|
2023-10-27 12:31:52 +03:00
|
|
|
"predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution node ./dist/data/app.js run"
|
2023-04-18 06:24:44 +03:00
|
|
|
},
|
|
|
|
"dependencies": {
|
2023-11-23 08:18:05 +03:00
|
|
|
"@apollo/server": "^4.9.5",
|
|
|
|
"@auth/prisma-adapter": "^1.0.7",
|
|
|
|
"@aws-sdk/client-s3": "^3.454.0",
|
2023-08-29 13:07:05 +03:00
|
|
|
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.17.0",
|
|
|
|
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
|
2023-10-12 05:46:52 +03:00
|
|
|
"@keyv/redis": "^2.8.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@nestjs/apollo": "^12.0.11",
|
|
|
|
"@nestjs/common": "^10.2.10",
|
|
|
|
"@nestjs/core": "^10.2.10",
|
|
|
|
"@nestjs/event-emitter": "^2.0.3",
|
|
|
|
"@nestjs/graphql": "^12.0.11",
|
|
|
|
"@nestjs/platform-express": "^10.2.10",
|
|
|
|
"@nestjs/platform-socket.io": "^10.2.10",
|
2023-11-22 10:56:59 +03:00
|
|
|
"@nestjs/schedule": "^4.0.0",
|
2024-01-10 11:35:21 +03:00
|
|
|
"@nestjs/serve-static": "^4.0.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@nestjs/throttler": "^5.0.1",
|
|
|
|
"@nestjs/websockets": "^10.2.10",
|
2023-07-27 07:02:18 +03:00
|
|
|
"@node-rs/argon2": "^1.5.2",
|
|
|
|
"@node-rs/crc32": "^1.7.2",
|
2024-01-05 10:23:22 +03:00
|
|
|
"@node-rs/jsonwebtoken": "^0.3.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@opentelemetry/api": "^1.7.0",
|
2023-12-27 18:35:17 +03:00
|
|
|
"@opentelemetry/core": "^1.19.0",
|
|
|
|
"@opentelemetry/exporter-prometheus": "^0.46.0",
|
|
|
|
"@opentelemetry/exporter-zipkin": "^1.19.0",
|
2023-12-10 10:20:58 +03:00
|
|
|
"@opentelemetry/host-metrics": "^0.34.0",
|
2023-12-27 18:35:17 +03:00
|
|
|
"@opentelemetry/instrumentation": "^0.46.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@opentelemetry/instrumentation-graphql": "^0.36.0",
|
2023-12-27 18:35:17 +03:00
|
|
|
"@opentelemetry/instrumentation-http": "^0.46.0",
|
2023-12-05 06:46:24 +03:00
|
|
|
"@opentelemetry/instrumentation-ioredis": "^0.36.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@opentelemetry/instrumentation-nestjs-core": "^0.33.3",
|
2024-01-05 10:23:22 +03:00
|
|
|
"@opentelemetry/instrumentation-socket.io": "^0.35.0",
|
2023-12-27 18:35:17 +03:00
|
|
|
"@opentelemetry/resources": "^1.19.0",
|
|
|
|
"@opentelemetry/sdk-metrics": "^1.19.0",
|
|
|
|
"@opentelemetry/sdk-node": "^0.46.0",
|
|
|
|
"@opentelemetry/sdk-trace-node": "^1.19.0",
|
2023-12-28 11:09:10 +03:00
|
|
|
"@prisma/client": "^5.7.1",
|
|
|
|
"@prisma/instrumentation": "^5.7.1",
|
2023-08-29 13:07:05 +03:00
|
|
|
"@socket.io/redis-adapter": "^8.2.1",
|
2023-07-05 06:13:20 +03:00
|
|
|
"cookie-parser": "^1.4.6",
|
2023-06-27 06:32:24 +03:00
|
|
|
"dotenv": "^16.3.1",
|
2024-01-10 11:35:21 +03:00
|
|
|
"dotenv-cli": "^7.3.0",
|
2023-04-28 02:02:05 +03:00
|
|
|
"express": "^4.18.2",
|
2024-01-08 06:06:25 +03:00
|
|
|
"file-type": "^19.0.0",
|
2023-09-01 02:50:03 +03:00
|
|
|
"get-stream": "^8.0.1",
|
2023-09-29 06:02:26 +03:00
|
|
|
"graphql": "^16.8.1",
|
2023-04-18 06:24:44 +03:00
|
|
|
"graphql-type-json": "^0.3.2",
|
2023-06-21 09:08:32 +03:00
|
|
|
"graphql-upload": "^16.0.2",
|
2023-08-29 13:07:05 +03:00
|
|
|
"ioredis": "^5.3.2",
|
2023-10-16 15:47:06 +03:00
|
|
|
"keyv": "^4.5.4",
|
2023-04-18 06:24:44 +03:00
|
|
|
"lodash-es": "^4.17.21",
|
2023-11-23 08:18:05 +03:00
|
|
|
"nanoid": "^5.0.3",
|
|
|
|
"nest-commander": "^3.12.2",
|
2023-09-29 06:02:26 +03:00
|
|
|
"nestjs-throttler-storage-redis": "^0.4.1",
|
2023-11-23 08:18:05 +03:00
|
|
|
"next-auth": "^4.24.5",
|
|
|
|
"nodemailer": "^6.9.7",
|
2023-08-29 13:07:05 +03:00
|
|
|
"on-headers": "^1.0.2",
|
2023-06-21 09:08:32 +03:00
|
|
|
"parse-duration": "^1.1.0",
|
2023-08-29 13:07:05 +03:00
|
|
|
"pretty-time": "^1.1.0",
|
2023-12-28 11:09:10 +03:00
|
|
|
"prisma": "^5.7.1",
|
2023-10-16 15:47:06 +03:00
|
|
|
"prom-client": "^15.0.0",
|
2023-12-28 11:00:13 +03:00
|
|
|
"reflect-metadata": "^0.2.0",
|
2023-07-10 11:36:39 +03:00
|
|
|
"rxjs": "^7.8.1",
|
2023-08-29 13:07:05 +03:00
|
|
|
"semver": "^7.5.4",
|
2023-08-30 02:21:18 +03:00
|
|
|
"socket.io": "^4.7.2",
|
2023-11-23 08:18:05 +03:00
|
|
|
"stripe": "^14.5.0",
|
2023-09-29 06:02:26 +03:00
|
|
|
"ws": "^8.14.2",
|
2023-12-14 12:50:51 +03:00
|
|
|
"yjs": "^13.6.10",
|
|
|
|
"zod": "^3.22.4"
|
2023-04-18 06:24:44 +03:00
|
|
|
},
|
|
|
|
"devDependencies": {
|
2023-09-13 08:11:19 +03:00
|
|
|
"@affine-test/kit": "workspace:*",
|
2023-06-29 17:02:46 +03:00
|
|
|
"@affine/storage": "workspace:*",
|
2023-10-11 10:36:45 +03:00
|
|
|
"@napi-rs/image": "^1.7.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@nestjs/testing": "^10.2.10",
|
|
|
|
"@types/cookie-parser": "^1.4.6",
|
|
|
|
"@types/engine.io": "^3.1.10",
|
|
|
|
"@types/express": "^4.17.21",
|
|
|
|
"@types/graphql-upload": "^16.0.5",
|
2023-09-04 08:24:51 +03:00
|
|
|
"@types/keyv": "^4.2.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@types/lodash-es": "^4.17.11",
|
|
|
|
"@types/node": "^20.9.3",
|
|
|
|
"@types/nodemailer": "^6.4.14",
|
|
|
|
"@types/on-headers": "^1.0.3",
|
|
|
|
"@types/pretty-time": "^1.1.5",
|
|
|
|
"@types/sinon": "^17.0.2",
|
2023-12-26 11:20:35 +03:00
|
|
|
"@types/supertest": "^6.0.0",
|
2023-11-23 08:18:05 +03:00
|
|
|
"@types/ws": "^8.5.10",
|
chore: bump up ava version to v6 (#5195)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ava](https://avajs.dev) ([source](https://togithub.com/avajs/ava)) | [`^5.3.1` -> `^6.0.0`](https://renovatebot.com/diffs/npm/ava/5.3.1/6.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/ava/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ava/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ava/5.3.1/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ava/5.3.1/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
<details>
<summary>avajs/ava (ava)</summary>
### [`v6.0.0`](https://togithub.com/avajs/ava/releases/tag/v6.0.0)
[Compare Source](https://togithub.com/avajs/ava/compare/v5.3.1...v6.0.0)
#### Breaking Changes
- AVA now requires Node.js versions 18.18, 20.8 or 21. Versions 14 and 16 are no longer supported. [#​3251](https://togithub.com/avajs/ava/issues/3251) [#​3216](https://togithub.com/avajs/ava/issues/3216)
- When tests finish, worker threads or child processes are no longer exited through `proces.exit()`. If your test file does not exit on its own, the test run will time out. [#​3260](https://togithub.com/avajs/ava/issues/3260)
- Changes to watch mode [#​3218](https://togithub.com/avajs/ava/issues/3218):
- Watch mode can no longer be started via the `ava.config.*` or `package.json` configuration.
- The `ignoredByWatcher` configuration has moved to the `watchMode` object, under the `ignoreChanges` key.
- Watch mode now uses the built-in [`fs.watch()`](https://nodejs.org/api/fs.html#fswatchfilename-options-listener) in recursive mode. This is supported on Linux in Node.js 20 or newer, and MacOS and Windows in Node.js 18 as well. There are [caveats](https://nodejs.org/api/fs.html#caveats) to keep in mind.
- Failed assertions now throw, meaning that any subsequent code is not executed. This also impacts the type definitions. [#​3246](https://togithub.com/avajs/ava/issues/3246)
- [Only native errors](https://nodejs.org/api/util.html#utiltypesisnativeerrorvalue) are now considered errors by the `t.throws()` and `t.throwsAsync()` assertions. [`Object.create(Error.prototype)` is **not** a native error](Object.create\(Error.prototype\)). [#​3229](https://togithub.com/avajs/ava/issues/3229)
- Changes to modules loaded through the `require` configuration [#​3184](https://togithub.com/avajs/ava/issues/3184):
- If such modules export a default function, this function is now invoked.
- Local files are loaded through `@ava/typescript` if necessary.
#### Improvements
##### Rewritten watcher
The watcher has been rewritten. It’s now built on [`fs.watch()`](https://nodejs.org/api/fs.html#fswatchfilename-options-listener) in recursive mode.
[`@vercel/nft`](https://togithub.com/vercel/nft) is used to perform static dependency analysis, supporting ESM and CJS imports for JavaScript & TypeScript source files. This is a huge improvement over the previous runtime tracking of CJS imports, which did not support ESM.
Integration with [`@ava/typescript`](https://togithub.com/avajs/typescript) has been improved. The watcher can now detect a change to a TypeScript source file, then wait for the corresponding build output to change before re-running tests.
The ignoredByWatcher configuration has moved to the watchMode object, under the ignoreChanges key.
See [#​3218](https://togithub.com/avajs/ava/issues/3218) and [#​3257](https://togithub.com/avajs/ava/issues/3257).
##### Failed assertions now throw
Assertions now throw a `TestFailure` error when they fail. This error is not exported or documented and should not be used or thrown manually. You cannot catch this error in order to recover from a failure, use `t.try()` instead.
All assertions except for `t.throws()` and `t.throwsAsync()` now return `true` when they pass. This is useful for some of the assertions in TypeScript where they can be used as a type guard.
Committing a failed `t.try()` result now also throws.
See [#​3246](https://togithub.com/avajs/ava/issues/3246).
##### `t.throws()` and `t.throwsAsync()` can now expect any error
By default, the thrown error (or rejection reason) must be a native error. You can change the assertion to expect any kind of error by setting `any: true` in the expectation object:
```js
t.throws(() => { throw 'error' }, {any: true})
```
See [#​3245](https://togithub.com/avajs/ava/issues/3245) by [@​adiSuper94](https://togithub.com/adiSuper94).
##### The `require` configuration is now more powerful
It now loads ES modules.
Local files are loaded through `@ava/typescript` if necessary, so you can also write these in TypeScript.
If there is a default export function, it is invoked after loading. The function is awaited so it can do asynchronous setup before further modules are loaded. Arguments from the configuration can be passed to the function (as a \[[structured clone](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)]\(https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)).
See [#​3184](https://togithub.com/avajs/ava/issues/3184) by [@​sculpt0r](https://togithub.com/sculpt0r).
##### Other changes worth noting
- Internal events can now be observed (experimentally). See [#​3247](https://togithub.com/avajs/ava/issues/3247) by [@​codetheweb](https://togithub.com/codetheweb). It’s experimental and undocumented.
- You can now use `t.timeout.clear()` to restore a previous `t.timeout()`. [#​3221](https://togithub.com/avajs/ava/issues/3221)
- Code coverage is flushed to disk at opportune moments. [#​3220](https://togithub.com/avajs/ava/issues/3220)
#### New Contributors
- [@​sculpt0r](https://togithub.com/sculpt0r) made their first contribution in [https://github.com/avajs/ava/pull/3184](https://togithub.com/avajs/ava/pull/3184)
- [@​ZachHaber](https://togithub.com/ZachHaber) made their first contribution in [https://github.com/avajs/ava/pull/3233](https://togithub.com/avajs/ava/pull/3233)
- [@​adiSuper94](https://togithub.com/adiSuper94) made their first contribution in [https://github.com/avajs/ava/pull/3245](https://togithub.com/avajs/ava/pull/3245)
- [@​bricker](https://togithub.com/bricker) made their first contribution in [https://github.com/avajs/ava/pull/3250](https://togithub.com/avajs/ava/pull/3250)
**Full Changelog**: https://github.com/avajs/ava/compare/v5.3.1...v6.0.0
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSJ9-->
2023-12-05 09:19:00 +03:00
|
|
|
"ava": "^6.0.0",
|
2024-01-04 06:50:24 +03:00
|
|
|
"c8": "^9.0.0",
|
2023-08-10 17:51:20 +03:00
|
|
|
"nodemon": "^3.0.1",
|
2023-11-23 08:18:05 +03:00
|
|
|
"sinon": "^17.0.1",
|
2023-04-19 02:14:25 +03:00
|
|
|
"supertest": "^6.3.3",
|
2023-04-18 06:24:44 +03:00
|
|
|
"ts-node": "^10.9.1",
|
2023-11-23 08:18:05 +03:00
|
|
|
"typescript": "^5.3.2"
|
2023-04-18 06:24:44 +03:00
|
|
|
},
|
2023-09-01 22:41:29 +03:00
|
|
|
"ava": {
|
|
|
|
"extensions": {
|
|
|
|
"ts": "module"
|
|
|
|
},
|
2023-09-29 06:02:26 +03:00
|
|
|
"workerThreads": false,
|
2023-09-01 22:41:29 +03:00
|
|
|
"nodeArguments": [
|
2023-09-29 06:02:26 +03:00
|
|
|
"--trace-sigint",
|
2023-09-01 22:41:29 +03:00
|
|
|
"--loader",
|
2023-09-15 10:34:14 +03:00
|
|
|
"ts-node/esm/transpile-only.mjs",
|
2023-09-01 22:41:29 +03:00
|
|
|
"--es-module-specifier-resolution",
|
|
|
|
"node"
|
|
|
|
],
|
|
|
|
"files": [
|
2024-01-05 07:13:49 +03:00
|
|
|
"tests/**/*.spec.ts",
|
|
|
|
"tests/**/*.e2e.ts"
|
2023-09-01 22:41:29 +03:00
|
|
|
],
|
|
|
|
"require": [
|
|
|
|
"./src/prelude.ts"
|
|
|
|
],
|
|
|
|
"environmentVariables": {
|
2023-09-15 10:34:14 +03:00
|
|
|
"TS_NODE_PROJECT": "./tests/tsconfig.json",
|
|
|
|
"NODE_ENV": "test",
|
|
|
|
"ENABLE_LOCAL_EMAIL": "true",
|
|
|
|
"OAUTH_EMAIL_LOGIN": "noreply@toeverything.info",
|
|
|
|
"OAUTH_EMAIL_PASSWORD": "affine",
|
2023-12-14 12:50:36 +03:00
|
|
|
"OAUTH_EMAIL_SENDER": "noreply@toeverything.info",
|
|
|
|
"FEATURES_EARLY_ACCESS_PREVIEW": "false"
|
2023-09-01 22:41:29 +03:00
|
|
|
}
|
|
|
|
},
|
2023-04-18 06:24:44 +03:00
|
|
|
"nodemonConfig": {
|
|
|
|
"exec": "node",
|
|
|
|
"script": "./src/index.ts",
|
|
|
|
"nodeArgs": [
|
|
|
|
"--loader",
|
|
|
|
"ts-node/esm.mjs",
|
|
|
|
"--es-module-specifier-resolution",
|
|
|
|
"node"
|
|
|
|
],
|
|
|
|
"ignore": [
|
|
|
|
"**/__tests__/**",
|
|
|
|
"**/dist/**"
|
|
|
|
],
|
|
|
|
"env": {
|
2023-04-25 05:13:52 +03:00
|
|
|
"TS_NODE_TRANSPILE_ONLY": true,
|
2023-04-18 06:24:44 +03:00
|
|
|
"TS_NODE_PROJECT": "./tsconfig.json",
|
|
|
|
"NODE_ENV": "development",
|
|
|
|
"DEBUG": "affine:*",
|
|
|
|
"FORCE_COLOR": true,
|
|
|
|
"DEBUG_COLORS": true
|
|
|
|
},
|
|
|
|
"delay": 1000
|
2023-04-18 09:01:14 +03:00
|
|
|
},
|
|
|
|
"c8": {
|
|
|
|
"reporter": [
|
|
|
|
"text",
|
|
|
|
"lcov"
|
|
|
|
],
|
|
|
|
"report-dir": ".coverage",
|
|
|
|
"exclude": [
|
2023-04-19 02:14:25 +03:00
|
|
|
"scripts",
|
2023-04-18 09:01:14 +03:00
|
|
|
"node_modules",
|
|
|
|
"**/*.spec.ts"
|
|
|
|
]
|
2023-04-20 11:34:00 +03:00
|
|
|
},
|
2023-06-27 12:23:19 +03:00
|
|
|
"stableVersion": "0.5.3",
|
|
|
|
"installConfig": {
|
|
|
|
"hoistingLimits": "workspaces"
|
|
|
|
}
|
2023-04-18 06:24:44 +03:00
|
|
|
}
|