Skip to content

Commit f0839da

Browse files
committed
fixes
1 parent 016786a commit f0839da

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class Applesign {
351351
}
352352

353353
addEntitlementsSync(orig: any) {
354-
if (this.config.addEntitlements === undefined) {
354+
if (!this.config.addEntitlements) {
355355
return orig;
356356
}
357357
this.emit("message", "Adding entitlements from file");
@@ -480,7 +480,7 @@ class Applesign {
480480
additionalKeychainGroups.push(this.config.customKeychainGroup);
481481
}
482482
const infoPlist = path.join(this.config.appdir, "Info.plist");
483-
const plistData = plist.readFileSync(infoPlist);
483+
const plistData = plist.readFileSync(infoPlist) as Record<string, any>;
484484
if (this.config.bundleIdKeychainGroup) {
485485
if (typeof this.config.bundleid === "string") {
486486
additionalKeychainGroups.push(this.config.bundleid);
@@ -513,7 +513,7 @@ class Applesign {
513513
: this.config.entitlement
514514
? fs.readFileSync(this.config.entitlement).toString()
515515
: plistBuild(entMacho).toString();
516-
const ent = plist.parse(newEntitlements.trim());
516+
const ent = plist.parse(newEntitlements.trim()) as Record<string, any>;
517517
const shouldRenameGroups = !this.config.mobileprovision &&
518518
!this.config.cloneEntitlements;
519519
if (shouldRenameGroups && ent["com.apple.security.application-groups"]) {
@@ -926,7 +926,7 @@ function getExecutable(appdir: string) {
926926
}
927927
const plistPath = path.join(appdir, "Info.plist");
928928
try {
929-
const plistData = plist.readFileSync(plistPath);
929+
const plistData = plist.readFileSync(plistPath) as Record<string, any>;
930930
const cfBundleExecutable = plistData.CFBundleExecutable;
931931
if (cfBundleExecutable) {
932932
return cfBundleExecutable;

lib/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ async function getMobileProvisionPlist(file: string) {
203203
const args = ["cms", "-D", "-i", file];
204204
res = await execProgram(getTool("security")!, args);
205205
}
206-
return plist.parse(res.stdout);
206+
return plist.parse(res.stdout) as Record<string, any>;
207207
}
208208

209209
async function getEntitlementsFromMobileProvision(

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"ts-node": {
1717
"esm": true
1818
},
19+
"files": ["lib/types.d.ts"],
1920
"include": [
2021
// include both JS and TS sources for migration
2122
"lib/**/*",

0 commit comments

Comments
 (0)