Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jan 7, 2026

This adds a --manifest option to the Snaps CLI dev server (mm-snap watch), which can be used to specify a different manifest file to use for the Snap, e.g., a separate development manifest with initial connections or additional permissions used for testing purposes only.

In a follow up PR it will be possible to extend the main manifest file, so it's no longer needed to copy the entire manifest.

Breaking changes

  • snaps-utils' checkManifest function now takes the path to the manifest rather than the base directory containing a manifest. This is needed to allow specifying custom manifests.

}: CheckManifestOptions = {},
): Promise<CheckManifestResult> {
const manifestPath = pathUtils.join(basePath, NpmSnapFileNames.Manifest);
const basePath = dirname(manifestPath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to require that the manifest is in the root of the package still? If it isn't, the following lines break, when looking for the package.json etc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is.

task: async ({ config, spinner }) => {
await watch(config, { spinner });
task: async ({ config, options, spinner }) => {
const configWithManifest = options.manifestPath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be merged into the config further up the call stack?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, merging this before calling the watch handler is a lot simpler actually. Not sure why I didn't think of that in the first place 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants