@junobuild/admin 0.1.8 → 0.2.0-next-2025-04-14
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.
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/mission_control/mission_control-deprecated-version.did.d.ts +231 -0
- package/dist/declarations/mission_control/mission_control-deprecated-version.factory.did.js +247 -0
- package/dist/declarations/mission_control/mission_control.did.d.ts +0 -1
- package/dist/declarations/mission_control/mission_control.factory.certified.did.js +1 -2
- package/dist/declarations/mission_control/mission_control.factory.did.js +1 -2
- package/dist/declarations/orbiter/orbiter-deprecated-version.did.d.ts +229 -0
- package/dist/declarations/orbiter/orbiter-deprecated-version.factory.did.js +271 -0
- package/dist/declarations/orbiter/orbiter.did.d.ts +0 -1
- package/dist/declarations/orbiter/orbiter.factory.certified.did.js +1 -2
- package/dist/declarations/orbiter/orbiter.factory.did.js +1 -2
- package/dist/declarations/orbiter/orbiter.factory.did.mjs +1 -2
- package/dist/declarations/satellite/satellite-deprecated-version.did.d.ts +291 -0
- package/dist/declarations/satellite/satellite-deprecated-version.factory.did.js +319 -0
- package/dist/declarations/satellite/satellite.did.d.ts +0 -2
- package/dist/declarations/satellite/satellite.factory.certified.did.js +1 -3
- package/dist/declarations/satellite/satellite.factory.did.js +1 -3
- package/dist/declarations/satellite/satellite.factory.did.mjs +1 -3
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.api.d.ts +21 -0
- package/dist/types/api/ic.api.d.ts +2 -2
- package/dist/types/api/mission-control.api.d.ts +3 -0
- package/dist/types/api/orbiter.api.d.ts +3 -0
- package/dist/types/api/satellite.api.d.ts +9 -3
- package/dist/types/errors/version.errors.d.ts +9 -0
- package/dist/types/handlers/upgrade.chunks.handlers.d.ts +1 -1
- package/dist/types/handlers/upgrade.handlers.d.ts +1 -1
- package/dist/types/handlers/upgrade.single.handlers.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/services/mission-control.controllers.services.d.ts +1 -1
- package/dist/types/services/mission-control.upgrade.services.d.ts +1 -1
- package/dist/types/services/mission-control.version.services.d.ts +1 -1
- package/dist/types/services/orbiter.controllers.services.d.ts +1 -1
- package/dist/types/services/orbiter.upgrade.services.d.ts +1 -1
- package/dist/types/services/orbiter.version.services.d.ts +1 -1
- package/dist/types/services/package.services.d.ts +12 -2
- package/dist/types/services/satellite.controllers.services.d.ts +1 -1
- package/dist/types/services/satellite.upgrade.services.d.ts +1 -1
- package/dist/types/services/satellite.version.services.d.ts +1 -10
- package/dist/types/types/upgrade.types.d.ts +2 -2
- package/dist/types/utils/actor.utils.d.ts +1 -1
- package/dist/types/utils/package.utils.d.ts +14 -0
- package/package.json +10 -10
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import type { IDL } from '@dfinity/candid';
|
|
2
|
+
import type { _SERVICE as DeprecatedMissionControlVersionActor } from '../../declarations/mission_control/mission_control-deprecated-version.did';
|
|
2
3
|
import type { _SERVICE as MissionControlActor } from '../../declarations/mission_control/mission_control.did';
|
|
4
|
+
import type { _SERVICE as DeprecatedOrbiterVersionActor } from '../../declarations/orbiter/orbiter-deprecated-version.did';
|
|
3
5
|
import type { _SERVICE as OrbiterActor } from '../../declarations/orbiter/orbiter.did';
|
|
4
6
|
import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarations/satellite/satellite-deprecated-no-scope.did';
|
|
7
|
+
import type { _SERVICE as DeprecatedSatelliteVersionActor } from '../../declarations/satellite/satellite-deprecated-version.did';
|
|
5
8
|
import type { _SERVICE as DeprecatedSatelliteActor } from '../../declarations/satellite/satellite-deprecated.did';
|
|
6
9
|
import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
|
|
7
10
|
import type { ActorParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor.types';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
13
|
+
*/
|
|
8
14
|
export declare const getDeprecatedSatelliteActor: ({ satelliteId, ...rest }: SatelliteParameters) => Promise<DeprecatedSatelliteActor>;
|
|
9
15
|
export declare const getSatelliteActor: ({ satelliteId, ...rest }: SatelliteParameters) => Promise<SatelliteActor>;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
18
|
+
*/
|
|
10
19
|
export declare const getDeprecatedSatelliteNoScopeActor: ({ satelliteId, ...rest }: SatelliteParameters) => Promise<DeprecatedSatelliteNoScopeActor>;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
22
|
+
*/
|
|
23
|
+
export declare const getDeprecatedSatelliteVersionActor: ({ satelliteId, ...rest }: SatelliteParameters) => Promise<DeprecatedSatelliteVersionActor>;
|
|
11
24
|
export declare const getMissionControlActor: ({ missionControlId, ...rest }: MissionControlParameters) => Promise<MissionControlActor>;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
27
|
+
*/
|
|
28
|
+
export declare const getDeprecatedMissionControlVersionActor: ({ missionControlId, ...rest }: MissionControlParameters) => Promise<DeprecatedMissionControlVersionActor>;
|
|
12
29
|
export declare const getOrbiterActor: ({ orbiterId, ...rest }: OrbiterParameters) => Promise<OrbiterActor>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
32
|
+
*/
|
|
33
|
+
export declare const getDeprecatedOrbiterVersionActor: ({ orbiterId, ...rest }: OrbiterParameters) => Promise<DeprecatedOrbiterVersionActor>;
|
|
13
34
|
export declare const getActor: <T>({ canisterId, idlFactory, ...rest }: ActorParameters & {
|
|
14
35
|
canisterId: string | undefined;
|
|
15
36
|
idlFactory: IDL.InterfaceFactory;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CanisterStatus } from '@dfinity/agent';
|
|
2
|
-
import { type chunk_hash, type InstallChunkedCodeParams, type
|
|
2
|
+
import { type chunk_hash, type InstallChunkedCodeParams, type InstallCodeParams, type list_canister_snapshots_result, type snapshot_id, type UploadChunkParams } 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';
|
|
@@ -37,7 +37,7 @@ export declare const canisterStatus: ({ actor, canisterId }: {
|
|
|
37
37
|
canisterId: Principal;
|
|
38
38
|
}) => Promise<CanisterStatusResponse>;
|
|
39
39
|
export declare const canisterMetadata: ({ canisterId, path, ...rest }: ActorParameters & {
|
|
40
|
-
canisterId: Principal | string
|
|
40
|
+
canisterId: Principal | string;
|
|
41
41
|
path: string;
|
|
42
42
|
}) => Promise<CanisterStatus.Status | undefined>;
|
|
43
43
|
export declare const listCanisterSnapshots: ({ actor, canisterId }: {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Principal } from '@dfinity/principal';
|
|
2
2
|
import type { Controller, SetController } from '../../declarations/mission_control/mission_control.did';
|
|
3
3
|
import type { MissionControlParameters } from '../types/actor.types';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated - Replaced in Mission Control > v0.0.14 with public custom section juno:package
|
|
6
|
+
*/
|
|
4
7
|
export declare const version: ({ missionControl }: {
|
|
5
8
|
missionControl: MissionControlParameters;
|
|
6
9
|
}) => Promise<string>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Principal } from '@dfinity/principal';
|
|
2
2
|
import type { Controller, MemorySize } from '../../declarations/orbiter/orbiter.did';
|
|
3
3
|
import type { OrbiterParameters } from '../types/actor.types';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated - Replaced in Orbiter > v0.0.8 with public custom section juno:package
|
|
6
|
+
*/
|
|
4
7
|
export declare const version: ({ orbiter }: {
|
|
5
8
|
orbiter: OrbiterParameters;
|
|
6
9
|
}) => Promise<string>;
|
|
@@ -32,15 +32,21 @@ export declare const setRule: ({ type, collection, rule, satellite }: {
|
|
|
32
32
|
rule: SetRule;
|
|
33
33
|
satellite: SatelliteParameters;
|
|
34
34
|
}) => Promise<Rule>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated - Replaced in Satellite > v0.0.22 with public custom section juno:package
|
|
37
|
+
*/
|
|
35
38
|
export declare const version: ({ satellite }: {
|
|
36
39
|
satellite: SatelliteParameters;
|
|
37
40
|
}) => Promise<string>;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
43
|
+
*/
|
|
41
44
|
export declare const listDeprecatedControllers: ({ satellite }: {
|
|
42
45
|
satellite: SatelliteParameters;
|
|
43
46
|
}) => Promise<Principal[]>;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated TODO: for backwards compatibility - to be removed
|
|
49
|
+
*/
|
|
44
50
|
export declare const listDeprecatedNoScopeControllers: ({ satellite }: {
|
|
45
51
|
satellite: SatelliteParameters;
|
|
46
52
|
}) => Promise<[Principal, Controller][]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UpgradeCodeParams } from '../types/upgrade.types';
|
|
1
|
+
import type { 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 { UpgradeCodeParams } from '../types/upgrade.types';
|
|
1
|
+
import { type 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 { UpgradeCodeParams } from '../types/upgrade.types';
|
|
1
|
+
import type { UpgradeCodeParams } from '../types/upgrade.types';
|
|
2
2
|
export declare const upgradeSingleChunkCode: ({ actor, ...rest }: UpgradeCodeParams) => Promise<void>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './errors/upgrade.errors';
|
|
2
|
+
export * from './errors/version.errors';
|
|
2
3
|
export * from './services/mission-control.controllers.services';
|
|
3
4
|
export * from './services/mission-control.upgrade.services';
|
|
4
5
|
export * from './services/mission-control.version.services';
|
|
@@ -25,3 +26,4 @@ export type * from './types/customdomain.types';
|
|
|
25
26
|
export type * from './types/releases.types';
|
|
26
27
|
export * from './types/upgrade.types';
|
|
27
28
|
export * from './utils/crypto.utils';
|
|
29
|
+
export * from './utils/package.utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Principal } from '@dfinity/principal';
|
|
1
|
+
import type { 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 { UpgradeCodeParams } from '../types/upgrade.types';
|
|
2
|
+
import type { 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.
|
|
@@ -5,6 +5,6 @@ import type { MissionControlParameters } from '../types/actor.types';
|
|
|
5
5
|
* @param {MissionControlParameters} params.missionControl - The Mission Control parameters.
|
|
6
6
|
* @returns {Promise<string>} A promise that resolves to the version of Mission Control.
|
|
7
7
|
*/
|
|
8
|
-
export declare const missionControlVersion: (
|
|
8
|
+
export declare const missionControlVersion: ({ missionControl: { missionControlId, ...rest } }: {
|
|
9
9
|
missionControl: MissionControlParameters;
|
|
10
10
|
}) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OrbiterParameters } from '../types/actor.types';
|
|
2
|
-
import { UpgradeCodeParams } from '../types/upgrade.types';
|
|
2
|
+
import type { 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.
|
|
@@ -5,6 +5,6 @@ import type { OrbiterParameters } from '../types/actor.types';
|
|
|
5
5
|
* @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
|
|
6
6
|
* @returns {Promise<string>} A promise that resolves to the version of the Orbiter.
|
|
7
7
|
*/
|
|
8
|
-
export declare const orbiterVersion: (
|
|
8
|
+
export declare const orbiterVersion: ({ orbiter: { orbiterId, ...rest } }: {
|
|
9
9
|
orbiter: OrbiterParameters;
|
|
10
10
|
}) => Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Principal } from '@dfinity/principal';
|
|
1
|
+
import type { Principal } from '@dfinity/principal';
|
|
2
2
|
import { type JunoPackage } from '@junobuild/config';
|
|
3
|
-
import { ActorParameters } from '../types/actor.types';
|
|
3
|
+
import type { ActorParameters } from '../types/actor.types';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters required to retrieve a `juno:package` metadata section.
|
|
6
6
|
*
|
|
@@ -33,3 +33,13 @@ 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 { Principal } from '@dfinity/principal';
|
|
1
|
+
import type { 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 { UpgradeCodeParams } from '../types/upgrade.types';
|
|
2
|
+
import type { 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.
|
|
@@ -6,16 +6,7 @@ import type { BuildType } from '../types/build.types';
|
|
|
6
6
|
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
7
|
* @returns {Promise<string>} A promise that resolves to the version of the satellite.
|
|
8
8
|
*/
|
|
9
|
-
export declare const satelliteVersion: (
|
|
10
|
-
satellite: SatelliteParameters;
|
|
11
|
-
}) => Promise<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves the build version of the satellite.
|
|
14
|
-
* @param {Object} params - The parameters for retrieving the build version.
|
|
15
|
-
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
16
|
-
* @returns {Promise<string>} A promise that resolves to the build version of the satellite.
|
|
17
|
-
*/
|
|
18
|
-
export declare const satelliteBuildVersion: (params: {
|
|
9
|
+
export declare const satelliteVersion: ({ satellite: { satelliteId, ...rest } }: {
|
|
19
10
|
satellite: SatelliteParameters;
|
|
20
11
|
}) => Promise<string>;
|
|
21
12
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { canister_install_mode } from '@dfinity/ic-management';
|
|
2
|
-
import { Principal } from '@dfinity/principal';
|
|
3
|
-
import { ActorParameters } from './actor.types';
|
|
2
|
+
import type { Principal } from '@dfinity/principal';
|
|
3
|
+
import type { 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
|
|
4
|
+
export declare const createActor: <T = Record<string, ActorMethod>>({ canisterId, idlFactory, config, ...rest }: {
|
|
5
5
|
idlFactory: IDL.InterfaceFactory;
|
|
6
6
|
canisterId: string;
|
|
7
7
|
config?: Pick<ActorConfig, "callTransform" | "queryTransform">;
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-next-2025-04-14",
|
|
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": "*",
|
|
54
|
+
"@dfinity/candid": "*",
|
|
55
|
+
"@dfinity/ic-management": "*",
|
|
56
|
+
"@dfinity/identity": "*",
|
|
57
|
+
"@dfinity/principal": "*",
|
|
58
|
+
"@dfinity/utils": "*",
|
|
59
59
|
"@junobuild/config": "*",
|
|
60
|
-
"semver": "
|
|
61
|
-
"zod": "
|
|
60
|
+
"semver": "*",
|
|
61
|
+
"zod": "*"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|