Comparing version 1.0.0-beta.0 to 1.0.0-beta.1
@@ -16,2 +16,3 @@ /// <reference types="rdfjs__sink-map" /> | ||
export interface HydraClient<D extends DatasetIndexed = DatasetIndexed> { | ||
log: (msg: string) => void; | ||
baseUri?: string; | ||
@@ -38,2 +39,3 @@ rootSelectors: RootSelector[]; | ||
defaultHeaders: HeadersInit | (() => HeadersInit); | ||
log: (msg: string) => void; | ||
readonly dataset: D; | ||
@@ -40,0 +42,0 @@ readonly factory: ResourceFactory<DatasetCore, R>; |
@@ -16,3 +16,3 @@ import Parsers from '@rdfjs/sink-map'; | ||
if (quadStream == null) { | ||
console.warn(`No parser found for media type ${response.mediaType}`); | ||
alcaeus.log(`No parser found for media type ${response.mediaType}`); | ||
return null; | ||
@@ -38,2 +38,3 @@ } | ||
this.defaultHeaders = {}; | ||
this.log = () => { }; | ||
this.__apiDocumentations = new Map(); | ||
@@ -93,3 +94,3 @@ this.rootSelectors = rootSelectors; | ||
if (!response.apiDocumentationLink) { | ||
console.warn(`Resource ${response.requestedUri} does not expose API Documentation link`); | ||
this.log(`Resource ${response.requestedUri} does not expose API Documentation link`); | ||
return; | ||
@@ -96,0 +97,0 @@ } |
@@ -5,2 +5,9 @@ # Changelog | ||
## [1.0.0-beta.1](https://github.com/wikibus/alcaeus/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2020-04-23) | ||
### Bug Fixes | ||
* add required transitive dependencies to package.json ([57ab8ce](https://github.com/wikibus/alcaeus/commit/57ab8cea9c690ce4e8e25ce0a4dad2ca1e3dab49)) | ||
## [1.0.0-beta.0](https://github.com/wikibus/alcaeus/compare/v1.0.0-alpha.16...v1.0.0-beta.0) (2020-04-23) | ||
@@ -7,0 +14,0 @@ |
import cf from 'clownface'; | ||
import $rdf from 'rdf-ext'; | ||
import $rdf from '@rdfjs/data-model'; | ||
import ResourceGraph from './ResourceGraph'; | ||
@@ -4,0 +4,0 @@ import ResponseWrapperImpl from './ResponseWrapper'; |
{ | ||
"name": "alcaeus", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.1", | ||
"description": "Hydra Core hypermedia-aware client library", | ||
@@ -38,2 +38,3 @@ "main": "main.js", | ||
"dependencies": { | ||
"@rdfjs/data-model": "^1.1.2", | ||
"@rdfjs/formats-common": "^2.1.0", | ||
@@ -43,2 +44,3 @@ "@rdfjs/sink-map": "^1.0.1", | ||
"@tpluscode/rdfine": "^0.4.8", | ||
"clownface": "^0.12.3", | ||
"es6-url-template": "^1.0.3", | ||
@@ -62,5 +64,6 @@ "esm": "^3.2.25", | ||
"@commitlint/config-conventional": "^7.0.0", | ||
"@rdfjs/data-model": "^1.1.2", | ||
"@rdfjs/namespace": "^1.1.0", | ||
"@rdfjs/parser-jsonld": "^1.2.0", | ||
"@rdfjs/parser-n3": "^1.1.3", | ||
"@tpluscode/eslint-config": "^0.1", | ||
"@tpluscode/rdf-string": "^0.2.10", | ||
@@ -85,2 +88,3 @@ "@types/clownface": "^0.12.13", | ||
"eslint": "^6.0.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jest": "^22.14.1", | ||
@@ -109,4 +113,3 @@ "gitbook-cli": "^2.3.2", | ||
"*.{js,ts}": [ | ||
"eslint --quiet --fix --ignore-path .eslintignore", | ||
"git add" | ||
"eslint --quiet --fix --ignore-path .eslintignore" | ||
] | ||
@@ -113,0 +116,0 @@ }, |
@@ -15,3 +15,3 @@ # Alcaeus [![npm version](https://badge.fury.io/js/alcaeus.svg)](https://badge.fury.io/js/alcaeus) [![Build Status](https://travis-ci.org/wikibus/Alcaeus.svg?branch=master)](https://travis-ci.org/wikibus/Alcaeus) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=QitnVVJlZEJBWkExWGVYOXZ0Ymo1NkNvSHY1R1VCbEllcU1FbHU0VWdFQT0tLW14Wk5UcjdlZ1luK0Z1S1NwWWhLQXc9PQ==--e9ceda4d03cff10bd985c21e8ecce9d540aa65a1)](https://www.browserstack.com/automate/public-build/QitnVVJlZEJBWkExWGVYOXZ0Ymo1NkNvSHY1R1VCbEllcU1FbHU0VWdFQT0tLW14Wk5UcjdlZ1luK0Z1S1NwWWhLQXc9PQ==--e9ceda4d03cff10bd985c21e8ecce9d540aa65a1) [![Code coverage](https://codecov.io/gh/wikibus/alcaeus/branch/master/graph/badge.svg)](https://codecov.io/gh/wikibus/alcaeus) | ||
``` bash | ||
yarn add alcaeus | ||
npm i -S alcaeus | ||
``` | ||
@@ -22,4 +22,10 @@ | ||
``` js | ||
import {Hydra} from 'alcaeus'; | ||
import Hydra from 'alcaeus'; | ||
import Parser from '@rdfjs/parser-n3'; | ||
Hydra.parsers.set('text/turtle', Parser); | ||
// Alternatively, use an import which loads @rdfjs/parsers-common | ||
// import Hydra from 'alcaeus/with-parsers' | ||
const representation = await Hydra.loadResource('http://example.com/resource'); | ||
@@ -29,5 +35,4 @@ const rootResource = representation.root; | ||
// contains supported classes, operations, etc. | ||
const apiDocs = rootResource.apiDocumentation; | ||
const apiDocs = Hydra.apiDocumentations[0]; | ||
// same as rootResource['@id'] | ||
const id = rootResource.id; | ||
@@ -34,0 +39,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 6 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
6036110
1076
5674
51
14
52
1
80
3
12
7
+ Added@rdfjs/data-model@^1.1.2
+ Addedclownface@^0.12.3