@unified-product-graph/core 0.6.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/CHANGELOG.md +699 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/index.cjs +23719 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +20001 -0
- package/dist/index.d.ts +20001 -0
- package/dist/index.js +23527 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
- package/spec/UPG-MARKDOWN-v0.1.md +437 -0
- package/spec/examples/cms-field-guide.upg +290 -0
- package/spec/examples/enterprise-pilot-results.upg.md +107 -0
- package/spec/examples/enterprise-pilot.upg +375 -0
- package/spec/examples/feature-decision.upg.md +61 -0
- package/spec/examples/metric-tracking.upg.md +75 -0
- package/spec/examples/persona-minimal.upg.md +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arkheiev UG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @unified-product-graph/core
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
The TypeScript core for the **Unified Product Graph (UPG)** — an open specification that gives product tools a shared vocabulary for entities, edges, and frameworks.
|
|
6
|
+
|
|
7
|
+
312 entity types across 36 domains. 938 typed edges. 34 canonical framework definitions, with more added as each is reviewed.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @unified-product-graph/core
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
type UPGDocument,
|
|
20
|
+
validateUPGDocument,
|
|
21
|
+
isUPGDocument,
|
|
22
|
+
UPG_VERSION,
|
|
23
|
+
UPG_FORMAT_VERSION,
|
|
24
|
+
} from '@unified-product-graph/core'
|
|
25
|
+
|
|
26
|
+
// UPG_VERSION (0.5.0) is the catalogue version. UPG_FORMAT_VERSION (0.4.0)
|
|
27
|
+
// is the on-disk .upg document format. The format evolves more slowly.
|
|
28
|
+
|
|
29
|
+
const doc: UPGDocument = {
|
|
30
|
+
upg_version: UPG_FORMAT_VERSION,
|
|
31
|
+
exported_at: new Date().toISOString(),
|
|
32
|
+
source: { tool: 'my-app', tool_version: '1.0.0' },
|
|
33
|
+
product: { id: 'p1', title: 'My Product' },
|
|
34
|
+
nodes: [
|
|
35
|
+
{ id: 'n1', type: 'persona', title: 'Power User' },
|
|
36
|
+
{ id: 'n2', type: 'job', title: 'Get insights faster' },
|
|
37
|
+
],
|
|
38
|
+
edges: [
|
|
39
|
+
{ id: 'e1', source: 'n1', target: 'n2', type: 'persona_pursues_job' },
|
|
40
|
+
],
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const result = validateUPGDocument(doc)
|
|
44
|
+
console.log(result.valid, result.errors, result.warnings)
|
|
45
|
+
|
|
46
|
+
if (isUPGDocument(doc)) {
|
|
47
|
+
console.log(`${doc.nodes.length} nodes exported`)
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
Architecture guide: [`src/ARCHITECTURE.md`](./src/ARCHITECTURE.md)
|
|
54
|
+
|
|
55
|
+
Full spec: [unifiedproductgraph.org](https://unifiedproductgraph.org)
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|