eas-cli 19.0.1 → 19.0.2
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 +100 -100
- package/build/commands/simulator/start.d.ts +1 -0
- package/build/commands/simulator/start.js +18 -3
- package/build/graphql/generated.d.ts +58 -1
- package/build/graphql/generated.js +2 -0
- package/build/graphql/queries/DeviceRunSessionQuery.js +4 -0
- package/build/project/ios/entitlements.js +19 -0
- package/build/simulator/utils.js +11 -0
- package/oclif.manifest.json +904 -897
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@ export default class SimulatorStart extends EasCommand {
|
|
|
3
3
|
static hidden: boolean;
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
7
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
8
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios", import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
9
|
type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -11,6 +11,7 @@ const DeviceRunSessionQuery_1 = require("../../graphql/queries/DeviceRunSessionQ
|
|
|
11
11
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
12
12
|
const ora_1 = require("../../ora");
|
|
13
13
|
const utils_1 = require("../../simulator/utils");
|
|
14
|
+
const json_1 = require("../../utils/json");
|
|
14
15
|
const promise_1 = require("../../utils/promise");
|
|
15
16
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
16
17
|
const POLL_INTERVAL_MS = 5_000; // 5 seconds
|
|
@@ -19,6 +20,7 @@ const POLL_TIMEOUT_MS = 15 * 60 * 1_000; // 15 minutes
|
|
|
19
20
|
// so adding a new enum value in codegen fails the build until it is wired up here.
|
|
20
21
|
const DEVICE_RUN_SESSION_TYPE_FLAG_VALUES = {
|
|
21
22
|
[generated_1.DeviceRunSessionType.AgentDevice]: 'agent-device',
|
|
23
|
+
[generated_1.DeviceRunSessionType.Argent]: 'argent',
|
|
22
24
|
[generated_1.DeviceRunSessionType.ServeSim]: 'serve-sim',
|
|
23
25
|
};
|
|
24
26
|
const DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE = Object.fromEntries(Object.entries(DEVICE_RUN_SESSION_TYPE_FLAG_VALUES).map(([type, value]) => [value, type]));
|
|
@@ -39,7 +41,7 @@ class SimulatorStart extends EasCommand_1.default {
|
|
|
39
41
|
'package-version': core_1.Flags.string({
|
|
40
42
|
description: 'Version of the package backing the device run session (e.g. "0.1.3-alpha.3"). Defaults to "latest" when omitted.',
|
|
41
43
|
}),
|
|
42
|
-
...flags_1.
|
|
44
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
43
45
|
};
|
|
44
46
|
static contextDefinition = {
|
|
45
47
|
...this.ContextOptions.ProjectId,
|
|
@@ -47,8 +49,12 @@ class SimulatorStart extends EasCommand_1.default {
|
|
|
47
49
|
};
|
|
48
50
|
async runAsync() {
|
|
49
51
|
const { flags } = await this.parse(SimulatorStart);
|
|
52
|
+
const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
53
|
+
if (jsonFlag) {
|
|
54
|
+
(0, json_1.enableJsonOutput)();
|
|
55
|
+
}
|
|
50
56
|
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorStart, {
|
|
51
|
-
nonInteractive
|
|
57
|
+
nonInteractive,
|
|
52
58
|
});
|
|
53
59
|
const platform = flags.platform === 'android' ? generated_1.AppPlatform.Android : generated_1.AppPlatform.Ios;
|
|
54
60
|
const createSpinner = (0, ora_1.ora)('🚀 Creating device run session').start();
|
|
@@ -104,10 +110,19 @@ class SimulatorStart extends EasCommand_1.default {
|
|
|
104
110
|
await ensureDeviceRunSessionStoppedSafelyAsync(graphqlClient, deviceRunSessionId);
|
|
105
111
|
throw new Error(`Timed out after ${Math.round(POLL_TIMEOUT_MS / 1000)}s waiting for ${flags.type} session to be ready. ${(0, log_1.link)(jobRunUrl)}`);
|
|
106
112
|
}
|
|
113
|
+
if (jsonFlag) {
|
|
114
|
+
(0, json_1.printJsonOnlyOutput)({
|
|
115
|
+
id: deviceRunSessionId,
|
|
116
|
+
type: flags.type,
|
|
117
|
+
jobRunUrl,
|
|
118
|
+
remoteConfig,
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
107
122
|
log_1.default.newLine();
|
|
108
123
|
log_1.default.log((0, utils_1.formatRemoteSessionInstructions)(remoteConfig));
|
|
109
124
|
log_1.default.newLine();
|
|
110
|
-
if (
|
|
125
|
+
if (nonInteractive) {
|
|
111
126
|
log_1.default.log(`When you are done, stop the session with: eas simulator:stop --id ${deviceRunSessionId}`);
|
|
112
127
|
return;
|
|
113
128
|
}
|
|
@@ -2982,6 +2982,15 @@ export declare enum AppsFilter {
|
|
|
2982
2982
|
/** New Projects */
|
|
2983
2983
|
New = "NEW"
|
|
2984
2984
|
}
|
|
2985
|
+
export type ArgentRunSessionRemoteConfig = {
|
|
2986
|
+
__typename?: 'ArgentRunSessionRemoteConfig';
|
|
2987
|
+
toolsUrl: Scalars['String']['output'];
|
|
2988
|
+
/**
|
|
2989
|
+
* URL of the web preview surface for the session. Null when web previews are
|
|
2990
|
+
* not available for the platform (e.g. Android).
|
|
2991
|
+
*/
|
|
2992
|
+
webPreviewUrl?: Maybe<Scalars['String']['output']>;
|
|
2993
|
+
};
|
|
2985
2994
|
export type AscApiKeyInput = {
|
|
2986
2995
|
issuerIdentifier: Scalars['String']['input'];
|
|
2987
2996
|
keyIdentifier: Scalars['String']['input'];
|
|
@@ -3588,6 +3597,7 @@ export declare enum BuildPhase {
|
|
|
3588
3597
|
EasBuildInternal = "EAS_BUILD_INTERNAL",
|
|
3589
3598
|
FailBuild = "FAIL_BUILD",
|
|
3590
3599
|
FixGradlew = "FIX_GRADLEW",
|
|
3600
|
+
GradleBuildProfile = "GRADLE_BUILD_PROFILE",
|
|
3591
3601
|
InstallCustomTools = "INSTALL_CUSTOM_TOOLS",
|
|
3592
3602
|
InstallDependencies = "INSTALL_DEPENDENCIES",
|
|
3593
3603
|
InstallPods = "INSTALL_PODS",
|
|
@@ -4471,7 +4481,7 @@ export type DeviceRunSessionQuery = {
|
|
|
4471
4481
|
export type DeviceRunSessionQueryByIdArgs = {
|
|
4472
4482
|
deviceRunSessionId: Scalars['ID']['input'];
|
|
4473
4483
|
};
|
|
4474
|
-
export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig;
|
|
4484
|
+
export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | ArgentRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig;
|
|
4475
4485
|
export declare enum DeviceRunSessionStatus {
|
|
4476
4486
|
Errored = "ERRORED",
|
|
4477
4487
|
InProgress = "IN_PROGRESS",
|
|
@@ -4480,6 +4490,7 @@ export declare enum DeviceRunSessionStatus {
|
|
|
4480
4490
|
}
|
|
4481
4491
|
export declare enum DeviceRunSessionType {
|
|
4482
4492
|
AgentDevice = "AGENT_DEVICE",
|
|
4493
|
+
Argent = "ARGENT",
|
|
4483
4494
|
ServeSim = "SERVE_SIM"
|
|
4484
4495
|
}
|
|
4485
4496
|
export type DiscordUser = {
|
|
@@ -5107,6 +5118,25 @@ export type EditUpdateBranchInput = {
|
|
|
5107
5118
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
5108
5119
|
newName: Scalars['String']['input'];
|
|
5109
5120
|
};
|
|
5121
|
+
export type EmbeddedUpdate = {
|
|
5122
|
+
__typename?: 'EmbeddedUpdate';
|
|
5123
|
+
channel: Scalars['String']['output'];
|
|
5124
|
+
createdAt: Scalars['DateTime']['output'];
|
|
5125
|
+
/** The manifest UUID baked into the binary by expo-updates at build time. */
|
|
5126
|
+
id: Scalars['ID']['output'];
|
|
5127
|
+
launchAsset: EmbeddedUpdateAsset;
|
|
5128
|
+
platform: AppPlatform;
|
|
5129
|
+
runtimeVersion: Scalars['String']['output'];
|
|
5130
|
+
};
|
|
5131
|
+
export type EmbeddedUpdateAsset = {
|
|
5132
|
+
__typename?: 'EmbeddedUpdateAsset';
|
|
5133
|
+
contentType: Scalars['String']['output'];
|
|
5134
|
+
fileSHA256: Scalars['String']['output'];
|
|
5135
|
+
fileSize: Scalars['Int']['output'];
|
|
5136
|
+
finalFileSize?: Maybe<Scalars['Int']['output']>;
|
|
5137
|
+
id: Scalars['ID']['output'];
|
|
5138
|
+
storageKey: Scalars['String']['output'];
|
|
5139
|
+
};
|
|
5110
5140
|
export type EmbeddedUpdateAssetMutation = {
|
|
5111
5141
|
__typename?: 'EmbeddedUpdateAssetMutation';
|
|
5112
5142
|
/**
|
|
@@ -5129,6 +5159,17 @@ export type EmbeddedUpdateAssetUploadSpec = {
|
|
|
5129
5159
|
/** Storage key (`{appId}/{embeddedUpdateId}`). Same key in both upload and destination buckets. */
|
|
5130
5160
|
storageKey: Scalars['String']['output'];
|
|
5131
5161
|
};
|
|
5162
|
+
export type EmbeddedUpdateMutation = {
|
|
5163
|
+
__typename?: 'EmbeddedUpdateMutation';
|
|
5164
|
+
/**
|
|
5165
|
+
* Register an embedded bundle as the launch asset for a given app/platform/channel.
|
|
5166
|
+
* Returns EMBEDDED_UPDATE_ASSET_NOT_AVAILABLE if the asset has not been finalized yet.
|
|
5167
|
+
*/
|
|
5168
|
+
uploadEmbeddedUpdate: EmbeddedUpdate;
|
|
5169
|
+
};
|
|
5170
|
+
export type EmbeddedUpdateMutationUploadEmbeddedUpdateArgs = {
|
|
5171
|
+
input: UploadEmbeddedUpdateInput;
|
|
5172
|
+
};
|
|
5132
5173
|
export declare enum EntityTypeName {
|
|
5133
5174
|
AccountEntity = "AccountEntity",
|
|
5134
5175
|
AccountSsoConfigurationEntity = "AccountSSOConfigurationEntity",
|
|
@@ -6177,6 +6218,7 @@ export type JobRun = {
|
|
|
6177
6218
|
createdAt: Scalars['DateTime']['output'];
|
|
6178
6219
|
displayName?: Maybe<Scalars['String']['output']>;
|
|
6179
6220
|
endedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
6221
|
+
enqueuedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
6180
6222
|
errors: Array<JobRunError>;
|
|
6181
6223
|
expiresAt: Scalars['DateTime']['output'];
|
|
6182
6224
|
gitCommitHash?: Maybe<Scalars['String']['output']>;
|
|
@@ -6926,6 +6968,8 @@ export type RootMutation = {
|
|
|
6926
6968
|
echoTurn: EchoTurnMutation;
|
|
6927
6969
|
/** Mutations for Echo versions */
|
|
6928
6970
|
echoVersion: EchoVersionMutation;
|
|
6971
|
+
/** Mutations that register embedded update bundles for bundle diffing. */
|
|
6972
|
+
embeddedUpdate: EmbeddedUpdateMutation;
|
|
6929
6973
|
embeddedUpdateAsset: EmbeddedUpdateAssetMutation;
|
|
6930
6974
|
/** Mutations that create and delete EnvironmentSecrets */
|
|
6931
6975
|
environmentSecret: EnvironmentSecretMutation;
|
|
@@ -8243,6 +8287,15 @@ export type UpdatesMetricsData = {
|
|
|
8243
8287
|
installsDataset: CumulativeUpdatesDataset;
|
|
8244
8288
|
labels: Array<Scalars['String']['output']>;
|
|
8245
8289
|
};
|
|
8290
|
+
export type UploadEmbeddedUpdateInput = {
|
|
8291
|
+
appId: Scalars['ID']['input'];
|
|
8292
|
+
channel: Scalars['String']['input'];
|
|
8293
|
+
/** UUID baked into the binary by expo-updates at build time (from app.manifest id field). */
|
|
8294
|
+
embeddedUpdateId: Scalars['ID']['input'];
|
|
8295
|
+
platform: AppPlatform;
|
|
8296
|
+
runtimeVersion: Scalars['String']['input'];
|
|
8297
|
+
turtleBuildId?: InputMaybe<Scalars['ID']['input']>;
|
|
8298
|
+
};
|
|
8246
8299
|
export type UploadSession = {
|
|
8247
8300
|
__typename?: 'UploadSession';
|
|
8248
8301
|
/** Create an Upload Session for a specific account */
|
|
@@ -16866,6 +16919,10 @@ export type DeviceRunSessionByIdQuery = {
|
|
|
16866
16919
|
agentDeviceRemoteSessionUrl: string;
|
|
16867
16920
|
agentDeviceRemoteSessionToken: string;
|
|
16868
16921
|
webPreviewUrl?: string | null;
|
|
16922
|
+
} | {
|
|
16923
|
+
__typename: 'ArgentRunSessionRemoteConfig';
|
|
16924
|
+
toolsUrl: string;
|
|
16925
|
+
webPreviewUrl?: string | null;
|
|
16869
16926
|
} | {
|
|
16870
16927
|
__typename: 'ServeSimRunSessionRemoteConfig';
|
|
16871
16928
|
previewUrl: string;
|
|
@@ -279,6 +279,7 @@ var BuildPhase;
|
|
|
279
279
|
BuildPhase["EasBuildInternal"] = "EAS_BUILD_INTERNAL";
|
|
280
280
|
BuildPhase["FailBuild"] = "FAIL_BUILD";
|
|
281
281
|
BuildPhase["FixGradlew"] = "FIX_GRADLEW";
|
|
282
|
+
BuildPhase["GradleBuildProfile"] = "GRADLE_BUILD_PROFILE";
|
|
282
283
|
BuildPhase["InstallCustomTools"] = "INSTALL_CUSTOM_TOOLS";
|
|
283
284
|
BuildPhase["InstallDependencies"] = "INSTALL_DEPENDENCIES";
|
|
284
285
|
BuildPhase["InstallPods"] = "INSTALL_PODS";
|
|
@@ -414,6 +415,7 @@ var DeviceRunSessionStatus;
|
|
|
414
415
|
var DeviceRunSessionType;
|
|
415
416
|
(function (DeviceRunSessionType) {
|
|
416
417
|
DeviceRunSessionType["AgentDevice"] = "AGENT_DEVICE";
|
|
418
|
+
DeviceRunSessionType["Argent"] = "ARGENT";
|
|
417
419
|
DeviceRunSessionType["ServeSim"] = "SERVE_SIM";
|
|
418
420
|
})(DeviceRunSessionType || (exports.DeviceRunSessionType = DeviceRunSessionType = {}));
|
|
419
421
|
var DistributionType;
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
7
|
const prebuild_config_1 = require("@expo/prebuild-config");
|
|
8
8
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
|
+
const sentry_1 = tslib_1.__importDefault(require("../../sentry"));
|
|
9
10
|
const expoCli_1 = require("../../utils/expoCli");
|
|
10
11
|
const plist_1 = require("../../utils/plist");
|
|
11
12
|
const projectUtils_1 = require("../projectUtils");
|
|
@@ -24,6 +25,24 @@ async function getManagedApplicationTargetEntitlementsAsync(projectDir, env, vcs
|
|
|
24
25
|
return expWithMods.ios?.entitlements ?? {};
|
|
25
26
|
}
|
|
26
27
|
catch (error) {
|
|
28
|
+
try {
|
|
29
|
+
sentry_1.default.withScope(scope => {
|
|
30
|
+
if (process.env.EAS_BUILD_PROJECT_ID) {
|
|
31
|
+
scope.setTag('app_id', process.env.EAS_BUILD_PROJECT_ID);
|
|
32
|
+
}
|
|
33
|
+
if (process.env.EAS_BUILD_ID) {
|
|
34
|
+
scope.setTag('build_id', process.env.EAS_BUILD_ID);
|
|
35
|
+
}
|
|
36
|
+
scope.setTag('config_resolution', 'ios_entitlements_introspection');
|
|
37
|
+
scope.setExtra('message', 'iOS entitlements config fallback');
|
|
38
|
+
scope.setExtra('stdout', error.stdout);
|
|
39
|
+
scope.setExtra('stderr', error.stderr);
|
|
40
|
+
sentry_1.default.captureException(error);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// do nothing
|
|
45
|
+
}
|
|
27
46
|
expoConfigError = error;
|
|
28
47
|
log_1.default.warn(`Failed to read the app config from the project using the local Expo CLI: ${formatError(error)}`);
|
|
29
48
|
log_1.default.warn('Falling back to the version of "@expo/config" shipped with the EAS CLI.');
|
package/build/simulator/utils.js
CHANGED
|
@@ -15,6 +15,17 @@ function formatRemoteSessionInstructions(remoteConfig) {
|
|
|
15
15
|
}
|
|
16
16
|
return lines.join('\n');
|
|
17
17
|
}
|
|
18
|
+
case 'ArgentRunSessionRemoteConfig': {
|
|
19
|
+
const lines = [
|
|
20
|
+
'🔑 Open the following URL to access the Argent tools for this session:',
|
|
21
|
+
'',
|
|
22
|
+
remoteConfig.toolsUrl,
|
|
23
|
+
];
|
|
24
|
+
if (remoteConfig.webPreviewUrl) {
|
|
25
|
+
lines.push('', '🌐 Open the following URL in your browser to preview the simulator:', '', remoteConfig.webPreviewUrl);
|
|
26
|
+
}
|
|
27
|
+
return lines.join('\n');
|
|
28
|
+
}
|
|
18
29
|
case 'ServeSimRunSessionRemoteConfig':
|
|
19
30
|
return [
|
|
20
31
|
'🌐 Open the following URL in your browser to access the simulator:',
|