diff --git a/_dot_vercel_copy/output/functions/api.func/router.js b/_dot_vercel_copy/output/functions/api.func/router.js index b6ae575a..db217404 100644 --- a/_dot_vercel_copy/output/functions/api.func/router.js +++ b/_dot_vercel_copy/output/functions/api.func/router.js @@ -1,11 +1,11 @@ -import { default as api } from "./api-copy/index.js"; -import { default as gist } from "./api-copy/gist.js"; -import { default as pin } from "./api-copy/pin.js"; -import { default as topLangs } from "./api-copy/top-langs.js"; -import { default as wakatime } from "./api-copy/wakatime.js"; -import { default as repeatRecent } from "./api-copy/repeat-recent.js"; -import { default as patInfo } from "./api-copy/status/pat-info.js"; -import { default as statusUp } from "./api-copy/status/up.js"; +import { default as api } from "./api-renamed/index.js"; +import { default as gist } from "./api-renamed/gist.js"; +import { default as pin } from "./api-renamed/pin.js"; +import { default as topLangs } from "./api-renamed/top-langs.js"; +import { default as wakatime } from "./api-renamed/wakatime.js"; +import { default as repeatRecent } from "./api-renamed/repeat-recent.js"; +import { default as patInfo } from "./api-renamed/status/pat-info.js"; +import { default as statusUp } from "./api-renamed/status/up.js"; export default async (req, res) => { // remaining code expects express.js-like request and response objects diff --git a/api/gist.js b/api-renamed/gist.js similarity index 100% rename from api/gist.js rename to api-renamed/gist.js diff --git a/api/index.js b/api-renamed/index.js similarity index 100% rename from api/index.js rename to api-renamed/index.js diff --git a/api/pin.js b/api-renamed/pin.js similarity index 100% rename from api/pin.js rename to api-renamed/pin.js diff --git a/api/repeat-recent.js b/api-renamed/repeat-recent.js similarity index 100% rename from api/repeat-recent.js rename to api-renamed/repeat-recent.js diff --git a/api/status/pat-info.js b/api-renamed/status/pat-info.js similarity index 100% rename from api/status/pat-info.js rename to api-renamed/status/pat-info.js diff --git a/api/status/up.js b/api-renamed/status/up.js similarity index 100% rename from api/status/up.js rename to api-renamed/status/up.js diff --git a/api/top-langs.js b/api-renamed/top-langs.js similarity index 100% rename from api/top-langs.js rename to api-renamed/top-langs.js diff --git a/api/wakatime.js b/api-renamed/wakatime.js similarity index 100% rename from api/wakatime.js rename to api-renamed/wakatime.js diff --git a/package.json b/package.json index 470660ed..ef7e9261 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "format": "prettier --write .", "format:check": "prettier --check .", "prepare": "husky", - "lint": "npx eslint --max-warnings 0 \"./src/**/*.js\" \"./scripts/**/*.js\" \"./tests/**/*.js\" \"./api/**/*.js\" \"./themes/**/*.js\"", + "lint": "npx eslint --max-warnings 0 \"./src/**/*.js\" \"./scripts/**/*.js\" \"./tests/**/*.js\" \"./api-renamed/**/*.js\" \"./themes/**/*.js\"", "bench": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.bench.config.js" }, "author": "Anurag Hazra", diff --git a/tests/api.test.js b/tests/api.test.js index 48dc0846..8524026f 100644 --- a/tests/api.test.js +++ b/tests/api.test.js @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import api from "../api/index.js"; +import api from "../api-renamed/index.js"; import { calculateRank } from "../src/calculateRank.js"; import { renderStatsCard } from "../src/cards/stats-card.js"; import { CONSTANTS, renderError } from "../src/common/utils.js"; diff --git a/tests/gist.test.js b/tests/gist.test.js index bdf95156..f7509306 100644 --- a/tests/gist.test.js +++ b/tests/gist.test.js @@ -5,7 +5,7 @@ import MockAdapter from "axios-mock-adapter"; import { expect, it, describe, afterEach } from "@jest/globals"; import { renderGistCard } from "../src/cards/gist-card.js"; import { renderError } from "../src/common/utils.js"; -import gist from "../api/gist.js"; +import gist from "../api-renamed/gist.js"; const gist_data = { data: { diff --git a/tests/pat-info.test.js b/tests/pat-info.test.js index 6c71d401..add3c869 100644 --- a/tests/pat-info.test.js +++ b/tests/pat-info.test.js @@ -7,7 +7,7 @@ dotenv.config(); import { jest } from "@jest/globals"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js"; +import patInfo, { RATE_LIMIT_SECONDS } from "../api-renamed/status/pat-info.js"; import { expect, it, describe, afterEach, beforeAll } from "@jest/globals"; const mock = new MockAdapter(axios); diff --git a/tests/pin.test.js b/tests/pin.test.js index 2583ddfe..ff855aef 100644 --- a/tests/pin.test.js +++ b/tests/pin.test.js @@ -2,7 +2,7 @@ import { jest } from "@jest/globals"; import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import pin from "../api/pin.js"; +import pin from "../api-renamed/pin.js"; import { renderRepoCard } from "../src/cards/repo-card.js"; import { renderError } from "../src/common/utils.js"; import { expect, it, describe, afterEach } from "@jest/globals"; diff --git a/tests/status.up.test.js b/tests/status.up.test.js index f15b96fb..7945d17d 100644 --- a/tests/status.up.test.js +++ b/tests/status.up.test.js @@ -4,7 +4,7 @@ import { jest } from "@jest/globals"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js"; +import up, { RATE_LIMIT_SECONDS } from "../api-renamed/status/up.js"; import { expect, it, describe, afterEach } from "@jest/globals"; const mock = new MockAdapter(axios); diff --git a/tests/top-langs.test.js b/tests/top-langs.test.js index 1c8a45b7..87cfc779 100644 --- a/tests/top-langs.test.js +++ b/tests/top-langs.test.js @@ -2,7 +2,7 @@ import { jest } from "@jest/globals"; import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import topLangs from "../api/top-langs.js"; +import topLangs from "../api-renamed/top-langs.js"; import { renderTopLanguages } from "../src/cards/top-languages-card.js"; import { renderError } from "../src/common/utils.js"; import { expect, it, describe, afterEach } from "@jest/globals"; diff --git a/tests/wakatime.test.js b/tests/wakatime.test.js index 944c3e02..977c2155 100644 --- a/tests/wakatime.test.js +++ b/tests/wakatime.test.js @@ -2,7 +2,7 @@ import { jest } from "@jest/globals"; import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; -import wakatime from "../api/wakatime.js"; +import wakatime from "../api-renamed/wakatime.js"; import { renderWakatimeCard } from "../src/cards/wakatime-card.js"; import { expect, it, describe, afterEach } from "@jest/globals"; diff --git a/vercel.json b/vercel.json index e4da9d05..e3826c52 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,5 @@ { - "buildCommand": "mv ./api api-renamed && npm install && mkdir --parents .vercel/output/functions/api.func/ && cp --recursive ./* .vercel/output/functions/api.func/ && cp --recursive .vercel/output/functions/api.func/_dot_vercel_copy/output/ .vercel/", + "buildCommand": "npm install && mkdir --parents .vercel/output/functions/api.func/ && cp --recursive ./* .vercel/output/functions/api.func/ && cp --recursive .vercel/output/functions/api.func/_dot_vercel_copy/output/ .vercel/", "redirects": [ { "source": "/",