feat: Update .gitignore and refine TypeScript configuration; clean up commented code and enhance dataset validation; npm updates
Some checks failed
CI / container-job (push) Failing after 35s

- Updated .gitignore to include new patterns
- Refined TypeScript configuration for better performance and readability
- Cleaned up commented code in several files
- Enhanced dataset validation logic
- Updated npm dependencies to the latest versions
This commit is contained in:
Kaimbacher 2025-01-29 11:26:21 +01:00
parent a5e0a36327
commit 8d47a58d29
22 changed files with 1315 additions and 4273 deletions

View file

@ -1,7 +1,7 @@
import { FieldContext } from '@vinejs/vine/types';
import vine from '@vinejs/vine';
import { VineString } from '@vinejs/vine';
import axios, { AxiosInstance } from 'axios';
import axios from 'axios';
import { ReferenceIdentifierTypes } from '#contracts/enums';
type Options = {
@ -11,7 +11,7 @@ type Options = {
// Function to check if DOI exists using the DOI API
async function checkDoiExists(doi: string): Promise<boolean> {
try {
const response = await axios.get(`${doi}`);
const response = await axios.default.get(`${doi}`);
return response.status === 200; // If status is 200, DOI is valid
} catch (error) {
return false; // If request fails, DOI does not exist
@ -21,7 +21,7 @@ async function checkDoiExists(doi: string): Promise<boolean> {
// Function to check if ISBN exists using the Open Library API
async function checkIsbnExists(isbn: string): Promise<boolean> {
try {
const response = await axios.get(`https://isbnsearch.org/isbn/${isbn}`);
const response = await axios.default.get(`https://isbnsearch.org/isbn/${isbn}`);
return response.data && response.status == 200; // If title is returned, ISBN is valid
} catch (error) {
return false; // If request fails, ISBN does not exist