File size: 1,262 Bytes
deae345
5ca5202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
deae345
12506f0
deae345
44fe180
e4e0e54
 
 
deae345
5dfc565
 
 
deae345
92ae21d
44fe180
c4b02b2
44fe180
deae345
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import path from "node:path"
import fs from "node:fs"

import dotenv from "dotenv"

dotenv.config()

try {
  if (fs.existsSync(".env.local")) {
    const result = dotenv.config({ path: ".env.local" })
    console.log("using .env.local")
    process.env = {
      ...process.env,
      ...result.parsed,
    }
  }
} catch (err) {
  // do nothing
  console.log("using .env")
}

export const storagePath = `${process.env.VC_STORAGE_PATH || './sandbox'}`

// those are persistent storage (we want to keep the data for months/years)
export const metadataDirPath = path.join(storagePath, "metadata")
export const pendingMetadataDirFilePath = path.join(metadataDirPath, "pending")
export const completedMetadataDirFilePath =  path.join(metadataDirPath, "completed")

export const filesDirPath = path.join(storagePath, "files")
export const pendingFilesDirFilePath = path.join(filesDirPath, "pending")
export const completedFilesDirFilePath =  path.join(filesDirPath, "completed")

// this is a semi-persistent storage (we will want to renew it from time to time)
export const cacheDirPath = path.join(storagePath, "cache")
export const renderedDirFilePath = path.join(cacheDirPath, "rendered")

export const shotFormatVersion = 1
export const sequenceFormatVersion = 1