ldn-inbox-server 1.6.6 → 1.6.8
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 +40 -1
- package/lib/util.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -231,7 +231,46 @@ in `public/artifacts-example`. Move this directory tp `public/artifacts` to get
|
|
|
231
231
|
- Each artifact requires at least a `.meta` file with the `X-Artifact` header set to `true` to be recognized by the software as an artifact
|
|
232
232
|
- Each artifact should update the `Link-Template` header in the `.meta` file
|
|
233
233
|
- The config files in `config/inbox_config.json` and `config/outbox_config.json` define the location of the possible event logs for the artifact
|
|
234
|
-
|
|
234
|
+
|
|
235
|
+
## API
|
|
236
|
+
|
|
237
|
+
### getLogger()
|
|
238
|
+
|
|
239
|
+
Returns a LOG4JS logger instance.
|
|
240
|
+
|
|
241
|
+
### fetchOriginal(url)
|
|
242
|
+
|
|
243
|
+
Resolve the url and return the textual body.
|
|
244
|
+
|
|
245
|
+
### backOff_fetch(url,options)
|
|
246
|
+
|
|
247
|
+
Return the result of `fetch(url,options)` (tries many times untill the server responds).
|
|
248
|
+
|
|
249
|
+
### sendNotification(url,payload,options)
|
|
250
|
+
|
|
251
|
+
Send to `url` the payload uptionally a `fetch` can be provided in the options.
|
|
252
|
+
|
|
253
|
+
### moveTo(oldPath, newPath)
|
|
254
|
+
|
|
255
|
+
Move a file from an oldPath to a newPath .
|
|
256
|
+
|
|
257
|
+
### parseAsJSON(path)
|
|
258
|
+
|
|
259
|
+
Parse the path into a JSON document (or return null when failed).
|
|
260
|
+
|
|
261
|
+
### generateId()
|
|
262
|
+
|
|
263
|
+
Generate a uuid URN.
|
|
264
|
+
|
|
265
|
+
### generatePublished()
|
|
266
|
+
|
|
267
|
+
Generate a ISO8601 date time string.
|
|
268
|
+
|
|
269
|
+
### parseConfig(path)
|
|
270
|
+
|
|
271
|
+
Parse a path containing `.json` | `.jsonld` | `.json5` | `.yaml` | `.yml` into a
|
|
272
|
+
JavaScript object.
|
|
273
|
+
|
|
235
274
|
## See also
|
|
236
275
|
|
|
237
276
|
- [mellon-server](https://www.npmjs.com/package/mellon-server)
|
package/lib/util.js
CHANGED
|
@@ -87,8 +87,8 @@ async function sendNotification(url,json,options) {
|
|
|
87
87
|
const response = await fetcher(url, {
|
|
88
88
|
method: 'POST',
|
|
89
89
|
headers: {
|
|
90
|
-
'Accept': 'application/json',
|
|
91
|
-
'Content-Type': 'application/json'
|
|
90
|
+
'Accept': 'application/ld+json',
|
|
91
|
+
'Content-Type': 'application/ld+json'
|
|
92
92
|
},
|
|
93
93
|
body: JSON.stringify(json,null,4)
|
|
94
94
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ldn-inbox-server",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"description": "A demonstration Event Notifications Inbox server",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"jsonpath": "^1.1.1",
|
|
32
32
|
"jsonschema": "^1.4.1",
|
|
33
33
|
"md5": "^2.3.0",
|
|
34
|
-
"mellon-server": "^1.0
|
|
34
|
+
"mellon-server": "^1.1.0",
|
|
35
35
|
"node-fetch": "1.7.3",
|
|
36
36
|
"piscina": "^4.4.0",
|
|
37
37
|
"proper-lockfile": "^4.1.2",
|