mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: detached cdn branch
This commit is contained in:
1 parent
ed041b78bb
commit
48dcbbc227
43 files changed
+267
-397
No files matched your search
+16
-22
@@ -1,5 +1,4 @@
|
||||
import { chunk, times } from 'lodash';
|
||||
import { argv } from 'process';
|
||||
import { Region, REGIONS } from '../src/constants/regions';
|
||||
import { getAccountInfo } from '../src/core/blitz/getAccountInfo';
|
||||
import getTankStats from '../src/core/blitz/getTankStats';
|
||||
@@ -36,8 +35,7 @@ const THREADS = 10;
|
||||
const PLAYER_IDS_PER_CALL = 100;
|
||||
|
||||
const startTime = Date.now();
|
||||
const production = argv.includes('--production');
|
||||
const preDiscoveredIds = await fetchPreDiscoveredIds(!production);
|
||||
const preDiscoveredIds = await fetchPreDiscoveredIds();
|
||||
const playerIds: Record<Region, number[][]> = {
|
||||
asia: chunk(
|
||||
preDiscoveredIds.filter((id) => idToRegion(id) === 'asia'),
|
||||
@@ -223,23 +221,19 @@ async function postWork() {
|
||||
latest,
|
||||
};
|
||||
|
||||
commitAssets(
|
||||
'averages',
|
||||
[
|
||||
{
|
||||
path: `averages/${latest}.pb`,
|
||||
content: await encodeToBase64(
|
||||
'blitzkit/blitzkit.AverageDefinitions',
|
||||
averageDefinitions,
|
||||
),
|
||||
encoding: 'base64',
|
||||
},
|
||||
{
|
||||
path: 'averages/manifest.json',
|
||||
content: JSON.stringify(manifest),
|
||||
encoding: 'utf-8',
|
||||
},
|
||||
],
|
||||
production,
|
||||
);
|
||||
commitAssets('averages', [
|
||||
{
|
||||
path: `averages/${latest}.pb`,
|
||||
content: await encodeToBase64(
|
||||
'blitzkit/blitzkit.AverageDefinitions',
|
||||
averageDefinitions,
|
||||
),
|
||||
encoding: 'base64',
|
||||
},
|
||||
{
|
||||
path: 'averages/manifest.json',
|
||||
content: JSON.stringify(manifest),
|
||||
encoding: 'utf-8',
|
||||
},
|
||||
]);
|
||||
}
|
||||
Reference in new issue
Block a user