Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/electron-packager

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/electron-packager - npm Package Compare versions

Comparing version 5.1.29 to 8.7.0

electron-packager/LICENSE

267

electron-packager/index.d.ts

@@ -1,4 +0,5 @@

// Type definitions for electron-packager v5.1.0
// Project: https://github.com/maxogden/electron-packager
// Type definitions for electron-packager 8.7
// Project: https://github.com/electron-userland/electron-packager
// Definitions by: Maxime LUCE <https://github.com/SomaticIT/>
// Juan Jimenez-Anca <https://github.com/cortopy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -8,109 +9,197 @@

declare namespace ElectronPackager {
export = electronPackager;
/**
* This will:
* - Find or download the correct release of Electron
* - Use that version of electron to create a app in <out>/<appname>-<platform>-<arch>
*
* You should be able to launch the app on the platform you built for. If not, check your settings and try again.
*
* @param opts - Options to configure packaging.
* @param callback - Callback which is called when packaging is done or an error occured.
*/
declare function electronPackager(opts: electronPackager.Options, callback: electronPackager.finalCallback): void;
declare namespace electronPackager {
/**
* Callback which is called when electron-packager is done.
*
* @param err - Contains errors if any.
* @param appPaths - Path(s) to the newly created application(s).
*/
type finalCallback = (err: Error, appPaths: string|string[]) => void;
type ignoreFunction = (path: string) => boolean;
type onCompleteFn = (buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) => void;
type arch = "ia32" | "x64" | "armv7l" | "all";
type packageManager = "npm" | "cnpm" | "yarn";
type platform = "linux" | "win32" | "darwin" | "mas" | "all";
interface AsarOptions {
ordering?: string;
unpack?: string;
unpackDir?: string;
}
interface ElectronDownloadOptions {
cache?: string;
mirror?: string;
quiet?: boolean;
strictSSL?: boolean;
}
interface ElectronOsXSignOptions {
identity?: string;
entitlements?: string;
"entitlements-inherit"?: string;
}
/**
* Object (also known as a "hash") of application metadata to embed into the executable
*/
interface Win32Metadata {
CompanyName?: string;
FileDescription?: string;
OriginalFilename?: string;
ProductName?: string;
InternalName?: string;
"requested-execution-level": any;
"application-manifest": any;
}
/** Electron-packager Options. */
export interface Options {
interface Options {
/** The source directory. */
dir: string;
/** The application name. */
name: string;
/**
* Allowed values: linux, win32, darwin, all. Not required if `all` is used.
* Arbitrary combinations of individual platforms are also supported via a comma-delimited string or array of strings.
* Optional list of methods to call on completion of each process
*/
platform?: string | string[];
/** Allowed values: ia32, x64, all Not required if `all` is used. */
arch?: string;
/** Electron version (without the "v"). See https://github.com/atom/electron/releases. */
version: string;
afterCopy?: onCompleteFn[];
afterExtract?: onCompleteFn[];
afterPrune?: onCompleteFn[];
/** Shortcut for `--arch=all --platform=all`. */
all?: boolean;
/**
* The human-readable copyright line for the app. Maps to the LegalCopyright metadata property on Windows, and NSHumanReadableCopyright on OS X.
*/
appCopyright?: string;
/**
* The release version of the application. By default the version property in the package.json is used but it can be overridden with this argument.
* If neither are provided, the version of Electron will be used. Maps to the ProductVersion metadata property on Windows, and CFBundleShortVersionString on OS X.
*/
appVersion?: string;
/**
* The target system architecture(s) to build for. Not required if the all option is set.
* If arch is set to all, all supported architectures for the target platforms specified by platform will be built.
* Arbitrary combinations of individual architectures are also supported via a comma-delimited string or array of strings.
* The non-all values correspond to the architecture names used by Electron releases. This value is not restricted to the official set if download.mirror is set.
*/
arch?: arch;
/**
* Whether to package the application's source code into an archive, using Electron's archive format
*/
asar?: boolean | AsarOptions;
/**
* The build version of the application. Defaults to the value of appVersion.
* Maps to the FileVersion metadata property on Windows, and CFBundleVersion on OS X.
*/
buildVersion?: string;
/**
* Whether symlinks should be dereferenced during the copying of the application source.
*/
derefSymlinks?: boolean;
/**
* If present, passes custom options to electron-download
*/
download?: ElectronDownloadOptions;
/**
* The Electron version with which the app is built (without the leading 'v') - for example, 1.4.13
*/
electronVersion?: string;
/**
* One or more files to be copied directly into the app's Contents/Resources directory for OS X target platforms, and the resources directory for other target platforms.
*/
extraResource?: string | string[];
/**
* The local path to the icon file, if the target platform supports setting embedding an icon.
*/
icon?: string;
/**
* One or more additional regular expression patterns which specify which files to ignore when copying files to create the app bundle(s).
* The regular expressions are matched against the absolute path of a given file/directory to be copied.
*/
ignore?: RegExp | RegExp[] | ignoreFunction;
/**
* The application name. If omitted, it will use the productName or name value from the nearest package.json
*/
name?: string;
/** The output directory. */
out?: string;
/**
* Currently you must look for conversion tools in order to supply an icon in the format required by the platform:
* - OS X: `.icns`
* - Windows: `.ico`
*
* For Linux builds, this option is not required, as the dock/window list icon is set via the icon option in the BrowserWindow contructor.
* Setting the icon in the file manager is not currently supported.
*
* If the file extension is omitted, it is auto-completed to the correct extension based on the platform,
* including when `--platform=all` is in effect.
* Whether to replace an already existing output directory for a given platform (true) or skip recreating it (false).
*/
icon?: string;
/** The bundle identifier to use in the app plist. */
"app-bundle-id"?: string;
/** The release version to set for the app. */
"app-version"?: string;
/** The build version to set for the app (OS X only). */
"build-version"?: string;
/** The bundle identifier to use in the app helper plist. */
"helper-bundle-id"?: string;
/** Object hash of application metadata to embed into the executable (Windows only). */
"version-string"?: VersionString;
/** The directory of cached electron downloads. Defaults to "$HOME/.electron". */
cache?: string;
/** Do not copy files into App whose filenames regex .match this string. */
ignore?: RegExp;
/** Runs `npm prune --production` on the app. */
overwrite?: boolean;
/**
* The package manager used to prune devDependencies modules from the outputted Electron app
*/
packageManager?: packageManager;
/**
* The target platform(s) to build for. Not required if the all option is set.
*/
platform?: platform;
/**
* Runs the package manager command to remove all of the packages specified in the devDependencies section of package.json from the outputted Electron app.
*/
prune?: boolean;
/** If output directory for a platform already exists, replaces it rather than skipping it. */
overwrite?: boolean;
/** Packages the source code within your app into an archive. */
asar?: boolean;
/** Unpacks the files to app.asar.unpacked directory whose filenames regex .match this string. */
"asar-unpack"?: string;
/** Should contain the identity to be used when running `codesign` (OS X only). */
sign?: string;
}
/**
* If true, disables printing informational and warning messages to the console when packaging the application. This does not disable errors.
*/
quiet?: boolean;
/**
* The base directory to use as a temp directory. Set to false to disable use of a temporary directory.
*/
tmpdir?: string | false;
/** Object hash of application metadata to embed into the executable (Windows only). */
export interface VersionString {
CompanyName?: string;
LegalCopyright?: string;
FileDescription?: string;
OriginalFilename?: string;
FileVersion?: string;
ProductVersion?: string;
ProductName?: string;
InternalName?: string;
}
/**
* OS X/Mac App Store targets only
*/
/** Electron-packager done callback. */
export interface Callback {
/**
* Callback which is called when electron-packager is done.
*
* @param err - Contains errors if any.
* @param appPath - Path(s) to the newly created application(s).
* The bundle identifier to use in the application's plist.
*/
(err: Error, appPath: string|string[]): void
}
appBundleId?: string;
/**
* The application category type, as shown in the Finder via View → Arrange by Application Category when viewing the Applications directory.
*/
appCategoryType?: string;
/**
* When the value is a String, the filename of a plist file. Its contents are added to the app's plist.
* When the value is an Object, an already-parsed plist data structure that is merged into the app's plist.
*/
extendInfo?: string | {[property: string]: any};
/**
* The bundle identifier to use in the application helper's plist.
*/
helperBundleId?: string;
/**
* If present, signs OS X target apps when the host platform is OS X and XCode is installed.
*/
osxSign?: boolean | ElectronOsXSignOptions;
/**
* The URL protocol scheme(s) to associate the app with
*/
protocol?: string;
/**
* The descriptive name(s) of the URL protocol scheme(s) specified via the protocol option.
* Maps to the CFBundleURLName metadata property.
*/
protocolName?: string[];
/** Electron-packager function */
export interface Packager {
/**
* This will:
* - Find or download the correct release of Electron
* - Use that version of electron to create a app in <out>/<appname>-<platform>-<arch>
*
* You should be able to launch the app on the platform you built for. If not, check your settings and try again.
*
* @param opts - Options to configure packaging.
* @param callback - Callback which is called when packaging is done or an error occured.
* Windows targets only
*/
(opts: Options, callback: Callback): void;
win32metadata?: Win32Metadata;
}
}
declare module "electron-packager" {
const packager: ElectronPackager.Packager;
export = packager;
}
interface NodeRequireFunction {
(id: "electron-packager"): ElectronPackager.Packager;
}
{
"name": "@types/electron-packager",
"version": "5.1.29",
"description": "TypeScript definitions for electron-packager v5.1.0",
"version": "8.7.0",
"description": "TypeScript definitions for electron-packager",
"license": "MIT",
"author": "Maxime LUCE <https://github.com/SomaticIT/>",
"contributors": [
{
"name": "Maxime LUCE",
"url": "https://github.com/SomaticIT/"
},
{
"name": "Juan Jimenez-Anca",
"url": "https://github.com/cortopy"
}
],
"main": "",

@@ -16,4 +25,5 @@ "repository": {

},
"typings": "index.d.ts",
"typesPublisherContentHash": "fa83814125f1c6dd575e2e958073d23629b28b2e3ce6982323fd20e64aeff366"
"peerDependencies": {},
"typesPublisherContentHash": "42018a1f9521918717c796ae54322707367699b3d9c4032c86da4f1680fbccb6",
"typeScriptVersion": "2.0"
}

@@ -5,15 +5,13 @@ # Installation

# Summary
This package contains type definitions for electron-packager v5.1.0 (https://github.com/maxogden/electron-packager).
This package contains type definitions for electron-packager (https://github.com/electron-userland/electron-packager).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/electron-packager
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/electron-packager
Additional Details
* Last updated: Mon, 19 Sep 2016 16:15:24 GMT
* File structure: Mixed
* Library Dependencies: node
* Module Dependencies: none
* Last updated: Fri, 30 Jun 2017 21:28:45 GMT
* Dependencies: node
* Global values: none
# Credits
These definitions were written by Maxime LUCE <https://github.com/SomaticIT/>.
These definitions were written by Maxime LUCE <https://github.com/SomaticIT/>, Juan Jimenez-Anca <https://github.com/cortopy>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc