Skip to content

Commit

Permalink
chore: rename package org to kopflos-cms
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Mar 28, 2024
1 parent 6b2aac9 commit 04721c5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @kopflos/core
# @kopflos-cms/core

## 0.1.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @kopflos/core
# @kopflos-cms/core

[Hydra](http://www.hydra-cg.com/spec/latest/core/) is a machine readable description for APIs.
Kopflos extends the API description with links to the actual code, which provides the API.
Expand All @@ -8,7 +8,7 @@ Kopflos will use such an API description to create an express middleware which p

### Application

`@kopflos/core` uses an object that implements the [RDF/JS Store interface](http://rdf.js.org/stream-spec/#store-interface) to read resources and find types of resources to identify matching operations.
`@kopflos-cms/core` uses an object that implements the [RDF/JS Store interface](http://rdf.js.org/stream-spec/#store-interface) to read resources and find types of resources to identify matching operations.
The resource is read using the IRI as named graph filter.

Here an example for a store on the local file system using `rdf-store-fs`:
Expand Down Expand Up @@ -43,7 +43,7 @@ app.listen(9000)
### Operation

The operations must implement a [Express routing handler](http://expressjs.com/en/starter/basic-routing.html) interface (`(req, res, next) => {}`).
@kopflos/core adds the [@rdfjs/express-handler](https://github.com/rdfjs-base/express-handler) to handle incoming and outgoing RDF data.
@kopflos-cms/core adds the [@rdfjs/express-handler](https://github.com/rdfjs-base/express-handler) to handle incoming and outgoing RDF data.
For `GET` requests with a matching IRI Template, the `.dataset()` and `.quadStream()` as defined by `express-handler` are also available to read the given variables.
Additionally there is a `hydra` property assigned to `req` that contains more data about the request:

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@kopflos/core",
"name": "@kopflos-cms/core",
"description": "Hydra middleware for web APIs",
"version": "0.1.0",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion test/middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import hydraBox from '../middleware.js'

const example = RDF.namespace('http://example.org/')

describe('@kopflos/core', () => {
describe('@kopflos-cms/core', () => {
let api

beforeEach(() => {
Expand Down

0 comments on commit 04721c5

Please sign in to comment.