eas-cli 2.0.0 → 2.2.0
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 +8 -1034
- package/build/branch/queries.d.ts +10 -2
- package/build/branch/queries.js +27 -24
- package/build/branch/utils.d.ts +4 -0
- package/build/branch/utils.js +15 -0
- package/build/build/android/build.js +3 -3
- package/build/build/android/graphql.js +2 -1
- package/build/build/android/prepareJob.js +4 -3
- package/build/build/android/syncProjectConfiguration.d.ts +2 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/build.js +15 -4
- package/build/build/configure.js +2 -2
- package/build/build/createContext.d.ts +5 -1
- package/build/build/createContext.js +8 -14
- package/build/build/ios/build.js +2 -1
- package/build/build/ios/credentials.js +1 -1
- package/build/build/ios/graphql.js +2 -1
- package/build/build/ios/prepareJob.js +4 -3
- package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/local.js +1 -1
- package/build/build/metadata.js +1 -2
- package/build/build/queries.d.ts +9 -0
- package/build/build/queries.js +51 -0
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +15 -7
- package/build/build/utils/repository.js +5 -1
- package/build/channel/queries.d.ts +17 -0
- package/build/channel/queries.js +137 -0
- package/build/channel/utils.d.ts +22 -0
- package/build/channel/utils.js +87 -0
- package/build/commandUtils/EasCommand.d.ts +68 -7
- package/build/commandUtils/EasCommand.js +60 -79
- package/build/commandUtils/context/ActorContextField.d.ts +5 -0
- package/build/commandUtils/context/ActorContextField.js +11 -0
- package/build/commandUtils/context/ContextField.d.ts +6 -0
- package/build/commandUtils/context/ContextField.js +5 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
- package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
- package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
- package/build/commandUtils/context/ProjectDirContextField.js +11 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
- package/build/commandUtils/flags.d.ts +10 -0
- package/build/commandUtils/flags.js +23 -0
- package/build/commandUtils/pagination.d.ts +7 -4
- package/build/commandUtils/pagination.js +11 -15
- package/build/commands/account/login.d.ts +0 -2
- package/build/commands/account/login.js +2 -7
- package/build/commands/account/logout.d.ts +0 -2
- package/build/commands/account/logout.js +0 -5
- package/build/commands/account/view.d.ts +0 -2
- package/build/commands/account/view.js +0 -5
- package/build/commands/analytics.d.ts +0 -1
- package/build/commands/analytics.js +0 -4
- package/build/commands/branch/create.d.ts +4 -0
- package/build/commands/branch/create.js +18 -18
- package/build/commands/branch/delete.d.ts +4 -0
- package/build/commands/branch/delete.js +29 -26
- package/build/commands/branch/list.d.ts +5 -2
- package/build/commands/branch/list.js +13 -8
- package/build/commands/branch/rename.d.ts +5 -1
- package/build/commands/branch/rename.js +15 -13
- package/build/commands/branch/view.d.ts +5 -2
- package/build/commands/branch/view.js +31 -13
- package/build/commands/build/cancel.d.ts +7 -0
- package/build/commands/build/cancel.js +50 -23
- package/build/commands/build/configure.d.ts +3 -0
- package/build/commands/build/configure.js +12 -7
- package/build/commands/build/index.d.ts +7 -2
- package/build/commands/build/index.js +77 -15
- package/build/commands/build/inspect.d.ts +5 -0
- package/build/commands/build/inspect.js +12 -3
- package/build/commands/build/list.d.ts +7 -2
- package/build/commands/build/list.js +36 -59
- package/build/commands/build/version/set.d.ts +5 -0
- package/build/commands/build/version/set.js +22 -14
- package/build/commands/build/version/sync.d.ts +5 -0
- package/build/commands/build/version/sync.js +22 -13
- package/build/commands/build/view.d.ts +3 -0
- package/build/commands/build/view.js +20 -14
- package/build/commands/channel/create.d.ts +4 -0
- package/build/commands/channel/create.js +32 -25
- package/build/commands/channel/delete.d.ts +3 -0
- package/build/commands/channel/delete.js +36 -59
- package/build/commands/channel/edit.d.ts +7 -7
- package/build/commands/channel/edit.js +39 -72
- package/build/commands/channel/list.d.ts +6 -0
- package/build/commands/channel/list.js +20 -76
- package/build/commands/channel/rollout.d.ts +5 -1
- package/build/commands/channel/rollout.js +34 -35
- package/build/commands/channel/view.d.ts +6 -33
- package/build/commands/channel/view.js +31 -132
- package/build/commands/config.d.ts +6 -2
- package/build/commands/config.js +22 -13
- package/build/commands/credentials.d.ts +4 -0
- package/build/commands/credentials.js +10 -1
- package/build/commands/device/create.d.ts +4 -0
- package/build/commands/device/create.js +15 -3
- package/build/commands/device/delete.d.ts +13 -8
- package/build/commands/device/delete.js +81 -129
- package/build/commands/device/list.d.ts +7 -0
- package/build/commands/device/list.js +42 -63
- package/build/commands/device/view.d.ts +3 -0
- package/build/commands/device/view.js +10 -5
- package/build/commands/diagnostics.d.ts +3 -1
- package/build/commands/diagnostics.js +10 -8
- package/build/commands/metadata/pull.d.ts +4 -0
- package/build/commands/metadata/pull.js +13 -8
- package/build/commands/metadata/push.d.ts +4 -0
- package/build/commands/metadata/push.js +13 -8
- package/build/commands/open.d.ts +8 -0
- package/build/commands/open.js +42 -0
- package/build/commands/project/info.d.ts +3 -0
- package/build/commands/project/info.js +9 -6
- package/build/commands/project/init.d.ts +12 -0
- package/build/commands/project/init.js +155 -8
- package/build/commands/secret/create.d.ts +6 -0
- package/build/commands/secret/create.js +87 -30
- package/build/commands/secret/delete.d.ts +4 -0
- package/build/commands/secret/delete.js +28 -19
- package/build/commands/secret/list.d.ts +3 -0
- package/build/commands/secret/list.js +19 -13
- package/build/commands/submit.d.ts +5 -0
- package/build/commands/submit.js +16 -7
- package/build/commands/update/configure.d.ts +3 -0
- package/build/commands/update/configure.js +24 -18
- package/build/commands/update/delete.d.ts +1 -0
- package/build/commands/update/delete.js +5 -8
- package/build/commands/update/index.d.ts +8 -12
- package/build/commands/update/index.js +90 -166
- package/build/commands/update/list.d.ts +8 -2
- package/build/commands/update/list.js +51 -81
- package/build/commands/update/view.d.ts +0 -4
- package/build/commands/update/view.js +14 -51
- package/build/commands/webhook/create.d.ts +4 -0
- package/build/commands/webhook/create.js +10 -5
- package/build/commands/webhook/delete.d.ts +6 -0
- package/build/commands/webhook/delete.js +26 -14
- package/build/commands/webhook/list.d.ts +3 -0
- package/build/commands/webhook/list.js +13 -9
- package/build/commands/webhook/update.d.ts +1 -0
- package/build/commands/webhook/update.js +3 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
- package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.js +1 -2
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
- package/build/credentials/context.d.ts +8 -4
- package/build/credentials/context.js +8 -23
- package/build/credentials/ios/IosCredentialsProvider.js +11 -6
- package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
- package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
- package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +5 -2
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -2
- package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
- package/build/credentials/ios/actions/DeviceUtils.js +3 -19
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
- package/build/credentials/ios/actions/ProvisioningProfileUtils.d.ts +2 -1
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +4 -2
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
- package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +9 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +30 -18
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +9 -3
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +6 -12
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +8 -5
- package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +3 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +5 -5
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
- package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
- package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
- package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +7 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +8 -8
- package/build/credentials/ios/appstore/Credentials.types.d.ts +0 -14
- package/build/credentials/ios/appstore/Credentials.types.js +0 -6
- package/build/credentials/ios/appstore/constants.d.ts +1 -0
- package/build/credentials/ios/appstore/constants.js +6 -0
- package/build/credentials/ios/appstore/distributionCertificate.js +1 -1
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +5 -3
- package/build/credentials/ios/appstore/provisioningProfile.js +30 -7
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +3 -1
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +10 -10
- package/build/credentials/ios/types.d.ts +2 -3
- package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +3 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +6 -4
- package/build/credentials/manager/HelperActions.d.ts +4 -1
- package/build/credentials/manager/ManageAndroid.js +4 -14
- package/build/credentials/manager/ManageIos.js +20 -20
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
- package/build/credentials/manager/SelectPlatform.d.ts +5 -1
- package/build/credentials/manager/SelectPlatform.js +5 -3
- package/build/devices/actions/create/action.d.ts +2 -3
- package/build/devices/actions/create/developerPortalMethod.js +2 -2
- package/build/devices/context.d.ts +3 -5
- package/build/devices/context.js +2 -11
- package/build/devices/manager.d.ts +4 -5
- package/build/devices/manager.js +9 -16
- package/build/devices/queries.d.ts +21 -0
- package/build/devices/queries.js +121 -0
- package/build/devices/utils/errors.d.ts +3 -0
- package/build/devices/utils/errors.js +9 -0
- package/build/devices/utils/formatDevice.d.ts +3 -3
- package/build/devices/utils/formatDevice.js +8 -3
- package/build/graphql/generated.d.ts +1141 -192
- package/build/graphql/generated.js +13 -2
- package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
- package/build/graphql/queries/AppQuery.d.ts +1 -0
- package/build/graphql/queries/AppQuery.js +19 -0
- package/build/graphql/queries/BranchQuery.d.ts +5 -6
- package/build/graphql/queries/BranchQuery.js +44 -3
- package/build/graphql/queries/BuildQuery.d.ts +2 -20
- package/build/graphql/queries/BuildQuery.js +2 -2
- package/build/graphql/queries/ChannelQuery.d.ts +5 -2
- package/build/graphql/queries/ChannelQuery.js +45 -19
- package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
- package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
- package/build/graphql/queries/UpdateQuery.d.ts +4 -6
- package/build/graphql/queries/UpdateQuery.js +59 -50
- package/build/graphql/queries/UserQuery.js +8 -1
- package/build/graphql/types/Account.d.ts +1 -0
- package/build/graphql/types/Account.js +17 -0
- package/build/graphql/types/App.js +7 -0
- package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
- package/build/graphql/types/EnvironmentSecret.js +16 -1
- package/build/graphql/types/Update.d.ts +1 -0
- package/build/graphql/types/Update.js +30 -0
- package/build/graphql/types/UpdateBranch.js +4 -15
- package/build/metadata/context.d.ts +1 -1
- package/build/metadata/context.js +7 -9
- package/build/project/android/applicationId.d.ts +2 -1
- package/build/project/android/applicationId.js +7 -7
- package/build/project/android/versions.js +1 -1
- package/build/project/applicationIdentifier.d.ts +2 -1
- package/build/project/applicationIdentifier.js +2 -2
- package/build/project/expoConfig.d.ts +3 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
- package/build/project/ios/bundleIdentifier.d.ts +2 -1
- package/build/project/ios/bundleIdentifier.js +7 -7
- package/build/project/ios/scheme.d.ts +1 -1
- package/build/project/ios/target.d.ts +7 -0
- package/build/project/ios/target.js +26 -1
- package/build/project/projectUtils.d.ts +4 -31
- package/build/project/projectUtils.js +13 -123
- package/build/project/remoteVersionSource.d.ts +2 -2
- package/build/project/remoteVersionSource.js +8 -7
- package/build/project/workflow.js +3 -1
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/context.d.ts +3 -1
- package/build/submit/context.js +12 -14
- package/build/submit/ios/CredentialsServiceSource.js +1 -2
- package/build/submit/utils/builds.js +3 -1
- package/build/update/android/UpdatesModule.d.ts +1 -1
- package/build/update/android/UpdatesModule.js +2 -3
- package/build/update/ios/UpdatesModule.d.ts +1 -1
- package/build/update/ios/UpdatesModule.js +2 -3
- package/build/update/queries.d.ts +16 -1
- package/build/update/queries.js +96 -30
- package/build/update/utils.d.ts +21 -8
- package/build/update/utils.js +75 -14
- package/build/user/actions.d.ts +2 -8
- package/build/user/actions.js +4 -63
- package/build/utils/profiles.d.ts +3 -3
- package/build/utils/profiles.js +6 -5
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +5 -2
- package/build/vcs/clients/gitNoCommit.js +2 -1
- package/build/vcs/vcs.d.ts +1 -1
- package/build/webhooks/input.d.ts +2 -1
- package/build/webhooks/input.js +10 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
- package/build/project/ensureProjectExists.d.ts +0 -21
- package/build/project/ensureProjectExists.js +0 -88
- package/build/user/Account.d.ts +0 -3
- package/build/user/Account.js +0 -7
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnvironmentSecretFragmentNode = void 0;
|
|
3
|
+
exports.EnvironmentSecretTypeToSecretType = exports.SecretTypeToEnvironmentSecretType = exports.SecretType = exports.EnvironmentSecretFragmentNode = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
const generated_1 = require("../generated");
|
|
6
7
|
exports.EnvironmentSecretFragmentNode = (0, graphql_tag_1.default) `
|
|
7
8
|
fragment EnvironmentSecretFragment on EnvironmentSecret {
|
|
8
9
|
id
|
|
9
10
|
name
|
|
11
|
+
type
|
|
10
12
|
createdAt
|
|
11
13
|
}
|
|
12
14
|
`;
|
|
15
|
+
var SecretType;
|
|
16
|
+
(function (SecretType) {
|
|
17
|
+
SecretType["STRING"] = "string";
|
|
18
|
+
SecretType["FILE"] = "file";
|
|
19
|
+
})(SecretType = exports.SecretType || (exports.SecretType = {}));
|
|
20
|
+
exports.SecretTypeToEnvironmentSecretType = {
|
|
21
|
+
[SecretType.STRING]: generated_1.EnvironmentSecretType.String,
|
|
22
|
+
[SecretType.FILE]: generated_1.EnvironmentSecretType.FileBase64,
|
|
23
|
+
};
|
|
24
|
+
exports.EnvironmentSecretTypeToSecretType = {
|
|
25
|
+
[generated_1.EnvironmentSecretType.String]: SecretType.STRING,
|
|
26
|
+
[generated_1.EnvironmentSecretType.FileBase64]: SecretType.FILE,
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UpdateFragmentNode: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateFragmentNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
exports.UpdateFragmentNode = (0, graphql_tag_1.default) `
|
|
7
|
+
fragment UpdateFragment on Update {
|
|
8
|
+
id
|
|
9
|
+
group
|
|
10
|
+
message
|
|
11
|
+
createdAt
|
|
12
|
+
runtimeVersion
|
|
13
|
+
platform
|
|
14
|
+
manifestFragment
|
|
15
|
+
actor {
|
|
16
|
+
__typename
|
|
17
|
+
id
|
|
18
|
+
... on User {
|
|
19
|
+
username
|
|
20
|
+
}
|
|
21
|
+
... on Robot {
|
|
22
|
+
firstName
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
branch {
|
|
26
|
+
id
|
|
27
|
+
name
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -2,28 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateBranchFragmentNode = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
5
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const Update_1 = require("./Update");
|
|
6
8
|
exports.UpdateBranchFragmentNode = (0, graphql_tag_1.default) `
|
|
7
9
|
fragment UpdateBranchFragment on UpdateBranch {
|
|
8
10
|
id
|
|
9
11
|
name
|
|
10
12
|
updates(offset: 0, limit: 10) {
|
|
11
13
|
id
|
|
12
|
-
|
|
13
|
-
__typename
|
|
14
|
-
id
|
|
15
|
-
... on User {
|
|
16
|
-
username
|
|
17
|
-
}
|
|
18
|
-
... on Robot {
|
|
19
|
-
firstName
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
createdAt
|
|
23
|
-
message
|
|
24
|
-
runtimeVersion
|
|
25
|
-
group
|
|
26
|
-
platform
|
|
14
|
+
...UpdateFragment
|
|
27
15
|
}
|
|
28
16
|
}
|
|
17
|
+
${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
|
|
29
18
|
`;
|
|
@@ -36,7 +36,7 @@ export declare type MetadataAppStoreAuthentication = {
|
|
|
36
36
|
export declare function createMetadataContextAsync(params: {
|
|
37
37
|
projectDir: string;
|
|
38
38
|
credentialsCtx: CredentialsContext;
|
|
39
|
-
exp
|
|
39
|
+
exp: ExpoConfig;
|
|
40
40
|
profileName?: string;
|
|
41
41
|
}): Promise<MetadataContext>;
|
|
42
42
|
/**
|
|
@@ -7,24 +7,22 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
7
7
|
const eas_json_1 = require("@expo/eas-json");
|
|
8
8
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
9
9
|
const authenticate_1 = require("../credentials/ios/appstore/authenticate");
|
|
10
|
-
const expoConfig_1 = require("../project/expoConfig");
|
|
11
10
|
const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
12
|
-
const actions_1 = require("../user/actions");
|
|
13
11
|
/**
|
|
14
12
|
* Metadata uses the submission profile to find the configured metadata filename.
|
|
15
13
|
* Note, only iOS is supported for metadata right now.
|
|
16
14
|
*/
|
|
17
15
|
async function createMetadataContextAsync(params) {
|
|
18
|
-
var _a, _b
|
|
19
|
-
const
|
|
20
|
-
const submitProfile = await
|
|
21
|
-
const exp =
|
|
22
|
-
const user =
|
|
23
|
-
const bundleIdentifier = (
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const easJsonAccessor = new eas_json_1.EasJsonAccessor(params.projectDir);
|
|
18
|
+
const submitProfile = await eas_json_1.EasJsonUtils.getSubmitProfileAsync(easJsonAccessor, eas_build_job_1.Platform.IOS, params.profileName);
|
|
19
|
+
const exp = params.exp;
|
|
20
|
+
const user = params.credentialsCtx.user;
|
|
21
|
+
const bundleIdentifier = (_a = submitProfile.bundleIdentifier) !== null && _a !== void 0 ? _a : (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(params.projectDir, exp));
|
|
24
22
|
return {
|
|
25
23
|
platform: eas_build_job_1.Platform.IOS,
|
|
26
24
|
profile: submitProfile,
|
|
27
|
-
metadataPath: (
|
|
25
|
+
metadataPath: (_b = submitProfile.metadataPath) !== null && _b !== void 0 ? _b : 'store.config.json',
|
|
28
26
|
user,
|
|
29
27
|
credentialsCtx: params.credentialsCtx,
|
|
30
28
|
bundleIdentifier,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { Actor } from '../../user/User';
|
|
2
3
|
import { GradleBuildContext } from './gradle';
|
|
3
4
|
export declare const INVALID_APPLICATION_ID_MESSAGE = "Invalid format of Android applicationId. Only alphanumeric characters, '.' and '_' are allowed, and each '.' must be followed by a letter.";
|
|
4
|
-
export declare function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir: string, exp: ExpoConfig): Promise<string>;
|
|
5
|
+
export declare function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir: string, exp: ExpoConfig, actor: Actor): Promise<string>;
|
|
5
6
|
export declare class AmbiguousApplicationIdError extends Error {
|
|
6
7
|
constructor(message?: string);
|
|
7
8
|
}
|
|
@@ -14,11 +14,10 @@ const env_1 = tslib_1.__importDefault(require("../../env"));
|
|
|
14
14
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
15
15
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
16
16
|
const prompts_1 = require("../../prompts");
|
|
17
|
-
const actions_1 = require("../../user/actions");
|
|
18
17
|
const workflow_1 = require("../workflow");
|
|
19
18
|
const gradleUtils = tslib_1.__importStar(require("./gradleUtils"));
|
|
20
19
|
exports.INVALID_APPLICATION_ID_MESSAGE = `Invalid format of Android applicationId. Only alphanumeric characters, '.' and '_' are allowed, and each '.' must be followed by a letter.`;
|
|
21
|
-
async function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir, exp) {
|
|
20
|
+
async function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir, exp, actor) {
|
|
22
21
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
23
22
|
(0, assert_1.default)(workflow === eas_build_job_1.Workflow.MANAGED, 'This function should be called only for managed projects');
|
|
24
23
|
try {
|
|
@@ -27,7 +26,7 @@ async function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir, ex
|
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
28
|
catch {
|
|
30
|
-
return await configureApplicationIdAsync(projectDir, exp);
|
|
29
|
+
return await configureApplicationIdAsync(projectDir, exp, actor);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
exports.ensureApplicationIdIsDefinedForManagedProjectAsync = ensureApplicationIdIsDefinedForManagedProjectAsync;
|
|
@@ -86,7 +85,7 @@ async function getApplicationIdAsync(projectDir, exp, gradleContext) {
|
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
exports.getApplicationIdAsync = getApplicationIdAsync;
|
|
89
|
-
async function configureApplicationIdAsync(projectDir, exp) {
|
|
88
|
+
async function configureApplicationIdAsync(projectDir, exp, actor) {
|
|
90
89
|
var _a;
|
|
91
90
|
const paths = (0, config_1.getConfigFilePaths)(projectDir);
|
|
92
91
|
// we can't automatically update app.config.js
|
|
@@ -96,7 +95,7 @@ async function configureApplicationIdAsync(projectDir, exp) {
|
|
|
96
95
|
(0, assert_1.default)(paths.staticConfigPath, 'app.json must exist');
|
|
97
96
|
log_1.default.addNewLineIfNone();
|
|
98
97
|
log_1.default.log(`${chalk_1.default.bold(`📝 Android application id`)} ${chalk_1.default.dim((0, log_1.learnMore)('https://expo.fyi/android-package'))}`);
|
|
99
|
-
const suggestedAndroidApplicationId = await getSuggestedApplicationIdAsync(exp);
|
|
98
|
+
const suggestedAndroidApplicationId = await getSuggestedApplicationIdAsync(exp, actor);
|
|
100
99
|
const { packageName } = await (0, prompts_1.promptAsync)({
|
|
101
100
|
name: 'packageName',
|
|
102
101
|
type: 'text',
|
|
@@ -126,14 +125,15 @@ function warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir
|
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
exports.warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject = warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject;
|
|
129
|
-
async function getSuggestedApplicationIdAsync(exp) {
|
|
128
|
+
async function getSuggestedApplicationIdAsync(exp, actor) {
|
|
130
129
|
// Attempt to use the ios bundle id first since it's convenient to have them aligned.
|
|
131
130
|
const maybeBundleId = config_plugins_1.IOSConfig.BundleIdentifier.getBundleIdentifier(exp);
|
|
132
131
|
if (maybeBundleId && isApplicationIdValid(maybeBundleId)) {
|
|
133
132
|
return maybeBundleId;
|
|
134
133
|
}
|
|
135
134
|
else {
|
|
136
|
-
|
|
135
|
+
// the only callsite is heavily interactive
|
|
136
|
+
const username = (0, projectUtils_1.getUsername)(exp, actor);
|
|
137
137
|
// It's common to use dashes in your node project name, strip them from the suggested package name.
|
|
138
138
|
const possibleId = `com.${username}.${exp.slug}`.split('-').join('');
|
|
139
139
|
if (isApplicationIdValid(possibleId)) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getNextVersionCode = exports.isValidVersionCode = exports.VERSION_CODE_REQUIREMENTS = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
-
const MAX_VERSION_CODE =
|
|
6
|
+
const MAX_VERSION_CODE = 2100000000;
|
|
7
7
|
exports.VERSION_CODE_REQUIREMENTS = `versionCode needs to be a positive integer smaller or equal to ${MAX_VERSION_CODE}`;
|
|
8
8
|
function isValidVersionCode(versionCode) {
|
|
9
9
|
const numericVersionCode = typeof versionCode === 'string' ? Number(versionCode) : versionCode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Platform } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
|
-
|
|
4
|
+
import { Actor } from '../user/User';
|
|
5
|
+
export declare function getApplicationIdentifierAsync(projectDir: string, exp: ExpoConfig, buildProfile: BuildProfile, platform: Platform, actor: Actor): Promise<string>;
|
|
@@ -8,13 +8,13 @@ const bundleIdentifier_1 = require("./ios/bundleIdentifier");
|
|
|
8
8
|
const scheme_1 = require("./ios/scheme");
|
|
9
9
|
const target_1 = require("./ios/target");
|
|
10
10
|
const workflow_1 = require("./workflow");
|
|
11
|
-
async function getApplicationIdentifierAsync(projectDir, exp, buildProfile, platform) {
|
|
11
|
+
async function getApplicationIdentifierAsync(projectDir, exp, buildProfile, platform, actor) {
|
|
12
12
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
13
13
|
const profile = buildProfile;
|
|
14
14
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
15
15
|
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(projectDir, profile);
|
|
16
16
|
if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
17
|
-
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(projectDir, exp);
|
|
17
|
+
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(projectDir, exp, actor);
|
|
18
18
|
}
|
|
19
19
|
return await (0, applicationId_1.getApplicationIdAsync)(projectDir, exp, gradleContext);
|
|
20
20
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Env } from '@expo/eas-build-job';
|
|
3
|
-
interface
|
|
3
|
+
export interface ExpoConfigOptions {
|
|
4
4
|
env?: Env;
|
|
5
5
|
isPublicConfig?: boolean;
|
|
6
|
+
skipSDKVersionRequirement?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function getExpoConfig(projectDir: string, opts?:
|
|
8
|
-
export {};
|
|
8
|
+
export declare function getExpoConfig(projectDir: string, opts?: ExpoConfigOptions): ExpoConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppPrivacy } from '../graphql/generated';
|
|
2
|
+
import { Actor } from '../user/User';
|
|
3
|
+
/**
|
|
4
|
+
* 1. Looks for an existing project on EAS servers. If found, ask the user whether this is the
|
|
5
|
+
* project they would like to link. If yes, return that. If not, throw.
|
|
6
|
+
* 2. If no existing project is found, ask the user whether they would like to register a new one.
|
|
7
|
+
* If yes, register and return that. If not, throw.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(projectInfo: {
|
|
10
|
+
accountName: string;
|
|
11
|
+
projectName: string;
|
|
12
|
+
privacy?: AppPrivacy;
|
|
13
|
+
}, options: {
|
|
14
|
+
nonInteractive: boolean;
|
|
15
|
+
}, actor: Actor): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Finds project by `@accountName/slug` and returns its ID, return null if the project does not exist.
|
|
18
|
+
* @param accountName account name
|
|
19
|
+
* @param slug project slug
|
|
20
|
+
* @returns A promise resolving to Project ID, null if it doesn't exist
|
|
21
|
+
*/
|
|
22
|
+
export declare function findProjectIdByAccountNameAndSlugNullableAsync(accountName: string, slug: string): Promise<string | null>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findProjectIdByAccountNameAndSlugNullableAsync = exports.fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const terminal_link_1 = tslib_1.__importDefault(require("terminal-link"));
|
|
7
|
+
const url_1 = require("../build/utils/url");
|
|
8
|
+
const generated_1 = require("../graphql/generated");
|
|
9
|
+
const AppMutation_1 = require("../graphql/mutations/AppMutation");
|
|
10
|
+
const AppQuery_1 = require("../graphql/queries/AppQuery");
|
|
11
|
+
const ora_1 = require("../ora");
|
|
12
|
+
const prompts_1 = require("../prompts");
|
|
13
|
+
/**
|
|
14
|
+
* 1. Looks for an existing project on EAS servers. If found, ask the user whether this is the
|
|
15
|
+
* project they would like to link. If yes, return that. If not, throw.
|
|
16
|
+
* 2. If no existing project is found, ask the user whether they would like to register a new one.
|
|
17
|
+
* If yes, register and return that. If not, throw.
|
|
18
|
+
*/
|
|
19
|
+
async function fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync(projectInfo, options, actor) {
|
|
20
|
+
var _a;
|
|
21
|
+
const { accountName, projectName } = projectInfo;
|
|
22
|
+
const projectFullName = `@${accountName}/${projectName}`;
|
|
23
|
+
if (options.nonInteractive) {
|
|
24
|
+
throw new Error(`Must configure EAS project by running 'eas init' before this command can be run in non-interactive mode.`);
|
|
25
|
+
}
|
|
26
|
+
const allAccounts = actor.accounts;
|
|
27
|
+
const accountNamesWhereUserHasSufficientPublishPermissions = new Set(allAccounts
|
|
28
|
+
.filter(a => { var _a; return ((_a = a.users.find(it => it.actor.id === actor.id)) === null || _a === void 0 ? void 0 : _a.role) !== generated_1.Role.ViewOnly; })
|
|
29
|
+
.map(it => it.name));
|
|
30
|
+
const account = allAccounts.find(a => a.name === accountName);
|
|
31
|
+
if (!account) {
|
|
32
|
+
throw new Error(`You must have access to the ${accountName} account to configure this EAS project.`);
|
|
33
|
+
}
|
|
34
|
+
const projectIdOnServer = await findProjectIdByAccountNameAndSlugNullableAsync(accountName, projectName);
|
|
35
|
+
if (projectIdOnServer) {
|
|
36
|
+
const affirmedLink = await (0, prompts_1.confirmAsync)({
|
|
37
|
+
message: `Existing EAS project found for ${projectFullName} (id = ${projectIdOnServer}). Configure this project?`,
|
|
38
|
+
});
|
|
39
|
+
if (!affirmedLink) {
|
|
40
|
+
throw new Error(`EAS project ID configuration canceled for ${projectFullName}. Run 'eas init' to configure.`);
|
|
41
|
+
}
|
|
42
|
+
return projectIdOnServer;
|
|
43
|
+
}
|
|
44
|
+
if (!accountNamesWhereUserHasSufficientPublishPermissions.has(accountName)) {
|
|
45
|
+
throw new Error(`You don't have permission to create a new project on the ${accountName} account and no matching project already exists on the account.`);
|
|
46
|
+
}
|
|
47
|
+
const affirmedCreate = await (0, prompts_1.confirmAsync)({
|
|
48
|
+
message: `Would you like to automatically create an EAS project for ${projectFullName}?`,
|
|
49
|
+
});
|
|
50
|
+
if (!affirmedCreate) {
|
|
51
|
+
throw new Error(`EAS project ID configuration canceled for ${projectFullName}. Run 'eas init' to configure.`);
|
|
52
|
+
}
|
|
53
|
+
const projectDashboardUrl = (0, url_1.getProjectDashboardUrl)(accountName, projectName);
|
|
54
|
+
const projectLink = (0, terminal_link_1.default)(projectFullName, projectDashboardUrl, {
|
|
55
|
+
// https://github.com/sindresorhus/terminal-link/issues/18#issuecomment-1068020361
|
|
56
|
+
fallback: () => `${projectFullName} (${projectDashboardUrl})`,
|
|
57
|
+
});
|
|
58
|
+
const spinner = (0, ora_1.ora)(`Creating ${chalk_1.default.bold(projectFullName)} on Expo`).start();
|
|
59
|
+
try {
|
|
60
|
+
const id = await AppMutation_1.AppMutation.createAppAsync({
|
|
61
|
+
accountId: account.id,
|
|
62
|
+
projectName,
|
|
63
|
+
privacy: (_a = projectInfo.privacy) !== null && _a !== void 0 ? _a : generated_1.AppPrivacy.Public,
|
|
64
|
+
});
|
|
65
|
+
spinner.succeed(`Created ${chalk_1.default.bold(projectLink)} on Expo`);
|
|
66
|
+
return id;
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
spinner.fail();
|
|
70
|
+
throw err;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync = fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync;
|
|
74
|
+
/**
|
|
75
|
+
* Finds project by `@accountName/slug` and returns its ID, return null if the project does not exist.
|
|
76
|
+
* @param accountName account name
|
|
77
|
+
* @param slug project slug
|
|
78
|
+
* @returns A promise resolving to Project ID, null if it doesn't exist
|
|
79
|
+
*/
|
|
80
|
+
async function findProjectIdByAccountNameAndSlugNullableAsync(accountName, slug) {
|
|
81
|
+
var _a;
|
|
82
|
+
try {
|
|
83
|
+
const { id } = await AppQuery_1.AppQuery.byFullNameAsync(`@${accountName}/${slug}`);
|
|
84
|
+
return id;
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
if ((_a = err.graphQLErrors) === null || _a === void 0 ? void 0 : _a.some((it) => { var _a; return ((_a = it.extensions) === null || _a === void 0 ? void 0 : _a.errorCode) !== 'EXPERIENCE_NOT_FOUND'; })) {
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.findProjectIdByAccountNameAndSlugNullableAsync = findProjectIdByAccountNameAndSlugNullableAsync;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { Actor } from '../../user/User';
|
|
2
3
|
export declare const INVALID_BUNDLE_IDENTIFIER_MESSAGE = "Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.";
|
|
3
|
-
export declare function ensureBundleIdentifierIsDefinedForManagedProjectAsync(projectDir: string, exp: ExpoConfig): Promise<string>;
|
|
4
|
+
export declare function ensureBundleIdentifierIsDefinedForManagedProjectAsync(projectDir: string, exp: ExpoConfig, actor: Actor): Promise<string>;
|
|
4
5
|
export declare class AmbiguousBundleIdentifierError extends Error {
|
|
5
6
|
constructor(message?: string);
|
|
6
7
|
}
|
|
@@ -11,18 +11,17 @@ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
|
11
11
|
const appJson_1 = require("../../build/utils/appJson");
|
|
12
12
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
|
-
const actions_1 = require("../../user/actions");
|
|
15
14
|
const projectUtils_1 = require("../projectUtils");
|
|
16
15
|
const workflow_1 = require("../workflow");
|
|
17
16
|
exports.INVALID_BUNDLE_IDENTIFIER_MESSAGE = `Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.`;
|
|
18
|
-
async function ensureBundleIdentifierIsDefinedForManagedProjectAsync(projectDir, exp) {
|
|
17
|
+
async function ensureBundleIdentifierIsDefinedForManagedProjectAsync(projectDir, exp, actor) {
|
|
19
18
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
20
19
|
(0, assert_1.default)(workflow === eas_build_job_1.Workflow.MANAGED, 'This function should be called only for managed projects');
|
|
21
20
|
try {
|
|
22
21
|
return await getBundleIdentifierAsync(projectDir, exp);
|
|
23
22
|
}
|
|
24
23
|
catch {
|
|
25
|
-
return await configureBundleIdentifierAsync(projectDir, exp);
|
|
24
|
+
return await configureBundleIdentifierAsync(projectDir, exp, actor);
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
exports.ensureBundleIdentifierIsDefinedForManagedProjectAsync = ensureBundleIdentifierIsDefinedForManagedProjectAsync;
|
|
@@ -70,7 +69,7 @@ async function getBundleIdentifierAsync(projectDir, exp, xcodeContext) {
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
exports.getBundleIdentifierAsync = getBundleIdentifierAsync;
|
|
73
|
-
async function configureBundleIdentifierAsync(projectDir, exp) {
|
|
72
|
+
async function configureBundleIdentifierAsync(projectDir, exp, actor) {
|
|
74
73
|
var _a;
|
|
75
74
|
const paths = (0, config_1.getConfigFilePaths)(projectDir);
|
|
76
75
|
// we can't automatically update app.config.js
|
|
@@ -80,7 +79,7 @@ async function configureBundleIdentifierAsync(projectDir, exp) {
|
|
|
80
79
|
(0, assert_1.default)(paths.staticConfigPath, 'app.json must exist');
|
|
81
80
|
log_1.default.addNewLineIfNone();
|
|
82
81
|
log_1.default.log(`${chalk_1.default.bold(`📝 iOS Bundle Identifier`)} ${chalk_1.default.dim((0, log_1.learnMore)('https://expo.fyi/bundle-identifier'))}`);
|
|
83
|
-
const suggestedBundleIdentifier = await getSuggestedBundleIdentifierAsync(exp);
|
|
82
|
+
const suggestedBundleIdentifier = await getSuggestedBundleIdentifierAsync(exp, actor);
|
|
84
83
|
const { bundleIdentifier } = await (0, prompts_1.promptAsync)({
|
|
85
84
|
name: 'bundleIdentifier',
|
|
86
85
|
type: 'text',
|
|
@@ -115,14 +114,15 @@ function isWildcardBundleIdentifier(bundleIdentifier) {
|
|
|
115
114
|
return wildcardRegex.test(bundleIdentifier);
|
|
116
115
|
}
|
|
117
116
|
exports.isWildcardBundleIdentifier = isWildcardBundleIdentifier;
|
|
118
|
-
async function getSuggestedBundleIdentifierAsync(exp) {
|
|
117
|
+
async function getSuggestedBundleIdentifierAsync(exp, actor) {
|
|
119
118
|
// Attempt to use the android package name first since it's convenient to have them aligned.
|
|
120
119
|
const maybeAndroidPackage = config_plugins_1.AndroidConfig.Package.getPackage(exp);
|
|
121
120
|
if (maybeAndroidPackage && isBundleIdentifierValid(maybeAndroidPackage)) {
|
|
122
121
|
return maybeAndroidPackage;
|
|
123
122
|
}
|
|
124
123
|
else {
|
|
125
|
-
|
|
124
|
+
// the only callsite is heavily interactive
|
|
125
|
+
const username = (0, projectUtils_1.getUsername)(exp, actor);
|
|
126
126
|
// It's common to use dashes in your node project name, strip them from the suggested package name.
|
|
127
127
|
const possibleId = `com.${username}.${exp.slug}`.split('-').join('');
|
|
128
128
|
if (isBundleIdentifierValid(possibleId)) {
|
|
@@ -12,5 +12,5 @@ export declare function resolveXcodeBuildContextAsync({ exp, projectDir, nonInte
|
|
|
12
12
|
}, buildProfile: BuildProfile<Platform.IOS>): Promise<XcodeBuildContext>;
|
|
13
13
|
export declare function selectSchemeAsync({ projectDir, nonInteractive, }: {
|
|
14
14
|
projectDir: string;
|
|
15
|
-
nonInteractive
|
|
15
|
+
nonInteractive: boolean;
|
|
16
16
|
}): Promise<string>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
1
2
|
import { ExpoConfig } from '@expo/config';
|
|
3
|
+
import { ApplePlatform } from '../../credentials/ios/appstore/constants';
|
|
2
4
|
import { Target } from '../../credentials/ios/types';
|
|
3
5
|
import { XcodeBuildContext } from './scheme';
|
|
4
6
|
interface ResolveTargetOptions {
|
|
@@ -12,4 +14,9 @@ export declare function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeB
|
|
|
12
14
|
export declare function resolveTargetsAsync(opts: ResolveTargetOptions): Promise<Target[]>;
|
|
13
15
|
export declare function findApplicationTarget(targets: Target[]): Target;
|
|
14
16
|
export declare function findTargetByName(targets: Target[], name: string): Target;
|
|
17
|
+
/**
|
|
18
|
+
* Get Apple Platform from the Xcode SDKROOT where possible.
|
|
19
|
+
* @returns - Apple Platform when known, defaults to IOS when unknown
|
|
20
|
+
*/
|
|
21
|
+
export declare function getApplePlatformFromSdkRoot(target: Target): ApplePlatform;
|
|
15
22
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findTargetByName = exports.findApplicationTarget = exports.resolveTargetsAsync = exports.resolveBareProjectTargetsAsync = exports.resolveMangedProjectTargetsAsync = void 0;
|
|
3
|
+
exports.getApplePlatformFromSdkRoot = exports.findTargetByName = exports.findApplicationTarget = exports.resolveTargetsAsync = exports.resolveBareProjectTargetsAsync = exports.resolveMangedProjectTargetsAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
7
|
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
8
|
+
const constants_1 = require("../../credentials/ios/appstore/constants");
|
|
8
9
|
const workflow_1 = require("../workflow");
|
|
9
10
|
const bundleIdentifier_1 = require("./bundleIdentifier");
|
|
10
11
|
const entitlements_1 = require("./entitlements");
|
|
@@ -158,3 +159,27 @@ function resolveBareProjectBuildSettings(project, targetName, buildConfiguration
|
|
|
158
159
|
});
|
|
159
160
|
return (_a = xcBuildConfiguration === null || xcBuildConfiguration === void 0 ? void 0 : xcBuildConfiguration.buildSettings) !== null && _a !== void 0 ? _a : {};
|
|
160
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Get Apple Platform from the Xcode SDKROOT where possible.
|
|
164
|
+
* @returns - Apple Platform when known, defaults to IOS when unknown
|
|
165
|
+
*/
|
|
166
|
+
function getApplePlatformFromSdkRoot(target) {
|
|
167
|
+
var _a;
|
|
168
|
+
const sdkRoot = (_a = target.buildSettings) === null || _a === void 0 ? void 0 : _a.SDKROOT;
|
|
169
|
+
if (!sdkRoot) {
|
|
170
|
+
return constants_1.ApplePlatform.IOS;
|
|
171
|
+
}
|
|
172
|
+
if (sdkRoot.includes('iphoneos')) {
|
|
173
|
+
return constants_1.ApplePlatform.IOS;
|
|
174
|
+
}
|
|
175
|
+
else if (sdkRoot.includes('tvos')) {
|
|
176
|
+
return constants_1.ApplePlatform.TV_OS;
|
|
177
|
+
}
|
|
178
|
+
else if (sdkRoot.includes('macosx')) {
|
|
179
|
+
return constants_1.ApplePlatform.MAC_OS;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
return constants_1.ApplePlatform.IOS;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
exports.getApplePlatformFromSdkRoot = getApplePlatformFromSdkRoot;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
-
import {
|
|
2
|
+
import { AccountFragment, AppPrivacy } from '../graphql/generated';
|
|
3
3
|
import { Actor } from '../user/User';
|
|
4
|
-
export declare function getProjectAccountName(exp: ExpoConfig, user: Actor): string;
|
|
5
4
|
export declare function getUsername(exp: ExpoConfig, user: Actor): string | undefined;
|
|
6
|
-
export declare
|
|
7
|
-
export declare function findProjectRootAsync({ cwd, defaultToProcessCwd, }?: {
|
|
8
|
-
cwd?: string;
|
|
9
|
-
defaultToProcessCwd?: boolean;
|
|
10
|
-
}): Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Save an EAS project ID to the appropriate field in the app config.
|
|
13
|
-
*/
|
|
14
|
-
export declare function saveProjectIdToAppConfigAsync(projectDir: string, projectId: string, options?: {
|
|
15
|
-
env?: Env;
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Use the owner/slug to identify an EAS project on the server.
|
|
19
|
-
*
|
|
20
|
-
* @returns the EAS project ID from the server
|
|
21
|
-
*/
|
|
22
|
-
export declare function fetchProjectIdFromServerAsync(exp: ExpoConfig): Promise<string>;
|
|
23
|
-
/**
|
|
24
|
-
* Get the EAS project ID from the app config. If the project ID is not set in the config.
|
|
25
|
-
* use the owner/slug to identify an EAS project on the server, and attempt to save the
|
|
26
|
-
* EAS project ID to the appropriate field in the app config.
|
|
27
|
-
*/
|
|
28
|
-
export declare function getProjectIdAsync(exp: ExpoConfig, options?: {
|
|
29
|
-
env?: Env;
|
|
30
|
-
}, findProjectRootOptions?: {
|
|
31
|
-
cwd?: string;
|
|
32
|
-
defaultToProcessCwd?: boolean;
|
|
33
|
-
}): Promise<string>;
|
|
34
|
-
export declare function getProjectFullNameAsync(exp: ExpoConfig): Promise<string>;
|
|
5
|
+
export declare const toAppPrivacy: (privacy: ExpoConfig['privacy']) => AppPrivacy;
|
|
35
6
|
/**
|
|
36
7
|
* Return a useful name describing the project config.
|
|
37
8
|
* - dynamic: app.config.js
|
|
@@ -44,3 +15,5 @@ export declare function isExpoUpdatesInstalled(projectDir: string): boolean;
|
|
|
44
15
|
export declare function isExpoUpdatesInstalledOrAvailable(projectDir: string, sdkVersion?: string): boolean;
|
|
45
16
|
export declare function validateAppVersionRuntimePolicySupportAsync(projectDir: string, exp: ExpoConfig): Promise<void>;
|
|
46
17
|
export declare function installExpoUpdatesAsync(projectDir: string): Promise<void>;
|
|
18
|
+
export declare function getOwnerAccountForProjectIdAsync(projectId: string): Promise<AccountFragment>;
|
|
19
|
+
export declare function getDisplayNameForProjectIdAsync(projectId: string): Promise<string>;
|