![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
H.A.L. (Hypertext Application Language) TypeScript declarations and functions.
npm i -P @jalik/hal
yarn add @jalik/hal
import { createHalResource } from '@jalik/hal'
const user = {
username: 'admin'
}
const roles = [
{ name: 'administrator' }
]
// we can add links to roles (optional)
const rolesResources = roles.map((role) => createHalResource(role, undefined, {
self: { href: `http://localhost/roles/${role.name}` }
}))
const embedded = {
roles: rolesResources
}
const links = {
self: { href: 'http://localhost/users/admin' }
}
const resource = createHalResource(user, embedded, links)
import { createHalPagedResource } from '@jalik/hal'
const users = [
{ username: 'admin' },
{ username: 'john' }
]
// we can add links to users (optional)
const usersResources = users.map((user) => createHalResource(user, undefined, {
self: { href: `http://localhost/users/${user.username}` }
}))
const embedded = {
users: usersResources
}
const page = {
number: 3,
size: 2,
totalElements: 10,
totalPages: 5
}
const links = {
first: 'http://localhost/users?p=1',
prev: 'http://localhost/users?p=2',
self: 'http://localhost/users?p=3',
next: 'http://localhost/users?p=4',
last: 'http://localhost/users?p=5',
}
const resource = createHalPagedResource(embedded, page, links)
import { getHalEmbedded } from '@jalik/hal'
const doc = {
username: 'admin',
_embedded: {
roles: [
{ name: 'administrator' },
{ name: 'member' }
]
}
}
const embedded = getHalEmbedded(doc)
// embedded = { roles[] }
import { getHalLinks } from '@jalik/hal'
const doc = {
username: 'admin',
_links: {
self: { href: 'http://localhost/users/admin' }
}
}
const links = getHalLinks(doc)
// links = { self }
import { getHalPage } from '@jalik/hal'
const doc = {
_embedded: { users: [] },
page: {
number: 1,
size: 0,
totalElements: 0,
totalPages: 1
}
}
const page = getHalPage(doc)
// page = { number, size, totalElements, totalPages }
History of releases is in the changelog on GitHub.
The code is released under the MIT License.
v1.0.1 (2025-01-09)
FAQs
Hypertext Application Language toolbox
We found that @jalik/hal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.