@comunica/actor-rdf-serialize-jsonld 4.5.0 → 5.0.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 CHANGED
@@ -22,8 +22,8 @@ After installing, this package can be added to your engine's configuration as fo
22
22
  {
23
23
  "@context": [
24
24
  ...
25
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-mediatyped/^4.0.0/components/context.jsonld",
26
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^4.0.0/components/context.jsonld"
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-mediatyped/^5.0.0/components/context.jsonld",
26
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^5.0.0/components/context.jsonld"
27
27
  ],
28
28
  "actors": [
29
29
  ...
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^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/bus-rdf-serialize/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^5.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^5.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-rdf-serialize-jsonld",
8
8
  "components": [
@@ -76,37 +76,37 @@
76
76
  "genericTypeInstances": [
77
77
  {
78
78
  "@type": "ParameterRangeGenericTypeReference",
79
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
79
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
80
80
  },
81
81
  {
82
82
  "@type": "ParameterRangeGenericTypeReference",
83
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
83
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
84
84
  },
85
85
  {
86
86
  "@type": "ParameterRangeGenericTypeReference",
87
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
87
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
88
88
  },
89
89
  {
90
90
  "@type": "ParameterRangeGenericTypeReference",
91
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
91
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
92
92
  }
93
93
  ]
94
94
  },
95
95
  {
96
96
  "@type": "ParameterRangeGenericTypeReference",
97
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
97
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
98
98
  },
99
99
  {
100
100
  "@type": "ParameterRangeGenericTypeReference",
101
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
101
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
102
102
  },
103
103
  {
104
104
  "@type": "ParameterRangeGenericTypeReference",
105
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
105
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
106
106
  },
107
107
  {
108
108
  "@type": "ParameterRangeGenericTypeReference",
109
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
109
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
110
110
  }
111
111
  ]
112
112
  },
@@ -143,19 +143,19 @@
143
143
  "genericTypeInstances": [
144
144
  {
145
145
  "@type": "ParameterRangeGenericTypeReference",
146
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
146
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
147
147
  },
148
148
  {
149
149
  "@type": "ParameterRangeGenericTypeReference",
150
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
150
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
151
151
  },
152
152
  {
153
153
  "@type": "ParameterRangeGenericTypeReference",
154
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
154
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
155
155
  },
156
156
  {
157
157
  "@type": "ParameterRangeGenericTypeReference",
158
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
158
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
159
159
  }
160
160
  ]
