@forge/cli
13.3.0-next.12-experimental-4b981ef-experimental-5b8eb3c13.3.0-next.25
out/command-line/register-manifest-commands.js+
out/command-line/register-manifest-commands.jsNew file+27
Index: package/out/command-line/register-manifest-commands.js
===================================================================
--- package/out/command-line/register-manifest-commands.js
+++ package/out/command-line/register-manifest-commands.js
@@ -0,0 +1,27 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.registerCommands = void 0;
+const tslib_1 = require("tslib");
+const yaml_1 = tslib_1.__importDefault(require("yaml"));
+const cli_shared_1 = require("@forge/cli-shared");
+const MANIFEST_COMMAND_NAME = 'manifest';
+const RENDER_COMMAND_NAME = 'render';
+const registerRenderCommand = (parent, { ui, commands: { manifestRenderCommand } }) => {
+ parent
+ .command(RENDER_COMMAND_NAME)
+ .description(cli_shared_1.Text.manifest.render.description)
+ .requireAppId()
+ .environmentOption()
+ .option('-p, --placement <placement>', cli_shared_1.Text.manifest.render.optionPlacement)
+ .jsonOption()
+ .action(async ({ environment, placement, json }) => {
+ const manifest = await manifestRenderCommand.execute({ environment, placement });
+ ui.info(json ? JSON.stringify(manifest, null, 2) : yaml_1.default.stringify(manifest, { indent: 2 }));
+ });
+};
+const registerCommands = (deps) => {
+ const manifestCommand = deps.cmd.command(MANIFEST_COMMAND_NAME).description(cli_shared_1.Text.manifest.cmd.description);
+ registerRenderCommand(manifestCommand, deps);
+};
+exports.registerCommands = registerCommands;
+//# sourceMappingURL=register-manifest-commands.js.map
\ No newline at end of file