@devicecloud.dev/dcd 3.6.10 → 3.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/methods.js +10 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/methods.js
CHANGED
|
@@ -155,9 +155,18 @@ const parseInfoPlist = async (buffer) => {
|
|
|
155
155
|
const extractAppMetadataIosZip = async (appFilePath) => new Promise((resolve, reject) => {
|
|
156
156
|
const zip = new StreamZip({ file: appFilePath });
|
|
157
157
|
zip.on('ready', () => {
|
|
158
|
-
|
|
158
|
+
// Get all entries and sort them by path depth
|
|
159
|
+
const entries = Object.values(zip.entries());
|
|
160
|
+
const sortedEntries = entries.sort((a, b) => {
|
|
161
|
+
const aDepth = a.name.split('/').length;
|
|
162
|
+
const bDepth = b.name.split('/').length;
|
|
163
|
+
return aDepth - bDepth;
|
|
164
|
+
});
|
|
165
|
+
// Find the first Info.plist in the shallowest directory
|
|
166
|
+
const infoPlist = sortedEntries.find((e) => e.name.endsWith('.app/Info.plist'));
|
|
159
167
|
if (!infoPlist) {
|
|
160
168
|
reject(new Error('Failed to find info plist'));
|
|
169
|
+
return;
|
|
161
170
|
}
|
|
162
171
|
const buffer = zip.entryDataSync(infoPlist.name);
|
|
163
172
|
parseInfoPlist(buffer)
|
package/oclif.manifest.json
CHANGED