@duckcodeailabs/dql-project 0.1.0 → 0.1.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 +50 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# `@duckcodeailabs/dql-project`
|
|
2
|
+
|
|
3
|
+
Registry and project primitives for DQL blocks.
|
|
4
|
+
|
|
5
|
+
Use this package to store, search, version, and certify DQL blocks in memory or SQLite-backed registries.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @duckcodeailabs/dql-project
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { MemoryStorage, RegistryClient } from '@duckcodeailabs/dql-project';
|
|
17
|
+
|
|
18
|
+
const registry = new RegistryClient(new MemoryStorage());
|
|
19
|
+
|
|
20
|
+
await registry.register({
|
|
21
|
+
id: 'block_1',
|
|
22
|
+
name: 'revenue_by_segment',
|
|
23
|
+
domain: 'finance',
|
|
24
|
+
type: 'custom',
|
|
25
|
+
version: '1.0.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
gitRepo: 'github.com/acme/analytics',
|
|
28
|
+
gitPath: 'blocks/revenue_by_segment.dql',
|
|
29
|
+
gitCommitSha: 'abc123',
|
|
30
|
+
owner: 'analytics',
|
|
31
|
+
tags: ['finance'],
|
|
32
|
+
dependencies: [],
|
|
33
|
+
usedInCount: 0,
|
|
34
|
+
createdAt: new Date(),
|
|
35
|
+
updatedAt: new Date(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const block = await registry.getByName('revenue_by_segment');
|
|
39
|
+
console.log(block?.status);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Common Uses
|
|
43
|
+
|
|
44
|
+
- maintain a block registry for certification workflows
|
|
45
|
+
- build search and discovery features for reusable blocks
|
|
46
|
+
- track versions, ownership, and usage metadata
|
|
47
|
+
|
|
48
|
+
## Learn More
|
|
49
|
+
|
|
50
|
+
- Root docs: [`../../README.md`](../../README.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckcodeailabs/dql-project",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "DQL project and block registry primitives: block metadata, versions, sync, and storage adapters",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"better-sqlite3": "^11.7.0",
|
|
28
|
-
"@duckcodeailabs/dql-core": "0.1.
|
|
28
|
+
"@duckcodeailabs/dql-core": "0.1.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/better-sqlite3": "^7.6.0",
|