{"id":21385331,"url":"https://github.com/touchifyapp/node-sfxbundler","last_synced_at":"2025-03-16T11:44:35.782Z","repository":{"id":57357367,"uuid":"90808515","full_name":"touchifyapp/node-sfxbundler","owner":"touchifyapp","description":"Node module wrapper around the touchifyapp/sfx binaries.","archived":false,"fork":false,"pushed_at":"2017-05-25T17:52:14.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T10:39:19.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/touchifyapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-10T01:39:56.000Z","updated_at":"2024-06-25T15:48:58.000Z","dependencies_parsed_at":"2022-09-26T16:33:12.889Z","dependency_job_id":null,"html_url":"https://github.com/touchifyapp/node-sfxbundler","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchifyapp%2Fnode-sfxbundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchifyapp%2Fnode-sfxbundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchifyapp%2Fnode-sfxbundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touchifyapp%2Fnode-sfxbundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/touchifyapp","download_url":"https://codeload.github.com/touchifyapp/node-sfxbundler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864626,"owners_count":20360355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T11:46:51.699Z","updated_at":"2025-03-16T11:44:35.759Z","avatar_url":"https://github.com/touchifyapp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-sfxbundler\n\n`node-sfxbundler` is a Node module wrapper around the [touchifyapp/sfx](https://github.com/touchifyapp/sfx) binary.\n\n## Getting Started\n\n`node-sfxbundler` works as a wrapper around the `sfx` bundler.\nIt abstracts the commands' switches with JS object abstraction.\n\n### Installation\n\n`node-sfxbundler` can be installed using NPM:\n\n```shell\n$ npm install sfxbundler --save\n```\n\n### Usage\n\nFirst import `node-sfxbundler` in your project:\n\n```javascript\nvar sfxbundler = require(\"sfxbundler\");\n```\n\nThen use sfxbundler's commands:\n\n```javascript\nsfxbundler.bundle(\"path/to/my.exe\", \"path/to/dir\", { id: \"my.app.id\", version: \"1.2.3\", arch: \"i386\" });\n```\n\n`node-sfxbundler` uses native `Promise` to wrap asynchronous operations and resolves with the result of the command:\n\n```javascript\nsfxbundler.bundle(\"path/to/my.exe\", { certificate: \"path/to/my/cert.pfx\", password: \"*******\" });\n\t.then(result =\u003e {\n\t\tresult.code \t// The sfx bundler exit code.\n\t\tresult.stdout \t// The sfx bundler stdout content.\n\t\tresult.stderr\t// The sfx bundler stderr content.\n\t});\n```\n\n### Command-line\n\n`node-sfxbundler` can work as a simple wrapper around [touchifyapp/sfx](https://github.com/touchifyapp/sfx).\n\n```shell\n# Install module globally\n$ npm install sfxbundler -g\n\n# Run module from command line\n$ sfxbundler -exe path/to/sfx.exe -dir path/to/dir -id my.app.id\n```\n\n## Documentation\n\n### sfxbundler.bundle(dest: string, dir: string, [options: BundleOptions]): Promise\u003cRunResult\u003e\n\nBundle a new sfx Executable using sfx bootstrapper.\n\n```typescript\n/** Bundle Options */\nexport interface BundleOptions extends RunOptions {\n    /** A unique ID for the result SFX. (default: from dest name). */\n    id?: string;\n    /** The Bootstrapper architecture. */\n    arch?: \"i386\" | \"x64\";\n    /** The Bootstrapper Type (default: `sfx`). Set `sfxv` for verbose extraction. */\n    type?: \"sfx\" | \"sfxv\";\n    /** The program to run in the project directory (default: auto-detect). */\n    run?: string;\n    /** The absolute destination path to extract project in (default: `${os.tempdir()}/${id}`). */\n    dest?: string;\n    /** Arguments to pass to executable. */\n    args?: string[];\n    /** The program version to check for updates. */\n    version?: string;\n    /** The compression level. */\n    compress?: number;\n    \n    /** Print verbose success and status messages. This may also provide slightly more information on error. */\n    verbose?: boolean;\n}\n```\n\n### sfxbundler.run(args: string[], [runOptions: RunOptions]): Promise\u003cRunResult\u003e\n\nRun SFX bundler by using raw arguments.\n\n```typescript\n/** Run Options */\nexport interface RunOptions {\n    /** The current working directory to execute sfx bundler binary on. */\n    cwd?: string;\n    /** The inner spawn stdio option. */\n    stdio?: string;\n}\n```\n\n## Contribute\n\n### Install Project dependencies\n\n```shell\n$ npm install\n```\n\n### Build project\n\n```shell\n$ npm run build\n```\n\n## License\n\n[MIT](https://github.com/touchifyapp/node-sfxbundler/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchifyapp%2Fnode-sfxbundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftouchifyapp%2Fnode-sfxbundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouchifyapp%2Fnode-sfxbundler/lists"}