mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-14 10:08:06 -10:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b36ae0ef8 | ||
|
|
1a4cb107af | ||
|
|
7576d9195d | ||
|
|
838c1508be | ||
|
|
7941683435 |
No files matched your search
@@ -34,6 +34,7 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
],
|
||||
'no-underscore-dangle': ['error', { allow: ['__typename'] }],
|
||||
'@typescript-eslint/explicit-function-return-type': [
|
||||
'warn',
|
||||
{
|
||||
|
||||
+9
-1
@@ -10,10 +10,18 @@ This is the log of notable changes to EAS CLI and related packages.
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Google Service Account Keys: Fix non-interactive bug in credentials service workflow ([#682](https://github.com/expo/eas-cli/pull/682) by [@quinlanj](https://github.com/quinlanj))
|
||||
- Fix printing App Store Connect URL after submission. ([#683](https://github.com/expo/eas-cli/pull/683) by [@brentvatne](https://github.com/brentvatne))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Enable no-underscore-dangle eslint rule. ([#686](https://github.com/expo/eas-cli/pull/686) by [@dsokal](https://github.com/dsokal))
|
||||
|
||||
## [0.31.1](https://github.com/expo/eas-cli/releases/tag/0.31.1) - 2021-10-08
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Google Service Account Keys: Fix non-interactive bug in credentials service workflow ([#682](https://github.com/expo/eas-cli/pull/682) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [0.31.0](https://github.com/expo/eas-cli/releases/tag/0.31.0) - 2021-10-08
|
||||
|
||||
### 🛠 Breaking changes
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@
|
||||
"eas": "packages/eas-cli/bin/run",
|
||||
"lint": "eslint . --ext .ts --ext .js",
|
||||
"release": "lerna version",
|
||||
"test": "jest"
|
||||
"test": "jest",
|
||||
"clean": "lerna run clean"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@expo/oclif-dev-cli": "1.24.0-expo",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "eas-cli",
|
||||
"type": "module",
|
||||
"description": "EAS command line tool",
|
||||
"version": "0.31.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -113,7 +114,6 @@
|
||||
"cli"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"oclif": {
|
||||
"bin": "eas",
|
||||
"commands": "./build/commands",
|
||||
@@ -177,6 +177,7 @@
|
||||
"typecheck": "tsc",
|
||||
"test": "jest",
|
||||
"version": "yarn oclif-dev readme && node patch-readme && git add README.md",
|
||||
"generate-graphql-code": "graphql-codegen --config graphql-codegen.yml"
|
||||
"generate-graphql-code": "graphql-codegen --config graphql-codegen.yml",
|
||||
"clean": "rm -rf build node_modules"
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import chalk from 'chalk';
|
||||
import EasCommand from '../commandUtils/EasCommand';
|
||||
import { SubmissionFragment } from '../graphql/generated';
|
||||
import { toAppPlatform } from '../graphql/types/AppPlatform';
|
||||
import Log, { learnMore } from '../log';
|
||||
import Log, { link } from '../log';
|
||||
import {
|
||||
RequestedPlatform,
|
||||
appPlatformDisplayNames,
|
||||
@@ -44,9 +44,7 @@ interface Flags {
|
||||
|
||||
export default class Submit extends EasCommand {
|
||||
static description = `submit build archive to app store
|
||||
See how to configure submits with eas.json: ${learnMore('https://docs.expo.dev/submit/eas-json/', {
|
||||
learnMoreMessage: '',
|
||||
})}`;
|
||||
See how to configure submits with eas.json: ${link('https://docs.expo.dev/submit/eas-json/')}`;
|
||||
static aliases = ['build:submit'];
|
||||
|
||||
static flags = {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class CredentialsContext {
|
||||
public readonly user: Actor;
|
||||
|
||||
private shouldAskAuthenticateAppStore: boolean = true;
|
||||
private _exp?: ExpoConfig;
|
||||
private resolvedExp?: ExpoConfig;
|
||||
|
||||
constructor(
|
||||
private options: {
|
||||
@@ -33,10 +33,10 @@ export class CredentialsContext {
|
||||
this.user = options.user;
|
||||
this.nonInteractive = options.nonInteractive ?? false;
|
||||
|
||||
this._exp = options.exp;
|
||||
if (!this._exp) {
|
||||
this.resolvedExp = options.exp;
|
||||
if (!this.resolvedExp) {
|
||||
try {
|
||||
this._exp = getExpoConfig(options.projectDir);
|
||||
this.resolvedExp = getExpoConfig(options.projectDir);
|
||||
} catch (error) {
|
||||
// ignore error, context might be created outside of expo project
|
||||
}
|
||||
@@ -44,12 +44,12 @@ export class CredentialsContext {
|
||||
}
|
||||
|
||||
get hasProjectContext(): boolean {
|
||||
return !!this._exp;
|
||||
return !!this.resolvedExp;
|
||||
}
|
||||
|
||||
get exp(): ExpoConfig {
|
||||
this.ensureProjectContext();
|
||||
return this._exp!;
|
||||
return this.resolvedExp!;
|
||||
}
|
||||
|
||||
public ensureProjectContext(): void {
|
||||
|
||||
@@ -61,7 +61,7 @@ export function formatDistributionCertificate(
|
||||
return line;
|
||||
}
|
||||
|
||||
async function _selectDistributionCertificateAsync(
|
||||
async function selectDistributionCertificateAsync(
|
||||
distCerts: AppleDistributionCertificateFragment[],
|
||||
validDistributionCertificates?: AppleDistributionCertificateFragment[]
|
||||
): Promise<AppleDistributionCertificateFragment | null> {
|
||||
@@ -93,7 +93,7 @@ export async function selectDistributionCertificateWithDependenciesAsync(
|
||||
return null;
|
||||
}
|
||||
if (!ctx.appStore.authCtx) {
|
||||
return _selectDistributionCertificateAsync(distCertsForAccount);
|
||||
return selectDistributionCertificateAsync(distCertsForAccount);
|
||||
}
|
||||
|
||||
// get valid certs on the developer portal
|
||||
@@ -103,7 +103,7 @@ export async function selectDistributionCertificateWithDependenciesAsync(
|
||||
certInfoFromApple
|
||||
);
|
||||
|
||||
return _selectDistributionCertificateAsync(distCertsForAccount, validDistCerts);
|
||||
return selectDistributionCertificateAsync(distCertsForAccount, validDistCerts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,7 +121,7 @@ export async function selectValidDistributionCertificateAsync(
|
||||
return null;
|
||||
}
|
||||
if (!ctx.appStore.authCtx) {
|
||||
return _selectDistributionCertificateAsync(distCertsForAccount);
|
||||
return selectDistributionCertificateAsync(distCertsForAccount);
|
||||
}
|
||||
|
||||
// filter by apple team
|
||||
@@ -140,7 +140,7 @@ export async function selectValidDistributionCertificateAsync(
|
||||
Log.log(
|
||||
`${validDistCerts.length}/${distCertsForAccount.length} Distribution Certificates are currently valid for Apple Team ${ctx.appStore.authCtx?.team.id}.`
|
||||
);
|
||||
return _selectDistributionCertificateAsync(validDistCerts);
|
||||
return selectDistributionCertificateAsync(validDistCerts);
|
||||
}
|
||||
|
||||
const APPLE_DIST_CERTS_TOO_MANY_GENERATED_ERROR = `
|
||||
|
||||
@@ -15,8 +15,8 @@ export function formatDistributionCertificate({
|
||||
created,
|
||||
ownerName,
|
||||
}: DistributionCertificateStoreInfo): string {
|
||||
const expiresDate = _formatTimestamp(expires);
|
||||
const createdDate = _formatTimestamp(created);
|
||||
const expiresDate = formatTimestamp(expires);
|
||||
const createdDate = formatTimestamp(created);
|
||||
return `${name} (${status}) - ID: ${id} - expires: ${expiresDate} (created: ${createdDate}) - owner: ${ownerName}`;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ export function isPushKey(obj: { [key: string]: any }): obj is PushKey {
|
||||
);
|
||||
}
|
||||
|
||||
function _formatTimestamp(timestamp: number): string {
|
||||
function formatTimestamp(timestamp: number): string {
|
||||
return dateformat(new Date(timestamp * 1000));
|
||||
}
|
||||
+22
-11
@@ -91,10 +91,30 @@ export default class Log {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a link for given URL, using text if provided, otherwise text is just the URL.
|
||||
* Format links as dim (unless disabled) and with an underline.
|
||||
*
|
||||
* @example https://expo.dev
|
||||
*/
|
||||
export function link(
|
||||
url: string,
|
||||
{ text = url, dim = true }: { text?: string; dim?: boolean } = {}
|
||||
): string {
|
||||
let output: string;
|
||||
// Links can be disabled via env variables https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
|
||||
if (terminalLink.isSupported) {
|
||||
output = terminalLink(text, url);
|
||||
} else {
|
||||
output = `${text === url ? '' : text + ': '}${chalk.underline(url)}`;
|
||||
}
|
||||
return dim ? chalk.dim(output) : output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a consistent "Learn more" link experience.
|
||||
* Format links as dim (unless disabled) with an underline.
|
||||
*
|
||||
* @example Learn more: https://expo.dev
|
||||
* @param url
|
||||
*/
|
||||
export function learnMore(
|
||||
url: string,
|
||||
@@ -103,14 +123,5 @@ export function learnMore(
|
||||
dim = true,
|
||||
}: { learnMoreMessage?: string; dim?: boolean } = {}
|
||||
): string {
|
||||
// Links can be disabled via env variables https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
|
||||
if (terminalLink.isSupported) {
|
||||
const text = terminalLink(maybeLearnMoreMessage ?? 'Learn more.', url);
|
||||
return dim ? chalk.dim(text) : text;
|
||||
}
|
||||
const learnMoreMessage = maybeLearnMoreMessage ?? 'Learn more';
|
||||
const text = `${
|
||||
learnMoreMessage === '' ? learnMoreMessage : `${learnMoreMessage}: `
|
||||
}${chalk.underline(url)}`;
|
||||
return dim ? chalk.dim(text) : text;
|
||||
return link(url, { text: maybeLearnMoreMessage ?? 'Learn more', dim });
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { Platform } from '@expo/eas-build-job';
|
||||
import chalk from 'chalk';
|
||||
|
||||
import { AppPlatform, SubmissionFragment, SubmissionStatus } from '../graphql/generated';
|
||||
import Log, { learnMore } from '../log';
|
||||
import Log, { link } from '../log';
|
||||
import { appPlatformDisplayNames, appPlatformEmojis } from '../platform';
|
||||
import AndroidSubmitCommand from './android/AndroidSubmitCommand';
|
||||
import { SubmissionContext } from './context';
|
||||
@@ -66,9 +66,8 @@ function printInstructionsForIosSubmission(submission: SubmissionFragment): void
|
||||
'- It usually takes about 5-10 minutes depending on how busy Apple servers are.',
|
||||
// ascAppIdentifier should be always available for ios submissions but check it anyway
|
||||
submission.iosConfig?.ascAppIdentifier &&
|
||||
`- When it’s done, you can see your build here: ${learnMore(
|
||||
`https://appstoreconnect.apple.com/apps/${submission.iosConfig?.ascAppIdentifier}/appstore/ios`,
|
||||
{ learnMoreMessage: '' }
|
||||
`- When it’s done, you can see your build here: ${link(
|
||||
`https://appstoreconnect.apple.com/apps/${submission.iosConfig?.ascAppIdentifier}/appstore/ios`
|
||||
)}`,
|
||||
].join('\n');
|
||||
Log.addNewLineIfNone();
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"importHelpers": true,
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"module": "ES2020",
|
||||
"noImplicitReturns": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"outDir": "build",
|
||||
"rootDir": "src",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"typeRoots": [
|
||||
"../../node_modules/@types",
|
||||
"../../ts-declarations",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "@expo/eas-json",
|
||||
"type": "module",
|
||||
"description": "A library for interacting with the eas.json",
|
||||
"version": "0.31.0",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -21,14 +22,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": {
|
||||
"build": "tsc --project tsconfig.build.json",
|
||||
"watch": "yarn build --watch --preserveWatchOutput",
|
||||
"typecheck": "tsc",
|
||||
"prepack": "rm -rf build && yarn build",
|
||||
"test": "jest"
|
||||
"test": "jest",
|
||||
"clean": "rm -rf build node_modules"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"importHelpers": true,
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"module": "ES2020",
|
||||
"noImplicitReturns": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"outDir": "build",
|
||||
"rootDir": "src",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"typeRoots": [
|
||||
"../../node_modules/@types",
|
||||
"../../ts-declarations",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "scripts",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "0.31.0",
|
||||
"scripts": {
|
||||
"changelog-entry": "ts-node src/changelogEntry.ts",
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"importHelpers": true,
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"module": "ES2020",
|
||||
"noImplicitReturns": true,
|
||||
"strict": true,
|
||||
"target": "ES2019",
|
||||
"outDir": "build",
|
||||
"rootDir": "src",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"typeRoots": [
|
||||
"../ts-declarations",
|
||||
"./node_modules/@types"
|
||||
|
||||
Reference in new issue
Block a user