@junobuild/cli-tools
Version:
A collection of tools for Juno CLIs and Plugins.
29 lines (28 loc) • 1.78 kB
TypeScript
import type { DeployResultWithProposal } from '../types/deploy';
import type { ProposeChangesParams } from '../types/proposal';
import type { PublishSatelliteWasmParams } from '../types/publish';
/**
* Uploads a Satellite WASM file to the CDN as part of a proposal-based deployment.
*
* This function performs a memory check (if provided), packages the WASM file,
* uploads it to the CDN, and submits a proposal for deployment.
* Optionally, the proposal can be auto-committed if `autoCommit` is true.
*
* @param {Object} options - The deployment and proposal configuration.
* @param {PublishSatelliteWasmParams} options.deploy - Deployment parameters including the upload function, memory assertion, and file paths.
* @param {Object} options.proposal - Proposal options.
* @param {CdnParameters} options.proposal.cdn - CDN and governance configuration.
* @param {boolean} options.proposal.autoCommit - If `true`, the proposal is automatically committed after submission.
* @param {string} options.proposal.version - The Satellite version to include in the proposal.
*
* @returns {Promise<DeployResultWithProposal>} A result object describing the outcome:
* - `{ result: 'skipped' }` – No files were found to upload.
* - `{ result: 'submitted', files, proposalId }` – Upload and proposal submission succeeded.
* - `{ result: 'deployed', files, proposalId }` – Upload succeeded and proposal was auto-committed.
*/
export declare const publishSatelliteWasmWithProposal: ({ publish: { assertMemory, filePath, fullPath, ...restDeploy }, proposal: { version, ...restProposal } }: {
publish: PublishSatelliteWasmParams;
proposal: Pick<ProposeChangesParams, "cdn" | "autoCommit"> & {
version: string;
};
}) => Promise<DeployResultWithProposal>;