forked from placemark/placemark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_client.ts
101 lines (100 loc) · 2.5 KB
/
env_client.ts
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { envsafe, str, num, bool } from "envsafe";
export const env = envsafe({
/**
* Accessible from your Stripe dashboard.
*/
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: str({
input: process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY,
default: "off",
}),
/**
* Key for authenticating Mapbox maps.
*/
NEXT_PUBLIC_MAPBOX_TOKEN: str({
input: process.env.NEXT_PUBLIC_MAPBOX_TOKEN,
devDefault: "_",
}),
/**
* We use geocode.earth for geocoding:
* https://geocode.earth/
*
* This is the token to authenticate with them.
*/
NEXT_PUBLIC_GEOCODE_EARTH_TOKEN: str({
input: process.env.NEXT_PUBLIC_GEOCODE_EARTH_TOKEN,
devDefault: "_",
}),
/**
* There's a separate host for websockets:
* this points to it.
*/
NEXT_PUBLIC_WS_HOST: str({
input: process.env.NEXT_PUBLIC_WS_HOST,
devDefault: "ws.placemark.io",
}),
/**
* Limit for files at the frontend side.
*/
NEXT_PUBLIC_FILE_LIMIT_MB: num({
input: process.env.NEXT_PUBLIC_FILE_LIMIT_MB,
}),
/**
* Warn people with files at least this big.
*/
NEXT_PUBLIC_FILE_WARN_MB: num({
input: process.env.NEXT_PUBLIC_FILE_WARN_MB,
}),
/**
* Domain of the site when deployed.
*/
NEXT_PUBLIC_DOMAIN_WITH_SLASH: str({
input: process.env.NEXT_PUBLIC_DOMAIN_WITH_SLASH,
devDefault: "http://localhost:3000/",
}),
/**
* Domain of the API when deployed
*/
NEXT_PUBLIC_API_BASE_WITH_SLASH: str({
input: process.env.NEXT_PUBLIC_API_BASE_WITH_SLASH,
devDefault: "http://localhost:3000/",
}),
/**
* Key for authenticating with Replicache
* https://replicache.dev/
*/
NEXT_PUBLIC_REPLICACHE_KEY: str({
input: process.env.NEXT_PUBLIC_REPLICACHE_KEY,
devDefault: "_",
}),
/**
* Price ID for enterprise accounts. Found in your
* Stripe dashboard.
*/
NEXT_PUBLIC_STRIPE_PRICE_ID_ENTERPRISE: str({
input: process.env.NEXT_PUBLIC_STRIPE_PRICE_ID_ENTERPRISE,
default: "off",
}),
/**
* Using Posthog for product analytics
* https://posthog.com/
*
* This is from their dashboard.
*/
NEXT_PUBLIC_POSTHOG_API_TOKEN: str({
input: process.env.NEXT_PUBLIC_POSTHOG_API_TOKEN,
default: "off",
}),
NEXT_PUBLIC_POSTHOG_API_HOST: str({
input: process.env.NEXT_PUBLIC_POSTHOG_API_HOST,
default: "off",
}),
/**
* I think this is unused: feel free to confirm
* and submit a PR.
*/
NEXT_PUBLIC_SKIP_PAYMENT: bool({
input: process.env.NEXT_PUBLIC_SKIP_PAYMENT,
devDefault: false,
default: false,
}),
});