gitlab-badge-proxy 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/app.d.ts.map +1 -1
- package/dist/src/app.js +4 -0
- package/package.json +1 -1
package/dist/src/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAoBtD,OAAO,EACL,eAAe,EAkBhB,MAAM,YAAY,CAAC;AAuWpB,wBAAgB,SAAS,CAAC,SAAS,GAAE,MAAM,MAAmB,GAAG,IAAI,CAyNpE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,eAAO,MAAM,GAAG,4EAAc,CAAC"}
|
package/dist/src/app.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
+
import { logger } from "hono/logger";
|
|
2
3
|
import { loadConfig } from "./config.js";
|
|
3
4
|
export { loadConfig } from "./config.js";
|
|
4
5
|
import { getContributorsCount, getForksCount, getGoModVersion, getIssuesCount, getJobCoverage, getLabelColor, getLanguages, getLastCommitDate, getLatestPipeline, getLatestRelease, getLatestTag, getLicenseName, getMergeRequestsCount, getPipelineCoverage, getStarsCount, } from "./gitlab.js";
|
|
@@ -300,6 +301,9 @@ function registerBadgeRoute(app, getConfig, path, fallback, context, compute) {
|
|
|
300
301
|
}
|
|
301
302
|
export function createApp(getConfig = loadConfig) {
|
|
302
303
|
const app = new Hono();
|
|
304
|
+
// Access log: one line per request in, one per response out (method, path, status, duration) —
|
|
305
|
+
// confirms at a glance that the proxy is receiving and resolving requests as expected.
|
|
306
|
+
app.use(logger());
|
|
303
307
|
// Collapses accidental double slashes (e.g. a caller's `gitlab_url` ending in `/`, concatenated
|
|
304
308
|
// with a path that also starts with `/`) instead of 404ing on them.
|
|
305
309
|
app.use(async (c, next) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitlab-badge-proxy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Server-side proxy that turns private GitLab pipeline/coverage status into public SVG badges, without ever exposing the GitLab instance's URL to clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|