diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/.gitignore b/.gitignore index 1dc4252e0c..ea954d9767 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ node_modules # Tests coverage + +# Copies of script for testing ESM imports +packages/*/scripts/testESMImports.ts diff --git a/jest.config.cjs b/jest.config.cjs new file mode 100644 index 0000000000..4c1b5bde03 --- /dev/null +++ b/jest.config.cjs @@ -0,0 +1,7 @@ +module.exports = { + projects: [ + require('./packages/eas-cli/jest.config.cjs'), + require('./packages/eas-json/jest.config.cjs'), + ], + testPathIgnorePatterns: ['.*'], +}; diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 50fc1a7909..0000000000 --- a/jest.config.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - projects: [ - require('./packages/eas-cli/jest.config.js'), - require('./packages/eas-json/jest.config.js'), - ], - testPathIgnorePatterns: ['.*'], -}; diff --git a/jest/jest.config.js b/jest/jest.config.cjs similarity index 60% rename from jest/jest.config.js rename to jest/jest.config.cjs index b4c47dd91d..10b22d524e 100644 --- a/jest/jest.config.js +++ b/jest/jest.config.cjs @@ -1,7 +1,15 @@ module.exports = { - preset: 'ts-jest', + preset: 'ts-jest/presets/default-esm', testEnvironment: 'node', testRegex: '/__tests__/.*(test|spec)\\.[jt]sx?$', watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], collectCoverageFrom: ['/src/**/*.{ts,tsx,js,jsx}'], + globals: { + 'ts-jest': { + useESM: true, + }, + }, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, }; diff --git a/package.json b/package.json index ec60c386be..3b39fcf7e6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "workspaces": [ "packages/*" ], @@ -13,8 +14,9 @@ "eas": "packages/eas-cli/bin/run", "lint": "eslint .", "release": "./scripts/bin/run update-local-plugin && lerna version --exact", - "test": "jest", - "clean": "lerna run clean && rm -rf node_modules coverage" + "test": "NODE_OPTIONS=--experimental-vm-modules jest", + "clean": "lerna run clean && rm -rf node_modules coverage", + "test-esm-imports": "lerna run test-esm-imports" }, "devDependencies": { "@types/jest": "27.5.0", diff --git a/packages/eas-cli/.eslintrc.js b/packages/eas-cli/.eslintrc.cjs similarity index 94% rename from packages/eas-cli/.eslintrc.js rename to packages/eas-cli/.eslintrc.cjs index cd0c23faa5..a49d5bb5a1 100644 --- a/packages/eas-cli/.eslintrc.js +++ b/packages/eas-cli/.eslintrc.cjs @@ -1,4 +1,4 @@ -const rootEslintrc = require('../../.eslintrc.js'); +const rootEslintrc = require('../../.eslintrc.cjs'); module.exports = { rules: { diff --git a/packages/eas-cli/bin/run b/packages/eas-cli/bin/run deleted file mode 100755 index e0a1f504d7..0000000000 --- a/packages/eas-cli/bin/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node - -require('@oclif/core') - .run() - .then(require('@oclif/core/flush')) - .catch(require('@oclif/core/handle')); diff --git a/packages/eas-cli/bin/run.js b/packages/eas-cli/bin/run.js new file mode 100755 index 0000000000..7d183d9c50 --- /dev/null +++ b/packages/eas-cli/bin/run.js @@ -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); diff --git a/packages/eas-cli/jest.config.js b/packages/eas-cli/jest.config.cjs similarity index 79% rename from packages/eas-cli/jest.config.js rename to packages/eas-cli/jest.config.cjs index 4b4be0c541..fa174932b8 100644 --- a/packages/eas-cli/jest.config.js +++ b/packages/eas-cli/jest.config.cjs @@ -1,5 +1,5 @@ module.exports = { - ...require('../../jest/jest.config.js'), + ...require('../../jest/jest.config.cjs'), rootDir: __dirname, roots: ['src', '__mocks__'], globalSetup: './jest/global-setup.ts', diff --git a/packages/eas-cli/jest/setup-after-env.ts b/packages/eas-cli/jest/setup-after-env.ts index 39280437a8..bc82729f13 100644 --- a/packages/eas-cli/jest/setup-after-env.ts +++ b/packages/eas-cli/jest/setup-after-env.ts @@ -1,3 +1,5 @@ +import { jest } from '@jest/globals'; + /* eslint-disable no-console */ beforeAll(() => { console.log = jest.fn(); diff --git a/packages/eas-cli/package.json b/packages/eas-cli/package.json index 195e6aeaab..7f67d3023d 100644 --- a/packages/eas-cli/package.json +++ b/packages/eas-cli/package.json @@ -1,5 +1,6 @@ { "name": "eas-cli", + "type": "module", "description": "EAS command line tool", "version": "0.54.1", "author": "Expo ", @@ -27,7 +28,7 @@ "@expo/rudder-sdk-node": "1.1.1", "@expo/spawn-async": "1.6.0", "@expo/timeago.js": "1.0.0", - "@oclif/core": "1.9.0", + "@oclif/core": "1.9.5", "@urql/core": "2.4.4", "@urql/exchange-retry": "0.3.3", "ajv": "^6.12.6", @@ -81,6 +82,7 @@ "@graphql-codegen/introspection": "2.1.1", "@graphql-codegen/typescript": "2.4.11", "@graphql-codegen/typescript-operations": "2.4.0", + "@jest/globals": "28.1.2", "@types/cli-progress": "3.9.2", "@types/dateformat": "3.0.1", "@types/envinfo": "7.8.1", @@ -98,15 +100,17 @@ "axios": "0.27.2", "eslint-plugin-graphql": "4.0.0", "form-data": "4.0.0", + "globby": "13.1.2", "memfs": "3.4.3", "mockdate": "3.0.5", "nock": "13.2.4", "tempy": "0.7.0", "ts-deepmerge": "2.0.1", + "ts-node": "10.8.2", "typescript": "4.7.4" }, "engines": { - "node": ">=14.0.0" + "node": ">=14.16" }, "files": [ "/bin", @@ -196,9 +200,14 @@ "build": "tsc --project tsconfig.build.json", "watch": "yarn build --watch --preserveWatchOutput", "typecheck": "tsc", - "test": "jest", - "version": "yarn oclif readme && node scripts/patch-readme && git add README.md", + "test": "NODE_OPTIONS=--experimental-vm-modules jest", + "version": "yarn oclif readme && node scripts/patch-readme.cjs && git add README.md", "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" } } diff --git a/packages/eas-cli/scripts/patch-readme.js b/packages/eas-cli/scripts/patch-readme.cjs similarity index 100% rename from packages/eas-cli/scripts/patch-readme.js rename to packages/eas-cli/scripts/patch-readme.cjs diff --git a/packages/eas-cli/src/__tests__/api-test.ts b/packages/eas-cli/src/__tests__/api-test.ts index 797c6b5df5..fe52375783 100644 --- a/packages/eas-cli/src/__tests__/api-test.ts +++ b/packages/eas-cli/src/__tests__/api-test.ts @@ -1,7 +1,7 @@ import assert from 'assert'; import nock from 'nock'; -import { ApiV2Error, api, getExpoApiBaseUrl } from '../api'; +import { ApiV2Error, api, getExpoApiBaseUrl } from '../api.js'; describe('apiClient', () => { it('converts Expo APIv2 error to ApiV2Error', async () => { diff --git a/packages/eas-cli/src/__tests__/project-utils.ts b/packages/eas-cli/src/__tests__/project-utils.ts index af99804236..26aae3bc3a 100644 --- a/packages/eas-cli/src/__tests__/project-utils.ts +++ b/packages/eas-cli/src/__tests__/project-utils.ts @@ -1,4 +1,4 @@ -import { Actor } from '../user/User'; +import { Actor } from '../user/User.js'; interface MockProject { projectRoot: string; diff --git a/packages/eas-cli/src/__tests__/uploads-test.ts b/packages/eas-cli/src/__tests__/uploads-test.ts index f3d2bbfd71..102c20c80f 100644 --- a/packages/eas-cli/src/__tests__/uploads-test.ts +++ b/packages/eas-cli/src/__tests__/uploads-test.ts @@ -1,4 +1,4 @@ -import { fixArchiveUrl } from '../uploads'; +import { fixArchiveUrl } from '../uploads.js'; describe(fixArchiveUrl, () => { it('fixes broken links', () => { diff --git a/packages/eas-cli/src/analytics/common.ts b/packages/eas-cli/src/analytics/common.ts index 9d5dc3c6b4..69beff8a14 100644 --- a/packages/eas-cli/src/analytics/common.ts +++ b/packages/eas-cli/src/analytics/common.ts @@ -1,4 +1,4 @@ -import { Analytics, Event } from './events'; +import { Analytics, Event } from './events.js'; export type TrackingContext = Record; diff --git a/packages/eas-cli/src/analytics/events.ts b/packages/eas-cli/src/analytics/events.ts index d73e23dd6a..9d15d36b44 100644 --- a/packages/eas-cli/src/analytics/events.ts +++ b/packages/eas-cli/src/analytics/events.ts @@ -1,4 +1,4 @@ -import { logEvent } from './rudderstackClient'; +import { logEvent } from './rudderstackClient.js'; export type Event = BuildEvent | SubmissionEvent | MetadataEvent; export enum SubmissionEvent { diff --git a/packages/eas-cli/src/analytics/rudderstackClient.ts b/packages/eas-cli/src/analytics/rudderstackClient.ts index d87aa78b8d..1cdd1bdb24 100644 --- a/packages/eas-cli/src/analytics/rudderstackClient.ts +++ b/packages/eas-cli/src/analytics/rudderstackClient.ts @@ -1,10 +1,12 @@ -import RudderAnalytics from '@expo/rudder-sdk-node'; +import RudderAnalyticsModule from '@expo/rudder-sdk-node'; import os from 'os'; import { URL } from 'url'; import { v4 as uuidv4 } from 'uuid'; -import UserSettings from '../user/UserSettings'; -import { easCliVersion } from '../utils/easCli'; +import UserSettings from '../user/UserSettings.js'; +import { easCliVersion } from '../utils/easCli.js'; + +const RudderAnalytics = RudderAnalyticsModule.default; const PLATFORM_TO_ANALYTICS_PLATFORM: { [platform: string]: string } = { darwin: 'Mac', @@ -12,7 +14,7 @@ const PLATFORM_TO_ANALYTICS_PLATFORM: { [platform: string]: string } = { linux: 'Linux', }; -let rudderstackClient: RudderAnalytics | null = null; +let rudderstackClient: RudderAnalyticsModule.default | null = null; let userIdentified = false; let identifyData: { userId: string; diff --git a/packages/eas-cli/src/api.ts b/packages/eas-cli/src/api.ts index 61683e0be4..b2e33346b2 100644 --- a/packages/eas-cli/src/api.ts +++ b/packages/eas-cli/src/api.ts @@ -1,7 +1,7 @@ import { JSONValue } from '@expo/json-file'; -import fetch, { RequestError, RequestInit } from './fetch'; -import { getAccessToken, getSessionSecret } from './user/sessionStorage'; +import fetch, { RequestError, RequestInit } from './fetch.js'; +import { getAccessToken, getSessionSecret } from './user/sessionStorage.js'; export class ApiV2Error extends Error { readonly name = 'ApiV2Error'; diff --git a/packages/eas-cli/src/build/android/__tests__/version-test.ts b/packages/eas-cli/src/build/android/__tests__/version-test.ts index 1aaa03c96d..1a0d27f1ec 100644 --- a/packages/eas-cli/src/build/android/__tests__/version-test.ts +++ b/packages/eas-cli/src/build/android/__tests__/version-test.ts @@ -7,13 +7,16 @@ import { vol } from 'memfs'; import os from 'os'; import path from 'path'; -import { getAppBuildGradleAsync, resolveConfigValue } from '../../../project/android/gradleUtils'; +import { + getAppBuildGradleAsync, + resolveConfigValue, +} from '../../../project/android/gradleUtils.js'; import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync, maybeResolveVersionsAsync, -} from '../version'; +} from '../version.js'; const fsReal = jest.requireActual('fs').promises as typeof fs; jest.mock('fs'); diff --git a/packages/eas-cli/src/build/android/build.ts b/packages/eas-cli/src/build/android/build.ts index 9c6c9ce339..daa1b576cd 100644 --- a/packages/eas-cli/src/build/android/build.ts +++ b/packages/eas-cli/src/build/android/build.ts @@ -1,33 +1,33 @@ import { Android, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; import AndroidCredentialsProvider, { AndroidCredentials, -} from '../../credentials/android/AndroidCredentialsProvider'; -import { BuildParamsInput } from '../../graphql/generated'; -import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation'; -import Log from '../../log'; +} from '../../credentials/android/AndroidCredentialsProvider.js'; +import { BuildParamsInput } from '../../graphql/generated.js'; +import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation.js'; +import Log from '../../log.js'; import { ensureApplicationIdIsDefinedForManagedProjectAsync, getApplicationIdAsync, -} from '../../project/android/applicationId'; -import { resolveGradleBuildContextAsync } from '../../project/android/gradle'; -import { toggleConfirmAsync } from '../../prompts'; -import { findAccountByName } from '../../user/Account'; +} from '../../project/android/applicationId.js'; +import { resolveGradleBuildContextAsync } from '../../project/android/gradle.js'; +import { toggleConfirmAsync } from '../../prompts.js'; +import { findAccountByName } from '../../user/Account.js'; +import { nullthrows } from '../../utils/nullthrows.js'; import { BuildRequestSender, CredentialsResult, JobData, prepareBuildRequestForPlatformAsync, -} from '../build'; -import { AndroidBuildContext, BuildContext, CommonContext } from '../context'; -import { transformMetadata } from '../graphql'; -import { logCredentialsSource } from '../utils/credentials'; -import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate'; -import { transformJob } from './graphql'; -import { prepareJobAsync } from './prepareJob'; -import { syncProjectConfigurationAsync } from './syncProjectConfiguration'; +} from '../build.js'; +import { AndroidBuildContext, BuildContext, CommonContext } from '../context.js'; +import { transformMetadata } from '../graphql.js'; +import { logCredentialsSource } from '../utils/credentials.js'; +import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate.js'; +import { transformJob } from './graphql.js'; +import { prepareJobAsync } from './prepareJob.js'; +import { syncProjectConfigurationAsync } from './syncProjectConfiguration.js'; export async function createAndroidContextAsync( ctx: CommonContext diff --git a/packages/eas-cli/src/build/android/graphql.ts b/packages/eas-cli/src/build/android/graphql.ts index 4cd5bfae01..e0abcd2c8b 100644 --- a/packages/eas-cli/src/build/android/graphql.ts +++ b/packages/eas-cli/src/build/android/graphql.ts @@ -1,7 +1,7 @@ import { Android } from '@expo/eas-build-job'; -import { AndroidBuildType, AndroidJobInput } from '../../graphql/generated'; -import { transformProjectArchive, transformWorkflow } from '../graphql'; +import { AndroidBuildType, AndroidJobInput } from '../../graphql/generated.js'; +import { transformProjectArchive, transformWorkflow } from '../graphql.js'; export function transformJob(job: Android.Job): AndroidJobInput { return { diff --git a/packages/eas-cli/src/build/android/prepareJob.ts b/packages/eas-cli/src/build/android/prepareJob.ts index c3cec6e235..861e767f76 100644 --- a/packages/eas-cli/src/build/android/prepareJob.ts +++ b/packages/eas-cli/src/build/android/prepareJob.ts @@ -3,11 +3,11 @@ import { BuildProfile } from '@expo/eas-json'; import path from 'path'; import slash from 'slash'; -import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider'; -import { getUsername } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { getVcsClient } from '../../vcs'; -import { BuildContext } from '../context'; +import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider.js'; +import { getUsername } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { BuildContext } from '../context.js'; interface JobData { projectArchive: ArchiveSource; diff --git a/packages/eas-cli/src/build/android/syncProjectConfiguration.ts b/packages/eas-cli/src/build/android/syncProjectConfiguration.ts index a9e0c956be..117b20087b 100644 --- a/packages/eas-cli/src/build/android/syncProjectConfiguration.ts +++ b/packages/eas-cli/src/build/android/syncProjectConfiguration.ts @@ -1,16 +1,18 @@ 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 { AndroidVersionAutoIncrement, BuildProfile } from '@expo/eas-json'; import chalk from 'chalk'; import fs from 'fs-extra'; import path from 'path'; -import Log from '../../log'; -import { isExpoUpdatesInstalled } from '../../project/projectUtils'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { syncUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; -import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version'; +import Log from '../../log.js'; +import { isExpoUpdatesInstalled } from '../../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { syncUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js'; +import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version.js'; + +const { AndroidConfig } = ConfigPlugins; export async function syncProjectConfigurationAsync({ projectDir, diff --git a/packages/eas-cli/src/build/android/version.ts b/packages/eas-cli/src/build/android/version.ts index ef7e1991ac..7d9c946312 100644 --- a/packages/eas-cli/src/build/android/version.ts +++ b/packages/eas-cli/src/build/android/version.ts @@ -1,19 +1,21 @@ 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 { BuildProfile } from '@expo/eas-json'; import chalk from 'chalk'; import fs from 'fs-extra'; -import Log from '../../log'; +import Log from '../../log.js'; import { getAppBuildGradleAsync, parseGradleCommand, resolveConfigValue, -} from '../../project/android/gradleUtils'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { updateAppJsonConfigAsync } from '../utils/appJson'; -import { bumpAppVersionAsync, ensureStaticConfigExists } from '../utils/version'; +} from '../../project/android/gradleUtils.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { updateAppJsonConfigAsync } from '../utils/appJson.js'; +import { bumpAppVersionAsync, ensureStaticConfigExists } from '../utils/version.js'; + +const { AndroidConfig } = ConfigPlugins; export enum BumpStrategy { APP_VERSION, diff --git a/packages/eas-cli/src/build/build.ts b/packages/eas-cli/src/build/build.ts index 5d7cb10b77..7bc6cac742 100644 --- a/packages/eas-cli/src/build/build.ts +++ b/packages/eas-cli/src/build/build.ts @@ -3,11 +3,10 @@ import { CredentialsSource } from '@expo/eas-json'; import chalk from 'chalk'; import cliProgress from 'cli-progress'; import fs from 'fs-extra'; -import nullthrows from 'nullthrows'; -import { withAnalyticsAsync } from '../analytics/common'; -import { BuildEvent } from '../analytics/events'; -import { getExpoWebsiteBaseUrl } from '../api'; +import { withAnalyticsAsync } from '../analytics/common.js'; +import { BuildEvent } from '../analytics/events.js'; +import { getExpoWebsiteBaseUrl } from '../api.js'; import { AppPlatform, BuildFragment, @@ -15,26 +14,27 @@ import { BuildPriority, BuildStatus, UploadSessionType, -} from '../graphql/generated'; -import { BuildResult } from '../graphql/mutations/BuildMutation'; -import { BuildQuery } from '../graphql/queries/BuildQuery'; -import Log, { learnMore } from '../log'; -import { Ora, ora } from '../ora'; +} from '../graphql/generated.js'; +import { BuildResult } from '../graphql/mutations/BuildMutation.js'; +import { BuildQuery } from '../graphql/queries/BuildQuery.js'; +import Log, { learnMore } from '../log.js'; +import { Ora, ora } from '../ora.js'; import { appPlatformDisplayNames, appPlatformEmojis, requestedPlatformDisplayNames, -} from '../platform'; -import { uploadAsync } from '../uploads'; -import { formatBytes } from '../utils/files'; -import { createProgressTracker } from '../utils/progress'; -import { sleepAsync } from '../utils/promise'; -import { getVcsClient } from '../vcs'; -import { BuildContext } from './context'; -import { runLocalBuildAsync } from './local'; -import { collectMetadataAsync } from './metadata'; -import { printDeprecationWarnings } from './utils/printBuildInfo'; -import { makeProjectTarballAsync, reviewAndCommitChangesAsync } from './utils/repository'; +} from '../platform.js'; +import { uploadAsync } from '../uploads.js'; +import { formatBytes } from '../utils/files.js'; +import { nullthrows } from '../utils/nullthrows.js'; +import { createProgressTracker } from '../utils/progress.js'; +import { sleepAsync } from '../utils/promise.js'; +import { getVcsClient } from '../vcs/index.js'; +import { BuildContext } from './context.js'; +import { runLocalBuildAsync } from './local.js'; +import { collectMetadataAsync } from './metadata.js'; +import { printDeprecationWarnings } from './utils/printBuildInfo.js'; +import { makeProjectTarballAsync, reviewAndCommitChangesAsync } from './utils/repository.js'; export interface CredentialsResult { source: CredentialsSource.LOCAL | CredentialsSource.REMOTE; diff --git a/packages/eas-cli/src/build/configure.ts b/packages/eas-cli/src/build/configure.ts index 3a954bf27c..4ac5875bfb 100644 --- a/packages/eas-cli/src/build/configure.ts +++ b/packages/eas-cli/src/build/configure.ts @@ -3,11 +3,11 @@ import { EasJson, EasJsonReader } from '@expo/eas-json'; import chalk from 'chalk'; import fs from 'fs-extra'; -import Log from '../log'; -import { resolveWorkflowAsync } from '../project/workflow'; -import { easCliVersion } from '../utils/easCli'; -import { getVcsClient } from '../vcs'; -import { maybeBailOnRepoStatusAsync, reviewAndCommitChangesAsync } from './utils/repository'; +import Log from '../log.js'; +import { resolveWorkflowAsync } from '../project/workflow.js'; +import { easCliVersion } from '../utils/easCli.js'; +import { getVcsClient } from '../vcs/index.js'; +import { maybeBailOnRepoStatusAsync, reviewAndCommitChangesAsync } from './utils/repository.js'; interface ConfigureParams { projectDir: string; diff --git a/packages/eas-cli/src/build/context.ts b/packages/eas-cli/src/build/context.ts index 1cd7fd806f..da9831d358 100644 --- a/packages/eas-cli/src/build/context.ts +++ b/packages/eas-cli/src/build/context.ts @@ -3,14 +3,14 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; import type { XCBuildConfiguration } from 'xcode'; -import { TrackingContext } from '../analytics/common'; -import { CredentialsContext } from '../credentials/context'; -import { Target } from '../credentials/ios/types'; -import { BuildResourceClass } from '../graphql/generated'; -import { GradleBuildContext } from '../project/android/gradle'; -import { XcodeBuildContext } from '../project/ios/scheme'; -import { Actor } from '../user/User'; -import { LocalBuildOptions } from './local'; +import { TrackingContext } from '../analytics/common.js'; +import { CredentialsContext } from '../credentials/context.js'; +import { Target } from '../credentials/ios/types.js'; +import { BuildResourceClass } from '../graphql/generated.js'; +import { GradleBuildContext } from '../project/android/gradle.js'; +import { XcodeBuildContext } from '../project/ios/scheme.js'; +import { Actor } from '../user/User.js'; +import { LocalBuildOptions } from './local.js'; export type CommonContext = Omit, 'android' | 'ios'>; diff --git a/packages/eas-cli/src/build/createContext.ts b/packages/eas-cli/src/build/createContext.ts index 6470d229da..cba8c5c58a 100644 --- a/packages/eas-cli/src/build/createContext.ts +++ b/packages/eas-cli/src/build/createContext.ts @@ -1,22 +1,24 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import resolveFrom from 'resolve-from'; import { v4 as uuidv4 } from 'uuid'; -import { TrackingContext } from '../analytics/common'; -import { Analytics, BuildEvent } from '../analytics/events'; -import { CredentialsContext } from '../credentials/context'; -import { BuildResourceClass } from '../graphql/generated'; -import { getExpoConfig } from '../project/expoConfig'; -import { getProjectAccountName, getProjectIdAsync } from '../project/projectUtils'; -import { resolveWorkflowAsync } from '../project/workflow'; -import { findAccountByName } from '../user/Account'; -import { ensureLoggedInAsync } from '../user/actions'; -import { createAndroidContextAsync } from './android/build'; -import { BuildContext, CommonContext } from './context'; -import { createIosContextAsync } from './ios/build'; -import { LocalBuildOptions } from './local'; +import { TrackingContext } from '../analytics/common.js'; +import { Analytics, BuildEvent } from '../analytics/events.js'; +import { CredentialsContext } from '../credentials/context.js'; +import { BuildResourceClass } from '../graphql/generated.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { getProjectAccountName, getProjectIdAsync } from '../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../project/workflow.js'; +import { findAccountByName } from '../user/Account.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; +import { createAndroidContextAsync } from './android/build.js'; +import { BuildContext, CommonContext } from './context.js'; +import { createIosContextAsync } from './ios/build.js'; +import { LocalBuildOptions } from './local.js'; + +const JsonFile = JsonFileModule.default; export async function createBuildContextAsync({ buildProfileName, diff --git a/packages/eas-cli/src/build/graphql.ts b/packages/eas-cli/src/build/graphql.ts index 7aadbc3c2f..68627d260c 100644 --- a/packages/eas-cli/src/build/graphql.ts +++ b/packages/eas-cli/src/build/graphql.ts @@ -8,7 +8,7 @@ import { DistributionType, ProjectArchiveSourceInput, ProjectArchiveSourceType, -} from '../graphql/generated'; +} from '../graphql/generated.js'; export function transformProjectArchive(archiveSource: ArchiveSource): ProjectArchiveSourceInput { if (archiveSource.type === ArchiveSourceType.S3) { diff --git a/packages/eas-cli/src/build/ios/__tests__/version-test.ts b/packages/eas-cli/src/build/ios/__tests__/version-test.ts index 83420ec152..f9cbd83d8e 100644 --- a/packages/eas-cli/src/build/ios/__tests__/version-test.ts +++ b/packages/eas-cli/src/build/ios/__tests__/version-test.ts @@ -1,10 +1,10 @@ import { ExpoConfig } from '@expo/config'; -import { IOSConfig } from '@expo/config-plugins'; +import { InfoPlist } from '@expo/config-plugins'; import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { readPlistAsync } from '../../../utils/plist'; +import { readPlistAsync } from '../../../utils/plist.js'; import { BumpStrategy, bumpVersionAsync, @@ -13,7 +13,7 @@ import { getInfoPlistPath, readBuildNumberAsync, readShortVersionAsync, -} from '../version'; +} from '../version.js'; jest.mock('fs'); @@ -62,9 +62,7 @@ describe(bumpVersionAsync, () => { }); const appJSON = await fs.readJSON('/repo/app.json'); - const infoPlist = (await readPlistAsync( - '/repo/ios/myproject/Info.plist' - )) as IOSConfig.InfoPlist; + const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist; expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.ios?.buildNumber).toBe('2'); expect(appJSON.expo.version).toBe('1.0.0'); @@ -86,9 +84,7 @@ describe(bumpVersionAsync, () => { }); const appJSON = await fs.readJSON('/repo/app.json'); - const infoPlist = (await readPlistAsync( - '/repo/ios/myproject/Info2.plist' - )) as IOSConfig.InfoPlist; + const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info2.plist')) as InfoPlist; expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.ios?.buildNumber).toBe('2'); expect(appJSON.expo.version).toBe('1.0.0'); @@ -108,9 +104,7 @@ describe(bumpVersionAsync, () => { }); const appJSON = await fs.readJSON('/repo/app.json'); - const infoPlist = (await readPlistAsync( - '/repo/ios/myproject/Info.plist' - )) as IOSConfig.InfoPlist; + const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist; expect(fakeExp.version).toBe('1.0.1'); expect(fakeExp.ios?.buildNumber).toBe('1'); expect(appJSON.expo.version).toBe('1.0.1'); @@ -130,9 +124,7 @@ describe(bumpVersionAsync, () => { }); const appJSON = await fs.readJSON('/repo/app.json'); - const infoPlist = (await readPlistAsync( - '/repo/ios/myproject/Info.plist' - )) as IOSConfig.InfoPlist; + const infoPlist = (await readPlistAsync('/repo/ios/myproject/Info.plist')) as InfoPlist; expect(fakeExp.version).toBe('1.0.0'); expect(fakeExp.ios?.buildNumber).toBe('1'); expect(appJSON.expo.version).toBe('1.0.0'); diff --git a/packages/eas-cli/src/build/ios/build.ts b/packages/eas-cli/src/build/ios/build.ts index d8ca3dff38..fd3a9c0e2f 100644 --- a/packages/eas-cli/src/build/ios/build.ts +++ b/packages/eas-cli/src/build/ios/build.ts @@ -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 type { XCBuildConfiguration } from 'xcode'; -import { IosCredentials, Target } from '../../credentials/ios/types'; -import { BuildParamsInput } from '../../graphql/generated'; -import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation'; -import { ensureBundleIdentifierIsDefinedForManagedProjectAsync } from '../../project/ios/bundleIdentifier'; -import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme'; -import { findApplicationTarget, resolveTargetsAsync } from '../../project/ios/target'; -import { BuildRequestSender, JobData, prepareBuildRequestForPlatformAsync } from '../build'; -import { BuildContext, CommonContext, IosBuildContext } from '../context'; -import { transformMetadata } from '../graphql'; -import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate'; -import { ensureIosCredentialsAsync } from './credentials'; -import { transformJob } from './graphql'; -import { prepareJobAsync } from './prepareJob'; -import { syncProjectConfigurationAsync } from './syncProjectConfiguration'; +import { IosCredentials, Target } from '../../credentials/ios/types.js'; +import { BuildParamsInput } from '../../graphql/generated.js'; +import { BuildMutation, BuildResult } from '../../graphql/mutations/BuildMutation.js'; +import { ensureBundleIdentifierIsDefinedForManagedProjectAsync } from '../../project/ios/bundleIdentifier.js'; +import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme.js'; +import { findApplicationTarget, resolveTargetsAsync } from '../../project/ios/target.js'; +import { BuildRequestSender, JobData, prepareBuildRequestForPlatformAsync } from '../build.js'; +import { BuildContext, CommonContext, IosBuildContext } from '../context.js'; +import { transformMetadata } from '../graphql.js'; +import { checkGoogleServicesFileAsync, checkNodeEnvVariable } from '../validate.js'; +import { ensureIosCredentialsAsync } from './credentials.js'; +import { transformJob } from './graphql.js'; +import { prepareJobAsync } from './prepareJob.js'; +import { syncProjectConfigurationAsync } from './syncProjectConfiguration.js'; + +const { IOSConfig } = ConfigPlugins; export async function createIosContextAsync( ctx: CommonContext diff --git a/packages/eas-cli/src/build/ios/credentials.ts b/packages/eas-cli/src/build/ios/credentials.ts index 450df1b7f6..d05749d0b1 100644 --- a/packages/eas-cli/src/build/ios/credentials.ts +++ b/packages/eas-cli/src/build/ios/credentials.ts @@ -1,11 +1,11 @@ import { Platform } from '@expo/eas-build-job'; -import IosCredentialsProvider from '../../credentials/ios/IosCredentialsProvider'; -import { getAppFromContext } from '../../credentials/ios/actions/BuildCredentialsUtils'; -import { IosCredentials, Target } from '../../credentials/ios/types'; -import { CredentialsResult } from '../build'; -import { BuildContext } from '../context'; -import { logCredentialsSource } from '../utils/credentials'; +import IosCredentialsProvider from '../../credentials/ios/IosCredentialsProvider.js'; +import { getAppFromContext } from '../../credentials/ios/actions/BuildCredentialsUtils.js'; +import { IosCredentials, Target } from '../../credentials/ios/types.js'; +import { CredentialsResult } from '../build.js'; +import { BuildContext } from '../context.js'; +import { logCredentialsSource } from '../utils/credentials.js'; export async function ensureIosCredentialsAsync( buildCtx: BuildContext, diff --git a/packages/eas-cli/src/build/ios/graphql.ts b/packages/eas-cli/src/build/ios/graphql.ts index bde51af4e3..71eefee414 100644 --- a/packages/eas-cli/src/build/ios/graphql.ts +++ b/packages/eas-cli/src/build/ios/graphql.ts @@ -1,8 +1,8 @@ import { Env, Ios } from '@expo/eas-build-job'; -import nullthrows from 'nullthrows'; -import { IosJobInput, IosJobSecretsInput } from '../../graphql/generated'; -import { transformProjectArchive, transformWorkflow } from '../graphql'; +import { IosJobInput, IosJobSecretsInput } from '../../graphql/generated.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { transformProjectArchive, transformWorkflow } from '../graphql.js'; export function transformJob(job: Ios.Job): IosJobInput { return { diff --git a/packages/eas-cli/src/build/ios/prepareJob.ts b/packages/eas-cli/src/build/ios/prepareJob.ts index a7b18f11e2..442e4fc5aa 100644 --- a/packages/eas-cli/src/build/ios/prepareJob.ts +++ b/packages/eas-cli/src/build/ios/prepareJob.ts @@ -2,11 +2,11 @@ import { ArchiveSource, Ios, Job, Platform, sanitizeJob } from '@expo/eas-build- import path from 'path'; import slash from 'slash'; -import { IosCredentials, TargetCredentials } from '../../credentials/ios/types'; -import { getUsername } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { getVcsClient } from '../../vcs'; -import { BuildContext } from '../context'; +import { IosCredentials, TargetCredentials } from '../../credentials/ios/types.js'; +import { getUsername } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { BuildContext } from '../context.js'; interface JobData { projectArchive: ArchiveSource; diff --git a/packages/eas-cli/src/build/ios/syncProjectConfiguration.ts b/packages/eas-cli/src/build/ios/syncProjectConfiguration.ts index 1b0c0963fc..929e92e94f 100644 --- a/packages/eas-cli/src/build/ios/syncProjectConfiguration.ts +++ b/packages/eas-cli/src/build/ios/syncProjectConfiguration.ts @@ -3,10 +3,10 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { BuildProfile, IosVersionAutoIncrement } from '@expo/eas-json'; import type { XCBuildConfiguration } from 'xcode'; -import { isExpoUpdatesInstalled } from '../../project/projectUtils'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { syncUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; -import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version'; +import { isExpoUpdatesInstalled } from '../../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { syncUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js'; +import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version.js'; export async function syncProjectConfigurationAsync({ projectDir, diff --git a/packages/eas-cli/src/build/ios/version.ts b/packages/eas-cli/src/build/ios/version.ts index 14742d3c54..32801f1d97 100644 --- a/packages/eas-cli/src/build/ios/version.ts +++ b/packages/eas-cli/src/build/ios/version.ts @@ -1,16 +1,18 @@ 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 chalk from 'chalk'; import path from 'path'; import type { XCBuildConfiguration } from 'xcode'; -import Log from '../../log'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { promptAsync } from '../../prompts'; -import { readPlistAsync, writePlistAsync } from '../../utils/plist'; -import { updateAppJsonConfigAsync } from '../utils/appJson'; -import { bumpAppVersionAsync } from '../utils/version'; +import Log from '../../log.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { promptAsync } from '../../prompts.js'; +import { readPlistAsync, writePlistAsync } from '../../utils/plist.js'; +import { updateAppJsonConfigAsync } from '../utils/appJson.js'; +import { bumpAppVersionAsync } from '../utils/version.js'; + +const { IOSConfig } = ConfigPlugins; export enum BumpStrategy { APP_VERSION, @@ -145,9 +147,9 @@ async function writeVersionsToInfoPlistAsync({ }: { projectDir: string; exp: ExpoConfig; - infoPlist: IOSConfig.InfoPlist; + infoPlist: InfoPlist; buildSettings: XCBuildConfiguration['buildSettings']; -}): Promise { +}): Promise { let updatedInfoPlist = IOSConfig.Version.setVersion(exp, infoPlist); updatedInfoPlist = IOSConfig.Version.setBuildNumber(exp, updatedInfoPlist); await writeInfoPlistAsync({ projectDir, infoPlist: updatedInfoPlist, buildSettings }); @@ -176,9 +178,9 @@ export function getInfoPlistPath( async function readInfoPlistAsync( projectDir: string, buildSettings: XCBuildConfiguration['buildSettings'] -): Promise { +): Promise { const infoPlistPath = getInfoPlistPath(projectDir, buildSettings); - return ((await readPlistAsync(infoPlistPath)) ?? {}) as IOSConfig.InfoPlist; + return ((await readPlistAsync(infoPlistPath)) ?? {}) as InfoPlist; } async function writeInfoPlistAsync({ @@ -187,7 +189,7 @@ async function writeInfoPlistAsync({ buildSettings, }: { projectDir: string; - infoPlist: IOSConfig.InfoPlist; + infoPlist: InfoPlist; buildSettings: XCBuildConfiguration['buildSettings']; }): Promise { const infoPlistPath = getInfoPlistPath(projectDir, buildSettings); diff --git a/packages/eas-cli/src/build/local.ts b/packages/eas-cli/src/build/local.ts index 08a3af256e..08828c4896 100644 --- a/packages/eas-cli/src/build/local.ts +++ b/packages/eas-cli/src/build/local.ts @@ -1,9 +1,9 @@ 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 semver from 'semver'; -import { ora } from '../ora'; +import { ora } from '../ora.js'; const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin'; const PLUGIN_PACKAGE_VERSION = '0.0.85'; diff --git a/packages/eas-cli/src/build/metadata.ts b/packages/eas-cli/src/build/metadata.ts index 2eb9bfb02c..d7c09cae94 100644 --- a/packages/eas-cli/src/build/metadata.ts +++ b/packages/eas-cli/src/build/metadata.ts @@ -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 { IosEnterpriseProvisioning } from '@expo/eas-json'; import fs from 'fs-extra'; import resolveFrom from 'resolve-from'; -import Log from '../log'; -import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils'; +import Log from '../log.js'; +import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils.js'; import { readChannelSafelyAsync as readAndroidChannelSafelyAsync, readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync, -} from '../update/android/UpdatesModule'; +} from '../update/android/UpdatesModule.js'; import { readChannelSafelyAsync as readIosChannelSafelyAsync, readReleaseChannelSafelyAsync as readIosReleaseChannelSafelyAsync, -} from '../update/ios/UpdatesModule'; -import { ensureLoggedInAsync } from '../user/actions'; -import { easCliVersion } from '../utils/easCli'; -import { getVcsClient } from '../vcs'; -import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from './android/version'; -import { BuildContext } from './context'; -import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version'; +} from '../update/ios/UpdatesModule.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; +import { easCliVersion } from '../utils/easCli.js'; +import { getVcsClient } from '../vcs/index.js'; +import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from './android/version.js'; +import { BuildContext } from './context.js'; +import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version.js'; + +const { Updates } = ConfigPlugins; export async function collectMetadataAsync( ctx: BuildContext diff --git a/packages/eas-cli/src/build/runBuildAndSubmit.ts b/packages/eas-cli/src/build/runBuildAndSubmit.ts index 7a858746b0..3b31709f22 100644 --- a/packages/eas-cli/src/build/runBuildAndSubmit.ts +++ b/packages/eas-cli/src/build/runBuildAndSubmit.ts @@ -1,7 +1,6 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { BuildProfile, EasJsonReader, SubmitProfile } from '@expo/eas-json'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; import { AppPlatform, @@ -9,37 +8,38 @@ import { BuildResourceClass, BuildStatus, SubmissionFragment, -} from '../graphql/generated'; -import { toAppPlatform, toPlatform } from '../graphql/types/AppPlatform'; -import Log from '../log'; +} from '../graphql/generated.js'; +import { toAppPlatform, toPlatform } from '../graphql/types/AppPlatform.js'; +import Log from '../log.js'; import { RequestedPlatform, appPlatformDisplayNames, appPlatformEmojis, toPlatforms, -} from '../platform'; -import { checkExpoSdkIsSupportedAsync } from '../project/expoSdk'; -import { validateMetroConfigForManagedWorkflowAsync } from '../project/metroConfig'; -import { createSubmissionContextAsync } from '../submit/context'; +} from '../platform.js'; +import { checkExpoSdkIsSupportedAsync } from '../project/expoSdk.js'; +import { validateMetroConfigForManagedWorkflowAsync } from '../project/metroConfig.js'; +import { createSubmissionContextAsync } from '../submit/context.js'; import { submitAsync, waitToCompleteAsync as waitForSubmissionsToCompleteAsync, -} from '../submit/submit'; -import { printSubmissionDetailsUrls } from '../submit/utils/urls'; -import { printJsonOnlyOutput } from '../utils/json'; -import { ProfileData, getProfilesAsync } from '../utils/profiles'; -import { getVcsClient } from '../vcs'; -import { prepareAndroidBuildAsync } from './android/build'; -import { BuildRequestSender, waitForBuildEndAsync } from './build'; -import { ensureProjectConfiguredAsync } from './configure'; -import { BuildContext } from './context'; -import { createBuildContextAsync } from './createContext'; -import { prepareIosBuildAsync } from './ios/build'; -import { LocalBuildOptions } from './local'; -import { UserInputResourceClass } from './types'; -import { ensureExpoDevClientInstalledForDevClientBuildsAsync } from './utils/devClient'; -import { printBuildResults, printLogsUrls } from './utils/printBuildInfo'; -import { ensureRepoIsCleanAsync } from './utils/repository'; +} from '../submit/submit.js'; +import { printSubmissionDetailsUrls } from '../submit/utils/urls.js'; +import { printJsonOnlyOutput } from '../utils/json.js'; +import { nullthrows } from '../utils/nullthrows.js'; +import { ProfileData, getProfilesAsync } from '../utils/profiles.js'; +import { getVcsClient } from '../vcs/index.js'; +import { prepareAndroidBuildAsync } from './android/build.js'; +import { BuildRequestSender, waitForBuildEndAsync } from './build.js'; +import { ensureProjectConfiguredAsync } from './configure.js'; +import { BuildContext } from './context.js'; +import { createBuildContextAsync } from './createContext.js'; +import { prepareIosBuildAsync } from './ios/build.js'; +import { LocalBuildOptions } from './local.js'; +import { UserInputResourceClass } from './types.js'; +import { ensureExpoDevClientInstalledForDevClientBuildsAsync } from './utils/devClient.js'; +import { printBuildResults, printLogsUrls } from './utils/printBuildInfo.js'; +import { ensureRepoIsCleanAsync } from './utils/repository.js'; let metroConfigValidated = false; let sdkVersionChecked = false; diff --git a/packages/eas-cli/src/build/utils/appJson.ts b/packages/eas-cli/src/build/utils/appJson.ts index 89476c6bc1..4bb8e6f1c6 100644 --- a/packages/eas-cli/src/build/utils/appJson.ts +++ b/packages/eas-cli/src/build/utils/appJson.ts @@ -1,7 +1,9 @@ import * as ExpoConfig from '@expo/config'; -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import assert from 'assert'; +const JsonFile = JsonFileModule.default; + export async function updateAppJsonConfigAsync( { projectDir, diff --git a/packages/eas-cli/src/build/utils/credentials.ts b/packages/eas-cli/src/build/utils/credentials.ts index 8a144e8d89..bfe5fec919 100644 --- a/packages/eas-cli/src/build/utils/credentials.ts +++ b/packages/eas-cli/src/build/utils/credentials.ts @@ -2,8 +2,8 @@ import { Platform } from '@expo/eas-build-job'; import { CredentialsSource } from '@expo/eas-json'; import chalk from 'chalk'; -import Log from '../../log'; -import { requestedPlatformDisplayNames } from '../../platform'; +import Log from '../../log.js'; +import { requestedPlatformDisplayNames } from '../../platform.js'; export function logCredentialsSource( credentialsSource: CredentialsSource, diff --git a/packages/eas-cli/src/build/utils/devClient.ts b/packages/eas-cli/src/build/utils/devClient.ts index d6ade50126..df66f11aa5 100644 --- a/packages/eas-cli/src/build/utils/devClient.ts +++ b/packages/eas-cli/src/build/utils/devClient.ts @@ -3,15 +3,15 @@ import { Errors } from '@oclif/core'; import chalk from 'chalk'; import resolveFrom from 'resolve-from'; -import { toAppPlatform } from '../../graphql/types/AppPlatform'; -import Log, { learnMore } from '../../log'; -import { appPlatformDisplayNames } from '../../platform'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { confirmAsync } from '../../prompts'; -import { expoCommandAsync } from '../../utils/expoCli'; -import { ProfileData } from '../../utils/profiles'; -import { getVcsClient } from '../../vcs'; -import { reviewAndCommitChangesAsync } from './repository'; +import { toAppPlatform } from '../../graphql/types/AppPlatform.js'; +import Log, { learnMore } from '../../log.js'; +import { appPlatformDisplayNames } from '../../platform.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { confirmAsync } from '../../prompts.js'; +import { expoCommandAsync } from '../../utils/expoCli.js'; +import { ProfileData } from '../../utils/profiles.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { reviewAndCommitChangesAsync } from './repository.js'; export async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, diff --git a/packages/eas-cli/src/build/utils/formatBuild.ts b/packages/eas-cli/src/build/utils/formatBuild.ts index 88212d15c6..ca8970dbe6 100644 --- a/packages/eas-cli/src/build/utils/formatBuild.ts +++ b/packages/eas-cli/src/build/utils/formatBuild.ts @@ -4,10 +4,10 @@ import { AppPlatform, BuildFragment, BuildStatus as GraphQLBuildStatus, -} from '../../graphql/generated'; -import { appPlatformDisplayNames } from '../../platform'; -import formatFields from '../../utils/formatFields'; -import { getBuildLogsUrl } from './url'; +} from '../../graphql/generated.js'; +import { appPlatformDisplayNames } from '../../platform.js'; +import formatFields from '../../utils/formatFields.js'; +import { getBuildLogsUrl } from './url.js'; export function formatGraphQLBuild(build: BuildFragment): string { const actor = getActorName(build); diff --git a/packages/eas-cli/src/build/utils/printBuildInfo.ts b/packages/eas-cli/src/build/utils/printBuildInfo.ts index 057b540a97..e0c839253c 100644 --- a/packages/eas-cli/src/build/utils/printBuildInfo.ts +++ b/packages/eas-cli/src/build/utils/printBuildInfo.ts @@ -11,11 +11,11 @@ import { DistributionType, EasBuildDeprecationInfo, EasBuildDeprecationInfoType, -} from '../../graphql/generated'; -import Log, { learnMore } from '../../log'; -import { appPlatformDisplayNames, appPlatformEmojis } from '../../platform'; -import { printJsonOnlyOutput } from '../../utils/json'; -import { getBuildLogsUrl, getInternalDistributionInstallUrl } from './url'; +} from '../../graphql/generated.js'; +import Log, { learnMore } from '../../log.js'; +import { appPlatformDisplayNames, appPlatformEmojis } from '../../platform.js'; +import { printJsonOnlyOutput } from '../../utils/json.js'; +import { getBuildLogsUrl, getInternalDistributionInstallUrl } from './url.js'; export function printLogsUrls(builds: BuildFragment[]): void { if (builds.length === 1) { diff --git a/packages/eas-cli/src/build/utils/repository.ts b/packages/eas-cli/src/build/utils/repository.ts index aacf5cb6f9..7a5a2f0742 100644 --- a/packages/eas-cli/src/build/utils/repository.ts +++ b/packages/eas-cli/src/build/utils/repository.ts @@ -4,13 +4,13 @@ import path from 'path'; import tar from 'tar'; import { v4 as uuidv4 } from 'uuid'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { confirmAsync, promptAsync } from '../../prompts'; -import { formatBytes } from '../../utils/files'; -import { getTmpDirectory } from '../../utils/paths'; -import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer'; -import { getVcsClient } from '../../vcs'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { confirmAsync, promptAsync } from '../../prompts.js'; +import { formatBytes } from '../../utils/files.js'; +import { getTmpDirectory } from '../../utils/paths.js'; +import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer.js'; +import { getVcsClient } from '../../vcs/index.js'; export async function maybeBailOnRepoStatusAsync(): Promise { if (!(await getVcsClient().isCommitRequiredAsync())) { diff --git a/packages/eas-cli/src/build/utils/url.ts b/packages/eas-cli/src/build/utils/url.ts index 12fd0673a4..92189994f4 100644 --- a/packages/eas-cli/src/build/utils/url.ts +++ b/packages/eas-cli/src/build/utils/url.ts @@ -1,7 +1,7 @@ import assert from 'assert'; -import { getExpoApiBaseUrl, getExpoWebsiteBaseUrl } from '../../api'; -import { AppPlatform, BuildFragment } from '../../graphql/generated'; +import { getExpoApiBaseUrl, getExpoWebsiteBaseUrl } from '../../api.js'; +import { AppPlatform, BuildFragment } from '../../graphql/generated.js'; export function getProjectDashboardUrl(accountName: string, projectName: string): string { return new URL( diff --git a/packages/eas-cli/src/build/utils/version.ts b/packages/eas-cli/src/build/utils/version.ts index 4f19d1ca03..6a3005c06e 100644 --- a/packages/eas-cli/src/build/utils/version.ts +++ b/packages/eas-cli/src/build/utils/version.ts @@ -1,11 +1,11 @@ import { ExpoConfig, getConfigFilePaths } from '@expo/config'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; import semver from 'semver'; -import Log from '../../log'; -import { promptAsync } from '../../prompts'; -import { updateAppJsonConfigAsync } from './appJson'; +import Log from '../../log.js'; +import { promptAsync } from '../../prompts.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { updateAppJsonConfigAsync } from './appJson.js'; export function ensureStaticConfigExists(projectDir: string): void { const paths = getConfigFilePaths(projectDir); diff --git a/packages/eas-cli/src/build/validate.ts b/packages/eas-cli/src/build/validate.ts index 55fe88c622..7cd88566e2 100644 --- a/packages/eas-cli/src/build/validate.ts +++ b/packages/eas-cli/src/build/validate.ts @@ -2,9 +2,9 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import fs from 'fs-extra'; import path from 'path'; -import Log, { learnMore } from '../log'; -import { getVcsClient } from '../vcs'; -import { CommonContext } from './context'; +import Log, { learnMore } from '../log.js'; +import { getVcsClient } from '../vcs/index.js'; +import { CommonContext } from './context.js'; export function checkNodeEnvVariable(ctx: CommonContext): void { if (ctx.buildProfile.env?.NODE_ENV === 'production') { diff --git a/packages/eas-cli/src/commandUtils/EasCommand.ts b/packages/eas-cli/src/commandUtils/EasCommand.ts index 206677f0df..712e595edb 100644 --- a/packages/eas-cli/src/commandUtils/EasCommand.ts +++ b/packages/eas-cli/src/commandUtils/EasCommand.ts @@ -7,13 +7,13 @@ import { flushAsync as flushAnalyticsAsync, initAsync as initAnalyticsAsync, logEvent, -} from '../analytics/rudderstackClient'; -import { findProjectRootAsync } from '../project/projectUtils'; -import { getUserAsync } from '../user/User'; -import { ensureLoggedInAsync } from '../user/actions'; -import { easCliVersion } from '../utils/easCli'; -import { setVcsClient } from '../vcs'; -import GitClient from '../vcs/clients/git'; +} from '../analytics/rudderstackClient.js'; +import { findProjectRootAsync } from '../project/projectUtils.js'; +import { getUserAsync } from '../user/User.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; +import { easCliVersion } from '../utils/easCli.js'; +import GitClient from '../vcs/clients/git.js'; +import { setVcsClient } from '../vcs/index.js'; export default abstract class EasCommand extends Command { /** diff --git a/packages/eas-cli/src/commandUtils/__tests__/EasCommand-test.ts b/packages/eas-cli/src/commandUtils/__tests__/EasCommand-test.ts index 18cfb73573..b8fe41d868 100644 --- a/packages/eas-cli/src/commandUtils/__tests__/EasCommand-test.ts +++ b/packages/eas-cli/src/commandUtils/__tests__/EasCommand-test.ts @@ -1,8 +1,8 @@ -import { flushAsync, initAsync, logEvent } from '../../analytics/rudderstackClient'; -import { jester as mockJester } from '../../credentials/__tests__/fixtures-constants'; -import { getUserAsync } from '../../user/User'; -import { ensureLoggedInAsync } from '../../user/actions'; -import EasCommand from '../EasCommand'; +import { flushAsync, initAsync, logEvent } from '../../analytics/rudderstackClient.js'; +import { jester as mockJester } from '../../credentials/__tests__/fixtures-constants.js'; +import { getUserAsync } from '../../user/User.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import EasCommand from '../EasCommand.js'; jest.mock('../../user/User'); jest.mock('../../user/actions', () => ({ ensureLoggedInAsync: jest.fn() })); diff --git a/packages/eas-cli/src/commands/account/login.ts b/packages/eas-cli/src/commands/account/login.ts index d99234ed80..61747195f3 100644 --- a/packages/eas-cli/src/commands/account/login.ts +++ b/packages/eas-cli/src/commands/account/login.ts @@ -1,6 +1,6 @@ -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { showLoginPromptAsync } from '../../user/actions'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { showLoginPromptAsync } from '../../user/actions.js'; export default class AccountLogin extends EasCommand { static description = 'log in with your Expo account'; diff --git a/packages/eas-cli/src/commands/account/logout.ts b/packages/eas-cli/src/commands/account/logout.ts index 7e8b93e4f9..9268baf3e3 100644 --- a/packages/eas-cli/src/commands/account/logout.ts +++ b/packages/eas-cli/src/commands/account/logout.ts @@ -1,6 +1,6 @@ -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { logoutAsync } from '../../user/User'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { logoutAsync } from '../../user/User.js'; export default class AccountLogout extends EasCommand { static description = 'log out'; diff --git a/packages/eas-cli/src/commands/account/view.ts b/packages/eas-cli/src/commands/account/view.ts index 1fbcc1567a..066c004d5f 100644 --- a/packages/eas-cli/src/commands/account/view.ts +++ b/packages/eas-cli/src/commands/account/view.ts @@ -1,8 +1,8 @@ import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { getActorDisplayName, getUserAsync } from '../../user/User'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { getActorDisplayName, getUserAsync } from '../../user/User.js'; export default class AccountView extends EasCommand { static description = 'show the username you are logged in as'; diff --git a/packages/eas-cli/src/commands/analytics.ts b/packages/eas-cli/src/commands/analytics.ts index 49e0872b70..b5b15b9c5a 100644 --- a/packages/eas-cli/src/commands/analytics.ts +++ b/packages/eas-cli/src/commands/analytics.ts @@ -1,6 +1,6 @@ -import EasCommand from '../commandUtils/EasCommand'; -import Log from '../log'; -import UserSettings from '../user/UserSettings'; +import EasCommand from '../commandUtils/EasCommand.js'; +import Log from '../log.js'; +import UserSettings from '../user/UserSettings.js'; export default class AnalyticsView extends EasCommand { static description = 'display or change analytics settings'; diff --git a/packages/eas-cli/src/commands/branch/create.ts b/packages/eas-cli/src/commands/branch/create.ts index 74c5e9a905..c30ca3828a 100644 --- a/packages/eas-cli/src/commands/branch/create.ts +++ b/packages/eas-cli/src/commands/branch/create.ts @@ -1,24 +1,24 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { CreateUpdateBranchForAppMutation, CreateUpdateBranchForAppMutationVariables, UpdateBranch, -} from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { getVcsClient } from '../../vcs'; +} from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { getVcsClient } from '../../vcs/index.js'; export async function createUpdateBranchOnAppAsync({ appId, diff --git a/packages/eas-cli/src/commands/branch/delete.ts b/packages/eas-cli/src/commands/branch/delete.ts index e057840612..8e15244220 100644 --- a/packages/eas-cli/src/commands/branch/delete.ts +++ b/packages/eas-cli/src/commands/branch/delete.ts @@ -1,25 +1,25 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { DeleteUpdateBranchMutation, DeleteUpdateBranchMutationVariables, DeleteUpdateBranchResult, GetBranchInfoQuery, GetBranchInfoQueryVariables, -} from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync, toggleConfirmAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../project/projectUtils.js'; +import { promptAsync, toggleConfirmAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; async function getBranchInfoAsync({ appId, diff --git a/packages/eas-cli/src/commands/branch/list.ts b/packages/eas-cli/src/commands/branch/list.ts index 802d5d95b0..edba36da31 100644 --- a/packages/eas-cli/src/commands/branch/list.ts +++ b/packages/eas-cli/src/commands/branch/list.ts @@ -2,21 +2,21 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; import CliTable from 'cli-table3'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { BranchesByAppQuery, BranchesByAppQueryVariables, UpdateBranchFragment, -} from '../../graphql/generated'; -import { UpdateBranchFragmentNode } from '../../graphql/types/UpdateBranch'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../graphql/generated.js'; +import { UpdateBranchFragmentNode } from '../../graphql/types/UpdateBranch.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; const BRANCHES_LIMIT = 10_000; diff --git a/packages/eas-cli/src/commands/branch/publish.ts b/packages/eas-cli/src/commands/branch/publish.ts index e315e6754a..b7cf922104 100644 --- a/packages/eas-cli/src/commands/branch/publish.ts +++ b/packages/eas-cli/src/commands/branch/publish.ts @@ -1,4 +1,4 @@ -import EasCommand from '../../commandUtils/EasCommand'; +import EasCommand from '../../commandUtils/EasCommand.js'; export default class BranchPublish extends EasCommand { static description = 'deprecated, use "eas update"'; diff --git a/packages/eas-cli/src/commands/branch/rename.ts b/packages/eas-cli/src/commands/branch/rename.ts index ad3cb5253b..399ad3256a 100644 --- a/packages/eas-cli/src/commands/branch/rename.ts +++ b/packages/eas-cli/src/commands/branch/rename.ts @@ -1,24 +1,24 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { EditUpdateBranchInput, EditUpdateBranchMutation, EditUpdateBranchMutationVariables, UpdateBranch, -} from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; async function renameUpdateBranchOnAppAsync({ appId, diff --git a/packages/eas-cli/src/commands/branch/view.ts b/packages/eas-cli/src/commands/branch/view.ts index 550c82ea93..068fe33801 100644 --- a/packages/eas-cli/src/commands/branch/view.ts +++ b/packages/eas-cli/src/commands/branch/view.ts @@ -2,16 +2,16 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; import Table from 'cli-table3'; -import EasCommand from '../../commandUtils/EasCommand'; -import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; -import groupBy from '../../utils/expodash/groupBy'; -import formatFields from '../../utils/formatFields'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js'; +import groupBy from '../../utils/expodash/groupBy.js'; +import formatFields from '../../utils/formatFields.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export default class BranchView extends EasCommand { static description = 'view a branch'; diff --git a/packages/eas-cli/src/commands/build/cancel.ts b/packages/eas-cli/src/commands/build/cancel.ts index 708947875e..8ac0143bb0 100644 --- a/packages/eas-cli/src/commands/build/cancel.ts +++ b/packages/eas-cli/src/commands/build/cancel.ts @@ -1,25 +1,25 @@ import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { Build, BuildStatus, CancelBuildMutation, CancelBuildMutationVariables, -} from '../../graphql/generated'; -import { BuildQuery } from '../../graphql/queries/BuildQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { appPlatformEmojis } from '../../platform'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import { BuildQuery } from '../../graphql/queries/BuildQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { appPlatformEmojis } from '../../platform.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { confirmAsync, selectAsync } from '../../prompts'; +} from '../../project/projectUtils.js'; +import { confirmAsync, selectAsync } from '../../prompts.js'; async function cancelBuildAsync(buildId: string): Promise> { const data = await withErrorHandlingAsync( diff --git a/packages/eas-cli/src/commands/build/configure.ts b/packages/eas-cli/src/commands/build/configure.ts index 886e18aedf..a858f69b2a 100644 --- a/packages/eas-cli/src/commands/build/configure.ts +++ b/packages/eas-cli/src/commands/build/configure.ts @@ -2,18 +2,18 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import { cleanUpOldEasBuildGradleScriptAsync } from '../../build/android/syncProjectConfiguration'; -import { ensureProjectConfiguredAsync } from '../../build/configure'; -import EasCommand from '../../commandUtils/EasCommand'; -import Log, { learnMore } from '../../log'; -import { RequestedPlatform } from '../../platform'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, isExpoUpdatesInstalled } from '../../project/projectUtils'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { promptAsync } from '../../prompts'; -import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; -import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; -import { getVcsClient } from '../../vcs'; +import { cleanUpOldEasBuildGradleScriptAsync } from '../../build/android/syncProjectConfiguration.js'; +import { ensureProjectConfiguredAsync } from '../../build/configure.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log, { learnMore } from '../../log.js'; +import { RequestedPlatform } from '../../platform.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, isExpoUpdatesInstalled } from '../../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { promptAsync } from '../../prompts.js'; +import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js'; +import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js'; +import { getVcsClient } from '../../vcs/index.js'; export default class BuildConfigure extends EasCommand { static description = 'configure the project to support EAS Build'; diff --git a/packages/eas-cli/src/commands/build/index.ts b/packages/eas-cli/src/commands/build/index.ts index ab812e8354..9585d650de 100644 --- a/packages/eas-cli/src/commands/build/index.ts +++ b/packages/eas-cli/src/commands/build/index.ts @@ -1,13 +1,13 @@ import { Errors, Flags } from '@oclif/core'; import path from 'path'; -import { BuildFlags, runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit'; -import { UserInputResourceClass } from '../../build/types'; -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { RequestedPlatform, selectRequestedPlatformAsync } from '../../platform'; -import { findProjectRootAsync } from '../../project/projectUtils'; -import { enableJsonOutput } from '../../utils/json'; +import { BuildFlags, runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit.js'; +import { UserInputResourceClass } from '../../build/types.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { RequestedPlatform, selectRequestedPlatformAsync } from '../../platform.js'; +import { findProjectRootAsync } from '../../project/projectUtils.js'; +import { enableJsonOutput } from '../../utils/json.js'; interface RawBuildFlags { platform?: string; diff --git a/packages/eas-cli/src/commands/build/inspect.ts b/packages/eas-cli/src/commands/build/inspect.ts index 350b8b25fc..4f63287553 100644 --- a/packages/eas-cli/src/commands/build/inspect.ts +++ b/packages/eas-cli/src/commands/build/inspect.ts @@ -4,14 +4,14 @@ import fs from 'fs-extra'; import path from 'path'; import { v4 as uuidv4 } from 'uuid'; -import { runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit'; -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { RequestedPlatform } from '../../platform'; -import { findProjectRootAsync } from '../../project/projectUtils'; -import { getTmpDirectory } from '../../utils/paths'; -import { getVcsClient } from '../../vcs'; +import { runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { RequestedPlatform } from '../../platform.js'; +import { findProjectRootAsync } from '../../project/projectUtils.js'; +import { getTmpDirectory } from '../../utils/paths.js'; +import { getVcsClient } from '../../vcs/index.js'; enum InspectStage { ARCHIVE = 'archive', diff --git a/packages/eas-cli/src/commands/build/list.ts b/packages/eas-cli/src/commands/build/list.ts index cb93d76e88..e9fde0dba8 100644 --- a/packages/eas-cli/src/commands/build/list.ts +++ b/packages/eas-cli/src/commands/build/list.ts @@ -1,25 +1,25 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import { BuildDistributionType, BuildStatus } from '../../build/types'; -import { formatGraphQLBuild } from '../../build/utils/formatBuild'; -import EasCommand from '../../commandUtils/EasCommand'; +import { BuildDistributionType, BuildStatus } from '../../build/types.js'; +import { formatGraphQLBuild } from '../../build/utils/formatBuild.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; import { AppPlatform, DistributionType, BuildStatus as GraphQLBuildStatus, -} from '../../graphql/generated'; -import { BuildQuery } from '../../graphql/queries/BuildQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { RequestedPlatform } from '../../platform'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import { BuildQuery } from '../../graphql/queries/BuildQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { RequestedPlatform } from '../../platform.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../project/projectUtils.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export default class BuildList extends EasCommand { static description = 'list all builds for your project'; diff --git a/packages/eas-cli/src/commands/build/view.ts b/packages/eas-cli/src/commands/build/view.ts index 43a7cf7ffd..3aa91f2101 100644 --- a/packages/eas-cli/src/commands/build/view.ts +++ b/packages/eas-cli/src/commands/build/view.ts @@ -1,18 +1,18 @@ import { Flags } from '@oclif/core'; -import { formatGraphQLBuild } from '../../build/utils/formatBuild'; -import EasCommand from '../../commandUtils/EasCommand'; -import { BuildFragment } from '../../graphql/generated'; -import { BuildQuery } from '../../graphql/queries/BuildQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; +import { formatGraphQLBuild } from '../../build/utils/formatBuild.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { BuildFragment } from '../../graphql/generated.js'; +import { BuildQuery } from '../../graphql/queries/BuildQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../project/projectUtils.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export default class BuildView extends EasCommand { static description = 'view a build for your project'; diff --git a/packages/eas-cli/src/commands/channel/create.ts b/packages/eas-cli/src/commands/channel/create.ts index b1caeff28b..4e771e413a 100644 --- a/packages/eas-cli/src/commands/channel/create.ts +++ b/packages/eas-cli/src/commands/channel/create.ts @@ -1,25 +1,25 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { CreateUpdateChannelOnAppMutation, CreateUpdateChannelOnAppMutationVariables, -} from '../../graphql/generated'; -import { BranchQuery } from '../../graphql/queries/BranchQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import { BranchQuery } from '../../graphql/queries/BranchQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import formatFields from '../../utils/formatFields'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { createUpdateBranchOnAppAsync } from '../branch/create'; +} from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import formatFields from '../../utils/formatFields.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { createUpdateBranchOnAppAsync } from '../branch/create.js'; export async function createUpdateChannelOnAppAsync({ appId, diff --git a/packages/eas-cli/src/commands/channel/delete.ts b/packages/eas-cli/src/commands/channel/delete.ts index 6d3b7cb9a3..c46db22151 100644 --- a/packages/eas-cli/src/commands/channel/delete.ts +++ b/packages/eas-cli/src/commands/channel/delete.ts @@ -1,24 +1,24 @@ import { Flags } from '@oclif/core'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { DeleteUpdateChannelMutation, DeleteUpdateChannelMutationVariables, DeleteUpdateChannelResult, GetChannelInfoQuery, GetChannelInfoQueryVariables, -} from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync, toggleConfirmAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../project/projectUtils.js'; +import { promptAsync, toggleConfirmAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export default class ChannelDelete extends EasCommand { static hidden = true; diff --git a/packages/eas-cli/src/commands/channel/edit.ts b/packages/eas-cli/src/commands/channel/edit.ts index 120036e48d..aadc5ca142 100644 --- a/packages/eas-cli/src/commands/channel/edit.ts +++ b/packages/eas-cli/src/commands/channel/edit.ts @@ -1,9 +1,9 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { GetChannelByNameToEditQuery, GetChannelByNameToEditQueryVariables, @@ -11,13 +11,13 @@ import { UpdateChannel, UpdateChannelBranchMappingMutation, UpdateChannelBranchMappingMutationVariables, -} from '../../graphql/generated'; -import { BranchQuery } from '../../graphql/queries/BranchQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../graphql/generated.js'; +import { BranchQuery } from '../../graphql/queries/BranchQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; async function getChannelByNameForAppAsync({ appId, diff --git a/packages/eas-cli/src/commands/channel/list.ts b/packages/eas-cli/src/commands/channel/list.ts index 0ccf2faa5e..d2ec1ff824 100644 --- a/packages/eas-cli/src/commands/channel/list.ts +++ b/packages/eas-cli/src/commands/channel/list.ts @@ -1,18 +1,18 @@ import { Flags } from '@oclif/core'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { GetAllChannelsForAppQuery, GetAllChannelsForAppQueryVariables, -} from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import formatFields from '../../utils/formatFields'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { logChannelDetails } from './view'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import formatFields from '../../utils/formatFields.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { logChannelDetails } from './view.js'; const CHANNEL_LIMIT = 10_000; diff --git a/packages/eas-cli/src/commands/channel/rollout.ts b/packages/eas-cli/src/commands/channel/rollout.ts index b140154f3c..a4ebcd6d92 100644 --- a/packages/eas-cli/src/commands/channel/rollout.ts +++ b/packages/eas-cli/src/commands/channel/rollout.ts @@ -1,21 +1,21 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import { GetChannelByNameForAppQuery, UpdateBranch } from '../../graphql/generated'; -import { BranchQuery } from '../../graphql/queries/BranchQuery'; -import { ChannelQuery } from '../../graphql/queries/ChannelQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { GetChannelByNameForAppQuery, UpdateBranch } from '../../graphql/generated.js'; +import { BranchQuery } from '../../graphql/queries/BranchQuery.js'; +import { ChannelQuery } from '../../graphql/queries/ChannelQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync, selectAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { updateChannelBranchMappingAsync } from './edit'; -import { BranchMapping, getBranchMapping } from './view'; +} from '../../project/projectUtils.js'; +import { promptAsync, selectAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { updateChannelBranchMappingAsync } from './edit.js'; +import { BranchMapping, getBranchMapping } from './view.js'; async function promptForRolloutPercentAsync({ promptMessage, diff --git a/packages/eas-cli/src/commands/channel/view.ts b/packages/eas-cli/src/commands/channel/view.ts index e5a3047b94..ab9a054d6c 100644 --- a/packages/eas-cli/src/commands/channel/view.ts +++ b/packages/eas-cli/src/commands/channel/view.ts @@ -3,20 +3,20 @@ import assert from 'assert'; import chalk from 'chalk'; import Table from 'cli-table3'; -import EasCommand from '../../commandUtils/EasCommand'; -import { ChannelQuery } from '../../graphql/queries/ChannelQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { ChannelQuery } from '../../graphql/queries/ChannelQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; import { FormatUpdateParameter, UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup, -} from '../../update/utils'; -import formatFields from '../../utils/formatFields'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../update/utils.js'; +import formatFields from '../../utils/formatFields.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export type BranchMapping = { version: number; diff --git a/packages/eas-cli/src/commands/config.ts b/packages/eas-cli/src/commands/config.ts index 1289bb60f9..4a09620e87 100644 --- a/packages/eas-cli/src/commands/config.ts +++ b/packages/eas-cli/src/commands/config.ts @@ -4,13 +4,13 @@ import { EasJsonReader } from '@expo/eas-json'; import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import EasCommand from '../commandUtils/EasCommand'; -import { toAppPlatform } from '../graphql/types/AppPlatform'; -import Log from '../log'; -import { appPlatformEmojis } from '../platform'; -import { getExpoConfig } from '../project/expoConfig'; -import { findProjectRootAsync } from '../project/projectUtils'; -import { selectAsync } from '../prompts'; +import EasCommand from '../commandUtils/EasCommand.js'; +import { toAppPlatform } from '../graphql/types/AppPlatform.js'; +import Log from '../log.js'; +import { appPlatformEmojis } from '../platform.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { findProjectRootAsync } from '../project/projectUtils.js'; +import { selectAsync } from '../prompts.js'; export default class Config extends EasCommand { static description = 'display project configuration (app.json + eas.json)'; diff --git a/packages/eas-cli/src/commands/credentials.ts b/packages/eas-cli/src/commands/credentials.ts index 6da15b0ff1..0a3a872d30 100644 --- a/packages/eas-cli/src/commands/credentials.ts +++ b/packages/eas-cli/src/commands/credentials.ts @@ -1,5 +1,5 @@ -import EasCommand from '../commandUtils/EasCommand'; -import { SelectPlatform } from '../credentials/manager/SelectPlatform'; +import EasCommand from '../commandUtils/EasCommand.js'; +import { SelectPlatform } from '../credentials/manager/SelectPlatform.js'; export default class Credentials extends EasCommand { static description = 'manage credentials'; diff --git a/packages/eas-cli/src/commands/device/create.ts b/packages/eas-cli/src/commands/device/create.ts index d2e2236a4c..130afca4fe 100644 --- a/packages/eas-cli/src/commands/device/create.ts +++ b/packages/eas-cli/src/commands/device/create.ts @@ -1,8 +1,8 @@ -import EasCommand from '../../commandUtils/EasCommand'; -import AppStoreApi from '../../credentials/ios/appstore/AppStoreApi'; -import { createContextAsync } from '../../devices/context'; -import DeviceManager from '../../devices/manager'; -import { ensureLoggedInAsync } from '../../user/actions'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import AppStoreApi from '../../credentials/ios/appstore/AppStoreApi.js'; +import { createContextAsync } from '../../devices/context.js'; +import DeviceManager from '../../devices/manager.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; export default class DeviceCreate extends EasCommand { static description = 'register new Apple Devices to use for internal distribution'; diff --git a/packages/eas-cli/src/commands/device/delete.ts b/packages/eas-cli/src/commands/device/delete.ts index bed261839b..5914cf3199 100644 --- a/packages/eas-cli/src/commands/device/delete.ts +++ b/packages/eas-cli/src/commands/device/delete.ts @@ -1,24 +1,29 @@ -import { Device, DeviceStatus } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { Flags } from '@oclif/core'; import assert from 'assert'; -import EasCommand from '../../commandUtils/EasCommand'; -import { chooseDevicesToDeleteAsync } from '../../credentials/ios/actions/DeviceUtils'; -import { AppleDeviceMutation } from '../../credentials/ios/api/graphql/mutations/AppleDeviceMutation'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { chooseDevicesToDeleteAsync } from '../../credentials/ios/actions/DeviceUtils.js'; +import { AppleDeviceMutation } from '../../credentials/ios/api/graphql/mutations/AppleDeviceMutation.js'; import { AppleDeviceQuery, AppleDeviceQueryResult, AppleDevicesByTeamIdentifierQueryResult, -} from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; -import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery'; -import { authenticateAsync, getRequestContext } from '../../credentials/ios/appstore/authenticate'; -import formatDevice from '../../devices/utils/formatDevice'; -import { AppleDevice, Maybe } from '../../graphql/generated'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; -import { promptAsync, toggleConfirmAsync } from '../../prompts'; +} from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js'; +import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery.js'; +import { + authenticateAsync, + getRequestContext, +} from '../../credentials/ios/appstore/authenticate.js'; +import formatDevice from '../../devices/utils/formatDevice.js'; +import { AppleDevice, Maybe } from '../../graphql/generated.js'; +import Log from '../../log.js'; +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 { static description = 'remove a registered device from your account'; diff --git a/packages/eas-cli/src/commands/device/list.ts b/packages/eas-cli/src/commands/device/list.ts index b9cbe26fde..6f24fd0ee2 100644 --- a/packages/eas-cli/src/commands/device/list.ts +++ b/packages/eas-cli/src/commands/device/list.ts @@ -2,15 +2,15 @@ import { Flags } from '@oclif/core'; import assert from 'assert'; import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; -import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery'; -import formatDevice from '../../devices/utils/formatDevice'; -import Log from '../../log'; -import { Ora, ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js'; +import { AppleTeamQuery } from '../../credentials/ios/api/graphql/queries/AppleTeamQuery.js'; +import formatDevice from '../../devices/utils/formatDevice.js'; +import Log from '../../log.js'; +import { Ora, ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; export default class BuildList extends EasCommand { static description = 'list all registered devices for your account'; diff --git a/packages/eas-cli/src/commands/device/view.ts b/packages/eas-cli/src/commands/device/view.ts index 4bdd1569a5..46ec108131 100644 --- a/packages/eas-cli/src/commands/device/view.ts +++ b/packages/eas-cli/src/commands/device/view.ts @@ -1,10 +1,10 @@ -import EasCommand from '../../commandUtils/EasCommand'; -import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery'; -import formatDevice from '../../devices/utils/formatDevice'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { AppleDeviceQuery } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery.js'; +import formatDevice from '../../devices/utils/formatDevice.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectAccountNameAsync } from '../../project/projectUtils.js'; export default class DeviceView extends EasCommand { static description = 'view a device for your project'; diff --git a/packages/eas-cli/src/commands/diagnostics.ts b/packages/eas-cli/src/commands/diagnostics.ts index a1c277301a..592febb094 100644 --- a/packages/eas-cli/src/commands/diagnostics.ts +++ b/packages/eas-cli/src/commands/diagnostics.ts @@ -1,11 +1,11 @@ import { Platform } from '@expo/eas-build-job'; import envinfo from 'envinfo'; -import EasCommand from '../commandUtils/EasCommand'; -import Log from '../log'; -import { findProjectRootAsync } from '../project/projectUtils'; -import { resolveWorkflowAsync } from '../project/workflow'; -import { easCliVersion } from '../utils/easCli'; +import EasCommand from '../commandUtils/EasCommand.js'; +import Log from '../log.js'; +import { findProjectRootAsync } from '../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../project/workflow.js'; +import { easCliVersion } from '../utils/easCli.js'; export default class Diagnostics extends EasCommand { static description = 'display environment info'; diff --git a/packages/eas-cli/src/commands/metadata/pull.ts b/packages/eas-cli/src/commands/metadata/pull.ts index ca0a056321..217b0172a2 100644 --- a/packages/eas-cli/src/commands/metadata/pull.ts +++ b/packages/eas-cli/src/commands/metadata/pull.ts @@ -3,15 +3,15 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; import path from 'path'; -import { ensureProjectConfiguredAsync } from '../../build/configure'; -import EasCommand from '../../commandUtils/EasCommand'; -import { CredentialsContext } from '../../credentials/context'; -import Log, { learnMore } from '../../log'; -import { createMetadataContextAsync } from '../../metadata/context'; -import { downloadMetadataAsync } from '../../metadata/download'; -import { handleMetadataError } from '../../metadata/errors'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; +import { ensureProjectConfiguredAsync } from '../../build/configure.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { CredentialsContext } from '../../credentials/context.js'; +import Log, { learnMore } from '../../log.js'; +import { createMetadataContextAsync } from '../../metadata/context.js'; +import { downloadMetadataAsync } from '../../metadata/download.js'; +import { handleMetadataError } from '../../metadata/errors.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; export default class MetadataPull extends EasCommand { static description = 'generate the local store configuration from the app stores'; diff --git a/packages/eas-cli/src/commands/metadata/push.ts b/packages/eas-cli/src/commands/metadata/push.ts index caacc4bb30..f14b35f1de 100644 --- a/packages/eas-cli/src/commands/metadata/push.ts +++ b/packages/eas-cli/src/commands/metadata/push.ts @@ -1,15 +1,15 @@ import { getConfig } from '@expo/config'; import { Flags } from '@oclif/core'; -import { ensureProjectConfiguredAsync } from '../../build/configure'; -import EasCommand from '../../commandUtils/EasCommand'; -import { CredentialsContext } from '../../credentials/context'; -import Log, { learnMore } from '../../log'; -import { createMetadataContextAsync } from '../../metadata/context'; -import { handleMetadataError } from '../../metadata/errors'; -import { uploadMetadataAsync } from '../../metadata/upload'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; +import { ensureProjectConfiguredAsync } from '../../build/configure.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { CredentialsContext } from '../../credentials/context.js'; +import Log, { learnMore } from '../../log.js'; +import { createMetadataContextAsync } from '../../metadata/context.js'; +import { handleMetadataError } from '../../metadata/errors.js'; +import { uploadMetadataAsync } from '../../metadata/upload.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; export default class MetadataPush extends EasCommand { static description = 'sync the local store configuration to the app stores'; diff --git a/packages/eas-cli/src/commands/project/info.ts b/packages/eas-cli/src/commands/project/info.ts index 91ae555836..6b1629f3f1 100644 --- a/packages/eas-cli/src/commands/project/info.ts +++ b/packages/eas-cli/src/commands/project/info.ts @@ -1,12 +1,12 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; -import { AppInfoQuery, AppInfoQueryVariables } from '../../graphql/generated'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import formatFields from '../../utils/formatFields'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; +import { AppInfoQuery, AppInfoQueryVariables } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import formatFields from '../../utils/formatFields.js'; async function projectInfoByIdAsync(appId: string): Promise { const data = await withErrorHandlingAsync( diff --git a/packages/eas-cli/src/commands/project/init.ts b/packages/eas-cli/src/commands/project/init.ts index 911773793b..e2fc388921 100644 --- a/packages/eas-cli/src/commands/project/init.ts +++ b/packages/eas-cli/src/commands/project/init.ts @@ -1,9 +1,9 @@ import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, setProjectIdAsync } from '../../project/projectUtils'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, setProjectIdAsync } from '../../project/projectUtils.js'; export default class ProjectInit extends EasCommand { static description = 'create or link an EAS project'; diff --git a/packages/eas-cli/src/commands/secret/create.ts b/packages/eas-cli/src/commands/secret/create.ts index e839c1c2ae..6a6d331735 100644 --- a/packages/eas-cli/src/commands/secret/create.ts +++ b/packages/eas-cli/src/commands/secret/create.ts @@ -1,23 +1,23 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation.js'; import { EnvironmentSecretScope, EnvironmentSecretsQuery, -} from '../../graphql/queries/EnvironmentSecretsQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/queries/EnvironmentSecretsQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectAccountNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { findAccountByName } from '../../user/Account'; -import { getActorDisplayName } from '../../user/User'; -import { ensureLoggedInAsync } from '../../user/actions'; +} from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { findAccountByName } from '../../user/Account.js'; +import { getActorDisplayName } from '../../user/User.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; export default class EnvironmentSecretCreate extends EasCommand { static description = 'create an environment secret on the current project or owner account'; diff --git a/packages/eas-cli/src/commands/secret/delete.ts b/packages/eas-cli/src/commands/secret/delete.ts index 029f85eb5c..175a43dc19 100644 --- a/packages/eas-cli/src/commands/secret/delete.ts +++ b/packages/eas-cli/src/commands/secret/delete.ts @@ -1,20 +1,20 @@ import { Flags } from '@oclif/core'; -import EasCommand from '../../commandUtils/EasCommand'; -import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { EnvironmentSecretMutation } from '../../graphql/mutations/EnvironmentSecretMutation.js'; import { EnvironmentSecretScope, EnvironmentSecretWithScope, EnvironmentSecretsQuery, -} from '../../graphql/queries/EnvironmentSecretsQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/queries/EnvironmentSecretsQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectAccountNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { promptAsync, toggleConfirmAsync } from '../../prompts'; +} from '../../project/projectUtils.js'; +import { promptAsync, toggleConfirmAsync } from '../../prompts.js'; export default class EnvironmentSecretDelete extends EasCommand { static description = 'delete an environment secret by ID'; diff --git a/packages/eas-cli/src/commands/secret/list.ts b/packages/eas-cli/src/commands/secret/list.ts index b1a131bdc3..274f343be2 100644 --- a/packages/eas-cli/src/commands/secret/list.ts +++ b/packages/eas-cli/src/commands/secret/list.ts @@ -2,15 +2,15 @@ import chalk from 'chalk'; import Table from 'cli-table3'; import dateFormat from 'dateformat'; -import EasCommand from '../../commandUtils/EasCommand'; -import { EnvironmentSecretsQuery } from '../../graphql/queries/EnvironmentSecretsQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { EnvironmentSecretsQuery } from '../../graphql/queries/EnvironmentSecretsQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectAccountNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; +} from '../../project/projectUtils.js'; export default class EnvironmentSecretList extends EasCommand { static description = 'list environment secrets available for your current app'; diff --git a/packages/eas-cli/src/commands/submit.ts b/packages/eas-cli/src/commands/submit.ts index 0c96a7da46..a5f27a97d9 100644 --- a/packages/eas-cli/src/commands/submit.ts +++ b/packages/eas-cli/src/commands/submit.ts @@ -2,23 +2,23 @@ import { EasJsonReader } from '@expo/eas-json'; import { Errors, Flags } from '@oclif/core'; import chalk from 'chalk'; -import EasCommand from '../commandUtils/EasCommand'; -import { SubmissionFragment } from '../graphql/generated'; -import { toAppPlatform } from '../graphql/types/AppPlatform'; -import Log from '../log'; +import EasCommand from '../commandUtils/EasCommand.js'; +import { SubmissionFragment } from '../graphql/generated.js'; +import { toAppPlatform } from '../graphql/types/AppPlatform.js'; +import Log from '../log.js'; import { RequestedPlatform, appPlatformDisplayNames, appPlatformEmojis, selectRequestedPlatformAsync, toPlatforms, -} from '../platform'; -import { getExpoConfig } from '../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../project/projectUtils'; -import { SubmitArchiveFlags, createSubmissionContextAsync } from '../submit/context'; -import { submitAsync, waitToCompleteAsync } from '../submit/submit'; -import { printSubmissionDetailsUrls } from '../submit/utils/urls'; -import { getProfilesAsync } from '../utils/profiles'; +} from '../platform.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../project/projectUtils.js'; +import { SubmitArchiveFlags, createSubmissionContextAsync } from '../submit/context.js'; +import { submitAsync, waitToCompleteAsync } from '../submit/submit.js'; +import { printSubmissionDetailsUrls } from '../submit/utils/urls.js'; +import { getProfilesAsync } from '../utils/profiles.js'; interface RawCommandFlags { platform?: string; diff --git a/packages/eas-cli/src/commands/update/configure.ts b/packages/eas-cli/src/commands/update/configure.ts index 98b1d1aef0..6656124d6d 100644 --- a/packages/eas-cli/src/commands/update/configure.ts +++ b/packages/eas-cli/src/commands/update/configure.ts @@ -4,21 +4,21 @@ import { Flags } from '@oclif/core'; import assert from 'assert'; import chalk from 'chalk'; -import { getEASUpdateURL } from '../../api'; -import EasCommand from '../../commandUtils/EasCommand'; -import { AppPlatform } from '../../graphql/generated'; -import Log, { learnMore } from '../../log'; -import { RequestedPlatform, appPlatformDisplayNames } from '../../platform'; -import { getExpoConfig } from '../../project/expoConfig'; +import { getEASUpdateURL } from '../../api.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { AppPlatform } from '../../graphql/generated.js'; +import Log, { learnMore } from '../../log.js'; +import { RequestedPlatform, appPlatformDisplayNames } from '../../platform.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectIdAsync, installExpoUpdatesAsync, isExpoUpdatesInstalledOrAvailable, -} from '../../project/projectUtils'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule'; -import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule'; +} from '../../project/projectUtils.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule.js'; +import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule.js'; const DEFAULT_MANAGED_RUNTIME_VERSION = { policy: 'sdkVersion' } as const; const DEFAULT_BARE_RUNTIME_VERSION = '1.0.0' as const; diff --git a/packages/eas-cli/src/commands/update/delete.ts b/packages/eas-cli/src/commands/update/delete.ts index c4f6830512..d6a0d2e597 100644 --- a/packages/eas-cli/src/commands/update/delete.ts +++ b/packages/eas-cli/src/commands/update/delete.ts @@ -1,16 +1,16 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { DeleteUpdateGroupMutation, UpdateMutationDeleteUpdateGroupArgs, -} from '../../graphql/generated'; -import Log from '../../log'; -import { confirmAsync } from '../../prompts'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { confirmAsync } from '../../prompts.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; async function deleteUpdateGroupAsync({ group, diff --git a/packages/eas-cli/src/commands/update/index.ts b/packages/eas-cli/src/commands/update/index.ts index 1fc4f80076..d45ce92a12 100644 --- a/packages/eas-cli/src/commands/update/index.ts +++ b/packages/eas-cli/src/commands/update/index.ts @@ -1,18 +1,17 @@ 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 { Errors, Flags } from '@oclif/core'; import assert from 'assert'; import chalk from 'chalk'; import dateFormat from 'dateformat'; -import gql from 'graphql-tag'; -import nullthrows from 'nullthrows'; - -import { getEASUpdateURL } from '../../api'; -import { getUpdateGroupUrl } from '../../build/utils/url'; -import EasCommand from '../../commandUtils/EasCommand'; -import fetch from '../../fetch'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; +import { gql } from 'graphql-tag'; + +import { getEASUpdateURL } from '../../api.js'; +import { getUpdateGroupUrl } from '../../build/utils/url.js'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import fetch from '../../fetch.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; import { GetUpdateGroupAsyncQuery, PublishUpdateGroupInput, @@ -23,43 +22,46 @@ import { UpdatePublishMutation, User, ViewBranchUpdatesQuery, -} from '../../graphql/generated'; -import { PublishMutation } from '../../graphql/mutations/PublishMutation'; -import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; -import Log, { link } from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; +} from '../../graphql/generated.js'; +import { PublishMutation } from '../../graphql/mutations/PublishMutation.js'; +import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js'; +import Log, { link } from '../../log.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectAccountName, getProjectIdAsync, installExpoUpdatesAsync, isExpoUpdatesInstalledOrAvailable, -} from '../../project/projectUtils'; +} from '../../project/projectUtils.js'; import { PublishPlatform, buildBundlesAsync, buildUnsortedUpdateInfoGroupAsync, collectAssetsAsync, uploadAssetsAsync, -} from '../../project/publish'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import { confirmAsync, promptAsync, selectAsync } from '../../prompts'; -import { formatUpdate } from '../../update/utils'; -import { ensureLoggedInAsync } from '../../user/actions'; +} from '../../project/publish.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import { confirmAsync, promptAsync, selectAsync } from '../../prompts.js'; +import { formatUpdate } from '../../update/utils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; import { checkManifestBodyAgainstUpdateInfoGroup, getCodeSigningInfoAsync, getManifestBodyAsync, signManifestBody, -} from '../../utils/code-signing'; -import uniqBy from '../../utils/expodash/uniqBy'; -import formatFields from '../../utils/formatFields'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { getVcsClient } from '../../vcs'; -import { createUpdateBranchOnAppAsync } from '../branch/create'; -import { listBranchesAsync } from '../branch/list'; -import { createUpdateChannelOnAppAsync } from '../channel/create'; +} from '../../utils/code-signing.js'; +import uniqBy from '../../utils/expodash/uniqBy.js'; +import formatFields from '../../utils/formatFields.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { createUpdateBranchOnAppAsync } from '../branch/create.js'; +import { listBranchesAsync } from '../branch/list.js'; +import { createUpdateChannelOnAppAsync } from '../channel/create.js'; + +const { Updates } = ConfigPlugins; export const defaultPublishPlatforms: PublishPlatform[] = ['android', 'ios']; export type PublishPlatformFlag = PublishPlatform | 'all'; diff --git a/packages/eas-cli/src/commands/update/list.ts b/packages/eas-cli/src/commands/update/list.ts index 7534677709..5e75491c09 100644 --- a/packages/eas-cli/src/commands/update/list.ts +++ b/packages/eas-cli/src/commands/update/list.ts @@ -3,17 +3,17 @@ import assert from 'assert'; import chalk from 'chalk'; import CliTable from 'cli-table3'; -import EasCommand from '../../commandUtils/EasCommand'; -import { ViewAllUpdatesQuery } from '../../graphql/generated'; -import { UpdateQuery } from '../../graphql/queries/UpdateQuery'; -import Log from '../../log'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { FormatUpdateParameter, UPDATE_COLUMNS, formatUpdate } from '../../update/utils'; -import groupBy from '../../utils/expodash/groupBy'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; -import { getVcsClient } from '../../vcs'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { ViewAllUpdatesQuery } from '../../graphql/generated.js'; +import { UpdateQuery } from '../../graphql/queries/UpdateQuery.js'; +import Log from '../../log.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { FormatUpdateParameter, UPDATE_COLUMNS, formatUpdate } from '../../update/utils.js'; +import groupBy from '../../utils/expodash/groupBy.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; +import { getVcsClient } from '../../vcs/index.js'; type UpdateGroupDescription = FormatUpdateParameter & { branch: string; diff --git a/packages/eas-cli/src/commands/update/view.ts b/packages/eas-cli/src/commands/update/view.ts index 8cb98a9e70..82ca269193 100644 --- a/packages/eas-cli/src/commands/update/view.ts +++ b/packages/eas-cli/src/commands/update/view.ts @@ -1,13 +1,13 @@ import { Flags } from '@oclif/core'; import Table from 'cli-table3'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import EasCommand from '../../commandUtils/EasCommand'; -import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client'; -import { UpdatesByGroupQuery, UpdatesByGroupQueryVariables } from '../../graphql/generated'; -import Log from '../../log'; -import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils'; -import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { graphqlClient, withErrorHandlingAsync } from '../../graphql/client.js'; +import { UpdatesByGroupQuery, UpdatesByGroupQueryVariables } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { UPDATE_COLUMNS, formatUpdate, getPlatformsForGroup } from '../../update/utils.js'; +import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json.js'; export async function viewUpdateAsync({ groupId, diff --git a/packages/eas-cli/src/commands/webhook/create.ts b/packages/eas-cli/src/commands/webhook/create.ts index 84476c8bc4..6715da9171 100644 --- a/packages/eas-cli/src/commands/webhook/create.ts +++ b/packages/eas-cli/src/commands/webhook/create.ts @@ -1,12 +1,12 @@ import { Flags } from '@oclif/core'; -import EasCommand from '../../commandUtils/EasCommand'; -import { WebhookType } from '../../graphql/generated'; -import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { prepareInputParamsAsync } from '../../webhooks/input'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { WebhookType } from '../../graphql/generated.js'; +import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { prepareInputParamsAsync } from '../../webhooks/input.js'; export default class WebhookCreate extends EasCommand { static description = 'create a webhook'; diff --git a/packages/eas-cli/src/commands/webhook/delete.ts b/packages/eas-cli/src/commands/webhook/delete.ts index 6d3e94ab6f..f1f1f4d6b8 100644 --- a/packages/eas-cli/src/commands/webhook/delete.ts +++ b/packages/eas-cli/src/commands/webhook/delete.ts @@ -1,17 +1,17 @@ import assert from 'assert'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; -import EasCommand from '../../commandUtils/EasCommand'; -import { WebhookFragment } from '../../graphql/generated'; -import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; -import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; -import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils'; -import { promptAsync, toggleConfirmAsync } from '../../prompts'; -import { formatWebhook } from '../../webhooks/formatWebhook'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { WebhookFragment } from '../../graphql/generated.js'; +import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js'; +import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; +import { findProjectRootAsync, getProjectIdAsync } from '../../project/projectUtils.js'; +import { promptAsync, toggleConfirmAsync } from '../../prompts.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { formatWebhook } from '../../webhooks/formatWebhook.js'; export default class WebhookDelete extends EasCommand { static description = 'delete a webhook'; diff --git a/packages/eas-cli/src/commands/webhook/list.ts b/packages/eas-cli/src/commands/webhook/list.ts index 753c0cd285..b6df437fe1 100644 --- a/packages/eas-cli/src/commands/webhook/list.ts +++ b/packages/eas-cli/src/commands/webhook/list.ts @@ -1,18 +1,18 @@ import { Flags } from '@oclif/core'; import chalk from 'chalk'; -import EasCommand from '../../commandUtils/EasCommand'; -import { WebhookType } from '../../graphql/generated'; -import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { getExpoConfig } from '../../project/expoConfig'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { WebhookType } from '../../graphql/generated.js'; +import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { getExpoConfig } from '../../project/expoConfig.js'; import { findProjectRootAsync, getProjectFullNameAsync, getProjectIdAsync, -} from '../../project/projectUtils'; -import { formatWebhook } from '../../webhooks/formatWebhook'; +} from '../../project/projectUtils.js'; +import { formatWebhook } from '../../webhooks/formatWebhook.js'; export default class WebhookList extends EasCommand { static description = 'list webhooks'; diff --git a/packages/eas-cli/src/commands/webhook/update.ts b/packages/eas-cli/src/commands/webhook/update.ts index 48fa69b538..8bc14530fb 100644 --- a/packages/eas-cli/src/commands/webhook/update.ts +++ b/packages/eas-cli/src/commands/webhook/update.ts @@ -1,12 +1,12 @@ import { Flags } from '@oclif/core'; -import EasCommand from '../../commandUtils/EasCommand'; -import { WebhookType } from '../../graphql/generated'; -import { WebhookMutation } from '../../graphql/mutations/WebhookMutation'; -import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; -import { ora } from '../../ora'; -import pick from '../../utils/expodash/pick'; -import { prepareInputParamsAsync } from '../../webhooks/input'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { WebhookType } from '../../graphql/generated.js'; +import { WebhookMutation } from '../../graphql/mutations/WebhookMutation.js'; +import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js'; +import { ora } from '../../ora.js'; +import pick from '../../utils/expodash/pick.js'; +import { prepareInputParamsAsync } from '../../webhooks/input.js'; export default class WebhookUpdate extends EasCommand { static description = 'update a webhook'; diff --git a/packages/eas-cli/src/commands/webhook/view.ts b/packages/eas-cli/src/commands/webhook/view.ts index 84fb901105..3a0af47377 100644 --- a/packages/eas-cli/src/commands/webhook/view.ts +++ b/packages/eas-cli/src/commands/webhook/view.ts @@ -1,8 +1,8 @@ -import EasCommand from '../../commandUtils/EasCommand'; -import { WebhookQuery } from '../../graphql/queries/WebhookQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { formatWebhook } from '../../webhooks/formatWebhook'; +import EasCommand from '../../commandUtils/EasCommand.js'; +import { WebhookQuery } from '../../graphql/queries/WebhookQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { formatWebhook } from '../../webhooks/formatWebhook.js'; export default class WebhookView extends EasCommand { static description = 'view a webhook'; diff --git a/packages/eas-cli/src/credentials/__tests__/fixtures-android.ts b/packages/eas-cli/src/credentials/__tests__/fixtures-android.ts index da6509bd1f..7c6d9bd489 100644 --- a/packages/eas-cli/src/credentials/__tests__/fixtures-android.ts +++ b/packages/eas-cli/src/credentials/__tests__/fixtures-android.ts @@ -7,15 +7,15 @@ import { AppFragment, CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment, -} from '../../graphql/generated'; -import * as AndroidGraphqlClient from '../android/api/GraphqlClient'; -import { Keystore } from '../android/credentials'; +} from '../../graphql/generated.js'; +import * as AndroidGraphqlClient from '../android/api/GraphqlClient.js'; +import { Keystore } from '../android/credentials.js'; import { testKeystore2Base64, testKeystoreBase64, testPKCS12KeystoreBase64, testPKCS12KeystoreEmptyPasswordBase64, -} from './fixtures-base64-data'; +} from './fixtures-base64-data.js'; const now = new Date(); diff --git a/packages/eas-cli/src/credentials/__tests__/fixtures-appstore.ts b/packages/eas-cli/src/credentials/__tests__/fixtures-appstore.ts index 94e9fd94e7..2316cbb85b 100644 --- a/packages/eas-cli/src/credentials/__tests__/fixtures-appstore.ts +++ b/packages/eas-cli/src/credentials/__tests__/fixtures-appstore.ts @@ -1,5 +1,5 @@ -import AppStoreApi from '../ios/appstore/AppStoreApi'; -import { AuthCtx } from '../ios/appstore/authenticateTypes'; +import AppStoreApi from '../ios/appstore/AppStoreApi.js'; +import { AuthCtx } from '../ios/appstore/authenticateTypes.js'; export const testAuthCtx: AuthCtx = { appleId: 'test-apple-id', diff --git a/packages/eas-cli/src/credentials/__tests__/fixtures-constants.ts b/packages/eas-cli/src/credentials/__tests__/fixtures-constants.ts index a91756e85a..4a07ba2064 100644 --- a/packages/eas-cli/src/credentials/__tests__/fixtures-constants.ts +++ b/packages/eas-cli/src/credentials/__tests__/fixtures-constants.ts @@ -1,4 +1,4 @@ -import { Actor } from '../../user/User'; +import { Actor } from '../../user/User.js'; export const jester: Actor = { __typename: 'User', diff --git a/packages/eas-cli/src/credentials/__tests__/fixtures-context.ts b/packages/eas-cli/src/credentials/__tests__/fixtures-context.ts index 7d41b12008..2f0078e73f 100644 --- a/packages/eas-cli/src/credentials/__tests__/fixtures-context.ts +++ b/packages/eas-cli/src/credentials/__tests__/fixtures-context.ts @@ -1,10 +1,10 @@ -import merge from 'ts-deepmerge'; +import { default as merge } from 'ts-deepmerge'; -import { CredentialsContext } from '../context'; -import { getNewAndroidApiMock } from './fixtures-android'; -import { getAppstoreMock } from './fixtures-appstore'; -import { testAppJson, testUsername } from './fixtures-constants'; -import { getNewIosApiMock } from './fixtures-ios'; +import { CredentialsContext } from '../context.js'; +import { getNewAndroidApiMock } from './fixtures-android.js'; +import { getAppstoreMock } from './fixtures-appstore.js'; +import { testAppJson, testUsername } from './fixtures-constants.js'; +import { getNewIosApiMock } from './fixtures-ios.js'; export function createCtxMock(mockOverride: Record = {}): CredentialsContext { const defaultMock = { diff --git a/packages/eas-cli/src/credentials/__tests__/fixtures-ios.ts b/packages/eas-cli/src/credentials/__tests__/fixtures-ios.ts index f1a16f77f7..97dee197ba 100644 --- a/packages/eas-cli/src/credentials/__tests__/fixtures-ios.ts +++ b/packages/eas-cli/src/credentials/__tests__/fixtures-ios.ts @@ -1,4 +1,4 @@ -import { UserRole } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { AppFragment, @@ -12,15 +12,17 @@ import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../graphql/generated'; -import * as IosGraphqlClient from '../ios/api/GraphqlClient'; +} from '../../graphql/generated.js'; +import * as IosGraphqlClient from '../ios/api/GraphqlClient.js'; import { AscApiKey, DistributionCertificate, ProvisioningProfile, -} from '../ios/appstore/Credentials.types'; -import { Target } from '../ios/types'; -import { testProvisioningProfileBase64 } from './fixtures-base64-data'; +} from '../ios/appstore/Credentials.types.js'; +import { Target } from '../ios/types.js'; +import { testProvisioningProfileBase64 } from './fixtures-base64-data.js'; + +const { UserRole } = AppleUtils; const now = new Date(); diff --git a/packages/eas-cli/src/credentials/android/AndroidCredentialsProvider.ts b/packages/eas-cli/src/credentials/android/AndroidCredentialsProvider.ts index 5a730f9deb..bb83366e42 100644 --- a/packages/eas-cli/src/credentials/android/AndroidCredentialsProvider.ts +++ b/packages/eas-cli/src/credentials/android/AndroidCredentialsProvider.ts @@ -1,13 +1,13 @@ import { Platform } from '@expo/eas-build-job'; import { CredentialsSource } from '@expo/eas-json'; -import nullthrows from 'nullthrows'; - -import { AndroidAppBuildCredentialsFragment } from '../../graphql/generated'; -import { CredentialsContext } from '../context'; -import * as credentialsJsonReader from '../credentialsJson/read'; -import { SetUpBuildCredentials } from './actions/SetUpBuildCredentials'; -import { AppLookupParams } from './api/GraphqlClient'; -import { Keystore } from './credentials'; + +import { AndroidAppBuildCredentialsFragment } from '../../graphql/generated.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { CredentialsContext } from '../context.js'; +import * as credentialsJsonReader from '../credentialsJson/read.js'; +import { SetUpBuildCredentials } from './actions/SetUpBuildCredentials.js'; +import { AppLookupParams } from './api/GraphqlClient.js'; +import { Keystore } from './credentials.js'; export interface AndroidCredentials { keystore: Keystore; diff --git a/packages/eas-cli/src/credentials/android/actions/AssignFcm.ts b/packages/eas-cli/src/credentials/android/actions/AssignFcm.ts index 61f91bc361..5dd19f48d3 100644 --- a/packages/eas-cli/src/credentials/android/actions/AssignFcm.ts +++ b/packages/eas-cli/src/credentials/android/actions/AssignFcm.ts @@ -1,10 +1,10 @@ import { AndroidFcmFragment, CommonAndroidAppCredentialsFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; export class AssignFcm { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/AssignGoogleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/actions/AssignGoogleServiceAccountKey.ts index 1c40efb493..0bff97c3df 100644 --- a/packages/eas-cli/src/credentials/android/actions/AssignGoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/actions/AssignGoogleServiceAccountKey.ts @@ -1,10 +1,10 @@ import { CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; export class AssignGoogleServiceAccountKey { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/BuildCredentialsUtils.ts b/packages/eas-cli/src/credentials/android/actions/BuildCredentialsUtils.ts index bc39639e0d..69d2ffb48f 100644 --- a/packages/eas-cli/src/credentials/android/actions/BuildCredentialsUtils.ts +++ b/packages/eas-cli/src/credentials/android/actions/BuildCredentialsUtils.ts @@ -1,15 +1,18 @@ import assert from 'assert'; import { nanoid } from 'nanoid'; -import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated'; -import { ora } from '../../../ora'; -import { getApplicationIdAsync } from '../../../project/android/applicationId'; -import { GradleBuildContext } from '../../../project/android/gradle'; -import { getProjectAccountName, getProjectConfigDescription } from '../../../project/projectUtils'; -import { promptAsync } from '../../../prompts'; -import { findAccountByName } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; +import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated.js'; +import { ora } from '../../../ora.js'; +import { getApplicationIdAsync } from '../../../project/android/applicationId.js'; +import { GradleBuildContext } from '../../../project/android/gradle.js'; +import { + getProjectAccountName, + getProjectConfigDescription, +} from '../../../project/projectUtils.js'; +import { promptAsync } from '../../../prompts.js'; +import { findAccountByName } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; /** * Legacy credentials can be copied over to EAS if the user does not have diff --git a/packages/eas-cli/src/credentials/android/actions/CreateFcm.ts b/packages/eas-cli/src/credentials/android/actions/CreateFcm.ts index d2ffc8db92..67f0c1478b 100644 --- a/packages/eas-cli/src/credentials/android/actions/CreateFcm.ts +++ b/packages/eas-cli/src/credentials/android/actions/CreateFcm.ts @@ -1,8 +1,8 @@ -import { AndroidFcmFragment, AndroidFcmVersion } from '../../../graphql/generated'; -import Log from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; +import { AndroidFcmFragment, AndroidFcmVersion } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; export class CreateFcm { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/android/actions/CreateGoogleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/actions/CreateGoogleServiceAccountKey.ts index a605fa7566..2b8888cf7f 100644 --- a/packages/eas-cli/src/credentials/android/actions/CreateGoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/actions/CreateGoogleServiceAccountKey.ts @@ -1,16 +1,16 @@ import chalk from 'chalk'; import fs from 'fs-extra'; -import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { GoogleServiceAccountKey } from '../credentials'; +import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { GoogleServiceAccountKey } from '../credentials.js'; import { detectGoogleServiceAccountKeyPathAsync, readAndValidateServiceAccountKey, -} from '../utils/googleServiceAccountKey'; +} from '../utils/googleServiceAccountKey.js'; export class CreateGoogleServiceAccountKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/android/actions/CreateKeystore.ts b/packages/eas-cli/src/credentials/android/actions/CreateKeystore.ts index 43014fbf05..19bf8eacda 100644 --- a/packages/eas-cli/src/credentials/android/actions/CreateKeystore.ts +++ b/packages/eas-cli/src/credentials/android/actions/CreateKeystore.ts @@ -1,12 +1,12 @@ -import { AndroidKeystoreFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { getProjectIdAsync } from '../../../project/projectUtils'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { askForUserProvidedAsync } from '../../utils/promptForCredentials'; -import { KeystoreWithType, keystoreSchema } from '../credentials'; -import { generateRandomKeystoreAsync } from '../utils/keystore'; -import { getKeystoreWithType, validateKeystore } from '../utils/keystoreNew'; +import { AndroidKeystoreFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { getProjectIdAsync } from '../../../project/projectUtils.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { askForUserProvidedAsync } from '../../utils/promptForCredentials.js'; +import { KeystoreWithType, keystoreSchema } from '../credentials.js'; +import { generateRandomKeystoreAsync } from '../utils/keystore.js'; +import { getKeystoreWithType, validateKeystore } from '../utils/keystoreNew.js'; export class CreateKeystore { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/android/actions/DownloadKeystore.ts b/packages/eas-cli/src/credentials/android/actions/DownloadKeystore.ts index 508d58796f..85eb6d3c44 100644 --- a/packages/eas-cli/src/credentials/android/actions/DownloadKeystore.ts +++ b/packages/eas-cli/src/credentials/android/actions/DownloadKeystore.ts @@ -1,13 +1,13 @@ import chalk from 'chalk'; import fs from 'fs-extra'; -import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { maybeRenameExistingFileAsync } from '../../../utils/files'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams, formatProjectFullName } from '../api/GraphqlClient'; -import { displayAndroidKeystore } from '../utils/printCredentials'; +import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { maybeRenameExistingFileAsync } from '../../../utils/files.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams, formatProjectFullName } from '../api/GraphqlClient.js'; +import { displayAndroidKeystore } from '../utils/printCredentials.js'; interface DownloadKeystoreOptions { app: AppLookupParams; diff --git a/packages/eas-cli/src/credentials/android/actions/RemoveFcm.ts b/packages/eas-cli/src/credentials/android/actions/RemoveFcm.ts index 0aa29fc6e1..e90dfe8a79 100644 --- a/packages/eas-cli/src/credentials/android/actions/RemoveFcm.ts +++ b/packages/eas-cli/src/credentials/android/actions/RemoveFcm.ts @@ -1,7 +1,7 @@ -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams, formatProjectFullName } from '../api/GraphqlClient'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams, formatProjectFullName } from '../api/GraphqlClient.js'; export class RemoveFcm { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/RemoveGoogleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/actions/RemoveGoogleServiceAccountKey.ts index 3b6d3a0922..5536dc33af 100644 --- a/packages/eas-cli/src/credentials/android/actions/RemoveGoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/actions/RemoveGoogleServiceAccountKey.ts @@ -1,9 +1,9 @@ -import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { selectGoogleServiceAccountKeyAsync } from '../utils/googleServiceAccountKey'; +import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { selectGoogleServiceAccountKeyAsync } from '../utils/googleServiceAccountKey.js'; export class SelectAndRemoveGoogleServiceAccountKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/android/actions/RemoveKeystore.ts b/packages/eas-cli/src/credentials/android/actions/RemoveKeystore.ts index 5f8421356e..5abcf62f86 100644 --- a/packages/eas-cli/src/credentials/android/actions/RemoveKeystore.ts +++ b/packages/eas-cli/src/credentials/android/actions/RemoveKeystore.ts @@ -1,11 +1,11 @@ import chalk from 'chalk'; -import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { BackupKeystore } from './DownloadKeystore'; +import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { BackupKeystore } from './DownloadKeystore.js'; export class RemoveKeystore { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentials.ts b/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentials.ts index 86784db12f..17585ec2ea 100644 --- a/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentials.ts +++ b/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentials.ts @@ -1,20 +1,19 @@ -import nullthrows from 'nullthrows'; - import { AndroidAppBuildCredentialsFragment, AndroidKeystoreFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; import { canCopyLegacyCredentialsAsync, createOrUpdateDefaultAndroidAppBuildCredentialsAsync, promptUserAndCopyLegacyCredentialsAsync, -} from './BuildCredentialsUtils'; -import { CreateKeystore } from './CreateKeystore'; +} from './BuildCredentialsUtils.js'; +import { CreateKeystore } from './CreateKeystore.js'; interface Options { app: AppLookupParams; diff --git a/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.ts b/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.ts index 79af7d5b9b..135efa86fb 100644 --- a/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.ts +++ b/packages/eas-cli/src/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.ts @@ -1,18 +1,18 @@ import { AndroidAppBuildCredentialsFragment, AndroidKeystoreType, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { readAndroidCredentialsAsync } from '../../credentialsJson/read'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { CredentialsContext } from '../../context.js'; +import { readAndroidCredentialsAsync } from '../../credentialsJson/read.js'; import { SelectAndroidBuildCredentials, SelectAndroidBuildCredentialsResultType, -} from '../../manager/SelectAndroidBuildCredentials'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { getKeystoreWithType } from '../utils/keystoreNew'; -import { BackupKeystore } from './DownloadKeystore'; +} from '../../manager/SelectAndroidBuildCredentials.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { getKeystoreWithType } from '../utils/keystoreNew.js'; +import { BackupKeystore } from './DownloadKeystore.js'; export class SetUpBuildCredentialsFromCredentialsJson { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/SetUpGoogleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/actions/SetUpGoogleServiceAccountKey.ts index 993a7c2442..512537b92b 100644 --- a/packages/eas-cli/src/credentials/android/actions/SetUpGoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/actions/SetUpGoogleServiceAccountKey.ts @@ -1,17 +1,16 @@ -import nullthrows from 'nullthrows'; - import { CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AssignGoogleServiceAccountKey } from './AssignGoogleServiceAccountKey'; -import { CreateGoogleServiceAccountKey } from './CreateGoogleServiceAccountKey'; -import { UseExistingGoogleServiceAccountKey } from './UseExistingGoogleServiceAccountKey'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AssignGoogleServiceAccountKey } from './AssignGoogleServiceAccountKey.js'; +import { CreateGoogleServiceAccountKey } from './CreateGoogleServiceAccountKey.js'; +import { UseExistingGoogleServiceAccountKey } from './UseExistingGoogleServiceAccountKey.js'; export class SetUpGoogleServiceAccountKey { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/android/actions/UpdateCredentialsJson.ts b/packages/eas-cli/src/credentials/android/actions/UpdateCredentialsJson.ts index b9efba5976..5563573040 100644 --- a/packages/eas-cli/src/credentials/android/actions/UpdateCredentialsJson.ts +++ b/packages/eas-cli/src/credentials/android/actions/UpdateCredentialsJson.ts @@ -1,7 +1,7 @@ -import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { updateAndroidCredentialsAsync } from '../../credentialsJson/update'; +import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { updateAndroidCredentialsAsync } from '../../credentialsJson/update.js'; export class UpdateCredentialsJson { async runAsync( diff --git a/packages/eas-cli/src/credentials/android/actions/UseExistingGoogleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/actions/UseExistingGoogleServiceAccountKey.ts index ac6810be06..6f214e4acd 100644 --- a/packages/eas-cli/src/credentials/android/actions/UseExistingGoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/actions/UseExistingGoogleServiceAccountKey.ts @@ -1,8 +1,8 @@ -import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { selectGoogleServiceAccountKeyAsync } from '../utils/googleServiceAccountKey'; +import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { selectGoogleServiceAccountKeyAsync } from '../utils/googleServiceAccountKey.js'; export class UseExistingGoogleServiceAccountKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/AssignFcm-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/AssignFcm-test.ts index 74278ca043..89377683cf 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/AssignFcm-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/AssignFcm-test.ts @@ -1,7 +1,7 @@ -import { testLegacyAndroidFcmFragment } from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { AssignFcm } from '../AssignFcm'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; +import { testLegacyAndroidFcmFragment } from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { AssignFcm } from '../AssignFcm.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; describe(AssignFcm, () => { it('assigns an fcm api key in Interactive Mode', async () => { diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/AssignGoogleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/AssignGoogleServiceAccountKey-test.ts index cd15b81f3f..148d4d8d0d 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/AssignGoogleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/AssignGoogleServiceAccountKey-test.ts @@ -1,7 +1,7 @@ -import { testGoogleServiceAccountKeyFragment } from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { AssignGoogleServiceAccountKey } from '../AssignGoogleServiceAccountKey'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; +import { testGoogleServiceAccountKeyFragment } from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { AssignGoogleServiceAccountKey } from '../AssignGoogleServiceAccountKey.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; describe(AssignGoogleServiceAccountKey, () => { it('assigns a Google Service Account key in Interactive Mode', async () => { diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/BuildCredentialsUtils-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/BuildCredentialsUtils-test.ts index 855410e749..15b651638b 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/BuildCredentialsUtils-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/BuildCredentialsUtils-test.ts @@ -1,4 +1,4 @@ -import { confirmAsync, promptAsync } from '../../../../prompts'; +import { confirmAsync, promptAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testAndroidAppCredentialsFragment, @@ -6,13 +6,13 @@ import { testLegacyAndroidAppCredentialsFragment, testLegacyAndroidBuildCredentialsFragment, testLegacyAndroidFcmFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { canCopyLegacyCredentialsAsync, getAppLookupParamsFromContextAsync, promptUserAndCopyLegacyCredentialsAsync, -} from '../BuildCredentialsUtils'; +} from '../BuildCredentialsUtils.js'; jest.mock('../../../../ora'); jest.mock('../../../../prompts'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateFcm-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateFcm-test.ts index b1ab0efb65..068e53424a 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateFcm-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateFcm-test.ts @@ -1,7 +1,7 @@ -import { promptAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { CreateFcm } from '../CreateFcm'; +import { promptAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { CreateFcm } from '../CreateFcm.js'; jest.mock('../../../../prompts'); jest.mocked(promptAsync).mockImplementation(async () => ({ fcmApiKey: 'blah' })); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateGoogleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateGoogleServiceAccountKey-test.ts index 3c7dca977d..5ee0d7d92e 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateGoogleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateGoogleServiceAccountKey-test.ts @@ -1,9 +1,9 @@ import { vol } from 'memfs'; -import { promptAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { CreateGoogleServiceAccountKey } from '../CreateGoogleServiceAccountKey'; +import { promptAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { CreateGoogleServiceAccountKey } from '../CreateGoogleServiceAccountKey.js'; jest.mock('../../../../prompts'); jest.mock('fs'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateKeystore-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateKeystore-test.ts index 30fa9ba273..ca4d68185b 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/CreateKeystore-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/CreateKeystore-test.ts @@ -1,10 +1,10 @@ -import { jester as mockJester } from '../../../../credentials/__tests__/fixtures-constants'; -import { testKeystore } from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { askForUserProvidedAsync } from '../../../utils/promptForCredentials'; -import { generateRandomKeystoreAsync } from '../../utils/keystore'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { CreateKeystore } from '../CreateKeystore'; +import { jester as mockJester } from '../../../../credentials/__tests__/fixtures-constants.js'; +import { testKeystore } from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { askForUserProvidedAsync } from '../../../utils/promptForCredentials.js'; +import { generateRandomKeystoreAsync } from '../../utils/keystore.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { CreateKeystore } from '../CreateKeystore.js'; jest.mock('../../../../project/ensureProjectExists'); jest.mock('../../../../prompts', () => ({ confirmAsync: jest.fn(() => true) })); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/DownloadKeystore-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/DownloadKeystore-test.ts index 90963937ac..f578ee022c 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/DownloadKeystore-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/DownloadKeystore-test.ts @@ -1,9 +1,9 @@ import fs from 'fs-extra'; -import { testAndroidBuildCredentialsFragment } from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { DownloadKeystore } from '../DownloadKeystore'; +import { testAndroidBuildCredentialsFragment } from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { DownloadKeystore } from '../DownloadKeystore.js'; jest.mock('fs-extra'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveFcm-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveFcm-test.ts index fa85ad6aac..35d3fa4c72 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveFcm-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveFcm-test.ts @@ -1,11 +1,11 @@ -import { confirmAsync } from '../../../../prompts'; +import { confirmAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testAndroidAppCredentialsFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { RemoveFcm } from '../RemoveFcm'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { RemoveFcm } from '../RemoveFcm.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveGoogleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveGoogleServiceAccountKey-test.ts index ffd013e32e..16511f2fcd 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveGoogleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveGoogleServiceAccountKey-test.ts @@ -1,10 +1,10 @@ -import { confirmAsync } from '../../../../prompts'; +import { confirmAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testGoogleServiceAccountKeyFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { RemoveGoogleServiceAccountKey } from '../RemoveGoogleServiceAccountKey'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { RemoveGoogleServiceAccountKey } from '../RemoveGoogleServiceAccountKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveKeystore-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveKeystore-test.ts index d4c419af7d..4860a9ba97 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveKeystore-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/RemoveKeystore-test.ts @@ -1,8 +1,8 @@ -import { confirmAsync } from '../../../../prompts'; -import { testAndroidBuildCredentialsFragment } from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { RemoveKeystore } from '../RemoveKeystore'; +import { confirmAsync } from '../../../../prompts.js'; +import { testAndroidBuildCredentialsFragment } from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { RemoveKeystore } from '../RemoveKeystore.js'; jest.mock('fs-extra'); jest.mock('../../../../prompts'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentials-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentials-test.ts index 408535a85b..22470c11a5 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentials-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentials-test.ts @@ -2,13 +2,13 @@ import { getNewAndroidApiMock, testAndroidBuildCredentialsFragment, testJksAndroidKeystoreFragment, -} from '../../../__tests__/fixtures-android'; -import { jester as mockJester } from '../../../__tests__/fixtures-constants'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { MissingCredentialsNonInteractiveError } from '../../../errors'; -import { generateRandomKeystoreAsync } from '../../utils/keystore'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { SetUpBuildCredentials } from '../SetUpBuildCredentials'; +} from '../../../__tests__/fixtures-android.js'; +import { jester as mockJester } from '../../../__tests__/fixtures-constants.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { MissingCredentialsNonInteractiveError } from '../../../errors.js'; +import { generateRandomKeystoreAsync } from '../../utils/keystore.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { SetUpBuildCredentials } from '../SetUpBuildCredentials.js'; jest.mock('../../../../ora'); jest.mock('../../../../project/ensureProjectExists'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentialsFromCredentialsJson-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentialsFromCredentialsJson-test.ts index 6e752b8cef..47e942bfd6 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentialsFromCredentialsJson-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpBuildCredentialsFromCredentialsJson-test.ts @@ -1,20 +1,20 @@ import { vol } from 'memfs'; -import { AndroidKeystoreType } from '../../../../graphql/generated'; -import { confirmAsync } from '../../../../prompts'; +import { AndroidKeystoreType } from '../../../../graphql/generated.js'; +import { confirmAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testAndroidBuildCredentialsFragment, testJksAndroidKeystoreFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { SelectAndroidBuildCredentials, SelectAndroidBuildCredentialsResultType, -} from '../../../manager/SelectAndroidBuildCredentials'; -import { AppLookupParams } from '../../api/GraphqlClient'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { SetUpBuildCredentialsFromCredentialsJson } from '../SetUpBuildCredentialsFromCredentialsJson'; +} from '../../../manager/SelectAndroidBuildCredentials.js'; +import { AppLookupParams } from '../../api/GraphqlClient.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { SetUpBuildCredentialsFromCredentialsJson } from '../SetUpBuildCredentialsFromCredentialsJson.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpGoogleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpGoogleServiceAccountKey-test.ts index 1052985056..fb8896383a 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpGoogleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/SetUpGoogleServiceAccountKey-test.ts @@ -1,15 +1,15 @@ import { vol } from 'memfs'; -import { promptAsync } from '../../../../prompts'; +import { promptAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testAndroidAppCredentialsFragment, testGoogleServiceAccountKeyFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { MissingCredentialsNonInteractiveError } from '../../../errors'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { SetUpGoogleServiceAccountKey } from '../SetUpGoogleServiceAccountKey'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { MissingCredentialsNonInteractiveError } from '../../../errors.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { SetUpGoogleServiceAccountKey } from '../SetUpGoogleServiceAccountKey.js'; jest.mock('../../../../prompts'); jest.mock('fs'); diff --git a/packages/eas-cli/src/credentials/android/actions/__tests__/UseExistingGoogleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/actions/__tests__/UseExistingGoogleServiceAccountKey-test.ts index 325c5bc8c9..dadf9547a9 100644 --- a/packages/eas-cli/src/credentials/android/actions/__tests__/UseExistingGoogleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/actions/__tests__/UseExistingGoogleServiceAccountKey-test.ts @@ -1,11 +1,11 @@ -import { promptAsync } from '../../../../prompts'; +import { promptAsync } from '../../../../prompts.js'; import { getNewAndroidApiMock, testGoogleServiceAccountKeyFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils'; -import { UseExistingGoogleServiceAccountKey } from '../UseExistingGoogleServiceAccountKey'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils.js'; +import { UseExistingGoogleServiceAccountKey } from '../UseExistingGoogleServiceAccountKey.js'; jest.mock('../../../../prompts'); jest diff --git a/packages/eas-cli/src/credentials/android/api/GraphqlClient.ts b/packages/eas-cli/src/credentials/android/api/GraphqlClient.ts index 7fb4324db7..3d75707402 100644 --- a/packages/eas-cli/src/credentials/android/api/GraphqlClient.ts +++ b/packages/eas-cli/src/credentials/android/api/GraphqlClient.ts @@ -6,17 +6,17 @@ import { AppFragment, CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment, -} from '../../../graphql/generated'; -import { Account } from '../../../user/Account'; -import { AppQuery } from '../../ios/api/graphql/queries/AppQuery'; -import { GoogleServiceAccountKey, KeystoreWithType } from '../credentials'; -import { AndroidAppBuildCredentialsMutation } from './graphql/mutations/AndroidAppBuildCredentialsMutation'; -import { AndroidAppCredentialsMutation } from './graphql/mutations/AndroidAppCredentialsMutation'; -import { AndroidFcmMutation } from './graphql/mutations/AndroidFcmMutation'; -import { AndroidKeystoreMutation } from './graphql/mutations/AndroidKeystoreMutation'; -import { GoogleServiceAccountKeyMutation } from './graphql/mutations/GoogleServiceAccountKeyMutation'; -import { AndroidAppCredentialsQuery } from './graphql/queries/AndroidAppCredentialsQuery'; -import { GoogleServiceAccountKeyQuery } from './graphql/queries/GoogleServiceAccountKeyQuery'; +} from '../../../graphql/generated.js'; +import { Account } from '../../../user/Account.js'; +import { AppQuery } from '../../ios/api/graphql/queries/AppQuery.js'; +import { GoogleServiceAccountKey, KeystoreWithType } from '../credentials.js'; +import { AndroidAppBuildCredentialsMutation } from './graphql/mutations/AndroidAppBuildCredentialsMutation.js'; +import { AndroidAppCredentialsMutation } from './graphql/mutations/AndroidAppCredentialsMutation.js'; +import { AndroidFcmMutation } from './graphql/mutations/AndroidFcmMutation.js'; +import { AndroidKeystoreMutation } from './graphql/mutations/AndroidKeystoreMutation.js'; +import { GoogleServiceAccountKeyMutation } from './graphql/mutations/GoogleServiceAccountKeyMutation.js'; +import { AndroidAppCredentialsQuery } from './graphql/queries/AndroidAppCredentialsQuery.js'; +import { GoogleServiceAccountKeyQuery } from './graphql/queries/GoogleServiceAccountKeyQuery.js'; export interface AppLookupParams { account: Account; diff --git a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.ts b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.ts index 109bac33f4..980044850d 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AndroidAppBuildCredentialsFragment, AndroidAppBuildCredentialsInput, CreateAndroidAppBuildCredentialsMutation, SetKeystoreMutation, -} from '../../../../../graphql/generated'; -import { AndroidAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppBuildCredentials'; +} from '../../../../../graphql/generated.js'; +import { AndroidAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppBuildCredentials.js'; export type AndroidAppBuildCredentialsMetadataInput = Omit< AndroidAppBuildCredentialsInput, diff --git a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.ts b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.ts index 4bf9657820..54990ce5c3 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { CommonAndroidAppCredentialsFragment, CreateAndroidAppCredentialsMutation, SetFcmMutation, SetGoogleServiceAccountKeyForSubmissionsMutation, -} from '../../../../../graphql/generated'; -import { CommonAndroidAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppCredentials'; +} from '../../../../../graphql/generated.js'; +import { CommonAndroidAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppCredentials.js'; export const AndroidAppCredentialsMutation = { async createAndroidAppCredentialsAsync( diff --git a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidFcmMutation.ts b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidFcmMutation.ts index 6ef8e70a26..4a66f3a5f1 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidFcmMutation.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidFcmMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AndroidFcmFragment, AndroidFcmInput, CreateAndroidFcmMutation, DeleteAndroidFcmMutation, -} from '../../../../../graphql/generated'; -import { AndroidFcmFragmentNode } from '../../../../../graphql/types/credentials/AndroidFcm'; +} from '../../../../../graphql/generated.js'; +import { AndroidFcmFragmentNode } from '../../../../../graphql/types/credentials/AndroidFcm.js'; export const AndroidFcmMutation = { async createAndroidFcmAsync( diff --git a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.ts b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.ts index 1cf6b57fd9..d460d3baeb 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AndroidKeystoreFragment, AndroidKeystoreInput, CreateAndroidKeystoreMutation, DeleteAndroidKeystoreMutation, -} from '../../../../../graphql/generated'; -import { AndroidKeystoreFragmentNode } from '../../../../../graphql/types/credentials/AndroidKeystore'; +} from '../../../../../graphql/generated.js'; +import { AndroidKeystoreFragmentNode } from '../../../../../graphql/types/credentials/AndroidKeystore.js'; export const AndroidKeystoreMutation = { async createAndroidKeystoreAsync( diff --git a/packages/eas-cli/src/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.ts b/packages/eas-cli/src/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.ts index 4a16d56aad..c5f3bc40dc 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { CreateGoogleServiceAccountKeyMutation, DeleteGoogleServiceAccountKeyMutation, GoogleServiceAccountKeyFragment, GoogleServiceAccountKeyInput, -} from '../../../../../graphql/generated'; -import { GoogleServiceAccountKeyFragmentNode } from '../../../../../graphql/types/credentials/GoogleServiceAccountKey'; +} from '../../../../../graphql/generated.js'; +import { GoogleServiceAccountKeyFragmentNode } from '../../../../../graphql/types/credentials/GoogleServiceAccountKey.js'; export const GoogleServiceAccountKeyMutation = { async createGoogleServiceAccountKeyAsync( diff --git a/packages/eas-cli/src/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.ts b/packages/eas-cli/src/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.ts index 216b80a219..5d96af7c13 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.ts @@ -1,13 +1,13 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { CommonAndroidAppCredentialsFragment, CommonAndroidAppCredentialsWithBuildCredentialsByApplicationIdentifierQuery, -} from '../../../../../graphql/generated'; -import { CommonAndroidAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppCredentials'; +} from '../../../../../graphql/generated.js'; +import { CommonAndroidAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppCredentials.js'; export const AndroidAppCredentialsQuery = { async withCommonFieldsByApplicationIdentifierAsync( diff --git a/packages/eas-cli/src/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.ts b/packages/eas-cli/src/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.ts index 3b462b04f4..22f29e7491 100644 --- a/packages/eas-cli/src/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.ts +++ b/packages/eas-cli/src/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.ts @@ -1,12 +1,12 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { GoogleServiceAccountKeyByAccountQuery, GoogleServiceAccountKeyFragment, -} from '../../../../../graphql/generated'; -import { GoogleServiceAccountKeyFragmentNode } from '../../../../../graphql/types/credentials/GoogleServiceAccountKey'; +} from '../../../../../graphql/generated.js'; +import { GoogleServiceAccountKeyFragmentNode } from '../../../../../graphql/types/credentials/GoogleServiceAccountKey.js'; export const GoogleServiceAccountKeyQuery = { async getAllForAccountAsync(accountName: string): Promise { diff --git a/packages/eas-cli/src/credentials/android/credentials.ts b/packages/eas-cli/src/credentials/android/credentials.ts index adecaa5f3d..83676283ca 100644 --- a/packages/eas-cli/src/credentials/android/credentials.ts +++ b/packages/eas-cli/src/credentials/android/credentials.ts @@ -1,5 +1,5 @@ -import { AndroidKeystoreType } from '../../graphql/generated'; -import { CredentialSchema } from '../utils/promptForCredentials'; +import { AndroidKeystoreType } from '../../graphql/generated.js'; +import { CredentialSchema } from '../utils/promptForCredentials.js'; export interface FcmCredentials { fcmApiKey: string; diff --git a/packages/eas-cli/src/credentials/android/utils/__tests__/googleServiceAccountKey-test.ts b/packages/eas-cli/src/credentials/android/utils/__tests__/googleServiceAccountKey-test.ts index fce8d29180..3b8be00eb5 100644 --- a/packages/eas-cli/src/credentials/android/utils/__tests__/googleServiceAccountKey-test.ts +++ b/packages/eas-cli/src/credentials/android/utils/__tests__/googleServiceAccountKey-test.ts @@ -1,7 +1,7 @@ import { vol } from 'memfs'; -import { confirmAsync, promptAsync } from '../../../../prompts'; -import { detectGoogleServiceAccountKeyPathAsync } from '../googleServiceAccountKey'; +import { confirmAsync, promptAsync } from '../../../../prompts.js'; +import { detectGoogleServiceAccountKeyPathAsync } from '../googleServiceAccountKey.js'; jest.mock('fs'); jest.mock('../../../../prompts'); diff --git a/packages/eas-cli/src/credentials/android/utils/__tests__/keystoreNew-test.ts b/packages/eas-cli/src/credentials/android/utils/__tests__/keystoreNew-test.ts index 4108e0c9f0..9b88428543 100644 --- a/packages/eas-cli/src/credentials/android/utils/__tests__/keystoreNew-test.ts +++ b/packages/eas-cli/src/credentials/android/utils/__tests__/keystoreNew-test.ts @@ -1,10 +1,10 @@ -import { AndroidKeystoreType } from '../../../../graphql/generated'; +import { AndroidKeystoreType } from '../../../../graphql/generated.js'; import { testKeystore, testPKCS12EmptyPasswordKeystore, testPKCS12Keystore, -} from '../../../__tests__/fixtures-android'; -import { getKeystoreType, getKeystoreWithType, validateKeystore } from '../keystoreNew'; +} from '../../../__tests__/fixtures-android.js'; +import { getKeystoreType, getKeystoreWithType, validateKeystore } from '../keystoreNew.js'; describe('getKeystoreType', () => { it('identifies a valid jks keystore', async () => { diff --git a/packages/eas-cli/src/credentials/android/utils/__tests__/printCredentials-test.ts b/packages/eas-cli/src/credentials/android/utils/__tests__/printCredentials-test.ts index 9c6ed9f351..003c598240 100644 --- a/packages/eas-cli/src/credentials/android/utils/__tests__/printCredentials-test.ts +++ b/packages/eas-cli/src/credentials/android/utils/__tests__/printCredentials-test.ts @@ -1,14 +1,14 @@ import mockdate from 'mockdate'; -import Log from '../../../../log'; +import Log from '../../../../log.js'; import { testAndroidAppCredentialsFragment, testGoogleServiceAccountKeyFragment, testLegacyAndroidFcmFragment, -} from '../../../__tests__/fixtures-android'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../../actions/BuildCredentialsUtils'; -import { displayAndroidAppCredentials } from '../printCredentials'; +} from '../../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../../actions/BuildCredentialsUtils.js'; +import { displayAndroidAppCredentials } from '../printCredentials.js'; jest.mock('../../../../log'); jest.mock('chalk', () => ({ bold: jest.fn(log => log), cyan: { bold: jest.fn(log => log) } })); diff --git a/packages/eas-cli/src/credentials/android/utils/googleServiceAccountKey.ts b/packages/eas-cli/src/credentials/android/utils/googleServiceAccountKey.ts index c659c95e64..6d6d602178 100644 --- a/packages/eas-cli/src/credentials/android/utils/googleServiceAccountKey.ts +++ b/packages/eas-cli/src/credentials/android/utils/googleServiceAccountKey.ts @@ -1,14 +1,16 @@ -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import chalk from 'chalk'; import glob from 'fast-glob'; import Joi from 'joi'; import path from 'path'; -import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { fromNow } from '../../../utils/date'; -import { GoogleServiceAccountKey } from '../credentials'; +import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { fromNow } from '../../../utils/date.js'; +import { GoogleServiceAccountKey } from '../credentials.js'; + +const JsonFile = JsonFileModule.default; export const MinimalGoogleServiceAccountKeySchema = Joi.object({ type: Joi.string().required(), diff --git a/packages/eas-cli/src/credentials/android/utils/keystore.ts b/packages/eas-cli/src/credentials/android/utils/keystore.ts index c017d1464b..0c43483392 100644 --- a/packages/eas-cli/src/credentials/android/utils/keystore.ts +++ b/packages/eas-cli/src/credentials/android/utils/keystore.ts @@ -1,18 +1,18 @@ -import spawnAsync from '@expo/spawn-async'; +import { default as spawnAsync } from '@expo/spawn-async'; import chalk from 'chalk'; import crypto from 'crypto'; import fs from 'fs-extra'; import path from 'path'; import { v4 as uuidv4 } from 'uuid'; -import { Analytics, BuildEvent } from '../../../analytics/events'; -import fetch from '../../../fetch'; -import { AndroidKeystoreType } from '../../../graphql/generated'; -import { KeystoreGenerationUrlMutation } from '../../../graphql/mutations/KeystoreGenerationUrlMutation'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { getTmpDirectory } from '../../../utils/paths'; -import { KeystoreWithType } from '../credentials'; +import { Analytics, BuildEvent } from '../../../analytics/events.js'; +import fetch from '../../../fetch.js'; +import { AndroidKeystoreType } from '../../../graphql/generated.js'; +import { KeystoreGenerationUrlMutation } from '../../../graphql/mutations/KeystoreGenerationUrlMutation.js'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { getTmpDirectory } from '../../../utils/paths.js'; +import { KeystoreWithType } from '../credentials.js'; interface KeystoreParams { keystorePassword: string; diff --git a/packages/eas-cli/src/credentials/android/utils/keystoreNew.ts b/packages/eas-cli/src/credentials/android/utils/keystoreNew.ts index ca84659ebe..7ebd1bac9b 100644 --- a/packages/eas-cli/src/credentials/android/utils/keystoreNew.ts +++ b/packages/eas-cli/src/credentials/android/utils/keystoreNew.ts @@ -2,9 +2,9 @@ import { getX509Asn1ByFriendlyName, parsePKCS12 } from '@expo/pkcs12'; import jks from 'jks-js'; import { asn1 } from 'node-forge'; -import { AndroidKeystoreType } from '../../../graphql/generated'; -import Log from '../../../log'; -import { Keystore, KeystoreWithType } from '../credentials'; +import { AndroidKeystoreType } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { Keystore, KeystoreWithType } from '../credentials.js'; export function getKeystoreWithType(keystore: Keystore): KeystoreWithType { const type = getKeystoreType(keystore); diff --git a/packages/eas-cli/src/credentials/android/utils/printCredentials.ts b/packages/eas-cli/src/credentials/android/utils/printCredentials.ts index dae3b1d586..61183dcbb3 100644 --- a/packages/eas-cli/src/credentials/android/utils/printCredentials.ts +++ b/packages/eas-cli/src/credentials/android/utils/printCredentials.ts @@ -7,12 +7,12 @@ import { CommonAndroidAppCredentialsFragment, FcmSnippetLegacy, FcmSnippetV1, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { fromNow } from '../../../utils/date'; -import formatFields from '../../../utils/formatFields'; -import { sortBuildCredentials } from '../actions/BuildCredentialsUtils'; -import { AppLookupParams } from '../api/GraphqlClient'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { fromNow } from '../../../utils/date.js'; +import formatFields from '../../../utils/formatFields.js'; +import { sortBuildCredentials } from '../actions/BuildCredentialsUtils.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; export function displayEmptyAndroidCredentials(appLookupParams: AppLookupParams): void { const { projectName, androidApplicationIdentifier } = appLookupParams; diff --git a/packages/eas-cli/src/credentials/context.ts b/packages/eas-cli/src/credentials/context.ts index 7bf6a6e4fa..8912a180cb 100644 --- a/packages/eas-cli/src/credentials/context.ts +++ b/packages/eas-cli/src/credentials/context.ts @@ -2,15 +2,15 @@ import { ExpoConfig } from '@expo/config'; import { Env } from '@expo/eas-build-job'; import chalk from 'chalk'; -import Log from '../log'; -import { getExpoConfig } from '../project/expoConfig'; -import { getProjectAccountName } from '../project/projectUtils'; -import { confirmAsync } from '../prompts'; -import { Actor, getActorDisplayName } from '../user/User'; -import * as AndroidGraphqlClient from './android/api/GraphqlClient'; -import * as IosGraphqlClient from './ios/api/GraphqlClient'; -import AppStoreApi from './ios/appstore/AppStoreApi'; -import { AuthenticationMode } from './ios/appstore/authenticateTypes'; +import Log from '../log.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { getProjectAccountName } from '../project/projectUtils.js'; +import { confirmAsync } from '../prompts.js'; +import { Actor, getActorDisplayName } from '../user/User.js'; +import * as AndroidGraphqlClient from './android/api/GraphqlClient.js'; +import * as IosGraphqlClient from './ios/api/GraphqlClient.js'; +import AppStoreApi from './ios/appstore/AppStoreApi.js'; +import { AuthenticationMode } from './ios/appstore/authenticateTypes.js'; export class CredentialsContext { public readonly android = AndroidGraphqlClient; diff --git a/packages/eas-cli/src/credentials/credentialsJson/__tests__/read-test.ts b/packages/eas-cli/src/credentials/credentialsJson/__tests__/read-test.ts index 1b5c3d773b..946193c6a2 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/__tests__/read-test.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/__tests__/read-test.ts @@ -1,8 +1,8 @@ import { vol } from 'memfs'; -import { findApplicationTarget } from '../../../project/ios/target'; -import { testTargets } from '../../__tests__/fixtures-ios'; -import * as credentialsJsonReader from '../read'; +import { findApplicationTarget } from '../../../project/ios/target.js'; +import { testTargets } from '../../__tests__/fixtures-ios.js'; +import * as credentialsJsonReader from '../read.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/credentials/credentialsJson/__tests__/update-test.ts b/packages/eas-cli/src/credentials/credentialsJson/__tests__/update-test.ts index 8f83ffdf17..644a10752b 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/__tests__/update-test.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/__tests__/update-test.ts @@ -2,21 +2,21 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import prompts from 'prompts'; -import { IosDistributionType } from '../../../graphql/generated'; +import { IosDistributionType } from '../../../graphql/generated.js'; import { testKeystore, testLegacyAndroidBuildCredentialsFragment, -} from '../../__tests__/fixtures-android'; -import { createCtxMock } from '../../__tests__/fixtures-context'; +} from '../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testCommonIosAppCredentialsFragment, testDistCertFragmentNoDependencies, testProvisioningProfileFragment, -} from '../../__tests__/fixtures-ios'; -import { getAppFromContext } from '../../ios/actions/BuildCredentialsUtils'; -import { Target } from '../../ios/types'; -import { updateAndroidCredentialsAsync, updateIosCredentialsAsync } from '../update'; +} from '../../__tests__/fixtures-ios.js'; +import { getAppFromContext } from '../../ios/actions/BuildCredentialsUtils.js'; +import { Target } from '../../ios/types.js'; +import { updateAndroidCredentialsAsync, updateIosCredentialsAsync } from '../update.js'; jest.mock('fs'); jest.mock('prompts'); diff --git a/packages/eas-cli/src/credentials/credentialsJson/read.ts b/packages/eas-cli/src/credentials/credentialsJson/read.ts index 62202fbcc9..27f01010d7 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/read.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/read.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import path from 'path'; -import { Target } from '../ios/types'; +import { Target } from '../ios/types.js'; import { AndroidCredentials, CredentialsJson, @@ -10,8 +10,8 @@ import { CredentialsJsonSchema, IosCredentials, IosTargetCredentials, -} from './types'; -import { getCredentialsJsonPath } from './utils'; +} from './types.js'; +import { getCredentialsJsonPath } from './utils.js'; export async function readAndroidCredentialsAsync(projectDir: string): Promise { const credentialsJson = await readAsync(projectDir); diff --git a/packages/eas-cli/src/credentials/credentialsJson/types.ts b/packages/eas-cli/src/credentials/credentialsJson/types.ts index e7e9de6ccc..00b0a0520a 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/types.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/types.ts @@ -1,6 +1,6 @@ import Joi from 'joi'; -import { Keystore } from '../android/credentials'; +import { Keystore } from '../android/credentials.js'; export interface CredentialsJson { android?: CredentialsJsonAndroidCredentials; diff --git a/packages/eas-cli/src/credentials/credentialsJson/update.ts b/packages/eas-cli/src/credentials/credentialsJson/update.ts index 4e7362fca8..11e9982b73 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/update.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/update.ts @@ -1,22 +1,25 @@ import fs from 'fs-extra'; -import nullthrows from 'nullthrows'; import path from 'path'; -import { AndroidAppBuildCredentialsFragment, IosDistributionType } from '../../graphql/generated'; -import Log from '../../log'; -import { findApplicationTarget, findTargetByName } from '../../project/ios/target'; -import zipObject from '../../utils/expodash/zipObject'; -import { getVcsClient } from '../../vcs'; -import GitClient from '../../vcs/clients/git'; -import { CredentialsContext } from '../context'; -import { App, Target, TargetCredentials } from '../ios/types'; -import { readRawAsync } from './read'; +import { + AndroidAppBuildCredentialsFragment, + IosDistributionType, +} from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { findApplicationTarget, findTargetByName } from '../../project/ios/target.js'; +import zipObject from '../../utils/expodash/zipObject.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import GitClient from '../../vcs/clients/git.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { CredentialsContext } from '../context.js'; +import { App, Target, TargetCredentials } from '../ios/types.js'; +import { readRawAsync } from './read.js'; import { CredentialsJson, CredentialsJsonIosCredentials, CredentialsJsonIosTargetCredentials, -} from './types'; -import { getCredentialsJsonPath } from './utils'; +} from './types.js'; +import { getCredentialsJsonPath } from './utils.js'; /** * Update Android credentials.json with values from www, content of credentials.json diff --git a/packages/eas-cli/src/credentials/credentialsJson/utils.ts b/packages/eas-cli/src/credentials/credentialsJson/utils.ts index bdab3b8176..6745232214 100644 --- a/packages/eas-cli/src/credentials/credentialsJson/utils.ts +++ b/packages/eas-cli/src/credentials/credentialsJson/utils.ts @@ -1,7 +1,7 @@ import path from 'path'; -import { Target } from '../ios/types'; -import { IosCredentials } from './types'; +import { Target } from '../ios/types.js'; +import { IosCredentials } from './types.js'; export function getCredentialsJsonPath(projectDir: string): string { return path.join(projectDir, 'credentials.json'); diff --git a/packages/eas-cli/src/credentials/ios/IosCredentialsProvider.ts b/packages/eas-cli/src/credentials/ios/IosCredentialsProvider.ts index d0ef3701f0..de8e24e8fc 100644 --- a/packages/eas-cli/src/credentials/ios/IosCredentialsProvider.ts +++ b/packages/eas-cli/src/credentials/ios/IosCredentialsProvider.ts @@ -1,18 +1,18 @@ import { Platform } from '@expo/eas-build-job'; import { CredentialsSource, DistributionType, IosEnterpriseProvisioning } from '@expo/eas-json'; -import { CommonIosAppCredentialsFragment } from '../../graphql/generated'; -import Log from '../../log'; -import { findApplicationTarget } from '../../project/ios/target'; -import { confirmAsync } from '../../prompts'; -import { CredentialsContext } from '../context'; -import * as credentialsJsonReader from '../credentialsJson/read'; -import { ensureAllTargetsAreConfigured } from '../credentialsJson/utils'; -import { getAppFromContext } from './actions/BuildCredentialsUtils'; -import { SetUpBuildCredentials } from './actions/SetUpBuildCredentials'; -import { SetUpPushKey } from './actions/SetUpPushKey'; -import { App, IosCredentials, Target } from './types'; -import { isAdHocProfile } from './utils/provisioningProfile'; +import { CommonIosAppCredentialsFragment } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { findApplicationTarget } from '../../project/ios/target.js'; +import { confirmAsync } from '../../prompts.js'; +import { CredentialsContext } from '../context.js'; +import * as credentialsJsonReader from '../credentialsJson/read.js'; +import { ensureAllTargetsAreConfigured } from '../credentialsJson/utils.js'; +import { getAppFromContext } from './actions/BuildCredentialsUtils.js'; +import { SetUpBuildCredentials } from './actions/SetUpBuildCredentials.js'; +import { SetUpPushKey } from './actions/SetUpPushKey.js'; +import { App, IosCredentials, Target } from './types.js'; +import { isAdHocProfile } from './utils/provisioningProfile.js'; interface Options { app: App; diff --git a/packages/eas-cli/src/credentials/ios/__tests__/IosCredentialsProvider-test.ts b/packages/eas-cli/src/credentials/ios/__tests__/IosCredentialsProvider-test.ts index 7097237229..d6dae5c809 100644 --- a/packages/eas-cli/src/credentials/ios/__tests__/IosCredentialsProvider-test.ts +++ b/packages/eas-cli/src/credentials/ios/__tests__/IosCredentialsProvider-test.ts @@ -1,17 +1,17 @@ import { CredentialsSource } from '@expo/eas-json'; import { vol } from 'memfs'; -import { IosAppBuildCredentialsFragment } from '../../../graphql/generated'; -import { findApplicationTarget } from '../../../project/ios/target'; -import { getAppstoreMock } from '../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../__tests__/fixtures-context'; +import { IosAppBuildCredentialsFragment } from '../../../graphql/generated.js'; +import { findApplicationTarget } from '../../../project/ios/target.js'; +import { getAppstoreMock } from '../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testCommonIosAppCredentialsFragment, testTargets, -} from '../../__tests__/fixtures-ios'; -import IosCredentialsProvider from '../IosCredentialsProvider'; -import { getAppLookupParamsFromContext } from '../actions/BuildCredentialsUtils'; +} from '../../__tests__/fixtures-ios.js'; +import IosCredentialsProvider from '../IosCredentialsProvider.js'; +import { getAppLookupParamsFromContext } from '../actions/BuildCredentialsUtils.js'; jest.mock('fs'); jest.mock('../validators/validateProvisioningProfile', () => ({ diff --git a/packages/eas-cli/src/credentials/ios/actions/AppleTeamUtils.ts b/packages/eas-cli/src/credentials/ios/actions/AppleTeamUtils.ts index f6beb6be6b..7f38b26bd3 100644 --- a/packages/eas-cli/src/credentials/ios/actions/AppleTeamUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/AppleTeamUtils.ts @@ -1,6 +1,6 @@ -import { AppleTeamFragment } from '../../../graphql/generated'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; +import { AppleTeamFragment } from '../../../graphql/generated.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; export async function resolveAppleTeamIfAuthenticatedAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/ios/actions/AscApiKeyUtils.ts b/packages/eas-cli/src/credentials/ios/actions/AscApiKeyUtils.ts index 6d6b7a6460..bdf3de7a0b 100644 --- a/packages/eas-cli/src/credentials/ios/actions/AscApiKeyUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/AscApiKeyUtils.ts @@ -3,25 +3,25 @@ import fs from 'fs-extra'; import { nanoid } from 'nanoid'; import path from 'path'; -import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { fromNow } from '../../../utils/date'; -import { CredentialsContext } from '../../context'; +import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { fromNow } from '../../../utils/date.js'; +import { CredentialsContext } from '../../context.js'; import { getCredentialsFromUserAsync, shouldAutoGenerateCredentialsAsync, -} from '../../utils/promptForCredentials'; -import { AscApiKey } from '../appstore/Credentials.types'; +} from '../../utils/promptForCredentials.js'; +import { AscApiKey } from '../appstore/Credentials.types.js'; import { AscApiKeyPath, MinimalAscApiKey, ascApiKeyIdSchema, ascApiKeyIssuerIdSchema, -} from '../credentials'; -import { isAscApiKeyValidAndTrackedAsync } from '../validators/validateAscApiKey'; -import { formatAppleTeam } from './AppleTeamUtils'; +} from '../credentials.js'; +import { isAscApiKeyValidAndTrackedAsync } from '../validators/validateAscApiKey.js'; +import { formatAppleTeam } from './AppleTeamUtils.js'; export enum AppStoreApiKeyPurpose { SUBMISSION_SERVICE = 'EAS Submit', diff --git a/packages/eas-cli/src/credentials/ios/actions/AssignAscApiKey.ts b/packages/eas-cli/src/credentials/ios/actions/AssignAscApiKey.ts index ee51d42fad..64352ae8fa 100644 --- a/packages/eas-cli/src/credentials/ios/actions/AssignAscApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/AssignAscApiKey.ts @@ -1,12 +1,12 @@ import { AppStoreConnectApiKeyFragment, CommonIosAppCredentialsFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; -import { AppStoreApiKeyPurpose } from './AscApiKeyUtils'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; +import { AppStoreApiKeyPurpose } from './AscApiKeyUtils.js'; export class AssignAscApiKey { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/AssignPushKey.ts b/packages/eas-cli/src/credentials/ios/actions/AssignPushKey.ts index 20de4165e9..da6443d4f1 100644 --- a/packages/eas-cli/src/credentials/ios/actions/AssignPushKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/AssignPushKey.ts @@ -1,8 +1,11 @@ -import { ApplePushKeyFragment, CommonIosAppCredentialsFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; +import { + ApplePushKeyFragment, + CommonIosAppCredentialsFragment, +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; export class AssignPushKey { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/BuildCredentialsUtils.ts b/packages/eas-cli/src/credentials/ios/actions/BuildCredentialsUtils.ts index d27bb686e4..d08229078e 100644 --- a/packages/eas-cli/src/credentials/ios/actions/BuildCredentialsUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/BuildCredentialsUtils.ts @@ -1,18 +1,17 @@ -import nullthrows from 'nullthrows'; - import { AppleDistributionCertificateFragment, AppleProvisioningProfileFragment, AppleTeamFragment, IosDistributionType as GraphQLIosDistributionType, IosAppBuildCredentialsFragment, -} from '../../../graphql/generated'; -import { getProjectAccountName } from '../../../project/projectUtils'; -import { findAccountByName } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { App, Target } from '../types'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; +} from '../../../graphql/generated.js'; +import { getProjectAccountName } from '../../../project/projectUtils.js'; +import { findAccountByName } from '../../../user/Account.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { App, Target } from '../types.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; export async function getAllBuildCredentialsAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/ios/actions/ConfigureProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/ConfigureProvisioningProfile.ts index 0068bbc9a0..696ba7bbd2 100644 --- a/packages/eas-cli/src/credentials/ios/actions/ConfigureProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/ConfigureProvisioningProfile.ts @@ -4,15 +4,15 @@ import chalk from 'chalk'; import { AppleDistributionCertificateFragment, AppleProvisioningProfileFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation'; -import { ProvisioningProfileStoreInfo } from '../appstore/Credentials.types'; -import { AuthCtx } from '../appstore/authenticateTypes'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation.js'; +import { ProvisioningProfileStoreInfo } from '../appstore/Credentials.types.js'; +import { AuthCtx } from '../appstore/authenticateTypes.js'; export class ConfigureProvisioningProfile { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/CreateAscApiKey.ts b/packages/eas-cli/src/credentials/ios/actions/CreateAscApiKey.ts index 9dd4bcb0f4..5fec28f904 100644 --- a/packages/eas-cli/src/credentials/ios/actions/CreateAscApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/CreateAscApiKey.ts @@ -1,8 +1,8 @@ -import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { AppStoreApiKeyPurpose, provideOrGenerateAscApiKeyAsync } from './AscApiKeyUtils'; +import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { AppStoreApiKeyPurpose, provideOrGenerateAscApiKeyAsync } from './AscApiKeyUtils.js'; export class CreateAscApiKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/CreateDistributionCertificate.ts b/packages/eas-cli/src/credentials/ios/actions/CreateDistributionCertificate.ts index 343880818d..69ebaa3cd4 100644 --- a/packages/eas-cli/src/credentials/ios/actions/CreateDistributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/actions/CreateDistributionCertificate.ts @@ -1,8 +1,8 @@ -import Log from '../../../log'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { AppleDistributionCertificateMutationResult } from '../api/graphql/mutations/AppleDistributionCertificateMutation'; -import { provideOrGenerateDistributionCertificateAsync } from './DistributionCertificateUtils'; +import Log from '../../../log.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { AppleDistributionCertificateMutationResult } from '../api/graphql/mutations/AppleDistributionCertificateMutation.js'; +import { provideOrGenerateDistributionCertificateAsync } from './DistributionCertificateUtils.js'; export class CreateDistributionCertificate { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/CreateProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/CreateProvisioningProfile.ts index b4d5efa585..b020de9c47 100644 --- a/packages/eas-cli/src/credentials/ios/actions/CreateProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/CreateProvisioningProfile.ts @@ -1,18 +1,18 @@ import assert from 'assert'; -import nullthrows from 'nullthrows'; -import { AppleDistributionCertificateFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { askForUserProvidedAsync } from '../../utils/promptForCredentials'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation'; -import { ProvisioningProfile } from '../appstore/Credentials.types'; -import { AuthCtx } from '../appstore/authenticateTypes'; -import { provisioningProfileSchema } from '../credentials'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; -import { generateProvisioningProfileAsync } from './ProvisioningProfileUtils'; +import { AppleDistributionCertificateFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { askForUserProvidedAsync } from '../../utils/promptForCredentials.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AppleProvisioningProfileMutationResult } from '../api/graphql/mutations/AppleProvisioningProfileMutation.js'; +import { ProvisioningProfile } from '../appstore/Credentials.types.js'; +import { AuthCtx } from '../appstore/authenticateTypes.js'; +import { provisioningProfileSchema } from '../credentials.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; +import { generateProvisioningProfileAsync } from './ProvisioningProfileUtils.js'; export class CreateProvisioningProfile { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/CreatePushKey.ts b/packages/eas-cli/src/credentials/ios/actions/CreatePushKey.ts index 71793a5754..6d54870ab5 100644 --- a/packages/eas-cli/src/credentials/ios/actions/CreatePushKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/CreatePushKey.ts @@ -1,8 +1,8 @@ -import { ApplePushKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { provideOrGeneratePushKeyAsync } from './PushKeyUtils'; +import { ApplePushKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { provideOrGeneratePushKeyAsync } from './PushKeyUtils.js'; export class CreatePushKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/DeviceUtils.ts b/packages/eas-cli/src/credentials/ios/actions/DeviceUtils.ts index f2fd336bf5..ed0a872cdd 100644 --- a/packages/eas-cli/src/credentials/ios/actions/DeviceUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/DeviceUtils.ts @@ -1,6 +1,6 @@ -import { AppleDevice, AppleDeviceFragment } from '../../../graphql/generated'; -import { APPLE_DEVICE_CLASS_LABELS } from '../../../graphql/types/credentials/AppleDevice'; -import { promptAsync } from '../.././../prompts'; +import { AppleDevice, AppleDeviceFragment } from '../../../graphql/generated.js'; +import { APPLE_DEVICE_CLASS_LABELS } from '../../../graphql/types/credentials/AppleDevice.js'; +import { promptAsync } from '../.././../prompts.js'; export async function chooseDevicesAsync( allDevices: AppleDeviceFragment[], diff --git a/packages/eas-cli/src/credentials/ios/actions/DistributionCertificateUtils.ts b/packages/eas-cli/src/credentials/ios/actions/DistributionCertificateUtils.ts index a9ad7180a5..284106f954 100644 --- a/packages/eas-cli/src/credentials/ios/actions/DistributionCertificateUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/DistributionCertificateUtils.ts @@ -2,23 +2,23 @@ import assert from 'assert'; import chalk from 'chalk'; import dateformat from 'dateformat'; -import { AppleDistributionCertificateFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { fromNow } from '../../../utils/date'; -import { CredentialsContext } from '../../context'; -import { askForUserProvidedAsync } from '../../utils/promptForCredentials'; -import { AppLookupParams } from '../api/GraphqlClient'; +import { AppleDistributionCertificateFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { fromNow } from '../../../utils/date.js'; +import { CredentialsContext } from '../../context.js'; +import { askForUserProvidedAsync } from '../../utils/promptForCredentials.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; import { DistributionCertificate, DistributionCertificateStoreInfo, -} from '../appstore/Credentials.types'; -import { filterRevokedDistributionCertsFromEasServers } from '../appstore/CredentialsUtils'; -import { AppleTooManyCertsError } from '../appstore/distributionCertificate'; -import { distributionCertificateSchema } from '../credentials'; -import { validateDistributionCertificateAsync } from '../validators/validateDistributionCertificate'; -import { formatAppleTeam } from './AppleTeamUtils'; +} from '../appstore/Credentials.types.js'; +import { filterRevokedDistributionCertsFromEasServers } from '../appstore/CredentialsUtils.js'; +import { AppleTooManyCertsError } from '../appstore/distributionCertificate.js'; +import { distributionCertificateSchema } from '../credentials.js'; +import { validateDistributionCertificateAsync } from '../validators/validateDistributionCertificate.js'; +import { formatAppleTeam } from './AppleTeamUtils.js'; export function formatDistributionCertificate( distributionCertificate: AppleDistributionCertificateFragment, diff --git a/packages/eas-cli/src/credentials/ios/actions/ProvisioningProfileUtils.ts b/packages/eas-cli/src/credentials/ios/actions/ProvisioningProfileUtils.ts index c76e979fab..050e52307f 100644 --- a/packages/eas-cli/src/credentials/ios/actions/ProvisioningProfileUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/ProvisioningProfileUtils.ts @@ -1,11 +1,11 @@ import chalk from 'chalk'; -import { CredentialsContext } from '../../context'; +import { CredentialsContext } from '../../context.js'; import { DistributionCertificate, ProvisioningProfile, ProvisioningProfileStoreInfo, -} from '../appstore/Credentials.types'; +} from '../appstore/Credentials.types.js'; export function formatProvisioningProfileFromApple( appleInfo: ProvisioningProfileStoreInfo diff --git a/packages/eas-cli/src/credentials/ios/actions/PushKeyUtils.ts b/packages/eas-cli/src/credentials/ios/actions/PushKeyUtils.ts index a78f290434..a496ec2f37 100644 --- a/packages/eas-cli/src/credentials/ios/actions/PushKeyUtils.ts +++ b/packages/eas-cli/src/credentials/ios/actions/PushKeyUtils.ts @@ -1,18 +1,18 @@ import chalk from 'chalk'; -import { ApplePushKeyFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { fromNow } from '../../../utils/date'; -import { CredentialsContext } from '../../context'; -import { askForUserProvidedAsync } from '../../utils/promptForCredentials'; -import { PushKey, PushKeyStoreInfo } from '../appstore/Credentials.types'; -import { filterRevokedAndUntrackedPushKeysFromEasServersAsync } from '../appstore/CredentialsUtils'; -import { APPLE_KEYS_TOO_MANY_GENERATED_ERROR } from '../appstore/pushKey'; -import { pushKeySchema } from '../credentials'; -import { isPushKeyValidAndTrackedAsync } from '../validators/validatePushKey'; -import { formatAppleTeam } from './AppleTeamUtils'; +import { ApplePushKeyFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { fromNow } from '../../../utils/date.js'; +import { CredentialsContext } from '../../context.js'; +import { askForUserProvidedAsync } from '../../utils/promptForCredentials.js'; +import { PushKey, PushKeyStoreInfo } from '../appstore/Credentials.types.js'; +import { filterRevokedAndUntrackedPushKeysFromEasServersAsync } from '../appstore/CredentialsUtils.js'; +import { APPLE_KEYS_TOO_MANY_GENERATED_ERROR } from '../appstore/pushKey.js'; +import { pushKeySchema } from '../credentials.js'; +import { isPushKeyValidAndTrackedAsync } from '../validators/validatePushKey.js'; +import { formatAppleTeam } from './AppleTeamUtils.js'; export async function provideOrGeneratePushKeyAsync(ctx: CredentialsContext): Promise { if (!ctx.nonInteractive) { diff --git a/packages/eas-cli/src/credentials/ios/actions/RemoveAscApiKey.ts b/packages/eas-cli/src/credentials/ios/actions/RemoveAscApiKey.ts index 2ff38cf54c..8c210cd092 100644 --- a/packages/eas-cli/src/credentials/ios/actions/RemoveAscApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/RemoveAscApiKey.ts @@ -1,9 +1,9 @@ -import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { selectAscApiKeysFromAccountAsync } from './AscApiKeyUtils'; +import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { selectAscApiKeysFromAccountAsync } from './AscApiKeyUtils.js'; export class SelectAndRemoveAscApiKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/RemoveDistributionCertificate.ts b/packages/eas-cli/src/credentials/ios/actions/RemoveDistributionCertificate.ts index b061a7e93f..04b1478265 100644 --- a/packages/eas-cli/src/credentials/ios/actions/RemoveDistributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/actions/RemoveDistributionCertificate.ts @@ -1,14 +1,14 @@ import { AppleDistributionCertificateFragment, AppleProvisioningProfileIdentifiersFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { selectDistributionCertificateWithDependenciesAsync } from './DistributionCertificateUtils'; -import { RemoveProvisioningProfiles } from './RemoveProvisioningProfile'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { selectDistributionCertificateWithDependenciesAsync } from './DistributionCertificateUtils.js'; +import { RemoveProvisioningProfiles } from './RemoveProvisioningProfile.js'; export class SelectAndRemoveDistributionCertificate { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/RemoveProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/RemoveProvisioningProfile.ts index 8399bc7d68..0f6aeead8a 100644 --- a/packages/eas-cli/src/credentials/ios/actions/RemoveProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/RemoveProvisioningProfile.ts @@ -1,9 +1,9 @@ import assert from 'assert'; -import { AppleProvisioningProfileIdentifiersFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; +import { AppleProvisioningProfileIdentifiersFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; export class RemoveProvisioningProfiles { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/RemovePushKey.ts b/packages/eas-cli/src/credentials/ios/actions/RemovePushKey.ts index 28511a60b9..1eb5b2a7f7 100644 --- a/packages/eas-cli/src/credentials/ios/actions/RemovePushKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/RemovePushKey.ts @@ -1,9 +1,9 @@ -import { ApplePushKeyFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { CredentialsContext } from '../../context'; -import { selectPushKeyAsync } from './PushKeyUtils'; +import { ApplePushKeyFragment } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { CredentialsContext } from '../../context.js'; +import { selectPushKeyAsync } from './PushKeyUtils.js'; export class SelectAndRemovePushKey { constructor(private account: Account) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts index d0ec270d0a..c60761d898 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts @@ -1,8 +1,7 @@ import assert from 'assert'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; -import DeviceCreateAction, { RegistrationMethod } from '../../../devices/actions/create/action'; +import DeviceCreateAction, { RegistrationMethod } from '../../../devices/actions/create/action.js'; import { AppleDeviceFragment, AppleDistributionCertificateFragment, @@ -10,18 +9,19 @@ import { AppleTeamFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync, pressAnyKeyToContinueAsync, promptAsync } from '../../../prompts'; -import differenceBy from '../../../utils/expodash/differenceBy'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { validateProvisioningProfileAsync } from '../validators/validateProvisioningProfile'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; -import { assignBuildCredentialsAsync, getBuildCredentialsAsync } from './BuildCredentialsUtils'; -import { chooseDevicesAsync, formatDeviceLabel } from './DeviceUtils'; -import { SetUpDistributionCertificate } from './SetUpDistributionCertificate'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync, pressAnyKeyToContinueAsync, promptAsync } from '../../../prompts.js'; +import differenceBy from '../../../utils/expodash/differenceBy.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { validateProvisioningProfileAsync } from '../validators/validateProvisioningProfile.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; +import { assignBuildCredentialsAsync, getBuildCredentialsAsync } from './BuildCredentialsUtils.js'; +import { chooseDevicesAsync, formatDeviceLabel } from './DeviceUtils.js'; +import { SetUpDistributionCertificate } from './SetUpDistributionCertificate.js'; enum ReuseAction { Yes, diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpAscApiKey.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpAscApiKey.ts index 64415bdcf8..3b58530d74 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpAscApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpAscApiKey.ts @@ -1,28 +1,28 @@ import assert from 'assert'; -import nullthrows from 'nullthrows'; import { AppStoreConnectApiKeyFragment, CommonIosAppCredentialsFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; import { MissingCredentialsNonInteractiveError, UnsupportedCredentialsChoiceError, -} from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { getValidAndTrackedAscApiKeysAsync } from '../validators/validateAscApiKey'; +} from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { getValidAndTrackedAscApiKeysAsync } from '../validators/validateAscApiKey.js'; import { AppStoreApiKeyPurpose, formatAscApiKey, getAscApiKeysFromAccountAsync, selectAscApiKeysFromAccountAsync, sortAscApiKeysByUpdatedAtDesc, -} from './AscApiKeyUtils'; -import { AssignAscApiKey } from './AssignAscApiKey'; -import { CreateAscApiKey } from './CreateAscApiKey'; +} from './AscApiKeyUtils.js'; +import { AssignAscApiKey } from './AssignAscApiKey.js'; +import { CreateAscApiKey } from './CreateAscApiKey.js'; export enum SetupAscApiKeyChoice { GENERATE = 'GENERATE', diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentials.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentials.ts index 3d6582074d..e410f761dc 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentials.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentials.ts @@ -1,12 +1,12 @@ import { DistributionType, IosEnterpriseProvisioning } from '@expo/eas-json'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { App, IosAppBuildCredentialsMap, IosCredentials, Target } from '../types'; -import { displayProjectCredentials } from '../utils/printCredentials'; -import { SetUpTargetBuildCredentials } from './SetUpTargetBuildCredentials'; +import Log from '../../../log.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { App, IosAppBuildCredentialsMap, IosCredentials, Target } from '../types.js'; +import { displayProjectCredentials } from '../utils/printCredentials.js'; +import { SetUpTargetBuildCredentials } from './SetUpTargetBuildCredentials.js'; interface Options { app: App; diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.ts index ee0f47e0c5..1b92ba9478 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.ts @@ -1,14 +1,14 @@ import chalk from 'chalk'; -import { IosDistributionType } from '../../../graphql/generated'; -import Log from '../../../log'; -import { findApplicationTarget } from '../../../project/ios/target'; -import { CredentialsContext } from '../../context'; -import { readIosCredentialsAsync } from '../../credentialsJson/read'; -import { IosCredentials } from '../../credentialsJson/types'; -import { ensureAllTargetsAreConfigured } from '../../credentialsJson/utils'; -import { App, Target } from '../types'; -import { SetUpTargetBuildCredentialsFromCredentialsJson } from './SetUpTargetBuildCredentialsFromCredentialsJson'; +import { IosDistributionType } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { findApplicationTarget } from '../../../project/ios/target.js'; +import { CredentialsContext } from '../../context.js'; +import { readIosCredentialsAsync } from '../../credentialsJson/read.js'; +import { IosCredentials } from '../../credentialsJson/types.js'; +import { ensureAllTargetsAreConfigured } from '../../credentialsJson/utils.js'; +import { App, Target } from '../types.js'; +import { SetUpTargetBuildCredentialsFromCredentialsJson } from './SetUpTargetBuildCredentialsFromCredentialsJson.js'; export class SetUpBuildCredentialsFromCredentialsJson { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpDistributionCertificate.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpDistributionCertificate.ts index d36168a7df..8b2f38b30c 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpDistributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpDistributionCertificate.ts @@ -4,19 +4,19 @@ import { AppleDistributionCertificate, AppleDistributionCertificateFragment, IosDistributionType, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import sortBy from '../../../utils/expodash/sortBy'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AppleDistributionCertificateMutationResult } from '../api/graphql/mutations/AppleDistributionCertificateMutation'; -import { getValidCertSerialNumbers } from '../appstore/CredentialsUtils'; -import { AppleTeamMissingError } from '../errors'; -import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils'; -import { CreateDistributionCertificate } from './CreateDistributionCertificate'; -import { formatDistributionCertificate } from './DistributionCertificateUtils'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import sortBy from '../../../utils/expodash/sortBy.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AppleDistributionCertificateMutationResult } from '../api/graphql/mutations/AppleDistributionCertificateMutation.js'; +import { getValidCertSerialNumbers } from '../appstore/CredentialsUtils.js'; +import { AppleTeamMissingError } from '../errors.js'; +import { resolveAppleTeamIfAuthenticatedAsync } from './AppleTeamUtils.js'; +import { CreateDistributionCertificate } from './CreateDistributionCertificate.js'; +import { formatDistributionCertificate } from './DistributionCertificateUtils.js'; export class SetUpDistributionCertificate { private validDistCerts?: AppleDistributionCertificateFragment[]; diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpInternalProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpInternalProvisioningProfile.ts index 4a40e68224..29cf7913b2 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpInternalProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpInternalProvisioningProfile.ts @@ -1,11 +1,11 @@ -import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { getAllBuildCredentialsAsync } from './BuildCredentialsUtils'; -import { SetUpAdhocProvisioningProfile } from './SetUpAdhocProvisioningProfile'; -import { SetUpProvisioningProfile } from './SetUpProvisioningProfile'; +import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { getAllBuildCredentialsAsync } from './BuildCredentialsUtils.js'; +import { SetUpAdhocProvisioningProfile } from './SetUpAdhocProvisioningProfile.js'; +import { SetUpProvisioningProfile } from './SetUpProvisioningProfile.js'; /** * It's used when setting up credentials for internal distribution but `enterpriseProvisioning` is not set. diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpProvisioningProfile.ts index 2459018c53..28629365db 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpProvisioningProfile.ts @@ -1,26 +1,25 @@ -import nullthrows from 'nullthrows'; - import { AppleDistributionCertificateFragment, AppleProvisioningProfileFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../graphql/generated'; -import { confirmAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { MissingCredentialsNonInteractiveError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { ProvisioningProfileStoreInfo } from '../appstore/Credentials.types'; -import { validateProvisioningProfileAsync } from '../validators/validateProvisioningProfile'; +} from '../../../graphql/generated.js'; +import { confirmAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { MissingCredentialsNonInteractiveError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { ProvisioningProfileStoreInfo } from '../appstore/Credentials.types.js'; +import { validateProvisioningProfileAsync } from '../validators/validateProvisioningProfile.js'; import { assignBuildCredentialsAsync, getBuildCredentialsAsync, getProvisioningProfileAsync, -} from './BuildCredentialsUtils'; -import { ConfigureProvisioningProfile } from './ConfigureProvisioningProfile'; -import { CreateProvisioningProfile } from './CreateProvisioningProfile'; -import { formatProvisioningProfileFromApple } from './ProvisioningProfileUtils'; -import { SetUpDistributionCertificate } from './SetUpDistributionCertificate'; +} from './BuildCredentialsUtils.js'; +import { ConfigureProvisioningProfile } from './ConfigureProvisioningProfile.js'; +import { CreateProvisioningProfile } from './CreateProvisioningProfile.js'; +import { formatProvisioningProfileFromApple } from './ProvisioningProfileUtils.js'; +import { SetUpDistributionCertificate } from './SetUpDistributionCertificate.js'; /** * Sets up either APP_STORE or ENTERPRISE provisioning profiles diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpPushKey.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpPushKey.ts index eeb85144ec..404728eee7 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpPushKey.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpPushKey.ts @@ -1,18 +1,21 @@ import assert from 'assert'; -import nullthrows from 'nullthrows'; -import { ApplePushKeyFragment, CommonIosAppCredentialsFragment } from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AssignPushKey } from './AssignPushKey'; -import { CreatePushKey } from './CreatePushKey'; +import { + ApplePushKeyFragment, + CommonIosAppCredentialsFragment, +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AssignPushKey } from './AssignPushKey.js'; +import { CreatePushKey } from './CreatePushKey.js'; import { formatPushKey, getValidAndTrackedPushKeysOnEasServersAsync, selectPushKeyAsync, -} from './PushKeyUtils'; +} from './PushKeyUtils.js'; export class SetUpPushKey { constructor(private app: AppLookupParams) {} diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpSubmissionCredentials.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpSubmissionCredentials.ts index 9ec74e3e60..04be9cd2e6 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpSubmissionCredentials.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpSubmissionCredentials.ts @@ -1,15 +1,15 @@ import chalk from 'chalk'; -import nullthrows from 'nullthrows'; import wrapAnsi from 'wrap-ansi'; -import { CommonIosAppCredentialsFragment } from '../../../graphql/generated'; -import Log, { learnMore } from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { UnsupportedCredentialsChoiceError } from '../../errors'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { AppStoreApiKeyPurpose } from './AscApiKeyUtils'; -import { SetUpAscApiKey } from './SetUpAscApiKey'; +import { CommonIosAppCredentialsFragment } from '../../../graphql/generated.js'; +import Log, { learnMore } from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { UnsupportedCredentialsChoiceError } from '../../errors.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { AppStoreApiKeyPurpose } from './AscApiKeyUtils.js'; +import { SetUpAscApiKey } from './SetUpAscApiKey.js'; export const PROMPT_FOR_APP_SPECIFIC_PASSWORD = 'PROMPT_FOR_APP_SPECIFIC_PASSWORD'; diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentials.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentials.ts index fa9c3441c4..0704d69a74 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentials.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentials.ts @@ -4,13 +4,13 @@ import { JSONObject } from '@expo/json-file'; import { IosDistributionType as GraphQLIosDistributionType, IosAppBuildCredentialsFragment, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams as GraphQLAppLookupParams } from '../api/GraphqlClient'; -import { SetUpAdhocProvisioningProfile } from './SetUpAdhocProvisioningProfile'; -import { SetUpInternalProvisioningProfile } from './SetUpInternalProvisioningProfile'; -import { SetUpProvisioningProfile } from './SetUpProvisioningProfile'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams as GraphQLAppLookupParams } from '../api/GraphqlClient.js'; +import { SetUpAdhocProvisioningProfile } from './SetUpAdhocProvisioningProfile.js'; +import { SetUpInternalProvisioningProfile } from './SetUpInternalProvisioningProfile.js'; +import { SetUpProvisioningProfile } from './SetUpProvisioningProfile.js'; interface Options { app: GraphQLAppLookupParams; diff --git a/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.ts b/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.ts index 0d5208635a..167544f4b6 100644 --- a/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.ts +++ b/packages/eas-cli/src/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.ts @@ -1,5 +1,4 @@ import chalk from 'chalk'; -import nullthrows from 'nullthrows'; import { AppleDistributionCertificateFragment, @@ -7,20 +6,21 @@ import { AppleTeamFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../graphql/generated'; -import Log from '../../../log'; -import { confirmAsync } from '../../../prompts'; -import { CredentialsContext } from '../../context'; -import { IosTargetCredentials } from '../../credentialsJson/types'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { displayProjectCredentials } from '../utils/printCredentials'; -import { readAppleTeam } from '../utils/provisioningProfile'; +} from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { confirmAsync } from '../../../prompts.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { IosTargetCredentials } from '../../credentialsJson/types.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { displayProjectCredentials } from '../utils/printCredentials.js'; +import { readAppleTeam } from '../utils/provisioningProfile.js'; import { assignBuildCredentialsAsync, getBuildCredentialsAsync, getDistributionCertificateAsync, getProvisioningProfileAsync, -} from './BuildCredentialsUtils'; +} from './BuildCredentialsUtils.js'; export class SetUpTargetBuildCredentialsFromCredentialsJson { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/UpdateCredentialsJson.ts b/packages/eas-cli/src/credentials/ios/actions/UpdateCredentialsJson.ts index c21c6c679d..65ceea8d9b 100644 --- a/packages/eas-cli/src/credentials/ios/actions/UpdateCredentialsJson.ts +++ b/packages/eas-cli/src/credentials/ios/actions/UpdateCredentialsJson.ts @@ -1,8 +1,8 @@ -import { IosDistributionType } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { updateIosCredentialsAsync } from '../../credentialsJson/update'; -import { App, Target } from '../types'; +import { IosDistributionType } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { CredentialsContext } from '../../context.js'; +import { updateIosCredentialsAsync } from '../../credentialsJson/update.js'; +import { App, Target } from '../types.js'; export class UpdateCredentialsJson { constructor( diff --git a/packages/eas-cli/src/credentials/ios/actions/__mocks__/ConfigureProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/__mocks__/ConfigureProvisioningProfile.ts index a6863bda19..76e030f177 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__mocks__/ConfigureProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__mocks__/ConfigureProvisioningProfile.ts @@ -1,6 +1,6 @@ -import { testProvisioningProfileFragment } from '../../../__tests__/fixtures-ios'; -import { CredentialsContext } from '../../../context'; -import { AppleProvisioningProfileMutationResult } from '../../api/graphql/mutations/AppleProvisioningProfileMutation'; +import { testProvisioningProfileFragment } from '../../../__tests__/fixtures-ios.js'; +import { CredentialsContext } from '../../../context.js'; +import { AppleProvisioningProfileMutationResult } from '../../api/graphql/mutations/AppleProvisioningProfileMutation.js'; export class ConfigureProvisioningProfile { public async runAsync( diff --git a/packages/eas-cli/src/credentials/ios/actions/__mocks__/CreateProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/actions/__mocks__/CreateProvisioningProfile.ts index 52dbeaa3ac..69a3d5bcc0 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__mocks__/CreateProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__mocks__/CreateProvisioningProfile.ts @@ -1,6 +1,6 @@ -import { testProvisioningProfileFragment } from '../../../__tests__/fixtures-ios'; -import { CredentialsContext } from '../../../context'; -import { AppleProvisioningProfileMutationResult } from '../../api/graphql/mutations/AppleProvisioningProfileMutation'; +import { testProvisioningProfileFragment } from '../../../__tests__/fixtures-ios.js'; +import { CredentialsContext } from '../../../context.js'; +import { AppleProvisioningProfileMutationResult } from '../../api/graphql/mutations/AppleProvisioningProfileMutation.js'; export class CreateProvisioningProfile { async runAsync(_ctx: CredentialsContext): Promise { diff --git a/packages/eas-cli/src/credentials/ios/actions/__mocks__/SetUpDistributionCertificate.ts b/packages/eas-cli/src/credentials/ios/actions/__mocks__/SetUpDistributionCertificate.ts index cfad1a7b5b..2dc44afcc5 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__mocks__/SetUpDistributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__mocks__/SetUpDistributionCertificate.ts @@ -1,6 +1,6 @@ -import { AppleDistributionCertificateFragment } from '../../../../graphql/generated'; -import { testDistCertFragmentOneDependency } from '../../../__tests__/fixtures-ios'; -import { CredentialsContext } from '../../../context'; +import { AppleDistributionCertificateFragment } from '../../../../graphql/generated.js'; +import { testDistCertFragmentOneDependency } from '../../../__tests__/fixtures-ios.js'; +import { CredentialsContext } from '../../../context.js'; export class SetUpDistributionCertificate { public async runAsync(_ctx: CredentialsContext): Promise { return testDistCertFragmentOneDependency; diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/AscApiKeyUtils-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/AscApiKeyUtils-test.ts index bc1d257d31..8ee5f14d6d 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/AscApiKeyUtils-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/AscApiKeyUtils-test.ts @@ -1,13 +1,13 @@ -import { promptAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testAscApiKey } from '../../../__tests__/fixtures-ios'; -import { getCredentialsFromUserAsync } from '../../../utils/promptForCredentials'; +import { promptAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testAscApiKey } from '../../../__tests__/fixtures-ios.js'; +import { getCredentialsFromUserAsync } from '../../../utils/promptForCredentials.js'; import { AppStoreApiKeyPurpose, getAscApiKeyName, promptForAscApiKeyPathAsync, -} from '../AscApiKeyUtils'; +} from '../AscApiKeyUtils.js'; jest.mock('../../../../prompts'); jest.mock('../../../utils/promptForCredentials'); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignAscApiKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignAscApiKey-test.ts index 604dab83d4..c918cda234 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignAscApiKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignAscApiKey-test.ts @@ -1,9 +1,9 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testAscApiKeyFragment, testTargets } from '../../../__tests__/fixtures-ios'; -import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils'; -import { AssignAscApiKey } from '../AssignAscApiKey'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testAscApiKeyFragment, testTargets } from '../../../__tests__/fixtures-ios.js'; +import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils.js'; +import { AssignAscApiKey } from '../AssignAscApiKey.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; describe(AssignAscApiKey, () => { it('assigns an App Store Connect API Key in Interactive Mode for EAS Submit', async () => { diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignPushKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignPushKey-test.ts index 4bcca6e149..318548af43 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignPushKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/AssignPushKey-test.ts @@ -1,8 +1,8 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testPushKey, testTargets } from '../../../__tests__/fixtures-ios'; -import { AssignPushKey } from '../AssignPushKey'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testPushKey, testTargets } from '../../../__tests__/fixtures-ios.js'; +import { AssignPushKey } from '../AssignPushKey.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; describe(AssignPushKey, () => { it('assigns a push key in Interactive Mode', async () => { diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/ConfigureProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/ConfigureProvisioningProfile-test.ts index 2844f00e5a..3b0770683e 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/ConfigureProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/ConfigureProvisioningProfile-test.ts @@ -1,16 +1,16 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { testDistCertFragmentNoDependencies, testProvisioningProfile, testProvisioningProfileFragment, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { MissingCredentialsNonInteractiveError } from '../../../errors'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { ConfigureProvisioningProfile } from '../ConfigureProvisioningProfile'; +} from '../../../__tests__/fixtures-ios.js'; +import { MissingCredentialsNonInteractiveError } from '../../../errors.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { ConfigureProvisioningProfile } from '../ConfigureProvisioningProfile.js'; jest.mock('../../../../ora'); jest.mock('../../../../prompts'); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateAscApiKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateAscApiKey-test.ts index 43b372e800..4b591c4c72 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateAscApiKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateAscApiKey-test.ts @@ -1,11 +1,11 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testAscApiKey, testTargets } from '../../../__tests__/fixtures-ios'; -import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { CreateAscApiKey } from '../CreateAscApiKey'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testAscApiKey, testTargets } from '../../../__tests__/fixtures-ios.js'; +import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { CreateAscApiKey } from '../CreateAscApiKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateProvisioningProfile-test.ts index 156b20e627..d65be9409f 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreateProvisioningProfile-test.ts @@ -1,15 +1,15 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { testDistCertFragmentNoDependencies, testProvisioningProfile, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { MissingCredentialsNonInteractiveError } from '../../../errors'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { CreateProvisioningProfile } from '../CreateProvisioningProfile'; +} from '../../../__tests__/fixtures-ios.js'; +import { MissingCredentialsNonInteractiveError } from '../../../errors.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { CreateProvisioningProfile } from '../CreateProvisioningProfile.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreatePushKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreatePushKey-test.ts index 060822fbe7..a5ef331877 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/CreatePushKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/CreatePushKey-test.ts @@ -1,10 +1,10 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testTargets } from '../../../__tests__/fixtures-ios'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { CreatePushKey } from '../CreatePushKey'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testTargets } from '../../../__tests__/fixtures-ios.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { CreatePushKey } from '../CreatePushKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/DistributionCertificateUtils-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/DistributionCertificateUtils-test.ts index 7ef3444cde..5c375dec06 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/DistributionCertificateUtils-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/DistributionCertificateUtils-test.ts @@ -1,7 +1,7 @@ import mockdate from 'mockdate'; -import { AppleDistributionCertificateQuery } from '../../api/graphql/queries/AppleDistributionCertificateQuery'; -import { formatDistributionCertificate } from '../DistributionCertificateUtils'; +import { AppleDistributionCertificateQuery } from '../../api/graphql/queries/AppleDistributionCertificateQuery.js'; +import { formatDistributionCertificate } from '../DistributionCertificateUtils.js'; jest.mock('../../api/graphql/queries/AppleDistributionCertificateQuery'); jest.mock('chalk', () => { return { diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveAscApiKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveAscApiKey-test.ts index faba5371dc..0ebfd3a1e8 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveAscApiKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveAscApiKey-test.ts @@ -1,7 +1,7 @@ -import { confirmAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testAscApiKeyFragment } from '../../../__tests__/fixtures-ios'; -import { RemoveAscApiKey } from '../RemoveAscApiKey'; +import { confirmAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testAscApiKeyFragment } from '../../../__tests__/fixtures-ios.js'; +import { RemoveAscApiKey } from '../RemoveAscApiKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveDistributionCertificate-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveDistributionCertificate-test.ts index 5cd1630ee8..5121c73dbb 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveDistributionCertificate-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveDistributionCertificate-test.ts @@ -1,13 +1,13 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { testDistCertFragmentNoDependencies, testDistCertFragmentOneDependency, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { RemoveDistributionCertificate } from '../RemoveDistributionCertificate'; +} from '../../../__tests__/fixtures-ios.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { RemoveDistributionCertificate } from '../RemoveDistributionCertificate.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveProvisioningProfile-test.ts index 3f8cf54c66..d2b4eab77e 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemoveProvisioningProfile-test.ts @@ -1,8 +1,8 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testTargets } from '../../../__tests__/fixtures-ios'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { RemoveProvisioningProfiles } from '../RemoveProvisioningProfile'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testTargets } from '../../../__tests__/fixtures-ios.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { RemoveProvisioningProfiles } from '../RemoveProvisioningProfile.js'; describe('RemoveProvisioningProfile', () => { it('Basic Case', async () => { diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemovePushKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemovePushKey-test.ts index a8469da457..cdf62cba37 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/RemovePushKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/RemovePushKey-test.ts @@ -1,7 +1,7 @@ -import { confirmAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { testPushKey } from '../../../__tests__/fixtures-ios'; -import { RemovePushKey } from '../RemovePushKey'; +import { confirmAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { testPushKey } from '../../../__tests__/fixtures-ios.js'; +import { RemovePushKey } from '../RemovePushKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAdhocProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAdhocProvisioningProfile-test.ts index 33c7bd7dcd..f888c60fbc 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAdhocProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAdhocProvisioningProfile-test.ts @@ -1,4 +1,4 @@ -import { doUDIDsMatch } from '../SetUpAdhocProvisioningProfile'; +import { doUDIDsMatch } from '../SetUpAdhocProvisioningProfile.js'; describe(doUDIDsMatch, () => { it('return false if UDIDs do not match', () => { diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAscApiKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAscApiKey-test.ts index 7dc78e0662..95bf4ba0af 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAscApiKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpAscApiKey-test.ts @@ -1,17 +1,17 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync, promptAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync, promptAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testAscApiKey, testAscApiKeyFragment, testCommonIosAppCredentialsFragment, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { SetUpAscApiKey, SetupAscApiKeyChoice } from '../SetUpAscApiKey'; +} from '../../../__tests__/fixtures-ios.js'; +import { AppStoreApiKeyPurpose } from '../AscApiKeyUtils.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { SetUpAscApiKey, SetupAscApiKeyChoice } from '../SetUpAscApiKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpInternalProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpInternalProvisioningProfile-test.ts index ab7638a24b..8ec5ea87b0 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpInternalProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpInternalProvisioningProfile-test.ts @@ -1,11 +1,14 @@ -import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../../graphql/generated'; -import { promptAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getAllBuildCredentialsAsync } from '../BuildCredentialsUtils'; -import { SetUpAdhocProvisioningProfile } from '../SetUpAdhocProvisioningProfile'; -import { SetUpInternalProvisioningProfile } from '../SetUpInternalProvisioningProfile'; -import { SetUpProvisioningProfile } from '../SetUpProvisioningProfile'; +import { + IosAppBuildCredentialsFragment, + IosDistributionType, +} from '../../../../graphql/generated.js'; +import { promptAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getAllBuildCredentialsAsync } from '../BuildCredentialsUtils.js'; +import { SetUpAdhocProvisioningProfile } from '../SetUpAdhocProvisioningProfile.js'; +import { SetUpInternalProvisioningProfile } from '../SetUpInternalProvisioningProfile.js'; +import { SetUpProvisioningProfile } from '../SetUpProvisioningProfile.js'; jest.mock('../../../../prompts'); jest.mock('../SetUpAdhocProvisioningProfile'); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpProvisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpProvisioningProfile-test.ts index e4afd68dd0..c9f2d3798e 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpProvisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpProvisioningProfile-test.ts @@ -1,21 +1,20 @@ -import nullthrows from 'nullthrows'; - -import { IosDistributionType } from '../../../../graphql/generated'; -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { IosDistributionType } from '../../../../graphql/generated.js'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { nullthrows } from '../../../../utils/nullthrows.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testAppleAppIdentifierFragment, testCommonIosAppCredentialsFragment, testIosAppBuildCredentialsFragment, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { MissingCredentialsNonInteractiveError } from '../../../errors'; -import { validateProvisioningProfileAsync } from '../../validators/validateProvisioningProfile'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { SetUpProvisioningProfile } from '../SetUpProvisioningProfile'; +} from '../../../__tests__/fixtures-ios.js'; +import { MissingCredentialsNonInteractiveError } from '../../../errors.js'; +import { validateProvisioningProfileAsync } from '../../validators/validateProvisioningProfile.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { SetUpProvisioningProfile } from '../SetUpProvisioningProfile.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpPushKey-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpPushKey-test.ts index c95b214c9e..0e3ef1d873 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpPushKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpPushKey-test.ts @@ -1,10 +1,10 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; -import { getNewIosApiMock, testPushKey, testTargets } from '../../../__tests__/fixtures-ios'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { SetUpPushKey } from '../SetUpPushKey'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { getAppstoreMock, testAuthCtx } from '../../../__tests__/fixtures-appstore.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; +import { getNewIosApiMock, testPushKey, testTargets } from '../../../__tests__/fixtures-ios.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { SetUpPushKey } from '../SetUpPushKey.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpSubmissionCredentials-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpSubmissionCredentials-test.ts index b778a21f87..7a38aef9b8 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpSubmissionCredentials-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpSubmissionCredentials-test.ts @@ -1,17 +1,17 @@ -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync, promptAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync, promptAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testCommonIosAppCredentialsFragment, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { SetUpAscApiKey } from '../SetUpAscApiKey'; +} from '../../../__tests__/fixtures-ios.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { SetUpAscApiKey } from '../SetUpAscApiKey.js'; import { PROMPT_FOR_APP_SPECIFIC_PASSWORD, SetUpSubmissionCredentials, -} from '../SetUpSubmissionCredentials'; +} from '../SetUpSubmissionCredentials.js'; jest.mock('../../../../prompts'); jest.mocked(confirmAsync).mockImplementation(async () => true); diff --git a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpTargetBuildCredentialsFromCredentialsJson-test.ts b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpTargetBuildCredentialsFromCredentialsJson-test.ts index c0f8e72755..8c89550555 100644 --- a/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpTargetBuildCredentialsFromCredentialsJson-test.ts +++ b/packages/eas-cli/src/credentials/ios/actions/__tests__/SetUpTargetBuildCredentialsFromCredentialsJson-test.ts @@ -1,7 +1,7 @@ -import { IosDistributionType } from '../../../../graphql/generated'; -import { findApplicationTarget } from '../../../../project/ios/target'; -import { confirmAsync } from '../../../../prompts'; -import { createCtxMock } from '../../../__tests__/fixtures-context'; +import { IosDistributionType } from '../../../../graphql/generated.js'; +import { findApplicationTarget } from '../../../../project/ios/target.js'; +import { confirmAsync } from '../../../../prompts.js'; +import { createCtxMock } from '../../../__tests__/fixtures-context.js'; import { getNewIosApiMock, testAppleAppIdentifierFragment, @@ -11,10 +11,10 @@ import { testProvisioningProfile, testProvisioningProfileFragment, testTargets, -} from '../../../__tests__/fixtures-ios'; -import { IosTargetCredentials } from '../../../credentialsJson/types'; -import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils'; -import { SetUpTargetBuildCredentialsFromCredentialsJson } from '../SetUpTargetBuildCredentialsFromCredentialsJson'; +} from '../../../__tests__/fixtures-ios.js'; +import { IosTargetCredentials } from '../../../credentialsJson/types.js'; +import { getAppLookupParamsFromContext } from '../BuildCredentialsUtils.js'; +import { SetUpTargetBuildCredentialsFromCredentialsJson } from '../SetUpTargetBuildCredentialsFromCredentialsJson.js'; jest.mock('../../../../prompts'); jest.mock('../../../credentialsJson/read'); diff --git a/packages/eas-cli/src/credentials/ios/api/GraphqlClient.ts b/packages/eas-cli/src/credentials/ios/api/GraphqlClient.ts index a2e9ac3fbc..7335373a4b 100644 --- a/packages/eas-cli/src/credentials/ios/api/GraphqlClient.ts +++ b/packages/eas-cli/src/credentials/ios/api/GraphqlClient.ts @@ -1,5 +1,4 @@ -import { UserRole } from '@expo/apple-utils'; -import nullthrows from 'nullthrows'; +import AppleUtils from '@expo/apple-utils'; import { AppFragment, @@ -13,38 +12,41 @@ import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../graphql/generated'; -import { isWildcardBundleIdentifier } from '../../../project/ios/bundleIdentifier'; -import { Account } from '../../../user/Account'; -import { DistributionCertificate, PushKey } from '../appstore/Credentials.types'; -import { MinimalAscApiKey } from '../credentials'; -import { AppleTeamMissingError } from '../errors'; -import { AppStoreConnectApiKeyMutation } from './graphql/mutations/AppStoreConnectApiKeyMutation'; -import { AppleAppIdentifierMutation } from './graphql/mutations/AppleAppIdentifierMutation'; +} from '../../../graphql/generated.js'; +import { isWildcardBundleIdentifier } from '../../../project/ios/bundleIdentifier.js'; +import { Account } from '../../../user/Account.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { DistributionCertificate, PushKey } from '../appstore/Credentials.types.js'; +import { MinimalAscApiKey } from '../credentials.js'; +import { AppleTeamMissingError } from '../errors.js'; +import { AppStoreConnectApiKeyMutation } from './graphql/mutations/AppStoreConnectApiKeyMutation.js'; +import { AppleAppIdentifierMutation } from './graphql/mutations/AppleAppIdentifierMutation.js'; import { AppleDistributionCertificateMutation, AppleDistributionCertificateMutationResult, -} from './graphql/mutations/AppleDistributionCertificateMutation'; +} from './graphql/mutations/AppleDistributionCertificateMutation.js'; import { AppleProvisioningProfileMutation, AppleProvisioningProfileMutationResult, -} from './graphql/mutations/AppleProvisioningProfileMutation'; -import { ApplePushKeyMutation } from './graphql/mutations/ApplePushKeyMutation'; -import { AppleTeamMutation } from './graphql/mutations/AppleTeamMutation'; -import { IosAppBuildCredentialsMutation } from './graphql/mutations/IosAppBuildCredentialsMutation'; -import { IosAppCredentialsMutation } from './graphql/mutations/IosAppCredentialsMutation'; -import { AppQuery } from './graphql/queries/AppQuery'; -import { AppStoreConnectApiKeyQuery } from './graphql/queries/AppStoreConnectApiKeyQuery'; -import { AppleAppIdentifierQuery } from './graphql/queries/AppleAppIdentifierQuery'; -import { AppleDeviceQuery } from './graphql/queries/AppleDeviceQuery'; -import { AppleDistributionCertificateQuery } from './graphql/queries/AppleDistributionCertificateQuery'; +} from './graphql/mutations/AppleProvisioningProfileMutation.js'; +import { ApplePushKeyMutation } from './graphql/mutations/ApplePushKeyMutation.js'; +import { AppleTeamMutation } from './graphql/mutations/AppleTeamMutation.js'; +import { IosAppBuildCredentialsMutation } from './graphql/mutations/IosAppBuildCredentialsMutation.js'; +import { IosAppCredentialsMutation } from './graphql/mutations/IosAppCredentialsMutation.js'; +import { AppQuery } from './graphql/queries/AppQuery.js'; +import { AppStoreConnectApiKeyQuery } from './graphql/queries/AppStoreConnectApiKeyQuery.js'; +import { AppleAppIdentifierQuery } from './graphql/queries/AppleAppIdentifierQuery.js'; +import { AppleDeviceQuery } from './graphql/queries/AppleDeviceQuery.js'; +import { AppleDistributionCertificateQuery } from './graphql/queries/AppleDistributionCertificateQuery.js'; import { AppleProvisioningProfileQuery, AppleProvisioningProfileQueryResult, -} from './graphql/queries/AppleProvisioningProfileQuery'; -import { ApplePushKeyQuery } from './graphql/queries/ApplePushKeyQuery'; -import { AppleTeamQuery } from './graphql/queries/AppleTeamQuery'; -import { IosAppCredentialsQuery } from './graphql/queries/IosAppCredentialsQuery'; +} from './graphql/queries/AppleProvisioningProfileQuery.js'; +import { ApplePushKeyQuery } from './graphql/queries/ApplePushKeyQuery.js'; +import { AppleTeamQuery } from './graphql/queries/AppleTeamQuery.js'; +import { IosAppCredentialsQuery } from './graphql/queries/IosAppCredentialsQuery.js'; + +const { UserRole } = AppleUtils; export interface AppLookupParams { account: Account; @@ -468,7 +470,7 @@ export async function deleteAscApiKeyAsync(ascApiKeyId: string): Promise { return await AppStoreConnectApiKeyMutation.deleteAppStoreConnectApiKeyAsync(ascApiKeyId); } -function convertUserRoleToGraphqlType(userRole: UserRole): AppStoreConnectUserRole { +function convertUserRoleToGraphqlType(userRole: AppleUtils.UserRole): AppStoreConnectUserRole { switch (userRole) { case UserRole.ADMIN: return AppStoreConnectUserRole.Admin; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.ts index 2c56e9c49f..2ab6b3a0af 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppStoreConnectApiKeyFragment, AppStoreConnectApiKeyInput, CreateAppStoreConnectApiKeyMutation, DeleteAppStoreConnectApiKeyMutation, -} from '../../../../../graphql/generated'; -import { AppStoreConnectApiKeyFragmentNode } from '../../../../../graphql/types/credentials/AppStoreConnectApiKey'; +} from '../../../../../graphql/generated.js'; +import { AppStoreConnectApiKeyFragmentNode } from '../../../../../graphql/types/credentials/AppStoreConnectApiKey.js'; export const AppStoreConnectApiKeyMutation = { async createAppStoreConnectApiKeyAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.ts index 4fa1f051e2..4991718f05 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.ts @@ -1,14 +1,14 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleAppIdentifierFragment, AppleAppIdentifierInput, CreateAppleAppIdentifierMutation, -} from '../../../../../graphql/generated'; -import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier'; +} from '../../../../../graphql/generated.js'; +import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier.js'; export const AppleAppIdentifierMutation = { async createAppleAppIdentifierAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceMutation.ts index 8f438d3594..13d0a7ee10 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceMutation.ts @@ -1,14 +1,14 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleDeviceFragment, AppleDeviceInput, CreateAppleDeviceMutation, DeleteAppleDeviceResult, -} from '../../../../../graphql/generated'; -import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice'; +} from '../../../../../graphql/generated.js'; +import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice.js'; export const AppleDeviceMutation = { async createAppleDeviceAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.ts index 32ba512f41..ddf731a160 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.ts @@ -1,12 +1,12 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleDeviceRegistrationRequestFragment, CreateAppleDeviceRegistrationRequestMutation, -} from '../../../../../graphql/generated'; -import { AppleDeviceRegistrationRequestFragmentNode } from '../../../../../graphql/types/credentials/AppleDeviceRegistrationRequest'; +} from '../../../../../graphql/generated.js'; +import { AppleDeviceRegistrationRequestFragmentNode } from '../../../../../graphql/types/credentials/AppleDeviceRegistrationRequest.js'; export const AppleDeviceRegistrationRequestMutation = { async createAppleDeviceRegistrationRequestAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.ts index a0b6cc3602..070ac34969 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.ts @@ -1,17 +1,17 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleDistributionCertificateFragment, AppleDistributionCertificateInput, AppleTeamFragment, CreateAppleDistributionCertificateMutation, DeleteAppleDistributionCertificateMutation, -} from '../../../../../graphql/generated'; -import { AppleDistributionCertificateFragmentNode } from '../../../../../graphql/types/credentials/AppleDistributionCertificate'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleDistributionCertificateFragmentNode } from '../../../../../graphql/types/credentials/AppleDistributionCertificate.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export type AppleDistributionCertificateMutationResult = AppleDistributionCertificateFragment & { appleTeam?: AppleTeamFragment | null; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.ts index e6fc798fcf..edad566f7b 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.ts @@ -1,16 +1,16 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleProvisioningProfileFragment, AppleProvisioningProfileInput, AppleTeamFragment, CreateAppleProvisioningProfileMutation, UpdateAppleProvisioningProfileMutation, -} from '../../../../../graphql/generated'; -import { AppleProvisioningProfileFragmentNode } from '../../../../../graphql/types/credentials/AppleProvisioningProfile'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleProvisioningProfileFragmentNode } from '../../../../../graphql/types/credentials/AppleProvisioningProfile.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export type AppleProvisioningProfileMutationResult = AppleProvisioningProfileFragment & { appleTeam?: AppleTeamFragment | null; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.ts index 03c771a9a6..07ba52ebef 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { ApplePushKeyFragment, ApplePushKeyInput, CreateApplePushKeyMutation, DeleteApplePushKeyMutation, -} from '../../../../../graphql/generated'; -import { ApplePushKeyFragmentNode } from '../../../../../graphql/types/credentials/ApplePushKey'; +} from '../../../../../graphql/generated.js'; +import { ApplePushKeyFragmentNode } from '../../../../../graphql/types/credentials/ApplePushKey.js'; export const ApplePushKeyMutation = { async createApplePushKeyAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleTeamMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleTeamMutation.ts index 45486a3028..f998d3d24d 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleTeamMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/AppleTeamMutation.ts @@ -1,14 +1,14 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleTeamFragment, AppleTeamInput, CreateAppleTeamMutation, -} from '../../../../../graphql/generated'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; -import { Account } from '../../../../../user/Account'; +} from '../../../../../graphql/generated.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; +import { Account } from '../../../../../user/Account.js'; export type AppleTeamMutationResult = AppleTeamFragment & { account: Account; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.ts index 62b204d275..63c33e338a 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.ts @@ -1,15 +1,15 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { IosAppBuildCredentials, IosAppBuildCredentialsFragment, IosAppBuildCredentialsInput, SetProvisioningProfileMutation, -} from '../../../../../graphql/generated'; -import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials'; +} from '../../../../../graphql/generated.js'; +import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials.js'; export const IosAppBuildCredentialsMutation = { async createIosAppBuildCredentialsAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.ts index 6e4e90e2dd..eb9c45f173 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.ts @@ -1,16 +1,16 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { CommonIosAppCredentialsFragment, CreateIosAppCredentialsMutation, IosAppCredentialsInput, SetAppStoreConnectApiKeyForSubmissionsMutation, SetPushKeyMutation, -} from '../../../../../graphql/generated'; -import { CommonIosAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppCredentials'; +} from '../../../../../graphql/generated.js'; +import { CommonIosAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppCredentials.js'; export const IosAppCredentialsMutation = { async createIosAppCredentialsAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/__mocks__/AppleDeviceMutation.ts b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/__mocks__/AppleDeviceMutation.ts index b2d7bc6a8e..07d71fe4d6 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/mutations/__mocks__/AppleDeviceMutation.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/mutations/__mocks__/AppleDeviceMutation.ts @@ -1,4 +1,4 @@ -import { AppleDevice } from '../../../../../../graphql/generated'; +import { AppleDevice } from '../../../../../../graphql/generated.js'; export const AppleDeviceMutation = { createAppleDeviceAsync: jest.fn().mockImplementation(() => { diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppQuery.ts index df8220263f..d8617a9682 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppQuery.ts @@ -1,10 +1,10 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; -import { AppByFullNameQuery, AppFragment } from '../../../../../graphql/generated'; -import { AppFragmentNode } from '../../../../../graphql/types/App'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; +import { AppByFullNameQuery, AppFragment } from '../../../../../graphql/generated.js'; +import { AppFragmentNode } from '../../../../../graphql/types/App.js'; export const AppQuery = { async byFullNameAsync(fullName: string): Promise { diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.ts index 433b0c0644..b74438f3ca 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.ts @@ -1,12 +1,12 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppStoreConnectApiKeyByAccountQuery, AppStoreConnectApiKeyFragment, -} from '../../../../../graphql/generated'; -import { AppStoreConnectApiKeyFragmentNode } from '../../../../../graphql/types/credentials/AppStoreConnectApiKey'; +} from '../../../../../graphql/generated.js'; +import { AppStoreConnectApiKeyFragmentNode } from '../../../../../graphql/types/credentials/AppStoreConnectApiKey.js'; export const AppStoreConnectApiKeyQuery = { async getAllForAccountAsync(accountName: string): Promise { diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.ts index 806564257b..b08ad03a6b 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.ts @@ -1,12 +1,12 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleAppIdentifierByBundleIdQuery, AppleAppIdentifierFragment, -} from '../../../../../graphql/generated'; -import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier'; +} from '../../../../../graphql/generated.js'; +import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier.js'; export const AppleAppIdentifierQuery = { async byBundleIdentifierAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDeviceQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDeviceQuery.ts index c55c5b3eb6..155f99ce75 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDeviceQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDeviceQuery.ts @@ -1,8 +1,8 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleDevice, AppleDeviceFragment, @@ -10,9 +10,9 @@ import { AppleDevicesByIdentifierQuery, AppleDevicesByTeamIdentifierQuery, AppleTeamFragment, -} from '../../../../../graphql/generated'; -import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export type AppleDeviceFragmentWithAppleTeam = AppleDeviceFragment & { appleTeam: AppleTeamFragment; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.ts index 4efaf56d4a..1666aa96fd 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.ts @@ -1,16 +1,16 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleDistributionCertificateByAccountQuery, AppleDistributionCertificateByAppQuery, AppleDistributionCertificateFragment, IosDistributionType, -} from '../../../../../graphql/generated'; -import { AppleDistributionCertificateFragmentNode } from '../../../../../graphql/types/credentials/AppleDistributionCertificate'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleDistributionCertificateFragmentNode } from '../../../../../graphql/types/credentials/AppleDistributionCertificate.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export const AppleDistributionCertificateQuery = { async getForAppAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.ts index 35acc77c02..ea7e1ba4d8 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.ts @@ -1,8 +1,8 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleAppIdentifierFragment, AppleDeviceFragment, @@ -10,11 +10,11 @@ import { AppleProvisioningProfilesByAppQuery, AppleTeamFragment, IosDistributionType, -} from '../../../../../graphql/generated'; -import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier'; -import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice'; -import { AppleProvisioningProfileFragmentNode } from '../../../../../graphql/types/credentials/AppleProvisioningProfile'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleAppIdentifierFragmentNode } from '../../../../../graphql/types/credentials/AppleAppIdentifier.js'; +import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice.js'; +import { AppleProvisioningProfileFragmentNode } from '../../../../../graphql/types/credentials/AppleProvisioningProfile.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export type AppleProvisioningProfileQueryResult = AppleProvisioningProfileFragment & { appleTeam?: AppleTeamFragment | null; diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/ApplePushKeyQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/ApplePushKeyQuery.ts index 82a09297e4..4d1e6d635e 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/ApplePushKeyQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/ApplePushKeyQuery.ts @@ -1,9 +1,12 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; -import { ApplePushKeyByAccountQuery, ApplePushKeyFragment } from '../../../../../graphql/generated'; -import { ApplePushKeyFragmentNode } from '../../../../../graphql/types/credentials/ApplePushKey'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; +import { + ApplePushKeyByAccountQuery, + ApplePushKeyFragment, +} from '../../../../../graphql/generated.js'; +import { ApplePushKeyFragmentNode } from '../../../../../graphql/types/credentials/ApplePushKey.js'; export const ApplePushKeyQuery = { async getAllForAccountAsync(accountName: string): Promise { diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleTeamQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleTeamQuery.ts index 61cb2e285d..29787d4fb8 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleTeamQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/AppleTeamQuery.ts @@ -1,13 +1,13 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { AppleTeamByIdentifierQuery, AppleTeamFragment, AppleTeamsByAccountNameQuery, -} from '../../../../../graphql/generated'; -import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam'; +} from '../../../../../graphql/generated.js'; +import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam.js'; export const AppleTeamQuery = { async getAllForAccountAsync(accountName: string): Promise { diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.ts index 5e7a7127df..b82fba2eee 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.ts @@ -1,14 +1,14 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuery, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../../../graphql/generated'; -import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials'; +} from '../../../../../graphql/generated.js'; +import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials.js'; export const IosAppBuildCredentialsQuery = { async byAppIdentifierIdAndDistributionTypeAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.ts index 5d9c44af2e..f5518edb21 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.ts @@ -1,19 +1,19 @@ import assert from 'assert'; import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client'; +import { graphqlClient, withErrorHandlingAsync } from '../../../../../graphql/client.js'; import { CommonIosAppCredentialsFragment, CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery, IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery, IosDistributionType, -} from '../../../../../graphql/generated'; -import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials'; +} from '../../../../../graphql/generated.js'; +import { IosAppBuildCredentialsFragmentNode } from '../../../../../graphql/types/credentials/IosAppBuildCredentials.js'; import { CommonIosAppCredentialsFragmentNode, CommonIosAppCredentialsWithoutBuildCredentialsFragmentNode, -} from '../../../../../graphql/types/credentials/IosAppCredentials'; +} from '../../../../../graphql/types/credentials/IosAppCredentials.js'; export const IosAppCredentialsQuery = { async withBuildCredentialsByAppIdentifierIdAsync( diff --git a/packages/eas-cli/src/credentials/ios/api/graphql/queries/__mocks__/AppleTeamQuery.ts b/packages/eas-cli/src/credentials/ios/api/graphql/queries/__mocks__/AppleTeamQuery.ts index 38f61340ef..02f4cf9565 100644 --- a/packages/eas-cli/src/credentials/ios/api/graphql/queries/__mocks__/AppleTeamQuery.ts +++ b/packages/eas-cli/src/credentials/ios/api/graphql/queries/__mocks__/AppleTeamQuery.ts @@ -1,4 +1,4 @@ -import { AppleTeam } from '../../../../../../graphql/generated'; +import { AppleTeam } from '../../../../../../graphql/generated.js'; export const AppleTeamQuery = { byAppleTeamIdentifierAsync: jest.fn().mockImplementation(() => { diff --git a/packages/eas-cli/src/credentials/ios/appstore/AppStoreApi.ts b/packages/eas-cli/src/credentials/ios/appstore/AppStoreApi.ts index 11c1669aa3..41bb79bfb8 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/AppStoreApi.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/AppStoreApi.ts @@ -1,4 +1,4 @@ -import Log from '../../../log'; +import Log from '../../../log.js'; import { AscApiKey, AscApiKeyInfo, @@ -8,40 +8,40 @@ import { ProvisioningProfileStoreInfo, PushKey, PushKeyStoreInfo, -} from './Credentials.types'; +} from './Credentials.types.js'; import { createAscApiKeyAsync, getAscApiKeyAsync, listAscApiKeysAsync, revokeAscApiKeyAsync, -} from './ascApiKey'; +} from './ascApiKey.js'; import { Options as AuthenticateOptions, assertUserAuthCtx, authenticateAsync, isUserAuthCtx, -} from './authenticate'; -import { AuthCtx, AuthenticationMode, UserAuthCtx } from './authenticateTypes'; +} from './authenticate.js'; +import { AuthCtx, AuthenticationMode, UserAuthCtx } from './authenticateTypes.js'; import { createDistributionCertificateAsync, listDistributionCertificatesAsync, revokeDistributionCertificateAsync, -} from './distributionCertificate'; +} from './distributionCertificate.js'; import { AppLookupParams, IosCapabilitiesOptions, ensureBundleIdExistsAsync, -} from './ensureAppExists'; +} from './ensureAppExists.js'; import { ProfileClass, createProvisioningProfileAsync, listProvisioningProfilesAsync, revokeProvisioningProfileAsync, useExistingProvisioningProfileAsync, -} from './provisioningProfile'; -import { createOrReuseAdhocProvisioningProfileAsync } from './provisioningProfileAdhoc'; -import { createPushKeyAsync, listPushKeysAsync, revokePushKeyAsync } from './pushKey'; -import { hasAscEnvVars } from './resolveCredentials'; +} from './provisioningProfile.js'; +import { createOrReuseAdhocProvisioningProfileAsync } from './provisioningProfileAdhoc.js'; +import { createPushKeyAsync, listPushKeysAsync, revokePushKeyAsync } from './pushKey.js'; +import { hasAscEnvVars } from './resolveCredentials.js'; export default class AppStoreApi { public authCtx?: AuthCtx; diff --git a/packages/eas-cli/src/credentials/ios/appstore/Credentials.ts b/packages/eas-cli/src/credentials/ios/appstore/Credentials.ts index 7eec596695..4b73397869 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/Credentials.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/Credentials.ts @@ -5,7 +5,7 @@ import { DistributionCertificateStoreInfo, PushKey, PushKeyStoreInfo, -} from './Credentials.types'; +} from './Credentials.types.js'; export function formatDistributionCertificate({ name, diff --git a/packages/eas-cli/src/credentials/ios/appstore/Credentials.types.ts b/packages/eas-cli/src/credentials/ios/appstore/Credentials.types.ts index 2dfd9d1437..d6a2a87bbf 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/Credentials.types.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/Credentials.types.ts @@ -1,4 +1,4 @@ -import { UserRole } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; export interface Device { id: string; @@ -75,7 +75,7 @@ export type AscApiKeyInfo = { teamId: string; name: string; teamName?: string; - roles: UserRole[]; + roles: AppleUtils.UserRole[]; isRevoked: boolean; }; diff --git a/packages/eas-cli/src/credentials/ios/appstore/CredentialsUtils.ts b/packages/eas-cli/src/credentials/ios/appstore/CredentialsUtils.ts index a8c284a04b..d42865b3b9 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/CredentialsUtils.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/CredentialsUtils.ts @@ -1,13 +1,13 @@ import { AppleDistributionCertificateFragment, ApplePushKeyFragment, -} from '../../../graphql/generated'; +} from '../../../graphql/generated.js'; import { DistributionCertificate, DistributionCertificateStoreInfo, PushKey, PushKeyStoreInfo, -} from './Credentials.types'; +} from './Credentials.types.js'; /** * Edge case: Uploaded push keys rely on the user to provide the keyIdentifier, which could be incorrect diff --git a/packages/eas-cli/src/credentials/ios/appstore/__tests__/ascApiKey-test.ts b/packages/eas-cli/src/credentials/ios/appstore/__tests__/ascApiKey-test.ts index d428c08d67..4d94015465 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/__tests__/ascApiKey-test.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/__tests__/ascApiKey-test.ts @@ -1,12 +1,14 @@ -import { ApiKey, ApiKeyType, UserRole } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { createAscApiKeyAsync, getAscApiKeyAsync, listAscApiKeysAsync, revokeAscApiKeyAsync, -} from '../ascApiKey'; -import { getRequestContext } from '../authenticate'; +} from '../ascApiKey.js'; +import { getRequestContext } from '../authenticate.js'; + +const { ApiKey, ApiKeyType, UserRole } = AppleUtils; jest.mock('@expo/apple-utils'); jest.mock('../authenticate'); @@ -37,7 +39,7 @@ const mockApiKey = { }, downloadAsync: jest.fn(() => 'super secret'), revokeAsync: jest.fn(() => mockApiKey), -} as unknown as ApiKey; +} as unknown as AppleUtils.ApiKey; const mockAscApiKeyInfo = { issuerId: undefined, diff --git a/packages/eas-cli/src/credentials/ios/appstore/__tests__/bundleIdCapabilities-test.ts b/packages/eas-cli/src/credentials/ios/appstore/__tests__/bundleIdCapabilities-test.ts index fb90bd782a..74c6d3015f 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/__tests__/bundleIdCapabilities-test.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/__tests__/bundleIdCapabilities-test.ts @@ -1,10 +1,12 @@ -import { BundleIdCapability } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { CapabilityMapping, assertValidOptions, syncCapabilitiesForEntitlementsAsync, -} from '../bundleIdCapabilities'; +} from '../bundleIdCapabilities.js'; + +const { BundleIdCapability } = AppleUtils; describe(assertValidOptions, () => { it(`adds a reason for asserting capability identifiers`, () => { diff --git a/packages/eas-cli/src/credentials/ios/appstore/__tests__/capabilityIdentifiers-test.ts b/packages/eas-cli/src/credentials/ios/appstore/__tests__/capabilityIdentifiers-test.ts index 50bdfb2323..30b854d121 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/__tests__/capabilityIdentifiers-test.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/__tests__/capabilityIdentifiers-test.ts @@ -1,4 +1,4 @@ -import { syncCapabilityIdentifiersForEntitlementsAsync } from '../capabilityIdentifiers'; +import { syncCapabilityIdentifiersForEntitlementsAsync } from '../capabilityIdentifiers.js'; function mockCapabilities(Apple: any): void { Apple.MerchantId.getAsync = jest.fn(() => [ diff --git a/packages/eas-cli/src/credentials/ios/appstore/__tests__/contractMessages-test.ts b/packages/eas-cli/src/credentials/ios/appstore/__tests__/contractMessages-test.ts index 7d0988d69c..dc6991d96e 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/__tests__/contractMessages-test.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/__tests__/contractMessages-test.ts @@ -1,6 +1,6 @@ import chalk from 'chalk'; -import { formatContractMessage } from '../contractMessages'; +import { formatContractMessage } from '../contractMessages.js'; const expiredMembership = { subject: 'Developer Program Membership Expired', diff --git a/packages/eas-cli/src/credentials/ios/appstore/__tests__/resolveCredentials-test.ts b/packages/eas-cli/src/credentials/ios/appstore/__tests__/resolveCredentials-test.ts index 18433d57c7..f0f94b16ad 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/__tests__/resolveCredentials-test.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/__tests__/resolveCredentials-test.ts @@ -1,8 +1,8 @@ import { vol } from 'memfs'; -import { promptAsync } from '../../../../prompts'; -import { AppleTeamType } from '../authenticateTypes'; -import { resolveAppleTeamAsync, resolveAscApiKeyAsync } from '../resolveCredentials'; +import { promptAsync } from '../../../../prompts.js'; +import { AppleTeamType } from '../authenticateTypes.js'; +import { resolveAppleTeamAsync, resolveAscApiKeyAsync } from '../resolveCredentials.js'; jest.mock('../../../../prompts'); jest.mock('fs'); diff --git a/packages/eas-cli/src/credentials/ios/appstore/ascApiKey.ts b/packages/eas-cli/src/credentials/ios/appstore/ascApiKey.ts index 26af78cc9a..7944915da0 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/ascApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/ascApiKey.ts @@ -1,10 +1,12 @@ -import { ApiKey, ApiKeyProps, ApiKeyType, UserRole } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { AscApiKey, AscApiKeyInfo } from './Credentials.types'; -import { getRequestContext } from './authenticate'; -import { AuthCtx, UserAuthCtx } from './authenticateTypes'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { AscApiKey, AscApiKeyInfo } from './Credentials.types.js'; +import { getRequestContext } from './authenticate.js'; +import { AuthCtx, UserAuthCtx } from './authenticateTypes.js'; + +const { ApiKey, UserRole } = AppleUtils; /** * List App Store Connect API Keys. @@ -60,7 +62,7 @@ export async function createAscApiKeyAsync( allAppsVisible, roles, keyType, - }: Partial> + }: Partial> ): Promise { const spinner = ora(`Creating App Store Connect API Key.`).start(); try { @@ -69,7 +71,7 @@ export async function createAscApiKeyAsync( nickname: nickname ?? `[expo] ${new Date().getTime()}`, allAppsVisible: allAppsVisible ?? true, roles: roles ?? [UserRole.ADMIN], - keyType: keyType ?? ApiKeyType.PUBLIC_API, + keyType: keyType ?? AppleUtils.ApiKeyType.PUBLIC_API, }); const keyP8 = await key.downloadAsync(); if (!keyP8) { @@ -120,7 +122,7 @@ export async function revokeAscApiKeyAsync( } } -export function getAscApiKeyInfo(apiKey: ApiKey, authCtx: AuthCtx): AscApiKeyInfo { +export function getAscApiKeyInfo(apiKey: AppleUtils.ApiKey, authCtx: AuthCtx): AscApiKeyInfo { return { name: apiKey.attributes.nickname, keyId: apiKey.id, diff --git a/packages/eas-cli/src/credentials/ios/appstore/authenticate.ts b/packages/eas-cli/src/credentials/ios/appstore/authenticate.ts index 6bddc2d41a..95ec26844d 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/authenticate.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/authenticate.ts @@ -1,17 +1,10 @@ -import { - Auth, - InvalidUserCredentialsError, - RequestContext, - Session, - Teams, - Token, -} from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import assert from 'assert'; import chalk from 'chalk'; -import Log from '../../../log'; -import { toggleConfirmAsync } from '../../../prompts'; -import { MinimalAscApiKey } from '../credentials'; +import Log from '../../../log.js'; +import { toggleConfirmAsync } from '../../../prompts.js'; +import { MinimalAscApiKey } from '../credentials.js'; import { ApiKeyAuthCtx, AppleTeamType, @@ -19,14 +12,16 @@ import { AuthenticationMode, Team, UserAuthCtx, -} from './authenticateTypes'; +} from './authenticateTypes.js'; import { deletePasswordAsync, promptPasswordAsync, resolveAppleTeamAsync, resolveAscApiKeyAsync, resolveUserCredentialsAsync, -} from './resolveCredentials'; +} from './resolveCredentials.js'; + +const { Auth, InvalidUserCredentialsError, Session, Teams, Token } = AppleUtils; const APPLE_IN_HOUSE_TEAM_TYPE = 'in-house'; @@ -39,7 +34,7 @@ export type Options = { /** * Can be used to restore the Apple auth state via apple-utils. */ - cookies?: Session.AuthState['cookies']; + cookies?: AppleUtils.Session.AuthState['cookies']; /** Indicates how Apple network requests will be made. */ mode?: AuthenticationMode; }; @@ -55,15 +50,15 @@ export function assertUserAuthCtx(authCtx: AuthCtx | undefined): UserAuthCtx { throw new Error('Expected user authentication context (login/password).'); } -export function getRequestContext(authCtx: AuthCtx): RequestContext { +export function getRequestContext(authCtx: AuthCtx): AppleUtils.RequestContext { assert(authCtx.authState?.context, 'Apple request context must be defined'); return authCtx.authState.context; } async function loginAsync( - userCredentials: Partial = {}, - options: Auth.LoginOptions -): Promise { + userCredentials: Partial = {}, + options: AppleUtils.Auth.LoginOptions +): Promise { // First try login with cookies JSON if (userCredentials.cookies) { const session = await Auth.loginWithCookiesAsync(userCredentials); @@ -135,7 +130,7 @@ async function loginWithUserCredentialsAsync({ password?: string; teamId?: string; providerId?: number; -}): Promise { +}): Promise { // Start a new login flow const newSession = await Auth.loginWithUserCredentialsAsync({ username, @@ -224,7 +219,7 @@ async function authenticateAsUserAsync(options: Options = {}): Promise } } -function formatTeam({ teamId, name, type }: Teams.AppStoreTeam): Team { +function formatTeam({ teamId, name, type }: AppleUtils.Teams.AppStoreTeam): Team { return { id: teamId, name: `${name} (${type})`, diff --git a/packages/eas-cli/src/credentials/ios/appstore/authenticateTypes.ts b/packages/eas-cli/src/credentials/ios/appstore/authenticateTypes.ts index ed828ae617..6456ba99f7 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/authenticateTypes.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/authenticateTypes.ts @@ -1,6 +1,6 @@ -import { Session } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { MinimalAscApiKey } from '../credentials'; +import { MinimalAscApiKey } from '../credentials.js'; export enum AuthenticationMode { /** App Store API requests will be made using the official API via an API key, used for CI environments where 2FA cannot be performed. */ @@ -33,7 +33,7 @@ export type UserAuthCtx = { /** * Can be used to restore the Apple auth state via apple-utils. */ - authState?: Session.AuthState; + authState?: AppleUtils.Session.AuthState; }; export type ApiKeyAuthCtx = { @@ -42,7 +42,7 @@ export type ApiKeyAuthCtx = { /** * Can be used to restore the Apple auth state via apple-utils. */ - authState?: Partial; + authState?: Partial; }; export type AuthCtx = UserAuthCtx | ApiKeyAuthCtx; diff --git a/packages/eas-cli/src/credentials/ios/appstore/bundleId.ts b/packages/eas-cli/src/credentials/ios/appstore/bundleId.ts index 2f11f74cde..8c46b1bac1 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/bundleId.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/bundleId.ts @@ -1,9 +1,11 @@ -import { BundleId, Profile, RequestContext } from '@expo/apple-utils'; +import AppleUtils, { type RequestContext } from '@expo/apple-utils'; + +const { BundleId } = AppleUtils; async function getProfilesForBundleIdDangerousAsync( context: RequestContext, bundleIdentifier: string -): Promise { +): Promise { const bundleId = await BundleId.findAsync(context, { identifier: bundleIdentifier }); if (bundleId) { return bundleId.getProfilesAsync(); @@ -14,7 +16,7 @@ async function getProfilesForBundleIdDangerousAsync( export async function getProfilesForBundleIdAsync( context: RequestContext, bundleIdentifier: string -): Promise { +): Promise { const profiles = await getProfilesForBundleIdDangerousAsync(context, bundleIdentifier); // users sometimes have a poisoned Apple cache and receive stale data from the API // we call an arbitrary method, `getBundleIdAsync` on each profile @@ -43,7 +45,7 @@ export async function getProfilesForBundleIdAsync( export async function getBundleIdForIdentifierAsync( context: RequestContext, bundleIdentifier: string -): Promise { +): Promise { const bundleId = await BundleId.findAsync(context, { identifier: bundleIdentifier }); if (!bundleId) { throw new Error(`Failed to find Bundle ID item with identifier "${bundleIdentifier}"`); diff --git a/packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts b/packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts index 409138a514..e294c07486 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/bundleIdCapabilities.ts @@ -1,26 +1,25 @@ -import { +import AppleUtils from '@expo/apple-utils'; +import { JSONObject, JSONValue } from '@expo/json-file'; +import getenv from 'getenv'; +import { inspect } from 'util'; + +import Log from '../../../log.js'; + +const { AppGroup, - BundleId, - BundleIdCapability, - CapabilityOptionMap, CapabilityType, CapabilityTypeDataProtectionOption, CapabilityTypeOption, CloudContainer, MerchantId, -} from '@expo/apple-utils'; -import { JSONObject, JSONValue } from '@expo/json-file'; -import getenv from 'getenv'; -import { inspect } from 'util'; - -import Log from '../../../log'; +} = AppleUtils; export const EXPO_NO_CAPABILITY_SYNC = getenv.boolish('EXPO_NO_CAPABILITY_SYNC', false); -type GetOptionsMethod = ( +type GetOptionsMethod = ( entitlement: JSONValue, entitlementsJson: JSONObject -) => CapabilityOptionMap[T]; +) => AppleUtils.CapabilityOptionMap[T]; const validateBooleanOptions = (options: any): boolean => { return typeof options === 'boolean'; @@ -77,7 +76,7 @@ const getDefinedOptions: GetOptionsMethod = entitlement => { * @returns */ export async function syncCapabilitiesForEntitlementsAsync( - bundleId: BundleId, + bundleId: AppleUtils.BundleId, entitlements: JSONObject = {} ): Promise<{ enabled: string[]; disabled: string[] }> { if (EXPO_NO_CAPABILITY_SYNC) { @@ -121,20 +120,20 @@ export async function syncCapabilitiesForEntitlementsAsync( } interface CapabilitiesRequest { - capabilityType: CapabilityType; + capabilityType: AppleUtils.CapabilityType; option: any; } function getCapabilitiesToEnable( - currentCapabilities: BundleIdCapability[], + currentCapabilities: AppleUtils.BundleIdCapability[], entitlements: JSONObject ): { enabledCapabilityNames: string[]; request: CapabilitiesRequest[]; - remainingCapabilities: BundleIdCapability[]; + remainingCapabilities: AppleUtils.BundleIdCapability[]; } { const enabledCapabilityNames: string[] = []; - const request: { capabilityType: CapabilityType; option: any }[] = []; + const request: { capabilityType: AppleUtils.CapabilityType; option: any }[] = []; const remainingCapabilities = [...currentCapabilities]; for (const [key, value] of Object.entries(entitlements)) { const staticCapabilityInfo = CapabilityMapping.find( @@ -198,8 +197,8 @@ export function assertValidOptions(classifier: CapabilityClassifier, value: any) } function getCapabilitiesToDisable( - bundleId: BundleId, - currentCapabilities: BundleIdCapability[], + bundleId: AppleUtils.BundleId, + currentCapabilities: AppleUtils.BundleIdCapability[], request: CapabilitiesRequest[] ): { disabledCapabilityNames: string[]; request: CapabilitiesRequest[] } { if (Log.isDebug) { @@ -256,10 +255,10 @@ function getCapabilitiesToDisable( type CapabilityClassifier = { name: string; entitlement: string; - capability: CapabilityType; + capability: AppleUtils.CapabilityType; validateOptions: (options: any) => boolean; getOptions: GetOptionsMethod; - capabilityIdModel?: typeof MerchantId; + capabilityIdModel?: typeof AppleUtils.MerchantId; capabilityIdPrefix?: string; options?: undefined; }; diff --git a/packages/eas-cli/src/credentials/ios/appstore/capabilityIdentifiers.ts b/packages/eas-cli/src/credentials/ios/appstore/capabilityIdentifiers.ts index 055db50d15..dd2677cc9f 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/capabilityIdentifiers.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/capabilityIdentifiers.ts @@ -1,15 +1,17 @@ -import { BundleId, CapabilityTypeOption } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { JSONObject } from '@expo/json-file'; -import Log from '../../../log'; -import { isAppStoreConnectTokenOnlyContext } from '../utils/authType'; +import Log from '../../../log.js'; +import { isAppStoreConnectTokenOnlyContext } from '../utils/authType.js'; import { CapabilityMapping, EXPO_NO_CAPABILITY_SYNC, assertValidOptions, -} from './bundleIdCapabilities'; +} from './bundleIdCapabilities.js'; -type UpdateCapabilityRequest = Parameters[0]; +const { CapabilityTypeOption } = AppleUtils; + +type UpdateCapabilityRequest = Parameters[0]; /** * Sync the capability identifiers with the bundle identifier capabilities. @@ -24,7 +26,7 @@ type UpdateCapabilityRequest = Parameters { if (EXPO_NO_CAPABILITY_SYNC) { diff --git a/packages/eas-cli/src/credentials/ios/appstore/contractMessages.ts b/packages/eas-cli/src/credentials/ios/appstore/contractMessages.ts index 3e4a032ad7..33c3a3661e 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/contractMessages.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/contractMessages.ts @@ -1,16 +1,18 @@ -import { ITCAgreements, RequestContext } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import chalk from 'chalk'; -import Log from '../../../log'; -import type { Ora } from '../../../ora'; -import { convertHTMLToASCII } from '../utils/convertHTMLToASCII'; +import Log from '../../../log.js'; +import type { Ora } from '../../../ora.js'; +import { convertHTMLToASCII } from '../utils/convertHTMLToASCII.js'; + +const { ITCAgreements } = AppleUtils; /** * **Does not support App Store Connect API (CI).** */ async function getContractStatusAsync( - context: RequestContext -): Promise { + context: AppleUtils.RequestContext +): Promise { try { const capabilities = await ITCAgreements.getCapabilitiesAsync(context); return capabilities?.contractStatus ?? null; @@ -24,8 +26,8 @@ async function getContractStatusAsync( * **Does not support App Store Connect API (CI).** */ async function getContractMessagesAsync( - context: RequestContext -): Promise { + context: AppleUtils.RequestContext +): Promise { try { return await ITCAgreements.getContractMessagesAsync(context); } catch (error: any) { @@ -38,8 +40,8 @@ async function getContractMessagesAsync( * **Does not support App Store Connect API (CI).** */ async function getRequiredContractMessagesAsync( - context: RequestContext -): Promise<{ messages: ITCAgreements.ITCContractMessage[]; isFatal: boolean }> { + context: AppleUtils.RequestContext +): Promise<{ messages: AppleUtils.ITCAgreements.ITCContractMessage[]; isFatal: boolean }> { // This emulates the check that's performed on the ASC website's "apps" // page before presenting the (+) create app button. const status = await getContractStatusAsync(context); @@ -75,7 +77,9 @@ async function getRequiredContractMessagesAsync( const rootUrl = 'https://appstoreconnect.apple.com'; -export function formatContractMessage(message: ITCAgreements.ITCContractMessage): string { +export function formatContractMessage( + message: AppleUtils.ITCAgreements.ITCContractMessage +): string { return convertHTMLToASCII({ content: '\u203A ' + @@ -90,7 +94,7 @@ export function formatContractMessage(message: ITCAgreements.ITCContractMessage) * **Does not support App Store Connect API (CI).** */ export async function assertContractMessagesAsync( - context: RequestContext, + context: AppleUtils.RequestContext, spinner?: Ora ): Promise { const { messages, isFatal } = await getRequiredContractMessagesAsync(context); diff --git a/packages/eas-cli/src/credentials/ios/appstore/distributionCertificate.ts b/packages/eas-cli/src/credentials/ios/appstore/distributionCertificate.ts index 76790fd8ce..fade043e1d 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/distributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/distributionCertificate.ts @@ -1,21 +1,23 @@ -import { +import AppleUtils from '@expo/apple-utils'; + +import { ora } from '../../../ora.js'; +import { DistributionCertificate, DistributionCertificateStoreInfo } from './Credentials.types.js'; +import { getRequestContext } from './authenticate.js'; +import { AuthCtx } from './authenticateTypes.js'; + +const { Certificate, CertificateType, - RequestContext, + // eslint-disable-next-line async-protect/async-suffix createCertificateAndP12Async, -} from '@expo/apple-utils'; - -import { ora } from '../../../ora'; -import { DistributionCertificate, DistributionCertificateStoreInfo } from './Credentials.types'; -import { getRequestContext } from './authenticate'; -import { AuthCtx } from './authenticateTypes'; +} = AppleUtils; export class AppleTooManyCertsError extends Error {} export async function getCertificateBySerialNumberAsync( - context: RequestContext, + context: AppleUtils.RequestContext, serialNumber: string -): Promise { +): Promise { const cert = (await Certificate.getAsync(context)).find( item => item.attributes.serialNumber === serialNumber ); @@ -26,9 +28,9 @@ export async function getCertificateBySerialNumberAsync( } export async function getDistributionCertificateAsync( - context: RequestContext, + context: AppleUtils.RequestContext, serialNumber: string -): Promise { +): Promise { // At most, this returns 2 values. const certificates = await Certificate.getAsync(context, { query: { @@ -42,7 +44,9 @@ export async function getDistributionCertificateAsync( ); } -export function transformCertificate(cert: Certificate): DistributionCertificateStoreInfo { +export function transformCertificate( + cert: AppleUtils.Certificate +): DistributionCertificateStoreInfo { return { id: cert.id, name: cert.attributes.name, diff --git a/packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts b/packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts index 55890fce27..22dea36228 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/ensureAppExists.ts @@ -1,14 +1,16 @@ -import { App, BundleId } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { JSONObject } from '@expo/json-file'; import chalk from 'chalk'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { getRequestContext, isUserAuthCtx } from './authenticate'; -import { AuthCtx, UserAuthCtx } from './authenticateTypes'; -import { syncCapabilitiesForEntitlementsAsync } from './bundleIdCapabilities'; -import { syncCapabilityIdentifiersForEntitlementsAsync } from './capabilityIdentifiers'; -import { assertContractMessagesAsync } from './contractMessages'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { getRequestContext, isUserAuthCtx } from './authenticate.js'; +import { AuthCtx, UserAuthCtx } from './authenticateTypes.js'; +import { syncCapabilitiesForEntitlementsAsync } from './bundleIdCapabilities.js'; +import { syncCapabilityIdentifiersForEntitlementsAsync } from './capabilityIdentifiers.js'; +import { assertContractMessagesAsync } from './contractMessages.js'; + +const { App, BundleId } = AppleUtils; export interface IosCapabilitiesOptions { entitlements: JSONObject; @@ -43,7 +45,7 @@ export async function ensureBundleIdExistsWithNameAsync( const context = getRequestContext(authCtx); const spinner = ora(`Linking bundle identifier ${chalk.dim(bundleIdentifier)}`).start(); - let bundleId: BundleId | null; + let bundleId: AppleUtils.BundleId | null; try { // Get the bundle id bundleId = await BundleId.findAsync(context, { identifier: bundleIdentifier }); @@ -92,7 +94,7 @@ export async function ensureBundleIdExistsWithNameAsync( } export async function syncCapabilitiesAsync( - bundleId: BundleId, + bundleId: AppleUtils.BundleId, { entitlements }: IosCapabilitiesOptions ): Promise { const spinner = ora(`Syncing capabilities`).start(); @@ -126,7 +128,7 @@ const buildMessage = (title: string, items: string[]): string => items.length ? `${title}: ${items.join(', ')}` : ''; export async function syncCapabilityIdentifiersAsync( - bundleId: BundleId, + bundleId: AppleUtils.BundleId, { entitlements }: IosCapabilitiesOptions ): Promise { const spinner = ora(`Syncing capabilities identifiers`).start(); @@ -171,7 +173,7 @@ export async function ensureAppExistsAsync( bundleIdentifier: string; sku?: string; } -): Promise { +): Promise { const context = getRequestContext(userAuthCtx); const spinner = ora(`Linking to App Store Connect ${chalk.dim(bundleIdentifier)}`).start(); diff --git a/packages/eas-cli/src/credentials/ios/appstore/provisioningProfile.ts b/packages/eas-cli/src/credentials/ios/appstore/provisioningProfile.ts index 3769155eef..bed8d9d92c 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/provisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/provisioningProfile.ts @@ -1,24 +1,32 @@ -import { Profile, ProfileType, RequestContext } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { ora } from '../../../ora'; -import { isAppStoreConnectTokenOnlyContext } from '../utils/authType'; -import { findP12CertSerialNumber } from '../utils/p12Certificate'; +import { ora } from '../../../ora.js'; +import { isAppStoreConnectTokenOnlyContext } from '../utils/authType.js'; +import { findP12CertSerialNumber } from '../utils/p12Certificate.js'; import { DistributionCertificate, ProvisioningProfile, ProvisioningProfileStoreInfo, -} from './Credentials.types'; -import { getRequestContext } from './authenticate'; -import { AuthCtx } from './authenticateTypes'; -import { getBundleIdForIdentifierAsync, getProfilesForBundleIdAsync } from './bundleId'; -import { getCertificateBySerialNumberAsync, transformCertificate } from './distributionCertificate'; +} from './Credentials.types.js'; +import { getRequestContext } from './authenticate.js'; +import { AuthCtx } from './authenticateTypes.js'; +import { getBundleIdForIdentifierAsync, getProfilesForBundleIdAsync } from './bundleId.js'; +import { + getCertificateBySerialNumberAsync, + transformCertificate, +} from './distributionCertificate.js'; + +const { Profile, ProfileType } = AppleUtils; export enum ProfileClass { Adhoc = 'ad_hoc', General = 'general', } -function resolveProfileType(profileClass: ProfileClass, isEnterprise?: boolean): ProfileType { +function resolveProfileType( + profileClass: ProfileClass, + isEnterprise?: boolean +): AppleUtils.ProfileType { if (isEnterprise) { return profileClass === ProfileClass.Adhoc ? ProfileType.IOS_APP_ADHOC @@ -31,7 +39,7 @@ function resolveProfileType(profileClass: ProfileClass, isEnterprise?: boolean): } async function transformProfileAsync( - cert: Profile, + cert: AppleUtils.Profile, authCtx: AuthCtx ): Promise { return { @@ -49,7 +57,7 @@ async function transformProfileAsync( } async function addCertificateToProfileAsync( - context: RequestContext, + context: AppleUtils.RequestContext, { serialNumber, profileId, @@ -59,7 +67,7 @@ async function addCertificateToProfileAsync( profileId: string; bundleIdentifier: string; } -): Promise { +): Promise { const cert = await getCertificateBySerialNumberAsync(context, serialNumber); const profiles = await getProfilesForBundleIdAsync(context, bundleIdentifier); diff --git a/packages/eas-cli/src/credentials/ios/appstore/provisioningProfileAdhoc.ts b/packages/eas-cli/src/credentials/ios/appstore/provisioningProfileAdhoc.ts index 44bc764d00..7a9c04a914 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/provisioningProfileAdhoc.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/provisioningProfileAdhoc.ts @@ -1,12 +1,14 @@ -import { Device, Profile, ProfileState, ProfileType, RequestContext } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { ora } from '../../../ora'; -import { isAppStoreConnectTokenOnlyContext } from '../utils/authType'; -import { ProvisioningProfile } from './Credentials.types'; -import { getRequestContext } from './authenticate'; -import { AuthCtx } from './authenticateTypes'; -import { getBundleIdForIdentifierAsync, getProfilesForBundleIdAsync } from './bundleId'; -import { getDistributionCertificateAsync } from './distributionCertificate'; +import { ora } from '../../../ora.js'; +import { isAppStoreConnectTokenOnlyContext } from '../utils/authType.js'; +import { ProvisioningProfile } from './Credentials.types.js'; +import { getRequestContext } from './authenticate.js'; +import { AuthCtx } from './authenticateTypes.js'; +import { getBundleIdForIdentifierAsync, getProfilesForBundleIdAsync } from './bundleId.js'; +import { getDistributionCertificateAsync } from './distributionCertificate.js'; + +const { Device, Profile, ProfileState, ProfileType } = AppleUtils; interface ProfileResults { didUpdate?: boolean; @@ -22,9 +24,9 @@ function uniqueItems(items: T[]): T[] { } async function registerMissingDevicesAsync( - context: RequestContext, + context: AppleUtils.RequestContext, udids: string[] -): Promise { +): Promise { const allIosProfileDevices = await Device.getAllIOSProfileDevicesAsync(context); const alreadyAdded = allIosProfileDevices.filter(device => udids.includes(device.attributes.udid) @@ -47,11 +49,11 @@ async function registerMissingDevicesAsync( } async function findProfileByBundleIdAsync( - context: RequestContext, + context: AppleUtils.RequestContext, bundleId: string, certSerialNumber: string ): Promise<{ - profile: Profile | null; + profile: AppleUtils.Profile | null; didUpdate: boolean; }> { const expoProfiles = (await getProfilesForBundleIdAsync(context, bundleId)).filter(profile => { @@ -62,7 +64,7 @@ async function findProfileByBundleIdAsync( ); }); - const expoProfilesWithCertificate: Profile[] = []; + const expoProfilesWithCertificate: AppleUtils.Profile[] = []; // find profiles associated with our development cert for (const profile of expoProfiles) { const certificates = await profile.getCertificatesAsync(); @@ -106,7 +108,7 @@ async function findProfileByBundleIdAsync( return { profile: null, didUpdate: false }; } -function sortByExpiration(a: Profile, b: Profile): number { +function sortByExpiration(a: AppleUtils.Profile, b: AppleUtils.Profile): number { return ( new Date(a.attributes.expirationDate).getTime() - new Date(b.attributes.expirationDate).getTime() @@ -114,10 +116,10 @@ function sortByExpiration(a: Profile, b: Profile): number { } async function findProfileByIdAsync( - context: RequestContext, + context: AppleUtils.RequestContext, profileId: string, bundleId: string -): Promise { +): Promise { let profiles = await getProfilesForBundleIdAsync(context, bundleId); profiles = profiles.filter( profile => profile.attributes.profileType === ProfileType.IOS_APP_ADHOC @@ -126,7 +128,7 @@ async function findProfileByIdAsync( } async function manageAdHocProfilesAsync( - context: RequestContext, + context: AppleUtils.RequestContext, { udids, bundleId, @@ -142,7 +144,7 @@ async function manageAdHocProfilesAsync( // We register all missing devices on the Apple Developer Portal. They are identified by UDIDs. const devices = await registerMissingDevicesAsync(context, udids); - let existingProfile: Profile | null; + let existingProfile: AppleUtils.Profile | null; let didUpdate = false; if (profileId) { diff --git a/packages/eas-cli/src/credentials/ios/appstore/pushKey.ts b/packages/eas-cli/src/credentials/ios/appstore/pushKey.ts index d1432f3964..4cb499f19b 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/pushKey.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/pushKey.ts @@ -1,13 +1,14 @@ -import { Keys } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import chalk from 'chalk'; import dateformat from 'dateformat'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { PushKey, PushKeyStoreInfo } from './Credentials.types'; -import { getRequestContext } from './authenticate'; -import { UserAuthCtx } from './authenticateTypes'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { PushKey, PushKeyStoreInfo } from './Credentials.types.js'; +import { getRequestContext } from './authenticate.js'; +import { UserAuthCtx } from './authenticateTypes.js'; +const { Keys } = AppleUtils; const { MaxKeysCreatedError } = Keys; export const APPLE_KEYS_TOO_MANY_GENERATED_ERROR = ` diff --git a/packages/eas-cli/src/credentials/ios/appstore/resolveCredentials.ts b/packages/eas-cli/src/credentials/ios/appstore/resolveCredentials.ts index 3054a0e945..bedba1b259 100644 --- a/packages/eas-cli/src/credentials/ios/appstore/resolveCredentials.ts +++ b/packages/eas-cli/src/credentials/ios/appstore/resolveCredentials.ts @@ -1,13 +1,15 @@ -import { Auth, JsonFileCache } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import chalk from 'chalk'; import * as fs from 'fs-extra'; import wrapAnsi from 'wrap-ansi'; -import Log, { learnMore } from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { MinimalAscApiKey } from '../credentials'; -import { AppleTeamType, Team } from './authenticateTypes'; -import * as Keychain from './keychain'; +import Log, { learnMore } from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { MinimalAscApiKey } from '../credentials.js'; +import { AppleTeamType, Team } from './authenticateTypes.js'; +import * as Keychain from './keychain.js'; + +const { JsonFileCache } = AppleUtils; /** * Get the username and possibly the password from the environment variables or the supplied options. @@ -16,8 +18,8 @@ import * as Keychain from './keychain'; * @param options */ export async function resolveUserCredentialsAsync( - options: Partial -): Promise> { + options: Partial +): Promise> { const credentials = getAppleIdFromEnvironmentOrOptions(options); if (!credentials.username) { @@ -187,7 +189,7 @@ function getAppleIdFromEnvironmentOrOptions({ username, password, ...userCredentials -}: Partial): Partial { +}: Partial): Partial { const passedAppleId = username || process.env.EXPO_APPLE_ID; // Only resolve the password if the username was provided. const passedAppleIdPassword = passedAppleId @@ -234,7 +236,7 @@ async function cacheUsernameAsync(username: string): Promise { export async function promptPasswordAsync({ username, -}: Pick): Promise { +}: Pick): Promise { const cachedPassword = await getCachedPasswordAsync({ username }); if (cachedPassword) { @@ -289,7 +291,7 @@ function getKeychainServiceName(appleId: string): string { export async function deletePasswordAsync({ username, -}: Pick): Promise { +}: Pick): Promise { const serviceName = getKeychainServiceName(username); const success = await Keychain.deletePasswordAsync({ username, serviceName }); if (success) { @@ -300,7 +302,7 @@ export async function deletePasswordAsync({ async function getCachedPasswordAsync({ username, -}: Pick): Promise { +}: Pick): Promise { // If the user opts out, delete the password. if (Keychain.EXPO_NO_KEYCHAIN) { await deletePasswordAsync({ username }); @@ -311,7 +313,10 @@ async function getCachedPasswordAsync({ return Keychain.getPasswordAsync({ username, serviceName }); } -async function cachePasswordAsync({ username, password }: Auth.UserCredentials): Promise { +async function cachePasswordAsync({ + username, + password, +}: AppleUtils.Auth.UserCredentials): Promise { if (Keychain.EXPO_NO_KEYCHAIN) { Log.log('\u203A Skip storing Apple ID password in the local Keychain.'); return false; diff --git a/packages/eas-cli/src/credentials/ios/credentials.ts b/packages/eas-cli/src/credentials/ios/credentials.ts index 1c8bb6ba27..b63721e7e3 100644 --- a/packages/eas-cli/src/credentials/ios/credentials.ts +++ b/packages/eas-cli/src/credentials/ios/credentials.ts @@ -1,15 +1,15 @@ -import { UserRole } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AppleDevice } from '../../graphql/generated'; -import Log from '../../log'; -import { CredentialSchema } from '../utils/promptForCredentials'; +import { AppleDevice } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { CredentialSchema } from '../utils/promptForCredentials.js'; import { DistributionCertificate, ProvisioningProfile, PushKey, -} from './appstore/Credentials.types'; -import { findP12CertSerialNumber } from './utils/p12Certificate'; -import { readAppleTeam as readAppleTeamFromProvisioningProfile } from './utils/provisioningProfile'; +} from './appstore/Credentials.types.js'; +import { findP12CertSerialNumber } from './utils/p12Certificate.js'; +import { readAppleTeam as readAppleTeamFromProvisioningProfile } from './utils/provisioningProfile.js'; export interface AppLookupParams { accountName: string; @@ -108,7 +108,7 @@ export type MinimalAscApiKey = { issuerId: string; teamId?: string; teamName?: string; - roles?: UserRole[]; + roles?: AppleUtils.UserRole[]; name?: string; }; diff --git a/packages/eas-cli/src/credentials/ios/types.ts b/packages/eas-cli/src/credentials/ios/types.ts index 4a667dfd3c..925210aa51 100644 --- a/packages/eas-cli/src/credentials/ios/types.ts +++ b/packages/eas-cli/src/credentials/ios/types.ts @@ -3,8 +3,8 @@ import { JSONObject } from '@expo/json-file'; import { CommonIosAppCredentialsFragment, IosAppBuildCredentialsFragment, -} from '../../graphql/generated'; -import { Account } from '../../user/Account'; +} from '../../graphql/generated.js'; +import { Account } from '../../user/Account.js'; export interface App { account: Account; diff --git a/packages/eas-cli/src/credentials/ios/utils/__tests__/p12Certificate-test.ts b/packages/eas-cli/src/credentials/ios/utils/__tests__/p12Certificate-test.ts index 6490473919..77a16774c7 100644 --- a/packages/eas-cli/src/credentials/ios/utils/__tests__/p12Certificate-test.ts +++ b/packages/eas-cli/src/credentials/ios/utils/__tests__/p12Certificate-test.ts @@ -3,8 +3,8 @@ import forge from 'node-forge'; import { testDistributionCertificateEmptyPasswordBase64, testPKCS12KeystoreEmptyPasswordBase64, -} from '../../../__tests__/fixtures-base64-data'; -import { getCertData } from '../p12Certificate'; +} from '../../../__tests__/fixtures-base64-data.js'; +import { getCertData } from '../p12Certificate.js'; describe(getCertData, () => { it('does not throw if p12 file with empty password was created with keychain', async () => { diff --git a/packages/eas-cli/src/credentials/ios/utils/__tests__/printCredentials-test.ts b/packages/eas-cli/src/credentials/ios/utils/__tests__/printCredentials-test.ts index e70daad92d..f8777c51ca 100644 --- a/packages/eas-cli/src/credentials/ios/utils/__tests__/printCredentials-test.ts +++ b/packages/eas-cli/src/credentials/ios/utils/__tests__/printCredentials-test.ts @@ -1,10 +1,10 @@ import mockdate from 'mockdate'; -import nullthrows from 'nullthrows'; -import Log from '../../../../log'; -import { IosAppCredentialsQuery } from '../../api/graphql/queries/IosAppCredentialsQuery'; -import { App, Target } from '../../types'; -import { displayIosCredentials } from '../printCredentials'; +import Log from '../../../../log.js'; +import { nullthrows } from '../../../../utils/nullthrows.js'; +import { IosAppCredentialsQuery } from '../../api/graphql/queries/IosAppCredentialsQuery.js'; +import { App, Target } from '../../types.js'; +import { displayIosCredentials } from '../printCredentials.js'; jest.mock('../../../../log'); jest.mock('chalk', () => ({ bold: jest.fn(log => log), cyan: { bold: jest.fn(log => log) } })); diff --git a/packages/eas-cli/src/credentials/ios/utils/__tests__/provisioningProfile-test.ts b/packages/eas-cli/src/credentials/ios/utils/__tests__/provisioningProfile-test.ts index d59d3eb097..353cd83d23 100644 --- a/packages/eas-cli/src/credentials/ios/utils/__tests__/provisioningProfile-test.ts +++ b/packages/eas-cli/src/credentials/ios/utils/__tests__/provisioningProfile-test.ts @@ -1,5 +1,5 @@ -import { testProvisioningProfileBase64 } from '../../../__tests__/fixtures-base64-data'; -import * as provisioningProfileUtils from '../provisioningProfile'; +import { testProvisioningProfileBase64 } from '../../../__tests__/fixtures-base64-data.js'; +import * as provisioningProfileUtils from '../provisioningProfile.js'; const MALFORMED_PROVISIONING_PROFILE = 'aWV5Zmd3eXVlZmdl'; diff --git a/packages/eas-cli/src/credentials/ios/utils/authType.ts b/packages/eas-cli/src/credentials/ios/utils/authType.ts index 63e3050637..e7aa4ee0f7 100644 --- a/packages/eas-cli/src/credentials/ios/utils/authType.ts +++ b/packages/eas-cli/src/credentials/ios/utils/authType.ts @@ -1,6 +1,6 @@ -import { RequestContext } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; /** Is the request context App Store Connect only with no access to cookies authentication. */ -export function isAppStoreConnectTokenOnlyContext(authContext: RequestContext): boolean { +export function isAppStoreConnectTokenOnlyContext(authContext: AppleUtils.RequestContext): boolean { return !authContext.teamId && !!authContext.token; } diff --git a/packages/eas-cli/src/credentials/ios/utils/printCredentials.ts b/packages/eas-cli/src/credentials/ios/utils/printCredentials.ts index 1e10899c6b..432711dea8 100644 --- a/packages/eas-cli/src/credentials/ios/utils/printCredentials.ts +++ b/packages/eas-cli/src/credentials/ios/utils/printCredentials.ts @@ -7,13 +7,13 @@ import { ApplePushKeyFragment, IosAppBuildCredentialsFragment, IosDistributionType, -} from '../../../graphql/generated'; -import { APPLE_DEVICE_CLASS_LABELS } from '../../../graphql/types/credentials/AppleDevice'; -import Log from '../../../log'; -import { fromNow } from '../../../utils/date'; -import formatFields from '../../../utils/formatFields'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { App, IosAppBuildCredentialsMap, IosAppCredentialsMap, Target } from '../types'; +} from '../../../graphql/generated.js'; +import { APPLE_DEVICE_CLASS_LABELS } from '../../../graphql/types/credentials/AppleDevice.js'; +import Log from '../../../log.js'; +import { fromNow } from '../../../utils/date.js'; +import formatFields from '../../../utils/formatFields.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { App, IosAppBuildCredentialsMap, IosAppCredentialsMap, Target } from '../types.js'; function prettyIosDistributionType(distributionType: IosDistributionType): string { switch (distributionType) { diff --git a/packages/eas-cli/src/credentials/ios/utils/provisioningProfile.ts b/packages/eas-cli/src/credentials/ios/utils/provisioningProfile.ts index c1b8e0032e..03ba45aabd 100644 --- a/packages/eas-cli/src/credentials/ios/utils/provisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/utils/provisioningProfile.ts @@ -1,4 +1,6 @@ -import plist, { PlistArray, PlistObject } from '@expo/plist'; +import Plist from '@expo/plist'; + +const plist = Plist.default; interface AppleTeam { teamId: string; @@ -7,7 +9,7 @@ interface AppleTeam { export function readAppleTeam(dataBase64: string): AppleTeam { const profilePlist = parse(dataBase64); - const teamId = (profilePlist['TeamIdentifier'] as PlistArray)?.[0] as string; + const teamId = (profilePlist['TeamIdentifier'] as Plist.PlistArray)?.[0] as string; const teamName = profilePlist['TeamName'] as string; if (!teamId) { throw new Error('Team identifier is missing from provisioning profile'); @@ -26,11 +28,11 @@ export function isAdHocProfile(dataBase64: string): boolean { return Array.isArray(provisionedDevices); } -export function parse(dataBase64: string): PlistObject { +export function parse(dataBase64: string): Plist.PlistObject { try { const buffer = Buffer.from(dataBase64, 'base64'); const profile = buffer.toString('utf8'); - return plist.parse(profile) as PlistObject; + return plist.parse(profile) as Plist.PlistObject; } catch { throw new Error('Provisioning profile is malformed'); } diff --git a/packages/eas-cli/src/credentials/ios/validators/validateAscApiKey.ts b/packages/eas-cli/src/credentials/ios/validators/validateAscApiKey.ts index 16aca6e8fa..5e3d73869c 100644 --- a/packages/eas-cli/src/credentials/ios/validators/validateAscApiKey.ts +++ b/packages/eas-cli/src/credentials/ios/validators/validateAscApiKey.ts @@ -1,7 +1,7 @@ -import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated'; -import { CredentialsContext } from '../../context'; -import { AscApiKeyInfo } from '../appstore/Credentials.types'; -import { MinimalAscApiKey } from '../credentials'; +import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated.js'; +import { CredentialsContext } from '../../context.js'; +import { AscApiKeyInfo } from '../appstore/Credentials.types.js'; +import { MinimalAscApiKey } from '../credentials.js'; export async function isAscApiKeyValidAndTrackedAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/ios/validators/validateDistributionCertificate.ts b/packages/eas-cli/src/credentials/ios/validators/validateDistributionCertificate.ts index 01982f52dc..6e27ce387c 100644 --- a/packages/eas-cli/src/credentials/ios/validators/validateDistributionCertificate.ts +++ b/packages/eas-cli/src/credentials/ios/validators/validateDistributionCertificate.ts @@ -1,6 +1,6 @@ -import { CredentialsContext } from '../../context'; -import { DistributionCertificate } from '../appstore/Credentials.types'; -import { filterRevokedDistributionCerts } from '../appstore/CredentialsUtils'; +import { CredentialsContext } from '../../context.js'; +import { DistributionCertificate } from '../appstore/Credentials.types.js'; +import { filterRevokedDistributionCerts } from '../appstore/CredentialsUtils.js'; export async function validateDistributionCertificateAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/ios/validators/validateProvisioningProfile.ts b/packages/eas-cli/src/credentials/ios/validators/validateProvisioningProfile.ts index 60cc4106d9..55de16db37 100644 --- a/packages/eas-cli/src/credentials/ios/validators/validateProvisioningProfile.ts +++ b/packages/eas-cli/src/credentials/ios/validators/validateProvisioningProfile.ts @@ -2,15 +2,15 @@ import { PlistArray, PlistObject } from '@expo/plist'; import assert from 'assert'; import crypto from 'crypto'; import minimatch from 'minimatch'; -import nullthrows from 'nullthrows'; - -import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../graphql/generated'; -import Log from '../../../log'; -import { CredentialsContext } from '../../context'; -import { AppLookupParams } from '../api/GraphqlClient'; -import { ProfileClass } from '../appstore/provisioningProfile'; -import { getP12CertFingerprint } from '../utils/p12Certificate'; -import { parse as parseProvisioningProfile } from '../utils/provisioningProfile'; + +import { IosAppBuildCredentialsFragment, IosDistributionType } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { nullthrows } from '../../../utils/nullthrows.js'; +import { CredentialsContext } from '../../context.js'; +import { AppLookupParams } from '../api/GraphqlClient.js'; +import { ProfileClass } from '../appstore/provisioningProfile.js'; +import { getP12CertFingerprint } from '../utils/p12Certificate.js'; +import { parse as parseProvisioningProfile } from '../utils/provisioningProfile.js'; export async function validateProvisioningProfileAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/ios/validators/validatePushKey.ts b/packages/eas-cli/src/credentials/ios/validators/validatePushKey.ts index fe31ab69ef..7d80ab23b8 100644 --- a/packages/eas-cli/src/credentials/ios/validators/validatePushKey.ts +++ b/packages/eas-cli/src/credentials/ios/validators/validatePushKey.ts @@ -1,6 +1,6 @@ -import { CredentialsContext } from '../../context'; -import { PushKey } from '../appstore/Credentials.types'; -import { filterRevokedAndUntrackedPushKeysAsync } from '../appstore/CredentialsUtils'; +import { CredentialsContext } from '../../context.js'; +import { PushKey } from '../appstore/Credentials.types.js'; +import { filterRevokedAndUntrackedPushKeysAsync } from '../appstore/CredentialsUtils.js'; export async function isPushKeyValidAndTrackedAsync( ctx: CredentialsContext, diff --git a/packages/eas-cli/src/credentials/manager/AndroidActions.ts b/packages/eas-cli/src/credentials/manager/AndroidActions.ts index dcf0e9c86c..929b7832aa 100644 --- a/packages/eas-cli/src/credentials/manager/AndroidActions.ts +++ b/packages/eas-cli/src/credentials/manager/AndroidActions.ts @@ -1,4 +1,4 @@ -import { ActionInfo, AndroidActionType, Scope } from './Actions'; +import { ActionInfo, AndroidActionType, Scope } from './Actions.js'; export const highLevelActions: ActionInfo[] = [ { diff --git a/packages/eas-cli/src/credentials/manager/HelperActions.ts b/packages/eas-cli/src/credentials/manager/HelperActions.ts index ee3f2fa2da..dd8b9baea0 100644 --- a/packages/eas-cli/src/credentials/manager/HelperActions.ts +++ b/packages/eas-cli/src/credentials/manager/HelperActions.ts @@ -1,6 +1,6 @@ -import Log from '../../log'; -import { pressAnyKeyToContinueAsync } from '../../prompts'; -import { CredentialsContext } from '../context'; +import Log from '../../log.js'; +import { pressAnyKeyToContinueAsync } from '../../prompts.js'; +import { CredentialsContext } from '../context.js'; export interface Action { runAsync(ctx: CredentialsContext): Promise; diff --git a/packages/eas-cli/src/credentials/manager/IosActions.ts b/packages/eas-cli/src/credentials/manager/IosActions.ts index d21c715009..8f16a4ee07 100644 --- a/packages/eas-cli/src/credentials/manager/IosActions.ts +++ b/packages/eas-cli/src/credentials/manager/IosActions.ts @@ -1,5 +1,5 @@ -import { CredentialsContext } from '../context'; -import { ActionInfo, IosActionType, Scope } from './Actions'; +import { CredentialsContext } from '../context.js'; +import { ActionInfo, IosActionType, Scope } from './Actions.js'; export const highLevelActions: ActionInfo[] = [ { diff --git a/packages/eas-cli/src/credentials/manager/ManageAndroid.ts b/packages/eas-cli/src/credentials/manager/ManageAndroid.ts index b4870a454c..1fde7cc0ce 100644 --- a/packages/eas-cli/src/credentials/manager/ManageAndroid.ts +++ b/packages/eas-cli/src/credentials/manager/ManageAndroid.ts @@ -2,53 +2,56 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; import assert from 'assert'; -import Log, { learnMore } from '../../log'; -import { GradleBuildContext, resolveGradleBuildContextAsync } from '../../project/android/gradle'; +import Log, { learnMore } from '../../log.js'; +import { + GradleBuildContext, + resolveGradleBuildContextAsync, +} from '../../project/android/gradle.js'; import { getProjectAccountName, promptToCreateProjectIfNotExistsAsync, -} from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { findAccountByName } from '../../user/Account'; -import { ensureActorHasUsername, ensureLoggedInAsync } from '../../user/actions'; -import { AssignFcm } from '../android/actions/AssignFcm'; -import { AssignGoogleServiceAccountKey } from '../android/actions/AssignGoogleServiceAccountKey'; +} from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { findAccountByName } from '../../user/Account.js'; +import { ensureActorHasUsername, ensureLoggedInAsync } from '../../user/actions.js'; +import { AssignFcm } from '../android/actions/AssignFcm.js'; +import { AssignGoogleServiceAccountKey } from '../android/actions/AssignGoogleServiceAccountKey.js'; import { canCopyLegacyCredentialsAsync, getAppLookupParamsFromContextAsync, promptUserAndCopyLegacyCredentialsAsync, -} from '../android/actions/BuildCredentialsUtils'; -import { CreateFcm } from '../android/actions/CreateFcm'; -import { CreateGoogleServiceAccountKey } from '../android/actions/CreateGoogleServiceAccountKey'; -import { CreateKeystore } from '../android/actions/CreateKeystore'; -import { DownloadKeystore } from '../android/actions/DownloadKeystore'; -import { RemoveFcm } from '../android/actions/RemoveFcm'; -import { SelectAndRemoveGoogleServiceAccountKey } from '../android/actions/RemoveGoogleServiceAccountKey'; -import { RemoveKeystore } from '../android/actions/RemoveKeystore'; -import { SetUpBuildCredentialsFromCredentialsJson } from '../android/actions/SetUpBuildCredentialsFromCredentialsJson'; -import { SetUpGoogleServiceAccountKey } from '../android/actions/SetUpGoogleServiceAccountKey'; -import { UpdateCredentialsJson } from '../android/actions/UpdateCredentialsJson'; -import { UseExistingGoogleServiceAccountKey } from '../android/actions/UseExistingGoogleServiceAccountKey'; +} from '../android/actions/BuildCredentialsUtils.js'; +import { CreateFcm } from '../android/actions/CreateFcm.js'; +import { CreateGoogleServiceAccountKey } from '../android/actions/CreateGoogleServiceAccountKey.js'; +import { CreateKeystore } from '../android/actions/CreateKeystore.js'; +import { DownloadKeystore } from '../android/actions/DownloadKeystore.js'; +import { RemoveFcm } from '../android/actions/RemoveFcm.js'; +import { SelectAndRemoveGoogleServiceAccountKey } from '../android/actions/RemoveGoogleServiceAccountKey.js'; +import { RemoveKeystore } from '../android/actions/RemoveKeystore.js'; +import { SetUpBuildCredentialsFromCredentialsJson } from '../android/actions/SetUpBuildCredentialsFromCredentialsJson.js'; +import { SetUpGoogleServiceAccountKey } from '../android/actions/SetUpGoogleServiceAccountKey.js'; +import { UpdateCredentialsJson } from '../android/actions/UpdateCredentialsJson.js'; +import { UseExistingGoogleServiceAccountKey } from '../android/actions/UseExistingGoogleServiceAccountKey.js'; import { displayAndroidAppCredentials, displayEmptyAndroidCredentials, -} from '../android/utils/printCredentials'; -import { CredentialsContext } from '../context'; -import { ActionInfo, AndroidActionType, Scope } from './Actions'; +} from '../android/utils/printCredentials.js'; +import { CredentialsContext } from '../context.js'; +import { ActionInfo, AndroidActionType, Scope } from './Actions.js'; import { buildCredentialsActions, credentialsJsonActions, fcmActions, gsaKeyActions, highLevelActions, -} from './AndroidActions'; -import { Action, PressAnyKeyToContinue } from './HelperActions'; +} from './AndroidActions.js'; +import { Action, PressAnyKeyToContinue } from './HelperActions.js'; import { SelectAndroidBuildCredentials, SelectAndroidBuildCredentialsResultType, SelectExistingAndroidBuildCredentials, -} from './SelectAndroidBuildCredentials'; -import { SelectBuildProfileFromEasJson } from './SelectBuildProfileFromEasJson'; +} from './SelectAndroidBuildCredentials.js'; +import { SelectBuildProfileFromEasJson } from './SelectBuildProfileFromEasJson.js'; export class ManageAndroid { constructor(private callingAction: Action, private projectDir: string) {} diff --git a/packages/eas-cli/src/credentials/manager/ManageIos.ts b/packages/eas-cli/src/credentials/manager/ManageIos.ts index 86130bde8b..3d240fdb59 100644 --- a/packages/eas-cli/src/credentials/manager/ManageIos.ts +++ b/packages/eas-cli/src/credentials/manager/ManageIos.ts @@ -1,61 +1,61 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; import assert from 'assert'; -import nullthrows from 'nullthrows'; import { AppleDistributionCertificateFragment, IosAppBuildCredentialsFragment, IosDistributionType as IosDistributionTypeGraphql, -} from '../../graphql/generated'; -import Log, { learnMore } from '../../log'; -import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme'; -import { resolveTargetsAsync } from '../../project/ios/target'; +} from '../../graphql/generated.js'; +import Log, { learnMore } from '../../log.js'; +import { resolveXcodeBuildContextAsync } from '../../project/ios/scheme.js'; +import { resolveTargetsAsync } from '../../project/ios/target.js'; import { getProjectAccountName, promptToCreateProjectIfNotExistsAsync, -} from '../../project/projectUtils'; -import { confirmAsync, promptAsync, selectAsync } from '../../prompts'; -import { Account, findAccountByName } from '../../user/Account'; -import { ensureActorHasUsername, ensureLoggedInAsync } from '../../user/actions'; -import { CredentialsContext } from '../context'; +} from '../../project/projectUtils.js'; +import { confirmAsync, promptAsync, selectAsync } from '../../prompts.js'; +import { Account, findAccountByName } from '../../user/Account.js'; +import { ensureActorHasUsername, ensureLoggedInAsync } from '../../user/actions.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { CredentialsContext } from '../context.js'; import { AppStoreApiKeyPurpose, selectAscApiKeysFromAccountAsync, -} from '../ios/actions/AscApiKeyUtils'; -import { AssignAscApiKey } from '../ios/actions/AssignAscApiKey'; -import { AssignPushKey } from '../ios/actions/AssignPushKey'; -import { getAppLookupParamsFromContext } from '../ios/actions/BuildCredentialsUtils'; -import { CreateAscApiKey } from '../ios/actions/CreateAscApiKey'; -import { CreateDistributionCertificate } from '../ios/actions/CreateDistributionCertificate'; -import { CreatePushKey } from '../ios/actions/CreatePushKey'; -import { selectValidDistributionCertificateAsync } from '../ios/actions/DistributionCertificateUtils'; -import { selectPushKeyAsync } from '../ios/actions/PushKeyUtils'; -import { SelectAndRemoveAscApiKey } from '../ios/actions/RemoveAscApiKey'; -import { SelectAndRemoveDistributionCertificate } from '../ios/actions/RemoveDistributionCertificate'; -import { RemoveProvisioningProfiles } from '../ios/actions/RemoveProvisioningProfile'; -import { SelectAndRemovePushKey } from '../ios/actions/RemovePushKey'; -import { SetUpAdhocProvisioningProfile } from '../ios/actions/SetUpAdhocProvisioningProfile'; -import { SetUpAscApiKey } from '../ios/actions/SetUpAscApiKey'; -import { SetUpBuildCredentials } from '../ios/actions/SetUpBuildCredentials'; -import { SetUpBuildCredentialsFromCredentialsJson } from '../ios/actions/SetUpBuildCredentialsFromCredentialsJson'; -import { SetUpProvisioningProfile } from '../ios/actions/SetUpProvisioningProfile'; -import { SetUpPushKey } from '../ios/actions/SetUpPushKey'; -import { UpdateCredentialsJson } from '../ios/actions/UpdateCredentialsJson'; -import { AppLookupParams } from '../ios/api/GraphqlClient'; -import { App, IosAppCredentialsMap, Target } from '../ios/types'; -import { displayIosCredentials } from '../ios/utils/printCredentials'; -import { ActionInfo, IosActionType, Scope } from './Actions'; -import { Action, PressAnyKeyToContinue } from './HelperActions'; +} from '../ios/actions/AscApiKeyUtils.js'; +import { AssignAscApiKey } from '../ios/actions/AssignAscApiKey.js'; +import { AssignPushKey } from '../ios/actions/AssignPushKey.js'; +import { getAppLookupParamsFromContext } from '../ios/actions/BuildCredentialsUtils.js'; +import { CreateAscApiKey } from '../ios/actions/CreateAscApiKey.js'; +import { CreateDistributionCertificate } from '../ios/actions/CreateDistributionCertificate.js'; +import { CreatePushKey } from '../ios/actions/CreatePushKey.js'; +import { selectValidDistributionCertificateAsync } from '../ios/actions/DistributionCertificateUtils.js'; +import { selectPushKeyAsync } from '../ios/actions/PushKeyUtils.js'; +import { SelectAndRemoveAscApiKey } from '../ios/actions/RemoveAscApiKey.js'; +import { SelectAndRemoveDistributionCertificate } from '../ios/actions/RemoveDistributionCertificate.js'; +import { RemoveProvisioningProfiles } from '../ios/actions/RemoveProvisioningProfile.js'; +import { SelectAndRemovePushKey } from '../ios/actions/RemovePushKey.js'; +import { SetUpAdhocProvisioningProfile } from '../ios/actions/SetUpAdhocProvisioningProfile.js'; +import { SetUpAscApiKey } from '../ios/actions/SetUpAscApiKey.js'; +import { SetUpBuildCredentials } from '../ios/actions/SetUpBuildCredentials.js'; +import { SetUpBuildCredentialsFromCredentialsJson } from '../ios/actions/SetUpBuildCredentialsFromCredentialsJson.js'; +import { SetUpProvisioningProfile } from '../ios/actions/SetUpProvisioningProfile.js'; +import { SetUpPushKey } from '../ios/actions/SetUpPushKey.js'; +import { UpdateCredentialsJson } from '../ios/actions/UpdateCredentialsJson.js'; +import { AppLookupParams } from '../ios/api/GraphqlClient.js'; +import { App, IosAppCredentialsMap, Target } from '../ios/types.js'; +import { displayIosCredentials } from '../ios/utils/printCredentials.js'; +import { ActionInfo, IosActionType, Scope } from './Actions.js'; +import { Action, PressAnyKeyToContinue } from './HelperActions.js'; import { credentialsJsonActions, getAscApiKeyActions, getBuildCredentialsActions, getPushKeyActions, highLevelActions, -} from './IosActions'; -import { SelectBuildProfileFromEasJson } from './SelectBuildProfileFromEasJson'; -import { SelectIosDistributionTypeGraphqlFromBuildProfile } from './SelectIosDistributionTypeGraphqlFromBuildProfile'; +} from './IosActions.js'; +import { SelectBuildProfileFromEasJson } from './SelectBuildProfileFromEasJson.js'; +import { SelectIosDistributionTypeGraphqlFromBuildProfile } from './SelectIosDistributionTypeGraphqlFromBuildProfile.js'; export class ManageIos { constructor(private callingAction: Action, private projectDir: string) {} diff --git a/packages/eas-cli/src/credentials/manager/SelectAndroidBuildCredentials.ts b/packages/eas-cli/src/credentials/manager/SelectAndroidBuildCredentials.ts index 60bb08a60b..edc8c0f9e1 100644 --- a/packages/eas-cli/src/credentials/manager/SelectAndroidBuildCredentials.ts +++ b/packages/eas-cli/src/credentials/manager/SelectAndroidBuildCredentials.ts @@ -1,10 +1,13 @@ -import { AndroidAppBuildCredentialsFragment } from '../../graphql/generated'; -import Log from '../../log'; -import { promptAsync } from '../../prompts'; -import { promptForNameAsync, sortBuildCredentials } from '../android/actions/BuildCredentialsUtils'; -import { AppLookupParams } from '../android/api/GraphqlClient'; -import { AndroidAppBuildCredentialsMetadataInput } from '../android/api/graphql/mutations/AndroidAppBuildCredentialsMutation'; -import { CredentialsContext } from '../context'; +import { AndroidAppBuildCredentialsFragment } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { promptAsync } from '../../prompts.js'; +import { + promptForNameAsync, + sortBuildCredentials, +} from '../android/actions/BuildCredentialsUtils.js'; +import { AppLookupParams } from '../android/api/GraphqlClient.js'; +import { AndroidAppBuildCredentialsMetadataInput } from '../android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js'; +import { CredentialsContext } from '../context.js'; export enum SelectAndroidBuildCredentialsResultType { CREATE_REQUEST, diff --git a/packages/eas-cli/src/credentials/manager/SelectBuildProfileFromEasJson.ts b/packages/eas-cli/src/credentials/manager/SelectBuildProfileFromEasJson.ts index 79cf1acdfd..42d1cffc79 100644 --- a/packages/eas-cli/src/credentials/manager/SelectBuildProfileFromEasJson.ts +++ b/packages/eas-cli/src/credentials/manager/SelectBuildProfileFromEasJson.ts @@ -1,8 +1,8 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile, EasJsonReader } from '@expo/eas-json'; -import Log from '../../log'; -import { promptAsync } from '../../prompts'; +import Log from '../../log.js'; +import { promptAsync } from '../../prompts.js'; export class SelectBuildProfileFromEasJson { private easJsonReader: EasJsonReader; diff --git a/packages/eas-cli/src/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.ts b/packages/eas-cli/src/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.ts index 37b6d8654e..ef05885101 100644 --- a/packages/eas-cli/src/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.ts +++ b/packages/eas-cli/src/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.ts @@ -1,9 +1,9 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; -import { IosDistributionType as IosDistributionTypeGraphql } from '../../graphql/generated'; -import { promptAsync } from '../../prompts'; -import { CredentialsContext } from '../context'; +import { IosDistributionType as IosDistributionTypeGraphql } from '../../graphql/generated.js'; +import { promptAsync } from '../../prompts.js'; +import { CredentialsContext } from '../context.js'; export class SelectIosDistributionTypeGraphqlFromBuildProfile { constructor(private buildProfile: BuildProfile) {} diff --git a/packages/eas-cli/src/credentials/manager/SelectPlatform.ts b/packages/eas-cli/src/credentials/manager/SelectPlatform.ts index 233e43fe57..63b7a206f2 100644 --- a/packages/eas-cli/src/credentials/manager/SelectPlatform.ts +++ b/packages/eas-cli/src/credentials/manager/SelectPlatform.ts @@ -1,6 +1,6 @@ -import { promptAsync } from '../../prompts'; -import { ManageAndroid } from './ManageAndroid'; -import { ManageIos } from './ManageIos'; +import { promptAsync } from '../../prompts.js'; +import { ManageAndroid } from './ManageAndroid.js'; +import { ManageIos } from './ManageIos.js'; export class SelectPlatform { async runAsync(): Promise { diff --git a/packages/eas-cli/src/credentials/manager/__tests__/SelectAndroidBuildCredentials-test.ts b/packages/eas-cli/src/credentials/manager/__tests__/SelectAndroidBuildCredentials-test.ts index 76b70a5047..5c304e6d32 100644 --- a/packages/eas-cli/src/credentials/manager/__tests__/SelectAndroidBuildCredentials-test.ts +++ b/packages/eas-cli/src/credentials/manager/__tests__/SelectAndroidBuildCredentials-test.ts @@ -1,14 +1,14 @@ -import { promptAsync } from '../../../prompts'; +import { promptAsync } from '../../../prompts.js'; import { getNewAndroidApiMock, testAndroidBuildCredentialsFragment, -} from '../../__tests__/fixtures-android'; -import { createCtxMock } from '../../__tests__/fixtures-context'; -import { getAppLookupParamsFromContextAsync } from '../../android/actions/BuildCredentialsUtils'; +} from '../../__tests__/fixtures-android.js'; +import { createCtxMock } from '../../__tests__/fixtures-context.js'; +import { getAppLookupParamsFromContextAsync } from '../../android/actions/BuildCredentialsUtils.js'; import { SelectAndroidBuildCredentials, SelectAndroidBuildCredentialsResultType, -} from '../SelectAndroidBuildCredentials'; +} from '../SelectAndroidBuildCredentials.js'; const TEST_STRING = 'TEST_STRING'; jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/credentials/manager/__tests__/SelectIosDistributionTypeGraphqlFromBuildProfile-test.ts b/packages/eas-cli/src/credentials/manager/__tests__/SelectIosDistributionTypeGraphqlFromBuildProfile-test.ts index edde9ccb6c..61629c2d51 100644 --- a/packages/eas-cli/src/credentials/manager/__tests__/SelectIosDistributionTypeGraphqlFromBuildProfile-test.ts +++ b/packages/eas-cli/src/credentials/manager/__tests__/SelectIosDistributionTypeGraphqlFromBuildProfile-test.ts @@ -1,9 +1,9 @@ import { Platform } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; -import { IosDistributionType as IosDistributionTypeGraphql } from '../../../graphql/generated'; -import { createCtxMock } from '../../__tests__/fixtures-context'; -import { SelectIosDistributionTypeGraphqlFromBuildProfile } from '../SelectIosDistributionTypeGraphqlFromBuildProfile'; +import { IosDistributionType as IosDistributionTypeGraphql } from '../../../graphql/generated.js'; +import { createCtxMock } from '../../__tests__/fixtures-context.js'; +import { SelectIosDistributionTypeGraphqlFromBuildProfile } from '../SelectIosDistributionTypeGraphqlFromBuildProfile.js'; describe('SelectIosDistributionTypeGraphqlFromBuildProfile', () => { it('errors with a simulator distribution', async () => { diff --git a/packages/eas-cli/src/credentials/utils/promptForCredentials.ts b/packages/eas-cli/src/credentials/utils/promptForCredentials.ts index c832e4f59f..b8a8dcce52 100644 --- a/packages/eas-cli/src/credentials/utils/promptForCredentials.ts +++ b/packages/eas-cli/src/credentials/utils/promptForCredentials.ts @@ -2,8 +2,8 @@ import fs from 'fs-extra'; import path from 'path'; import untildify from 'untildify'; -import Log from '../../log'; -import { Question as PromptQuestion, confirmAsync, promptAsync } from '../../prompts'; +import Log from '../../log.js'; +import { Question as PromptQuestion, confirmAsync, promptAsync } from '../../prompts.js'; export type Question = { field: string; diff --git a/packages/eas-cli/src/devices/__tests__/manager-test.ts b/packages/eas-cli/src/devices/__tests__/manager-test.ts index 53a87418f9..7949bd1f5f 100644 --- a/packages/eas-cli/src/devices/__tests__/manager-test.ts +++ b/packages/eas-cli/src/devices/__tests__/manager-test.ts @@ -1,8 +1,8 @@ import prompts from 'prompts'; -import Log from '../../log'; -import { Actor } from '../../user/User'; -import { AccountResolver } from '../manager'; +import Log from '../../log.js'; +import { Actor } from '../../user/User.js'; +import { AccountResolver } from '../manager.js'; jest.mock('prompts'); diff --git a/packages/eas-cli/src/devices/__tests__/udids-test.ts b/packages/eas-cli/src/devices/__tests__/udids-test.ts index e6cf9422e9..4fc00c99fa 100644 --- a/packages/eas-cli/src/devices/__tests__/udids-test.ts +++ b/packages/eas-cli/src/devices/__tests__/udids-test.ts @@ -1,4 +1,4 @@ -import { isValidUDID, normalizeUDID } from '../udids'; +import { isValidUDID, normalizeUDID } from '../udids.js'; describe(isValidUDID, () => { test('valid 40-character UDID', () => { diff --git a/packages/eas-cli/src/devices/actions/create/__tests__/action-test.ts b/packages/eas-cli/src/devices/actions/create/__tests__/action-test.ts index 8bf1458196..b5a48cdb90 100644 --- a/packages/eas-cli/src/devices/actions/create/__tests__/action-test.ts +++ b/packages/eas-cli/src/devices/actions/create/__tests__/action-test.ts @@ -1,9 +1,9 @@ import prompts from 'prompts'; -import { Account } from '../../../../user/Account'; -import DeviceCreateAction, { RegistrationMethod } from '../action'; -import { runInputMethodAsync } from '../inputMethod'; -import { runRegistrationUrlMethodAsync } from '../registrationUrlMethod'; +import { Account } from '../../../../user/Account.js'; +import DeviceCreateAction, { RegistrationMethod } from '../action.js'; +import { runInputMethodAsync } from '../inputMethod.js'; +import { runRegistrationUrlMethodAsync } from '../registrationUrlMethod.js'; jest.mock('prompts'); jest.mock('../registrationUrlMethod'); diff --git a/packages/eas-cli/src/devices/actions/create/__tests__/inputMethod-test.ts b/packages/eas-cli/src/devices/actions/create/__tests__/inputMethod-test.ts index dab72374f4..018e60e547 100644 --- a/packages/eas-cli/src/devices/actions/create/__tests__/inputMethod-test.ts +++ b/packages/eas-cli/src/devices/actions/create/__tests__/inputMethod-test.ts @@ -1,8 +1,8 @@ import prompts from 'prompts'; -import { AppleDeviceMutation } from '../../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation'; -import { AppleDeviceClass, AppleTeam } from '../../../../graphql/generated'; -import { runInputMethodAsync } from '../inputMethod'; +import { AppleDeviceMutation } from '../../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation.js'; +import { AppleDeviceClass, AppleTeam } from '../../../../graphql/generated.js'; +import { runInputMethodAsync } from '../inputMethod.js'; jest.mock('../../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation'); jest.mock('../../../../ora'); diff --git a/packages/eas-cli/src/devices/actions/create/action.ts b/packages/eas-cli/src/devices/actions/create/action.ts index 85c63efded..7dda0f8d0b 100644 --- a/packages/eas-cli/src/devices/actions/create/action.ts +++ b/packages/eas-cli/src/devices/actions/create/action.ts @@ -1,11 +1,11 @@ import chalk from 'chalk'; -import { AppleTeam } from '../../../graphql/generated'; -import Log from '../../../log'; -import { promptAsync } from '../../../prompts'; -import { Account } from '../../../user/Account'; -import { runInputMethodAsync } from './inputMethod'; -import { runRegistrationUrlMethodAsync } from './registrationUrlMethod'; +import { AppleTeam } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { promptAsync } from '../../../prompts.js'; +import { Account } from '../../../user/Account.js'; +import { runInputMethodAsync } from './inputMethod.js'; +import { runRegistrationUrlMethodAsync } from './registrationUrlMethod.js'; export enum RegistrationMethod { WEBSITE, diff --git a/packages/eas-cli/src/devices/actions/create/inputMethod.ts b/packages/eas-cli/src/devices/actions/create/inputMethod.ts index 8523de2bce..493b0128e5 100644 --- a/packages/eas-cli/src/devices/actions/create/inputMethod.ts +++ b/packages/eas-cli/src/devices/actions/create/inputMethod.ts @@ -1,12 +1,12 @@ import chalk from 'chalk'; import Table from 'cli-table3'; -import { AppleDeviceMutation } from '../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation'; -import { AppleDeviceClass, AppleTeam } from '../../../graphql/generated'; -import Log from '../../../log'; -import { ora } from '../../../ora'; -import { confirmAsync, promptAsync } from '../../../prompts'; -import { isValidUDID, normalizeUDID } from '../../udids'; +import { AppleDeviceMutation } from '../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation.js'; +import { AppleDeviceClass, AppleTeam } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; +import { ora } from '../../../ora.js'; +import { confirmAsync, promptAsync } from '../../../prompts.js'; +import { isValidUDID, normalizeUDID } from '../../udids.js'; interface DeviceData { udid: string; diff --git a/packages/eas-cli/src/devices/actions/create/registrationUrlMethod.ts b/packages/eas-cli/src/devices/actions/create/registrationUrlMethod.ts index 8ccbff0a93..4d59a1bd68 100644 --- a/packages/eas-cli/src/devices/actions/create/registrationUrlMethod.ts +++ b/packages/eas-cli/src/devices/actions/create/registrationUrlMethod.ts @@ -3,10 +3,10 @@ import indentString from 'indent-string'; import qrcodeTerminal from 'qrcode-terminal'; import { URL } from 'url'; -import { getExpoWebsiteBaseUrl } from '../../../api'; -import { AppleDeviceRegistrationRequestMutation } from '../../../credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation'; -import { AppleTeam } from '../../../graphql/generated'; -import Log from '../../../log'; +import { getExpoWebsiteBaseUrl } from '../../../api.js'; +import { AppleDeviceRegistrationRequestMutation } from '../../../credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js'; +import { AppleTeam } from '../../../graphql/generated.js'; +import Log from '../../../log.js'; export async function runRegistrationUrlMethodAsync( accountId: string, diff --git a/packages/eas-cli/src/devices/context.ts b/packages/eas-cli/src/devices/context.ts index fe86503f87..751c26c5fa 100644 --- a/packages/eas-cli/src/devices/context.ts +++ b/packages/eas-cli/src/devices/context.ts @@ -1,8 +1,8 @@ import { ExpoConfig, getConfig } from '@expo/config'; -import AppStoreApi from '../credentials/ios/appstore/AppStoreApi'; -import { findProjectRootAsync } from '../project/projectUtils'; -import { Actor } from '../user/User'; +import AppStoreApi from '../credentials/ios/appstore/AppStoreApi.js'; +import { findProjectRootAsync } from '../project/projectUtils.js'; +import { Actor } from '../user/User.js'; export interface DeviceManagerContext { appStore: AppStoreApi; diff --git a/packages/eas-cli/src/devices/manager.ts b/packages/eas-cli/src/devices/manager.ts index 9ca3cf0e93..bcc9c8c23a 100644 --- a/packages/eas-cli/src/devices/manager.ts +++ b/packages/eas-cli/src/devices/manager.ts @@ -2,16 +2,16 @@ import { ExpoConfig } from '@expo/config'; import assert from 'assert'; import chalk from 'chalk'; -import { AppleTeamMutation } from '../credentials/ios/api/graphql/mutations/AppleTeamMutation'; -import { AppleTeamQuery } from '../credentials/ios/api/graphql/queries/AppleTeamQuery'; -import { AppleTeamFragment } from '../graphql/generated'; -import Log from '../log'; -import { getProjectAccountNameAsync } from '../project/projectUtils'; -import { Choice, confirmAsync, promptAsync } from '../prompts'; -import { Account, findAccountByName } from '../user/Account'; -import { Actor, getActorDisplayName } from '../user/User'; -import DeviceCreateAction from './actions/create/action'; -import { DeviceManagerContext } from './context'; +import { AppleTeamMutation } from '../credentials/ios/api/graphql/mutations/AppleTeamMutation.js'; +import { AppleTeamQuery } from '../credentials/ios/api/graphql/queries/AppleTeamQuery.js'; +import { AppleTeamFragment } from '../graphql/generated.js'; +import Log from '../log.js'; +import { getProjectAccountNameAsync } from '../project/projectUtils.js'; +import { Choice, confirmAsync, promptAsync } from '../prompts.js'; +import { Account, findAccountByName } from '../user/Account.js'; +import { Actor, getActorDisplayName } from '../user/User.js'; +import DeviceCreateAction from './actions/create/action.js'; +import { DeviceManagerContext } from './context.js'; const CREATE_COMMAND_DESCRIPTION = `This command lets you register your Apple devices (iPhones and iPads) for internal distribution of your app. Internal distribution means that you won't need upload your app archive to App Store / Testflight. diff --git a/packages/eas-cli/src/devices/utils/formatDevice.ts b/packages/eas-cli/src/devices/utils/formatDevice.ts index 05755d01bd..eff641ba3c 100644 --- a/packages/eas-cli/src/devices/utils/formatDevice.ts +++ b/packages/eas-cli/src/devices/utils/formatDevice.ts @@ -1,5 +1,5 @@ -import { AppleDevice, AppleTeam } from '../../graphql/generated'; -import formatFields from '../../utils/formatFields'; +import { AppleDevice, AppleTeam } from '../../graphql/generated.js'; +import formatFields from '../../utils/formatFields.js'; type Device = Pick; diff --git a/packages/eas-cli/src/fetch.ts b/packages/eas-cli/src/fetch.ts index 40c545fb99..16bbc14505 100644 --- a/packages/eas-cli/src/fetch.ts +++ b/packages/eas-cli/src/fetch.ts @@ -1,6 +1,6 @@ import { Agent } from 'https'; import createHttpsProxyAgent from 'https-proxy-agent'; -import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; +import { RequestInfo, RequestInit, Response, default as fetch } from 'node-fetch'; export * from 'node-fetch'; diff --git a/packages/eas-cli/src/graphql/client.ts b/packages/eas-cli/src/graphql/client.ts index b0e558f6a3..7500c0d81c 100644 --- a/packages/eas-cli/src/graphql/client.ts +++ b/packages/eas-cli/src/graphql/client.ts @@ -14,10 +14,10 @@ import { retryExchange } from '@urql/exchange-retry'; import { DocumentNode } from 'graphql'; import fetch from 'node-fetch'; -import { getExpoApiBaseUrl } from '../api'; -import { httpsProxyAgent } from '../fetch'; -import Log from '../log'; -import { getAccessToken, getSessionSecret } from '../user/sessionStorage'; +import { getExpoApiBaseUrl } from '../api.js'; +import { httpsProxyAgent } from '../fetch.js'; +import Log from '../log.js'; +import { getAccessToken, getSessionSecret } from '../user/sessionStorage.js'; export const graphqlClient = createUrqlClient({ url: getExpoApiBaseUrl() + '/graphql', diff --git a/packages/eas-cli/src/graphql/mutations/AppMutation.ts b/packages/eas-cli/src/graphql/mutations/AppMutation.ts index 4f2ef0cfbf..db57233ae5 100644 --- a/packages/eas-cli/src/graphql/mutations/AppMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/AppMutation.ts @@ -1,8 +1,8 @@ import assert from 'assert'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { AppPrivacy, CreateAppMutation, CreateAppMutationVariables } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { AppPrivacy, CreateAppMutation, CreateAppMutationVariables } from '../generated.js'; export const AppMutation = { async createAppAsync(appInput: { diff --git a/packages/eas-cli/src/graphql/mutations/BuildMutation.ts b/packages/eas-cli/src/graphql/mutations/BuildMutation.ts index 3c90922d5f..05562e47e5 100644 --- a/packages/eas-cli/src/graphql/mutations/BuildMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/BuildMutation.ts @@ -1,8 +1,8 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; -import nullthrows from 'nullthrows'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { AndroidJobInput, BuildFragment, @@ -14,8 +14,8 @@ import { CreateIosBuildMutationVariables, EasBuildDeprecationInfo, IosJobInput, -} from '../generated'; -import { BuildFragmentNode } from '../types/Build'; +} from '../generated.js'; +import { BuildFragmentNode } from '../types/Build.js'; export interface BuildResult { build: BuildFragment; diff --git a/packages/eas-cli/src/graphql/mutations/EnvironmentSecretMutation.ts b/packages/eas-cli/src/graphql/mutations/EnvironmentSecretMutation.ts index 9cfda626f2..f6b460441b 100644 --- a/packages/eas-cli/src/graphql/mutations/EnvironmentSecretMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/EnvironmentSecretMutation.ts @@ -1,14 +1,14 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { CreateEnvironmentSecretForAccountMutation, CreateEnvironmentSecretForAppMutation, DeleteEnvironmentSecretMutation, EnvironmentSecretFragment, -} from '../generated'; -import { EnvironmentSecretFragmentNode } from '../types/EnvironmentSecret'; +} from '../generated.js'; +import { EnvironmentSecretFragmentNode } from '../types/EnvironmentSecret.js'; export const EnvironmentSecretMutation = { async createForAccountAsync( diff --git a/packages/eas-cli/src/graphql/mutations/KeystoreGenerationUrlMutation.ts b/packages/eas-cli/src/graphql/mutations/KeystoreGenerationUrlMutation.ts index 1d5a987cf9..0a53c8811c 100644 --- a/packages/eas-cli/src/graphql/mutations/KeystoreGenerationUrlMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/KeystoreGenerationUrlMutation.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { CreateKeystoreGenerationUrlMutation } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { CreateKeystoreGenerationUrlMutation } from '../generated.js'; export const KeystoreGenerationUrlMutation = { async createKeystoreGenerationUrlAsync(): Promise { diff --git a/packages/eas-cli/src/graphql/mutations/PublishMutation.ts b/packages/eas-cli/src/graphql/mutations/PublishMutation.ts index d2a832f7c4..1a7421abf7 100644 --- a/packages/eas-cli/src/graphql/mutations/PublishMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/PublishMutation.ts @@ -1,12 +1,12 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { CodeSigningInfoInput, PublishUpdateGroupInput, SetCodeSigningInfoMutation, UpdatePublishMutation, -} from '../generated'; +} from '../generated.js'; export const PublishMutation = { async getUploadURLsAsync(contentTypes: string[]): Promise<{ specifications: string[] }> { diff --git a/packages/eas-cli/src/graphql/mutations/SubmissionMutation.ts b/packages/eas-cli/src/graphql/mutations/SubmissionMutation.ts index b286719897..f741f21afc 100644 --- a/packages/eas-cli/src/graphql/mutations/SubmissionMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/SubmissionMutation.ts @@ -1,8 +1,8 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; -import nullthrows from 'nullthrows'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { CreateAndroidSubmissionInput, CreateAndroidSubmissionMutation, @@ -11,8 +11,8 @@ import { CreateIosSubmissionMutation, CreateIosSubmissionMutationVariables, SubmissionFragment, -} from '../generated'; -import { SubmissionFragmentNode } from '../types/Submission'; +} from '../generated.js'; +import { SubmissionFragmentNode } from '../types/Submission.js'; export const SubmissionMutation = { async createAndroidSubmissionAsync( diff --git a/packages/eas-cli/src/graphql/mutations/UploadSessionMutation.ts b/packages/eas-cli/src/graphql/mutations/UploadSessionMutation.ts index 3536cfbf18..906dd9acb4 100644 --- a/packages/eas-cli/src/graphql/mutations/UploadSessionMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/UploadSessionMutation.ts @@ -1,11 +1,11 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { CreateUploadSessionMutation, CreateUploadSessionMutationVariables, UploadSessionType, -} from '../generated'; +} from '../generated.js'; export interface PresignedPost { url: string; diff --git a/packages/eas-cli/src/graphql/mutations/WebhookMutation.ts b/packages/eas-cli/src/graphql/mutations/WebhookMutation.ts index 65027e714c..91de145021 100644 --- a/packages/eas-cli/src/graphql/mutations/WebhookMutation.ts +++ b/packages/eas-cli/src/graphql/mutations/WebhookMutation.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { CreateWebhookMutation, CreateWebhookMutationVariables, @@ -11,8 +11,8 @@ import { UpdateWebhookMutationVariables, WebhookFragment, WebhookInput, -} from '../generated'; -import { WebhookFragmentNode } from '../types/Webhook'; +} from '../generated.js'; +import { WebhookFragmentNode } from '../types/Webhook.js'; export const WebhookMutation = { async createWebhookAsync(appId: string, webhookInput: WebhookInput): Promise { diff --git a/packages/eas-cli/src/graphql/queries/BranchQuery.ts b/packages/eas-cli/src/graphql/queries/BranchQuery.ts index 0ae5ae464d..3d84d621da 100644 --- a/packages/eas-cli/src/graphql/queries/BranchQuery.ts +++ b/packages/eas-cli/src/graphql/queries/BranchQuery.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { ViewBranchQuery, ViewBranchQueryVariables } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { ViewBranchQuery, ViewBranchQueryVariables } from '../generated.js'; export const BranchQuery = { async getBranchByNameAsync({ diff --git a/packages/eas-cli/src/graphql/queries/BuildQuery.ts b/packages/eas-cli/src/graphql/queries/BuildQuery.ts index 18f7d6701e..587cc485ee 100644 --- a/packages/eas-cli/src/graphql/queries/BuildQuery.ts +++ b/packages/eas-cli/src/graphql/queries/BuildQuery.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { AppPlatform, BuildFragment, @@ -11,8 +11,8 @@ import { DistributionType, GetAllBuildsForAppQuery, GetAllBuildsForAppQueryVariables, -} from '../generated'; -import { BuildFragmentNode } from '../types/Build'; +} from '../generated.js'; +import { BuildFragmentNode } from '../types/Build.js'; type BuildsQuery = { offset?: number; diff --git a/packages/eas-cli/src/graphql/queries/ChannelQuery.ts b/packages/eas-cli/src/graphql/queries/ChannelQuery.ts index bd0ec39457..7256e6ad4c 100644 --- a/packages/eas-cli/src/graphql/queries/ChannelQuery.ts +++ b/packages/eas-cli/src/graphql/queries/ChannelQuery.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { GetChannelByNameForAppQuery, GetChannelByNameForAppQueryVariables } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { GetChannelByNameForAppQuery, GetChannelByNameForAppQueryVariables } from '../generated.js'; export const ChannelQuery = { async getUpdateChannelByNameForAppAsync({ diff --git a/packages/eas-cli/src/graphql/queries/EnvironmentSecretsQuery.ts b/packages/eas-cli/src/graphql/queries/EnvironmentSecretsQuery.ts index 855fd1c92c..3cede55d7d 100644 --- a/packages/eas-cli/src/graphql/queries/EnvironmentSecretsQuery.ts +++ b/packages/eas-cli/src/graphql/queries/EnvironmentSecretsQuery.ts @@ -1,13 +1,13 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { EnvironmentSecretFragment, EnvironmentSecretsByAccountNameQuery, EnvironmentSecretsByAppIdQuery, -} from '../generated'; -import { EnvironmentSecretFragmentNode } from '../types/EnvironmentSecret'; +} from '../generated.js'; +import { EnvironmentSecretFragmentNode } from '../types/EnvironmentSecret.js'; export enum EnvironmentSecretScope { ACCOUNT = 'account', diff --git a/packages/eas-cli/src/graphql/queries/ProjectQuery.ts b/packages/eas-cli/src/graphql/queries/ProjectQuery.ts index ee4d443bda..46221e0635 100644 --- a/packages/eas-cli/src/graphql/queries/ProjectQuery.ts +++ b/packages/eas-cli/src/graphql/queries/ProjectQuery.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { Project, ProjectByUsernameAndSlugQuery } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { Project, ProjectByUsernameAndSlugQuery } from '../generated.js'; type ProjectQueryResult = Pick; diff --git a/packages/eas-cli/src/graphql/queries/PublishQuery.ts b/packages/eas-cli/src/graphql/queries/PublishQuery.ts index 39cc6fefcc..1b13790523 100644 --- a/packages/eas-cli/src/graphql/queries/PublishQuery.ts +++ b/packages/eas-cli/src/graphql/queries/PublishQuery.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { AssetMetadataResult, GetAssetMetadataQuery } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { AssetMetadataResult, GetAssetMetadataQuery } from '../generated.js'; export const PublishQuery = { async getAssetMetadataAsync(storageKeys: string[]): Promise { diff --git a/packages/eas-cli/src/graphql/queries/SubmissionQuery.ts b/packages/eas-cli/src/graphql/queries/SubmissionQuery.ts index 298a90955c..140606ff80 100644 --- a/packages/eas-cli/src/graphql/queries/SubmissionQuery.ts +++ b/packages/eas-cli/src/graphql/queries/SubmissionQuery.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { AppPlatform, GetAllSubmissionsForAppQuery, @@ -10,8 +10,8 @@ import { SubmissionStatus, SubmissionsByIdQuery, SubmissionsByIdQueryVariables, -} from '../generated'; -import { SubmissionFragmentNode } from '../types/Submission'; +} from '../generated.js'; +import { SubmissionFragmentNode } from '../types/Submission.js'; type Filters = { platform?: AppPlatform; diff --git a/packages/eas-cli/src/graphql/queries/UpdateQuery.ts b/packages/eas-cli/src/graphql/queries/UpdateQuery.ts index 68a0b90574..356ffda3fb 100644 --- a/packages/eas-cli/src/graphql/queries/UpdateQuery.ts +++ b/packages/eas-cli/src/graphql/queries/UpdateQuery.ts @@ -1,12 +1,12 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { ViewAllUpdatesQuery, ViewAllUpdatesQueryVariables, ViewBranchUpdatesQuery, ViewBranchUpdatesQueryVariables, -} from '../generated'; +} from '../generated.js'; export const viewBranchUpdatesQueryUpdateLimit = 300; diff --git a/packages/eas-cli/src/graphql/queries/UserQuery.ts b/packages/eas-cli/src/graphql/queries/UserQuery.ts index cc9bb98e61..15f74e3d4a 100644 --- a/packages/eas-cli/src/graphql/queries/UserQuery.ts +++ b/packages/eas-cli/src/graphql/queries/UserQuery.ts @@ -1,7 +1,7 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; -import { CurrentUserQuery } from '../generated'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; +import { CurrentUserQuery } from '../generated.js'; export const UserQuery = { async currentUserAsync(): Promise { diff --git a/packages/eas-cli/src/graphql/queries/WebhookQuery.ts b/packages/eas-cli/src/graphql/queries/WebhookQuery.ts index 37bba292ad..e583da677b 100644 --- a/packages/eas-cli/src/graphql/queries/WebhookQuery.ts +++ b/packages/eas-cli/src/graphql/queries/WebhookQuery.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { graphqlClient, withErrorHandlingAsync } from '../client'; +import { graphqlClient, withErrorHandlingAsync } from '../client.js'; import { WebhookByIdQuery, WebhookByIdQueryVariables, @@ -9,8 +9,8 @@ import { WebhookFragment, WebhooksByAppIdQuery, WebhooksByAppIdQueryVariables, -} from '../generated'; -import { WebhookFragmentNode } from '../types/Webhook'; +} from '../generated.js'; +import { WebhookFragmentNode } from '../types/Webhook.js'; export const WebhookQuery = { async byAppIdAsync(appId: string, webhookFilter?: WebhookFilter): Promise { diff --git a/packages/eas-cli/src/graphql/types/App.ts b/packages/eas-cli/src/graphql/types/App.ts index 932fa9cf6a..5e0488f331 100644 --- a/packages/eas-cli/src/graphql/types/App.ts +++ b/packages/eas-cli/src/graphql/types/App.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AppFragmentNode = gql` fragment AppFragment on App { diff --git a/packages/eas-cli/src/graphql/types/AppPlatform.ts b/packages/eas-cli/src/graphql/types/AppPlatform.ts index 744c2c70bf..723ffe9721 100644 --- a/packages/eas-cli/src/graphql/types/AppPlatform.ts +++ b/packages/eas-cli/src/graphql/types/AppPlatform.ts @@ -1,6 +1,6 @@ import { Platform } from '@expo/eas-build-job'; -import { AppPlatform } from '../generated'; +import { AppPlatform } from '../generated.js'; export function toAppPlatform(platform: Platform): AppPlatform { if (platform === Platform.ANDROID) { diff --git a/packages/eas-cli/src/graphql/types/Build.ts b/packages/eas-cli/src/graphql/types/Build.ts index 6cd826fa7f..328f3ce48f 100644 --- a/packages/eas-cli/src/graphql/types/Build.ts +++ b/packages/eas-cli/src/graphql/types/Build.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const BuildFragmentNode = gql` fragment BuildFragment on Build { diff --git a/packages/eas-cli/src/graphql/types/EnvironmentSecret.ts b/packages/eas-cli/src/graphql/types/EnvironmentSecret.ts index 55d518fa3f..d60048fb9c 100644 --- a/packages/eas-cli/src/graphql/types/EnvironmentSecret.ts +++ b/packages/eas-cli/src/graphql/types/EnvironmentSecret.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const EnvironmentSecretFragmentNode = gql` fragment EnvironmentSecretFragment on EnvironmentSecret { diff --git a/packages/eas-cli/src/graphql/types/Submission.ts b/packages/eas-cli/src/graphql/types/Submission.ts index 76ebf8264b..1bd7a6df54 100644 --- a/packages/eas-cli/src/graphql/types/Submission.ts +++ b/packages/eas-cli/src/graphql/types/Submission.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const SubmissionFragmentNode = gql` fragment SubmissionFragment on Submission { diff --git a/packages/eas-cli/src/graphql/types/UpdateBranch.ts b/packages/eas-cli/src/graphql/types/UpdateBranch.ts index 74d79455de..c7de1faab5 100644 --- a/packages/eas-cli/src/graphql/types/UpdateBranch.ts +++ b/packages/eas-cli/src/graphql/types/UpdateBranch.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const UpdateBranchFragmentNode = gql` fragment UpdateBranchFragment on UpdateBranch { diff --git a/packages/eas-cli/src/graphql/types/Webhook.ts b/packages/eas-cli/src/graphql/types/Webhook.ts index e06a778092..74d7ab3181 100644 --- a/packages/eas-cli/src/graphql/types/Webhook.ts +++ b/packages/eas-cli/src/graphql/types/Webhook.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const WebhookFragmentNode = gql` fragment WebhookFragment on Webhook { diff --git a/packages/eas-cli/src/graphql/types/credentials/AndroidAppBuildCredentials.ts b/packages/eas-cli/src/graphql/types/credentials/AndroidAppBuildCredentials.ts index 75c1c7366e..d1c2a64c5b 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AndroidAppBuildCredentials.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AndroidAppBuildCredentials.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AndroidKeystoreFragmentNode } from './AndroidKeystore'; +import { AndroidKeystoreFragmentNode } from './AndroidKeystore.js'; export const AndroidAppBuildCredentialsFragmentNode = gql` fragment AndroidAppBuildCredentialsFragment on AndroidAppBuildCredentials { diff --git a/packages/eas-cli/src/graphql/types/credentials/AndroidAppCredentials.ts b/packages/eas-cli/src/graphql/types/credentials/AndroidAppCredentials.ts index 86b72f6d9f..985d924d78 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AndroidAppCredentials.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AndroidAppCredentials.ts @@ -1,9 +1,9 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppFragmentNode } from '../App'; -import { AndroidAppBuildCredentialsFragmentNode } from './AndroidAppBuildCredentials'; -import { AndroidFcmFragmentNode } from './AndroidFcm'; -import { GoogleServiceAccountKeyFragmentNode } from './GoogleServiceAccountKey'; +import { AppFragmentNode } from '../App.js'; +import { AndroidAppBuildCredentialsFragmentNode } from './AndroidAppBuildCredentials.js'; +import { AndroidFcmFragmentNode } from './AndroidFcm.js'; +import { GoogleServiceAccountKeyFragmentNode } from './GoogleServiceAccountKey.js'; export const CommonAndroidAppCredentialsFragmentNode = gql` fragment CommonAndroidAppCredentialsFragment on AndroidAppCredentials { diff --git a/packages/eas-cli/src/graphql/types/credentials/AndroidFcm.ts b/packages/eas-cli/src/graphql/types/credentials/AndroidFcm.ts index 7b27909c8a..4afd51c8df 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AndroidFcm.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AndroidFcm.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AndroidFcmFragmentNode = gql` fragment AndroidFcmFragment on AndroidFcm { diff --git a/packages/eas-cli/src/graphql/types/credentials/AndroidKeystore.ts b/packages/eas-cli/src/graphql/types/credentials/AndroidKeystore.ts index 1bb93699dd..9b0257b943 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AndroidKeystore.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AndroidKeystore.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AndroidKeystoreFragmentNode = gql` fragment AndroidKeystoreFragment on AndroidKeystore { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppStoreConnectApiKey.ts b/packages/eas-cli/src/graphql/types/credentials/AppStoreConnectApiKey.ts index 3c6631b3d9..2b0fa067a5 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppStoreConnectApiKey.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppStoreConnectApiKey.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppleTeamFragmentNode } from './AppleTeam'; +import { AppleTeamFragmentNode } from './AppleTeam.js'; export const AppStoreConnectApiKeyFragmentNode = gql` fragment AppStoreConnectApiKeyFragment on AppStoreConnectApiKey { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleAppIdentifier.ts b/packages/eas-cli/src/graphql/types/credentials/AppleAppIdentifier.ts index da859b5e0c..95e885efef 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleAppIdentifier.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleAppIdentifier.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AppleAppIdentifierFragmentNode = gql` fragment AppleAppIdentifierFragment on AppleAppIdentifier { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleDevice.ts b/packages/eas-cli/src/graphql/types/credentials/AppleDevice.ts index 1a2d4324a1..2a4d40609b 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleDevice.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleDevice.ts @@ -1,6 +1,6 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppleDeviceClass } from '../../generated'; +import { AppleDeviceClass } from '../../generated.js'; export const APPLE_DEVICE_CLASS_LABELS: Record = { [AppleDeviceClass.Ipad]: 'iPad', diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleDeviceRegistrationRequest.ts b/packages/eas-cli/src/graphql/types/credentials/AppleDeviceRegistrationRequest.ts index f5500306ce..3dd7c9894d 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleDeviceRegistrationRequest.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleDeviceRegistrationRequest.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AppleDeviceRegistrationRequestFragmentNode = gql` fragment AppleDeviceRegistrationRequestFragment on AppleDeviceRegistrationRequest { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleDistributionCertificate.ts b/packages/eas-cli/src/graphql/types/credentials/AppleDistributionCertificate.ts index 6206a5fdf2..98f7f7994f 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleDistributionCertificate.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleDistributionCertificate.ts @@ -1,10 +1,10 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppFragmentNode } from '../App'; -import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier'; -import { AppleProvisioningProfileIdentifiersFragmentNode } from './AppleProvisioningProfile'; -import { AppleTeamFragmentNode } from './AppleTeam'; +import { AppFragmentNode } from '../App.js'; +import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier.js'; +import { AppleProvisioningProfileIdentifiersFragmentNode } from './AppleProvisioningProfile.js'; +import { AppleTeamFragmentNode } from './AppleTeam.js'; export const AppleDistributionCertificateFragmentNode = gql` fragment AppleDistributionCertificateFragment on AppleDistributionCertificate { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleProvisioningProfile.ts b/packages/eas-cli/src/graphql/types/credentials/AppleProvisioningProfile.ts index d6479acec3..e9d6915a13 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleProvisioningProfile.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleProvisioningProfile.ts @@ -1,8 +1,8 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppleDeviceFragmentNode } from './AppleDevice'; -import { AppleTeamFragmentNode } from './AppleTeam'; +import { AppleDeviceFragmentNode } from './AppleDevice.js'; +import { AppleTeamFragmentNode } from './AppleTeam.js'; export const AppleProvisioningProfileFragmentNode = gql` fragment AppleProvisioningProfileFragment on AppleProvisioningProfile { diff --git a/packages/eas-cli/src/graphql/types/credentials/ApplePushKey.ts b/packages/eas-cli/src/graphql/types/credentials/ApplePushKey.ts index e08afd001d..f8e207d55e 100644 --- a/packages/eas-cli/src/graphql/types/credentials/ApplePushKey.ts +++ b/packages/eas-cli/src/graphql/types/credentials/ApplePushKey.ts @@ -1,9 +1,9 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppFragmentNode } from '../App'; -import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier'; -import { AppleTeamFragmentNode } from './AppleTeam'; +import { AppFragmentNode } from '../App.js'; +import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier.js'; +import { AppleTeamFragmentNode } from './AppleTeam.js'; export const ApplePushKeyFragmentNode = gql` fragment ApplePushKeyFragment on ApplePushKey { diff --git a/packages/eas-cli/src/graphql/types/credentials/AppleTeam.ts b/packages/eas-cli/src/graphql/types/credentials/AppleTeam.ts index f29f804b09..f06ba2fe56 100644 --- a/packages/eas-cli/src/graphql/types/credentials/AppleTeam.ts +++ b/packages/eas-cli/src/graphql/types/credentials/AppleTeam.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const AppleTeamFragmentNode = gql` fragment AppleTeamFragment on AppleTeam { diff --git a/packages/eas-cli/src/graphql/types/credentials/GoogleServiceAccountKey.ts b/packages/eas-cli/src/graphql/types/credentials/GoogleServiceAccountKey.ts index 0ab8ed3293..6b706a8af8 100644 --- a/packages/eas-cli/src/graphql/types/credentials/GoogleServiceAccountKey.ts +++ b/packages/eas-cli/src/graphql/types/credentials/GoogleServiceAccountKey.ts @@ -1,4 +1,4 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; export const GoogleServiceAccountKeyFragmentNode = gql` fragment GoogleServiceAccountKeyFragment on GoogleServiceAccountKey { diff --git a/packages/eas-cli/src/graphql/types/credentials/IosAppBuildCredentials.ts b/packages/eas-cli/src/graphql/types/credentials/IosAppBuildCredentials.ts index 2e2f451f5e..e37d5b6297 100644 --- a/packages/eas-cli/src/graphql/types/credentials/IosAppBuildCredentials.ts +++ b/packages/eas-cli/src/graphql/types/credentials/IosAppBuildCredentials.ts @@ -1,8 +1,8 @@ import { print } from 'graphql'; -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppleDistributionCertificateFragmentNode } from './AppleDistributionCertificate'; -import { AppleProvisioningProfileFragmentNode } from './AppleProvisioningProfile'; +import { AppleDistributionCertificateFragmentNode } from './AppleDistributionCertificate.js'; +import { AppleProvisioningProfileFragmentNode } from './AppleProvisioningProfile.js'; export const IosAppBuildCredentialsFragmentNode = gql` fragment IosAppBuildCredentialsFragment on IosAppBuildCredentials { diff --git a/packages/eas-cli/src/graphql/types/credentials/IosAppCredentials.ts b/packages/eas-cli/src/graphql/types/credentials/IosAppCredentials.ts index e0cc2d6d15..2eb6b8c5b8 100644 --- a/packages/eas-cli/src/graphql/types/credentials/IosAppCredentials.ts +++ b/packages/eas-cli/src/graphql/types/credentials/IosAppCredentials.ts @@ -1,11 +1,11 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import { AppFragmentNode } from '../App'; -import { AppStoreConnectApiKeyFragmentNode } from './AppStoreConnectApiKey'; -import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier'; -import { ApplePushKeyFragmentNode } from './ApplePushKey'; -import { AppleTeamFragmentNode } from './AppleTeam'; -import { IosAppBuildCredentialsFragmentNode } from './IosAppBuildCredentials'; +import { AppFragmentNode } from '../App.js'; +import { AppStoreConnectApiKeyFragmentNode } from './AppStoreConnectApiKey.js'; +import { AppleAppIdentifierFragmentNode } from './AppleAppIdentifier.js'; +import { ApplePushKeyFragmentNode } from './ApplePushKey.js'; +import { AppleTeamFragmentNode } from './AppleTeam.js'; +import { IosAppBuildCredentialsFragmentNode } from './IosAppBuildCredentials.js'; export const CommonIosAppCredentialsWithoutBuildCredentialsFragmentNode = gql` fragment CommonIosAppCredentialsWithoutBuildCredentialsFragment on IosAppCredentials { diff --git a/packages/eas-cli/src/log.ts b/packages/eas-cli/src/log.ts index bd7f8cd449..ed9ce20a55 100644 --- a/packages/eas-cli/src/log.ts +++ b/packages/eas-cli/src/log.ts @@ -1,13 +1,13 @@ import chalk from 'chalk'; import figures from 'figures'; -import { boolish } from 'getenv'; +import getenv from 'getenv'; import logSymbols from 'log-symbols'; import terminalLink from 'terminal-link'; type Color = (...text: string[]) => string; export default class Log { - public static readonly isDebug = boolish('EXPO_DEBUG', false); + public static readonly isDebug = getenv.boolish('EXPO_DEBUG', false); public static log(...args: any[]): void { Log.consoleLog(...args); diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/ageRatingDeclaration.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/ageRatingDeclaration.ts index e11c6dac94..9a74da08a3 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/ageRatingDeclaration.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/ageRatingDeclaration.ts @@ -1,10 +1,12 @@ -import { AgeRatingDeclaration, KidsAge, Rating } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AttributesOf } from '../../../../utils/asc'; +import { AttributesOf } from '../../../../utils/asc.js'; + +const { KidsAge, Rating } = AppleUtils; // @ts-expect-error: Deprecated property `gamblingAndContests` needs to be deleted from the types // These attributes is what we get from the API when no questions are answered -export const emptyAdvisory: AttributesOf = { +export const emptyAdvisory: AttributesOf = { alcoholTobaccoOrDrugUseOrReferences: null, contests: null, gamblingSimulated: null, @@ -24,7 +26,7 @@ export const emptyAdvisory: AttributesOf = { }; // @ts-expect-error: Deprecated property `gamblingAndContests` needs to be deleted from the types -export const leastRestrictiveAdvisory: AttributesOf = { +export const leastRestrictiveAdvisory: AttributesOf = { alcoholTobaccoOrDrugUseOrReferences: Rating.NONE, contests: Rating.NONE, gamblingSimulated: Rating.NONE, @@ -44,7 +46,7 @@ export const leastRestrictiveAdvisory: AttributesOf = { }; // @ts-expect-error: Deprecated property `gamblingAndContests` needs to be deleted from the types -export const mostRestrictiveAdvisory: AttributesOf = { +export const mostRestrictiveAdvisory: AttributesOf = { alcoholTobaccoOrDrugUseOrReferences: Rating.FREQUENT_OR_INTENSE, contests: Rating.FREQUENT_OR_INTENSE, gamblingSimulated: Rating.FREQUENT_OR_INTENSE, @@ -64,7 +66,7 @@ export const mostRestrictiveAdvisory: AttributesOf = { }; // @ts-expect-error: Deprecated property `gamblingAndContests` needs to be deleted from the types -export const kidsSixToEightAdvisory: AttributesOf = { +export const kidsSixToEightAdvisory: AttributesOf = { alcoholTobaccoOrDrugUseOrReferences: Rating.NONE, contests: Rating.NONE, gamblingSimulated: Rating.NONE, diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfo.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfo.ts index e4de113455..bc43e18d83 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfo.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfo.ts @@ -1,6 +1,8 @@ -import { AppCategory, AppCategoryId, AppSubcategoryId, BundleIdPlatform } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AppleConfigWriter } from '../../writer'; +import { AppleConfigWriter } from '../../writer.js'; + +const { AppCategory, BundleIdPlatform } = AppleUtils; /** Infered type of the AppleConfigWriter.setCategories attributes */ type CategoryInfoProps = Parameters[0]; @@ -10,7 +12,9 @@ type CategoryInfoProps = Parameters> + attributes: Partial< + Record + > ): CategoryInfoProps { return { primaryCategory: makeCategory(attributes.primaryCategory), diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfoLocalization.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfoLocalization.ts index d8c7887f9a..0c0fb39d8b 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfoLocalization.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appInfoLocalization.ts @@ -1,8 +1,8 @@ -import { AppInfoLocalization } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AttributesOf } from '../../../../utils/asc'; +import { AttributesOf } from '../../../../utils/asc.js'; -export const englishInfo: AttributesOf = { +export const englishInfo: AttributesOf = { locale: 'en-US', name: 'Awesome test app', subtitle: 'This is just a test', @@ -11,7 +11,7 @@ export const englishInfo: AttributesOf = { privacyPolicyText: 'This is some privacy policy text', }; -export const dutchInfo: AttributesOf = { +export const dutchInfo: AttributesOf = { locale: 'nl-NL', name: 'Geweldige test app', subtitle: 'Dit is maar een test', diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreReviewDetail.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreReviewDetail.ts index ed989cba3f..1fa16ddd5a 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreReviewDetail.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreReviewDetail.ts @@ -1,8 +1,8 @@ -import { AppStoreReviewDetail } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AttributesOf } from '../../../../utils/asc'; +import { AttributesOf } from '../../../../utils/asc.js'; -export const nameOnlyReviewDetails: AttributesOf = { +export const nameOnlyReviewDetails: AttributesOf = { contactFirstName: 'Evan', contactLastName: 'Bacon', contactEmail: 'apple@example.com', @@ -13,7 +13,7 @@ export const nameOnlyReviewDetails: AttributesOf = { notes: null, }; -export const nameAndDemoReviewDetails: AttributesOf = { +export const nameAndDemoReviewDetails: AttributesOf = { contactFirstName: 'Evan', contactLastName: 'Bacon', contactEmail: 'apple@example.com', diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersion.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersion.ts index 879335254f..8bc78448d9 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersion.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersion.ts @@ -1,8 +1,10 @@ -import { AppStoreState, AppStoreVersion, Platform, ReleaseType } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AttributesOf } from '../../../../utils/asc'; +import { AttributesOf } from '../../../../utils/asc.js'; -export const manualRelease: AttributesOf = { +const { AppStoreState, Platform, ReleaseType } = AppleUtils; + +export const manualRelease: AttributesOf = { platform: Platform.IOS, versionString: '1.0.0', appStoreState: AppStoreState.WAITING_FOR_REVIEW, @@ -17,7 +19,7 @@ export const manualRelease: AttributesOf = { createdDate: '2022-05-23T00:00:00.000Z', }; -export const automaticRelease: AttributesOf = { +export const automaticRelease: AttributesOf = { platform: Platform.IOS, versionString: '2.0.0', appStoreState: AppStoreState.WAITING_FOR_REVIEW, @@ -32,7 +34,7 @@ export const automaticRelease: AttributesOf = { createdDate: '2022-05-23T00:00:00.000Z', }; -export const scheduledRelease: AttributesOf = { +export const scheduledRelease: AttributesOf = { platform: Platform.IOS, versionString: '3.0.0', appStoreState: AppStoreState.READY_FOR_SALE, diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersionLocalization.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersionLocalization.ts index 0a4e856300..2e81fca957 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersionLocalization.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/fixtures/appStoreVersionLocalization.ts @@ -1,8 +1,8 @@ -import { AppStoreVersionLocalization } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AttributesOf } from '../../../../utils/asc'; +import { AttributesOf } from '../../../../utils/asc.js'; -export const englishVersion: AttributesOf = { +export const englishVersion: AttributesOf = { locale: 'en-US', description: 'This is a description of this version', keywords: 'some, description', @@ -12,7 +12,7 @@ export const englishVersion: AttributesOf = { whatsNew: 'Bugfixes and improvements', }; -export const dutchVersion: AttributesOf = { +export const dutchVersion: AttributesOf = { locale: 'nl-NL', description: 'Dit is een beschrijving van deze versie', keywords: 'een, beschrijving', diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/reader.test.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/reader.test.ts index 6e7de7b523..556741d31b 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/reader.test.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/reader.test.ts @@ -1,7 +1,12 @@ -import { AppCategoryId, AppSubcategoryId } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AppleConfigReader } from '../reader'; -import { leastRestrictiveAdvisory, mostRestrictiveAdvisory } from './fixtures/ageRatingDeclaration'; +import { AppleConfigReader } from '../reader.js'; +import { + leastRestrictiveAdvisory, + mostRestrictiveAdvisory, +} from './fixtures/ageRatingDeclaration.js'; + +const { AppCategoryId, AppSubcategoryId } = AppleUtils; describe('getCategories', () => { it('ignores categories when not set', () => { diff --git a/packages/eas-cli/src/metadata/apple/config/__tests__/writer.test.ts b/packages/eas-cli/src/metadata/apple/config/__tests__/writer.test.ts index 8918720e6a..1d466fe177 100644 --- a/packages/eas-cli/src/metadata/apple/config/__tests__/writer.test.ts +++ b/packages/eas-cli/src/metadata/apple/config/__tests__/writer.test.ts @@ -1,17 +1,22 @@ -import { AppCategoryId, AppSubcategoryId } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { AppleConfigWriter } from '../writer'; +import { AppleConfigWriter } from '../writer.js'; import { emptyAdvisory, kidsSixToEightAdvisory, leastRestrictiveAdvisory, mostRestrictiveAdvisory, -} from './fixtures/ageRatingDeclaration'; -import { makeCategoryInfo } from './fixtures/appInfo'; -import { dutchInfo, englishInfo } from './fixtures/appInfoLocalization'; -import { nameAndDemoReviewDetails, nameOnlyReviewDetails } from './fixtures/appStoreReviewDetail'; -import { automaticRelease, manualRelease, scheduledRelease } from './fixtures/appStoreVersion'; -import { dutchVersion, englishVersion } from './fixtures/appStoreVersionLocalization'; +} from './fixtures/ageRatingDeclaration.js'; +import { makeCategoryInfo } from './fixtures/appInfo.js'; +import { dutchInfo, englishInfo } from './fixtures/appInfoLocalization.js'; +import { + nameAndDemoReviewDetails, + nameOnlyReviewDetails, +} from './fixtures/appStoreReviewDetail.js'; +import { automaticRelease, manualRelease, scheduledRelease } from './fixtures/appStoreVersion.js'; +import { dutchVersion, englishVersion } from './fixtures/appStoreVersionLocalization.js'; + +const { AppCategoryId, AppSubcategoryId } = AppleUtils; describe('toSchema', () => { it('returns object with apple schema', () => { diff --git a/packages/eas-cli/src/metadata/apple/config/reader.ts b/packages/eas-cli/src/metadata/apple/config/reader.ts index cc09b3ab93..2fba4a9458 100644 --- a/packages/eas-cli/src/metadata/apple/config/reader.ts +++ b/packages/eas-cli/src/metadata/apple/config/reader.ts @@ -1,18 +1,11 @@ -import { - AgeRatingDeclaration, - AppInfoLocalization, - AppStoreReviewDetail, - AppStoreVersion, - AppStoreVersionLocalization, - CategoryIds, - Rating, - ReleaseType, -} from '@expo/apple-utils'; - -import uniq from '../../../utils/expodash/uniq'; -import { AttributesOf } from '../../utils/asc'; -import { removeDatePrecision } from '../../utils/date'; -import { AppleMetadata } from '../types'; +import AppleUtils from '@expo/apple-utils'; + +import uniq from '../../../utils/expodash/uniq.js'; +import { AttributesOf } from '../../utils/asc.js'; +import { removeDatePrecision } from '../../utils/date.js'; +import { AppleMetadata } from '../types.js'; + +const { Rating, ReleaseType } = AppleUtils; type PartialExcept = Pick & Partial>; @@ -26,7 +19,7 @@ export const DEFAULT_WHATSNEW = 'Bug fixes and improved stability'; export class AppleConfigReader { public constructor(public readonly schema: AppleMetadata) {} - public getAgeRating(): Partial> | null { + public getAgeRating(): Partial> | null { const attributes = this.schema.advisory; if (!attributes) { return null; @@ -61,7 +54,7 @@ export class AppleConfigReader { public getInfoLocale( locale: string - ): PartialExcept, 'locale' | 'name'> | null { + ): PartialExcept, 'locale' | 'name'> | null { const info = this.schema.info?.[locale]; if (!info) { return null; @@ -77,14 +70,14 @@ export class AppleConfigReader { }; } - public getCategories(): CategoryIds | null { + public getCategories(): AppleUtils.CategoryIds | null { const { categories } = this.schema; if (!categories || categories.length <= 0) { return null; } // We validate the categories based on enums, but they will still be strings here. - const categoryIds: Partial> = {}; + const categoryIds: Partial> = {}; if (Array.isArray(categories[0])) { categoryIds.primaryCategory = categories[0][0]; @@ -104,18 +97,18 @@ export class AppleConfigReader { // Because we handle categories as normal strings, // the type doesn't match with the actual CategoryIds types. - return categoryIds as CategoryIds; + return categoryIds as AppleUtils.CategoryIds; } /** Get the `AppStoreVersion` object. */ public getVersion(): Partial< - Omit, 'releaseType' | 'earliestReleaseDate'> + Omit, 'releaseType' | 'earliestReleaseDate'> > | null { return this.schema.copyright ? { copyright: this.schema.copyright } : null; } public getVersionRelease(): Partial< - Pick, 'releaseType' | 'earliestReleaseDate'> + Pick, 'releaseType' | 'earliestReleaseDate'> > | null { const { release } = this.schema; @@ -147,7 +140,7 @@ export class AppleConfigReader { public getVersionLocale( locale: string, context: { versionIsFirst: boolean } - ): Partial> | null { + ): Partial> | null { const info = this.schema.info?.[locale]; if (!info) { return null; @@ -165,7 +158,7 @@ export class AppleConfigReader { }; } - public getReviewDetails(): Partial> | null { + public getReviewDetails(): Partial> | null { const review = this.schema.review; if (!review) { return null; diff --git a/packages/eas-cli/src/metadata/apple/config/writer.ts b/packages/eas-cli/src/metadata/apple/config/writer.ts index 8fc3d53a18..c9a4c7142e 100644 --- a/packages/eas-cli/src/metadata/apple/config/writer.ts +++ b/packages/eas-cli/src/metadata/apple/config/writer.ts @@ -1,16 +1,9 @@ -import { - AgeRatingDeclaration, - AppInfo, - AppInfoLocalization, - AppStoreReviewDetail, - AppStoreVersion, - AppStoreVersionLocalization, - Rating, - ReleaseType, -} from '@expo/apple-utils'; - -import { AttributesOf } from '../../utils/asc'; -import { AppleMetadata } from '../types'; +import AppleUtils from '@expo/apple-utils'; + +import { AttributesOf } from '../../utils/asc.js'; +import { AppleMetadata } from '../types.js'; + +const { Rating, ReleaseType } = AppleUtils; /** * Serializes the Apple ASC entities into the metadata configuration schema. @@ -27,7 +20,7 @@ export class AppleConfigWriter { }; } - public setAgeRating(attributes: AttributesOf): void { + public setAgeRating(attributes: AttributesOf): void { this.schema.advisory = { alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? Rating.NONE, @@ -50,7 +43,7 @@ export class AppleConfigWriter { }; } - public setInfoLocale(attributes: AttributesOf): void { + public setInfoLocale(attributes: AttributesOf): void { this.schema.info = this.schema.info ?? {}; const existing = this.schema.info[attributes.locale] ?? {}; @@ -66,7 +59,7 @@ export class AppleConfigWriter { public setCategories( attributes: Pick< - AttributesOf, + AttributesOf, | 'primaryCategory' | 'primarySubcategoryOne' | 'primarySubcategoryTwo' @@ -106,13 +99,19 @@ export class AppleConfigWriter { } public setVersion( - attributes: Omit, 'releaseType' | 'earliestReleaseDate'> + attributes: Omit< + AttributesOf, + 'releaseType' | 'earliestReleaseDate' + > ): void { this.schema.copyright = optional(attributes.copyright); } public setVersionRelease( - attributes: Pick, 'releaseType' | 'earliestReleaseDate'> + attributes: Pick< + AttributesOf, + 'releaseType' | 'earliestReleaseDate' + > ): void { if (attributes.releaseType === ReleaseType.SCHEDULED) { this.schema.release = { @@ -133,7 +132,7 @@ export class AppleConfigWriter { } } - public setVersionLocale(attributes: AttributesOf): void { + public setVersionLocale(attributes: AttributesOf): void { this.schema.info = this.schema.info ?? {}; const existing = this.schema.info[attributes.locale] ?? {}; @@ -150,7 +149,7 @@ export class AppleConfigWriter { }; } - public setReviewDetails(attributes: AttributesOf): void { + public setReviewDetails(attributes: AttributesOf): void { this.schema.review = { firstName: attributes.contactFirstName ?? '', lastName: attributes.contactLastName ?? '', diff --git a/packages/eas-cli/src/metadata/apple/data.ts b/packages/eas-cli/src/metadata/apple/data.ts index d249e6815a..41106df2b8 100644 --- a/packages/eas-cli/src/metadata/apple/data.ts +++ b/packages/eas-cli/src/metadata/apple/data.ts @@ -1,9 +1,9 @@ import type { App } from '@expo/apple-utils'; -import type { AgeRatingData } from './tasks/age-rating'; -import type { AppInfoData } from './tasks/app-info'; -import type { AppReviewData } from './tasks/app-review-detail'; -import type { AppVersionData } from './tasks/app-version'; +import type { AgeRatingData } from './tasks/age-rating.js'; +import type { AppInfoData } from './tasks/app-info.js'; +import type { AppReviewData } from './tasks/app-review-detail.js'; +import type { AppVersionData } from './tasks/app-version.js'; /** * The fully prepared apple data, used within the `downloadAsync` or `uploadAsync` tasks. diff --git a/packages/eas-cli/src/metadata/apple/task.ts b/packages/eas-cli/src/metadata/apple/task.ts index 9f7c1f0265..3c0a11e12e 100644 --- a/packages/eas-cli/src/metadata/apple/task.ts +++ b/packages/eas-cli/src/metadata/apple/task.ts @@ -1,6 +1,6 @@ -import { AppleConfigReader } from './config/reader'; -import { AppleConfigWriter } from './config/writer'; -import { AppleData, PartialAppleData } from './data'; +import { AppleConfigReader } from './config/reader.js'; +import { AppleConfigWriter } from './config/writer.js'; +import { AppleData, PartialAppleData } from './data.js'; export abstract class AppleTask { /** Get a description from the task to use as section headings in the log */ diff --git a/packages/eas-cli/src/metadata/apple/tasks/__mocks__/nock.ts b/packages/eas-cli/src/metadata/apple/tasks/__mocks__/nock.ts index 54cd25b678..ca5bec7da2 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/__mocks__/nock.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/__mocks__/nock.ts @@ -1,7 +1,9 @@ -import { getRequestClient } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; export { default } from 'nock'; +const { getRequestClient } = AppleUtils; + // Axios from apple-utils needs to be patched when we use Nock. // Instead of the default adapter, we need to use `axios/lib/adapters/http` // see: https://github.com/nock/nock#axios diff --git a/packages/eas-cli/src/metadata/apple/tasks/__tests__/age-rating.test.ts b/packages/eas-cli/src/metadata/apple/tasks/__tests__/age-rating.test.ts index f2c31a43bd..f65eb34bb4 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/__tests__/age-rating.test.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/__tests__/age-rating.test.ts @@ -1,15 +1,17 @@ -import { AgeRatingDeclaration, AppStoreVersion, Rating } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import nock from 'nock'; -import { AppleConfigReader } from '../../config/reader'; -import { AppleConfigWriter } from '../../config/writer'; -import { AppleData } from '../../data'; -import { AgeRatingTask } from '../age-rating'; -import { requestContext } from './fixtures/requestContext'; +import { AppleConfigReader } from '../../config/reader.js'; +import { AppleConfigWriter } from '../../config/writer.js'; +import { AppleData } from '../../data.js'; +import { AgeRatingTask } from '../age-rating.js'; +import { requestContext } from './fixtures/requestContext.js'; jest.mock('../../../../ora'); jest.mock('../../config/writer'); +const { AgeRatingDeclaration, AppStoreVersion, Rating } = AppleUtils; + describe(AgeRatingTask, () => { describe('prepareAsync', () => { it('aborts when version is not loaded', async () => { diff --git a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-info.test.ts b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-info.test.ts index dde056e266..47a3833227 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-info.test.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-info.test.ts @@ -1,11 +1,13 @@ -import { App, AppCategoryId, AppInfo, AppInfoLocalization } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import nock from 'nock'; -import { AppleConfigReader } from '../../config/reader'; -import { AppleConfigWriter } from '../../config/writer'; -import { AppleData, PartialAppleData } from '../../data'; -import { AppInfoTask } from '../app-info'; -import { requestContext } from './fixtures/requestContext'; +import { AppleConfigReader } from '../../config/reader.js'; +import { AppleConfigWriter } from '../../config/writer.js'; +import { AppleData, PartialAppleData } from '../../data.js'; +import { AppInfoTask } from '../app-info.js'; +import { requestContext } from './fixtures/requestContext.js'; + +const { App, AppCategoryId, AppInfo, AppInfoLocalization } = AppleUtils; jest.mock('../../../../ora'); jest.mock('../../config/writer'); diff --git a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-review-detail.test.ts b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-review-detail.test.ts index f3a3a7b343..984fe0263b 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-review-detail.test.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-review-detail.test.ts @@ -1,10 +1,12 @@ -import { AppStoreReviewAttachment, AppStoreReviewDetail, AppStoreVersion } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import nock from 'nock'; -import { AppleConfigReader } from '../../config/reader'; -import { AppleConfigWriter } from '../../config/writer'; -import { AppReviewDetailTask } from '../app-review-detail'; -import { requestContext } from './fixtures/requestContext'; +import { AppleConfigReader } from '../../config/reader.js'; +import { AppleConfigWriter } from '../../config/writer.js'; +import { AppReviewDetailTask } from '../app-review-detail.js'; +import { requestContext } from './fixtures/requestContext.js'; + +const { AppStoreReviewAttachment, AppStoreReviewDetail, AppStoreVersion } = AppleUtils; jest.mock('../../../../ora'); jest.mock('../../config/writer'); diff --git a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-version.test.ts b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-version.test.ts index 4f3b201bcc..13769cb585 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-version.test.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/__tests__/app-version.test.ts @@ -1,16 +1,13 @@ -import { - App, - AppStoreState, - AppStoreVersion, - AppStoreVersionLocalization, -} from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import nock from 'nock'; -import { AppleConfigReader } from '../../config/reader'; -import { AppleConfigWriter } from '../../config/writer'; -import { AppleData, PartialAppleData } from '../../data'; -import { AppVersionTask } from '../app-version'; -import { requestContext } from './fixtures/requestContext'; +import { AppleConfigReader } from '../../config/reader.js'; +import { AppleConfigWriter } from '../../config/writer.js'; +import { AppleData, PartialAppleData } from '../../data.js'; +import { AppVersionTask } from '../app-version.js'; +import { requestContext } from './fixtures/requestContext.js'; + +const { App, AppStoreState, AppStoreVersion, AppStoreVersionLocalization } = AppleUtils; jest.mock('../../../../ora'); jest.mock('../../config/writer'); diff --git a/packages/eas-cli/src/metadata/apple/tasks/age-rating.ts b/packages/eas-cli/src/metadata/apple/tasks/age-rating.ts index 32fd755174..dbf17995bb 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/age-rating.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/age-rating.ts @@ -1,14 +1,14 @@ -import { AgeRatingDeclaration } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import assert from 'assert'; import chalk from 'chalk'; -import Log from '../../../log'; -import { logAsync } from '../../utils/log'; -import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task'; +import Log from '../../../log.js'; +import { logAsync } from '../../utils/log.js'; +import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task.js'; export type AgeRatingData = { /** The app age rating declaration for the app version */ - ageRating: AgeRatingDeclaration; + ageRating: AppleUtils.AgeRatingDeclaration; }; export class AgeRatingTask extends AppleTask { diff --git a/packages/eas-cli/src/metadata/apple/tasks/app-info.ts b/packages/eas-cli/src/metadata/apple/tasks/app-info.ts index 8544fbcd68..86e8f830ff 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/app-info.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/app-info.ts @@ -1,17 +1,17 @@ -import { AppInfo, AppInfoLocalization } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import assert from 'assert'; import chalk from 'chalk'; -import Log from '../../../log'; -import { logAsync } from '../../utils/log'; -import { retryIfNullAsync } from '../../utils/retry'; -import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task'; +import Log from '../../../log.js'; +import { logAsync } from '../../utils/log.js'; +import { retryIfNullAsync } from '../../utils/retry.js'; +import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task.js'; export type AppInfoData = { /** The current app info that should be edited */ - info: AppInfo; + info: AppleUtils.AppInfo; /** All info locales that are enabled */ - infoLocales: AppInfoLocalization[]; + infoLocales: AppleUtils.AppInfoLocalization[]; }; export class AppInfoTask extends AppleTask { diff --git a/packages/eas-cli/src/metadata/apple/tasks/app-review-detail.ts b/packages/eas-cli/src/metadata/apple/tasks/app-review-detail.ts index a81684a486..2580dd6c06 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/app-review-detail.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/app-review-detail.ts @@ -1,14 +1,14 @@ -import { AppStoreReviewDetail } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import assert from 'assert'; import chalk from 'chalk'; -import Log from '../../../log'; -import { logAsync } from '../../utils/log'; -import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task'; +import Log from '../../../log.js'; +import { logAsync } from '../../utils/log.js'; +import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task.js'; export type AppReviewData = { /** The current app info that should be edited */ - reviewDetail: AppStoreReviewDetail; + reviewDetail: AppleUtils.AppStoreReviewDetail; }; /** Handle all contact, demo account, or instruction info that are required for the App Store review team. */ diff --git a/packages/eas-cli/src/metadata/apple/tasks/app-version.ts b/packages/eas-cli/src/metadata/apple/tasks/app-version.ts index e08faf7932..f8c885a9b2 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/app-version.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/app-version.ts @@ -1,28 +1,30 @@ -import { App, AppStoreVersion, AppStoreVersionLocalization, Platform } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import assert from 'assert'; import chalk from 'chalk'; -import Log from '../../../log'; -import { logAsync } from '../../utils/log'; -import { retryIfNullAsync } from '../../utils/retry'; -import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task'; +import Log from '../../../log.js'; +import { logAsync } from '../../utils/log.js'; +import { retryIfNullAsync } from '../../utils/retry.js'; +import { AppleTask, TaskDownloadOptions, TaskPrepareOptions, TaskUploadOptions } from '../task.js'; + +const { Platform } = AppleUtils; export type AppVersionOptions = { /** If we should use the live version of the app (if available - defaults to false) */ editLive: boolean; /** The platform to use (defaults to IOS) */ - platform: Platform; + platform: AppleUtils.Platform; }; export type AppVersionData = { /** The current selected app store version to update */ - version: AppStoreVersion; + version: AppleUtils.AppStoreVersion; /** If the current selected version is a live version, where not all properties are editable */ versionIsLive: boolean; /** If the current selected version is the first version to be created */ versionIsFirst: boolean; /** All version locales that should be, or are enabled */ - versionLocales: AppStoreVersionLocalization[]; + versionLocales: AppleUtils.AppStoreVersionLocalization[]; }; export class AppVersionTask extends AppleTask { @@ -127,14 +129,14 @@ export class AppVersionTask extends AppleTask { * This also checks if this is the first version, which disallow release notes. */ async function resolveVersionAsync( - app: App, + app: AppleUtils.App, { editLive, platform }: AppVersionOptions ): Promise<{ - version: AppStoreVersion | null; + version: AppleUtils.AppStoreVersion | null; versionIsLive: boolean; versionIsFirst: boolean; }> { - let version: AppStoreVersion | null = null; + let version: AppleUtils.AppStoreVersion | null = null; let versionIsLive = false; if (editLive) { diff --git a/packages/eas-cli/src/metadata/apple/tasks/index.ts b/packages/eas-cli/src/metadata/apple/tasks/index.ts index 9e17b85d34..6958002ebb 100644 --- a/packages/eas-cli/src/metadata/apple/tasks/index.ts +++ b/packages/eas-cli/src/metadata/apple/tasks/index.ts @@ -1,9 +1,9 @@ -import { MetadataContext } from '../../context'; -import { AppleTask } from '../task'; -import { AgeRatingTask } from './age-rating'; -import { AppInfoTask } from './app-info'; -import { AppReviewDetailTask } from './app-review-detail'; -import { AppVersionTask } from './app-version'; +import { MetadataContext } from '../../context.js'; +import { AppleTask } from '../task.js'; +import { AgeRatingTask } from './age-rating.js'; +import { AppInfoTask } from './app-info.js'; +import { AppReviewDetailTask } from './app-review-detail.js'; +import { AppVersionTask } from './app-version.js'; /** * List of all eligible tasks to sync local store configuration to the App store. diff --git a/packages/eas-cli/src/metadata/config.ts b/packages/eas-cli/src/metadata/config.ts index e9e509ab7d..f82df87462 100644 --- a/packages/eas-cli/src/metadata/config.ts +++ b/packages/eas-cli/src/metadata/config.ts @@ -1,9 +1,9 @@ import Ajv from 'ajv'; import assert from 'assert'; -import { AppleConfigReader } from './apple/config/reader'; -import { AppleConfigWriter } from './apple/config/writer'; -import { AppleMetadata } from './apple/types'; +import { AppleConfigReader } from './apple/config/reader.js'; +import { AppleConfigWriter } from './apple/config/writer.js'; +import { AppleMetadata } from './apple/types.js'; export interface MetadataConfig { /** The store configuration version */ diff --git a/packages/eas-cli/src/metadata/context.ts b/packages/eas-cli/src/metadata/context.ts index a8a2faf18b..c36042c5c2 100644 --- a/packages/eas-cli/src/metadata/context.ts +++ b/packages/eas-cli/src/metadata/context.ts @@ -1,15 +1,17 @@ -import { App, Session } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { ExpoConfig } from '@expo/config'; import { Platform } from '@expo/eas-build-job'; import { EasJsonReader, SubmitProfile } from '@expo/eas-json'; import assert from 'assert'; -import { CredentialsContext } from '../credentials/context'; -import { getRequestContext } from '../credentials/ios/appstore/authenticate'; -import { getExpoConfig } from '../project/expoConfig'; -import { getBundleIdentifierAsync } from '../project/ios/bundleIdentifier'; -import { Actor } from '../user/User'; -import { ensureLoggedInAsync } from '../user/actions'; +import { CredentialsContext } from '../credentials/context.js'; +import { getRequestContext } from '../credentials/ios/appstore/authenticate.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { getBundleIdentifierAsync } from '../project/ios/bundleIdentifier.js'; +import { Actor } from '../user/User.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; + +const { App } = AppleUtils; export type MetadataContext = { /** Submission profile platform to use */ @@ -32,9 +34,9 @@ export type MetadataContext = { export type MetadataAppStoreAuthentication = { /** The root entity of the App store */ - app: App; + app: AppleUtils.App; /** The authentication state we used to fetch the root entity */ - auth: Partial; + auth: Partial; }; /** diff --git a/packages/eas-cli/src/metadata/download.ts b/packages/eas-cli/src/metadata/download.ts index f79ac1fc78..d7e85076c9 100644 --- a/packages/eas-cli/src/metadata/download.ts +++ b/packages/eas-cli/src/metadata/download.ts @@ -1,15 +1,15 @@ import fs from 'fs-extra'; import path from 'path'; -import { MetadataEvent } from '../analytics/events'; -import Log from '../log'; -import { confirmAsync } from '../prompts'; -import { AppleData } from './apple/data'; -import { createAppleTasks } from './apple/tasks'; -import { createAppleWriter } from './config'; -import { MetadataContext, ensureMetadataAppStoreAuthenticatedAsync } from './context'; -import { MetadataDownloadError, MetadataValidationError } from './errors'; -import { subscribeTelemetry } from './utils/telemetry'; +import { MetadataEvent } from '../analytics/events.js'; +import Log from '../log.js'; +import { confirmAsync } from '../prompts.js'; +import { AppleData } from './apple/data.js'; +import { createAppleTasks } from './apple/tasks/index.js'; +import { createAppleWriter } from './config.js'; +import { MetadataContext, ensureMetadataAppStoreAuthenticatedAsync } from './context.js'; +import { MetadataDownloadError, MetadataValidationError } from './errors.js'; +import { subscribeTelemetry } from './utils/telemetry.js'; /** * Generate a local store configuration from the stores. diff --git a/packages/eas-cli/src/metadata/errors.ts b/packages/eas-cli/src/metadata/errors.ts index 067f11e981..03ea2f8445 100644 --- a/packages/eas-cli/src/metadata/errors.ts +++ b/packages/eas-cli/src/metadata/errors.ts @@ -1,7 +1,7 @@ import type { ErrorObject } from 'ajv'; import chalk from 'chalk'; -import Log, { link } from '../log'; +import Log, { link } from '../log.js'; /** * Before syncing data to the ASC API, we need to validate the metadata config. diff --git a/packages/eas-cli/src/metadata/upload.ts b/packages/eas-cli/src/metadata/upload.ts index 21acbb4b2d..b1e9ecb02a 100644 --- a/packages/eas-cli/src/metadata/upload.ts +++ b/packages/eas-cli/src/metadata/upload.ts @@ -1,15 +1,19 @@ import fs from 'fs-extra'; import path from 'path'; -import { MetadataEvent } from '../analytics/events'; -import Log from '../log'; -import { confirmAsync } from '../prompts'; -import { AppleData } from './apple/data'; -import { createAppleTasks } from './apple/tasks'; -import { createAppleReader, validateConfig } from './config'; -import { MetadataContext, ensureMetadataAppStoreAuthenticatedAsync } from './context'; -import { MetadataUploadError, MetadataValidationError, logMetadataValidationError } from './errors'; -import { subscribeTelemetry } from './utils/telemetry'; +import { MetadataEvent } from '../analytics/events.js'; +import Log from '../log.js'; +import { confirmAsync } from '../prompts.js'; +import { AppleData } from './apple/data.js'; +import { createAppleTasks } from './apple/tasks/index.js'; +import { createAppleReader, validateConfig } from './config.js'; +import { MetadataContext, ensureMetadataAppStoreAuthenticatedAsync } from './context.js'; +import { + MetadataUploadError, + MetadataValidationError, + logMetadataValidationError, +} from './errors.js'; +import { subscribeTelemetry } from './utils/telemetry.js'; /** * Sync a local store configuration with the stores. diff --git a/packages/eas-cli/src/metadata/utils/__tests__/date.test.ts b/packages/eas-cli/src/metadata/utils/__tests__/date.test.ts index 03e32a4ca6..19061802b5 100644 --- a/packages/eas-cli/src/metadata/utils/__tests__/date.test.ts +++ b/packages/eas-cli/src/metadata/utils/__tests__/date.test.ts @@ -1,4 +1,4 @@ -import { removeDatePrecision } from '../date'; +import { removeDatePrecision } from '../date.js'; describe(removeDatePrecision, () => { it('returns null for falsy values', () => { diff --git a/packages/eas-cli/src/metadata/utils/__tests__/telemetry.test.ts b/packages/eas-cli/src/metadata/utils/__tests__/telemetry.test.ts index 68cc6f003b..5403b8dce0 100644 --- a/packages/eas-cli/src/metadata/utils/__tests__/telemetry.test.ts +++ b/packages/eas-cli/src/metadata/utils/__tests__/telemetry.test.ts @@ -1,6 +1,8 @@ -import { App } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; -import { TelemetryContext, makeDataScrubber } from '../telemetry'; +import { TelemetryContext, makeDataScrubber } from '../telemetry.js'; + +const { App } = AppleUtils; describe(makeDataScrubber, () => { const stub: TelemetryContext = { diff --git a/packages/eas-cli/src/metadata/utils/asc.ts b/packages/eas-cli/src/metadata/utils/asc.ts index 8701481725..4df738658b 100644 --- a/packages/eas-cli/src/metadata/utils/asc.ts +++ b/packages/eas-cli/src/metadata/utils/asc.ts @@ -1,4 +1,4 @@ -import { ConnectModel } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; /** Get the properties of a single App Store Connect entity */ -export type AttributesOf = T['attributes']; +export type AttributesOf = T['attributes']; diff --git a/packages/eas-cli/src/metadata/utils/log.ts b/packages/eas-cli/src/metadata/utils/log.ts index ea10107eff..d6de7fe89d 100644 --- a/packages/eas-cli/src/metadata/utils/log.ts +++ b/packages/eas-cli/src/metadata/utils/log.ts @@ -1,4 +1,4 @@ -import { Ora, ora } from '../../ora'; +import { Ora, ora } from '../../ora.js'; type LogAsyncOptions = { /** If the spinner representing the async action should be hidden, e.g. for JSON output */ diff --git a/packages/eas-cli/src/metadata/utils/telemetry.ts b/packages/eas-cli/src/metadata/utils/telemetry.ts index 43ba87f6d5..baa0bdc15f 100644 --- a/packages/eas-cli/src/metadata/utils/telemetry.ts +++ b/packages/eas-cli/src/metadata/utils/telemetry.ts @@ -1,12 +1,14 @@ -import { App, Session, getRequestClient } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import type { AxiosError } from 'axios'; import { v4 as uuidv4 } from 'uuid'; -import { Analytics, MetadataEvent } from '../../analytics/events'; +import { Analytics, MetadataEvent } from '../../analytics/events.js'; + +const { getRequestClient } = AppleUtils; export type TelemetryContext = { - app: App; - auth: Partial; + app: AppleUtils.App; + auth: Partial; }; /** diff --git a/packages/eas-cli/src/ora.ts b/packages/eas-cli/src/ora.ts index 3477679843..74c31a3263 100644 --- a/packages/eas-cli/src/ora.ts +++ b/packages/eas-cli/src/ora.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line import oraReal, { Options, Ora } from 'ora'; -import Log from './log'; +import Log from './log.js'; export { Ora, Options }; diff --git a/packages/eas-cli/src/platform.ts b/packages/eas-cli/src/platform.ts index 9b4da771d9..cdf30e56a7 100644 --- a/packages/eas-cli/src/platform.ts +++ b/packages/eas-cli/src/platform.ts @@ -1,7 +1,7 @@ import { Platform } from '@expo/eas-build-job'; -import { AppPlatform } from './graphql/generated'; -import { promptAsync } from './prompts'; +import { AppPlatform } from './graphql/generated.js'; +import { promptAsync } from './prompts.js'; export const appPlatformDisplayNames: Record = { [AppPlatform.Android]: 'Android', diff --git a/packages/eas-cli/src/project/__tests__/project-utils.ts b/packages/eas-cli/src/project/__tests__/project-utils.ts index 059caf27c3..3e6786450b 100644 --- a/packages/eas-cli/src/project/__tests__/project-utils.ts +++ b/packages/eas-cli/src/project/__tests__/project-utils.ts @@ -1,4 +1,4 @@ -import { Actor } from '../../user/User'; +import { Actor } from '../../user/User.js'; interface MockProject { projectRoot: string; diff --git a/packages/eas-cli/src/project/__tests__/projectUtils-test.ts b/packages/eas-cli/src/project/__tests__/projectUtils-test.ts index a8edb110da..6a922b6f13 100644 --- a/packages/eas-cli/src/project/__tests__/projectUtils-test.ts +++ b/packages/eas-cli/src/project/__tests__/projectUtils-test.ts @@ -1,17 +1,17 @@ import { vol } from 'memfs'; -import { confirmAsync } from '../../prompts'; -import { Actor, getUserAsync } from '../../user/User'; +import { confirmAsync } from '../../prompts.js'; +import { Actor, getUserAsync } from '../../user/User.js'; import { ensureProjectExistsAsync, findProjectIdByAccountNameAndSlugNullableAsync, -} from '../ensureProjectExists'; +} from '../ensureProjectExists.js'; import { findProjectRootAsync, getProjectAccountName, getProjectAccountNameAsync, promptToCreateProjectIfNotExistsAsync, -} from '../projectUtils'; +} from '../projectUtils.js'; jest.mock('@expo/config'); jest.mock('fs'); diff --git a/packages/eas-cli/src/project/__tests__/publish-test.ts b/packages/eas-cli/src/project/__tests__/publish-test.ts index c9bb6d86c0..b1acc2a8da 100644 --- a/packages/eas-cli/src/project/__tests__/publish-test.ts +++ b/packages/eas-cli/src/project/__tests__/publish-test.ts @@ -3,10 +3,10 @@ import mockdate from 'mockdate'; import path from 'path'; import { v4 as uuidv4 } from 'uuid'; -import { defaultPublishPlatforms } from '../../commands/update'; -import { AssetMetadataStatus } from '../../graphql/generated'; -import { PublishMutation } from '../../graphql/mutations/PublishMutation'; -import { PublishQuery } from '../../graphql/queries/PublishQuery'; +import { defaultPublishPlatforms } from '../../commands/update/index.js'; +import { AssetMetadataStatus } from '../../graphql/generated.js'; +import { PublishMutation } from '../../graphql/mutations/PublishMutation.js'; +import { PublishQuery } from '../../graphql/queries/PublishQuery.js'; import { MetadataJoi, TIMEOUT_LIMIT, @@ -20,7 +20,7 @@ import { guessContentTypeFromExtension, resolveInputDirectoryAsync, uploadAssetsAsync, -} from '../publish'; +} from '../publish.js'; jest.mock('../../uploads'); jest.mock('fs'); diff --git a/packages/eas-cli/src/project/__tests__/workflow-test.ts b/packages/eas-cli/src/project/__tests__/workflow-test.ts index cad0fa1b36..82f2b0a719 100644 --- a/packages/eas-cli/src/project/__tests__/workflow-test.ts +++ b/packages/eas-cli/src/project/__tests__/workflow-test.ts @@ -1,7 +1,7 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { vol } from 'memfs'; -import { resolveWorkflowAsync } from '../workflow'; +import { resolveWorkflowAsync } from '../workflow.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/project/android/__tests__/applicationId-test.ts b/packages/eas-cli/src/project/android/__tests__/applicationId-test.ts index 433f319035..b2c457243f 100644 --- a/packages/eas-cli/src/project/android/__tests__/applicationId-test.ts +++ b/packages/eas-cli/src/project/android/__tests__/applicationId-test.ts @@ -2,12 +2,12 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { promptAsync } from '../../../prompts'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { promptAsync } from '../../../prompts.js'; import { ensureApplicationIdIsDefinedForManagedProjectAsync, getApplicationIdAsync, -} from '../applicationId'; +} from '../applicationId.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/project/android/__tests__/gradle-test.ts b/packages/eas-cli/src/project/android/__tests__/gradle-test.ts index 35a1beea5c..fee7e04d96 100644 --- a/packages/eas-cli/src/project/android/__tests__/gradle-test.ts +++ b/packages/eas-cli/src/project/android/__tests__/gradle-test.ts @@ -2,9 +2,9 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { promptAsync } from '../../../prompts'; -import { resolveGradleBuildContextAsync } from '../gradle'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { promptAsync } from '../../../prompts.js'; +import { resolveGradleBuildContextAsync } from '../gradle.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/project/android/__tests__/gradleUtils-test.ts b/packages/eas-cli/src/project/android/__tests__/gradleUtils-test.ts index f428c9e5cc..b2510b9eb2 100644 --- a/packages/eas-cli/src/project/android/__tests__/gradleUtils-test.ts +++ b/packages/eas-cli/src/project/android/__tests__/gradleUtils-test.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import { vol } from 'memfs'; import path from 'path'; -import pick from '../../../utils/expodash/pick'; -import { getAppBuildGradleAsync, parseGradleCommand, resolveConfigValue } from '../gradleUtils'; +import pick from '../../../utils/expodash/pick.js'; +import { getAppBuildGradleAsync, parseGradleCommand, resolveConfigValue } from '../gradleUtils.js'; const fsReal = jest.requireActual('fs') as typeof fs; diff --git a/packages/eas-cli/src/project/android/applicationId.ts b/packages/eas-cli/src/project/android/applicationId.ts index 7b49f3ed51..b4d18f62c4 100644 --- a/packages/eas-cli/src/project/android/applicationId.ts +++ b/packages/eas-cli/src/project/android/applicationId.ts @@ -1,19 +1,21 @@ import { ExpoConfig, getConfigFilePaths } from '@expo/config'; -import { AndroidConfig, IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { Platform, Workflow } from '@expo/eas-build-job'; import assert from 'assert'; import chalk from 'chalk'; import fs from 'fs-extra'; -import nullthrows from 'nullthrows'; - -import { readAppJson } from '../../build/utils/appJson'; -import Log, { learnMore } from '../../log'; -import { getProjectConfigDescription, getUsername } from '../../project/projectUtils'; -import { promptAsync } from '../../prompts'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { resolveWorkflowAsync } from '../workflow'; -import { GradleBuildContext } from './gradle'; -import * as gradleUtils from './gradleUtils'; + +import { readAppJson } from '../../build/utils/appJson.js'; +import Log, { learnMore } from '../../log.js'; +import { getProjectConfigDescription, getUsername } from '../../project/projectUtils.js'; +import { promptAsync } from '../../prompts.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { resolveWorkflowAsync } from '../workflow.js'; +import { GradleBuildContext } from './gradle.js'; +import * as gradleUtils from './gradleUtils.js'; + +const { AndroidConfig, IOSConfig } = ConfigPlugins; export const INVALID_APPLICATION_ID_MESSAGE = `Invalid format of Android applicationId. Only alphanumeric characters, '.' and '_' are allowed, and each '.' must be followed by a letter.`; diff --git a/packages/eas-cli/src/project/android/gradle.ts b/packages/eas-cli/src/project/android/gradle.ts index d9720afa63..5d5b92e8b3 100644 --- a/packages/eas-cli/src/project/android/gradle.ts +++ b/packages/eas-cli/src/project/android/gradle.ts @@ -1,9 +1,9 @@ import { Platform, Workflow } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; -import Log from '../../log'; -import { resolveWorkflowAsync } from '../../project/workflow'; -import * as gradleUtils from './gradleUtils'; +import Log from '../../log.js'; +import { resolveWorkflowAsync } from '../../project/workflow.js'; +import * as gradleUtils from './gradleUtils.js'; export interface GradleBuildContext { moduleName?: string; diff --git a/packages/eas-cli/src/project/android/gradleUtils.ts b/packages/eas-cli/src/project/android/gradleUtils.ts index e56978796d..f3bbfebd87 100644 --- a/packages/eas-cli/src/project/android/gradleUtils.ts +++ b/packages/eas-cli/src/project/android/gradleUtils.ts @@ -1,6 +1,8 @@ -import { AndroidConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import fs from 'fs-extra'; -import g2js from 'gradle-to-js/lib/parser'; +import g2js from 'gradle-to-js/lib/parser.js'; + +const { AndroidConfig } = ConfigPlugins; // represents gradle command // e.g. for `:app:buildExampleDebug` -> { moduleName: app, flavor: example, buildType: debug } diff --git a/packages/eas-cli/src/project/ensureProjectExists.ts b/packages/eas-cli/src/project/ensureProjectExists.ts index 23e9bd7ac7..b31af8f934 100644 --- a/packages/eas-cli/src/project/ensureProjectExists.ts +++ b/packages/eas-cli/src/project/ensureProjectExists.ts @@ -2,13 +2,13 @@ import assert from 'assert'; import chalk from 'chalk'; import terminalLink from 'terminal-link'; -import { getProjectDashboardUrl } from '../build/utils/url'; -import { AppPrivacy } from '../graphql/generated'; -import { AppMutation } from '../graphql/mutations/AppMutation'; -import { ProjectQuery } from '../graphql/queries/ProjectQuery'; -import { ora } from '../ora'; -import { findAccountByName } from '../user/Account'; -import { ensureLoggedInAsync } from '../user/actions'; +import { getProjectDashboardUrl } from '../build/utils/url.js'; +import { AppPrivacy } from '../graphql/generated.js'; +import { AppMutation } from '../graphql/mutations/AppMutation.js'; +import { ProjectQuery } from '../graphql/queries/ProjectQuery.js'; +import { ora } from '../ora.js'; +import { findAccountByName } from '../user/Account.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; interface ProjectInfo { accountName: string; diff --git a/packages/eas-cli/src/project/expoSdk.ts b/packages/eas-cli/src/project/expoSdk.ts index 7b5e14bf1e..ab9bb66d64 100644 --- a/packages/eas-cli/src/project/expoSdk.ts +++ b/packages/eas-cli/src/project/expoSdk.ts @@ -3,9 +3,9 @@ import { Errors } from '@oclif/core'; import assert from 'assert'; import semver from 'semver'; -import { BuildContext } from '../build/context'; -import Log from '../log'; -import { confirmAsync } from '../prompts'; +import { BuildContext } from '../build/context.js'; +import Log from '../log.js'; +import { confirmAsync } from '../prompts.js'; const SUPPORTED_EXPO_SDK_VERSIONS = '>= 41.0.0'; assert(semver.validRange(SUPPORTED_EXPO_SDK_VERSIONS), 'Must be a valid version range'); diff --git a/packages/eas-cli/src/project/ios/__tests__/bundleIdentifier-test.ts b/packages/eas-cli/src/project/ios/__tests__/bundleIdentifier-test.ts index 2a8cb0c2a3..02a8fc2ac3 100644 --- a/packages/eas-cli/src/project/ios/__tests__/bundleIdentifier-test.ts +++ b/packages/eas-cli/src/project/ios/__tests__/bundleIdentifier-test.ts @@ -3,13 +3,13 @@ import { vol } from 'memfs'; import os from 'os'; import path from 'path'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { promptAsync } from '../../../prompts'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { promptAsync } from '../../../prompts.js'; import { ensureBundleIdentifierIsDefinedForManagedProjectAsync, getBundleIdentifierAsync, isWildcardBundleIdentifier, -} from '../bundleIdentifier'; +} from '../bundleIdentifier.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/project/ios/__tests__/scheme-test.ts b/packages/eas-cli/src/project/ios/__tests__/scheme-test.ts index 4f3599b436..f6aa1765b2 100644 --- a/packages/eas-cli/src/project/ios/__tests__/scheme-test.ts +++ b/packages/eas-cli/src/project/ios/__tests__/scheme-test.ts @@ -2,8 +2,8 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { promptAsync } from '../../../prompts'; -import { selectSchemeAsync } from '../scheme'; +import { promptAsync } from '../../../prompts.js'; +import { selectSchemeAsync } from '../scheme.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/project/ios/bundleIdentifier.ts b/packages/eas-cli/src/project/ios/bundleIdentifier.ts index 6dd054e91f..5519242cac 100644 --- a/packages/eas-cli/src/project/ios/bundleIdentifier.ts +++ b/packages/eas-cli/src/project/ios/bundleIdentifier.ts @@ -1,16 +1,18 @@ import { ExpoConfig, getConfigFilePaths } from '@expo/config'; -import { AndroidConfig, IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { Platform, Workflow } from '@expo/eas-build-job'; import assert from 'assert'; import chalk from 'chalk'; import fs from 'fs-extra'; -import { readAppJson } from '../../build/utils/appJson'; -import Log, { learnMore } from '../../log'; -import { promptAsync } from '../../prompts'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { getProjectConfigDescription, getUsername } from '../projectUtils'; -import { resolveWorkflowAsync } from '../workflow'; +import { readAppJson } from '../../build/utils/appJson.js'; +import Log, { learnMore } from '../../log.js'; +import { promptAsync } from '../../prompts.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { getProjectConfigDescription, getUsername } from '../projectUtils.js'; +import { resolveWorkflowAsync } from '../workflow.js'; + +const { AndroidConfig, IOSConfig } = ConfigPlugins; export const INVALID_BUNDLE_IDENTIFIER_MESSAGE = `Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.`; diff --git a/packages/eas-cli/src/project/ios/entitlements.ts b/packages/eas-cli/src/project/ios/entitlements.ts index f37c7c83e6..a7410a3df1 100644 --- a/packages/eas-cli/src/project/ios/entitlements.ts +++ b/packages/eas-cli/src/project/ios/entitlements.ts @@ -1,13 +1,24 @@ -import { IOSConfig, compileModsAsync } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { JSONObject } from '@expo/json-file'; -import { getPrebuildConfigAsync } from '@expo/prebuild-config'; +import PrebuildConfig from '@expo/prebuild-config'; -import { readPlistAsync } from '../../utils/plist'; +import { readPlistAsync } from '../../utils/plist.js'; + +const { + IOSConfig, + // eslint-disable-next-line async-protect/async-suffix + compileModsAsync, +} = ConfigPlugins; +const { + // eslint-disable-next-line async-protect/async-suffix + getPrebuildConfigAsync, +} = PrebuildConfig; interface Target { buildConfiguration?: string; targetName: string; } + export async function getManagedApplicationTargetEntitlementsAsync( projectDir: string, env: Record diff --git a/packages/eas-cli/src/project/ios/scheme.ts b/packages/eas-cli/src/project/ios/scheme.ts index dd0d920434..62a8adeaf1 100644 --- a/packages/eas-cli/src/project/ios/scheme.ts +++ b/packages/eas-cli/src/project/ios/scheme.ts @@ -1,14 +1,15 @@ import { ExpoConfig } from '@expo/config'; -import { IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { Platform, Workflow } from '@expo/eas-build-job'; import { BuildProfile } from '@expo/eas-json'; import chalk from 'chalk'; -import Log from '../../log'; -import { promptAsync } from '../../prompts'; -import sortBy from '../../utils/expodash/sortBy'; -import { resolveWorkflowAsync } from '../workflow'; +import Log from '../../log.js'; +import { promptAsync } from '../../prompts.js'; +import sortBy from '../../utils/expodash/sortBy.js'; +import { resolveWorkflowAsync } from '../workflow.js'; +const { IOSConfig } = ConfigPlugins; export interface XcodeBuildContext { buildScheme: string; buildConfiguration?: string; diff --git a/packages/eas-cli/src/project/ios/target.ts b/packages/eas-cli/src/project/ios/target.ts index ec82f27614..d517b3ac9b 100644 --- a/packages/eas-cli/src/project/ios/target.ts +++ b/packages/eas-cli/src/project/ios/target.ts @@ -1,17 +1,19 @@ import { ExpoConfig } from '@expo/config'; -import { IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { Platform, Workflow } from '@expo/eas-build-job'; import { JSONObject } from '@expo/json-file'; import Joi from 'joi'; -import { Target } from '../../credentials/ios/types'; -import { resolveWorkflowAsync } from '../workflow'; -import { getBundleIdentifierAsync } from './bundleIdentifier'; +import { Target } from '../../credentials/ios/types.js'; +import { resolveWorkflowAsync } from '../workflow.js'; +import { getBundleIdentifierAsync } from './bundleIdentifier.js'; import { getManagedApplicationTargetEntitlementsAsync, getNativeTargetEntitlementsAsync, -} from './entitlements'; -import { XcodeBuildContext } from './scheme'; +} from './entitlements.js'; +import { XcodeBuildContext } from './scheme.js'; + +const { IOSConfig } = ConfigPlugins; interface UserDefinedTarget { targetName: string; @@ -145,7 +147,7 @@ async function resolveBareProjectDependenciesAsync({ exp: ExpoConfig; projectDir: string; buildConfiguration?: string; - target: IOSConfig.Target.Target; + target: ConfigPlugins.IOSConfig.Target.Target; bundleIdentifier: string; }): Promise { const result: Target[] = []; diff --git a/packages/eas-cli/src/project/metroConfig.ts b/packages/eas-cli/src/project/metroConfig.ts index 041a414ce0..97b29cffa8 100644 --- a/packages/eas-cli/src/project/metroConfig.ts +++ b/packages/eas-cli/src/project/metroConfig.ts @@ -4,9 +4,9 @@ import chalk from 'chalk'; import type MetroConfig from 'metro-config'; import resolveFrom from 'resolve-from'; -import { BuildContext } from '../build/context'; -import Log, { learnMore } from '../log'; -import { confirmAsync } from '../prompts'; +import { BuildContext } from '../build/context.js'; +import Log, { learnMore } from '../log.js'; +import { confirmAsync } from '../prompts.js'; export async function validateMetroConfigForManagedWorkflowAsync( ctx: BuildContext diff --git a/packages/eas-cli/src/project/projectUtils.ts b/packages/eas-cli/src/project/projectUtils.ts index cc52da3352..30bceeaff1 100644 --- a/packages/eas-cli/src/project/projectUtils.ts +++ b/packages/eas-cli/src/project/projectUtils.ts @@ -5,18 +5,18 @@ import path from 'path'; import pkgDir from 'pkg-dir'; import semver from 'semver'; -import { AppPrivacy } from '../graphql/generated'; -import Log from '../log'; -import { confirmAsync } from '../prompts'; -import { Actor } from '../user/User'; -import { ensureLoggedInAsync } from '../user/actions'; -import { expoCommandAsync } from '../utils/expoCli'; -import { getVcsClient } from '../vcs'; +import { AppPrivacy } from '../graphql/generated.js'; +import Log from '../log.js'; +import { confirmAsync } from '../prompts.js'; +import { Actor } from '../user/User.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; +import { expoCommandAsync } from '../utils/expoCli.js'; +import { getVcsClient } from '../vcs/index.js'; import { ensureProjectExistsAsync, findProjectIdByAccountNameAndSlugNullableAsync, -} from './ensureProjectExists'; -import { getExpoConfig } from './expoConfig'; +} from './ensureProjectExists.js'; +import { getExpoConfig } from './expoConfig.js'; export function getProjectAccountName(exp: ExpoConfig, user: Actor): string { switch (user.__typename) { diff --git a/packages/eas-cli/src/project/publish.ts b/packages/eas-cli/src/project/publish.ts index 55ceaf6ae1..53dca11d7f 100644 --- a/packages/eas-cli/src/project/publish.ts +++ b/packages/eas-cli/src/project/publish.ts @@ -1,5 +1,5 @@ import { ExpoConfig, Platform } from '@expo/config'; -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import crypto from 'crypto'; import fs from 'fs-extra'; import Joi from 'joi'; @@ -7,13 +7,15 @@ import mime from 'mime'; import path from 'path'; import promiseLimit from 'promise-limit'; -import { AssetMetadataStatus, PartialManifestAsset } from '../graphql/generated'; -import { PublishMutation } from '../graphql/mutations/PublishMutation'; -import { PresignedPost } from '../graphql/mutations/UploadSessionMutation'; -import { PublishQuery } from '../graphql/queries/PublishQuery'; -import { uploadWithPresignedPostAsync } from '../uploads'; -import { expoCommandAsync } from '../utils/expoCli'; -import uniqBy from '../utils/expodash/uniqBy'; +import { AssetMetadataStatus, PartialManifestAsset } from '../graphql/generated.js'; +import { PublishMutation } from '../graphql/mutations/PublishMutation.js'; +import { PresignedPost } from '../graphql/mutations/UploadSessionMutation.js'; +import { PublishQuery } from '../graphql/queries/PublishQuery.js'; +import { uploadWithPresignedPostAsync } from '../uploads.js'; +import { expoCommandAsync } from '../utils/expoCli.js'; +import uniqBy from '../utils/expodash/uniqBy.js'; + +const JsonFile = JsonFileModule.default; export const TIMEOUT_LIMIT = 60_000; // 1 minute diff --git a/packages/eas-cli/src/project/workflow.ts b/packages/eas-cli/src/project/workflow.ts index 36e4fe68cb..478ddb1101 100644 --- a/packages/eas-cli/src/project/workflow.ts +++ b/packages/eas-cli/src/project/workflow.ts @@ -1,9 +1,11 @@ -import { AndroidConfig, IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins from '@expo/config-plugins'; import { Platform, Workflow } from '@expo/eas-build-job'; import fs from 'fs-extra'; import path from 'path'; -import { getVcsClient } from '../vcs'; +import { getVcsClient } from '../vcs/index.js'; + +const { AndroidConfig, IOSConfig } = ConfigPlugins; export async function resolveWorkflowAsync( projectDir: string, diff --git a/packages/eas-cli/src/submit/ArchiveSource.ts b/packages/eas-cli/src/submit/ArchiveSource.ts index 873a6863ed..9496538ea4 100644 --- a/packages/eas-cli/src/submit/ArchiveSource.ts +++ b/packages/eas-cli/src/submit/ArchiveSource.ts @@ -4,14 +4,14 @@ import prompts from 'prompts'; import { URL } from 'url'; import * as uuid from 'uuid'; -import { AppPlatform, BuildFragment } from '../graphql/generated'; -import { BuildQuery } from '../graphql/queries/BuildQuery'; -import { toAppPlatform } from '../graphql/types/AppPlatform'; -import Log, { learnMore } from '../log'; -import { appPlatformDisplayNames } from '../platform'; -import { confirmAsync, promptAsync } from '../prompts'; -import { getRecentBuildsForSubmissionAsync } from './utils/builds'; -import { isExistingFileAsync, uploadAppArchiveAsync } from './utils/files'; +import { AppPlatform, BuildFragment } from '../graphql/generated.js'; +import { BuildQuery } from '../graphql/queries/BuildQuery.js'; +import { toAppPlatform } from '../graphql/types/AppPlatform.js'; +import Log, { learnMore } from '../log.js'; +import { appPlatformDisplayNames } from '../platform.js'; +import { confirmAsync, promptAsync } from '../prompts.js'; +import { getRecentBuildsForSubmissionAsync } from './utils/builds.js'; +import { isExistingFileAsync, uploadAppArchiveAsync } from './utils/files.js'; export const BUILD_LIST_ITEM_COUNT = 4; diff --git a/packages/eas-cli/src/submit/BaseSubmitter.ts b/packages/eas-cli/src/submit/BaseSubmitter.ts index 1681785214..ec3ba1daa9 100644 --- a/packages/eas-cli/src/submit/BaseSubmitter.ts +++ b/packages/eas-cli/src/submit/BaseSubmitter.ts @@ -1,17 +1,17 @@ import { Platform } from '@expo/eas-build-job'; -import { withAnalyticsAsync } from '../analytics/common'; -import { Event, SubmissionEvent } from '../analytics/events'; +import { withAnalyticsAsync } from '../analytics/common.js'; +import { Event, SubmissionEvent } from '../analytics/events.js'; import { AndroidSubmissionConfigInput, IosSubmissionConfigInput, SubmissionFragment, -} from '../graphql/generated'; -import { toAppPlatform } from '../graphql/types/AppPlatform'; -import Log from '../log'; -import { ora } from '../ora'; -import { appPlatformDisplayNames } from '../platform'; -import { SubmissionContext } from './context'; +} from '../graphql/generated.js'; +import { toAppPlatform } from '../graphql/types/AppPlatform.js'; +import Log from '../log.js'; +import { ora } from '../ora.js'; +import { appPlatformDisplayNames } from '../platform.js'; +import { SubmissionContext } from './context.js'; export interface SubmissionInput

{ projectId: string; diff --git a/packages/eas-cli/src/submit/__tests__/ArchiveSource-test.ts b/packages/eas-cli/src/submit/__tests__/ArchiveSource-test.ts index fb4863d860..1e6bfb648d 100644 --- a/packages/eas-cli/src/submit/__tests__/ArchiveSource-test.ts +++ b/packages/eas-cli/src/submit/__tests__/ArchiveSource-test.ts @@ -3,18 +3,18 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import { v4 as uuidv4 } from 'uuid'; -import { AppPlatform, BuildFragment, UploadSessionType } from '../../graphql/generated'; -import { BuildQuery } from '../../graphql/queries/BuildQuery'; -import { toAppPlatform } from '../../graphql/types/AppPlatform'; -import { confirmAsync, promptAsync } from '../../prompts'; -import { uploadAsync } from '../../uploads'; +import { AppPlatform, BuildFragment, UploadSessionType } from '../../graphql/generated.js'; +import { BuildQuery } from '../../graphql/queries/BuildQuery.js'; +import { toAppPlatform } from '../../graphql/types/AppPlatform.js'; +import { confirmAsync, promptAsync } from '../../prompts.js'; +import { uploadAsync } from '../../uploads.js'; import { Archive, ArchiveSourceType, BUILD_LIST_ITEM_COUNT, getArchiveAsync, -} from '../ArchiveSource'; -import { getRecentBuildsForSubmissionAsync } from '../utils/builds'; +} from '../ArchiveSource.js'; +import { getRecentBuildsForSubmissionAsync } from '../utils/builds.js'; jest.mock('fs'); jest.mock('../../log'); diff --git a/packages/eas-cli/src/submit/android/AndroidSubmitCommand.ts b/packages/eas-cli/src/submit/android/AndroidSubmitCommand.ts index d7de98c77c..a8be550a52 100644 --- a/packages/eas-cli/src/submit/android/AndroidSubmitCommand.ts +++ b/packages/eas-cli/src/submit/android/AndroidSubmitCommand.ts @@ -6,18 +6,18 @@ import { SubmissionAndroidReleaseStatus, SubmissionAndroidTrack, SubmissionFragment, -} from '../../graphql/generated'; -import Log from '../../log'; +} from '../../graphql/generated.js'; +import Log from '../../log.js'; import { AmbiguousApplicationIdError, getApplicationIdAsync, -} from '../../project/android/applicationId'; -import capitalize from '../../utils/expodash/capitalize'; -import { ArchiveSource } from '../ArchiveSource'; -import { resolveArchiveSource } from '../commons'; -import { SubmissionContext } from '../context'; -import AndroidSubmitter, { AndroidSubmissionOptions } from './AndroidSubmitter'; -import { ServiceAccountSource, ServiceAccountSourceType } from './ServiceAccountSource'; +} from '../../project/android/applicationId.js'; +import capitalize from '../../utils/expodash/capitalize.js'; +import { ArchiveSource } from '../ArchiveSource.js'; +import { resolveArchiveSource } from '../commons.js'; +import { SubmissionContext } from '../context.js'; +import AndroidSubmitter, { AndroidSubmissionOptions } from './AndroidSubmitter.js'; +import { ServiceAccountSource, ServiceAccountSourceType } from './ServiceAccountSource.js'; export default class AndroidSubmitCommand { constructor(private ctx: SubmissionContext) {} diff --git a/packages/eas-cli/src/submit/android/AndroidSubmitter.ts b/packages/eas-cli/src/submit/android/AndroidSubmitter.ts index 9f6a6dde2b..3671e7f034 100644 --- a/packages/eas-cli/src/submit/android/AndroidSubmitter.ts +++ b/packages/eas-cli/src/submit/android/AndroidSubmitter.ts @@ -1,28 +1,28 @@ import { Platform } from '@expo/eas-build-job'; import chalk from 'chalk'; -import { SubmissionEvent } from '../../analytics/events'; +import { SubmissionEvent } from '../../analytics/events.js'; import { AndroidSubmissionConfigInput, SubmissionAndroidReleaseStatus, SubmissionAndroidTrack, SubmissionFragment, -} from '../../graphql/generated'; -import { SubmissionMutation } from '../../graphql/mutations/SubmissionMutation'; -import formatFields from '../../utils/formatFields'; -import { Archive, ArchiveSource, getArchiveAsync } from '../ArchiveSource'; -import BaseSubmitter, { SubmissionInput } from '../BaseSubmitter'; -import { SubmissionContext } from '../context'; +} from '../../graphql/generated.js'; +import { SubmissionMutation } from '../../graphql/mutations/SubmissionMutation.js'; +import formatFields from '../../utils/formatFields.js'; +import { Archive, ArchiveSource, getArchiveAsync } from '../ArchiveSource.js'; +import BaseSubmitter, { SubmissionInput } from '../BaseSubmitter.js'; +import { SubmissionContext } from '../context.js'; import { ArchiveSourceSummaryFields, formatArchiveSourceSummary, printSummary, -} from '../utils/summary'; +} from '../utils/summary.js'; import { ServiceAccountKeyResult, ServiceAccountSource, getServiceAccountKeyResultAsync, -} from './ServiceAccountSource'; +} from './ServiceAccountSource.js'; export interface AndroidSubmissionOptions extends Pick< diff --git a/packages/eas-cli/src/submit/android/ServiceAccountSource.ts b/packages/eas-cli/src/submit/android/ServiceAccountSource.ts index bbc3e1b3e4..56c528e076 100644 --- a/packages/eas-cli/src/submit/android/ServiceAccountSource.ts +++ b/packages/eas-cli/src/submit/android/ServiceAccountSource.ts @@ -1,19 +1,19 @@ import { Platform } from '@expo/eas-build-job'; import chalk from 'chalk'; import fs from 'fs-extra'; -import nullthrows from 'nullthrows'; -import { SetUpGoogleServiceAccountKey } from '../../credentials/android/actions/SetUpGoogleServiceAccountKey'; -import { readAndValidateServiceAccountKey } from '../../credentials/android/utils/googleServiceAccountKey'; -import Log, { learnMore } from '../../log'; +import { SetUpGoogleServiceAccountKey } from '../../credentials/android/actions/SetUpGoogleServiceAccountKey.js'; +import { readAndValidateServiceAccountKey } from '../../credentials/android/utils/googleServiceAccountKey.js'; +import Log, { learnMore } from '../../log.js'; import { INVALID_APPLICATION_ID_MESSAGE, isApplicationIdValid, -} from '../../project/android/applicationId'; -import { promptAsync } from '../../prompts'; -import { findAccountByName } from '../../user/Account'; -import { SubmissionContext } from '../context'; -import { isExistingFileAsync } from '../utils/files'; +} from '../../project/android/applicationId.js'; +import { promptAsync } from '../../prompts.js'; +import { findAccountByName } from '../../user/Account.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { SubmissionContext } from '../context.js'; +import { isExistingFileAsync } from '../utils/files.js'; export enum ServiceAccountSourceType { path, diff --git a/packages/eas-cli/src/submit/android/__tests__/AndroidSubmitCommand-test.ts b/packages/eas-cli/src/submit/android/__tests__/AndroidSubmitCommand-test.ts index 9046d714bd..8c891879e1 100644 --- a/packages/eas-cli/src/submit/android/__tests__/AndroidSubmitCommand-test.ts +++ b/packages/eas-cli/src/submit/android/__tests__/AndroidSubmitCommand-test.ts @@ -3,19 +3,19 @@ import { AndroidReleaseStatus, AndroidReleaseTrack } from '@expo/eas-json'; import { vol } from 'memfs'; import { v4 as uuidv4 } from 'uuid'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; import { AppPlatform, BuildFragment, SubmissionAndroidReleaseStatus, SubmissionAndroidTrack, -} from '../../../graphql/generated'; -import { SubmissionMutation } from '../../../graphql/mutations/SubmissionMutation'; -import { createTestProject } from '../../../project/__tests__/project-utils'; -import { getProjectIdAsync } from '../../../project/projectUtils'; -import { createSubmissionContextAsync } from '../../context'; -import { getRecentBuildsForSubmissionAsync } from '../../utils/builds'; -import AndroidSubmitCommand from '../AndroidSubmitCommand'; +} from '../../../graphql/generated.js'; +import { SubmissionMutation } from '../../../graphql/mutations/SubmissionMutation.js'; +import { createTestProject } from '../../../project/__tests__/project-utils.js'; +import { getProjectIdAsync } from '../../../project/projectUtils.js'; +import { createSubmissionContextAsync } from '../../context.js'; +import { getRecentBuildsForSubmissionAsync } from '../../utils/builds.js'; +import AndroidSubmitCommand from '../AndroidSubmitCommand.js'; jest.mock('fs'); jest.mock('../../../ora'); diff --git a/packages/eas-cli/src/submit/android/__tests__/ServiceAccountSource-test.ts b/packages/eas-cli/src/submit/android/__tests__/ServiceAccountSource-test.ts index cc864f1518..6e190247c0 100644 --- a/packages/eas-cli/src/submit/android/__tests__/ServiceAccountSource-test.ts +++ b/packages/eas-cli/src/submit/android/__tests__/ServiceAccountSource-test.ts @@ -3,18 +3,18 @@ import { AndroidReleaseStatus, AndroidReleaseTrack } from '@expo/eas-json'; import { vol } from 'memfs'; import { v4 as uuidv4 } from 'uuid'; -import { testAndroidAppCredentialsFragment } from '../../../credentials/__tests__/fixtures-android'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { SetUpGoogleServiceAccountKey } from '../../../credentials/android/actions/SetUpGoogleServiceAccountKey'; -import { createTestProject } from '../../../project/__tests__/project-utils'; -import { promptAsync } from '../../../prompts'; -import { createSubmissionContextAsync } from '../../context'; +import { testAndroidAppCredentialsFragment } from '../../../credentials/__tests__/fixtures-android.js'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { SetUpGoogleServiceAccountKey } from '../../../credentials/android/actions/SetUpGoogleServiceAccountKey.js'; +import { createTestProject } from '../../../project/__tests__/project-utils.js'; +import { promptAsync } from '../../../prompts.js'; +import { createSubmissionContextAsync } from '../../context.js'; import { ServiceAccountSource, ServiceAccountSourceType, getServiceAccountKeyPathAsync, getServiceAccountKeyResultAsync, -} from '../ServiceAccountSource'; +} from '../ServiceAccountSource.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/submit/commons.ts b/packages/eas-cli/src/submit/commons.ts index 246b6c0643..df4639e30c 100644 --- a/packages/eas-cli/src/submit/commons.ts +++ b/packages/eas-cli/src/submit/commons.ts @@ -1,7 +1,7 @@ import { Platform } from '@expo/eas-build-job'; -import { ArchiveSource, ArchiveSourceType, isUuidV4 } from './ArchiveSource'; -import { SubmissionContext } from './context'; +import { ArchiveSource, ArchiveSourceType, isUuidV4 } from './ArchiveSource.js'; +import { SubmissionContext } from './context.js'; export function resolveArchiveSource( ctx: SubmissionContext, diff --git a/packages/eas-cli/src/submit/context.ts b/packages/eas-cli/src/submit/context.ts index 101843fbff..c715049d53 100644 --- a/packages/eas-cli/src/submit/context.ts +++ b/packages/eas-cli/src/submit/context.ts @@ -3,14 +3,14 @@ import { Platform } from '@expo/eas-build-job'; import { SubmitProfile } from '@expo/eas-json'; import { v4 as uuidv4 } from 'uuid'; -import { TrackingContext } from '../analytics/common'; -import { Analytics, SubmissionEvent } from '../analytics/events'; -import { CredentialsContext } from '../credentials/context'; -import { getExpoConfig } from '../project/expoConfig'; -import { getProjectAccountName } from '../project/projectUtils'; -import { findAccountByName } from '../user/Account'; -import { Actor } from '../user/User'; -import { ensureLoggedInAsync } from '../user/actions'; +import { TrackingContext } from '../analytics/common.js'; +import { Analytics, SubmissionEvent } from '../analytics/events.js'; +import { CredentialsContext } from '../credentials/context.js'; +import { getExpoConfig } from '../project/expoConfig.js'; +import { getProjectAccountName } from '../project/projectUtils.js'; +import { findAccountByName } from '../user/Account.js'; +import { Actor } from '../user/User.js'; +import { ensureLoggedInAsync } from '../user/actions.js'; export interface SubmissionContext { accountName: string; diff --git a/packages/eas-cli/src/submit/ios/AppProduce.ts b/packages/eas-cli/src/submit/ios/AppProduce.ts index bb9d315bb7..d71dcf7d69 100644 --- a/packages/eas-cli/src/submit/ios/AppProduce.ts +++ b/packages/eas-cli/src/submit/ios/AppProduce.ts @@ -1,17 +1,19 @@ -import { App, RequestContext, Session, User } from '@expo/apple-utils'; +import AppleUtils from '@expo/apple-utils'; import { Platform } from '@expo/eas-build-job'; import chalk from 'chalk'; -import { getRequestContext } from '../../credentials/ios/appstore/authenticate'; +import { getRequestContext } from '../../credentials/ios/appstore/authenticate.js'; import { ensureAppExistsAsync, ensureBundleIdExistsWithNameAsync, -} from '../../credentials/ios/appstore/ensureAppExists'; -import Log from '../../log'; -import { getBundleIdentifierAsync } from '../../project/ios/bundleIdentifier'; -import { promptAsync } from '../../prompts'; -import { SubmissionContext } from '../context'; -import { sanitizeLanguage } from './utils/language'; +} from '../../credentials/ios/appstore/ensureAppExists.js'; +import Log from '../../log.js'; +import { getBundleIdentifierAsync } from '../../project/ios/bundleIdentifier.js'; +import { promptAsync } from '../../prompts.js'; +import { SubmissionContext } from '../context.js'; +import { sanitizeLanguage } from './utils/language.js'; + +const { Session, User } = AppleUtils; interface CreateAppOptions { appleId?: string; @@ -44,7 +46,9 @@ export async function ensureAppStoreConnectAppExistsAsync( return await createAppStoreConnectAppAsync(ctx, options); } -async function isProvisioningAvailableAsync(requestCtx: RequestContext): Promise { +async function isProvisioningAvailableAsync( + requestCtx: AppleUtils.RequestContext +): Promise { const session = Session.getAnySessionInfo(); // TODO: Investigate if username and email can be different const username = session?.user.emailAddress; @@ -85,7 +89,7 @@ async function createAppStoreConnectAppAsync( ); } - let app: App | null = null; + let app: AppleUtils.App | null = null; try { app = await ensureAppExistsAsync(userAuthCtx, { diff --git a/packages/eas-cli/src/submit/ios/AppSpecificPasswordSource.ts b/packages/eas-cli/src/submit/ios/AppSpecificPasswordSource.ts index a468b83297..d0d117264f 100644 --- a/packages/eas-cli/src/submit/ios/AppSpecificPasswordSource.ts +++ b/packages/eas-cli/src/submit/ios/AppSpecificPasswordSource.ts @@ -1,10 +1,10 @@ import { Platform } from '@expo/eas-build-job'; import getenv from 'getenv'; -import { isUserAuthCtx } from '../../credentials/ios/appstore/authenticate'; -import { promptAsync } from '../../prompts'; -import UserSettings from '../../user/UserSettings'; -import { SubmissionContext } from '../context'; +import { isUserAuthCtx } from '../../credentials/ios/appstore/authenticate.js'; +import { promptAsync } from '../../prompts.js'; +import UserSettings from '../../user/UserSettings.js'; +import { SubmissionContext } from '../context.js'; export enum AppSpecificPasswordSourceType { userDefined, } diff --git a/packages/eas-cli/src/submit/ios/AscApiKeySource.ts b/packages/eas-cli/src/submit/ios/AscApiKeySource.ts index cde7450495..303244869d 100644 --- a/packages/eas-cli/src/submit/ios/AscApiKeySource.ts +++ b/packages/eas-cli/src/submit/ios/AscApiKeySource.ts @@ -1,11 +1,11 @@ import { Platform } from '@expo/eas-build-job'; import fs from 'fs-extra'; -import { promptForAscApiKeyPathAsync } from '../../credentials/ios/actions/AscApiKeyUtils'; -import { AscApiKeyPath, MinimalAscApiKey } from '../../credentials/ios/credentials'; -import Log from '../../log'; -import { SubmissionContext } from '../context'; -import { isExistingFileAsync } from '../utils/files'; +import { promptForAscApiKeyPathAsync } from '../../credentials/ios/actions/AscApiKeyUtils.js'; +import { AscApiKeyPath, MinimalAscApiKey } from '../../credentials/ios/credentials.js'; +import Log from '../../log.js'; +import { SubmissionContext } from '../context.js'; +import { isExistingFileAsync } from '../utils/files.js'; export enum AscApiKeySourceType { path, diff --git a/packages/eas-cli/src/submit/ios/CredentialsServiceSource.ts b/packages/eas-cli/src/submit/ios/CredentialsServiceSource.ts index a4dd051e9d..64e98b15e7 100644 --- a/packages/eas-cli/src/submit/ios/CredentialsServiceSource.ts +++ b/packages/eas-cli/src/submit/ios/CredentialsServiceSource.ts @@ -1,20 +1,20 @@ import { Platform } from '@expo/eas-build-job'; -import nullthrows from 'nullthrows'; -import { SetUpSubmissionCredentials } from '../../credentials/ios/actions/SetUpSubmissionCredentials'; -import Log from '../../log'; +import { SetUpSubmissionCredentials } from '../../credentials/ios/actions/SetUpSubmissionCredentials.js'; +import Log from '../../log.js'; import { INVALID_BUNDLE_IDENTIFIER_MESSAGE, isBundleIdentifierValid, -} from '../../project/ios/bundleIdentifier'; -import { promptAsync } from '../../prompts'; -import { findAccountByName } from '../../user/Account'; -import { SubmissionContext } from '../context'; +} from '../../project/ios/bundleIdentifier.js'; +import { promptAsync } from '../../prompts.js'; +import { findAccountByName } from '../../user/Account.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { SubmissionContext } from '../context.js'; import { AppSpecificPasswordCredentials, getAppleIdUsernameAsync, -} from './AppSpecificPasswordSource'; -import { AscApiKeyResult } from './AscApiKeySource'; +} from './AppSpecificPasswordSource.js'; +import { AscApiKeyResult } from './AscApiKeySource.js'; /** * The Credentials Service will either return an ASC API Key or an App Specific Password diff --git a/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts b/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts index 278a5b2aab..0adfefd539 100644 --- a/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts +++ b/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts @@ -4,24 +4,27 @@ import chalk from 'chalk'; import getenv from 'getenv'; import wrapAnsi from 'wrap-ansi'; -import { MissingCredentialsError } from '../../credentials/errors'; -import { SubmissionFragment } from '../../graphql/generated'; -import Log, { learnMore } from '../../log'; +import { MissingCredentialsError } from '../../credentials/errors.js'; +import { SubmissionFragment } from '../../graphql/generated.js'; +import Log, { learnMore } from '../../log.js'; import { AmbiguousBundleIdentifierError, getBundleIdentifierAsync, -} from '../../project/ios/bundleIdentifier'; -import { ArchiveSource } from '../ArchiveSource'; -import { resolveArchiveSource } from '../commons'; -import { SubmissionContext } from '../context'; -import { ensureAppStoreConnectAppExistsAsync } from './AppProduce'; +} from '../../project/ios/bundleIdentifier.js'; +import { ArchiveSource } from '../ArchiveSource.js'; +import { resolveArchiveSource } from '../commons.js'; +import { SubmissionContext } from '../context.js'; +import { ensureAppStoreConnectAppExistsAsync } from './AppProduce.js'; import { AppSpecificPasswordSource, AppSpecificPasswordSourceType, -} from './AppSpecificPasswordSource'; -import { AscApiKeySource, AscApiKeySourceType } from './AscApiKeySource'; -import { CREDENTIALS_SERVICE_SOURCE, CredentialsServiceSource } from './CredentialsServiceSource'; -import IosSubmitter, { IosSubmissionOptions } from './IosSubmitter'; +} from './AppSpecificPasswordSource.js'; +import { AscApiKeySource, AscApiKeySourceType } from './AscApiKeySource.js'; +import { + CREDENTIALS_SERVICE_SOURCE, + CredentialsServiceSource, +} from './CredentialsServiceSource.js'; +import IosSubmitter, { IosSubmissionOptions } from './IosSubmitter.js'; export default class IosSubmitCommand { constructor(private ctx: SubmissionContext) {} diff --git a/packages/eas-cli/src/submit/ios/IosSubmitter.ts b/packages/eas-cli/src/submit/ios/IosSubmitter.ts index 3a3db5714f..b98e6c0e74 100644 --- a/packages/eas-cli/src/submit/ios/IosSubmitter.ts +++ b/packages/eas-cli/src/submit/ios/IosSubmitter.ts @@ -1,34 +1,34 @@ import { Platform } from '@expo/eas-build-job'; import chalk from 'chalk'; -import { SubmissionEvent } from '../../analytics/events'; -import { MinimalAscApiKey } from '../../credentials/ios/credentials'; -import { IosSubmissionConfigInput, SubmissionFragment } from '../../graphql/generated'; -import { SubmissionMutation } from '../../graphql/mutations/SubmissionMutation'; -import formatFields from '../../utils/formatFields'; -import { Archive, ArchiveSource, getArchiveAsync } from '../ArchiveSource'; -import BaseSubmitter, { SubmissionInput } from '../BaseSubmitter'; -import { SubmissionContext } from '../context'; +import { SubmissionEvent } from '../../analytics/events.js'; +import { MinimalAscApiKey } from '../../credentials/ios/credentials.js'; +import { IosSubmissionConfigInput, SubmissionFragment } from '../../graphql/generated.js'; +import { SubmissionMutation } from '../../graphql/mutations/SubmissionMutation.js'; +import formatFields from '../../utils/formatFields.js'; +import { Archive, ArchiveSource, getArchiveAsync } from '../ArchiveSource.js'; +import BaseSubmitter, { SubmissionInput } from '../BaseSubmitter.js'; +import { SubmissionContext } from '../context.js'; import { ArchiveSourceSummaryFields, formatArchiveSourceSummary, printSummary, -} from '../utils/summary'; +} from '../utils/summary.js'; import { AppSpecificPasswordCredentials, AppSpecificPasswordSource, getAppSpecificPasswordLocallyAsync, -} from './AppSpecificPasswordSource'; +} from './AppSpecificPasswordSource.js'; import { AscApiKeyFromExpoServers, AscApiKeyResult, AscApiKeySource, getAscApiKeyLocallyAsync, -} from './AscApiKeySource'; +} from './AscApiKeySource.js'; import { CredentialsServiceSource, getFromCredentialsServiceAsync, -} from './CredentialsServiceSource'; +} from './CredentialsServiceSource.js'; export interface IosSubmissionOptions extends Pick { diff --git a/packages/eas-cli/src/submit/ios/__tests__/AscApiKeySource-test.ts b/packages/eas-cli/src/submit/ios/__tests__/AscApiKeySource-test.ts index 59a4c2eabd..71af2ba3a7 100644 --- a/packages/eas-cli/src/submit/ios/__tests__/AscApiKeySource-test.ts +++ b/packages/eas-cli/src/submit/ios/__tests__/AscApiKeySource-test.ts @@ -2,17 +2,17 @@ import { Platform } from '@expo/eas-build-job'; import { vol } from 'memfs'; import { v4 as uuidv4 } from 'uuid'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { getCredentialsFromUserAsync } from '../../../credentials/utils/promptForCredentials'; -import { createTestProject } from '../../../project/__tests__/project-utils'; -import { promptAsync } from '../../../prompts'; -import { SubmissionContext, createSubmissionContextAsync } from '../../context'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { getCredentialsFromUserAsync } from '../../../credentials/utils/promptForCredentials.js'; +import { createTestProject } from '../../../project/__tests__/project-utils.js'; +import { promptAsync } from '../../../prompts.js'; +import { SubmissionContext, createSubmissionContextAsync } from '../../context.js'; import { AscApiKeySource, AscApiKeySourceType, getAscApiKeyLocallyAsync, getAscApiKeyPathAsync, -} from '../AscApiKeySource'; +} from '../AscApiKeySource.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/submit/ios/__tests__/CredentialsServiceSource-test.ts b/packages/eas-cli/src/submit/ios/__tests__/CredentialsServiceSource-test.ts index fa447783d0..cb0a214549 100644 --- a/packages/eas-cli/src/submit/ios/__tests__/CredentialsServiceSource-test.ts +++ b/packages/eas-cli/src/submit/ios/__tests__/CredentialsServiceSource-test.ts @@ -1,17 +1,17 @@ import { Platform } from '@expo/eas-build-job'; import { v4 as uuidv4 } from 'uuid'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { testCommonIosAppCredentialsFragment } from '../../../credentials/__tests__/fixtures-ios'; -import { SetUpSubmissionCredentials } from '../../../credentials/ios/actions/SetUpSubmissionCredentials'; -import { createTestProject } from '../../../project/__tests__/project-utils'; -import { getBundleIdentifierAsync } from '../../../project/ios/bundleIdentifier'; -import { promptAsync } from '../../../prompts'; -import { createSubmissionContextAsync } from '../../context'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { testCommonIosAppCredentialsFragment } from '../../../credentials/__tests__/fixtures-ios.js'; +import { SetUpSubmissionCredentials } from '../../../credentials/ios/actions/SetUpSubmissionCredentials.js'; +import { createTestProject } from '../../../project/__tests__/project-utils.js'; +import { getBundleIdentifierAsync } from '../../../project/ios/bundleIdentifier.js'; +import { promptAsync } from '../../../prompts.js'; +import { createSubmissionContextAsync } from '../../context.js'; import { CREDENTIALS_SERVICE_SOURCE, getFromCredentialsServiceAsync, -} from '../CredentialsServiceSource'; +} from '../CredentialsServiceSource.js'; jest.mock('fs'); jest.mock('../../../prompts'); diff --git a/packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts b/packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts index c98862a2ef..af7e95297f 100644 --- a/packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts +++ b/packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts @@ -2,12 +2,12 @@ import { Platform } from '@expo/eas-build-job'; import { vol } from 'memfs'; import { v4 as uuidv4 } from 'uuid'; -import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants'; -import { SubmissionMutation } from '../../../graphql/mutations/SubmissionMutation'; -import { createTestProject } from '../../../project/__tests__/project-utils'; -import { getProjectIdAsync } from '../../../project/projectUtils'; -import { createSubmissionContextAsync } from '../../context'; -import IosSubmitCommand from '../IosSubmitCommand'; +import { jester as mockJester } from '../../../credentials/__tests__/fixtures-constants.js'; +import { SubmissionMutation } from '../../../graphql/mutations/SubmissionMutation.js'; +import { createTestProject } from '../../../project/__tests__/project-utils.js'; +import { getProjectIdAsync } from '../../../project/projectUtils.js'; +import { createSubmissionContextAsync } from '../../context.js'; +import IosSubmitCommand from '../IosSubmitCommand.js'; jest.mock('fs'); jest.mock('../../../ora'); diff --git a/packages/eas-cli/src/submit/ios/utils/__tests__/language-test.ts b/packages/eas-cli/src/submit/ios/utils/__tests__/language-test.ts index 50adf6d618..9515f6f535 100644 --- a/packages/eas-cli/src/submit/ios/utils/__tests__/language-test.ts +++ b/packages/eas-cli/src/submit/ios/utils/__tests__/language-test.ts @@ -1,4 +1,4 @@ -import { sanitizeLanguage } from '../language'; +import { sanitizeLanguage } from '../language.js'; describe(sanitizeLanguage, () => { it('throws when language not found', () => { diff --git a/packages/eas-cli/src/submit/ios/utils/language.ts b/packages/eas-cli/src/submit/ios/utils/language.ts index cf84d3d6cc..3a53e499af 100644 --- a/packages/eas-cli/src/submit/ios/utils/language.ts +++ b/packages/eas-cli/src/submit/ios/utils/language.ts @@ -1,4 +1,4 @@ -import Log from '../../../log'; +import Log from '../../../log.js'; type Language = { locale: string; diff --git a/packages/eas-cli/src/submit/submit.ts b/packages/eas-cli/src/submit/submit.ts index 6a6d424ad8..cae9242f34 100644 --- a/packages/eas-cli/src/submit/submit.ts +++ b/packages/eas-cli/src/submit/submit.ts @@ -1,16 +1,16 @@ import { Platform } from '@expo/eas-build-job'; import chalk from 'chalk'; -import { withAnalyticsAsync } from '../analytics/common'; -import { SubmissionEvent } from '../analytics/events'; -import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../graphql/generated'; -import Log, { link } from '../log'; -import { appPlatformDisplayNames, appPlatformEmojis } from '../platform'; -import AndroidSubmitCommand from './android/AndroidSubmitCommand'; -import { SubmissionContext } from './context'; -import IosSubmitCommand from './ios/IosSubmitCommand'; -import { displayLogsAsync } from './utils/logs'; -import { waitForSubmissionsEndAsync } from './utils/wait'; +import { withAnalyticsAsync } from '../analytics/common.js'; +import { SubmissionEvent } from '../analytics/events.js'; +import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../graphql/generated.js'; +import Log, { link } from '../log.js'; +import { appPlatformDisplayNames, appPlatformEmojis } from '../platform.js'; +import AndroidSubmitCommand from './android/AndroidSubmitCommand.js'; +import { SubmissionContext } from './context.js'; +import IosSubmitCommand from './ios/IosSubmitCommand.js'; +import { displayLogsAsync } from './utils/logs.js'; +import { waitForSubmissionsEndAsync } from './utils/wait.js'; export async function submitAsync( ctx: SubmissionContext diff --git a/packages/eas-cli/src/submit/utils/builds.ts b/packages/eas-cli/src/submit/utils/builds.ts index 34088be956..26f7e17c30 100644 --- a/packages/eas-cli/src/submit/utils/builds.ts +++ b/packages/eas-cli/src/submit/utils/builds.ts @@ -1,5 +1,10 @@ -import { AppPlatform, BuildFragment, BuildStatus, DistributionType } from '../../graphql/generated'; -import { BuildQuery } from '../../graphql/queries/BuildQuery'; +import { + AppPlatform, + BuildFragment, + BuildStatus, + DistributionType, +} from '../../graphql/generated.js'; +import { BuildQuery } from '../../graphql/queries/BuildQuery.js'; export async function getRecentBuildsForSubmissionAsync( platform: AppPlatform, diff --git a/packages/eas-cli/src/submit/utils/errors.ts b/packages/eas-cli/src/submit/utils/errors.ts index ad7213beb9..942c71a7d3 100644 --- a/packages/eas-cli/src/submit/utils/errors.ts +++ b/packages/eas-cli/src/submit/utils/errors.ts @@ -1,5 +1,5 @@ -import { SubmissionError } from '../../graphql/generated'; -import Log, { learnMore } from '../../log'; +import { SubmissionError } from '../../graphql/generated.js'; +import Log, { learnMore } from '../../log.js'; enum SubmissionErrorCode { ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR', diff --git a/packages/eas-cli/src/submit/utils/files.ts b/packages/eas-cli/src/submit/utils/files.ts index 5a10f8afa1..09d0126366 100644 --- a/packages/eas-cli/src/submit/utils/files.ts +++ b/packages/eas-cli/src/submit/utils/files.ts @@ -1,8 +1,8 @@ import fs from 'fs-extra'; -import { UploadSessionType } from '../../graphql/generated'; -import { uploadAsync } from '../../uploads'; -import { createProgressTracker } from '../../utils/progress'; +import { UploadSessionType } from '../../graphql/generated.js'; +import { uploadAsync } from '../../uploads.js'; +import { createProgressTracker } from '../../utils/progress.js'; export async function isExistingFileAsync(filePath: string): Promise { try { diff --git a/packages/eas-cli/src/submit/utils/logs.ts b/packages/eas-cli/src/submit/utils/logs.ts index 104d67381a..42d1cc8572 100644 --- a/packages/eas-cli/src/submit/utils/logs.ts +++ b/packages/eas-cli/src/submit/utils/logs.ts @@ -1,9 +1,9 @@ import chalk from 'chalk'; -import fetch from '../../fetch'; -import { SubmissionFragment, SubmissionStatus } from '../../graphql/generated'; -import Log from '../../log'; -import { printSubmissionError } from './errors'; +import fetch from '../../fetch.js'; +import { SubmissionFragment, SubmissionStatus } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { printSubmissionError } from './errors.js'; export async function displayLogsAsync( submission: SubmissionFragment, diff --git a/packages/eas-cli/src/submit/utils/summary.ts b/packages/eas-cli/src/submit/utils/summary.ts index d70ef9d536..d37d17d65f 100644 --- a/packages/eas-cli/src/submit/utils/summary.ts +++ b/packages/eas-cli/src/submit/utils/summary.ts @@ -1,9 +1,9 @@ import chalk from 'chalk'; -import { AppPlatform, BuildFragment } from '../../graphql/generated'; -import Log from '../../log'; -import formatFields from '../../utils/formatFields'; -import { Archive, ArchiveSourceType } from '../ArchiveSource'; +import { AppPlatform, BuildFragment } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import formatFields from '../../utils/formatFields.js'; +import { Archive, ArchiveSourceType } from '../ArchiveSource.js'; export interface ArchiveSourceSummaryFields { archiveUrl?: string; archivePath?: string; diff --git a/packages/eas-cli/src/submit/utils/urls.ts b/packages/eas-cli/src/submit/utils/urls.ts index 8e4fededb4..4d48ecfb91 100644 --- a/packages/eas-cli/src/submit/utils/urls.ts +++ b/packages/eas-cli/src/submit/utils/urls.ts @@ -1,10 +1,10 @@ import chalk from 'chalk'; import { URL } from 'url'; -import { getExpoWebsiteBaseUrl } from '../../api'; -import { SubmissionFragment } from '../../graphql/generated'; -import Log from '../../log'; -import { appPlatformDisplayNames } from '../../platform'; +import { getExpoWebsiteBaseUrl } from '../../api.js'; +import { SubmissionFragment } from '../../graphql/generated.js'; +import Log from '../../log.js'; +import { appPlatformDisplayNames } from '../../platform.js'; export function printSubmissionDetailsUrls(submissions: SubmissionFragment[]): void { if (submissions.length === 1) { diff --git a/packages/eas-cli/src/submit/utils/wait.ts b/packages/eas-cli/src/submit/utils/wait.ts index 292730b868..3643470b0a 100644 --- a/packages/eas-cli/src/submit/utils/wait.ts +++ b/packages/eas-cli/src/submit/utils/wait.ts @@ -1,10 +1,9 @@ -import nullthrows from 'nullthrows'; - -import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../../graphql/generated'; -import { SubmissionQuery } from '../../graphql/queries/SubmissionQuery'; -import Log from '../../log'; -import { ora } from '../../ora'; -import { sleepAsync } from '../../utils/promise'; +import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../../graphql/generated.js'; +import { SubmissionQuery } from '../../graphql/queries/SubmissionQuery.js'; +import Log from '../../log.js'; +import { ora } from '../../ora.js'; +import { nullthrows } from '../../utils/nullthrows.js'; +import { sleepAsync } from '../../utils/promise.js'; const APP_STORE_NAMES: Record = { [AppPlatform.Android]: 'Google Play Store', diff --git a/packages/eas-cli/src/update/__tests__/update-test.ts b/packages/eas-cli/src/update/__tests__/update-test.ts index 0cce4a2ebd..0953bb6804 100644 --- a/packages/eas-cli/src/update/__tests__/update-test.ts +++ b/packages/eas-cli/src/update/__tests__/update-test.ts @@ -5,12 +5,12 @@ import { ensureBranchExistsAsync, getUpdatesToRepublishInteractiveAsync, truncatePublishUpdateMessage, -} from '../../commands/update'; -import { graphqlClient } from '../../graphql/client'; -import { ViewBranchUpdatesQuery } from '../../graphql/generated'; -import { viewBranchUpdatesQueryUpdateLimit } from '../../graphql/queries/UpdateQuery'; -import Log from '../../log'; -import { selectAsync } from '../../prompts'; +} from '../../commands/update/index.js'; +import { graphqlClient } from '../../graphql/client.js'; +import { ViewBranchUpdatesQuery } from '../../graphql/generated.js'; +import { viewBranchUpdatesQueryUpdateLimit } from '../../graphql/queries/UpdateQuery.js'; +import Log from '../../log.js'; +import { selectAsync } from '../../prompts.js'; const appId = '6c94sxe6-37d2-4700-52fa-1b813204dad2'; const branchId = '5e84e3cb-563e-4022-a65e-6e7a42fe4ed3'; diff --git a/packages/eas-cli/src/update/android/UpdatesModule.ts b/packages/eas-cli/src/update/android/UpdatesModule.ts index 594d22c785..6a8d880cad 100644 --- a/packages/eas-cli/src/update/android/UpdatesModule.ts +++ b/packages/eas-cli/src/update/android/UpdatesModule.ts @@ -1,10 +1,12 @@ import { ExpoConfig } from '@expo/config'; -import { AndroidConfig, AndroidManifest } from '@expo/config-plugins'; +import ConfigPlugins, { AndroidManifest } from '@expo/config-plugins'; -import { RequestedPlatform } from '../../platform'; -import { getProjectAccountName } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { ensureValidVersions } from '../utils'; +import { RequestedPlatform } from '../../platform.js'; +import { getProjectAccountName } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { ensureValidVersions } from '../utils.js'; + +const { AndroidConfig } = ConfigPlugins; export async function syncUpdatesConfigurationAsync( projectDir: string, diff --git a/packages/eas-cli/src/update/android/__tests__/UpdatesModule-test.ts b/packages/eas-cli/src/update/android/__tests__/UpdatesModule-test.ts index 801b6825fd..2929489210 100644 --- a/packages/eas-cli/src/update/android/__tests__/UpdatesModule-test.ts +++ b/packages/eas-cli/src/update/android/__tests__/UpdatesModule-test.ts @@ -2,7 +2,7 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { readChannelSafelyAsync } from '../UpdatesModule'; +import { readChannelSafelyAsync } from '../UpdatesModule.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/update/ios/UpdatesModule.ts b/packages/eas-cli/src/update/ios/UpdatesModule.ts index dc63a1bd13..5dd2ee5b47 100644 --- a/packages/eas-cli/src/update/ios/UpdatesModule.ts +++ b/packages/eas-cli/src/update/ios/UpdatesModule.ts @@ -1,12 +1,14 @@ import { ExpoConfig } from '@expo/config'; -import { IOSConfig } from '@expo/config-plugins'; +import ConfigPlugins, { ExpoPlist } from '@expo/config-plugins'; -import { RequestedPlatform } from '../../platform'; -import { getProjectAccountName } from '../../project/projectUtils'; -import { ensureLoggedInAsync } from '../../user/actions'; -import { readPlistAsync, writePlistAsync } from '../../utils/plist'; -import { getVcsClient } from '../../vcs'; -import { ensureValidVersions } from '../utils'; +import { RequestedPlatform } from '../../platform.js'; +import { getProjectAccountName } from '../../project/projectUtils.js'; +import { ensureLoggedInAsync } from '../../user/actions.js'; +import { readPlistAsync, writePlistAsync } from '../../utils/plist.js'; +import { getVcsClient } from '../../vcs/index.js'; +import { ensureValidVersions } from '../utils.js'; + +const { IOSConfig } = ConfigPlugins; export async function syncUpdatesConfigurationAsync( projectDir: string, @@ -24,15 +26,12 @@ export async function syncUpdatesConfigurationAsync( await writeExpoPlistAsync(projectDir, updatedExpoPlist); } -async function readExpoPlistAsync(projectDir: string): Promise { +async function readExpoPlistAsync(projectDir: string): Promise { const expoPlistPath = IOSConfig.Paths.getExpoPlistPath(projectDir); - return ((await readPlistAsync(expoPlistPath)) ?? {}) as IOSConfig.ExpoPlist; + return ((await readPlistAsync(expoPlistPath)) ?? {}) as ExpoPlist; } -async function writeExpoPlistAsync( - projectDir: string, - expoPlist: IOSConfig.ExpoPlist -): Promise { +async function writeExpoPlistAsync(projectDir: string, expoPlist: ExpoPlist): Promise { const expoPlistPath = IOSConfig.Paths.getExpoPlistPath(projectDir); await writePlistAsync(expoPlistPath, expoPlist); await getVcsClient().trackFileAsync(expoPlistPath); diff --git a/packages/eas-cli/src/update/ios/__tests__/UpdatesModule-test.ts b/packages/eas-cli/src/update/ios/__tests__/UpdatesModule-test.ts index e81f27ea35..1e518f42c9 100644 --- a/packages/eas-cli/src/update/ios/__tests__/UpdatesModule-test.ts +++ b/packages/eas-cli/src/update/ios/__tests__/UpdatesModule-test.ts @@ -2,7 +2,7 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import os from 'os'; -import { readChannelSafelyAsync } from '../UpdatesModule'; +import { readChannelSafelyAsync } from '../UpdatesModule.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/update/utils.ts b/packages/eas-cli/src/update/utils.ts index debc5c812b..8b048299a2 100644 --- a/packages/eas-cli/src/update/utils.ts +++ b/packages/eas-cli/src/update/utils.ts @@ -2,11 +2,11 @@ import { ExpoConfig } from '@expo/config'; import { format } from '@expo/timeago.js'; import chalk from 'chalk'; -import { Maybe, Robot, Update, User } from '../graphql/generated'; -import { learnMore } from '../log'; -import { RequestedPlatform } from '../platform'; -import { getActorDisplayName } from '../user/User'; -import groupBy from '../utils/expodash/groupBy'; +import { Maybe, Robot, Update, User } from '../graphql/generated.js'; +import { learnMore } from '../log.js'; +import { RequestedPlatform } from '../platform.js'; +import { getActorDisplayName } from '../user/User.js'; +import groupBy from '../utils/expodash/groupBy.js'; export type FormatUpdateParameter = Pick & { actor?: Maybe | Pick>; diff --git a/packages/eas-cli/src/uploads.ts b/packages/eas-cli/src/uploads.ts index 56ae119638..969f74c490 100644 --- a/packages/eas-cli/src/uploads.ts +++ b/packages/eas-cli/src/uploads.ts @@ -3,10 +3,10 @@ import FormData from 'form-data'; import fs from 'fs-extra'; import { URL } from 'url'; -import fetch from './fetch'; -import { UploadSessionType } from './graphql/generated'; -import { PresignedPost, UploadSessionMutation } from './graphql/mutations/UploadSessionMutation'; -import { ProgressHandler } from './utils/progress'; +import fetch from './fetch.js'; +import { UploadSessionType } from './graphql/generated.js'; +import { PresignedPost, UploadSessionMutation } from './graphql/mutations/UploadSessionMutation.js'; +import { ProgressHandler } from './utils/progress.js'; export async function uploadAsync( type: UploadSessionType, diff --git a/packages/eas-cli/src/user/Account.ts b/packages/eas-cli/src/user/Account.ts index db49d74a22..c4abe0d0ff 100644 --- a/packages/eas-cli/src/user/Account.ts +++ b/packages/eas-cli/src/user/Account.ts @@ -1,4 +1,4 @@ -import { Account as GraphQLAccount } from '../graphql/generated'; +import { Account as GraphQLAccount } from '../graphql/generated.js'; export type Account = Pick; diff --git a/packages/eas-cli/src/user/User.ts b/packages/eas-cli/src/user/User.ts index 8ab973a251..4fb049f68b 100644 --- a/packages/eas-cli/src/user/User.ts +++ b/packages/eas-cli/src/user/User.ts @@ -1,11 +1,11 @@ -import gql from 'graphql-tag'; +import { gql } from 'graphql-tag'; -import * as Analytics from '../analytics/rudderstackClient'; -import { api } from '../api'; -import { graphqlClient } from '../graphql/client'; -import { CurrentUserQuery } from '../graphql/generated'; -import { UserQuery } from '../graphql/queries/UserQuery'; -import { getAccessToken, getSessionSecret, setSessionAsync } from './sessionStorage'; +import * as Analytics from '../analytics/rudderstackClient.js'; +import { api } from '../api.js'; +import { graphqlClient } from '../graphql/client.js'; +import { CurrentUserQuery } from '../graphql/generated.js'; +import { UserQuery } from '../graphql/queries/UserQuery.js'; +import { getAccessToken, getSessionSecret, setSessionAsync } from './sessionStorage.js'; // Re-export, but keep in separate file to avoid dependency cycle export { getSessionSecret, getAccessToken }; diff --git a/packages/eas-cli/src/user/UserSettings.ts b/packages/eas-cli/src/user/UserSettings.ts index 82de1747e4..2266116b96 100644 --- a/packages/eas-cli/src/user/UserSettings.ts +++ b/packages/eas-cli/src/user/UserSettings.ts @@ -1,7 +1,9 @@ -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import path from 'path'; -import { getConfigDirectory } from '../utils/paths'; +import { getConfigDirectory } from '../utils/paths.js'; + +const JsonFile = JsonFileModule.default; const SETTINGS_FILE_PATH = path.join(getConfigDirectory(), 'user-settings.json'); diff --git a/packages/eas-cli/src/user/__tests__/User-test.ts b/packages/eas-cli/src/user/__tests__/User-test.ts index b72185d8f2..ce0bb376a9 100644 --- a/packages/eas-cli/src/user/__tests__/User-test.ts +++ b/packages/eas-cli/src/user/__tests__/User-test.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; -import { getStateJsonPath } from '../../utils/paths'; +import { getStateJsonPath } from '../../utils/paths.js'; import { Actor, getActorDisplayName, @@ -9,7 +9,7 @@ import { getUserAsync, loginAsync, logoutAsync, -} from '../User'; +} from '../User.js'; jest.mock('fs'); jest.mock('../../api', () => ({ diff --git a/packages/eas-cli/src/user/__tests__/actions-test.ts b/packages/eas-cli/src/user/__tests__/actions-test.ts index b5d0c5f772..80362c998b 100644 --- a/packages/eas-cli/src/user/__tests__/actions-test.ts +++ b/packages/eas-cli/src/user/__tests__/actions-test.ts @@ -1,8 +1,8 @@ -import { ApiV2Error } from '../../api'; -import { promptAsync } from '../../prompts'; -import { Actor, loginAsync } from '../User'; -import { ensureActorHasUsername, showLoginPromptAsync } from '../actions'; -import { UserSecondFactorDeviceMethod, retryUsernamePasswordAuthWithOTPAsync } from '../otp'; +import { ApiV2Error } from '../../api.js'; +import { promptAsync } from '../../prompts.js'; +import { Actor, loginAsync } from '../User.js'; +import { ensureActorHasUsername, showLoginPromptAsync } from '../actions.js'; +import { UserSecondFactorDeviceMethod, retryUsernamePasswordAuthWithOTPAsync } from '../otp.js'; jest.mock('../../prompts'); jest.mock('../../api', () => ({ diff --git a/packages/eas-cli/src/user/__tests__/otp-test.ts b/packages/eas-cli/src/user/__tests__/otp-test.ts index 1270ed70d2..cc1579546c 100644 --- a/packages/eas-cli/src/user/__tests__/otp-test.ts +++ b/packages/eas-cli/src/user/__tests__/otp-test.ts @@ -1,8 +1,8 @@ -import { api } from '../../api'; -import Log from '../../log'; -import { promptAsync, selectAsync } from '../../prompts'; -import { loginAsync } from '../User'; -import { UserSecondFactorDeviceMethod, retryUsernamePasswordAuthWithOTPAsync } from '../otp'; +import { api } from '../../api.js'; +import Log from '../../log.js'; +import { promptAsync, selectAsync } from '../../prompts.js'; +import { loginAsync } from '../User.js'; +import { UserSecondFactorDeviceMethod, retryUsernamePasswordAuthWithOTPAsync } from '../otp.js'; jest.mock('../../prompts'); jest.mock('../../api'); diff --git a/packages/eas-cli/src/user/__tests__/sessionStorage-test.ts b/packages/eas-cli/src/user/__tests__/sessionStorage-test.ts index f01dfb4d55..b8c57c7087 100644 --- a/packages/eas-cli/src/user/__tests__/sessionStorage-test.ts +++ b/packages/eas-cli/src/user/__tests__/sessionStorage-test.ts @@ -2,8 +2,13 @@ import fs from 'fs-extra'; import { vol } from 'memfs'; import path from 'path'; -import { getStateJsonPath } from '../../utils/paths'; -import { getAccessToken, getSession, getSessionSecret, setSessionAsync } from '../sessionStorage'; +import { getStateJsonPath } from '../../utils/paths.js'; +import { + getAccessToken, + getSession, + getSessionSecret, + setSessionAsync, +} from '../sessionStorage.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/user/actions.ts b/packages/eas-cli/src/user/actions.ts index cf9ff8586b..5ae14594fa 100644 --- a/packages/eas-cli/src/user/actions.ts +++ b/packages/eas-cli/src/user/actions.ts @@ -1,12 +1,12 @@ import { Errors } from '@oclif/core'; import chalk from 'chalk'; -import nullthrows from 'nullthrows'; -import { ApiV2Error } from '../api'; -import Log, { learnMore } from '../log'; -import { promptAsync } from '../prompts'; -import { Actor, getUserAsync, loginAsync } from './User'; -import { retryUsernamePasswordAuthWithOTPAsync } from './otp'; +import { ApiV2Error } from '../api.js'; +import Log, { learnMore } from '../log.js'; +import { promptAsync } from '../prompts.js'; +import { nullthrows } from '../utils/nullthrows.js'; +import { Actor, getUserAsync, loginAsync } from './User.js'; +import { retryUsernamePasswordAuthWithOTPAsync } from './otp.js'; export async function showLoginPromptAsync({ nonInteractive = false, diff --git a/packages/eas-cli/src/user/otp.ts b/packages/eas-cli/src/user/otp.ts index b6c8246d7b..dca12c579f 100644 --- a/packages/eas-cli/src/user/otp.ts +++ b/packages/eas-cli/src/user/otp.ts @@ -1,10 +1,10 @@ import assert from 'assert'; import chalk from 'chalk'; -import { api } from '../api'; -import Log from '../log'; -import { promptAsync, selectAsync } from '../prompts'; -import { loginAsync } from './User'; +import { api } from '../api.js'; +import Log from '../log.js'; +import { promptAsync, selectAsync } from '../prompts.js'; +import { loginAsync } from './User.js'; export enum UserSecondFactorDeviceMethod { AUTHENTICATOR = 'authenticator', diff --git a/packages/eas-cli/src/user/sessionStorage.ts b/packages/eas-cli/src/user/sessionStorage.ts index 8a5d59f9e9..7d0ceadbd7 100644 --- a/packages/eas-cli/src/user/sessionStorage.ts +++ b/packages/eas-cli/src/user/sessionStorage.ts @@ -1,6 +1,8 @@ -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; -import { getStateJsonPath } from '../utils/paths'; +import { getStateJsonPath } from '../utils/paths.js'; + +const JsonFile = JsonFileModule.default; type UserSettingsData = { auth?: SessionData; diff --git a/packages/eas-cli/src/utils/__tests__/code-signing-test.ts b/packages/eas-cli/src/utils/__tests__/code-signing-test.ts index 10568b6ed5..692b81d50e 100644 --- a/packages/eas-cli/src/utils/__tests__/code-signing-test.ts +++ b/packages/eas-cli/src/utils/__tests__/code-signing-test.ts @@ -1,14 +1,14 @@ import FormData from 'form-data'; import path from 'path'; -import { Headers, Response } from '../../fetch'; -import { PartialManifest } from '../../graphql/generated'; +import { Headers, Response } from '../../fetch.js'; +import { PartialManifest } from '../../graphql/generated.js'; import { checkManifestBodyAgainstUpdateInfoGroup, getCodeSigningInfoAsync, getKeyAndCertificateFromPathsAsync, getManifestBodyAsync, -} from '../code-signing'; +} from '../code-signing.js'; function generateMultipartBody(stringifiedManifest: string): FormData { const form = new FormData(); diff --git a/packages/eas-cli/src/utils/__tests__/profiles-test.ts b/packages/eas-cli/src/utils/__tests__/profiles-test.ts index 9d9773425c..bbdea2cf28 100644 --- a/packages/eas-cli/src/utils/__tests__/profiles-test.ts +++ b/packages/eas-cli/src/utils/__tests__/profiles-test.ts @@ -1,8 +1,8 @@ import { Platform } from '@expo/eas-build-job'; import { EasJsonReader, errors } from '@expo/eas-json'; -import { selectAsync } from '../../prompts'; -import { getProfilesAsync } from '../profiles'; +import { selectAsync } from '../../prompts.js'; +import { getProfilesAsync } from '../profiles.js'; jest.mock('../../prompts'); jest.mock('@expo/eas-json', () => { diff --git a/packages/eas-cli/src/utils/code-signing.ts b/packages/eas-cli/src/utils/code-signing.ts index 15f749d246..bfa251d89f 100644 --- a/packages/eas-cli/src/utils/code-signing.ts +++ b/packages/eas-cli/src/utils/code-signing.ts @@ -12,10 +12,10 @@ import { import isDeepEqual from 'fast-deep-equal'; import { promises as fs } from 'fs'; import { pki as PKI } from 'node-forge'; -import nullthrows from 'nullthrows'; -import { Response } from '../fetch'; -import { PartialManifest, PartialManifestAsset } from '../graphql/generated'; +import { Response } from '../fetch.js'; +import { PartialManifest, PartialManifestAsset } from '../graphql/generated.js'; +import { nullthrows } from './nullthrows.js'; type CodeSigningInfo = { privateKey: PKI.rsa.PrivateKey; diff --git a/packages/eas-cli/src/utils/easCli.ts b/packages/eas-cli/src/utils/easCli.ts index 17844a946e..cea00bdf1a 100644 --- a/packages/eas-cli/src/utils/easCli.ts +++ b/packages/eas-cli/src/utils/easCli.ts @@ -1,3 +1,5 @@ -const packageJSON = require('../../package.json'); +import fs from 'fs-extra'; + +const packageJSON = await fs.readJSON('../../package.json'); export const easCliVersion: string = packageJSON.version; diff --git a/packages/eas-cli/src/utils/expoCli.ts b/packages/eas-cli/src/utils/expoCli.ts index 0e3ba351de..0edb26bb8e 100644 --- a/packages/eas-cli/src/utils/expoCli.ts +++ b/packages/eas-cli/src/utils/expoCli.ts @@ -1,8 +1,8 @@ -import spawnAsync from '@expo/spawn-async'; +import { default as spawnAsync } from '@expo/spawn-async'; import chalk from 'chalk'; import resolveFrom from 'resolve-from'; -import Log from '../log'; +import Log from '../log.js'; export async function expoCommandAsync( projectDir: string, diff --git a/packages/eas-cli/src/utils/expodash/__tests__/capitalize-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/capitalize-test.ts index 924d909c04..fbdbfd99d5 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/capitalize-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/capitalize-test.ts @@ -1,4 +1,4 @@ -import capitalize from '../capitalize'; +import capitalize from '../capitalize.js'; describe(capitalize, () => { it('capitalizes the string', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/differenceBy-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/differenceBy-test.ts index efc608ec97..a15d9d8440 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/differenceBy-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/differenceBy-test.ts @@ -1,4 +1,4 @@ -import differenceBy from '../differenceBy'; +import differenceBy from '../differenceBy.js'; describe(differenceBy, () => { it('removes items from the first list that also appear on the second list', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/groupBy-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/groupBy-test.ts index 2a595b8e80..e1ea2633f4 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/groupBy-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/groupBy-test.ts @@ -1,4 +1,4 @@ -import groupBy from '../groupBy'; +import groupBy from '../groupBy.js'; describe(groupBy, () => { it('groups the objects from the list', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/pick-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/pick-test.ts index bf327bb009..b85b4e54c0 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/pick-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/pick-test.ts @@ -1,4 +1,4 @@ -import pick from '../pick'; +import pick from '../pick.js'; describe(pick, () => { it('returns an object with the subset of fields', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/sortBy-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/sortBy-test.ts index 0f4280f2dc..299c2e2d50 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/sortBy-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/sortBy-test.ts @@ -1,4 +1,4 @@ -import sortBy from '../sortBy'; +import sortBy from '../sortBy.js'; describe(sortBy, () => { it('sorts in ascending order by default', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/uniq-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/uniq-test.ts index eb3e6de63f..5ccaeff0e9 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/uniq-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/uniq-test.ts @@ -1,4 +1,4 @@ -import uniq from '../uniq'; +import uniq from '../uniq.js'; describe(uniq, () => { it('returns unique numbers from a list', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/uniqBy-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/uniqBy-test.ts index 5a09632b73..566ccfe35c 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/uniqBy-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/uniqBy-test.ts @@ -1,4 +1,4 @@ -import uniqBy from '../uniqBy'; +import uniqBy from '../uniqBy.js'; describe(uniqBy, () => { it('returns unique items from the list', () => { diff --git a/packages/eas-cli/src/utils/expodash/__tests__/zipObject-test.ts b/packages/eas-cli/src/utils/expodash/__tests__/zipObject-test.ts index 76f5ed90d0..cfacb86f7f 100644 --- a/packages/eas-cli/src/utils/expodash/__tests__/zipObject-test.ts +++ b/packages/eas-cli/src/utils/expodash/__tests__/zipObject-test.ts @@ -1,4 +1,4 @@ -import zipObject from '../zipObject'; +import zipObject from '../zipObject.js'; describe(zipObject, () => { it('throws if the number of items does not match', () => { diff --git a/packages/eas-cli/src/utils/files.ts b/packages/eas-cli/src/utils/files.ts index e506906f5e..120c6a1dec 100644 --- a/packages/eas-cli/src/utils/files.ts +++ b/packages/eas-cli/src/utils/files.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra'; import path from 'path'; -import Log from '../log'; +import Log from '../log.js'; function getRenamedFilename(filename: string, num: number): string { const ext = path.extname(filename); diff --git a/packages/eas-cli/src/utils/json.ts b/packages/eas-cli/src/utils/json.ts index 4f66f14ebc..72ce513e64 100644 --- a/packages/eas-cli/src/utils/json.ts +++ b/packages/eas-cli/src/utils/json.ts @@ -1,6 +1,6 @@ import assert from 'assert'; -import Log from '../log'; +import Log from '../log.js'; let stdoutWrite: NodeJS.WriteStream['write'] | undefined; diff --git a/packages/eas-cli/src/utils/nullthrows.ts b/packages/eas-cli/src/utils/nullthrows.ts new file mode 100644 index 0000000000..f7753e09d1 --- /dev/null +++ b/packages/eas-cli/src/utils/nullthrows.ts @@ -0,0 +1,9 @@ +export function nullthrows(value: T | null | undefined, message?: string): T { + if (value !== null && value !== undefined) { + return value; + } + + const error = new Error(message !== undefined ? message : `Got unexpected ${value}`); + (error as any).framesToPop = 1; // Skip nullthrows's own stack frame. + throw error; +} diff --git a/packages/eas-cli/src/utils/plist.ts b/packages/eas-cli/src/utils/plist.ts index f070f97b34..4bfc1a1350 100644 --- a/packages/eas-cli/src/utils/plist.ts +++ b/packages/eas-cli/src/utils/plist.ts @@ -1,8 +1,10 @@ import { IOSConfig } from '@expo/config-plugins'; -import plist from '@expo/plist'; +import Plist from '@expo/plist'; import fs from 'fs-extra'; import path from 'path'; +const plist = Plist.default; + export async function readPlistAsync(plistPath: string): Promise { if (await fs.pathExists(plistPath)) { const expoPlistContent = await fs.readFile(plistPath, 'utf8'); diff --git a/packages/eas-cli/src/utils/progress.ts b/packages/eas-cli/src/utils/progress.ts index 6543cef483..837b1daaaa 100644 --- a/packages/eas-cli/src/utils/progress.ts +++ b/packages/eas-cli/src/utils/progress.ts @@ -1,7 +1,7 @@ import chalk from 'chalk'; -import { Ora, ora } from '../ora'; -import { endTimer, formatMilliseconds, startTimer } from './timer'; +import { Ora, ora } from '../ora.js'; +import { endTimer, formatMilliseconds, startTimer } from './timer.js'; export type Progress = { total: number; diff --git a/packages/eas-cli/src/vcs/__tests__/local-test.ts b/packages/eas-cli/src/vcs/__tests__/local-test.ts index f9bb9dd4aa..09994d56c2 100644 --- a/packages/eas-cli/src/vcs/__tests__/local-test.ts +++ b/packages/eas-cli/src/vcs/__tests__/local-test.ts @@ -1,6 +1,6 @@ import { vol } from 'memfs'; -import { Ignore } from '../local'; +import { Ignore } from '../local.js'; jest.mock('fs'); diff --git a/packages/eas-cli/src/vcs/clients/git.ts b/packages/eas-cli/src/vcs/clients/git.ts index b40295af0a..d1cc507297 100644 --- a/packages/eas-cli/src/vcs/clients/git.ts +++ b/packages/eas-cli/src/vcs/clients/git.ts @@ -1,18 +1,18 @@ -import spawnAsync from '@expo/spawn-async'; +import { default as spawnAsync } from '@expo/spawn-async'; import { Errors } from '@oclif/core'; import chalk from 'chalk'; -import Log, { learnMore } from '../../log'; -import { ora } from '../../ora'; -import { confirmAsync, promptAsync } from '../../prompts'; +import Log, { learnMore } from '../../log.js'; +import { ora } from '../../ora.js'; +import { confirmAsync, promptAsync } from '../../prompts.js'; import { doesGitRepoExistAsync, getGitDiffOutputAsync, gitDiffAsync, gitStatusAsync, isGitInstalledAsync, -} from '../git'; -import { Client } from '../vcs'; +} from '../git.js'; +import { Client } from '../vcs.js'; export default class GitClient extends Client { public async ensureRepoExistsAsync(): Promise { diff --git a/packages/eas-cli/src/vcs/clients/gitNoCommit.ts b/packages/eas-cli/src/vcs/clients/gitNoCommit.ts index f4b8790e0a..1e0df74008 100644 --- a/packages/eas-cli/src/vcs/clients/gitNoCommit.ts +++ b/packages/eas-cli/src/vcs/clients/gitNoCommit.ts @@ -1,8 +1,8 @@ -import spawnAsync from '@expo/spawn-async'; +import { default as spawnAsync } from '@expo/spawn-async'; import path from 'path'; -import { Ignore, makeShallowCopyAsync } from '../local'; -import GitClient from './git'; +import { Ignore, makeShallowCopyAsync } from '../local.js'; +import GitClient from './git.js'; export default class GitNoCommitClient extends GitClient { public async isCommitRequiredAsync(): Promise { diff --git a/packages/eas-cli/src/vcs/clients/noVcs.ts b/packages/eas-cli/src/vcs/clients/noVcs.ts index 8c6c8e1574..110c956f9e 100644 --- a/packages/eas-cli/src/vcs/clients/noVcs.ts +++ b/packages/eas-cli/src/vcs/clients/noVcs.ts @@ -1,5 +1,5 @@ -import { Ignore, getRootPath, makeShallowCopyAsync } from '../local'; -import { Client } from '../vcs'; +import { Ignore, getRootPath, makeShallowCopyAsync } from '../local.js'; +import { Client } from '../vcs.js'; export default class NoVcsClient extends Client { public async getRootPathAsync(): Promise { diff --git a/packages/eas-cli/src/vcs/git.ts b/packages/eas-cli/src/vcs/git.ts index ddd01df4fe..7fce17bb18 100644 --- a/packages/eas-cli/src/vcs/git.ts +++ b/packages/eas-cli/src/vcs/git.ts @@ -1,4 +1,4 @@ -import spawnAsync from '@expo/spawn-async'; +import { default as spawnAsync } from '@expo/spawn-async'; export async function isGitInstalledAsync(): Promise { try { diff --git a/packages/eas-cli/src/vcs/index.ts b/packages/eas-cli/src/vcs/index.ts index 29d2c80677..ac1dbc576a 100644 --- a/packages/eas-cli/src/vcs/index.ts +++ b/packages/eas-cli/src/vcs/index.ts @@ -1,7 +1,7 @@ -import log from '../log'; -import GitNoCommitClient from './clients/gitNoCommit'; -import NoVcsClient from './clients/noVcs'; -import { Client } from './vcs'; +import log from '../log.js'; +import GitNoCommitClient from './clients/gitNoCommit.js'; +import NoVcsClient from './clients/noVcs.js'; +import { Client } from './vcs.js'; const NO_VCS_WARNING = `Using EAS CLI without version control system is not recommended, use this mode only if you know what you are doing.`; diff --git a/packages/eas-cli/src/vcs/local.ts b/packages/eas-cli/src/vcs/local.ts index 1bed58e588..17da1712af 100644 --- a/packages/eas-cli/src/vcs/local.ts +++ b/packages/eas-cli/src/vcs/local.ts @@ -1,6 +1,6 @@ import fg from 'fast-glob'; import fs from 'fs-extra'; -import createIgnore, { Ignore as SingleFileIgnore } from 'ignore'; +import { Ignore as SingleFileIgnore, default as createIgnore } from 'ignore'; import path from 'path'; const EASIGNORE_FILENAME = '.easignore'; diff --git a/packages/eas-cli/src/webhooks/formatWebhook.ts b/packages/eas-cli/src/webhooks/formatWebhook.ts index 88df9b0ed1..44855a37a9 100644 --- a/packages/eas-cli/src/webhooks/formatWebhook.ts +++ b/packages/eas-cli/src/webhooks/formatWebhook.ts @@ -1,5 +1,5 @@ -import { WebhookFragment } from '../graphql/generated'; -import formatFields from '../utils/formatFields'; +import { WebhookFragment } from '../graphql/generated.js'; +import formatFields from '../utils/formatFields.js'; export function formatWebhook(webhook: WebhookFragment): string { return formatFields([ diff --git a/packages/eas-cli/src/webhooks/input.ts b/packages/eas-cli/src/webhooks/input.ts index a6ea11214e..0370c5dc11 100644 --- a/packages/eas-cli/src/webhooks/input.ts +++ b/packages/eas-cli/src/webhooks/input.ts @@ -1,9 +1,9 @@ -import nullthrows from 'nullthrows'; import { URL } from 'url'; -import { WebhookFragment, WebhookInput, WebhookType } from '../graphql/generated'; -import Log from '../log'; -import { promptAsync } from '../prompts'; +import { WebhookFragment, WebhookInput, WebhookType } from '../graphql/generated.js'; +import Log from '../log.js'; +import { promptAsync } from '../prompts.js'; +import { nullthrows } from '../utils/nullthrows.js'; export async function prepareInputParamsAsync( { diff --git a/packages/eas-cli/tsconfig.json b/packages/eas-cli/tsconfig.json index 8c9b14138c..ef7f8c9226 100644 --- a/packages/eas-cli/tsconfig.json +++ b/packages/eas-cli/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { "declaration": true, - "importHelpers": true, - "module": "commonjs", + "module": "node16", + "moduleResolution": "node16", "esModuleInterop": true, "noImplicitReturns": true, - "noUnusedParameters":true, - "noUnusedLocals":true, + "noUnusedParameters": true, + "noUnusedLocals": true, "strict": true, - "target": "ES2019", + "target": "ES2020", "outDir": "build", "rootDir": "src", "typeRoots": [ diff --git a/packages/eas-json/__mocks__/fs.ts b/packages/eas-json/__mocks__/fs.ts index 3a6f27db04..b138fca6e2 100644 --- a/packages/eas-json/__mocks__/fs.ts +++ b/packages/eas-json/__mocks__/fs.ts @@ -3,4 +3,4 @@ import { fs } from 'memfs'; // fs-extra@10 is not compatible with memfs, the following line fixes tests (fs.realpath as any).native = jest.fn(); -module.exports = fs; +export default fs; diff --git a/packages/eas-json/jest.config.js b/packages/eas-json/jest.config.cjs similarity index 63% rename from packages/eas-json/jest.config.js rename to packages/eas-json/jest.config.cjs index 103df755e7..ef61a66986 100644 --- a/packages/eas-json/jest.config.js +++ b/packages/eas-json/jest.config.cjs @@ -1,5 +1,5 @@ module.exports = { - ...require('../../jest/jest.config.js'), + ...require('../../jest/jest.config.cjs'), rootDir: __dirname, roots: ['src', '__mocks__'], }; diff --git a/packages/eas-json/package.json b/packages/eas-json/package.json index 6c9ca0ef10..4f41efaea9 100644 --- a/packages/eas-json/package.json +++ b/packages/eas-json/package.json @@ -1,5 +1,6 @@ { "name": "@expo/eas-json", + "type": "module", "description": "A library for interacting with eas.json", "version": "0.54.0", "author": "Expo ", @@ -16,16 +17,19 @@ "tslib": "2.4.0" }, "devDependencies": { + "@jest/globals": "28.1.2", "@types/fs-extra": "9.0.13", + "globby": "13.1.2", "memfs": "3.4.3", + "ts-node": "10.8.2", "typescript": "4.7.4" }, "engines": { - "node": ">=14.0.0" + "node": ">=14.16" }, "homepage": "https://github.com/expo/eas-cli", "license": "MIT", - "main": "build/index.js", + "exports": "./build/index.js", "types": "build/index.d.ts", "repository": "expo/eas-cli", "scripts": { @@ -33,10 +37,15 @@ "watch": "yarn build --watch --preserveWatchOutput", "typecheck": "tsc", "prepack": "rm -rf build && yarn build", - "test": "jest", - "clean": "rm -rf build node_modules yarn-error.log" + "test": "NODE_OPTIONS=\"--experimental-vm-modules --es-module-specifier-resolution=node\" jest", + "clean": "rm -rf build node_modules yarn-error.log", + "test-esm-imports": "cp ../../scripts/src/testESMImports.ts scripts/ && ts-node-esm ./scripts/testESMImports.ts 'build/**/*.js'" }, "publishConfig": { "access": "public" + }, + "volta": { + "node": "18.2.0", + "yarn": "1.22.18" } } diff --git a/packages/eas-json/scripts/.gitkeep b/packages/eas-json/scripts/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/eas-json/src/__tests__/reader-build-test.ts b/packages/eas-json/src/__tests__/reader-build-test.ts index 7428026bda..c3b1c0a04c 100644 --- a/packages/eas-json/src/__tests__/reader-build-test.ts +++ b/packages/eas-json/src/__tests__/reader-build-test.ts @@ -2,7 +2,7 @@ import { Platform } from '@expo/eas-build-job'; import fs from 'fs-extra'; import { vol } from 'memfs'; -import { EasJsonReader } from '../reader'; +import { EasJsonReader } from '../reader.js'; jest.mock('fs'); diff --git a/packages/eas-json/src/__tests__/reader-submit-test.ts b/packages/eas-json/src/__tests__/reader-submit-test.ts index e81fa11558..e0bddd85ca 100644 --- a/packages/eas-json/src/__tests__/reader-submit-test.ts +++ b/packages/eas-json/src/__tests__/reader-submit-test.ts @@ -1,8 +1,9 @@ import { Platform } from '@expo/eas-build-job'; +import { jest } from '@jest/globals'; import fs from 'fs-extra'; import { vol } from 'memfs'; -import { EasJsonReader } from '../reader'; +import { EasJsonReader } from '../reader.js'; jest.mock('fs'); diff --git a/packages/eas-json/src/build/resolver.ts b/packages/eas-json/src/build/resolver.ts index 07d9399d11..eda3dfb891 100644 --- a/packages/eas-json/src/build/resolver.ts +++ b/packages/eas-json/src/build/resolver.ts @@ -1,9 +1,9 @@ import { Platform } from '@expo/eas-build-job'; -import { MissingParentProfileError, MissingProfileError } from '../errors'; -import { EasJson } from '../types'; -import { BuildProfileSchema } from './schema'; -import { BuildProfile, EasJsonBuildProfile } from './types'; +import { MissingParentProfileError, MissingProfileError } from '../errors.js'; +import { EasJson } from '../types.js'; +import { BuildProfileSchema } from './schema.js'; +import { BuildProfile, EasJsonBuildProfile } from './types.js'; type EasJsonBuildProfileResolved = Omit; diff --git a/packages/eas-json/src/index.ts b/packages/eas-json/src/index.ts index d334607892..e4ba36f98b 100644 --- a/packages/eas-json/src/index.ts +++ b/packages/eas-json/src/index.ts @@ -1,6 +1,6 @@ -export { AndroidReleaseStatus, AndroidReleaseTrack, SubmitProfile } from './submit/types'; -export { getDefaultProfile as getDefaultSubmitProfile } from './submit/resolver'; -export { EasJson, ProfileType } from './types'; +export { AndroidReleaseStatus, AndroidReleaseTrack, SubmitProfile } from './submit/types.js'; +export { getDefaultProfile as getDefaultSubmitProfile } from './submit/resolver.js'; +export { EasJson, ProfileType } from './types.js'; export { AndroidVersionAutoIncrement, BuildProfile, @@ -8,6 +8,6 @@ export { DistributionType, IosEnterpriseProvisioning, IosVersionAutoIncrement, -} from './build/types'; -export { EasJsonReader } from './reader'; -export * as errors from './errors'; +} from './build/types.js'; +export { EasJsonReader } from './reader.js'; +export * as errors from './errors.js'; diff --git a/packages/eas-json/src/reader.ts b/packages/eas-json/src/reader.ts index ec4c6eecc7..23e175b84a 100644 --- a/packages/eas-json/src/reader.ts +++ b/packages/eas-json/src/reader.ts @@ -1,15 +1,17 @@ import { Platform } from '@expo/eas-build-job'; -import JsonFile from '@expo/json-file'; +import JsonFileModule from '@expo/json-file'; import fs from 'fs-extra'; import path from 'path'; -import { resolveBuildProfile } from './build/resolver'; -import { BuildProfile } from './build/types'; -import { InvalidEasJsonError, MissingEasJsonError } from './errors'; -import { EasJsonSchema } from './schema'; -import { resolveSubmitProfile } from './submit/resolver'; -import { SubmitProfile } from './submit/types'; -import { EasJson } from './types'; +import { resolveBuildProfile } from './build/resolver.js'; +import { BuildProfile } from './build/types.js'; +import { InvalidEasJsonError, MissingEasJsonError } from './errors.js'; +import { EasJsonSchema } from './schema.js'; +import { resolveSubmitProfile } from './submit/resolver.js'; +import { SubmitProfile } from './submit/types.js'; +import { EasJson } from './types.js'; + +const JsonFile = JsonFileModule.default; export class EasJsonReader { private easJson: EasJson | undefined; diff --git a/packages/eas-json/src/schema.ts b/packages/eas-json/src/schema.ts index 66799bd5c3..1e060c9b87 100644 --- a/packages/eas-json/src/schema.ts +++ b/packages/eas-json/src/schema.ts @@ -1,7 +1,7 @@ import Joi from 'joi'; -import { BuildProfileSchema } from './build/schema'; -import { SubmitProfileSchema } from './submit/schema'; +import { BuildProfileSchema } from './build/schema.js'; +import { SubmitProfileSchema } from './submit/schema.js'; export const EasJsonSchema = Joi.object({ cli: Joi.object({ diff --git a/packages/eas-json/src/submit/resolver.ts b/packages/eas-json/src/submit/resolver.ts index 70f2c332e6..d508ec3a7c 100644 --- a/packages/eas-json/src/submit/resolver.ts +++ b/packages/eas-json/src/submit/resolver.ts @@ -1,14 +1,14 @@ import { Platform } from '@expo/eas-build-job'; import envString from 'env-string'; -import { MissingParentProfileError, MissingProfileError } from '../errors'; -import { EasJson } from '../types'; -import { AndroidSubmitProfileSchema, IosSubmitProfileSchema } from './schema'; +import { MissingParentProfileError, MissingProfileError } from '../errors.js'; +import { EasJson } from '../types.js'; +import { AndroidSubmitProfileSchema, IosSubmitProfileSchema } from './schema.js'; import { AndroidSubmitProfileFieldsToEvaluate, IosSubmitProfileFieldsToEvaluate, SubmitProfile, -} from './types'; +} from './types.js'; export function resolveSubmitProfile({ easJson, diff --git a/packages/eas-json/src/submit/schema.ts b/packages/eas-json/src/submit/schema.ts index 5a5b2ddfe6..e7c35678c3 100644 --- a/packages/eas-json/src/submit/schema.ts +++ b/packages/eas-json/src/submit/schema.ts @@ -1,6 +1,6 @@ import Joi from 'joi'; -import { AndroidReleaseStatus, AndroidReleaseTrack } from './types'; +import { AndroidReleaseStatus, AndroidReleaseTrack } from './types.js'; export const AndroidSubmitProfileSchema = Joi.object({ serviceAccountKeyPath: Joi.string(), diff --git a/packages/eas-json/src/types.ts b/packages/eas-json/src/types.ts index f330d7e67f..30e775500b 100644 --- a/packages/eas-json/src/types.ts +++ b/packages/eas-json/src/types.ts @@ -1,5 +1,5 @@ -import { EasJsonBuildProfile } from './build/types'; -import { EasJsonSubmitProfile } from './submit/types'; +import { EasJsonBuildProfile } from './build/types.js'; +import { EasJsonSubmitProfile } from './submit/types.js'; export type ProfileType = 'build' | 'submit'; export type EasJsonProfile = T extends 'build' diff --git a/packages/eas-json/tsconfig.json b/packages/eas-json/tsconfig.json index f85e8d04b9..5ee3facfde 100644 --- a/packages/eas-json/tsconfig.json +++ b/packages/eas-json/tsconfig.json @@ -1,12 +1,12 @@ { "compilerOptions": { "declaration": true, - "importHelpers": true, - "module": "commonjs", + "module": "node16", + "moduleResolution": "node16", "esModuleInterop": true, "noImplicitReturns": true, "strict": true, - "target": "ES2019", + "target": "ES2020", "outDir": "build", "rootDir": "src", "typeRoots": [ diff --git a/scripts/.eslintrc.cjs b/scripts/.eslintrc.cjs index b13cfa3461..3b84179b9f 100644 --- a/scripts/.eslintrc.cjs +++ b/scripts/.eslintrc.cjs @@ -1,4 +1,4 @@ -const rootEslintrc = require('../.eslintrc.js'); +const rootEslintrc = require('../.eslintrc.cjs'); module.exports = { rules: { diff --git a/scripts/package.json b/scripts/package.json index 764b7399e2..2e8ddab76d 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -15,8 +15,10 @@ "node": ">=14.16" }, "dependencies": { + "chalk": "5.0.1", "dateformat": "4.5.1", "fs-extra": "10.1.0", + "globby": "13.1.2", "lodash-es": "4.17.21", "marked": "3.0.4", "semver": "7.3.7", @@ -30,5 +32,9 @@ "@types/semver": "7.3.9", "ts-node": "10.7.0", "typescript": "4.7.4" + }, + "volta": { + "node": "18.2.0", + "yarn": "1.22.18" } } diff --git a/scripts/src/testESMImports.ts b/scripts/src/testESMImports.ts new file mode 100644 index 0000000000..cfb3ca347e --- /dev/null +++ b/scripts/src/testESMImports.ts @@ -0,0 +1,56 @@ +/* eslint-disable no-console */ +// source: https://gist.github.com/PabloSzx/6f9a34a677e27d2ee3e4826d02490083 + +import chalk from 'chalk'; +import { globby } from 'globby'; +import path from 'path'; + +async function mainAsync(globPattern: string): Promise { + const mjsFiles = await globby(globPattern, { + cwd: process.cwd(), + }); + + const ok: string[] = []; + const fail: string[] = []; + + let i = 0; + for (const mjsFile of mjsFiles) { + try { + const absolutePath = path.join(process.cwd(), mjsFile); + await import(absolutePath); + ok.push(mjsFile); + } catch (err) { + const color = i++ % 2 === 0 ? chalk.magenta : chalk.red; + console.error(color(`\n\n-----\n${i}) ${mjsFile}\n`)); + console.error(err); + console.error(color('\n-----\n\n')); + fail.push(mjsFile); + } + } + + if (fail.length > 0) { + console.error(chalk.red(`${fail.length} Fail: ${fail.join(' | ')}`)); + } + + if (fail.length > 0) { + console.error('\nFAILED'); + process.exit(1); + } else if (ok.length > 0) { + console.error('\nOK'); + process.exit(0); + } else { + console.error('No files analyzed!'); + process.exit(1); + } +} + +try { + const globPattern = process.argv[2]; + if (!globPattern) { + throw new Error('Provide glob pattern'); + } + await mainAsync(globPattern); +} catch (err) { + console.error(err); + process.exit(1); +} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 65d0a6e3e7..38188eaa8f 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -3,6 +3,7 @@ "declaration": true, "module": "node16", "moduleResolution": "node16", + "esModuleInterop": true, "noImplicitReturns": true, "strict": true, "target": "ES2020", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 4f88a0c904..523ceee46c 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -14,6 +14,27 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@tsconfig/node10@^1.0.7": version "1.0.8" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" @@ -88,6 +109,18 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +chalk@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" + integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -103,6 +136,38 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +fast-glob@^3.2.11: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + fs-extra@10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -112,11 +177,51 @@ fs-extra@10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +globby@13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.2.tgz#29047105582427ab6eca4f905200667b056da515" + integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -148,6 +253,46 @@ marked@3.0.4: resolved "https://registry.yarnpkg.com/marked/-/marked-3.0.4.tgz#b8a1539e5e05c6ea9e93f15c0bad1d54ce890406" integrity sha512-jBo8AOayNaEcvBhNobg6/BLhdsK3NvnKWJg33MAAPbvTWiG4QBn9gpW1+7RssrKu4K1dKlN+0goVQwV41xEfOA== +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + semver@7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" @@ -155,6 +300,18 @@ semver@7.3.7: dependencies: lru-cache "^6.0.0" +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + ts-node@10.7.0: version "10.7.0" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" diff --git a/ts-declarations/gradle-to-js/index.d.ts b/ts-declarations/gradle-to-js/index.d.ts index ca9a72e896..95a1913336 100644 --- a/ts-declarations/gradle-to-js/index.d.ts +++ b/ts-declarations/gradle-to-js/index.d.ts @@ -1,3 +1,3 @@ -declare module 'gradle-to-js/lib/parser' { +declare module 'gradle-to-js/lib/parser.js' { export function parseText(text: string): Promise; } diff --git a/yarn.lock b/yarn.lock index ed130a67df..3bfdd83638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1134,6 +1134,13 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@endemolshinegroup/cosmiconfig-typescript-loader@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz#eea4635828dde372838b0909693ebd9aafeec22d" @@ -2064,6 +2071,16 @@ "@types/node" "*" jest-mock "^28.1.0" +"@jest/environment@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.2.tgz#94a052c0c5f9f8c8e6d13ea6da78dbc5d7d9b85b" + integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q== + dependencies: + "@jest/fake-timers" "^28.1.2" + "@jest/types" "^28.1.1" + "@types/node" "*" + jest-mock "^28.1.1" + "@jest/expect-utils@^28.1.0": version "28.1.0" resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.0.tgz#a5cde811195515a9809b96748ae8bcc331a3538a" @@ -2071,6 +2088,13 @@ dependencies: jest-get-type "^28.0.2" +"@jest/expect-utils@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.1.tgz#d84c346025b9f6f3886d02c48a6177e2b0360587" + integrity sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw== + dependencies: + jest-get-type "^28.0.2" + "@jest/expect@^28.1.0": version "28.1.0" resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.0.tgz#2e5a31db692597070932366a1602b5157f0f217c" @@ -2079,6 +2103,14 @@ expect "^28.1.0" jest-snapshot "^28.1.0" +"@jest/expect@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.2.tgz#0b25acedff46e1e1e5606285306c8a399c12534f" + integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw== + dependencies: + expect "^28.1.1" + jest-snapshot "^28.1.2" + "@jest/fake-timers@^28.1.0": version "28.1.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.0.tgz#ea77878aabd5c5d50e1fc53e76d3226101e33064" @@ -2091,6 +2123,27 @@ jest-mock "^28.1.0" jest-util "^28.1.0" +"@jest/fake-timers@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.2.tgz#d49e8ee4e02ba85a6e844a52a5e7c59c23e3b76f" + integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg== + dependencies: + "@jest/types" "^28.1.1" + "@sinonjs/fake-timers" "^9.1.2" + "@types/node" "*" + jest-message-util "^28.1.1" + jest-mock "^28.1.1" + jest-util "^28.1.1" + +"@jest/globals@28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.2.tgz#92fab296e337c7309c25e4202fb724f62249d83f" + integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg== + dependencies: + "@jest/environment" "^28.1.2" + "@jest/expect" "^28.1.2" + "@jest/types" "^28.1.1" + "@jest/globals@^28.1.0": version "28.1.0" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.0.tgz#a4427d2eb11763002ff58e24de56b84ba79eb793" @@ -2187,6 +2240,27 @@ slash "^3.0.0" write-file-atomic "^4.0.1" +"@jest/transform@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.2.tgz#b367962c53fd53821269bde050ce373e111327c1" + integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^28.1.1" + "@jridgewell/trace-mapping" "^0.3.13" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^28.1.1" + jest-regex-util "^28.0.2" + jest-util "^28.1.1" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.1" + "@jest/types@^27.1.0": version "27.1.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.1.0.tgz#674a40325eab23c857ebc0689e7e191a3c5b10cc" @@ -2210,6 +2284,18 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jest/types@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.1.tgz#d059bbc80e6da6eda9f081f293299348bd78ee0b" + integrity sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw== + dependencies: + "@jest/schemas" "^28.0.2" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -2233,6 +2319,22 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c" integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/trace-mapping@^0.3.13": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": version "0.3.10" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz#db436f0917d655393851bc258918c00226c9b183" @@ -3099,10 +3201,10 @@ supports-color "^8.1.1" tslib "^2" -"@oclif/core@1.9.0", "@oclif/core@^1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.9.0.tgz#bb2a7820a9176f28921f449c0f577d39c15e74d0" - integrity sha512-duvlaRQf4JM+mKuwwos1DNa/Q9x6tnF3khV5RU0fy5hhETF7THlTmxioKlIvKMyQDVpySqtZXZ0OKHeCi2EWuQ== +"@oclif/core@1.9.5": + version "1.9.5" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.9.5.tgz#4dd00f35fceb89906245da791b14bd503103771a" + integrity sha512-C605Cr4RhHTMXYApLxdVt/PL6IA5cguN6MPvsMjxkvBppk2Fvcsj05dtRdDqShskRpZzHtu65emG1tHy8TWPWQ== dependencies: "@oclif/linewrap" "^1.0.0" "@oclif/screen" "^3.0.2" @@ -3261,6 +3363,40 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" +"@oclif/core@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.9.0.tgz#bb2a7820a9176f28921f449c0f577d39c15e74d0" + integrity sha512-duvlaRQf4JM+mKuwwos1DNa/Q9x6tnF3khV5RU0fy5hhETF7THlTmxioKlIvKMyQDVpySqtZXZ0OKHeCi2EWuQ== + dependencies: + "@oclif/linewrap" "^1.0.0" + "@oclif/screen" "^3.0.2" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.10.0" + debug "^4.3.4" + ejs "^3.1.6" + fs-extra "^9.1.0" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + semver "^7.3.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + tslib "^2.3.1" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + "@oclif/linewrap@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91" @@ -3517,7 +3653,7 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^9.1.1": +"@sinonjs/fake-timers@^9.1.1", "@sinonjs/fake-timers@^9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== @@ -3541,6 +3677,26 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + "@types/babel__core@^7.1.14": version "7.1.15" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.15.tgz#2ccfb1ad55a02c83f8e0ad327cbc332f55eb1024" @@ -3970,7 +4126,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.7.1: +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1, acorn@^8.7.1: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== @@ -5366,6 +5527,11 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-fetch@3.0.6, cross-fetch@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" @@ -5671,6 +5837,11 @@ diff-sequences@^28.0.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.0.2.tgz#40f8d4ffa081acbd8902ba35c798458d0ff1af41" integrity sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ== +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -6308,6 +6479,17 @@ expect@^28.1.0: jest-message-util "^28.1.0" jest-util "^28.1.0" +expect@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.1.tgz#ca6fff65f6517cf7220c2e805a49c19aea30b420" + integrity sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w== + dependencies: + "@jest/expect-utils" "^28.1.1" + jest-get-type "^28.0.2" + jest-matcher-utils "^28.1.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" + expo-modules-autolinking@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-0.5.5.tgz#6bcc42072dcbdfca79d207b7f549f1fdb54a2b74" @@ -6375,7 +6557,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@3.2.11, fast-glob@^3.2.5, fast-glob@^3.2.9: +fast-glob@3.2.11, fast-glob@^3.2.11, fast-glob@^3.2.5, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -6984,6 +7166,17 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" +globby@13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.2.tgz#29047105582427ab6eca4f905200667b056da515" + integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -8104,6 +8297,16 @@ jest-diff@^28.1.0: jest-get-type "^28.0.2" pretty-format "^28.1.0" +jest-diff@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.1.tgz#1a3eedfd81ae79810931c63a1d0f201b9120106c" + integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== + dependencies: + chalk "^4.0.0" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" + jest-docblock@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.0.2.tgz#3cab8abea53275c9d670cdca814fc89fba1298c2" @@ -8163,6 +8366,25 @@ jest-haste-map@^28.1.0: optionalDependencies: fsevents "^2.3.2" +jest-haste-map@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.1.tgz#471685f1acd365a9394745bb97c8fc16289adca3" + integrity sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ== + dependencies: + "@jest/types" "^28.1.1" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^28.0.2" + jest-util "^28.1.1" + jest-worker "^28.1.1" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + jest-leak-detector@^28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz#b65167776a8787443214d6f3f54935a4c73c8a45" @@ -8191,6 +8413,16 @@ jest-matcher-utils@^28.1.0: jest-get-type "^28.0.2" pretty-format "^28.1.0" +jest-matcher-utils@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz#a7c4653c2b782ec96796eb3088060720f1e29304" + integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== + dependencies: + chalk "^4.0.0" + jest-diff "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" + jest-message-util@^28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.0.tgz#7e8f0b9049e948e7b94c2a52731166774ba7d0af" @@ -8206,6 +8438,21 @@ jest-message-util@^28.1.0: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.1.tgz#60aa0b475cfc08c8a9363ed2fb9108514dd9ab89" + integrity sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^28.1.1" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^28.1.1" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.0.tgz#ccc7cc12a9b330b3182db0c651edc90d163ff73e" @@ -8214,6 +8461,14 @@ jest-mock@^28.1.0: "@jest/types" "^28.1.0" "@types/node" "*" +jest-mock@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.1.tgz#37903d269427fa1ef5b2447be874e1c62a39a371" + integrity sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw== + dependencies: + "@jest/types" "^28.1.1" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -8331,6 +8586,35 @@ jest-snapshot@^28.1.0: pretty-format "^28.1.0" semver "^7.3.5" +jest-snapshot@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.2.tgz#93d31b87b11b384f5946fe0767541496135f8d52" + integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" + "@types/babel__traverse" "^7.0.6" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^28.1.1" + graceful-fs "^4.2.9" + jest-diff "^28.1.1" + jest-get-type "^28.0.2" + jest-haste-map "^28.1.1" + jest-matcher-utils "^28.1.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" + natural-compare "^1.4.0" + pretty-format "^28.1.1" + semver "^7.3.5" + jest-util@^28.0.0, jest-util@^28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.0.tgz#d54eb83ad77e1dd441408738c5a5043642823be5" @@ -8343,6 +8627,18 @@ jest-util@^28.0.0, jest-util@^28.1.0: graceful-fs "^4.2.9" picomatch "^2.2.3" +jest-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.1.tgz#ff39e436a1aca397c0ab998db5a51ae2b7080d05" + integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== + dependencies: + "@jest/types" "^28.1.1" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + jest-validate@^28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.0.tgz#8a6821f48432aba9f830c26e28226ad77b9a0e18" @@ -8391,6 +8687,15 @@ jest-worker@^28.1.0: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.1.tgz#3480c73247171dfd01eda77200f0063ab6a3bf28" + integrity sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@28.1.0: version "28.1.0" resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.0.tgz#f420e41c8f2395b9a30445a97189ebb57593d831" @@ -9079,6 +9384,13 @@ make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: socks-proxy-agent "^6.0.0" ssri "^8.0.0" +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -10539,6 +10851,16 @@ pretty-format@^28.1.0: ansi-styles "^5.0.0" react-is "^18.0.0" +pretty-format@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.1.tgz#f731530394e0f7fcd95aba6b43c50e02d86b95cb" + integrity sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw== + dependencies: + "@jest/schemas" "^28.0.2" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^18.0.0" + proc-log@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-1.0.0.tgz#0d927307401f69ed79341e83a0b2c9a13395eb77" @@ -12041,6 +12363,11 @@ tmp@^0.1.0: dependencies: rimraf "^2.6.3" +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -12132,6 +12459,25 @@ ts-log@^2.2.3: resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.3.tgz#4da5640fe25a9fb52642cd32391c886721318efb" integrity sha512-XvB+OdKSJ708Dmf9ore4Uf/q62AYDTzFcAdxc8KNML1mmAWywRFVt/dn1KYJH8Agt5UJNujfM3znU5PxgAzA2w== +ts-node@10.8.2: + version "10.8.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.2.tgz#3185b75228cef116bf82ffe8762594f54b2a23f2" + integrity sha512-LYdGnoGddf1D6v8REPtIH+5iq/gTDuZqv2/UJUU7tKjuEU8xVZorBM+buCGNjj+pGEud+sOoM4CX3/YzINpENA== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + ts-node@^9: version "9.0.0" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" @@ -12473,6 +12819,11 @@ uuid@^7.0.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-compile-cache@^2.0.3: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" @@ -12556,6 +12907,13 @@ walker@^1.0.7: dependencies: makeerror "1.0.x" +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"