Skip to content

Commit

Permalink
fix: hide Page Builder Element extension (#4379)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j authored Nov 22, 2024
1 parent 1fc4241 commit a2b5539
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit a2b5539

Please sign in to comment.