Skip to content

Commit

Permalink
corrects publishing with weird temp (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikey authored Sep 1, 2022
1 parent f1015d6 commit 7b33870
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/function/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -74,6 +76,7 @@ export const run = (options: any) => {
publishFunction(
readFileSync(`${buildDir}/manifest.json`),
readFileSync(`${buildDir}/${wasmArchive}`),
wasmArchive,
publishCallback
);
};

0 comments on commit 7b33870

Please sign in to comment.