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:
|
jobs:
|
||||||
conformance:
|
conformance:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
branch:
|
||||||
|
- 'main'
|
||||||
|
- 'versions/2.0.0'
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- name: Use Node.js 16.x
|
- name: Use Node.js 16.x
|
||||||
@ -17,6 +23,8 @@ jobs:
|
|||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
- name: Check out the project
|
- name: Check out the project
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ matrix.branch }}
|
||||||
- name: Install dependencies and run build scripts
|
- name: Install dependencies and run build scripts
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Start the server in the background
|
- name: Start the server in the background
|
||||||
@ -35,5 +43,7 @@ jobs:
|
|||||||
docker run -i --rm
|
docker run -i --rm
|
||||||
-v "$(pwd)"/reports/css:/reports
|
-v "$(pwd)"/reports/css:/reports
|
||||||
--env-file=./test/deploy/conformance.env
|
--env-file=./test/deploy/conformance.env
|
||||||
--network="host" solidconformancetestbeta/conformance-test-harness
|
--network="host"
|
||||||
--output=/reports --target=css
|
solidconformancetestbeta/conformance-test-harness
|
||||||
|
--output=/reports
|
||||||
|
--target=https://github.com/solid/conformance-test-harness/css
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
## Interacting with the server
|
## 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
|
### `PUT`: Creating resources for a given URL
|
||||||
|
|
||||||
Create a plain text file:
|
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",
|
"homepage": "https://github.com/solid/community-server#readme",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build:ts && npm run build:components",
|
"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",
|
"build:ts": "tsc",
|
||||||
"docker": "npm run docker:setup && npm run docker:start",
|
"docker": "npm run docker:setup && npm run docker:start",
|
||||||
"docker:clean": "./test/docker/docker-clean.sh",
|
"docker:clean": "./test/docker/docker-clean.sh",
|
||||||
@ -77,7 +77,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@comunica/actor-init-sparql": "^1.21.3",
|
"@comunica/actor-init-sparql": "^1.21.3",
|
||||||
"@rdfjs/data-model": "^1.2.0",
|
"@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/arrayify-stream": "^1.0.0",
|
||||||
"@types/async-lock": "^1.1.2",
|
"@types/async-lock": "^1.1.2",
|
||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
@ -162,7 +162,7 @@
|
|||||||
"set-cookie-parser": "^2.4.8",
|
"set-cookie-parser": "^2.4.8",
|
||||||
"supertest": "^6.1.3",
|
"supertest": "^6.1.3",
|
||||||
"ts-jest": "^27.0.3",
|
"ts-jest": "^27.0.3",
|
||||||
"typedoc": "^0.21.2",
|
"typedoc": "^0.22.0",
|
||||||
"typescript": "^4.3.4"
|
"typescript": "^4.3.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
export abstract class AsyncHandler<TIn = void, TOut = void> {
|
export abstract class AsyncHandler<TIn = void, TOut = void> {
|
||||||
/**
|
/**
|
||||||
* Checks if the input data can be handled by this class.
|
* Checks if the input can be handled by this class.
|
||||||
* Throws an error if it can't handle the data.
|
* If it cannot handle the input, rejects with an error explaining why.
|
||||||
* @param input - Input data that could potentially be handled.
|
* @param input - Input that could potentially be handled.
|
||||||
*
|
*
|
||||||
* @returns A promise resolving if the input can be handled, rejecting with an Error if not.
|
* @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`.
|
* Handles the given input. This may only be called if {@link canHandle} did not reject.
|
||||||
* Therefore, consider using the {@link handleSafe} function instead.
|
* When unconditionally calling both in sequence, consider {@link handleSafe} instead.
|
||||||
* @param input - Input data that needs to be handled.
|
* @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>;
|
public abstract handle(input: TIn): Promise<TOut>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function that first runs the canHandle function followed by the handle function.
|
* Helper function that first runs {@link canHandle} followed by {@link handle}.
|
||||||
* Throws the error of the {@link canHandle} function if the data can't be handled,
|
* Throws the error of {@link canHandle} if the data cannot be handled,
|
||||||
* or returns the result of the {@link handle} function otherwise.
|
* or returns the result of {@link handle} otherwise.
|
||||||
* @param input - Input data that will be handled if it can be handled.
|
* @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.
|
* @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> {
|
public async handleSafe(input: TIn): Promise<TOut> {
|
||||||
await this.canHandle(input);
|
await this.canHandle(input);
|
||||||
|
|
||||||
return this.handle(input);
|
return this.handle(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOLID_IDENTITY_PROVIDER=http://localhost:3000/idp
|
SOLID_IDENTITY_PROVIDER=http://localhost:3000/idp/
|
||||||
USER_REGISTRATION_ENDPOINT=http://localhost:3000/idp/register
|
USER_REGISTRATION_ENDPOINT=http://localhost:3000/idp/register/
|
||||||
USERS_ALICE_WEBID=http://localhost:3000/alice/profile/card#me
|
USERS_ALICE_WEBID=http://localhost:3000/alice/profile/card#me
|
||||||
USERS_ALICE_USERNAME=alice@alice.mail
|
USERS_ALICE_USERNAME=alice@alice.mail
|
||||||
USERS_ALICE_PASSWORD=pass1234
|
USERS_ALICE_PASSWORD=pass1234
|
||||||
|
Loading…
x
Reference in New Issue
Block a user