@comunica/actor-rdf-parse-html-script
Advanced tools
Comparing version 1.13.0 to 1.14.0
15
index.js
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./lib/ActorRdfParseHtmlScript")); | ||
__exportStar(require("./lib/ActorRdfParseHtmlScript"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,4 +0,4 @@ | ||
import { IActionHandleRdfParse, IActionMediaTypesRdfParse, IActorOutputHandleRdfParse, IActorOutputMediaTypesRdfParse, IActorTestHandleRdfParse, IActorTestMediaTypesRdfParse } from "@comunica/bus-rdf-parse"; | ||
import { ActorRdfParseHtml, IActionRdfParseHtml, IActorRdfParseHtmlOutput } from "@comunica/bus-rdf-parse-html"; | ||
import { Actor, IActorArgs, IActorTest, Mediator } from "@comunica/core"; | ||
import { IActionHandleRdfParse, IActionMediaTypesRdfParse, IActorOutputHandleRdfParse, IActorOutputMediaTypesRdfParse, IActorTestHandleRdfParse, IActorTestMediaTypesRdfParse } from '@comunica/bus-rdf-parse'; | ||
import { ActorRdfParseHtml, IActionRdfParseHtml, IActorRdfParseHtmlOutput } from '@comunica/bus-rdf-parse-html'; | ||
import { Actor, IActorArgs, IActorTest, Mediator } from '@comunica/core'; | ||
/** | ||
@@ -5,0 +5,0 @@ * A HTML script RDF Parse actor that listens on the 'rdf-parse' bus. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ActorRdfParseHtmlScript = void 0; | ||
const bus_rdf_parse_html_1 = require("@comunica/bus-rdf-parse-html"); | ||
@@ -4,0 +5,0 @@ const HtmlScriptListener_1 = require("./HtmlScriptListener"); |
@@ -1,5 +0,5 @@ | ||
import { IActionHandleRdfParse, IActorOutputHandleRdfParse, IActorTestHandleRdfParse } from "@comunica/bus-rdf-parse"; | ||
import { IHtmlParseListener } from "@comunica/bus-rdf-parse-html"; | ||
import { ActionContext, Actor, Mediator } from "@comunica/core"; | ||
import * as RDF from "rdf-js"; | ||
import { IActionHandleRdfParse, IActorOutputHandleRdfParse, IActorTestHandleRdfParse } from '@comunica/bus-rdf-parse'; | ||
import { IHtmlParseListener } from '@comunica/bus-rdf-parse-html'; | ||
import { ActionContext, Actor, Mediator } from '@comunica/core'; | ||
import * as RDF from 'rdf-js'; | ||
/** | ||
@@ -6,0 +6,0 @@ * An HTML parse listeners that detects <script> data blocks with known RDF media tyoes, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HtmlScriptListener = void 0; | ||
const stream_1 = require("stream"); | ||
@@ -11,2 +12,3 @@ const relative_to_absolute_iri_1 = require("relative-to-absolute-iri"); | ||
constructor(mediatorRdfParseHandle, cbQuad, cbError, cbEnd, supportedTypes, context, baseIRI, headers) { | ||
var _a; | ||
this.textChunksJsonLd = []; | ||
@@ -24,5 +26,5 @@ this.endBarrier = 1; | ||
this.headers = headers; | ||
this.onlyFirstScript = context && context.get('extractAllScripts') === false || false; | ||
this.onlyFirstScript = (_a = (context && context.get('extractAllScripts') === false)) !== null && _a !== void 0 ? _a : false; | ||
const fragmentPos = this.baseIRI.indexOf('#'); | ||
this.targetScriptId = fragmentPos > 0 ? this.baseIRI.substr(fragmentPos + 1, this.baseIRI.length) : null; | ||
this.targetScriptId = fragmentPos > 0 ? this.baseIRI.slice(fragmentPos + 1, this.baseIRI.length) : null; | ||
} | ||
@@ -45,3 +47,4 @@ static newErrorCoded(message, code) { | ||
this.endBarrier++; | ||
this.onTagClose(); // This will call onEnd again | ||
// This will call onEnd again | ||
this.onTagClose(); | ||
} | ||
@@ -69,3 +72,5 @@ else { | ||
const textStream = new stream_1.Readable({ objectMode: true }); | ||
textStream._read = () => { return; }; | ||
textStream._read = () => { | ||
// Do nothing | ||
}; | ||
const textChunksLocal = this.textChunks; | ||
@@ -82,3 +87,4 @@ // Send all collected text to parser | ||
handle.quads | ||
.on('error', (error) => this.cbError(HtmlScriptListener.newErrorCoded(error.message, 'invalid script element'))) | ||
.on('error', error => this.cbError(HtmlScriptListener | ||
.newErrorCoded(error.message, 'invalid script element'))) | ||
.on('data', this.cbQuad) | ||
@@ -85,0 +91,0 @@ .on('end', () => this.onEnd()); |
{ | ||
"name": "@comunica/actor-rdf-parse-html-script", | ||
"version": "1.13.0", | ||
"version": "1.14.0", | ||
"description": "A html-script rdf-parse actor", | ||
@@ -38,2 +38,3 @@ "lsd:module": "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-parse-html-script", | ||
"dependencies": { | ||
"@types/rdf-js": "^3.0.0", | ||
"relative-to-absolute-iri": "^1.0.5" | ||
@@ -46,4 +47,4 @@ }, | ||
"devDependencies": { | ||
"@comunica/bus-rdf-parse": "^1.13.0", | ||
"@comunica/core": "^1.13.0" | ||
"@comunica/bus-rdf-parse": "^1.14.0", | ||
"@comunica/core": "^1.14.0" | ||
}, | ||
@@ -53,3 +54,3 @@ "jest": { | ||
"ts-jest": { | ||
"tsConfig": "test/tsconfig.json" | ||
"tsConfig": "../../tsconfig.json" | ||
} | ||
@@ -70,7 +71,6 @@ }, | ||
"test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch", | ||
"lint": "node \"../../node_modules/tslint/bin/tslint\" lib/**/*.ts test/**/*.ts --exclude '**/*.d.ts'", | ||
"build": "node \"../../node_modules/typescript/bin/tsc\"", | ||
"validate": "npm ls" | ||
}, | ||
"gitHead": "cd8df73fe091e3d7413147ec5301b47be2de392a" | ||
"gitHead": "6517367d95ef072468bfc0d88cf3a27f6d25a145" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18126
259
4
+ Added@types/rdf-js@^3.0.0
+ Added@types/rdf-js@3.0.3(transitive)