@mat3ra/esse 2026.8.18-2 → 2026.8.25-1
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 -3
- package/dist/js/scripts/buildDocsPages.d.ts +19 -0
- package/dist/js/scripts/buildDocsPages.js +419 -0
- package/dist/js/scripts/buildEntityGraph.d.ts +129 -0
- package/dist/js/scripts/buildEntityGraph.js +420 -0
- package/dist/js/scripts/checkSiteLinks.d.ts +6 -0
- package/dist/js/scripts/checkSiteLinks.js +73 -0
- package/dist/js/scripts/entityGraphLayout.d.ts +21 -0
- package/dist/js/scripts/entityGraphLayout.js +76 -0
- package/dist/js/scripts/entity_graph.schema.json +218 -0
- package/package.json +8 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "entity-graph",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"title": "entity graph schema",
|
|
5
|
+
"description": "Reference graph extracted from the ESSE schema sources: one node per schema, one edge per cross-schema $ref. Describes the graph.json asset published alongside the resolved schemas. This is a build-tool schema, not an ESSE entity, so it lives with the extractor rather than in schema/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"meta": {
|
|
9
|
+
"description": "Summary counts for the graph, used by the site and by the schema lint",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"nodeCount": {
|
|
13
|
+
"type": "integer"
|
|
14
|
+
},
|
|
15
|
+
"edgeCount": {
|
|
16
|
+
"type": "integer"
|
|
17
|
+
},
|
|
18
|
+
"edgeCountsByKind": {
|
|
19
|
+
"description": "Number of edges of each relationship kind",
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"extends": {
|
|
23
|
+
"type": "integer"
|
|
24
|
+
},
|
|
25
|
+
"contains": {
|
|
26
|
+
"type": "integer"
|
|
27
|
+
},
|
|
28
|
+
"variant": {
|
|
29
|
+
"type": "integer"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": [
|
|
33
|
+
"extends",
|
|
34
|
+
"contains",
|
|
35
|
+
"variant"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"layerCounts": {
|
|
39
|
+
"description": "Number of schemas assigned to each layer",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": {
|
|
42
|
+
"type": "integer"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"sameDocumentRefCount": {
|
|
46
|
+
"description": "Number of $ref statements pointing inside their own document, which are not edges",
|
|
47
|
+
"type": "integer"
|
|
48
|
+
},
|
|
49
|
+
"schemasWithExample": {
|
|
50
|
+
"type": "integer"
|
|
51
|
+
},
|
|
52
|
+
"isolatedNodeCount": {
|
|
53
|
+
"description": "Number of schemas with no incoming or outgoing references",
|
|
54
|
+
"type": "integer"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"nodeCount",
|
|
59
|
+
"edgeCount",
|
|
60
|
+
"edgeCountsByKind",
|
|
61
|
+
"layerCounts",
|
|
62
|
+
"sameDocumentRefCount",
|
|
63
|
+
"schemasWithExample",
|
|
64
|
+
"isolatedNodeCount"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"nodes": {
|
|
68
|
+
"description": "One entry per schema in the corpus",
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": {
|
|
74
|
+
"description": "Schema $id, dash-separated",
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"path": {
|
|
78
|
+
"description": "Source path relative to the repository root",
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"publishedPath": {
|
|
82
|
+
"description": "Path of the resolved copy on the published site, derived from $id",
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"title": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"description": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"domain": {
|
|
92
|
+
"description": "Top-level source directory, or (root) for schemas at the top of schema/",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"layer": {
|
|
96
|
+
"description": "Architectural layer the schema belongs to",
|
|
97
|
+
"enum": [
|
|
98
|
+
"primitive",
|
|
99
|
+
"abstract",
|
|
100
|
+
"reusable",
|
|
101
|
+
"reference",
|
|
102
|
+
"definition",
|
|
103
|
+
"in-memory-entity",
|
|
104
|
+
"system",
|
|
105
|
+
"entity",
|
|
106
|
+
"entity-component",
|
|
107
|
+
"category",
|
|
108
|
+
"directory",
|
|
109
|
+
"application-parsing"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"ownerEntity": {
|
|
113
|
+
"description": "For entity-component nodes, the root entity the component belongs to",
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"inDegree": {
|
|
117
|
+
"type": "integer"
|
|
118
|
+
},
|
|
119
|
+
"outDegree": {
|
|
120
|
+
"type": "integer"
|
|
121
|
+
},
|
|
122
|
+
"propertyCount": {
|
|
123
|
+
"type": "integer"
|
|
124
|
+
},
|
|
125
|
+
"hasExample": {
|
|
126
|
+
"description": "Whether a mirror file exists under example/",
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"x": {
|
|
130
|
+
"description": "Map x coordinate, baked at build time so the client renders without laying out",
|
|
131
|
+
"type": "number"
|
|
132
|
+
},
|
|
133
|
+
"y": {
|
|
134
|
+
"description": "Map y coordinate, baked at build time so the client renders without laying out",
|
|
135
|
+
"type": "number"
|
|
136
|
+
},
|
|
137
|
+
"manifest": {
|
|
138
|
+
"description": "Entry from manifest/properties.yaml when this schema is a registered property",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"name": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"isResult": {
|
|
145
|
+
"type": "boolean"
|
|
146
|
+
},
|
|
147
|
+
"isMonitor": {
|
|
148
|
+
"type": "boolean"
|
|
149
|
+
},
|
|
150
|
+
"defaultUnits": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"name"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"required": [
|
|
160
|
+
"id",
|
|
161
|
+
"path",
|
|
162
|
+
"publishedPath",
|
|
163
|
+
"title",
|
|
164
|
+
"description",
|
|
165
|
+
"domain",
|
|
166
|
+
"layer",
|
|
167
|
+
"inDegree",
|
|
168
|
+
"outDegree",
|
|
169
|
+
"propertyCount",
|
|
170
|
+
"hasExample"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"edges": {
|
|
175
|
+
"description": "One entry per cross-schema $ref",
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"source": {
|
|
181
|
+
"description": "$id of the referencing schema",
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"target": {
|
|
185
|
+
"description": "$id of the referenced schema",
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"kind": {
|
|
189
|
+
"description": "Relationship expressed by the reference: allOf extends, properties/items contains, oneOf/anyOf is a variant",
|
|
190
|
+
"enum": [
|
|
191
|
+
"extends",
|
|
192
|
+
"contains",
|
|
193
|
+
"variant"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"label": {
|
|
197
|
+
"description": "Property name for contains edges, with a [] suffix when reached through items",
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"pointer": {
|
|
201
|
+
"description": "JSON pointer when the $ref carried a fragment",
|
|
202
|
+
"type": "string"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": [
|
|
206
|
+
"source",
|
|
207
|
+
"target",
|
|
208
|
+
"kind"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"meta",
|
|
215
|
+
"nodes",
|
|
216
|
+
"edges"
|
|
217
|
+
]
|
|
218
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mat3ra/esse",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.25-1",
|
|
4
4
|
"description": "Mat3ra's Excellent Source of Schemas and Examples (ESSE) for Digital Materials R&D",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"transpile": "tsc -p tsconfig-transpile.json",
|
|
7
7
|
"build-schemas": "BUILD_ASSETS=true BUILD_PYTHON_MODULES=true BUILD_PATH='./dist/js' ts-node build_schemas.ts",
|
|
8
|
+
"build-entity-graph": "ts-node build_entity_graph.ts --output ./site",
|
|
9
|
+
"lint-entity-graph": "ts-node build_entity_graph.ts",
|
|
10
|
+
"build-docs-pages": "ts-node build_docs_pages.ts",
|
|
11
|
+
"check-site-links": "ts-node check_site_links.ts",
|
|
8
12
|
"compile-types": "ts-node compile_ts.ts",
|
|
9
13
|
"transpile-and-build-assets": "npm run set-schema-ids && npm run build-schemas && npm run compile-types && npm run transpile",
|
|
10
|
-
"test": "npm run build-schemas && nyc --reporter=text mocha --recursive --timeout 15000 --bail tests/js",
|
|
14
|
+
"test": "npm run build-schemas && npm run lint-entity-graph && nyc --reporter=text mocha --recursive --timeout 15000 --bail tests/js",
|
|
11
15
|
"test-only": "nyc --reporter=text mocha --recursive --bail tests/js",
|
|
12
16
|
"lint": "eslint src/js && prettier --write src/js",
|
|
13
17
|
"lint:fix": "eslint --fix --cache src/js && prettier --write src/js",
|
|
@@ -83,7 +87,8 @@
|
|
|
83
87
|
"json-schema-deref-sync": "^0.14.0",
|
|
84
88
|
"json-schema-merge-allof": "^0.8.1",
|
|
85
89
|
"json-schema-to-typescript": "^15.0.4",
|
|
86
|
-
"lodash": "^4.18.1"
|
|
90
|
+
"lodash": "^4.18.1",
|
|
91
|
+
"marked": "^14.1.4"
|
|
87
92
|
},
|
|
88
93
|
"engines": {
|
|
89
94
|
"node": ">=14.0.0"
|