@contember/engine-http 2.1.0-beta.1 → 2.1.0-rc.1
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/development/src/content/ContentApiControllerFactory.cjs +2 -1
- package/dist/development/src/content/ContentApiControllerFactory.cjs.map +1 -1
- package/dist/development/src/content/ContentApiControllerFactory.js +2 -1
- package/dist/development/src/content/ContentApiControllerFactory.js.map +1 -1
- package/dist/development/src/content/ContentQueryHandlerFactory.cjs +2 -0
- package/dist/development/src/content/ContentQueryHandlerFactory.cjs.map +1 -1
- package/dist/development/src/content/ContentQueryHandlerFactory.js +2 -0
- package/dist/development/src/content/ContentQueryHandlerFactory.js.map +1 -1
- package/dist/development/src/content/GraphQlSchemaFactory.cjs +3 -3
- package/dist/development/src/content/GraphQlSchemaFactory.cjs.map +1 -1
- package/dist/development/src/content/GraphQlSchemaFactory.js +3 -3
- package/dist/development/src/content/GraphQlSchemaFactory.js.map +1 -1
- package/dist/development/src/content/triggeredActionsListener.cjs +18 -0
- package/dist/development/src/content/triggeredActionsListener.cjs.map +1 -0
- package/dist/development/src/content/triggeredActionsListener.js +18 -0
- package/dist/development/src/content/triggeredActionsListener.js.map +1 -0
- package/dist/development/src/prometheus/CustomMetric.cjs +17 -4
- package/dist/development/src/prometheus/CustomMetric.cjs.map +1 -1
- package/dist/development/src/prometheus/CustomMetric.js +17 -4
- package/dist/development/src/prometheus/CustomMetric.js.map +1 -1
- package/dist/development/src/transfer/ContentSchemaTransferMappingFactory.cjs +5 -2
- package/dist/development/src/transfer/ContentSchemaTransferMappingFactory.cjs.map +1 -1
- package/dist/development/src/transfer/ContentSchemaTransferMappingFactory.js +5 -2
- package/dist/development/src/transfer/ContentSchemaTransferMappingFactory.js.map +1 -1
- package/dist/development/src/transfer/ExportExecutor.cjs +5 -1
- package/dist/development/src/transfer/ExportExecutor.cjs.map +1 -1
- package/dist/development/src/transfer/ExportExecutor.js +5 -1
- package/dist/development/src/transfer/ExportExecutor.js.map +1 -1
- package/dist/development/src/transfer/ImportExecutor.cjs +48 -22
- package/dist/development/src/transfer/ImportExecutor.cjs.map +1 -1
- package/dist/development/src/transfer/ImportExecutor.js +48 -22
- package/dist/development/src/transfer/ImportExecutor.js.map +1 -1
- package/dist/production/src/content/ContentApiControllerFactory.cjs +2 -1
- package/dist/production/src/content/ContentApiControllerFactory.cjs.map +1 -1
- package/dist/production/src/content/ContentApiControllerFactory.js +2 -1
- package/dist/production/src/content/ContentApiControllerFactory.js.map +1 -1
- package/dist/production/src/content/ContentQueryHandlerFactory.cjs +2 -0
- package/dist/production/src/content/ContentQueryHandlerFactory.cjs.map +1 -1
- package/dist/production/src/content/ContentQueryHandlerFactory.js +2 -0
- package/dist/production/src/content/ContentQueryHandlerFactory.js.map +1 -1
- package/dist/production/src/content/GraphQlSchemaFactory.cjs +3 -3
- package/dist/production/src/content/GraphQlSchemaFactory.cjs.map +1 -1
- package/dist/production/src/content/GraphQlSchemaFactory.js +3 -3
- package/dist/production/src/content/GraphQlSchemaFactory.js.map +1 -1
- package/dist/production/src/content/triggeredActionsListener.cjs +18 -0
- package/dist/production/src/content/triggeredActionsListener.cjs.map +1 -0
- package/dist/production/src/content/triggeredActionsListener.js +18 -0
- package/dist/production/src/content/triggeredActionsListener.js.map +1 -0
- package/dist/production/src/prometheus/CustomMetric.cjs +17 -4
- package/dist/production/src/prometheus/CustomMetric.cjs.map +1 -1
- package/dist/production/src/prometheus/CustomMetric.js +17 -4
- package/dist/production/src/prometheus/CustomMetric.js.map +1 -1
- package/dist/production/src/transfer/ContentSchemaTransferMappingFactory.cjs +5 -2
- package/dist/production/src/transfer/ContentSchemaTransferMappingFactory.cjs.map +1 -1
- package/dist/production/src/transfer/ContentSchemaTransferMappingFactory.js +5 -2
- package/dist/production/src/transfer/ContentSchemaTransferMappingFactory.js.map +1 -1
- package/dist/production/src/transfer/ExportExecutor.cjs +5 -1
- package/dist/production/src/transfer/ExportExecutor.cjs.map +1 -1
- package/dist/production/src/transfer/ExportExecutor.js +5 -1
- package/dist/production/src/transfer/ExportExecutor.js.map +1 -1
- package/dist/production/src/transfer/ImportExecutor.cjs +48 -22
- package/dist/production/src/transfer/ImportExecutor.cjs.map +1 -1
- package/dist/production/src/transfer/ImportExecutor.js +48 -22
- package/dist/production/src/transfer/ImportExecutor.js.map +1 -1
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/content/ContentApiControllerFactory.d.ts.map +1 -1
- package/dist/types/content/ContentQueryHandlerFactory.d.ts.map +1 -1
- package/dist/types/content/GraphQlSchemaFactory.d.ts +1 -0
- package/dist/types/content/GraphQlSchemaFactory.d.ts.map +1 -1
- package/dist/types/content/triggeredActionsListener.d.ts +4 -0
- package/dist/types/content/triggeredActionsListener.d.ts.map +1 -0
- package/dist/types/prometheus/CustomMetric.d.ts +1 -0
- package/dist/types/prometheus/CustomMetric.d.ts.map +1 -1
- package/dist/types/transfer/ContentSchemaTransferMappingFactory.d.ts.map +1 -1
- package/dist/types/transfer/ExportExecutor.d.ts.map +1 -1
- package/dist/types/transfer/ImportExecutor.d.ts.map +1 -1
- package/dist/types/transfer/TransferMapping.d.ts +5 -1
- package/dist/types/transfer/TransferMapping.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -3
- package/src/content/ContentApiControllerFactory.ts +2 -1
- package/src/content/ContentQueryHandlerFactory.ts +2 -0
- package/src/content/GraphQlSchemaFactory.ts +4 -3
- package/src/content/triggeredActionsListener.ts +17 -0
- package/src/prometheus/CustomMetric.ts +18 -4
- package/src/transfer/ContentSchemaTransferMappingFactory.ts +3 -0
- package/src/transfer/ExportExecutor.ts +9 -1
- package/src/transfer/ImportExecutor.ts +51 -17
- package/src/transfer/TransferMapping.ts +10 -5
- package/tests/cases/unit/contentApiSpecificCache.tst.js +1 -1
- package/vitest.config.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/engine-http",
|
|
3
|
-
"version": "2.1.0-
|
|
3
|
+
"version": "2.1.0-rc.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/production/index.js",
|
|
6
6
|
"typings": "./dist/types/index.d.ts",
|
|
@@ -56,11 +56,9 @@
|
|
|
56
56
|
"ws": "^8.19.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/bcryptjs": "^3.0.0",
|
|
60
59
|
"@types/koa": "^2.15.0",
|
|
61
60
|
"@types/koa-bodyparser": "^4.3.13",
|
|
62
61
|
"@types/koa__cors": "^5.0.1",
|
|
63
|
-
"@types/lru-cache": "^7.10.10",
|
|
64
62
|
"@types/node": "^24.12.0",
|
|
65
63
|
"@types/ws": "^8.18.1",
|
|
66
64
|
"graphql": "^16.13.1"
|
|
@@ -80,7 +80,7 @@ export class ContentApiControllerFactory {
|
|
|
80
80
|
|
|
81
81
|
const projectRoles = memberships.map(it => it.role)
|
|
82
82
|
|
|
83
|
-
const { schema: graphQlSchema, permissions } = await timer(
|
|
83
|
+
const { schema: graphQlSchema, permissions, allPermissions } = await timer(
|
|
84
84
|
'GraphQLSchemaCreate',
|
|
85
85
|
() =>
|
|
86
86
|
this.graphQlSchemaFactory.create(schema, {
|
|
@@ -132,6 +132,7 @@ export class ContentApiControllerFactory {
|
|
|
132
132
|
schemaMeta: { id: schemaWithMeta.meta.id },
|
|
133
133
|
schemaDatabaseMetadata,
|
|
134
134
|
permissions,
|
|
135
|
+
allPermissions,
|
|
135
136
|
systemSchema: projectContainer.systemDatabaseContextFactory.schemaName,
|
|
136
137
|
stage,
|
|
137
138
|
project,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql'
|
|
2
2
|
import { createDbQueriesListener, createGraphQLQueryHandler, GraphQLListener, GraphQLQueryHandler } from '../graphql'
|
|
3
3
|
import { ContentGraphqlContext } from './ContentGraphqlContext'
|
|
4
|
+
import { createTriggeredActionsListener } from './triggeredActionsListener'
|
|
4
5
|
|
|
5
6
|
export type ContentQueryHandler = GraphQLQueryHandler<ContentGraphqlContext>
|
|
6
7
|
|
|
@@ -10,6 +11,7 @@ export class ContentQueryHandlerFactory {
|
|
|
10
11
|
public create(graphQlSchema: GraphQLSchema): ContentQueryHandler {
|
|
11
12
|
const listeners: GraphQLListener<ContentGraphqlContext>[] = []
|
|
12
13
|
listeners.push(createDbQueriesListener(context => context.db, this.debug))
|
|
14
|
+
listeners.push(createTriggeredActionsListener())
|
|
13
15
|
|
|
14
16
|
return createGraphQLQueryHandler<ContentGraphqlContext>({
|
|
15
17
|
schema: graphQlSchema,
|
|
@@ -16,6 +16,7 @@ import { ProjectConfig } from '../project/config'
|
|
|
16
16
|
|
|
17
17
|
export interface GraphQLSchemaFactoryResult {
|
|
18
18
|
permissions: Acl.Permissions
|
|
19
|
+
allPermissions?: Acl.Permissions
|
|
19
20
|
schema: GraphQLSchema
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -33,10 +34,10 @@ export class GraphQlSchemaFactory {
|
|
|
33
34
|
const cacheKey = `${rolesKey}\xff\xff${contributorsKey}`
|
|
34
35
|
|
|
35
36
|
return this.cache.fetch(schema, cacheKey, () => {
|
|
36
|
-
const permissions = this.permissionFactory.
|
|
37
|
+
const { root: permissions, all: allPermissions } = this.permissionFactory.createContextual(schema, identity.projectRoles)
|
|
37
38
|
|
|
38
39
|
const authorizator = new Authorizator(
|
|
39
|
-
|
|
40
|
+
allPermissions,
|
|
40
41
|
schema.acl.customPrimary ?? false,
|
|
41
42
|
Object.values(schema.acl.roles).some(it => it.content?.refreshMaterializedView),
|
|
42
43
|
)
|
|
@@ -83,7 +84,7 @@ export class GraphQlSchemaFactory {
|
|
|
83
84
|
types,
|
|
84
85
|
})
|
|
85
86
|
|
|
86
|
-
return { schema: graphQlSchema, permissions }
|
|
87
|
+
return { schema: graphQlSchema, permissions, allPermissions }
|
|
87
88
|
})
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GraphQLListener } from '../graphql'
|
|
2
|
+
import { ContentGraphqlContext } from './ContentGraphqlContext'
|
|
3
|
+
|
|
4
|
+
export const createTriggeredActionsListener = (): GraphQLListener<ContentGraphqlContext> => ({
|
|
5
|
+
onResponse: ({ response, context }) => {
|
|
6
|
+
const collector = context.executionContainer.triggeredActionsCollector
|
|
7
|
+
if (!collector) {
|
|
8
|
+
return
|
|
9
|
+
}
|
|
10
|
+
const events = collector.getEvents()
|
|
11
|
+
if (events.length === 0) {
|
|
12
|
+
return
|
|
13
|
+
}
|
|
14
|
+
response.extensions ??= {}
|
|
15
|
+
response.extensions.triggeredActions = { events: [...events] }
|
|
16
|
+
},
|
|
17
|
+
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type LabelValues<T extends string> = Partial<Record<T, string | number>>
|
|
2
2
|
|
|
3
3
|
export class CustomMetric<T extends string> {
|
|
4
|
-
private values
|
|
4
|
+
private values = new Map<string, { labels: LabelValues<T>; value: number }>()
|
|
5
5
|
|
|
6
6
|
constructor(
|
|
7
7
|
private readonly options: {
|
|
@@ -14,11 +14,17 @@ export class CustomMetric<T extends string> {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
reset() {
|
|
17
|
-
this.values
|
|
17
|
+
this.values.clear()
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
add(labels: LabelValues<T>, value: number) {
|
|
21
|
-
this.
|
|
21
|
+
const key = this.labelKey(labels)
|
|
22
|
+
const existing = this.values.get(key)
|
|
23
|
+
if (existing) {
|
|
24
|
+
existing.value += value
|
|
25
|
+
} else {
|
|
26
|
+
this.values.set(key, { labels, value })
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
get name() {
|
|
@@ -30,8 +36,16 @@ export class CustomMetric<T extends string> {
|
|
|
30
36
|
help: this.options.help,
|
|
31
37
|
name: this.options.name,
|
|
32
38
|
type: this.options.type,
|
|
33
|
-
values: this.values,
|
|
39
|
+
values: Array.from(this.values.values()),
|
|
34
40
|
aggregator: 'sum',
|
|
35
41
|
}
|
|
36
42
|
}
|
|
43
|
+
|
|
44
|
+
private labelKey(labels: LabelValues<T>): string {
|
|
45
|
+
const parts: string[] = []
|
|
46
|
+
for (const name of this.options.labelNames) {
|
|
47
|
+
parts.push(`${name}=${labels[name] ?? ''}`)
|
|
48
|
+
}
|
|
49
|
+
return parts.join('\x00')
|
|
50
|
+
}
|
|
37
51
|
}
|
|
@@ -40,12 +40,14 @@ export class ContentSchemaTransferMappingFactory {
|
|
|
40
40
|
type: column.type,
|
|
41
41
|
nullable: column.nullable,
|
|
42
42
|
values: schema.enums[column.columnType],
|
|
43
|
+
list: column.list,
|
|
43
44
|
}
|
|
44
45
|
} else if (column.type === Model.ColumnType.Int) {
|
|
45
46
|
return {
|
|
46
47
|
name: column.columnName,
|
|
47
48
|
type: column.type,
|
|
48
49
|
nullable: column.nullable,
|
|
50
|
+
list: column.list,
|
|
49
51
|
sequence: column.sequence !== undefined,
|
|
50
52
|
}
|
|
51
53
|
} else {
|
|
@@ -53,6 +55,7 @@ export class ContentSchemaTransferMappingFactory {
|
|
|
53
55
|
name: column.columnName,
|
|
54
56
|
type: column.type,
|
|
55
57
|
nullable: column.nullable,
|
|
58
|
+
list: column.list,
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
},
|
|
@@ -116,7 +116,15 @@ export class ExportExecutor {
|
|
|
116
116
|
let builder = db.selectBuilder().from(table.name)
|
|
117
117
|
|
|
118
118
|
for (const column of Object.values(table.columns)) {
|
|
119
|
-
if (
|
|
119
|
+
if (
|
|
120
|
+
column.list
|
|
121
|
+
&& (column.type === Model.ColumnType.Enum || column.type === Model.ColumnType.Json || column.type === Model.ColumnType.Date
|
|
122
|
+
|| column.type === Model.ColumnType.DateTime)
|
|
123
|
+
) {
|
|
124
|
+
builder = builder.select(expr => expr.raw(`${wrapIdentifier(column.name)}::text[]`))
|
|
125
|
+
} else if (column.list) {
|
|
126
|
+
builder = builder.select(column.name)
|
|
127
|
+
} else if (column.type === Model.ColumnType.Json || column.type === Model.ColumnType.Date || column.type === Model.ColumnType.DateTime) {
|
|
120
128
|
builder = builder.select(expr => expr.raw(`${wrapIdentifier(column.name)}::text`))
|
|
121
129
|
} else {
|
|
122
130
|
builder = builder.select(column.name)
|
|
@@ -10,7 +10,7 @@ import { SystemSchemaTransferMappingFactory } from './SystemSchemaTransferMappin
|
|
|
10
10
|
import { AuthResult, HttpErrorResponse } from '../common'
|
|
11
11
|
import { ProjectGroupContainer } from '../projectGroup/ProjectGroupContainer'
|
|
12
12
|
|
|
13
|
-
type Cell = boolean | number | string | null
|
|
13
|
+
type Cell = boolean | number | string | readonly string[] | readonly number[] | readonly boolean[] | null
|
|
14
14
|
type Row = readonly Cell[]
|
|
15
15
|
|
|
16
16
|
type InsertContext = {
|
|
@@ -25,6 +25,47 @@ type InsertContext = {
|
|
|
25
25
|
export class ImportError extends Error {
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
const parsePgTextArray = (value: string): string[] => {
|
|
29
|
+
if (value === '{}') return []
|
|
30
|
+
if (!value.startsWith('{') || !value.endsWith('}')) {
|
|
31
|
+
throw new ParseError([], `invalid PostgreSQL array literal: ${value}`)
|
|
32
|
+
}
|
|
33
|
+
const inner = value.slice(1, -1)
|
|
34
|
+
const result: string[] = []
|
|
35
|
+
let current = ''
|
|
36
|
+
let inQuotes = false
|
|
37
|
+
let escaped = false
|
|
38
|
+
for (const ch of inner) {
|
|
39
|
+
if (escaped) {
|
|
40
|
+
current += ch
|
|
41
|
+
escaped = false
|
|
42
|
+
} else if (ch === '\\') {
|
|
43
|
+
escaped = true
|
|
44
|
+
} else if (ch === '"') {
|
|
45
|
+
inQuotes = !inQuotes
|
|
46
|
+
} else if (ch === ',' && !inQuotes) {
|
|
47
|
+
result.push(current)
|
|
48
|
+
current = ''
|
|
49
|
+
} else {
|
|
50
|
+
current += ch
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
result.push(current)
|
|
54
|
+
return result
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const listType = <T extends Typesafe.Json>(arrayType: Typesafe.Type<T>): Typesafe.Type<T> => {
|
|
58
|
+
return (input: unknown, path: PropertyKey[] = []) => {
|
|
59
|
+
if (Array.isArray(input)) {
|
|
60
|
+
return arrayType(input, path)
|
|
61
|
+
}
|
|
62
|
+
if (typeof input === 'string' && input.startsWith('{')) {
|
|
63
|
+
return arrayType(parsePgTextArray(input), path)
|
|
64
|
+
}
|
|
65
|
+
return arrayType(input, path)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
28
69
|
type CommandProcessor<T extends CommandName> = (it: CommandIterator<T>) => Promise<CommandIterator | null>
|
|
29
70
|
type CommandProcessorMap<T extends CommandName> = { [N in CommandName]?: N extends T ? CommandProcessor<N> : undefined }
|
|
30
71
|
|
|
@@ -371,7 +412,7 @@ export class ImportExecutor {
|
|
|
371
412
|
|
|
372
413
|
private async buildRowParser(db: Client, tableMapping: TransferTableMapping, columns: DbColumnSchema[]): Promise<Typesafe.Type<readonly Cell[]>> {
|
|
373
414
|
const baseType = Typesafe.tuple(...columns.map(it => {
|
|
374
|
-
const base = this.buildColumnRuntimeType(it
|
|
415
|
+
const base = this.buildColumnRuntimeType(it)
|
|
375
416
|
return it.nullable ? Typesafe.nullable(base) : base
|
|
376
417
|
}))
|
|
377
418
|
|
|
@@ -382,28 +423,21 @@ export class ImportExecutor {
|
|
|
382
423
|
return await tableMapping.createRowParser(db, columns.map(it => it.name), baseType)
|
|
383
424
|
}
|
|
384
425
|
|
|
385
|
-
private buildColumnRuntimeType(
|
|
386
|
-
switch (
|
|
426
|
+
private buildColumnRuntimeType(column: DbColumnSchema): Typesafe.Type<Exclude<Cell, null>> {
|
|
427
|
+
switch (column.type) {
|
|
387
428
|
case Model.ColumnType.Uuid:
|
|
388
|
-
return Typesafe.string // TODO
|
|
389
429
|
case Model.ColumnType.String:
|
|
390
|
-
return Typesafe.string
|
|
391
|
-
case Model.ColumnType.Int:
|
|
392
|
-
return Typesafe.number // TODO
|
|
393
|
-
case Model.ColumnType.Double:
|
|
394
|
-
return Typesafe.number
|
|
395
|
-
case Model.ColumnType.Bool:
|
|
396
|
-
return Typesafe.boolean
|
|
397
430
|
case Model.ColumnType.Enum:
|
|
398
|
-
return Typesafe.string // TODO
|
|
399
431
|
case Model.ColumnType.DateTime:
|
|
400
|
-
return Typesafe.string // TODO
|
|
401
432
|
case Model.ColumnType.Time:
|
|
402
|
-
return Typesafe.string // TODO
|
|
403
433
|
case Model.ColumnType.Date:
|
|
404
|
-
return Typesafe.string // TODO
|
|
405
434
|
case Model.ColumnType.Json:
|
|
406
|
-
return Typesafe.string
|
|
435
|
+
return column.list ? listType(Typesafe.array(Typesafe.string)) : Typesafe.string
|
|
436
|
+
case Model.ColumnType.Int:
|
|
437
|
+
case Model.ColumnType.Double:
|
|
438
|
+
return column.list ? listType(Typesafe.array(Typesafe.number)) : Typesafe.number
|
|
439
|
+
case Model.ColumnType.Bool:
|
|
440
|
+
return column.list ? listType(Typesafe.array(Typesafe.boolean)) : Typesafe.boolean
|
|
407
441
|
}
|
|
408
442
|
}
|
|
409
443
|
}
|
|
@@ -2,7 +2,7 @@ import { Model } from '@contember/schema'
|
|
|
2
2
|
import * as Typesafe from '@contember/typesafe'
|
|
3
3
|
import { Client, Literal } from '@contember/database'
|
|
4
4
|
|
|
5
|
-
type Cell = boolean | number | string | null
|
|
5
|
+
type Cell = boolean | number | string | readonly string[] | readonly number[] | readonly boolean[] | null
|
|
6
6
|
|
|
7
7
|
export type TransferMapping = { tables: TransferTableMappingMap }
|
|
8
8
|
|
|
@@ -18,7 +18,12 @@ export type TransferTableMapping = {
|
|
|
18
18
|
|
|
19
19
|
export type DbColumnSchemaMap = Record<string, DbColumnSchema>
|
|
20
20
|
export type DbColumnSchema =
|
|
21
|
-
| {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
| {
|
|
22
|
+
name: string
|
|
23
|
+
nullable?: boolean
|
|
24
|
+
list?: boolean
|
|
25
|
+
type: Exclude<Model.ColumnType, Model.ColumnType.Enum | Model.ColumnType.Json | Model.ColumnType.Int>
|
|
26
|
+
}
|
|
27
|
+
| { name: string; nullable?: boolean; list?: boolean; type: Model.ColumnType.Int; sequence?: boolean }
|
|
28
|
+
| { name: string; nullable?: boolean; list?: boolean; type: Model.ColumnType.Json; schema?: Typesafe.Type }
|
|
29
|
+
| { name: string; nullable?: boolean; list?: boolean; type: Model.ColumnType.Enum; values: readonly string[] }
|
|
@@ -2,7 +2,7 @@ import * as assert from 'node:assert'
|
|
|
2
2
|
import { ContentApiSpecificCache } from '../../../dist/production/content/ContentApiSpecificCache.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Probably not possible to pass --expose-gc through
|
|
5
|
+
* Probably not possible to pass --expose-gc through bun test (--expose-gc cannot be in NODE_OPTIONS)
|
|
6
6
|
*/
|
|
7
7
|
(async () => {
|
|
8
8
|
if (!global.gc) {
|
package/vitest.config.ts
DELETED