
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@atlaskit/adf-schema-generator
Advanced tools
This package provides a simple DSL (Domain Specific Language) for defining the schema, that can be transformed into multiple output formats that are required to work with ADF (Atlassian Document Format):
The package exports several functions that can be used to define the schema:
Nodes and Marks:
adfNode
– defines a new ADF nodeadfMark
– defines a new ADF markGroups:
adfNodeGroup
– defines a new ADF node groupadfMarkGroup
– defines a new ADF mark groupContent Expressions:
$or
- Create a content expression that allows any of the specified content items$onePlus
- Create a content expression that allows one or more of the specified content items$zeroPlus
- Create a content expression that allows zero or more of the specified content items$range
– Create a content expression that allows to limit number of childrenimport {
adfNode,
adfMark,
adfNodeGroup,
$or,
$onePlus,
$zeroPlus,
} from '@atlaskit/adf-schema-generator';
const blockGroup = adfNodeGroup('block');
const codeMark = adfMark('code').define();
const text = adfNode('text').define({
marks: [codeMark],
});
const paragraph = adfNode('paragraph')
.define({
group: blockGroup,
content: [$zeroPlus($or(text))],
})
.variant('with-attrs', {
attrs: {
alignment: {
type: 'enum',
values: ['start', 'end', 'center', 'justify'],
default: 'start',
},
},
});
const doc = adfNode('doc').define({
root: true,
content: [$onePlus($or(blockGroup))],
});
The schema can be traversed to generate the output formats:
import { traverse } from '@atlaskit/adf-schema-generator';
traverse(doc, {
node: (node, variant, children) => {
return node.type;
},
group: (group, children) => {
return group.name;
},
content: (content, children) => {
return `(${children.join(' | ')})+`;
},
});
[] TODO
[] TODO
[] TODO
FAQs
Generates ADF and PM schemas
The npm package @atlaskit/adf-schema-generator receives a total of 324 weekly downloads. As such, @atlaskit/adf-schema-generator popularity was classified as not popular.
We found that @atlaskit/adf-schema-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.