@comunica/bus-dereference 3.3.0 → 4.0.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 CHANGED
@@ -17,7 +17,7 @@ $ yarn add @comunica/bus-dereference
17
17
 
18
18
  ## Bus usage
19
19
 
20
- * **Context**: `"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/context.jsonld"`
20
+ * **Context**: `"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^4.0.0/components/context.jsonld"`
21
21
  * **Bus name**: `cbd:Bus/Dereference`
22
22
 
23
23
  ## Creating actors on this bus
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld"
5
5
  ],
6
6
  "@id": "npmd:@comunica/bus-dereference",
7
7
  "components": [
@@ -44,29 +44,37 @@
44
44
  "genericTypeInstances": [
45
45
  {
46
46
  "@type": "ParameterRangeGenericTypeReference",
47
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
47
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
48
48
  },
49
49
  {
50
50
  "@type": "ParameterRangeGenericTypeReference",
51
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
51
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
52
52
  },
53
53
  {
54
54
  "@type": "ParameterRangeGenericTypeReference",
55
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
55
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
56
+ },
57
+ {
58
+ "@type": "ParameterRangeGenericTypeReference",
59
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
56
60
  }
57
61
  ]
58
62
  },
59
63
  {
60
64
  "@type": "ParameterRangeGenericTypeReference",
61
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
66
+ },
67
+ {
68
+ "@type": "ParameterRangeGenericTypeReference",
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
70
  },
63
71
  {
64
72
  "@type": "ParameterRangeGenericTypeReference",
65
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
73
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
74
  },
67
75
  {
68
76
  "@type": "ParameterRangeGenericTypeReference",
69
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
77
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
70
78
  }
71
79
  ]
72
80
  },
@@ -76,6 +84,20 @@
76
84
  },
77
85
  "comment": "The bus this actor subscribes to."
78
86
  },
87
+ {
88
+ "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_busFailMessage",
89
+ "range": {
90
+ "@type": "ParameterRangeUnion",
91
+ "parameterRangeElements": [
92
+ "xsd:string",
93
+ {
94
+ "@type": "ParameterRangeUndefined"
95
+ }
96
+ ]
97
+ },
98
+ "default": "Dereferencing failed: none of the configured actors were able to handle ${action.url}",
99
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
100
+ },
79
101
  {
80
102
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_beforeActors",
81
103
  "range": {
@@ -89,15 +111,19 @@
89
111
  "genericTypeInstances": [
90
112
  {
91
113
  "@type": "ParameterRangeGenericTypeReference",
92
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
114
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
93
115
  },
94
116
  {
95
117
  "@type": "ParameterRangeGenericTypeReference",
96
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
118
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
97
119
  },
98
120
  {
99
121
  "@type": "ParameterRangeGenericTypeReference",
100
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
122
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
123
+ },
124
+ {
125
+ "@type": "ParameterRangeGenericTypeReference",
126
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
101
127
  }
102
128
  ]
103
129
  }
@@ -136,6 +162,12 @@
136
162
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_bus"
137
163
  }
138
164
  },
165
+ {
166
+ "keyRaw": "busFailMessage",
167
+ "value": {
168
+ "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_busFailMessage"
169
+ }
170
+ },
139
171
  {
140
172
  "keyRaw": "beforeActors",
141
173
  "value": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld"
5
5
  ],
6
6
  "@id": "npmd:@comunica/bus-dereference",
7
7
  "components": [
@@ -25,6 +25,10 @@
25
25
  {
26
26
  "@type": "ParameterRangeGenericTypeReference",
27
27
  "parameterRangeGenericType": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase__generic_O"
28
+ },
29
+ {
30
+ "@type": "ParameterRangeGenericTypeReference",
31
+ "parameterRangeGenericType": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase__generic_TS"
28
32
  }
29
33
  ]
30
34
  }
@@ -44,6 +48,12 @@
44
48
  "range": {
45
49
  "@type": "ParameterRangeWildcard"
46
50
  }
51
+ },
52
+ {
53
+ "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase__generic_TS",
54
+ "default": {
55
+ "@type": "ParameterRangeUndefined"
56
+ }
47
57
  }
48
58
  ],
49
59
  "parameters": [
@@ -67,34 +77,55 @@
67
77
  "genericTypeInstances": [
68
78
  {
69
79
  "@type": "ParameterRangeGenericTypeReference",
70
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
80
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
71
81
  },
72
82
  {
73
83
  "@type": "ParameterRangeGenericTypeReference",
74
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
84
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
75
85
  },
76
86
  {
77
87
  "@type": "ParameterRangeGenericTypeReference",
78
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
88
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
89
+ },
90
+ {
91
+ "@type": "ParameterRangeGenericTypeReference",
92
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
79
93
  }
80
94
  ]
81
95
  },
82
96
  {
83
97
  "@type": "ParameterRangeGenericTypeReference",
84
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
98
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
85
99
  },
86
100
  {
87
101
  "@type": "ParameterRangeGenericTypeReference",
88
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
102
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
89
103
  },
90
104
  {
91
105
  "@type": "ParameterRangeGenericTypeReference",
92
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
106
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
107
+ },
108
+ {
109
+ "@type": "ParameterRangeGenericTypeReference",
110
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
93
111
  }
94
112
  ]
95
113
  },
96
114
  "comment": "The bus this actor subscribes to."
97
115
  },
