Skip to content

Commit 02255c0

Browse files
committed
app/scripts: update auctioneer proto path
1 parent 26bbb77 commit 02255c0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/scripts/build-protos.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
const util = require('util');
33
const https = require('https');
44
const exec = util.promisify(require('child_process').exec);
5-
const { promises: fs } = require('fs');
6-
const { join, sep } = require('path');
5+
const { promises: fs, mkdirSync } = require('fs');
6+
const { join, sep, dirname } = require('path');
77
const { platform } = require('os');
88
const appPath = join(__dirname, '..');
99

@@ -41,7 +41,7 @@ const protoSources = async () => {
4141
lnd: `lightningnetwork/lnd/${lndVersion[1]}/lnrpc/rpc.proto`,
4242
loop: `lightninglabs/loop/${loopVersion[1]}/looprpc/client.proto`,
4343
trader: `lightninglabs/pool/${poolVersion[1]}/poolrpc/trader.proto`,
44-
auctioneer: `lightninglabs/pool/${poolVersion[1]}/poolrpc/auctioneer.proto`,
44+
'auctioneerrpc/auctioneer': `lightninglabs/pool/${poolVersion[1]}/auctioneerrpc/auctioneer.proto`,
4545
};
4646
};
4747

@@ -50,7 +50,7 @@ const filePatches = {
5050
lnd: 'lnrpc: {}',
5151
loop: 'looprpc: {}',
5252
trader: 'poolrpc: {}',
53-
auctioneer: 'poolrpc: {}',
53+
'auctioneerrpc/auctioneer': 'poolrpc: {}',
5454
'google/api/annotations': 'google: { api: {} }',
5555
'google/api/http': 'google: { api: {} }',
5656
};
@@ -63,6 +63,7 @@ const download = async () => {
6363
for ([name, urlPath] of Object.entries(await protoSources())) {
6464
const url = `https://raw.githubusercontent.com/${urlPath}`;
6565
const filePath = join(appPath, '..', 'proto', `${name}.proto`);
66+
mkdirSync(dirname(filePath), {recursive: true});
6667
console.log(`${url}`);
6768
console.log(` -> ${filePath}`);
6869
const content = await new Promise((resolve, reject) => {
@@ -92,6 +93,7 @@ const generate = async () => {
9293
);
9394
const protocCmd = [
9495
'protoc',
96+
`-I../proto`,
9597
`--plugin=protoc-gen-ts=${protocGen}`,
9698
'--proto_path=../proto',
9799
'--js_out=import_style=commonjs,binary:./src/types/generated',

0 commit comments

Comments
 (0)