Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for CSS 7.x #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/link-rel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"@graph": [
Expand Down
2 changes: 1 addition & 1 deletion config/metadata-writer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"import": [
Expand Down
2 changes: 1 addition & 1 deletion config/resource-store.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"@graph": [
Expand Down
8,742 changes: 4,890 additions & 3,852 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"config"
],
"dependencies": {
"@solid/community-server": "^5.1.0",
"@solid/community-server": "^7.0.5",
"@types/rdf-validate-shacl": "^0.2.4",
"rdf-validate-shacl": "^0.3.2"
},
Expand Down
15 changes: 8 additions & 7 deletions shape-default.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"import": [
"css:config/app/init/initialize-intro.json",
"css:config/app/main/default.json",
"css:config/app/init/default.json",
"css:config/app/setup/required.json",
"css:config/app/variables/default.json",
"css:config/http/handler/default.json",
"css:config/http/middleware/websockets.json",
"css:config/http/server-factory/websockets.json",
"css:config/http/middleware/default.json",
"css:config/http/notifications/all.json",
"css:config/http/server-factory/http.json",
"css:config/http/static/default.json",
"css:config/identity/access/public.json",
"css:config/identity/email/default.json",
"css:config/identity/handler/default.json",
"css:config/identity/oidc/default.json",
"css:config/identity/ownership/token.json",
"css:config/identity/pod/static.json",
"css:config/identity/registration/enabled.json",
"css:config/ldp/authentication/dpop-bearer.json",
"css:config/ldp/authorization/webacl.json",
"css:config/ldp/handler/default.json",
"css:config/ldp/metadata-parser/default.json",
"css:config/ldp/metadata-writer/default.json",
"css:config/ldp/modes/default.json",
"css:config/storage/backend/file.json",
"css:config/storage/backend/memory.json",
"css:config/storage/key-value/resource-store.json",
"css:config/storage/location/root.json",
"css:config/storage/middleware/default.json",
"css:config/util/auxiliary/acl.json",
"css:config/util/identifiers/suffix.json",
Expand Down
37 changes: 24 additions & 13 deletions shape-file-no-setup.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"@context": [
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"import": [
"css:config/app/init/initialize-root-pod.json",
"css:config/app/main/default.json",
"css:config/app/init/initialize-root.json",
"css:config/app/setup/disabled.json",
"css:config/app/variables/default.json",
"css:config/http/handler/default.json",
"css:config/http/middleware/websockets.json",
"css:config/http/server-factory/websockets.json",
"css:config/http/middleware/default.json",
"css:config/http/notifications/all.json",
"css:config/http/server-factory/http.json",
"css:config/http/static/default.json",
"css:config/identity/access/public.json",
"css:config/identity/email/default.json",
"css:config/identity/handler/default.json",
"css:config/identity/handler/no-accounts-pods.json",
"css:config/identity/oidc/default.json",
"css:config/identity/ownership/token.json",
"css:config/identity/pod/static.json",
"css:config/identity/registration/enabled.json",
"css:config/ldp/authentication/dpop-bearer.json",
"css:config/ldp/authorization/webacl.json",
"css:config/ldp/handler/default.json",
Expand All @@ -26,20 +26,31 @@
"css:config/ldp/modes/default.json",
"css:config/storage/backend/file.json",
"css:config/storage/key-value/resource-store.json",
"css:config/storage/location/root.json",
"css:config/storage/middleware/default.json",
"css:config/util/auxiliary/acl.json",
"css:config/util/identifiers/suffix.json",
"css:config/util/index/default.json",
"css:config/util/logging/winston.json",
"css:config/util/representation-conversion/default.json",
"css:config/util/resource-locker/memory.json",
"css:config/util/resource-locker/file.json",
"css:config/util/variables/default.json",

"shape-validation:config/shape-validation.json"
],
"@graph": [
{
"comment": "A single-pod server that stores its resources on disk."
"comment": [
"A Solid server that stores its resources on disk and uses WAC for authorization.",
"A pod will be created in the root with the email/password login defined here.",
"It is advised to immediately change this password after starting the server."
]
},
{
"@id": "urn:solid-server:default:RootPodInitializer",
"@type": "AccountInitializer",
"email": "[email protected]",
"password": "test"
}
]
}
}
45 changes: 0 additions & 45 deletions shape-memory-no-setup.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/storage/validators/ShaclValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class ShaclValidator extends ShapeValidator {
representation.data.destroy();
if (NotImplementedHttpError.isInstance(error)) {
throw new BadRequestHttpError('Data could not be validated as it could not be converted to rdf',
{ details: { ...error, message: error.message }});
{ cause: { ...error, message: error.message }});
}
throw error;
}
Expand Down
11 changes: 3 additions & 8 deletions src/util/Vocabularies.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// TODO: when version 6 is released:
import { createVocabulary } from "@solid/community-server"

// import { extendVocabulary } from "@solid/community-server"

// extendVocabulary(TODO:)
import { createUriAndTermNamespace } from "@solid/community-server"

export const SH = createUriAndTermNamespace('http://www.w3.org/ns/shacl#',
export const SH = createVocabulary('http://www.w3.org/ns/shacl#',
'targetClass',
);


export const LDP = createUriAndTermNamespace('http://www.w3.org/ns/ldp#',
export const LDP = createVocabulary('http://www.w3.org/ns/ldp#',
'contains',

'BasicContainer',
Expand Down
22 changes: 13 additions & 9 deletions test/integration/config/ldp-with-auth.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
{
"@context":[
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"https://linkedsoftwaredependencies.org/bundles/npm/shape-validation-component/^1.0.0/components/context.jsonld"
],
"import": [
"css:config/app/init/static-root.json",
"css:config/app/main/default.json",
"css:config/app/init/initialize-root.json",
"css:config/app/setup/disabled.json",
"css:config/http/handler/simple.json",
"css:config/http/middleware/no-websockets.json",
"css:config/http/server-factory/no-websockets.json",
"css:config/http/handler/default.json",
"css:config/http/middleware/default.json",
"css:config/http/notifications/all.json",
"css:config/http/server-factory/http.json",
"css:config/http/static/default.json",
"css:config/identity/access/public.json",
"css:config/identity/email/example.json",
"css:config/identity/handler/default.json",
"css:config/identity/oidc/default.json",
"css:config/identity/ownership/token.json",
"css:config/identity/pod/static.json",
"css:config/ldp/authentication/debug-auth-header.json",
"css:config/ldp/authentication/dpop-bearer.json",
"css:config/ldp/authorization/webacl.json",
"css:config/ldp/handler/default.json",
"css:config/ldp/metadata-parser/default.json",
"css:config/ldp/metadata-writer/default.json",
"css:config/ldp/modes/default.json",
"css:config/storage/key-value/memory.json",
"css:config/storage/backend/memory.json",
"css:config/storage/key-value/resource-store.json",
"css:config/storage/location/pod.json",
"css:config/storage/middleware/default.json",
"css:config/util/auxiliary/acl.json",
"css:config/util/identifiers/suffix.json",
Expand All @@ -45,7 +49,7 @@
},
{
"RecordObject:_record_key": "store",
"RecordObject:_record_value": { "@id": "urn:solid-server:default:ResourceStore" }
"RecordObject:_record_value": { "@id": "urn:solid-server:default:ResourceStore_Backend" }
}
]
}
Expand Down