@antelopejs/interface-database-catalog 0.0.1 → 0.0.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/README.md +8 -5
- package/docs/index.md +20 -1
- package/docs/tsconfig.json +13 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -47,14 +47,17 @@ Relations are named `"schema.name"`, the form `DescribeRelations` and `Profile`
|
|
|
47
47
|
|
|
48
48
|
## Documentation
|
|
49
49
|
|
|
50
|
-
- [Overview](
|
|
50
|
+
- [Overview and provider connections](./docs/index.md)
|
|
51
51
|
|
|
52
52
|
## Compatibility
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
Requires AntelopeJS core `>=1.14.0` and the following peer dependency:
|
|
55
|
+
|
|
56
|
+
<!-- docs-compat: ./package.json#peerDependencies -->
|
|
57
|
+
|
|
58
|
+
| Package | Range |
|
|
59
|
+
| ---------------------------- | ---------------- |
|
|
60
|
+
| `@antelopejs/interface-core` | `>=0.2.4 <1.0.0` |
|
|
58
61
|
|
|
59
62
|
## Contributing
|
|
60
63
|
|
package/docs/index.md
CHANGED
|
@@ -12,7 +12,26 @@ A module that implements `@antelopejs/interface-database` over a database it doe
|
|
|
12
12
|
},
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`GetInterfaceInstances`
|
|
15
|
+
`GetInterfaceInstances(interfaceID)` lists connections visible to the calling module. `GetInterfaceInstance(interfaceID, connectionID)` returns connection metadata, including its loadable `path`, or `undefined`; it does not return the catalog exports. Resolve the connection by package name and load its path using AntelopeJS's established CommonJS loader pattern:
|
|
16
|
+
|
|
17
|
+
```ts docs-check
|
|
18
|
+
import { GetInterfaceInstance } from "@antelopejs/interface-core";
|
|
19
|
+
|
|
20
|
+
export async function inspectErp() {
|
|
21
|
+
const connection = GetInterfaceInstance(
|
|
22
|
+
"@antelopejs/interface-database-catalog",
|
|
23
|
+
"erp",
|
|
24
|
+
);
|
|
25
|
+
if (!connection) throw new Error("Missing erp catalog connection");
|
|
26
|
+
|
|
27
|
+
const catalog: typeof import("@antelopejs/interface-database-catalog") = require(
|
|
28
|
+
connection.path,
|
|
29
|
+
);
|
|
30
|
+
return await catalog.ListRelations(["public"]);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Run this inside the consuming AntelopeJS module, with the provider loaded and the connection configured. A plain package import uses that module's default binding; loading `connection.path` selects the named binding. These calls do not create database connections themselves.
|
|
16
35
|
|
|
17
36
|
## Functions
|
|
18
37
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "..",
|
|
5
|
+
"noEmit": true,
|
|
6
|
+
"composite": false,
|
|
7
|
+
"incremental": false,
|
|
8
|
+
"paths": {
|
|
9
|
+
"@antelopejs/interface-database-catalog": ["../src/index.ts"]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"include": ["../src/**/*.ts", "./**/*.ts"]
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-database-catalog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "AntelopeJS interface for describing and profiling a connected database",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"knip": "knip"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@antelopejs/interface-core": ">=0.2.
|
|
47
|
-
"@antelopejs/tooling-configs": "^0.0.
|
|
46
|
+
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
47
|
+
"@antelopejs/tooling-configs": "^0.0.9",
|
|
48
48
|
"@types/node": "^22.19.15",
|
|
49
49
|
"knip": "^6.34.0",
|
|
50
50
|
"oxfmt": "^0.66.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"typescript": "^5.9.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@antelopejs/interface-core": ">=0.2.
|
|
59
|
+
"@antelopejs/interface-core": ">=0.2.4 <1.0.0"
|
|
60
60
|
},
|
|
61
61
|
"packageManager": "pnpm@10.6.5"
|
|
62
62
|
}
|