Skip to content

Commit a2b5539

Browse files
authored
fix: hide Page Builder Element extension (#4379)
1 parent 1fc4241 commit a2b5539

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/cli-plugin-extensions/src/generateExtension.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { Extension } from "~/extensions/Extension";
1919
import { CliContext } from "@webiny/cli/types";
2020
import { Ora } from "ora";
2121
import { updateDependencies } from "./utils";
22+
import { setWebinyPackageVersions } from "~/utils/setWebinyPackageVersions";
2223

2324
const EXTENSIONS_ROOT_FOLDER = "extensions";
2425

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

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

120128
// Sleep for 1 second before proceeding with yarn installation.

packages/cli-plugin-extensions/src/promptQuestions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export const promptQuestions: QuestionCollection = [
2323
choices: [
2424
{ name: "Admin extension", value: "admin" },
2525
{ name: "API extension", value: "api" },
26-
{ name: "Page Builder element", value: "pbElement" },
26+
27+
// TODO: Bring back when we design the new PB Element React Configs API.
28+
// { name: "Page Builder element", value: "pbElement" },
29+
2730
{ name: "Website extension", value: "website" }
2831
]
2932
},

0 commit comments

Comments
 (0)