
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
vite-plugin-graphql-codegen
Advanced tools
Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher
Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher.
Installation instructions found here. Optional if already set up in project.
# npm
npm i -D vite-plugin-graphql-codegen
# yarn
yarn add -D vite-plugin-graphql-codegen
# pnpm
pnpm i -D vite-plugin-graphql-codegen
// vite.config.ts
import { defineConfig } from 'vite';
import codegen from 'vite-plugin-graphql-codegen';
export default defineConfig({
plugins: [
codegen(),
],
});
Providing options is not required as sensible defaults are in place, but there may be times where it's helpful to disable codegen under certain circumstances, like when running builds in CI.
codegen({
/**
* Run codegen on server start.
*
* @default true
*/
runOnStart: boolean,
/**
* Run codegen on build. Will prevent build if codegen fails.
*
* @default true
*/
runOnBuild: boolean,
/**
* Enable codegen integration with vite file watcher.
*
* @default true
*/
enableWatcher: boolean,
/**
* Automatically add schemas and documents referenced in the codegen config
* to the file watcher.
*
* @default true
*/
watchCodegenConfigFiles: boolean,
/**
* Throw an error if codegen fails on server start.
*
* @default false
*/
throwOnStart: boolean,
/**
* Throw an error if codegen fails on build.
*
* @default true
*/
throwOnBuild: boolean,
/**
* Run codegen when a document matches.
*
* @default true
*/
matchOnDocuments: boolean,
/**
* Run codegen when a schema matches.
*
* @default false
*/
matchOnSchemas: boolean,
/**
* Manually define the codegen config.
*/
config: CodegenConfig,
/**
* Override parts of the codegen config just for this plugin.
*/
configOverride: Partial<CodegenConfig>,
/**
* Override parts of the codegen config just for this plugin on server start.
*/
configOverrideOnStart: Partial<CodegenConfig>,
/**
* Override parts of the codegen config just for this plugin on build.
*/
configOverrideOnBuild: Partial<CodegenConfig>,
/**
* Override parts of the codegen config just for this plugin in the watcher.
*/
configOverrideWatcher: Partial<CodegenConfig>,
/**
* Override the codegen config file path.
*/
configFilePathOverride: string,
/**
* Log various steps to aid in tracking down bugs.
*
* @default false
*/
debug: boolean,
});
FAQs
Zero-config vite plugin that uses the vite file watcher to run graphql codegen programmatically without needing to start a separate watcher
We found that vite-plugin-graphql-codegen 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.
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.