From fe1b38c1c5272cf982514eb31b48ad8e41ba9c17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:13:38 +0000 Subject: [PATCH 01/18] build(deps-dev): bump mocha from 10.8.2 to 11.0.1 Bumps [mocha](https://github.com/mochajs/mocha) from 10.8.2 to 11.0.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v10.8.2...v11.0.1) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 49 +++++++++++++++-------------------------------- package.json | 2 +- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57000c30c..28dabca72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,7 +84,7 @@ "eslint-plugin-prettier": "^5.0.0", "globals": "^15.12.0", "jest": "27.0.6", - "mocha": "^10.0.0", + "mocha": "^11.0.1", "prettier": "^3.0.3", "sinon": "^19.0.2", "supertest": "^7.0.0", @@ -10401,9 +10401,9 @@ } }, "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", + "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", @@ -10413,7 +10413,7 @@ "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", - "glob": "^8.1.0", + "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", @@ -10432,7 +10432,16 @@ "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 14.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/cliui": { @@ -10446,25 +10455,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -10477,15 +10467,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index 737cf9ac0..9aa7fb5dc 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "eslint-plugin-prettier": "^5.0.0", "globals": "^15.12.0", "jest": "27.0.6", - "mocha": "^10.0.0", + "mocha": "^11.0.1", "prettier": "^3.0.3", "sinon": "^19.0.2", "supertest": "^7.0.0", From e4ff4694c5e565598e8438dc4333bed9e96e2f7f Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 8 Jan 2025 10:48:11 +0100 Subject: [PATCH 02/18] fix(createDatasetDto): datasetName field in the CreateDatasetDto(obsoletes) should be required (#1574) * fix(createDatasetDto): datasetName field in the CreateDatasetDto should be required * added readonly keyword * remove unused import * fix lint warnings * revert error handling * declare datasetName field in the raw and derived obsolete createdataset dto --- src/datasets/datasets.service.ts | 2 +- src/datasets/dto/create-derived-dataset-obsolete.dto.ts | 9 +++++++++ src/datasets/dto/create-raw-dataset-obsolete.dto.ts | 9 +++++++++ src/datasets/schemas/dataset.schema.ts | 1 - src/proposals/dto/update-proposal.dto.ts | 1 - src/proposals/proposals.controller.ts | 2 +- src/samples/samples.controller.ts | 3 +-- 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/datasets/datasets.service.ts b/src/datasets/datasets.service.ts index 26582443e..b327aa5aa 100644 --- a/src/datasets/datasets.service.ts +++ b/src/datasets/datasets.service.ts @@ -287,7 +287,7 @@ export class DatasetsService { const datasets = this.datasetModel.find({}, { _id: 0 }).lean().exec(); return datasets; } catch (error) { - throw new NotFoundException(); + throw new NotFoundException(error); } } // Get metadata keys diff --git a/src/datasets/dto/create-derived-dataset-obsolete.dto.ts b/src/datasets/dto/create-derived-dataset-obsolete.dto.ts index f6fcc180f..2432c379e 100644 --- a/src/datasets/dto/create-derived-dataset-obsolete.dto.ts +++ b/src/datasets/dto/create-derived-dataset-obsolete.dto.ts @@ -24,4 +24,13 @@ export class CreateDerivedDatasetObsoleteDto extends UpdateDerivedDatasetObsolet @IsOptional() @IsString() readonly version?: string; + + @ApiProperty({ + type: String, + required: true, + description: + "A name for the dataset, given by the creator to carry some semantic meaning. Useful for display purposes e.g. instead of displaying the pid.", + }) + @IsString() + declare readonly datasetName: string; } diff --git a/src/datasets/dto/create-raw-dataset-obsolete.dto.ts b/src/datasets/dto/create-raw-dataset-obsolete.dto.ts index 57f7d6ba9..5de0df978 100644 --- a/src/datasets/dto/create-raw-dataset-obsolete.dto.ts +++ b/src/datasets/dto/create-raw-dataset-obsolete.dto.ts @@ -24,4 +24,13 @@ export class CreateRawDatasetObsoleteDto extends UpdateRawDatasetObsoleteDto { @IsOptional() @IsString() readonly version?: string; + + @ApiProperty({ + type: String, + required: true, + description: + "A name for the dataset, given by the creator to carry some semantic meaning. Useful for display purposes e.g. instead of displaying the pid.", + }) + @IsString() + declare readonly datasetName: string; } diff --git a/src/datasets/schemas/dataset.schema.ts b/src/datasets/schemas/dataset.schema.ts index 723816a56..59b42e27c 100644 --- a/src/datasets/schemas/dataset.schema.ts +++ b/src/datasets/schemas/dataset.schema.ts @@ -3,7 +3,6 @@ import { ApiProperty, getSchemaPath } from "@nestjs/swagger"; import { Document } from "mongoose"; import { OwnableClass } from "src/common/schemas/ownable.schema"; import { v4 as uuidv4 } from "uuid"; -import { DatasetType } from "../dataset-type.enum"; import { HistoryClass, HistorySchema } from "./history.schema"; import { LifecycleClass, LifecycleSchema } from "./lifecycle.schema"; import { RelationshipClass, RelationshipSchema } from "./relationship.schema"; diff --git a/src/proposals/dto/update-proposal.dto.ts b/src/proposals/dto/update-proposal.dto.ts index c16ef17cb..2e5fc2e06 100644 --- a/src/proposals/dto/update-proposal.dto.ts +++ b/src/proposals/dto/update-proposal.dto.ts @@ -4,7 +4,6 @@ import { IsArray, IsDateString, IsEmail, - IsEnum, IsObject, IsOptional, IsString, diff --git a/src/proposals/proposals.controller.ts b/src/proposals/proposals.controller.ts index 6b28b4d21..e6c1d7b8b 100644 --- a/src/proposals/proposals.controller.ts +++ b/src/proposals/proposals.controller.ts @@ -164,7 +164,7 @@ export class ProposalsController { return false; } } catch (error) { - throw new InternalServerErrorException(); + throw new InternalServerErrorException(error); } } diff --git a/src/samples/samples.controller.ts b/src/samples/samples.controller.ts index 048dab555..807b78438 100644 --- a/src/samples/samples.controller.ts +++ b/src/samples/samples.controller.ts @@ -160,7 +160,7 @@ export class SamplesController { return false; } } catch (error) { - throw new InternalServerErrorException(); + throw new InternalServerErrorException(error); } } @@ -410,7 +410,6 @@ export class SamplesController { required: false, type: String, // NOTE: This is custom example because the service function metadataKeys expects input like the following. - // eslint-disable-next-line @/quotes example: '{ "fields": { "metadataKey": "chemical_formula" } }', }) @ApiResponse({ From 495b19823f64a891ad1198e98dde405cab65d275 Mon Sep 17 00:00:00 2001 From: Emil Gunnarsson Date: Thu, 19 Dec 2024 14:42:57 +0100 Subject: [PATCH 03/18] fix inconsistencies between API schema and class validators --- .../dto/output-dataset-obsolete.dto.ts | 22 ++++++++++++++----- .../dto/update-dataset-obsolete.dto.ts | 4 ++-- src/datasets/dto/update-dataset.dto.ts | 10 ++++----- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/datasets/dto/output-dataset-obsolete.dto.ts b/src/datasets/dto/output-dataset-obsolete.dto.ts index f99a7fe94..68de0887e 100644 --- a/src/datasets/dto/output-dataset-obsolete.dto.ts +++ b/src/datasets/dto/output-dataset-obsolete.dto.ts @@ -17,7 +17,7 @@ import { Datablock } from "src/datablocks/schemas/datablock.schema"; export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: String, - required: false, + required: true, description: "Persistent identifier of the dataset.", }) @IsString() @@ -44,7 +44,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: String, - required: true, + required: false, description: "First name and last name of principal investigator(s). If multiple PIs are present, use a semicolon separated list. This field is required if the dataset is a Raw dataset.", }) @@ -74,7 +74,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: String, - required: true, + required: false, description: "Unique location identifier where data was taken, usually in the form /Site-name/facility-name/instrumentOrBeamline-name. This field is required if the dataset is a Raw dataset.", }) @@ -112,7 +112,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: String, - required: true, + required: false, description: "First name and last name of the person or people pursuing the data analysis. The string may contain a list of names, which should then be separated by semicolons.", }) @@ -122,7 +122,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: [String], - required: true, + required: false, description: "Array of input dataset identifiers used in producing the derived dataset. Ideally these are the global identifier to existing datasets inside this or federated data catalogs.", }) @@ -134,7 +134,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { @ApiProperty({ type: [String], - required: true, + required: false, description: "A list of links to software repositories which uniquely identifies the pieces of software, including versions, used for yielding the derived data.", }) @@ -183,6 +183,9 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "Containers that list all files and their attributes which make up a dataset. Usually filled at the time the dataset's metadata is created in the data catalog. Can be used by subsequent archiving processes to create the archived datasets.", }) + @IsOptional() + @IsArray() + @Type(() => OrigDatablock) origdatablocks?: OrigDatablock[]; @ApiProperty({ @@ -192,6 +195,9 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "When archiving a dataset, all files contained in the dataset are listed here together with their checksum information. Several datablocks can be created if the file listing is too long for a single datablock. This partitioning decision is done by the archiving system to allow for chunks of datablocks with manageable sizes. E.g a datasets consisting of 10 TB of data could be split into 10 datablocks of about 1 TB each. The upper limit set by the data catalog system itself is given by the fact that documents must be smaller than 16 MB, which typically allows for datasets of about 100000 files.", }) + @IsOptional() + @IsArray() + @Type(() => Datablock) datablocks?: Datablock[]; @ApiProperty({ @@ -200,6 +206,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "Indicate the user who created this record. This property is added and maintained by the system.", }) + @IsString() createdBy: string; @ApiProperty({ @@ -208,6 +215,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "Indicate the user who updated this record last. This property is added and maintained by the system.", }) + @IsString() updatedBy: string; @ApiProperty({ @@ -216,6 +224,7 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "Date and time when this record was created. This field is managed by mongoose with through the timestamp settings. The field should be a string containing a date in ISO 8601 format (2024-02-27T12:26:57.313Z)", }) + @IsDateString() createdAt: Date; @ApiProperty({ @@ -224,5 +233,6 @@ export class OutputDatasetObsoleteDto extends UpdateDatasetObsoleteDto { description: "Date and time when this record was updated last. This field is managed by mongoose with through the timestamp settings. The field should be a string containing a date in ISO 8601 format (2024-02-27T12:26:57.313Z)", }) + @IsDateString() updatedAt: Date; } diff --git a/src/datasets/dto/update-dataset-obsolete.dto.ts b/src/datasets/dto/update-dataset-obsolete.dto.ts index 853e50752..52417fa9f 100644 --- a/src/datasets/dto/update-dataset-obsolete.dto.ts +++ b/src/datasets/dto/update-dataset-obsolete.dto.ts @@ -123,12 +123,12 @@ export class UpdateDatasetObsoleteDto extends OwnableDto { @ApiProperty({ type: Number, default: 0, - required: true, + required: false, description: "Total number of files in all Datablocks for this dataset.", }) @IsOptional() @IsInt() - readonly numberOfFilesArchived?: number; + readonly numberOfFilesArchived?: number = 0; @ApiProperty({ type: Date, diff --git a/src/datasets/dto/update-dataset.dto.ts b/src/datasets/dto/update-dataset.dto.ts index 1dc67f0e7..fcee1f6f0 100644 --- a/src/datasets/dto/update-dataset.dto.ts +++ b/src/datasets/dto/update-dataset.dto.ts @@ -30,7 +30,7 @@ import { HistoryClass } from "../schemas/history.schema"; export class UpdateDatasetDto extends OwnableDto { @ApiProperty({ type: String, - required: true, + required: false, description: "Owner or custodian of the dataset, usually first name + last name. The string may contain a list of persons, which should then be separated by semicolons.", }) @@ -125,7 +125,7 @@ export class UpdateDatasetDto extends OwnableDto { @ApiProperty({ type: Number, default: 0, - required: true, + required: false, description: "Total number of files in all Datablocks for this dataset.", }) @IsOptional() @@ -291,7 +291,7 @@ export class UpdateDatasetDto extends OwnableDto { readonly dataQualityMetrics?: number; @ApiProperty({ - type: String, + type: [String], required: false, isArray: true, description: @@ -366,7 +366,7 @@ export class UpdateDatasetDto extends OwnableDto { readonly sampleIds?: string[]; @ApiProperty({ - type: String, + type: [String], required: false, description: "ID of the instrument or instruments where the data included or used in this datasets was collected on.", @@ -379,7 +379,7 @@ export class UpdateDatasetDto extends OwnableDto { @ApiProperty({ type: [String], - required: true, + required: false, description: "Array of input dataset identifiers used in producing the derived dataset. Ideally these are the global identifier to existing datasets inside this or federated data catalogs.", }) From e4a6903062bf1f8e9ac5e0eced6b7b429f916f52 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 8 Jan 2025 14:30:55 +0100 Subject: [PATCH 04/18] ci(workflow): add pull request trigger sdk generation and cleanup artifacts step (#1609) * ci(workflow): add pull request trigger sdk generation and cleanup artifacts step * fix sdk generation error * change @ApiProperty to use single type with isArray flag --- .github/workflows/upload-sdk-artifact.yml | 14 ++++++++++++++ src/datasets/dto/update-dataset.dto.ts | 23 +++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/upload-sdk-artifact.yml b/.github/workflows/upload-sdk-artifact.yml index 5596e09d1..b580b88a1 100644 --- a/.github/workflows/upload-sdk-artifact.yml +++ b/.github/workflows/upload-sdk-artifact.yml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: + branches: + - master env: NODE_VERSION: 20.x @@ -75,6 +78,17 @@ jobs: ) - uses: actions/upload-artifact@v4 + if: github.event_name == 'push' with: name: sdk-${{ matrix.generator }}-${{ github.sha }} path: ./sdk + + cleanup-artifacts: + runs-on: ubuntu-latest + needs: + - generate-and-upload-sdk + if: github.event_name != 'push' + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: swagger-* diff --git a/src/datasets/dto/update-dataset.dto.ts b/src/datasets/dto/update-dataset.dto.ts index fcee1f6f0..8e58a35fe 100644 --- a/src/datasets/dto/update-dataset.dto.ts +++ b/src/datasets/dto/update-dataset.dto.ts @@ -152,7 +152,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly validationStatus?: string; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "Array of tags associated with the meaning or contents of this dataset. Values should ideally come from defined vocabularies, taxonomies, ontologies or knowledge graphs.", @@ -226,7 +227,8 @@ export class UpdateDatasetDto extends OwnableDto { // it needs to be discussed if this fields is managed by the user or by the system @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, default: [], description: "List of users that the dataset has been shared with.", @@ -291,7 +293,7 @@ export class UpdateDatasetDto extends OwnableDto { readonly dataQualityMetrics?: number; @ApiProperty({ - type: [String], + type: String, required: false, isArray: true, description: @@ -342,7 +344,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly dataFormat?: string; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "ID of the proposal or proposals which the dataset belongs to.
This dataset might have been acquired under the listed proposals or is derived from datasets acquired from datasets belonging to the listed datasets.", @@ -354,7 +357,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly proposalIds?: string[]; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "ID of the sample or samples used when collecting the data included or used in this dataset.", @@ -366,7 +370,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly sampleIds?: string[]; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "ID of the instrument or instruments where the data included or used in this datasets was collected on.", @@ -378,7 +383,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly instrumentIds?: string[]; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "Array of input dataset identifiers used in producing the derived dataset. Ideally these are the global identifier to existing datasets inside this or federated data catalogs.", @@ -390,7 +396,8 @@ export class UpdateDatasetDto extends OwnableDto { readonly inputDatasets?: string[]; @ApiProperty({ - type: [String], + type: String, + isArray: true, required: false, description: "A list of links to software repositories which uniquely identifies the pieces of software, including versions, used for yielding the derived data.", From ead1ffee71581cfb86140cca4afe33688e8895c7 Mon Sep 17 00:00:00 2001 From: junjiequan Date: Wed, 8 Jan 2025 14:56:19 +0100 Subject: [PATCH 05/18] chore: commit message test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd85794f1..d95a72d3b 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ Valid environment variables for the .env file. See [.env.example](/.env.example) | `LOGGERS_CONFIG_FILE` | string | | The file name for loggers configuration, located in the project root directory. | "loggers.json" | | `PROPOSAL_TYPES_FILE` | string | | The file name for proposal types configuration, located in the project root directory. | "proposalTypes.json" | | `SWAGGER_PATH` | string | Yes | swaggerPath is the path where the swagger UI will be available| "explorer"| -| `MAX_FILE_UPLOAD_SIZE` | string | Yes | Maximum allowed file upload size | "16mb"| +| `MAX_FILE_UPLOAD_SIZE` | string | Yes | Maximum allowed file upload size. | "16mb"| ## Migrating from the old SciCat Backend From b7ec56b74a956509f21fc7fe1e8f0244336147e9 Mon Sep 17 00:00:00 2001 From: junjiequan Date: Wed, 8 Jan 2025 14:58:21 +0100 Subject: [PATCH 06/18] minor fix for README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d95a72d3b..1c4105bff 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ Valid environment variables for the .env file. See [.env.example](/.env.example) | `ES_REFRESH` | string | | If set to `wait_for`, Elasticsearch will wait till data is inserted into the specified index before returning a response. | false | | `LOGGERS_CONFIG_FILE` | string | | The file name for loggers configuration, located in the project root directory. | "loggers.json" | | `PROPOSAL_TYPES_FILE` | string | | The file name for proposal types configuration, located in the project root directory. | "proposalTypes.json" | -| `SWAGGER_PATH` | string | Yes | swaggerPath is the path where the swagger UI will be available| "explorer"| +| `SWAGGER_PATH` | string | Yes | swaggerPath is the path where the swagger UI will be available. | "explorer"| | `MAX_FILE_UPLOAD_SIZE` | string | Yes | Maximum allowed file upload size. | "16mb"| ## Migrating from the old SciCat Backend From 5acf199206e7a9a7e14021220cd9a3a31d110329 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:29:10 +0000 Subject: [PATCH 07/18] build(deps-dev): bump @stylistic/eslint-plugin from 2.12.1 to 2.13.0 Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.12.1 to 2.13.0. - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v2.13.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28dabca72..08a30fb62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2817,9 +2817,9 @@ "dev": true }, "node_modules/@stylistic/eslint-plugin": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.12.1.tgz", - "integrity": "sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz", + "integrity": "sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^8.13.0", From e19e5d31620647bb085c926da465edeffa81ee01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:40:22 +0000 Subject: [PATCH 08/18] build(deps): bump mongoose from 8.9.3 to 8.9.4 Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.9.3 to 8.9.4. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.9.3...8.9.4) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08a30fb62..2e5fbfcf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10618,9 +10618,9 @@ } }, "node_modules/mongoose": { - "version": "8.9.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.3.tgz", - "integrity": "sha512-G50GNPdMqhoiRAJ/24GYAzg13yxXDD3FOOFeYiFwtHmHpAJem3hxbYIxAhLJGWbYEiUZL0qFMu2LXYkgGAmo+Q==", + "version": "8.9.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.4.tgz", + "integrity": "sha512-DndoI01aV/q40P9DiYDXsYjhj8vZjmmuFwcC3Tro5wFznoE1z6Fe2JgMnbLR6ghglym5ziYizSfAJykp+UPZWg==", "dependencies": { "bson": "^6.10.1", "kareem": "2.6.3", From a57b4ed6ba8c753d7023b9367a9d1d6d9efd66d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:52:12 +0000 Subject: [PATCH 09/18] build(deps-dev): bump @typescript-eslint/parser from 8.19.0 to 8.19.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.19.0 to 8.19.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.19.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 135 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 128 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e5fbfcf3..a9d366b6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3411,15 +3411,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.19.0.tgz", - "integrity": "sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==", + "version": "8.19.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.19.1.tgz", + "integrity": "sha512-67gbfv8rAwawjYx3fYArwldTQKoYfezNUT4D5ioWetr/xCrxXxvleo3uuiFuKfejipvq+og7mjz3b0G2bVyUCw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/typescript-estree": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", + "@typescript-eslint/scope-manager": "8.19.1", + "@typescript-eslint/types": "8.19.1", + "@typescript-eslint/typescript-estree": "8.19.1", + "@typescript-eslint/visitor-keys": "8.19.1", "debug": "^4.3.4" }, "engines": { @@ -3434,6 +3434,127 @@ "typescript": ">=4.8.4 <5.8.0" } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "8.19.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.19.1.tgz", + "integrity": "sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.19.1", + "@typescript-eslint/visitor-keys": "8.19.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "8.19.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.19.1.tgz", + "integrity": "sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.19.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.1.tgz", + "integrity": "sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.19.1", + "@typescript-eslint/visitor-keys": "8.19.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.19.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.1.tgz", + "integrity": "sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.19.1", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/ts-api-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", + "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "dev": true, + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "8.19.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.19.0.tgz", From 766c5ce5f6e4be1dfe8c674c5278c29275e20ce2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:03:41 +0000 Subject: [PATCH 10/18] build(deps-dev): bump @eslint/js from 9.17.0 to 9.18.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.17.0 to 9.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.18.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9d366b6b..1fded1ff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1272,9 +1272,9 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.18.0.tgz", + "integrity": "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6463,6 +6463,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", From 5cb9dc04fe0653aea38270dfb0ed8574e7092e35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:15:05 +0000 Subject: [PATCH 11/18] build(deps-dev): bump eslint from 9.17.0 to 9.18.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.18.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fded1ff9..ef0604ce2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1206,10 +1206,13 @@ } }, "node_modules/@eslint/core": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", - "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz", + "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==", "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -1290,11 +1293,12 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", - "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz", + "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==", "dev": true, "dependencies": { + "@eslint/core": "^0.10.0", "levn": "^0.4.1" }, "engines": { @@ -6311,18 +6315,18 @@ } }, "node_modules/eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.18.0.tgz", + "integrity": "sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", + "@eslint/core": "^0.10.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/js": "9.18.0", + "@eslint/plugin-kit": "^0.2.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.1", @@ -6463,15 +6467,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", From 8ae81233d71cc552c7395f03c52df3851047fcaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:26:08 +0000 Subject: [PATCH 12/18] build(deps-dev): bump wait-on from 8.0.1 to 8.0.2 Bumps [wait-on](https://github.com/jeffbski/wait-on) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/jeffbski/wait-on/releases) - [Commits](https://github.com/jeffbski/wait-on/compare/v8.0.1...v8.0.2) --- updated-dependencies: - dependency-name: wait-on dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef0604ce2..c1e9c6108 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4355,9 +4355,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -14077,12 +14077,12 @@ } }, "node_modules/wait-on": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.1.tgz", - "integrity": "sha512-1wWQOyR2LVVtaqrcIL2+OM+x7bkpmzVROa0Nf6FryXkS+er5Sa1kzFGjzZRqLnHa3n1rACFLeTwUqE1ETL9Mig==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.2.tgz", + "integrity": "sha512-qHlU6AawrgAIHlueGQHQ+ETcPLAauXbnoTKl3RKq20W0T8x0DKVAo5xWIYjHSyvHxQlcYbFdR0jp4T9bDVITFA==", "dev": true, "dependencies": { - "axios": "^1.7.7", + "axios": "^1.7.9", "joi": "^17.13.3", "lodash": "^4.17.21", "minimist": "^1.2.8", From 61cbdccbb28e54d17ef50d26304931cf4208072f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:37:16 +0000 Subject: [PATCH 13/18] build(deps-dev): bump ts-loader from 9.5.1 to 9.5.2 Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.5.1 to 9.5.2. - [Release notes](https://github.com/TypeStrong/ts-loader/releases) - [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.5.1...v9.5.2) --- updated-dependencies: - dependency-name: ts-loader dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c1e9c6108..d4020bdf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13595,9 +13595,9 @@ } }, "node_modules/ts-loader": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", - "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.2.tgz", + "integrity": "sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw==", "dev": true, "dependencies": { "chalk": "^4.1.0", From 33b07bbafb31ba8aab13dbcac0d58be8718ceeea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:48:21 +0000 Subject: [PATCH 14/18] build(deps-dev): bump @types/mocha from 10.0.9 to 10.0.10 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 10.0.9 to 10.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) --- updated-dependencies: - dependency-name: "@types/mocha" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4020bdf6..39589ee81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3188,9 +3188,9 @@ "optional": true }, "node_modules/@types/mocha": { - "version": "10.0.9", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.9.tgz", - "integrity": "sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==", + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true }, "node_modules/@types/node": { From b6933d4e35ec95f05d46ff86985472952b5fe33b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 06:51:10 +0000 Subject: [PATCH 15/18] build(deps): bump mongoose from 8.9.4 to 8.9.5 Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.9.4 to 8.9.5. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.9.4...8.9.5) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39589ee81..6f3db29a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10743,9 +10743,9 @@ } }, "node_modules/mongoose": { - "version": "8.9.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.4.tgz", - "integrity": "sha512-DndoI01aV/q40P9DiYDXsYjhj8vZjmmuFwcC3Tro5wFznoE1z6Fe2JgMnbLR6ghglym5ziYizSfAJykp+UPZWg==", + "version": "8.9.5", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.5.tgz", + "integrity": "sha512-SPhOrgBm0nKV3b+IIHGqpUTOmgVL5Z3OO9AwkFEmvOZznXTvplbomstCnPOGAyungtRXE5pJTgKpKcZTdjeESg==", "dependencies": { "bson": "^6.10.1", "kareem": "2.6.3", From 5daefccfdba4e583a4e0814ef2519c4743c9a098 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 07:01:54 +0000 Subject: [PATCH 16/18] build(deps-dev): bump eslint-config-prettier from 9.1.0 to 10.0.1 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.1.0 to 10.0.1. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.1.0...v10.0.1) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f3db29a1..ebb870a5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -80,7 +80,7 @@ "concurrently": "^9.0.0", "eslint": "^9.0.0", "eslint-config-loopback": "^13.1.0", - "eslint-config-prettier": "^9.0.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-prettier": "^5.0.0", "globals": "^15.12.0", "jest": "27.0.6", @@ -6383,12 +6383,12 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", "dev": true, "bin": { - "eslint-config-prettier": "bin/cli.js" + "eslint-config-prettier": "build/bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" diff --git a/package.json b/package.json index 9aa7fb5dc..142e369d4 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "concurrently": "^9.0.0", "eslint": "^9.0.0", "eslint-config-loopback": "^13.1.0", - "eslint-config-prettier": "^9.0.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-prettier": "^5.0.0", "globals": "^15.12.0", "jest": "27.0.6", From 55fb2fde4ae3f8cf041d506ff621e3bff3c7f41a Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 17 Jan 2025 13:06:13 +0100 Subject: [PATCH 17/18] =?UTF-8?q?feat:=20make=20large=20file=20access=20wa?= =?UTF-8?q?rning=20text=20configurable=20with=20largeData=E2=80=A6=20(#151?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …FileAccessInstruction. ## Description Change for the https://github.com/SciCatProject/frontend/pull/1666 ## Motivation ## Fixes * Bug fixed (#X) ## Changes: * changes made ## Tests included - [ ] Included for each change/fix? - [ ] Passing? ## Documentation - [ ] swagger documentation updated (required for API changes) - [ ] official documentation updated ### official documentation info --- CI/E2E/frontend.config.json | 2 ++ src/config/frontend.config.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CI/E2E/frontend.config.json b/CI/E2E/frontend.config.json index 187a3bfe5..d56484821 100644 --- a/CI/E2E/frontend.config.json +++ b/CI/E2E/frontend.config.json @@ -120,6 +120,8 @@ "searchPublicDataEnabled": true, "searchSamples": true, "sftpHost": "login.esss.dk", + "sourceFolder": "/data/test", + "maxFileSizeWarning": "", "shareEnabled": true, "shoppingCartEnabled": true, "shoppingCartOnHeader": true, diff --git a/src/config/frontend.config.json b/src/config/frontend.config.json index 213c69a5e..c67c5d296 100644 --- a/src/config/frontend.config.json +++ b/src/config/frontend.config.json @@ -29,7 +29,6 @@ "lbBaseURL": "http://localhost:3000", "logbookEnabled": true, "loginFormEnabled": true, - "maxDirectDownloadSize": 5000000000, "metadataPreviewEnabled": true, "metadataStructure": "", "multipleDownloadAction": "http:/127.0.0.1:3012/zip", @@ -48,6 +47,9 @@ "searchPublicDataEnabled": true, "searchSamples": true, "sftpHost": "login.esss.dk", + "sourceFolder": "/data/ess", + "maxDirectDownloadSize": 5000000000, + "maxFileSizeWarning": "Some files are above and cannot be downloaded directly. These file can be downloaded via sftp host: in directory: ", "shareEnabled": true, "shoppingCartEnabled": true, "shoppingCartOnHeader": true, From ad3c12986e3942a1e8b2e110128397c2cbe0cc7d Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 17 Jan 2025 14:43:29 +0100 Subject: [PATCH 18/18] feat: add proposal count endpoint (#1626) * feat: add proposal count endpoint * remove unused import --- src/proposals/proposals.controller.ts | 36 ++++++++++++++++++++++++++- src/proposals/proposals.service.ts | 10 ++++++++ test/Proposal.js | 26 +++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/proposals/proposals.controller.ts b/src/proposals/proposals.controller.ts index e6c1d7b8b..d95cb1e03 100644 --- a/src/proposals/proposals.controller.ts +++ b/src/proposals/proposals.controller.ts @@ -54,8 +54,10 @@ import { import { plainToInstance } from "class-transformer"; import { validate, ValidatorOptions } from "class-validator"; import { + CountApiResponse, filterDescription, filterExample, + FullFacetFilters, FullFacetResponse, fullQueryExampleLimits, FullQueryFilters, @@ -368,6 +370,38 @@ export class ProposalsController { return this.proposalsService.findAll(proposalFilters); } + // GET /proposals/count + @UseGuards(PoliciesGuard) + @CheckPolicies("proposals", (ability: AppAbility) => + ability.can(Action.ProposalsRead, ProposalClass), + ) + @Get("/count") + @ApiOperation({ + summary: "It returns the number of proposals.", + description: + "It returns a number of proposals matching the where filter if provided.", + }) + @ApiQuery({ + name: "filters", + description: + "Database filters to apply when retrieving count for proposals", + required: false, + type: String, + example: '{"where": {"proposalId": "189691"}}', + }) + @ApiResponse({ + status: 200, + type: CountApiResponse, + description: + "Return the number of proposals in the following format: { count: integer }", + }) + async count(@Req() request: Request, @Query("filters") filters?: string) { + const proposalFilters: IFilters = + this.updateFiltersForList(request, JSON.parse(filters ?? "{}")); + + return this.proposalsService.count(proposalFilters); + } + // GET /proposals/fullquery @UseGuards(PoliciesGuard) @CheckPolicies("proposals", (ability: AppAbility) => @@ -454,7 +488,7 @@ export class ProposalsController { "Full facet query filters to apply when retrieving proposals\n" + proposalsFullQueryDescriptionFields, required: false, - type: String, + type: FullFacetFilters, example: proposalsFullQueryExampleFields, }) @ApiResponse({ diff --git a/src/proposals/proposals.service.ts b/src/proposals/proposals.service.ts index 09258fdc0..7509798df 100644 --- a/src/proposals/proposals.service.ts +++ b/src/proposals/proposals.service.ts @@ -57,6 +57,16 @@ export class ProposalsService { .exec(); } + async count( + filter: IFilters, + ): Promise<{ count: number }> { + const whereFilter: FilterQuery = filter.where ?? {}; + + const count = await this.proposalModel.countDocuments(whereFilter).exec(); + + return { count }; + } + async fullquery( filter: IFilters, ): Promise { diff --git a/test/Proposal.js b/test/Proposal.js index e74155869..2ad0858af 100644 --- a/test/Proposal.js +++ b/test/Proposal.js @@ -176,6 +176,32 @@ describe("1500: Proposal: Simple Proposal", () => { }); }); + it("0091: should get proposal count", async () => { + return request(appUrl) + .get("/api/v3/Proposals/count") + .set({ Authorization: `Bearer ${accessTokenProposalIngestor}` }) + .set("Accept", "application/json") + .expect(TestData.SuccessfulGetStatusCode) + .expect("Content-Type", /json/) + .then((res) => { + res.body["count"].should.be.greaterThan(0); + }); + }); + + it("0091: should get proposal count using filters", async () => { + const query = { where: { proposalId: { $in: [proposalId] } } }; + return request(appUrl) + .get("/api/v3/Proposals/count") + .set({ Authorization: `Bearer ${accessTokenProposalIngestor}` }) + .query("filter=" + encodeURIComponent(JSON.stringify(query))) + .set("Accept", "application/json") + .expect(TestData.SuccessfulGetStatusCode) + .expect("Content-Type", /json/) + .then((res) => { + res.body["count"].should.be.equal(1); + }); + }); + it("0100: should add a new attachment to this proposal", async () => { let testAttachment = { ...TestData.AttachmentCorrect }; testAttachment.proposalId = defaultProposalId;