rename ./api

This commit is contained in:
martin-mfg
2025-06-25 22:04:21 +00:00
parent 26db144f58
commit 9e5c82ef1f
18 changed files with 17 additions and 17 deletions
@@ -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
View File
View File
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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: {
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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": "/",