feat: update to vite.js, Refactor configuration files, remove unused assets, and clean up commented code:
All checks were successful
CI / container-job (push) Successful in 43s

- ace.js: use ts-node-maintained
- adonisrc.ts: load vite_provider, sett assetBundler to false, addd hooks property
- Dockerfile: change to node version 22
- package.json: remove babel depencies; add @swc/wasm, add vitejs/plugin-vue, add hot-hook, add vite,  update eslint-config-prettier, tailwindcss, ts-node-maintained
- new vite.config.js and config/vite.ts
- inertia.js
- improved own vinejs_provider.ts
- adapted app.css needed for vitejs
- adapted app.ts: new resolve method neede for vitejs
relocated resources/js/logo.svg
- remove Buffer import into FileUpload.vue
- Create.vue: improved submit needed for @inertiajs/vue3 form helper
- Edit.vue: mproved submit needed for @inertiajs/vue3 form helper
- kernel.ts: load vite_middleware
- formated rotes.ts file
- rewritten allowed_extensions_mimetypes.ts file (removed typescript errors)
This commit is contained in:
Kaimbacher 2025-02-07 10:14:57 +01:00
parent 8d47a58d29
commit 4c5a8f5a42
40 changed files with 1647 additions and 4926 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 from 'axios';
import { default as 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.default.get(`${doi}`);
const response = await axios.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.default.get(`https://isbnsearch.org/isbn/${isbn}`);
const response = await axios.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