@linklabjs/core 0.1.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/README.md +411 -0
- package/package.json +48 -0
- package/src/api/DomainNode.ts +1433 -0
- package/src/api/Graph.ts +271 -0
- package/src/api/PathBuilder.ts +247 -0
- package/src/api/index.ts +15 -0
- package/src/api/loadGraph.ts +207 -0
- package/src/api/test-api.ts +153 -0
- package/src/api/test-domain.ts +119 -0
- package/src/api/types.ts +88 -0
- package/src/config/synonyms.json +28 -0
- package/src/core/EventBus.ts +187 -0
- package/src/core/GraphEvents.ts +153 -0
- package/src/core/PathFinder.ts +283 -0
- package/src/formatters/BaseFormatter.ts +17 -0
- package/src/graph/GraphAssembler.ts +50 -0
- package/src/graph/GraphCompiler.ts +412 -0
- package/src/graph/GraphExtractor.ts +191 -0
- package/src/graph/GraphOptimizer.ts +404 -0
- package/src/graph/GraphTrainer.ts +247 -0
- package/src/http/LinkBuilder.ts +244 -0
- package/src/http/TrailRequest.ts +48 -0
- package/src/http/example-netflix.ts +59 -0
- package/src/http/hateoas/README.md +87 -0
- package/src/http/index.ts +33 -0
- package/src/http/plugin.ts +360 -0
- package/src/index.ts +121 -0
- package/src/instrumentation/TelemetryShim.ts +172 -0
- package/src/navigation/NavigationEngine.ts +441 -0
- package/src/navigation/Resolver.ts +134 -0
- package/src/navigation/Scheduler.ts +136 -0
- package/src/navigation/Trail.ts +252 -0
- package/src/navigation/TrailParser.ts +207 -0
- package/src/navigation/index.ts +11 -0
- package/src/providers/MockProvider.ts +68 -0
- package/src/providers/PostgresProvider.ts +187 -0
- package/src/runtime/CompiledGraphEngine.ts +274 -0
- package/src/runtime/DataLoader.ts +236 -0
- package/src/runtime/Engine.ts +163 -0
- package/src/runtime/QueryEngine.ts +222 -0
- package/src/scenarios/test-metro-paris/config.json +6 -0
- package/src/scenarios/test-metro-paris/graph.json +16325 -0
- package/src/scenarios/test-metro-paris/queries.ts +152 -0
- package/src/scenarios/test-metro-paris/stack.json +1 -0
- package/src/scenarios/test-musicians/config.json +10 -0
- package/src/scenarios/test-musicians/graph.json +20 -0
- package/src/scenarios/test-musicians/stack.json +1 -0
- package/src/scenarios/test-netflix/MIGRATION.md +23 -0
- package/src/scenarios/test-netflix/README.md +138 -0
- package/src/scenarios/test-netflix/actions.ts +92 -0
- package/src/scenarios/test-netflix/config.json +6 -0
- package/src/scenarios/test-netflix/data/categories.json +1 -0
- package/src/scenarios/test-netflix/data/companies.json +1 -0
- package/src/scenarios/test-netflix/data/credits.json +19797 -0
- package/src/scenarios/test-netflix/data/departments.json +18 -0
- package/src/scenarios/test-netflix/data/jobs.json +142 -0
- package/src/scenarios/test-netflix/data/movies.json +3497 -0
- package/src/scenarios/test-netflix/data/people.json +1 -0
- package/src/scenarios/test-netflix/data/synonyms.json +8 -0
- package/src/scenarios/test-netflix/data/users.json +70 -0
- package/src/scenarios/test-netflix/graph.json +1017 -0
- package/src/scenarios/test-netflix/queries.ts +159 -0
- package/src/scenarios/test-netflix/stack.json +14 -0
- package/src/schema/GraphBuilder.ts +106 -0
- package/src/schema/JsonSchemaExtractor.ts +107 -0
- package/src/schema/SchemaAnalyzer.ts +175 -0
- package/src/schema/SchemaExtractor.ts +102 -0
- package/src/schema/SynonymResolver.ts +143 -0
- package/src/scripts/dictionary.json +796 -0
- package/src/scripts/graph.json +664 -0
- package/src/scripts/regenerate.ts +248 -0
- package/src/types/index.ts +506 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": 0,
|
|
4
|
+
"name": "Unknow",
|
|
5
|
+
"departmentId": 0
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"id": 1,
|
|
9
|
+
"name": "Actor",
|
|
10
|
+
"departmentId": 1
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": 2,
|
|
14
|
+
"name": "Director",
|
|
15
|
+
"departmentId": 2
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 3,
|
|
19
|
+
"name": "Writer",
|
|
20
|
+
"departmentId": 3
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": 4,
|
|
24
|
+
"name": "Novel",
|
|
25
|
+
"departmentId": 3
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": 5,
|
|
29
|
+
"name": "Screenplay",
|
|
30
|
+
"departmentId": 3
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": 6,
|
|
34
|
+
"name": "Dialogue",
|
|
35
|
+
"departmentId": 3
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 7,
|
|
39
|
+
"name": "Lyricist",
|
|
40
|
+
"departmentId": 3
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": 8,
|
|
44
|
+
"name": "Story",
|
|
45
|
+
"departmentId": 3
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": 9,
|
|
49
|
+
"name": "Characters",
|
|
50
|
+
"departmentId": 3
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": 10,
|
|
54
|
+
"name": "Adaptation",
|
|
55
|
+
"departmentId": 3
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": 11,
|
|
59
|
+
"name": "Creative Producer",
|
|
60
|
+
"departmentId": 3
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": 12,
|
|
64
|
+
"name": "Theatre Play",
|
|
65
|
+
"departmentId": 3
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": 13,
|
|
69
|
+
"name": "Story Artist",
|
|
70
|
+
"departmentId": 3
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": 14,
|
|
74
|
+
"name": "Original Story",
|
|
75
|
+
"departmentId": 3
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": 15,
|
|
79
|
+
"name": "Head of Story",
|
|
80
|
+
"departmentId": 3
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": 16,
|
|
84
|
+
"name": "Story Coordinator",
|
|
85
|
+
"departmentId": 3
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": 17,
|
|
89
|
+
"name": "Comic Book",
|
|
90
|
+
"departmentId": 3
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": 18,
|
|
94
|
+
"name": "Author",
|
|
95
|
+
"departmentId": 3
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": 19,
|
|
99
|
+
"name": "Short Story",
|
|
100
|
+
"departmentId": 3
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": 20,
|
|
104
|
+
"name": "Book",
|
|
105
|
+
"departmentId": 3
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": 21,
|
|
109
|
+
"name": "Co-Writer",
|
|
110
|
+
"departmentId": 3
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": 22,
|
|
114
|
+
"name": "Storyboard",
|
|
115
|
+
"departmentId": 3
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": 23,
|
|
119
|
+
"name": "Original Series Creator",
|
|
120
|
+
"departmentId": 3
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": 24,
|
|
124
|
+
"name": "Original Film Writer",
|
|
125
|
+
"departmentId": 3
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": 25,
|
|
129
|
+
"name": "Story Supervisor",
|
|
130
|
+
"departmentId": 3
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": 26,
|
|
134
|
+
"name": "Screenstory",
|
|
135
|
+
"departmentId": 3
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": 27,
|
|
139
|
+
"name": "Story Editor",
|
|
140
|
+
"departmentId": 3
|
|
141
|
+
}
|
|
142
|
+
]
|