161
161
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-serialize-jsonld/^5.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-serialize-jsonld",
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
- "carsj": "npmd:@comunica/actor-rdf-serialize-jsonld/^4.0.0/",
6
+ "carsj": "npmd:@comunica/actor-rdf-serialize-jsonld/^5.0.0/",
7
7
  "ActorRdfSerializeJsonLd": {
8
8
  "@id": "carsj:components/ActorRdfSerializeJsonLd.jsonld#ActorRdfSerializeJsonLd",
9
9
  "@prefix": true,
File without changes
@@ -7,6 +7,10 @@ const jsonld_streaming_serializer_1 = require("jsonld-streaming-serializer");
7
7
  * A comunica Jsonld RDF Serialize Actor.
8
8
  */
9
9
  class ActorRdfSerializeJsonLd extends bus_rdf_serialize_1.ActorRdfSerializeFixedMediaTypes {
10
+ /**
11
+ * The number of spaces that should be used to indent stringified JSON.
12
+ */
13
+ jsonStringifyIndentSpaces;
10
14
  /**
11
15
  * @param args -
12
16
  * \ @defaultNested {{
@@ -18,6 +22,7 @@ class ActorRdfSerializeJsonLd extends bus_rdf_serialize_1.ActorRdfSerializeFixed
18
22
  */
19
23
  constructor(args) {
20
24
  super(args);
25
+ this.jsonStringifyIndentSpaces = args.jsonStringifyIndentSpaces;
21
26
  }
22
27
  async runHandle(action, _mediaType, _context) {
23
28
  const writer = new jsonld_streaming_serializer_1.JsonLdSerializer({ space: ' '.repeat(this.jsonStringifyIndentSpaces) });
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfSerializeJsonLd.js","sourceRoot":"","sources":["ActorRdfSerializeJsonLd.ts"],"names":[],"mappings":";;;AAKA,mEAEqC;AAErC,6EAA+D;AAE/D;;GAEG;AACH,MAAa,uBAAwB,SAAQ,oDAAgC;IAM3E;;;;;;;;OAQG;IACH,YAAmB,IAAkC;QACnD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAA2B,EAAE,UAAkB,EAAE,QAAwB;QAE9F,MAAM,MAAM,GAAG,IAAI,8CAAgB,CACjC,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,CACtD,CAAC;QACF,IAAI,IAA2B,CAAC;QAChC,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAChC,sDAAsD;YACtD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;YACpE,IAAI,GAAU,MAAM,CAAC,UAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,IAAI,GAAS,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;CACF;AAlCD,0DAkCC","sourcesContent":["import type {\n IActionRdfSerialize,\n IActorRdfSerializeFixedMediaTypesArgs,\n IActorRdfSerializeOutput,\n} from '@comunica/bus-rdf-serialize';\nimport {\n ActorRdfSerializeFixedMediaTypes,\n} from '@comunica/bus-rdf-serialize';\nimport type { IActionContext } from '@comunica/types';\nimport { JsonLdSerializer } from 'jsonld-streaming-serializer';\n\n/**\n * A comunica Jsonld RDF Serialize Actor.\n */\nexport class ActorRdfSerializeJsonLd extends ActorRdfSerializeFixedMediaTypes {\n /**\n * The number of spaces that should be used to indent stringified JSON.\n */\n public readonly jsonStringifyIndentSpaces: number;\n\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/ld+json\": 1.0\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/ld+json\": \"http://www.w3.org/ns/formats/JSON-LD\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorRdfSerializeJsonLdArgs) {\n super(args);\n }\n\n public async runHandle(action: IActionRdfSerialize, _mediaType: string, _context: IActionContext):\n Promise<IActorRdfSerializeOutput> {\n const writer = new JsonLdSerializer(\n { space: ' '.repeat(this.jsonStringifyIndentSpaces) },\n );\n let data: NodeJS.ReadableStream;\n if ('pipe' in action.quadStream) {\n // Prefer piping if possible, to maintain backpressure\n action.quadStream.on('error', error => writer.emit('error', error));\n data = (<any> action.quadStream).pipe(writer);\n } else {\n data = <any> writer.import(action.quadStream);\n }\n return { data };\n }\n}\n\nexport interface IActorRdfSerializeJsonLdArgs extends IActorRdfSerializeFixedMediaTypesArgs {\n /**\n * The number of spaces that should be used to indent stringified JSON.\n * @range {integer}\n * @default {2}\n */\n jsonStringifyIndentSpaces: number;\n}\n"]}
1
+ {"version":3,"file":"ActorRdfSerializeJsonLd.js","sourceRoot":"","sources":["ActorRdfSerializeJsonLd.ts"],"names":[],"mappings":";;;AAKA,mEAEqC;AAErC,6EAA+D;AAE/D;;GAEG;AACH,MAAa,uBAAwB,SAAQ,oDAAgC;IAC3E;;OAEG;IACa,yBAAyB,CAAS;IAElD;;;;;;;;OAQG;IACH,YAAmB,IAAkC;QACnD,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAA2B,EAAE,UAAkB,EAAE,QAAwB;QAE9F,MAAM,MAAM,GAAG,IAAI,8CAAgB,CACjC,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,CACtD,CAAC;QACF,IAAI,IAA2B,CAAC;QAChC,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAChC,sDAAsD;YACtD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;YACpE,IAAI,GAAU,MAAM,CAAC,UAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,IAAI,GAAS,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;CACF;AAnCD,0DAmCC","sourcesContent":["import type {\n IActionRdfSerialize,\n IActorRdfSerializeFixedMediaTypesArgs,\n IActorRdfSerializeOutput,\n} from '@comunica/bus-rdf-serialize';\nimport {\n ActorRdfSerializeFixedMediaTypes,\n} from '@comunica/bus-rdf-serialize';\nimport type { IActionContext } from '@comunica/types';\nimport { JsonLdSerializer } from 'jsonld-streaming-serializer';\n\n/**\n * A comunica Jsonld RDF Serialize Actor.\n */\nexport class ActorRdfSerializeJsonLd extends ActorRdfSerializeFixedMediaTypes {\n /**\n * The number of spaces that should be used to indent stringified JSON.\n */\n public readonly jsonStringifyIndentSpaces: number;\n\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/ld+json\": 1.0\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/ld+json\": \"http://www.w3.org/ns/formats/JSON-LD\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorRdfSerializeJsonLdArgs) {\n super(args);\n this.jsonStringifyIndentSpaces = args.jsonStringifyIndentSpaces;\n }\n\n public async runHandle(action: IActionRdfSerialize, _mediaType: string, _context: IActionContext):\n Promise<IActorRdfSerializeOutput> {\n const writer = new JsonLdSerializer(\n { space: ' '.repeat(this.jsonStringifyIndentSpaces) },\n );\n let data: NodeJS.ReadableStream;\n if ('pipe' in action.quadStream) {\n // Prefer piping if possible, to maintain backpressure\n action.quadStream.on('error', error => writer.emit('error', error));\n data = (<any> action.quadStream).pipe(writer);\n } else {\n data = <any> writer.import(action.quadStream);\n }\n return { data };\n }\n}\n\nexport interface IActorRdfSerializeJsonLdArgs extends IActorRdfSerializeFixedMediaTypesArgs {\n /**\n * The number of spaces that should be used to indent stringified JSON.\n * @range {integer}\n * @default {2}\n */\n jsonStringifyIndentSpaces: number;\n}\n"]}
package/lib/index.d.ts CHANGED
File without changes
package/lib/index.js CHANGED
File without changes
package/lib/index.js.map CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-serialize-jsonld",
3
- "version": "4.5.0",
3
+ "version": "5.0.0",
4
4
  "description": "A jsonld rdf-serialize actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -41,9 +41,9 @@
41
41
  "build:components": "componentsjs-generator"
42
42
  },
43
43
  "dependencies": {
44
- "@comunica/bus-rdf-serialize": "^4.5.0",
45
- "@comunica/types": "^4.5.0",
46
- "jsonld-streaming-serializer": "^3.0.1"
44
+ "@comunica/bus-rdf-serialize": "^5.0.0",
45
+ "@comunica/types": "^5.0.0",
46
+ "jsonld-streaming-serializer": "^4.0.0"
47
47
  },
48
- "gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
48
+ "gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
49
49
  }