{"_id":"@electron/windows-sign","_rev":"3373158","name":"@electron/windows-sign","description":"Codesign Electron Windows apps","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"electron-cfa","email":""}],"time":{"modified":"2024-08-26T02:57:17.000Z","created":"2023-10-27T22:50:35.782Z","1.1.3":"2024-06-28T16:05:50.281Z","1.1.2":"2024-03-01T01:01:16.419Z","1.1.1":"2024-02-07T01:02:38.590Z","1.1.0":"2024-02-04T21:20:23.372Z","1.0.0":"2023-11-01T19:57:36.608Z","0.0.0":"2023-10-27T22:50:35.782Z"},"users":{},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"versions":{"1.1.3":{"name":"@electron/windows-sign","version":"1.1.3","description":"Codesign Electron Windows apps","main":"dist/cjs/index.js","module":"dist/esm/index.js","bin":{"electron-windows-sign":"bin/electron-windows-sign.js"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"homepage":"https://github.com/electron/windows-sign","dependencies":{"cross-dirname":"^0.1.0","debug":"^4.3.4","fs-extra":"^11.1.1","minimist":"^1.2.8","postject":"^1.0.0-alpha.6"},"devDependencies":{"@types/debug":"^4.1.10","@types/fs-extra":"^11.0.3","@types/node":"^18.18.7","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.52.0","eslint-config-eslint":"^9.0.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","globstar":"^1.0.0","standard":"^17.1.0","tsx":"^3.14.0","typedoc":"~0.25.13","typescript":"^5.2.2"},"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","docs":"npx typedoc","lint":"eslint --ext .ts,.js src bin test","test:loader":"globstar -- node --loader tsx --test \"test/**/*.spec.ts\"","test":"globstar -- node --import tsx --test \"test/**/*.spec.ts\"","prepublishOnly":"yarn build"},"engines":{"node":">=14.14"},"_id":"@electron/windows-sign@1.1.3","gitHead":"812e78123d2f0c07be7dee77ff063acd7af45645","types":"./dist/cjs/index.d.ts","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"shasum":"52023d17d8f6c686d934f518be76736f6f2f0aef","size":206264,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-1.1.3.tgz"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_1.1.3_1719590750071_0.45481215251970863"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-28T16:05:50.281Z","publish_time":1719590750281,"_source_registry_name":"default","maintainers":[{"name":"electron-cfa","email":""}],"_cnpm_publish_time":1719590750281},"1.1.2":{"name":"@electron/windows-sign","version":"1.1.2","description":"Codesign Electron Windows apps","main":"dist/cjs/index.js","module":"dist/esm/index.js","bin":{"electron-windows-sign":"bin/electron-windows-sign.js"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"homepage":"https://github.com/electron/windows-sign","dependencies":{"cross-dirname":"^0.1.0","debug":"^4.3.4","fs-extra":"^11.1.1","minimist":"^1.2.8","postject":"^1.0.0-alpha.6"},"devDependencies":{"@types/debug":"^4.1.10","@types/fs-extra":"^11.0.3","@types/node":"^18.18.7","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.52.0","eslint-config-eslint":"^9.0.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","globstar":"^1.0.0","standard":"^17.1.0","tsx":"^3.14.0","typescript":"^5.2.2"},"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","lint":"eslint --ext .ts,.js src bin test","test:loader":"globstar -- node --loader tsx --test \"test/**/*.spec.ts\"","test":"globstar -- node --import tsx --test \"test/**/*.spec.ts\"","prepublishOnly":"yarn build"},"engines":{"node":">=14.14"},"_id":"@electron/windows-sign@1.1.2","gitHead":"9fa70fa7d468500487d1d5d4bb9dbc82a12db80a","types":"./dist/cjs/index.d.ts","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"shasum":"5489861ca62348d2300407e85d949af95849955e","size":204885,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-1.1.2.tgz"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"directories":{},"maintainers":[{"name":"electron-cfa","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_1.1.2_1709254876266_0.3429379145717557"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-01T01:01:16.419Z","publish_time":1709254876419,"_source_registry_name":"default","_cnpm_publish_time":1709254876419},"1.1.1":{"name":"@electron/windows-sign","version":"1.1.1","description":"Codesign Electron Windows apps","main":"dist/cjs/index.js","module":"dist/esm/index.js","bin":{"electron-windows-sign":"bin/electron-windows-sign.js"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"homepage":"https://github.com/electron/windows-sign","dependencies":{"cross-dirname":"^0.1.0","debug":"^4.3.4","fs-extra":"^11.1.1","minimist":"^1.2.8","postject":"^1.0.0-alpha.6"},"devDependencies":{"@types/debug":"^4.1.10","@types/fs-extra":"^11.0.3","@types/node":"^18.18.7","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.52.0","eslint-config-eslint":"^9.0.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","globstar":"^1.0.0","standard":"^17.1.0","tsx":"^3.14.0","typescript":"^5.2.2"},"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","lint":"eslint --ext .ts,.js src bin test","test:loader":"globstar -- node --loader tsx --test \"test/**/*.spec.ts\"","test":"globstar -- node --import tsx --test \"test/**/*.spec.ts\"","prepublishOnly":"yarn build"},"engines":{"node":">=16.0.0"},"_id":"@electron/windows-sign@1.1.1","gitHead":"2374696af992e6fd901e0f2918e2bb5e8979b425","types":"./dist/cjs/index.d.ts","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"shasum":"4ac6a2f782e70251cc1bd7349485a764ee07320f","size":204884,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-1.1.1.tgz"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"directories":{},"maintainers":[{"name":"electron-cfa","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_1.1.1_1707267758380_0.38105379782191906"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-07T01:02:38.590Z","publish_time":1707267758590,"_source_registry_name":"default","_cnpm_publish_time":1707267758590},"1.1.0":{"name":"@electron/windows-sign","version":"1.1.0","description":"Codesign Electron Windows apps","main":"dist/cjs/index.js","module":"dist/esm/index.js","bin":{"electron-windows-sign":"bin/electron-windows-sign.js"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"homepage":"https://github.com/electron/windows-sign","dependencies":{"cross-dirname":"^0.1.0","debug":"^4.3.4","fs-extra":"^11.1.1","minimist":"^1.2.8","postject":"^1.0.0-alpha.6"},"devDependencies":{"@types/debug":"^4.1.10","@types/fs-extra":"^11.0.3","@types/node":"^18.18.7","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.52.0","eslint-config-eslint":"^9.0.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","globstar":"^1.0.0","standard":"^17.1.0","tsx":"^3.14.0","typescript":"^5.2.2"},"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","lint":"eslint --ext .ts,.js src bin test","test:loader":"globstar -- node --loader tsx --test \"test/**/*.spec.ts\"","test":"globstar -- node --import tsx --test \"test/**/*.spec.ts\"","prepublishOnly":"yarn build"},"engines":{"node":">=16.0.0"},"_id":"@electron/windows-sign@1.1.0","gitHead":"8b23eaa900b4ca0905699b4fa17ca22246624fdf","types":"./dist/cjs/index.d.ts","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"shasum":"83a42d0372b8f8a83d8f63e5b10791012ffd6760","size":204897,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-1.1.0.tgz"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"directories":{},"maintainers":[{"name":"electron-cfa","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_1.1.0_1707081623196_0.21515546342149827"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-04T21:20:23.372Z","publish_time":1707081623372,"_source_registry_name":"default","_cnpm_publish_time":1707081623372},"1.0.0":{"name":"@electron/windows-sign","version":"1.0.0","description":"Codesign Electron Windows apps","main":"dist/cjs/index.js","module":"dist/esm/index.js","bin":{"electron-windows-sign":"bin/electron-windows-sign.js"},"repository":{"type":"git","url":"git+https://github.com/electron/windows-sign.git"},"author":{"name":"Felix Rieseberg","email":"felix@felixrieseberg.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"homepage":"https://github.com/electron/windows-sign","dependencies":{"debug":"^4.3.4","fs-extra":"^11.1.1","minimist":"^1.2.8"},"devDependencies":{"@continuous-auth/semantic-release-npm":"^3.0.0","@types/debug":"^4.1.10","@types/fs-extra":"^11.0.3","@types/node":"^18.18.7","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","eslint":"^8.52.0","eslint-config-eslint":"^9.0.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.29.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","globstar":"^1.0.0","standard":"^17.1.0","tsx":"^3.14.0","typescript":"^5.2.2"},"scripts":{"build":"tsc && tsc -p tsconfig.esm.json","lint":"eslint --ext .ts,.js src bin test","test:loader":"globstar -- node --loader tsx --test \"test/**/*.spec.ts\"","test":"globstar -- node --import tsx --test \"test/**/*.spec.ts\"","prepublishOnly":"yarn build"},"engines":{"node":">=16.0.0"},"types":"./dist/cjs/index.d.ts","gitHead":"b6a107cd3058a1d0ad1474cc981f4f956c6b681c","_id":"@electron/windows-sign@1.0.0","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"shasum":"f08a0a5d4b96840ab637ce11228a59ee8b665287","size":201555,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-1.0.0.tgz"},"_npmUser":{"name":"electron-cfa","email":"info+cfa-npm@electronjs.org"},"directories":{},"maintainers":[{"name":"electron-cfa","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_1.0.0_1698868656306_0.5320363841985154"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-01T19:57:36.608Z","publish_time":1698868656608,"_source_registry_name":"default","_cnpm_publish_time":1698868656608},"0.0.0":{"name":"@electron/windows-sign","version":"0.0.0","_id":"@electron/windows-sign@0.0.0","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"shasum":"1f8d80f4244a9274555f2059c9dff5bfac05e9f0","size":156,"noattachment":false,"key":"/@electron/windows-sign/-/@electron/windows-sign-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron/windows-sign/download/@electron/windows-sign-0.0.0.tgz"},"_npmUser":{"name":"electronhq","email":"marshallofsound+electronhqnpm@electronjs.org"},"directories":{},"maintainers":[{"name":"electron-cfa","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/windows-sign_0.0.0_1698447035597_0.4462034410393827"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-27T22:50:35.782Z","publish_time":1698447035782,"_source_registry_name":"default","_cnpm_publish_time":1698447035782}},"readme":"# @electron/windows-sign [![npm][npm_img]][npm_url]\n\nCodesign your app for Windows. Made for [Electron][electron] but really supports any folder with binary files. `electron-windows-sign` scans a folder for [signable files](#file-types) and codesigns them with both SHA-1 and SHA-256. It can be highly customized and used either programmatically or on the command line. \n\n# Requirements\n\nBy default, this module spawns `signtool.exe` and needs to run on Windows. If you're building an Electron app and care enough to codesign them, I would heavily recommend that you build and test your apps on the platforms you're building for.\n\n# Usage\n\nMost developers of Electron apps will likely not use this module directly - and instead use it indirectly\ninstead. If you are one of those developers who is using a module like `@electron/forge` or `@electron/packager`, you can configure this module with global environment variables. If that describes\nyou, you can skip ahead to your use case:\n\n - [With a certificate file and password](#with-a-certificate-file-and-password)\n - [With a custom binary or custom parameters](#with-a-custom-signtoolexe-or-custom-parameters)\n - [With a completely custom hook](#with-a-custom-hook-function)\n\n## Direct Usage\n\n`@electron/windows-codesign` is built to both esm and cjs and can be used both as a module as well as directly from the command line.\n\n```ts\nimport { sign } from \"@electron/windows-sign\"\n// or const { sign } = require(\"@electron/windows-sign\")\n\nawait sign(signOptions)\n```\n\n```ps1\nelectron-windows-sign $PATH_TO_APP_DIRECTORY [options ...]\n```\n\n## With a certificate file and password\n\nThis is the \"traditional\" way to codesign Electron apps on Windows. You pass in a certificate file\n(like a .pfx) and a password, which will then be passed to a built-in version of `signtool.exe` taken\ndirectly from the Windows SDK. \n\n```ts\nawait sign({\n  appDirectory: \"C:\\\\Path\\\\To\\\\App\",\n  // or process.env.WINDOWS_CERTIFICATE_FILE\n  certificateFile: \"C:\\\\Cert.pfx\",\n  // or process.env.WINDOWS_CERTIFICATE_PASSWORD \n  certificatePassword: \"hunter99\"\n})\n```\n\n```ps1\nelectron-windows-sign $PATH_TO_APP_DIRECTORY --certificate-file=$PATH_TO_CERT --certificate-password=$CERT-PASSWORD\n```\n\n### Full configuration\n```ts\n// Path to a timestamp server. Defaults to http://timestamp.digicert.com\n// Can also be passed as process.env.WINDOWS_TIMESTAMP_SERVER\ntimestampServer = \"http://timestamp.digicert.com\"\n// Description of the signed content. Will be passed to signtool.exe as /d\n// Can also be passed as process.env.WINDOWS_SIGN_DESCRIPTION\ndescription = \"My content\"\n// URL of the signed content. Will be passed to signtool.exe as /du\n// Can also be passed as process.env.WINDOWS_SIGN_WEBSITE\nwebsite = \"https://mywebsite.com\"\n// If enabled, attempt to sign .js JavaScript files. Disabled by default\nsignJavaScript = true\n```\n\n## With a custom signtool.exe or custom parameters\n\nSometimes, you need to specify specific signing parameters or use a different version\nof `signtool.exe`. In this mode, `@electron/windows-sign` will call the provided binary\nwith the provided parameters for each file to sign. \n\nIf you only provide `signToolPath`, the default parameters will be used.\nIf you only provide `signWithParams`, the default `signtool.exe` will be used. \n\nAll the [additional configuration](#additional-configuration) mentioned above is also\navailable here, but only used if you do not provide your own parameters.\n\n```ts\nawait sign({\n  appDirectory: \"C:\\\\Path\\\\To\\\\App\",\n  // or process.env.WINDOWS_CERTIFICATE_FILE\n  certificateFile: \"C:\\\\Cert.pfx\", \n  // or process.env.WINDOWS_CERTIFICATE_PASSWORD\n  certificatePassword: \"hunter99\",\n  // or process.env.WINDOWS_SIGNTOOL_PATH\n  signToolPath: \"C:\\\\Path\\\\To\\\\my-custom-tool.exe\",\n  // or process.env.WINDOWS_SIGN_WITH_PARAMS\n  signWithParams: \"--my=custom --parameters\"\n})\n```\n\n```ps1\nelectron-windows-sign $PATH_TO_APP_DIRECTORY --sign-tool-path=$PATH_TO_TOOL --sign-with-params=\"--my=custom --parameters\"\n```\n\n## With a custom hook function\n\nSometimes, you just want all modules depending on `@electron/windows-sign` to call\nyour completely custom logic. You can either specify a `hookFunction` (if you're calling\nthis module yourself) or a `hookModulePath`, which this module will attempt to require.\n\nUsing the `hookModulePath` has the benefit that you can override how any other users\nof this module (like `@electron/packager`) codesign your app.\n\n```ts\nawait sign({\n  // A function with the following signature:\n  // (fileToSign: string) => void | Promise<void>\n  //\n  // This function will be called sequentially for each file that \n  // @electron/windows-sign wants to sign.\n  hookFunction: myHookFunction\n  // Path to a hook module.\n  hookModulePath: \"C:\\\\Path\\\\To\\\\my-hook-module.js\",\n})\n```\n\nYour hook module should either directly export a function or\nexport a `default` function.\n```js\n// Good:\nmodule.exports = function (filePath) {\n  console.log(`Path to file to sign: ${filePath}`)\n}\n\n// Good:\nmodule.exports = async function (filePath) {\n  console.log(`Path to file to sign: ${filePath}`)\n}\n\n// Good:\nexport default async function (filePath) {\n  console.log(`Path to file to sign: ${filePath}`)\n}\n\n// Bad:\nmodule.exports = {\n  myCustomHookName: function (filePath) {\n    console.log(`Path to file to sign: ${filePath}`)\n  }\n}\n\n// Bad:\nexport async function myCustomHookName(filePath) {\n  console.log(`Path to file to sign: ${filePath}`)\n}\n```\n\n```\nSYNOPSIS\n  electron-windows-sign app [options ...]\n\nDESCRIPTION\n  app\n    Path to the application to sign.  It must be a directory.\n\n  certificate-file\n    Path to the certificate file (.pfx) to use for signing. Uses \n    environment variable WINDOWS_CERTIFICATE_FILE if not provided.\n\n  certificate-password\n    Password to use for the certificate. Uses environment variable\n    WINDOWS_CERTIFICATE_PASSWORD if not provided.\n\n  sign-tool-path\n    Path to the signtool.exe binary.  If not specified, the tool will attempt\n    use a built-in version.\n\n  timestamp-server\n    URL of the timestamp server to use.  If not specified, the tool will\n    attempt to use a built-in server (http://timestamp.digicert.com)\n\n  description\n    Description to use for the signed files. Passed as /d to signtool.exe.\n\n  website\n    URL of the website to use for the signed files. Passed as /du to\n    signtool.exe.\n\n  sign-with-params\n    Additional parameters to pass to signtool.exe.  This can be used to\n    specify additional certificates to use for cross-signing.\n\n  automatically-select-certificate\n    Automatically select the best certificate to use for signing. On by default.\n\n  help\n    Print this usage information.\n\n  debug\n    Print additional debug information.\n```\n\n# File Types\nThis tool will aggressively attempt to sign all files that _can_\nbe signed, excluding scripts.\n\n- [Portable executable files][pe] (.exe, .dll, .sys, .efi, .scr, .node)\n- Microsoft installers (.msi)\n- APPX/MSIX packages (.appx, .appxbundle, .msix, .msixbundle)\n- Catalog files (.cat)\n- Cabinet files (.cab)\n- Silverlight applications (.xap)\n- Scripts (.vbs, .wsf, .ps1)\n\nIf you do want to sign JavaScript, please enable it with the `signJavaScript`\nparameter. As far as we are aware, there are no benefits to signing\nJavaScript files, so we do not by default.\n\n# License\nBSD 2-Clause \"Simplified\". Please see LICENSE for details.\n\n[electron]: https://github.com/electron/electron\n[npm_img]: https://img.shields.io/npm/v/@electron/windows-sign.svg\n[npm_url]: https://npmjs.org/package/@electron/windows-sign\n[pe]: https://en.wikipedia.org/wiki/Portable_Executable\n","_attachments":{},"homepage":"https://github.com/electron/windows-sign","bugs":{"url":"https://github.com/electron/windows-sign/issues"},"license":"BSD-2-Clause"}