mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-23 23:29:41 +02:00
jsops: migrate to ESM from CJM (#228)
* jsops: migrate to ESM from CJM * rm unused code * fix ci
This commit is contained in:
parent
f05eb15b72
commit
505daafc50
38 changed files with 509 additions and 309 deletions
|
@ -1,6 +1,6 @@
|
|||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import fetch from 'node-fetch';
|
||||
import fetch, { RequestInit } from 'node-fetch';
|
||||
|
||||
/**
|
||||
* Uploaded favicon data
|
||||
|
@ -61,7 +61,7 @@ export async function downloadFavicon(destination: string, faviconFolder: string
|
|||
}, 5000);
|
||||
|
||||
// Make get request to url
|
||||
const res = await fetch(destination, { signal: controller.signal });
|
||||
const res = await fetch(destination, { signal: controller.signal as RequestInit['signal'] });
|
||||
// Get buffer data from response
|
||||
const fileData = await res.buffer();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue