Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions - Hide Page Builder Element Extension #4379

Merged
merged 7 commits into from
Nov 22, 2024
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