From 6adb1affe4cb3d0e23b272d5f829b8395a8c63d3 Mon Sep 17 00:00:00 2001 From: theBeardA <35360097+theBeardA@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:21:02 -0700 Subject: [PATCH] small fixes --- src/commands/functions/utils/getWasmCodeFromPath.ts | 6 +----- .../waitForPersonalAccessTokenFromVerificationSession.ts | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/commands/functions/utils/getWasmCodeFromPath.ts b/src/commands/functions/utils/getWasmCodeFromPath.ts index c6992b8..3774b6e 100644 --- a/src/commands/functions/utils/getWasmCodeFromPath.ts +++ b/src/commands/functions/utils/getWasmCodeFromPath.ts @@ -35,7 +35,6 @@ const enryptCode = async (args: { filePath: string }) => { const { filePath } = args; const buffer = await getWasm(filePath); - if (!buffer) { output.error(t('invalidWasmCode', { path: filePath })); throw new FleekFunctionInvalidWasmCodeError({}) @@ -61,10 +60,8 @@ const enryptCode = async (args: { filePath: string }) => { fs.mkdirSync(tempDir); } } - const outFile = `${tempDir}/function.wasm`; - progressBar.start(100, 10); try { const encryptedData = encrypt(PUBLIC_KEY, buffer); @@ -72,14 +69,13 @@ const enryptCode = async (args: { filePath: string }) => { await fs.promises.writeFile(outFile, encryptedData); } catch (error) { + progressBar.stop(); throw new FleekFunctionWasmEncryptionFailedError({}) } - progressBar.update(100); progressBar.stop(); - return tempDir; }; diff --git a/src/utils/token/waitForPersonalAccessTokenFromVerificationSession.ts b/src/utils/token/waitForPersonalAccessTokenFromVerificationSession.ts index f345126..c54896e 100644 --- a/src/utils/token/waitForPersonalAccessTokenFromVerificationSession.ts +++ b/src/utils/token/waitForPersonalAccessTokenFromVerificationSession.ts @@ -19,9 +19,9 @@ export const waitForPersonalAccessTokenFromVerificationSession = async ({ conditionFn: async () => { const response = await client .mutation({ - createPersonalAccessTokenFromVerificationSession: { - __args: { where: { id: verificationSessionId }, data: { name } }, - } + createPersonalAccessTokenFromVerificationSession: [ + { where: { id: verificationSessionId }, data: { name } }, + ], }) .catch(() => null);