eas-cli 20.5.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +128 -175
  2. package/build/analytics/AnalyticsManager.js +3 -0
  3. package/build/analytics/agent.d.ts +5 -0
  4. package/build/analytics/agent.js +26 -0
  5. package/build/build/context.d.ts +2 -2
  6. package/build/build/createContext.d.ts +2 -2
  7. package/build/build/local.d.ts +2 -2
  8. package/build/commandUtils/workflow/buildProfileUtils.d.ts +11 -29
  9. package/build/commandUtils/workflow/buildProfileUtils.js +47 -126
  10. package/build/commandUtils/workflow/creation.d.ts +11 -3
  11. package/build/commandUtils/workflow/creation.js +151 -261
  12. package/build/commands/integrations/posthog/dashboard.d.ts +1 -0
  13. package/build/commands/integrations/posthog/dashboard.js +30 -6
  14. package/build/commands/observe/metrics.js +1 -1
  15. package/build/commands/project/init.d.ts +0 -7
  16. package/build/commands/project/init.js +4 -274
  17. package/build/commands/simulator/get.js +57 -4
  18. package/build/commands/workflow/create.d.ts +3 -0
  19. package/build/commands/workflow/create.js +118 -87
  20. package/build/credentials/ios/appstore/bundleIdCapabilities.js +9 -3
  21. package/build/fingerprint/utils.d.ts +2 -2
  22. package/build/graphql/generated.d.ts +204 -242
  23. package/build/graphql/generated.js +41 -4
  24. package/build/graphql/mutations/PostHogMutation.d.ts +2 -1
  25. package/build/graphql/mutations/PostHogMutation.js +14 -0
  26. package/build/graphql/queries/DeviceRunSessionQuery.js +15 -0
  27. package/build/graphql/queries/UserQuery.js +0 -10
  28. package/build/graphql/queries/WorkflowRunQuery.js +1 -0
  29. package/build/integrations/asc/utils.js +6 -4
  30. package/build/observe/metricNames.d.ts +1 -1
  31. package/build/observe/metricNames.js +7 -6
  32. package/build/project/android/applicationId.d.ts +2 -1
  33. package/build/project/android/applicationId.js +19 -11
  34. package/build/project/ios/bundleIdentifier.d.ts +2 -1
  35. package/build/project/ios/bundleIdentifier.js +19 -11
  36. package/build/project/ios/entitlements.d.ts +2 -1
  37. package/build/project/ios/target.d.ts +15 -1
  38. package/build/project/ios/target.js +23 -0
  39. package/build/project/projectInitialization.d.ts +9 -0
  40. package/build/project/projectInitialization.js +277 -0
  41. package/build/project/publish.js +73 -40
  42. package/build/submit/context.d.ts +2 -2
  43. package/build/utils/usage/checkForOverages.d.ts +3 -1
  44. package/build/utils/usage/checkForOverages.js +11 -3
  45. package/oclif.manifest.json +2603 -2649
  46. package/package.json +9 -8
  47. package/build/commands/project/onboarding.d.ts +0 -14
  48. package/build/commands/project/onboarding.js +0 -362
  49. package/build/graphql/mutations/UserPreferencesMutation.d.ts +0 -10
  50. package/build/graphql/mutations/UserPreferencesMutation.js +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eas-cli",
3
- "version": "20.5.0",
3
+ "version": "21.0.0",
4
4
  "description": "EAS command line tool",
5
5
  "keywords": [
6
6
  "cli",
@@ -44,15 +44,15 @@
44
44
  "copy-new-templates": "rimraf build/commandUtils/new/templates && mkdir -p build/commandUtils/new && cp -r src/commandUtils/new/templates build/commandUtils/new"
45
45
  },
46
46
  "dependencies": {
47
- "@expo/apple-utils": "2.1.19",
47
+ "@expo/apple-utils": "2.1.22",
48
48
  "@expo/code-signing-certificates": "0.0.5",
49
49
  "@expo/config": "55.0.10",
50
50
  "@expo/config-plugins": "55.0.7",
51
- "@expo/eas-build-job": "20.1.0",
52
- "@expo/eas-json": "20.1.0",
51
+ "@expo/eas-build-job": "21.0.0",
52
+ "@expo/eas-json": "21.0.0",
53
53
  "@expo/env": "^1.0.0",
54
54
  "@expo/json-file": "8.3.3",
55
- "@expo/logger": "20.0.0",
55
+ "@expo/logger": "21.0.0",
56
56
  "@expo/multipart-body-parser": "2.0.0",
57
57
  "@expo/osascript": "2.1.4",
58
58
  "@expo/package-manager": "1.9.10",
@@ -64,7 +64,7 @@
64
64
  "@expo/results": "1.0.0",
65
65
  "@expo/rudder-sdk-node": "1.1.1",
66
66
  "@expo/spawn-async": "1.7.2",
67
- "@expo/steps": "20.1.0",
67
+ "@expo/steps": "21.0.0",
68
68
  "@expo/timeago.js": "1.0.0",
69
69
  "@oclif/core": "^4.8.3",
70
70
  "@oclif/plugin-autocomplete": "^3.2.40",
@@ -72,6 +72,7 @@
72
72
  "@sentry/node": "7.77.0",
73
73
  "@urql/core": "4.0.11",
74
74
  "@urql/exchange-retry": "1.2.0",
75
+ "agent-cli-detector": "0.1.2",
75
76
  "ajv": "8.11.0",
76
77
  "ajv-formats": "2.1.1",
77
78
  "better-opn": "3.0.2",
@@ -106,7 +107,7 @@
106
107
  "minizlib": "3.0.1",
107
108
  "nanoid": "3.3.8",
108
109
  "node-fetch": "2.6.7",
109
- "node-forge": "1.3.1",
110
+ "node-forge": "1.4.0",
110
111
  "node-stream-zip": "1.15.0",
111
112
  "nullthrows": "1.1.1",
112
113
  "ora": "5.1.0",
@@ -256,5 +257,5 @@
256
257
  "engines": {
257
258
  "node": ">=20.0.0"
258
259
  },
259
- "gitHead": "ee6e197587b00df2256b6ca4136273a8f9cdfb9b"
260
+ "gitHead": "c72cee372f2d45a252acb014493311de85776497"
260
261
  }
