Socket
Socket
Sign inDemoInstall

@electron/osx-sign

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/osx-sign - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

dist/cjs/flat.d.ts

@@ -11,2 +11,2 @@ import { FlatOptions } from './types';

*/
export declare const flat: (opts: FlatOptions, cb?: ((error?: Error | undefined) => void) | undefined) => void;
export declare const flat: (opts: FlatOptions, cb?: ((error?: Error) => void) | undefined) => void;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

import { sign, signApp } from './sign';
import { flat, buildPkg } from './flat';
export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg };
export * from './types';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -21,2 +35,3 @@ exports.buildPkg = exports.flatAsync = exports.signApp = exports.signAsync = exports.flat = exports.sign = void 0;

module.exports.buildPkg = flat_1.buildPkg;
__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map

@@ -11,2 +11,2 @@ import { SignOptions } from './types';

*/
export declare const sign: (opts: SignOptions, cb?: ((error?: Error | undefined) => void) | undefined) => void;
export declare const sign: (opts: SignOptions, cb?: ((error?: Error) => void) | undefined) => void;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -189,19 +193,23 @@ if (k2 === undefined) k2 = k;

const perFileOptions = await mergeOptionsForFile(opts.optionsForFile ? opts.optionsForFile(filePath) : null, defaultOptionsForFile(filePath, opts.platform));
if (opts.preAutoEntitlements === false) {
(0, util_1.debugWarn)('Pre-sign operation disabled for entitlements automation.');
}
else {
(0, util_1.debugLog)('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.');
if (!opts.version || (0, compare_version_1.default)(opts.version, '1.1.1') >= 0) {
// Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601
const newEntitlements = await (0, util_entitlements_1.preAutoEntitlements)(opts, perFileOptions, {
identity,
provisioningProfile: opts.provisioningProfile
? await (0, util_provisioning_profiles_1.getProvisioningProfile)(opts.provisioningProfile, opts.keychain)
: undefined
});
// preAutoEntitlements may provide us new entitlements, if so we update our options
// and ensure that entitlements-loginhelper has a correct default value
if (newEntitlements) {
perFileOptions.entitlements = newEntitlements;
// preAutoEntitlements should only be applied to the top level app bundle.
// Applying it other files will cause the app to crash and be rejected by Apple.
if (!filePath.includes('.app/')) {
if (opts.preAutoEntitlements === false) {
(0, util_1.debugWarn)('Pre-sign operation disabled for entitlements automation.');
}
else {
(0, util_1.debugLog)('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.');
if (!opts.version || (0, compare_version_1.default)(opts.version, '1.1.1') >= 0) {
// Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601
const newEntitlements = await (0, util_entitlements_1.preAutoEntitlements)(opts, perFileOptions, {
identity,
provisioningProfile: opts.provisioningProfile
? await (0, util_provisioning_profiles_1.getProvisioningProfile)(opts.provisioningProfile, opts.keychain)
: undefined
});
// preAutoEntitlements may provide us new entitlements, if so we update our options
// and ensure that entitlements-loginhelper has a correct default value
if (newEntitlements) {
perFileOptions.entitlements = newEntitlements;
}
}

@@ -208,0 +216,0 @@ }

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

export declare type ElectronMacPlatform = 'darwin' | 'mas';
declare type SigningDistributionType = 'development' | 'distribution';
export declare type BaseSignOptions = Readonly<{
export type ElectronMacPlatform = 'darwin' | 'mas';
type SigningDistributionType = 'development' | 'distribution';
export type BaseSignOptions = Readonly<{
app: string;

@@ -9,3 +9,3 @@ identity?: string;

}>;
declare type OnlyValidatedBaseSignOptions = {
type OnlyValidatedBaseSignOptions = {
platform: ElectronMacPlatform;

@@ -17,3 +17,3 @@ };

*/
export declare type PerFileSignOptions = {
export type PerFileSignOptions = {
/**

@@ -43,3 +43,3 @@ * The entitlements file to use when signing this file

};
declare type OnlySignOptions = {
type OnlySignOptions = {
binaries?: string[];

@@ -56,7 +56,7 @@ optionsForFile?: (filePath: string) => PerFileSignOptions;

};
declare type OnlyValidatedSignOptions = {
type OnlyValidatedSignOptions = {
ignore?: (string | ((file: string) => boolean))[];
type: SigningDistributionType;
};
declare type OnlyFlatOptions = {
type OnlyFlatOptions = {
identityValidation?: boolean;

@@ -67,12 +67,12 @@ install?: string;

};
declare type OnlyValidatedFlatOptions = {
type OnlyValidatedFlatOptions = {
install: string;
pkg: string;
};
declare type ValidatedForm<UnValidated, Validated> = Omit<UnValidated, keyof Validated> & Validated;
export declare type ValidatedBaseSignOptions = Readonly<ValidatedForm<BaseSignOptions, OnlyValidatedBaseSignOptions>>;
export declare type SignOptions = Readonly<OnlySignOptions & BaseSignOptions>;
export declare type ValidatedSignOptions = Readonly<ValidatedForm<OnlySignOptions, OnlyValidatedSignOptions> & ValidatedBaseSignOptions>;
export declare type FlatOptions = Readonly<OnlyFlatOptions & BaseSignOptions>;
export declare type ValidatedFlatOptions = Readonly<ValidatedForm<OnlyFlatOptions, OnlyValidatedFlatOptions> & ValidatedBaseSignOptions>;
type ValidatedForm<UnValidated, Validated> = Omit<UnValidated, keyof Validated> & Validated;
export type ValidatedBaseSignOptions = Readonly<ValidatedForm<BaseSignOptions, OnlyValidatedBaseSignOptions>>;
export type SignOptions = Readonly<OnlySignOptions & BaseSignOptions>;
export type ValidatedSignOptions = Readonly<ValidatedForm<OnlySignOptions, OnlyValidatedSignOptions> & ValidatedBaseSignOptions>;
export type FlatOptions = Readonly<OnlyFlatOptions & BaseSignOptions>;
export type ValidatedFlatOptions = Readonly<ValidatedForm<OnlyFlatOptions, OnlyValidatedFlatOptions> & ValidatedBaseSignOptions>;
export {};
import { PerFileSignOptions, ValidatedSignOptions } from './types';
import { Identity } from './util-identities';
import { ProvisioningProfile } from './util-provisioning-profiles';
declare type ComputedOptions = {
type ComputedOptions = {
identity: Identity;

@@ -6,0 +6,0 @@ provisioningProfile?: ProvisioningProfile;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -8,4 +8,4 @@ /// <reference types="node" />

export declare function execFileAsync(file: string, args: string[], options?: child.ExecFileOptions): Promise<string>;
declare type DeepListItem<T> = null | T | DeepListItem<T>[];
declare type DeepList<T> = DeepListItem<T>[];
type DeepListItem<T> = null | T | DeepListItem<T>[];
type DeepList<T> = DeepListItem<T>[];
export declare function compactFlattenedList<T>(list: DeepList<T>): T[];

@@ -12,0 +12,0 @@ /**

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -11,2 +11,2 @@ import { FlatOptions } from './types';

*/
export declare const flat: (opts: FlatOptions, cb?: ((error?: Error | undefined) => void) | undefined) => void;
export declare const flat: (opts: FlatOptions, cb?: ((error?: Error) => void) | undefined) => void;
import { sign, signApp } from './sign';
import { flat, buildPkg } from './flat';
export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg };
export * from './types';

@@ -13,2 +13,3 @@ import { sign, signApp } from './sign';

export { sign, flat, signApp as signAsync, signApp, buildPkg as flatAsync, buildPkg };
export * from './types';
//# sourceMappingURL=index.js.map

@@ -11,2 +11,2 @@ import { SignOptions } from './types';

*/
export declare const sign: (opts: SignOptions, cb?: ((error?: Error | undefined) => void) | undefined) => void;
export declare const sign: (opts: SignOptions, cb?: ((error?: Error) => void) | undefined) => void;

@@ -164,19 +164,23 @@ import * as fs from 'fs-extra';

const perFileOptions = await mergeOptionsForFile(opts.optionsForFile ? opts.optionsForFile(filePath) : null, defaultOptionsForFile(filePath, opts.platform));
if (opts.preAutoEntitlements === false) {
debugWarn('Pre-sign operation disabled for entitlements automation.');
}
else {
debugLog('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.');
if (!opts.version || compareVersion(opts.version, '1.1.1') >= 0) {
// Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601
const newEntitlements = await preAutoEntitlements(opts, perFileOptions, {
identity,
provisioningProfile: opts.provisioningProfile
? await getProvisioningProfile(opts.provisioningProfile, opts.keychain)
: undefined
});
// preAutoEntitlements may provide us new entitlements, if so we update our options
// and ensure that entitlements-loginhelper has a correct default value
if (newEntitlements) {
perFileOptions.entitlements = newEntitlements;
// preAutoEntitlements should only be applied to the top level app bundle.
// Applying it other files will cause the app to crash and be rejected by Apple.
if (!filePath.includes('.app/')) {
if (opts.preAutoEntitlements === false) {
debugWarn('Pre-sign operation disabled for entitlements automation.');
}
else {
debugLog('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n', '* Disable by setting `pre-auto-entitlements` to `false`.');
if (!opts.version || compareVersion(opts.version, '1.1.1') >= 0) {
// Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601
const newEntitlements = await preAutoEntitlements(opts, perFileOptions, {
identity,
provisioningProfile: opts.provisioningProfile
? await getProvisioningProfile(opts.provisioningProfile, opts.keychain)
: undefined
});
// preAutoEntitlements may provide us new entitlements, if so we update our options
// and ensure that entitlements-loginhelper has a correct default value
if (newEntitlements) {
perFileOptions.entitlements = newEntitlements;
}
}

@@ -183,0 +187,0 @@ }

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

export declare type ElectronMacPlatform = 'darwin' | 'mas';
declare type SigningDistributionType = 'development' | 'distribution';
export declare type BaseSignOptions = Readonly<{
export type ElectronMacPlatform = 'darwin' | 'mas';
type SigningDistributionType = 'development' | 'distribution';
export type BaseSignOptions = Readonly<{
app: string;

@@ -9,3 +9,3 @@ identity?: string;

}>;
declare type OnlyValidatedBaseSignOptions = {
type OnlyValidatedBaseSignOptions = {
platform: ElectronMacPlatform;

@@ -17,3 +17,3 @@ };

*/
export declare type PerFileSignOptions = {
export type PerFileSignOptions = {
/**

@@ -43,3 +43,3 @@ * The entitlements file to use when signing this file

};
declare type OnlySignOptions = {
type OnlySignOptions = {
binaries?: string[];

@@ -56,7 +56,7 @@ optionsForFile?: (filePath: string) => PerFileSignOptions;

};
declare type OnlyValidatedSignOptions = {
type OnlyValidatedSignOptions = {
ignore?: (string | ((file: string) => boolean))[];
type: SigningDistributionType;
};
declare type OnlyFlatOptions = {
type OnlyFlatOptions = {
identityValidation?: boolean;

@@ -67,12 +67,12 @@ install?: string;

};
declare type OnlyValidatedFlatOptions = {
type OnlyValidatedFlatOptions = {
install: string;
pkg: string;
};
declare type ValidatedForm<UnValidated, Validated> = Omit<UnValidated, keyof Validated> & Validated;
export declare type ValidatedBaseSignOptions = Readonly<ValidatedForm<BaseSignOptions, OnlyValidatedBaseSignOptions>>;
export declare type SignOptions = Readonly<OnlySignOptions & BaseSignOptions>;
export declare type ValidatedSignOptions = Readonly<ValidatedForm<OnlySignOptions, OnlyValidatedSignOptions> & ValidatedBaseSignOptions>;
export declare type FlatOptions = Readonly<OnlyFlatOptions & BaseSignOptions>;
export declare type ValidatedFlatOptions = Readonly<ValidatedForm<OnlyFlatOptions, OnlyValidatedFlatOptions> & ValidatedBaseSignOptions>;
type ValidatedForm<UnValidated, Validated> = Omit<UnValidated, keyof Validated> & Validated;
export type ValidatedBaseSignOptions = Readonly<ValidatedForm<BaseSignOptions, OnlyValidatedBaseSignOptions>>;
export type SignOptions = Readonly<OnlySignOptions & BaseSignOptions>;
export type ValidatedSignOptions = Readonly<ValidatedForm<OnlySignOptions, OnlyValidatedSignOptions> & ValidatedBaseSignOptions>;
export type FlatOptions = Readonly<OnlyFlatOptions & BaseSignOptions>;
export type ValidatedFlatOptions = Readonly<ValidatedForm<OnlyFlatOptions, OnlyValidatedFlatOptions> & ValidatedBaseSignOptions>;
export {};
import { PerFileSignOptions, ValidatedSignOptions } from './types';
import { Identity } from './util-identities';
import { ProvisioningProfile } from './util-provisioning-profiles';
declare type ComputedOptions = {
type ComputedOptions = {
identity: Identity;

@@ -6,0 +6,0 @@ provisioningProfile?: ProvisioningProfile;

@@ -8,4 +8,4 @@ /// <reference types="node" />

export declare function execFileAsync(file: string, args: string[], options?: child.ExecFileOptions): Promise<string>;
declare type DeepListItem<T> = null | T | DeepListItem<T>[];
declare type DeepList<T> = DeepListItem<T>[];
type DeepListItem<T> = null | T | DeepListItem<T>[];
type DeepList<T> = DeepListItem<T>[];
export declare function compactFlattenedList<T>(list: DeepList<T>): T[];

@@ -12,0 +12,0 @@ /**

{
"name": "@electron/osx-sign",
"version": "1.0.4",
"version": "1.0.5",
"description": "Codesign Electron macOS apps",

@@ -37,2 +37,4 @@ "main": "dist/cjs/index.js",

"devDependencies": {
"@continuous-auth/semantic-release-npm": "^3.0.0",
"@electron/get": "^2.0.2",
"@types/compare-version": "^0.1.31",

@@ -43,11 +45,10 @@ "@types/debug": "^4.1.7",

"@types/plist": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"electron-download": "^4.1.0",
"eslint": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-config-eslint": "^7.0.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.2",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-promise": "^6.1.1",
"extract-zip": "^2.0.1",

@@ -58,5 +59,5 @@ "mkdirp": "^1.0.4",

"run-waterfall": "^1.1.7",
"standard": "^16.0.4",
"standard": "^17.0.0",
"tape": "^4.7.1",
"typescript": "^4.4.4"
"typescript": "^4.9.3"
},

@@ -63,0 +64,0 @@ "scripts": {

@@ -271,3 +271,3 @@ # @electron/osx-sign [![npm][npm_img]][npm_url] [![Build Status][circleci_img]][circleci_url]

When this command is run for the first time: `electron-download` will download macOS Electron releases defined in `test/config.json`, and save to `~/.electron/`, which might take up less than 1GB of disk space.
When this command is run for the first time: `@electron/get` will download macOS Electron releases defined in `test/config.json`, and save to `~/.electron/`, which might take up less than 1GB of disk space.

@@ -285,3 +285,3 @@ A successful testing should look something like:

Calling electron-download before running tests...
Calling @electron/get before running tests...
Running tests...

@@ -288,0 +288,0 @@ TAP version 13

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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