@junobuild/admin 0.0.58-next-2024-11-27.2 → 0.0.59-next-2024-11-27
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/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './errors/upgrade.errors';
|
|
|
2
2
|
export * from './services/mission-control.controllers.services';
|
|
3
3
|
export * from './services/mission-control.upgrade.services';
|
|
4
4
|
export * from './services/mission-control.version.services';
|
|
5
|
+
export * from './services/module.upgrade.services';
|
|
5
6
|
export * from './services/orbiter.controllers.services';
|
|
6
7
|
export * from './services/orbiter.memory.services';
|
|
7
8
|
export * from './services/orbiter.upgrade.services';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ActorParameters } from '../types/actor.types';
|
|
2
|
+
import type { UpgradeCodeParams } from '../types/upgrade.types';
|
|
3
|
+
/**
|
|
4
|
+
* Upgrades a module with the provided WASM code and arguments. This generic is notably useful for Juno Docker.
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} params - Parameters for upgrading the module.
|
|
7
|
+
* @param {ActorParameters} params.actor - The actor parameters associated with the module.
|
|
8
|
+
* @param {Principal} params.canisterId - The ID of the canister being upgraded.
|
|
9
|
+
* @param {Principal} [params.missionControlId] - Optional. An ID to store and reuse WASM chunks across installations.
|
|
10
|
+
* @param {Uint8Array} params.wasmModule - The WASM code to be installed during the upgrade.
|
|
11
|
+
* @param {Uint8Array} params.arg - The initialization argument for the module upgrade.
|
|
12
|
+
* @param {canister_install_mode} params.mode - The installation mode, e.g., `upgrade` or `reinstall`.
|
|
13
|
+
* @param {boolean} [params.preClearChunks] - Optional. Forces clearing existing chunks before uploading a chunked WASM module. Recommended for WASM modules larger than 2MB.
|
|
14
|
+
* @param {function} [params.onProgress] - Optional. Callback function to track progress during the upgrade process.
|
|
15
|
+
* @param {boolean} [params.reset=false] - Optional. Specifies whether to reset the module (reinstall) instead of performing an upgrade. Defaults to `false`.
|
|
16
|
+
* @throws {Error} Will throw an error if the parameters are invalid or if the upgrade process fails.
|
|
17
|
+
* @returns {Promise<void>} Resolves when the upgrade process is complete.
|
|
18
|
+
*/
|
|
19
|
+
export declare const upgradeModule: (params: {
|
|
20
|
+
actor: ActorParameters;
|
|
21
|
+
reset?: boolean;
|
|
22
|
+
} & UpgradeCodeParams) => Promise<void>;
|
package/package.json
CHANGED