Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/commands/actors/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
actorId = actor.id;
} else {
const { templates } = await fetchManifest();
const actorTemplate = templates.find((t) => t.name === actorConfig!.template);
const actorTemplate = templates.find(
(t) => t.name === actorConfig!.template || t.aliases?.includes(actorConfig!.template as string),
);
const defaultRunOptions = (actorTemplate?.defaultRunOptions || DEFAULT_RUN_OPTIONS) as ActorDefaultRunOptions;
const newActor: ActorCollectionCreateOptions = {
name: actorConfig!.name as string,
Expand Down
4 changes: 3 additions & 1 deletion src/lib/create-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export async function getTemplateDefinition(
if (manifest instanceof Error) throw manifest;

if (maybeTemplateName) {
const templateDefinition = manifest.templates.find((t) => t.name === maybeTemplateName);
const templateDefinition = manifest.templates.find(
(t) => t.name === maybeTemplateName || t.aliases?.includes(maybeTemplateName),
);
if (!templateDefinition) {
throw new Error(`Could not find the selected template: ${maybeTemplateName} in the list of templates.`);
}
Expand Down
Loading