- most of the files are autogenerated by
openapitools/openapi-generator-cli- please consult
./rebuild.shscript to understand how the automated code generation works - autogenerated files contain the following text:
This class is auto generated by OpenAPI Generator - What is autogenerated?
- All the api end-point calls implementations (
./src/apis) - input (request) and output (response) classes (
./src/models) - common middleware (
./src/runtime.ts)
- All the api end-point calls implementations (
- please consult
- small portion of the files in the repo has been hand written by human (without assistance of AI or ML)
- Top level files like package.json
- all the readme and examples files
- middleware for oauth2 and user-agent configuration
- and
./src/client.tsthat is meant to represent an entry point class for end-users (the API imports, property declarations, and constructor assignments are regenerated byscripts/generate_client.pyviarebuild.sh; the rest is hand-written)
Build typescript in src/ directory to javascript in dist/ directory.
tscalternatively you can use npm command to the same
npm run buildReformat codebase to fit nicely with the rest
npm run format:fixAsk linter to fix any issues it can fix
npm run lint:fixEnsure linter output is empty (this checks for issues that cannot be fixed automatically)
npm run lintThe SDK codebase uses fetch API to interface with CrowdStrike Falcon platform. The fetch API while available in browsers
is usually not available in node environment. We recommend to install any fetch API alternative. For instance
npm install cross-fetchIn your codebase you then need to pass fetch API implementation down to the Falcon client. Example:
import fetch from "cross-fetch";
import { FalconClient } from "./src";
const client = new FalconClient({
fetchApi: fetch,
...
})After placing this into ./example.ts you can execute it under node with
tsc && node ./build/example.js- read & run
./rebuild.shscript
- create a release branch from
main(e.g.prepare-1.2.3) - bump version in
rebuild.shandsrc/middleware/useragent.ts - bump version in
package.jsonandpackage-lock.jsonwithnpm version {major | minor | patch} --no-git-tag-version - run the pre-PR checklist (
format:fix,lint:fix,lint,build) - commit, push branch, and open a PR targeting
main - after merge, create a GitHub release on
main