Comparing version 1.0.0-alpha.8 to 1.0.0-alpha.9
@@ -5,2 +5,9 @@ # Changelog | ||
## [1.0.0-alpha.9](https://github.com/wikibus/alcaeus/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2020-02-04) | ||
### Bug Fixes | ||
* **build:** reduce bundle size by updating rdf-transform-to-quad ([fa9cc01](https://github.com/wikibus/alcaeus/commit/fa9cc01899b05da443359bbd3c28ea80fb6de498)) | ||
## [1.0.0-alpha.8](https://github.com/wikibus/alcaeus/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2020-01-29) | ||
@@ -7,0 +14,0 @@ |
@@ -94,2 +94,1 @@ import Parsers from '@rdfjs/sink-map'; | ||
} | ||
//# sourceMappingURL=alcaeus.js.map |
@@ -6,2 +6,1 @@ export const Headers = { | ||
}; | ||
//# sourceMappingURL=Constants.js.map |
@@ -26,2 +26,1 @@ import ResponseWrapper from './ResponseWrapper'; | ||
} | ||
//# sourceMappingURL=FetchUtil.js.map |
@@ -9,2 +9,1 @@ export function merge(headers, overrides) { | ||
} | ||
//# sourceMappingURL=MergeHeaders.js.map |
@@ -17,2 +17,1 @@ export default function nonenumerable(target, key) { | ||
} | ||
//# sourceMappingURL=nonenumerable.js.map |
@@ -7,4 +7,4 @@ import cf from 'clownface'; | ||
export function create(uri, response, dataset, factory, alcaeus) { | ||
const resources = new ResourceGraph(dataset, factory); | ||
const representationGraph = cf({ dataset, graph: $rdf.namedNode(uri) }); | ||
const resources = new ResourceGraph(representationGraph, factory); | ||
function createEntity(node) { | ||
@@ -46,2 +46,1 @@ return factory.createEntity(cf({ | ||
} | ||
//# sourceMappingURL=HydraResponse.js.map |
@@ -1,2 +0,2 @@ | ||
import { ResourceFactory } from '@tpluscode/rdfine'; | ||
import { ResourceFactoryImpl } from '@tpluscode/rdfine'; | ||
import { Alcaeus } from './alcaeus'; | ||
@@ -17,3 +17,3 @@ import * as coreMixins from './Resources/CoreMixins'; | ||
} | ||
factory = new ResourceFactory(HydraResource); | ||
factory = new ResourceFactoryImpl(HydraResource); | ||
const alcaeus = new Alcaeus(rootSelectors || defaultRootSelectors, factory); | ||
@@ -30,2 +30,1 @@ if (parsers) { | ||
export default create(); | ||
//# sourceMappingURL=index.js.map |
@@ -10,2 +10,1 @@ export class JsonLdUtil { | ||
} | ||
//# sourceMappingURL=JsonLdUtil.js.map |
@@ -13,2 +13,1 @@ import $rdf from 'rdf-ext'; | ||
}; | ||
//# sourceMappingURL=index.js.map |
export { inferTypesFromPropertyRanges } from './propertyTypes'; | ||
export { addExplicitStatementsInferredFromManagesBlock } from './managesBlock'; | ||
//# sourceMappingURL=index.js.map |
@@ -31,2 +31,1 @@ import cf from 'clownface'; | ||
} | ||
//# sourceMappingURL=managesBlock.js.map |
@@ -20,2 +20,1 @@ import cf from 'clownface'; | ||
} | ||
//# sourceMappingURL=propertyTypes.js.map |
@@ -15,2 +15,1 @@ export { ApiDocumentationMixin } from './Resources/Mixins/ApiDocumentation'; | ||
export { SupportedPropertyMixin } from './Resources/Mixins/SupportedProperty'; | ||
//# sourceMappingURL=ResourceFactoryDefaults.js.map |
@@ -1,7 +0,4 @@ | ||
import cf from 'clownface'; | ||
export default class { | ||
constructor(dataset, factory) { | ||
this.__graph = cf({ | ||
dataset, | ||
}); | ||
constructor(graph, factory) { | ||
this.__graph = graph; | ||
this.__factory = factory; | ||
@@ -17,2 +14,1 @@ } | ||
} | ||
//# sourceMappingURL=ResourceGraph.js.map |
@@ -24,3 +24,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}, []); | ||
const propertyOperations = [...this._node.dataset.match(null, null, this._node.term)] | ||
const propertyOperations = [...this._selfGraph.dataset.match(null, null, this._selfGraph.term)] | ||
.reduce((operations, quad) => { | ||
@@ -30,3 +30,3 @@ if (quad.subject.termType !== 'NamedNode') { | ||
} | ||
const subject = this._create(this._node.namedNode(quad.subject)); | ||
const subject = this._create(this._selfGraph.namedNode(quad.subject)); | ||
return [...subject.types.values()].reduce((operations, clas) => { | ||
@@ -98,2 +98,1 @@ if ('supportedProperties' in clas) { | ||
} | ||
//# sourceMappingURL=HydraResource.js.map |
export { createHydraResourceMixin } from './HydraResource'; | ||
export { OperationFinderMixin } from './OperationFinder'; | ||
export { createResourceLoaderMixin } from './ResourceLoaderMixin'; | ||
//# sourceMappingURL=index.js.map |
@@ -73,3 +73,3 @@ import { hydra, rdf } from '../../Vocabs'; | ||
if (quad.object.termType === 'NamedNode' || quad.object.termType === 'BlankNode') { | ||
return [...nodes, self._create(self._node.node(quad.object), mixins)]; | ||
return [...nodes, self._create(self._selfGraph.node(quad.object), mixins)]; | ||
} | ||
@@ -82,3 +82,3 @@ return nodes; | ||
getOperationsDeep(stopConditions = { excludedProperties: [hydra.member, rdf.type] }, previousResources = []) { | ||
const childResources = [...this._node.dataset.match(this.id)] | ||
const childResources = [...this._selfGraph.dataset.match(this.id)] | ||
.filter(excludedProperties(stopConditions)) | ||
@@ -124,2 +124,1 @@ .reduce(toResourceNodes(this, [OperationFinderMixin]), []); | ||
OperationFinderMixin.shouldApply = true; | ||
//# sourceMappingURL=OperationFinder.js.map |
@@ -14,2 +14,1 @@ export function createResourceLoaderMixin(alcaeus) { | ||
} | ||
//# sourceMappingURL=ResourceLoaderMixin.js.map |
@@ -42,2 +42,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
ApiDocumentationMixin.shouldApply = (res) => res.hasType(hydra.ApiDocumentation); | ||
//# sourceMappingURL=ApiDocumentation.js.map |
@@ -16,3 +16,3 @@ import { hydra } from '../../Vocabs'; | ||
const isTemplate = resource.hasType(hydra.IriTemplate); | ||
const variableRepresentation = resource._node.out(hydra.variableRepresentation); | ||
const variableRepresentation = resource._selfGraph.out(hydra.variableRepresentation); | ||
const isUndefined = variableRepresentation.terms.length === 0; | ||
@@ -22,2 +22,1 @@ const isExactMatch = variableRepresentation.values.includes(hydra.BasicRepresentation.value); | ||
}; | ||
//# sourceMappingURL=BasicRepresentationExpansion.js.map |
@@ -10,3 +10,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
import { property } from '@tpluscode/rdfine'; | ||
import { property, TypeCollectionImpl } from '@tpluscode/rdfine'; | ||
import { hydra, rdfs } from '../../Vocabs'; | ||
@@ -17,2 +17,5 @@ import { SupportedOperationMixin } from './SupportedOperation'; | ||
class ClassClass extends Base { | ||
get types() { | ||
return new TypeCollectionImpl(this, true); | ||
} | ||
get supportedOperations() { | ||
@@ -60,2 +63,3 @@ return [...this.getTypeHierarchy()].reduce((operations, type) => { | ||
as: [SupportedOperationMixin], | ||
subjectFromAllGraphs: true, | ||
}), | ||
@@ -69,2 +73,3 @@ __metadata("design:type", Array) | ||
as: [SupportedPropertyMixin], | ||
subjectFromAllGraphs: true, | ||
}), | ||
@@ -76,2 +81,1 @@ __metadata("design:type", Array) | ||
ClassMixin.shouldApply = (res) => res.hasType(hydra.Class); | ||
//# sourceMappingURL=Class.js.map |
@@ -47,2 +47,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
CollectionMixin.shouldApply = (res) => res.hasType(hydra.Collection); | ||
//# sourceMappingURL=Collection.js.map |
@@ -13,3 +13,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
function getTitle(res) { | ||
return res._node.out([ | ||
return res._selfGraph.out([ | ||
hydra.title, rdfs.label, schema.title, | ||
@@ -19,3 +19,3 @@ ]); | ||
function getDescription(res) { | ||
return res._node.out([ | ||
return res._selfGraph.out([ | ||
hydra.description, rdfs.comment, schema.description, | ||
@@ -64,2 +64,1 @@ ]); | ||
}; | ||
//# sourceMappingURL=DocumentedResource.js.map |
@@ -30,2 +30,1 @@ import URITemplate from 'es6-url-template'; | ||
} | ||
//# sourceMappingURL=ExpansionModelBuilder.js.map |
@@ -25,6 +25,5 @@ import ExpansionModelBuilder from './ExpansionModelBuilder'; | ||
const isTemplate = resource.hasType(hydra.IriTemplate); | ||
const isExplicitRepresentation = resource._node.out(hydra.variableRepresentation) | ||
const isExplicitRepresentation = resource._selfGraph.out(hydra.variableRepresentation) | ||
.values.includes(hydra.ExplicitRepresentation.value); | ||
return isTemplate && isExplicitRepresentation; | ||
}; | ||
//# sourceMappingURL=ExplicitRepresentationExpansion.js.map |
@@ -43,2 +43,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
IriTemplateMixin.shouldApply = (res) => res.hasType(hydra.IriTemplate); | ||
//# sourceMappingURL=IriTemplate.js.map |
@@ -43,2 +43,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
IriTemplateMappingMixin.shouldApply = (res) => res.hasType(hydra.IriTemplateMapping); | ||
//# sourceMappingURL=IriTemplateMapping.js.map |
@@ -24,5 +24,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
matches({ subject = '', predicate = rdf.type, object = '' }) { | ||
const predicateId = getUri(this._node, predicate); | ||
const objectId = getUri(this._node, object); | ||
const subjectId = getUri(this._node, subject); | ||
const predicateId = getUri(this._selfGraph, predicate); | ||
const objectId = getUri(this._selfGraph, object); | ||
const subjectId = getUri(this._selfGraph, subject); | ||
if (object && this.object && this.property) { | ||
@@ -56,4 +56,3 @@ const predicateIsRdfType = rdf.type.equals(predicateId); | ||
ManagesBlockMixin.shouldApply = (res) => { | ||
return res._node.in(hydra.manages).terms.length > 0; | ||
return res._selfGraph.in(hydra.manages).terms.length > 0; | ||
}; | ||
//# sourceMappingURL=ManagesBlock.js.map |
@@ -15,3 +15,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
get collection() { | ||
const collection = this._node.in(hydra.view); | ||
const collection = this._selfGraph.in(hydra.view); | ||
return collection.toArray() | ||
@@ -51,2 +51,1 @@ .reduce((namedNodes, node) => { | ||
PartialCollectionViewMixin.shouldApply = (res) => res.hasType(hydra.PartialCollectionView); | ||
//# sourceMappingURL=PartialCollectionView.js.map |
@@ -46,2 +46,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
RdfPropertyMixin.shouldApply = (res) => res.hasType(rdf.Property); | ||
//# sourceMappingURL=RdfProperty.js.map |
@@ -31,2 +31,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
StatusCodeDescriptionMixin.shouldApply = (res) => res.hasType(hydra.StatusCodeDescription); | ||
//# sourceMappingURL=StatusCodeDescription.js.map |
@@ -46,2 +46,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
SupportedOperationMixin.shouldApply = (res) => res.hasType(hydra.Operation); | ||
//# sourceMappingURL=SupportedOperation.js.map |
@@ -52,2 +52,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
SupportedPropertyMixin.shouldApply = (res) => res.hasType(hydra.SupportedProperty); | ||
//# sourceMappingURL=SupportedProperty.js.map |
@@ -15,2 +15,1 @@ import { owl } from '../Vocabs'; | ||
NothingMixin.shouldApply = (res) => owl.Nothing.equals(res.id); | ||
//# sourceMappingURL=Nothing.js.map |
@@ -55,2 +55,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
], default_1.prototype, "__client", void 0); | ||
//# sourceMappingURL=Operation.js.map |
@@ -18,4 +18,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
get(property, { strict } = { strict: false }) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const objects = this._node.out(propertyNode) | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const objects = this._selfGraph.out(propertyNode) | ||
.filter(({ term }) => term.termType === 'NamedNode' || term.termType === 'BlankNode') | ||
@@ -34,4 +34,4 @@ .map((obj) => { | ||
getArray(property) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const values = this._node.out(propertyNode) | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const values = this._selfGraph.out(propertyNode) | ||
.filter(({ term }) => term.termType === 'NamedNode' || term.termType === 'BlankNode') | ||
@@ -75,3 +75,3 @@ .map(obj => { | ||
if (value.termType === 'Literal' && xsd.boolean.equals(value.datatype)) { | ||
return value.equals(this._node.literal(true).term); | ||
return value.equals(this._selfGraph.literal(true).term); | ||
} | ||
@@ -81,4 +81,4 @@ throw new Error(`Expected property '${property}' to be a boolean but found '${value}'`); | ||
__getNodes(property, { strict } = { strict: false }) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const objects = this._node.out(propertyNode).terms; | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const objects = this._selfGraph.out(propertyNode).terms; | ||
if (objects.length > 0) { | ||
@@ -98,2 +98,1 @@ return objects; | ||
], ResourceImpl.prototype, "isAnonymous", null); | ||
//# sourceMappingURL=Resource.js.map |
@@ -51,2 +51,1 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
], default_1.prototype, "xhr", void 0); | ||
//# sourceMappingURL=ResponseWrapper.js.map |
@@ -11,2 +11,1 @@ import * as Constants from '../Constants'; | ||
}; | ||
//# sourceMappingURL=201LocationSelector.js.map |
@@ -15,2 +15,1 @@ import li from 'parse-link-header'; | ||
}; | ||
//# sourceMappingURL=CanonicalLinkSelector.js.map |
@@ -6,2 +6,1 @@ export default { | ||
}; | ||
//# sourceMappingURL=ExactIdMatchSelector.js.map |
@@ -14,2 +14,1 @@ import CanonicalLinkSelector from './CanonicalLinkSelector'; | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,1 @@ import { hydra } from '../Vocabs'; | ||
} | ||
//# sourceMappingURL=PartialCollectionViewSelector.js.map |
@@ -6,2 +6,1 @@ export default { | ||
}; | ||
//# sourceMappingURL=RedirectTargetSelector.js.map |
@@ -13,2 +13,1 @@ export default { | ||
}; | ||
//# sourceMappingURL=TrailingSlashSelector.js.map |
@@ -10,2 +10,1 @@ import namespace from '@rdfjs/namespace'; | ||
export const foaf = namespace('http://xmlns.com/foaf/0.1/'); | ||
//# sourceMappingURL=Vocabs.js.map |
@@ -107,2 +107,1 @@ "use strict"; | ||
exports.Alcaeus = Alcaeus; | ||
//# sourceMappingURL=alcaeus.js.map |
@@ -8,2 +8,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=Constants.js.map |
@@ -33,2 +33,1 @@ "use strict"; | ||
exports.invokeOperation = invokeOperation; | ||
//# sourceMappingURL=FetchUtil.js.map |
@@ -12,2 +12,1 @@ "use strict"; | ||
exports.merge = merge; | ||
//# sourceMappingURL=MergeHeaders.js.map |
@@ -20,2 +20,1 @@ "use strict"; | ||
exports.default = nonenumerable; | ||
//# sourceMappingURL=nonenumerable.js.map |
@@ -12,4 +12,4 @@ "use strict"; | ||
function create(uri, response, dataset, factory, alcaeus) { | ||
const resources = new ResourceGraph_1.default(dataset, factory); | ||
const representationGraph = clownface_1.default({ dataset, graph: rdf_ext_1.default.namedNode(uri) }); | ||
const resources = new ResourceGraph_1.default(representationGraph, factory); | ||
function createEntity(node) { | ||
@@ -52,2 +52,1 @@ return factory.createEntity(clownface_1.default({ | ||
exports.create = create; | ||
//# sourceMappingURL=HydraResponse.js.map |
@@ -31,3 +31,3 @@ "use strict"; | ||
} | ||
factory = new rdfine_1.ResourceFactory(HydraResource); | ||
factory = new rdfine_1.ResourceFactoryImpl(HydraResource); | ||
const alcaeus = new alcaeus_1.Alcaeus(rootSelectors || exports.defaultRootSelectors, factory); | ||
@@ -45,2 +45,1 @@ if (parsers) { | ||
exports.default = create(); | ||
//# sourceMappingURL=index.js.map |
@@ -9,2 +9,1 @@ "use strict"; | ||
__export(require(".")); | ||
//# sourceMappingURL=index.node.js.map |
@@ -13,2 +13,1 @@ "use strict"; | ||
exports.JsonLdUtil = JsonLdUtil; | ||
//# sourceMappingURL=JsonLdUtil.js.map |
@@ -25,2 +25,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -7,2 +7,1 @@ "use strict"; | ||
exports.addExplicitStatementsInferredFromManagesBlock = managesBlock_1.addExplicitStatementsInferredFromManagesBlock; | ||
//# sourceMappingURL=index.js.map |
@@ -37,2 +37,1 @@ "use strict"; | ||
exports.addExplicitStatementsInferredFromManagesBlock = addExplicitStatementsInferredFromManagesBlock; | ||
//# sourceMappingURL=managesBlock.js.map |
@@ -26,2 +26,1 @@ "use strict"; | ||
exports.inferTypesFromPropertyRanges = inferTypesFromPropertyRanges; | ||
//# sourceMappingURL=propertyTypes.js.map |
@@ -31,2 +31,1 @@ "use strict"; | ||
exports.SupportedPropertyMixin = SupportedProperty_1.SupportedPropertyMixin; | ||
//# sourceMappingURL=ResourceFactoryDefaults.js.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const clownface_1 = __importDefault(require("clownface")); | ||
class default_1 { | ||
constructor(dataset, factory) { | ||
this.__graph = clownface_1.default({ | ||
dataset, | ||
}); | ||
constructor(graph, factory) { | ||
this.__graph = graph; | ||
this.__factory = factory; | ||
@@ -23,2 +17,1 @@ } | ||
exports.default = default_1; | ||
//# sourceMappingURL=ResourceGraph.js.map |
@@ -29,3 +29,3 @@ "use strict"; | ||
}, []); | ||
const propertyOperations = [...this._node.dataset.match(null, null, this._node.term)] | ||
const propertyOperations = [...this._selfGraph.dataset.match(null, null, this._selfGraph.term)] | ||
.reduce((operations, quad) => { | ||
@@ -35,3 +35,3 @@ if (quad.subject.termType !== 'NamedNode') { | ||
} | ||
const subject = this._create(this._node.namedNode(quad.subject)); | ||
const subject = this._create(this._selfGraph.namedNode(quad.subject)); | ||
return [...subject.types.values()].reduce((operations, clas) => { | ||
@@ -104,2 +104,1 @@ if ('supportedProperties' in clas) { | ||
exports.createHydraResourceMixin = createHydraResourceMixin; | ||
//# sourceMappingURL=HydraResource.js.map |
@@ -9,2 +9,1 @@ "use strict"; | ||
exports.createResourceLoaderMixin = ResourceLoaderMixin_1.createResourceLoaderMixin; | ||
//# sourceMappingURL=index.js.map |
@@ -75,3 +75,3 @@ "use strict"; | ||
if (quad.object.termType === 'NamedNode' || quad.object.termType === 'BlankNode') { | ||
return [...nodes, self._create(self._node.node(quad.object), mixins)]; | ||
return [...nodes, self._create(self._selfGraph.node(quad.object), mixins)]; | ||
} | ||
@@ -84,3 +84,3 @@ return nodes; | ||
getOperationsDeep(stopConditions = { excludedProperties: [Vocabs_1.hydra.member, Vocabs_1.rdf.type] }, previousResources = []) { | ||
const childResources = [...this._node.dataset.match(this.id)] | ||
const childResources = [...this._selfGraph.dataset.match(this.id)] | ||
.filter(excludedProperties(stopConditions)) | ||
@@ -127,2 +127,1 @@ .reduce(toResourceNodes(this, [OperationFinderMixin]), []); | ||
OperationFinderMixin.shouldApply = true; | ||
//# sourceMappingURL=OperationFinder.js.map |
@@ -17,2 +17,1 @@ "use strict"; | ||
exports.createResourceLoaderMixin = createResourceLoaderMixin; | ||
//# sourceMappingURL=ResourceLoaderMixin.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=index.js.map |
@@ -45,2 +45,1 @@ "use strict"; | ||
ApiDocumentationMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.ApiDocumentation); | ||
//# sourceMappingURL=ApiDocumentation.js.map |
@@ -22,3 +22,3 @@ "use strict"; | ||
const isTemplate = resource.hasType(Vocabs_1.hydra.IriTemplate); | ||
const variableRepresentation = resource._node.out(Vocabs_1.hydra.variableRepresentation); | ||
const variableRepresentation = resource._selfGraph.out(Vocabs_1.hydra.variableRepresentation); | ||
const isUndefined = variableRepresentation.terms.length === 0; | ||
@@ -28,2 +28,1 @@ const isExactMatch = variableRepresentation.values.includes(Vocabs_1.hydra.BasicRepresentation.value); | ||
}; | ||
//# sourceMappingURL=BasicRepresentationExpansion.js.map |
@@ -18,2 +18,5 @@ "use strict"; | ||
class ClassClass extends Base { | ||
get types() { | ||
return new rdfine_1.TypeCollectionImpl(this, true); | ||
} | ||
get supportedOperations() { | ||
@@ -61,2 +64,3 @@ return [...this.getTypeHierarchy()].reduce((operations, type) => { | ||
as: [SupportedOperation_1.SupportedOperationMixin], | ||
subjectFromAllGraphs: true, | ||
}), | ||
@@ -70,2 +74,3 @@ __metadata("design:type", Array) | ||
as: [SupportedProperty_1.SupportedPropertyMixin], | ||
subjectFromAllGraphs: true, | ||
}), | ||
@@ -78,2 +83,1 @@ __metadata("design:type", Array) | ||
ClassMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.Class); | ||
//# sourceMappingURL=Class.js.map |
@@ -50,2 +50,1 @@ "use strict"; | ||
CollectionMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.Collection); | ||
//# sourceMappingURL=Collection.js.map |
@@ -15,3 +15,3 @@ "use strict"; | ||
function getTitle(res) { | ||
return res._node.out([ | ||
return res._selfGraph.out([ | ||
Vocabs_1.hydra.title, Vocabs_1.rdfs.label, Vocabs_1.schema.title, | ||
@@ -21,3 +21,3 @@ ]); | ||
function getDescription(res) { | ||
return res._node.out([ | ||
return res._selfGraph.out([ | ||
Vocabs_1.hydra.description, Vocabs_1.rdfs.comment, Vocabs_1.schema.description, | ||
@@ -67,2 +67,1 @@ ]); | ||
}; | ||
//# sourceMappingURL=DocumentedResource.js.map |
@@ -36,2 +36,1 @@ "use strict"; | ||
exports.default = default_1; | ||
//# sourceMappingURL=ExpansionModelBuilder.js.map |
@@ -31,6 +31,5 @@ "use strict"; | ||
const isTemplate = resource.hasType(Vocabs_1.hydra.IriTemplate); | ||
const isExplicitRepresentation = resource._node.out(Vocabs_1.hydra.variableRepresentation) | ||
const isExplicitRepresentation = resource._selfGraph.out(Vocabs_1.hydra.variableRepresentation) | ||
.values.includes(Vocabs_1.hydra.ExplicitRepresentation.value); | ||
return isTemplate && isExplicitRepresentation; | ||
}; | ||
//# sourceMappingURL=ExplicitRepresentationExpansion.js.map |
@@ -46,2 +46,1 @@ "use strict"; | ||
IriTemplateMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.IriTemplate); | ||
//# sourceMappingURL=IriTemplate.js.map |
@@ -46,2 +46,1 @@ "use strict"; | ||
IriTemplateMappingMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.IriTemplateMapping); | ||
//# sourceMappingURL=IriTemplateMapping.js.map |
@@ -26,5 +26,5 @@ "use strict"; | ||
matches({ subject = '', predicate = Vocabs_1.rdf.type, object = '' }) { | ||
const predicateId = getUri(this._node, predicate); | ||
const objectId = getUri(this._node, object); | ||
const subjectId = getUri(this._node, subject); | ||
const predicateId = getUri(this._selfGraph, predicate); | ||
const objectId = getUri(this._selfGraph, object); | ||
const subjectId = getUri(this._selfGraph, subject); | ||
if (object && this.object && this.property) { | ||
@@ -59,4 +59,3 @@ const predicateIsRdfType = Vocabs_1.rdf.type.equals(predicateId); | ||
ManagesBlockMixin.shouldApply = (res) => { | ||
return res._node.in(Vocabs_1.hydra.manages).terms.length > 0; | ||
return res._selfGraph.in(Vocabs_1.hydra.manages).terms.length > 0; | ||
}; | ||
//# sourceMappingURL=ManagesBlock.js.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
get collection() { | ||
const collection = this._node.in(Vocabs_1.hydra.view); | ||
const collection = this._selfGraph.in(Vocabs_1.hydra.view); | ||
return collection.toArray() | ||
@@ -54,2 +54,1 @@ .reduce((namedNodes, node) => { | ||
PartialCollectionViewMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.PartialCollectionView); | ||
//# sourceMappingURL=PartialCollectionView.js.map |
@@ -49,2 +49,1 @@ "use strict"; | ||
RdfPropertyMixin.shouldApply = (res) => res.hasType(Vocabs_1.rdf.Property); | ||
//# sourceMappingURL=RdfProperty.js.map |
@@ -34,2 +34,1 @@ "use strict"; | ||
StatusCodeDescriptionMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.StatusCodeDescription); | ||
//# sourceMappingURL=StatusCodeDescription.js.map |
@@ -49,2 +49,1 @@ "use strict"; | ||
SupportedOperationMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.Operation); | ||
//# sourceMappingURL=SupportedOperation.js.map |
@@ -55,2 +55,1 @@ "use strict"; | ||
SupportedPropertyMixin.shouldApply = (res) => res.hasType(Vocabs_1.hydra.SupportedProperty); | ||
//# sourceMappingURL=SupportedProperty.js.map |
@@ -18,2 +18,1 @@ "use strict"; | ||
NothingMixin.shouldApply = (res) => Vocabs_1.owl.Nothing.equals(res.id); | ||
//# sourceMappingURL=Nothing.js.map |
@@ -61,2 +61,1 @@ "use strict"; | ||
exports.default = default_1; | ||
//# sourceMappingURL=Operation.js.map |
@@ -23,4 +23,4 @@ "use strict"; | ||
get(property, { strict } = { strict: false }) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const objects = this._node.out(propertyNode) | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const objects = this._selfGraph.out(propertyNode) | ||
.filter(({ term }) => term.termType === 'NamedNode' || term.termType === 'BlankNode') | ||
@@ -39,4 +39,4 @@ .map((obj) => { | ||
getArray(property) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const values = this._node.out(propertyNode) | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const values = this._selfGraph.out(propertyNode) | ||
.filter(({ term }) => term.termType === 'NamedNode' || term.termType === 'BlankNode') | ||
@@ -80,3 +80,3 @@ .map(obj => { | ||
if (value.termType === 'Literal' && Vocabs_1.xsd.boolean.equals(value.datatype)) { | ||
return value.equals(this._node.literal(true).term); | ||
return value.equals(this._selfGraph.literal(true).term); | ||
} | ||
@@ -86,4 +86,4 @@ throw new Error(`Expected property '${property}' to be a boolean but found '${value}'`); | ||
__getNodes(property, { strict } = { strict: false }) { | ||
let propertyNode = typeof property === 'string' ? this._node.namedNode(property) : property; | ||
const objects = this._node.out(propertyNode).terms; | ||
let propertyNode = typeof property === 'string' ? this._selfGraph.namedNode(property) : property; | ||
const objects = this._selfGraph.out(propertyNode).terms; | ||
if (objects.length > 0) { | ||
@@ -104,2 +104,1 @@ return objects; | ||
exports.default = ResourceImpl; | ||
//# sourceMappingURL=Resource.js.map |
@@ -64,2 +64,1 @@ "use strict"; | ||
exports.default = default_1; | ||
//# sourceMappingURL=ResponseWrapper.js.map |
@@ -20,2 +20,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=201LocationSelector.js.map |
@@ -27,2 +27,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=CanonicalLinkSelector.js.map |
@@ -8,2 +8,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=ExactIdMatchSelector.js.map |
@@ -19,2 +19,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -16,2 +16,1 @@ "use strict"; | ||
exports.default = default_1; | ||
//# sourceMappingURL=PartialCollectionViewSelector.js.map |
@@ -8,2 +8,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=RedirectTargetSelector.js.map |
@@ -15,2 +15,1 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=TrailingSlashSelector.js.map |
@@ -15,2 +15,1 @@ "use strict"; | ||
exports.foaf = namespace_1.default('http://xmlns.com/foaf/0.1/'); | ||
//# sourceMappingURL=Vocabs.js.map |
{ | ||
"name": "alcaeus", | ||
"version": "1.0.0-alpha.8", | ||
"version": "1.0.0-alpha.9", | ||
"description": "Hydra Core hypermedia-aware client library", | ||
@@ -13,4 +13,7 @@ "main": "lib/node/index.node.js", | ||
"files": [ | ||
"types", | ||
"lib" | ||
"lib", | ||
"*.d.ts", | ||
"*.d.ts.map", | ||
"**/*.d.ts", | ||
"**/*.d.ts.map" | ||
], | ||
@@ -48,3 +51,3 @@ "scripts": { | ||
"@rdfjs/sink-map": "^1.0.1", | ||
"@tpluscode/rdfine": "^0.2.9", | ||
"@tpluscode/rdfine": "^0.3.5", | ||
"es6-url-template": "^1.0.3", | ||
@@ -55,3 +58,3 @@ "isomorphic-fetch": "^2.2.1", | ||
"rdf-ext": "^1.0.0", | ||
"rdf-transform-triple-to-quad": "^1.0.1", | ||
"rdf-transform-triple-to-quad": "^1.0.2", | ||
"string-to-stream": "^3.0.1" | ||
@@ -69,7 +72,7 @@ }, | ||
"@rdfjs/parser-n3": "^1.1.3", | ||
"@types/clownface": "^0.12.4", | ||
"@types/clownface": "^0.12.7", | ||
"@types/isomorphic-fetch": "0.0.35", | ||
"@types/jest": "^24.0.17", | ||
"@types/rdf-ext": "^1.3.3", | ||
"@types/rdf-js": "^2.0.8", | ||
"@types/rdf-ext": "^1.3.5", | ||
"@types/rdf-js": "^2.0.11", | ||
"@types/rdfjs__namespace": "^1.1.1", | ||
@@ -83,2 +86,3 @@ "@types/rdfjs__parser-jsonld": "^1.2.2", | ||
"@zazuko/rdf-vocabularies": "^2019.10.22", | ||
"babel-plugin-module-resolver": "^4.0.0", | ||
"core-js": "^2.5.0", | ||
@@ -85,0 +89,0 @@ "cz-conventional-changelog": "^2.1.0", |
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
390485
4797
44
200
+ Added@tpluscode/rdf-ns-builders@0.1.0(transitive)
+ Added@tpluscode/rdfine@0.3.7(transitive)
- Removed@tpluscode/rdfine@0.2.12(transitive)
Updated@tpluscode/rdfine@^0.3.5