Skip to content
Merged
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
8 changes: 8 additions & 0 deletions packages/cli-plugin-extensions/src/generateExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { Extension } from "~/extensions/Extension";
import { CliContext } from "@webiny/cli/types";
import { Ora } from "ora";
import { updateDependencies } from "./utils";
import { setWebinyPackageVersions } from "~/utils/setWebinyPackageVersions";

const EXTENSIONS_ROOT_FOLDER = "extensions";

Expand Down Expand Up @@ -115,6 +116,13 @@ export const generateExtension = async ({ input, ora, context }: GenerateExtensi
packageName
});

// Despite the fact that the above code ensures that correct Webiny package versions are
// used, note that it only handles the `input.dependencies` field. We still need to run
// this because the `package.json` file that the selected template creates might also have
// Webiny packages that need to be updated. For example, this is the case with the `pbElement`
// extension (see: `packages/cli-plugin-extensions/templates/pbElement/package.json`).
await setWebinyPackageVersions(extension, context.version);

await extension.link();

// Sleep for 1 second before proceeding with yarn installation.
Expand Down
5 changes: 4 additions & 1 deletion packages/cli-plugin-extensions/src/promptQuestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export const promptQuestions: QuestionCollection = [
choices: [
{ name: "Admin extension", value: "admin" },
{ name: "API extension", value: "api" },
{ name: "Page Builder element", value: "pbElement" },

// TODO: Bring back when we design the new PB Element React Configs API.
// { name: "Page Builder element", value: "pbElement" },

{ name: "Website extension", value: "website" }
]
},
Expand Down
Loading