diff --git a/copy_generated_types_from_lemmy.sh b/copy_generated_types_from_lemmy.sh index 662befe..1acc1ab 100755 --- a/copy_generated_types_from_lemmy.sh +++ b/copy_generated_types_from_lemmy.sh @@ -1,7 +1,7 @@ #!/bin/bash # First re-generate the types by running cargo test on lemmy -cd ../lemmy/scripts +pushd ../lemmy/scripts ./test.sh cd ../crates @@ -13,7 +13,13 @@ cp db_views/bindings/* ../../lemmy-js-client/src/types/ cp db_views_actor/bindings/* ../../lemmy-js-client/src/types/ cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/ -# Change all the bigints to numbers -find ../../lemmy-js-client/src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} + +popd + +# Remove the Sensitive type +rm src/types/Sensitive.ts + +# Change all the bigints to numbers +find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} + + +node putTypesInIndex.js -node ../../lemmy-js-client/putTypesInIndex.js