scaffolder-backend: deprecate publish:file action

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-08-10 14:18:15 +02:00
parent 268219ad87
commit c971afbf21
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
The `publish:file` action has been deprecated in favor of testing templates using the template editor instead. Note that this action is not and was never been installed by default.
+1 -1
View File
@@ -303,7 +303,7 @@ export function createPublishBitbucketServerAction(options: {
token?: string | undefined;
}>;
// @public
// @public @deprecated
export function createPublishFileAction(): TemplateAction<{
path: string;
}>;
@@ -29,6 +29,7 @@ import { createTemplateAction } from '../../createTemplateAction';
* production, as it writes the files to the local filesystem of the scaffolder.
*
* @public
* @deprecated This action will be removed, prefer testing templates using the template editor instead.
*/
export function createPublishFileAction() {
return createTemplateAction<{ path: string }>({
@@ -47,6 +48,10 @@ export function createPublishFileAction() {
},
},
async handler(ctx) {
ctx.logger.warn(
'[DEPRECATED] This action will be removed, prefer testing templates using the template editor instead.',
);
const { path } = ctx.input;
const exists = await fs.pathExists(path);