chore: deprecating the fetch:cookiecutter being installed by default
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -53,17 +53,26 @@ export type ActionContext<Input extends JsonObject> = {
|
||||
// @public @deprecated
|
||||
export type CompletedTaskState = TaskCompletionState;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "createBuiltinActions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const createBuiltinActions: (options: {
|
||||
reader: UrlReader;
|
||||
integrations: ScmIntegrations;
|
||||
catalogClient: CatalogApi;
|
||||
containerRunner?: ContainerRunner;
|
||||
config: Config;
|
||||
// @public
|
||||
export const createBuiltinActions: (
|
||||
options: CreateBuiltInActionsOptions,
|
||||
) => TemplateAction<JsonObject>[];
|
||||
|
||||
// @public
|
||||
export interface CreateBuiltInActionsOptions {
|
||||
// (undocumented)
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
}) => TemplateAction<JsonObject>[];
|
||||
// (undocumented)
|
||||
catalogClient: CatalogApi;
|
||||
// (undocumented)
|
||||
config: Config;
|
||||
// @deprecated (undocumented)
|
||||
containerRunner?: ContainerRunner;
|
||||
// (undocumented)
|
||||
integrations: ScmIntegrations;
|
||||
// (undocumented)
|
||||
reader: UrlReader;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "createCatalogRegisterAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
|
||||
@@ -49,15 +49,32 @@ import {
|
||||
} from './github';
|
||||
import { TemplateFilter } from '../../../lib';
|
||||
import { TemplateAction } from '../types';
|
||||
import { getRootLogger } from '@backstage/backend-common';
|
||||
|
||||
export const createBuiltinActions = (options: {
|
||||
/**
|
||||
* The options passed to {@link createBuiltinActions}
|
||||
* @public
|
||||
*/
|
||||
export interface CreateBuiltInActionsOptions {
|
||||
reader: UrlReader;
|
||||
integrations: ScmIntegrations;
|
||||
catalogClient: CatalogApi;
|
||||
/** @deprecated when the cookiecutter action is removed this won't be necessary */
|
||||
containerRunner?: ContainerRunner;
|
||||
config: Config;
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
}): TemplateAction<JsonObject>[] => {
|
||||
}
|
||||
|
||||
/**
|
||||
* A function to generate create a list of default actions that the scaffolder provides.
|
||||
* Is called internally in the default setup, but can be used when adding your own actions or overriding the default ones
|
||||
*
|
||||
* @public
|
||||
* @returns A list of actions that can be used in the scaffolder
|
||||
*/
|
||||
export const createBuiltinActions = (
|
||||
options: CreateBuiltInActionsOptions,
|
||||
): TemplateAction<JsonObject>[] => {
|
||||
const {
|
||||
reader,
|
||||
integrations,
|
||||
@@ -119,6 +136,11 @@ export const createBuiltinActions = (options: {
|
||||
];
|
||||
|
||||
if (containerRunner) {
|
||||
getRootLogger().warn(
|
||||
`[DEPRECATED] The fetch:cookiecutter action will be removed part of the default scaffolder actions in later versions.
|
||||
You can install the package seperately and remove the containerRunner from the createBuiltInActions to remove this warning,
|
||||
or you can migrate to using fetch:template https://backstage.io/docs/features/software-templates/builtin-actions#migrating-from-fetchcookiecutter-to-fetchtemplate`,
|
||||
);
|
||||
actions.push(
|
||||
createFetchCookiecutterAction({
|
||||
reader,
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
*/
|
||||
|
||||
export * from './catalog';
|
||||
export { createBuiltinActions } from './createBuiltinActions';
|
||||
export * from './createBuiltinActions';
|
||||
export * from './debug';
|
||||
export * from './fetch';
|
||||
export * from './filesystem';
|
||||
export * from './publish';
|
||||
export * from './github';
|
||||
|
||||
/** @deprecated please add this package to your own installation manually */
|
||||
export { createFetchCookiecutterAction } from '@backstage/plugin-scaffolder-backend-module-cookiecutter';
|
||||
|
||||
export { runCommand } from './helpers';
|
||||
|
||||
Reference in New Issue
Block a user