@keplr-wallet/proto-types 0.12.237 → 0.12.238

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/proto-types",
3
- "version": "0.12.237",
3
+ "version": "0.12.238",
4
4
  "author": "chainapsis",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -20,5 +20,5 @@
20
20
  "devDependencies": {
21
21
  "ts-proto": "^1.106.2"
22
22
  },
23
- "gitHead": "e73349b7a93df74a2dc2ec91f62f14fa39917519"
23
+ "gitHead": "859c7192a3373ecd9301991cd0f7773bc17565ad"
24
24
  }
@@ -72,21 +72,19 @@ function setOutputHash(root, hash) {
72
72
  }
73
73
 
74
74
  const protoTsBinPath = (() => {
75
- try {
75
+ const maxDepth = 6;
76
+ let currentDir = __dirname;
77
+ for (let i = 0; i < maxDepth; i++) {
76
78
  const binPath = path.join(
77
- __dirname,
78
- "../../node_modules/.bin/protoc-gen-ts_proto"
79
+ currentDir,
80
+ "node_modules/.bin/protoc-gen-ts_proto"
79
81
  );
80
- fs.readFileSync(binPath);
81
- return binPath;
82
- } catch {
83
- const binPath = path.join(
84
- __dirname,
85
- "../../../../node_modules/.bin/protoc-gen-ts_proto"
86
- );
87
- fs.readFileSync(binPath);
88
- return binPath;
82
+ if (fs.existsSync(binPath)) {
83
+ return binPath;
84
+ }
85
+ currentDir = path.join(currentDir, "..");
89
86
  }
87
+ throw new Error("Cannot find protoc-gen-ts_proto");
90
88
  })();
91
89
 
92
90
  const baseDirPath = path.join(__dirname, "..");