homey
Version:
Command-line interface and type declarations for Homey Apps
18 lines (16 loc) • 473 B
JavaScript
import open from 'open';
import Log from '../../../lib/Log.js';
import App from '../../../lib/App.js';
export const desc = 'View your app in the Homey App Store';
export const handler = async (yargs) => {
try {
const manifest = App.getManifest({ appPath: yargs.path });
const url = `https://homey.app/a/${manifest.id}`;
Log.success(`Opening URL: ${url}`);
open(url);
process.exit(0);
} catch (err) {
Log.error(err);
process.exit(1);
}
};