Data Request API helper #10

Merged
Oliver merged 94 commits from feat/data-requests into main 2025-11-22 02:51:15 +00:00
Showing only changes of commit a06934538e - Show all commits

View file

@ -1,4 +1,4 @@
import fs from "fs"; import { openAsBlob } from "node:fs";
import axios from "axios"; import axios from "axios";
const { const {
@ -25,7 +25,7 @@ async function main() {
// Upload the release archive // Upload the release archive
const archiveFormData = new FormData(); const archiveFormData = new FormData();
const archive = await fs.openAsBlob(`release.zip`); const archive = await openAsBlob(`release.zip`);
archiveFormData.set(`release`, archive, `release.zip`) archiveFormData.set(`release`, archive, `release.zip`)
await axios.post( await axios.post(
`${API}/repos/${REPO}/releases/${release.data.id}/assets`, `${API}/repos/${REPO}/releases/${release.data.id}/assets`,
@ -37,7 +37,7 @@ async function main() {
// Upload the manifest file // Upload the manifest file
const formData = new FormData(); const formData = new FormData();
const manifest = await fs.openAsBlob(`system.json`); const manifest = await openAsBlob(`system.json`);
formData.set(`manifest`, manifest, `system.json`) formData.set(`manifest`, manifest, `system.json`)
await axios.post( await axios.post(
`${API}/repos/${REPO}/releases/${release.data.id}/assets`, `${API}/repos/${REPO}/releases/${release.data.id}/assets`,