@na-ji/pogo-protos 2.59.0 → 2.59.1
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 +1 -1
- package/fs.js +0 -7
- package/proto/POGOProtos.proto +0 -4
- package/proto/compile.js +0 -36
package/package.json
CHANGED
package/fs.js
DELETED
package/proto/POGOProtos.proto
DELETED
package/proto/compile.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
let fs = require('fs').promises;
|
|
3
|
-
let path = require('path');
|
|
4
|
-
|
|
5
|
-
async function parseDir(directory, rel) {
|
|
6
|
-
let content = '';
|
|
7
|
-
for (let child of await fs.readdir(directory)) {
|
|
8
|
-
let sub = path.join(directory, child);
|
|
9
|
-
let stat = await fs.stat(sub);
|
|
10
|
-
if (stat.isDirectory()) {
|
|
11
|
-
content += await parseDir(sub, `${rel}/${child}`);
|
|
12
|
-
} else if (child.endsWith('.proto')) {
|
|
13
|
-
content += `import public "${rel}/${child}";\n`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return content;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async function build() {
|
|
20
|
-
let content = '';
|
|
21
|
-
|
|
22
|
-
content += 'syntax = "proto3";\n';
|
|
23
|
-
content += 'package POGOProtos;\n\n';
|
|
24
|
-
|
|
25
|
-
for (let child of await fs.readdir(__dirname)) {
|
|
26
|
-
let sub = path.join(__dirname, child);
|
|
27
|
-
let stat = await fs.stat(sub);
|
|
28
|
-
if (stat.isDirectory()) {
|
|
29
|
-
content += await parseDir(sub, child);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
await fs.writeFile(path.join(__dirname, 'POGOProtos.proto'), content);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
build().then(() => console.log('Done.'));
|