Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/actor.api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Ed25519KeyIdentity} from '@dfinity/identity';
import {isNullish, nonNullish, notEmptyString} from '@dfinity/utils';
import {Ed25519KeyIdentity} from '@icp-sdk/core/identity';
import type {ActorParameters} from '@junobuild/ic-client/actor';
import {green, red, yellow} from 'kleur';
import {getToken} from '../configs/cli.config';
Expand Down
2 changes: 1 addition & 1 deletion src/api/agent.api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HttpAgent} from '@dfinity/agent';
import {isNullish, nonNullish} from '@dfinity/utils';
import {HttpAgent} from '@icp-sdk/core/agent';
import type {ActorParameters} from '@junobuild/ic-client/actor';
import {REVOKED_CONTROLLERS} from '../constants/constants';
import {actorParameters} from './actor.api';
Expand Down
4 changes: 2 additions & 2 deletions src/api/ic.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
type upload_canister_snapshot_metadata_response,
type UploadCanisterSnapshotDataParams,
type UploadCanisterSnapshotMetadataParams
} from '@dfinity/ic-management';
import type {Principal} from '@dfinity/principal';
} from '@icp-sdk/canisters/ic-management';
import type {Principal} from '@icp-sdk/core/principal';
import {initAgent} from './agent.api';

export const canisterStop = async ({canisterId}: {canisterId: Principal}): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Ed25519KeyIdentity} from '@dfinity/identity';
import {isNullish} from '@dfinity/utils';
import {Ed25519KeyIdentity} from '@icp-sdk/core/identity';
import {assertAnswerCtrlC, hasArgs} from '@junobuild/cli-tools';
import {green, red} from 'kleur';
import prompts from 'prompts';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/whoami.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Ed25519KeyIdentity} from '@dfinity/identity';
import {isNullish, nonNullish} from '@dfinity/utils';
import {Ed25519KeyIdentity} from '@icp-sdk/core/identity';
import {green} from 'kleur';
import {getToken} from '../configs/cli.config';
import {ENV} from '../env';
Expand Down
2 changes: 1 addition & 1 deletion src/configs/cli.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {JsonnableEd25519KeyIdentity} from '@dfinity/identity';
import {assertNonNullish, nonNullish} from '@dfinity/utils';
import type {JsonnableEd25519KeyIdentity} from '@icp-sdk/core/identity';
import type Conf from 'conf';
import {red, yellow} from 'kleur';
import {askForPassword} from '../services/cli.settings.services';
Expand Down
2 changes: 1 addition & 1 deletion src/services/auth/login.services.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {JsonnableEd25519KeyIdentity} from '@dfinity/identity';
import type {JsonnableEd25519KeyIdentity} from '@icp-sdk/core/identity';
import {nextArg} from '@junobuild/cli-tools';
import {bold, green, underline} from 'kleur';
import {randomBytes} from 'node:crypto';
Expand Down
4 changes: 2 additions & 2 deletions src/services/config/settings.services.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ICManagementCanister, LogVisibility} from '@dfinity/ic-management';
import {Principal} from '@dfinity/principal';
import {isNullish} from '@dfinity/utils';
import {ICManagementCanister, LogVisibility} from '@icp-sdk/canisters/ic-management';
import {Principal} from '@icp-sdk/core/principal';
import type {ModuleSettings} from '@junobuild/config';
import {initAgent} from '../../api/agent.api';
import type {SatelliteParametersWithId} from '../../types/satellite';
Expand Down
2 changes: 1 addition & 1 deletion src/services/controllers.services.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {type Principal} from '@dfinity/principal';
import {type Principal} from '@icp-sdk/core/principal';
import {assertAnswerCtrlC} from '@junobuild/cli-tools';
import {bold, green, red} from 'kleur';
import prompts from 'prompts';
Expand Down
6 changes: 3 additions & 3 deletions src/services/modules/snapshot/_snapshot.loader.services.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {snapshot_id} from '@dfinity/ic-management';
import {encodeSnapshotId} from '@dfinity/ic-management';
import {type Principal} from '@dfinity/principal';
import {isNullish, nonNullish} from '@dfinity/utils';
import type {snapshot_id} from '@icp-sdk/canisters/ic-management';
import {encodeSnapshotId} from '@icp-sdk/canisters/ic-management';
import {type Principal} from '@icp-sdk/core/principal';
import {red} from 'kleur';
import ora from 'ora';
import {listCanisterSnapshots} from '../../../api/ic.api';
Expand Down
4 changes: 2 additions & 2 deletions src/services/modules/snapshot/snapshot.download.services.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {arrayOfNumberToUint8Array, jsonReplacer} from '@dfinity/utils';
import {
type CanisterSnapshotMetadataKind,
type ReadCanisterSnapshotMetadataResponse,
encodeSnapshotId
} from '@dfinity/ic-management';
import {arrayOfNumberToUint8Array, jsonReplacer} from '@dfinity/utils';
} from '@icp-sdk/canisters/ic-management';
import {red} from 'kleur';
import {createHash} from 'node:crypto';
import {createWriteStream, existsSync, statSync} from 'node:fs';
Expand Down
6 changes: 3 additions & 3 deletions src/services/modules/snapshot/snapshot.services.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {snapshot_id} from '@dfinity/ic-management';
import {encodeSnapshotId} from '@dfinity/ic-management';
import {Principal} from '@dfinity/principal';
import {notEmptyString} from '@dfinity/utils';
import type {snapshot_id} from '@icp-sdk/canisters/ic-management';
import {encodeSnapshotId} from '@icp-sdk/canisters/ic-management';
import {Principal} from '@icp-sdk/core/principal';
import {nextArg} from '@junobuild/cli-tools';
import ora from 'ora';
import {
Expand Down
4 changes: 2 additions & 2 deletions src/services/modules/snapshot/snapshot.upload.services.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {arrayBufferToUint8Array, isNullish, jsonReviver} from '@dfinity/utils';
import {
encodeSnapshotId,
type snapshot_id,
type UploadCanisterSnapshotDataKind
} from '@dfinity/ic-management';
import {arrayBufferToUint8Array, isNullish, jsonReviver} from '@dfinity/utils';
} from '@icp-sdk/canisters/ic-management';
import {red} from 'kleur';
import {lstatSync} from 'node:fs';
import {type FileHandle, open as openFile, readFile} from 'node:fs/promises';
Expand Down
2 changes: 1 addition & 1 deletion src/services/modules/start-stop.services.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Principal} from '@dfinity/principal';
import {isNullish} from '@dfinity/utils';
import {Principal} from '@icp-sdk/core/principal';
import {cyan, red} from 'kleur';
import ora from 'ora';
import {canisterStart, canisterStop} from '../../api/ic.api';
Expand Down
2 changes: 1 addition & 1 deletion src/services/run.services.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Principal} from '@dfinity/principal';
import {assertNonNullish, isNullish, nonNullish} from '@dfinity/utils';
import {Principal} from '@icp-sdk/core/principal';
import {buildScript, nextArg} from '@junobuild/cli-tools';
import {OnRunSchema, type RunFnOrObject, RunFnOrObjectSchema} from '@junobuild/config';
import {red, yellow} from 'kleur';
Expand Down
2 changes: 1 addition & 1 deletion src/types/cli.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {JsonnableEd25519KeyIdentity} from '@dfinity/identity';
import type {PrincipalText} from '@dfinity/zod-schemas';
import type {JsonnableEd25519KeyIdentity} from '@icp-sdk/core/identity';

