unbrivate, dot com in (#2475)
This PR moves the tldraw.com app into the public repo. ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2] --------- Co-authored-by: Dan Groshev <git@dgroshev.com> Co-authored-by: alex <alex@dytry.ch>
This commit is contained in:
parent
b7fb31f8f9
commit
d7002057d7
248 changed files with 20084 additions and 245 deletions
18
scripts/lib/makeEnv.ts
Normal file
18
scripts/lib/makeEnv.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
export function makeEnv<const Keys extends readonly string[]>(
|
||||
keys: Keys
|
||||
): Record<Keys[number], string> {
|
||||
const env = {} as Record<string, string>
|
||||
const missingVars = []
|
||||
for (const key of keys) {
|
||||
const value = process.env[key]
|
||||
if (value === undefined) {
|
||||
missingVars.push(key)
|
||||
continue
|
||||
}
|
||||
env[key] = value
|
||||
}
|
||||
if (missingVars.length > 0) {
|
||||
throw new Error(`Missing environment variables: ${missingVars.join(', ')}`)
|
||||
}
|
||||
return env as Record<Keys[number], string>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue