@antelopejs/dms 0.20.1 → 0.20.2
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/CHANGELOG.md +18 -0
- package/README.md +4 -4
- package/dist/implementations/dms-base/bulk-selection.js +1 -1
- package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
- package/dist/implementations/dms-base/footer-summary.js +1 -1
- package/dist/implementations/dms-base/footer-summary.js.map +1 -1
- package/dist/implementations/dms-base/search-route.d.ts +12 -3
- package/dist/implementations/dms-base/search-route.js +8 -4
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-base/table-view.js +38 -16
- package/dist/implementations/dms-base/table-view.js.map +1 -1
- package/dist/implementations/dms-builder/engine/database-access.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/database-access.js +14 -2
- package/dist/implementations/dms-builder/engine/database-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-packages.js +4 -21
- package/dist/implementations/dms-builder/engine/driver-packages.js.map +1 -1
- package/dist/implementations/dms-builder/engine/index.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/index.js +1 -0
- package/dist/implementations/dms-builder/engine/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-client.d.ts +4 -0
- package/dist/implementations/dms-builder/engine/probe-client.js +11 -2
- package/dist/implementations/dms-builder/engine/probe-client.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-mongodb.js +92 -36
- package/dist/implementations/dms-builder/engine/probe-mongodb.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-mysql.js +54 -1
- package/dist/implementations/dms-builder/engine/probe-mysql.js.map +1 -1
- package/dist/implementations/dms-builder/engine/probe-postgres.js +95 -11
- package/dist/implementations/dms-builder/engine/probe-postgres.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project-scaffold.d.ts +1 -8
- package/dist/implementations/dms-builder/engine/project-scaffold.js +37 -10
- package/dist/implementations/dms-builder/engine/project-scaffold.js.map +1 -1
- package/dist/implementations/dms-builder/engine/scram-bound.d.ts +5 -0
- package/dist/implementations/dms-builder/engine/scram-bound.js +60 -0
- package/dist/implementations/dms-builder/engine/scram-bound.js.map +1 -0
- package/dist/mcp/page-verify/page-probe.d.ts +12 -12
- package/frontend-vue/build/backend-boundary.ts +84 -79
- package/package.json +5 -3
|
@@ -34,14 +34,14 @@ declare const RectSchema: z.ZodObject<{
|
|
|
34
34
|
height: z.ZodNumber;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
y: number;
|
|
37
|
-
width: number;
|
|
38
37
|
x: number;
|
|
39
38
|
height: number;
|
|
39
|
+
width: number;
|
|
40
40
|
}, {
|
|
41
41
|
y: number;
|
|
42
|
-
width: number;
|
|
43
42
|
x: number;
|
|
44
43
|
height: number;
|
|
44
|
+
width: number;
|
|
45
45
|
}>;
|
|
46
46
|
export type PageRect = z.infer<typeof RectSchema>;
|
|
47
47
|
declare const ProbedBlockSchema: z.ZodObject<{
|
|
@@ -55,22 +55,22 @@ declare const ProbedBlockSchema: z.ZodObject<{
|
|
|
55
55
|
height: z.ZodNumber;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
y: number;
|
|
58
|
-
width: number;
|
|
59
58
|
x: number;
|
|
60
59
|
height: number;
|
|
60
|
+
width: number;
|
|
61
61
|
}, {
|
|
62
62
|
y: number;
|
|
63
|
-
width: number;
|
|
64
63
|
x: number;
|
|
65
64
|
height: number;
|
|
65
|
+
width: number;
|
|
66
66
|
}>>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
68
|
path: string;
|
|
69
69
|
rect: {
|
|
70
70
|
y: number;
|
|
71
|
-
width: number;
|
|
72
71
|
x: number;
|
|
73
72
|
height: number;
|
|
73
|
+
width: number;
|
|
74
74
|
} | null;
|
|
75
75
|
componentName?: string | undefined;
|
|
76
76
|
issue?: string | undefined;
|
|
@@ -78,9 +78,9 @@ declare const ProbedBlockSchema: z.ZodObject<{
|
|
|
78
78
|
path: string;
|
|
79
79
|
rect: {
|
|
80
80
|
y: number;
|
|
81
|
-
width: number;
|
|
82
81
|
x: number;
|
|
83
82
|
height: number;
|
|
83
|
+
width: number;
|
|
84
84
|
} | null;
|
|
85
85
|
componentName?: string | undefined;
|
|
86
86
|
issue?: string | undefined;
|
|
@@ -98,22 +98,22 @@ declare const ProbeSchema: z.ZodObject<{
|
|
|
98
98
|
height: z.ZodNumber;
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
y: number;
|
|
101
|
-
width: number;
|
|
102
101
|
x: number;
|
|
103
102
|
height: number;
|
|
103
|
+
width: number;
|
|
104
104
|
}, {
|
|
105
105
|
y: number;
|
|
106
|
-
width: number;
|
|
107
106
|
x: number;
|
|
108
107
|
height: number;
|
|
108
|
+
width: number;
|
|
109
109
|
}>>;
|
|
110
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
111
|
path: string;
|
|
112
112
|
rect: {
|
|
113
113
|
y: number;
|
|
114
|
-
width: number;
|
|
115
114
|
x: number;
|
|
116
115
|
height: number;
|
|
116
|
+
width: number;
|
|
117
117
|
} | null;
|
|
118
118
|
componentName?: string | undefined;
|
|
119
119
|
issue?: string | undefined;
|
|
@@ -121,9 +121,9 @@ declare const ProbeSchema: z.ZodObject<{
|
|
|
121
121
|
path: string;
|
|
122
122
|
rect: {
|
|
123
123
|
y: number;
|
|
124
|
-
width: number;
|
|
125
124
|
x: number;
|
|
126
125
|
height: number;
|
|
126
|
+
width: number;
|
|
127
127
|
} | null;
|
|
128
128
|
componentName?: string | undefined;
|
|
129
129
|
issue?: string | undefined;
|
|
@@ -148,9 +148,9 @@ declare const ProbeSchema: z.ZodObject<{
|
|
|
148
148
|
path: string;
|
|
149
149
|
rect: {
|
|
150
150
|
y: number;
|
|
151
|
-
width: number;
|
|
152
151
|
x: number;
|
|
153
152
|
height: number;
|
|
153
|
+
width: number;
|
|
154
154
|
} | null;
|
|
155
155
|
componentName?: string | undefined;
|
|
156
156
|
issue?: string | undefined;
|
|
@@ -167,9 +167,9 @@ declare const ProbeSchema: z.ZodObject<{
|
|
|
167
167
|
path: string;
|
|
168
168
|
rect: {
|
|
169
169
|
y: number;
|
|
170
|
-
width: number;
|
|
171
170
|
x: number;
|
|
172
171
|
height: number;
|
|
172
|
+
width: number;
|
|
173
173
|
} | null;
|
|
174
174
|
componentName?: string | undefined;
|
|
175
175
|
issue?: string | undefined;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { existsSync, readFileSync, realpathSync } from
|
|
2
|
-
import { dirname, isAbsolute, join, relative, sep } from
|
|
3
|
-
import type { DmsVitePluginEntry } from
|
|
1
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs'
|
|
2
|
+
import { dirname, isAbsolute, join, relative, sep } from 'node:path'
|
|
3
|
+
import type { DmsVitePluginEntry } from '#dms/frontend-build'
|
|
4
4
|
|
|
5
|
-
type VitePlugin = Extract<DmsVitePluginEntry, { name: string }
|
|
5
|
+
type VitePlugin = Extract<DmsVitePluginEntry, { name: string }>
|
|
6
6
|
|
|
7
|
-
const BACKEND_PACKAGE = "@antelopejs/dms"
|
|
8
|
-
const BACKEND_SOURCE =
|
|
9
|
-
const QUERY_OR_HASH = /[?#]
|
|
7
|
+
const BACKEND_PACKAGE = "@antelopejs/dms"
|
|
8
|
+
const BACKEND_SOURCE = 'src'
|
|
9
|
+
const QUERY_OR_HASH = /[?#].*$/
|
|
10
10
|
|
|
11
|
-
const backendRoots = new Map<string, string | null>()
|
|
11
|
+
const backendRoots = new Map<string, string | null>()
|
|
12
12
|
|
|
13
13
|
/** Whether a parsed manifest names its package. */
|
|
14
14
|
function isNamedManifest(value: unknown): value is { name: string } {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
return (
|
|
16
|
+
typeof value === 'object' &&
|
|
17
|
+
value !== null &&
|
|
18
|
+
'name' in value &&
|
|
19
|
+
typeof value.name === 'string'
|
|
20
|
+
)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** The package name a `package.json` declares, or `undefined`. */
|
|
24
24
|
function packageName(manifest: string): string | undefined {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
try {
|
|
26
|
+
const parsed: unknown = JSON.parse(readFileSync(manifest, 'utf8'))
|
|
27
|
+
return isNamedManifest(parsed) ? parsed.name : undefined
|
|
28
|
+
} catch {
|
|
29
|
+
return undefined
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** The directory of the backend package that holds `directory`, or null. */
|
|
34
34
|
function backendRoot(directory: string): string | null {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
const known = backendRoots.get(directory)
|
|
36
|
+
if (known !== undefined) {
|
|
37
|
+
return known
|
|
38
|
+
}
|
|
39
|
+
const manifest = join(directory, 'package.json')
|
|
40
|
+
const parent = dirname(directory)
|
|
41
|
+
let root: string | null = null
|
|
42
|
+
if (existsSync(manifest)) {
|
|
43
|
+
root = packageName(manifest) === BACKEND_PACKAGE ? directory : null
|
|
44
|
+
} else if (parent !== directory) {
|
|
45
|
+
root = backendRoot(parent)
|
|
46
|
+
}
|
|
47
|
+
backendRoots.set(directory, root)
|
|
48
|
+
return root
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -55,23 +55,28 @@ function backendRoot(directory: string): string | null {
|
|
|
55
55
|
* the build workspace. Virtual ids and ids that are not files are ignored.
|
|
56
56
|
*/
|
|
57
57
|
function backendSourceFile(id: string): string | undefined {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
58
|
+
const path = id.replace(QUERY_OR_HASH, '')
|
|
59
|
+
if (!isAbsolute(path)) {
|
|
60
|
+
return undefined
|
|
61
|
+
}
|
|
62
|
+
let real: string
|
|
63
|
+
try {
|
|
64
|
+
real = realpathSync(path)
|
|
65
|
+
} catch {
|
|
66
|
+
return undefined
|
|
67
|
+
}
|
|
68
|
+
const root = backendRoot(dirname(real))
|
|
69
|
+
if (root === null) {
|
|
70
|
+
return undefined
|
|
71
|
+
}
|
|
72
|
+
return relative(root, real).split(sep)[0] === BACKEND_SOURCE
|
|
73
|
+
? real
|
|
74
|
+
: undefined
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** `path` with `/` separators, the form Vite gives an importer, so a boundary error names both paths alike on every OS. */
|
|
78
|
+
function forwardSlashes(path: string): string {
|
|
79
|
+
return path.split(sep).join('/')
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
/**
|
|
@@ -87,36 +92,36 @@ function backendSourceFile(id: string): string | undefined {
|
|
|
87
92
|
* restores it on every run: change the plugin in the pack, not here.
|
|
88
93
|
*/
|
|
89
94
|
export function backendBoundary(): VitePlugin {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
return {
|
|
96
|
+
...boundaryCheck(),
|
|
97
|
+
config: () => ({ worker: { plugins: () => [boundaryCheck()] } }),
|
|
98
|
+
}
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
/** The check alone, as a worker build runs it. */
|
|
97
102
|
function boundaryCheck(): VitePlugin {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
103
|
+
return {
|
|
104
|
+
name: `${BACKEND_PACKAGE}:backend-boundary`,
|
|
105
|
+
enforce: 'pre',
|
|
106
|
+
async resolveId(source, importer, options) {
|
|
107
|
+
const resolved = await this.resolve(source, importer, {
|
|
108
|
+
...options,
|
|
109
|
+
skipSelf: true,
|
|
110
|
+
})
|
|
111
|
+
if (resolved === null) {
|
|
112
|
+
return resolved
|
|
113
|
+
}
|
|
114
|
+
const file = backendSourceFile(resolved.id)
|
|
115
|
+
if (file === undefined) {
|
|
116
|
+
return resolved
|
|
117
|
+
}
|
|
118
|
+
const from =
|
|
119
|
+
importer === undefined
|
|
120
|
+
? 'an entry point'
|
|
121
|
+
: forwardSlashes(importer.replace(QUERY_OR_HASH, ''))
|
|
122
|
+
return this.error(
|
|
123
|
+
`Backend boundary: ${from} imports ${forwardSlashes(file)}, which is under the src of ${BACKEND_PACKAGE}. The frontend reaches the backend only through its HTTP interface.`,
|
|
124
|
+
)
|
|
125
|
+
},
|
|
126
|
+
}
|
|
122
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "AntelopeJS DMS. Plug in your PostgreSQL, MySQL, MariaDB, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@antelopejs/api": "~1.7.0",
|
|
116
116
|
"@antelopejs/core": "~1.23.0",
|
|
117
|
-
"@antelopejs/tooling-configs": "
|
|
117
|
+
"@antelopejs/tooling-configs": ">=0.7.2 <0.8.0",
|
|
118
118
|
"@types/archiver": "^6.0.4",
|
|
119
119
|
"@types/chai": "^4.3.20",
|
|
120
120
|
"@types/jsdom": "^28.0.3",
|
|
@@ -129,12 +129,14 @@
|
|
|
129
129
|
"chai": "^4.5.0",
|
|
130
130
|
"knip": "^6.34.0",
|
|
131
131
|
"mongodb": "^7.1.1",
|
|
132
|
+
"mongodb-connection-string-url": "^7.0.1",
|
|
132
133
|
"mongodb-memory-server-core": "^11.0.1",
|
|
133
134
|
"mysql2": "^3.24.6",
|
|
134
135
|
"oxfmt": "^0.66.0",
|
|
135
136
|
"oxlint": "1.81.0",
|
|
136
137
|
"oxlint-tsgolint": "^7.0.2001",
|
|
137
138
|
"pg": "^8.22.0",
|
|
139
|
+
"pg-connection-string": "^2.14.1",
|
|
138
140
|
"release-it": "^19.2.4",
|
|
139
141
|
"release-it-changelogen": "^0.1.0",
|
|
140
142
|
"rethinkdb-ts": "^2.7.0",
|
|
@@ -173,7 +175,7 @@
|
|
|
173
175
|
"registry": "https://registry.npmjs.org/"
|
|
174
176
|
},
|
|
175
177
|
"optionalDependencies": {
|
|
176
|
-
"@antelopejs/interface-database-catalog": ">=0.0
|
|
178
|
+
"@antelopejs/interface-database-catalog": ">=0.1.0 <0.2.0",
|
|
177
179
|
"@antelopejs/interface-dms-automation": ">=0.7.0 <0.8.0",
|
|
178
180
|
"@antelopejs/interface-redis": ">=0.0.9 <0.1.0",
|
|
179
181
|
"playwright-core": "~1.65.0"
|