Compare commits

...
484 changed files with 3378 additions and 2601 deletions

No files matched your search

View File
File renamed without changes.
+3
View File
@@ -19,3 +19,6 @@ node_modules
# Tests # Tests
coverage coverage
# Copies of script for testing ESM imports
packages/*/scripts/testESMImports.ts
+7
View File
@@ -0,0 +1,7 @@
module.exports = {
projects: [
require('./packages/eas-cli/jest.config.cjs'),
require('./packages/eas-json/jest.config.cjs'),
],
testPathIgnorePatterns: ['.*'],
};
-7
View File
@@ -1,7 +0,0 @@
module.exports = {
projects: [
require('./packages/eas-cli/jest.config.js'),
require('./packages/eas-json/jest.config.js'),
],
testPathIgnorePatterns: ['.*'],
};
+9 -1
View File
@@ -1,7 +1,15 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node', testEnvironment: 'node',
testRegex: '/__tests__/.*(test|spec)\\.[jt]sx?$', testRegex: '/__tests__/.*(test|spec)\\.[jt]sx?$',
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}'], collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}'],
globals: {
'ts-jest': {
useESM: true,
},
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
}; };
+4 -2
View File
@@ -1,5 +1,6 @@
{ {
"private": true, "private": true,
"type": "module",
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
@@ -13,8 +14,9 @@
"eas": "packages/eas-cli/bin/run", "eas": "packages/eas-cli/bin/run",
"lint": "eslint .", "lint": "eslint .",
"release": "./scripts/bin/run update-local-plugin && lerna version --exact", "release": "./scripts/bin/run update-local-plugin && lerna version --exact",
"test": "jest", "test": "NODE_OPTIONS=--experimental-vm-modules jest",
"clean": "lerna run clean && rm -rf node_modules coverage" "clean": "lerna run clean && rm -rf node_modules coverage",
"test-esm-imports": "lerna run test-esm-imports"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "27.5.0", "@types/jest": "27.5.0",
@@ -1,4 +1,4 @@
const rootEslintrc = require('../../.eslintrc.js'); const rootEslintrc = require('../../.eslintrc.cjs');
module.exports = { module.exports = {
rules: { rules: {
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env node
require('@oclif/core')
.run()
.then(require('@oclif/core/flush'))
.catch(require('@oclif/core/handle'));
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env node
import { Errors, flush, run } from '@oclif/core';
run(undefined, import.meta.url)
.then(flush)
.catch(Errors.handle);
@@ -1,5 +1,5 @@
module.exports = { module.exports = {
...require('../../jest/jest.config.js'), ...require('../../jest/jest.config.cjs'),
rootDir: __dirname, rootDir: __dirname,
roots: ['src', '__mocks__'], roots: ['src', '__mocks__'],
globalSetup: './jest/global-setup.ts', globalSetup: './jest/global-setup.ts',
+2
View File
@@ -1,3 +1,5 @@
import { jest } from '@jest/globals';
/* eslint-disable no-console */ /* eslint-disable no-console */
beforeAll(() => { beforeAll(() => {
console.log = jest.fn(); console.log = jest.fn();
+14 -5
View File
@@ -1,5 +1,6 @@
{ {
"name": "eas-cli", "name": "eas-cli",
"type": "module",
"description": "EAS command line tool", "description": "EAS command line tool",
"version": "0.54.1", "version": "0.54.1",
"author": "Expo <[email protected]>", "author": "Expo <[email protected]>",
@@ -27,7 +28,7 @@
"@expo/rudder-sdk-node": "1.1.1", "@expo/rudder-sdk-node": "1.1.1",
"@expo/spawn-async": "1.6.0", "@expo/spawn-async": "1.6.0",
"@expo/timeago.js": "1.0.0", "@expo/timeago.js": "1.0.0",
"@oclif/core": "1.9.0", "@oclif/core": "1.9.5",
"@urql/core": "2.4.4", "@urql/core": "2.4.4",
"@urql/exchange-retry": "0.3.3", "@urql/exchange-retry": "0.3.3",
"ajv": "^6.12.6", "ajv": "^6.12.6",
@@ -81,6 +82,7 @@
"@graphql-codegen/introspection": "2.1.1", "@graphql-codegen/introspection": "2.1.1",
"@graphql-codegen/typescript": "2.4.11", "@graphql-codegen/typescript": "2.4.11",
"@graphql-codegen/typescript-operations": "2.4.0", "@graphql-codegen/typescript-operations": "2.4.0",
"@jest/globals": "28.1.2",
"@types/cli-progress": "3.9.2", "@types/cli-progress": "3.9.2",
"@types/dateformat": "3.0.1", "@types/dateformat": "3.0.1",
"@types/envinfo": "7.8.1", "@types/envinfo": "7.8.1",
@@ -98,15 +100,17 @@
"axios": "0.27.2", "axios": "0.27.2",
"eslint-plugin-graphql": "4.0.0", "eslint-plugin-graphql": "4.0.0",
"form-data": "4.0.0", "form-data": "4.0.0",
"globby": "13.1.2",
"memfs": "3.4.3", "memfs": "3.4.3",
"mockdate": "3.0.5", "mockdate": "3.0.5",
"nock": "13.2.4", "nock": "13.2.4",
"tempy": "0.7.0", "tempy": "0.7.0",
"ts-deepmerge": "2.0.1", "ts-deepmerge": "2.0.1",
"ts-node": "10.8.2",
"typescript": "4.7.4" "typescript": "4.7.4"
}, },
"engines": { "engines": {
"node": ">=14.0.0" "node": ">=14.16"
}, },
"files": [ "files": [
"/bin", "/bin",
@@ -196,9 +200,14 @@
"build": "tsc --project tsconfig.build.json", "build": "tsc --project tsconfig.build.json",
"watch": "yarn build --watch --preserveWatchOutput", "watch": "yarn build --watch --preserveWatchOutput",
"typecheck": "tsc", "typecheck": "tsc",
"test": "jest", "test": "NODE_OPTIONS=--experimental-vm-modules jest",
"version": "yarn oclif readme && node scripts/patch-readme && git add README.md", "version": "yarn oclif readme && node scripts/patch-readme.cjs && git add README.md",
"generate-graphql-code": "graphql-codegen --config graphql-codegen.yml", "generate-graphql-code": "graphql-codegen --config graphql-codegen.yml",
"clean": "rm -rf dist build tmp node_modules yarn-error.log" "clean": "rm -rf dist build tmp node_modules yarn-error.log",
"test-esm-imports": "cp ../../scripts/src/testESMImports.ts scripts/ && ts-node-esm ./scripts/testESMImports.ts 'build/**/*.js'"
},
"volta": {
"node": "18.2.0",
"yarn": "1.22.18"
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
import assert from 'assert'; import assert from 'assert';
import nock from 'nock'; import nock from 'nock';
import { ApiV2Error, api, getExpoApiBaseUrl } from '../api'; import { ApiV2Error, api, getExpoApiBaseUrl } from '../api.js';
describe('apiClient', () => { describe('apiClient', () => {
it('converts Expo APIv2 error to ApiV2Error', async () => { it('converts Expo APIv2 error to ApiV2Error', async () => {
@@ -1,4 +1,4 @@
import { Actor } from '../user/User'; import { Actor } from '../user/User.js';
interface MockProject { interface MockProject {
projectRoot: string; projectRoot: string;
@@ -1,4 +1,4 @@
import { fixArchiveUrl } from '../uploads'; import { fixArchiveUrl } from '../uploads.js';
describe(fixArchiveUrl, () => { describe(fixArchiveUrl, () => {
it('fixes broken links', () => { it('fixes broken links', () => {
+1 -1
View File
@@ -1,4 +1,4 @@
import { Analytics, Event } from './events'; import { Analytics, Event } from './events.js';
export type TrackingContext = Record<string, string | number | boolean>; export type TrackingContext = Record<string, string | number | boolean>;
+1 -1
View File
@@ -1,4 +1,4 @@
import { logEvent } from './rudderstackClient'; import { logEvent } from './rudderstackClient.js';
export type Event = BuildEvent | SubmissionEvent | MetadataEvent; export type Event = BuildEvent | SubmissionEvent | MetadataEvent;
export enum SubmissionEvent { export enum SubmissionEvent {
@@ -1,10 +1,12 @@
import RudderAnalytics from '@expo/rudder-sdk-node'; import RudderAnalyticsModule from '@expo/rudder-sdk-node';
import os from 'os'; import os from 'os';
import { URL } from 'url'; import { URL } from 'url';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import UserSettings from '../user/UserSettings'; import UserSettings from '../user/UserSettings.js';
import { easCliVersion } from '../utils/easCli'; import { easCliVersion } from '../utils/easCli.js';
const RudderAnalytics = RudderAnalyticsModule.default;
const PLATFORM_TO_ANALYTICS_PLATFORM: { [platform: string]: string } = { const PLATFORM_TO_ANALYTICS_PLATFORM: { [platform: string]: string } = {
darwin: 'Mac', darwin: 'Mac',
@@ -12,7 +14,7 @@ const PLATFORM_TO_ANALYTICS_PLATFORM: { [platform: string]: string } = {
linux: 'Linux', linux: 'Linux',
}; };
let rudderstackClient: RudderAnalytics | null = null; let rudderstackClient: RudderAnalyticsModule.default | null = null;
let userIdentified = false; let userIdentified = false;
let identifyData: { let identifyData: {
userId: string; userId: string;
+2 -2
View File
@@ -1,7 +1,7 @@
import { JSONValue } from '@expo/json-file'; import { JSONValue } from '@expo/json-file';
import fetch, { RequestError, RequestInit } from './fetch'; import fetch, { RequestError, RequestInit } from './fetch.js';
import { getAccessToken, getSessionSecret } from './user/sessionStorage'; import { getAccessToken, getSessionSecret } from './user/sessionStorage.js';
export class ApiV2Error extends Error { export class ApiV2Error extends Error {
readonly name = 'ApiV2Error'; readonly name = 'ApiV2Error';
@@ -7,13 +7,16 @@ import { vol } from 'memfs';
import os from 'os'; import os from 'os';
import path from 'path'; import path from 'path';
import { getAppBuildGradleAsync, resolveConfigValue } from '../../../project/android/gradleUtils'; import {
getAppBuildGradleAsync,
resolveConfigValue,
} from '../../../project/android/gradleUtils.js';
import { import {
BumpStrategy, BumpStrategy,
bumpVersionAsync, bumpVersionAsync,
bumpVersionInAppJsonAsync, bumpVersionInAppJsonAsync,
maybeResolveVersionsAsync, maybeResolveVersionsAsync,
} from '../version'; } from '../version.js';
const fsReal = jest.requireActual('fs').promises as typeof fs; const fsReal = jest.requireActual('fs').promises as typeof fs;
jest.mock('fs'); jest.mock('fs');
+17 -17
View File
@@ -1,33 +1,33 @@
import { Android, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job'; import { Android, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
import chalk from 'chalk'; import chalk from 'chalk';
import nullthrows from 'nullthrows';
import AndroidCredentialsProvider, { import AndroidCredentialsProvider, {
AndroidCredentials, AndroidCredentials,
} from '../../credentials/android/AndroidCredentialsProvider'; } from '../../credentials/android/AndroidCredentialsProvider.js';
import { BuildParamsInput } from '../../graphql/generated'; import { BuildParamsInput } from '../../graphql/generated.js';
import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation'; import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation.js';
import Log from '../../log'; import Log from '../../log.js';
import { import {
ensureApplicationIdIsDefinedForManagedProjectAsync, ensureApplicationIdIsDefinedForManagedProjectAsync,
getApplicationIdAsync, getApplicationIdAsync,
} from '../../project/android/applicationId'; } from '../../project/android/applicationId.js';
import { resolveGradleBuildContextAsync } from '../../project/android/gradle'; import { resolveGradleBuildContextAsync } from '../../project/android/gradle.js';
import { toggleConfirmAsync } from '../../prompts'; import { toggleConfirmAsync } from '../../prompts.js';
import { findAccountByName } from '../../user/Account'; import { findAccountByName } from '../../user/Account.js';
import { nullthrows } from '../../utils/nullthrows.js';
import { import {
BuildRequestSender, BuildRequestSender,
CredentialsResult, CredentialsResult,
JobData, JobData,
prepareBuildRequestForPlatformAsync, prepareBuildRequestForPlatformAsync,
} from '../build'; } from '../build.js';
import { AndroidBuildContext, BuildContext, CommonContext } from '../context'; import { AndroidBuildContext, BuildContext, CommonContext } from '../context.js';
import { transformMetadata } from '../graphql'; import { transformMetadata } from '../graphql.js';
import { logCredentialsSource } from '../utils/credentials'; import { logCredentialsSource } from '../utils/credentials.js';
import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate'; import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate.js';
import { transformJob } from './graphql'; import { transformJob } from './graphql.js';
import { prepareJobAsync } from './prepareJob'; import { prepareJobAsync } from './prepareJob.js';
import { syncProjectConfigurationAsync } from './syncProjectConfiguration'; import { syncProjectConfigurationAsync } from './syncProjectConfiguration.js';
export async function createAndroidContextAsync( export async function createAndroidContextAsync(
ctx: CommonContext<Platform.ANDROID> ctx: CommonContext<Platform.ANDROID>
@@ -1,7 +1,7 @@
import { Android } from '@expo/eas-build-job'; import { Android } from '@expo/eas-build-job';
import { AndroidBuildType, AndroidJobInput } from '../../graphql/generated'; import { AndroidBuildType, AndroidJobInput } from '../../graphql/generated.js';
import { transformProjectArchive, transformWorkflow } from '../graphql'; import { transformProjectArchive, transformWorkflow } from '../graphql.js';
export function transformJob(job: Android.Job): AndroidJobInput { export function transformJob(job: Android.Job): AndroidJobInput {
return { return {
@@ -3,11 +3,11 @@ import { BuildProfile } from '@expo/eas-json';
import path from 'path'; import path from 'path';
import slash from 'slash'; import slash from 'slash';
import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider'; import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider.js';
import { getUsername } from '../../project/projectUtils'; import { getUsername } from '../../project/projectUtils.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
import { BuildContext } from '../context'; import { BuildContext } from '../context.js';
interface JobData { interface JobData {
projectArchive: ArchiveSource; projectArchive: ArchiveSource;
@@ -1,16 +1,18 @@
import { ExpoConfig } from '@expo/config'; import { ExpoConfig } from '@expo/config';
import { AndroidConfig } from '@expo/config-plugins'; import ConfigPlugins from '@expo/config-plugins';
import { Platform, Workflow } from '@expo/eas-build-job'; import { Platform, Workflow } from '@expo/eas-build-job';
import { AndroidVersionAutoIncrement, BuildProfile } from '@expo/eas-json'; import { AndroidVersionAutoIncrement, BuildProfile } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import fs from 'fs-extra'; import fs from 'fs-extra';
import path from 'path'; import path from 'path';
import Log from '../../log'; import Log from '../../log.js';
import { isExpoUpdatesInstalled } from '../../project/projectUtils'; import { isExpoUpdatesInstalled } from '../../project/projectUtils.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { syncUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; import { syncUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js';
import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version'; import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version.js';
const { AndroidConfig } = ConfigPlugins;
export async function syncProjectConfigurationAsync({ export async function syncProjectConfigurationAsync({
projectDir, projectDir,
@@ -1,19 +1,21 @@
import { ExpoConfig } from '@expo/config'; import { ExpoConfig } from '@expo/config';
import { AndroidConfig } from '@expo/config-plugins'; import ConfigPlugins from '@expo/config-plugins';
import { Platform, Workflow } from '@expo/eas-build-job'; import { Platform, Workflow } from '@expo/eas-build-job';
import { BuildProfile } from '@expo/eas-json'; import { BuildProfile } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import fs from 'fs-extra'; import fs from 'fs-extra';
import Log from '../../log'; import Log from '../../log.js';
import { import {
getAppBuildGradleAsync, getAppBuildGradleAsync,
parseGradleCommand, parseGradleCommand,
resolveConfigValue, resolveConfigValue,
} from '../../project/android/gradleUtils'; } from '../../project/android/gradleUtils.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { updateAppJsonConfigAsync } from '../utils/appJson'; import { updateAppJsonConfigAsync } from '../utils/appJson.js';
import { bumpAppVersionAsync, ensureStaticConfigExists } from '../utils/version'; import { bumpAppVersionAsync, ensureStaticConfigExists } from '../utils/version.js';
const { AndroidConfig } = ConfigPlugins;
export enum BumpStrategy { export enum BumpStrategy {
APP_VERSION, APP_VERSION,
+20 -20
View File
@@ -3,11 +3,10 @@ import { CredentialsSource } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import cliProgress from 'cli-progress'; import cliProgress from 'cli-progress';
import fs from 'fs-extra'; import fs from 'fs-extra';
import nullthrows from 'nullthrows';
import { withAnalyticsAsync } from '../analytics/common'; import { withAnalyticsAsync } from '../analytics/common.js';
import { BuildEvent } from '../analytics/events'; import { BuildEvent } from '../analytics/events.js';
import { getExpoWebsiteBaseUrl } from '../api'; import { getExpoWebsiteBaseUrl } from '../api.js';
import { import {
AppPlatform, AppPlatform,
BuildFragment, BuildFragment,
@@ -15,26 +14,27 @@ import {
BuildPriority, BuildPriority,
BuildStatus, BuildStatus,
UploadSessionType, UploadSessionType,
} from '../graphql/generated'; } from '../graphql/generated.js';
import { BuildResult } from '../graphql/mutations/BuildMutation'; import { BuildResult } from '../graphql/mutations/BuildMutation.js';
import { BuildQuery } from '../graphql/queries/BuildQuery'; import { BuildQuery } from '../graphql/queries/BuildQuery.js';
import Log, { learnMore } from '../log'; import Log, { learnMore } from '../log.js';
import { Ora, ora } from '../ora'; import { Ora, ora } from '../ora.js';
import { import {
appPlatformDisplayNames, appPlatformDisplayNames,
appPlatformEmojis, appPlatformEmojis,
requestedPlatformDisplayNames, requestedPlatformDisplayNames,
} from '../platform'; } from '../platform.js';
import { uploadAsync } from '../uploads'; import { uploadAsync } from '../uploads.js';
import { formatBytes } from '../utils/files'; import { formatBytes } from '../utils/files.js';
import { createProgressTracker } from '../utils/progress'; import { nullthrows } from '../utils/nullthrows.js';
import { sleepAsync } from '../utils/promise'; import { createProgressTracker } from '../utils/progress.js';
import { getVcsClient } from '../vcs'; import { sleepAsync } from '../utils/promise.js';
import { BuildContext } from './context'; import { getVcsClient } from '../vcs/index.js';
import { runLocalBuildAsync } from './local'; import { BuildContext } from './context.js';
import { collectMetadataAsync } from './metadata'; import { runLocalBuildAsync } from './local.js';
import { printDeprecationWarnings } from './utils/printBuildInfo'; import { collectMetadataAsync } from './metadata.js';
import { makeProjectTarballAsync, reviewAndCommitChangesAsync } from './utils/repository'; import { printDeprecationWarnings } from './utils/printBuildInfo.js';
import { makeProjectTarballAsync, reviewAndCommitChangesAsync } from './utils/repository.js';
export interface CredentialsResult<Credentials> { export interface CredentialsResult<Credentials> {
source: CredentialsSource.LOCAL | CredentialsSource.REMOTE; source: CredentialsSource.LOCAL | CredentialsSource.REMOTE;
+5 -5
View File
@@ -3,11 +3,11 @@ import { EasJson, EasJsonReader } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import fs from 'fs-extra'; import fs from 'fs-extra';
import Log from '../log'; import Log from '../log.js';
import { resolveWorkflowAsync } from '../project/workflow'; import { resolveWorkflowAsync } from '../project/workflow.js';
import { easCliVersion } from '../utils/easCli'; import { easCliVersion } from '../utils/easCli.js';
import { getVcsClient } from '../vcs'; import { getVcsClient } from '../vcs/index.js';
import { maybeBailOnRepoStatusAsync, reviewAndCommitChangesAsync } from './utils/repository'; import { maybeBailOnRepoStatusAsync, reviewAndCommitChangesAsync } from './utils/repository.js';
interface ConfigureParams { interface ConfigureParams {
projectDir: string; projectDir: string;
+8 -8
View File
@@ -3,14 +3,14 @@ import { Platform, Workflow } from '@expo/eas-build-job';
import { BuildProfile } from '@expo/eas-json'; import { BuildProfile } from '@expo/eas-json';
import type { XCBuildConfiguration } from 'xcode'; import type { XCBuildConfiguration } from 'xcode';
import { TrackingContext } from '../analytics/common'; import { TrackingContext } from '../analytics/common.js';
import { CredentialsContext } from '../credentials/context'; import { CredentialsContext } from '../credentials/context.js';
import { Target } from '../credentials/ios/types'; import { Target } from '../credentials/ios/types.js';
import { BuildResourceClass } from '../graphql/generated'; import { BuildResourceClass } from '../graphql/generated.js';
import { GradleBuildContext } from '../project/android/gradle'; import { GradleBuildContext } from '../project/android/gradle.js';
import { XcodeBuildContext } from '../project/ios/scheme'; import { XcodeBuildContext } from '../project/ios/scheme.js';
import { Actor } from '../user/User'; import { Actor } from '../user/User.js';
import { LocalBuildOptions } from './local'; import { LocalBuildOptions } from './local.js';
export type CommonContext<T extends Platform> = Omit<BuildContext<T>, 'android' | 'ios'>; export type CommonContext<T extends Platform> = Omit<BuildContext<T>, 'android' | 'ios'>;
+16 -14
View File
@@ -1,22 +1,24 @@
import { Platform } from '@expo/eas-build-job'; import { Platform } from '@expo/eas-build-job';
import { BuildProfile } from '@expo/eas-json'; import { BuildProfile } from '@expo/eas-json';
import JsonFile from '@expo/json-file'; import JsonFileModule from '@expo/json-file';
import resolveFrom from 'resolve-from'; import resolveFrom from 'resolve-from';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { TrackingContext } from '../analytics/common'; import { TrackingContext } from '../analytics/common.js';
import { Analytics, BuildEvent } from '../analytics/events'; import { Analytics, BuildEvent } from '../analytics/events.js';
import { CredentialsContext } from '../credentials/context'; import { CredentialsContext } from '../credentials/context.js';
import { BuildResourceClass } from '../graphql/generated'; import { BuildResourceClass } from '../graphql/generated.js';
import { getExpoConfig } from '../project/expoConfig'; import { getExpoConfig } from '../project/expoConfig.js';
import { getProjectAccountName, getProjectIdAsync } from '../project/projectUtils'; import { getProjectAccountName, getProjectIdAsync } from '../project/projectUtils.js';
import { resolveWorkflowAsync } from '../project/workflow'; import { resolveWorkflowAsync } from '../project/workflow.js';
import { findAccountByName } from '../user/Account'; import { findAccountByName } from '../user/Account.js';
import { ensureLoggedInAsync } from '../user/actions'; import { ensureLoggedInAsync } from '../user/actions.js';
import { createAndroidContextAsync } from './android/build'; import { createAndroidContextAsync } from './android/build.js';
import { BuildContext, CommonContext } from './context'; import { BuildContext, CommonContext } from './context.js';
import { createIosContextAsync } from './ios/build'; import { createIosContextAsync } from './ios/build.js';
import { LocalBuildOptions } from './local'; import { LocalBuildOptions } from './local.js';
const JsonFile = JsonFileModule.default;
export async function createBuildContextAsync<T extends Platform>({ export async function createBuildContextAsync<T extends Platform>({
buildProfileName, buildProfileName,
+1 -1
View File
@@ -8,7 +8,7 @@ import {
DistributionType, DistributionType,
ProjectArchiveSourceInput, ProjectArchiveSourceInput,
ProjectArchiveSourceType, ProjectArchiveSourceType,
} from '../graphql/generated'; } from '../graphql/generated.js';
export function transformProjectArchive(archiveSource: ArchiveSource): ProjectArchiveSourceInput { export function transformProjectArchive(archiveSource: ArchiveSource): ProjectArchiveSourceInput {
if (archiveSource.type === ArchiveSourceType.S3) { if (archiveSource.type === ArchiveSourceType.S3) {
@@ -1,10 +1,10 @@
import { ExpoConfig } from '@expo/config'; import { ExpoConfig } from '@expo/config';
import { IOSConfig } from '@expo/config-plugins'; import { InfoPlist } from '@expo/config-plugins';
import fs from 'fs-extra'; import fs from 'fs-extra';
import { vol } from 'memfs'; import { vol } from 'memfs';
import os from 'os'; import os from 'os';
import { readPlistAsync } from '../../../utils/plist'; import { readPlistAsync } from '../../../utils/plist.js';
import { import {
BumpStrategy, BumpStrategy,
bumpVersionAsync, bumpVersionAsync,
@@ -13,7 +13,7 @@ import {
getInfoPlistPath, getInfoPlistPath,
readBuildNumberAsync, readBuildNumberAsync,
readShortVersionAsync, readShortVersionAsync,
} from '../version'; } from '../version.js';
jest.mock('fs'); jest.mock('fs');
@@ -62,9 +62,7 @@ describe(bumpVersionAsync, () => {
}); });
const appJSON = await fs.readJSON('/repo/app.json'); const appJSON = await fs.readJSON('/repo/app.json');
const infoPlist = (await readPlistAsync( const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist;
'/repo/ios/myproject/Info.plist'
)) as IOSConfig.InfoPlist;
expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.version).toBe('1.0.0');
expect(fakeExp.ios?.buildNumber).toBe('2'); expect(fakeExp.ios?.buildNumber).toBe('2');
expect(appJSON.expo.version).toBe('1.0.0'); expect(appJSON.expo.version).toBe('1.0.0');
@@ -86,9 +84,7 @@ describe(bumpVersionAsync, () => {
}); });
const appJSON = await fs.readJSON('/repo/app.json'); const appJSON = await fs.readJSON('/repo/app.json');
const infoPlist = (await readPlistAsync( const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info2.plist')) as InfoPlist;
'/repo/ios/myproject/Info2.plist'
)) as IOSConfig.InfoPlist;
expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.version).toBe('1.0.0');
expect(fakeExp.ios?.buildNumber).toBe('2'); expect(fakeExp.ios?.buildNumber).toBe('2');
expect(appJSON.expo.version).toBe('1.0.0'); expect(appJSON.expo.version).toBe('1.0.0');
@@ -108,9 +104,7 @@ describe(bumpVersionAsync, () => {
}); });
const appJSON = await fs.readJSON('/repo/app.json'); const appJSON = await fs.readJSON('/repo/app.json');
const infoPlist = (await readPlistAsync( const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist;
'/repo/ios/myproject/Info.plist'
)) as IOSConfig.InfoPlist;
expect(fakeExp.version).toBe('1.0.1'); expect(fakeExp.version).toBe('1.0.1');
expect(fakeExp.ios?.buildNumber).toBe('1'); expect(fakeExp.ios?.buildNumber).toBe('1');
expect(appJSON.expo.version).toBe('1.0.1'); expect(appJSON.expo.version).toBe('1.0.1');
@@ -130,9 +124,7 @@ describe(bumpVersionAsync, () => {
}); });
const appJSON = await fs.readJSON('/repo/app.json'); const appJSON = await fs.readJSON('/repo/app.json');
const infoPlist = (await readPlistAsync( const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist;
'/repo/ios/myproject/Info.plist'
)) as IOSConfig.InfoPlist;
expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.version).toBe('1.0.0');
expect(fakeExp.ios?.buildNumber).toBe('1'); expect(fakeExp.ios?.buildNumber).toBe('1');
expect(appJSON.expo.version).toBe('1.0.0'); expect(appJSON.expo.version).toBe('1.0.0');
+17 -15
View File
@@ -1,21 +1,23 @@
import { IOSConfig } from '@expo/config-plugins'; import ConfigPlugins from '@expo/config-plugins';
import { Ios, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job'; import { Ios, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
import type { XCBuildConfiguration } from 'xcode'; import type { XCBuildConfiguration } from 'xcode';
import { IosCredentials, Target } from '../../credentials/ios/types'; import { IosCredentials, Target } from '../../credentials/ios/types.js';
import { BuildParamsInput } from '../../graphql/generated'; import { BuildParamsInput } from '../../graphql/generated.js';
import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation'; import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation.js';
import { ensureBundleIdentifierIsDefinedForManagedProjectAsync } from '../../project/ios/bundleIdentifier'; import { ensureBundleIdentifierIsDefinedForManagedProjectAsync } from '../../project/ios/bundleIdentifier.js';
import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme'; import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme.js';
import { findApplicationTarget, resolveTargetsAsync } from '../../project/ios/target'; import { findApplicationTarget, resolveTargetsAsync } from '../../project/ios/target.js';
import { BuildRequestSender, JobData, prepareBuildRequestForPlatformAsync } from '../build'; import { BuildRequestSender, JobData, prepareBuildRequestForPlatformAsync } from '../build.js';
import { BuildContext, CommonContext, IosBuildContext } from '../context'; import { BuildContext, CommonContext, IosBuildContext } from '../context.js';
import { transformMetadata } from '../graphql'; import { transformMetadata } from '../graphql.js';
import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate'; import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate.js';
import { ensureIosCredentialsAsync } from './credentials'; import { ensureIosCredentialsAsync } from './credentials.js';
import { transformJob } from './graphql'; import { transformJob } from './graphql.js';
import { prepareJobAsync } from './prepareJob'; import { prepareJobAsync } from './prepareJob.js';
import { syncProjectConfigurationAsync } from './syncProjectConfiguration'; import { syncProjectConfigurationAsync } from './syncProjectConfiguration.js';
const { IOSConfig } = ConfigPlugins;
export async function createIosContextAsync( export async function createIosContextAsync(
ctx: CommonContext<Platform.IOS> ctx: CommonContext<Platform.IOS>
@@ -1,11 +1,11 @@
import { Platform } from '@expo/eas-build-job'; import { Platform } from '@expo/eas-build-job';
import IosCredentialsProvider from '../../credentials/ios/IosCredentialsProvider'; import IosCredentialsProvider from '../../credentials/ios/IosCredentialsProvider.js';
import { getAppFromContext } from '../../credentials/ios/actions/BuildCredentialsUtils'; import { getAppFromContext } from '../../credentials/ios/actions/BuildCredentialsUtils.js';
import { IosCredentials, Target } from '../../credentials/ios/types'; import { IosCredentials, Target } from '../../credentials/ios/types.js';
import { CredentialsResult } from '../build'; import { CredentialsResult } from '../build.js';
import { BuildContext } from '../context'; import { BuildContext } from '../context.js';
import { logCredentialsSource } from '../utils/credentials'; import { logCredentialsSource } from '../utils/credentials.js';
export async function ensureIosCredentialsAsync( export async function ensureIosCredentialsAsync(
buildCtx: BuildContext<Platform.IOS>, buildCtx: BuildContext<Platform.IOS>,
+3 -3
View File
@@ -1,8 +1,8 @@
import { Env, Ios } from '@expo/eas-build-job'; import { Env, Ios } from '@expo/eas-build-job';
import nullthrows from 'nullthrows';
import { IosJobInput, IosJobSecretsInput } from '../../graphql/generated'; import { IosJobInput, IosJobSecretsInput } from '../../graphql/generated.js';
import { transformProjectArchive, transformWorkflow } from '../graphql'; import { nullthrows } from '../../utils/nullthrows.js';
import { transformProjectArchive, transformWorkflow } from '../graphql.js';
export function transformJob(job: Ios.Job): IosJobInput { export function transformJob(job: Ios.Job): IosJobInput {
return { return {
+5 -5
View File
@@ -2,11 +2,11 @@ import { ArchiveSource, Ios, Job, Platform, sanitizeJob } from '@expo/eas-build-
import path from 'path'; import path from 'path';
import slash from 'slash'; import slash from 'slash';
import { IosCredentials, TargetCredentials } from '../../credentials/ios/types'; import { IosCredentials, TargetCredentials } from '../../credentials/ios/types.js';
import { getUsername } from '../../project/projectUtils'; import { getUsername } from '../../project/projectUtils.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
import { BuildContext } from '../context'; import { BuildContext } from '../context.js';
interface JobData { interface JobData {
projectArchive: ArchiveSource; projectArchive: ArchiveSource;
@@ -3,10 +3,10 @@ import { Platform, Workflow } from '@expo/eas-build-job';
import { BuildProfile, IosVersionAutoIncrement } from '@expo/eas-json'; import { BuildProfile, IosVersionAutoIncrement } from '@expo/eas-json';
import type { XCBuildConfiguration } from 'xcode'; import type { XCBuildConfiguration } from 'xcode';
import { isExpoUpdatesInstalled } from '../../project/projectUtils'; import { isExpoUpdatesInstalled } from '../../project/projectUtils.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { syncUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; import { syncUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js';
import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version'; import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version.js';
export async function syncProjectConfigurationAsync({ export async function syncProjectConfigurationAsync({
projectDir, projectDir,
+14 -12
View File
@@ -1,16 +1,18 @@
import { ExpoConfig, getConfigFilePaths } from '@expo/config'; import { ExpoConfig, getConfigFilePaths } from '@expo/config';
import { IOSConfig } from '@expo/config-plugins'; import ConfigPlugins, { InfoPlist } from '@expo/config-plugins';
import { Platform, Workflow } from '@expo/eas-build-job'; import { Platform, Workflow } from '@expo/eas-build-job';
import chalk from 'chalk'; import chalk from 'chalk';
import path from 'path'; import path from 'path';
import type { XCBuildConfiguration } from 'xcode'; import type { XCBuildConfiguration } from 'xcode';
import Log from '../../log'; import Log from '../../log.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { readPlistAsync, writePlistAsync } from '../../utils/plist'; import { readPlistAsync, writePlistAsync } from '../../utils/plist.js';
import { updateAppJsonConfigAsync } from '../utils/appJson'; import { updateAppJsonConfigAsync } from '../utils/appJson.js';
import { bumpAppVersionAsync } from '../utils/version'; import { bumpAppVersionAsync } from '../utils/version.js';
const { IOSConfig } = ConfigPlugins;
export enum BumpStrategy { export enum BumpStrategy {
APP_VERSION, APP_VERSION,
@@ -145,9 +147,9 @@ async function writeVersionsToInfoPlistAsync({
}: { }: {
projectDir: string; projectDir: string;
exp: ExpoConfig; exp: ExpoConfig;
infoPlist: IOSConfig.InfoPlist; infoPlist: InfoPlist;
buildSettings: XCBuildConfiguration['buildSettings']; buildSettings: XCBuildConfiguration['buildSettings'];
}): Promise<IOSConfig.InfoPlist> { }): Promise<InfoPlist> {
let updatedInfoPlist = IOSConfig.Version.setVersion(exp, infoPlist); let updatedInfoPlist = IOSConfig.Version.setVersion(exp, infoPlist);
updatedInfoPlist = IOSConfig.Version.setBuildNumber(exp, updatedInfoPlist); updatedInfoPlist = IOSConfig.Version.setBuildNumber(exp, updatedInfoPlist);
await writeInfoPlistAsync({ projectDir, infoPlist: updatedInfoPlist, buildSettings }); await writeInfoPlistAsync({ projectDir, infoPlist: updatedInfoPlist, buildSettings });
@@ -176,9 +178,9 @@ export function getInfoPlistPath(
async function readInfoPlistAsync( async function readInfoPlistAsync(
projectDir: string, projectDir: string,
buildSettings: XCBuildConfiguration['buildSettings'] buildSettings: XCBuildConfiguration['buildSettings']
): Promise<IOSConfig.InfoPlist> { ): Promise<InfoPlist> {
const infoPlistPath = getInfoPlistPath(projectDir, buildSettings); const infoPlistPath = getInfoPlistPath(projectDir, buildSettings);
return ((await readPlistAsync(infoPlistPath)) ?? {}) as IOSConfig.InfoPlist; return ((await readPlistAsync(infoPlistPath)) ?? {}) as InfoPlist;
} }
async function writeInfoPlistAsync({ async function writeInfoPlistAsync({
@@ -187,7 +189,7 @@ async function writeInfoPlistAsync({
buildSettings, buildSettings,
}: { }: {
projectDir: string; projectDir: string;
infoPlist: IOSConfig.InfoPlist; infoPlist: InfoPlist;
buildSettings: XCBuildConfiguration['buildSettings']; buildSettings: XCBuildConfiguration['buildSettings'];
}): Promise<void> { }): Promise<void> {
const infoPlistPath = getInfoPlistPath(projectDir, buildSettings); const infoPlistPath = getInfoPlistPath(projectDir, buildSettings);
+2 -2
View File
@@ -1,9 +1,9 @@
import { Job } from '@expo/eas-build-job'; import { Job } from '@expo/eas-build-job';
import spawnAsync from '@expo/spawn-async'; import { default as spawnAsync } from '@expo/spawn-async';
import { ChildProcess } from 'child_process'; import { ChildProcess } from 'child_process';
import semver from 'semver'; import semver from 'semver';
import { ora } from '../ora'; import { ora } from '../ora.js';
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin'; const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
const PLUGIN_PACKAGE_VERSION = '0.0.85'; const PLUGIN_PACKAGE_VERSION = '0.0.85';
+13 -11
View File
@@ -1,25 +1,27 @@
import { Updates } from '@expo/config-plugins'; import ConfigPlugins from '@expo/config-plugins';
import { Metadata, Platform, sanitizeMetadata } from '@expo/eas-build-job'; import { Metadata, Platform, sanitizeMetadata } from '@expo/eas-build-job';
import { IosEnterpriseProvisioning } from '@expo/eas-json'; import { IosEnterpriseProvisioning } from '@expo/eas-json';
import fs from 'fs-extra'; import fs from 'fs-extra';
import resolveFrom from 'resolve-from'; import resolveFrom from 'resolve-from';
import Log from '../log'; import Log from '../log.js';
import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils'; import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils.js';
import { import {
readChannelSafelyAsync as readAndroidChannelSafelyAsync, readChannelSafelyAsync as readAndroidChannelSafelyAsync,
readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync, readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync,
} from '../update/android/UpdatesModule'; } from '../update/android/UpdatesModule.js';
import { import {
readChannelSafelyAsync as readIosChannelSafelyAsync, readChannelSafelyAsync as readIosChannelSafelyAsync,
readReleaseChannelSafelyAsync as readIosReleaseChannelSafelyAsync, readReleaseChannelSafelyAsync as readIosReleaseChannelSafelyAsync,
} from '../update/ios/UpdatesModule'; } from '../update/ios/UpdatesModule.js';
import { ensureLoggedInAsync } from '../user/actions'; import { ensureLoggedInAsync } from '../user/actions.js';
import { easCliVersion } from '../utils/easCli'; import { easCliVersion } from '../utils/easCli.js';
import { getVcsClient } from '../vcs'; import { getVcsClient } from '../vcs/index.js';
import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from './android/version'; import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from './android/version.js';
import { BuildContext } from './context'; import { BuildContext } from './context.js';
import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version'; import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version.js';
const { Updates } = ConfigPlugins;
export async function collectMetadataAsync<T extends Platform>( export async function collectMetadataAsync<T extends Platform>(
ctx: BuildContext<T> ctx: BuildContext<T>
+24 -24
View File
@@ -1,7 +1,6 @@
import { Platform, Workflow } from '@expo/eas-build-job'; import { Platform, Workflow } from '@expo/eas-build-job';
import { BuildProfile, EasJsonReader, SubmitProfile } from '@expo/eas-json'; import { BuildProfile, EasJsonReader, SubmitProfile } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import nullthrows from 'nullthrows';
import { import {
AppPlatform, AppPlatform,
@@ -9,37 +8,38 @@ import {
BuildResourceClass, BuildResourceClass,
BuildStatus, BuildStatus,
SubmissionFragment, SubmissionFragment,
} from '../graphql/generated'; } from '../graphql/generated.js';
import { toAppPlatform, toPlatform } from '../graphql/types/AppPlatform'; import { toAppPlatform, toPlatform } from '../graphql/types/AppPlatform.js';
import Log from '../log'; import Log from '../log.js';
import { import {
RequestedPlatform, RequestedPlatform,
appPlatformDisplayNames, appPlatformDisplayNames,
appPlatformEmojis, appPlatformEmojis,
toPlatforms, toPlatforms,
} from '../platform'; } from '../platform.js';
import { checkExpoSdkIsSupportedAsync } from '../project/expoSdk'; import { checkExpoSdkIsSupportedAsync } from '../project/expoSdk.js';
import { validateMetroConfigForManagedWorkflowAsync } from '../project/metroConfig'; import { validateMetroConfigForManagedWorkflowAsync } from '../project/metroConfig.js';
import { createSubmissionContextAsync } from '../submit/context'; import { createSubmissionContextAsync } from '../submit/context.js';
import { import {
submitAsync, submitAsync,
waitToCompleteAsync as waitForSubmissionsToCompleteAsync, waitToCompleteAsync as waitForSubmissionsToCompleteAsync,
} from '../submit/submit'; } from '../submit/submit.js';
import { printSubmissionDetailsUrls } from '../submit/utils/urls'; import { printSubmissionDetailsUrls } from '../submit/utils/urls.js';
import { printJsonOnlyOutput } from '../utils/json'; import { printJsonOnlyOutput } from '../utils/json.js';
import { ProfileData, getProfilesAsync } from '../utils/profiles'; import { nullthrows } from '../utils/nullthrows.js';
import { getVcsClient } from '../vcs'; import { ProfileData, getProfilesAsync } from '../utils/profiles.js';
import { prepareAndroidBuildAsync } from './android/build'; import { getVcsClient } from '../vcs/index.js';
import { BuildRequestSender, waitForBuildEndAsync } from './build'; import { prepareAndroidBuildAsync } from './android/build.js';
import { ensureProjectConfiguredAsync } from './configure'; import { BuildRequestSender, waitForBuildEndAsync } from './build.js';
import { BuildContext } from './context'; import { ensureProjectConfiguredAsync } from './configure.js';
import { createBuildContextAsync } from './createContext'; import { BuildContext } from './context.js';
import { prepareIosBuildAsync } from './ios/build'; import { createBuildContextAsync } from './createContext.js';
import { LocalBuildOptions } from './local'; import { prepareIosBuildAsync } from './ios/build.js';
import { UserInputResourceClass } from './types'; import { LocalBuildOptions } from './local.js';
import { ensureExpoDevClientInstalledForDevClientBuildsAsync } from './utils/devClient'; import { UserInputResourceClass } from './types.js';
import { printBuildResults, printLogsUrls } from './utils/printBuildInfo'; import { ensureExpoDevClientInstalledForDevClientBuildsAsync } from './utils/devClient.js';
import { ensureRepoIsCleanAsync } from './utils/repository'; import { printBuildResults, printLogsUrls } from './utils/printBuildInfo.js';
import { ensureRepoIsCleanAsync } from './utils/repository.js';
let metroConfigValidated = false; let metroConfigValidated = false;
let sdkVersionChecked = false; let sdkVersionChecked = false;
+3 -1
View File
@@ -1,7 +1,9 @@
import * as ExpoConfig from '@expo/config'; import * as ExpoConfig from '@expo/config';
import JsonFile from '@expo/json-file'; import JsonFileModule from '@expo/json-file';
import assert from 'assert'; import assert from 'assert';
const JsonFile = JsonFileModule.default;
export async function updateAppJsonConfigAsync( export async function updateAppJsonConfigAsync(
{ {
projectDir, projectDir,
@@ -2,8 +2,8 @@ import { Platform } from '@expo/eas-build-job';
import { CredentialsSource } from '@expo/eas-json'; import { CredentialsSource } from '@expo/eas-json';
import chalk from 'chalk'; import chalk from 'chalk';
import Log from '../../log'; import Log from '../../log.js';
import { requestedPlatformDisplayNames } from '../../platform'; import { requestedPlatformDisplayNames } from '../../platform.js';
export function logCredentialsSource( export function logCredentialsSource(
credentialsSource: CredentialsSource, credentialsSource: CredentialsSource,
@@ -3,15 +3,15 @@ import { Errors } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import resolveFrom from 'resolve-from'; import resolveFrom from 'resolve-from';
import { toAppPlatform } from '../../graphql/types/AppPlatform'; import { toAppPlatform } from '../../graphql/types/AppPlatform.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { appPlatformDisplayNames } from '../../platform'; import { appPlatformDisplayNames } from '../../platform.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { confirmAsync } from '../../prompts'; import { confirmAsync } from '../../prompts.js';
import { expoCommandAsync } from '../../utils/expoCli'; import { expoCommandAsync } from '../../utils/expoCli.js';
import { ProfileData } from '../../utils/profiles'; import { ProfileData } from '../../utils/profiles.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
import { reviewAndCommitChangesAsync } from './repository'; import { reviewAndCommitChangesAsync } from './repository.js';
export async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ export async function ensureExpoDevClientInstalledForDevClientBuildsAsync({
projectDir, projectDir,
@@ -4,10 +4,10 @@ import {
AppPlatform, AppPlatform,
BuildFragment, BuildFragment,
BuildStatus as GraphQLBuildStatus, BuildStatus as GraphQLBuildStatus,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { appPlatformDisplayNames } from '../../platform'; import { appPlatformDisplayNames } from '../../platform.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { getBuildLogsUrl } from './url'; import { getBuildLogsUrl } from './url.js';
export function formatGraphQLBuild(build: BuildFragment): string { export function formatGraphQLBuild(build: BuildFragment): string {
const actor = getActorName(build); const actor = getActorName(build);
@@ -11,11 +11,11 @@ import {
DistributionType, DistributionType,
EasBuildDeprecationInfo, EasBuildDeprecationInfo,
EasBuildDeprecationInfoType, EasBuildDeprecationInfoType,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { appPlatformDisplayNames, appPlatformEmojis } from '../../platform'; import { appPlatformDisplayNames, appPlatformEmojis } from '../../platform.js';
import { printJsonOnlyOutput } from '../../utils/json'; import { printJsonOnlyOutput } from '../../utils/json.js';
import { getBuildLogsUrl, getInternalDistributionInstallUrl } from './url'; import { getBuildLogsUrl, getInternalDistributionInstallUrl } from './url.js';
export function printLogsUrls(builds: BuildFragment[]): void { export function printLogsUrls(builds: BuildFragment[]): void {
if (builds.length === 1) { if (builds.length === 1) {
@@ -4,13 +4,13 @@ import path from 'path';
import tar from 'tar'; import tar from 'tar';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { confirmAsync, promptAsync } from '../../prompts'; import { confirmAsync, promptAsync } from '../../prompts.js';
import { formatBytes } from '../../utils/files'; import { formatBytes } from '../../utils/files.js';
import { getTmpDirectory } from '../../utils/paths'; import { getTmpDirectory } from '../../utils/paths.js';
import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer'; import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
export async function maybeBailOnRepoStatusAsync(): Promise<void> { export async function maybeBailOnRepoStatusAsync(): Promise<void> {
if (!(await getVcsClient().isCommitRequiredAsync())) { if (!(await getVcsClient().isCommitRequiredAsync())) {
+2 -2
View File
@@ -1,7 +1,7 @@
import assert from 'assert'; import assert from 'assert';
import { getExpoApiBaseUrl, getExpoWebsiteBaseUrl } from '../../api'; import { getExpoApiBaseUrl, getExpoWebsiteBaseUrl } from '../../api.js';
import { AppPlatform, BuildFragment } from '../../graphql/generated'; import { AppPlatform, BuildFragment } from '../../graphql/generated.js';
export function getProjectDashboardUrl(accountName: string, projectName: string): string { export function getProjectDashboardUrl(accountName: string, projectName: string): string {
return new URL( return new URL(
+4 -4
View File
@@ -1,11 +1,11 @@
import { ExpoConfig, getConfigFilePaths } from '@expo/config'; import { ExpoConfig, getConfigFilePaths } from '@expo/config';
import chalk from 'chalk'; import chalk from 'chalk';
import nullthrows from 'nullthrows';
import semver from 'semver'; import semver from 'semver';
import Log from '../../log'; import Log from '../../log.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { updateAppJsonConfigAsync } from './appJson'; import { nullthrows } from '../../utils/nullthrows.js';
import { updateAppJsonConfigAsync } from './appJson.js';
export function ensureStaticConfigExists(projectDir: string): void { export function ensureStaticConfigExists(projectDir: string): void {
const paths = getConfigFilePaths(projectDir); const paths = getConfigFilePaths(projectDir);
+3 -3
View File
@@ -2,9 +2,9 @@ import { Platform, Workflow } from '@expo/eas-build-job';
import fs from 'fs-extra'; import fs from 'fs-extra';
import path from 'path'; import path from 'path';
import Log, { learnMore } from '../log'; import Log, { learnMore } from '../log.js';
import { getVcsClient } from '../vcs'; import { getVcsClient } from '../vcs/index.js';
import { CommonContext } from './context'; import { CommonContext } from './context.js';
export function checkNodeEnvVariable(ctx: CommonContext<Platform>): void { export function checkNodeEnvVariable(ctx: CommonContext<Platform>): void {
if (ctx.buildProfile.env?.NODE_ENV === 'production') { if (ctx.buildProfile.env?.NODE_ENV === 'production') {
@@ -7,13 +7,13 @@ import {
flushAsync as flushAnalyticsAsync, flushAsync as flushAnalyticsAsync,
initAsync as initAnalyticsAsync, initAsync as initAnalyticsAsync,
logEvent, logEvent,
} from '../analytics/rudderstackClient'; } from '../analytics/rudderstackClient.js';
import { findProjectRootAsync } from '../project/projectUtils'; import { findProjectRootAsync } from '../project/projectUtils.js';
import { getUserAsync } from '../user/User'; import { getUserAsync } from '../user/User.js';
import { ensureLoggedInAsync } from '../user/actions'; import { ensureLoggedInAsync } from '../user/actions.js';
import { easCliVersion } from '../utils/easCli'; import { easCliVersion } from '../utils/easCli.js';
import { setVcsClient } from '../vcs'; import GitClient from '../vcs/clients/git.js';
import GitClient from '../vcs/clients/git'; import { setVcsClient } from '../vcs/index.js';
export default abstract class EasCommand extends Command { export default abstract class EasCommand extends Command {
/** /**
@@ -1,8 +1,8 @@
import { flushAsync, initAsync, logEvent } from '../../analytics/rudderstackClient'; import { flushAsync, initAsync, logEvent } from '../../analytics/rudderstackClient.js';
import { jester as mockJester } from '../../credentials/__tests__/fixtures-constants'; import { jester as mockJester } from '../../credentials/__tests__/fixtures-constants.js';
import { getUserAsync } from '../../user/User'; import { getUserAsync } from '../../user/User.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
import EasCommand from '../EasCommand'; import EasCommand from '../EasCommand.js';
jest.mock('../../user/User'); jest.mock('../../user/User');
jest.mock('../../user/actions', () => ({ ensureLoggedInAsync: jest.fn() })); jest.mock('../../user/actions', () => ({ ensureLoggedInAsync: jest.fn() }));
@@ -1,6 +1,6 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { showLoginPromptAsync } from '../../user/actions'; import { showLoginPromptAsync } from '../../user/actions.js';
export default class AccountLogin extends EasCommand { export default class AccountLogin extends EasCommand {
static description = 'log in with your Expo account'; static description = 'log in with your Expo account';
@@ -1,6 +1,6 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { logoutAsync } from '../../user/User'; import { logoutAsync } from '../../user/User.js';
export default class AccountLogout extends EasCommand { export default class AccountLogout extends EasCommand {
static description = 'log out'; static description = 'log out';
@@ -1,8 +1,8 @@
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { getActorDisplayName, getUserAsync } from '../../user/User'; import { getActorDisplayName, getUserAsync } from '../../user/User.js';
export default class AccountView extends EasCommand { export default class AccountView extends EasCommand {
static description = 'show the username you are logged in as'; static description = 'show the username you are logged in as';
+3 -3
View File
@@ -1,6 +1,6 @@
import EasCommand from '../commandUtils/EasCommand'; import EasCommand from '../commandUtils/EasCommand.js';
import Log from '../log'; import Log from '../log.js';
import UserSettings from '../user/UserSettings'; import UserSettings from '../user/UserSettings.js';
export default class AnalyticsView extends EasCommand { export default class AnalyticsView extends EasCommand {
static description = 'display or change analytics settings'; static description = 'display or change analytics settings';
+10 -10
View File
@@ -1,24 +1,24 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
CreateUpdateBranchForAppMutation, CreateUpdateBranchForAppMutation,
CreateUpdateBranchForAppMutationVariables, CreateUpdateBranchForAppMutationVariables,
UpdateBranch, UpdateBranch,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
export async function createUpdateBranchOnAppAsync({ export async function createUpdateBranchOnAppAsync({
appId, appId,
@@ -1,25 +1,25 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
DeleteUpdateBranchMutation, DeleteUpdateBranchMutation,
DeleteUpdateBranchMutationVariables, DeleteUpdateBranchMutationVariables,
DeleteUpdateBranchResult, DeleteUpdateBranchResult,
GetBranchInfoQuery, GetBranchInfoQuery,
GetBranchInfoQueryVariables, GetBranchInfoQueryVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts'; import { promptAsync, toggleConfirmAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
async function getBranchInfoAsync({ async function getBranchInfoAsync({
appId, appId,
+10 -10
View File
@@ -2,21 +2,21 @@ import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import CliTable from 'cli-table3'; import CliTable from 'cli-table3';
import { print } from 'graphql'; import { print } from 'graphql';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
BranchesByAppQuery, BranchesByAppQuery,
BranchesByAppQueryVariables, BranchesByAppQueryVariables,
UpdateBranchFragment, UpdateBranchFragment,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { UpdateBranchFragmentNode } from '../../graphql/types/UpdateBranch'; import { UpdateBranchFragmentNode } from '../../graphql/types/UpdateBranch.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
const BRANCHES_LIMIT = 10_000; const BRANCHES_LIMIT = 10_000;
@@ -1,4 +1,4 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
export default class BranchPublish extends EasCommand { export default class BranchPublish extends EasCommand {
static description = 'deprecated, use "eas update"'; static description = 'deprecated, use "eas update"';
@@ -1,24 +1,24 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
EditUpdateBranchInput, EditUpdateBranchInput,
EditUpdateBranchMutation, EditUpdateBranchMutation,
EditUpdateBranchMutationVariables, EditUpdateBranchMutationVariables,
UpdateBranch, UpdateBranch,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
async function renameUpdateBranchOnAppAsync({ async function renameUpdateBranchOnAppAsync({
appId, appId,
+10 -10
View File
@@ -2,16 +2,16 @@ import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import Table from 'cli-table3'; import Table from 'cli-table3';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js';
import groupBy from '../../utils/expodash/groupBy'; import groupBy from '../../utils/expodash/groupBy.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export default class BranchView extends EasCommand { export default class BranchView extends EasCommand {
static description = 'view a branch'; static description = 'view a branch';
+11 -11
View File
@@ -1,25 +1,25 @@
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
Build, Build,
BuildStatus, BuildStatus,
CancelBuildMutation, CancelBuildMutation,
CancelBuildMutationVariables, CancelBuildMutationVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { BuildQuery } from '../../graphql/queries/BuildQuery'; import { BuildQuery } from '../../graphql/queries/BuildQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { appPlatformEmojis } from '../../platform'; import { appPlatformEmojis } from '../../platform.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { confirmAsync, selectAsync } from '../../prompts'; import { confirmAsync, selectAsync } from '../../prompts.js';
async function cancelBuildAsync(buildId: string): Promise<Pick<Build, 'id' | 'status'>> { async function cancelBuildAsync(buildId: string): Promise<Pick<Build, 'id' | 'status'>> {
const data = await withErrorHandlingAsync( const data = await withErrorHandlingAsync(
@@ -2,18 +2,18 @@ import { Platform, Workflow } from '@expo/eas-build-job';
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import { cleanUpOldEasBuildGradleScriptAsync } from '../../build/android/syncProjectConfiguration'; import { cleanUpOldEasBuildGradleScriptAsync } from '../../build/android/syncProjectConfiguration.js';
import { ensureProjectConfiguredAsync } from '../../build/configure'; import { ensureProjectConfiguredAsync } from '../../build/configure.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { RequestedPlatform } from '../../platform'; import { RequestedPlatform } from '../../platform.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, isExpoUpdatesInstalled } from '../../project/projectUtils'; import { findProjectRootAsync, isExpoUpdatesInstalled } from '../../project/projectUtils.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js';
import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
export default class BuildConfigure extends EasCommand { export default class BuildConfigure extends EasCommand {
static description = 'configure the project to support EAS Build'; static description = 'configure the project to support EAS Build';
+7 -7
View File
@@ -1,13 +1,13 @@
import { Errors, Flags } from '@oclif/core'; import { Errors, Flags } from '@oclif/core';
import path from 'path'; import path from 'path';
import { BuildFlags, runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit'; import { BuildFlags, runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit.js';
import { UserInputResourceClass } from '../../build/types'; import { UserInputResourceClass } from '../../build/types.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { RequestedPlatform, selectRequestedPlatformAsync } from '../../platform'; import { RequestedPlatform, selectRequestedPlatformAsync } from '../../platform.js';
import { findProjectRootAsync } from '../../project/projectUtils'; import { findProjectRootAsync } from '../../project/projectUtils.js';
import { enableJsonOutput } from '../../utils/json'; import { enableJsonOutput } from '../../utils/json.js';
interface RawBuildFlags { interface RawBuildFlags {
platform?: string; platform?: string;
@@ -4,14 +4,14 @@ import fs from 'fs-extra';
import path from 'path'; import path from 'path';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit'; import { runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { RequestedPlatform } from '../../platform'; import { RequestedPlatform } from '../../platform.js';
import { findProjectRootAsync } from '../../project/projectUtils'; import { findProjectRootAsync } from '../../project/projectUtils.js';
import { getTmpDirectory } from '../../utils/paths'; import { getTmpDirectory } from '../../utils/paths.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
enum InspectStage { enum InspectStage {
ARCHIVE = 'archive', ARCHIVE = 'archive',
+11 -11
View File
@@ -1,25 +1,25 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import { BuildDistributionType, BuildStatus } from '../../build/types'; import { BuildDistributionType, BuildStatus } from '../../build/types.js';
import { formatGraphQLBuild } from '../../build/utils/formatBuild'; import { formatGraphQLBuild } from '../../build/utils/formatBuild.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { import {
AppPlatform, AppPlatform,
DistributionType, DistributionType,
BuildStatus as GraphQLBuildStatus, BuildStatus as GraphQLBuildStatus,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { BuildQuery } from '../../graphql/queries/BuildQuery'; import { BuildQuery } from '../../graphql/queries/BuildQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { RequestedPlatform } from '../../platform'; import { RequestedPlatform } from '../../platform.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export default class BuildList extends EasCommand { export default class BuildList extends EasCommand {
static description = 'list all builds for your project'; static description = 'list all builds for your project';
+9 -9
View File
@@ -1,18 +1,18 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import { formatGraphQLBuild } from '../../build/utils/formatBuild'; import { formatGraphQLBuild } from '../../build/utils/formatBuild.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { BuildFragment } from '../../graphql/generated'; import { BuildFragment } from '../../graphql/generated.js';
import { BuildQuery } from '../../graphql/queries/BuildQuery'; import { BuildQuery } from '../../graphql/queries/BuildQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export default class BuildView extends EasCommand { export default class BuildView extends EasCommand {
static description = 'view a build for your project'; static description = 'view a build for your project';
+12 -12
View File
@@ -1,25 +1,25 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
CreateUpdateChannelOnAppMutation, CreateUpdateChannelOnAppMutation,
CreateUpdateChannelOnAppMutationVariables, CreateUpdateChannelOnAppMutationVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { BranchQuery } from '../../graphql/queries/BranchQuery'; import { BranchQuery } from '../../graphql/queries/BranchQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { createUpdateBranchOnAppAsync } from '../branch/create'; import { createUpdateBranchOnAppAsync } from '../branch/create.js';
export async function createUpdateChannelOnAppAsync({ export async function createUpdateChannelOnAppAsync({
appId, appId,
@@ -1,24 +1,24 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
DeleteUpdateChannelMutation, DeleteUpdateChannelMutation,
DeleteUpdateChannelMutationVariables, DeleteUpdateChannelMutationVariables,
DeleteUpdateChannelResult, DeleteUpdateChannelResult,
GetChannelInfoQuery, GetChannelInfoQuery,
GetChannelInfoQueryVariables, GetChannelInfoQueryVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts'; import { promptAsync, toggleConfirmAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export default class ChannelDelete extends EasCommand { export default class ChannelDelete extends EasCommand {
static hidden = true; static hidden = true;
+10 -10
View File
@@ -1,9 +1,9 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
GetChannelByNameToEditQuery, GetChannelByNameToEditQuery,
GetChannelByNameToEditQueryVariables, GetChannelByNameToEditQueryVariables,
@@ -11,13 +11,13 @@ import {
UpdateChannel, UpdateChannel,
UpdateChannelBranchMappingMutation, UpdateChannelBranchMappingMutation,
UpdateChannelBranchMappingMutationVariables, UpdateChannelBranchMappingMutationVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { BranchQuery } from '../../graphql/queries/BranchQuery'; import { BranchQuery } from '../../graphql/queries/BranchQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
async function getChannelByNameForAppAsync({ async function getChannelByNameForAppAsync({
appId, appId,
+10 -10
View File
@@ -1,18 +1,18 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
GetAllChannelsForAppQuery, GetAllChannelsForAppQuery,
GetAllChannelsForAppQueryVariables, GetAllChannelsForAppQueryVariables,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { logChannelDetails } from './view'; import { logChannelDetails } from './view.js';
const CHANNEL_LIMIT = 10_000; const CHANNEL_LIMIT = 10_000;
@@ -1,21 +1,21 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { GetChannelByNameForAppQuery, UpdateBranch } from '../../graphql/generated'; import { GetChannelByNameForAppQuery, UpdateBranch } from '../../graphql/generated.js';
import { BranchQuery } from '../../graphql/queries/BranchQuery'; import { BranchQuery } from '../../graphql/queries/BranchQuery.js';
import { ChannelQuery } from '../../graphql/queries/ChannelQuery'; import { ChannelQuery } from '../../graphql/queries/ChannelQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync, selectAsync } from '../../prompts'; import { promptAsync, selectAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { updateChannelBranchMappingAsync } from './edit'; import { updateChannelBranchMappingAsync } from './edit.js';
import { BranchMapping, getBranchMapping } from './view'; import { BranchMapping, getBranchMapping } from './view.js';
async function promptForRolloutPercentAsync({ async function promptForRolloutPercentAsync({
promptMessage, promptMessage,
@@ -3,20 +3,20 @@ import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import Table from 'cli-table3'; import Table from 'cli-table3';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { ChannelQuery } from '../../graphql/queries/ChannelQuery'; import { ChannelQuery } from '../../graphql/queries/ChannelQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { import {
FormatUpdateParameter, FormatUpdateParameter,
UPDATE_COLUMNS, UPDATE_COLUMNS,
formatUpdate, formatUpdate,
getPlatformsForGroup, getPlatformsForGroup,
} from '../../update/utils'; } from '../../update/utils.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export type BranchMapping = { export type BranchMapping = {
version: number; version: number;
+7 -7
View File
@@ -4,13 +4,13 @@ import { EasJsonReader } from '@expo/eas-json';
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../commandUtils/EasCommand'; import EasCommand from '../commandUtils/EasCommand.js';
import { toAppPlatform } from '../graphql/types/AppPlatform'; import { toAppPlatform } from '../graphql/types/AppPlatform.js';
import Log from '../log'; import Log from '../log.js';
import { appPlatformEmojis } from '../platform'; import { appPlatformEmojis } from '../platform.js';
import { getExpoConfig } from '../project/expoConfig'; import { getExpoConfig } from '../project/expoConfig.js';
import { findProjectRootAsync } from '../project/projectUtils'; import { findProjectRootAsync } from '../project/projectUtils.js';
import { selectAsync } from '../prompts'; import { selectAsync } from '../prompts.js';
export default class Config extends EasCommand { export default class Config extends EasCommand {
static description = 'display project configuration (app.json + eas.json)'; static description = 'display project configuration (app.json + eas.json)';
+2 -2
View File
@@ -1,5 +1,5 @@
import EasCommand from '../commandUtils/EasCommand'; import EasCommand from '../commandUtils/EasCommand.js';
import { SelectPlatform } from '../credentials/manager/SelectPlatform'; import { SelectPlatform } from '../credentials/manager/SelectPlatform.js';
export default class Credentials extends EasCommand { export default class Credentials extends EasCommand {
static description = 'manage credentials'; static description = 'manage credentials';
@@ -1,8 +1,8 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import AppStoreApi from '../../credentials/ios/appstore/AppStoreApi'; import AppStoreApi from '../../credentials/ios/appstore/AppStoreApi.js';
import { createContextAsync } from '../../devices/context'; import { createContextAsync } from '../../devices/context.js';
import DeviceManager from '../../devices/manager'; import DeviceManager from '../../devices/manager.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
export default class DeviceCreate extends EasCommand { export default class DeviceCreate extends EasCommand {
static description = 'register new Apple Devices to use for internal distribution'; static description = 'register new Apple Devices to use for internal distribution';
+19 -14
View File
@@ -1,24 +1,29 @@
import { Device, DeviceStatus } from '@expo/apple-utils'; import AppleUtils from '@expo/apple-utils';
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import assert from 'assert'; import assert from 'assert';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { chooseDevicesToDeleteAsync } from '../../credentials/ios/actions/DeviceUtils'; import { chooseDevicesToDeleteAsync } from '../../credentials/ios/actions/DeviceUtils.js';
import { AppleDeviceMutation } from '../../credentials/ios/api/graphql/mutations/AppleDeviceMutation'; import { AppleDeviceMutation } from '../../credentials/ios/api/graphql/mutations/AppleDeviceMutation.js';
import { import {
AppleDeviceQuery, AppleDeviceQuery,
AppleDeviceQueryResult, AppleDeviceQueryResult,
AppleDevicesByTeamIdentifierQueryResult, AppleDevicesByTeamIdentifierQueryResult,
} from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js';
import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery'; import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery.js';
import { authenticateAsync, getRequestContext } from '../../credentials/ios/appstore/authenticate'; import {
import formatDevice from '../../devices/utils/formatDevice'; authenticateAsync,
import { AppleDevice, Maybe } from '../../graphql/generated'; getRequestContext,
import Log from '../../log'; } from '../../credentials/ios/appstore/authenticate.js';
import { ora } from '../../ora'; import formatDevice from '../../devices/utils/formatDevice.js';
import { getExpoConfig } from '../../project/expoConfig'; import { AppleDevice, Maybe } from '../../graphql/generated.js';
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; import Log from '../../log.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts.js';
const { Device, DeviceStatus } = AppleUtils;
export default class DeviceDelete extends EasCommand { export default class DeviceDelete extends EasCommand {
static description = 'remove a registered device from your account'; static description = 'remove a registered device from your account';
+9 -9
View File
@@ -2,15 +2,15 @@ import { Flags } from '@oclif/core';
import assert from 'assert'; import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js';
import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery'; import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery.js';
import formatDevice from '../../devices/utils/formatDevice'; import formatDevice from '../../devices/utils/formatDevice.js';
import Log from '../../log'; import Log from '../../log.js';
import { Ora, ora } from '../../ora'; import { Ora, ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
export default class BuildList extends EasCommand { export default class BuildList extends EasCommand {
static description = 'list all registered devices for your account'; static description = 'list all registered devices for your account';
+7 -7
View File
@@ -1,10 +1,10 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js';
import formatDevice from '../../devices/utils/formatDevice'; import formatDevice from '../../devices/utils/formatDevice.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils.js';
export default class DeviceView extends EasCommand { export default class DeviceView extends EasCommand {
static description = 'view a device for your project'; static description = 'view a device for your project';
+5 -5
View File
@@ -1,11 +1,11 @@
import { Platform } from '@expo/eas-build-job'; import { Platform } from '@expo/eas-build-job';
import envinfo from 'envinfo'; import envinfo from 'envinfo';
import EasCommand from '../commandUtils/EasCommand'; import EasCommand from '../commandUtils/EasCommand.js';
import Log from '../log'; import Log from '../log.js';
import { findProjectRootAsync } from '../project/projectUtils'; import { findProjectRootAsync } from '../project/projectUtils.js';
import { resolveWorkflowAsync } from '../project/workflow'; import { resolveWorkflowAsync } from '../project/workflow.js';
import { easCliVersion } from '../utils/easCli'; import { easCliVersion } from '../utils/easCli.js';
export default class Diagnostics extends EasCommand { export default class Diagnostics extends EasCommand {
static description = 'display environment info'; static description = 'display environment info';
@@ -3,15 +3,15 @@ import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import path from 'path'; import path from 'path';
import { ensureProjectConfiguredAsync } from '../../build/configure'; import { ensureProjectConfiguredAsync } from '../../build/configure.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { CredentialsContext } from '../../credentials/context'; import { CredentialsContext } from '../../credentials/context.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { createMetadataContextAsync } from '../../metadata/context'; import { createMetadataContextAsync } from '../../metadata/context.js';
import { downloadMetadataAsync } from '../../metadata/download'; import { downloadMetadataAsync } from '../../metadata/download.js';
import { handleMetadataError } from '../../metadata/errors'; import { handleMetadataError } from '../../metadata/errors.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
export default class MetadataPull extends EasCommand { export default class MetadataPull extends EasCommand {
static description = 'generate the local store configuration from the app stores'; static description = 'generate the local store configuration from the app stores';
@@ -1,15 +1,15 @@
import { getConfig } from '@expo/config'; import { getConfig } from '@expo/config';
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import { ensureProjectConfiguredAsync } from '../../build/configure'; import { ensureProjectConfiguredAsync } from '../../build/configure.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { CredentialsContext } from '../../credentials/context'; import { CredentialsContext } from '../../credentials/context.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { createMetadataContextAsync } from '../../metadata/context'; import { createMetadataContextAsync } from '../../metadata/context.js';
import { handleMetadataError } from '../../metadata/errors'; import { handleMetadataError } from '../../metadata/errors.js';
import { uploadMetadataAsync } from '../../metadata/upload'; import { uploadMetadataAsync } from '../../metadata/upload.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
export default class MetadataPush extends EasCommand { export default class MetadataPush extends EasCommand {
static description = 'sync the local store configuration to the app stores'; static description = 'sync the local store configuration to the app stores';
@@ -1,12 +1,12 @@
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { AppInfoQuery, AppInfoQueryVariables } from '../../graphql/generated'; import { AppInfoQuery, AppInfoQueryVariables } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
async function projectInfoByIdAsync(appId: string): Promise<AppInfoQuery> { async function projectInfoByIdAsync(appId: string): Promise<AppInfoQuery> {
const data = await withErrorHandlingAsync( const data = await withErrorHandlingAsync(
@@ -1,9 +1,9 @@
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, setProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, setProjectIdAsync } from '../../project/projectUtils.js';
export default class ProjectInit extends EasCommand { export default class ProjectInit extends EasCommand {
static description = 'create or link an EAS project'; static description = 'create or link an EAS project';
+10 -10
View File
@@ -1,23 +1,23 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation'; import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation.js';
import { import {
EnvironmentSecretScope, EnvironmentSecretScope,
EnvironmentSecretsQuery, EnvironmentSecretsQuery,
} from '../../graphql/queries/EnvironmentSecretsQuery'; } from '../../graphql/queries/EnvironmentSecretsQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectAccountNameAsync, getProjectAccountNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { findAccountByName } from '../../user/Account'; import { findAccountByName } from '../../user/Account.js';
import { getActorDisplayName } from '../../user/User'; import { getActorDisplayName } from '../../user/User.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
export default class EnvironmentSecretCreate extends EasCommand { export default class EnvironmentSecretCreate extends EasCommand {
static description = 'create an environment secret on the current project or owner account'; static description = 'create an environment secret on the current project or owner account';
@@ -1,20 +1,20 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation'; import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation.js';
import { import {
EnvironmentSecretScope, EnvironmentSecretScope,
EnvironmentSecretWithScope, EnvironmentSecretWithScope,
EnvironmentSecretsQuery, EnvironmentSecretsQuery,
} from '../../graphql/queries/EnvironmentSecretsQuery'; } from '../../graphql/queries/EnvironmentSecretsQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectAccountNameAsync, getProjectAccountNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts'; import { promptAsync, toggleConfirmAsync } from '../../prompts.js';
export default class EnvironmentSecretDelete extends EasCommand { export default class EnvironmentSecretDelete extends EasCommand {
static description = 'delete an environment secret by ID'; static description = 'delete an environment secret by ID';
+5 -5
View File
@@ -2,15 +2,15 @@ import chalk from 'chalk';
import Table from 'cli-table3'; import Table from 'cli-table3';
import dateFormat from 'dateformat'; import dateFormat from 'dateformat';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { EnvironmentSecretsQuery } from '../../graphql/queries/EnvironmentSecretsQuery'; import { EnvironmentSecretsQuery } from '../../graphql/queries/EnvironmentSecretsQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectAccountNameAsync, getProjectAccountNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
export default class EnvironmentSecretList extends EasCommand { export default class EnvironmentSecretList extends EasCommand {
static description = 'list environment secrets available for your current app'; static description = 'list environment secrets available for your current app';
+11 -11
View File
@@ -2,23 +2,23 @@ import { EasJsonReader } from '@expo/eas-json';
import { Errors, Flags } from '@oclif/core'; import { Errors, Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../commandUtils/EasCommand'; import EasCommand from '../commandUtils/EasCommand.js';
import { SubmissionFragment } from '../graphql/generated'; import { SubmissionFragment } from '../graphql/generated.js';
import { toAppPlatform } from '../graphql/types/AppPlatform'; import { toAppPlatform } from '../graphql/types/AppPlatform.js';
import Log from '../log'; import Log from '../log.js';
import { import {
RequestedPlatform, RequestedPlatform,
appPlatformDisplayNames, appPlatformDisplayNames,
appPlatformEmojis, appPlatformEmojis,
selectRequestedPlatformAsync, selectRequestedPlatformAsync,
toPlatforms, toPlatforms,
} from '../platform'; } from '../platform.js';
import { getExpoConfig } from '../project/expoConfig'; import { getExpoConfig } from '../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../project/projectUtils.js';
import { SubmitArchiveFlags, createSubmissionContextAsync } from '../submit/context'; import { SubmitArchiveFlags, createSubmissionContextAsync } from '../submit/context.js';
import { submitAsync, waitToCompleteAsync } from '../submit/submit'; import { submitAsync, waitToCompleteAsync } from '../submit/submit.js';
import { printSubmissionDetailsUrls } from '../submit/utils/urls'; import { printSubmissionDetailsUrls } from '../submit/utils/urls.js';
import { getProfilesAsync } from '../utils/profiles'; import { getProfilesAsync } from '../utils/profiles.js';
interface RawCommandFlags { interface RawCommandFlags {
platform?: string; platform?: string;
@@ -4,21 +4,21 @@ import { Flags } from '@oclif/core';
import assert from 'assert'; import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import { getEASUpdateURL } from '../../api'; import { getEASUpdateURL } from '../../api.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { AppPlatform } from '../../graphql/generated'; import { AppPlatform } from '../../graphql/generated.js';
import Log, { learnMore } from '../../log'; import Log, { learnMore } from '../../log.js';
import { RequestedPlatform, appPlatformDisplayNames } from '../../platform'; import { RequestedPlatform, appPlatformDisplayNames } from '../../platform.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectIdAsync, getProjectIdAsync,
installExpoUpdatesAsync, installExpoUpdatesAsync,
isExpoUpdatesInstalledOrAvailable, isExpoUpdatesInstalledOrAvailable,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js';
import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js';
const DEFAULT_MANAGED_RUNTIME_VERSION = { policy: 'sdkVersion' } as const; const DEFAULT_MANAGED_RUNTIME_VERSION = { policy: 'sdkVersion' } as const;
const DEFAULT_BARE_RUNTIME_VERSION = '1.0.0' as const; const DEFAULT_BARE_RUNTIME_VERSION = '1.0.0' as const;
@@ -1,16 +1,16 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
DeleteUpdateGroupMutation, DeleteUpdateGroupMutation,
UpdateMutationDeleteUpdateGroupArgs, UpdateMutationDeleteUpdateGroupArgs,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { confirmAsync } from '../../prompts'; import { confirmAsync } from '../../prompts.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
async function deleteUpdateGroupAsync({ async function deleteUpdateGroupAsync({
group, group,
+30 -28
View File
@@ -1,18 +1,17 @@
import { ExpoConfig } from '@expo/config'; import { ExpoConfig } from '@expo/config';
import { Updates } from '@expo/config-plugins'; import ConfigPlugins from '@expo/config-plugins';
import { Platform, Workflow } from '@expo/eas-build-job'; import { Platform, Workflow } from '@expo/eas-build-job';
import { Errors, Flags } from '@oclif/core'; import { Errors, Flags } from '@oclif/core';
import assert from 'assert'; import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import dateFormat from 'dateformat'; import dateFormat from 'dateformat';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import nullthrows from 'nullthrows';
import { getEASUpdateURL } from '../../api'; import { getEASUpdateURL } from '../../api.js';
import { getUpdateGroupUrl } from '../../build/utils/url'; import { getUpdateGroupUrl } from '../../build/utils/url.js';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import fetch from '../../fetch'; import fetch from '../../fetch.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { import {
GetUpdateGroupAsyncQuery, GetUpdateGroupAsyncQuery,
PublishUpdateGroupInput, PublishUpdateGroupInput,
@@ -23,43 +22,46 @@ import {
UpdatePublishMutation, UpdatePublishMutation,
User, User,
ViewBranchUpdatesQuery, ViewBranchUpdatesQuery,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import { PublishMutation } from '../../graphql/mutations/PublishMutation'; import { PublishMutation } from '../../graphql/mutations/PublishMutation.js';
import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js';
import Log, { link } from '../../log'; import Log, { link } from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectAccountName, getProjectAccountName,
getProjectIdAsync, getProjectIdAsync,
installExpoUpdatesAsync, installExpoUpdatesAsync,
isExpoUpdatesInstalledOrAvailable, isExpoUpdatesInstalledOrAvailable,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { import {
PublishPlatform, PublishPlatform,
buildBundlesAsync, buildBundlesAsync,
buildUnsortedUpdateInfoGroupAsync, buildUnsortedUpdateInfoGroupAsync,
collectAssetsAsync, collectAssetsAsync,
uploadAssetsAsync, uploadAssetsAsync,
} from '../../project/publish'; } from '../../project/publish.js';
import { resolveWorkflowAsync } from '../../project/workflow'; import { resolveWorkflowAsync } from '../../project/workflow.js';
import { confirmAsync, promptAsync, selectAsync } from '../../prompts'; import { confirmAsync, promptAsync, selectAsync } from '../../prompts.js';
import { formatUpdate } from '../../update/utils'; import { formatUpdate } from '../../update/utils.js';
import { ensureLoggedInAsync } from '../../user/actions'; import { ensureLoggedInAsync } from '../../user/actions.js';
import { import {
checkManifestBodyAgainstUpdateInfoGroup, checkManifestBodyAgainstUpdateInfoGroup,
getCodeSigningInfoAsync, getCodeSigningInfoAsync,
getManifestBodyAsync, getManifestBodyAsync,
signManifestBody, signManifestBody,
} from '../../utils/code-signing'; } from '../../utils/code-signing.js';
import uniqBy from '../../utils/expodash/uniqBy'; import uniqBy from '../../utils/expodash/uniqBy.js';
import formatFields from '../../utils/formatFields'; import formatFields from '../../utils/formatFields.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { getVcsClient } from '../../vcs'; import { nullthrows } from '../../utils/nullthrows.js';
import { createUpdateBranchOnAppAsync } from '../branch/create'; import { getVcsClient } from '../../vcs/index.js';
import { listBranchesAsync } from '../branch/list'; import { createUpdateBranchOnAppAsync } from '../branch/create.js';
import { createUpdateChannelOnAppAsync } from '../channel/create'; import { listBranchesAsync } from '../branch/list.js';
import { createUpdateChannelOnAppAsync } from '../channel/create.js';
const { Updates } = ConfigPlugins;
export const defaultPublishPlatforms: PublishPlatform[] = ['android', 'ios']; export const defaultPublishPlatforms: PublishPlatform[] = ['android', 'ios'];
export type PublishPlatformFlag = PublishPlatform | 'all'; export type PublishPlatformFlag = PublishPlatform | 'all';
+11 -11
View File
@@ -3,17 +3,17 @@ import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import CliTable from 'cli-table3'; import CliTable from 'cli-table3';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { ViewAllUpdatesQuery } from '../../graphql/generated'; import { ViewAllUpdatesQuery } from '../../graphql/generated.js';
import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { promptAsync } from '../../prompts'; import { promptAsync } from '../../prompts.js';
import { FormatUpdateParameter, UPDATE_COLUMNS, formatUpdate } from '../../update/utils'; import { FormatUpdateParameter, UPDATE_COLUMNS, formatUpdate } from '../../update/utils.js';
import groupBy from '../../utils/expodash/groupBy'; import groupBy from '../../utils/expodash/groupBy.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
import { getVcsClient } from '../../vcs'; import { getVcsClient } from '../../vcs/index.js';
type UpdateGroupDescription = FormatUpdateParameter & { type UpdateGroupDescription = FormatUpdateParameter & {
branch: string; branch: string;
+7 -7
View File
@@ -1,13 +1,13 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import Table from 'cli-table3'; import Table from 'cli-table3';
import gql from 'graphql-tag'; import { gql } from 'graphql-tag';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js';
import { UpdatesByGroupQuery, UpdatesByGroupQueryVariables } from '../../graphql/generated'; import { UpdatesByGroupQuery, UpdatesByGroupQueryVariables } from '../../graphql/generated.js';
import Log from '../../log'; import Log from '../../log.js';
import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js';
export async function viewUpdateAsync({ export async function viewUpdateAsync({
groupId, groupId,
@@ -1,12 +1,12 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { WebhookType } from '../../graphql/generated'; import { WebhookType } from '../../graphql/generated.js';
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { prepareInputParamsAsync } from '../../webhooks/input'; import { prepareInputParamsAsync } from '../../webhooks/input.js';
export default class WebhookCreate extends EasCommand { export default class WebhookCreate extends EasCommand {
static description = 'create a webhook'; static description = 'create a webhook';
+11 -11
View File
@@ -1,17 +1,17 @@
import assert from 'assert'; import assert from 'assert';
import chalk from 'chalk'; import chalk from 'chalk';
import nullthrows from 'nullthrows';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { WebhookFragment } from '../../graphql/generated'; import { WebhookFragment } from '../../graphql/generated.js';
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js';
import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js';
import { promptAsync, toggleConfirmAsync } from '../../prompts'; import { promptAsync, toggleConfirmAsync } from '../../prompts.js';
import { formatWebhook } from '../../webhooks/formatWebhook'; import { nullthrows } from '../../utils/nullthrows.js';
import { formatWebhook } from '../../webhooks/formatWebhook.js';
export default class WebhookDelete extends EasCommand { export default class WebhookDelete extends EasCommand {
static description = 'delete a webhook'; static description = 'delete a webhook';
@@ -1,18 +1,18 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import chalk from 'chalk'; import chalk from 'chalk';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { WebhookType } from '../../graphql/generated'; import { WebhookType } from '../../graphql/generated.js';
import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { getExpoConfig } from '../../project/expoConfig'; import { getExpoConfig } from '../../project/expoConfig.js';
import { import {
findProjectRootAsync, findProjectRootAsync,
getProjectFullNameAsync, getProjectFullNameAsync,
getProjectIdAsync, getProjectIdAsync,
} from '../../project/projectUtils'; } from '../../project/projectUtils.js';
import { formatWebhook } from '../../webhooks/formatWebhook'; import { formatWebhook } from '../../webhooks/formatWebhook.js';
export default class WebhookList extends EasCommand { export default class WebhookList extends EasCommand {
static description = 'list webhooks'; static description = 'list webhooks';
@@ -1,12 +1,12 @@
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { WebhookType } from '../../graphql/generated'; import { WebhookType } from '../../graphql/generated.js';
import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js';
import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import pick from '../../utils/expodash/pick'; import pick from '../../utils/expodash/pick.js';
import { prepareInputParamsAsync } from '../../webhooks/input'; import { prepareInputParamsAsync } from '../../webhooks/input.js';
export default class WebhookUpdate extends EasCommand { export default class WebhookUpdate extends EasCommand {
static description = 'update a webhook'; static description = 'update a webhook';
@@ -1,8 +1,8 @@
import EasCommand from '../../commandUtils/EasCommand'; import EasCommand from '../../commandUtils/EasCommand.js';
import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js';
import Log from '../../log'; import Log from '../../log.js';
import { ora } from '../../ora'; import { ora } from '../../ora.js';
import { formatWebhook } from '../../webhooks/formatWebhook'; import { formatWebhook } from '../../webhooks/formatWebhook.js';
export default class WebhookView extends EasCommand { export default class WebhookView extends EasCommand {
static description = 'view a webhook'; static description = 'view a webhook';
@@ -7,15 +7,15 @@ import {
AppFragment, AppFragment,
CommonAndroidAppCredentialsFragment, CommonAndroidAppCredentialsFragment,
GoogleServiceAccountKeyFragment, GoogleServiceAccountKeyFragment,
} from '../../graphql/generated'; } from '../../graphql/generated.js';
import * as AndroidGraphqlClient from '../android/api/GraphqlClient'; import * as AndroidGraphqlClient from '../android/api/GraphqlClient.js';
import { Keystore } from '../android/credentials'; import { Keystore } from '../android/credentials.js';
import { import {
testKeystore2Base64, testKeystore2Base64,
testKeystoreBase64, testKeystoreBase64,
testPKCS12KeystoreBase64, testPKCS12KeystoreBase64,
testPKCS12KeystoreEmptyPasswordBase64, testPKCS12KeystoreEmptyPasswordBase64,
} from './fixtures-base64-data'; } from './fixtures-base64-data.js';
const now = new Date(); const now = new Date();
Loaded 100 of 484 files, more files were not shown because too many files have changed in this diff. Show more