@wordpress/env
Version:
A zero-config, self contained local WordPress environment for development and testing.
29 lines (25 loc) • 663 B
JavaScript
;
/**
* Error thrown when a command is not supported by the current runtime.
*/
class UnsupportedCommandError extends Error {
constructor( command ) {
super(
`The '${ command }' command is not supported in the Playground runtime at the moment.`
);
this.name = 'UnsupportedCommandError';
}
}
/**
* Error thrown when the environment has not been initialized.
*/
class EnvironmentNotInitializedError extends Error {
constructor() {
super( 'Environment not initialized. Run `wp-env start` first.' );
this.name = 'EnvironmentNotInitializedError';
}
}
module.exports = {
UnsupportedCommandError,
EnvironmentNotInitializedError,
};