@junobuild/admin 0.1.8-next-2025-04-06.1 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { CanisterStatus } from '@dfinity/agent';
2
- import { type chunk_hash, type InstallChunkedCodeParams, type InstallCodeParams, type list_canister_snapshots_result, type snapshot_id, type UploadChunkParams } from '@dfinity/ic-management';
2
+ import { type chunk_hash, type InstallChunkedCodeParams, type UploadChunkParams, InstallCodeParams, list_canister_snapshots_result, snapshot_id } from '@dfinity/ic-management';
3
3
  import type { take_canister_snapshot_result } from '@dfinity/ic-management/dist/candid/ic-management';
4
4
  import type { CanisterStatusResponse } from '@dfinity/ic-management/dist/types/types/ic-management.responses';
5
5
  import { Principal } from '@dfinity/principal';
@@ -1,2 +1,2 @@
1
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import { UpgradeCodeParams } from '../types/upgrade.types';
2
2
  export declare const upgradeChunkedCode: ({ actor, canisterId, missionControlId, wasmModule, preClearChunks: userPreClearChunks, ...rest }: UpgradeCodeParams) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { type UpgradeCodeParams } from '../types/upgrade.types';
1
+ import { UpgradeCodeParams } from '../types/upgrade.types';
2
2
  export declare const upgrade: ({ wasmModule, canisterId, actor, onProgress, takeSnapshot, ...rest }: UpgradeCodeParams & {
3
3
  reset?: boolean;
4
4
  }) => Promise<void>;
@@ -1,2 +1,2 @@
1
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import { UpgradeCodeParams } from '../types/upgrade.types';
2
2
  export declare const upgradeSingleChunkCode: ({ actor, ...rest }: UpgradeCodeParams) => Promise<void>;
@@ -25,4 +25,3 @@ export type * from './types/customdomain.types';
25
25
  export type * from './types/releases.types';
26
26
  export * from './types/upgrade.types';
27
27
  export * from './utils/crypto.utils';
28
- export * from './utils/package.utils';
@@ -1,4 +1,4 @@
1
- import type { Principal } from '@dfinity/principal';
1
+ import { Principal } from '@dfinity/principal';
2
2
  import type { Controller } from '../../declarations/mission_control/mission_control.did';
3
3
  import type { MissionControlParameters } from '../types/actor.types';
4
4
  import type { SetControllerParams } from '../types/controllers.types';
@@ -1,5 +1,5 @@
1
1
  import type { MissionControlParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
2
+ import { UpgradeCodeParams } from '../types/upgrade.types';
3
3
  /**
4
4
  * Upgrades the Mission Control with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the Mission Control.
@@ -1,4 +1,4 @@
1
- import type { Principal } from '@dfinity/principal';
1
+ import { Principal } from '@dfinity/principal';
2
2
  import type { Controller } from '../../declarations/mission_control/mission_control.did';
3
3
  import type { OrbiterParameters } from '../types/actor.types';
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { OrbiterParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
2
+ import { UpgradeCodeParams } from '../types/upgrade.types';
3
3
  /**
4
4
  * Upgrades the Orbiter with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the Orbiter.
@@ -1,6 +1,6 @@
1
- import type { Principal } from '@dfinity/principal';
1
+ import { Principal } from '@dfinity/principal';
2
2
  import { type JunoPackage } from '@junobuild/config';
3
- import type { ActorParameters } from '../types/actor.types';
3
+ import { ActorParameters } from '../types/actor.types';
4
4
  /**
5
5
  * Parameters required to retrieve a `juno:package` metadata section.
6
6
  *
@@ -33,13 +33,3 @@ export declare const getJunoPackage: ({ moduleId, ...rest }: GetJunoPackageParam
33
33
  * @throws {ZodError} If the metadata exists but does not conform to the expected `JunoPackage` schema.
34
34
  */
35
35
  export declare const getJunoPackageVersion: (params: GetJunoPackageParams) => Promise<JunoPackage["version"] | undefined>;
36
- /**
37
- * Retrieves the `dependencies` field from the `juno:package` metadata.
38
- *
39
- * @param {GetJunoPackageParams} params - The parameters to fetch the package metadata.
40
- *
41
- * @returns {Promise<JunoPackage['dependencies'] | undefined>} A promise that resolves to the dependencies object or `undefined` if not found.
42
- *
43
- * @throws {ZodError} If the metadata exists but does not conform to the expected `JunoPackage` schema.
44
- */
45
- export declare const getJunoPackageDependencies: (params: GetJunoPackageParams) => Promise<JunoPackage["dependencies"] | undefined>;
@@ -1,4 +1,4 @@
1
- import type { Principal } from '@dfinity/principal';
1
+ import { Principal } from '@dfinity/principal';
2
2
  import type { Controller, SetControllersArgs } from '../../declarations/satellite/satellite.did';
3
3
  import type { SatelliteParameters } from '../types/actor.types';
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { SatelliteParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
2
+ import { UpgradeCodeParams } from '../types/upgrade.types';
3
3
  /**
4
4
  * Upgrades a satellite with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the satellite.
@@ -1,6 +1,6 @@
1
1
  import type { canister_install_mode } from '@dfinity/ic-management';
2
- import type { Principal } from '@dfinity/principal';
3
- import type { ActorParameters } from './actor.types';
2
+ import { Principal } from '@dfinity/principal';
3
+ import { ActorParameters } from './actor.types';
4
4
  export declare enum UpgradeCodeProgressStep {
5
5
  AssertingExistingCode = 0,
6
6
  StoppingCanister = 1,
@@ -1,7 +1,7 @@
1
1
  import { HttpAgent, type ActorConfig, type ActorMethod, type ActorSubclass } from '@dfinity/agent';
2
2
  import type { IDL } from '@dfinity/candid';
3
3
  import type { ActorParameters } from '../types/actor.types';
4
- export declare const createActor: <T = Record<string, ActorMethod>>({ canisterId, idlFactory, config, ...rest }: {
4
+ export declare const createActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ canisterId, idlFactory, config, ...rest }: {
5
5
  idlFactory: IDL.InterfaceFactory;
6
6
  canisterId: string;
7
7
  config?: Pick<ActorConfig, "callTransform" | "queryTransform">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/admin",
3
- "version": "0.1.8-next-2025-04-06.1",
3
+ "version": "0.1.8",
4
4
  "description": "A library for interfacing with admin features of Juno",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -50,14 +50,14 @@
50
50
  ],
51
51
  "homepage": "https://juno.build",
52
52
  "peerDependencies": {
53
- "@dfinity/agent": "*",
54
- "@dfinity/candid": "*",
55
- "@dfinity/ic-management": "*",
56
- "@dfinity/identity": "*",
57
- "@dfinity/principal": "*",
58
- "@dfinity/utils": "*",
53
+ "@dfinity/agent": "^2.3.0",
54
+ "@dfinity/candid": "^2.3.0",
55
+ "@dfinity/ic-management": "^6",
56
+ "@dfinity/identity": "^2.3.0",
57
+ "@dfinity/principal": "^2.3.0",
58
+ "@dfinity/utils": "^2",
59
59
  "@junobuild/config": "*",
60
- "semver": "*",
61
- "zod": "*"
60
+ "semver": "7.*",
61
+ "zod": "^3"
62
62
  }
63
- }
63
+ }
@@ -1,14 +0,0 @@
1
- import type { JunoPackageDependencies } from '@junobuild/config';
2
- /**
3
- * Finds a specific dependency in a `JunoPackageDependencies` map.
4
- *
5
- * @param {Object} params - The parameters for the search.
6
- * @param {string} params.dependencyId - The ID of the dependency to look for.
7
- * @param {JunoPackageDependencies | undefined} params.dependencies - The full list of dependencies, or `undefined`.
8
- *
9
- * @returns {[string, string] | undefined} A tuple containing the dependency ID and version if found, or `undefined` if not found or no dependencies are present.
10
- */
11
- export declare const findJunoPackageDependency: ({ dependencyId, dependencies }: {
12
- dependencyId: string;
13
- dependencies: JunoPackageDependencies | undefined;
14
- }) => [string, string] | undefined;