@expo/config-plugins
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -1,5 +0,4 @@ | ||
import { ExpoConfig } from '@expo/config-types'; | ||
import { ConfigPlugin } from '../Plugin.types'; | ||
import { ExpoConfigUpdates } from '../utils/Updates'; | ||
import { AndroidManifest } from './Manifest'; | ||
declare type ExpoConfigUpdates = Pick<ExpoConfig, 'sdkVersion' | 'owner' | 'runtimeVersion' | 'updates' | 'slug'>; | ||
export declare enum Config { | ||
@@ -18,3 +17,2 @@ ENABLED = "expo.modules.updates.ENABLED", | ||
}>; | ||
export declare function getUpdateUrl(config: Pick<ExpoConfigUpdates, 'owner' | 'slug'>, username: string | null): string | null; | ||
export declare function getRuntimeVersion(config: Pick<ExpoConfigUpdates, 'runtimeVersion'>): string | null; | ||
@@ -33,2 +31,1 @@ export declare function getSDKVersion(config: Pick<ExpoConfigUpdates, 'sdkVersion'>): string | null; | ||
export declare function areVersionsSynced(config: Pick<ExpoConfigUpdates, 'runtimeVersion' | 'sdkVersion'>, androidManifest: AndroidManifest): boolean; | ||
export {}; |
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
exports.getUpdateUrl = getUpdateUrl; | ||
exports.getRuntimeVersion = getRuntimeVersion; | ||
@@ -53,2 +52,12 @@ exports.getSDKVersion = getSDKVersion; | ||
function _Updates() { | ||
const data = require("../utils/Updates"); | ||
_Updates = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _Manifest() { | ||
@@ -92,12 +101,2 @@ const data = require("./Manifest"); | ||
function getUpdateUrl(config, username) { | ||
const user = typeof config.owner === 'string' ? config.owner : username; | ||
if (!user) { | ||
return null; | ||
} | ||
return `https://exp.host/@${user}/${config.slug}`; | ||
} | ||
function getRuntimeVersion(config) { | ||
@@ -140,3 +139,3 @@ return typeof config.runtimeVersion === 'string' ? config.runtimeVersion : null; | ||
(0, _Manifest().addMetaDataItemToMainApplication)(mainApplication, Config.LAUNCH_WAIT_MS, String(getUpdatesTimeout(config))); | ||
const updateUrl = getUpdateUrl(config, username); | ||
const updateUrl = (0, _Updates().getUpdateUrl)(config, username); | ||
@@ -216,3 +215,3 @@ if (updateUrl) { | ||
function isMainApplicationMetaDataSynced(config, androidManifest, username) { | ||
return getUpdateUrl(config, username) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.UPDATE_URL) && String(getUpdatesEnabled(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.ENABLED) && String(getUpdatesTimeout(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.LAUNCH_WAIT_MS) && getUpdatesCheckOnLaunch(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CHECK_ON_LAUNCH) && areVersionsSynced(config, androidManifest); | ||
return (0, _Updates().getUpdateUrl)(config, username) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.UPDATE_URL) && String(getUpdatesEnabled(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.ENABLED) && String(getUpdatesTimeout(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.LAUNCH_WAIT_MS) && getUpdatesCheckOnLaunch(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CHECK_ON_LAUNCH) && areVersionsSynced(config, androidManifest); | ||
} | ||
@@ -219,0 +218,0 @@ |
export declare function getSchemesFromXcodeproj(projectRoot: string): string[]; | ||
export declare function getRunnableSchemesFromXcodeproj(projectRoot: string): { | ||
export declare function getRunnableSchemesFromXcodeproj(projectRoot: string, { configuration }?: { | ||
configuration?: 'Debug' | 'Release'; | ||
}): { | ||
name: string; | ||
osType: string; | ||
type: string; | ||
@@ -5,0 +8,0 @@ }[]; |
@@ -55,8 +55,41 @@ "use strict"; | ||
function getRunnableSchemesFromXcodeproj(projectRoot) { | ||
function getRunnableSchemesFromXcodeproj(projectRoot, { | ||
configuration = 'Debug' | ||
} = {}) { | ||
const project = (0, _Xcodeproj().getPbxproj)(projectRoot); | ||
return (0, _Target().findSignableTargets)(project).map(([, target]) => ({ | ||
name: (0, _Xcodeproj().unquote)(target.name), | ||
type: (0, _Xcodeproj().unquote)(target.productType) | ||
})); | ||
return (0, _Target().findSignableTargets)(project).map(([, target]) => { | ||
let osType = 'iOS'; | ||
const type = (0, _Xcodeproj().unquote)(target.productType); | ||
if (type === _Target().TargetType.APPLICATION) { | ||
// Attempt to resolve the platform SDK for each target so we can filter devices. | ||
const xcConfigurationList = project.hash.project.objects.XCConfigurationList[target.buildConfigurationList]; | ||
if (xcConfigurationList) { | ||
const buildConfiguration = xcConfigurationList.buildConfigurations.find(value => value.comment === configuration) || xcConfigurationList.buildConfigurations[0]; | ||
if (buildConfiguration !== null && buildConfiguration !== void 0 && buildConfiguration.value) { | ||
var _project$hash$project; | ||
const xcBuildConfiguration = (_project$hash$project = project.hash.project.objects.XCBuildConfiguration) === null || _project$hash$project === void 0 ? void 0 : _project$hash$project[buildConfiguration.value]; | ||
const buildSdkRoot = xcBuildConfiguration.buildSettings.SDKROOT; | ||
if (buildSdkRoot === 'appletvos' || 'TVOS_DEPLOYMENT_TARGET' in xcBuildConfiguration.buildSettings) { | ||
// Is a TV app... | ||
osType = 'tvOS'; | ||
} else if (buildSdkRoot === 'iphoneos') { | ||
osType = 'iOS'; | ||
} | ||
} | ||
} | ||
} else if (type === _Target().TargetType.WATCH) { | ||
osType = 'watchOS'; | ||
} | ||
return { | ||
name: (0, _Xcodeproj().unquote)(target.name), | ||
osType, | ||
type: (0, _Xcodeproj().unquote)(target.productType) | ||
}; | ||
}); | ||
} | ||
@@ -63,0 +96,0 @@ |
@@ -6,2 +6,3 @@ import { PBXNativeTarget, XCBuildConfiguration, XcodeProject } from 'xcode'; | ||
EXTENSION = "com.apple.product-type.app-extension", | ||
WATCH = "com.apple.product-type.application.watchapp", | ||
STICKER_PACK_EXTENSION = "com.apple.product-type.app-extension.messages-sticker-pack", | ||
@@ -8,0 +9,0 @@ OTHER = "other" |
@@ -41,2 +41,3 @@ "use strict"; | ||
TargetType["EXTENSION"] = "com.apple.product-type.app-extension"; | ||
TargetType["WATCH"] = "com.apple.product-type.application.watchapp"; | ||
TargetType["STICKER_PACK_EXTENSION"] = "com.apple.product-type.app-extension.messages-sticker-pack"; | ||
@@ -93,3 +94,3 @@ TargetType["OTHER"] = "other"; | ||
const targets = getNativeTargets(project); | ||
const applicationTargets = targets.filter(([, target]) => isTargetOfType(target, TargetType.APPLICATION) || isTargetOfType(target, TargetType.EXTENSION) || isTargetOfType(target, TargetType.STICKER_PACK_EXTENSION)); | ||
const applicationTargets = targets.filter(([, target]) => isTargetOfType(target, TargetType.APPLICATION) || isTargetOfType(target, TargetType.EXTENSION) || isTargetOfType(target, TargetType.WATCH) || isTargetOfType(target, TargetType.STICKER_PACK_EXTENSION)); | ||
@@ -96,0 +97,0 @@ if (applicationTargets.length === 0) { |
@@ -16,3 +16,2 @@ import { ExpoConfig } from '@expo/config-types'; | ||
} | ||
export declare function getUpdateUrl(config: Pick<ExpoConfigUpdates, 'owner' | 'slug'>, username: string | null): string | null; | ||
export declare function getRuntimeVersion(config: Pick<ExpoConfigUpdates, 'runtimeVersion'>): string | null; | ||
@@ -19,0 +18,0 @@ export declare function getSDKVersion(config: Pick<ExpoConfigUpdates, 'sdkVersion'>): string | null; |
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
exports.getUpdateUrl = getUpdateUrl; | ||
exports.getRuntimeVersion = getRuntimeVersion; | ||
@@ -53,2 +52,12 @@ exports.getSDKVersion = getSDKVersion; | ||
function _Updates() { | ||
const data = require("../utils/Updates"); | ||
_Updates = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -75,12 +84,2 @@ | ||
function getUpdateUrl(config, username) { | ||
const user = typeof config.owner === 'string' ? config.owner : username; | ||
if (!user) { | ||
return null; | ||
} | ||
return `https://exp.host/@${user}/${config.slug}`; | ||
} | ||
function getRuntimeVersion(config) { | ||
@@ -135,3 +134,3 @@ return typeof config.runtimeVersion === 'string' ? config.runtimeVersion : null; | ||
}; | ||
const updateUrl = getUpdateUrl(config, username); | ||
const updateUrl = (0, _Updates().getUpdateUrl)(config, username); | ||
@@ -217,3 +216,3 @@ if (updateUrl) { | ||
function isPlistConfigurationSynced(config, expoPlist, username) { | ||
return getUpdateUrl(config, username) === expoPlist.EXUpdatesURL && getUpdatesEnabled(config) === expoPlist.EXUpdatesEnabled && getUpdatesTimeout(config) === expoPlist.EXUpdatesLaunchWaitMs && getUpdatesCheckOnLaunch(config) === expoPlist.EXUpdatesCheckOnLaunch && isPlistVersionConfigurationSynced(config, expoPlist); | ||
return (0, _Updates().getUpdateUrl)(config, username) === expoPlist.EXUpdatesURL && getUpdatesEnabled(config) === expoPlist.EXUpdatesEnabled && getUpdatesTimeout(config) === expoPlist.EXUpdatesLaunchWaitMs && getUpdatesCheckOnLaunch(config) === expoPlist.EXUpdatesCheckOnLaunch && isPlistVersionConfigurationSynced(config, expoPlist); | ||
} | ||
@@ -220,0 +219,0 @@ |
{ | ||
"name": "@expo/config-plugins", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "A library for Expo config plugins", | ||
@@ -36,3 +36,3 @@ "main": "build/index.js", | ||
"@expo/config-types": "^42.0.0", | ||
"@expo/json-file": "8.2.32", | ||
"@expo/json-file": "8.2.33", | ||
"@expo/plist": "0.0.13", | ||
@@ -39,0 +39,0 @@ "debug": "^4.3.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1013676
252
12030
+ Added@expo/json-file@8.2.33(transitive)
- Removed@expo/json-file@8.2.32(transitive)
Updated@expo/json-file@8.2.33