Skip to content

Commit

Permalink
feat: core lint
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Dec 22, 2023
1 parent 7977695 commit d2555f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/commands/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ const upgradeSatelliteRelease = async ({
const upgrade = async (params: {
upgrade: ({wasm_module}: {wasm_module: Uint8Array}) => Promise<void>;
reset?: boolean;
}) => upgradeWasmCdn({version, assetKey: 'satellite', ...params});
}) => {
await upgradeWasmCdn({version, assetKey: 'satellite', ...params});
};

await executeUpgradeSatellite({
satellite,
Expand Down Expand Up @@ -194,7 +196,9 @@ const upgradeSatelliteCustom = async ({
const upgrade = async (params: {
upgrade: ({wasm_module}: {wasm_module: Uint8Array}) => Promise<void>;
reset?: boolean;
}) => upgradeWasmLocal({src, ...params});
}) => {
await upgradeWasmLocal({src, ...params});
};

await executeUpgradeSatellite({
satellite,
Expand Down
9 changes: 6 additions & 3 deletions src/services/upgrade.services.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {setCustomDomains, type CustomDomain, type SatelliteParameters} from '@junobuild/admin';
import {createHash} from 'crypto';
import {cyan} from 'kleur';
import {readFile} from 'node:fs/promises';
Expand All @@ -6,7 +7,6 @@ import {JUNO_CDN_URL} from '../constants/constants';
import type {AssetKey} from '../types/asset-key';
import {downloadFromURL} from '../utils/download.utils';
import {NEW_CMD_LINE, confirmAndExit} from '../utils/prompt.utils';
import { CustomDomain, SatelliteParameters, setCustomDomains } from "@junobuild/admin";

const executeUpgradeWasm = async ({
upgrade,
Expand Down Expand Up @@ -108,12 +108,15 @@ export const upgradeWasmCdn = async ({
}
};

export const redoCustomDomains = async (params: {satellite: SatelliteParameters; domains: CustomDomain[]}) => {
export const redoCustomDomains = async (params: {
satellite: SatelliteParameters;
domains: CustomDomain[];
}) => {
const spinner = ora('Setting back custom domains...').start();

try {
await setCustomDomains(params);
} finally {
spinner.stop();
}
}
};

0 comments on commit d2555f9

Please sign in to comment.