Socket
Book a DemoInstallSign in
Socket

@sapphire-cms/codegen

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire-cms/codegen

Sapphire CMS module that renders content as importable code.

0.2.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

npm

Codegen Module

The Codegen module enables Sapphire CMS to transform content into code that can be directly integrated into your application.

Install

sapphire-cms package install codegen

or

scms pkg i codegen

Provided Layers

  • render

Render Layer

The render layer includes the following renderers:

  • typescript - Transforms content into TypeScript code.
  • yaml - Renders documents as YAML files.

Typescript renderer

Transforms content into Typescript code.

Example:

# pipelines/clients-to-ts.yaml

name: clients-to-ts
source: clients
target: '@node'
render: '@codegen/typescript'

In the example above, the pipeline transforms documents of type clients into TypeScript code and stores the result on the local filesystem using the Node runtime.

YAML renderer

Transforms content into YAML files.

Example:

# pipelines/clients-to-yaml.yaml

name: clients-to-yaml
source: clients
target: '@node'
render: '@codegen/yaml'

In the example above, the pipeline transforms documents of type clients into YAML files and stores them on the local filesystem using the Node runtime.

FAQs

Package last updated on 12 Aug 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.