eas-cli 21.0.0 → 21.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.
@@ -1,5 +1,6 @@
1
1
  import { BuildFragment } from '../../graphql/generated';
2
2
  export declare function getProjectDashboardUrl(accountName: string, projectName: string): string;
3
+ export declare function getProjectPageUrl(accountName: string, projectName: string, page?: string | null): string;
3
4
  export declare function getBuildLogsUrl(build: BuildFragment, hash?: string): string;
4
5
  export declare function getArtifactUrl(artifactId: string): string;
5
6
  export declare function getInternalDistributionInstallUrl(build: BuildFragment): string;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getProjectDashboardUrl = getProjectDashboardUrl;
4
+ exports.getProjectPageUrl = getProjectPageUrl;
4
5
  exports.getBuildLogsUrl = getBuildLogsUrl;
5
6
  exports.getArtifactUrl = getArtifactUrl;
6
7
  exports.getInternalDistributionInstallUrl = getInternalDistributionInstallUrl;
@@ -15,7 +16,11 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
15
16
  const api_1 = require("../../api");
16
17
  const generated_1 = require("../../graphql/generated");
17
18
  function getProjectDashboardUrl(accountName, projectName) {
18
- return new URL(`/accounts/${accountName}/projects/${projectName}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
19
+ return getProjectPageUrl(accountName, projectName);
20
+ }
21
+ function getProjectPageUrl(accountName, projectName, page) {
22
+ const projectPath = `/accounts/${encodeURIComponent(accountName)}/projects/${encodeURIComponent(projectName)}`;
23
+ return new URL(page ? `${projectPath}/${page}` : projectPath, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
19
24
  }
20
25
  function getBuildLogsUrl(build, hash) {
21
26
  const { project } = build;
@@ -0,0 +1,17 @@
1
+ import EasCommand from '../commandUtils/EasCommand';
2
+ export default class Browse extends EasCommand {
3
+ static description: string;
4
+ static args: {
5
+ page: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ 'no-browser': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ static contextDefinition: {
13
+ loggedIn: import("../commandUtils/context/LoggedInContextField").default;
14
+ privateProjectConfig: import("../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
15
+ };
16
+ runAsync(): Promise<void>;
17
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const better_opn_1 = tslib_1.__importDefault(require("better-opn"));
6
+ const url_1 = require("../build/utils/url");
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
8
+ const flags_1 = require("../commandUtils/flags");
9
+ const log_1 = tslib_1.__importDefault(require("../log"));
10
+ const ora_1 = require("../ora");
11
+ const projectUtils_1 = require("../project/projectUtils");
12
+ const json_1 = require("../utils/json");
13
+ const PROJECT_PAGES = {
14
+ build: 'builds',
15
+ builds: 'builds',
16
+ submit: 'submissions',
17
+ submissions: 'submissions',
18
+ update: 'updates',
19
+ updates: 'updates',
20
+ workflow: 'workflows',
21
+ workflows: 'workflows',
22
+ cicd: 'workflows',
23
+ hosting: 'hosting',
24
+ deployments: 'hosting/deployments',
25
+ credentials: 'credentials',
26
+ env: 'environment-variables',
27
+ insights: 'insights',
28
+ observe: 'observe',
29
+ settings: 'settings',
30
+ };
31
+ class Browse extends EasCommand_1.default {
32
+ static description = 'Transition from the terminal to the web browser to view and interact with your project on https://expo.dev';
33
+ static args = {
34
+ page: core_1.Args.string({
35
+ description: 'Project subpage to open. Defaults to the project dashboard.',
36
+ required: false,
37
+ options: Object.keys(PROJECT_PAGES),
38
+ }),
39
+ };
40
+ static flags = {
41
+ 'no-browser': core_1.Flags.boolean({
42
+ char: 'n',
43
+ description: 'Print the URL instead of opening it in a web browser',
44
+ default: false,
45
+ }),
46
+ ...flags_1.EasNonInteractiveAndJsonFlags,
47
+ };
48
+ static contextDefinition = {
49
+ ...this.ContextOptions.ProjectConfig,
50
+ ...this.ContextOptions.LoggedIn,
51
+ };
52
+ async runAsync() {
53
+ const { args, flags } = await this.parse(Browse);
54
+ const page = args.page ? PROJECT_PAGES[args.page] : null;
55
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
56
+ if (jsonFlag) {
57
+ (0, json_1.enableJsonOutput)();
58
+ }
59
+ const { privateProjectConfig: { projectId, exp }, loggedIn: { graphqlClient }, } = await this.getContextAsync(Browse, {
60
+ nonInteractive,
61
+ withServerSideEnvironment: null,
62
+ });
63
+ const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
64
+ const url = (0, url_1.getProjectPageUrl)(account.name, exp.slug, page);
65
+ if (jsonFlag) {
66
+ (0, json_1.printJsonOnlyOutput)({ url });
67
+ return;
68
+ }
69
+ if (flags['no-browser']) {
70
+ log_1.default.log(url);
71
+ return;
72
+ }
73
+ const failedMessage = `Unable to open a web browser. Project page is available at: ${url}`;
74
+ const spinner = (0, ora_1.ora)(`Opening ${url}`).start();
75
+ try {
76
+ const opened = await (0, better_opn_1.default)(url);
77
+ if (opened) {
78
+ spinner.succeed(`Opened ${url}`);
79
+ }
80
+ else {
81
+ spinner.fail(failedMessage);
82
+ }
83
+ }
84
+ catch (error) {
85
+ spinner.fail(failedMessage);
86
+ throw error;
87
+ }
88
+ }
89
+ }
90
+ exports.default = Browse;
@@ -26,5 +26,6 @@ export default class BuildInspect extends EasCommand {
26
26
  runAsync(): Promise<void>;
27
27
  private prepareOutputDirAsync;
28
28
  private copyToOutputDirAsync;
29
+ private cleanUpTmpWorkingdirAsync;
29
30
  }
30
31
  export {};
@@ -121,6 +121,7 @@ class BuildInspect extends EasCommand_1.default {
121
121
  }
122
122
  finally {
123
123
  await this.copyToOutputDirAsync(path_1.default.join(tmpWorkingdir, 'build'), outputDirectory);
124
+ await this.cleanUpTmpWorkingdirAsync(tmpWorkingdir);
124
125
  }
125
126
  }
126
127
  }
@@ -149,5 +150,14 @@ class BuildInspect extends EasCommand_1.default {
149
150
  throw err;
150
151
  }
151
152
  }
153
+ async cleanUpTmpWorkingdirAsync(tmpWorkingdir) {
154
+ try {
155
+ await fs_extra_1.default.remove(tmpWorkingdir);
156
+ }
157
+ catch (err) {
158
+ log_1.default.warn(`Failed to remove temporary directory ${tmpWorkingdir}`);
159
+ log_1.default.debug(err);
160
+ }
161
+ }
152
162
  }
153
163
  exports.default = BuildInspect;
@@ -11,6 +11,7 @@ export default class WorkerDeploy extends EasCommand {
11
11
  prod: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
12
  alias: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
13
  id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ 'dev-domain': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
15
  'export-dir': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
16
  'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
17
  'source-maps': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -26,7 +26,11 @@ const isDirectory = (directoryPath) => node_fs_1.default.promises
26
26
  class WorkerDeploy extends EasCommand_1.default {
27
27
  static description = 'deploy your Expo Router web build and API Routes';
28
28
  static aliases = ['worker:deploy'];
29
- static usage = [(0, chalk_1.default) `deploy {dim [options]}`, `deploy --prod`];
29
+ static usage = [
30
+ (0, chalk_1.default) `deploy {dim [options]}`,
31
+ `deploy --prod`,
32
+ `deploy --non-interactive --dev-domain my-app`,
33
+ ];
30
34
  static state = 'preview';
31
35
  static flags = {
32
36
  prod: core_1.Flags.boolean({
@@ -42,6 +46,10 @@ class WorkerDeploy extends EasCommand_1.default {
42
46
  description: 'Custom unique identifier for the new deployment.',
43
47
  helpValue: 'xyz123',
44
48
  }),
49
+ 'dev-domain': core_1.Flags.string({
50
+ description: `Custom preview URL subdomain to assign to the project on its first deployment, e.g. "my-app" for my-app.${logs_1.EXPO_BASE_DOMAIN}.app. Required with --non-interactive if you want to customize the preview URL.`,
51
+ helpValue: 'name',
52
+ }),
45
53
  'export-dir': core_1.Flags.string({
46
54
  description: 'Directory where the Expo project was exported.',
47
55
  helpValue: 'dir',
@@ -217,6 +225,7 @@ class WorkerDeploy extends EasCommand_1.default {
217
225
  const uploadUrl = await (0, deployment_1.getSignedDeploymentUrlAsync)(graphqlClient, {
218
226
  appId: projectId,
219
227
  deploymentIdentifier: flags.deploymentIdentifier,
228
+ devDomainName: flags.devDomainName,
220
229
  // NOTE(cedric): this function might ask the user for a dev-domain name,
221
230
  // when that happens, no ora spinner should be running.
222
231
  onSetupDevDomain: () => progress.stop(),
@@ -336,12 +345,17 @@ class WorkerDeploy extends EasCommand_1.default {
336
345
  }
337
346
  sanitizeFlags(flags) {
338
347
  const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
348
+ const devDomainName = flags['dev-domain']?.trim().toLowerCase();
349
+ if (devDomainName !== undefined) {
350
+ (0, deployment_1.assertValidDevDomainName)(devDomainName);
351
+ }
339
352
  return {
340
353
  nonInteractive,
341
354
  json,
342
355
  isProduction: !!flags.prod,
343
356
  aliasName: flags.alias?.trim().toLowerCase(),
344
357
  deploymentIdentifier: flags.id?.trim(),
358
+ devDomainName,
345
359
  exportDir: flags['export-dir'],
346
360
  environment: flags['environment'],
347
361
  dryRun: flags['dry-run'],
@@ -1,9 +1,6 @@
1
1
  import EasCommand from '../commandUtils/EasCommand';
2
2
  export default class Open extends EasCommand {
3
3
  static description: string;
4
- static contextDefinition: {
5
- loggedIn: import("../commandUtils/context/LoggedInContextField").default;
6
- privateProjectConfig: import("../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
7
- };
4
+ static hidden: boolean;
8
5
  runAsync(): Promise<void>;
9
6
  }
@@ -1,41 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const better_opn_1 = tslib_1.__importDefault(require("better-opn"));
5
- const url_1 = require("../build/utils/url");
6
4
  const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
7
- const ora_1 = require("../ora");
8
- const projectUtils_1 = require("../project/projectUtils");
5
+ const browse_1 = tslib_1.__importDefault(require("./browse"));
9
6
  class Open extends EasCommand_1.default {
10
- static description = 'open the project page in a web browser';
11
- static contextDefinition = {
12
- ...this.ContextOptions.ProjectConfig,
13
- ...this.ContextOptions.LoggedIn,
14
- };
7
+ static description = 'open the project page in a web browser (alias of `eas browse`)';
8
+ static hidden = true;
15
9
  async runAsync() {
16
- // this command is interactive by nature (only really run by humans in a terminal)
17
- const { privateProjectConfig: { projectId, exp }, loggedIn: { graphqlClient }, } = await this.getContextAsync(Open, {
18
- nonInteractive: false,
19
- withServerSideEnvironment: null,
20
- });
21
- const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
22
- const projectName = exp.slug;
23
- const projectDashboardUrl = (0, url_1.getProjectDashboardUrl)(account.name, projectName);
24
- const failedMessage = `Unable to open a web browser. Project page is available at: ${projectDashboardUrl}`;
25
- const spinner = (0, ora_1.ora)(`Opening ${projectDashboardUrl}`).start();
26
- try {
27
- const opened = await (0, better_opn_1.default)(projectDashboardUrl);
28
- if (opened) {
29
- spinner.succeed(`Opened ${projectDashboardUrl}`);
30
- }
31
- else {
32
- spinner.fail(failedMessage);
33
- }
34
- }
35
- catch (error) {
36
- spinner.fail(failedMessage);
37
- throw error;
38
- }
10
+ await browse_1.default.run([]);
39
11
  }
40
12
  }
41
13
  exports.default = Open;
@@ -0,0 +1,16 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ export default class ProjectDelete extends EasCommand {
3
+ static description: string;
4
+ static args: {
5
+ name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ 'dangerously-confirm-deletion': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ };
12
+ static contextDefinition: {
13
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
+ };
15
+ runAsync(): Promise<void>;
16
+ }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const config_1 = require("@expo/config");
5
+ const core_1 = require("@oclif/core");
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
8
+ const findProjectDirAndVerifyProjectSetupAsync_1 = require("../../commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync");
9
+ const flags_1 = require("../../commandUtils/flags");
10
+ const AppMutation_1 = require("../../graphql/mutations/AppMutation");
11
+ const AppQuery_1 = require("../../graphql/queries/AppQuery");
12
+ const log_1 = tslib_1.__importDefault(require("../../log"));
13
+ const ora_1 = require("../../ora");
14
+ const expoConfig_1 = require("../../project/expoConfig");
15
+ const prompts_1 = require("../../prompts");
16
+ const sudo_1 = require("../../user/sudo");
17
+ const json_1 = require("../../utils/json");
18
+ const pollForBackgroundJobReceiptAsync_1 = require("../../utils/pollForBackgroundJobReceiptAsync");
19
+ const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
20
+ class ProjectDelete extends EasCommand_1.default {
21
+ static description = 'delete a project';
22
+ static args = {
23
+ name: core_1.Args.string({
24
+ required: false,
25
+ description: 'Full name (@account/slug) or ID of the project to delete. Defaults to the project in the current directory.',
26
+ }),
27
+ };
28
+ static flags = {
29
+ 'dangerously-confirm-deletion': core_1.Flags.string({
30
+ description: "The project's full name (@account/slug), to confirm deletion. Required in non-interactive mode.",
31
+ }),
32
+ ...flags_1.EasNonInteractiveAndJsonFlags,
33
+ };
34
+ static contextDefinition = {
35
+ ...this.ContextOptions.LoggedIn,
36
+ };
37
+ async runAsync() {
38
+ const { args: { name }, flags, } = await this.parse(ProjectDelete);
39
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
40
+ if (jsonFlag) {
41
+ (0, json_1.enableJsonOutput)();
42
+ }
43
+ const { loggedIn: { graphqlClient, authenticationInfo }, } = await this.getContextAsync(ProjectDelete, { nonInteractive });
44
+ let app;
45
+ if (name) {
46
+ app = UUID_REGEX.test(name)
47
+ ? await AppQuery_1.AppQuery.byIdAsync(graphqlClient, name)
48
+ : await AppQuery_1.AppQuery.byFullNameAsync(graphqlClient, name);
49
+ }
50
+ else {
51
+ let projectDir = null;
52
+ try {
53
+ projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectRootAsync)();
54
+ }
55
+ catch {
56
+ // Not inside a project directory — handled by the error below.
57
+ }
58
+ let projectId;
59
+ if (projectDir) {
60
+ // Only read the config when one already exists: getPrivateExpoConfigAsync creates a
61
+ // fresh app.json as a side effect when the directory has none. Config errors (broken
62
+ // app.config.js, invalid app.json) propagate so they are not masked by the error below.
63
+ const configPaths = (0, config_1.getConfigFilePaths)(projectDir);
64
+ if (configPaths.staticConfigPath ?? configPaths.dynamicConfigPath) {
65
+ const exp = await (0, expoConfig_1.getPrivateExpoConfigAsync)(projectDir);
66
+ projectId = exp.extra?.eas?.projectId;
67
+ }
68
+ }
69
+ if (!projectId) {
70
+ throw new Error("No EAS project found in the current directory. Pass the project's full name (@account/slug) or ID as an argument.");
71
+ }
72
+ app = await AppQuery_1.AppQuery.byIdAsync(graphqlClient, projectId);
73
+ }
74
+ const confirmedFullName = flags['dangerously-confirm-deletion'];
75
+ if (confirmedFullName) {
76
+ if (confirmedFullName !== app.fullName) {
77
+ throw new Error(`The value of --dangerously-confirm-deletion ("${confirmedFullName}") did not match the project's full name ("${app.fullName}"). Cancelled deletion.`);
78
+ }
79
+ }
80
+ else if (nonInteractive) {
81
+ throw new Error(`Deleting a project in non-interactive mode requires passing --dangerously-confirm-deletion with the project's full name ("${app.fullName}").`);
82
+ }
83
+ else {
84
+ log_1.default.addNewLineIfNone();
85
+ log_1.default.warn(`You are about to permanently delete project ${chalk_1.default.bold(app.fullName)}.` +
86
+ `\nThis will delete everything associated with it, including builds, submissions, update branches, published updates, and environment variables.` +
87
+ `\nThis action is irreversible.`);
88
+ log_1.default.newLine();
89
+ const { confirmedName } = await (0, prompts_1.promptAsync)({
90
+ type: 'text',
91
+ name: 'confirmedName',
92
+ message: `Type the project's full name (${app.fullName}) to confirm deletion:`,
93
+ });
94
+ if (confirmedName !== app.fullName) {
95
+ log_1.default.error(`The input did not match the project's full name. Cancelled deletion.`);
96
+ process.exit(1);
97
+ }
98
+ }
99
+ const spinner = (0, ora_1.ora)(`Deleting project ${app.fullName}`).start();
100
+ try {
101
+ let receipt;
102
+ try {
103
+ receipt = await AppMutation_1.AppMutation.scheduleAppDeletionAsync(graphqlClient, app.id);
104
+ }
105
+ catch (error) {
106
+ if (!(0, sudo_1.isSudoModeRequiredError)(error)) {
107
+ throw error;
108
+ }
109
+ if (nonInteractive) {
110
+ throw new Error('Deleting a project requires a session in sudo mode. Run this command interactively to confirm your password, then retry in non-interactive mode while sudo mode is active.');
111
+ }
112
+ spinner.stop();
113
+ await (0, sudo_1.promptForSudoModeUpgradeAsync)(authenticationInfo);
114
+ spinner.start();
115
+ receipt = await AppMutation_1.AppMutation.scheduleAppDeletionAsync(graphqlClient, app.id);
116
+ }
117
+ await (0, pollForBackgroundJobReceiptAsync_1.pollForBackgroundJobReceiptAsync)(graphqlClient, receipt);
118
+ spinner.succeed(`Deleted project ${chalk_1.default.bold(app.fullName)}`);
119
+ }
120
+ catch (error) {
121
+ spinner.fail(`Failed to delete project ${chalk_1.default.bold(app.fullName)}`);
122
+ throw error;
123
+ }
124
+ if (jsonFlag) {
125
+ (0, json_1.printJsonOnlyOutput)({ id: app.id, fullName: app.fullName });
126
+ }
127
+ }
128
+ }
129
+ exports.default = ProjectDelete;
@@ -26,6 +26,7 @@ class SimulatorStart extends EasCommand_1.default {
26
26
  static description = '[EXPERIMENTAL] start a remote simulator session on EAS and get instructions to connect to it';
27
27
  static flags = {
28
28
  platform: core_1.Flags.option({
29
+ char: 'p',
29
30
  description: 'Device platform',
30
31
  options: ['android', 'ios'],
31
32
  required: true,
@@ -6942,8 +6942,9 @@ export type MeMutation = {
6942
6942
  /** Schedule deletion of a SSO user. Actor must be an owner on the SSO user's SSO account. */
6943
6943
  scheduleSSOUserDeletionAsSSOAccountOwner: BackgroundJobReceipt;
6944
6944
  /**
6945
- * Sets user preferences. This is a key-value store for user-specific settings. Provided values are
6946
- * key-level merged with existing values.
6945
+ * Legacy user preferences are no longer stored; this mutation accepts and discards
6946
+ * its input. Use userPreference.set instead.
6947
+ * @deprecated No longer stored; this mutation has no effect. Use userPreference.set instead.
6947
6948
  */
6948
6949
  setPreferences: UserPreferences;
6949
6950
  /** Set the user's primary second factor device */
@@ -7948,6 +7949,7 @@ export type SsoUser = Actor & UserActor & {
7948
7949
  lastName?: Maybe<Scalars['String']['output']>;
7949
7950
  pinnedApps: Array<App>;
7950
7951
  pinnedDashboardViews: Array<PinnedDashboardView>;
7952
+ /** @deprecated No longer stored. Use userPreference instead. */
7951
7953
  preferences: UserPreferences;
7952
7954
  /** Associated accounts */
7953
7955
  primaryAccount: Account;
@@ -8084,7 +8086,8 @@ export type SentryProjectMutationDeleteSentryProjectArgs = {
8084
8086
  export type ServeSimRunSessionRemoteConfig = {
8085
8087
  __typename?: 'ServeSimRunSessionRemoteConfig';
8086
8088
  previewUrl: Scalars['String']['output'];
8087
- streamUrl: Scalars['String']['output'];
8089
+ /** @deprecated Use previewUrl instead. */
8090
+ streamUrl?: Maybe<Scalars['String']['output']>;
8088
8091
  };
8089
8092
  export type SetupConvexProjectInput = {
8090
8093
  appId: Scalars['ID']['input'];
@@ -9077,6 +9080,7 @@ export type User = Actor & UserActor & {
9077
9080
  pendingUserInvitations: Array<UserInvitation>;
9078
9081
  pinnedApps: Array<App>;
9079
9082
  pinnedDashboardViews: Array<PinnedDashboardView>;
9083
+ /** @deprecated No longer stored. Use userPreference instead. */
9080
9084
  preferences: UserPreferences;
9081
9085
  /** Associated accounts */
9082
9086
  primaryAccount: Account;
@@ -9160,6 +9164,7 @@ export type UserActor = {
9160
9164
  lastDeletionAttemptTime?: Maybe<Scalars['DateTime']['output']>;
9161
9165
  lastName?: Maybe<Scalars['String']['output']>;
9162
9166
  pinnedApps: Array<App>;
9167
+ /** @deprecated No longer stored. Use userPreference instead. */
9163
9168
  preferences: UserPreferences;
9164
9169
  /** Associated accounts */
9165
9170
  primaryAccount: Account;
@@ -9526,9 +9531,8 @@ export type UserPreferenceQueryGetArgs = {
9526
9531
  };
9527
9532
  export type UserPreferences = {
9528
9533
  __typename?: 'UserPreferences';
9534
+ /** @deprecated No longer stored; always null. */
9529
9535
  onboarding?: Maybe<UserPreferencesOnboarding>;
9530
- /** @deprecated Use userPreference.get(key: "selected-account-id") instead. */
9531
- selectedAccountName?: Maybe<Scalars['String']['output']>;
9532
9536
  };
9533
9537
  export type UserPreferencesInput = {
9534
9538
  onboarding?: InputMaybe<UserPreferencesOnboardingInput>;
@@ -9540,18 +9544,10 @@ export type UserPreferencesInput = {
9540
9544
  export type UserPreferencesOnboarding = {
9541
9545
  __typename?: 'UserPreferencesOnboarding';
9542
9546
  appId: Scalars['ID']['output'];
9543
- /** Can be null if the user has not selected one yet. */
9544
9547
  deviceType?: Maybe<OnboardingDeviceType>;
9545
- /** Can be null if the user has not selected one yet. */
9546
9548
  environment?: Maybe<OnboardingEnvironment>;
9547
- /**
9548
- * Set by CLI when the user has completed that phase. Used by the website to determine when
9549
- * the next step can be shown.
9550
- */
9551
9549
  isCLIDone?: Maybe<Scalars['Boolean']['output']>;
9552
- /** The last time when this object was updated. */
9553
9550
  lastUsed: Scalars['String']['output'];
9554
- /** User selects a platform for which they want to build the app. CLI uses this information to start the build. */
9555
9551
  platform?: Maybe<AppPlatform>;
9556
9552
  };
9557
9553
  export type UserPreferencesOnboardingInput = {
@@ -10479,7 +10475,9 @@ export type WorkflowJobApproval = {
10479
10475
  createdAt: Scalars['DateTime']['output'];
10480
10476
  decision: WorkflowJobReviewDecision;
10481
10477
  id: Scalars['ID']['output'];
10478
+ reviewingActor?: Maybe<Actor>;
10482
10479
  updatedAt: Scalars['DateTime']['output'];
10480
+ /** @deprecated Use reviewingActor instead */
10483
10481
  userActor?: Maybe<UserActor>;
10484
10482
  workflowJob: WorkflowJob;
10485
10483
  };
@@ -14752,6 +14750,29 @@ export type CreateAppMutation = {
14752
14750
  };
14753
14751
  } | null;
14754
14752
  };
14753
+ export type ScheduleAppDeletionMutationVariables = Exact<{
14754
+ appId: Scalars['ID']['input'];
14755
+ }>;
14756
+ export type ScheduleAppDeletionMutation = {
14757
+ __typename?: 'RootMutation';
14758
+ app?: {
14759
+ __typename?: 'AppMutation';
14760
+ scheduleAppDeletion: {
14761
+ __typename?: 'BackgroundJobReceipt';
14762
+ id: string;
14763
+ state: BackgroundJobState;
14764
+ tries: number;
14765
+ willRetry: boolean;
14766
+ resultId?: string | null;
14767
+ resultType: BackgroundJobResultType;
14768
+ resultData?: any | null;
14769
+ errorCode?: string | null;
14770
+ errorMessage?: string | null;
14771
+ createdAt: any;
14772
+ updatedAt: any;
14773
+ };
14774
+ } | null;
14775
+ };
14755
14776
  export type CreateAppVersionMutationVariables = Exact<{
14756
14777
  appVersionInput: AppVersionInput;
14757
14778
  }>;
@@ -16419,6 +16440,11 @@ export type AccountUsageForOverageWarningQuery = {
16419
16440
  __typename?: 'EstimatedOverageAndCost';
16420
16441
  id: string;
16421
16442
  value: number;
16443
+ metadata?: {
16444
+ __typename?: 'AccountUsageEASBuildMetadata';
16445
+ billingResourceClass?: EasBuildBillingResourceClass | null;
16446
+ platform?: AppPlatform | null;
16447
+ } | null;
16422
16448
  }>;
16423
16449
  };
16424
16450
  };
@@ -17978,7 +18004,6 @@ export type DeviceRunSessionByIdQuery = {
17978
18004
  } | {
17979
18005
  __typename: 'ServeSimRunSessionRemoteConfig';
17980
18006
  previewUrl: string;
17981
- streamUrl: string;
17982
18007
  } | null;
17983
18008
  turtleJobRun?: {
17984
18009
  __typename?: 'JobRun';
@@ -22487,6 +22512,24 @@ export type SuggestedDevDomainNameQuery = {
22487
22512
  };
22488
22513
  };
22489
22514
  };
22515
+ export type DevDomainNameByAppIdQueryVariables = Exact<{
22516
+ appId: Scalars['String']['input'];
22517
+ }>;
22518
+ export type DevDomainNameByAppIdQuery = {
22519
+ __typename?: 'RootQuery';
22520
+ app: {
22521
+ __typename?: 'AppQuery';
22522
+ byId: {
22523
+ __typename?: 'App';
22524
+ id: string;
22525
+ devDomainName?: {
22526
+ __typename?: 'AppDevDomainName';
22527
+ id: string;
22528
+ name: any;
22529
+ } | null;
22530
+ };
22531
+ };
22532
+ };
22490
22533
  export type PaginatedWorkerDeploymentAliasesQueryVariables = Exact<{
22491
22534
  appId: Scalars['String']['input'];
22492
22535
  first?: InputMaybe<Scalars['Int']['input']>;
@@ -1,7 +1,9 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { BackgroundJobReceiptDataFragment } from '../generated';
2
3
  export declare const AppMutation: {
3
4
  createAppAsync(graphqlClient: ExpoGraphqlClient, appInput: {
4
5
  accountId: string;
5
6
  projectName: string;
6
7
  }): Promise<string>;
8
+ scheduleAppDeletionAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<BackgroundJobReceiptDataFragment>;
7
9
  };
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const assert_1 = tslib_1.__importDefault(require("assert"));
6
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
+ const BackgroundJobReceipt_1 = require("../types/BackgroundJobReceipt");
8
9
  exports.AppMutation = {
9
10
  async createAppAsync(graphqlClient, appInput) {
10
11
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -24,4 +25,22 @@ exports.AppMutation = {
24
25
  (0, assert_1.default)(appId, 'App ID must be defined');
25
26
  return appId;
26
27
  },
28
+ async scheduleAppDeletionAsync(graphqlClient, appId) {
29
+ const result = await (0, client_1.withErrorHandlingAsync)(graphqlClient
30
+ .mutation((0, graphql_tag_1.default) `
31
+ mutation ScheduleAppDeletion($appId: ID!) {
32
+ app {
33
+ scheduleAppDeletion(appId: $appId) {
34
+ id
35
+ ...BackgroundJobReceiptData
36
+ }
37
+ }
38
+ }
39
+ ${BackgroundJobReceipt_1.BackgroundJobReceiptNode}
40
+ `, { appId })
41
+ .toPromise());
42
+ const receipt = result.app?.scheduleAppDeletion;
43
+ (0, assert_1.default)(receipt, 'Background job receipt must be defined');
44
+ return receipt;
45
+ },
27
46
  };
@@ -157,6 +157,12 @@ exports.AccountQuery = {
157
157
  overageMetrics {
158
158
  id
159
159
  value
160
+ metadata {
161
+ ... on AccountUsageEASBuildMetadata {
162
+ billingResourceClass
163
+ platform
164
+ }
165
+ }
160
166
  }
161
167
  totalCost
162
168
  }