electron-winstaller
Advanced tools
Comparing version 5.3.1 to 5.4.0
import { SquirrelWindowsOptions } from './options'; | ||
export { SquirrelWindowsOptions } from './options'; | ||
export { SquirrelWindowsOptions as Options } from './options'; | ||
/** | ||
* A utility function to convert SemVer version strings into NuGet-compatible | ||
* version strings. | ||
* @param version A SemVer version string | ||
* @returns A NuGet-compatible version string | ||
* @see {@link https://semver.org/ | Semantic Versioning specification} | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort | NuGet versioning specification} | ||
*/ | ||
export declare function convertVersion(version: string): string; | ||
/** | ||
* This package's main function, which creates a Squirrel.Windows executable | ||
* installer and optionally code-signs the output. | ||
* | ||
* @param options Options for installer generation and signing | ||
* @see {@link https://github.com/Squirrel/Squirrel.Windows | Squirrel.Windows} | ||
*/ | ||
export declare function createWindowsInstaller(options: SquirrelWindowsOptions): Promise<void>; |
@@ -76,2 +76,10 @@ "use strict"; | ||
var log = require('debug')('electron-windows-installer:main'); | ||
/** | ||
* A utility function to convert SemVer version strings into NuGet-compatible | ||
* version strings. | ||
* @param version A SemVer version string | ||
* @returns A NuGet-compatible version string | ||
* @see {@link https://semver.org/ | Semantic Versioning specification} | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort | NuGet versioning specification} | ||
*/ | ||
function convertVersion(version) { | ||
@@ -96,2 +104,9 @@ var parts = version.split('+')[0].split('-'); | ||
} | ||
/** | ||
* This package's main function, which creates a Squirrel.Windows executable | ||
* installer and optionally code-signs the output. | ||
* | ||
* @param options Options for installer generation and signing | ||
* @see {@link https://github.com/Squirrel/Squirrel.Windows | Squirrel.Windows} | ||
*/ | ||
function createWindowsInstaller(options) { | ||
@@ -123,3 +138,3 @@ return __awaiter(this, void 0, void 0, function () { | ||
outputDirectory = path.resolve(outputDirectory || 'installer'); | ||
vendorPath = path.join(__dirname, '..', 'vendor'); | ||
vendorPath = options.vendorDirectory || path.join(__dirname, '..', 'vendor'); | ||
vendorUpdate = path.join(vendorPath, 'Squirrel.exe'); | ||
@@ -126,0 +141,0 @@ appUpdate = path.join(appDirectory, 'Squirrel.exe'); |
@@ -8,5 +8,9 @@ import { SignToolOptions } from '@electron/windows-sign'; | ||
/** | ||
* The folder path of Squirrel windows | ||
*/ | ||
vendorDirectory?: string; | ||
/** | ||
* The folder path to create the .exe installer in. | ||
* | ||
* Defaults to the installer folder at the project root. | ||
* @defaultValue an `installer` folder at the project root. | ||
*/ | ||
@@ -17,3 +21,3 @@ outputDirectory?: string; | ||
* | ||
* Defaults to the bundled template.nuspectemplate. | ||
* @defaultValue the bundled {@link https://github.com/electron/windows-installer/blob/main/template.nuspectemplate | template.nuspectemplate}. | ||
*/ | ||
@@ -23,20 +27,28 @@ nuspecTemplate?: string; | ||
* The local path to a `.gif` file to display during install. | ||
* | ||
* @defaultValue the bundled {@link https://github.com/electron/windows-installer/blob/main/resources/install-spinner.gif | install-spinner.gif} | ||
*/ | ||
loadingGif?: string; | ||
/** | ||
* The authors value for the nuget package metadata. | ||
* The `authors` value for the NuGet package metadata. | ||
* | ||
* Defaults to the `author` field from your app's package.json file when unspecified. | ||
* @defaultValue the `author` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
authors?: string; | ||
/** | ||
* The owners value for the nuget package metadata. | ||
* The `owners` value for the NuGet package metadata. | ||
* | ||
* Defaults to the `authors` field when unspecified. | ||
* @defaultValue the `authors` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
owners?: string; | ||
/** | ||
* The copyright value for the nuget package metadata. | ||
* The `copyright` value for the NuGet package metadata. | ||
* | ||
* Defaults to a generated copyright with `authors` or `owners`. | ||
* @defaultValue a generated copyright with {@link SquirrelWindowsOptions.authors | authors} | ||
* or {@link SquirrelWindowsOptions.owners | owners}. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
@@ -47,21 +59,28 @@ copyright?: string; | ||
* | ||
* This uses the `name` field in your app's package.json file with an added `.exe` extension when unspecified. | ||
* @defaultValue the `name` field in your app's package.json file with an added `.exe` extension | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
*/ | ||
exe?: string; | ||
/** | ||
* The description value for the nuget package metadata. | ||
* The `description` value for the NuGet package metadata. | ||
* | ||
* Defaults to the `description` field from your app's package.json file when unspecified. | ||
* @defaultValue the `description` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
description?: string; | ||
/** | ||
* The version value for the nuget package metadata. | ||
* The `version` value for the Nuget package metadata. | ||
* | ||
* Defaults to the `version` field from your app's package.json file when unspecified. | ||
* @defaultValue the `version` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
version?: string; | ||
/** | ||
* The title value for the nuget package metadata. | ||
* The `title` value for the nuget package metadata. | ||
* | ||
* Defaults to the `productName` field and then the `name` field from your app's package.json file when unspecified. | ||
* @defaultValue the `productName` field and then the `name` field from your app's package.json | ||
* file unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/nuget/reference/nuspec | the Microsoft .nuspec reference}. | ||
*/ | ||
@@ -72,3 +91,5 @@ title?: string; | ||
* | ||
* Defaults to the name field in your app's package.json file. | ||
* @defaultValue the `name` field in your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
* @see {@link https://learn.microsoft.com/en-us/windows/win32/shell/appids | Microsoft's Application User Model IDs documentation}. | ||
*/ | ||
@@ -81,3 +102,4 @@ name?: string; | ||
* For more comprehensive support of various codesigning scenarios | ||
* like EV certificates, see the "windowsSign" parameter. | ||
* like EV certificates, see the | ||
* {@link SquirrelWindowsOptions.windowsSign | windowsSign} parameter. | ||
*/ | ||
@@ -90,3 +112,4 @@ certificateFile?: string; | ||
* For more comprehensive support of various codesigning scenarios | ||
* like EV certificates, see the "windowsSign" parameter. | ||
* like EV certificates, see the | ||
* {@link SquirrelWindowsOptions.windowsSign | windowsSign} parameter. | ||
*/ | ||
@@ -97,7 +120,9 @@ certificatePassword?: string; | ||
* | ||
* Overrides `certificateFile` and `certificatePassword`. | ||
* Overrides {@link SquirrelWindowsOptions.certificateFile | certificateFile} | ||
* and {@link SquirrelWindowsOptions.certificatePassword | certificatePassword}`. | ||
* | ||
* This is a legacy parameter provided for backwards compatibility. | ||
* For more comprehensive support of various codesigning scenarios | ||
* like EV certificates, see the "windowsSign" parameter. | ||
* like EV certificates, see the | ||
* {@link SquirrelWindowsOptions.windowsSign | windowsSign} parameter. | ||
*/ | ||
@@ -112,3 +137,3 @@ signWithParams?: string; | ||
* | ||
* Defaults to the Electron icon. | ||
* @defaultValue the Electron icon. | ||
*/ | ||
@@ -122,2 +147,4 @@ iconUrl?: string; | ||
* The name to use for the generated Setup.exe file | ||
* @defaultValue the `productName` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
*/ | ||
@@ -127,23 +154,42 @@ setupExe?: string; | ||
* The name to use for the generated Setup.msi file | ||
* @defaultValue the `productName` field from your app's package.json file | ||
* unless {@link SquirrelWindowsOptions.usePackageJson | usePackageJson} is false. | ||
*/ | ||
setupMsi?: string; | ||
/** | ||
* Should Squirrel.Windows create an MSI installer? | ||
* Enable this flag to prevent Squirrel.Windows from creating an MSI installer. | ||
* @defaultValue false | ||
*/ | ||
noMsi?: boolean; | ||
/** | ||
* Should Squirrel.Windows delta packages? (disable only if necessary, they are a Good Thing) | ||
* Enable this flag to prevent Squirrel.Windows from creating delta packages (disable only if necessary, they are a Good Thing). | ||
* @defaultValue false | ||
*/ | ||
noDelta?: boolean; | ||
/** | ||
* A URL to your existing updates. If given, these will be downloaded to create delta updates | ||
* A URL to your existing updates. If given, these will be downloaded to create delta updates. | ||
*/ | ||
remoteReleases?: string; | ||
/** | ||
* Authentication token for remote updates | ||
* Authentication token for remote updates using {@link SquirrelWindowsOptions.remoteReleases | remoteReleases} | ||
*/ | ||
remoteToken?: string; | ||
/** | ||
* Whether or not to infer metadata options from your app's package.json file. | ||
* @defaultValue true | ||
*/ | ||
usePackageJson?: boolean; | ||
/** | ||
* Set the required .NET framework version (e.g. `net461`). | ||
*/ | ||
frameworkVersion?: string; | ||
/** | ||
* Attempt to create more descriptive installer names using metadata parameters. | ||
* @defaultValue false | ||
*/ | ||
fixUpPaths?: boolean; | ||
/** | ||
* Enable this flag to skip setting a custom icon for `Update.exe` | ||
* @defaultValue false | ||
*/ | ||
skipUpdateIcon?: boolean; | ||
@@ -153,3 +199,3 @@ /** | ||
* | ||
* Sign your app with @electron/windows-sign, allowing for full customization | ||
* Sign your app with `@electron/windows-sign`, allowing for full customization | ||
* of the code-signing process - and supports more complicated scenarios like | ||
@@ -160,4 +206,4 @@ * cloud-hosted EV certificates, custom sign pipelines, and per-file overrides. | ||
* | ||
* Please see https://github.com/@electron/windows-sign for all possible | ||
* configuration options. | ||
* @see {@link https://github.com/electron/windows-sign | @electron/windows-sign documentation} | ||
* for all possible configuration options. | ||
*/ | ||
@@ -164,0 +210,0 @@ windowsSign?: SignToolOptions; |
@@ -69,6 +69,6 @@ "use strict"; | ||
var fs_extra_1 = __importDefault(require("fs-extra")); | ||
var VENDOR_PATH = path_1.default.join(__dirname, '..', 'vendor'); | ||
var ORIGINAL_SIGN_TOOL_PATH = path_1.default.join(VENDOR_PATH, 'signtool.exe'); | ||
var BACKUP_SIGN_TOOL_PATH = path_1.default.join(VENDOR_PATH, 'signtool-original.exe'); | ||
var SIGN_LOG_PATH = path_1.default.join(VENDOR_PATH, 'electron-windows-sign.log'); | ||
var VENDOR_PATH; | ||
var ORIGINAL_SIGN_TOOL_PATH; | ||
var BACKUP_SIGN_TOOL_PATH; | ||
var SIGN_LOG_PATH; | ||
/** | ||
@@ -91,2 +91,6 @@ * This method uses @electron/windows-sign to create a fake signtool.exe | ||
} | ||
VENDOR_PATH = options.vendorDirectory || path_1.default.join(__dirname, '..', 'vendor'); | ||
ORIGINAL_SIGN_TOOL_PATH = path_1.default.join(VENDOR_PATH, 'signtool.exe'); | ||
BACKUP_SIGN_TOOL_PATH = path_1.default.join(VENDOR_PATH, 'signtool-original.exe'); | ||
SIGN_LOG_PATH = path_1.default.join(VENDOR_PATH, 'electron-windows-sign.log'); | ||
return [4 /*yield*/, getCreateSeaSignTool()]; | ||
@@ -93,0 +97,0 @@ case 1: |
{ | ||
"name": "electron-winstaller", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"description": "Module to generate Windows installers for Electron apps", | ||
@@ -24,2 +24,3 @@ "main": "lib/index.js", | ||
"build": "tsc", | ||
"docs": "npx typedoc", | ||
"prepublish": "npm run build", | ||
@@ -49,2 +50,3 @@ "lint": "eslint --ext .ts src spec", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "0.25.13", | ||
"typescript": "^4.9.3" | ||
@@ -51,0 +53,0 @@ }, |
@@ -27,4 +27,2 @@ # Electron Installer | ||
```javascript | ||
// NB: Use this syntax within an async function, Node does not have support for | ||
// top-level await as of Node 12. | ||
try { | ||
@@ -31,0 +29,0 @@ await electronInstaller.createWindowsInstaller({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29987980
906
12
190