🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@stately-cloud/schema

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stately-cloud/schema

Schema language for StatelyDB

0.13.0
npm
Version published
Weekly downloads
26
-31.58%
Maintainers
0
Weekly downloads
 
Created
Source

StatelyDB Schema Language

This is a TypeScript domain-specific language (DSL) for generating Stately Schemas. You use schemas to define the shape of your data model in StatelyDB, including validation, types, and other database configuration such as key paths and indexes. It is meant to be used with the stately CLI, e.g. stately schema put index.ts.

How it's used

  • Create a package.json and add a dependency on @stately-cloud/schema (e.g. npm init, npm i @stately-cloud/schema)
  • Create a tsconfig.json for your schema. This is necessary to get good autocomplete in VSCode.
  • Create your schema files, each of which is a TypeScript (.ts) file. These import from @stately-cloud/schema to get types and builder functions, and export their types.
  • Run stately schema validate index.ts to check your schema.
  • Run stately schema put --schema-id 12345 --message "an update message" index.ts to upload the schema to your store.
  • Run stately schema generate --language typescript index.ts --out <output-dir> to generate typed models for your schema.

FAQs

Package last updated on 13 Dec 2024

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