File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ cp googleapis/google/type/latlng.proto \
6565
6666popd
6767
68- # Use npx to run local binaries, as $(npm bin) is deprecated
6968PBJS=" npx pbjs"
7069PBTS=" npx pbts"
7170
@@ -77,10 +76,11 @@ ${PBJS} -t static-module -w commonjs -o compiledFirestore.js \
7776${PBJS} -t static-module -w es6 -o compiledFirestore.mjs \
7877 data.proto any.proto
7978
79+ # Generate Types
80+ ${PBTS} -o compiledFirestore.d.ts compiledFirestore.js
81+ #
8082# Fix imports for Node ESM in the generated .mjs file.
8183# See: https://github.com/protobufjs/protobuf.js/issues/1929
82-
83- # Use a portable sed command that works on both Mac (BSD) and Linux (GNU)
8484if [[ " $OSTYPE " == " darwin" * ]]; then
8585 # 1. Append .js extension: Node ESM requires full paths for subpath imports not in 'exports'.
8686 sed -i ' ' ' s|protobufjs/minimal|protobufjs/minimal.js|g' compiledFirestore.mjs
9494 sed -i ' s|import \* as \$protobuf|import \$protobuf|g' compiledFirestore.mjs
9595fi
9696
97- # Generate Types
98- ${PBTS} -o compiledFirestore.d.ts compiledFirestore.js
You can’t perform that action at this time.
0 commit comments