Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@ftrack/ts-schema-generator
Advanced tools
Gets the schema from a ftrack instance and generates typescript interfaces for all the entity types in the instance.
A TypeScript schema generator for the ftrack platform. This package generates TypeScript types based on your ftrack standard and custom entities, allowing for type-safe interactions with the ftrack API.
This script requires the following environment variables to be set:
FTRACK_SERVER
: The URL of your ftrack server instance.FTRACK_API_USER
: The API user for your ftrack server instance.FTRACK_API_KEY
: The API key for your ftrack server instance.Please ensure these environment variables are set before running the script.
After cloning or downloading the package, navigate to the package directory and run the following command:
yarn install
Then, to run the script using Yarn, use the yarn generate
command.
Install the package as a dependency in your project:
yarn add --dev @ftrack/ts-schema-generator
Add the following script to your project's package.json
file:
"scripts": {
"generate-ts-schema": "ftrack-ts-schema-generator"
}
Then, run the script using the following command:
yarn generate-ts-schema
To customize the output path and filename, pass them as arguments:
yarn generate ./path/to/output/directory customSchemaFilename.ts
or if using the script as a dependency in another project:
"scripts": {
"generate-ts-schema": "ftrack-ts-schema-generator ./path/to/output/directory customSchemaFilename.ts"
}
The generated TypeScript file will contain interfaces for each entity type from the ftrack schema. Each interface represents the properties of that entity type, with the property names and types based on the schema.
In addition to the interfaces, the output file will also include:
EntityTypeMap
: A map of entity types to their corresponding TypeScript interfaces.EntityType
: A type representing the valid entity type names.EntityData
: A generic type that takes an EntityType and returns the corresponding interface from EntityTypeMap.TypedContextSubtypeMap
: A map of TypedContext subtypes to their corresponding TypeScript interfaces.TypedContextSubtype
: A type representing the valid TypedContext subtypes.FAQs
Gets the schema from a ftrack instance and generates typescript interfaces for all the entity types in the instance.
The npm package @ftrack/ts-schema-generator receives a total of 287 weekly downloads. As such, @ftrack/ts-schema-generator popularity was classified as not popular.
We found that @ftrack/ts-schema-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.