
Research
/Security News
PolinRider Spreads Through Compromised GitHub Accounts and Packagist
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.
@kubb/kit
Advanced tools
Authoring toolkit for Kubb plugins, generators, adapters, resolvers, and renderers.
@kubb/kit gathers the helpers you call when you author a plugin, generator, adapter, resolver, or renderer: definePlugin, defineGenerator, defineResolver, defineParser, createAdapter, createRenderer, the ast namespace and factory node builders, and the option and hook types that go with them. It sits next to the kubb package, which is where end users configure and run builds. kubb/kit re-exports this package, so most consumers reach it through kubb/kit rather than installing @kubb/kit directly.
Install kubb and import from the kubb/kit subpath, rather than depending on @kubb/kit directly.
bun add kubb
# or
pnpm add kubb
# or
npm install kubb
import { ast, definePlugin, defineGenerator } from 'kubb/kit'
export const pluginExample = definePlugin(() => {
return {
name: 'example',
generators: [
defineGenerator({
schema({ schema }) {
return ast.factory.createSchema(schema)
},
}),
],
}
})
definePlugin, defineGenerator, defineResolver, and defineParser wrap a plugin, a generator, a resolver, or a parser into the shape the build engine expects. createAdapter, createRenderer, and createStorage are the matching factories for a custom spec adapter, output renderer, or storage backend.
ast and factory are the node builders a generator calls to construct the file, schema, and operation nodes it returns. Diagnostics is the structured error a plugin throws to report a problem with a location and a fix suggestion, and memoryStorage and fsStorage are the built-in storage backends, useful in tests and custom configs.
macroDiscriminatorEnum, macroEnumName, macroRenameSchema, and macroSimplifyUnion are the built-in macro presets, ready to pass to ast.applyMacros or a plugin's setMacros. Build a custom macro with ast.defineMacro instead.
childName, enumPropName, extractRefName, isStringType, mergeAdjacentObjectsLazy, syncSchemaRef, and containsCircularRef are schema-name and schema-graph helpers a generator or macro calls while shaping output, complementing the ref and graph helpers (resolveRefName, findCircularSchemas, collectUsedSchemaNames) that stay on ast.
Rounding out the package are the option and hook types every plugin, generator, adapter, resolver, and renderer author references, among them PluginFactoryOptions, GeneratorContext, ResolveFileOptions, AdapterFactoryOptions, RendererFactory, and KubbHooks.
kubb/kit/testing holds the Vitest-backed test helpers (createMockedPlugin, createMockedAdapter, renderGeneratorOperation, matchFiles) used to unit test a plugin or generator without running a full build. It is a separate entry point so the main kubb/kit import never pulls in Vitest.
import { createMockedPlugin, renderGeneratorSchema } from 'kubb/kit/testing'
@kubb/core@kubb/core also runs the build engine: the plugin driver, the file manager, and the CLI reporters. None of that is part of authoring a plugin. @kubb/kit keeps the two apart, the same way the surrounding kubb/ast and kubb/jsx subpaths separate the AST layer and the JSX renderer from the engine that drives them.
Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:
FAQs
Authoring toolkit for Kubb plugins, generators, adapters, resolvers, and renderers.
The npm package @kubb/kit receives a total of 8,974 weekly downloads. As such, @kubb/kit popularity was classified as popular.
We found that @kubb/kit 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.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.