@contember/engine-content-api 2.1.0-alpha.23 → 2.1.0-alpha.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/engine-content-api",
3
- "version": "2.1.0-alpha.23",
3
+ "version": "2.1.0-alpha.25",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/production/index.js",
6
6
  "typings": "./dist/types/index.d.ts",
@@ -26,18 +26,18 @@
26
26
  "generate": "gql-gen --config graphql.codegen.yml"
27
27
  },
28
28
  "dependencies": {
29
- "@contember/database": "2.1.0-alpha.23",
30
- "@contember/dic": "2.1.0-alpha.23",
31
- "@contember/graphql-utils": "2.1.0-alpha.23",
32
- "@contember/logger": "2.1.0-alpha.23",
33
- "@contember/schema": "2.1.0-alpha.23",
34
- "@contember/schema-definition": "2.1.0-alpha.23",
35
- "@contember/schema-utils": "2.1.0-alpha.23",
29
+ "@contember/database": "2.1.0-alpha.25",
30
+ "@contember/dic": "2.1.0-alpha.25",
31
+ "@contember/graphql-utils": "2.1.0-alpha.25",
32
+ "@contember/logger": "2.1.0-alpha.25",
33
+ "@contember/schema": "2.1.0-alpha.25",
34
+ "@contember/schema-definition": "2.1.0-alpha.25",
35
+ "@contember/schema-utils": "2.1.0-alpha.25",
36
36
  "fast-deep-equal": "^3.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@contember/database-tester": "2.1.0-alpha.23",
40
- "@contember/schema-definition": "2.1.0-alpha.23",
39
+ "@contember/database-tester": "2.1.0-alpha.25",
40
+ "@contember/schema-definition": "2.1.0-alpha.25",
41
41
  "@types/node": "^20.17.22",
42
42
  "graphql": "^16.9.0",
43
43
  "pg": "^8.12.0"
@@ -54,6 +54,7 @@ export type ExecutionContainerArgs = {
54
54
  systemSchema: string
55
55
  project: { slug: string }
56
56
  stage: { id: string; slug: string }
57
+ userInfo: { ipAddress: string | null; userAgent: string | null }
57
58
  }
58
59
 
59
60
  export interface ExecutionContainer {
@@ -79,7 +80,7 @@ export class ExecutionContainerFactory {
79
80
  return this.hooks.reduce((acc, cb) => cb(acc), builder)
80
81
  }
81
82
 
82
- createBuilderInternal({ permissions, identityVariables, identityId, db, schema, schemaMeta, systemSchema, stage, project, schemaDatabaseMetadata }: ExecutionContainerArgs) {
83
+ createBuilderInternal({ permissions, identityVariables, identityId, db, schema, schemaMeta, systemSchema, stage, project, schemaDatabaseMetadata, userInfo }: ExecutionContainerArgs) {
83
84
  return new Builder({})
84
85
  .addService('systemSchema', () =>
85
86
  systemSchema)
@@ -95,6 +96,8 @@ export class ExecutionContainerFactory {
95
96
  schemaMeta)
96
97
  .addService('schemaDatabaseMetadata', () =>
97
98
  schemaDatabaseMetadata)
99
+ .addService('userInfo', () =>
100
+ userInfo)
98
101
  .addService('providers', () =>
99
102
  this.providers)
100
103
  .addService('variableInjector', ({ schema }) =>
package/src/index.ts CHANGED
@@ -25,7 +25,8 @@ export {
25
25
  type ExecutionContainer,
26
26
  type ExecutionContainerBuilder,
27
27
  Path,
28
- WhereBuilder,
28
+ type WhereBuilder,
29
+ type JoinBuilder,
29
30
  PathFactory,
30
31
  ExecutionContainerFactory,
31
32
  type ExecutionContainerHook,
package/tests/src/test.ts CHANGED
@@ -113,6 +113,7 @@ export const execute = async (test: Test) => {
113
113
  stage: { id: '00000000-0000-0000-0000-000000000000', slug: 'live' },
114
114
  project: { slug: 'test' },
115
115
  schemaDatabaseMetadata: emptyDatabaseMetadata,
116
+ userInfo: { ipAddress: null, userAgent: null },
116
117
  }),
117
118
  timer: (label: any, cb: any) => cb(),
118
119
  },