mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-09 07:53:52 +05:00
feat/api-prox: deno deploy and vercel deploy fix
This commit is contained in:
parent
a06a18b1ac
commit
1f849a1bfe
8 changed files with 35 additions and 10 deletions
1
api-prox/.gitignore
vendored
1
api-prox/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
# prod
|
# prod
|
||||||
dist/
|
dist/
|
||||||
|
*.js
|
||||||
|
|
||||||
# dev
|
# dev
|
||||||
.yarn/
|
.yarn/
|
||||||
|
|
21
api-prox/LICENSE
Normal file
21
api-prox/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Kentai Radiquum
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -4,10 +4,15 @@
|
||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"deno-run": "deno run --sloppy-imports --allow-net deno.ts",
|
"deno-run": "deno run --sloppy-imports --allow-net deno.ts",
|
||||||
"deno-dev": "deno run --sloppy-imports --unstable-hmr --allow-net deno.ts"
|
"deno-dev": "deno run --sloppy-imports --unstable-hmr --allow-net deno.ts",
|
||||||
|
"deno-deploy": "./node_modules/.bin/tsc && deployctl deploy"
|
||||||
},
|
},
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "precompile",
|
"jsx": "precompile",
|
||||||
"jsxImportSource": "hono/jsx"
|
"jsxImportSource": "hono/jsx"
|
||||||
|
},
|
||||||
|
"deploy": {
|
||||||
|
"include": ["dist", "deno.json"],
|
||||||
|
"entrypoint": "dist/deno.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
import app from "./src/index.ts";
|
import app from "./src/index.js";
|
||||||
|
|
||||||
Deno.serve({ port: 7001 }, app.fetch);
|
Deno.serve({ port: 7001 }, app.fetch);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Hook } from ".";
|
import { Hook } from "./index.js";
|
||||||
import thirdPartyReleaseRatingHook from "./show3rdPartyReleaseRating.js"; // Импортирует .ts как .js
|
import thirdPartyReleaseRatingHook from "./show3rdPartyReleaseRating.js";
|
||||||
|
|
||||||
export const enabledHooks: Hook[] = [thirdPartyReleaseRatingHook];
|
export const enabledHooks: Hook[] = [thirdPartyReleaseRatingHook];
|
||||||
export default enabledHooks;
|
export default enabledHooks;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { enabledHooks } from "./enabledHooks";
|
import { enabledHooks } from "./enabledHooks.js";
|
||||||
|
|
||||||
export type Hook = {
|
export type Hook = {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// хук добавляет рейтинг Shikimori и MAL в поле note релиза
|
// хук добавляет рейтинг Shikimori и MAL в поле note релиза
|
||||||
import { InfoLogger } from "../utils/logger";
|
import { InfoLogger } from "../utils/logger.js";
|
||||||
import { tryCatch } from "../utils/tryCatch";
|
import { tryCatch } from "../utils/tryCatch.js";
|
||||||
|
|
||||||
const title = "show3rdPartyReleaseRating.ts";
|
const title = "show3rdPartyReleaseRating.ts";
|
||||||
const description = "Добавление рейтингов от Shikimori и MAL на страницу релиза";
|
const description = "Добавление рейтингов от Shikimori и MAL на страницу релиза";
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowImportingTsExtensions": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
|
@ -16,6 +14,6 @@
|
||||||
"jsxImportSource": "hono/jsx",
|
"jsxImportSource": "hono/jsx",
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.json"],
|
"include": ["src/**/*.ts", "deno.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue