eas-cli 21.7.1 → 22.0.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 +258 -153
- package/build/build/android/prepareJob.js +1 -0
- package/build/build/ios/prepareJob.js +1 -0
- package/build/build/metadata.js +0 -1
- package/build/build/runBuildAndSubmit.js +1 -1
- package/build/build/utils/formatBuild.js +2 -2
- package/build/build/utils/url.js +3 -5
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +10 -3
- package/build/commandUtils/new/configs.js +1 -1
- package/build/commandUtils/supabase.d.ts +13 -0
- package/build/commandUtils/supabase.js +82 -0
- package/build/commands/account/view.js +1 -2
- package/build/commands/build/cancel.js +3 -3
- package/build/commands/build/download.js +1 -1
- package/build/commands/go.js +2 -45
- package/build/commands/integrations/supabase/connect.d.ts +26 -0
- package/build/commands/integrations/supabase/connect.js +404 -0
- package/build/commands/integrations/supabase/dashboard.d.ts +14 -0
- package/build/commands/integrations/supabase/dashboard.js +69 -0
- package/build/commands/integrations/supabase/disconnect.d.ts +15 -0
- package/build/commands/integrations/supabase/disconnect.js +87 -0
- package/build/commands/project/icon/set.js +4 -40
- package/build/commands/project/init.d.ts +1 -0
- package/build/commands/project/init.js +13 -0
- package/build/commands/submit.d.ts +1 -0
- package/build/commands/submit.js +8 -1
- package/build/commands/update/index.js +1 -1
- package/build/commands/update/revert-update-rollout.js +1 -1
- package/build/commands/update/rollback.js +1 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -13
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +14 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +47 -7
- package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +3 -1
- package/build/credentials/ios/appstore/ensureTestFlightGroup.js +14 -11
- package/build/environments/defaults.d.ts +2 -0
- package/build/environments/defaults.js +5 -0
- package/build/environments/resolve.d.ts +10 -0
- package/build/environments/resolve.js +67 -0
- package/build/environments/variables.d.ts +18 -0
- package/build/environments/variables.js +124 -0
- package/build/graphql/client.d.ts +8 -0
- package/build/graphql/client.js +15 -0
- package/build/graphql/generated.d.ts +824 -948
- package/build/graphql/generated.js +12 -2
- package/build/graphql/mutations/SupabaseMutation.d.ts +14 -0
- package/build/graphql/mutations/SupabaseMutation.js +145 -0
- package/build/graphql/queries/ChannelInsightsQuery.js +4 -1
- package/build/graphql/queries/SupabaseQuery.d.ts +10 -0
- package/build/graphql/queries/SupabaseQuery.js +54 -0
- package/build/graphql/types/Account.js +1 -4
- package/build/graphql/types/Build.js +13 -8
- package/build/graphql/types/Submission.js +0 -1
- package/build/graphql/types/SupabaseConnection.d.ts +8 -0
- package/build/graphql/types/SupabaseConnection.js +25 -0
- package/build/graphql/types/Update.js +4 -1
- package/build/integrations/shared/envFile.d.ts +7 -0
- package/build/integrations/shared/envFile.js +94 -0
- package/build/integrations/shared/sdk.d.ts +24 -0
- package/build/integrations/shared/sdk.js +87 -0
- package/build/integrations/supabase/env.d.ts +14 -0
- package/build/integrations/supabase/env.js +68 -0
- package/build/integrations/supabase/provision.d.ts +32 -0
- package/build/integrations/supabase/provision.js +245 -0
- package/build/project/accountSelection.js +1 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
- package/build/project/projectIcon.d.ts +40 -0
- package/build/project/projectIcon.js +132 -0
- package/build/project/projectNotConfiguredError.d.ts +17 -0
- package/build/project/projectNotConfiguredError.js +24 -0
- package/build/submit/ArchiveSource.js +3 -3
- package/build/submit/context.d.ts +2 -0
- package/build/submit/context.js +1 -0
- package/build/submit/ios/AppProduce.js +1 -1
- package/build/submit/ios/IosSubmitCommand.js +2 -0
- package/build/submit/ios/ensureTestFlightSetup.d.ts +7 -0
- package/build/submit/ios/ensureTestFlightSetup.js +81 -0
- package/build/submit/status.js +1 -1
- package/build/submit/utils/formatSubmission.js +2 -2
- package/build/update/queries.js +1 -1
- package/build/update/republish.js +3 -3
- package/build/update/roll-back-to-embedded.js +1 -1
- package/build/update/utils.d.ts +2 -1
- package/build/update/utils.js +7 -7
- package/build/user/User.js +1 -1
- package/build/utils/pollForBackgroundJobReceiptAsync.d.ts +2 -0
- package/build/utils/pollForBackgroundJobReceiptAsync.js +11 -2
- package/build/utils/prompts.d.ts +0 -1
- package/build/utils/prompts.js +6 -17
- package/oclif.manifest.json +1725 -1411
- package/package.json +6 -6
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BuildAnnotationType = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AssetMapSourceType = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppUploadSessionType = exports.AppStoreConnectWorkflowConnectionStatus = exports.AppStoreConnectUserRole = exports.AppStoreConnectBuildUploadState = exports.AppStoreConnectBuildProcessingState = exports.AppProfileImageWidth = exports.AppPrivacy = exports.AppPlatform = exports.AppObserveUpdatesOrderByField = exports.AppObserveUpdatesOrderByDirection = exports.AppObservePropertyType = exports.AppObservePlatform = exports.AppObserveNavigationRoutesOrderByField = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppObserveErrorSeverity = exports.AppObserveErrorGroupsOrderBy = exports.AppObserveErrorBreakdownDimension = exports.AppObserveCustomEventNamesOrderByField = exports.AppObserveCustomEventNamesOrderByDirection = exports.AppObserveCustomEventListOrderByField = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = void 0;
|
|
10
10
|
exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppInstallationAccountType = exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.ExitInterviewOutcome = exports.ExitInterviewMessageRole = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EchoVersionSource = exports.EchoTurnCompletionStatus = exports.EchoProjectVisibility = exports.EchoProjectUploadSessionType = exports.EchoProjectIconSource = exports.EchoMessageRole = exports.EchoMessagePartType = exports.EchoChatState = exports.EchoChangeType = exports.EchoBuildStatus = exports.EchoAgentType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.DeviceRunSessionType = exports.DeviceRunSessionStatus = exports.DashboardViewPin = exports.DashboardChatMessageStatus = exports.DashboardChatMessageRole = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDispatchInputType = exports.WorkflowDeviceTestCaseStatusFilter = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowDeviceTestCaseStatSortField = exports.WorkflowDeviceTestCaseSortDirection = exports.WorkflowDeviceTestCaseInsightsTimeSeriesGranularity = exports.WorkflowArtifactStorageType = void 0;
|
|
11
|
+
exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserSpecifiedAccountUsage = exports.UserEntityTypeName = exports.UserAgentPlatform = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.UpdatesTimelineItemType = exports.UpdateDiffReceiptStateValue = exports.UpdateDiffReceiptOrderByField = exports.UpdateDiffReceiptOrderByDirection = exports.TurtleSshTransportType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResponseType = exports.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = exports.RequestsOrderByField = exports.RequestsOrderByDirection = exports.RequestMethod = exports.RealtimeLogsTargetType = exports.ProjectArchiveSourceType = exports.PostHogRegion = exports.PostHogDeepLinkPurpose = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.OAuthProvider = exports.NotificationType = exports.NotificationEvent = exports.LocalBuildArchiveSourceType = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = void 0;
|
|
12
|
+
exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDispatchInputType = exports.WorkflowDeviceTestCaseStatusFilter = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowDeviceTestCaseStatSortField = exports.WorkflowDeviceTestCaseSortDirection = exports.WorkflowDeviceTestCaseInsightsTimeSeriesGranularity = exports.WorkflowArtifactStorageType = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = void 0;
|
|
13
13
|
var AccountAppsSortByField;
|
|
14
14
|
(function (AccountAppsSortByField) {
|
|
15
15
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -341,6 +341,7 @@ var BuildPhase;
|
|
|
341
341
|
BuildPhase["SaveCache"] = "SAVE_CACHE";
|
|
342
342
|
BuildPhase["SetUpBuildEnvironment"] = "SET_UP_BUILD_ENVIRONMENT";
|
|
343
343
|
BuildPhase["SpinUpBuilder"] = "SPIN_UP_BUILDER";
|
|
344
|
+
BuildPhase["SshSession"] = "SSH_SESSION";
|
|
344
345
|
BuildPhase["StartBuild"] = "START_BUILD";
|
|
345
346
|
BuildPhase["Unknown"] = "UNKNOWN";
|
|
346
347
|
BuildPhase["UploadApplicationArchive"] = "UPLOAD_APPLICATION_ARCHIVE";
|
|
@@ -848,6 +849,11 @@ var ProjectArchiveSourceType;
|
|
|
848
849
|
ProjectArchiveSourceType["None"] = "NONE";
|
|
849
850
|
ProjectArchiveSourceType["Url"] = "URL";
|
|
850
851
|
})(ProjectArchiveSourceType || (exports.ProjectArchiveSourceType = ProjectArchiveSourceType = {}));
|
|
852
|
+
var RealtimeLogsTargetType;
|
|
853
|
+
(function (RealtimeLogsTargetType) {
|
|
854
|
+
RealtimeLogsTargetType["Build"] = "BUILD";
|
|
855
|
+
RealtimeLogsTargetType["JobRun"] = "JOB_RUN";
|
|
856
|
+
})(RealtimeLogsTargetType || (exports.RealtimeLogsTargetType = RealtimeLogsTargetType = {}));
|
|
851
857
|
var RequestMethod;
|
|
852
858
|
(function (RequestMethod) {
|
|
853
859
|
RequestMethod["Delete"] = "DELETE";
|
|
@@ -1003,6 +1009,10 @@ var TargetEntityMutationType;
|
|
|
1003
1009
|
TargetEntityMutationType["Delete"] = "DELETE";
|
|
1004
1010
|
TargetEntityMutationType["Update"] = "UPDATE";
|
|
1005
1011
|
})(TargetEntityMutationType || (exports.TargetEntityMutationType = TargetEntityMutationType = {}));
|
|
1012
|
+
var TurtleSshTransportType;
|
|
1013
|
+
(function (TurtleSshTransportType) {
|
|
1014
|
+
TurtleSshTransportType["UptermV1"] = "UPTERM_V1";
|
|
1015
|
+
})(TurtleSshTransportType || (exports.TurtleSshTransportType = TurtleSshTransportType = {}));
|
|
1006
1016
|
var UpdateDiffReceiptOrderByDirection;
|
|
1007
1017
|
(function (UpdateDiffReceiptOrderByDirection) {
|
|
1008
1018
|
UpdateDiffReceiptOrderByDirection["Asc"] = "ASC";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { BackgroundJobReceiptDataFragment } from '../generated';
|
|
3
|
+
import { BeginSupabaseOAuthInput, LinkSupabaseProjectInput, ProvisionAdditionalSupabaseProjectInput, ProvisionSupabaseProjectInput, SetSupabaseConnectionOrganizationInput, SupabaseConnectionData, SupabaseOAuthStartData, SupabaseOrganizationData, SupabaseProjectData } from '../types/SupabaseConnection';
|
|
4
|
+
export declare const SupabaseMutation: {
|
|
5
|
+
beginSupabaseOAuthAsync(graphqlClient: ExpoGraphqlClient, input: BeginSupabaseOAuthInput): Promise<SupabaseOAuthStartData>;
|
|
6
|
+
setSupabaseConnectionOrganizationAsync(graphqlClient: ExpoGraphqlClient, input: SetSupabaseConnectionOrganizationInput): Promise<SupabaseConnectionData>;
|
|
7
|
+
disconnectSupabaseAsync(graphqlClient: ExpoGraphqlClient, id: string): Promise<string>;
|
|
8
|
+
provisionSupabaseProjectAsync(graphqlClient: ExpoGraphqlClient, input: ProvisionSupabaseProjectInput): Promise<BackgroundJobReceiptDataFragment>;
|
|
9
|
+
provisionAdditionalSupabaseProjectAsync(graphqlClient: ExpoGraphqlClient, input: ProvisionAdditionalSupabaseProjectInput): Promise<BackgroundJobReceiptDataFragment>;
|
|
10
|
+
linkSupabaseProjectAsync(graphqlClient: ExpoGraphqlClient, input: LinkSupabaseProjectInput): Promise<SupabaseProjectData>;
|
|
11
|
+
deleteSupabaseProjectAsync(graphqlClient: ExpoGraphqlClient, id: string): Promise<string>;
|
|
12
|
+
listSupabaseOrganizationsAsync(graphqlClient: ExpoGraphqlClient, accountId: string): Promise<SupabaseOrganizationData[]>;
|
|
13
|
+
fetchSupabasePublishableKeyAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<string | null>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupabaseMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const client_1 = require("../client");
|
|
8
|
+
const BackgroundJobReceipt_1 = require("../types/BackgroundJobReceipt");
|
|
9
|
+
const SupabaseConnection_1 = require("../types/SupabaseConnection");
|
|
10
|
+
exports.SupabaseMutation = {
|
|
11
|
+
async beginSupabaseOAuthAsync(graphqlClient, input) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
|
+
.mutation((0, graphql_tag_1.default) `
|
|
14
|
+
mutation BeginSupabaseOAuth($input: BeginSupabaseOAuthInput!) {
|
|
15
|
+
supabaseConnection {
|
|
16
|
+
beginSupabaseOAuth(input: $input) {
|
|
17
|
+
url
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`, { input })
|
|
22
|
+
.toPromise());
|
|
23
|
+
return data.supabaseConnection.beginSupabaseOAuth;
|
|
24
|
+
},
|
|
25
|
+
async setSupabaseConnectionOrganizationAsync(graphqlClient, input) {
|
|
26
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
27
|
+
.mutation((0, graphql_tag_1.default) `
|
|
28
|
+
mutation SetSupabaseConnectionOrganization(
|
|
29
|
+
$input: SetSupabaseConnectionOrganizationInput!
|
|
30
|
+
) {
|
|
31
|
+
supabaseConnection {
|
|
32
|
+
setSupabaseConnectionOrganization(input: $input) {
|
|
33
|
+
id
|
|
34
|
+
...SupabaseConnectionFragment
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
${(0, graphql_1.print)(SupabaseConnection_1.SupabaseConnectionFragmentNode)}
|
|
39
|
+
`, { input }, { additionalTypenames: ['SupabaseConnection'] })
|
|
40
|
+
.toPromise());
|
|
41
|
+
return data.supabaseConnection.setSupabaseConnectionOrganization;
|
|
42
|
+
},
|
|
43
|
+
async disconnectSupabaseAsync(graphqlClient, id) {
|
|
44
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
45
|
+
.mutation((0, graphql_tag_1.default) `
|
|
46
|
+
mutation DisconnectSupabase($id: ID!) {
|
|
47
|
+
supabaseConnection {
|
|
48
|
+
disconnectSupabase(id: $id)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`, { id }, { additionalTypenames: ['Account', 'SupabaseConnection', 'SupabaseProject'] })
|
|
52
|
+
.toPromise());
|
|
53
|
+
return data.supabaseConnection.disconnectSupabase;
|
|
54
|
+
},
|
|
55
|
+
async provisionSupabaseProjectAsync(graphqlClient, input) {
|
|
56
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
57
|
+
.mutation((0, graphql_tag_1.default) `
|
|
58
|
+
mutation ProvisionSupabaseProject($input: ProvisionSupabaseProjectInput!) {
|
|
59
|
+
supabaseProject {
|
|
60
|
+
provisionSupabaseProject(input: $input) {
|
|
61
|
+
id
|
|
62
|
+
...BackgroundJobReceiptData
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
${(0, graphql_1.print)(BackgroundJobReceipt_1.BackgroundJobReceiptNode)}
|
|
67
|
+
`, { input }, { additionalTypenames: ['App', 'SupabaseProject', 'BackgroundJobReceipt'] })
|
|
68
|
+
.toPromise());
|
|
69
|
+
return data.supabaseProject.provisionSupabaseProject;
|
|
70
|
+
},
|
|
71
|
+
async provisionAdditionalSupabaseProjectAsync(graphqlClient, input) {
|
|
72
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
73
|
+
.mutation((0, graphql_tag_1.default) `
|
|
74
|
+
mutation ProvisionAdditionalSupabaseProject(
|
|
75
|
+
$input: ProvisionAdditionalSupabaseProjectInput!
|
|
76
|
+
) {
|
|
77
|
+
supabaseProject {
|
|
78
|
+
provisionAdditionalSupabaseProject(input: $input) {
|
|
79
|
+
id
|
|
80
|
+
...BackgroundJobReceiptData
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
${(0, graphql_1.print)(BackgroundJobReceipt_1.BackgroundJobReceiptNode)}
|
|
85
|
+
`, { input }, { additionalTypenames: ['App', 'SupabaseProject', 'BackgroundJobReceipt'] })
|
|
86
|
+
.toPromise());
|
|
87
|
+
return data.supabaseProject.provisionAdditionalSupabaseProject;
|
|
88
|
+
},
|
|
89
|
+
async linkSupabaseProjectAsync(graphqlClient, input) {
|
|
90
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
91
|
+
.mutation((0, graphql_tag_1.default) `
|
|
92
|
+
mutation LinkSupabaseProject($input: LinkSupabaseProjectInput!) {
|
|
93
|
+
supabaseProject {
|
|
94
|
+
linkSupabaseProject(input: $input) {
|
|
95
|
+
id
|
|
96
|
+
...SupabaseProjectFragment
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
${(0, graphql_1.print)(SupabaseConnection_1.SupabaseProjectFragmentNode)}
|
|
101
|
+
`, { input }, { additionalTypenames: ['App', 'SupabaseProject'] })
|
|
102
|
+
.toPromise());
|
|
103
|
+
return data.supabaseProject.linkSupabaseProject;
|
|
104
|
+
},
|
|
105
|
+
async deleteSupabaseProjectAsync(graphqlClient, id) {
|
|
106
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
107
|
+
.mutation((0, graphql_tag_1.default) `
|
|
108
|
+
mutation DeleteSupabaseProject($id: ID!) {
|
|
109
|
+
supabaseProject {
|
|
110
|
+
deleteSupabaseProject(id: $id)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`, { id }, { additionalTypenames: ['App', 'SupabaseProject'] })
|
|
114
|
+
.toPromise());
|
|
115
|
+
return data.supabaseProject.deleteSupabaseProject;
|
|
116
|
+
},
|
|
117
|
+
async listSupabaseOrganizationsAsync(graphqlClient, accountId) {
|
|
118
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
119
|
+
.mutation((0, graphql_tag_1.default) `
|
|
120
|
+
mutation ListSupabaseOrganizations($accountId: ID!) {
|
|
121
|
+
supabaseConnection {
|
|
122
|
+
listSupabaseOrganizations(accountId: $accountId) {
|
|
123
|
+
id
|
|
124
|
+
slug
|
|
125
|
+
name
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
`, { accountId })
|
|
130
|
+
.toPromise());
|
|
131
|
+
return data.supabaseConnection.listSupabaseOrganizations;
|
|
132
|
+
},
|
|
133
|
+
async fetchSupabasePublishableKeyAsync(graphqlClient, appId) {
|
|
134
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
135
|
+
.mutation((0, graphql_tag_1.default) `
|
|
136
|
+
mutation FetchSupabasePublishableKey($appId: ID!) {
|
|
137
|
+
supabaseProject {
|
|
138
|
+
fetchSupabasePublishableKey(appId: $appId)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`, { appId })
|
|
142
|
+
.toPromise());
|
|
143
|
+
return data.supabaseProject.fetchSupabasePublishableKey;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { SupabaseConnectionData, SupabaseProjectData } from '../types/SupabaseConnection';
|
|
3
|
+
export declare const SupabaseQuery: {
|
|
4
|
+
getSupabaseConnectionByAccountIdAsync(graphqlClient: ExpoGraphqlClient, accountId: string, { useCache }?: {
|
|
5
|
+
useCache?: boolean;
|
|
6
|
+
}): Promise<SupabaseConnectionData | null>;
|
|
7
|
+
getSupabaseProjectByAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string, { useCache }?: {
|
|
8
|
+
useCache?: boolean;
|
|
9
|
+
}): Promise<SupabaseProjectData | null>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupabaseQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
7
|
+
const client_1 = require("../client");
|
|
8
|
+
const SupabaseConnection_1 = require("../types/SupabaseConnection");
|
|
9
|
+
exports.SupabaseQuery = {
|
|
10
|
+
async getSupabaseConnectionByAccountIdAsync(graphqlClient, accountId, { useCache = true } = {}) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.query((0, graphql_tag_1.default) `
|
|
13
|
+
query SupabaseConnectionByAccountId($accountId: String!) {
|
|
14
|
+
account {
|
|
15
|
+
byId(accountId: $accountId) {
|
|
16
|
+
id
|
|
17
|
+
supabaseConnection {
|
|
18
|
+
id
|
|
19
|
+
...SupabaseConnectionFragment
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
${(0, graphql_1.print)(SupabaseConnection_1.SupabaseConnectionFragmentNode)}
|
|
25
|
+
`, { accountId }, {
|
|
26
|
+
additionalTypenames: ['SupabaseConnection'],
|
|
27
|
+
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
|
28
|
+
})
|
|
29
|
+
.toPromise());
|
|
30
|
+
return data.account.byId.supabaseConnection ?? null;
|
|
31
|
+
},
|
|
32
|
+
async getSupabaseProjectByAppIdAsync(graphqlClient, appId, { useCache = true } = {}) {
|
|
33
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
34
|
+
.query((0, graphql_tag_1.default) `
|
|
35
|
+
query SupabaseProjectByAppId($appId: String!) {
|
|
36
|
+
app {
|
|
37
|
+
byId(appId: $appId) {
|
|
38
|
+
id
|
|
39
|
+
supabaseProject {
|
|
40
|
+
id
|
|
41
|
+
...SupabaseProjectFragment
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
${(0, graphql_1.print)(SupabaseConnection_1.SupabaseProjectFragmentNode)}
|
|
47
|
+
`, { appId }, {
|
|
48
|
+
additionalTypenames: ['App', 'SupabaseProject'],
|
|
49
|
+
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
|
50
|
+
})
|
|
51
|
+
.toPromise());
|
|
52
|
+
return data.app.byId.supabaseProject ?? null;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -32,26 +32,31 @@ exports.BuildFragmentNode = (0, graphql_tag_1.default) `
|
|
|
32
32
|
displayName
|
|
33
33
|
}
|
|
34
34
|
logFiles
|
|
35
|
-
|
|
35
|
+
app {
|
|
36
36
|
__typename
|
|
37
37
|
id
|
|
38
38
|
name
|
|
39
39
|
slug
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
name
|
|
44
|
-
}
|
|
40
|
+
ownerAccount {
|
|
41
|
+
id
|
|
42
|
+
name
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
|
-
|
|
45
|
+
updateChannel {
|
|
46
|
+
id
|
|
47
|
+
name
|
|
48
|
+
}
|
|
48
49
|
distribution
|
|
49
50
|
iosEnterpriseProvisioning
|
|
50
51
|
buildProfile
|
|
52
|
+
appIdentifier
|
|
51
53
|
sdkVersion
|
|
52
54
|
appVersion
|
|
53
55
|
appBuildVersion
|
|
54
|
-
|
|
56
|
+
runtime {
|
|
57
|
+
id
|
|
58
|
+
version
|
|
59
|
+
}
|
|
55
60
|
gitCommitHash
|
|
56
61
|
gitCommitMessage
|
|
57
62
|
initialQueuePosition
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SupabaseConnection, SupabaseOAuthStart, SupabaseOrganization, SupabaseProject } from '../generated';
|
|
2
|
+
export { BeginSupabaseOAuthInput, LinkSupabaseProjectInput, ProvisionAdditionalSupabaseProjectInput, ProvisionSupabaseProjectInput, SetSupabaseConnectionOrganizationInput, } from '../generated';
|
|
3
|
+
export type SupabaseOrganizationData = Pick<SupabaseOrganization, 'id' | 'slug' | 'name'>;
|
|
4
|
+
export type SupabaseConnectionData = Pick<SupabaseConnection, 'id' | 'supabaseOrganizationSlug' | 'supabaseOrganizationName' | 'createdAt' | 'updatedAt'>;
|
|
5
|
+
export type SupabaseProjectData = Pick<SupabaseProject, 'id' | 'supabaseProjectRef' | 'supabaseProjectName' | 'supabaseProjectUrl' | 'supabaseRegion' | 'createdAt' | 'updatedAt'>;
|
|
6
|
+
export type SupabaseOAuthStartData = Pick<SupabaseOAuthStart, 'url'>;
|
|
7
|
+
export declare const SupabaseConnectionFragmentNode: import("graphql").DocumentNode;
|
|
8
|
+
export declare const SupabaseProjectFragmentNode: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupabaseProjectFragmentNode = exports.SupabaseConnectionFragmentNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
exports.SupabaseConnectionFragmentNode = (0, graphql_tag_1.default) `
|
|
7
|
+
fragment SupabaseConnectionFragment on SupabaseConnection {
|
|
8
|
+
id
|
|
9
|
+
supabaseOrganizationSlug
|
|
10
|
+
supabaseOrganizationName
|
|
11
|
+
createdAt
|
|
12
|
+
updatedAt
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
exports.SupabaseProjectFragmentNode = (0, graphql_tag_1.default) `
|
|
16
|
+
fragment SupabaseProjectFragment on SupabaseProject {
|
|
17
|
+
id
|
|
18
|
+
supabaseProjectRef
|
|
19
|
+
supabaseProjectName
|
|
20
|
+
supabaseProjectUrl
|
|
21
|
+
supabaseRegion
|
|
22
|
+
createdAt
|
|
23
|
+
updatedAt
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EnvVar } from '../../environments/variables';
|
|
2
|
+
export declare function writeEnvLocalAsync(projectDir: string, envVars: EnvVar[], { label, nonInteractive, overwrite, }: {
|
|
3
|
+
label: string;
|
|
4
|
+
nonInteractive: boolean;
|
|
5
|
+
overwrite: boolean;
|
|
6
|
+
}): Promise<boolean>;
|
|
7
|
+
export declare function mergeEnvContent(rawContent: string, newVars: Record<string, string>): string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.writeEnvLocalAsync = writeEnvLocalAsync;
|
|
4
|
+
exports.mergeEnvContent = mergeEnvContent;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const dotenv_1 = tslib_1.__importDefault(require("dotenv"));
|
|
8
|
+
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
9
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
11
|
+
const prompts_1 = require("../../prompts");
|
|
12
|
+
async function writeEnvLocalAsync(projectDir, envVars, { label, nonInteractive, overwrite, }) {
|
|
13
|
+
const envPath = path_1.default.join(projectDir, '.env.local');
|
|
14
|
+
let rawContent = '';
|
|
15
|
+
if (await fs.pathExists(envPath)) {
|
|
16
|
+
rawContent = await fs.readFile(envPath, 'utf8');
|
|
17
|
+
const existing = dotenv_1.default.parse(rawContent);
|
|
18
|
+
const conflicts = envVars.filter(v => existing[v.name] !== undefined);
|
|
19
|
+
if (conflicts.length > 0 && !overwrite) {
|
|
20
|
+
if (nonInteractive) {
|
|
21
|
+
log_1.default.warn(`.env.local already defines ${conflicts.map(v => v.name).join(', ')}; skipped (pass --overwrite to replace).`);
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
const confirmed = await (0, prompts_1.confirmAsync)({
|
|
25
|
+
message: `.env.local already defines ${conflicts
|
|
26
|
+
.map(v => v.name)
|
|
27
|
+
.join(', ')}. Overwrite with the ${label} values?`,
|
|
28
|
+
});
|
|
29
|
+
if (!confirmed) {
|
|
30
|
+
log_1.default.warn(`Skipped updating ${chalk_1.default.bold('.env.local')}.`);
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const updatedContent = mergeEnvContent(rawContent, Object.fromEntries(envVars.map(v => [v.name, v.value])));
|
|
36
|
+
await fs.writeFile(envPath, updatedContent);
|
|
37
|
+
log_1.default.withTick(`Wrote ${label} config to ${chalk_1.default.bold('.env.local')}`);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
// Copied from dotenv (lib/main.js) so this finds exactly the keys dotenv.parse reports above.
|
|
41
|
+
const DOTENV_LINE = /^\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?$/gm;
|
|
42
|
+
// dotenv trims unquoted values, cuts them at `#`, and strips one layer of quotes. Inside double
|
|
43
|
+
// quotes it unescapes only `\n` and `\r`, so `"` and `\` stay literal.
|
|
44
|
+
function formatEnvValue(value) {
|
|
45
|
+
if (value === value.trim() && !/[#\r\n'"`]/.test(value.charAt(0) + value)) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return `"${value.replace(/\n/g, '\\n').replace(/\r/g, '\\r')}"`;
|
|
49
|
+
}
|
|
50
|
+
function mergeEnvContent(rawContent, newVars) {
|
|
51
|
+
const edits = [];
|
|
52
|
+
const rewritten = new Set();
|
|
53
|
+
const regex = new RegExp(DOTENV_LINE.source, `${DOTENV_LINE.flags}d`);
|
|
54
|
+
let match;
|
|
55
|
+
while ((match = regex.exec(rawContent)) !== null) {
|
|
56
|
+
const key = match[1];
|
|
57
|
+
if (!Object.hasOwn(newVars, key) || !match.indices) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
// match[0] runs past the value onto a following comment line, so spans come from the groups.
|
|
61
|
+
const [keyStart, keyEnd] = match.indices[1];
|
|
62
|
+
const valueRange = match.indices[2];
|
|
63
|
+
const definitionEnd = valueRange
|
|
64
|
+
? valueRange[1] - (/\s+$/.exec(match[2])?.[0].length ?? 0)
|
|
65
|
+
: keyEnd + (/^[ \t]*(?:=[ \t]*|:[ \t]+)/.exec(rawContent.slice(keyEnd))?.[0].length ?? 0);
|
|
66
|
+
if (!rewritten.has(key)) {
|
|
67
|
+
rewritten.add(key);
|
|
68
|
+
edits.push({
|
|
69
|
+
start: keyStart,
|
|
70
|
+
end: definitionEnd,
|
|
71
|
+
text: `${key}=${formatEnvValue(newVars[key])}`,
|
|
72
|
+
});
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
// dotenv lets a later definition win, so an extra one left behind would keep the stale value.
|
|
76
|
+
const nextNewline = rawContent.indexOf('\n', definitionEnd);
|
|
77
|
+
edits.push({
|
|
78
|
+
start: rawContent.lastIndexOf('\n', keyStart - 1) + 1,
|
|
79
|
+
end: nextNewline === -1 ? rawContent.length : nextNewline + 1,
|
|
80
|
+
text: '',
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
let content = rawContent;
|
|
84
|
+
for (const { start, end, text } of edits.reverse()) {
|
|
85
|
+
content = content.slice(0, start) + text + content.slice(end);
|
|
86
|
+
}
|
|
87
|
+
for (const [key, value] of Object.entries(newVars).filter(([key]) => !rewritten.has(key))) {
|
|
88
|
+
if (content.length > 0 && !content.endsWith('\n')) {
|
|
89
|
+
content += '\n';
|
|
90
|
+
}
|
|
91
|
+
content += `${key}=${formatEnvValue(value)}\n`;
|
|
92
|
+
}
|
|
93
|
+
return content;
|
|
94
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
export type SdkInstallResult = {
|
|
3
|
+
status: 'installed';
|
|
4
|
+
dynamicConfigGuidance?: string;
|
|
5
|
+
} | {
|
|
6
|
+
status: 'failed';
|
|
7
|
+
};
|
|
8
|
+
export declare function getSpawnErrorOutput(error: unknown): string;
|
|
9
|
+
export declare function extractDynamicConfigGuidance(output: string): string | null;
|
|
10
|
+
export declare function envForExpoInstall(): NodeJS.ProcessEnv;
|
|
11
|
+
export declare function installSdkPackagesAsync(projectDir: string, { packages, label, jsonFlag }: {
|
|
12
|
+
packages: string[];
|
|
13
|
+
label: string;
|
|
14
|
+
jsonFlag: boolean;
|
|
15
|
+
}): Promise<SdkInstallResult>;
|
|
16
|
+
export declare function addConfigPluginAsync(projectDir: string, exp: ExpoConfig, { plugin }: {
|
|
17
|
+
plugin: string;
|
|
18
|
+
}): Promise<string | null>;
|
|
19
|
+
export declare function setupSdkAndConfigAsync(projectDir: string, exp: ExpoConfig, { packages, plugin, label, jsonFlag, }: {
|
|
20
|
+
packages: string[];
|
|
21
|
+
plugin: string;
|
|
22
|
+
label: string;
|
|
23
|
+
jsonFlag: boolean;
|
|
24
|
+
}): Promise<string[]>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpawnErrorOutput = getSpawnErrorOutput;
|
|
4
|
+
exports.extractDynamicConfigGuidance = extractDynamicConfigGuidance;
|
|
5
|
+
exports.envForExpoInstall = envForExpoInstall;
|
|
6
|
+
exports.installSdkPackagesAsync = installSdkPackagesAsync;
|
|
7
|
+
exports.addConfigPluginAsync = addConfigPluginAsync;
|
|
8
|
+
exports.setupSdkAndConfigAsync = setupSdkAndConfigAsync;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
11
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
12
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
13
|
+
const ora_1 = require("../../ora");
|
|
14
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
15
|
+
const DYNAMIC_CONFIG_MARKER = 'Cannot automatically write to dynamic config';
|
|
16
|
+
function getSpawnErrorOutput(error) {
|
|
17
|
+
const { stdout, stderr } = (error ?? {});
|
|
18
|
+
return `${stdout ?? ''}${stderr ?? ''}`;
|
|
19
|
+
}
|
|
20
|
+
function extractDynamicConfigGuidance(output) {
|
|
21
|
+
const index = output.indexOf(DYNAMIC_CONFIG_MARKER);
|
|
22
|
+
if (index === -1) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return output.slice(index).trim();
|
|
26
|
+
}
|
|
27
|
+
// These point eas-cli at a local or staging server; SDK packages always come from production.
|
|
28
|
+
function envForExpoInstall() {
|
|
29
|
+
const env = { ...process.env };
|
|
30
|
+
delete env.EXPO_LOCAL;
|
|
31
|
+
delete env.EXPO_STAGING;
|
|
32
|
+
delete env.EXPO_UNIVERSE_DIR;
|
|
33
|
+
return env;
|
|
34
|
+
}
|
|
35
|
+
async function installSdkPackagesAsync(projectDir, { packages, label, jsonFlag }) {
|
|
36
|
+
const spinner = jsonFlag ? null : (0, ora_1.ora)(`Installing the ${label} SDK packages`).start();
|
|
37
|
+
try {
|
|
38
|
+
await (0, spawn_async_1.default)('npx', ['expo', 'install', ...packages], {
|
|
39
|
+
cwd: projectDir,
|
|
40
|
+
env: envForExpoInstall(),
|
|
41
|
+
});
|
|
42
|
+
spinner?.succeed(`Installed the ${label} SDK packages`);
|
|
43
|
+
return { status: 'installed' };
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const output = getSpawnErrorOutput(error);
|
|
47
|
+
log_1.default.debug(output || error);
|
|
48
|
+
const dynamicConfigGuidance = extractDynamicConfigGuidance(output);
|
|
49
|
+
if (dynamicConfigGuidance) {
|
|
50
|
+
spinner?.warn(`Installed the ${label} SDK packages — add the config plugin to your app config`);
|
|
51
|
+
return { status: 'installed', dynamicConfigGuidance };
|
|
52
|
+
}
|
|
53
|
+
spinner?.warn(`Could not install the ${label} SDK packages`);
|
|
54
|
+
return { status: 'failed' };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function addConfigPluginAsync(projectDir, exp, { plugin }) {
|
|
58
|
+
const plugins = exp.plugins ?? [];
|
|
59
|
+
const alreadyAdded = plugins.some(p => (Array.isArray(p) ? p[0] : p) === plugin);
|
|
60
|
+
if (alreadyAdded) {
|
|
61
|
+
log_1.default.withTick(`Config plugin ${chalk_1.default.bold(plugin)} is already configured`);
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
const modification = await (0, expoConfig_1.createOrModifyExpoConfigAsync)(projectDir, { plugins: [...plugins, plugin] }, { skipSDKVersionRequirement: true });
|
|
65
|
+
if (modification.type === 'success') {
|
|
66
|
+
log_1.default.withTick(`Added the ${chalk_1.default.bold(plugin)} config plugin`);
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
if (modification.type === 'warn') {
|
|
70
|
+
return `${modification.message} Add ${JSON.stringify(plugin)} to the "plugins" array in your app config.`;
|
|
71
|
+
}
|
|
72
|
+
return `Add ${JSON.stringify(plugin)} to the "plugins" array in your app config.`;
|
|
73
|
+
}
|
|
74
|
+
async function setupSdkAndConfigAsync(projectDir, exp, { packages, plugin, label, jsonFlag, }) {
|
|
75
|
+
const installResult = await installSdkPackagesAsync(projectDir, { packages, label, jsonFlag });
|
|
76
|
+
// Adding the plugin for a package that isn't installed leaves the app config unresolvable.
|
|
77
|
+
if (installResult.status === 'failed') {
|
|
78
|
+
return [
|
|
79
|
+
`The ${label} SDK packages didn't install, so the ${plugin} config plugin was not added. Run npx expo install ${packages.join(' ')} from your project directory, then re-run this command.`,
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
if (installResult.dynamicConfigGuidance) {
|
|
83
|
+
return [installResult.dynamicConfigGuidance];
|
|
84
|
+
}
|
|
85
|
+
const pluginManualStep = await addConfigPluginAsync(projectDir, exp, { plugin });
|
|
86
|
+
return pluginManualStep ? [pluginManualStep] : [];
|
|
87
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultEnvironment } from '../../build/utils/environment';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
+
import { EnvVar } from '../../environments/variables';
|
|
4
|
+
export declare const EAS_SUPABASE_URL_ENV_VAR_NAME = "EXPO_PUBLIC_SUPABASE_URL";
|
|
5
|
+
export declare const EAS_SUPABASE_PUBLISHABLE_KEY_ENV_VAR_NAME = "EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY";
|
|
6
|
+
/** Label passed into shared env helpers for prompts and log lines. */
|
|
7
|
+
export declare const SUPABASE_ENV_LABEL = "Supabase";
|
|
8
|
+
export declare const EAS_SUPABASE_ENVIRONMENTS: DefaultEnvironment[];
|
|
9
|
+
export declare function supabaseMoveConfirmMessage(variableName: string, overlappingEnvironments: string): string;
|
|
10
|
+
export declare function supabaseEnvironmentCancelMessage(knownEnvironments: string): string;
|
|
11
|
+
export declare function createSupabaseEnvVars(url: string, publishableKey: string): EnvVar[];
|
|
12
|
+
export declare function confirmOverwriteForAdditionalProjectAsync(graphqlClient: ExpoGraphqlClient, projectId: string, environments: string[], nonInteractive: boolean, overwrite: boolean): Promise<{
|
|
13
|
+
forceOverwrite: boolean;
|
|
14
|
+
}>;
|