@@ -1,14 +0,0 @@
1
- import EasCommand from '../../commandUtils/EasCommand';
2
- export default class Onboarding extends EasCommand {
3
- static aliases: string[];
4
- static description: string;
5
- static flags: {};
6
- static args: {
7
- TARGET_PROJECT_DIRECTORY: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
- };
9
- static contextDefinition: {
10
- analytics: import("../../commandUtils/context/AnalyticsContextField").default;
11
- loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
12
- };
13
- runAsync(): Promise<void>;
14
- }
@@ -1,362 +0,0 @@
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 eas_build_job_1 = require("@expo/eas-build-job");
6
- const eas_json_1 = require("@expo/eas-json");
7
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
- const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
9
- const path_1 = tslib_1.__importDefault(require("path"));
10
- const api_1 = require("../../api");
11
- const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
12
- const repository_1 = require("../../build/utils/repository");
13
- const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
14
- const getProjectIdAsync_1 = require("../../commandUtils/context/contextUtils/getProjectIdAsync");
15
- const SetUpBuildCredentialsCommandAction_1 = require("../../credentials/manager/SetUpBuildCredentialsCommandAction");
16
- const generated_1 = require("../../graphql/generated");
17
- const UserPreferencesMutation_1 = require("../../graphql/mutations/UserPreferencesMutation");
18
- const AppQuery_1 = require("../../graphql/queries/AppQuery");
19
- const log_1 = tslib_1.__importStar(require("../../log"));
20
- const git_1 = require("../../onboarding/git");
21
- const installDependencies_1 = require("../../onboarding/installDependencies");
22
- const runCommand_1 = require("../../onboarding/runCommand");
23
- const platform_1 = require("../../platform");
24
- const expoConfig_1 = require("../../project/expoConfig");
25
- const prompts_1 = require("../../prompts");
26
- const easCli_1 = require("../../utils/easCli");
27
- const expoCli_1 = require("../../utils/expoCli");
28
- const git_2 = tslib_1.__importDefault(require("../../vcs/clients/git"));
29
- class Onboarding extends EasCommand_1.default {
30
- static aliases = ['init:onboarding', 'onboarding'];
31
- static description = 'continue onboarding process started on the https://expo.new website.';
32
- static flags = {};
33
- static args = {
34
- TARGET_PROJECT_DIRECTORY: core_1.Args.string({}),
35
- };
36
- static contextDefinition = {
37
- ...this.ContextOptions.LoggedIn,
38
- ...this.ContextOptions.Analytics,
39
- };
40
- async runAsync() {
41
- const { args: { TARGET_PROJECT_DIRECTORY: targetProjectDirInput }, } = await this.parse(Onboarding);
42
- const { loggedIn: { actor, graphqlClient }, analytics, } = await this.getContextAsync(Onboarding, {
43
- nonInteractive: false,
44
- });
45
- if (actor.__typename === 'Robot') {
46
- throw new Error('This command is not available for robot users. Make sure you are not using a robot token and try again.');
47
- }
48
- if (actor.__typename === 'PartnerActor') {
49
- throw new Error('This command is not available for partner actors. Make sure you are using a user token and try again.');
50
- }
51
- if (!actor.preferences.onboarding) {
52
- throw new Error('This command can only be run as part of the onboarding process started on the Expo website. Visit https://expo.new to start a new project.');
53
- }
54
- if (!actor.preferences.onboarding.platform) {
55
- throw new Error('This command can only be run as part of the onboarding process started on the Expo website. It seems like you started an onboarding process, but we are missing some information needed to be filled in before running the eas init:onboarding command (selected platform). Continue the onboarding process on the Expo website.');
56
- }
57
- if (!actor.preferences.onboarding.environment) {
58
- throw new Error('This command can only be run as part of the onboarding process started on the Expo website. It seems like you started an onboarding process, but we are missing some information needed to be filled in before running the eas init:onboarding command (selected environment). Continue the onboarding process on the Expo website.');
59
- }
60
- if (!actor.preferences.onboarding.deviceType) {
61
- throw new Error('This command can only be run as part of the onboarding process started on the Expo website. It seems like you started an onboarding process, but we are missing some information needed to be filled in before running the eas init:onboarding command (selected device type). Continue the onboarding process on the Expo website.');
62
- }
63
- if (new Date(actor.preferences.onboarding.lastUsed) < new Date(Date.now() - 1000 * 60 * 60 * 24)) {
64
- log_1.default.warn('It seems like you started an onboarding process, but it has been a while since you last used it. If you want to start a new onboarding process, visit https://expo.new.');
65
- log_1.default.log();
66
- }
67
- const platform = actor.preferences.onboarding.platform === generated_1.AppPlatform.Android
68
- ? eas_build_job_1.Platform.ANDROID
69
- : eas_build_job_1.Platform.IOS;
70
- const app = await AppQuery_1.AppQuery.byIdAsync(graphqlClient, actor.preferences.onboarding.appId);
71
- const githubUsername = app.githubRepository
72
- ? app.githubRepository.metadata.githubRepoOwnerName
73
- : 'expo';
74
- const githubRepositoryName = app.githubRepository
75
- ? app.githubRepository.metadata.githubRepoName
76
- : 'expo-template-default';
77
- log_1.default.log(`👋 Welcome to Expo, ${actor.username}!`);
78
- log_1.default.log();
79
- log_1.default.log('✨ We will continue your onboarding process in EAS CLI');
80
- log_1.default.log();
81
- log_1.default.log(`🚚 Let's start by cloning ${app.githubRepository
82
- ? `your project (${githubUsername}/${githubRepositoryName})`
83
- : `default Expo template project (${githubUsername}/${githubRepositoryName})`} from GitHub and installing dependencies.`);
84
- log_1.default.log();
85
- let initialTargetProjectDirectory;
86
- if (targetProjectDirInput) {
87
- initialTargetProjectDirectory = targetProjectDirInput;
88
- log_1.default.log(`📂 Cloning the project to ${initialTargetProjectDirectory}`);
89
- }
90
- else {
91
- const { selectedTargetProjectDirectory } = await (0, prompts_1.promptAsync)({
92
- type: 'text',
93
- name: 'selectedTargetProjectDirectory',
94
- message: app.githubRepository
95
- ? '📂 Where would you like to clone the project to?'
96
- : '📂 Where would you like to create your new project directory?',
97
- initial: app.githubRepository
98
- ? path_1.default.join(process.cwd(), githubRepositoryName)
99
- : path_1.default.join(process.cwd(), `${actor.username}-first-project`),
100
- });
101
- initialTargetProjectDirectory = selectedTargetProjectDirectory;
102
- }
103
- log_1.default.log();
104
- const cloneMethod = (await (0, git_1.canAccessRepositoryUsingSshAsync)({
105
- githubUsername,
106
- githubRepositoryName,
107
- }))
108
- ? 'ssh'
109
- : 'https';
110
- log_1.default.log(chalk_1.default.dim(`We detected that ${cloneMethod} is your preferred git clone method`));
111
- log_1.default.log();
112
- const { targetProjectDir: finalTargetProjectDirectory } = await (0, git_1.runGitCloneAsync)({
113
- githubUsername,
114
- githubRepositoryName,
115
- targetProjectDir: initialTargetProjectDirectory,
116
- cloneMethod,
117
- });
118
- const vcsClient = new git_2.default({
119
- maybeCwdOverride: finalTargetProjectDirectory,
120
- requireCommit: false,
121
- });
122
- if (!app.githubRepository) {
123
- await fs_extra_1.default.remove(path_1.default.join(finalTargetProjectDirectory, '.git'));
124
- await (0, runCommand_1.runCommandAsync)({
125
- cwd: finalTargetProjectDirectory,
126
- command: 'git',
127
- args: ['init'],
128
- });
129
- log_1.default.log();
130
- await configureProjectFromBareDefaultExpoTemplateAsync({
131
- app,
132
- vcsClient,
133
- targetDir: finalTargetProjectDirectory,
134
- });
135
- }
136
- await (0, installDependencies_1.installDependenciesAsync)({
137
- projectDir: finalTargetProjectDirectory,
138
- });
139
- const exp = await getPrivateExpoConfigWithProjectIdAsync({
140
- projectDir: finalTargetProjectDirectory,
141
- graphqlClient,
142
- actor,
143
- });
144
- const getDynamicProjectConfigFn = getDynamicPrivateProjectConfigGetter({
145
- projectDir: finalTargetProjectDirectory,
146
- graphqlClient,
147
- actor,
148
- });
149
- if (!app.githubRepository) {
150
- await (0, expoCli_1.expoCommandAsync)(finalTargetProjectDirectory, [
151
- 'install',
152
- 'expo-updates',
153
- 'expo-insights',
154
- 'expo-dev-client',
155
- ]);
156
- log_1.default.log();
157
- }
158
- await vcsClient.trackFileAsync('package-lock.json');
159
- const shouldSetupCredentials = ((platform === eas_build_job_1.Platform.IOS &&
160
- actor.preferences.onboarding.deviceType === generated_1.OnboardingDeviceType.Device) ||
161
- platform === eas_build_job_1.Platform.ANDROID) &&
162
- actor.preferences.onboarding.environment === generated_1.OnboardingEnvironment.DevBuild;
163
- if (shouldSetupCredentials) {
164
- log_1.default.log('🔑 Now we need to set up build credentials for your project:');
165
- await new SetUpBuildCredentialsCommandAction_1.SetUpBuildCredentialsCommandAction(actor, graphqlClient, vcsClient, analytics, exp, getDynamicProjectConfigFn, platform, actor.preferences.onboarding.deviceType === generated_1.OnboardingDeviceType.Simulator
166
- ? 'development-simulator'
167
- : 'development', finalTargetProjectDirectory).runAsync();
168
- }
169
- if (app.githubRepository && (await vcsClient.hasUncommittedChangesAsync())) {
170
- log_1.default.log('📦 We will now commit the changes made by the configuration process and push them to GitHub:');
171
- log_1.default.log();
172
- log_1.default.log('🔍 Checking for changes in the repository...');
173
- await vcsClient.showChangedFilesAsync();
174
- await (0, repository_1.reviewAndCommitChangesAsync)(vcsClient, `[eas-onboarding] Install dependencies${shouldSetupCredentials ? ' and set up build credentials' : ''}`, { nonInteractive: false });
175
- log_1.default.log('📤 Pushing changes to GitHub...');
176
- await (0, git_1.runGitPushAsync)({
177
- targetProjectDir: finalTargetProjectDirectory,
178
- });
179
- }
180
- else if (!app.githubRepository) {
181
- await (0, runCommand_1.runCommandAsync)({
182
- cwd: finalTargetProjectDirectory,
183
- command: 'git',
184
- args: ['add', '.'],
185
- });
186
- log_1.default.log();
187
- await (0, runCommand_1.runCommandAsync)({
188
- cwd: finalTargetProjectDirectory,
189
- command: 'git',
190
- args: ['commit', '-m', 'Initial commit'],
191
- });
192
- log_1.default.log();
193
- }
194
- log_1.default.log();
195
- log_1.default.log('🎉 We finished configuring your project.');
196
- log_1.default.log();
197
- if (!!app.githubRepository ||
198
- actor.preferences.onboarding.environment === generated_1.OnboardingEnvironment.ExpoGo) {
199
- log_1.default.log('🚀 You can now go back to the website to continue:');
200
- const url = new URL(`/onboarding/develop/set-up-project-on-your-machine?project=${app.slug}&accountId=${app.ownerAccount.id}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
201
- log_1.default.log(`👉 ${(0, log_1.link)(url)}`);
202
- }
203
- else {
204
- log_1.default.log('🚀 Now we are going to trigger your first build');
205
- log_1.default.log();
206
- const { buildIds } = await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)({
207
- graphqlClient,
208
- analytics,
209
- vcsClient,
210
- projectDir: finalTargetProjectDirectory,
211
- flags: {
212
- nonInteractive: true,
213
- requestedPlatform: platform === eas_build_job_1.Platform.ANDROID ? platform_1.RequestedPlatform.Android : platform_1.RequestedPlatform.Ios,
214
- profile: actor.preferences.onboarding.deviceType === generated_1.OnboardingDeviceType.Simulator
215
- ? 'development-simulator'
216
- : 'development',
217
- wait: false,
218
- clearCache: false,
219
- json: false,
220
- autoSubmit: false,
221
- localBuildOptions: {},
222
- freezeCredentials: false,
223
- },
224
- actor,
225
- // eslint-disable-next-line async-protect/async-suffix
226
- getDynamicPrivateProjectConfigAsync: getDynamicProjectConfigFn,
227
- });
228
- const buildId = buildIds[0];
229
- log_1.default.log();
230
- log_1.default.log('🚀 You can now go back to the website to continue:');
231
- const url = new URL(`/onboarding/develop/set-up-project-on-your-machine?project=${app.slug}&accountId=${app.ownerAccount.id}&buildId=${buildId}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
232
- log_1.default.log(`👉 ${(0, log_1.link)(url)}`);
233
- }
234
- const { __typename, ...previousPreferences } = actor.preferences.onboarding;
235
- await UserPreferencesMutation_1.UserPreferencesMutation.markCliDoneInOnboardingUserPreferencesAsync(graphqlClient, {
236
- ...previousPreferences,
237
- appId: app.id,
238
- });
239
- }
240
- }
241
- exports.default = Onboarding;
242
- // we can't get this automated by using command context because when we run a command the project directory doesn't exist yet
243
- async function getPrivateExpoConfigWithProjectIdAsync({ projectDir, graphqlClient, actor, options, }) {
244
- const expBefore = await (0, expoConfig_1.getPrivateExpoConfigAsync)(projectDir, options);
245
- const projectId = await (0, getProjectIdAsync_1.validateOrSetProjectIdAsync)({
246
- exp: expBefore,
247
- graphqlClient,
248
- actor,
249
- options: {
250
- nonInteractive: false,
251
- },
252
- cwd: projectDir,
253
- });
254
- const exp = await (0, expoConfig_1.getPrivateExpoConfigAsync)(projectDir, options);
255
- return {
256
- exp,
257
- projectId,
258
- };
259
- }
260
- // we can't get this automated by using command context because when we run a command the project directory doesn't exist yet
261
- function getDynamicPrivateProjectConfigGetter({ projectDir, graphqlClient, actor, }) {
262
- return async (options) => {
263
- return {
264
- ...(await getPrivateExpoConfigWithProjectIdAsync({
265
- projectDir,
266
- graphqlClient,
267
- actor,
268
- options,
269
- })),
270
- projectDir,
271
- };
272
- };
273
- }
274
- async function configureProjectFromBareDefaultExpoTemplateAsync({ app, vcsClient, targetDir, }) {
275
- // Android package name requires each component to start with a lowercase letter.
276
- const isUsernameValidSegment = /^[^a-z]/.test(app.ownerAccount.name);
277
- const userPrefix = isUsernameValidSegment ? 'user' : '';
278
- const isSlugValidSegment = /^[^a-z]/.test(app.slug);
279
- const slugPrefix = isSlugValidSegment ? 'app' : '';
280
- const bundleIdentifier = `com.${userPrefix}${stripInvalidCharactersForBundleIdentifier(app.ownerAccount.name)}.${slugPrefix}${stripInvalidCharactersForBundleIdentifier(app.slug)}`;
281
- const updateUrl = (0, api_1.getEASUpdateURL)(app.id, /* manifestHostOverride */ null);
282
- const easBuildGitHubConfig = {
283
- android: {
284
- image: 'latest',
285
- },
286
- ios: {
287
- image: 'latest',
288
- },
289
- };
290
- const easJson = {
291
- cli: {
292
- version: `>= ${easCli_1.easCliVersion}`,
293
- appVersionSource: eas_json_1.AppVersionSource.REMOTE,
294
- },
295
- build: {
296
- development: {
297
- developmentClient: true,
298
- distribution: 'internal',
299
- ...easBuildGitHubConfig,
300
- },
301
- 'development-simulator': {
302
- extends: 'development',
303
- ios: {
304
- simulator: true,
305
- },
306
- },
307
- preview: {
308
- distribution: 'internal',
309
- channel: 'main',
310
- ...easBuildGitHubConfig,
311
- },
312
- production: {
313
- channel: 'production',
314
- autoIncrement: true,
315
- ...easBuildGitHubConfig,
316
- },
317
- },
318
- submit: {
319
- production: {},
320
- },
321
- };
322
- const easJsonPath = path_1.default.join(targetDir, 'eas.json');
323
- await fs_extra_1.default.writeFile(easJsonPath, `${JSON.stringify(easJson, null, 2)}\n`);
324
- await vcsClient.trackFileAsync(easJsonPath);
325
- log_1.default.log(`✅ Generated ${chalk_1.default.bold('eas.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/build-reference/eas-json/')}`);
326
- log_1.default.log();
327
- const baseExpoConfig = JSON.parse(await fs_extra_1.default.readFile(path_1.default.join(targetDir, 'app.json'), 'utf8'))
328
- .expo;
329
- const expoConfig = {
330
- ...baseExpoConfig,
331
- name: app.name ?? app.slug,
332
- slug: app.slug,
333
- extra: {
334
- eas: {
335
- projectId: app.id,
336
- },
337
- },
338
- owner: app.ownerAccount.name,
339
- updates: {
340
- url: updateUrl,
341
- },
342
- runtimeVersion: {
343
- policy: 'appVersion',
344
- },
345
- ios: {
346
- ...baseExpoConfig.ios,
347
- bundleIdentifier,
348
- },
349
- android: {
350
- ...baseExpoConfig.android,
351
- package: bundleIdentifier,
352
- },
353
- };
354
- const appJsonPath = path_1.default.join(targetDir, 'app.json');
355
- await fs_extra_1.default.writeFile(appJsonPath, `${JSON.stringify({ expo: expoConfig }, null, 2)}\n`);
356
- await vcsClient.trackFileAsync(appJsonPath);
357
- log_1.default.log(`✅ Generated ${chalk_1.default.bold('app.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/versions/latest/config/app/')}`);
358
- log_1.default.log();
359
- }
360
- function stripInvalidCharactersForBundleIdentifier(string) {
361
- return string.replaceAll(/[^A-Za-z0-9]/g, '');
362
- }
@@ -1,10 +0,0 @@
1
- import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { UserPreferencesOnboardingInput } from '../generated';
3
- export declare const UserPreferencesMutation: {
4
- markCliDoneInOnboardingUserPreferencesAsync(graphqlClient: ExpoGraphqlClient, userPreferencesData: Partial<UserPreferencesOnboardingInput> & {
5
- appId: string;
6
- }): Promise<{
7
- isCLIDone: boolean;
8
- appId: string;
9
- }>;
10
- };
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserPreferencesMutation = void 0;
4
- const tslib_1 = require("tslib");
5
- const assert_1 = tslib_1.__importDefault(require("assert"));
6
- const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
- const client_1 = require("../client");
8
- exports.UserPreferencesMutation = {
9
- async markCliDoneInOnboardingUserPreferencesAsync(graphqlClient, userPreferencesData) {
10
- const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
11
- .mutation((0, graphql_tag_1.default) `
12
- mutation MarkCliDoneInOnboardingUserPreferencesMutation($preferences: UserPreferencesInput!) {
13
- me {
14
- setPreferences(preferences: $preferences) {
15
- onboarding {
16
- appId
17
- isCLIDone
18
- }
19
- }
20
- }
21
- }
22
- `, {
23
- preferences: {
24
- onboarding: {
25
- ...userPreferencesData,
26
- isCLIDone: true,
27
- lastUsed: new Date().toISOString(),
28
- },
29
- },
30
- })
31
- .toPromise());
32
- const appId = data.me.setPreferences.onboarding?.appId;
33
- (0, assert_1.default)(appId, 'App ID must be defined');
34
- const isCLIDone = data.me.setPreferences.onboarding?.isCLIDone;
35
- (0, assert_1.default)(isCLIDone, 'isCLIDone must be defined and true');
36
- return {
37
- appId,
38
- isCLIDone,
39
- };
40
- },
41
- };