116
+ {
117
+ "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_busFailMessage",
118
+ "range": {
119
+ "@type": "ParameterRangeUnion",
120
+ "parameterRangeElements": [
121
+ "xsd:string",
122
+ {
123
+ "@type": "ParameterRangeUndefined"
124
+ }
125
+ ]
126
+ },
127
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
128
+ },
98
129
  {
99
130
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_beforeActors",
100
131
  "range": {
@@ -108,15 +139,19 @@
108
139
  "genericTypeInstances": [
109
140
  {
110
141
  "@type": "ParameterRangeGenericTypeReference",
111
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
142
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
112
143
  },
113
144
  {
114
145
  "@type": "ParameterRangeGenericTypeReference",
115
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
146
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
116
147
  },
117
148
  {
118
149
  "@type": "ParameterRangeGenericTypeReference",
119
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
150
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
151
+ },
152
+ {
153
+ "@type": "ParameterRangeGenericTypeReference",
154
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
120
155
  }
121
156
  ]
122
157
  }
@@ -155,6 +190,12 @@
155
190
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_bus"
156
191
  }
157
192
  },
193
+ {
194
+ "keyRaw": "busFailMessage",
195
+ "value": {
196
+ "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_busFailMessage"
197
+ }
198
+ },
158
199
  {
159
200
  "keyRaw": "beforeActors",
160
201
  "value": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-parse/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-parse/^4.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/bus-dereference",
8
8
  "components": [
@@ -68,6 +68,17 @@
68
68
  "@type": "ParameterRangeUndefined"
69
69
  }
70
70
  ]
71
+ },
72
+ "default": {
73
+ "@type": "ParameterRangeUnion",
74
+ "parameterRangeElements": [
75
+ {
76
+ "@type": "ParameterRangeWildcard"
77
+ },
78
+ {
79
+ "@type": "ParameterRangeUndefined"
80
+ }
81
+ ]
71
82
  }
72
83
  },
73
84
  {
@@ -82,6 +93,17 @@
82
93
  "@type": "ParameterRangeUndefined"
83
94
  }
84
95
  ]
96
+ },
97
+ "default": {
98
+ "@type": "ParameterRangeUnion",
99
+ "parameterRangeElements": [
100
+ {
101
+ "@type": "ParameterRangeWildcard"
102
+ },
103
+ {
104
+ "@type": "ParameterRangeUndefined"
105
+ }
106
+ ]
85
107
  }
86
108
  }
87
109
  ],
@@ -125,34 +147,55 @@
125
147
  "genericTypeInstances": [
126
148
  {
127
149
  "@type": "ParameterRangeGenericTypeReference",
128
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
150
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
151
+ },
152
+ {
153
+ "@type": "ParameterRangeGenericTypeReference",
154
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
129
155
  },
130
156
  {
131
157
  "@type": "ParameterRangeGenericTypeReference",
132
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
158
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
133
159
  },
134
160
  {
135
161
  "@type": "ParameterRangeGenericTypeReference",
136
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
162
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
137
163
  }
138
164
  ]
139
165
  },
140
166
  {
141
167
  "@type": "ParameterRangeGenericTypeReference",
142
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
168
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
143
169
  },
144
170
  {
145
171
  "@type": "ParameterRangeGenericTypeReference",
146
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
172
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
147
173
  },
148
174
  {
149
175
  "@type": "ParameterRangeGenericTypeReference",
150
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
176
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
177
+ },
178
+ {
179
+ "@type": "ParameterRangeGenericTypeReference",
180
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
151
181
  }
152
182
  ]
153
183
  },
154
184
  "comment": "The bus this actor subscribes to."
155
185
  },
186
+ {
187
+ "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_busFailMessage",
188
+ "range": {
189
+ "@type": "ParameterRangeUnion",
190
+ "parameterRangeElements": [
191
+ "xsd:string",
192
+ {
193
+ "@type": "ParameterRangeUndefined"
194
+ }
195
+ ]
196
+ },
197
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
198
+ },
156
199
  {
157
200
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_beforeActors",
158
201
  "range": {
@@ -166,15 +209,19 @@
166
209
  "genericTypeInstances": [
167
210
  {
168
211
  "@type": "ParameterRangeGenericTypeReference",
169
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
212
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
213
+ },
214
+ {
215
+ "@type": "ParameterRangeGenericTypeReference",
216
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
170
217
  },
171
218
  {
172
219
  "@type": "ParameterRangeGenericTypeReference",
173
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
220
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
174
221
  },
175
222
  {
176
223
  "@type": "ParameterRangeGenericTypeReference",
177
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
224
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
178
225
  }
179
226
  ]
180
227
  }
@@ -273,6 +320,12 @@
273
320
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_bus"
274
321
  }
275
322
  },
323
+ {
324
+ "keyRaw": "busFailMessage",
325
+ "value": {
326
+ "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_busFailMessage"
327
+ }
328
+ },
276
329
  {
277
330
  "keyRaw": "beforeActors",
278
331
  "value": {
@@ -344,6 +397,17 @@
344
397
  "@type": "ParameterRangeUndefined"
345
398
  }
346
399
  ]
400
+ },
401
+ "default": {
402
+ "@type": "ParameterRangeUnion",
403
+ "parameterRangeElements": [
404
+ {
405
+ "@type": "ParameterRangeWildcard"
406
+ },
407
+ {
408
+ "@type": "ParameterRangeUndefined"
409
+ }
410
+ ]
347
411
  }
348
412
  },
349
413
  {
@@ -358,6 +422,17 @@
358
422
  "@type": "ParameterRangeUndefined"
359
423
  }
360
424
  ]
