@antelopejs/dms-database 0.3.0 → 0.4.0
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/README.md +19 -7
- package/dist/automation/index.js.map +1 -1
- package/dist/automation/tableWatch.d.ts +3 -2
- package/dist/automation/tableWatch.js +9 -6
- package/dist/automation/tableWatch.js.map +1 -1
- package/dist/db/tables/query_history.table.d.ts +2 -1
- package/dist/db/tables/query_history.table.js.map +1 -1
- package/dist/db/tables/saved_queries.table.d.ts +2 -1
- package/dist/db/tables/saved_queries.table.js.map +1 -1
- package/dist/i18n/messages.js.map +1 -1
- package/dist/module.js +5 -1
- package/dist/module.js.map +1 -1
- package/dist/pages/schemas.js.map +1 -1
- package/dist/routes/data.d.ts +1 -1
- package/dist/routes/data.js +36 -237
- package/dist/routes/data.js.map +1 -1
- package/dist/routes/diagram.js +61 -42
- package/dist/routes/diagram.js.map +1 -1
- package/dist/routes/query.js +44 -46
- package/dist/routes/query.js.map +1 -1
- package/dist/routes/tables.js +13 -7
- package/dist/routes/tables.js.map +1 -1
- package/dist/service/browse.d.ts +37 -0
- package/dist/service/browse.js +135 -0
- package/dist/service/browse.js.map +1 -0
- package/dist/service/fieldDescriptor.d.ts +6 -6
- package/dist/service/fieldDescriptor.js +9 -13
- package/dist/service/fieldDescriptor.js.map +1 -1
- package/dist/service/health.js.map +1 -1
- package/dist/service/introspect.js +13 -12
- package/dist/service/introspect.js.map +1 -1
- package/dist/service/overview.js.map +1 -1
- package/dist/service/queryInspection.d.ts +4 -3
- package/dist/service/queryInspection.js +25 -24
- package/dist/service/queryInspection.js.map +1 -1
- package/dist/service/references.js +2 -6
- package/dist/service/references.js.map +1 -1
- package/dist/service/rowEdit.d.ts +2 -0
- package/dist/service/rowEdit.js +81 -0
- package/dist/service/rowEdit.js.map +1 -0
- package/dist/service/schemaFilters.d.ts +1 -1
- package/dist/service/schemaFilters.js.map +1 -1
- package/dist/service/schemaRegistry.js.map +1 -1
- package/dist/service/stagedSerialization.d.ts +7 -6
- package/dist/service/stagedSerialization.js +29 -21
- package/dist/service/stagedSerialization.js.map +1 -1
- package/dist/types/json.d.ts +8 -0
- package/dist/types/json.js +32 -0
- package/dist/types/json.js.map +1 -0
- package/dist/utils/guards.d.ts +7 -0
- package/dist/utils/guards.js +31 -0
- package/dist/utils/guards.js.map +1 -0
- package/dist/utils/query.d.ts +6 -7
- package/dist/utils/query.js +13 -24
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/requestValidation.d.ts +1 -2
- package/dist/utils/requestValidation.js +4 -9
- package/dist/utils/requestValidation.js.map +1 -1
- package/frontend-vue/app/build/components/DataGridEmpty.vue +89 -0
- package/frontend-vue/app/build/components/DataGridFooter.vue +113 -0
- package/frontend-vue/app/build/components/DataGridReadOnlyBanner.vue +50 -0
- package/frontend-vue/app/build/components/DataGridSaveStatus.vue +73 -0
- package/frontend-vue/app/build/components/DataGridToolbar.vue +72 -0
- package/frontend-vue/app/build/components/DiagramLegend.vue +48 -0
- package/frontend-vue/app/build/components/DiagramSearchBar.vue +82 -0
- package/frontend-vue/app/build/components/DiagramStatusBar.vue +89 -0
- package/frontend-vue/app/build/components/DiagramToolbar.vue +102 -0
- package/frontend-vue/app/build/components/DiagramViewBar.vue +103 -0
- package/frontend-vue/app/build/components/diagramFloat.css +21 -0
- package/frontend-vue/app/build/composables/useDiagramDrag.ts +84 -0
- package/frontend-vue/app/build/composables/useDiagramNotes.ts +146 -0
- package/frontend-vue/app/build/composables/useDiagramSaveStatus.ts +50 -0
- package/frontend-vue/app/build/composables/useDiagramSearch.ts +77 -0
- package/frontend-vue/app/build/composables/useDiagramView.ts +125 -0
- package/frontend-vue/app/build/composables/useElsewhereInstances.ts +94 -0
- package/frontend-vue/app/build/composables/useTableSample.ts +176 -0
- package/frontend-vue/app/build/data/gridData.ts +66 -0
- package/frontend-vue/app/build/data/useStagedSave.ts +13 -20
- package/frontend-vue/app/build/diagram/autosave.ts +3 -3
- package/frontend-vue/app/build/diagram/graph.ts +67 -485
- package/frontend-vue/app/build/diagram/graphModel.ts +368 -0
- package/frontend-vue/app/build/diagram/layout.ts +135 -0
- package/frontend-vue/app/build/query/failures.ts +17 -0
- package/frontend-vue/app/components/DataGrid.vue +64 -358
- package/frontend-vue/app/components/QueryConsole.vue +27 -116
- package/frontend-vue/app/components/SchemaDiagram.vue +118 -678
- package/frontend-vue/app/components/TableInspector.vue +12 -136
- package/frontend-vue/build/backend-boundary.ts +122 -0
- package/frontend-vue/dms.frontend.build.ts +6 -0
- package/frontend-vue/package.json +3 -2
- package/frontend-vue/pnpm-lock.yaml +8 -5
- package/frontend-vue/tests/apiErrorPresentation.test.ts +83 -0
- package/frontend-vue/tests/backend-boundary.test.ts +134 -0
- package/frontend-vue/tests/clientNavigation.test.ts +5 -7
- package/frontend-vue/tests/fixtures/serverRender.ts +13 -1
- package/frontend-vue/tests/locales.test.ts +16 -89
- package/frontend-vue/tests/queryConsole.test.ts +20 -0
- package/frontend-vue/tests/registration.test.ts +0 -18
- package/frontend-vue/vitest.config.ts +5 -2
- package/package.json +23 -12
- package/skills/dms-database/SKILL.md +1 -1
- package/skills/dms-database/cases.json +48 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { readdirSync, readFileSync } from 'node:fs'
|
|
2
|
-
import { join } from 'node:path'
|
|
3
1
|
import { baseCompile } from '@intlify/message-compiler'
|
|
4
2
|
import { describe, expect, it } from 'vitest'
|
|
5
3
|
|
|
@@ -7,10 +5,13 @@ import { describe, expect, it } from 'vitest'
|
|
|
7
5
|
// `}` or `|` then fails at runtime, on the page that shows it (S-1). Compile
|
|
8
6
|
// every message of every locale here instead; literals go through `{'@'}`.
|
|
9
7
|
|
|
10
|
-
const LOCALES_DIR = join(import.meta.dirname, '../i18n/locales')
|
|
11
|
-
|
|
12
8
|
type Messages = { [key: string]: string | Messages }
|
|
13
9
|
|
|
10
|
+
const locales = import.meta.glob<Messages>('../i18n/locales/*.json', {
|
|
11
|
+
eager: true,
|
|
12
|
+
import: 'default',
|
|
13
|
+
})
|
|
14
|
+
|
|
14
15
|
function leaves(messages: Messages, prefix = ''): [string, string][] {
|
|
15
16
|
return Object.entries(messages).flatMap(([key, value]) => {
|
|
16
17
|
const path = prefix ? `${prefix}.${key}` : key
|
|
@@ -27,23 +28,21 @@ function compileErrors(message: string): string[] {
|
|
|
27
28
|
return errors
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
const files = readdirSync(LOCALES_DIR).filter((file) => file.endsWith('.json'))
|
|
31
|
-
|
|
32
31
|
describe('locale messages', () => {
|
|
33
32
|
it('finds the locale files', () => {
|
|
34
|
-
expect(
|
|
33
|
+
expect(Object.keys(locales).length).toBeGreaterThan(0)
|
|
35
34
|
})
|
|
36
35
|
|
|
37
|
-
it.each(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
it.each(Object.entries(locales))(
|
|
37
|
+
'compiles every message of %s',
|
|
38
|
+
(_file, messages) => {
|
|
39
|
+
const failures = leaves(messages)
|
|
40
|
+
.map(([key, message]) => ({ key, errors: compileErrors(message) }))
|
|
41
|
+
.filter((entry) => entry.errors.length > 0)
|
|
42
|
+
.map((entry) => `${entry.key}: ${entry.errors.join(', ')}`)
|
|
43
|
+
expect(failures).toEqual([])
|
|
44
|
+
},
|
|
45
|
+
)
|
|
47
46
|
|
|
48
47
|
it('reports an unescaped linked-message sign', () => {
|
|
49
48
|
expect(compileErrors('declares tables with @RegisterTable.')).not.toEqual(
|
|
@@ -54,75 +53,3 @@ describe('locale messages', () => {
|
|
|
54
53
|
)
|
|
55
54
|
})
|
|
56
55
|
})
|
|
57
|
-
|
|
58
|
-
// `<i18n-t>` looks for its component's own messages first; the module's
|
|
59
|
-
// components have none, and vue-i18n warns on each page that renders one
|
|
60
|
-
// ("Not found parent scope"). The module's messages are global: say so.
|
|
61
|
-
const COMPONENTS_DIR = join(import.meta.dirname, '../app')
|
|
62
|
-
|
|
63
|
-
function vueFiles(dir: string): string[] {
|
|
64
|
-
return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
|
|
65
|
-
const path = join(dir, entry.name)
|
|
66
|
-
if (entry.isDirectory()) return vueFiles(path)
|
|
67
|
-
return entry.name.endsWith('.vue') ? [path] : []
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
describe('translated templates', () => {
|
|
72
|
-
it('reads every <i18n-t> from the global messages', () => {
|
|
73
|
-
const unscoped = vueFiles(COMPONENTS_DIR).flatMap((file) =>
|
|
74
|
-
(readFileSync(file, 'utf8').match(/<i18n-t\b[^>]*>/g) ?? [])
|
|
75
|
-
.filter((tag) => !/\sscope="global"/.test(tag))
|
|
76
|
-
.map((tag) => `${file.slice(COMPONENTS_DIR.length)}: ${tag}`),
|
|
77
|
-
)
|
|
78
|
-
expect(unscoped).toEqual([])
|
|
79
|
-
})
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
// The backend pages name their texts by key: a key left behind in a page, or
|
|
83
|
-
// a page block whose keys were dropped, shows the raw `$dms_database...` path.
|
|
84
|
-
const PAGES_DIR = join(import.meta.dirname, '../../src/pages')
|
|
85
|
-
|
|
86
|
-
function resolves(messages: Messages, key: string): boolean {
|
|
87
|
-
let node: string | Messages | undefined = messages
|
|
88
|
-
for (const part of key.split('.')) {
|
|
89
|
-
if (typeof node !== 'object') return false
|
|
90
|
-
node = node[part]
|
|
91
|
-
}
|
|
92
|
-
return typeof node === 'string'
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
describe('page texts', () => {
|
|
96
|
-
const pageKeys = readdirSync(PAGES_DIR)
|
|
97
|
-
.filter((file) => file.endsWith('.ts'))
|
|
98
|
-
.flatMap((file) => [
|
|
99
|
-
...readFileSync(join(PAGES_DIR, file), 'utf8').matchAll(
|
|
100
|
-
/"\$(dms_database\.[\w.]+)"/g,
|
|
101
|
-
),
|
|
102
|
-
])
|
|
103
|
-
.map(([, key]) => key)
|
|
104
|
-
|
|
105
|
-
it('finds the keys of the pages', () => {
|
|
106
|
-
expect(pageKeys.length).toBeGreaterThan(0)
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
it.each(files)('translates every key the pages name in %s', (file) => {
|
|
110
|
-
const messages = JSON.parse(
|
|
111
|
-
readFileSync(join(LOCALES_DIR, file), 'utf8'),
|
|
112
|
-
) as Messages
|
|
113
|
-
expect(pageKeys.filter((key) => !resolves(messages, key))).toEqual([])
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
it('shows no beta notice on the overview', () => {
|
|
117
|
-
const overview = readFileSync(join(PAGES_DIR, 'overview.ts'), 'utf8')
|
|
118
|
-
expect(overview).not.toMatch(/\bBanner\(/)
|
|
119
|
-
for (const file of files) {
|
|
120
|
-
const messages = JSON.parse(
|
|
121
|
-
readFileSync(join(LOCALES_DIR, file), 'utf8'),
|
|
122
|
-
) as Messages
|
|
123
|
-
expect(resolves(messages, 'dms_database.overview.beta.title')).toBe(
|
|
124
|
-
false,
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
})
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
QUERY_METHODS,
|
|
12
12
|
} from '../app/build/query/completion'
|
|
13
13
|
import { latestOrderField } from '../app/build/query/examples'
|
|
14
|
+
import { sqlFailure } from '../app/build/query/failures'
|
|
14
15
|
import {
|
|
15
16
|
closestName,
|
|
16
17
|
replaceName,
|
|
@@ -94,6 +95,25 @@ describe('unknown names', () => {
|
|
|
94
95
|
})
|
|
95
96
|
|
|
96
97
|
describe('query runtime errors', () => {
|
|
98
|
+
it('keeps SQL diagnostics inline but leaves transport failures to the presenter', () => {
|
|
99
|
+
expect(
|
|
100
|
+
sqlFailure({
|
|
101
|
+
statusCode: 400,
|
|
102
|
+
data: { message: 'Unknown table "oders"', durationMs: 7 },
|
|
103
|
+
}),
|
|
104
|
+
).toEqual({ message: 'Unknown table "oders"', durationMs: 7 })
|
|
105
|
+
expect(
|
|
106
|
+
sqlFailure({ statusCode: 400, data: 'Cannot measure this mutation' }),
|
|
107
|
+
).toEqual({ message: 'Cannot measure this mutation', durationMs: null })
|
|
108
|
+
expect(
|
|
109
|
+
sqlFailure({
|
|
110
|
+
statusCode: 403,
|
|
111
|
+
data: { message: 'error.read_only_demo', severity: 'warning' },
|
|
112
|
+
}),
|
|
113
|
+
).toBeNull()
|
|
114
|
+
expect(sqlFailure(new Error('Network error'))).toBeNull()
|
|
115
|
+
})
|
|
116
|
+
|
|
97
117
|
it('names an unknown schema', () => {
|
|
98
118
|
let error: unknown
|
|
99
119
|
try {
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { expect, it, vi } from 'vitest'
|
|
2
|
-
import { readFileSync } from 'node:fs'
|
|
3
2
|
import frontendModule from '../dms.frontend'
|
|
4
3
|
|
|
5
|
-
function source(path: string): string {
|
|
6
|
-
return readFileSync(new URL(path, import.meta.url), 'utf8')
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
it('registers every component under the module prefix the backend names', async () => {
|
|
10
5
|
const registerComponent = vi.fn()
|
|
11
6
|
const registerPage = vi.fn()
|
|
@@ -37,16 +32,3 @@ it('registers every component under the module prefix the backend names', async
|
|
|
37
32
|
expect(names.every((name) => !name.startsWith('Dms'))).toBe(true)
|
|
38
33
|
expect(new Set(names).size).toBe(names.length)
|
|
39
34
|
})
|
|
40
|
-
|
|
41
|
-
it('names every custom component the backend pages render', () => {
|
|
42
|
-
const backend = ['overview', 'schemas', 'diagram', 'data', 'query']
|
|
43
|
-
.map((page) => source(`../../src/pages/${page}.ts`))
|
|
44
|
-
.join('\n')
|
|
45
|
-
const named = [
|
|
46
|
-
...backend.matchAll(/CustomComponent\("DmsDatabase(\w+)"\)/g),
|
|
47
|
-
].map(([, name]) => name)
|
|
48
|
-
expect(named.length).toBeGreaterThan(0)
|
|
49
|
-
for (const name of named) {
|
|
50
|
-
expect(() => source(`../app/components/${name}.vue`)).not.toThrow()
|
|
51
|
-
}
|
|
52
|
-
})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
2
|
import vue from '@vitejs/plugin-vue'
|
|
3
3
|
import { defineConfig } from 'vitest/config'
|
|
4
|
+
import { backendBoundary } from './build/backend-boundary.ts'
|
|
4
5
|
|
|
5
6
|
// The renderer and the DMS core layer the server-render tests run on: the
|
|
6
7
|
// ones the repository installs at its root (`@antelopejs/dms-frontend`,
|
|
@@ -8,7 +9,7 @@ import { defineConfig } from 'vitest/config'
|
|
|
8
9
|
const root = resolve(__dirname, '..', 'node_modules', '@antelopejs')
|
|
9
10
|
|
|
10
11
|
export default defineConfig({
|
|
11
|
-
plugins: [vue()],
|
|
12
|
+
plugins: [vue(), backendBoundary()],
|
|
12
13
|
resolve: {
|
|
13
14
|
alias: {
|
|
14
15
|
'#dms/frontend-module': resolve(
|
|
@@ -31,6 +32,8 @@ export default defineConfig({
|
|
|
31
32
|
// Still Node, but the components compiled for a browser (a client
|
|
32
33
|
// `render`, not the server's `ssrRender`): what a client navigation
|
|
33
34
|
// mounts.
|
|
34
|
-
testTransformMode: {
|
|
35
|
+
testTransformMode: {
|
|
36
|
+
web: ['**/clientNavigation.test.ts', '**/apiErrorPresentation.test.ts'],
|
|
37
|
+
},
|
|
35
38
|
},
|
|
36
39
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Database console for the AntelopeJS DMS: schemas, relation diagrams, a data browser and an AQL query console.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"admin",
|
|
@@ -45,38 +45,49 @@
|
|
|
45
45
|
"dev:frontend": "pnpm frontend:dev",
|
|
46
46
|
"dev": "ajs project run -w -p playground",
|
|
47
47
|
"generate": "ajs module exports generate",
|
|
48
|
-
"lint:fix": "oxlint --fix
|
|
49
|
-
"lint": "oxlint &&
|
|
48
|
+
"lint:fix": "oxlint --fix && oxfmt . && pnpm --dir frontend-vue lint:fix",
|
|
49
|
+
"lint": "oxlint && pnpm --dir frontend-vue lint && node scripts/check-sources.mts && antelopejs-check-interface-ranges && node node_modules/@antelopejs/dms/frontend-vue/scripts/check-api-error-presentation.mjs frontend-vue/app",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"format": "oxfmt . && pnpm --dir frontend-vue format",
|
|
52
52
|
"frontend:dev": "cd playground && pnpm frontend:dev",
|
|
53
|
-
"test": "([ -n \"$DMS_PREBUILT\" ] || pnpm run build) && ajs module test .",
|
|
53
|
+
"test": "([ -n \"$DMS_PREBUILT\" ] || pnpm run build) && DMS_PREBUILT=1 ajs module test .",
|
|
54
54
|
"release": "pnpm --dir frontend-vue install --frozen-lockfile && release-it",
|
|
55
55
|
"prepack": "pnpm run build",
|
|
56
56
|
"knip": "knip --dependencies",
|
|
57
57
|
"knip:all": "knip",
|
|
58
58
|
"test:layer": "pnpm --dir frontend-vue test",
|
|
59
|
-
"test:frontend": "ajs dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue"
|
|
59
|
+
"test:frontend": "ajs dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
|
|
60
|
+
"prepare": "if git rev-parse --is-inside-work-tree >/dev/null 2>&1 && command -v lefthook >/dev/null 2>&1; then lefthook install; fi",
|
|
61
|
+
"checks": "antelopejs-checks",
|
|
62
|
+
"size": "antelopejs-check-size",
|
|
63
|
+
"ratchet": "antelopejs-ratchet",
|
|
64
|
+
"sync": "antelopejs-sync",
|
|
65
|
+
"ratchet:update": "antelopejs-ratchet --update",
|
|
66
|
+
"sync:check": "antelopejs-sync --check",
|
|
67
|
+
"format:check": "oxfmt --check .",
|
|
68
|
+
"suppressions": "antelopejs-suppressions",
|
|
69
|
+
"suppressions:update": "antelopejs-suppressions --update"
|
|
60
70
|
},
|
|
61
71
|
"dependencies": {
|
|
62
72
|
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
63
73
|
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
64
74
|
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
65
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
66
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
67
|
-
"@antelopejs/interface-dms": ">=0.
|
|
75
|
+
"@antelopejs/interface-database": ">=0.1.11 <1.0.0",
|
|
76
|
+
"@antelopejs/interface-database-decorators": ">=0.1.10 <1.0.0",
|
|
77
|
+
"@antelopejs/interface-dms": ">=0.9.0 <1.0.0"
|
|
68
78
|
},
|
|
69
79
|
"devDependencies": {
|
|
70
|
-
"@antelopejs/core": ">=1.17.
|
|
71
|
-
"@antelopejs/dms": ">=0.
|
|
72
|
-
"@antelopejs/dms-frontend": ">=0.
|
|
73
|
-
"@antelopejs/tooling-configs": "
|
|
80
|
+
"@antelopejs/core": ">=1.17.1 <2",
|
|
81
|
+
"@antelopejs/dms": ">=0.13.1 <1.0.0",
|
|
82
|
+
"@antelopejs/dms-frontend": ">=0.9.1 <0.10.0",
|
|
83
|
+
"@antelopejs/tooling-configs": "^0.2.17",
|
|
74
84
|
"@types/chai": "^5.2.3",
|
|
75
85
|
"@types/mocha": "^10.0.10",
|
|
76
86
|
"@types/node": "^24.0.0",
|
|
77
87
|
"@types/semver": "^7.8.0",
|
|
78
88
|
"chai": "^6.2.2",
|
|
79
89
|
"knip": "^6.34.0",
|
|
90
|
+
"lefthook": "^2.2.2",
|
|
80
91
|
"mocha": "^12.0.0",
|
|
81
92
|
"mongodb-memory-server-core": "^11.2.0",
|
|
82
93
|
"oxfmt": "^0.66.0",
|
|
@@ -18,7 +18,7 @@ A read-mostly database console for the platform owner. It has no API for other m
|
|
|
18
18
|
|
|
19
19
|
## Config (`antelope.config.ts`, all optional)
|
|
20
20
|
|
|
21
|
-
-
|
|
21
|
+
- It needs `@antelopejs/dms` 0.11 (`interface-dms` 0.9) and `@antelopejs/dms-frontend` 0.9; 0.3 is the DMS 0.10 line.
|
|
22
22
|
|
|
23
23
|
- `driverLabel: "MongoDB 8.0"`: the database name on the Overview (the interface cannot discover it).
|
|
24
24
|
- `schemaLabels: { "<schemaId or glob*>": { label, color?: Tone } }`: badges; built-in patterns cover `app*`, `core*`, `global*`, `staging*`, `review*`, `prod*`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"id": "database-aql-console",
|
|
6
|
+
"area": "modules",
|
|
7
|
+
"style": "clean",
|
|
8
|
+
"prompt": "Run an AQL query on the orders table from the dashboard.",
|
|
9
|
+
"expect": {
|
|
10
|
+
"skills": ["dms-database"],
|
|
11
|
+
"acceptable": ["database-interface", "dms"]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "dms-database-missing-table-casual",
|
|
16
|
+
"area": "modules",
|
|
17
|
+
"style": "casual",
|
|
18
|
+
"prompt": "my new table is missing from the dms database console",
|
|
19
|
+
"expect": {
|
|
20
|
+
"skills": ["dms-database"],
|
|
21
|
+
"acceptable": ["dms", "database-decorators-interface"],
|
|
22
|
+
"mustMention": ["RegisterSchema", "RegisterTable"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "dms-database-table-watch",
|
|
27
|
+
"area": "modules",
|
|
28
|
+
"style": "clean",
|
|
29
|
+
"prompt": "Run an automation procedure whenever a row is inserted into the orders table of the shop schema. Which trigger type do I pick, and what does it require from the database? Keep it short, no project config.",
|
|
30
|
+
"expect": {
|
|
31
|
+
"skills": ["dms-database"],
|
|
32
|
+
"acceptable": ["dms-automation", "dms"],
|
|
33
|
+
"mustMention": ["database.table-watch"]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "dms-database-not-aql-code",
|
|
38
|
+
"area": "modules",
|
|
39
|
+
"style": "clean",
|
|
40
|
+
"prompt": "In my module code, how do I write a chainable AQL query that joins orders to customers and sums the totals?",
|
|
41
|
+
"expect": {
|
|
42
|
+
"skills": ["database-interface"],
|
|
43
|
+
"acceptable": ["database-decorators-interface"],
|
|
44
|
+
"avoid": ["dms-database"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|