720 Commits

Author SHA1 Message Date
Thomas Dupont
afed963a23 fix: revert ef6f01a 2022-05-17 13:20:04 +02:00
Thomas Dupont
5989a1fdc5 fix: revert 50dfea1
fix: revert ef6f01a
2022-05-17 13:20:04 +02:00
Jasper Vaneessen
7c6eae0ee6
chore: Use conventional changelog and automate config version bumps
* chore: add the reference change to npm version

* chore: remove unused require

* chore: add conventional-changelog

* chore: add git to pre-release config changes

* style: formatting

* chore: fix commit message

* chore: add no-verify to commit of configs

* chore: no more shellJs

* chore: fixing async

* chore: committing restored

* refactor: move and rename

* chore: remove shelljs devdep and old script

* chore: change npm script ref after refactor

* chore: upgrade-config code improvements

* chore: edit package.json (not package-lock)

* chore(changelog): use conventionalcommits preset

* chore: add conventional changelog config

* chore: use .versionrc directly

* chore: update changelog config

* chore: update .versionrc.json

* chore: use standard-version

* chore: change to standard version

* styling(changelog): remove a tags + formatting

* styling: conventiontal-changelog styling

* chore: postformatting of changelog

* chore: remove unnecessary dependencies

* chore: add upgrade-config to version as backup

* docs: update release.md

* styling: order scripts alphabetically

* docs: requested changes + dry-run explanation

* chore: release script to TS

* chore: use ts-node to execute the TS scripts

* docs: add some documentation comments to script

* docs: remove unnecessary newline

* docs: fix comment linting

* chore: add test/integration and templates configs

* chore: correct automated commit message

* chore: remove fdir dependency

* chore: remove manual-git-changelog dependency

* chore: impl requested changes

* docs: update script comments

* chore: ensure full cov

* chore: review comments
2022-05-17 11:36:12 +02:00
Joachim Van Herwegen
d290848096 fix: Accept client WebIDs with a context array 2022-05-17 10:34:29 +02:00
Thomas Dupont
236bbc6e5d feat: initial proposal for multithreaded execution 2022-05-16 10:15:37 +02:00
Wannes Kerckhove
13dbcb662b fix: prevent JsonResourceStorage from generating too long filenames 2022-05-12 10:01:16 +02:00
Wannes Kerckhove
fbbccb0cf1 fix: Stop creating meta files for each new resource #1217 2022-05-06 08:20:55 +02:00
Joachim Van Herwegen
77eeae9c9e chore: Update configs to v5.0.0 2022-05-05 11:20:53 +02:00
Wannes Kerckhove
ff80079000 feat: file-based backend fallback for unknown media types 2022-04-28 14:20:49 +02:00
Thomas Dupont
fa78bc6856 feat: add a process-/thread-safe file-based ResourceLocker
test: unit test succeeds

fix: not quiting loop when releasing unexisting lock

refactor: pull wait() function into TimerUtils

feat: store all locks inside a single lock folder

feat: use md5 hashing for filepath hashes

test: coverage back to 100%

fix: store locks in proper .internal/locks folder
feat: reworked tryfn

test: coverage back to 100%

buidl: package json types next to lib

style: linting

dos: add more documentation to Locker classes

refactor: SingleThreadedResourceLocker -> MemoryResourceLocker

refactor: MultiThreadedResourceLocker -> FileSystemResourceLocker

feat: update all file-based backend configs to use the new FileSystemResourceLocker

feat: add warning on starting the MemoryResourceLocker in a worker process

test: coverage back to 100%

fix: finalizer of file.json was configured wrong

docs: updated release notes for 5.0.0

refactor: incorporated changes so far

refactor: retryFunctions are less complex now

test: jitter fix
2022-04-28 14:12:30 +02:00
Joachim Van Herwegen
7e5483a36d Merge branch 'main' into versions/5.0.0 2022-04-25 16:03:19 +02:00
Jasper Vaneessen
6dd77cf8d8
test: Validate/test all default configs
* chore: add base script to test-run all configs

* chore: job for test-deploy

* chore: fine-tuning config validation

* chore: config validation fully functional

* chore: fix https-file-cli validation (missing var)

* fix: generate self-signed CA through openSSL

* chore: streamlining test script + review

* chore: validate-configs accepts config args

* chore: cleanup and best-practices

* chore: test-configs as precond + needs consistency

* chore: changes after review

* chore: fix argument variable expansion

* chore: more tweaks to script
2022-04-25 15:44:19 +02:00
Ruben Verborgh
50469e2c1f fix: Make delimiter encoding case-insensitive. 2022-04-25 10:09:46 +02:00
Joachim Van Herwegen
d2bc995272 refactor: Replace RedirectAllHttpHandler usage with RedirectingHttpHandler 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
6f4e70dbb9 fix: Change YargsCliExtractor structure to avoid Components.js issues 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
1de1f7c12a fix(deps): Update to Comunica v2 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
cfdd1221f0 fix: Always define @type in configs 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
ce27bec207 fix: Update prefixes in all configs 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
0e32d9ad9b fix: Fix typing issues with latest Components.js generator 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
58bc42994c chore: Update Node target to v14 in CTH tsconfig.json 2022-04-22 08:50:54 +02:00
Wannes Kerckhove
dbdb9b424e fix: %2F not handled correctly in file backend #1184
Fix
2022-04-21 15:17:32 +02:00
Joachim Van Herwegen
3d6e3d2e39 chore: Drop support for Node 12 2022-04-21 14:54:12 +02:00
Joachim Van Herwegen
784bfc8c21 chore: Update configs to v4.0.0 2022-04-19 15:13:55 +02:00
Thomas Dupont
e2e2d0864f feat: add a Redis based Read-Write Locker
refactor: more elegant way of providing default attemptSettings to constructor

style(jsdoc): rewording of jsdoc comment

fix: RegExp(/regex/) => /regex/

fix: Replace Error with InternalServerError

docs: jsdoc for RedisReadWriteLocker class

feat: make RedisReadWriteLocker a ResourceLocker too

test: coverage back to 100%

refactor: linting fix

style(jsdoc): Add explanation to tryRedisFn() method

refactor: remove RedisResourceLocker

fix: bug in lua script

chore(deps): update ioredis, remove redlock

refactor: removed RedisResourceLocker in favor of generic RedisLocker class

test: add redis lua scripts tests and integrate all 3 redis integration tests in 1

refactor: remove .vscode folder from index

refactor: Add some typing and  change redis references to Redis in comments

refactor: more changes after PR review

refactor: remove redis.json

refactor: rename redis-rw.json to redis.json

docs: added readme and release notes
2022-04-19 13:52:31 +02:00
Joachim Van Herwegen
c0bc150122 test: Update CTH run to use client credentials 2022-04-15 11:35:00 +02:00
Joachim Van Herwegen
2ec8fabd54 feat: Add support for client_credentials authentication 2022-04-15 11:20:26 +02:00
Joachim Van Herwegen
bedab907f9 feat: Allow dynamically adding CLI parameters in configs 2022-04-15 10:56:05 +02:00
Joachim Van Herwegen
e6519992bf Merge branch 'main' into versions/4.0.0
# Conflicts:
#	test/unit/storage/accessors/FileDataAccessor.test.ts
2022-04-15 10:28:50 +02:00
Jasper Vaneessen
668d0a331f
feat: Only accept NamedNodes as predicates for metadata
* refactor: move toCachedNamedNode (private)

* chore: only NamedNodes predicates in removes

* feat: enforce NamedNode predicates in most cases

* feat: getAll only accepts NamedNodes

* feat: toCachedNamedNode only accepts string arg

* tests: use NamedNodes for getAll calls

* test: remove unnecessary string check for coverage

* tests: fix NamedNodes in new tests after rebase

* feat: metadatawriters store NamedNodes

* refactor: toCachedNamedNode as utility function

* fix: double write of linkRelMap

* test: use the CONTENT_TYPE constant
2022-04-15 09:53:39 +02:00
Joachim Van Herwegen
db906ae872 test: Add pod seeding integration test 2022-04-14 10:34:04 +02:00
Wannes Kerckhove
283c301f08 feat: new helper functions to replace regexes #807
Implemented new StringUtil helper functions: splitCommaSeparated, sanitizeUrlPart, isValidFileName.
Added helper functions to HeaderUtil: matchesAuthorizationScheme, hasScheme.
Added unit tests for the new helper functions.
Refactored codebase to use helper functions instead of regexes if applicable.
2022-04-13 11:26:07 +02:00
Jasper Vaneessen
fe39f97ee0
refactor: Use fs-extra instead of fs to simplify file access
* refactor: use fs-extra instead of fs

* tests: manual mocks for fs-extra base + ensureDir

* refactor: mockFileSystem + mockFs and mockFsExtra

* add remove mock and some further test tweaks

* test: FileDataAccessor tests passing

* refactor: remove try-catch due to fs-extra handlin

* refactor: fs-extra in atomicFileDataAccessor

* refactor: AtomicFileDataAccessor fs-extra

