
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Meta Bolt by Hyper Brew is an underlying framework for many of Hyper Brew's popular frameworks like Bolt Figma Bolt CEP, Bolt Express.
Coming soon:
Meta Bolt provides these frameworks with 2 things:
create-script projects (e.g. yarn create bolt-cep)This package is mainly build for Hyper Brew's project, but it is open-source so feel free to use if you find it useful.
Firstly, you will need to construct a template that works for your desired project, ideally built on Vite.js, whether it's for a plugin template, addon framework, script setup, or something else.
Once you have your template working, add necessary files for various options (e.g. framework (svelte, react, vue))
Very connected to step 1, you will need to construct a custom Vite plugin for your project type (e.g. vite-cep-plugin, vite-figma-plugin, etc).
Utilize functions in meta-bolt's plugin-utils package to help with the plugin's functionality.
import {
packageSync,
emptyFolder,
copyFilesRecursively,
zipPackage,
} from "meta-bolt/dist/plugin-utils";
Once your template and plugin are functioning well, now you'll need to construct a create script so a user can easily generate their own project from the specific Bolt project (e.g. yarn create bolt-project).
To do this, follow the template below to list all possible options for the user to choose from.
Only truly required options are:
#!/usr/bin/env node
import { main } from "meta-bolt";
import type { BoltInitData, ArgOpt } from "meta-bolt";
export const frameworkOptions: ArgOpt[] = [
{
value: "svelte",
label: "Svelte",
files: ["src/index-svelte.ts", "src/main.svelte", "package.svelte.jsonc"],
},
{
value: "react",
label: "React",
files: ["src/index-react.tsx", "src/main.tsx", "package.react.jsonc"],
},
{
value: "vue",
label: "Vue",
files: ["src/index-vue.ts", "src/main.vue", "package.vue.jsonc"],
},
];
export const otherOptions: ArgOpt[] = [
{
value: "a",
label: "A",
files: ["src/a.ts"],
},
{
value: "b",
label: "B",
files: ["src/b.ts"],
},
];
const initData: BoltInitData = {
intro: {
name: "create-bolt-project",
prettyName: "Bolt Project",
},
base: {
module: "bolt-project",
globalIncludes: [
"*",
"src/**/*",
"public/**/*",
"public-zip/**/*",
".github/**/*",
".gitignore",
".env.example",
],
globalExcludes: [".env", "yarn-error.log", "package.json"],
fileRenames: [
["package.svelte.jsonc", "package.json"],
["package.react.jsonc", "package.json"],
["package.vue.jsonc", "package.json"],
],
},
argsTemplate: [
{
name: "folder",
type: "folder",
message: "Where do you want to create your project?",
initialValue: "./",
required: true,
validator: (input: string) => {
if (input.length < 3) return `Value is required!`;
},
describe: "Name of the folder for the new Bolt Project plugin",
},
{
name: "displayName",
type: "string",
message: "Choose a unique Display Name for your plugin:",
initialValue: "Bolt Project",
required: true,
validator: (input: string) => {
if (input.length < 1) return `Value is required!`;
},
describe: "Panel's display name (e.g. Bolt Project)",
alias: "n",
},
{
name: "framework",
type: "select",
message: "Select framework:",
alias: "f",
describe: "Select a Framework for your plugin:",
options: frameworkOptions,
required: true,
},
{
name: "other",
type: "select",
message: "Select other:",
alias: "o",
describe: "Select a Other for your plugin:",
options: otherOptions,
required: true,
},
{
name: "installDeps",
type: "boolean",
message: "Install dependencies?",
initialValue: true,
required: true,
alias: "d",
describe: "Install dependencies (default: false)",
},
{
name: "sampleCode",
type: "boolean",
message: "Keep Sample Code Snippets?",
initialValue: true,
required: true,
alias: "s",
describe: "Keep Sample Code (default: true)",
},
],
};
//* if not using as a module, run immediately
if (!process.env.BOLT_MODULEONLY) main(initData);
Once you've built out your template with all the options for your project, now you will need to update your template to be dynamic with this create script.
You can accomplish this by:
Multi-Line options
// BOLT_VARIABLE_START
someCode();
// BOLT_VARIABLE_END
Single Line options
someCode(); // BOLT_VARIABLE_ONLY
Replace comments will grab the last string and replace it's contents with the parameter result
"name": "bolt-project", // BOLT_ID_REPLACE
const manifest: PluginManifest = {
name: "Bolt Project", // BOLT_DISPLAYNAME_REPLACE
id: "co.bolt.project", // BOLT_ID_REPLACE
[...]
};
{
value: "react",
label: "React",
files: ["src/index-react.tsx", "src/main.tsx", "package.react.jsonc"],
},
{
value: "vue",
label: "Vue",
files: ["src/index-vue.ts", "src/main.vue", "package.vue.jsonc"],
},
fileRenames: [
["package.svelte.jsonc", "package.json"],
["package.react.jsonc", "package.json"],
["package.vue.jsonc", "package.json"],
],
FAQs
## 1. The Template
We found that meta-bolt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.