feat: re-added rest of the asset gens

This commit is contained in:
TrèsAbhi committed 2023-12-06 10:17:42 -06:00
1 parent 9df47777d0
commit 9a44b1fcfb
9 files changed
+187 -183

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
import { readDVPL } from './readDVPL';
export async function readBase64DVPL(file: string) {
const buffer = await readDVPL(file);
return buffer.toString('base64');
}
+1 -3
View File
@@ -1,4 +1,4 @@
import { Octokit } from '@octokit/rest';
import { octokit } from './octokit';
const TIME_PER_BLOB = 2 ** 4 * 1000;
@@ -9,7 +9,6 @@ export interface FileChange {
}
export default async function commitMultipleFiles(
octokit: Octokit,
owner: string,
repo: string,
branch: string,
@@ -61,7 +60,6 @@ export default async function commitMultipleFiles(
`Failed blob ${changeIndex + 1} / ${
changes.length
}; retrying in ${TIME_PER_BLOB}ms...`,
error,
);
await new Promise((resolve) => setTimeout(resolve, TIME_PER_BLOB));
+1 -1
View File
@@ -3,13 +3,13 @@ import { TankType, TreeTypeString } from '../../../components/Tanks';
import { asset } from '../asset';
export interface TankDefinition {
id: number;
nation: string;
name: string;
name_short?: string;
tree_type: TreeTypeString;
tier: Tier;
type: TankType;
testing?: boolean;
}
export type TankDefinitions = Record<number, TankDefinition>;
+3
View File
@@ -1,4 +1,7 @@
import { throttling } from '@octokit/plugin-throttling';
import { Octokit } from '@octokit/rest';
import { secrets } from './secrets';
Octokit.plugin(throttling);
export const octokit = new Octokit({ auth: secrets.GH_TOKEN });