Skip to content

Instantly share code, notes, and snippets.

@hi-ogawa
Created October 31, 2022 08:13
Show Gist options
  • Save hi-ogawa/ac432cde56e12bcf0f54da6ea3adbd3b to your computer and use it in GitHub Desktop.
Save hi-ogawa/ac432cde56e12bcf0f54da6ea3adbd3b to your computer and use it in GitHub Desktop.
patch-package eas-cli to test "eas build --local" without expo account
diff --git a/node_modules/eas-cli/build/commandUtils/context/DynamicProjectConfigContextField.js b/node_modules/eas-cli/build/commandUtils/context/DynamicProjectConfigContextField.js
index f59d57f..5c68793 100644
--- a/node_modules/eas-cli/build/commandUtils/context/DynamicProjectConfigContextField.js
+++ b/node_modules/eas-cli/build/commandUtils/context/DynamicProjectConfigContextField.js
@@ -11,6 +11,11 @@ class DynamicProjectConfigContextField extends ContextField_1.default {
return async (options) => {
const projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectDirAndVerifyProjectSetupAsync)();
const expBefore = (0, expoConfig_1.getExpoConfig)(projectDir, options);
+ return {
+ exp: expBefore,
+ projectDir,
+ projectId: expBefore.extra.eas.projectId,
+ }
const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
nonInteractive,
env: options === null || options === void 0 ? void 0 : options.env,
diff --git a/node_modules/eas-cli/build/project/projectUtils.js b/node_modules/eas-cli/build/project/projectUtils.js
index 76dc730..ddf0cb3 100644
--- a/node_modules/eas-cli/build/project/projectUtils.js
+++ b/node_modules/eas-cli/build/project/projectUtils.js
@@ -95,6 +95,7 @@ async function installExpoUpdatesAsync(projectDir) {
}
exports.installExpoUpdatesAsync = installExpoUpdatesAsync;
async function getOwnerAccountForProjectIdAsync(graphqlClient, projectId) {
+ return {};
const app = await AppQuery_1.AppQuery.byIdAsync(graphqlClient, projectId);
return app.ownerAccount;
}
diff --git a/node_modules/eas-cli/build/user/SessionManager.js b/node_modules/eas-cli/build/user/SessionManager.js
index bede042..8830962 100644
--- a/node_modules/eas-cli/build/user/SessionManager.js
+++ b/node_modules/eas-cli/build/user/SessionManager.js
@@ -55,6 +55,7 @@ class SessionManager {
await this.setSessionAsync(undefined);
}
async getUserAsync() {
+ return {};
if (!this.currentActor && (this.getAccessToken() || this.getSessionSecret())) {
const authenticationInfo = {
accessToken: this.getAccessToken(),
@@ -75,6 +76,7 @@ class SessionManager {
* @returns logged-in Actor
*/
async ensureLoggedInAsync({ nonInteractive, }) {
+ return { actor: {}, authenticationInfo: {} };
let actor;
try {
actor = await this.getUserAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment