eas-cli 0.46.0 → 0.48.1
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/README.md +845 -2
- package/build/analytics/rudderstackClient.js +3 -3
- package/build/api.d.ts +25 -1
- package/build/api.js +70 -38
- package/build/build/android/build.js +4 -4
- package/build/build/android/prepareJob.js +2 -2
- package/build/build/android/syncProjectConfiguration.js +7 -7
- package/build/build/android/version.js +3 -3
- package/build/build/build.js +4 -4
- package/build/build/configure.js +3 -3
- package/build/build/createContext.js +2 -2
- package/build/build/ios/credentials.js +1 -1
- package/build/build/ios/graphql.js +1 -1
- package/build/build/ios/prepareJob.js +2 -2
- package/build/build/ios/syncProjectConfiguration.js +3 -3
- package/build/build/ios/version.js +3 -3
- package/build/build/local.js +3 -3
- package/build/build/metadata.js +7 -18
- package/build/build/runBuildAndSubmit.js +3 -3
- package/build/build/utils/appJson.js +3 -3
- package/build/build/utils/credentials.js +2 -2
- package/build/build/utils/devClient.js +3 -3
- package/build/build/utils/formatBuild.js +2 -2
- package/build/build/utils/printBuildInfo.js +5 -5
- package/build/build/utils/repository.js +5 -5
- package/build/build/utils/url.js +1 -1
- package/build/build/utils/version.js +4 -4
- package/build/build/validate.js +3 -3
- package/build/commandUtils/EasCommand.js +2 -2
- package/build/commands/account/login.js +2 -2
- package/build/commands/account/logout.js +2 -2
- package/build/commands/account/view.js +3 -3
- package/build/commands/analytics.js +3 -3
- package/build/commands/branch/create.js +4 -4
- package/build/commands/branch/delete.js +4 -4
- package/build/commands/branch/list.js +5 -5
- package/build/commands/branch/publish.js +1 -1
- package/build/commands/branch/rename.js +4 -4
- package/build/commands/branch/view.js +6 -6
- package/build/commands/build/cancel.js +4 -4
- package/build/commands/build/configure.js +6 -7
- package/build/commands/build/index.js +12 -8
- package/build/commands/build/inspect.js +5 -5
- package/build/commands/build/list.js +3 -3
- package/build/commands/build/view.js +2 -2
- package/build/commands/channel/create.js +12 -11
- package/build/commands/channel/delete.js +3 -3
- package/build/commands/channel/edit.js +38 -32
- package/build/commands/channel/list.js +4 -4
- package/build/commands/channel/rollout.js +50 -41
- package/build/commands/channel/view.d.ts +0 -2
- package/build/commands/channel/view.js +9 -53
- package/build/commands/config.js +3 -3
- package/build/commands/credentials.js +1 -1
- package/build/commands/device/create.js +3 -3
- package/build/commands/device/delete.js +4 -4
- package/build/commands/device/list.js +5 -5
- package/build/commands/device/view.js +3 -3
- package/build/commands/diagnostics.js +3 -3
- package/build/commands/project/info.js +4 -4
- package/build/commands/project/init.js +3 -3
- package/build/commands/secret/create.js +3 -3
- package/build/commands/secret/delete.js +2 -2
- package/build/commands/secret/list.js +5 -5
- package/build/commands/submit.js +4 -4
- package/build/commands/update/configure.d.ts +3 -0
- package/build/commands/update/configure.js +151 -36
- package/build/commands/update/delete.js +6 -6
- package/build/commands/update/index.d.ts +1 -0
- package/build/commands/update/index.js +65 -12
- package/build/commands/update/list.js +6 -6
- package/build/commands/update/view.js +4 -4
- package/build/commands/webhook/create.js +1 -1
- package/build/commands/webhook/delete.js +5 -5
- package/build/commands/webhook/list.js +3 -3
- package/build/commands/webhook/update.js +2 -2
- package/build/commands/webhook/view.js +2 -2
- package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
- package/build/credentials/android/actions/AssignFcm.js +1 -1
- package/build/credentials/android/actions/AssignGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +1 -1
- package/build/credentials/android/actions/CreateFcm.js +1 -1
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/actions/CreateKeystore.js +1 -1
- package/build/credentials/android/actions/DownloadKeystore.js +3 -3
- package/build/credentials/android/actions/RemoveFcm.js +1 -1
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/actions/RemoveKeystore.js +2 -2
- package/build/credentials/android/actions/SetUpBuildCredentials.js +2 -2
- package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +1 -1
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKey.js +2 -2
- package/build/credentials/android/actions/UpdateCredentialsJson.js +1 -1
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js +2 -2
- package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.js +2 -2
- package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.js +2 -2
- package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.js +2 -2
- package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.js +2 -2
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +2 -2
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +1 -1
- package/build/credentials/android/utils/googleServiceAccountKey.js +6 -6
- package/build/credentials/android/utils/keystore.js +9 -12
- package/build/credentials/android/utils/keystoreNew.js +2 -2
- package/build/credentials/android/utils/printCredentials.js +3 -3
- package/build/credentials/context.js +7 -7
- package/build/credentials/credentialsJson/read.js +2 -2
- package/build/credentials/credentialsJson/types.js +1 -1
- package/build/credentials/credentialsJson/update.js +6 -6
- package/build/credentials/credentialsJson/utils.js +1 -1
- package/build/credentials/ios/IosCredentialsProvider.js +2 -2
- package/build/credentials/ios/actions/AscApiKeyUtils.js +4 -4
- package/build/credentials/ios/actions/AssignAscApiKey.js +1 -1
- package/build/credentials/ios/actions/AssignPushKey.js +1 -1
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +1 -1
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +3 -3
- package/build/credentials/ios/actions/CreateAscApiKey.js +1 -1
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -3
- package/build/credentials/ios/actions/CreatePushKey.js +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +4 -4
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +1 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.js +3 -4
- package/build/credentials/ios/actions/RemoveDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/RemoveProvisioningProfile.js +2 -2
- package/build/credentials/ios/actions/RemovePushKey.d.ts +1 -2
- package/build/credentials/ios/actions/RemovePushKey.js +3 -4
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +6 -6
- package/build/credentials/ios/actions/SetUpAscApiKey.js +3 -3
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -3
- package/build/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.js +2 -2
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +4 -4
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +4 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpPushKey.js +3 -3
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +4 -4
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +3 -3
- package/build/credentials/ios/actions/UpdateCredentialsJson.js +1 -1
- package/build/credentials/ios/api/GraphqlClient.js +1 -1
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +1 -1
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js +1 -1
- package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.js +1 -1
- package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +1 -1
- package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +1 -1
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -2
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +1 -1
- package/build/credentials/ios/appstore/AppStoreApi.js +2 -2
- package/build/credentials/ios/appstore/Credentials.js +1 -1
- package/build/credentials/ios/appstore/ascApiKey.js +1 -1
- package/build/credentials/ios/appstore/authenticate.js +3 -3
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +2 -2
- package/build/credentials/ios/appstore/capabilityIdentifiers.js +1 -1
- package/build/credentials/ios/appstore/contractMessages.js +2 -2
- package/build/credentials/ios/appstore/ensureAppExists.js +2 -2
- package/build/credentials/ios/appstore/keychain.js +1 -1
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +1 -1
- package/build/credentials/ios/appstore/provisioningProfile.js +1 -1
- package/build/credentials/ios/appstore/pushKey.js +3 -3
- package/build/credentials/ios/appstore/resolveCredentials.js +5 -5
- package/build/credentials/ios/credentials.js +1 -1
- package/build/credentials/ios/utils/convertHTMLToASCII.js +4 -4
- package/build/credentials/ios/utils/p12Certificate.js +1 -1
- package/build/credentials/ios/utils/printCredentials.js +4 -4
- package/build/credentials/ios/utils/provisioningProfile.js +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -5
- package/build/credentials/manager/HelperActions.js +1 -1
- package/build/credentials/manager/ManageAndroid.js +2 -2
- package/build/credentials/manager/ManageIos.js +3 -3
- package/build/credentials/manager/SelectAndroidBuildCredentials.js +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +1 -1
- package/build/credentials/utils/promptForCredentials.js +5 -6
- package/build/devices/actions/create/action.js +2 -2
- package/build/devices/actions/create/inputMethod.js +3 -3
- package/build/devices/actions/create/registrationUrlMethod.js +4 -4
- package/build/devices/manager.js +4 -4
- package/build/devices/utils/formatDevice.js +1 -1
- package/build/fetch.d.ts +7 -0
- package/build/fetch.js +21 -0
- package/build/graphql/client.js +2 -5
- package/build/graphql/generated.d.ts +770 -703
- package/build/graphql/generated.js +6 -1
- package/build/graphql/mutations/AppMutation.js +2 -2
- package/build/graphql/mutations/BuildMutation.js +2 -2
- package/build/graphql/mutations/EnvironmentSecretMutation.js +1 -1
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +1 -1
- package/build/graphql/mutations/PublishMutation.d.ts +2 -1
- package/build/graphql/mutations/PublishMutation.js +26 -1
- package/build/graphql/mutations/SubmissionMutation.js +2 -2
- package/build/graphql/mutations/UploadSessionMutation.js +1 -1
- package/build/graphql/mutations/WebhookMutation.js +1 -1
- package/build/graphql/queries/BranchQuery.d.ts +7 -0
- package/build/graphql/queries/BranchQuery.js +29 -0
- package/build/graphql/queries/BuildQuery.js +1 -1
- package/build/graphql/queries/ChannelQuery.d.ts +4 -0
- package/build/graphql/queries/ChannelQuery.js +49 -0
- package/build/graphql/queries/EnvironmentSecretsQuery.js +1 -1
- package/build/graphql/queries/ProjectQuery.js +1 -1
- package/build/graphql/queries/PublishQuery.js +1 -1
- package/build/graphql/queries/SubmissionQuery.js +1 -1
- package/build/graphql/queries/UpdateQuery.js +1 -1
- package/build/graphql/queries/UserQuery.js +1 -1
- package/build/graphql/queries/WebhookQuery.js +1 -1
- package/build/graphql/types/App.js +1 -1
- package/build/graphql/types/Build.js +1 -1
- package/build/graphql/types/EnvironmentSecret.js +1 -1
- package/build/graphql/types/Submission.js +1 -1
- package/build/graphql/types/UpdateBranch.js +1 -1
- package/build/graphql/types/Webhook.js +1 -1
- package/build/graphql/types/credentials/AndroidAppBuildCredentials.js +1 -1
- package/build/graphql/types/credentials/AndroidAppCredentials.js +1 -1
- package/build/graphql/types/credentials/AndroidFcm.js +1 -1
- package/build/graphql/types/credentials/AndroidKeystore.js +1 -1
- package/build/graphql/types/credentials/AppStoreConnectApiKey.js +1 -1
- package/build/graphql/types/credentials/AppleAppIdentifier.js +1 -1
- package/build/graphql/types/credentials/AppleDevice.js +1 -1
- package/build/graphql/types/credentials/AppleDeviceRegistrationRequest.js +1 -1
- package/build/graphql/types/credentials/AppleDistributionCertificate.js +1 -1
- package/build/graphql/types/credentials/AppleProvisioningProfile.js +1 -1
- package/build/graphql/types/credentials/ApplePushKey.js +1 -1
- package/build/graphql/types/credentials/AppleTeam.js +1 -1
- package/build/graphql/types/credentials/GoogleServiceAccountKey.js +1 -1
- package/build/graphql/types/credentials/IosAppBuildCredentials.js +1 -1
- package/build/graphql/types/credentials/IosAppCredentials.js +1 -1
- package/build/log.js +4 -4
- package/build/ora.js +2 -2
- package/build/platform.js +1 -1
- package/build/project/android/applicationId.js +6 -6
- package/build/project/android/gradle.js +2 -2
- package/build/project/android/gradleUtils.js +2 -2
- package/build/project/ensureProjectExists.js +3 -3
- package/build/project/expoSdk.js +3 -3
- package/build/project/ios/bundleIdentifier.js +4 -4
- package/build/project/ios/scheme.js +3 -3
- package/build/project/metroConfig.js +3 -3
- package/build/project/projectUtils.d.ts +3 -5
- package/build/project/projectUtils.js +37 -38
- package/build/project/publish.js +8 -8
- package/build/project/workflow.js +2 -2
- package/build/prompts.js +1 -1
- package/build/submit/ArchiveSource.js +3 -3
- package/build/submit/BaseSubmitter.js +1 -1
- package/build/submit/android/AndroidSubmitCommand.js +3 -3
- package/build/submit/android/AndroidSubmitter.js +3 -3
- package/build/submit/android/ServiceAccountSource.js +4 -4
- package/build/submit/ios/AppProduce.js +2 -2
- package/build/submit/ios/AppSpecificPasswordSource.js +3 -4
- package/build/submit/ios/AscApiKeySource.js +2 -2
- package/build/submit/ios/CredentialsServiceSource.js +2 -2
- package/build/submit/ios/IosSubmitCommand.js +5 -5
- package/build/submit/ios/IosSubmitter.js +3 -3
- package/build/submit/ios/utils/language.js +1 -1
- package/build/submit/submit.js +4 -4
- package/build/submit/utils/errors.js +1 -1
- package/build/submit/utils/files.js +1 -1
- package/build/submit/utils/logs.js +5 -5
- package/build/submit/utils/summary.js +3 -3
- package/build/submit/utils/urls.js +2 -2
- package/build/submit/utils/wait.js +2 -2
- package/build/{build → update}/android/UpdatesModule.d.ts +0 -0
- package/build/{build → update}/android/UpdatesModule.js +4 -3
- package/build/{build → update}/ios/UpdatesModule.d.ts +0 -0
- package/build/{build → update}/ios/UpdatesModule.js +7 -8
- package/build/update/utils.d.ts +3 -0
- package/build/update/utils.js +20 -2
- package/build/uploads.d.ts +2 -10
- package/build/uploads.js +32 -12
- package/build/user/User.js +3 -5
- package/build/user/UserSettings.js +2 -2
- package/build/user/actions.js +5 -5
- package/build/user/otp.js +6 -8
- package/build/user/sessionStorage.js +1 -1
- package/build/utils/code-signing.d.ts +29 -0
- package/build/utils/code-signing.js +165 -0
- package/build/utils/expoCli.js +4 -4
- package/build/utils/files.js +3 -3
- package/build/utils/formatFields.js +1 -1
- package/build/utils/json.js +2 -2
- package/build/utils/paths.js +2 -2
- package/build/utils/plist.js +3 -3
- package/build/utils/profiles.js +2 -2
- package/build/utils/progress.d.ts +6 -3
- package/build/utils/progress.js +1 -1
- package/build/vcs/clients/git.js +3 -3
- package/build/vcs/clients/gitNoCommit.js +3 -3
- package/build/vcs/git.js +1 -1
- package/build/vcs/index.js +3 -3
- package/build/vcs/local.js +4 -4
- package/build/webhooks/formatWebhook.js +1 -1
- package/build/webhooks/input.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +33 -27
- package/build/ApiV2Error.d.ts +0 -16
- package/build/ApiV2Error.js +0 -14
- package/build/build/utils/updates.d.ts +0 -3
- package/build/build/utils/updates.js +0 -15
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readChannelSafelyAsync = exports.readReleaseChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const platform_1 = require("../../platform");
|
|
5
6
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
6
7
|
const actions_1 = require("../../user/actions");
|
|
7
|
-
const
|
|
8
|
+
const utils_1 = require("../utils");
|
|
8
9
|
async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
9
|
-
(0,
|
|
10
|
+
(0, utils_1.ensureValidVersions)(exp, platform_1.RequestedPlatform.Android);
|
|
10
11
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
11
12
|
const androidManifestPath = await config_plugins_1.AndroidConfig.Paths.getAndroidManifestAsync(projectDir);
|
|
12
13
|
const androidManifest = await getAndroidManifestAsync(projectDir);
|
|
13
|
-
const updatedAndroidManifest = config_plugins_1.AndroidConfig.Updates.setUpdatesConfig(exp, androidManifest, accountName);
|
|
14
|
+
const updatedAndroidManifest = config_plugins_1.AndroidConfig.Updates.setUpdatesConfig(projectDir, exp, androidManifest, accountName);
|
|
14
15
|
await config_plugins_1.AndroidConfig.Manifest.writeAndroidManifestAsync(androidManifestPath, updatedAndroidManifest);
|
|
15
16
|
}
|
|
16
17
|
exports.syncUpdatesConfigurationAsync = syncUpdatesConfigurationAsync;
|
|
File without changes
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readChannelSafelyAsync = exports.readReleaseChannelSafelyAsync = exports.syncUpdatesConfigurationAsync = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const platform_1 = require("../../platform");
|
|
5
6
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
6
7
|
const actions_1 = require("../../user/actions");
|
|
7
8
|
const plist_1 = require("../../utils/plist");
|
|
8
9
|
const vcs_1 = require("../../vcs");
|
|
9
|
-
const
|
|
10
|
+
const utils_1 = require("../utils");
|
|
10
11
|
async function syncUpdatesConfigurationAsync(projectDir, exp) {
|
|
11
|
-
(0,
|
|
12
|
+
(0, utils_1.ensureValidVersions)(exp, platform_1.RequestedPlatform.Ios);
|
|
12
13
|
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
13
14
|
const expoPlist = await readExpoPlistAsync(projectDir);
|
|
14
|
-
const updatedExpoPlist = config_plugins_1.IOSConfig.Updates.setUpdatesConfig(exp, expoPlist, accountName);
|
|
15
|
+
const updatedExpoPlist = config_plugins_1.IOSConfig.Updates.setUpdatesConfig(projectDir, exp, expoPlist, accountName);
|
|
15
16
|
await writeExpoPlistAsync(projectDir, updatedExpoPlist);
|
|
16
17
|
}
|
|
17
18
|
exports.syncUpdatesConfigurationAsync = syncUpdatesConfigurationAsync;
|
|
@@ -37,13 +38,11 @@ async function readReleaseChannelSafelyAsync(projectDir) {
|
|
|
37
38
|
}
|
|
38
39
|
exports.readReleaseChannelSafelyAsync = readReleaseChannelSafelyAsync;
|
|
39
40
|
async function readChannelSafelyAsync(projectDir) {
|
|
40
|
-
var _a
|
|
41
|
+
var _a;
|
|
41
42
|
try {
|
|
42
|
-
// TODO-JJ remove any once IOSConfig.ExpoPlist is updated to include `EXUpdatesRequestHeaders : Record<string,string>`
|
|
43
43
|
const expoPlist = await readExpoPlistAsync(projectDir);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return (_b = updatesRequestHeaders['expo-channel-name']) !== null && _b !== void 0 ? _b : null;
|
|
44
|
+
const updatesRequestHeaders = expoPlist['EXUpdatesRequestHeaders'];
|
|
45
|
+
return (_a = updatesRequestHeaders['expo-channel-name']) !== null && _a !== void 0 ? _a : null;
|
|
47
46
|
}
|
|
48
47
|
catch (err) {
|
|
49
48
|
return null;
|
package/build/update/utils.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ExpoConfig } from '@expo/config';
|
|
1
2
|
import { Maybe, Robot, Update, User } from '../graphql/generated';
|
|
3
|
+
import { RequestedPlatform } from '../platform';
|
|
2
4
|
export declare type FormatUpdateParameter = Pick<Update, 'id' | 'createdAt' | 'message'> & {
|
|
3
5
|
actor?: Maybe<Pick<User, 'username' | 'id'> | Pick<Robot, 'firstName' | 'id'>>;
|
|
4
6
|
};
|
|
@@ -11,3 +13,4 @@ export declare function getPlatformsForGroup({ group, updates, }: {
|
|
|
11
13
|
}[];
|
|
12
14
|
}): string;
|
|
13
15
|
export declare function formatUpdate(update: FormatUpdateParameter): string;
|
|
16
|
+
export declare function ensureValidVersions(exp: ExpoConfig, platform: RequestedPlatform): void;
|
package/build/update/utils.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatUpdate = exports.getPlatformsForGroup = exports.UPDATE_COLUMNS = void 0;
|
|
3
|
+
exports.ensureValidVersions = exports.formatUpdate = exports.getPlatformsForGroup = exports.UPDATE_COLUMNS = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const timeago_js_1 = require("@expo/timeago.js");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const log_1 = require("../log");
|
|
8
|
+
const platform_1 = require("../platform");
|
|
6
9
|
const User_1 = require("../user/User");
|
|
7
|
-
const groupBy_1 =
|
|
10
|
+
const groupBy_1 = tslib_1.__importDefault(require("../utils/expodash/groupBy"));
|
|
8
11
|
exports.UPDATE_COLUMNS = [
|
|
9
12
|
'Update message',
|
|
10
13
|
'Update runtime version',
|
|
@@ -30,3 +33,18 @@ function formatUpdate(update) {
|
|
|
30
33
|
return `${message}(${(0, timeago_js_1.format)(update.createdAt, 'en_US')} by ${(0, User_1.getActorDisplayName)(update.actor)})`;
|
|
31
34
|
}
|
|
32
35
|
exports.formatUpdate = formatUpdate;
|
|
36
|
+
function ensureValidVersions(exp, platform) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const error = new Error(`Couldn't find either ${chalk_1.default.bold('runtimeVersion')} or ${chalk_1.default.bold('sdkVersion')} to configure ${chalk_1.default.bold('expo-updates')}. Please specify at least one of these properties under the ${chalk_1.default.bold('expo')} key in ${chalk_1.default.bold('app.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/eas-update/runtime-versions/')}`);
|
|
39
|
+
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform) &&
|
|
40
|
+
!(((_a = exp.android) === null || _a === void 0 ? void 0 : _a.runtimeVersion) || exp.runtimeVersion) &&
|
|
41
|
+
!exp.sdkVersion) {
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform) &&
|
|
45
|
+
!(((_b = exp.ios) === null || _b === void 0 ? void 0 : _b.runtimeVersion) || exp.runtimeVersion) &&
|
|
46
|
+
!exp.sdkVersion) {
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ensureValidVersions = ensureValidVersions;
|
package/build/uploads.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Progress } from 'got';
|
|
3
|
-
import { Readable } from 'stream';
|
|
4
1
|
import { UploadSessionType } from './graphql/generated';
|
|
5
2
|
import { PresignedPost } from './graphql/mutations/UploadSessionMutation';
|
|
6
|
-
|
|
7
|
-
progress?: Progress;
|
|
8
|
-
isComplete?: boolean;
|
|
9
|
-
error?: Error;
|
|
10
|
-
}) => void;
|
|
3
|
+
import { ProgressHandler } from './utils/progress';
|
|
11
4
|
export declare function uploadAsync(type: UploadSessionType, path: string, handleProgressEvent: ProgressHandler): Promise<{
|
|
12
5
|
url: string;
|
|
13
6
|
bucketKey: string;
|
|
14
7
|
}>;
|
|
15
|
-
export declare function uploadWithPresignedPostAsync(
|
|
16
|
-
export {};
|
|
8
|
+
export declare function uploadWithPresignedPostAsync(file: string, presignedPost: PresignedPost, handleProgressEvent?: ProgressHandler): Promise<string>;
|
package/build/uploads.js
CHANGED
|
@@ -2,39 +2,59 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uploadWithPresignedPostAsync = exports.uploadAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 =
|
|
6
|
-
const form_data_1 =
|
|
7
|
-
const fs_extra_1 =
|
|
8
|
-
const
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
const form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
7
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
|
+
const fetch_1 = tslib_1.__importDefault(require("./fetch"));
|
|
9
9
|
const UploadSessionMutation_1 = require("./graphql/mutations/UploadSessionMutation");
|
|
10
10
|
async function uploadAsync(type, path, handleProgressEvent) {
|
|
11
11
|
const presignedPost = await UploadSessionMutation_1.UploadSessionMutation.createUploadSessionAsync(type);
|
|
12
|
-
const url = await uploadWithPresignedPostAsync(
|
|
12
|
+
const url = await uploadWithPresignedPostAsync(path, presignedPost, handleProgressEvent);
|
|
13
13
|
(0, assert_1.default)(presignedPost.fields.key, 'key is not specified in in presigned post');
|
|
14
14
|
return { url, bucketKey: presignedPost.fields.key };
|
|
15
15
|
}
|
|
16
16
|
exports.uploadAsync = uploadAsync;
|
|
17
|
-
async function uploadWithPresignedPostAsync(
|
|
17
|
+
async function uploadWithPresignedPostAsync(file, presignedPost, handleProgressEvent) {
|
|
18
|
+
const fileStat = await fs_extra_1.default.stat(file);
|
|
19
|
+
const fileSize = fileStat.size;
|
|
18
20
|
const form = new form_data_1.default();
|
|
19
21
|
for (const [fieldKey, fieldValue] of Object.entries(presignedPost.fields)) {
|
|
20
22
|
form.append(fieldKey, fieldValue);
|
|
21
23
|
}
|
|
22
|
-
form.append('file',
|
|
24
|
+
form.append('file', fs_extra_1.default.createReadStream(file), { knownLength: fileSize });
|
|
23
25
|
const formHeaders = form.getHeaders();
|
|
24
|
-
|
|
26
|
+
const uploadPromise = (0, fetch_1.default)(presignedPost.url, {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
body: form,
|
|
29
|
+
headers: {
|
|
30
|
+
...formHeaders,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
let currentSize = 0;
|
|
25
34
|
if (handleProgressEvent) {
|
|
26
|
-
|
|
35
|
+
form.addListener('data', (chunk) => {
|
|
36
|
+
currentSize += Buffer.byteLength(chunk);
|
|
37
|
+
handleProgressEvent({
|
|
38
|
+
progress: {
|
|
39
|
+
total: fileSize,
|
|
40
|
+
percent: currentSize / fileSize,
|
|
41
|
+
transferred: currentSize,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
});
|
|
27
45
|
try {
|
|
28
46
|
const response = await uploadPromise;
|
|
29
47
|
handleProgressEvent({ isComplete: true });
|
|
30
|
-
return String(response.headers.location);
|
|
48
|
+
return String(response.headers.get('location'));
|
|
31
49
|
}
|
|
32
50
|
catch (error) {
|
|
33
51
|
handleProgressEvent({ isComplete: true, error });
|
|
34
52
|
throw error;
|
|
35
53
|
}
|
|
36
54
|
}
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
else {
|
|
56
|
+
const response = await uploadPromise;
|
|
57
|
+
return String(response.headers.get('location'));
|
|
58
|
+
}
|
|
39
59
|
}
|
|
40
60
|
exports.uploadWithPresignedPostAsync = uploadWithPresignedPostAsync;
|
package/build/user/User.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logoutAsync = exports.loginAsync = exports.getUserAsync = exports.getActorDisplayName = exports.getAccessToken = exports.getSessionSecret = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_tag_1 =
|
|
6
|
-
const Analytics =
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
const Analytics = tslib_1.__importStar(require("../analytics/rudderstackClient"));
|
|
7
7
|
const api_1 = require("../api");
|
|
8
8
|
const client_1 = require("../graphql/client");
|
|
9
9
|
const UserQuery_1 = require("../graphql/queries/UserQuery");
|
|
@@ -43,9 +43,7 @@ async function getUserAsync() {
|
|
|
43
43
|
}
|
|
44
44
|
exports.getUserAsync = getUserAsync;
|
|
45
45
|
async function loginAsync({ username, password, otp, }) {
|
|
46
|
-
const body = await api_1.
|
|
47
|
-
.post('auth/loginAsync', { json: { username, password, otp } })
|
|
48
|
-
.json();
|
|
46
|
+
const body = await api_1.api.postAsync('auth/loginAsync', { body: { username, password, otp } });
|
|
49
47
|
const { sessionSecret } = body.data;
|
|
50
48
|
const result = await client_1.graphqlClient
|
|
51
49
|
.query((0, graphql_tag_1.default) `
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const json_file_1 =
|
|
5
|
-
const path_1 =
|
|
4
|
+
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const paths_1 = require("../utils/paths");
|
|
7
7
|
const SETTINGS_FILE_PATH = path_1.default.join((0, paths_1.getConfigDirectory)(), 'user-settings.json');
|
|
8
8
|
const UserSettings = new json_file_1.default(SETTINGS_FILE_PATH, {
|
package/build/user/actions.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ensureActorHasUsername = exports.ensureLoggedInAsync = exports.showLoginPromptAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
|
-
const chalk_1 =
|
|
7
|
-
const nullthrows_1 =
|
|
8
|
-
const
|
|
9
|
-
const log_1 =
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
8
|
+
const api_1 = require("../api");
|
|
9
|
+
const log_1 = tslib_1.__importStar(require("../log"));
|
|
10
10
|
const prompts_1 = require("../prompts");
|
|
11
11
|
const User_1 = require("./User");
|
|
12
12
|
const otp_1 = require("./otp");
|
|
@@ -37,7 +37,7 @@ async function showLoginPromptAsync({ nonInteractive = false, printNewLine = fal
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
catch (e) {
|
|
40
|
-
if (e instanceof
|
|
40
|
+
if (e instanceof api_1.ApiV2Error && e.expoApiV2ErrorCode === 'ONE_TIME_PASSWORD_REQUIRED') {
|
|
41
41
|
await (0, otp_1.retryUsernamePasswordAuthWithOTPAsync)(username, password, e.expoApiV2ErrorMetadata);
|
|
42
42
|
}
|
|
43
43
|
else {
|
package/build/user/otp.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.retryUsernamePasswordAuthWithOTPAsync = exports.UserSecondFactorDeviceMethod = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 =
|
|
6
|
-
const chalk_1 =
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
7
|
const api_1 = require("../api");
|
|
8
|
-
const log_1 =
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
9
9
|
const prompts_1 = require("../prompts");
|
|
10
10
|
const User_1 = require("./User");
|
|
11
11
|
var UserSecondFactorDeviceMethod;
|
|
@@ -65,15 +65,13 @@ async function promptForBackupOTPAsync(username, password, secondFactorDevices)
|
|
|
65
65
|
return await promptForOTPAsync('cancel');
|
|
66
66
|
}
|
|
67
67
|
const device = smsNonPrimarySecondFactorDevices[selectedValue];
|
|
68
|
-
await api_1.
|
|
69
|
-
|
|
70
|
-
json: {
|
|
68
|
+
await api_1.api.postAsync('auth/send-sms-otp', {
|
|
69
|
+
body: {
|
|
71
70
|
username,
|
|
72
71
|
password,
|
|
73
72
|
secondFactorDeviceID: device.id,
|
|
74
73
|
},
|
|
75
|
-
})
|
|
76
|
-
.json();
|
|
74
|
+
});
|
|
77
75
|
return await promptForOTPAsync('cancel');
|
|
78
76
|
}
|
|
79
77
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSessionSecret = exports.getAccessToken = exports.setSessionAsync = exports.getSession = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const json_file_1 =
|
|
5
|
+
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
6
6
|
const paths_1 = require("../utils/paths");
|
|
7
7
|
function getSession() {
|
|
8
8
|
var _a, _b;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { pki as PKI } from 'node-forge';
|
|
3
|
+
import { Response } from '../fetch';
|
|
4
|
+
import { PartialManifest } from '../graphql/generated';
|
|
5
|
+
declare type CodeSigningInfo = {
|
|
6
|
+
privateKey: PKI.rsa.PrivateKey;
|
|
7
|
+
certificate: PKI.Certificate;
|
|
8
|
+
codeSigningMetadata: {
|
|
9
|
+
alg: string;
|
|
10
|
+
keyid: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function getCodeSigningInfoAsync(config: ExpoConfig, privateKeyPath: string | undefined): Promise<CodeSigningInfo | undefined>;
|
|
14
|
+
export declare function getKeyAndCertificateFromPathsAsync({ codeSigningCertificatePath, privateKeyPath, }: {
|
|
15
|
+
codeSigningCertificatePath: string;
|
|
16
|
+
privateKeyPath: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
privateKey: PKI.rsa.PrivateKey;
|
|
19
|
+
certificate: PKI.Certificate;
|
|
20
|
+
}>;
|
|
21
|
+
export declare type MultipartPart = {
|
|
22
|
+
headers: Map<string, string>;
|
|
23
|
+
body: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function parseMultipartMixedResponseAsync(res: Response): Promise<MultipartPart[]>;
|
|
26
|
+
export declare function getManifestBodyAsync(res: Response): Promise<string | null>;
|
|
27
|
+
export declare function signManifestBody(body: string, codeSigningInfo: CodeSigningInfo): string;
|
|
28
|
+
export declare function checkManifestBodyAgainstUpdateInfoGroup(manifestResponseBody: string, partialManifest: PartialManifest): void;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkManifestBodyAgainstUpdateInfoGroup = exports.signManifestBody = exports.getManifestBodyAsync = exports.parseMultipartMixedResponseAsync = exports.getKeyAndCertificateFromPathsAsync = exports.getCodeSigningInfoAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const code_signing_certificates_1 = require("@expo/code-signing-certificates");
|
|
6
|
+
const dicer_1 = tslib_1.__importDefault(require("dicer"));
|
|
7
|
+
const fast_deep_equal_1 = tslib_1.__importDefault(require("fast-deep-equal"));
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
10
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
+
const stream_1 = require("stream");
|
|
12
|
+
const structured_headers_1 = require("structured-headers");
|
|
13
|
+
async function getCodeSigningInfoAsync(config, privateKeyPath) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const codeSigningCertificatePath = (_a = config.updates) === null || _a === void 0 ? void 0 : _a.codeSigningCertificate;
|
|
16
|
+
if (!codeSigningCertificatePath) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
if (!privateKeyPath) {
|
|
20
|
+
privateKeyPath = path_1.default.join(path_1.default.dirname(codeSigningCertificatePath), 'private-key.pem');
|
|
21
|
+
}
|
|
22
|
+
const codeSigningMetadata = (_b = config.updates) === null || _b === void 0 ? void 0 : _b.codeSigningMetadata;
|
|
23
|
+
if (!codeSigningMetadata) {
|
|
24
|
+
throw new Error('Must specify codeSigningMetadata under the "updates" field of your app config file to use EAS code signing');
|
|
25
|
+
}
|
|
26
|
+
const { alg, keyid } = codeSigningMetadata;
|
|
27
|
+
if (!alg || !keyid) {
|
|
28
|
+
throw new Error('Must specify keyid and alg in the codeSigningMetadata field under the "updates" field of your app config file to use EAS code signing');
|
|
29
|
+
}
|
|
30
|
+
return codeSigningCertificatePath && privateKeyPath
|
|
31
|
+
? {
|
|
32
|
+
...(await getKeyAndCertificateFromPathsAsync({
|
|
33
|
+
codeSigningCertificatePath,
|
|
34
|
+
privateKeyPath,
|
|
35
|
+
})),
|
|
36
|
+
codeSigningMetadata: {
|
|
37
|
+
alg,
|
|
38
|
+
keyid,
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
: undefined;
|
|
42
|
+
}
|
|
43
|
+
exports.getCodeSigningInfoAsync = getCodeSigningInfoAsync;
|
|
44
|
+
async function readFileAsync(path, errorMessage) {
|
|
45
|
+
try {
|
|
46
|
+
return await fs_1.promises.readFile(path, 'utf8');
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
throw new Error(errorMessage);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function getKeyAndCertificateFromPathsAsync({ codeSigningCertificatePath, privateKeyPath, }) {
|
|
53
|
+
const [codeSigningCertificatePEM, privateKeyPEM] = await Promise.all([
|
|
54
|
+
readFileAsync(codeSigningCertificatePath, `Code signing certificate cannot be read from path: ${codeSigningCertificatePath}`),
|
|
55
|
+
readFileAsync(privateKeyPath, `Code signing private key cannot be read from path: ${privateKeyPath}`),
|
|
56
|
+
]);
|
|
57
|
+
const privateKey = (0, code_signing_certificates_1.convertPrivateKeyPEMToPrivateKey)(privateKeyPEM);
|
|
58
|
+
const certificate = (0, code_signing_certificates_1.convertCertificatePEMToCertificate)(codeSigningCertificatePEM);
|
|
59
|
+
(0, code_signing_certificates_1.validateSelfSignedCertificate)(certificate, {
|
|
60
|
+
publicKey: certificate.publicKey,
|
|
61
|
+
privateKey,
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
privateKey,
|
|
65
|
+
certificate,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.getKeyAndCertificateFromPathsAsync = getKeyAndCertificateFromPathsAsync;
|
|
69
|
+
async function parseMultipartMixedResponseAsync(res) {
|
|
70
|
+
var _a;
|
|
71
|
+
const contentType = res.headers.get('content-type');
|
|
72
|
+
if (!contentType) {
|
|
73
|
+
throw new Error('The multipart manifest response is missing the content-type header');
|
|
74
|
+
}
|
|
75
|
+
const boundaryRegex = /^multipart\/.+?; boundary=(?:"([^"]+)"|([^\s;]+))/i;
|
|
76
|
+
const matches = boundaryRegex.exec(contentType);
|
|
77
|
+
if (!matches) {
|
|
78
|
+
throw new Error('The content-type header in the HTTP response is not a multipart media type');
|
|
79
|
+
}
|
|
80
|
+
const boundary = (_a = matches[1]) !== null && _a !== void 0 ? _a : matches[2];
|
|
81
|
+
const bodyBuffer = await res.arrayBuffer();
|
|
82
|
+
const bufferStream = new stream_1.Stream.PassThrough();
|
|
83
|
+
bufferStream.end(bodyBuffer);
|
|
84
|
+
return await new Promise((resolve, reject) => {
|
|
85
|
+
const parts = [];
|
|
86
|
+
bufferStream.pipe(new dicer_1.default({ boundary })
|
|
87
|
+
.on('part', p => {
|
|
88
|
+
const part = {
|
|
89
|
+
body: '',
|
|
90
|
+
headers: new Map(),
|
|
91
|
+
};
|
|
92
|
+
p.on('header', headers => {
|
|
93
|
+
for (const h in headers) {
|
|
94
|
+
part.headers.set(h, headers[h][0]);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
p.on('data', data => {
|
|
98
|
+
part.body += data.toString();
|
|
99
|
+
});
|
|
100
|
+
p.on('end', () => {
|
|
101
|
+
parts.push(part);
|
|
102
|
+
});
|
|
103
|
+
})
|
|
104
|
+
.on('finish', () => {
|
|
105
|
+
resolve(parts);
|
|
106
|
+
})
|
|
107
|
+
.on('error', error => {
|
|
108
|
+
reject(error);
|
|
109
|
+
}));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
exports.parseMultipartMixedResponseAsync = parseMultipartMixedResponseAsync;
|
|
113
|
+
function isManifestMultipartPart(multipartPart) {
|
|
114
|
+
const [, parameters] = (0, structured_headers_1.parseItem)((0, nullthrows_1.default)(multipartPart.headers.get('content-disposition')));
|
|
115
|
+
const partName = parameters.get('name');
|
|
116
|
+
return partName === 'manifest';
|
|
117
|
+
}
|
|
118
|
+
async function getManifestBodyAsync(res) {
|
|
119
|
+
var _a;
|
|
120
|
+
const multipartParts = await parseMultipartMixedResponseAsync(res);
|
|
121
|
+
const manifestPart = multipartParts.find(isManifestMultipartPart);
|
|
122
|
+
return (_a = manifestPart === null || manifestPart === void 0 ? void 0 : manifestPart.body) !== null && _a !== void 0 ? _a : null;
|
|
123
|
+
}
|
|
124
|
+
exports.getManifestBodyAsync = getManifestBodyAsync;
|
|
125
|
+
function signManifestBody(body, codeSigningInfo) {
|
|
126
|
+
return (0, code_signing_certificates_1.signStringRSASHA256AndVerify)(codeSigningInfo.privateKey, codeSigningInfo.certificate, body);
|
|
127
|
+
}
|
|
128
|
+
exports.signManifestBody = signManifestBody;
|
|
129
|
+
function assertAssetParity(manifestResponseBodyAssetJSON, partialManifestAsset) {
|
|
130
|
+
const baseErrorMessage = `Code signing manifest integrity error: Manifest asset tamper detected for asset: ${partialManifestAsset.bundleKey}; field: `;
|
|
131
|
+
if (manifestResponseBodyAssetJSON.hash !== partialManifestAsset.fileSHA256) {
|
|
132
|
+
throw new Error(baseErrorMessage + 'hash');
|
|
133
|
+
}
|
|
134
|
+
if (manifestResponseBodyAssetJSON.contentType !== partialManifestAsset.contentType) {
|
|
135
|
+
throw new Error(baseErrorMessage + 'contentType');
|
|
136
|
+
}
|
|
137
|
+
if (manifestResponseBodyAssetJSON.key !== partialManifestAsset.bundleKey) {
|
|
138
|
+
throw new Error(baseErrorMessage + 'key');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function checkManifestBodyAgainstUpdateInfoGroup(manifestResponseBody, partialManifest) {
|
|
142
|
+
var _a, _b;
|
|
143
|
+
const manifestResponseBodyJSON = JSON.parse(manifestResponseBody);
|
|
144
|
+
// Assert expoClient config is equal. We do not want to sign the manifest if the
|
|
145
|
+
// server has compromised the integrity of the manifest.
|
|
146
|
+
// JSON stringify and unstringify to remove any undefined values and bring it as close
|
|
147
|
+
// to the server sanitized value as possible
|
|
148
|
+
const isExtraEqual = (0, fast_deep_equal_1.default)(JSON.parse(JSON.stringify((_a = partialManifest.extra) === null || _a === void 0 ? void 0 : _a.expoClient)), (_b = manifestResponseBodyJSON.extra) === null || _b === void 0 ? void 0 : _b.expoClient);
|
|
149
|
+
if (!isExtraEqual) {
|
|
150
|
+
throw new Error(`Code signing manifest integrity error: The manifest being signed contains an extra.expoClient field that does not match the initially uploaded manifest's extra.expoClient field`);
|
|
151
|
+
}
|
|
152
|
+
assertAssetParity(manifestResponseBodyJSON.launchAsset, partialManifest.launchAsset);
|
|
153
|
+
if (manifestResponseBodyJSON.assets.length !== partialManifest.assets.length) {
|
|
154
|
+
throw new Error('Code signing manifest integrity error: The manifest being signed has an assets array of differing length from the initially uploaded manifest');
|
|
155
|
+
}
|
|
156
|
+
for (const partialManifestAsset of partialManifest.assets) {
|
|
157
|
+
const partialManifestAssetBundleKey = (0, nullthrows_1.default)(partialManifestAsset).bundleKey;
|
|
158
|
+
const correspondingManifestResponseBodyAssetJSON = manifestResponseBodyJSON.assets.find((manifestResponseBodyAssetJSON) => manifestResponseBodyAssetJSON.key === partialManifestAssetBundleKey);
|
|
159
|
+
if (!correspondingManifestResponseBodyAssetJSON) {
|
|
160
|
+
throw new Error(`Code signing manifest integrity error: The manifest being signed has is missing an asset specified in the initially uploaded manifest: ${partialManifestAssetBundleKey}`);
|
|
161
|
+
}
|
|
162
|
+
assertAssetParity(correspondingManifestResponseBodyAssetJSON, (0, nullthrows_1.default)(partialManifestAsset));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.checkManifestBodyAgainstUpdateInfoGroup = checkManifestBodyAgainstUpdateInfoGroup;
|
package/build/utils/expoCli.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.expoCommandAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const spawn_async_1 =
|
|
6
|
-
const chalk_1 =
|
|
7
|
-
const resolve_from_1 =
|
|
8
|
-
const log_1 =
|
|
5
|
+
const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
9
9
|
async function expoCommandAsync(projectDir, args, { silent = false } = {}) {
|
|
10
10
|
const expoCliPath = (0, resolve_from_1.default)(projectDir, 'expo/bin/cli.js');
|
|
11
11
|
const spawnPromise = (0, spawn_async_1.default)(expoCliPath, args, {
|
package/build/utils/files.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.formatBytes = exports.maybeRenameExistingFileAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 =
|
|
6
|
-
const path_1 =
|
|
7
|
-
const log_1 =
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
8
|
function getRenamedFilename(filename, num) {
|
|
9
9
|
const ext = path_1.default.extname(filename);
|
|
10
10
|
const basename = path_1.default.basename(filename, ext);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const chalk_1 =
|
|
4
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
5
5
|
function formatFields(fields, options = { labelFormat: chalk_1.default.dim }) {
|
|
6
6
|
const columnWidth = fields.reduce((a, b) => (a.label.length > b.label.length ? a : b)).label
|
|
7
7
|
.length;
|
package/build/utils/json.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printJsonOnlyOutput = exports.enableJsonOutput = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 =
|
|
6
|
-
const log_1 =
|
|
5
|
+
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
7
7
|
let stdoutWrite;
|
|
8
8
|
function enableJsonOutput() {
|
|
9
9
|
if (stdoutWrite) {
|
package/build/utils/paths.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getStateJsonPath = exports.getTmpDirectory = exports.getLogDirectory = exports.getCacheDirectory = exports.getConfigDirectory = exports.getDataDirectory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const env_paths_1 =
|
|
5
|
+
const env_paths_1 = tslib_1.__importDefault(require("env-paths"));
|
|
6
6
|
const os_1 = require("os");
|
|
7
|
-
const path =
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
8
|
// The ~/.expo directory is used to store authentication sessions,
|
|
9
9
|
// which are shared between EAS CLI and Expo CLI.
|
|
10
10
|
function dotExpoHomeDirectory() {
|
package/build/utils/plist.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writePlistAsync = exports.readPlistAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const plist_1 =
|
|
6
|
-
const fs_extra_1 =
|
|
7
|
-
const path_1 =
|
|
5
|
+
const plist_1 = tslib_1.__importDefault(require("@expo/plist"));
|
|
6
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
8
|
async function readPlistAsync(plistPath) {
|
|
9
9
|
if (await fs_extra_1.default.pathExists(plistPath)) {
|
|
10
10
|
const expoPlistContent = await fs_extra_1.default.readFile(plistPath, 'utf8');
|
package/build/utils/profiles.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProfilesAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_json_1 = require("@expo/eas-json");
|
|
6
|
-
const chalk_1 =
|
|
7
|
-
const log_1 =
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
8
|
const prompts_1 = require("../prompts");
|
|
9
9
|
async function getProfilesAsync({ projectDir, platforms, profileName, type, }) {
|
|
10
10
|
const results = platforms.map(async function (platform) {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare type Progress = {
|
|
2
|
+
total: number;
|
|
3
|
+
percent: number;
|
|
4
|
+
transferred: number;
|
|
5
|
+
};
|
|
6
|
+
export declare type ProgressHandler = (props: {
|
|
3
7
|
progress?: Progress;
|
|
4
8
|
isComplete?: boolean;
|
|
5
9
|
error?: Error;
|
|
@@ -9,4 +13,3 @@ export declare function createProgressTracker({ total, message, completedMessage
|
|
|
9
13
|
message: string | ((ratio: number) => string);
|
|
10
14
|
completedMessage: string | ((duration: string) => string);
|
|
11
15
|
}): ProgressHandler;
|
|
12
|
-
export {};
|
package/build/utils/progress.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createProgressTracker = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const chalk_1 =
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
6
|
const ora_1 = require("../ora");
|
|
7
7
|
const timer_1 = require("./timer");
|
|
8
8
|
function createProgressTracker({ total, message, completedMessage, }) {
|
package/build/vcs/clients/git.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isGitCaseSensitiveAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const spawn_async_1 =
|
|
5
|
+
const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
6
6
|
const core_1 = require("@oclif/core");
|
|
7
|
-
const chalk_1 =
|
|
8
|
-
const log_1 =
|
|
7
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
8
|
+
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
9
9
|
const ora_1 = require("../../ora");
|
|
10
10
|
const prompts_1 = require("../../prompts");
|
|
11
11
|
const git_1 = require("../git");
|