@contember/engine-http 1.2.0-alpha.18 → 1.2.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/TimerMiddleware.js +2 -2
- package/dist/src/common/TimerMiddleware.js.map +1 -1
- package/dist/src/content/ContentApiMiddlewareFactory.js +1 -1
- package/dist/src/content/ContentApiMiddlewareFactory.js.map +1 -1
- package/dist/src/content/ContentGraphQLContextFactory.js +2 -2
- package/dist/src/content/ContentGraphQLContextFactory.js.map +1 -1
- package/dist/src/content/NotModifiedChecker.d.ts +2 -2
- package/dist/src/content/NotModifiedChecker.d.ts.map +1 -1
- package/dist/src/content/NotModifiedChecker.js +2 -2
- package/dist/src/content/NotModifiedChecker.js.map +1 -1
- package/dist/src/graphql/execution.js +2 -2
- package/dist/src/graphql/execution.js.map +1 -1
- package/dist/src/providers.d.ts +1 -1
- package/dist/src/providers.d.ts.map +1 -1
- package/dist/src/providers.js +3 -3
- package/dist/src/providers.js.map +1 -1
- package/dist/src/transfer/ExportApiMiddlewareFactory.js +2 -2
- package/dist/src/transfer/ExportApiMiddlewareFactory.js.map +1 -1
- package/dist/src/transfer/ImportApiMiddlewareFactory.js +2 -2
- package/dist/src/transfer/ImportApiMiddlewareFactory.js.map +1 -1
- package/dist/src/tsconfig.tsbuildinfo +1 -1
- package/dist/src/utils/CryptoWrapper.d.ts +1 -1
- package/dist/src/utils/CryptoWrapper.d.ts.map +1 -1
- package/dist/src/utils/CryptoWrapper.js +1 -1
- package/dist/src/utils/CryptoWrapper.js.map +1 -1
- package/dist/tests/cases/unit/crypto.test.js +1 -1
- package/dist/tests/cases/unit/crypto.test.js.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -12
- package/src/common/TimerMiddleware.ts +1 -1
- package/src/content/ContentApiMiddlewareFactory.ts +1 -1
- package/src/content/ContentGraphQLContextFactory.ts +1 -1
- package/src/content/NotModifiedChecker.ts +3 -3
- package/src/graphql/execution.ts +1 -1
- package/src/providers.ts +1 -1
- package/src/transfer/ExportApiMiddlewareFactory.ts +1 -1
- package/src/transfer/ImportApiMiddlewareFactory.ts +1 -1
- package/src/tsconfig.json +3 -4
- package/src/utils/CryptoWrapper.ts +1 -1
- package/tests/cases/unit/crypto.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/engine-http",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"typings": "dist/src/index.d.ts",
|
|
@@ -9,17 +9,18 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@apollographql/graphql-playground-html": "^1.6.24",
|
|
12
|
-
"@contember/database": "^1.2.0-alpha.
|
|
13
|
-
"@contember/engine-content-api": "^1.2.0-alpha.
|
|
14
|
-
"@contember/engine-plugins": "^1.2.0-alpha.
|
|
15
|
-
"@contember/engine-system-api": "^1.2.0-alpha.
|
|
16
|
-
"@contember/engine-tenant-api": "^1.2.0-alpha.
|
|
17
|
-
"@contember/graphql-utils": "^1.2.0-alpha.
|
|
18
|
-
"@contember/
|
|
19
|
-
"@contember/schema
|
|
20
|
-
"@contember/
|
|
12
|
+
"@contember/database": "^1.2.0-alpha.19",
|
|
13
|
+
"@contember/engine-content-api": "^1.2.0-alpha.19",
|
|
14
|
+
"@contember/engine-plugins": "^1.2.0-alpha.19",
|
|
15
|
+
"@contember/engine-system-api": "^1.2.0-alpha.19",
|
|
16
|
+
"@contember/engine-tenant-api": "^1.2.0-alpha.19",
|
|
17
|
+
"@contember/graphql-utils": "^1.2.0-alpha.19",
|
|
18
|
+
"@contember/logger": "^1.2.0-alpha.19",
|
|
19
|
+
"@contember/schema": "^1.2.0-alpha.19",
|
|
20
|
+
"@contember/schema-utils": "^1.2.0-alpha.19",
|
|
21
|
+
"@contember/typesafe": "^1.2.0-alpha.19",
|
|
21
22
|
"@graphql-tools/schema": "^8.3.5",
|
|
22
|
-
"@
|
|
23
|
+
"@graphql-tools/merge": "^8.3.5",
|
|
23
24
|
"accepts": "^1.3.7",
|
|
24
25
|
"bcrypt": "^5.0.1",
|
|
25
26
|
"koa": "^2.11.0",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"@types/koa": "^2.11.3",
|
|
33
34
|
"@types/koa-bodyparser": "^4.2.2",
|
|
34
35
|
"@types/koa__cors": "^3.0.2",
|
|
35
|
-
"@types/lru-cache": "^
|
|
36
|
+
"@types/lru-cache": "^7.10.10",
|
|
36
37
|
"@types/node": "^18",
|
|
37
38
|
"@types/uuid": "^8.3.0",
|
|
38
39
|
"graphql": "^16.5.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgumentValues } from 'graphql
|
|
1
|
+
import { getArgumentValues } from 'graphql'
|
|
2
2
|
|
|
3
3
|
import { Context, createAclVariables, ExecutionContainerFactory } from '@contember/engine-content-api'
|
|
4
4
|
import { setupSystemVariables } from '@contember/engine-system-api'
|
|
@@ -11,11 +11,11 @@ export interface NotModifiedCheckResult {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export class NotModifiedChecker {
|
|
14
|
-
public async checkNotModified({ request, timer, systemDatabase,
|
|
14
|
+
public async checkNotModified({ request, timer, systemDatabase, stageId }: {
|
|
15
15
|
request: Request
|
|
16
16
|
timer: Timer
|
|
17
17
|
systemDatabase: DatabaseContext
|
|
18
|
-
|
|
18
|
+
stageId: string
|
|
19
19
|
}): Promise<NotModifiedCheckResult | null> {
|
|
20
20
|
if (request.headers[NotModifiedHeaderName] === undefined) {
|
|
21
21
|
return null
|
|
@@ -28,7 +28,7 @@ export class NotModifiedChecker {
|
|
|
28
28
|
}
|
|
29
29
|
const latestRef = await timer('NotModifiedCheck', () => {
|
|
30
30
|
const queryHandler = systemDatabase.queryHandler
|
|
31
|
-
return queryHandler.fetch(new LatestTransactionIdByStageQuery(
|
|
31
|
+
return queryHandler.fetch(new LatestTransactionIdByStageQuery(stageId))
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
return {
|
package/src/graphql/execution.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
validateSchema,
|
|
12
12
|
} from 'graphql'
|
|
13
13
|
import LRUCache from 'lru-cache'
|
|
14
|
-
import { createHash } from 'crypto'
|
|
14
|
+
import { createHash } from 'node:crypto'
|
|
15
15
|
import { Request, Response } from 'koa'
|
|
16
16
|
import { logger } from '@contember/logger'
|
|
17
17
|
import { ForbiddenError } from '@contember/graphql-utils'
|
package/src/providers.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KoaMiddleware, KoaRequestState } from '../koa'
|
|
2
2
|
import { AuthResult, HttpError, TimerMiddlewareState } from '../common'
|
|
3
3
|
import { ProjectGroupResolver, ProjectInfoMiddlewareState } from '../project-common'
|
|
4
|
-
import { Readable } from 'stream'
|
|
4
|
+
import { Readable } from 'node:stream'
|
|
5
5
|
import { toBuffer } from './CommandStream'
|
|
6
6
|
import { ExportExecutor, ExportRequest } from './ExportExecutor'
|
|
7
7
|
import { ParseError } from '@contember/typesafe'
|
|
@@ -3,7 +3,7 @@ import { AuthResult, HttpError, TimerMiddlewareState } from '../common'
|
|
|
3
3
|
import { ProjectGroupResolver, ProjectInfoMiddlewareState } from '../project-common'
|
|
4
4
|
import { fromBuffer } from './CommandStream'
|
|
5
5
|
import { ImportError, ImportExecutor } from './ImportExecutor'
|
|
6
|
-
import { createGunzip } from 'zlib'
|
|
6
|
+
import { createGunzip } from 'node:zlib'
|
|
7
7
|
|
|
8
8
|
type ImportApiMiddlewareState =
|
|
9
9
|
& TimerMiddlewareState
|
package/src/tsconfig.json
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
"outDir": "../dist/src"
|
|
5
5
|
},
|
|
6
6
|
"references": [
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
"path": "../../config-loader/src"
|
|
10
|
-
},
|
|
11
7
|
{
|
|
12
8
|
"path": "../../database/src"
|
|
13
9
|
},
|
|
@@ -37,6 +33,9 @@
|
|
|
37
33
|
},
|
|
38
34
|
{
|
|
39
35
|
"path": "../../schema-utils/src"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "../../typesafe/src"
|
|
40
39
|
}
|
|
41
40
|
]
|
|
42
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test, assert } from 'vitest'
|
|
2
2
|
import { CryptoWrapper } from '../../../src'
|
|
3
|
-
import * as crypto from 'crypto'
|
|
3
|
+
import * as crypto from 'node:crypto'
|
|
4
4
|
|
|
5
5
|
const encryptionKey = crypto.createSecretKey(Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex'))
|
|
6
6
|
const iv = Buffer.alloc(16).fill('a')
|