Skip to content

Commit 0b5bb62

Browse files
committed
chore: wip
1 parent b66b4f2 commit 0b5bb62

File tree

2 files changed

+94
-40
lines changed

2 files changed

+94
-40
lines changed

config/cloud.ts

Lines changed: 78 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,91 @@ import security from './security'
1010
* any questions, feel free to reach out via Discord or GitHub Discussions.
1111
*/
1212
export default {
13-
type: 'serverless',
14-
driver: 'aws',
15-
firewall: security.firewall,
16-
environments: ['production', 'staging', 'development'],
17-
18-
storage: {},
19-
20-
api: {
21-
prefix: env.API_PREFIX || 'api',
22-
// version: 'v1',
23-
description: 'My awesome Stacks API',
24-
deploy: true,
25-
memorySize: 512,
26-
prewarm: 10,
27-
timeout: 30,
28-
},
13+
sites: {
14+
root: 'stacksjs.org',
15+
path: 'dist',
16+
17+
modals: {
18+
domain: 'modals.stacksjs.org',
19+
path: 'dist',
20+
},
21+
22+
stepper: {
23+
domain: 'stepper.stacksjs.org',
24+
path: 'dist',
25+
},
2926

30-
cdn: {
31-
compress: true,
27+
notification: {
28+
domain: 'notification.stacksjs.org',
29+
path: 'dist',
30+
},
3231

33-
allowedMethods: 'ALL',
34-
cachedMethods: 'GET_HEAD',
35-
originShieldRegion: 'us-east-1',
36-
minTtl: 0,
37-
defaultTtl: 86400,
38-
maxTtl: 31536000,
39-
cookieBehavior: 'none',
32+
docs: {
33+
domain: 'docs.stacksjs.org',
34+
path: 'dist',
35+
},
4036

41-
allowList: {
42-
cookies: [],
43-
headers: [],
44-
queryStrings: [],
37+
tlsx: {
38+
domain: 'tlsx.stacksjs.org',
39+
path: 'dist',
4540
},
4641

47-
realtimeLogs: {
48-
enabled: true,
49-
samplingRate: 1,
42+
dtsx: {
43+
domain: 'dtsx.stacksjs.org',
44+
path: 'dist',
45+
},
46+
47+
spreadsheet: {
48+
domain: 'spreadsheet.stacksjs.org',
49+
path: 'dist',
5050
},
5151
},
5252

53-
fileSystem: true, // enables file system
53+
infrastructure: {
54+
type: 'serverless',
55+
driver: 'aws',
56+
firewall: security.firewall,
57+
environments: ['production', 'staging', 'development'],
58+
59+
storage: {},
5460

55-
// compute: {},
56-
// queues: false,
57-
// queue-concurrency: 50
61+
api: {
62+
prefix: env.API_PREFIX || 'api',
63+
// version: 'v1',
64+
description: 'My awesome Stacks API',
65+
deploy: true,
66+
memorySize: 512,
67+
prewarm: 10,
68+
timeout: 30,
69+
},
70+
71+
cdn: {
72+
compress: true,
73+
74+
allowedMethods: 'ALL',
75+
cachedMethods: 'GET_HEAD',
76+
originShieldRegion: 'us-east-1',
77+
minTtl: 0,
78+
defaultTtl: 86400,
79+
maxTtl: 31536000,
80+
cookieBehavior: 'none',
81+
82+
allowList: {
83+
cookies: [],
84+
headers: [],
85+
queryStrings: [],
86+
},
87+
88+
realtimeLogs: {
89+
enabled: true,
90+
samplingRate: 1,
91+
},
92+
},
93+
94+
fileSystem: true, // enables file system
95+
96+
// compute: {},
97+
// queues: false,
98+
// queue-concurrency: 50
99+
},
58100
} satisfies CloudConfig

storage/framework/core/types/src/cloud.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,15 @@ export type CountryCode =
254254

255255
type Environment = 'development' | 'staging' | 'production'
256256

257-
export interface CloudOptions {
258-
type: 'serverless' // | 'server' coming soon
257+
type SiteConfig = {
258+
domain: string
259+
path: string
260+
}
259261

262+
type InfrastuctureOptions = Partial<{
263+
type: 'serverless' // | 'server' coming soon
260264
driver: 'aws'
261-
262265
api: ApiConfig
263-
264266
storage: object
265267

266268
/**
@@ -325,6 +327,16 @@ export interface CloudOptions {
325327
cli: boolean
326328
docs: boolean
327329
fileSystem: boolean
330+
}>
331+
332+
export interface CloudOptions {
333+
sites: {
334+
root: string
335+
path: string
336+
[site: string]: string | SiteConfig
337+
}
338+
339+
infrastructure: InfrastuctureOptions
328340
}
329341

330342
export type CloudConfig = Partial<CloudOptions>

0 commit comments

Comments
 (0)