From 460102ac442a2b7aa41f73d91a7f1301b9686db7 Mon Sep 17 00:00:00 2001 From: Curtis Date: Wed, 14 Aug 2024 11:25:56 +0100 Subject: [PATCH] fix: external build update for new generated code (#264) Signed-off-by: Curtish --- externals/run.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/externals/run.sh b/externals/run.sh index 39338aefc..95b7f79fb 100755 --- a/externals/run.sh +++ b/externals/run.sh @@ -46,8 +46,10 @@ buildDIDComm() { cd "${GenDIDComm}-wasm-browser" if is_mac; then sed -i '' "/if (typeof input === 'undefined') {/,/}/d" didcomm_js.js + sed -i '' "/if (typeof module_or_path === 'undefined') {/,/}/d" didcomm_js.js else sed -i "/if (typeof input === 'undefined') {/,/}/d" didcomm_js.js + sed -i "/if (typeof module_or_path === 'undefined') {/,/}/d" didcomm_js.js fi cd $ExternalsDir @@ -70,9 +72,9 @@ buildJWT() { #The code will fully work cd "${GenJWERust}-wasm-browser" if is_mac; then - sed -i '' "/if (typeof input === 'undefined') {/,/}/d" jwe_rust.js + sed -i '' "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" jwe_rust.js else - sed -i "/if (typeof input === 'undefined') {/,/}/d" jwe_rust.js + sed -i "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" jwe_rust.js fi cd $ExternalsDir @@ -95,9 +97,11 @@ buildAnonCreds() { #The code will fully work cd "${GenAnonCreds}-wasm-browser" if is_mac; then - sed -i '' "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js" + sed -i '' "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js" + else - sed -i "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js" + sed -i "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js" + fi cd $ExternalsDir git submodule | grep $AnonCreds | awk '{print $1}' > "./${AnonCreds}.commit"