componentsjs 5.3.1 → 5.3.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.
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
|
4
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
5
|
+
"type": {
|
|
6
|
+
"@id": "rdf:type"
|
|
7
|
+
},
|
|
8
|
+
"types": {
|
|
9
|
+
"@id": "rdf:type"
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
"oo": "https://linkedsoftwaredependencies.org/vocabularies/object-oriented#",
|
|
13
|
+
"Module": {
|
|
14
|
+
"@id": "oo:Module"
|
|
15
|
+
},
|
|
16
|
+
"Class": {
|
|
17
|
+
"@id": "oo:Class"
|
|
18
|
+
},
|
|
19
|
+
"AbstractClass": {
|
|
20
|
+
"@id": "oo:AbstractClass"
|
|
21
|
+
},
|
|
22
|
+
"Instance": {
|
|
23
|
+
"@id": "oo:ComponentInstance"
|
|
24
|
+
},
|
|
25
|
+
"components": {
|
|
26
|
+
"@id": "oo:component"
|
|
27
|
+
},
|
|
28
|
+
"component": {
|
|
29
|
+
"@id": "oo:component",
|
|
30
|
+
"@type": "@id"
|
|
31
|
+
},
|
|
32
|
+
"parameters": {
|
|
33
|
+
"@id": "oo:parameter"
|
|
34
|
+
},
|
|
35
|
+
"memberFields": {
|
|
36
|
+
"@id": "oo:memberField"
|
|
37
|
+
},
|
|
38
|
+
"memberFieldName": {
|
|
39
|
+
"@id": "oo:memberFieldName"
|
|
40
|
+
},
|
|
41
|
+
"genericTypeParameters": {
|
|
42
|
+
"@id": "oo:genericTypeParameter"
|
|
43
|
+
},
|
|
44
|
+
"constructorArguments": {
|
|
45
|
+
"@id": "oo:constructorArguments",
|
|
46
|
+
"@container": "@list"
|
|
47
|
+
},
|
|
48
|
+
"unique": {
|
|
49
|
+
"@id": "oo:uniqueValue"
|
|
50
|
+
},
|
|
51
|
+
"lazy": {
|
|
52
|
+
"@id": "oo:lazyValue"
|
|
53
|
+
},
|
|
54
|
+
"required": {
|
|
55
|
+
"@id": "oo:required"
|
|
56
|
+
},
|
|
57
|
+
"default": {
|
|
58
|
+
"@id": "oo:defaultValue"
|
|
59
|
+
},
|
|
60
|
+
"defaultScoped": {
|
|
61
|
+
"@id": "oo:defaultScoped"
|
|
62
|
+
},
|
|
63
|
+
"defaultScope": {
|
|
64
|
+
"@id": "oo:defaultScope",
|
|
65
|
+
"@type": "@id"
|
|
66
|
+
},
|
|
67
|
+
"defaultScopedValue": {
|
|
68
|
+
"@id": "oo:defaultScopedValue"
|
|
69
|
+
},
|
|
70
|
+
"fixed": {
|
|
71
|
+
"@id": "oo:hasFixedValue"
|
|
72
|
+
},
|
|
73
|
+
"arguments": {
|
|
74
|
+
"@id": "oo:arguments",
|
|
75
|
+
"@container": "@list"
|
|
76
|
+
},
|
|
77
|
+
"undefined": {
|
|
78
|
+
"@id": "oo:isUndefined"
|
|
79
|
+
},
|
|
80
|
+
"Override": {
|
|
81
|
+
"@id": "oo:Override"
|
|
82
|
+
},
|
|
83
|
+
"overrideInstance": {
|
|
84
|
+
"@id": "oo:overrideInstance"
|
|
85
|
+
},
|
|
86
|
+
"overrideParameters": {
|
|
87
|
+
"@id": "oo:overrideParameters"
|
|
88
|
+
},
|
|
89
|
+
"ParameterRange": {
|
|
90
|
+
"@id": "oo:ParameterRange"
|
|
91
|
+
},
|
|
92
|
+
"ParameterRangeUndefined": {
|
|
93
|
+
"@id": "oo:ParameterRangeUndefined"
|
|
94
|
+
},
|
|
95
|
+
"ParameterRangeWildcard": {
|
|
96
|
+
"@id": "oo:ParameterRangeWildcard"
|
|
97
|
+
},
|
|
98
|
+
"ParameterRangeArray": {
|
|
99
|
+
"@id": "oo:ParameterRangeArray"
|
|
100
|
+
},
|
|
101
|
+
"ParameterRangeRest": {
|
|
102
|
+
"@id": "oo:ParameterRangeRest"
|
|
103
|
+
},
|
|
104
|
+
"ParameterRangeKeyof": {
|
|
105
|
+
"@id": "oo:ParameterRangeKeyof"
|
|
106
|
+
},
|
|
107
|
+
"ParameterRangeLiteral": {
|
|
108
|
+
"@id": "oo:ParameterRangeLiteral"
|
|
109
|
+
},
|
|
110
|
+
"parameterRangeValue": {
|
|
111
|
+
"@id": "oo:parameterRangeValue",
|
|
112
|
+
"@type": "@id"
|
|
113
|
+
},
|
|
114
|
+
"parameterRangeValueLiteral": {
|
|
115
|
+
"@id": "oo:parameterRangeValue"
|
|
116
|
+
},
|
|
117
|
+
"ParameterRangeUnion": {
|
|
118
|
+
"@id": "oo:ParameterRangeUnion"
|
|
119
|
+
},
|
|
120
|
+
"ParameterRangeIntersection": {
|
|
121
|
+
"@id": "oo:ParameterRangeIntersection"
|
|
122
|
+
},
|
|
123
|
+
"ParameterRangeTuple": {
|
|
124
|
+
"@id": "oo:ParameterRangeTuple"
|
|
125
|
+
},
|
|
126
|
+
"parameterRangeElements": {
|
|
127
|
+
"@id": "oo:parameterRangeElement",
|
|
128
|
+
"@type": "@id"
|
|
129
|
+
},
|
|
130
|
+
"ParameterRangeCollectEntries": {
|
|
131
|
+
"@id": "oo:ParameterRangeCollectEntries"
|
|
132
|
+
},
|
|
133
|
+
"parameterRangeCollectEntriesParameters": {
|
|
134
|
+
"@id": "oo:parameterRangeCollectEntriesParameter",
|
|
135
|
+
"@type": "@id"
|
|
136
|
+
},
|
|
137
|
+
"ParameterRangeGenericComponent": {
|
|
138
|
+
"@id": "oo:ParameterRangeGenericComponent"
|
|
139
|
+
},
|
|
140
|
+
"genericTypeInstancesComponentScope": {
|
|
141
|
+
"@id": "oo:genericTypeInstancesComponentScope",
|
|
142
|
+
"@type": "@id"
|
|
143
|
+
},
|
|
144
|
+
"genericTypeInstances": {
|
|
145
|
+
"@id": "oo:genericTypeInstance",
|
|
146
|
+
"@type": "@id"
|
|
147
|
+
},
|
|
148
|
+
"ParameterRangeGenericTypeReference": {
|
|
149
|
+
"@id": "oo:ParameterRangeGenericTypeReference"
|
|
150
|
+
},
|
|
151
|
+
"parameterRangeGenericType": {
|
|
152
|
+
"@id": "oo:parameterRangeGenericType",
|
|
153
|
+
"@type": "@id"
|
|
154
|
+
},
|
|
155
|
+
"parameterRangeGenericBindings": {
|
|
156
|
+
"@id": "oo:parameterRangeGenericBinding",
|
|
157
|
+
"@type": "@id"
|
|
158
|
+
},
|
|
159
|
+
"ParameterRangeIndexed": {
|
|
160
|
+
"@id": "oo:ParameterRangeIndexed"
|
|
161
|
+
},
|
|
162
|
+
"parameterRangeIndexedObject": {
|
|
163
|
+
"@id": "oo:parameterRangeIndexedObject",
|
|
164
|
+
"@type": "@id"
|
|
165
|
+
},
|
|
166
|
+
"parameterRangeIndexedIndex": {
|
|
167
|
+
"@id": "oo:parameterRangeIndexedIndex",
|
|
168
|
+
"@type": "@id"
|
|
169
|
+
},
|
|
170
|
+
"GenericComponentExtension": {
|
|
171
|
+
"@id": "oo:GenericComponentExtension"
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
|
|
175
|
+
"comment": {
|
|
176
|
+
"@id": "rdfs:comment"
|
|
177
|
+
},
|
|
178
|
+
"extends": {
|
|
179
|
+
"@id": "rdfs:subClassOf",
|
|
180
|
+
"@type": "@id"
|
|
181
|
+
},
|
|
182
|
+
"range": {
|
|
183
|
+
"@id": "rdfs:range",
|
|
184
|
+
"@type": "@id"
|
|
185
|
+
},
|
|
186
|
+
"import": {
|
|
187
|
+
"@id": "rdfs:seeAlso",
|
|
188
|
+
"@type": "@id"
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
"owl": "http://www.w3.org/2002/07/owl#",
|
|
192
|
+
"InheritanceValue": {
|
|
193
|
+
"@id": "owl:Restriction"
|
|
194
|
+
},
|
|
195
|
+
"inheritValues": {
|
|
196
|
+
"@id": "rdfs:subClassOf",
|
|
197
|
+
"@type": "@id"
|
|
198
|
+
},
|
|
199
|
+
"onParameter": {
|
|
200
|
+
"@id": "owl:onProperty",
|
|
201
|
+
"@type": "@id"
|
|
202
|
+
},
|
|
203
|
+
"from": {
|
|
204
|
+
"@id": "owl:allValuesFrom",
|
|
205
|
+
"@type": "@id"
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
"doap": "http://usefulinc.com/ns/doap#",
|
|
209
|
+
"requireName": {
|
|
210
|
+
"@id": "doap:name"
|
|
211
|
+
},
|
|
212
|
+
"requireElement": {
|
|
213
|
+
"@id": "oo:componentPath"
|
|
214
|
+
},
|
|
215
|
+
"requireNoConstructor": {
|
|
216
|
+
"@id": "oo:componentNoConstructor"
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
"om": "https://linkedsoftwaredependencies.org/vocabularies/object-mapping#",
|
|
220
|
+
"ObjectMapping": {
|
|
221
|
+
"@id": "om:ObjectMapping"
|
|
222
|
+
},
|
|
223
|
+
"ArrayMapping": {
|
|
224
|
+
"@id": "om:ArrayMapping"
|
|
225
|
+
},
|
|
226
|
+
"fields": {
|
|
227
|
+
"@id": "om:field",
|
|
228
|
+
"@type": "om:ObjectMapEntry",
|
|
229
|
+
"@container": "@list"
|
|
230
|
+
},
|
|
231
|
+
"elements": {
|
|
232
|
+
"@id": "om:elements",
|
|
233
|
+
"@type": "@id",
|
|
234
|
+
"@container": "@list"
|
|
235
|
+
},
|
|
236
|
+
"collectEntries": {
|
|
237
|
+
"@id": "om:collectsEntriesFrom",
|
|
238
|
+
"@type": "@id",
|
|
239
|
+
"@container": "@list"
|
|
240
|
+
},
|
|
241
|
+
"keyRaw": {
|
|
242
|
+
"@id": "om:fieldName"
|
|
243
|
+
},
|
|
244
|
+
"key": {
|
|
245
|
+
"@id": "om:fieldName",
|
|
246
|
+
"@type": "@id"
|
|
247
|
+
},
|
|
248
|
+
"value": {
|
|
249
|
+
"@id": "om:fieldValue",
|
|
250
|
+
"@type": "@id"
|
|
251
|
+
},
|
|
252
|
+
"valueRaw": {
|
|
253
|
+
"@id": "om:fieldValue"
|
|
254
|
+
},
|
|
255
|
+
"valueRawReference": {
|
|
256
|
+
"@id": "om:fieldValueRaw",
|
|
257
|
+
"@type": "@id"
|
|
258
|
+
},
|
|
259
|
+
"Variable": {
|
|
260
|
+
"@id": "om:Variable"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ComponentsManagerBuilder = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
5
4
|
const rdf_object_1 = require("rdf-object");
|
|
6
5
|
const winston_1 = require("winston");
|
|
7
6
|
const ComponentsManager_1 = require("../ComponentsManager");
|
|
@@ -47,7 +46,7 @@ class ComponentsManagerBuilder {
|
|
|
47
46
|
}
|
|
48
47
|
static createObjectLoader() {
|
|
49
48
|
return new rdf_object_1.RdfObjectLoader({
|
|
50
|
-
context:
|
|
49
|
+
context: require('../../components/context.json'),
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PrefetchedDocumentLoader = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
5
4
|
const jsonld_context_parser_1 = require("jsonld-context-parser");
|
|
6
5
|
/**
|
|
7
6
|
* A document loader that first loads from a precomputed set of contexts,
|
|
@@ -34,9 +33,7 @@ class PrefetchedDocumentLoader extends jsonld_context_parser_1.FetchDocumentLoad
|
|
|
34
33
|
}
|
|
35
34
|
exports.PrefetchedDocumentLoader = PrefetchedDocumentLoader;
|
|
36
35
|
PrefetchedDocumentLoader.CONTEXT_URL = 'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^5.0.0/components/context.jsonld';
|
|
37
|
-
|
|
38
|
-
PrefetchedDocumentLoader.DEFAULT_CONTEXT = JSON.parse(fs
|
|
39
|
-
.readFileSync(`${__dirname}/../../components/context.jsonld`, 'utf8'));
|
|
36
|
+
PrefetchedDocumentLoader.DEFAULT_CONTEXT = require('../../components/context.json');
|
|
40
37
|
PrefetchedDocumentLoader.DEFAULT_CONTEXTS = {
|
|
41
38
|
[PrefetchedDocumentLoader.CONTEXT_URL]: PrefetchedDocumentLoader.DEFAULT_CONTEXT,
|
|
42
39
|
// TODO: temporarily also set old context versions for backwards-compatible.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "componentsjs",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "A semantic dependency injection framework",
|
|
5
5
|
"lsd:contexts": {
|
|
6
6
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^5.0.0/components/context.jsonld": "components/context.jsonld"
|
|
@@ -23,9 +23,13 @@
|
|
|
23
23
|
"node": ">=8.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"test": "jest
|
|
26
|
+
"test": "npm run test:jest && npm run test:webpack",
|
|
27
|
+
"test:jest": "jest ${1}",
|
|
28
|
+
"test:webpack": "npm run test:webpack:node && npm run test:webpack:web",
|
|
29
|
+
"test:webpack:node": "webpack -c test/webpack/webpack.config.js && node test/webpack/build/test.min.js",
|
|
30
|
+
"test:webpack:web": "webpack -c test/webpack/webpack.config-web.js && node test/webpack/build-web/test.min.js",
|
|
27
31
|
"test-watch": "jest ${1} --watch",
|
|
28
|
-
"build": "tsc && chmod +x ./bin/compile-config.js",
|
|
32
|
+
"build": "scopy ./components/context.jsonld ./components/context.json && tsc && chmod +x ./bin/compile-config.js",
|
|
29
33
|
"build-watch": "tsc --watch",
|
|
30
34
|
"lint": "eslint . --ext .ts --cache",
|
|
31
35
|
"validate": "npm ls",
|
|
@@ -51,6 +55,8 @@
|
|
|
51
55
|
"devDependencies": {
|
|
52
56
|
"@rubensworks/eslint-config": "^1.0.1",
|
|
53
57
|
"@types/jest": "^27.0.0",
|
|
58
|
+
"@types/stream-to-array": "^2.3.0",
|
|
59
|
+
"@types/streamify-string": "^1.0.0",
|
|
54
60
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
55
61
|
"@typescript-eslint/parser": "^5.0.0",
|
|
56
62
|
"eslint": "^7.12.1",
|
|
@@ -65,10 +71,16 @@
|
|
|
65
71
|
"jshint": "^2.1.10",
|
|
66
72
|
"manual-git-changelog": "^1.0.1",
|
|
67
73
|
"n3": "^1.11.1",
|
|
74
|
+
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
68
75
|
"pre-commit": "^1.2.2",
|
|
76
|
+
"simple-copy": "^2.2.1",
|
|
77
|
+
"stream-to-array": "^2.3.0",
|
|
69
78
|
"streamify-string": "^1.0.1",
|
|
70
79
|
"ts-jest": "^27.0.1",
|
|
71
|
-
"
|
|
80
|
+
"ts-loader": "^9.4.1",
|
|
81
|
+
"typescript": "^4.3.5",
|
|
82
|
+
"webpack": "^5.75.0",
|
|
83
|
+
"webpack-cli": "^4.10.0"
|
|
72
84
|
},
|
|
73
85
|
"files": [
|
|
74
86
|
"components",
|