eas-cli 23.0.0 → 23.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +174 -149
- package/build/api.d.ts +1 -0
- package/build/api.js +12 -0
- package/build/commandUtils/new/commands.d.ts +16 -1
- package/build/commandUtils/new/commands.js +59 -20
- package/build/commandUtils/new/projectFiles.d.ts +2 -1
- package/build/commandUtils/new/projectFiles.js +24 -1
- package/build/commandUtils/new/sdkVersion.d.ts +17 -0
- package/build/commandUtils/new/sdkVersion.js +138 -0
- package/build/commandUtils/workflow/logs/fetchLogs.d.ts +5 -0
- package/build/commandUtils/workflow/logs/fetchLogs.js +24 -0
- package/build/commandUtils/workflow/logs/parseLogs.d.ts +14 -0
- package/build/commandUtils/workflow/logs/parseLogs.js +69 -0
- package/build/commandUtils/workflow/logs/watcher.d.ts +32 -0
- package/build/commandUtils/workflow/logs/watcher.js +162 -0
- package/build/commandUtils/workflow/stateMachine.js +2 -1
- package/build/commandUtils/workflow/types.d.ts +12 -5
- package/build/commandUtils/workflow/utils.d.ts +9 -5
- package/build/commandUtils/workflow/utils.js +144 -146
- package/build/commands/project/new.d.ts +1 -0
- package/build/commands/project/new.js +13 -2
- package/build/commands/simulator/get.js +2 -0
- package/build/commands/simulator/index.d.ts +1 -0
- package/build/commands/simulator/index.js +10 -0
- package/build/commands/simulator/list.d.ts +1 -0
- package/build/commands/simulator/list.js +9 -0
- package/build/commands/workflow/run.d.ts +8 -0
- package/build/commands/workflow/run.js +27 -0
- package/build/commands/workflow/ssh.d.ts +31 -0
- package/build/commands/workflow/ssh.js +190 -0
- package/build/graphql/generated.d.ts +243 -3
- package/build/graphql/generated.js +28 -4
- package/build/graphql/mutations/RealtimeLogsMutation.d.ts +6 -0
- package/build/graphql/mutations/RealtimeLogsMutation.js +40 -0
- package/build/graphql/mutations/WorkflowRunMutation.d.ts +3 -2
- package/build/graphql/mutations/WorkflowRunMutation.js +4 -1
- package/build/graphql/queries/DeviceRunSessionQuery.js +5 -0
- package/build/graphql/queries/WorkflowJobSshQuery.d.ts +20 -0
- package/build/graphql/queries/WorkflowJobSshQuery.js +133 -0
- package/build/ora.d.ts +7 -0
- package/build/ora.js +12 -0
- package/build/simulator/utils.js +9 -1
- package/build/utils/centrifuge.d.ts +10 -0
- package/build/utils/centrifuge.js +89 -0
- package/build/utils/expodash/uniqBy.js +3 -2
- package/build/worker/upload.d.ts +14 -1
- package/build/worker/upload.js +81 -17
- package/oclif.manifest.json +397 -287
- package/package.json +12 -10
- package/build/commandUtils/workflow/fetchLogs.d.ts +0 -6
- package/build/commandUtils/workflow/fetchLogs.js +0 -44
- package/build/onboarding/git.d.ts +0 -16
- package/build/onboarding/git.js +0 -88
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eas-cli",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"description": "EAS command line tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"@expo/code-signing-certificates": "0.0.5",
|
|
49
49
|
"@expo/config": "55.0.10",
|
|
50
50
|
"@expo/config-plugins": "55.0.7",
|
|
51
|
-
"@expo/eas-build-job": "23.
|
|
52
|
-
"@expo/eas-json": "23.
|
|
51
|
+
"@expo/eas-build-job": "23.1.0",
|
|
52
|
+
"@expo/eas-json": "23.1.0",
|
|
53
53
|
"@expo/env": "^1.0.0",
|
|
54
54
|
"@expo/json-file": "8.3.3",
|
|
55
|
-
"@expo/logger": "23.
|
|
55
|
+
"@expo/logger": "23.1.0",
|
|
56
56
|
"@expo/multipart-body-parser": "2.0.0",
|
|
57
57
|
"@expo/osascript": "2.1.4",
|
|
58
58
|
"@expo/package-manager": "1.9.10",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@expo/results": "1.0.0",
|
|
65
65
|
"@expo/rudder-sdk-node": "1.1.1",
|
|
66
66
|
"@expo/spawn-async": "1.7.2",
|
|
67
|
-
"@expo/steps": "23.
|
|
67
|
+
"@expo/steps": "23.1.0",
|
|
68
68
|
"@expo/timeago.js": "1.0.0",
|
|
69
69
|
"@oclif/core": "^4.8.3",
|
|
70
70
|
"@oclif/plugin-autocomplete": "^3.2.40",
|
|
@@ -72,11 +72,12 @@
|
|
|
72
72
|
"@sentry/node": "7.77.0",
|
|
73
73
|
"@urql/core": "4.0.11",
|
|
74
74
|
"@urql/exchange-retry": "1.2.0",
|
|
75
|
-
"agent-cli-detector": "0.1.
|
|
75
|
+
"agent-cli-detector": "0.1.7",
|
|
76
76
|
"ajv": "8.11.0",
|
|
77
77
|
"ajv-formats": "2.1.1",
|
|
78
78
|
"better-opn": "3.0.2",
|
|
79
79
|
"bplist-parser": "^0.3.0",
|
|
80
|
+
"centrifuge": "5.7.1",
|
|
80
81
|
"chalk": "4.1.2",
|
|
81
82
|
"cli-progress": "3.12.0",
|
|
82
83
|
"dateformat": "4.6.3",
|
|
@@ -104,7 +105,7 @@
|
|
|
104
105
|
"log-symbols": "4.1.0",
|
|
105
106
|
"mime": "3.0.0",
|
|
106
107
|
"minimatch": "5.1.2",
|
|
107
|
-
"minizlib": "3.0
|
|
108
|
+
"minizlib": "3.1.0",
|
|
108
109
|
"nanoid": "3.3.8",
|
|
109
110
|
"node-fetch": "2.6.7",
|
|
110
111
|
"node-forge": "1.4.0",
|
|
@@ -130,8 +131,9 @@
|
|
|
130
131
|
"tslib": "2.6.2",
|
|
131
132
|
"turndown": "7.1.2",
|
|
132
133
|
"untildify": "4.0.0",
|
|
133
|
-
"uuid": "
|
|
134
|
+
"uuid": "11.1.1",
|
|
134
135
|
"wrap-ansi": "7.0.0",
|
|
136
|
+
"ws": "8.21.1",
|
|
135
137
|
"yaml": "2.6.0",
|
|
136
138
|
"zod": "^4.1.3"
|
|
137
139
|
},
|
|
@@ -159,8 +161,8 @@
|
|
|
159
161
|
"@types/tar": "6.1.10",
|
|
160
162
|
"@types/tar-stream": "3.1.3",
|
|
161
163
|
"@types/tough-cookie": "4.0.2",
|
|
162
|
-
"@types/uuid": "9.0.7",
|
|
163
164
|
"@types/wrap-ansi": "3.0.0",
|
|
165
|
+
"@types/ws": "8.5.10",
|
|
164
166
|
"axios": "1.18.1",
|
|
165
167
|
"eslint-plugin-graphql": "4.0.0",
|
|
166
168
|
"jest": "29.7.0",
|
|
@@ -266,5 +268,5 @@
|
|
|
266
268
|
"engines": {
|
|
267
269
|
"node": ">=20.0.0"
|
|
268
270
|
},
|
|
269
|
-
"gitHead": "
|
|
271
|
+
"gitHead": "74292d2ace404759ab8936d5aa1369e15d4b4f9d"
|
|
270
272
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WorkflowJobResult } from './types';
|
|
2
|
-
import { ExpoGraphqlClient } from '../context/contextUtils/createGraphqlClient';
|
|
3
|
-
export declare function fetchRawLogsForCustomJobAsync(job: WorkflowJobResult): Promise<string | null>;
|
|
4
|
-
export declare function fetchRawLogsForBuildJobAsync(state: {
|
|
5
|
-
graphqlClient: ExpoGraphqlClient;
|
|
6
|
-
}, job: WorkflowJobResult): Promise<string | null>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchRawLogsForCustomJobAsync = fetchRawLogsForCustomJobAsync;
|
|
4
|
-
exports.fetchRawLogsForBuildJobAsync = fetchRawLogsForBuildJobAsync;
|
|
5
|
-
const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
|
|
6
|
-
// This function is in a separate module for testing purposes
|
|
7
|
-
async function fetchRawLogsForCustomJobAsync(job) {
|
|
8
|
-
const firstLogFileUrl = job.turtleJobRun?.logFileUrls?.[0];
|
|
9
|
-
if (!firstLogFileUrl) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
const response = await fetch(firstLogFileUrl, {
|
|
13
|
-
method: 'GET',
|
|
14
|
-
});
|
|
15
|
-
const rawLogs = await response.text();
|
|
16
|
-
return rawLogs;
|
|
17
|
-
}
|
|
18
|
-
async function fetchRawLogsForBuildJobAsync(state, job) {
|
|
19
|
-
// Prefer turtleJobRun logs, which contain JSONL-formatted step logs
|
|
20
|
-
// for both built-in and custom build steps
|
|
21
|
-
const turtleLogFileUrl = job.turtleJobRun?.logFileUrls?.[0];
|
|
22
|
-
if (turtleLogFileUrl) {
|
|
23
|
-
const response = await fetch(turtleLogFileUrl, {
|
|
24
|
-
method: 'GET',
|
|
25
|
-
});
|
|
26
|
-
return await response.text();
|
|
27
|
-
}
|
|
28
|
-
// Fall back to build logFiles
|
|
29
|
-
const buildId = job.outputs?.build_id;
|
|
30
|
-
if (!buildId) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const buildFragment = await BuildQuery_1.BuildQuery.byIdAsync(state.graphqlClient, buildId, {
|
|
34
|
-
useCache: false,
|
|
35
|
-
});
|
|
36
|
-
const firstLogFileUrl = buildFragment.logFiles?.[0];
|
|
37
|
-
if (!firstLogFileUrl) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
const response = await fetch(firstLogFileUrl, {
|
|
41
|
-
method: 'GET',
|
|
42
|
-
});
|
|
43
|
-
return await response.text();
|
|
44
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare function runGitCloneAsync({ targetProjectDir, githubRepositoryName, githubUsername, cloneMethod, showOutput, }: {
|
|
2
|
-
githubUsername: string;
|
|
3
|
-
githubRepositoryName: string;
|
|
4
|
-
targetProjectDir: string;
|
|
5
|
-
cloneMethod: 'ssh' | 'https';
|
|
6
|
-
showOutput?: boolean;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
targetProjectDir: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function runGitPushAsync({ targetProjectDir, }: {
|
|
11
|
-
targetProjectDir: string;
|
|
12
|
-
}): Promise<void>;
|
|
13
|
-
export declare function canAccessRepositoryUsingSshAsync({ githubUsername, githubRepositoryName, }: {
|
|
14
|
-
githubUsername: string;
|
|
15
|
-
githubRepositoryName: string;
|
|
16
|
-
}): Promise<boolean>;
|
package/build/onboarding/git.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runGitCloneAsync = runGitCloneAsync;
|
|
4
|
-
exports.runGitPushAsync = runGitPushAsync;
|
|
5
|
-
exports.canAccessRepositoryUsingSshAsync = canAccessRepositoryUsingSshAsync;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
8
|
-
const runCommand_1 = require("./runCommand");
|
|
9
|
-
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
10
|
-
const prompts_1 = require("../prompts");
|
|
11
|
-
async function runGitCloneAsync({ targetProjectDir, githubRepositoryName, githubUsername, cloneMethod, showOutput = true, }) {
|
|
12
|
-
const url = cloneMethod === 'ssh'
|
|
13
|
-
? `git@github.com:${githubUsername}/${githubRepositoryName}.git`
|
|
14
|
-
: `https://github.com/${githubUsername}/${githubRepositoryName}.git`;
|
|
15
|
-
try {
|
|
16
|
-
await (0, runCommand_1.runCommandAsync)({
|
|
17
|
-
command: 'git',
|
|
18
|
-
args: ['clone', url, targetProjectDir],
|
|
19
|
-
shouldPrintStderrLineAsStdout: line => {
|
|
20
|
-
return line.includes('Cloning into');
|
|
21
|
-
},
|
|
22
|
-
showSpinner: false,
|
|
23
|
-
showOutput,
|
|
24
|
-
});
|
|
25
|
-
return { targetProjectDir };
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error.stderr.includes('already exists')) {
|
|
29
|
-
log_1.default.warn(`Directory ${targetProjectDir} already exists.`);
|
|
30
|
-
const shouldContinue = await (0, prompts_1.confirmAsync)({
|
|
31
|
-
message: 'Do you want to clone your project to some other destination?',
|
|
32
|
-
});
|
|
33
|
-
if (!shouldContinue) {
|
|
34
|
-
throw new Error('Directory already exists. Aborting...');
|
|
35
|
-
}
|
|
36
|
-
const { newTargetProjectDir } = await (0, prompts_1.promptAsync)({
|
|
37
|
-
type: 'text',
|
|
38
|
-
name: 'newTargetProjectDir',
|
|
39
|
-
message: 'New target directory path:',
|
|
40
|
-
validate: (input) => input !== '',
|
|
41
|
-
});
|
|
42
|
-
return await runGitCloneAsync({
|
|
43
|
-
githubRepositoryName,
|
|
44
|
-
githubUsername,
|
|
45
|
-
targetProjectDir: newTargetProjectDir,
|
|
46
|
-
cloneMethod,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
else if (error.stderr.includes('Permission denied')) {
|
|
50
|
-
log_1.default.warn(`It seems like you do not have permission to clone the repository using ${cloneMethod}.`);
|
|
51
|
-
const newMethod = cloneMethod === 'ssh' ? 'https' : 'ssh';
|
|
52
|
-
const shouldContinue = await (0, prompts_1.confirmAsync)({
|
|
53
|
-
message: `Do you want to clone the repository using ${newMethod} instead?`,
|
|
54
|
-
});
|
|
55
|
-
if (!shouldContinue) {
|
|
56
|
-
throw new Error('Permission denied. Aborting...');
|
|
57
|
-
}
|
|
58
|
-
return await runGitCloneAsync({
|
|
59
|
-
githubRepositoryName,
|
|
60
|
-
githubUsername,
|
|
61
|
-
targetProjectDir,
|
|
62
|
-
cloneMethod: newMethod,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw error;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
async function runGitPushAsync({ targetProjectDir, }) {
|
|
71
|
-
await (0, runCommand_1.runCommandAsync)({
|
|
72
|
-
command: 'git',
|
|
73
|
-
args: ['push'],
|
|
74
|
-
cwd: targetProjectDir,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
async function canAccessRepositoryUsingSshAsync({ githubUsername, githubRepositoryName, }) {
|
|
78
|
-
try {
|
|
79
|
-
await (0, spawn_async_1.default)('git', [
|
|
80
|
-
'ls-remote',
|
|
81
|
-
`git@github.com:${githubUsername}/${githubRepositoryName}.git`,
|
|
82
|
-
]);
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
}
|