lab4 Морозов ПИбд-22 #4
@@ -12,7 +12,8 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
|
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
|
||||||
|
"no-param-reassign": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,10 +55,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row justify-content-center mt-5" id="userCards">
|
|
||||||
<!-- Здесь будут карточки -->
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="text-center py-4 text-light mt-5 bg-custom-dark">
|
<footer class="text-center py-4 text-light mt-5 bg-custom-dark">
|
||||||
@@ -66,7 +62,7 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- маска + карточка пользователя -->
|
<!-- маска + карточка пользователя -->
|
||||||
<script type="module" src="/src/account.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
74
html/add_book.html
Normal file
74
html/add_book.html
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Добавить книгу</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||||
|
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||||
|
integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||||
|
<link href="css/style.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-dark text-light"></body>
|
||||||
|
|
||||||
|
<header class=" py-3 bg-custom-dark">
|
||||||
|
<div class="container d-flex align-items-center">
|
||||||
|
<a class="navbar-brand" href="index.html">
|
||||||
|
<img src="img/manga.png" alt="ЛОГО" height="50">
|
||||||
|
</a>
|
||||||
|
<h1 class="h5 ms-4 mb-0 text-light">Добавить книгу</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="container bg-custom-dark mt-5">
|
||||||
|
<form id="bookForm">
|
||||||
|
<input type="hidden" id="bookId" />
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="title" class="form-label">Название книги</label>
|
||||||
|
<input type="text" id="title" class="form-control" required />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="description" class="form-label">Описание книги</label>
|
||||||
|
<textarea id="description" class="description"></textarea>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="authorId" class="form-label">Автор</label>
|
||||||
|
<select id="authorId" class="form-select" required></select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="statusId" class="form-label">Статус</label>
|
||||||
|
<select id="statusId" class="form-select" required></select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="cover" class="form-label">Обложка (файл)</label>
|
||||||
|
<img id="coverPreview" src="" alt="Превью обложки" class="mt-2" style="max-height: 150px; display:none;" />
|
||||||
|
<input type="file" id="cover" name="cover" accept="image/*" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||||||
|
<button type="button" id="cancelBtn" class="btn btn-secondary ms-2">Отмена</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="text-center py-4 text-light mt-5 bg-custom-dark">
|
||||||
|
<p><i class="bi bi-journal-text me-2"></i>Все права защищены, 2025</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script type="module" src="../src/main.js"></script>
|
||||||
|
<script type="module" src="/mvc/controller.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -40,3 +40,13 @@ footer {
|
|||||||
width: 600px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 120px;
|
||||||
|
max-height: 400px;
|
||||||
|
overflow: hidden; /* Запретить скролл */
|
||||||
|
resize: none; /* Запретить изменение размера */
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
64
html/database/data.json
Normal file
64
html/database/data.json
Normal file
File diff suppressed because one or more lines are too long
@@ -41,68 +41,17 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- Основное содержимое -->
|
<!-- Основное содержимое -->
|
||||||
<div class="container mt-5 bg-secondary">
|
<div class="container mt-5 bg-custom-dark p-3 rounded">
|
||||||
<!-- Раздел с произведениями -->
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
<div class="main">
|
<h3>Наши произведения</h3>
|
||||||
<h3 class="text-center">Наши произведения</h3>
|
<a href="add_book.html" class="btn btn-success">
|
||||||
<section class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
|
<i class="bi bi-plus-circle me-2"></i>Добавить книгу
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
<div id="booksContainer" class="row row-cols-1 row-cols-md-3 g-3">
|
||||||
<figure class="text-center">
|
<!-- Здесь динамически будут отображаться книги -->
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex justify-content-center">
|
|
||||||
<a href="manga.html" class="d-block">
|
|
||||||
<figure class="text-center">
|
|
||||||
<img src="img/заглушка.jpg" class="img-fluid" alt="Заглушка">
|
|
||||||
<figcaption>Заглушка</figcaption>
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Новости -->
|
<!-- Новости -->
|
||||||
@@ -161,6 +110,7 @@
|
|||||||
<!-- JS Bootstrap -->
|
<!-- JS Bootstrap -->
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script type="module" src="../src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
<div class="collapse navbar-collapse ms-3" id="navbarNavDropdown">
|
<div class="collapse navbar-collapse ms-3" id="navbarNavDropdown">
|
||||||
<ul class="navbar-nav me-auto">
|
<ul class="navbar-nav me-auto">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<a href="account.html" class="btn btn-outline-warning">Вход</a>
|
<a href="account.html" class="btn btn-outline-warning">Вход</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,7 +52,9 @@
|
|||||||
|
|
||||||
<footer class="bg-custom-dark text-light text-center py-4">
|
<footer class="bg-custom-dark text-light text-center py-4">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p>Спасибо, что посетили наш сайт, если возникли вопросы, обращайтесь к нам на почту <a href="mailto:manga@manga.scom" class="text-warning">manga@manga.scom</a></p>
|
<p>Спасибо, что посетили наш сайт, если возникли вопросы, обращайтесь к нам на почту
|
||||||
|
<a href="mailto:manga@manga.scom" class="text-warning">manga@manga.scom</a>
|
||||||
|
</p>
|
||||||
<p>Если вас интересуют наши соц.сети, то вот они:</p>
|
<p>Если вас интересуют наши соц.сети, то вот они:</p>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="https://vk.com/ded_moroz1509" class="me-3">
|
<a href="https://vk.com/ded_moroz1509" class="me-3">
|
||||||
@@ -63,11 +64,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
<!-- JS Bootstrap -->
|
<!-- JS Bootstrap -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js"
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||||
integrity="sha384-qM3E4Th5USh8vEk7NR7s02PbZ+PeWXcP4qU3HdHPoUVYvRNEAYsGHV7kpw9yeF0L"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
|
<!-- Твой модуль JS -->
|
||||||
|
<script type="modal" src="/html/src/main.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
16
html/mvc/api/client.js
Normal file
16
html/mvc/api/client.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
const BASE_URL = "http://localhost:5174"; // Порт json-server
|
||||||
|
|
||||||
|
async function request(path, method = "GET", body = null) {
|
||||||
|
const options = { method, headers: { "Content-Type": "application/json" } };
|
||||||
|
if (body) options.body = JSON.stringify(body);
|
||||||
|
|
||||||
|
const response = await fetch(`${BASE_URL}/${path}`, options);
|
||||||
|
if (!response.ok) throw new Error(`Ошибка запроса: ${response.status}`);
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getAllItems = (entity) => request(entity);
|
||||||
|
export const getItem = (entity, id) => request(`${entity}/${id}`);
|
||||||
|
export const createItem = (entity, data) => request(entity, "POST", data);
|
||||||
|
export const updateItem = (entity, id, data) => request(`${entity}/${id}`, "PATCH", data);
|
||||||
|
export const deleteItem = (entity, id) => request(`${entity}/${id}`, "DELETE");
|
||||||
128
html/mvc/controller.js
Normal file
128
html/mvc/controller.js
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
import model from "./model";
|
||||||
|
import view from "./view";
|
||||||
|
|
||||||
|
const controller = {
|
||||||
|
// Инициализация главной страницы (index.html)
|
||||||
|
async initIndexPage() {
|
||||||
|
await this.loadAuthorsAndStatuses();
|
||||||
|
await this.loadAndRenderBooks();
|
||||||
|
|
||||||
|
// Делегирование событий на контейнер с книгами
|
||||||
|
const booksContainer = document.getElementById("booksContainer");
|
||||||
|
if (booksContainer) {
|
||||||
|
booksContainer.addEventListener("click", async (e) => {
|
||||||
|
const { id } = e.target.dataset;
|
||||||
|
if (e.target.classList.contains("delete-btn")) {
|
||||||
|
if (confirm("Удалить книгу?")) {
|
||||||
|
try {
|
||||||
|
await model.deleteBook(id);
|
||||||
|
view.showAlert("Книга удалена");
|
||||||
|
await this.loadAndRenderBooks();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
view.showAlert("Ошибка при удалении книги", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (e.target.classList.contains("edit-btn")) {
|
||||||
|
// При редактировании перенаправляем на add_book.html?id=...
|
||||||
|
window.location.href = `add_book.html?id=${id}`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Инициализация страницы добавления/редактирования (add_book.html)
|
||||||
|
async initAddBookPage() {
|
||||||
|
await this.loadAuthorsAndStatuses();
|
||||||
|
view.bindCoverInput();
|
||||||
|
|
||||||
|
// Если есть id в URL — значит редактирование
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
const editingId = params.get("id");
|
||||||
|
if (editingId) {
|
||||||
|
try {
|
||||||
|
const book = await model.getBook(editingId);
|
||||||
|
view.fillBookForm(book);
|
||||||
|
document.getElementById("bookId").value = editingId;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
view.showAlert("Ошибка при загрузке книги", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Сохранение формы
|
||||||
|
const bookForm = document.getElementById("bookForm");
|
||||||
|
if (bookForm) {
|
||||||
|
bookForm.addEventListener("submit", async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
try {
|
||||||
|
const bookData = await view.getBookFormData();
|
||||||
|
const id = document.getElementById("bookId").value;
|
||||||
|
if (id) {
|
||||||
|
await model.updateBook(id, bookData);
|
||||||
|
view.showAlert("Книга обновлена");
|
||||||
|
} else {
|
||||||
|
await model.addBook(bookData);
|
||||||
|
view.showAlert("Книга добавлена");
|
||||||
|
}
|
||||||
|
view.resetBookForm();
|
||||||
|
document.getElementById("bookId").value = "";
|
||||||
|
window.location.href = "index.html";
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
view.showAlert("Ошибка при сохранении книги", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Кнопка "Отмена"
|
||||||
|
const cancelBtn = document.getElementById("cancelBtn");
|
||||||
|
if (cancelBtn) {
|
||||||
|
cancelBtn.addEventListener("click", () => {
|
||||||
|
window.location.href = "index.html";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Загрузка авторов и статусов для селектов
|
||||||
|
async loadAuthorsAndStatuses() {
|
||||||
|
try {
|
||||||
|
const authors = await model.getAuthors();
|
||||||
|
const statuses = await model.getStatuses();
|
||||||
|
const authorSelect = document.getElementById("authorId");
|
||||||
|
const statusSelect = document.getElementById("statusId");
|
||||||
|
if (authorSelect) view.renderAuthorOptions(authors, authorSelect);
|
||||||
|
if (statusSelect) view.renderStatusOptions(statuses, statusSelect);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
view.showAlert("Ошибка при загрузке авторов или статусов", true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Загрузка и рендер книг на главной
|
||||||
|
async loadAndRenderBooks() {
|
||||||
|
try {
|
||||||
|
const books = await model.getBooks();
|
||||||
|
const authors = await model.getAuthors();
|
||||||
|
const statuses = await model.getStatuses();
|
||||||
|
|
||||||
|
const booksWithDetails = books.map((book) => {
|
||||||
|
const author = authors.find((a) => String(a.id) === String(book.authorId));
|
||||||
|
const status = statuses.find((s) => String(s.id) === String(book.statusId));
|
||||||
|
return {
|
||||||
|
...book,
|
||||||
|
authorName: author ? author.name : "Неизвестен",
|
||||||
|
statusName: status ? status.name : "Неизвестен",
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const booksContainer = document.getElementById("booksContainer");
|
||||||
|
if (booksContainer) view.renderBooks(booksWithDetails, booksContainer);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
view.showAlert("Ошибка при загрузке книг", true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default controller;
|
||||||
39
html/mvc/model.js
Normal file
39
html/mvc/model.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import { getAllItems, getItem, createItem, updateItem, deleteItem } from "./api/client";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// Книги
|
||||||
|
getBooks() {
|
||||||
|
return getAllItems("books");
|
||||||
|
},
|
||||||
|
getBook(id) {
|
||||||
|
return getItem("books", id);
|
||||||
|
},
|
||||||
|
addBook(book) {
|
||||||
|
return createItem("books", book);
|
||||||
|
},
|
||||||
|
updateBook(id, data) {
|
||||||
|
return updateItem("books", id, data);
|
||||||
|
},
|
||||||
|
deleteBook(id) {
|
||||||
|
return deleteItem("books", id);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Авторы
|
||||||
|
getAuthors() {
|
||||||
|
return getAllItems("authors");
|
||||||
|
},
|
||||||
|
|
||||||
|
// Статусы
|
||||||
|
getStatuses() {
|
||||||
|
return getAllItems("statuses");
|
||||||
|
},
|
||||||
|
addStatus(status) {
|
||||||
|
return createItem("statuses", status);
|
||||||
|
},
|
||||||
|
updateStatus(id, data) {
|
||||||
|
return updateItem("statuses", id, data);
|
||||||
|
},
|
||||||
|
deleteStatus(id) {
|
||||||
|
return deleteItem("statuses", id);
|
||||||
|
},
|
||||||
|
};
|
||||||
148
html/mvc/view.js
Normal file
148
html/mvc/view.js
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
const view = {
|
||||||
|
renderAuthorOptions(authors, selectElement) {
|
||||||
|
selectElement.innerHTML = '<option value="">Выберите автора</option>';
|
||||||
|
authors.forEach((author) => {
|
||||||
|
const option = document.createElement("option");
|
||||||
|
option.value = author.id;
|
||||||
|
option.textContent = author.name;
|
||||||
|
selectElement.appendChild(option);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
renderStatusOptions(statuses, selectElement) {
|
||||||
|
selectElement.innerHTML = '<option value="">Выберите статус</option>';
|
||||||
|
statuses.forEach((status) => {
|
||||||
|
const option = document.createElement("option");
|
||||||
|
option.value = status.id;
|
||||||
|
option.textContent = status.name;
|
||||||
|
selectElement.appendChild(option);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
renderBooks(books, container) {
|
||||||
|
container.innerHTML = "";
|
||||||
|
books.forEach((book) => {
|
||||||
|
// определяем класс для статуса
|
||||||
|
let statusClass = "text-muted fw-bold";
|
||||||
|
switch ((book.statusName || "").toLowerCase()) {
|
||||||
|
case "вышла":
|
||||||
|
statusClass = "text-success fw-bold";
|
||||||
|
break;
|
||||||
|
case "не вышла":
|
||||||
|
statusClass = "text-danger fw-bold";
|
||||||
|
break;
|
||||||
|
case "не переведена":
|
||||||
|
statusClass = "text-warning fw-bold";
|
||||||
|
break;
|
||||||
|
case "прочитана":
|
||||||
|
statusClass = "text-primary fw-bold";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
statusClass = "text-muted fw-bold";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const div = document.createElement("div");
|
||||||
|
div.className = "card mb-3";
|
||||||
|
div.innerHTML = `
|
||||||
|
<a href="manga.html">
|
||||||
|
<img src="${book.cover || "img/заглушка.jpg"}" class="card-img-top shadow mt-2" alt="Обложка книги" style="max-height:300px; object-fit:contain; ">
|
||||||
|
</a>
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">${book.title}</h5>
|
||||||
|
<p class="card-text">${book.description}</p>
|
||||||
|
<p class="card-text"><small class="text-muted">Автор: ${book.authorName || "Неизвестен"}</small></p>
|
||||||
|
<p class="card-text"><small class="${statusClass}">Статус: ${book.statusName || "Неизвестен"}</small></p>
|
||||||
|
<button data-id="${book.id}" class="btn btn-danger btn-sm delete-btn">Удалить</button>
|
||||||
|
<a href="add_book.html?id=${book.id}" class="btn btn-warning btn-sm edit-btn">Редактировать</a>
|
||||||
|
</div>`;
|
||||||
|
container.appendChild(div);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
bindCoverInput() {
|
||||||
|
const coverInput = document.getElementById("cover");
|
||||||
|
const coverPreview = document.getElementById("coverPreview");
|
||||||
|
|
||||||
|
coverInput.addEventListener("change", () => {
|
||||||
|
const file = coverInput.files[0];
|
||||||
|
if (!file) {
|
||||||
|
coverPreview.style.display = "none";
|
||||||
|
coverPreview.src = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = (e) => {
|
||||||
|
coverPreview.src = e.target.result;
|
||||||
|
coverPreview.style.display = "block";
|
||||||
|
};
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async getBookFormData() {
|
||||||
|
const coverInput = document.getElementById("cover");
|
||||||
|
let coverData = "";
|
||||||
|
|
||||||
|
if (coverInput.files.length > 0) {
|
||||||
|
coverData = await new Promise((resolve, reject) => {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = () => resolve(reader.result);
|
||||||
|
reader.onerror = () => reject(new Error("Ошибка чтения файла обложки"));
|
||||||
|
reader.readAsDataURL(coverInput.files[0]);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Если форма редактирования, и файл не поменяли, можно брать существующий cover (или пустую строку)
|
||||||
|
coverData = document.getElementById("cover").dataset.currentCover || "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: document.getElementById("title").value.trim(),
|
||||||
|
description: document.getElementById("description").value.trim(),
|
||||||
|
authorId: parseInt(document.getElementById("authorId").value, 10),
|
||||||
|
statusId: parseInt(document.getElementById("statusId").value, 10),
|
||||||
|
cover: coverData,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
fillBookForm(book) {
|
||||||
|
document.getElementById("title").value = book.title || "";
|
||||||
|
document.getElementById("description").value = book.description || "";
|
||||||
|
document.getElementById("authorId").value = book.authorId || "";
|
||||||
|
document.getElementById("statusId").value = book.statusId || "";
|
||||||
|
|
||||||
|
// Запоминаем текущую обложку в дата-атрибут для использования при сохранении
|
||||||
|
const coverInput = document.getElementById("cover");
|
||||||
|
coverInput.value = ""; // Очистить input файл
|
||||||
|
coverInput.dataset.currentCover = book.cover || "";
|
||||||
|
|
||||||
|
// Показываем превью
|
||||||
|
const coverPreview = document.getElementById("coverPreview");
|
||||||
|
if (book.cover) {
|
||||||
|
coverPreview.src = book.cover;
|
||||||
|
coverPreview.style.display = "block";
|
||||||
|
} else {
|
||||||
|
coverPreview.style.display = "none";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
resetBookForm() {
|
||||||
|
document.getElementById("bookForm").reset();
|
||||||
|
const coverPreview = document.getElementById("coverPreview");
|
||||||
|
coverPreview.style.display = "none";
|
||||||
|
coverPreview.src = "";
|
||||||
|
},
|
||||||
|
|
||||||
|
showAlert(message, isError = false) {
|
||||||
|
alert(isError ? `Ошибка: ${message}` : `Успех: ${message}`);
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm(message) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
const result = confirm(message);
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default view;
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import Inputmask from "inputmask";
|
|
||||||
|
|
||||||
// маска для телефона
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
Inputmask("+7 (999) 999-99-99").mask(document.getElementById("number"));
|
|
||||||
});
|
|
||||||
|
|
||||||
// карточка с пользователем
|
|
||||||
document.getElementById("loginForm")?.addEventListener("submit", (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
const number = document.getElementById("number").value;
|
|
||||||
const password = document.getElementById("password").value;
|
|
||||||
const hiddenPassword = "*".repeat(password.length);
|
|
||||||
// типо AJAX
|
|
||||||
setTimeout(() => {
|
|
||||||
// создаём карточку пользователя
|
|
||||||
const card = document.createElement("div");
|
|
||||||
card.className = "col-md-4 mb-4"; // Класс для каждой карточки
|
|
||||||
card.innerHTML = `
|
|
||||||
<div class="card text-dark bg-light">
|
|
||||||
<div class="card-header">
|
|
||||||
<i class="bi bi-person-circle me-2"></i>Профиль пользователя
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<h5 class="card-title">Добро пожаловать!</h5>
|
|
||||||
<p class="card-text"><i class="bi bi-telephone-fill me-2"></i>${number}</p>
|
|
||||||
<p class="card-text"><i class="bi bi-shield-lock-fill me-2"></i>Пароль: <code>${hiddenPassword}</code></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
// добавляем карточку
|
|
||||||
document.getElementById("userCards").appendChild(card);
|
|
||||||
}, 0);
|
|
||||||
});
|
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
import "bootstrap"; // Подключение JS Bootstrap
|
import "bootstrap";
|
||||||
import "bootstrap-icons/font/bootstrap-icons.css";
|
import "bootstrap-icons/font/bootstrap-icons.css";
|
||||||
import "bootstrap/dist/css/bootstrap.min.css"; // Подключение стилей
|
import "bootstrap/dist/css/bootstrap.min.css";
|
||||||
|
import Inputmask from "inputmask";
|
||||||
|
import controller from "../mvc/controller";
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const phoneInput = document.getElementById("number");
|
||||||
|
if (phoneInput) {
|
||||||
|
Inputmask("+7 (999) 999-99-99").mask(phoneInput);
|
||||||
|
}
|
||||||
|
if (document.getElementById("booksContainer")) {
|
||||||
|
controller.initIndexPage();
|
||||||
|
} else if (document.getElementById("bookForm")) {
|
||||||
|
controller.initAddBookPage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
628
package-lock.json
generated
628
package-lock.json
generated
@@ -9,7 +9,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "5.3.3",
|
"bootstrap": "5.3.3",
|
||||||
"bootstrap-icons": "1.11.3",
|
"bootstrap-icons": "^1.11.3",
|
||||||
"inputmask": "^5.0.9"
|
"inputmask": "^5.0.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-prettier": "5.2.3",
|
"eslint-plugin-prettier": "5.2.3",
|
||||||
"http-server": "14.1.1",
|
"http-server": "14.1.1",
|
||||||
|
"json-server": "^1.0.0-beta.3",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"vite": "6.2.0"
|
"vite": "6.2.0"
|
||||||
}
|
}
|
||||||
@@ -601,6 +602,13 @@
|
|||||||
"url": "https://opencollective.com/unts"
|
"url": "https://opencollective.com/unts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@polka/url": {
|
||||||
|
"version": "1.0.0-next.29",
|
||||||
|
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz",
|
||||||
|
"integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@popperjs/core": {
|
"node_modules/@popperjs/core": {
|
||||||
"version": "2.11.8",
|
"version": "2.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||||
@@ -899,6 +907,327 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@tinyhttp/accepts": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/accepts/-/accepts-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-9pQN6pJAJOU3McmdJWTcyq7LLFW8Lj5q+DadyKcvp+sxMkEpktKX5sbfJgJuOvjk6+1xWl7pe0YL1US1vaO/1w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"mime": "4.0.4",
|
||||||
|
"negotiator": "^0.6.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/tinyhttp/tinyhttp?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/accepts/node_modules/mime": {
|
||||||
|
"version": "4.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||||
|
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"mime": "bin/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/app": {
|
||||||
|
"version": "2.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/app/-/app-2.5.2.tgz",
|
||||||
|
"integrity": "sha512-DcB3Y8GQppLQlO2VxRYF7LzTEAoZb+VRQXuIsErcu2fNaM1xdx6NQZDso5rlZUiaeg6KYYRfU34N4XkZbv6jSA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/cookie": "2.1.1",
|
||||||
|
"@tinyhttp/proxy-addr": "2.2.1",
|
||||||
|
"@tinyhttp/req": "2.2.5",
|
||||||
|
"@tinyhttp/res": "2.2.5",
|
||||||
|
"@tinyhttp/router": "2.2.3",
|
||||||
|
"header-range-parser": "1.1.3",
|
||||||
|
"regexparam": "^2.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.21.3"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/tinyhttp/tinyhttp?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/content-disposition": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/content-disposition/-/content-disposition-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-crXw1txzrS36huQOyQGYFvhTeLeG0Si1xu+/l6kXUVYpE0TjFjEZRqTbuadQLfKGZ0jaI+jJoRyqaWwxOSHW2g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/tinyhttp/tinyhttp?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/content-type": {
|
||||||
|
"version": "0.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/content-type/-/content-type-0.1.4.tgz",
|
||||||
|
"integrity": "sha512-dl6f3SHIJPYbhsW1oXdrqOmLSQF/Ctlv3JnNfXAE22kIP7FosqJHxkz/qj2gv465prG8ODKH5KEyhBkvwrueKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/cookie": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/cookie/-/cookie-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-h/kL9jY0e0Dvad+/QU3efKZww0aTvZJslaHj3JTPmIPC9Oan9+kYqmh3M6L5JUQRuTJYFK2nzgL2iJtH2S+6dA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/tinyhttp/tinyhttp?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/cookie-signature": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/cookie-signature/-/cookie-signature-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-VDsSMY5OJfQJIAtUgeQYhqMPSZptehFSfvEEtxr+4nldPA8IImlp3QVcOVuK985g4AFR4Hl1sCbWCXoqBnVWnw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/cors": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/cors/-/cors-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-qrmo6WJuaiCzKWagv2yA/kw6hIISfF/hOqPWwmI6w0o8apeTMmRN3DoCFvQ/wNVuWVdU5J4KU7OX8aaSOEq51A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/vary": "^0.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20 || 14.x || >=16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/encode-url": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/encode-url/-/encode-url-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-AhY+JqdZ56qV77tzrBm0qThXORbsVjs/IOPgGCS7x/wWnsa/Bx30zDUU/jPAUcSzNOzt860x9fhdGpzdqbUeUw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/etag": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/etag/-/etag-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-j80fPKimGqdmMh6962y+BtQsnYPVCzZfJw0HXjyH70VaJBHLKGF+iYhcKqzI3yef6QBNa8DKIPsbEYpuwApXTw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/forwarded": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/forwarded/-/forwarded-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-9H/eulJ68ElY/+zYpTpNhZ7vxGV+cnwaR6+oQSm7bVgZMyuQfgROW/qvZuhmgDTIxnGMXst+Ba4ij6w6Krcs3w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/logger": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/logger/-/logger-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-Ma1fJ9CwUbn9r61/4HW6+nflsVoslpOnCrfQ6UeZq7GGIgwLzofms3HoSVG7M+AyRMJpxlfcDdbH5oFVroDMKA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"colorette": "^2.0.20",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"http-status-emojis": "^2.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.18 || >=16.20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/proxy-addr": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/proxy-addr/-/proxy-addr-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-BicqMqVI91hHq2BQmnqJUh0FQUnx7DncwSGgu2ghlh+JZG2rHK2ZN/rXkfhrx1rrUw6hnd0L36O8GPMh01+dDQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/forwarded": "2.1.2",
|
||||||
|
"ipaddr.js": "^2.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/req": {
|
||||||
|
"version": "2.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/req/-/req-2.2.5.tgz",
|
||||||
|
"integrity": "sha512-trfsXwtmsNjMcGKcLJ+45h912kLRqBQCQD06ams3Tq0kf4gHLxjHjoYOC1Z9yGjOn81XllRx8wqvnvr+Kbe3gw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/accepts": "2.2.3",
|
||||||
|
"@tinyhttp/type-is": "2.2.4",
|
||||||
|
"@tinyhttp/url": "2.1.1",
|
||||||
|
"header-range-parser": "^1.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/res": {
|
||||||
|
"version": "2.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/res/-/res-2.2.5.tgz",
|
||||||
|
"integrity": "sha512-yBsqjWygpuKAVz4moWlP4hqzwiDDqfrn2mA0wviJAcgvGiyOErtlQwXY7aj3aPiCpURvxvEFO//Gdy6yV+xEpA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/content-disposition": "2.2.2",
|
||||||
|
"@tinyhttp/cookie": "2.1.1",
|
||||||
|
"@tinyhttp/cookie-signature": "2.1.1",
|
||||||
|
"@tinyhttp/encode-url": "2.1.1",
|
||||||
|
"@tinyhttp/req": "2.2.5",
|
||||||
|
"@tinyhttp/send": "2.2.3",
|
||||||
|
"@tinyhttp/vary": "^0.1.3",
|
||||||
|
"es-escape-html": "^0.1.1",
|
||||||
|
"mime": "4.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/res/node_modules/mime": {
|
||||||
|
"version": "4.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||||
|
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"mime": "bin/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/router": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/router/-/router-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-O0MQqWV3Vpg/uXsMYg19XsIgOhwjyhTYWh51Qng7bxqXixxx2PEvZWnFjP7c84K7kU/nUX41KpkEBTLnznk9/Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/send": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/send/-/send-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-o4cVHHGQ8WjVBS8UT0EE/2WnjoybrfXikHwsRoNlG1pfrC/Sd01u1N4Te8cOd/9aNGLr4mGxWb5qTm2RRtEi7g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/content-type": "^0.1.4",
|
||||||
|
"@tinyhttp/etag": "2.1.2",
|
||||||
|
"mime": "4.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/send/node_modules/mime": {
|
||||||
|
"version": "4.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||||
|
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"mime": "bin/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/type-is": {
|
||||||
|
"version": "2.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/type-is/-/type-is-2.2.4.tgz",
|
||||||
|
"integrity": "sha512-7F328NheridwjIfefBB2j1PEcKKABpADgv7aCJaE8x8EON77ZFrAkI3Rir7pGjopV7V9MBmW88xUQigBEX2rmQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/content-type": "^0.1.4",
|
||||||
|
"mime": "4.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/type-is/node_modules/mime": {
|
||||||
|
"version": "4.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||||
|
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"mime": "bin/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/url": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/url/-/url-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-POJeq2GQ5jI7Zrdmj22JqOijB5/GeX+LEX7DUdml1hUnGbJOTWDx7zf2b5cCERj7RoXL67zTgyzVblBJC+NJWg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tinyhttp/vary": {
|
||||||
|
"version": "0.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tinyhttp/vary/-/vary-0.1.3.tgz",
|
||||||
|
"integrity": "sha512-SoL83sQXAGiHN1jm2VwLUWQSQeDAAl1ywOm6T0b0Cg1CZhVsjoiZadmjhxF6FHCCY7OHHVaLnTgSMxTPIDLxMg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
|
||||||
@@ -1289,6 +1618,22 @@
|
|||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chokidar": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"readdirp": "^4.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14.16.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://paulmillr.com/funding/"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/color-convert": {
|
"node_modules/color-convert": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
@@ -1309,6 +1654,13 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/colorette": {
|
||||||
|
"version": "2.0.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
|
||||||
|
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/concat-map": {
|
"node_modules/concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
@@ -1402,6 +1754,13 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dayjs": {
|
||||||
|
"version": "1.11.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
|
||||||
|
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||||
@@ -1535,6 +1894,35 @@
|
|||||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dot-prop": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-9.0.0.tgz",
|
||||||
|
"integrity": "sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"type-fest": "^4.18.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/dot-prop/node_modules/type-fest": {
|
||||||
|
"version": "4.41.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
|
||||||
|
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "(MIT OR CC0-1.0)",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dunder-proto": {
|
"node_modules/dunder-proto": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||||
@@ -1659,6 +2047,16 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/es-escape-html": {
|
||||||
|
"version": "0.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-escape-html/-/es-escape-html-0.1.1.tgz",
|
||||||
|
"integrity": "sha512-yUx1o+8RsG7UlszmYPtks+dm6Lho2m8lgHMOsLJQsFI0R8XwUJwiMhM1M4E/S8QLeGyf6MkDV/pWgjQ0tdTSyQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/es-object-atoms": {
|
"node_modules/es-object-atoms": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||||
@@ -2108,6 +2506,19 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eta": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eta/-/eta-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-e3x3FBvGzeCIHhF+zhK8FZA2vC5uFn6b4HJjegUbIWrDb4mJ7JjTGMJY9VGIbRVpmSwHopNiaJibhjIr+HfLug==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/eta-dev/eta?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eventemitter3": {
|
"node_modules/eventemitter3": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||||
@@ -2561,6 +2972,16 @@
|
|||||||
"he": "bin/he"
|
"he": "bin/he"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/header-range-parser": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/header-range-parser/-/header-range-parser-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-B9zCFt3jH8g09LR1vHL4pcAn8yMEtlSlOUdQemzHMRKMImNIhhszdeosYFfNW0WXKQtXIlWB+O4owHJKvEJYaA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.22.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/hosted-git-info": {
|
"node_modules/hosted-git-info": {
|
||||||
"version": "2.8.9",
|
"version": "2.8.9",
|
||||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
|
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
|
||||||
@@ -2644,6 +3065,13 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/http-status-emojis": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-status-emojis/-/http-status-emojis-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-ompKtgwpx8ff0hsbpIB7oE4ax1LXoHmftsHHStMELX56ivG3GhofTX8ZHWlUaFKfGjcGjw6G3rPk7dJRXMmbbg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/iconv-lite": {
|
"node_modules/iconv-lite": {
|
||||||
"version": "0.6.3",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
@@ -2694,6 +3122,16 @@
|
|||||||
"node": ">=0.8.19"
|
"node": ">=0.8.19"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/inflection": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflection/-/inflection-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-+Bg3+kg+J6JUWn8J6bzFmOWkTQ6L/NHfDRSYU+EVvuKHDxUDHAXgqixHfVlzuBQaPOTac8hn43aPhMNk6rMe3g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/inflight": {
|
"node_modules/inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
@@ -2734,6 +3172,16 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ipaddr.js": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-array-buffer": {
|
"node_modules/is-array-buffer": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
|
||||||
@@ -3167,6 +3615,60 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/json-server": {
|
||||||
|
"version": "1.0.0-beta.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-server/-/json-server-1.0.0-beta.3.tgz",
|
||||||
|
"integrity": "sha512-DwE69Ep5ccwIJZBUIWEENC30Yj8bwr4Ax9W9VoIWAYnB8Sj4ReptscO8/DRHv/nXwVlmb3Bk73Ls86+VZdYkkA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "SEE LICENSE IN ./LICENSE",
|
||||||
|
"dependencies": {
|
||||||
|
"@tinyhttp/app": "^2.4.0",
|
||||||
|
"@tinyhttp/cors": "^2.0.1",
|
||||||
|
"@tinyhttp/logger": "^2.0.0",
|
||||||
|
"chalk": "^5.3.0",
|
||||||
|
"chokidar": "^4.0.1",
|
||||||
|
"dot-prop": "^9.0.0",
|
||||||
|
"eta": "^3.5.0",
|
||||||
|
"inflection": "^3.0.0",
|
||||||
|
"json5": "^2.2.3",
|
||||||
|
"lowdb": "^7.0.1",
|
||||||
|
"milliparsec": "^4.0.0",
|
||||||
|
"sirv": "^2.0.4",
|
||||||
|
"sort-on": "^6.1.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"json-server": "lib/bin.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/json-server/node_modules/chalk": {
|
||||||
|
"version": "5.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
|
||||||
|
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/json-server/node_modules/json5": {
|
||||||
|
"version": "2.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"json5": "lib/cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/json-stable-stringify-without-jsonify": {
|
"node_modules/json-stable-stringify-without-jsonify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||||
@@ -3250,6 +3752,22 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/lowdb": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/lowdb/-/lowdb-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-neJAj8GwF0e8EpycYIDFqEPcx9Qz4GUho20jWFR7YiFeXzF1YMLdxB36PypcTSPMA+4+LvgyMacYhlr18Zlymw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"steno": "^4.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/typicode"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/math-intrinsics": {
|
"node_modules/math-intrinsics": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||||
@@ -3269,6 +3787,16 @@
|
|||||||
"node": ">= 0.10.0"
|
"node": ">= 0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/milliparsec": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/milliparsec/-/milliparsec-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-/wk9d4Z6/9ZvoEH/6BI4TrTCgmkpZPuSRN/6fI9aUHOfXdNTuj/VhLS7d+NqG26bi6L9YmGXutVYvWC8zQ0qtA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mime": {
|
"node_modules/mime": {
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||||
@@ -3305,6 +3833,16 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mrmime": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
@@ -3338,6 +3876,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/negotiator": {
|
||||||
|
"version": "0.6.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
|
||||||
|
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/nice-try": {
|
"node_modules/nice-try": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
@@ -4008,6 +4556,20 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/readdirp": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14.18.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://paulmillr.com/funding/"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/reflect.getprototypeof": {
|
"node_modules/reflect.getprototypeof": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
|
||||||
@@ -4052,6 +4614,16 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/regexparam": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/regexparam/-/regexparam-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-A1PeDEYMrkLrfyOwv2jwihXbo9qxdGD3atBYQA9JJgreAx8/7rC6IUkWOw2NQlOxLp2wL0ifQbh1HuidDfYA6w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/requires-port": {
|
"node_modules/requires-port": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||||
@@ -4429,6 +5001,37 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/sirv": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@polka/url": "^1.0.0-next.24",
|
||||||
|
"mrmime": "^2.0.0",
|
||||||
|
"totalist": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/sort-on": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/sort-on/-/sort-on-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-WTECP0nYNWO1n2g5bpsV0yZN9cBmZsF8ThHFbOqVN0HBFRoaQZLLEMvMmJlKHNPYQeVngeI5+jJzIfFqOIo1OA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"dot-prop": "^9.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
@@ -4475,6 +5078,19 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "CC0-1.0"
|
"license": "CC0-1.0"
|
||||||
},
|
},
|
||||||
|
"node_modules/steno": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/steno/-/steno-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-yhPIQXjrlt1xv7dyPQg2P17URmXbuM5pdGkpiMB3RenprfiBlvK415Lctfe0eshk90oA7/tNq7WEiMK8RSP39A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/typicode"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/string.prototype.padend": {
|
"node_modules/string.prototype.padend": {
|
||||||
"version": "3.1.6",
|
"version": "3.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz",
|
||||||
@@ -4639,6 +5255,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/totalist": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tsconfig-paths": {
|
"node_modules/tsconfig-paths": {
|
||||||
"version": "3.15.0",
|
"version": "3.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
|
||||||
|
|||||||
12
package.json
12
package.json
@@ -3,15 +3,17 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "npm-run-all --parallel backend vite",
|
||||||
|
"vite": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"serve": "http-server -p 3000 ./html/",
|
"serve": "http-server -p 3000 ./html/",
|
||||||
"prod": "npm-run-all build serve",
|
"backend": "json-server ./html/database/data.json -p 5174",
|
||||||
"lint": "eslint . --ext js --report-unused-disable-directives --max-warnings 0 && echo 'Сборка успешна!'"
|
"prod": "npm-run-all build serve --parallel backend serve",
|
||||||
|
"lint": "eslint . --ext js --report-unused-disable-directives --max-warnings 0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "5.3.3",
|
"bootstrap": "5.3.3",
|
||||||
"bootstrap-icons": "1.11.3",
|
"bootstrap-icons": "^1.11.3",
|
||||||
"inputmask": "^5.0.9"
|
"inputmask": "^5.0.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -22,8 +24,8 @@
|
|||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-prettier": "5.2.3",
|
"eslint-plugin-prettier": "5.2.3",
|
||||||
"http-server": "14.1.1",
|
"http-server": "14.1.1",
|
||||||
|
"json-server": "^1.0.0-beta.3",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"vite": "6.2.0"
|
"vite": "6.2.0"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export default defineConfig({
|
|||||||
page4: resolve(__dirname, "html/manga.html"),
|
page4: resolve(__dirname, "html/manga.html"),
|
||||||
page5: resolve(__dirname, "html/news.html"),
|
page5: resolve(__dirname, "html/news.html"),
|
||||||
page6: resolve(__dirname, "html/reading.html"),
|
page6: resolve(__dirname, "html/reading.html"),
|
||||||
|
page7: resolve(__dirname, "add_book"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
BIN
Отчет №1.docx
BIN
Отчет №1.docx
Binary file not shown.
BIN
Отчет №4.docx
Normal file
BIN
Отчет №4.docx
Normal file
Binary file not shown.
Reference in New Issue
Block a user