runcloud 0.2.151 → 0.2.152
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/commands/appStoreEvaluate.js +27 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.152.tgz +0 -0
- package/runcloud-0.2.151.tgz +0 -0
|
@@ -314,13 +314,15 @@ function missingIosUsageDescriptions(root, appJson) {
|
|
|
314
314
|
{ name: 'camera', used: /expo-camera|CameraView|requestCameraPermissions/i, keys: ['NSCameraUsageDescription'] },
|
|
315
315
|
{ name: 'location', used: /expo-location|getCurrentPositionAsync|watchPositionAsync/i, keys: ['NSLocationWhenInUseUsageDescription', 'NSLocationAlwaysAndWhenInUseUsageDescription'] },
|
|
316
316
|
{ name: 'photos', used: /expo-image-picker|expo-media-library|MediaLibrary/i, keys: ['NSPhotoLibraryUsageDescription'] },
|
|
317
|
-
{ name: 'microphone', used: /expo-av|
|
|
317
|
+
{ name: 'microphone', used: /expo-av|AudioRecorder|requestRecordingPermissionsAsync|requestMicrophonePermissions/i, keys: ['NSMicrophoneUsageDescription'] },
|
|
318
318
|
];
|
|
319
|
+
const pkg = readJson(path.join(root, 'package.json'));
|
|
320
|
+
const installed = new Set(['dependencies', 'devDependencies'].flatMap((field) => Object.keys(objectValue(getPath(pkg, [field])))));
|
|
319
321
|
const missing = [];
|
|
320
322
|
for (const check of checks) {
|
|
321
323
|
if (!check.used.test(source))
|
|
322
324
|
continue;
|
|
323
|
-
if (!check.keys.some((key) =>
|
|
325
|
+
if (!check.keys.some((key) => builtWithPurposeString(key, infoPlist, appJson, installed))) {
|
|
324
326
|
missing.push(`ios ${check.name} usage description (${check.keys.join(' or ')})`);
|
|
325
327
|
}
|
|
326
328
|
}
|
|
@@ -333,6 +335,29 @@ function missingIosUsageDescriptions(root, appJson) {
|
|
|
333
335
|
}
|
|
334
336
|
return missing;
|
|
335
337
|
}
|
|
338
|
+
const PLUGIN_PURPOSE_STRINGS = {
|
|
339
|
+
'expo-camera': { auto: true, keys: { NSCameraUsageDescription: 'cameraPermission', NSMicrophoneUsageDescription: 'microphonePermission' } },
|
|
340
|
+
'expo-image-picker': { auto: true, keys: { NSPhotoLibraryUsageDescription: 'photosPermission', NSCameraUsageDescription: 'cameraPermission', NSMicrophoneUsageDescription: 'microphonePermission' } },
|
|
341
|
+
'expo-media-library': { auto: true, keys: { NSPhotoLibraryUsageDescription: 'photosPermission' } },
|
|
342
|
+
'expo-av': { auto: true, keys: { NSMicrophoneUsageDescription: 'microphonePermission' } },
|
|
343
|
+
'expo-location': { auto: true, keys: { NSLocationWhenInUseUsageDescription: 'locationWhenInUsePermission', NSLocationAlwaysAndWhenInUseUsageDescription: 'locationAlwaysAndWhenInUsePermission' } },
|
|
344
|
+
'expo-audio': { auto: false, keys: { NSMicrophoneUsageDescription: 'microphonePermission' } },
|
|
345
|
+
};
|
|
346
|
+
function builtWithPurposeString(key, infoPlist, appJson, installed) {
|
|
347
|
+
let written = hasValue(infoPlist[key]);
|
|
348
|
+
for (const [name, plugin] of Object.entries(PLUGIN_PURPOSE_STRINGS)) {
|
|
349
|
+
const option = plugin.keys[key];
|
|
350
|
+
if (!option)
|
|
351
|
+
continue;
|
|
352
|
+
const listed = configPluginOptions(appJson, name);
|
|
353
|
+
if (!listed && !(plugin.auto && installed.has(name)))
|
|
354
|
+
continue;
|
|
355
|
+
if (listed?.[option] === false)
|
|
356
|
+
return false;
|
|
357
|
+
written = true;
|
|
358
|
+
}
|
|
359
|
+
return written;
|
|
360
|
+
}
|
|
336
361
|
function configPluginOptions(appJson, name) {
|
|
337
362
|
const plugins = getPath(appJson, ['expo', 'plugins']);
|
|
338
363
|
if (!Array.isArray(plugins))
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.152';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.2.151.tgz
DELETED
|
Binary file
|