From 3500c13a3383fd86db771351462f7234cf2eaa6f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 14 Jun 2022 10:59:23 +0200 Subject: [PATCH] scaffolder: add missing changesets for template editor Signed-off-by: Patrik Oldsberg --- .changeset/eleven-mice-collect.md | 5 +++++ .changeset/polite-eagles-invite.md | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 .changeset/eleven-mice-collect.md create mode 100644 .changeset/polite-eagles-invite.md diff --git a/.changeset/eleven-mice-collect.md b/.changeset/eleven-mice-collect.md new file mode 100644 index 0000000000..66c4591d8e --- /dev/null +++ b/.changeset/eleven-mice-collect.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Added a new `/v2/dry-run` endpoint that allows for a synchronous dry run of a provided template. A `supportsDryRun` option has been added to `createTemplateAction`, which signals whether the action should be executed during dry runs. When enabled, the action context will have the new `isDryRun` property set to signal if the action is being executed during a dry run. diff --git a/.changeset/polite-eagles-invite.md b/.changeset/polite-eagles-invite.md new file mode 100644 index 0000000000..f9c5073a83 --- /dev/null +++ b/.changeset/polite-eagles-invite.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-scaffolder': minor +--- + +A new template editor has been added which is accessible via the context menu on the top right hand corner of the Create page. It allows you to load a template from a local directory, edit it with a preview, execute it in dry-run mode, and view the results. Note that the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) must be supported by your browser for this to be available. + +To support the new template editor the `ScaffolderApi` now has an optional `dryRun` method, which is implemented by the default `ScaffolderClient`.