diff --git a/package.json b/package.json index bbf82a5..6e9c643 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "postject": "./dist/cli.js" }, "main": "dist/api.js", + "types": "dist/api.d.ts", "scripts": { "build": "zx ./scripts/build.mjs", "clean": "rimraf ./build", diff --git a/src/api.d.ts b/src/api.d.ts new file mode 100644 index 0000000..3a75536 --- /dev/null +++ b/src/api.d.ts @@ -0,0 +1,16 @@ +export interface InjectOptions { + /** + * @default '__POSTJECT' + */ + machoSegmentName?: string; + /** + * @default false + */ + overwrite?: boolean; + /** + * @default "POSTJECT_SENTINEL_fce680ab2cc467b6e072b8b5df1996b2" + */ + sentinelFuse?: string; +} + +export function inject(filename: string, resourceName: string, resourceData: Buffer, options: InjectOptions): Promise;