refactor/match_collector: change folder structure
This commit is contained in:
@@ -390,12 +390,11 @@ async function generateChampionStats() {
|
|||||||
MONGO_HOST: 'localhost'
|
MONGO_HOST: 'localhost'
|
||||||
};
|
};
|
||||||
|
|
||||||
// Run the match collector directly with tsx (TypeScript executor) instead of docker compose
|
// Run the match collector
|
||||||
const matchCollectorPath = path.join(__dirname, '../../match_collector/index.ts');
|
execSync(`npm run dev`, {
|
||||||
execSync(`npx tsx ${matchCollectorPath}`, {
|
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
env: env,
|
env: env,
|
||||||
cwd: path.join(__dirname, '../..')
|
cwd: path.join(__dirname, '../../match_collector')
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('✅ Champion stats generated');
|
console.log('✅ Champion stats generated');
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ USER node
|
|||||||
COPY --chown=node:node package*.json ./
|
COPY --chown=node:node package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
CMD /bin/sh -c "node --import=tsx index.ts; sleep 20h"
|
CMD ["/bin/sh", "-c", "node --import=tsx src/index.ts; sleep 20h"]
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check ."
|
"format:check": "prettier --check .",
|
||||||
|
"dev": "node --import=tsx src/index.ts"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
PlatformCounts,
|
|
||||||
REGION_KEYS,
|
REGION_KEYS,
|
||||||
initPlatformCounts,
|
initPlatformCounts,
|
||||||
mergePlatformCounts,
|
mergePlatformCounts,
|
||||||
singlePlatformCount
|
singlePlatformCount
|
||||||
} from './platform'
|
} from './platform'
|
||||||
|
|
||||||
|
import type { PlatformCounts } from './platform'
|
||||||
|
|
||||||
type GoldAdvantageTag = 'ahead' | 'behind' | 'even'
|
type GoldAdvantageTag = 'ahead' | 'behind' | 'even'
|
||||||
|
|
||||||
// Item tags that can be derived from purchase patterns
|
// Item tags that can be derived from purchase patterns
|
||||||
@@ -14,7 +14,7 @@ const PLATFORMS: Record<string, string> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Platform counts for tracking item purchases per region
|
// Platform counts for tracking item purchases per region
|
||||||
type PlatformCounts = {
|
interface PlatformCounts {
|
||||||
euw: number
|
euw: number
|
||||||
eun: number
|
eun: number
|
||||||
na: number
|
na: number
|
||||||
@@ -91,9 +91,9 @@ function getPlatformKey(platform: string): keyof PlatformCounts | undefined {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
PLATFORMS,
|
PLATFORMS,
|
||||||
PlatformCounts,
|
|
||||||
PLATFORM_KEYS,
|
PLATFORM_KEYS,
|
||||||
REGION_KEYS,
|
REGION_KEYS,
|
||||||
|
PlatformCounts,
|
||||||
getPlatformBaseUrl,
|
getPlatformBaseUrl,
|
||||||
getRegionalBaseUrl,
|
getRegionalBaseUrl,
|
||||||
getRegionForPlatform,
|
getRegionForPlatform,
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"types": ["node"]
|
"types": ["node"],
|
||||||
|
"declaration": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user