1 | export const downloadManifest = async (manifestPath) => {
|
2 | const manifestURL = new URL(manifestPath, location.toString()).toString();
|
3 | const resp = await fetch(manifestURL);
|
4 | const manifest = await resp.json();
|
5 | if ("new_install_skip_erase" in manifest) {
|
6 | console.warn('Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.');
|
7 | if (manifest.new_install_skip_erase) {
|
8 | manifest.new_install_prompt_erase = true;
|
9 | }
|
10 | }
|
11 | return manifest;
|
12 | };
|