Comparing version 4.0.1 to 4.1.0
16
index.js
@@ -319,2 +319,12 @@ 'use strict'; | ||
addEntitlementsSync (orig) { | ||
if (this.config.addEntitlements === undefined) { | ||
return orig; | ||
} | ||
this.emit('message', 'Adding entitlements from file'); | ||
const addEnt = plist.readFileSync(this.config.addEntitlements); | ||
// TODO: deepmerge | ||
return Object.assign(orig, addEnt); | ||
} | ||
adjustEntitlementsSync (file, entMobProv) { | ||
@@ -326,3 +336,4 @@ if (this.config.pseudoSign) { | ||
} | ||
const entMacho = plist.parse(ent.toString().trim()); | ||
let entMacho = plist.parse(ent.toString().trim()); | ||
entMacho = this.addEntitlementsSync(entMacho); | ||
// TODO: merge additional entitlements here | ||
@@ -348,2 +359,3 @@ const newEntitlements = plistBuild(entMacho).toString(); | ||
entMacho = plist.parse(ent.toString().trim()); | ||
entMacho = this.addEntitlementsSync(entMacho); | ||
this.debugInfo(file, 'fullPath', file); | ||
@@ -557,3 +569,3 @@ this.debugInfo(file, 'oldEntitlements', entMacho || 'TODO'); | ||
const tmpEntitlementsFile = this._pathInTmp(newEntitlementsFile); | ||
const entstr = plistBuild(mp.Entitlements, { pretty:true, allowEmpty: false }).toString(); | ||
const entstr = plistBuild(mp.Entitlements, { pretty: true, allowEmpty: false }).toString(); | ||
fs.writeFileSync(tmpEntitlementsFile, entstr); | ||
@@ -560,0 +572,0 @@ entitlements = tmpEntitlementsFile; |
@@ -81,2 +81,3 @@ 'use strict'; | ||
-E, --entry-entitlement Use generic entitlement (EXPERIMENTAL) | ||
-N, --add-entitlements [FILE] Append entitlements from file (EXPERIMENTAL) | ||
-M, --massage-entitlements Massage entitlements to remove privileged ones | ||
@@ -154,2 +155,3 @@ -t, --without-get-task-allow Do not set the get-task-allow entitlement (EXPERIMENTAL) | ||
allowHttp: opt.allowHttp || false, | ||
addEntitlements: opt.addEntitlements || undefined, | ||
bundleIdKeychainGroup: opt.bundleIdKeychainGroup || false, | ||
@@ -250,2 +252,3 @@ bundleid: opt.bundleid || undefined, | ||
allowHttp: conf['allow-http'] || conf.H, | ||
addEntitlements: conf['add-entitlements'] || conf.N, | ||
bundleIdKeychainGroup: conf.B || conf['bundleid-access-group'], | ||
@@ -252,0 +255,0 @@ bundleid: conf.bundleid || conf.b, |
@@ -33,5 +33,5 @@ 'use strict'; | ||
ent['com.apple.developer.icloud-container-identifiers'] = 'iCloud.' + devid; | ||
return plistBuild(ent, { pretty:true, allowEmpty: false }).toString(); | ||
return plistBuild(ent, { pretty: true, allowEmpty: false }).toString(); | ||
} | ||
module.exports = defaultEntitlements; |
@@ -99,3 +99,3 @@ { | ||
"name": "applesign", | ||
"version": "4.0.1" | ||
"version": "4.1.0" | ||
} |
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
94116
18
2372