* test: fix coverage

* refactor: use read/writeJson from fs-extra

* refactor: less duplicate mocking code

* refactor: re-use opendir mocking code
2022-04-12 11:02:30 +02:00
Joachim Van Herwegen
1b7cc1ea3a Merge branch 'main' into versions/4.0.0
# Conflicts:
#	test/unit/util/errors/RedirectHttpError.test.ts
2022-04-11 10:21:49 +02:00
Wouter Termont
468e11d906
feat: Add RedirectingHttpHandler
* feat: redirect handler

Signed-off-by: Wouter Termont <woutermont@gmail.com>

* chore: rewrite reduction as loop

Signed-off-by: Wouter Termont <woutermont@gmail.com>

* chore: remove example import

Signed-off-by: Wouter Termont <woutermont@gmail.com>

* feat: add more redirect flavours

Signed-off-by: Wouter Termont <woutermont@gmail.com>

* chore: RedirectingHttpHandler with RedirectAllHttpHandler

Signed-off-by: Wouter Termont <woutermont@gmail.com>

* chore: replace RedirectAllHttpHandler with RedirectingHttpHandler

* chore: revert 5956385 (chore: replace RedirectAllHttpHandler with RedirectingHttpHandler)

This reverts commit 5956385c4180e8e8914b9199c4ed6ca8ae7d39fb.

* docs: complete constructor params

Signed-off-by: Wouter Termont <woutermont@gmail.com>
2022-04-11 09:49:36 +02:00
wkerckho
d42125a91d
fix: Throw error when accessing URLs out of scope
* feat: allow OriginalUrlExtractor to be configured with an identifierStrategy. Included the existing parameter 'includeQueryString' in the OriginalUrlExtractorArgs type.

* test: fixed OriginalUrlExtractor instantiation in OriginalUrlExtractor and RequestParser tests

* fix: Server no longer warns when accessing a URL out of scope #1148

* test: updated tests broken by #1148 fix

* test: ensuring 100% coverage

Co-authored-by: Wannes Kerckhove <wannes.kerckhove@ugent.be>
2022-04-08 09:33:22 +02:00
Joachim Van Herwegen
97e600bf4f fix: Undo authorization on OPTIONS requests 2022-04-04 13:35:15 +02:00
Thomas Dupont
48efc6fae1
feat: Create MetadataParser that detects JSON with Context link and throws an error
* feat: add PlainJsonLdFilter to reject JSON with context link

* refactor: abstract parseLinkHeader into HeaderUtils

* docs: typo in comment field

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>

* refactor: Replace BadRequestHttpError with NotImplementedError

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>

* refactor: incorporate requested changes

* refactor: requested changes incorporated

* refactor: remove obsolete code lines

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>
2022-04-01 14:25:09 +02:00
Ruben Verborgh
3685b7c659 refactor: Make Logger an interface. 2022-04-01 14:18:58 +02:00
Ruben Verborgh
238570b3d2 feat: Make LazyLoggerFactory buffer messages. 2022-04-01 14:18:58 +02:00
Ruben Verborgh
2c6167e0cb feat: Remove meta parameter from logging. 2022-04-01 14:18:58 +02:00
Joachim Van Herwegen
ce5a98b16f test: Add integration test that simulates running 2 hours 2022-03-31 17:00:09 +02:00
Joachim Van Herwegen
f08cdf75f7 fix: Prevent expired storage cleanup from crashing the server 2022-03-31 17:00:09 +02:00
Joachim Van Herwegen
16e9368734 test: Add flushPromises utility function 2022-03-31 17:00:09 +02:00
Joachim Van Herwegen
76548011f2 fix: Support entries function in JsonResourceStorage 2022-03-31 17:00:09 +02:00
Joachim Van Herwegen
641d39d4bc Merge branch 'main' into versions/4.0.0 2022-03-29 14:54:59 +02:00
Joachim Van Herwegen
6e98c6aae4 feat: Dynamically generate Allow and Accept-* headers 2022-03-29 14:52:36 +02:00
Joachim Van Herwegen
effc20a270 feat: Store methods in MethodNotAllowedHttpError 2022-03-29 14:52:36 +02:00
Joachim Van Herwegen
f3dedf4e27 feat: Add utility functions for generating error classes 2022-03-29 14:52:36 +02:00
Ruben Verborgh
e4688e12a1 chore: Simplify test mocks. 2022-03-29 14:41:31 +02:00
Arthur Joppart
4a37f8c879 chore: replace redis library with ioredis 2022-03-29 14:41:31 +02:00