-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'collection-paged' into collection-post
# Conflicts: # .github/workflows/tests.yml # example/docker-compose.yaml # package-lock.json # packages/core/lib/Kopflos.ts # packages/core/lib/handler.ts # packages/hydra/handlers/collection.ts # packages/hydra/package.json
- Loading branch information
Showing
38 changed files
with
1,371 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@kopflos-cms/vite": patch | ||
--- | ||
|
||
Add inline `config` to plugin config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@kopflos-cms/core": minor | ||
--- | ||
|
||
Changed plugin setup to require classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@kopflos-cms/core": patch | ||
--- | ||
|
||
Added helper to easily access plugin instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@kopflos-cms/hydra": minor | ||
--- | ||
|
||
Created extensible method for collection paging strategies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@kopflos-cms/express": patch | ||
"@kopflos-cms/vite": patch | ||
"kopflos": patch | ||
--- | ||
|
||
Plugins are now implemented as classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: read-the-plaque | ||
services: | ||
oxigraph: | ||
api: 3 | ||
type: lando | ||
entrypoint: /usr/local/bin/oxigraph | ||
app_mount: false | ||
scanner: false | ||
ssl: true | ||
services: | ||
image: ghcr.io/oxigraph/oxigraph:0.4.6 | ||
user: root | ||
command: serve --location /data --bind 0.0.0.0:7878 | ||
ports: | ||
- 7878 | ||
volumes: | ||
- ./example/oxigraph:/data | ||
app: | ||
type: node:20 | ||
ssl: true | ||
scanner: false | ||
build: | ||
- npm i | ||
command: cd example; kopflos serve --mode development --trust-proxy | ||
overrides: | ||
environment: | ||
API_BASE: https://read-the-plaque.lndo.site | ||
DB_URI: http://db.read-the-plaque.lndo.site | ||
|
||
proxy: | ||
oxigraph: | ||
- db.read-the-plaque.lndo.site:7878 | ||
app: | ||
- read-the-plaque.lndo.site:1429 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
PREFIX lg: <https://purl.org/lg/> | ||
base <http://localhost:1429/> | ||
PREFIX log: <http://www.w3.org/2000/10/swap/log#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX earl: <http://www.w3.org/ns/earl#> | ||
prefix : <https://always-read-the-plaque.tests/plaques/> | ||
prefix tuner: <https://api-tuner.described.at/> | ||
prefix hydra:<http://www.w3.org/ns/hydra/core#> | ||
prefix schema: <http://schema.org/> | ||
|
||
:fetchEntireCollection | ||
a earl:TestCase ; | ||
rdfs:label "Check chaining requests to fetch entire collection" ; | ||
:fetch <countries?limit=50> ; | ||
. | ||
|
||
{ | ||
:fetchEntireCollection :fetch ?page . | ||
} => { | ||
?page a tuner:Request ; | ||
tuner:method "GET" ; | ||
tuner:url ?page ; | ||
. | ||
} . | ||
|
||
{ | ||
?req tuner:response ?res . | ||
|
||
?res tuner:http_code 200 . | ||
?res tuner:body ?body . | ||
?body log:includes { | ||
<countries> hydra:member ?member . | ||
?member schema:name ?name . | ||
} . | ||
|
||
( | ||
{ | ||
?body log:includes { | ||
<countries>!hydra:view hydra:next ?nextPage . | ||
} . | ||
} | ||
{ | ||
?body log:includes { | ||
<countries>!hydra:view hydra:next ?nextPage . | ||
} . | ||
true log:becomes { | ||
:fetchEntireCollection :fetch ?nextPage | ||
} | ||
} | ||
{ | ||
true log:becomes { :fetchEntireCollection earl:outcome earl:passed } | ||
} | ||
) log:ifThenElseIn [] . | ||
} => { | ||
<countries> hydra:member ?member . | ||
?member schema:name ?name . | ||
} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
base <http://localhost:1429/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX earl: <http://www.w3.org/ns/earl#> | ||
PREFIX tuner: <https://api-tuner.described.at/> | ||
prefix : <https://always-read-the-plaque.tests/html/> | ||
prefix string: <http://www.w3.org/2000/10/swap/string#> | ||
|
||
:fetchHTML | ||
a earl:TestCase ; | ||
rdfs:label "Check HTML is served" ; | ||
. | ||
|
||
:getPage | ||
a tuner:Request ; | ||
tuner:method "GET" ; | ||
tuner:url <plaque/newton-s-apple-tree-monash-university.html> ; | ||
. | ||
|
||
{ | ||
:getPage tuner:response ?res . | ||
|
||
?res tuner:http_code 200 . | ||
?res tuner:header ( "content-type" "text/html.*" string:matches ) . | ||
} => { | ||
:fetchHTML earl:outcome earl:passed . | ||
} . |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.