{"id":40951579,"url":"https://github.com/jet2jet/resedit-js-cli","last_synced_at":"2026-04-09T13:11:07.814Z","repository":{"id":42571839,"uuid":"239089633","full_name":"jet2jet/resedit-js-cli","owner":"jet2jet","description":"Node.js command line tool for editing Windows Resource data","archived":false,"fork":false,"pushed_at":"2026-01-16T08:26:22.000Z","size":1508,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-16T22:54:22.597Z","etag":null,"topics":["cli","nodejs","pe-executable","resource","sign-executables","signtool","windows","winres"],"latest_commit_sha":null,"homepage":"","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/jet2jet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-08T07:53:28.000Z","updated_at":"2026-01-16T08:26:19.000Z","dependencies_parsed_at":"2024-03-02T11:36:11.321Z","dependency_job_id":"5b636db6-d8b8-4548-b61e-e630d8fb49ac","html_url":"https://github.com/jet2jet/resedit-js-cli","commit_stats":{"total_commits":95,"total_committers":2,"mean_commits":47.5,"dds":"0.12631578947368416","last_synced_commit":"106286ed3da53d97b22c47b2ba8734a3798e9066"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/jet2jet/resedit-js-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fresedit-js-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fresedit-js-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fresedit-js-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fresedit-js-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jet2jet","download_url":"https://codeload.github.com/jet2jet/resedit-js-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jet2jet%2Fresedit-js-cli/sbom","scorecard":{"id":516911,"data":{"date":"2025-08-11","repo":{"name":"github.com/jet2jet/resedit-js-cli","commit":"dfe091e88abf2fdb462a9725ff875850b5186e7f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Maintained","score":10,"reason":"12 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jet2jet/resedit-js-cli/main-ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jet2jet/resedit-js-cli/main-ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main-ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jet2jet/resedit-js-cli/main-ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jet2jet/resedit-js-cli/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jet2jet/resedit-js-cli/publish.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main-ci.yml:22","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:27","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish.yml:15","Warn: no topLevel permission defined: .github/workflows/main-ci.yml:1","Warn: no topLevel permission defined: .github/workflows/nodevars.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T02:04:26.326Z","repository_id":42571839,"created_at":"2025-08-20T02:04:26.326Z","updated_at":"2025-08-20T02:04:26.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cli","nodejs","pe-executable","resource","sign-executables","signtool","windows","winres"],"created_at":"2026-01-22T05:13:32.155Z","updated_at":"2026-01-22T05:13:32.844Z","avatar_url":"https://github.com/jet2jet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/resedit-cli.svg)](https://www.npmjs.com/package/resedit-cli)\n[![Build Status](https://github.com/jet2jet/resedit-js-cli/actions/workflows/main-ci.yml/badge.svg)](https://github.com/jet2jet/resedit-js-cli)\n\n# resedit-js-cli\n\nresedit-js-cli is a command line (CLI) tool for manipulating resources in Windows Executable files, as well as signing executables. This tool runs on Node.js environment.\n\nStarting from v0.3.0, resedit-js-cli also supports creating empty (data-only) executable binaries.\n\n## Table of contents\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Main options](#main-options)\n  - [Icon resource options](#icon-resource-options)\n  - [Version resource options](#version-resource-options)\n  - [Raw resource options](#raw-resource-options)\n  - [Delete options](#delete-options)\n  - [Signing options](#signing-options)\n  - [Other options](#other-options)\n- [Examples](#examples)\n- [The definition object](#the-definition-object)\n- [APIs](#apis)\n- [Notes](#notes)\n- [License](#license)\n\n## Install\n\n```\nnpm install resedit-cli\n```\n\n## Usage\n\n```\nUsage:\nresedit [[--in] \u003cin\u003e | --new] [--out] \u003cout\u003e [\u003coptions...\u003e]\n\nPositionals:\n  in, i   Input executable file name.\n          Cannot specify --new if an input file is specified.           [string]\n  out, o  Output executable file name                                   [string]\n\nOptions:\n  -h, -?, --help             Show help                                 [boolean]\n      --allow-shrink         Allow shrinking resource section size (if the data\n                             size is less than original)               [boolean]\n      --as-32bit             Creates the executable binary as a 32-bit version\n                             (default: as 64-bit).\n                             Requires --new option.                    [boolean]\n      --as-exe-file          Creates the executable binary as an EXE file\n                             (default: as a DLL).\n                             Requires --new option.                    [boolean]\n      --certificate, --cert  Certificate file for signing.\n                             (DER format file (.cer) or PEM format file (.pem)\n                             is supported)\n                             Requires --sign option.                    [string]\n      --company-name         Company name for version resource          [string]\n      --debug                Output more logs than verbose mode while\n                             processing.                               [boolean]\n      --delete               One or more resources to delete from executable.\n                             The value must be one of following format:\n                             * \u003ctype\u003e,\u003cID\u003e\n                             * \u003ctype\u003e                                    [array]\n      --delete-xxxxx         One or more resources to delete from executable\n                             (xxxxx is one of the predefined type names\n                             described below).\n                             The value must be \u003cID\u003e or no value.         [array]\n      --definition           Resource definition file which contains resource\n                             data to write (see document for details)   [string]\n      --digest               Digest algorithm for signing. (default: 'sha256')\n                             Requires --sign option.\n              [string] [choices: \"sha1\", \"sha256\", \"sha512\", \"sha224\", \"sha384\",\n     \"sha512-224\", \"sha512-256\", \"sha3-224\", \"sha3-256\", \"sha3-384\", \"sha3-512\",\n                                                         \"shake128\", \"shake256\"]\n      --fail-if-no-delete    If specified and the resource to be deleted does\n                             not exist, the operation will fail.\n                             If no delete options are specified, this flag is\n                             ignored.                                  [boolean]\n      --file-description     File description for version resource      [string]\n      --file-version         File version for version resource.\n                             Must be 'n.n.n.n' format (n is an integer) [string]\n      --icon                 One or more icon files to add to executable.\n                             Icon ID can be specified with following format:\n                             \u003cID\u003e,\u003cfile-name\u003e                            [array]\n      --ignore-signed        Force read input file even if it is a signed\n                             executable                                [boolean]\n      --internal-name        Internal name for version resource         [string]\n      --lang                 Resource language id (default: 1033)       [number]\n  -n, --new                  Create an empty (data-only) executable binary.\n                             Cannot specify an input file if this option is\n                             used.                                     [boolean]\n  -N, --no-grow              Disallow growing resource section size (throw\n                             errors if data exceeds)                   [boolean]\n      --original-filename    Original file name for version resource    [string]\n      --p12, --pfx           PKCS 12 file (.p12 or .pfx file), which contains\n                             private key and certificates, for signing.\n                             Requires --sign option.                    [string]\n      --password             Password/passphrase for private key. If an empty\n                             string password is required, specify '' (sh) or \"\"\n                             (cmd.exe).\n                             Requires --sign option.                    [string]\n      --private-key, --key   Private key file for signing. (only PEM format file\n                             (.pem) is supported)\n                             Requires --sign option.                    [string]\n      --product-name         Product name for version resource          [string]\n      --product-version      Product version for version resource.\n                             Must be 'n.n.n.n' format (n is an integer) [string]\n      --raw                  One or more resources to add to executable.\n                             The value must be one of following format:\n                             * \u003ctype\u003e,\u003cID\u003e,\u003cstring-value\u003e\n                             * \u003ctype\u003e,\u003cID\u003e,@\u003cfile-name\u003e\n                             (\u003cstring-value\u003e will be stored as UTF-8 string)\n                                                                         [array]\n      --raw2                 One or more resources to add to executable.\n                             The value must be one of following format:\n                             * \u003ctype-name\u003e,\u003cID\u003e,\u003cstring-value\u003e\n                             * \u003ctype-name\u003e,\u003cID\u003e,@\u003cfile-name\u003e\n                             (\u003cstring-value\u003e will be stored as UTF-8 string)\n                             Type names must be the predefined names described\n                             below.                                      [array]\n      --select               Certificate selection mode whether to pick\n                             certificates from the specified file (default:\n                             leaf)\n                             * leaf    : only pick 'leaf' certificate\n                             * no-root : pick certificates except for root\n                             certificate (i.e. issuer is equal to subject)\n                             * all     : no filter certificates (includes all\n                             certificates)\n                                    [string] [choices: \"leaf\", \"no-root\", \"all\"]\n  -s, --sign                 Sign output executables                   [boolean]\n      --timestamp            Timestamp server to set timestamp for signed data.\n                             Requires --sign option.                    [string]\n  -v, --verbose              Output logs while processing.             [boolean]\n  -V, --version              Show version number of this tool          [boolean]\n\nThe predefined type names are: accelerator, anicursor, aniCursor, aniicon,\naniIcon, bitmap, cursor, dialog, dlginclude, dlgInclude, font, fontdir, fontDir,\ngroupcursor, groupCursor, groupicon, groupIcon, html, icon, manifest, menu,\nmessagetable, messageTable, plugplay, plugPlay, rcdata, rcData, string, version,\nvxd\nIn addition, 'allicon'/'allIcon' and 'allcursor'/'allCursor' can also be used\nfor --delete-xxxxx (e.g. --delete-allicon).\n```\n\n### Main options\n\n#### `[--in] \u003cin\u003e`\n\n- `string`\n- Required if `--new` is not specified\n- Cannot use with `--new`\n- Alias: `-i`\n\nSpecifies input executable file name. You can omit `--in`; the first parameter without option will be treated as 'input'.\n\n#### `[--out] \u003cout\u003e`\n\n- `string`\n- Required\n- Alias: `-o`\n\nSpecifies output executable file name. You can omit `--out`; the second parameter without option or, if `--in` or `--new` is used, the first parameter without option will be treated as 'output'.\n\n\u003e Note: This tool does not check whether the output file exists, so the output may be overwritten without any prompts.\n\n#### `--new`\n\n- Flag (boolean)\n- Required if an input file (or `--in`) is not specified\n- Cannot use with an input file\n- Alias: `-n`\n\nGenerates an empty (data-only) executable binary. The generated binary will not contain `.code` section, so the binary cannot execute or load as a regular DLL. For example the binary can be used as a data file by calling `LoadLibraryEx` with `LOAD_LIBRARY_AS_DATAFILE`.\n\n#### `--as-32bit`\n\n- Flag (boolean)\n- Ignored if `--new` is not specified\n- Default: false\n\nWhen generating an empty binary, the binary will be as an 32-bit executable. If this option is not specified, the 64-bit executable will be generated.\n\n#### `--as-exe`\n\n- Flag (boolean)\n- Ignored if `--new` is not specified\n- Default: false\n\nWhen generating an empty binary, the binary will be as an EXE binary. If this option is not specified, the DLL binary will be generated.\n\nNote that this option does not affect the output file name (specified in `--out`)\n\n#### `--allow-shrink`\n\n- Flag (boolean)\n- Default: false\n\nIf set, when replacing resource data into the executable, the resource section size will be the minimum (may be less than the original size).\n\nOn default (if not set or set `false`), the resource section size is kept for the original size, even if actual resource data size is less than or equal to the original.\n\n#### `--no-grow`\n\n- Flag (boolean)\n- Default: false\n- Alias: `-N`\n\nIf set, when replacing resource data size is larger than the original one in the executable, an error will be thrown.\n\nSome executable generation tools (such as `pkg`) rely on data locations, and if the locations changed, the executable will not run correctly. This option is usable for avoiding changing those locations unexpectedly.\n\n#### `--lang \u003clang-id\u003e`\n\n- `number` (integer)\n- Default: `1033`\n\nSpecifies the resource language ID (LANGID) for the language value of new resources. If the resources with the same type, resource ID, and the language ID already exist, they will be replaced. (Regardless of this value, _all_ version resources will be dropped when adding the new version resources.)\n\n#### `--definition \u003cdefinition-file\u003e`\n\n- `string`\n\nSpecifies the definition file containing resource information to be added ([see below](#the-definition-object)). If another options are also specified, the options will take precedence over definitions.\n\n#### `--ignore-signed`\n\n- Flag (`boolean`)\n\nBy default signed executable file is not allowed to be specified as an input. This option will ignore this behavior and force parsing signed executable binary.\n\nNote that the output binary will not be signed by default. You need to re-sign it with `--sign` option or other signing tools such as 'signtool'.\n\n### Icon resource options\n\nNote: The value from `--lang` will be used as the language for all icons. To specify different languages for each icons, please use the definition file.\n\n#### `--icon [\u003cid\u003e,]\u003cfile-name\u003e`\n\n- `string`\n\nAdds or replaces icons from specified icon file(s). `\u003cid\u003e` must be an integer or string for icon resource ID, and `\u003cfile-name\u003e` must be an icon file; these must be concatenated with `,` (colon) character, without any spaces. (e.g. `--icon 1,icon1.ico` and `--icon \"ICON,myapp.ico\"` are valid, whereas `--icon 2, icon2.ico` is not valid)  \nYou can skip specifying `\u003cid\u003e,` to set icon IDs automatically. (e.g. `--icon icon1.ico`) In this case the first available integer IDs will be used.\n\nThis option can be specified one or more. (e.g. `--icon 1,icon1.ico --icon ICON2,icon2.ico --icon icon3.ico`)\n\n### Version resource options\n\nNote:\n\n- If any of version resource options are specified, _all_ existing version resources in the base executable will be dropped.\n- To specify values not in below options, or to specify multi-language version data, please use the definition file.\n\n#### `--product-name \u003cproduct-name\u003e`\n\n- `string`\n\nSpecifies `ProductName` field.\n\n#### `--product-version \u003cproduct-version\u003e`\n\n- `string`\n- Must be `x.x.x.x` format (four unsigned integer values concatenated with `.` (dot) character)\n\nSpecifies `ProductVersion` field. This value will also be used as `dwProductVersionMS` and `dwProductVersionLS` in `VS_FIXEDFILEINFO` (For `a.b.c.d` value, `dwProductVersionMS = (a \u003c\u003c 16) | b` and `dwProductVersionLS = (c \u003c\u003c 16) | d` are performed).\n\n#### `--file-description \u003cfile-description\u003e`\n\n- `string`\n\nSpecifies `FileDescription` field.\n\n#### `--file-version \u003cfile-version\u003e`\n\n- `string`\n- Must be `x.x.x.x` format (four unsigned integer values concatenated with `.` (dot) character)\n\nSpecifies `FileVersion` field. This value will also be used as `dwFileVersionMS` and `dwFileVersionLS` in `VS_FIXEDFILEINFO` (For `a.b.c.d` value, `dwFileVersionMS = (a \u003c\u003c 16) | b` and `dwFileVersionLS = (c \u003c\u003c 16) | d` are performed).\n\n#### `--company-name \u003ccompany-name\u003e`\n\n- `string`\n\nSpecifies `CompanyName` field.\n\n#### `--original-filename \u003coriginal-filename\u003e`\n\n- `string`\n\nSpecifies `OriginalFilename` field.\n\n#### `--internal-name \u003cinternal-name\u003e`\n\n- `string`\n\nSpecifies `InternalName` field.\n\n### Raw resource options\n\nNote: The value from `--lang` will be used as the language for all resources. To specify different languages, please use the definition file.\n\n#### `--raw \u003cdata\u003e`\n\n- `string`\n\nSpecifies any resource data to contain. `\u003cdata\u003e` must be either `\u003ctype\u003e,\u003cID\u003e,\u003cstring-value\u003e` or `\u003ctype\u003e,\u003cID\u003e,@\u003cfile-name\u003e`, whose values are as followings:\n\n- `\u003ctype\u003e` : Resource type value which must be integer or string. This tool does not convert the type value to commonly-used type identifier (e.g. specify `24` value for `RT_MANIFEST`, not specify `\"RT_MANIFEST\"`). To use commonly name, use `--raw2` instead.\n- `\u003cID\u003e` : Resource ID value which must be integer or string.\n- `\u003cstring-value\u003e` : Actual resource data. The value will be stored as UTF-8 string data.\n- `@\u003cfile-name\u003e` : File name containing data for the resource. `@` character must be followed by the file name.\n\nThis option can be specified one or more.\n\n#### `--raw2 \u003cdata\u003e`\n\n- `string`\n\nSpecifies any resource data to contain. Similar to `--raw`, but `\u003ctype\u003e` will be `\u003ctypeName\u003e`, which must be the predefined type name, instead.\n\n`\u003cdata\u003e` must be either `\u003ctypeName\u003e,\u003cID\u003e,\u003cstring-value\u003e` or `\u003ctypeName\u003e,\u003cID\u003e,@\u003cfile-name\u003e`, whose values are as followings:\n\n- `\u003ctypeName\u003e` : Predefine resource type name. Valid names are: `accelerator`, `anicursor`, `aniCursor`, `aniicon`, `aniIcon`, `bitmap`, `cursor`, `dialog`, `dlginclude`, `dlgInclude`, `font`, `fontdir`, `fontDir`, `groupcursor`, `groupCursor`, `groupicon`, `groupIcon`, `html`, `icon`, `manifest`, `menu`, `messagetable`, `messageTable`, `plugplay`, `plugPlay`, `rcdata`, `rcData`, `string`, `version`, `vxd`\n- `\u003cID\u003e` : Resource ID value which must be integer or string.\n- `\u003cstring-value\u003e` : Actual resource data. The value will be stored as UTF-8 string data.\n- `@\u003cfile-name\u003e` : File name containing data for the resource. `@` character must be followed by the file name.\n\nThis option can be specified one or more.\n\n### Delete options\n\nIf following options are used, appropriate resources are deleted first, and adding/replacing operations will be performed.\n\n#### `--delete \u003cdata\u003e`\n\n- `string`\n\nSpecifies resource data to delete. `\u003cdata\u003e` must be `\u003ctype\u003e` or `\u003ctype\u003e,\u003cID\u003e`, whose values are as followings:\n\n- `\u003ctype\u003e` : Resource type value which must be integer or string. This tool does not convert the type value to commonly-used type identifier (e.g. specify `24` value for `RT_MANIFEST`, not specify `\"RT_MANIFEST\"`). To use commonly name, use `--delete-xxxxx` instead.\n- `\u003cID\u003e` : (optional) Resource ID value which must be integer or string. `,\u003cID\u003e` can be omitted; in this case, all resources with the type will be deleted.\n\nNote that `--lang` value is ignored for deletion.\n\n#### `--delete-xxxxx [\u003cID\u003e]`\n\n- `string`\n\nSpecifies resource data to delete by type. `xxxxx` is a placeholder (see below). `[\u003cID\u003e]` is a resource ID value, which must be integer or string, to delete. If omitted, all resources with the type will be deleted.\n\n`xxxxx` must be the predefined names as: `accelerator`, `anicursor`, `aniCursor`, `aniicon`, `aniIcon`, `bitmap`, `cursor`, `dialog`, `dlginclude`, `dlgInclude`, `font`, `fontdir`, `fontDir`, `groupcursor`, `groupCursor`, `groupicon`, `groupIcon`, `html`, `icon`, `manifest`, `menu`, `messagetable`, `messageTable`, `plugplay`, `plugPlay`, `rcdata`, `rcData`, `string`, `version`, `vxd` (these are equal to the name available in `--raw2`).\n\nAdditionally, `allicon`, `allIcon`, `allcursor`, `allCursor` can be used for `xxxxx`. `allicon` and `allIcon` deletes `icon`, `groupIcon`, and `aniIcon`, and `allcursor` and `allCursor` deletes `cursor`, `groupCursor`, and `aniCursor`.\n\nNote that `--lang` value is ignored for deletion.\n\n#### `--fail-if-no-delete`\n\n- Flag (`boolean`)\n\nIf specified, and the resource data to be deleted does not exist, the tool will fail.\n\n### Signing options\n\n#### `--sign`\n\n- Flag (boolean)\n- Alias: `-s`\n\nTo specify this option, the output executable will be signed with appropriate data.\n\nNote: If `--sign` is not specified, all signing options will be ignored and the output executable will not be signed.\n\n#### `--p12 \u003cfile\u003e`\n\n- `string`\n- Required if `--certificate` and `--private-key` are not specified\n- Cannot be specified if `--certificate` and `--private-key` are specified\n- Alias: `--pfx`\n\nSpecifies pkcs12 data file ('.p12' or '.pfx' file) containing certificate(s) and a private key. If either of them is missing in pkcs12 data, an error will be thrown.\n\nNote: If the private key requires a password (including an 'empty' password), `--password` option is necessary.\n\n#### `--certificate \u003cfile\u003e`\n\n- `string`\n- Required if `--p12` is not specified\n- Cannot be specified if `--p12` is specified\n- Alias: `--cert`\n\nSpecifies a certificate file. PEM format ('.pem') and DER format (simple certificate data '.cer', or pkcs7 data containing one or more certificates '.p7b') are supported.\n\n#### `--private-key \u003cfile\u003e`\n\n- `string`\n- Required if `--p12` is not specified\n- Cannot be specified if `--p12` is specified\n- Alias: `--key`\n\nSpecifies a private-key file. Only PEM format ('.pem') is supported.\n\nNote: If the private key requires a password (including an 'empty' password), `--password` option is necessary.\n\n#### `--select \u003cmode\u003e`\n\n- Choices: `leaf`, `no-root`, `all`\n- Default: `leaf`\n\nSpecifies a mode for selecting certificates collected from `--p12` or `--certificates`, to be included in the signed executable. The choices has following meanings:\n\n- `leaf` : only includes the 'leaf' certificate on the certificate chain.\n- `no-root` : includes the certificates, excluding the root certificate. If specified certificates has no root certificate, `no-root` has the same meaning for `all`.\n- `all` : includes all certificates. This is not recommended because the root certificate should be used from the system certificate store on verifying.\n\nNote: this tool does not look into the system certificate store to select certificates.\n\n#### `--password \u003cpass\u003e`\n\n- `string`\n- Default: not using password\n\nSpecifies a password (passphrase) for the private key. To specify an empty password required for the key, please use `--password ''` (sh) or `--password \"\"` (cmd.exe).\n\nNote: It is not supported to input a password from stdin (i.e. prompting for a password).\n\n#### `--digest \u003calgorithm\u003e`\n\n- Choices: `sha1`, `sha256`, `sha512`, `sha224`, `sha384`, `sha512-224`, `sha512-256`, `sha3-224`, `sha3-256`, `sha3-384`, `sha3-512`, `shake128`, `shake256`\n- Default: `sha256`\n\nSpecifies an algorithm for generating digest. Some algorithms are available only if Node.js supports.\n\n\u003e Windows might not support some algorithms such as `sha512-224` and `sha3-512`.\n\n#### `--timestamp \u003cserver-url\u003e`\n\n- `string`\n\nSpecifies a URL of the Time Stamping Authority (TSA), to add a time-stamp information for signed binary. The server must accept and response Time-Stamp Protocol (TSP) based on RFC 3161.\n\nresedit-cli uses Node.js native `fetch`, or `http` or `https` module will be used for connection. For proxy, if `fetch` is available, resedit-cli uses `HTTP_PROXY` or `HTTPS_PROXY` environment variables (via `EnvHttpProxyAgent` in undici).\n\n\u003e Starting from v3.0.0, `request` and `node-fetch` are no longer used.\n\nIf this parameter is omitted, a time-stamp will not be added.\n\n### Other options\n\n#### `--help`\n\n- Flag (boolean)\n- Alias: `-h`, `-?`\n\nOutputs the usage for this tool.\n\n#### `--version`\n\n- Flag (boolean)\n- Alias: `-V`\n\nOutputs the version of this tool and [resedit](https://www.npmjs.com/package/resedit) library.\n\n#### `--verbose`\n\n- Flag (boolean)\n- Alias: `-v`\n\nSpecifies to output logs for processing. If `--debug` is also specified, `--verbose` will be ignored and more logs will be printed.\n\n#### `--debug`\n\n- Flag (boolean)\n\nSpecifies to output more logs for processing than `--verbose`. Note that even if `--debug` is enabled, the password string will not be printed.\n\n## Examples\n\nSetting icon (ID = 1) to the data in specified file and string data on version resource data:\n\n```\nresedit base/a.exe out/a.exe --icon 1,res/myapp.ico --file-version 1.0.0.1 --file-description \"My application\"\n```\n\nAdding or replacing '.manifest' file:\n\n```\nresedit base/a.exe out/a.exe --raw 24,1,@res/myapp.manifest\n```\n\nCreating a resource-only DLL file from `myDefinition.yml` file (see below for 'the definition object'):\n\n```\nresedit --new out/x.dll --definition myDefinition.yml\n```\n\nSigning an executable:\n\n```\nresedit base/a.exe out/a.exe --sign --p12 signData/my.pfx --password \"\"\n```\n\n## The definition object\n\nThis tool supports 'the definition object' that defines resources and/or signing informations. This is useful for specifying complicated options.\n\nFrom command line, you can specify a file containing the definition with using `--definition` parameter.\nThe file format must be either JSON, YAML, or JS file that exports a definition object (using [cosmiconfig](https://www.npmjs.com/package/cosmiconfig)). The object type is defined as a TypeScript interface type `DefinitionData` (defined in [definitions/DefinitionData.ts](./src/main/definitions/DefinitionData.ts)).\n\nNote: The command-line options take precedence of values in the definition object if the same data is specified.\n\n### Examples\n\nAs YAML file:\n\n```yaml\nlang: 1041\nversion:\n  # If fileVersion is defined, fileVersionMS and fileVersionLS can be omitted, and\n  # filled by parsed values from fileVersion.\n  # (With following value, fileVersionMS will be '0x20003' and fileVersionLS will be '0x40005')\n  fileVersion: 2.3.4.5\n  fileDescription: description description description\n  productVersion: 2.3.0.0\n```\n\nAs JS file (.mjs):\n\n```mjs\nimport * as path from 'path';\n\n// a user-defined function to retrieve data asynchronously\nimport { promptPfxFile, promptPassword } from './func';\n\n// Asynchronously returns a definition object\nasync function loadDefintion() {\n  return {\n    lang: 1041,\n    icons: [\n      {\n        id: 101,\n        sourceFile: path.resolve(__dirname, 'myapp.ico'),\n      },\n    ].\n    version: {\n      fileVersion: '2.3.4.5',\n      fileDescription: 'description description description',\n      productVersion: '2.3.0.0',\n    },\n    raw: [\n      {\n        type: 24,\n        id: 1,\n        file: path.resolve(__dirname, 'myapp.manifest'),\n      },\n    ],\n    sign: {\n      p12File: await promptPfxFile(),\n      password: await promptPassword(),\n    },\n  };\n}\n\n// Since cosmiconfig supports, you can export 'Promise' object.\nexport default loadDefintion();\n```\n\n\u003e .cjs is still supported.\n\n## APIs\n\nThis tool is created for the command line tool, but you can also use this as a Node.js library.\n\n```js\nimport resedit from 'resedit-cli';\n\nawait resedit({\n  in: '/path/to/input/MyApp.exe',\n  out: '/path/to/output/MyApp.exe',\n  // definition object\n  definition: {\n    lang: 1033,\n    version: {\n      productName: 'MyApp',\n      productVersion: '0.0.0.0',\n    },\n  },\n  // This value is used instead of the value from 'definition'\n  'product-version': '1.0.0.1',\n});\n```\n\n## Notes\n\n- If none of resource options are specified, the entire resource data in the input executable will be untouched. You can (re-)sign executables without modifying resources.\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjet2jet%2Fresedit-js-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjet2jet%2Fresedit-js-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjet2jet%2Fresedit-js-cli/lists"}