eas-cli 14.3.1 → 14.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -70
- package/build/build/android/version.js +1 -1
- package/build/build/evaluateConfigWithEnvVarsAsync.js +10 -16
- package/build/build/ios/version.js +1 -1
- package/build/build/local.js +1 -1
- package/build/commands/env/exec.d.ts +3 -0
- package/build/commands/env/exec.js +55 -15
- package/build/commands/fingerprint/compare.js +14 -0
- package/build/commands/worker/alias.d.ts +0 -1
- package/build/commands/worker/alias.js +0 -2
- package/build/commands/worker/deploy.d.ts +0 -1
- package/build/commands/worker/deploy.js +7 -4
- package/build/graphql/generated.d.ts +68 -5
- package/build/graphql/generated.js +9 -1
- package/build/graphql/mutations/FingerprintMutation.d.ts +9 -0
- package/build/graphql/mutations/FingerprintMutation.js +29 -0
- package/build/worker/assets.d.ts +5 -1
- package/build/worker/assets.js +18 -9
- package/oclif.manifest.json +1 -3
- package/package.json +4 -4
|
@@ -126,7 +126,7 @@ async function resolveRemoteVersionCodeAsync(graphqlClient, { projectDir, projec
|
|
|
126
126
|
}
|
|
127
127
|
else {
|
|
128
128
|
if (localVersions.appBuildVersion) {
|
|
129
|
-
log_1.default.
|
|
129
|
+
log_1.default.log(chalk_1.default.green('No remote versions are configured for this project, versionCode will be initialized based on the value from the local project.'));
|
|
130
130
|
currentBuildVersion = localVersions.appBuildVersion;
|
|
131
131
|
}
|
|
132
132
|
else {
|
|
@@ -43,10 +43,10 @@ async function resolveEnvVarsAsync({ buildProfile, buildProfileName, graphqlClie
|
|
|
43
43
|
.filter(({ name, value }) => name && value)
|
|
44
44
|
.map(({ name, value }) => [name, value]));
|
|
45
45
|
if (Object.keys(serverEnvVars).length > 0) {
|
|
46
|
-
log_1.default.log(`Environment variables with visibility "Plain text" and "Sensitive" loaded from the "${environment.toLowerCase()}" environment on EAS
|
|
46
|
+
log_1.default.log(`Environment variables with visibility "Plain text" and "Sensitive" loaded from the "${environment.toLowerCase()}" environment on EAS: ${Object.keys(serverEnvVars).join(', ')}.`);
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
-
log_1.default.log(`No environment variables with visibility "Plain text" and "Sensitive" found for the "${environment.toLowerCase()}" environment on EAS
|
|
49
|
+
log_1.default.log(`No environment variables with visibility "Plain text" and "Sensitive" found for the "${environment.toLowerCase()}" environment on EAS.`);
|
|
50
50
|
}
|
|
51
51
|
if (buildProfile.env && Object.keys(buildProfile.env).length > 0) {
|
|
52
52
|
log_1.default.log(`Environment variables loaded from the "${buildProfileName}" build profile "env" configuration: ${buildProfile.env && Object.keys(buildProfile.env).join(', ')}.`);
|
|
@@ -56,7 +56,7 @@ async function resolveEnvVarsAsync({ buildProfile, buildProfileName, graphqlClie
|
|
|
56
56
|
Object.keys(serverEnvVars).length > 0) {
|
|
57
57
|
const overlappingKeys = Object.keys(serverEnvVars).filter(key => buildProfile.env && Object.keys(buildProfile.env).includes(key));
|
|
58
58
|
if (overlappingKeys.length > 0) {
|
|
59
|
-
log_1.default.warn(`The following environment variables are defined in both the "${buildProfileName}" build profile "env" configuration and the "${environment.toLowerCase()}" environment on EAS
|
|
59
|
+
log_1.default.warn(`The following environment variables are defined in both the "${buildProfileName}" build profile "env" configuration and the "${environment.toLowerCase()}" environment on EAS: ${overlappingKeys.join(', ')}. The values from the build profile configuration will be used.`);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
log_1.default.newLine();
|
|
@@ -70,17 +70,11 @@ async function resolveEnvVarsAsync({ buildProfile, buildProfileName, graphqlClie
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function resolveSuggestedEnvironmentForBuildProfileConfiguration(buildProfile) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
log_1.default.log(`We detected that you are building the development client. Resolving the environment for environment variables used during the build to "development". ${setEnvironmentMessage}`);
|
|
81
|
-
return generated_1.EnvironmentVariableEnvironment.Development;
|
|
82
|
-
}
|
|
83
|
-
log_1.default.log(`We detected that you are building for the "internal" distribution. Resolving the environment for environment variables used during the build to "preview". ${setEnvironmentMessage}`);
|
|
84
|
-
return generated_1.EnvironmentVariableEnvironment.Preview;
|
|
85
|
-
}
|
|
73
|
+
const environment = buildProfile.distribution === 'store'
|
|
74
|
+
? generated_1.EnvironmentVariableEnvironment.Production
|
|
75
|
+
: buildProfile.developmentClient
|
|
76
|
+
? generated_1.EnvironmentVariableEnvironment.Development
|
|
77
|
+
: generated_1.EnvironmentVariableEnvironment.Preview;
|
|
78
|
+
log_1.default.log(`Resolved "${environment.toLowerCase()}" environment for the build. ${(0, log_1.learnMore)('https://docs.expo.dev/eas/environment-variables/#setting-the-environment-for-your-builds')}`);
|
|
79
|
+
return environment;
|
|
86
80
|
}
|
|
@@ -214,7 +214,7 @@ async function resolveRemoteBuildNumberAsync(graphqlClient, { projectDir, projec
|
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
216
216
|
if (localBuildNumber) {
|
|
217
|
-
log_1.default.
|
|
217
|
+
log_1.default.log(chalk_1.default.green('No remote versions are configured for this project, buildNumber will be initialized based on the value from the local project.'));
|
|
218
218
|
currentBuildVersion = localBuildNumber;
|
|
219
219
|
}
|
|
220
220
|
else {
|
package/build/build/local.js
CHANGED
|
@@ -7,7 +7,7 @@ const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
|
7
7
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
8
|
const ora_1 = require("../ora");
|
|
9
9
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
10
|
-
const PLUGIN_PACKAGE_VERSION = '1.0.
|
|
10
|
+
const PLUGIN_PACKAGE_VERSION = '1.0.163';
|
|
11
11
|
var LocalBuildMode;
|
|
12
12
|
(function (LocalBuildMode) {
|
|
13
13
|
/**
|
|
@@ -13,8 +13,11 @@ export default class EnvExec extends EasCommand {
|
|
|
13
13
|
required: boolean;
|
|
14
14
|
description: string;
|
|
15
15
|
}[];
|
|
16
|
+
private isNonInteractive;
|
|
16
17
|
runAsync(): Promise<void>;
|
|
17
18
|
private sanitizeFlagsAndArgs;
|
|
19
|
+
protected catch(err: Error): Promise<any>;
|
|
20
|
+
private runCommandNonInteractiveWithEnvVarsAsync;
|
|
18
21
|
private runCommandWithEnvVarsAsync;
|
|
19
22
|
private loadEnvironmentVariablesAsync;
|
|
20
23
|
}
|
|
@@ -30,23 +30,34 @@ class EnvExec extends EasCommand_1.default {
|
|
|
30
30
|
description: 'bash command to execute with the environment variables from the environment',
|
|
31
31
|
},
|
|
32
32
|
];
|
|
33
|
+
isNonInteractive = false;
|
|
33
34
|
async runAsync() {
|
|
34
35
|
const { flags, args } = await this.parse(EnvExec);
|
|
35
36
|
const parsedFlags = this.sanitizeFlagsAndArgs(flags, args);
|
|
36
37
|
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvExec, {
|
|
37
38
|
nonInteractive: parsedFlags.nonInteractive,
|
|
38
39
|
});
|
|
40
|
+
this.isNonInteractive = parsedFlags.nonInteractive;
|
|
39
41
|
const environment = parsedFlags.environment ??
|
|
40
42
|
(await (0, prompts_1.promptVariableEnvironmentAsync)({ nonInteractive: parsedFlags.nonInteractive }));
|
|
41
43
|
const environmentVariables = await this.loadEnvironmentVariablesAsync({
|
|
42
44
|
graphqlClient,
|
|
43
45
|
projectId,
|
|
44
46
|
environment,
|
|
47
|
+
nonInteractive: parsedFlags.nonInteractive,
|
|
45
48
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
if (parsedFlags.nonInteractive) {
|
|
50
|
+
await this.runCommandNonInteractiveWithEnvVarsAsync({
|
|
51
|
+
command: parsedFlags.command,
|
|
52
|
+
environmentVariables,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
await this.runCommandWithEnvVarsAsync({
|
|
57
|
+
command: parsedFlags.command,
|
|
58
|
+
environmentVariables,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
50
61
|
}
|
|
51
62
|
sanitizeFlagsAndArgs(rawFlags, { bash_command, environment }) {
|
|
52
63
|
if (rawFlags['non-interactive'] && (!bash_command || !environment)) {
|
|
@@ -56,15 +67,42 @@ class EnvExec extends EasCommand_1.default {
|
|
|
56
67
|
if (!(0, variableUtils_1.isEnvironment)(environment)) {
|
|
57
68
|
throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
|
|
58
69
|
}
|
|
70
|
+
const firstChar = bash_command[0];
|
|
71
|
+
const lastChar = bash_command[bash_command.length - 1];
|
|
72
|
+
const cleanCommand = (firstChar === '"' && lastChar === '"') || (firstChar === "'" && lastChar === "'")
|
|
73
|
+
? bash_command.slice(1, -1)
|
|
74
|
+
: bash_command;
|
|
59
75
|
return {
|
|
60
76
|
nonInteractive: rawFlags['non-interactive'],
|
|
61
77
|
environment,
|
|
62
|
-
command:
|
|
78
|
+
command: cleanCommand,
|
|
63
79
|
};
|
|
64
80
|
}
|
|
81
|
+
// eslint-disable-next-line async-protect/async-suffix
|
|
82
|
+
async catch(err) {
|
|
83
|
+
// when in non-interactive, make the behavior of this command a pure passthrough, outputting only the subprocess' stdout and stderr and exiting with the
|
|
84
|
+
// sub-command's exit status
|
|
85
|
+
if (this.isNonInteractive) {
|
|
86
|
+
process.exitCode = process.exitCode ?? err.status ?? 1;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
await super.catch(err);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async runCommandNonInteractiveWithEnvVarsAsync({ command, environmentVariables, }) {
|
|
93
|
+
await (0, spawn_async_1.default)(command, [], {
|
|
94
|
+
shell: true,
|
|
95
|
+
stdio: 'inherit',
|
|
96
|
+
env: {
|
|
97
|
+
...process.env,
|
|
98
|
+
...environmentVariables,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
65
102
|
async runCommandWithEnvVarsAsync({ command, environmentVariables, }) {
|
|
66
103
|
log_1.default.log(`Running command: ${chalk_1.default.bold(command)}`);
|
|
67
|
-
const spawnPromise = (0, spawn_async_1.default)(
|
|
104
|
+
const spawnPromise = (0, spawn_async_1.default)(command, [], {
|
|
105
|
+
shell: true,
|
|
68
106
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
69
107
|
env: {
|
|
70
108
|
...process.env,
|
|
@@ -93,21 +131,23 @@ class EnvExec extends EasCommand_1.default {
|
|
|
93
131
|
throw error;
|
|
94
132
|
}
|
|
95
133
|
}
|
|
96
|
-
async loadEnvironmentVariablesAsync({ graphqlClient, projectId, environment, }) {
|
|
134
|
+
async loadEnvironmentVariablesAsync({ graphqlClient, projectId, environment, nonInteractive, }) {
|
|
97
135
|
const environmentVariablesQueryResult = await EnvironmentVariablesQuery_1.EnvironmentVariablesQuery.byAppIdWithSensitiveAsync(graphqlClient, {
|
|
98
136
|
appId: projectId,
|
|
99
137
|
environment,
|
|
100
138
|
});
|
|
101
139
|
const nonSecretEnvironmentVariables = environmentVariablesQueryResult.filter(({ value }) => !!value);
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
140
|
+
if (!nonInteractive) {
|
|
141
|
+
if (nonSecretEnvironmentVariables.length > 0) {
|
|
142
|
+
log_1.default.log(`Environment variables with visibility "Plain text" and "Sensitive" loaded from the "${environment.toLowerCase()}" environment on EAS: ${nonSecretEnvironmentVariables
|
|
143
|
+
.map(e => e.name)
|
|
144
|
+
.join(', ')}.`);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
log_1.default.log(`No environment variables with visibility "Plain text" and "Sensitive" found for the "${environment.toLowerCase()}" environment on EAS.`);
|
|
148
|
+
}
|
|
149
|
+
log_1.default.newLine();
|
|
109
150
|
}
|
|
110
|
-
log_1.default.newLine();
|
|
111
151
|
const environmentVariables = {};
|
|
112
152
|
for (const { name, value } of nonSecretEnvironmentVariables) {
|
|
113
153
|
if (value) {
|
|
@@ -9,9 +9,11 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
9
9
|
const builds_1 = require("../../commandUtils/builds");
|
|
10
10
|
const flags_1 = require("../../commandUtils/flags");
|
|
11
11
|
const generated_1 = require("../../graphql/generated");
|
|
12
|
+
const FingerprintMutation_1 = require("../../graphql/mutations/FingerprintMutation");
|
|
12
13
|
const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
|
|
13
14
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
14
15
|
const ora_1 = require("../../ora");
|
|
16
|
+
const maybeUploadFingerprintAsync_1 = require("../../project/maybeUploadFingerprintAsync");
|
|
15
17
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
16
18
|
const workflow_1 = require("../../project/workflow");
|
|
17
19
|
const prompts_1 = require("../../prompts");
|
|
@@ -80,6 +82,18 @@ class FingerprintCompare extends EasCommand_1.default {
|
|
|
80
82
|
log_1.default.error('Project fingerprints can only be computed for projects with SDK 52 or higher');
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
85
|
+
const uploadedFingerprint = await (0, maybeUploadFingerprintAsync_1.maybeUploadFingerprintAsync)({
|
|
86
|
+
hash: fingerprint.hash,
|
|
87
|
+
fingerprint: {
|
|
88
|
+
fingerprintSources: fingerprint.sources,
|
|
89
|
+
isDebugFingerprintSource: log_1.default.isDebug,
|
|
90
|
+
},
|
|
91
|
+
graphqlClient,
|
|
92
|
+
});
|
|
93
|
+
await FingerprintMutation_1.FingerprintMutation.createFingerprintAsync(graphqlClient, projectId, {
|
|
94
|
+
hash: uploadedFingerprint.hash,
|
|
95
|
+
source: uploadedFingerprint.fingerprintSource,
|
|
96
|
+
});
|
|
83
97
|
if (fingerprint.hash === projectFingerprint.hash) {
|
|
84
98
|
log_1.default.log(`✅ Project fingerprint matches build`);
|
|
85
99
|
return;
|
|
@@ -2,7 +2,6 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
2
2
|
export default class WorkerAlias extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static aliases: string[];
|
|
5
|
-
static hidden: boolean;
|
|
6
5
|
static state: string;
|
|
7
6
|
static flags: {
|
|
8
7
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -14,8 +14,6 @@ const logs_1 = require("../../worker/utils/logs");
|
|
|
14
14
|
class WorkerAlias extends EasCommand_1.default {
|
|
15
15
|
static description = 'Assign deployment aliases';
|
|
16
16
|
static aliases = ['deploy:alias', 'deploy:promote'];
|
|
17
|
-
// TODO(@kitten): Keep command hidden until worker deployments are live
|
|
18
|
-
static hidden = true;
|
|
19
17
|
static state = 'beta';
|
|
20
18
|
static flags = {
|
|
21
19
|
prod: core_1.Flags.boolean({
|
|
@@ -4,7 +4,6 @@ export default class WorkerDeploy extends EasCommand {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static aliases: string[];
|
|
6
6
|
static usage: string[];
|
|
7
|
-
static hidden: boolean;
|
|
8
7
|
static state: string;
|
|
9
8
|
static flags: {
|
|
10
9
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -24,8 +24,6 @@ class WorkerDeploy extends EasCommand_1.default {
|
|
|
24
24
|
static description = 'Deploy your Expo web build';
|
|
25
25
|
static aliases = ['deploy'];
|
|
26
26
|
static usage = [(0, chalk_1.default) `deploy {dim [options]}`, `deploy --prod`];
|
|
27
|
-
// TODO(@kitten): Keep command hidden until worker deployments are live
|
|
28
|
-
static hidden = true;
|
|
29
27
|
static state = 'beta';
|
|
30
28
|
static flags = {
|
|
31
29
|
prod: core_1.Flags.boolean({
|
|
@@ -176,15 +174,20 @@ class WorkerDeploy extends EasCommand_1.default {
|
|
|
176
174
|
let deployResult;
|
|
177
175
|
let progress = (0, ora_1.ora)('Preparing project').start();
|
|
178
176
|
try {
|
|
179
|
-
const
|
|
177
|
+
const manifestResult = await WorkerAssets.createManifestAsync({
|
|
180
178
|
environment: flags.environment,
|
|
181
179
|
projectDir,
|
|
182
180
|
projectId,
|
|
183
181
|
}, graphqlClient);
|
|
182
|
+
if (manifestResult.conflictingVariableNames?.length) {
|
|
183
|
+
log_1.default.warn('> The following environment variables were present in local .env files as well as EAS environment variables. ' +
|
|
184
|
+
'In case of conflict, the EAS environment variable values will be used: ' +
|
|
185
|
+
manifestResult.conflictingVariableNames.join(' '));
|
|
186
|
+
}
|
|
184
187
|
assetMap = await WorkerAssets.createAssetMapAsync(projectDist.type === 'server' ? projectDist.clientPath : projectDist.path);
|
|
185
188
|
tarPath = await WorkerAssets.packFilesIterableAsync(emitWorkerTarballAsync({
|
|
186
189
|
assetMap,
|
|
187
|
-
manifest,
|
|
190
|
+
manifest: manifestResult.manifest,
|
|
188
191
|
}));
|
|
189
192
|
if (flags.dryRun) {
|
|
190
193
|
const DRY_RUN_OUTPUT_PATH = 'deploy.tar.gz';
|
|
@@ -67,6 +67,10 @@ export type Scalars = {
|
|
|
67
67
|
input: any;
|
|
68
68
|
output: any;
|
|
69
69
|
};
|
|
70
|
+
WorkerDeploymentRequestID: {
|
|
71
|
+
input: any;
|
|
72
|
+
output: any;
|
|
73
|
+
};
|
|
70
74
|
};
|
|
71
75
|
export type AcceptUserInvitationResult = {
|
|
72
76
|
__typename?: 'AcceptUserInvitationResult';
|
|
@@ -654,11 +658,7 @@ export type AccountUsageEasBuildMetadata = {
|
|
|
654
658
|
platform?: Maybe<AppPlatform>;
|
|
655
659
|
waiverType?: Maybe<EasBuildWaiverType>;
|
|
656
660
|
};
|
|
657
|
-
export type
|
|
658
|
-
__typename?: 'AccountUsageEASJobsMetadata';
|
|
659
|
-
resourceClassDisplayName: Scalars['String']['output'];
|
|
660
|
-
};
|
|
661
|
-
export type AccountUsageMetadata = AccountUsageEasBuildMetadata | AccountUsageEasJobsMetadata;
|
|
661
|
+
export type AccountUsageMetadata = AccountUsageEasBuildMetadata;
|
|
662
662
|
export type AccountUsageMetric = {
|
|
663
663
|
__typename?: 'AccountUsageMetric';
|
|
664
664
|
id: Scalars['ID']['output'];
|
|
@@ -1104,6 +1104,7 @@ export type App = Project & {
|
|
|
1104
1104
|
environmentVariables: Array<EnvironmentVariable>;
|
|
1105
1105
|
/** Environment variables for an app with decrypted secret values */
|
|
1106
1106
|
environmentVariablesIncludingSensitive: Array<EnvironmentVariableWithSecret>;
|
|
1107
|
+
fingerprintsPaginated: AppFingerprintsConnection;
|
|
1107
1108
|
fullName: Scalars['String']['output'];
|
|
1108
1109
|
githubBuildTriggers: Array<GitHubBuildTrigger>;
|
|
1109
1110
|
githubJobRunTriggers: Array<GitHubJobRunTrigger>;
|
|
@@ -1311,6 +1312,14 @@ export type AppEnvironmentVariablesIncludingSensitiveArgs = {
|
|
|
1311
1312
|
filterNames?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
1312
1313
|
};
|
|
1313
1314
|
/** Represents an Exponent App (or Experience in legacy terms) */
|
|
1315
|
+
export type AppFingerprintsPaginatedArgs = {
|
|
1316
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
1317
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
1318
|
+
filter?: InputMaybe<FingerprintFilterInput>;
|
|
1319
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
1320
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
1321
|
+
};
|
|
1322
|
+
/** Represents an Exponent App (or Experience in legacy terms) */
|
|
1314
1323
|
export type AppIosAppCredentialsArgs = {
|
|
1315
1324
|
filter?: InputMaybe<IosAppCredentialsFilter>;
|
|
1316
1325
|
};
|
|
@@ -1501,6 +1510,16 @@ export type AppDevDomainNameMutationChangeDevDomainNameArgs = {
|
|
|
1501
1510
|
appId: Scalars['ID']['input'];
|
|
1502
1511
|
name: Scalars['DevDomainName']['input'];
|
|
1503
1512
|
};
|
|
1513
|
+
export type AppFingerprintEdge = {
|
|
1514
|
+
__typename?: 'AppFingerprintEdge';
|
|
1515
|
+
cursor: Scalars['String']['output'];
|
|
1516
|
+
node: Fingerprint;
|
|
1517
|
+
};
|
|
1518
|
+
export type AppFingerprintsConnection = {
|
|
1519
|
+
__typename?: 'AppFingerprintsConnection';
|
|
1520
|
+
edges: Array<AppFingerprintEdge>;
|
|
1521
|
+
pageInfo: PageInfo;
|
|
1522
|
+
};
|
|
1504
1523
|
export type AppIcon = {
|
|
1505
1524
|
__typename?: 'AppIcon';
|
|
1506
1525
|
/** @deprecated No longer supported */
|
|
@@ -2877,6 +2896,10 @@ export type CreateEnvironmentVariableInput = {
|
|
|
2877
2896
|
value: Scalars['String']['input'];
|
|
2878
2897
|
visibility: EnvironmentVariableVisibility;
|
|
2879
2898
|
};
|
|
2899
|
+
export type CreateFingerprintInput = {
|
|
2900
|
+
hash: Scalars['String']['input'];
|
|
2901
|
+
source?: InputMaybe<FingerprintSourceInput>;
|
|
2902
|
+
};
|
|
2880
2903
|
export type CreateGitHubAppInstallationInput = {
|
|
2881
2904
|
accountId: Scalars['ID']['input'];
|
|
2882
2905
|
installationIdentifier: Scalars['Int']['input'];
|
|
@@ -3343,6 +3366,9 @@ export declare enum EntityTypeName {
|
|
|
3343
3366
|
IosAppCredentialsEntity = "IosAppCredentialsEntity",
|
|
3344
3367
|
UserInvitationEntity = "UserInvitationEntity",
|
|
3345
3368
|
UserPermissionEntity = "UserPermissionEntity",
|
|
3369
|
+
WorkerCustomDomainEntity = "WorkerCustomDomainEntity",
|
|
3370
|
+
WorkerDeploymentAliasEntity = "WorkerDeploymentAliasEntity",
|
|
3371
|
+
WorkerEntity = "WorkerEntity",
|
|
3346
3372
|
WorkflowEntity = "WorkflowEntity",
|
|
3347
3373
|
WorkflowRevisionEntity = "WorkflowRevisionEntity"
|
|
3348
3374
|
}
|
|
@@ -3562,6 +3588,9 @@ export type Fingerprint = {
|
|
|
3562
3588
|
source?: Maybe<FingerprintSource>;
|
|
3563
3589
|
updatedAt: Scalars['DateTime']['output'];
|
|
3564
3590
|
};
|
|
3591
|
+
export type FingerprintFilterInput = {
|
|
3592
|
+
hashes?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
3593
|
+
};
|
|
3565
3594
|
export type FingerprintInfo = {
|
|
3566
3595
|
fingerprintHash: Scalars['String']['input'];
|
|
3567
3596
|
fingerprintSource: FingerprintSourceInput;
|
|
@@ -3571,6 +3600,15 @@ export type FingerprintInfoGroup = {
|
|
|
3571
3600
|
ios?: InputMaybe<FingerprintInfo>;
|
|
3572
3601
|
web?: InputMaybe<FingerprintInfo>;
|
|
3573
3602
|
};
|
|
3603
|
+
export type FingerprintMutation = {
|
|
3604
|
+
__typename?: 'FingerprintMutation';
|
|
3605
|
+
/** Create or get an existing fingerprint for an App */
|
|
3606
|
+
createOrGetExistingFingerprint: Fingerprint;
|
|
3607
|
+
};
|
|
3608
|
+
export type FingerprintMutationCreateOrGetExistingFingerprintArgs = {
|
|
3609
|
+
appId: Scalars['ID']['input'];
|
|
3610
|
+
fingerprintData: CreateFingerprintInput;
|
|
3611
|
+
};
|
|
3574
3612
|
export type FingerprintSource = {
|
|
3575
3613
|
__typename?: 'FingerprintSource';
|
|
3576
3614
|
bucketKey: Scalars['String']['output'];
|
|
@@ -4686,6 +4724,7 @@ export type RequestsFilters = {
|
|
|
4686
4724
|
method?: InputMaybe<Array<RequestMethod>>;
|
|
4687
4725
|
os?: InputMaybe<Array<UserAgentOs>>;
|
|
4688
4726
|
pathname?: InputMaybe<Scalars['String']['input']>;
|
|
4727
|
+
requestId?: InputMaybe<Array<Scalars['WorkerDeploymentRequestID']['input']>>;
|
|
4689
4728
|
responseType?: InputMaybe<Array<ResponseType>>;
|
|
4690
4729
|
status?: InputMaybe<Array<Scalars['Int']['input']>>;
|
|
4691
4730
|
statusType?: InputMaybe<Array<ResponseStatusType>>;
|
|
@@ -4854,6 +4893,8 @@ export type RootMutation = {
|
|
|
4854
4893
|
environmentSecret: EnvironmentSecretMutation;
|
|
4855
4894
|
/** Mutations that create and delete EnvironmentVariables */
|
|
4856
4895
|
environmentVariable: EnvironmentVariableMutation;
|
|
4896
|
+
/** Mutations that modify App fingerprints */
|
|
4897
|
+
fingerprint: FingerprintMutation;
|
|
4857
4898
|
/** Mutations that utilize services facilitated by the GitHub App */
|
|
4858
4899
|
githubApp: GitHubAppMutation;
|
|
4859
4900
|
/** Mutations for GitHub App installations */
|
|
@@ -6651,6 +6692,7 @@ export type WorkerDeploymentRequestNode = {
|
|
|
6651
6692
|
os?: Maybe<UserAgentOs>;
|
|
6652
6693
|
pathname: Scalars['String']['output'];
|
|
6653
6694
|
region?: Maybe<Scalars['String']['output']>;
|
|
6695
|
+
requestId: Scalars['WorkerDeploymentRequestID']['output'];
|
|
6654
6696
|
requestTimestamp: Scalars['DateTime']['output'];
|
|
6655
6697
|
responseType: ResponseType;
|
|
6656
6698
|
scriptName: Scalars['String']['output'];
|
|
@@ -6967,6 +7009,7 @@ export type WorkflowRun = ActivityTimelineProjectActivity & {
|
|
|
6967
7009
|
pullRequestNumber?: Maybe<Scalars['Int']['output']>;
|
|
6968
7010
|
requestedGitRef?: Maybe<Scalars['String']['output']>;
|
|
6969
7011
|
status: WorkflowRunStatus;
|
|
7012
|
+
triggerEventType: WorkflowRunTriggerEventType;
|
|
6970
7013
|
updatedAt: Scalars['DateTime']['output'];
|
|
6971
7014
|
workflow: Workflow;
|
|
6972
7015
|
workflowRevision?: Maybe<WorkflowRevision>;
|
|
@@ -7013,6 +7056,10 @@ export declare enum WorkflowRunStatus {
|
|
|
7013
7056
|
PendingCancel = "PENDING_CANCEL",
|
|
7014
7057
|
Success = "SUCCESS"
|
|
7015
7058
|
}
|
|
7059
|
+
export declare enum WorkflowRunTriggerEventType {
|
|
7060
|
+
Github = "GITHUB",
|
|
7061
|
+
Manual = "MANUAL"
|
|
7062
|
+
}
|
|
7016
7063
|
export type WorkflowRunsConnection = {
|
|
7017
7064
|
__typename?: 'WorkflowRunsConnection';
|
|
7018
7065
|
edges: Array<WorkflowRunEdge>;
|
|
@@ -11378,6 +11425,22 @@ export type CreateBulkEnvironmentVariablesForAppMutation = {
|
|
|
11378
11425
|
}>;
|
|
11379
11426
|
};
|
|
11380
11427
|
};
|
|
11428
|
+
export type CreateFingeprintMutationVariables = Exact<{
|
|
11429
|
+
fingerprintData: CreateFingerprintInput;
|
|
11430
|
+
appId: Scalars['ID']['input'];
|
|
11431
|
+
}>;
|
|
11432
|
+
export type CreateFingeprintMutation = {
|
|
11433
|
+
__typename?: 'RootMutation';
|
|
11434
|
+
fingerprint: {
|
|
11435
|
+
__typename?: 'FingerprintMutation';
|
|
11436
|
+
createOrGetExistingFingerprint: {
|
|
11437
|
+
__typename?: 'Fingerprint';
|
|
11438
|
+
id: string;
|
|
11439
|
+
hash: string;
|
|
11440
|
+
debugInfoUrl?: string | null;
|
|
11441
|
+
};
|
|
11442
|
+
};
|
|
11443
|
+
};
|
|
11381
11444
|
export type CreateKeystoreGenerationUrlMutationVariables = Exact<{
|
|
11382
11445
|
[key: string]: never;
|
|
11383
11446
|
}>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentVariableEnvironment = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = 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.AppUploadSessionType = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountAppsSortByField = void 0;
|
|
10
10
|
exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = 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.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 = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppEnvironment = exports.FingerprintSourceType = void 0;
|
|
11
|
-
exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = void 0;
|
|
11
|
+
exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = void 0;
|
|
12
12
|
var AccountAppsSortByField;
|
|
13
13
|
(function (AccountAppsSortByField) {
|
|
14
14
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -369,6 +369,9 @@ var EntityTypeName;
|
|
|
369
369
|
EntityTypeName["IosAppCredentialsEntity"] = "IosAppCredentialsEntity";
|
|
370
370
|
EntityTypeName["UserInvitationEntity"] = "UserInvitationEntity";
|
|
371
371
|
EntityTypeName["UserPermissionEntity"] = "UserPermissionEntity";
|
|
372
|
+
EntityTypeName["WorkerCustomDomainEntity"] = "WorkerCustomDomainEntity";
|
|
373
|
+
EntityTypeName["WorkerDeploymentAliasEntity"] = "WorkerDeploymentAliasEntity";
|
|
374
|
+
EntityTypeName["WorkerEntity"] = "WorkerEntity";
|
|
372
375
|
EntityTypeName["WorkflowEntity"] = "WorkflowEntity";
|
|
373
376
|
EntityTypeName["WorkflowRevisionEntity"] = "WorkflowRevisionEntity";
|
|
374
377
|
})(EntityTypeName || (exports.EntityTypeName = EntityTypeName = {}));
|
|
@@ -870,3 +873,8 @@ var WorkflowRunStatus;
|
|
|
870
873
|
WorkflowRunStatus["PendingCancel"] = "PENDING_CANCEL";
|
|
871
874
|
WorkflowRunStatus["Success"] = "SUCCESS";
|
|
872
875
|
})(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
|
|
876
|
+
var WorkflowRunTriggerEventType;
|
|
877
|
+
(function (WorkflowRunTriggerEventType) {
|
|
878
|
+
WorkflowRunTriggerEventType["Github"] = "GITHUB";
|
|
879
|
+
WorkflowRunTriggerEventType["Manual"] = "MANUAL";
|
|
880
|
+
})(WorkflowRunTriggerEventType || (exports.WorkflowRunTriggerEventType = WorkflowRunTriggerEventType = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FingerprintSource } from '@expo/eas-build-job';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
+
import { FingerprintFragment } from '../generated';
|
|
4
|
+
export declare const FingerprintMutation: {
|
|
5
|
+
createFingerprintAsync(graphqlClient: ExpoGraphqlClient, appId: string, fingerprintData: {
|
|
6
|
+
hash: string;
|
|
7
|
+
source?: FingerprintSource;
|
|
8
|
+
}): Promise<FingerprintFragment>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FingerprintMutation = 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 Fingerprint_1 = require("../types/Fingerprint");
|
|
9
|
+
exports.FingerprintMutation = {
|
|
10
|
+
async createFingerprintAsync(graphqlClient, appId, fingerprintData) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
|
+
.mutation((0, graphql_tag_1.default) `
|
|
13
|
+
mutation CreateFingeprintMutation(
|
|
14
|
+
$fingerprintData: CreateFingerprintInput!
|
|
15
|
+
$appId: ID!
|
|
16
|
+
) {
|
|
17
|
+
fingerprint {
|
|
18
|
+
createOrGetExistingFingerprint(fingerprintData: $fingerprintData, appId: $appId) {
|
|
19
|
+
id
|
|
20
|
+
...FingerprintFragment
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
${(0, graphql_1.print)(Fingerprint_1.FingerprintFragmentNode)}
|
|
25
|
+
`, { appId, fingerprintData })
|
|
26
|
+
.toPromise());
|
|
27
|
+
return data.fingerprint.createOrGetExistingFingerprint;
|
|
28
|
+
},
|
|
29
|
+
};
|
package/build/worker/assets.d.ts
CHANGED
|
@@ -14,13 +14,17 @@ declare function createAssetMapAsync(assetPath?: string, options?: AssetMapOptio
|
|
|
14
14
|
export interface Manifest {
|
|
15
15
|
env: Record<string, string | undefined>;
|
|
16
16
|
}
|
|
17
|
+
export interface CreateManifestResult {
|
|
18
|
+
conflictingVariableNames: string[] | undefined;
|
|
19
|
+
manifest: Manifest;
|
|
20
|
+
}
|
|
17
21
|
interface CreateManifestParams {
|
|
18
22
|
projectId: string;
|
|
19
23
|
projectDir: string;
|
|
20
24
|
environment?: EnvironmentVariableEnvironment;
|
|
21
25
|
}
|
|
22
26
|
/** Creates a manifest configuration sent up for deployment */
|
|
23
|
-
export declare function createManifestAsync(params: CreateManifestParams, graphqlClient: ExpoGraphqlClient): Promise<
|
|
27
|
+
export declare function createManifestAsync(params: CreateManifestParams, graphqlClient: ExpoGraphqlClient): Promise<CreateManifestResult>;
|
|
24
28
|
interface WorkerFileEntry {
|
|
25
29
|
normalizedPath: string;
|
|
26
30
|
path: string;
|
package/build/worker/assets.js
CHANGED
|
@@ -75,19 +75,28 @@ async function createAssetMapAsync(assetPath, options) {
|
|
|
75
75
|
exports.createAssetMapAsync = createAssetMapAsync;
|
|
76
76
|
/** Creates a manifest configuration sent up for deployment */
|
|
77
77
|
async function createManifestAsync(params, graphqlClient) {
|
|
78
|
-
|
|
78
|
+
// Resolve .env file variables
|
|
79
|
+
const { env } = (0, env_1.parseProjectEnv)(params.projectDir, { mode: 'production' });
|
|
80
|
+
// Maybe load EAS Environment Variables (based on `--environment` arg)
|
|
81
|
+
let conflictingVariableNames;
|
|
79
82
|
if (params.environment) {
|
|
80
|
-
|
|
83
|
+
const loadedVariables = await EnvironmentVariablesQuery_1.EnvironmentVariablesQuery.byAppIdWithSensitiveAsync(graphqlClient, {
|
|
81
84
|
appId: params.projectId,
|
|
82
85
|
environment: params.environment,
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
});
|
|
87
|
+
// Load EAS Env vars into `env` object, keeping track of conflicts
|
|
88
|
+
conflictingVariableNames = [];
|
|
89
|
+
for (const variable of loadedVariables) {
|
|
90
|
+
if (variable.value != null) {
|
|
91
|
+
if (env[variable.name] != null) {
|
|
92
|
+
conflictingVariableNames.push(variable.name);
|
|
93
|
+
}
|
|
94
|
+
env[variable.name] = variable.value;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
89
97
|
}
|
|
90
|
-
|
|
98
|
+
const manifest = { env };
|
|
99
|
+
return { conflictingVariableNames, manifest };
|
|
91
100
|
}
|
|
92
101
|
exports.createManifestAsync = createManifestAsync;
|
|
93
102
|
/** Reads worker files while normalizing sourcemaps and providing normalized paths */
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "14.
|
|
2
|
+
"version": "14.4.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"analytics": {
|
|
5
5
|
"id": "analytics",
|
|
@@ -3706,7 +3706,6 @@
|
|
|
3706
3706
|
"pluginName": "eas-cli",
|
|
3707
3707
|
"pluginAlias": "eas-cli",
|
|
3708
3708
|
"pluginType": "core",
|
|
3709
|
-
"hidden": true,
|
|
3710
3709
|
"state": "beta",
|
|
3711
3710
|
"aliases": [
|
|
3712
3711
|
"deploy:alias",
|
|
@@ -3773,7 +3772,6 @@
|
|
|
3773
3772
|
"pluginName": "eas-cli",
|
|
3774
3773
|
"pluginAlias": "eas-cli",
|
|
3775
3774
|
"pluginType": "core",
|
|
3776
|
-
"hidden": true,
|
|
3777
3775
|
"state": "beta",
|
|
3778
3776
|
"aliases": [
|
|
3779
3777
|
"deploy"
|