From 7b33870310054677956aa509a9e2288c45f3c7ff Mon Sep 17 00:00:00 2001 From: Derek Anderson Date: Thu, 1 Sep 2022 11:30:03 -0500 Subject: [PATCH] corrects publishing with weird temp (#37) --- src/commands/function/publish.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/function/publish.ts b/src/commands/function/publish.ts index 150237c..36f2362 100644 --- a/src/commands/function/publish.ts +++ b/src/commands/function/publish.ts @@ -14,17 +14,19 @@ const deploymentOptions: IDeploymentOptions = { }; const server = "https://wasi.bls.dev"; +// const server = "http://127.0.0.1:3000"; const token = getToken(); export const publishFunction = async ( manifest: any, archive: any, + archiveName: string, cb?: Function ) => { const formData = new FormData(); - formData.append("manifest", manifest); - formData.append("wasi_archive", archive); + formData.append("manifest", manifest, "manifest.json"); + formData.append("wasi_archive", archive, archiveName); axios .post(`${server}/api/submit`, formData, { @@ -74,6 +76,7 @@ export const run = (options: any) => { publishFunction( readFileSync(`${buildDir}/manifest.json`), readFileSync(`${buildDir}/${wasmArchive}`), + wasmArchive, publishCallback ); };