Compare commits
No commits in common. "9649666195f23613d433832983db37b662b8baf6" and "6afefcec5b504778f96f7f44c7ba424e0323d8b9" have entirely different histories.
9649666195
...
6afefcec5b
|
|
@ -13,7 +13,6 @@ const DATA_HISTORY_MAX_DAYS = 30 // Keep 30 days of data size history
|
||||||
const SAMPLE_INTERVAL_MS = 10_000 // How often to sample process metrics
|
const SAMPLE_INTERVAL_MS = 10_000 // How often to sample process metrics
|
||||||
const HISTORY_MAX_SAMPLES = 60 // Keep 10 minutes of history at 10s intervals
|
const HISTORY_MAX_SAMPLES = 60 // Keep 10 minutes of history at 10s intervals
|
||||||
|
|
||||||
const APPS_DIR = process.env.APPS_DIR!
|
|
||||||
const TOES_DIR = process.env.TOES_DIR!
|
const TOES_DIR = process.env.TOES_DIR!
|
||||||
const TOES_URL = process.env.TOES_URL!
|
const TOES_URL = process.env.TOES_URL!
|
||||||
|
|
||||||
|
|
@ -179,12 +178,9 @@ setInterval(sampleAndRecordHistory, SAMPLE_INTERVAL_MS)
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
function getDataSize(appName: string): number {
|
function getDataSize(appName: string): number {
|
||||||
let total = 0
|
|
||||||
const appDir = join(APPS_DIR, appName)
|
|
||||||
if (existsSync(appDir)) total += dirSize(appDir)
|
|
||||||
const dataDir = join(TOES_DIR, appName)
|
const dataDir = join(TOES_DIR, appName)
|
||||||
if (existsSync(dataDir)) total += dirSize(dataDir)
|
if (!existsSync(dataDir)) return 0
|
||||||
return total
|
return dirSize(dataDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
function dirSize(dir: string): number {
|
function dirSize(dir: string): number {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ interface TemplateVars {
|
||||||
APP_NAME: string
|
APP_NAME: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const SHARED_FILES = ['CLAUDE.md', '.gitignore', '.npmrc', 'package.json', 'tsconfig.json']
|
|
||||||
const TEMPLATES_DIR = join(import.meta.dir, '../../templates')
|
const TEMPLATES_DIR = join(import.meta.dir, '../../templates')
|
||||||
|
|
||||||
function readDir(dir: string): string[] {
|
function readDir(dir: string): string[] {
|
||||||
|
|
@ -46,7 +45,7 @@ export function generateTemplates(appName: string, template: TemplateType = 'ssr
|
||||||
const result: AppTemplates = {}
|
const result: AppTemplates = {}
|
||||||
|
|
||||||
// Read shared files from templates/
|
// Read shared files from templates/
|
||||||
for (const filename of SHARED_FILES) {
|
for (const filename of ['.npmrc', 'package.json', 'tsconfig.json']) {
|
||||||
const path = join(TEMPLATES_DIR, filename)
|
const path = join(TEMPLATES_DIR, filename)
|
||||||
let content = readFileSync(path, 'utf-8')
|
let content = readFileSync(path, 'utf-8')
|
||||||
content = replaceVars(content, vars)
|
content = replaceVars(content, vars)
|
||||||
|
|
|
||||||
39
templates/.gitignore
vendored
39
templates/.gitignore
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
# dependencies (bun install)
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# dev data
|
|
||||||
data/
|
|
||||||
|
|
||||||
# honk honk
|
|
||||||
.claude/settings.local.json
|
|
||||||
|
|
||||||
# output
|
|
||||||
dist/
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# code coverage
|
|
||||||
coverage
|
|
||||||
*.lcov
|
|
||||||
|
|
||||||
# logs
|
|
||||||
logs
|
|
||||||
_.log
|
|
||||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
|
||||||
|
|
||||||
# dotenv environment variable files
|
|
||||||
.env
|
|
||||||
.env.development.local
|
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
.env.local
|
|
||||||
|
|
||||||
# caches
|
|
||||||
.eslintcache
|
|
||||||
.cache
|
|
||||||
*.tsbuildinfo
|
|
||||||
|
|
||||||
# IntelliJ based IDEs
|
|
||||||
.idea
|
|
||||||
|
|
||||||
# Finder (MacOS) folder config
|
|
||||||
.DS_Store
|
|
||||||
Loading…
Reference in New Issue
Block a user