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);