* feat: only allow metadata to be edited with PATCH request & only allow metadata files to be edited when a resource is available
* fix: remove unnecesary log at POST
* feat: PUT resets metadata contents + not possible to add metadata with PUT to container
* feat: add metadataStrategy (auxiliaryStrategy) + use that strategy in operationhandlers
* feat: PUT request on existing LDPC is not allowed as it would be possible to edit (read reset) metadata
* test: add unit tests to operationhandlers to handle metadata editing
* test: add unit tests to representationPatchHandler to handle metadata editing
* fix: update dependency of meta.json to version 3.0.0
* fix: lint and dependency still v2
* fix: replaced file references to resource references + moved Patch check to new patchhandler which is more generic
* fix: moved checking metadata resources checking from DELETE and POST handler down to DABS
* fix: remove PATCH message about metadata extension
* fix: move PATCH message about metadata extension
* WIP: adding writeMetadata + getMetadata in DABS and add writeMetadata to DataAccessors (part 1)
* WIP: implement writeMetadata in memorybackend + change resourceExists
* WIP: implement writeMetadata in SparqlDataAccessor.ts
* test: fix test interfaces
* test: InMemoryDataAccessor.ts resulted into changing identifier for writeMetadata in DataAccessor.ts (now taking subject identifier instead of metadata resource identifier)
* test: accessor tests implemented for metadata
* test: add RdfImmutableCheckPatcher.test.ts
* test: add tests in DataAccessorBasedStore.test.ts
* test: fix template config for DynamicPods test
* test: add integration tests for metadata
* fix: change metaStrategy to metadataStrategy
* refactor: comments updated to new location CSS on github + some alphabetical edits
* refactor: remove getMetadata function in DABS as it is only used once
* refactor: add DataAccessorBasedStoreArgs to DataAccessorBasedStore.ts
* docs: modify documentation for writeMetadata function in DataAccessor.ts
* feat: ldp:contains is also part of the metadata resource of a container
* refactor: change function name and move check to DataAccessorBasedStore
* fix: fix tests for DABS and PutOperationHandler
* feat: avoid cloneRepresentation by introducing RdfPatcher, RdfStorePatcher and modifying ImmutableMetadataPatcher, N3Patcher, patching.json and SparqlUpdatePatcher
* test: fix patcher tests
* feat: create sparqlInsertMetadata in SparqlDataAccessor.ts
* fix: move check during put on container if it exists already back to PutOperationHandler.ts after discussion in PR
* test: update tests PutOperationHandler.ts and DataAccessorBasedStore.ts regarding previous commit
* test: add converter to DABS and replace rejection on data during container creation to warning
* test: implemented RdfPatcher test
* feat: remove ContainerPatcher
* fix: fix lint
* fix: fix integration tests
* refactor: fix minor issues mentioned in the PR
* WIP: problem with removeResponseMetadata
* refactor: remove responseMetadata in QuadToRdfConverter.ts
* feat: handle ResponeMetadata when writing to the store via a patch
* refactor: refactor based on comments in PR
* feat: make ImmutableMetadataPatcher.ts instantiation more clear
* test: achieve 100% coverage again
* fix: fix lint
* refactor: return to explicit arguments for the DABS
* fix: return to explicit arguments for the DABS (missed one)
* feat: optimise immutable checker
* fix: fix, enhance docs + optimise config files
* fix: DABS + QuadToRdfConverter feedback implemented
* fix: patching feedback implemented
* test: update operationhandler tests
* test: update integration tests after feedback
* test: update DABS tests after feedback
* test: update ImmutableMetadataPatcher.test.ts after feedback
* test: update patch tests after feedback
* docs: add documentation about editing metadata
* fix: config: intendation + name change + extra filters | filter pattern
* docs: tsdoc added to RdfStorePatcher.ts
* fix: DABS split implemented for getRepresentation + comment refactoring
* docs: further documentation on removing response data on serialization
* fix: DABS getRepresentation method
* docs: apply feedback from Joachim on the documentation of metadata-editing.md
* fix: indentation fix + fix metadata-editing.md documentation after feedback from Joachim
* docs: small fix in metadata-editing.md documentation after feedback from Joachim
* fix: fix metadata-editing.md documentation after feedback from Joachim
* fix: fix tests meta-editing after feedback Joachim
* feat: first attempt at RELEASE_NOTES.md
* docs: update release notes based on feedback
* docs: fix newline
* fix: patching config changes after feedback
* docs: metadata editing documentation changes after feedback
* docs: metadata editing documentation changes after feedback
* docs: metadata editing documentation changes after feedback
* feat: optimisation on ImmutableMetadataPatcher.ts algorithm
* feat: remove converter from DABS and add conversion for metadata resources in the RCS
* fix: Fix documentation RepresentationPatchHandler.ts + fix response graph not being stored due to convertingstore
* feat: make RepresentationPatcher generic
* test: generic RepresentationPatcher tests
* test: 100% coverage for patchers again
* feat: containers can be created with POST with no content-type
* feat: Immutable checks always with subject identifier
* feat: create AuxiliaryLinkMetadataWriter for adding description resources Link Header
* test: add tests for AuxiliaryLinkMetadataWriter and update them for ImmutableMetadataPatcher
* feat: remove metadataGenerator from acl.json and fix tests accordingly
* WIP: preserve metadata on PUT
* feat: preserve metadata on PUT
* fix: keep metadata on PATCHes
* test: add unit tests for preserving metadata on PUT
* fix: remove inConverter from sparql endpoint as that is already the default in the (converting.json)
* fix: add metadatastrategy to RepresentationConvertingStore in regex.json
* test: add integration tests for preserving metadata on PUT
* docs: update release notes and adding documentation about preserving metadata on PUT
* WIP: Template create setRepresentation
* fix: Move container exists and not allowed check to setRepresentation
* test: fix lint
* fix: update configs and documentation
* refactor: update and add documentation + small refactoring
* refactor: update and add documentation + small refactoring + fix tests
* fix: Dynamic pod config + tests
* fix: TemplatedResourcesGenerator does not create containers when they already exist
* fix: metadata preservation now deals with complex content types
* docs: explain the case when there is no content-type
* fix: minor comments
* 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>
* Solution works but tests don't
* refactor(FetchUtil): use arrayifyStream
* refactor(FetchUtil): split fetchDataset into 2 separate functions
* style(FetchUtil): onelining instead of declaring new local var
* test: trying to mock rdfDereferencer
* refactor: promise can't have async function as arg
* test(FetchUtil): pass Quad array to mockDereference instead
* test: all tests should pass now and coverage is back to 100%
* style: comment typo
* chore: make package.json and package-lock.json compatible with main
* chore: fix package.json double entries
* chore: updated package.json to be alfabetical again
* refactor(AgentGroupAccessChecker): Remove converter from contructor and config
* refactor(TokenOwnerShipValidator): Remove converter from constructor and config
* refactor(FetchUtil): Return BadRequestHttpError instead of generic Error
* test(FetchUtil): return Response object instead of mocking fetch
* style: typos and newlines
* feat: implemented SizeReporter and FileSizeReporter
* test: FileSizeReporter tests
* feat: added QuotedDataAccessor
* test: added extra test to check recursiveness of filesizereporter
* feat: added QuotaStrategy interface
* feat: further progress in different files
* feat: wrote doc, tests and improved code
* feat: fixed bugs and code is now runnable and buildable
* feat: finished implementation
* fix: revert accidental chanegs
* fix: fileSizeReported did not count container size
* fix: bug calculating container sizes fixed
* test: FileSizeReporter tests
* test: QuotaDataValidator tests
* test: QuotaError tests
* fix: removed console.log
* doc: added doc to several files
* doc: changed doc for QuotaStrategy to new implementation
* fix: improved content length regex
* feat: improved GlobalQuotaStrategy code
* fix: made FileSizeReported readonly
* feat: added comments to quota-file.json
* fix: changed default tempFilePath variable
* test: included new tempFilePath variable in testing
* chore: created seperate command for start:file:quota to pass tests
* feat: removed all sync fs calls from FileSizeReporter
* feat: minor changes in multple files
* fix: changed function signatures to be in line with others
* feat: optimized quota data validation
* feat: improved FileSizeReporter code
* fix: corrected calculation of containersizes and fixed erroring edgecase
* feat: save content-length as number in metadata
* feat: added comments and changed GlobalQuotaStrategy constructor
* feat: changed file names and added small comment
* test: AtomicFileDataAccessor tests
* test: completed FileSizeReporter tests
* fix: content-length is now saved correctly in RepresentationMetadata
* feat: adapted content length metadata + tests
* fix: removed tempFilePath variable
* fix: reverted .gitignore
* fix: forgot to remove tempFilePath variable from componentsjs config
* test: GlobalQuotaStrategy tests
* feat: replaced DataValidator with Validator
* feat: reworked DataValidator
* feat: added calcultateChunkSize() to SizeReporter
* test: updated FileSizeReporter tests
* fix: tempFile location now relative to rootFilePath
* test: QuotaDataValidator tests
* fix: corrected FileSizeReporter tests
* fix: adapted FileSizeReporter tests
* fix: FileSizeReporter bug on Windows
* fix: regex linting error
* feat: changed Validator class
* feat: added PodQuotaStrategy to enable suota on a per pod basis
* chore: bump context versions
* fix: Capitalized comments in json file
* chore: renamed ValidatorArgs to ValidatorInput
* chore: order all exports
* fix: made TODO comment clearer
* chore: added seperated config files for global and pod based quota + fixed comments
* chore: made minor changes to comments
* feat: added PassthroughDataAccessor
* feat: added PasstroughtDataAccessor + tests
* fix: added invalid header check to ContentLengthParser
* chore: improved mocks
* chore: move quota limit higher up in config
* fix: atomicity issue in AtomicFileDataAccessor
* chore: moved .internal folder to config from FileSizeReporter
* fix: improved algorithm to ignore folders while calculating file size in FileSizeReporter
* fix: changes to support containers in the future
* fix: added error handling to prevent reading of unexistent files
* feat: added generic type to SizeReporter to calculate chunk sizes
* test: use mocked DataAccessor
* chore: added some comments to test and made minor improvement
* fix: fs mock rename
* chore: QuotaStrategy.estimateSize refactor
* chore: move trackAvailableSpace to abstract class QuotaStrategy
* fix: improved test case
* test: quota integration tests
* chore: edited some comments
* chore: change lstat to stat
* feat: moved estimateSize to SizeReporter to be consistent with calcultateChunkSize
* test: finish up tests to reach coverage
* fix: basic config
* fix: minor changes to test CI run
* fix: small fix for windows
* fix: improved writing to file
* chore: linting errors
* chore: rename trackAvailableSpace
* test: improved integration tests
* test: logging info for test debugging
* test: extra logging for debugging
* test: logging for debugging
* test: logging for debugging
* test: logging for debugging
* test: improved Quota integration test setup
* test: improve quota tests for CI run
* test: debugging Quota test
* test: uncommented global quota test
* test: changed global quota parameters
* test: logging for debugging
* test: logging cleanup
* chore: minor changes, mostly typo fixes
* chore: remove console.log
* fix: getting inconsistent results
* chore: try fix index.ts CI error
* chore: try fix CI error
* chore: try fix CI error
* chore: revert last commits
* chore: fix inconsistent files with origin
* test: minor test improvements
* chore: minor refactors and improvements
* fix: added extra try catch for breaking bug
* chore: improve config
* chore: minor code improvements
* test: use mockFs
* feat: add extra check in podQuotaStrategy
* chore: replace handle by handleSafe in ValidatingDataAccessor
* chore: typo
* test: improved Quota integration tests
* test: made comment in test more correct
* fix: rm -> rmdir for backwards compatibility
* fix: fsPromises issue
* chore: leave out irrelevant config
* chore: removed start script from package.json
* fix: Small fixes
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
Configuration has been updated so the IDP requests
also pass through an Authorization component.
A new config option was added to choose
which authorization scheme to use for the IDP.
This allows easier reuse of certain reoccurring behaviours,
such as authorization.
The AuthenticatedLdpHandler is no longer required
since it is a combination of parsing and authorization.
This did require a small change to the OperationHandler interface.
This required AuxiliaryStrategy to have a new function
indicating if the auxiliary resource just used its associated resource authorization
or its own.
These readers will determine which permissions
are available for the incoming credentials.
Their results then get combined in a UnionReader
and authorized in a PermissionBasedAuthorizer
* chore: add inbox mapping to metadatawriter config
* fix: correct inbox link rel
* feat: make LinkTypeParser reuseable to fit all link headers
* feat: minor code optimization
* feat: cleaned up metadata parser config
* feat: further cleanup of metadata parser config
* feat: adapted LinkMetadataParser to take a list to be in line with LinkRelMetadataWriter implementation
* feat: minor changes to be in line with other classes and code improvements
Co-authored-by: Wouter Termont <woutermont@gmail.com>