mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
Merge branch 'main' into versions/2.0.0
This commit is contained in:
commit
012d9e0864
14
.github/workflows/schedule.yml
vendored
14
.github/workflows/schedule.yml
vendored
@ -9,6 +9,12 @@ on:
|
||||
jobs:
|
||||
conformance:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch:
|
||||
- 'main'
|
||||
- 'versions/2.0.0'
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Use Node.js 16.x
|
||||
@ -17,6 +23,8 @@ jobs:
|
||||
node-version: 16.x
|
||||
- name: Check out the project
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
- name: Install dependencies and run build scripts
|
||||
run: npm ci
|
||||
- name: Start the server in the background
|
||||
@ -35,5 +43,7 @@ jobs:
|
||||
docker run -i --rm
|
||||
-v "$(pwd)"/reports/css:/reports
|
||||
--env-file=./test/deploy/conformance.env
|
||||
--network="host" solidconformancetestbeta/conformance-test-harness
|
||||
--output=/reports --target=css
|
||||
--network="host"
|
||||
solidconformancetestbeta/conformance-test-harness
|
||||
--output=/reports
|
||||
--target=https://github.com/solid/conformance-test-harness/css
|
||||
|
@ -1,14 +1,5 @@
|
||||
## Interacting with the server
|
||||
|
||||
### `POST`: Creating a new pod
|
||||
|
||||
Create a pod using an external WebID for authentication:
|
||||
```shell
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d '{"login": "timbl", "webId": "http://timbl.inrupt.net/profile/card#me"}' \
|
||||
http://localhost:3000/pods
|
||||
```
|
||||
|
||||
### `PUT`: Creating resources for a given URL
|
||||
|
||||
Create a plain text file:
|
||||
|
1721
package-lock.json
generated
1721
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -40,7 +40,7 @@
|
||||
"homepage": "https://github.com/solid/community-server#readme",
|
||||
"scripts": {
|
||||
"build": "npm run build:ts && npm run build:components",
|
||||
"build:components": "componentsjs-generator -s src -c dist/components -i .componentsignore --typeScopedContexts",
|
||||
"build:components": "componentsjs-generator -s src -c dist/components -r scs -i .componentsignore --typeScopedContexts",
|
||||
"build:ts": "tsc",
|
||||
"docker": "npm run docker:setup && npm run docker:start",
|
||||
"docker:clean": "./test/docker/docker-clean.sh",
|
||||
@ -77,7 +77,7 @@
|
||||
"dependencies": {
|
||||
"@comunica/actor-init-sparql": "^1.21.3",
|
||||
"@rdfjs/data-model": "^1.2.0",
|
||||
"@solid/access-token-verifier": "^0.12.0",
|
||||
"@solid/access-token-verifier": "^1.0.0",
|
||||
"@types/arrayify-stream": "^1.0.0",
|
||||
"@types/async-lock": "^1.1.2",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
@ -162,7 +162,7 @@
|
||||
"set-cookie-parser": "^2.4.8",
|
||||
"supertest": "^6.1.3",
|
||||
"ts-jest": "^27.0.3",
|
||||
"typedoc": "^0.21.2",
|
||||
"typedoc": "^0.22.0",
|
||||
"typescript": "^4.3.4"
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
*/
|
||||
export abstract class AsyncHandler<TIn = void, TOut = void> {
|
||||
/**
|
||||
* Checks if the input data can be handled by this class.
|
||||
* Throws an error if it can't handle the data.
|
||||
* @param input - Input data that could potentially be handled.
|
||||
* Checks if the input can be handled by this class.
|
||||
* If it cannot handle the input, rejects with an error explaining why.
|
||||
* @param input - Input that could potentially be handled.
|
||||
*
|
||||
* @returns A promise resolving if the input can be handled, rejecting with an Error if not.
|
||||
*/
|
||||
@ -15,26 +15,24 @@ export abstract class AsyncHandler<TIn = void, TOut = void> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the given input. This should only be done if the {@link canHandle} function returned `true`.
|
||||
* Therefore, consider using the {@link handleSafe} function instead.
|
||||
* @param input - Input data that needs to be handled.
|
||||
* Handles the given input. This may only be called if {@link canHandle} did not reject.
|
||||
* When unconditionally calling both in sequence, consider {@link handleSafe} instead.
|
||||
* @param input - Input that needs to be handled.
|
||||
*
|
||||
* @returns A promise resolving when the handling is finished. Return value depends on the given type.
|
||||
* @returns A promise resolving when handling is finished.
|
||||
*/
|
||||
public abstract handle(input: TIn): Promise<TOut>;
|
||||
|
||||
/**
|
||||
* Helper function that first runs the canHandle function followed by the handle function.
|
||||
* Throws the error of the {@link canHandle} function if the data can't be handled,
|
||||
* or returns the result of the {@link handle} function otherwise.
|
||||
* Helper function that first runs {@link canHandle} followed by {@link handle}.
|
||||
* Throws the error of {@link canHandle} if the data cannot be handled,
|
||||
* or returns the result of {@link handle} otherwise.
|
||||
* @param input - Input data that will be handled if it can be handled.
|
||||
*
|
||||
* @returns A promise resolving if the input can be handled, rejecting with an Error if not.
|
||||
* Return value depends on the given type.
|
||||
*/
|
||||
public async handleSafe(input: TIn): Promise<TOut> {
|
||||
await this.canHandle(input);
|
||||
|
||||
return this.handle(input);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
SOLID_IDENTITY_PROVIDER=http://localhost:3000/idp
|
||||
USER_REGISTRATION_ENDPOINT=http://localhost:3000/idp/register
|
||||
SOLID_IDENTITY_PROVIDER=http://localhost:3000/idp/
|
||||
USER_REGISTRATION_ENDPOINT=http://localhost:3000/idp/register/
|
||||
USERS_ALICE_WEBID=http://localhost:3000/alice/profile/card#me
|
||||
USERS_ALICE_USERNAME=alice@alice.mail
|
||||
USERS_ALICE_PASSWORD=pass1234
|
||||
|
Loading…
x
Reference in New Issue
Block a user