Socket
Socket
Sign inDemoInstall

ipa-rename

Package Overview
Dependencies
213
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

lib/getAppInfo.js

6

lib/fileRename.js

@@ -5,5 +5,7 @@ // 文件重命名

const path = require('path');
const getAppInfo = require('./getAppInfo');
module.exports = (filepath, names) => {
const newName = `${names.appName}--${names.certName}.ipa`;
module.exports = async (filepath, names) => {
const appInfo = await getAppInfo(filepath);
const newName = `${appInfo.name}${appInfo.id}--${names.certName}.ipa`;
const newFilepath = path.join(path.parse(filepath).dir, newName);

@@ -10,0 +12,0 @@ if (filepath !== newFilepath) {

// 从字符串中获取证书的名称
module.exports = xml => {
const appNameMatched = xml.match(/<key>AppIDName<\/key>\s*<string>([^<]+)<\/string>/)
const certNamematched = xml.match(/<key>Name<\/key>\s*<string>([^<]+)<\/string>/m);
// const appNameMatched = xml.match(/<key>AppIDName<\/key>\s*<string>([^<]+)<\/string>/)
const certNamematched = xml.match(/<key>TeamName<\/key>\s*<string>([^<]+)<\/string>/m);
return {
appName: appNameMatched ? appNameMatched[1] : '',
// appName: appNameMatched ? appNameMatched[1] : '',
certName: certNamematched ? certNamematched[1] : '',
};
};
{
"name": "ipa-rename",
"version": "1.1.1",
"version": "1.2.0",
"description": "将ipa文件重命名,重命名的格式`[ipa包名]--[证书名].ipa`。只支持macOS系统!",

@@ -22,4 +22,5 @@ "main": "index.js",

"dependencies": {
"fs-extra": "^8.1.0"
"fs-extra": "^8.1.0",
"ipa-extract-info": "^1.2.5"
}
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc