mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-03 19:45:01 +01:00
docs: adds netlify function to fetch pull count
This commit is contained in:
1
.netlify/functions-serve/hub/hub.js
Normal file
1
.netlify/functions-serve/hub/hub.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require("./src/docs/functions/hub.js");
|
||||
40
.netlify/functions-serve/hub/src/docs/functions/hub.js
Normal file
40
.netlify/functions-serve/hub/src/docs/functions/hub.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if ((from && typeof from === "object") || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, {
|
||||
get: () => from[key],
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// docs/functions/hub.ts
|
||||
var hub_exports = {};
|
||||
__export(hub_exports, {
|
||||
handler: () => handler,
|
||||
});
|
||||
module.exports = __toCommonJS(hub_exports);
|
||||
var handler = async (event, context) => {
|
||||
const response = await fetch("https://hub.docker.com/v2/repositories/amir20/dozzle");
|
||||
const data = await response.json();
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(data),
|
||||
};
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 &&
|
||||
(module.exports = {
|
||||
handler,
|
||||
});
|
||||
//# sourceMappingURL=hub.js.map
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../../Users/amirraminfar/Workspace/dozzle/docs/functions/hub.ts"],
|
||||
"sourceRoot": "/var/folders/cy/3q44l5qx3xdbplx0yrjhv9ph00m20d/T/tmp-77248-u0S6P6W9k4tc",
|
||||
"sourcesContent": ["import { Handler, HandlerEvent, HandlerContext } from \"@netlify/functions\";\n\nconst handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {\n const response = await fetch(\"https://hub.docker.com/v2/repositories/amir20/dozzle\");\n const data = await response.json();\n\n return {\n statusCode: 200,\n body: JSON.stringify(data),\n };\n};\n\nexport { handler };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,UAAmB,OAAO,OAAqB,YAA4B;AAC/E,QAAM,WAAW,MAAM,MAAM,sDAAsD;AACnF,QAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,SAAO;AAAA,IACL,YAAY;AAAA,IACZ,MAAM,KAAK,UAAU,IAAI;AAAA,EAC3B;AACF;",
|
||||
"names": []
|
||||
}
|
||||
40
.netlify/functions-serve/test/src/docs/functions/test.js
Normal file
40
.netlify/functions-serve/test/src/docs/functions/test.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if ((from && typeof from === "object") || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, {
|
||||
get: () => from[key],
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// docs/functions/test.ts
|
||||
var test_exports = {};
|
||||
__export(test_exports, {
|
||||
handler: () => handler,
|
||||
});
|
||||
module.exports = __toCommonJS(test_exports);
|
||||
var handler = async (event, context) => {
|
||||
const response = await fetch("https://hub.docker.com/v2/repositories/amir20/dozzle");
|
||||
const data = await response.json();
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(data),
|
||||
};
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 &&
|
||||
(module.exports = {
|
||||
handler,
|
||||
});
|
||||
//# sourceMappingURL=test.js.map
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../../Users/amirraminfar/Workspace/dozzle/docs/functions/test.ts"],
|
||||
"sourceRoot": "/var/folders/cy/3q44l5qx3xdbplx0yrjhv9ph00m20d/T/tmp-77248-OXAFZrtCXXBc",
|
||||
"sourcesContent": ["import { Handler, HandlerEvent, HandlerContext } from \"@netlify/functions\";\n\nconst handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {\n const response = await fetch(\"https://hub.docker.com/v2/repositories/amir20/dozzle\");\n const data = await response.json();\n\n return {\n statusCode: 200,\n body: JSON.stringify(data),\n };\n};\n\nexport { handler };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAM,UAAmB,OAAO,OAAqB,YAA4B;AAC/E,QAAM,WAAW,MAAM,MAAM,sDAAsD;AACnF,QAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,SAAO;AAAA,IACL,YAAY;AAAA,IACZ,MAAM,KAAK,UAAU,IAAI;AAAA,EAC3B;AACF;",
|
||||
"names": []
|
||||
}
|
||||
1
.netlify/functions-serve/test/test.js
Normal file
1
.netlify/functions-serve/test/test.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require("./src/docs/functions/test.js");
|
||||
13
docs/functions/hub.ts
Normal file
13
docs/functions/hub.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Handler, HandlerEvent, HandlerContext } from "@netlify/functions";
|
||||
|
||||
const handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {
|
||||
const response = await fetch("https://hub.docker.com/v2/repositories/amir20/dozzle");
|
||||
const data = await response.json();
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(data),
|
||||
};
|
||||
};
|
||||
|
||||
export { handler };
|
||||
@@ -2,6 +2,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@netlify/functions": "^1.4.0",
|
||||
"@unocss/preset-typography": "^0.51.4",
|
||||
"@unocss/reset": "^0.51.4",
|
||||
"@unocss/transformer-directives": "^0.51.4",
|
||||
|
||||
14
docs/pnpm-lock.yaml
generated
14
docs/pnpm-lock.yaml
generated
@@ -1,6 +1,9 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
devDependencies:
|
||||
'@netlify/functions':
|
||||
specifier: ^1.4.0
|
||||
version: 1.4.0
|
||||
'@unocss/preset-typography':
|
||||
specifier: ^0.51.4
|
||||
version: 0.51.4
|
||||
@@ -294,6 +297,13 @@ packages:
|
||||
'@jridgewell/sourcemap-codec': 1.4.14
|
||||
dev: true
|
||||
|
||||
/@netlify/functions@1.4.0:
|
||||
resolution: {integrity: sha512-gy7ULTIRroc2/jyFVGx1djCmmBMVisIwrvkqggq5B6iDcInRSy2Tpkm+V5C63hKJVkNRskKWtLQKm9ecCaQTjA==}
|
||||
engines: {node: '>=8.3.0'}
|
||||
dependencies:
|
||||
is-promise: 4.0.0
|
||||
dev: true
|
||||
|
||||
/@nodelib/fs.scandir@2.1.5:
|
||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||
engines: {node: '>= 8'}
|
||||
@@ -787,6 +797,10 @@ packages:
|
||||
engines: {node: '>=0.12.0'}
|
||||
dev: true
|
||||
|
||||
/is-promise@4.0.0:
|
||||
resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==}
|
||||
dev: true
|
||||
|
||||
/is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[build]
|
||||
publish = "docs/.vitepress/dist"
|
||||
command = "pnpm docs:build"
|
||||
|
||||
[functions]
|
||||
directory = "docs/functions"
|
||||
|
||||
Reference in New Issue
Block a user