Gathering detailed insights and metrics for sanity-codegen
Gathering detailed insights and metrics for sanity-codegen
Gathering detailed insights and metrics for sanity-codegen
Gathering detailed insights and metrics for sanity-codegen
npm install sanity-codegen
v1.0.0-alpha.45
Published on 10 May 2023
v1.0.0-alpha.44
Published on 10 May 2023
v1.0.0-alpha.43
Published on 10 Feb 2023
v1.0.0-alpha.42
Published on 27 Jan 2023
v1.0.0-alpha.41
Published on 23 Jan 2023
v1.0.0-alpha.40
Published on 21 Jan 2023
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
270 Stars
269 Commits
19 Forks
6 Watching
10 Branches
7 Contributors
Updated on 03 Jul 2024
Minified
Minified + Gzipped
TypeScript (97.09%)
JavaScript (1.77%)
Shell (0.52%)
HTML (0.52%)
CSS (0.11%)
Batchfile (0.01%)
Cumulative downloads
Total Downloads
Last day
-8.8%
2,069
Compared to previous day
Last week
6.7%
11,506
Compared to previous week
Last month
2.8%
44,594
Compared to previous month
Last year
0.2%
588,142
Compared to previous year
11
[!NOTE]
🎉
sanity-codegen
has been superseded by Sanity TypeGen 🎉Exciting news!
sanity-codegen
has been superseded by Sanity TypeGen!As the sole maintainer of
sanity-codegen
, I found myself unable to dedicate the time and attention it truly deserved. That's why I'm thrilled to announce the arrival of Sanity TypeGen! This project is a complete replacement forsanity-codegen
and is maintained in-house by the same team that maintains GROQ itselt—you couldn't be in better hands ❤️.To the
sanity-codegen
community — Thank you! 💖I am deeply grateful for your support, feedback, and contributions to this project and hope you'll continue to offer the same warmth and insightful feedback to the amazing team behind Sanity TypeGen.
🌟Here's to moving forward with Sanity TypeGen! 🌟
Generate TypeScript types from your Sanity schemas and queries
# NOTE: the alpha is required at this time
npm i --save-dev sanity-codegen@alpha
At the root of your sanity project, run:
npx sanity-codegen codegen
This command will locate your schema, generate TypeScript types, and write them to sanity-codegen.d.ts
.
You can also create a configuration file and see other options here.
The sanity-codegen.d.ts
file that was generated will add ambient types to your project. Access them via Sanity.{WorkspaceName}.Schema.{TypeName}
1interface Props { 2 book: Sanity.Default.Schema.Book; // no import needed. just use it 3} 4 5function yourFunction({ book }: Props) { 6 // 7}
See usage with the @sanity-codegen/client
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is archived
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
36 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More