425
+ },
426
+ "default": {
427
+ "@type": "ParameterRangeUnion",
428
+ "parameterRangeElements": [
429
+ {
430
+ "@type": "ParameterRangeWildcard"
431
+ },
432
+ {
433
+ "@type": "ParameterRangeUndefined"
434
+ }
435
+ ]
361
436
  }
362
437
  }
363
438
  ],
@@ -402,6 +477,17 @@
402
477
  "@type": "ParameterRangeUndefined"
403
478
  }
404
479
  ]
480
+ },
481
+ "default": {
482
+ "@type": "ParameterRangeUnion",
483
+ "parameterRangeElements": [
484
+ {
485
+ "@type": "ParameterRangeWildcard"
486
+ },
487
+ {
488
+ "@type": "ParameterRangeUndefined"
489
+ }
490
+ ]
405
491
  }
406
492
  }
407
493
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/bus-dereference",
6
6
  "@type": "Module",
@@ -3,7 +3,7 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "cbd": "npmd:@comunica/bus-dereference/^3.0.0/",
6
+ "cbd": "npmd:@comunica/bus-dereference/^4.0.0/",
7
7
  "ActorDereference": {
8
8
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference",
9
9
  "@prefix": true,
@@ -14,6 +14,9 @@
14
14
  "args_bus": {
15
15
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_bus"
16
16
  },
17
+ "args_busFailMessage": {
18
+ "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_busFailMessage"
19
+ },
17
20
  "args_beforeActors": {
18
21
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_beforeActors",
19
22
  "@container": "@list"
@@ -24,6 +27,9 @@
24
27
  "bus": {
25
28
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_bus"
26
29
  },
30
+ "busFailMessage": {
31
+ "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_busFailMessage"
32
+ },
27
33
  "beforeActors": {
28
34
  "@id": "cbd:components/ActorDereference.jsonld#ActorDereference_args_beforeActors",
29
35
  "@container": "@list"
@@ -58,6 +64,9 @@
58
64
  "args_bus": {
59
65
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_bus"
60
66
  },
67
+ "args_busFailMessage": {
68
+ "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_busFailMessage"
69
+ },
61
70
  "args_beforeActors": {
62
71
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_beforeActors",
63
72
  "@container": "@list"
@@ -81,6 +90,9 @@
81
90
  "bus": {
82
91
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_bus"
83
92
  },
93
+ "busFailMessage": {
94
+ "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_busFailMessage"
95
+ },
84
96
  "beforeActors": {
85
97
  "@id": "cbd:components/ActorDereferenceParse.jsonld#ActorDereferenceParse_args_beforeActors",
86
98
  "@container": "@list"
@@ -107,6 +119,9 @@
107
119
  "args_bus": {
108
120
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_bus"
109
121
  },
122
+ "args_busFailMessage": {
123
+ "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_busFailMessage"
124
+ },
110
125
  "args_beforeActors": {
111
126
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_beforeActors",
112
127
  "@container": "@list"
@@ -117,6 +132,9 @@
117
132
  "bus": {
118
133
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_bus"
119
134
  },
135
+ "busFailMessage": {
136
+ "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_busFailMessage"
137
+ },
120
138
  "beforeActors": {
121
139
  "@id": "cbd:components/ActorDereferenceBase.jsonld#ActorDereferenceBase_args_beforeActors",
122
140
  "@container": "@list"
@@ -14,7 +14,9 @@ import { ActorDereferenceBase } from './ActorDereferenceBase';
14
14
  */
15
15
  export declare abstract class ActorDereference extends ActorDereferenceBase<IActionDereference, IActorTest, IActorDereferenceOutput> {
16
16
  /**
17
- * @param args - @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
17
+ * @param args -
18
+ * \ @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
19
+ * \ @defaultNested {Dereferencing failed: none of the configured actors were able to handle ${action.url}} busFailMessage
18
20
  */
19
21
  constructor(args: IActorDereferenceArgs);
20
22
  /**
@@ -14,9 +14,13 @@ const ActorDereferenceBase_1 = require("./ActorDereferenceBase");
14
14
  * @see IActorDereferenceOutput
15
15
  */
16
16
  class ActorDereference extends ActorDereferenceBase_1.ActorDereferenceBase {
17
+ /* eslint-disable max-len */
17
18
  /**
18
- * @param args - @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
19
+ * @param args -
20
+ * \ @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
21
+ * \ @defaultNested {Dereferencing failed: none of the configured actors were able to handle ${action.url}} busFailMessage
19
22
  */
23
+ /* eslint-enable max-len */
20
24
  constructor(args) {
21
25
  super(args);
22
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ActorDereference.js","sourceRoot":"","sources":["ActorDereference.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAE9D;;;;;;;;;;GAUG;AACH,MAAsB,gBAAiB,SACrC,2CAA6E;IAC7E;;OAEG;IACH,YAAmB,IAA2B;QAC5C,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACO,KAAK,CAAC,uBAAuB,CACrC,MAA0B,EAC1B,KAAc,EACd,OAA6B,EAC7B,WAAW,GAAG,CAAC;QAEf,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/G,CAAC;CACF;AA1BD,4CA0BC","sourcesContent":["import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';\nimport { ActorDereferenceBase } from './ActorDereferenceBase';\n\n/**\n * A base actor for dereferencing URLs to (generic) streams.\n *\n * Actor types:\n * * Input: IActionDereference: A URL.\n * * Test: <none>\n * * Output: IActorDereferenceOutput: A Readable stream\n *\n * @see IActionDereference\n * @see IActorDereferenceOutput\n */\nexport abstract class ActorDereference extends\n ActorDereferenceBase<IActionDereference, IActorTest, IActorDereferenceOutput> {\n /**\n * @param args - @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus\n */\n public constructor(args: IActorDereferenceArgs) {\n super(args);\n }\n\n /**\n * Handle the given error as a rejection or delegate it to the logger,\n * depending on whether or not hard errors are enabled.\n * @param {IActionDereference} action A dereference action.\n * @param {Error} error An error that has occurred.\n * @param headers Optional HTTP headers to pass.\n * @param {number} requestTime The time it took to request the page in milliseconds.\n * @return {Promise<IActorDereferenceOutput>} A promise that rejects or resolves to an empty output.\n */\n protected async handleDereferenceErrors(\n action: IActionDereference,\n error: unknown,\n headers?: Headers | undefined,\n requestTime = 0,\n ): Promise<IActorDereferenceOutput> {\n return this.dereferenceErrorHandler(action, error, { url: action.url, exists: false, headers, requestTime });\n }\n}\n\nexport interface IActionDereference extends IAction {\n /**\n * The URL to dereference\n */\n url: string;\n /**\n * By default, actors will reject upon receiving non-200 HTTP responses.\n * If this option is true, then all HTTP responses will cause the action to resolve,\n * but some outputs may therefore contain empty quad streams.\n */\n acceptErrors?: boolean;\n /**\n * Optional HTTP method to use.\n * Defaults to GET.\n */\n method?: string;\n /**\n * Optional HTTP headers to pass.\n */\n headers?: Headers;\n /**\n * An optional callback to retrieve the mediaType mappings\n */\n mediaTypes?: () => Promise<Record<string, number> | undefined>;\n}\n\ninterface IReadableClose extends NodeJS.ReadableStream {\n close?: () => void | Promise<void>;\n}\n\nexport interface IActorDereferenceOutput extends IActorOutput {\n /**\n * The page on which the output was found.\n *\n * This is not necessarily the same as the original input url,\n * as this may have changed due to redirects.\n */\n url: string;\n /**\n * The resulting stream.\n */\n data: IReadableClose;\n /**\n * This will always be true, unless `acceptErrors` was set to true in the action and the dereferencing failed.\n */\n exists: boolean;\n /**\n * The time it took to request the page in milliseconds.\n * This is the time until the first byte arrives.\n */\n requestTime: number;\n /**\n * The returned headers of the final URL.\n */\n headers?: Headers;\n /**\n * The mediatype of the source\n */\n mediaType?: string;\n}\n\nexport type IActorDereferenceArgs = IActorArgs<IActionDereference, IActorTest, IActorDereferenceOutput>;\n\nexport type MediatorDereference = Mediate<IActionDereference, IActorDereferenceOutput>;\n"]}
1
+ {"version":3,"file":"ActorDereference.js","sourceRoot":"","sources":["ActorDereference.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAE9D;;;;;;;;;;GAUG;AACH,MAAsB,gBAAiB,SACrC,2CAA6E;IAC7E,4BAA4B;IAC5B;;;;OAIG;IACH,2BAA2B;IAC3B,YAAmB,IAA2B;QAC5C,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACO,KAAK,CAAC,uBAAuB,CACrC,MAA0B,EAC1B,KAAc,EACd,OAA6B,EAC7B,WAAW,GAAG,CAAC;QAEf,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/G,CAAC;CACF;AA9BD,4CA8BC","sourcesContent":["import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';\nimport { ActorDereferenceBase } from './ActorDereferenceBase';\n\n/**\n * A base actor for dereferencing URLs to (generic) streams.\n *\n * Actor types:\n * * Input: IActionDereference: A URL.\n * * Test: <none>\n * * Output: IActorDereferenceOutput: A Readable stream\n *\n * @see IActionDereference\n * @see IActorDereferenceOutput\n */\nexport abstract class ActorDereference extends\n ActorDereferenceBase<IActionDereference, IActorTest, IActorDereferenceOutput> {\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus\n * \\ @defaultNested {Dereferencing failed: none of the configured actors were able to handle ${action.url}} busFailMessage\n */\n /* eslint-enable max-len */\n public constructor(args: IActorDereferenceArgs) {\n super(args);\n }\n\n /**\n * Handle the given error as a rejection or delegate it to the logger,\n * depending on whether or not hard errors are enabled.\n * @param {IActionDereference} action A dereference action.\n * @param {Error} error An error that has occurred.\n * @param headers Optional HTTP headers to pass.\n * @param {number} requestTime The time it took to request the page in milliseconds.\n * @return {Promise<IActorDereferenceOutput>} A promise that rejects or resolves to an empty output.\n */\n protected async handleDereferenceErrors(\n action: IActionDereference,\n error: unknown,\n headers?: Headers | undefined,\n requestTime = 0,\n ): Promise<IActorDereferenceOutput> {\n return this.dereferenceErrorHandler(action, error, { url: action.url, exists: false, headers, requestTime });\n }\n}\n\nexport interface IActionDereference extends IAction {\n /**\n * The URL to dereference\n */\n url: string;\n /**\n * By default, actors will reject upon receiving non-200 HTTP responses.\n * If this option is true, then all HTTP responses will cause the action to resolve,\n * but some outputs may therefore contain empty quad streams.\n */\n acceptErrors?: boolean;\n /**\n * Optional HTTP method to use.\n * Defaults to GET.\n */\n method?: string;\n /**\n * Optional HTTP headers to pass.\n */\n headers?: Headers;\n /**\n * An optional callback to retrieve the mediaType mappings\n */\n mediaTypes?: () => Promise<Record<string, number> | undefined>;\n}\n\ninterface IReadableClose extends NodeJS.ReadableStream {\n close?: () => void | Promise<void>;\n}\n\nexport interface IActorDereferenceOutput extends IActorOutput {\n /**\n * The page on which the output was found.\n *\n * This is not necessarily the same as the original input url,\n * as this may have changed due to redirects.\n */\n url: string;\n /**\n * The resulting stream.\n */\n data: IReadableClose;\n /**\n * This will always be true, unless `acceptErrors` was set to true in the action and the dereferencing failed.\n */\n exists: boolean;\n /**\n * The time it took to request the page in milliseconds.\n * This is the time until the first byte arrives.\n */\n requestTime: number;\n /**\n * The returned headers of the final URL.\n */\n headers?: Headers;\n /**\n * The mediatype of the source\n */\n mediaType?: string;\n}\n\nexport type IActorDereferenceArgs = IActorArgs<IActionDereference, IActorTest, IActorDereferenceOutput>;\n\nexport type MediatorDereference = Mediate<IActionDereference, IActorDereferenceOutput>;\n"]}
@@ -21,8 +21,8 @@ export declare function isHardError(context: IActionContext): boolean;
21
21
  * @see IActionDereference
22
22
  * @see IActorDereferenceOutput
23
23
  */
24
- export declare abstract class ActorDereferenceBase<I extends IAction, T extends IActorTest, O extends IActorDereferenceOutput> extends Actor<I, T, O> {
25
- constructor(args: IActorArgs<I, T, O>);
24
+ export declare abstract class ActorDereferenceBase<I extends IAction, T extends IActorTest, O extends IActorDereferenceOutput, TS = undefined> extends Actor<I, T, O, TS> {
25
+ constructor(args: IActorArgs<I, T, O, TS>);
26
26
  /**
27
27
  * Handle the given error as a rejection or delegate it to the logger,
28
28
  * depending on whether or not hard errors are enabled.
@@ -1 +1 @@
1
- {"version":3,"file":"ActorDereferenceBase.js","sourceRoot":"","sources":["ActorDereferenceBase.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAE1D,yCAAuC;AAEvC,qDAA2C;AAG3C,SAAgB,aAAa;IAC3B,MAAM,IAAI,GAAG,IAAI,0BAAQ,EAAE,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,OAAW,IAAI,CAAC;AAClB,CAAC;AAJD,sCAIC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,OAAuB;IACjD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,+BAAa,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAFD,kCAEC;AAED;;;;;;;;;;GAUG;AACH,MAAsB,oBACpB,SAAQ,YAAc;IACtB,YAAmB,IAAyB;QAC1C,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACO,KAAK,CAAC,uBAAuB,CACrC,MAAS,EACT,KAAc,EACd,MAAS;QAET,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAChC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAW,KAAM,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,aAAa,EAAK,EAAE,CAAC;IACjD,CAAC;CACF;AAxBD,oDAwBC","sourcesContent":["import { KeysInitQuery } from '@comunica/context-entries';\nimport type { IAction, IActorArgs, IActorTest } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\nimport { Readable } from 'readable-stream';\nimport type { IActorDereferenceOutput } from '.';\n\nexport function emptyReadable<S extends Readable>(): S {\n const data = new Readable();\n data.push(null);\n return <S> data;\n}\n\n/**\n * Check if hard errors should occur on HTTP or parse errors.\n * @param {IActionContext} context An action context.\n * @return {boolean} If hard errors are enabled.\n */\nexport function isHardError(context: IActionContext): boolean {\n return !context.get(KeysInitQuery.lenient);\n}\n\n/**\n * A base actor for dereferencing URLs to (generic) streams.\n *\n * Actor types:\n * * Input: IActionDereference: A URL.\n * * Test: <none>\n * * Output: IActorDereferenceOutput: A Readable stream\n *\n * @see IActionDereference\n * @see IActorDereferenceOutput\n */\nexport abstract class ActorDereferenceBase<I extends IAction, T extends IActorTest, O extends IActorDereferenceOutput>\n extends Actor<I, T, O> {\n public constructor(args: IActorArgs<I, T, O>) {\n super(args);\n }\n\n /**\n * Handle the given error as a rejection or delegate it to the logger,\n * depending on whether or not hard errors are enabled.\n * @param {I} action An action.\n * @param {Error} error An error that has occurred.\n * @param {N} output Data to add to the output\n */\n protected async dereferenceErrorHandler<N, M extends Readable>(\n action: I,\n error: unknown,\n output: N,\n ): Promise<N & { data: M }> {\n if (isHardError(action.context)) {\n throw error;\n }\n this.logWarn(action.context, (<Error> error).message);\n return { ...output, data: emptyReadable<M>() };\n }\n}\n"]}
1
+ {"version":3,"file":"ActorDereferenceBase.js","sourceRoot":"","sources":["ActorDereferenceBase.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAE1D,yCAAuC;AAEvC,qDAA2C;AAG3C,SAAgB,aAAa;IAC3B,MAAM,IAAI,GAAG,IAAI,0BAAQ,EAAE,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,OAAW,IAAI,CAAC;AAClB,CAAC;AAJD,sCAIC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,OAAuB;IACjD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,+BAAa,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAFD,kCAEC;AAED;;;;;;;;;;GAUG;AACH,MAAsB,oBAMpB,SAAQ,YAAkB;IAC1B,YAAmB,IAA6B;QAC9C,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACO,KAAK,CAAC,uBAAuB,CACrC,MAAS,EACT,KAAc,EACd,MAAS;QAET,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAChC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAW,KAAM,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,aAAa,EAAK,EAAE,CAAC;IACjD,CAAC;CACF;AA7BD,oDA6BC","sourcesContent":["import { KeysInitQuery } from '@comunica/context-entries';\nimport type { IAction, IActorArgs, IActorTest } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\nimport { Readable } from 'readable-stream';\nimport type { IActorDereferenceOutput } from '.';\n\nexport function emptyReadable<S extends Readable>(): S {\n const data = new Readable();\n data.push(null);\n return <S> data;\n}\n\n/**\n * Check if hard errors should occur on HTTP or parse errors.\n * @param {IActionContext} context An action context.\n * @return {boolean} If hard errors are enabled.\n */\nexport function isHardError(context: IActionContext): boolean {\n return !context.get(KeysInitQuery.lenient);\n}\n\n/**\n * A base actor for dereferencing URLs to (generic) streams.\n *\n * Actor types:\n * * Input: IActionDereference: A URL.\n * * Test: <none>\n * * Output: IActorDereferenceOutput: A Readable stream\n *\n * @see IActionDereference\n * @see IActorDereferenceOutput\n */\nexport abstract class ActorDereferenceBase<\n I extends IAction,\nT extends IActorTest,\nO extends IActorDereferenceOutput,\nTS = undefined,\n>\n extends Actor<I, T, O, TS> {\n public constructor(args: IActorArgs<I, T, O, TS>) {\n super(args);\n }\n\n /**\n * Handle the given error as a rejection or delegate it to the logger,\n * depending on whether or not hard errors are enabled.\n * @param {I} action An action.\n * @param {Error} error An error that has occurred.\n * @param {N} output Data to add to the output\n */\n protected async dereferenceErrorHandler<N, M extends Readable>(\n action: I,\n error: unknown,\n output: N,\n ): Promise<N & { data: M }> {\n if (isHardError(action.context)) {\n throw error;\n }\n this.logWarn(action.context, (<Error> error).message);\n return { ...output, data: emptyReadable<M>() };\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { MediateMediaTyped, MediateMediaTypes } from '@comunica/actor-abstract-mediatyped';
2
2
  import type { IActionParse, IActorParseOutput, IParseMetadata } from '@comunica/actor-abstract-parse';
3
- import type { IActorArgs, IActorTest } from '@comunica/core';
3
+ import type { IActorArgs, IActorTest, TestResult } from '@comunica/core';
4
4
  import type { Readable } from 'readable-stream';
5
5
  import type { IActionDereference, IActorDereferenceOutput, MediatorDereference } from './ActorDereference';
6
6
  import { ActorDereferenceBase } from './ActorDereferenceBase';
@@ -38,7 +38,7 @@ export declare abstract class ActorDereferenceParse<S, K extends IParseMetadata
38
38
  readonly mediatorParseMediatypes: MediateMediaTypes;
39
39
  readonly mediaMappings: Record<string, string>;
40
40
  constructor(args: IActorDereferenceParseArgs<S, K, M>);
41
- test(_action: IActionDereference): Promise<IActorTest>;
41
+ test(_action: IActionDereference): Promise<TestResult<IActorTest>>;
42
42
  /**
43
43
  * If hard errors are disabled, modify the given stream so that errors are delegated to the logger.
44
44
  * @param {IActionDereferenceParse} action A dereference action.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorDereferenceParse = exports.getMediaTypeFromExtension = void 0;
4
+ const core_1 = require("@comunica/core");
4
5
  const readable_stream_1 = require("readable-stream");
5
6
  const ActorDereferenceBase_1 = require("./ActorDereferenceBase");
6
7
  /**
@@ -32,7 +33,7 @@ class ActorDereferenceParse extends ActorDereferenceBase_1.ActorDereferenceBase
32
33
  super(args);
33
34
  }
34
35
  async test(_action) {
35
- return true;
36
+ return (0, core_1.passTestVoid)();
36
37
  }
37
38
  /**
38
39
  * If hard errors are disabled, modify the given stream so that errors are delegated to the logger.
@@ -1 +1 @@
1
- {"version":3,"file":"ActorDereferenceParse.js","sourceRoot":"","sources":["ActorDereferenceParse.ts"],"names":[],"mappings":"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","sourcesContent":["import type { MediateMediaTyped, MediateMediaTypes } from '@comunica/actor-abstract-mediatyped';\nimport type { IActionParse, IActorParseOutput, IParseMetadata } from '@comunica/actor-abstract-parse';\nimport type { IActorArgs, IActorTest } from '@comunica/core';\nimport type { Readable } from 'readable-stream';\nimport { PassThrough } from 'readable-stream';\nimport type { IActionDereference, IActorDereferenceOutput, MediatorDereference } from './ActorDereference';\nimport { ActorDereferenceBase, isHardError } from './ActorDereferenceBase';\n\n/**\n * Get the media type based on the extension of the given path,\n * which can be an URL or file path.\n * @param {string} path A path.\n * @param {Record<string, string>} mediaMappings A collection of mappings,\n * mapping file extensions to their corresponding media type.\n * @return {string} A media type or the empty string.\n */\nexport function getMediaTypeFromExtension(path: string, mediaMappings?: Record<string, string>): string {\n const dotIndex = path.lastIndexOf('.');\n // Get extension after last dot and map to media\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n return (dotIndex >= 0 && mediaMappings?.[path.slice(dotIndex + 1)]) || '';\n}\n\nexport interface IActorDereferenceParseArgs<\n S,\n K extends IParseMetadata = IParseMetadata,\n M extends IParseMetadata = IParseMetadata,\n> extends IActorArgs<IActionDereferenceParse<K>, IActorTest, IActorDereferenceParseOutput<S, M>> {\n mediatorDereference: MediatorDereference;\n mediatorParse: MediateMediaTyped<IActionParse<K>, IActorTest, IActorParseOutput<S, M>>;\n mediatorParseMediatypes: MediateMediaTypes;\n /**\n * A collection of mappings, mapping file extensions to their corresponding media type.\n * @range {json}\n */\n mediaMappings: Record<string, string>;\n}\n\n/**\n * An abstract actor that handles dereference and parse actions.\n *\n * Actor types:\n * Input: IActionDereferenceParse: A URL.\n * Test: <none>\n * Output: IActorDereferenceParseOutput: A data stream of type output by the Parser.\n *\n */\nexport abstract class ActorDereferenceParse<\n S,\n K extends IParseMetadata = IParseMetadata,\n M extends IParseMetadata = IParseMetadata,\n> extends ActorDereferenceBase<IActionDereferenceParse<K>, IActorTest, IActorDereferenceParseOutput<S, M>> {\n public readonly mediatorDereference: MediatorDereference;\n public readonly mediatorParse: MediateMediaTyped<IActionParse<K>, IActorTest, IActorParseOutput<S, M>>;\n public readonly mediatorParseMediatypes: MediateMediaTypes;\n public readonly mediaMappings: Record<string, string>;\n\n public constructor(args: IActorDereferenceParseArgs<S, K, M>) {\n super(args);\n }\n\n public async test(_action: IActionDereference): Promise<IActorTest> {\n return true;\n }\n\n /**\n * If hard errors are disabled, modify the given stream so that errors are delegated to the logger.\n * @param {IActionDereferenceParse} action A dereference action.\n * @param {Readable} data A data stream.\n * @return {Readable} The resulting data stream.\n */\n protected handleDereferenceStreamErrors<L extends IParseMetadata, T extends Readable>(\n action: IActionDereferenceParse<L>,\n data: T,\n ): T {\n // If we don't emit hard errors, make parsing error events log instead, and silence them downstream.\n if (!isHardError(action.context)) {\n data.on('error', (error) => {\n this.logWarn(action.context, error.message, () => ({ url: action.url }));\n // Make sure the errored stream is ended.\n data.push(null);\n });\n data = <PassThrough & T> data.pipe(new PassThrough({ objectMode: true }));\n }\n return data;\n }\n\n public abstract getMetadata(dereference: IActorDereferenceOutput): Promise<K | undefined>;\n\n public async run(action: IActionDereferenceParse<K>): Promise<IActorDereferenceParseOutput<S, M>> {\n const { context } = action;\n const dereference = await this.mediatorDereference.mediate({\n ...action,\n mediaTypes: async() => (await this.mediatorParseMediatypes?.mediate({ context, mediaTypes: true }))?.mediaTypes,\n });\n\n let result: IActorParseOutput<S, M>;\n try {\n result = (await this.mediatorParse.mediate({\n context,\n handle: { context, ...dereference, metadata: await this.getMetadata(dereference) },\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n handleMediaType: (dereference.mediaType ||\n getMediaTypeFromExtension(dereference.url, this.mediaMappings)) ||\n action.mediaType,\n })).handle;\n result.data = this.handleDereferenceStreamErrors(action, result.data);\n } catch (error: unknown) {\n // Close the body, to avoid process to hang\n await dereference.data.close?.();\n result = await this.dereferenceErrorHandler(action, error, {});\n }\n\n // Return the parsed stream and any metadata\n return { ...dereference, ...result };\n }\n}\n\nexport interface IActionDereferenceParse<T extends IParseMetadata = IParseMetadata> extends IActionDereference {\n /**\n * The mediatype of the source (if it can't be inferred from the source)\n */\n mediaType?: string;\n /**\n * Metadata to be given to the parser\n */\n metadata?: T;\n}\n\nexport type IActorDereferenceParseOutput<T, K extends IParseMetadata = IParseMetadata>\n = Omit<IActorDereferenceOutput, 'data'> & IActorParseOutput<T, K>;\n"]}
1
+ {"version":3,"file":"ActorDereferenceParse.js","sourceRoot":"","sources":["ActorDereferenceParse.ts"],"names":[],"mappings":"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","sourcesContent":["import type { MediateMediaTyped, MediateMediaTypes } from '@comunica/actor-abstract-mediatyped';\nimport type { IActionParse, IActorParseOutput, IParseMetadata } from '@comunica/actor-abstract-parse';\nimport type { IActorArgs, IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type { Readable } from 'readable-stream';\nimport { PassThrough } from 'readable-stream';\nimport type { IActionDereference, IActorDereferenceOutput, MediatorDereference } from './ActorDereference';\nimport { ActorDereferenceBase, isHardError } from './ActorDereferenceBase';\n\n/**\n * Get the media type based on the extension of the given path,\n * which can be an URL or file path.\n * @param {string} path A path.\n * @param {Record<string, string>} mediaMappings A collection of mappings,\n * mapping file extensions to their corresponding media type.\n * @return {string} A media type or the empty string.\n */\nexport function getMediaTypeFromExtension(path: string, mediaMappings?: Record<string, string>): string {\n const dotIndex = path.lastIndexOf('.');\n // Get extension after last dot and map to media\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n return (dotIndex >= 0 && mediaMappings?.[path.slice(dotIndex + 1)]) || '';\n}\n\nexport interface IActorDereferenceParseArgs<\n S,\n K extends IParseMetadata = IParseMetadata,\n M extends IParseMetadata = IParseMetadata,\n> extends IActorArgs<IActionDereferenceParse<K>, IActorTest, IActorDereferenceParseOutput<S, M>> {\n mediatorDereference: MediatorDereference;\n mediatorParse: MediateMediaTyped<IActionParse<K>, IActorTest, IActorParseOutput<S, M>>;\n mediatorParseMediatypes: MediateMediaTypes;\n /**\n * A collection of mappings, mapping file extensions to their corresponding media type.\n * @range {json}\n */\n mediaMappings: Record<string, string>;\n}\n\n/**\n * An abstract actor that handles dereference and parse actions.\n *\n * Actor types:\n * Input: IActionDereferenceParse: A URL.\n * Test: <none>\n * Output: IActorDereferenceParseOutput: A data stream of type output by the Parser.\n *\n */\nexport abstract class ActorDereferenceParse<\n S,\n K extends IParseMetadata = IParseMetadata,\n M extends IParseMetadata = IParseMetadata,\n> extends ActorDereferenceBase<IActionDereferenceParse<K>, IActorTest, IActorDereferenceParseOutput<S, M>> {\n public readonly mediatorDereference: MediatorDereference;\n public readonly mediatorParse: MediateMediaTyped<IActionParse<K>, IActorTest, IActorParseOutput<S, M>>;\n public readonly mediatorParseMediatypes: MediateMediaTypes;\n public readonly mediaMappings: Record<string, string>;\n\n public constructor(args: IActorDereferenceParseArgs<S, K, M>) {\n super(args);\n }\n\n public async test(_action: IActionDereference): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n /**\n * If hard errors are disabled, modify the given stream so that errors are delegated to the logger.\n * @param {IActionDereferenceParse} action A dereference action.\n * @param {Readable} data A data stream.\n * @return {Readable} The resulting data stream.\n */\n protected handleDereferenceStreamErrors<L extends IParseMetadata, T extends Readable>(\n action: IActionDereferenceParse<L>,\n data: T,\n ): T {\n // If we don't emit hard errors, make parsing error events log instead, and silence them downstream.\n if (!isHardError(action.context)) {\n data.on('error', (error) => {\n this.logWarn(action.context, error.message, () => ({ url: action.url }));\n // Make sure the errored stream is ended.\n data.push(null);\n });\n data = <PassThrough & T> data.pipe(new PassThrough({ objectMode: true }));\n }\n return data;\n }\n\n public abstract getMetadata(dereference: IActorDereferenceOutput): Promise<K | undefined>;\n\n public async run(action: IActionDereferenceParse<K>): Promise<IActorDereferenceParseOutput<S, M>> {\n const { context } = action;\n const dereference = await this.mediatorDereference.mediate({\n ...action,\n mediaTypes: async() => (await this.mediatorParseMediatypes?.mediate({ context, mediaTypes: true }))?.mediaTypes,\n });\n\n let result: IActorParseOutput<S, M>;\n try {\n result = (await this.mediatorParse.mediate({\n context,\n handle: { context, ...dereference, metadata: await this.getMetadata(dereference) },\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n handleMediaType: (dereference.mediaType ||\n getMediaTypeFromExtension(dereference.url, this.mediaMappings)) ||\n action.mediaType,\n })).handle;\n result.data = this.handleDereferenceStreamErrors(action, result.data);\n } catch (error: unknown) {\n // Close the body, to avoid process to hang\n await dereference.data.close?.();\n result = await this.dereferenceErrorHandler(action, error, {});\n }\n\n // Return the parsed stream and any metadata\n return { ...dereference, ...result };\n }\n}\n\nexport interface IActionDereferenceParse<T extends IParseMetadata = IParseMetadata> extends IActionDereference {\n /**\n * The mediatype of the source (if it can't be inferred from the source)\n */\n mediaType?: string;\n /**\n * Metadata to be given to the parser\n */\n metadata?: T;\n}\n\nexport type IActorDereferenceParseOutput<T, K extends IParseMetadata = IParseMetadata>\n = Omit<IActorDereferenceOutput, 'data'> & IActorParseOutput<T, K>;\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/bus-dereference",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "A bus for dereferencing a path or URL into a (generic) stream.",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/comunica-association"
10
+ },
7
11
  "homepage": "https://comunica.dev/",
8
12
  "repository": {
9
13
  "type": "git",
@@ -36,12 +40,12 @@
36
40
  "build:components": "componentsjs-generator"
37
41
  },
38
42
  "dependencies": {
39
- "@comunica/actor-abstract-mediatyped": "^3.3.0",
40
- "@comunica/actor-abstract-parse": "^3.3.0",
41
- "@comunica/context-entries": "^3.3.0",
42
- "@comunica/core": "^3.3.0",
43
- "@comunica/types": "^3.3.0",
44
- "readable-stream": "^4.4.2"
43
+ "@comunica/actor-abstract-mediatyped": "^4.0.1",
44
+ "@comunica/actor-abstract-parse": "^4.0.1",
45
+ "@comunica/context-entries": "^4.0.1",
46
+ "@comunica/core": "^4.0.1",
47
+ "@comunica/types": "^4.0.1",
48
+ "readable-stream": "^4.5.2"
45
49
  },
46
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
50
+ "gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
47
51
  }