Skip to content

Commit

Permalink
chore: format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Jan 25, 2024
1 parent d82c829 commit eee7769
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {InstallMode} from '@dfinity/ic-management';
import {isNullish} from '@dfinity/utils';
import kleur from 'kleur';
import {modules} from '../modules/modules';
import {buildContext} from '../services/context.services';
import type {Module} from '../services/modules.services';
import {InstallMode} from "@dfinity/ic-management";

const {green, cyan, red} = kleur;

Expand Down
10 changes: 4 additions & 6 deletions cli/src/commands/watch.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {FileChangeInfo} from 'fs/promises';
import {InstallMode} from '@dfinity/ic-management';
import type {FileChangeInfo} from 'fs/promises';
import kleur from 'kleur';
import {existsSync} from 'node:fs';
import {watch as fsWatch} from 'node:fs/promises';
import {join} from 'node:path';
import {SATELLITE, SatelliteModule} from '../modules/satellite';
import {buildContext} from '../services/context.services';
import {CliContext} from '../types/context';
import {InstallMode} from "@dfinity/ic-management";
import type {CliContext} from '../types/context';

const {green} = kleur;

Expand Down Expand Up @@ -51,9 +51,7 @@ const onFileWatch = async ({
});

if (mod.isDeployed(context)) {
console.log(
`ℹ️ Satellite already deployed. No changes detected.`
);
console.log(`ℹ️ Satellite already deployed. No changes detected.`);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {version as cliCurrentVersion} from '../package.json';
import {deploy} from './commands/deploy';
import {start} from './commands/start';
import {wait} from './commands/wait';
import {watch} from './commands/watch';
import {checkNodeVersion} from './utils/env.utils';
import {watch} from "./commands/watch";

const {red, yellow} = kleur;

Expand Down
8 changes: 6 additions & 2 deletions cli/src/services/modules.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {readFileSync} from 'atomically';
import {createHash} from 'crypto';
import kleur from 'kleur';
import type {CliContext} from '../types/context';
import {
import type {
ModuleCanisterId,
ModuleDescription,
ModuleInstallParams,
Expand Down Expand Up @@ -158,7 +158,11 @@ export class Module {

const {name, canisterId} = metadata;

console.log(`🚀 ${green(name)} ${mode === InstallMode.Upgrade ? "upgraded" : "deployed"}. ID: ${cyan(canisterId.toString())}`);
console.log(
`🚀 ${green(name)} ${mode === InstallMode.Upgrade ? 'upgraded' : 'deployed'}. ID: ${cyan(
canisterId.toString()
)}`
);
}

async start(_context: CliContext) {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/types/module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {InstallMode} from '@dfinity/ic-management';
import type {InstallMode} from '@dfinity/ic-management';
import type {CliContext} from './context';

export type ModuleStatus = 'initialized' | 'deployed';
Expand Down

0 comments on commit eee7769

Please sign in to comment.