Files
aura-keep/router-app/static/download.ts
2025-03-10 10:50:06 +08:00

19 lines
437 B
TypeScript

import fs from 'fs';
const apps = [
{ user: 'root', key: 'enter', version: '1.0.0' }, //
{ user: 'root', key: 'packages', version: '1.0.0' },
];
const baseURL = 'https://kevisual.silkyai.cn';
const downloadApps = () => {
//
};
export const downloadLink = async (url: string, path: string) => {
const res = await fetch(url);
const blob = await res.blob();
fs.writeFileSync(path, Buffer.from(await blob.arrayBuffer()));
};