Skip to content

@salesforce/b2c-tooling-sdk / operations/mrt

operations/mrt

Managed Runtime (MRT) operations.

This module provides functions for managing bundles and deployments on Salesforce Managed Runtime.

Bundle Operations

Usage

typescript
import { pushBundle } from '@salesforce/b2c-tooling-sdk/operations/mrt';
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

// Push and deploy a bundle
const result = await pushBundle({
  projectSlug: 'my-storefront',
  ssrOnly: ['ssr.js'],
  ssrShared: ['**/*.js', 'static/**/*'],
  buildDirectory: './build',
  message: 'Release v1.0.0',
  target: 'staging'
}, auth);

console.log(`Bundle ${result.bundleId} deployed to ${result.target}`);

Authentication

MRT operations use API key authentication. Get your API key from the Runtime Admin dashboard.

Interfaces

Type Aliases

Variables

Functions

All rights reserved.