eoas 2.2.1 → 2.2.2
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/dist/commands/publish.js +12 -4
- package/dist/lib/assets.d.ts +10 -3
- package/dist/lib/assets.js +2 -2
- package/package.json +1 -1
package/dist/commands/publish.js
CHANGED
|
@@ -70,6 +70,7 @@ class Publish extends core_1.Command {
|
|
|
70
70
|
}
|
|
71
71
|
const vcsClient = (0, vcs_1.resolveVcsClient)(true);
|
|
72
72
|
await vcsClient.ensureRepoExistsAsync();
|
|
73
|
+
const commitHash = await vcsClient.getCommitHashAsync();
|
|
73
74
|
await (0, repo_1.ensureRepoIsCleanAsync)(vcsClient, nonInteractive);
|
|
74
75
|
const projectDir = process.cwd();
|
|
75
76
|
const hasExpo = (0, package_1.isExpoInstalled)(projectDir);
|
|
@@ -161,8 +162,8 @@ class Publish extends core_1.Command {
|
|
|
161
162
|
exportSpinner.succeed('🚀 Project exported successfully');
|
|
162
163
|
log_1.default.withInfo(stdout);
|
|
163
164
|
}
|
|
164
|
-
catch {
|
|
165
|
-
exportSpinner.fail(
|
|
165
|
+
catch (e) {
|
|
166
|
+
exportSpinner.fail(`❌ Failed to export the project, ${e}`);
|
|
166
167
|
process.exit(1);
|
|
167
168
|
}
|
|
168
169
|
const publicConfig = await (0, expoConfig_1.getPublicExpoConfigAsync)(projectDir, {
|
|
@@ -191,8 +192,15 @@ class Publish extends core_1.Command {
|
|
|
191
192
|
}
|
|
192
193
|
return {
|
|
193
194
|
...(await (0, assets_1.requestUploadUrls)({
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
body: {
|
|
196
|
+
fileNames: files.map(file => file.path),
|
|
197
|
+
},
|
|
198
|
+
requestUploadUrl: `${baseUrl}/requestUploadUrl/${branch}`,
|
|
199
|
+
auth: credentials,
|
|
200
|
+
runtimeVersion,
|
|
201
|
+
platform,
|
|
202
|
+
commitHash,
|
|
203
|
+
})),
|
|
196
204
|
runtimeVersion,
|
|
197
205
|
platform,
|
|
198
206
|
};
|
package/dist/lib/assets.d.ts
CHANGED
|
@@ -13,9 +13,16 @@ export interface RequestUploadUrlItem {
|
|
|
13
13
|
fileName: string;
|
|
14
14
|
filePath: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function requestUploadUrls(body: {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
export declare function requestUploadUrls({ body, requestUploadUrl, auth, runtimeVersion, platform, commitHash, }: {
|
|
17
|
+
body: {
|
|
18
|
+
fileNames: string[];
|
|
19
|
+
};
|
|
20
|
+
requestUploadUrl: string;
|
|
21
|
+
auth: ExpoCredentials;
|
|
22
|
+
runtimeVersion: string;
|
|
23
|
+
platform: string;
|
|
24
|
+
commitHash?: string;
|
|
25
|
+
}): Promise<{
|
|
19
26
|
uploadRequests: RequestUploadUrlItem[];
|
|
20
27
|
updateId: string;
|
|
21
28
|
}>;
|
package/dist/lib/assets.js
CHANGED
|
@@ -73,8 +73,8 @@ function computeFilesRequests(projectDir, requestedPlatform) {
|
|
|
73
73
|
return assets;
|
|
74
74
|
}
|
|
75
75
|
exports.computeFilesRequests = computeFilesRequests;
|
|
76
|
-
async function requestUploadUrls(body, requestUploadUrl, auth, runtimeVersion) {
|
|
77
|
-
const response = await (0, node_fetch_1.default)(`${requestUploadUrl}?runtimeVersion=${runtimeVersion}`, {
|
|
76
|
+
async function requestUploadUrls({ body, requestUploadUrl, auth, runtimeVersion, platform, commitHash, }) {
|
|
77
|
+
const response = await (0, node_fetch_1.default)(`${requestUploadUrl}?runtimeVersion=${runtimeVersion}&platform=${platform}&commitHash=${commitHash || ''}`, {
|
|
78
78
|
method: 'POST',
|
|
79
79
|
headers: {
|
|
80
80
|
...(0, auth_1.getAuthExpoHeaders)(auth),
|