
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
test-infer-args
Advanced tools
A TypeScript library for inferring arguments from code snippets in various languages for Windmill workflows.
npm install windmill-infer-args
import { inferArgs } from 'windmill-infer-args'
// Example schema
const schema = {
properties: {},
required: []
}
async function main() {
// Infer arguments from Python code
const pythonCode = `
def main(name: str, age: int = 30):
print(f"Hello, {name}! You are {age} years old.")
`
const result = await inferArgs('python3', pythonCode, schema)
console.log(schema)
// Output will contain properties for 'name' and 'age' with proper types
// 'name' will be in the required array since it has no default value
}
main()
This package supports inferring arguments from code in the following languages:
python3)deno, nativets, bun, bunnative)postgresql, mysql, bigquery, snowflake, mssql, oracledb)graphql)go)bash)powershell)php)rust)ansible)csharp)nu)java)Infers arguments from code and populates a schema object with the inferred types.
async function inferArgs(
language: SupportedLanguage | 'bunnative' | undefined,
code: string,
schema: Schema,
mainOverride?: string
): Promise<{
no_main_func: boolean | null
has_preprocessor: boolean | null
} | null>
Parameters:
language: The programming language of the codecode: The source code to infer arguments fromschema: A JSON schema object to populate with inferred typesmainOverride: (Optional) Override for the main function nameReturns:
null if the language is not supportedISC
FAQs
Windmill argument inference utilities
We found that test-infer-args 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.