UNPKG

balena-cli

Version:

The official balena Command Line Interface

54 lines (50 loc) 2.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const lazy_1 = require("../../utils/lazy"); class BlockCreateCmd extends core_1.Command { async run() { const { args: params, flags: options } = await this.parse(BlockCreateCmd); await (await Promise.resolve().then(() => require('../../utils/application-create'))).applicationCreateBase('block', options, params); } } BlockCreateCmd.description = (0, lazy_1.stripIndent) ` Create an block. Create a new balena block. You can specify the organization the block should belong to using the \`--organization\` option. The organization's handle, not its name, should be provided. Organization handles can be listed with the \`balena organization list\` command. The block's default device type is specified with the \`--type\` option. The \`balena device-type list\` command can be used to list the available device types. Interactive dropdowns will be shown for selection if no device type or organization is specified and there are multiple options to choose from. If there is a single option to choose from, it will be chosen automatically. This interactive behavior can be disabled by explicitly specifying a device type and organization. `; BlockCreateCmd.examples = [ '$ balena block create MyBlock', '$ balena block create MyBlock --organization mmyorg', '$ balena block create MyBlock -o myorg --type raspberry-pi', ]; BlockCreateCmd.args = { name: core_1.Args.string({ description: 'block name', required: true, }), }; BlockCreateCmd.flags = { organization: core_1.Flags.string({ char: 'o', description: 'handle of the organization the block should belong to', }), type: core_1.Flags.string({ char: 't', description: 'block device type (Check available types with `balena device-type list`)', }), }; BlockCreateCmd.authenticated = true; exports.default = BlockCreateCmd; //# sourceMappingURL=create.js.map