Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
block-template-html
Advanced tools
See https://blockprotocol.org/docs/blocks/develop
TL;DR: Run npx create-block-app@latest [your-block-name] --template=html
Other templates are available. See npx create-block-app@latest --help
A key part of the Block Protocol is the use of types to describe the data your block will work with.
Your block should be associated with an “entity type” which will be used by embedding applications to understand what sorts of entities can be sent to it (e.g. what properties do they have?).
You can create an entity type on blockprotocol.org — see the docs for a full guide.
Once you have created the type representing the data your block needs, copy its URL for use in the next step.
Change into the folder: cd path/to/your-block-name
Update the contents of block-metadata.json
:
schema
to the URL of the entity type you created in the previous stepdisplayName
: a friendly display nameexamples
: an array of example data structures your block would accept and useimage
: a preview image showing your block in action (in place of public/block-preview.png
)icon
: an icon to be associated with your block (in place of public/omega.svg
)name
: a slugified name for your block (which may differ to the package name
in package.json)
slug
or @namespace/slug
where namespace
is your blockprotocol.org usernameWrite your block starting in app.html
. To test it during development:
edit dev/index.html
to give your block starting properties
run the dev server with yarn dev
(or npm run dev
)
When finished, run yarn build
(or npm run build
), which:
block-metadata.json
. This file is documented in full here.Please see the Block Protocol docs
for a fuller explanation of querying, creating and updating entity data from your block.
You can format your code using yarn format
(or npm run format
).
Head over to blockprotocol.org to read instructions on publishing your block.
This template assumes there is no bundling process. You will need to reference external dependencies using ES Modules. Tools like esm.sh or unpkg.com can make this much easier.
The component can be debugged locally by first starting yarn dev
.
Now (using VS Code), go to the Debug tab, select "Launch Chrome" and start the debugger (F5).
You should now be able to set breakpoints and step through the code.
FAQs
Block Protocol block template for an html-based block
The npm package block-template-html receives a total of 0 weekly downloads. As such, block-template-html popularity was classified as not popular.
We found that block-template-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.