export interface CliConfig {
token: JsonnableEd25519KeyIdentity;
Expand Down
4 changes: 2 additions & 2 deletions src/types/snapshot.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {snapshot_id} from '@dfinity/ic-management';
import type {Principal} from '@dfinity/principal';
import type {snapshot_id} from '@icp-sdk/canisters/ic-management';
import type {Principal} from '@icp-sdk/core/principal';
import type * as z from 'zod';
import {
type ReadCanisterSnapshotMetadataResponseSchema,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/auth.utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {JsonnableEd25519KeyIdentity} from '@dfinity/identity';
import {Ed25519KeyIdentity} from '@dfinity/identity';
import {nonNullish} from '@dfinity/utils';
import type {PrincipalText} from '@dfinity/zod-schemas';
import type {JsonnableEd25519KeyIdentity} from '@icp-sdk/core/identity';
import {Ed25519KeyIdentity} from '@icp-sdk/core/identity';
import {REDIRECT_URL} from '../constants/constants';
import {ENV} from '../env';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/process.utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {JsonnableEd25519KeyIdentity} from '@dfinity/identity';
import type {JsonnableEd25519KeyIdentity} from '@icp-sdk/core/identity';
import {hasArgs} from '@junobuild/cli-tools';

export const getProcessToken = (): JsonnableEd25519KeyIdentity | undefined => {
Expand Down