eas-cli 10.2.2 → 10.2.4
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 +60 -60
- package/build/build/local.js +1 -1
- package/build/build/metadata.js +1 -0
- package/build/build/runBuildAndSubmit.js +11 -0
- package/build/commandUtils/flags.d.ts +13 -0
- package/build/commandUtils/flags.js +47 -1
- package/build/commands/env/create.d.ts +23 -0
- package/build/commands/env/create.js +164 -0
- package/build/commands/env/delete.d.ts +18 -0
- package/build/commands/env/delete.js +92 -0
- package/build/commands/env/get.d.ts +19 -0
- package/build/commands/env/get.js +92 -0
- package/build/commands/env/link.d.ts +15 -0
- package/build/commands/env/link.js +57 -0
- package/build/commands/env/list.d.ts +16 -0
- package/build/commands/env/list.js +55 -0
- package/build/commands/env/unlink.d.ts +15 -0
- package/build/commands/env/unlink.js +62 -0
- package/build/commands/env/update.d.ts +21 -0
- package/build/commands/env/update.js +130 -0
- package/build/env.d.ts +5 -0
- package/build/env.js +5 -0
- package/build/graphql/generated.d.ts +555 -52
- package/build/graphql/generated.js +42 -2
- package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +38 -0
- package/build/graphql/mutations/EnvironmentVariableMutation.js +113 -0
- package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +13 -0
- package/build/graphql/queries/EnvironmentVariablesQuery.js +83 -0
- package/build/graphql/types/EnvironmentVariable.d.ts +1 -0
- package/build/graphql/types/EnvironmentVariable.js +16 -0
- package/build/project/ios/bundleIdentifier.js +4 -0
- package/build/utils/formatVariable.d.ts +2 -0
- package/build/utils/formatVariable.js +16 -0
- package/build/utils/prompts.d.ts +9 -0
- package/build/utils/prompts.js +68 -0
- package/oclif.manifest.json +410 -1
- package/package.json +5 -5
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* For more info and docs, visit https://graphql-code-generator.com/
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.WorkerLoggerLevel = exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResourceClassExperiment = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = void 0;
|
|
9
|
+
exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubAppInstallationStatus = exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentVariableEnvironment = exports.EnvironmentSecretType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountAppsSortByField = void 0;
|
|
10
|
+
exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResourceClassExperiment = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = void 0;
|
|
11
11
|
var AccountAppsSortByField;
|
|
12
12
|
(function (AccountAppsSortByField) {
|
|
13
13
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -124,6 +124,7 @@ var AuthProviderIdentifier;
|
|
|
124
124
|
AuthProviderIdentifier["MsEntraId"] = "MS_ENTRA_ID";
|
|
125
125
|
AuthProviderIdentifier["Okta"] = "OKTA";
|
|
126
126
|
AuthProviderIdentifier["OneLogin"] = "ONE_LOGIN";
|
|
127
|
+
AuthProviderIdentifier["StubIdp"] = "STUB_IDP";
|
|
127
128
|
})(AuthProviderIdentifier || (exports.AuthProviderIdentifier = AuthProviderIdentifier = {}));
|
|
128
129
|
var BackgroundJobResultType;
|
|
129
130
|
(function (BackgroundJobResultType) {
|
|
@@ -259,6 +260,26 @@ var BuildWorkflow;
|
|
|
259
260
|
BuildWorkflow["Managed"] = "MANAGED";
|
|
260
261
|
BuildWorkflow["Unknown"] = "UNKNOWN";
|
|
261
262
|
})(BuildWorkflow || (exports.BuildWorkflow = BuildWorkflow = {}));
|
|
263
|
+
var CustomDomainDnsRecordType;
|
|
264
|
+
(function (CustomDomainDnsRecordType) {
|
|
265
|
+
CustomDomainDnsRecordType["Cname"] = "CNAME";
|
|
266
|
+
CustomDomainDnsRecordType["Txt"] = "TXT";
|
|
267
|
+
})(CustomDomainDnsRecordType || (exports.CustomDomainDnsRecordType = CustomDomainDnsRecordType = {}));
|
|
268
|
+
var CustomDomainStatus;
|
|
269
|
+
(function (CustomDomainStatus) {
|
|
270
|
+
CustomDomainStatus["Active"] = "ACTIVE";
|
|
271
|
+
CustomDomainStatus["ActiveRedeploying"] = "ACTIVE_REDEPLOYING";
|
|
272
|
+
CustomDomainStatus["Blocked"] = "BLOCKED";
|
|
273
|
+
CustomDomainStatus["Deleted"] = "DELETED";
|
|
274
|
+
CustomDomainStatus["Moved"] = "MOVED";
|
|
275
|
+
CustomDomainStatus["Pending"] = "PENDING";
|
|
276
|
+
CustomDomainStatus["PendingBlocked"] = "PENDING_BLOCKED";
|
|
277
|
+
CustomDomainStatus["PendingDeletion"] = "PENDING_DELETION";
|
|
278
|
+
CustomDomainStatus["PendingMigration"] = "PENDING_MIGRATION";
|
|
279
|
+
CustomDomainStatus["PendingProvisioned"] = "PENDING_PROVISIONED";
|
|
280
|
+
CustomDomainStatus["Provisioned"] = "PROVISIONED";
|
|
281
|
+
CustomDomainStatus["Unknown"] = "UNKNOWN";
|
|
282
|
+
})(CustomDomainStatus || (exports.CustomDomainStatus = CustomDomainStatus = {}));
|
|
262
283
|
var DistributionType;
|
|
263
284
|
(function (DistributionType) {
|
|
264
285
|
DistributionType["Internal"] = "INTERNAL";
|
|
@@ -321,6 +342,12 @@ var EnvironmentVariableScope;
|
|
|
321
342
|
EnvironmentVariableScope["Project"] = "PROJECT";
|
|
322
343
|
EnvironmentVariableScope["Shared"] = "SHARED";
|
|
323
344
|
})(EnvironmentVariableScope || (exports.EnvironmentVariableScope = EnvironmentVariableScope = {}));
|
|
345
|
+
var EnvironmentVariableVisibility;
|
|
346
|
+
(function (EnvironmentVariableVisibility) {
|
|
347
|
+
EnvironmentVariableVisibility["Public"] = "PUBLIC";
|
|
348
|
+
EnvironmentVariableVisibility["Secret"] = "SECRET";
|
|
349
|
+
EnvironmentVariableVisibility["Sensitive"] = "SENSITIVE";
|
|
350
|
+
})(EnvironmentVariableVisibility || (exports.EnvironmentVariableVisibility = EnvironmentVariableVisibility = {}));
|
|
324
351
|
var Experiment;
|
|
325
352
|
(function (Experiment) {
|
|
326
353
|
Experiment["Orbit"] = "ORBIT";
|
|
@@ -377,6 +404,10 @@ var GitHubJobRunTriggerType;
|
|
|
377
404
|
GitHubJobRunTriggerType["PullRequestUpdated"] = "PULL_REQUEST_UPDATED";
|
|
378
405
|
GitHubJobRunTriggerType["PushToBranch"] = "PUSH_TO_BRANCH";
|
|
379
406
|
})(GitHubJobRunTriggerType || (exports.GitHubJobRunTriggerType = GitHubJobRunTriggerType = {}));
|
|
407
|
+
var InsightsFilterType;
|
|
408
|
+
(function (InsightsFilterType) {
|
|
409
|
+
InsightsFilterType["Platform"] = "PLATFORM";
|
|
410
|
+
})(InsightsFilterType || (exports.InsightsFilterType = InsightsFilterType = {}));
|
|
380
411
|
var InvoiceDiscountType;
|
|
381
412
|
(function (InvoiceDiscountType) {
|
|
382
413
|
InvoiceDiscountType["Amount"] = "AMOUNT";
|
|
@@ -630,6 +661,15 @@ var WebhookType;
|
|
|
630
661
|
WebhookType["Build"] = "BUILD";
|
|
631
662
|
WebhookType["Submit"] = "SUBMIT";
|
|
632
663
|
})(WebhookType || (exports.WebhookType = WebhookType = {}));
|
|
664
|
+
var WorkerDeploymentLogLevel;
|
|
665
|
+
(function (WorkerDeploymentLogLevel) {
|
|
666
|
+
WorkerDeploymentLogLevel["Debug"] = "DEBUG";
|
|
667
|
+
WorkerDeploymentLogLevel["Error"] = "ERROR";
|
|
668
|
+
WorkerDeploymentLogLevel["Fatal"] = "FATAL";
|
|
669
|
+
WorkerDeploymentLogLevel["Info"] = "INFO";
|
|
670
|
+
WorkerDeploymentLogLevel["Log"] = "LOG";
|
|
671
|
+
WorkerDeploymentLogLevel["Warn"] = "WARN";
|
|
672
|
+
})(WorkerDeploymentLogLevel || (exports.WorkerDeploymentLogLevel = WorkerDeploymentLogLevel = {}));
|
|
633
673
|
var WorkerLoggerLevel;
|
|
634
674
|
(function (WorkerLoggerLevel) {
|
|
635
675
|
WorkerLoggerLevel["Debug"] = "DEBUG";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { EnvironmentVariableFragment, EnvironmentVariableVisibility } from '../generated';
|
|
3
|
+
type UpdateVariableArgs = {
|
|
4
|
+
value?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
overwrite: true;
|
|
7
|
+
visibility?: EnvironmentVariableVisibility;
|
|
8
|
+
};
|
|
9
|
+
export type EnvironmentVariablePushInput = {
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
environment: string;
|
|
13
|
+
visibility: EnvironmentVariableVisibility;
|
|
14
|
+
overwrite?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const EnvironmentVariableMutation: {
|
|
17
|
+
linkSharedEnvironmentVariableAsync(graphqlClient: ExpoGraphqlClient, environmentVariableId: string, appId: string, environment: string): Promise<EnvironmentVariableFragment>;
|
|
18
|
+
unlinkSharedEnvironmentVariableAsync(graphqlClient: ExpoGraphqlClient, environmentVariableId: string, appId: string, environment: string): Promise<EnvironmentVariableFragment>;
|
|
19
|
+
createSharedVariableAsync(graphqlClient: ExpoGraphqlClient, input: {
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
visibility: EnvironmentVariableVisibility;
|
|
23
|
+
overwrite?: boolean;
|
|
24
|
+
} | UpdateVariableArgs, accountId: string): Promise<EnvironmentVariableFragment>;
|
|
25
|
+
createForAppAsync(graphqlClient: ExpoGraphqlClient, input: {
|
|
26
|
+
name: string;
|
|
27
|
+
value?: string;
|
|
28
|
+
environment: string;
|
|
29
|
+
visibility: EnvironmentVariableVisibility;
|
|
30
|
+
overwrite?: boolean;
|
|
31
|
+
} | (UpdateVariableArgs & {
|
|
32
|
+
environment: string;
|
|
33
|
+
}), appId: string): Promise<EnvironmentVariableFragment>;
|
|
34
|
+
deleteAsync(graphqlClient: ExpoGraphqlClient, id: string): Promise<{
|
|
35
|
+
id: string;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnvironmentVariableMutation = 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 EnvironmentVariable_1 = require("../types/EnvironmentVariable");
|
|
9
|
+
exports.EnvironmentVariableMutation = {
|
|
10
|
+
async linkSharedEnvironmentVariableAsync(graphqlClient, environmentVariableId, appId, environment) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.mutation((0, graphql_tag_1.default) `
|
|
13
|
+
mutation LinkSharedEnvironmentVariable(
|
|
14
|
+
$appId: ID!
|
|
15
|
+
$environment: EnvironmentVariableEnvironment!
|
|
16
|
+
$environmentVariableId: ID!
|
|
17
|
+
) {
|
|
18
|
+
environmentVariable {
|
|
19
|
+
linkSharedEnvironmentVariable(
|
|
20
|
+
appId: $appId
|
|
21
|
+
environmentVariableId: $environmentVariableId
|
|
22
|
+
environment: $environment
|
|
23
|
+
) {
|
|
24
|
+
id
|
|
25
|
+
...EnvironmentVariableFragment
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
30
|
+
`, { appId, environment, environmentVariableId })
|
|
31
|
+
.toPromise());
|
|
32
|
+
return data.environmentVariable.linkSharedEnvironmentVariable;
|
|
33
|
+
},
|
|
34
|
+
async unlinkSharedEnvironmentVariableAsync(graphqlClient, environmentVariableId, appId, environment) {
|
|
35
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
36
|
+
.mutation((0, graphql_tag_1.default) `
|
|
37
|
+
mutation UnlinkSharedEnvironmentVariable(
|
|
38
|
+
$appId: ID!
|
|
39
|
+
$environment: EnvironmentVariableEnvironment!
|
|
40
|
+
$environmentVariableId: ID!
|
|
41
|
+
) {
|
|
42
|
+
environmentVariable {
|
|
43
|
+
unlinkSharedEnvironmentVariable(
|
|
44
|
+
appId: $appId
|
|
45
|
+
environmentVariableId: $environmentVariableId
|
|
46
|
+
environment: $environment
|
|
47
|
+
) {
|
|
48
|
+
id
|
|
49
|
+
...EnvironmentVariableFragment
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
54
|
+
`, { appId, environment, environmentVariableId })
|
|
55
|
+
.toPromise());
|
|
56
|
+
return data.environmentVariable.unlinkSharedEnvironmentVariable;
|
|
57
|
+
},
|
|
58
|
+
async createSharedVariableAsync(graphqlClient, input, accountId) {
|
|
59
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
60
|
+
.mutation((0, graphql_tag_1.default) `
|
|
61
|
+
mutation CreateEnvironmentVariableForAccount(
|
|
62
|
+
$input: CreateSharedEnvironmentVariableInput!
|
|
63
|
+
$accountId: ID!
|
|
64
|
+
) {
|
|
65
|
+
environmentVariable {
|
|
66
|
+
createEnvironmentVariableForAccount(
|
|
67
|
+
environmentVariableData: $input
|
|
68
|
+
accountId: $accountId
|
|
69
|
+
) {
|
|
70
|
+
id
|
|
71
|
+
...EnvironmentVariableFragment
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
76
|
+
`, { input, accountId })
|
|
77
|
+
.toPromise());
|
|
78
|
+
return data.environmentVariable.createEnvironmentVariableForAccount;
|
|
79
|
+
},
|
|
80
|
+
async createForAppAsync(graphqlClient, input, appId) {
|
|
81
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
82
|
+
.mutation((0, graphql_tag_1.default) `
|
|
83
|
+
mutation CreateEnvironmentVariableForApp(
|
|
84
|
+
$input: CreateEnvironmentVariableInput!
|
|
85
|
+
$appId: ID!
|
|
86
|
+
) {
|
|
87
|
+
environmentVariable {
|
|
88
|
+
createEnvironmentVariableForApp(environmentVariableData: $input, appId: $appId) {
|
|
89
|
+
id
|
|
90
|
+
...EnvironmentVariableFragment
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
95
|
+
`, { input, appId })
|
|
96
|
+
.toPromise());
|
|
97
|
+
return data.environmentVariable.createEnvironmentVariableForApp;
|
|
98
|
+
},
|
|
99
|
+
async deleteAsync(graphqlClient, id) {
|
|
100
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
101
|
+
.mutation((0, graphql_tag_1.default) `
|
|
102
|
+
mutation DeleteEnvironmentVariable($id: ID!) {
|
|
103
|
+
environmentVariable {
|
|
104
|
+
deleteEnvironmentVariable(id: $id) {
|
|
105
|
+
id
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`, { id })
|
|
110
|
+
.toPromise());
|
|
111
|
+
return data.environmentVariable.deleteEnvironmentVariable;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { EnvironmentVariableEnvironment, EnvironmentVariableFragment } from '../generated';
|
|
3
|
+
export declare const EnvironmentVariablesQuery: {
|
|
4
|
+
byAppIdWithSensitiveAsync(graphqlClient: ExpoGraphqlClient, { appId, environment, filterNames, }: {
|
|
5
|
+
appId: string;
|
|
6
|
+
environment: EnvironmentVariableEnvironment;
|
|
7
|
+
filterNames?: string[] | undefined;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
appVariables: EnvironmentVariableFragment[];
|
|
10
|
+
}>;
|
|
11
|
+
byAppIdAsync(graphqlClient: ExpoGraphqlClient, appId: string, environment: string, filterNames?: string[]): Promise<EnvironmentVariableFragment[]>;
|
|
12
|
+
sharedAsync(graphqlClient: ExpoGraphqlClient, appId: string, filterNames?: string[]): Promise<EnvironmentVariableFragment[]>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnvironmentVariablesQuery = 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 EnvironmentVariable_1 = require("../types/EnvironmentVariable");
|
|
9
|
+
exports.EnvironmentVariablesQuery = {
|
|
10
|
+
async byAppIdWithSensitiveAsync(graphqlClient, { appId, environment, filterNames, }) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.query((0, graphql_tag_1.default) `
|
|
13
|
+
query EnvironmentVariablesIncludingSensitiveByAppId(
|
|
14
|
+
$appId: String!
|
|
15
|
+
$filterNames: [String!]
|
|
16
|
+
$environment: EnvironmentVariableEnvironment!
|
|
17
|
+
) {
|
|
18
|
+
app {
|
|
19
|
+
byId(appId: $appId) {
|
|
20
|
+
id
|
|
21
|
+
environmentVariablesIncludingSensitive(
|
|
22
|
+
filterNames: $filterNames
|
|
23
|
+
environment: $environment
|
|
24
|
+
) {
|
|
25
|
+
id
|
|
26
|
+
name
|
|
27
|
+
value
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`, { appId, filterNames, environment }, { additionalTypenames: ['EnvironmentVariable'] })
|
|
33
|
+
.toPromise());
|
|
34
|
+
return {
|
|
35
|
+
appVariables: data.app?.byId.environmentVariablesIncludingSensitive ?? [],
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
async byAppIdAsync(graphqlClient, appId, environment, filterNames) {
|
|
39
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
40
|
+
.query((0, graphql_tag_1.default) `
|
|
41
|
+
query EnvironmentVariablesByAppId(
|
|
42
|
+
$appId: String!
|
|
43
|
+
$filterNames: [String!]
|
|
44
|
+
$environment: EnvironmentVariableEnvironment!
|
|
45
|
+
) {
|
|
46
|
+
app {
|
|
47
|
+
byId(appId: $appId) {
|
|
48
|
+
id
|
|
49
|
+
environmentVariables(filterNames: $filterNames, environment: $environment) {
|
|
50
|
+
id
|
|
51
|
+
...EnvironmentVariableFragment
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
57
|
+
`, { appId, filterNames, environment }, { additionalTypenames: ['EnvironmentVariable'] })
|
|
58
|
+
.toPromise());
|
|
59
|
+
return data.app?.byId.environmentVariables ?? [];
|
|
60
|
+
},
|
|
61
|
+
async sharedAsync(graphqlClient, appId, filterNames) {
|
|
62
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
63
|
+
.query((0, graphql_tag_1.default) `
|
|
64
|
+
query EnvironmentVariablesShared($appId: String!, $filterNames: [String!]) {
|
|
65
|
+
app {
|
|
66
|
+
byId(appId: $appId) {
|
|
67
|
+
id
|
|
68
|
+
ownerAccount {
|
|
69
|
+
id
|
|
70
|
+
environmentVariables(filterNames: $filterNames) {
|
|
71
|
+
id
|
|
72
|
+
...EnvironmentVariableFragment
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
${(0, graphql_1.print)(EnvironmentVariable_1.EnvironmentVariableFragmentNode)}
|
|
79
|
+
`, { appId, filterNames }, { additionalTypenames: ['EnvironmentVariable'] })
|
|
80
|
+
.toPromise());
|
|
81
|
+
return data.app?.byId.ownerAccount.environmentVariables ?? [];
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EnvironmentVariableFragmentNode: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnvironmentVariableFragmentNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
exports.EnvironmentVariableFragmentNode = (0, graphql_tag_1.default) `
|
|
7
|
+
fragment EnvironmentVariableFragment on EnvironmentVariable {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
value
|
|
11
|
+
environment
|
|
12
|
+
createdAt
|
|
13
|
+
scope
|
|
14
|
+
visibility
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -9,6 +9,7 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
|
9
9
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
10
10
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
11
|
const appJson_1 = require("../../build/utils/appJson");
|
|
12
|
+
const env_1 = tslib_1.__importDefault(require("../../env"));
|
|
12
13
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
13
14
|
const prompts_1 = require("../../prompts");
|
|
14
15
|
const projectUtils_1 = require("../projectUtils");
|
|
@@ -41,6 +42,9 @@ async function getBundleIdentifierAsync(projectDir, exp, vcsClient, xcodeContext
|
|
|
41
42
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
42
43
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
43
44
|
warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir, exp);
|
|
45
|
+
if (env_1.default.overrideIosBundleIdentifier) {
|
|
46
|
+
return env_1.default.overrideIosBundleIdentifier;
|
|
47
|
+
}
|
|
44
48
|
const xcodeProject = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(projectDir);
|
|
45
49
|
const isMultiScheme = config_plugins_1.IOSConfig.BuildScheme.getSchemesFromXcodeproj(projectDir).length > 1;
|
|
46
50
|
const isMultiTarget = config_plugins_1.IOSConfig.Target.getNativeTargets(xcodeProject).filter(([, target]) => config_plugins_1.IOSConfig.Target.isTargetOfType(target, config_plugins_1.IOSConfig.Target.TargetType.APPLICATION)).length > 1;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatVariable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
|
|
6
|
+
const formatFields_1 = tslib_1.__importDefault(require("./formatFields"));
|
|
7
|
+
function formatVariable(variable) {
|
|
8
|
+
return (0, formatFields_1.default)([
|
|
9
|
+
{ label: 'ID', value: variable.id },
|
|
10
|
+
{ label: 'Name', value: variable.name },
|
|
11
|
+
{ label: 'Value', value: variable.value ?? '(secret)' },
|
|
12
|
+
{ label: 'Scope', value: variable.scope },
|
|
13
|
+
{ label: 'Created at', value: (0, dateformat_1.default)(variable.createdAt, 'mmm dd HH:MM:ss') },
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
exports.formatVariable = formatVariable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EnvironmentVariableEnvironment } from '../graphql/generated';
|
|
2
|
+
export declare function promptVariableEnvironmentAsync(nonInteractive: boolean): Promise<EnvironmentVariableEnvironment>;
|
|
3
|
+
export declare function promptVariableValueAsync({ nonInteractive, required, hidden, initial, }: {
|
|
4
|
+
nonInteractive: boolean;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
initial?: string | null;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
export declare function promptVariableNameAsync(nonInteractive: boolean): Promise<string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const generated_1 = require("../graphql/generated");
|
|
7
|
+
const prompts_1 = require("../prompts");
|
|
8
|
+
async function promptVariableEnvironmentAsync(nonInteractive) {
|
|
9
|
+
if (nonInteractive) {
|
|
10
|
+
throw new Error('The `--environment` flag must be set when running in `--non-interactive` mode.');
|
|
11
|
+
}
|
|
12
|
+
return await (0, prompts_1.selectAsync)('Select environment:', [
|
|
13
|
+
{ title: 'Development', value: generated_1.EnvironmentVariableEnvironment.Development },
|
|
14
|
+
{ title: 'Preview', value: generated_1.EnvironmentVariableEnvironment.Preview },
|
|
15
|
+
{ title: 'Production', value: generated_1.EnvironmentVariableEnvironment.Production },
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
exports.promptVariableEnvironmentAsync = promptVariableEnvironmentAsync;
|
|
19
|
+
async function promptVariableValueAsync({ nonInteractive, required = true, hidden = false, initial, }) {
|
|
20
|
+
if (nonInteractive && required) {
|
|
21
|
+
throw new Error(`Environment variable needs 'value' to be specified when running in non-interactive mode. Run the command with ${chalk_1.default.bold('--value VARIABLE_VALUE')} flag to fix the issue`);
|
|
22
|
+
}
|
|
23
|
+
const { variableValue } = await (0, prompts_1.promptAsync)({
|
|
24
|
+
type: hidden ? 'password' : 'text',
|
|
25
|
+
name: 'variableValue',
|
|
26
|
+
message: 'Variable value:',
|
|
27
|
+
initial: initial ?? '',
|
|
28
|
+
validate: variableValue => {
|
|
29
|
+
if (!required) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (!variableValue || variableValue.trim() === '') {
|
|
33
|
+
return "Environment variable value can't be empty";
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!variableValue && required) {
|
|
39
|
+
throw new Error(`Environment variable needs 'value' to be specifed. Run the command again with ${chalk_1.default.bold('--value VARIABLE_VALUE')} flag or provide it interactively to fix the issue.`);
|
|
40
|
+
}
|
|
41
|
+
return variableValue;
|
|
42
|
+
}
|
|
43
|
+
exports.promptVariableValueAsync = promptVariableValueAsync;
|
|
44
|
+
async function promptVariableNameAsync(nonInteractive) {
|
|
45
|
+
const validationMessage = 'Variable name may not be empty.';
|
|
46
|
+
if (nonInteractive) {
|
|
47
|
+
throw new Error(validationMessage);
|
|
48
|
+
}
|
|
49
|
+
const { name } = await (0, prompts_1.promptAsync)({
|
|
50
|
+
type: 'text',
|
|
51
|
+
name: 'name',
|
|
52
|
+
message: `Variable name:`,
|
|
53
|
+
validate: value => {
|
|
54
|
+
if (!value) {
|
|
55
|
+
return validationMessage;
|
|
56
|
+
}
|
|
57
|
+
if (!value.match(/^\w+$/)) {
|
|
58
|
+
return 'Names may contain only letters, numbers, and underscores.';
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
if (!name) {
|
|
64
|
+
throw new Error(validationMessage);
|
|
65
|
+
}
|
|
66
|
+
return name;
|
|
67
|
+
}
|
|
68
|
+
exports.promptVariableNameAsync = promptVariableNameAsync;
|