@stacksjs/ts-cloud 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws/index.js +1 -269
- package/dist/bin/chunk-00kg80qg.js +1 -0
- package/dist/bin/{chunk-hzqw8xm5.js → chunk-1k5kszjp.js} +1 -1
- package/dist/bin/{chunk-9v39615t.js → chunk-21e0mavm.js} +1 -1
- package/dist/bin/{chunk-waayf9ay.js → chunk-2empps47.js} +1 -1
- package/dist/bin/{chunk-14cwr6eh.js → chunk-3vqfexc4.js} +1 -1
- package/dist/bin/chunk-5ectjq0b.js +1 -0
- package/dist/bin/{chunk-b5gd39s8.js → chunk-5erkxpt7.js} +4 -4
- package/dist/bin/{chunk-41x17hw1.js → chunk-5mrtzemj.js} +1 -1
- package/dist/bin/{chunk-p8q9bq9g.js → chunk-5n9fmabb.js} +1 -1
- package/dist/bin/{chunk-gqf6jsmy.js → chunk-9knpg30y.js} +1 -1
- package/dist/bin/{chunk-r3kv0vm9.js → chunk-ddk4rt4j.js} +1 -1
- package/dist/bin/{chunk-avm7tnwe.js → chunk-e0rkrq70.js} +1 -1
- package/dist/bin/{chunk-ry030a6b.js → chunk-etrb03mt.js} +1 -1
- package/dist/bin/{chunk-8v7ddyvf.js → chunk-k9t9wvms.js} +1 -1
- package/dist/bin/{chunk-92mea34a.js → chunk-m7dgskt1.js} +1 -1
- package/dist/bin/{chunk-3r4fb59r.js → chunk-mz0wbbsj.js} +1 -1
- package/dist/bin/{chunk-b9qbp8j1.js → chunk-qk9qgepa.js} +1 -1
- package/dist/bin/chunk-rxcvf10f.js +7364 -0
- package/dist/bin/{chunk-r9hjwcj9.js → chunk-tga3hhwk.js} +1 -1
- package/dist/bin/{chunk-ynjvbphf.js → chunk-tx0tqq2k.js} +1 -1
- package/dist/bin/{chunk-57y1zxbf.js → chunk-vm3q5gf2.js} +1 -1
- package/dist/bin/{chunk-bz828v8q.js → chunk-y7s5r8y6.js} +1 -1
- package/dist/bin/{chunk-sgyffpgm.js → chunk-zmegvjp8.js} +1 -1
- package/dist/bin/cli.js +14 -14
- package/dist/bin/dashboard-server.js +1 -1
- package/dist/chunk-0ccta6z6.js +6 -0
- package/dist/chunk-0k1cs6pp.js +1 -0
- package/dist/chunk-1egjn203.js +704 -0
- package/dist/chunk-2wx29qga.js +5 -0
- package/dist/chunk-5m5rqmv7.js +1 -0
- package/dist/chunk-8ea5022g.js +114 -0
- package/dist/chunk-8xqn3c0w.js +2 -0
- package/dist/chunk-b4esxhmw.js +2 -0
- package/dist/chunk-b8e5wzwn.js +44 -0
- package/dist/chunk-bggt4n6e.js +2 -0
- package/dist/chunk-cwkg37rs.js +37 -0
- package/dist/chunk-dskvqt67.js +7355 -0
- package/dist/chunk-gahsdmxf.js +1617 -0
- package/dist/chunk-gnv3r2jg.js +1 -0
- package/dist/chunk-hg3c48cp.js +34 -0
- package/dist/chunk-m5azeva3.js +2 -0
- package/dist/chunk-r3qf56b3.js +92 -0
- package/dist/chunk-sdqa9ghv.js +141 -0
- package/dist/chunk-svrvvcm7.js +1 -0
- package/dist/chunk-v0p3hpc3.js +60 -0
- package/dist/chunk-wdzjbecg.js +50 -0
- package/dist/chunk-ww8k3g7j.js +1 -0
- package/dist/chunk-xmqfc62w.js +1 -0
- package/dist/chunk-xrebj679.js +435 -0
- package/dist/chunk-xt3s24vr.js +2 -0
- package/dist/chunk-y21zk0pn.js +4 -0
- package/dist/deploy/index.js +1 -168
- package/dist/dns/index.js +1 -41
- package/dist/drivers/index.js +1 -154
- package/dist/index.js +100 -6129
- package/dist/protection/index.js +1 -89
- package/dist/push/index.js +1 -509
- package/dist/spend/index.js +1 -173
- package/dist/ui/404.html +1 -1
- package/dist/ui/accept-invitation.html +1 -1
- package/dist/ui/access-denied.html +1 -1
- package/dist/ui/account/automation.html +6 -6
- package/dist/ui/account/security.html +2 -2
- package/dist/ui/applications/compose.html +6 -6
- package/dist/ui/applications/new.html +2 -2
- package/dist/ui/data/backups.html +5 -5
- package/dist/ui/data/services.html +5 -5
- package/dist/ui/data/volumes.html +6 -6
- package/dist/ui/index.html +6 -6
- package/dist/ui/infrastructure/topology.html +5 -5
- package/dist/ui/integrations.html +1 -1
- package/dist/ui/operations/alerts.html +5 -5
- package/dist/ui/operations/configuration.html +5 -5
- package/dist/ui/operations/jobs.html +5 -5
- package/dist/ui/operations/maintenance.html +5 -5
- package/dist/ui/operations/observability.html +6 -6
- package/dist/ui/operations/previews.html +6 -6
- package/dist/ui/operations/queue.html +6 -6
- package/dist/ui/operations/regions.html +6 -6
- package/dist/ui/operations/releases.html +6 -6
- package/dist/ui/operations/spend.html +6 -6
- package/dist/ui/operations/workloads.html +6 -6
- package/dist/ui/security.html +1 -1
- package/dist/ui/server/actions.html +5 -5
- package/dist/ui/server/activity.html +1 -1
- package/dist/ui/server/capacity.html +6 -6
- package/dist/ui/server/database.html +6 -6
- package/dist/ui/server/deployments.html +6 -6
- package/dist/ui/server/diagnostics.html +2 -2
- package/dist/ui/server/firewall.html +6 -6
- package/dist/ui/server/fleet.html +6 -6
- package/dist/ui/server/logs.html +6 -6
- package/dist/ui/server/metrics.html +6 -6
- package/dist/ui/server/security.html +2 -2
- package/dist/ui/server/services.html +1 -1
- package/dist/ui/server/sites.html +6 -6
- package/dist/ui/server/ssh-keys.html +6 -6
- package/dist/ui/server/team.html +6 -6
- package/dist/ui/server/terminal.html +1 -1
- package/dist/ui/serverless/alarms.html +5 -5
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +1 -1
- package/dist/ui/serverless/data.html +6 -6
- package/dist/ui/serverless/deployments.html +2 -2
- package/dist/ui/serverless/firewall.html +1 -1
- package/dist/ui/serverless/functions.html +6 -6
- package/dist/ui/serverless/logs.html +6 -6
- package/dist/ui/serverless/metrics.html +2 -2
- package/dist/ui/serverless/queues.html +6 -6
- package/dist/ui/serverless/secrets.html +6 -6
- package/dist/ui/serverless/traces.html +6 -6
- package/dist/ui/serverless.html +5 -5
- package/package.json +3 -3
- package/dist/bin/chunk-jpjamjey.js +0 -6935
- package/dist/bin/chunk-m2zwtapr.js +0 -1
- package/dist/bin/chunk-rtczra13.js +0 -1
- package/dist/chunk-01d86gt1.js +0 -1324
- package/dist/chunk-050r7ycy.js +0 -46516
- package/dist/chunk-1c8dbv57.js +0 -7278
- package/dist/chunk-29rse4p1.js +0 -12203
- package/dist/chunk-32e7ya18.js +0 -642
- package/dist/chunk-4cjrg98a.js +0 -597
- package/dist/chunk-50jpda9q.js +0 -371
- package/dist/chunk-6a1t7fnq.js +0 -12121
- package/dist/chunk-728jvrr0.js +0 -1701
- package/dist/chunk-7m60qnc8.js +0 -1762
- package/dist/chunk-aa2dkn7b.js +0 -205
- package/dist/chunk-d48vtdj4.js +0 -433
- package/dist/chunk-f55nkpvb.js +0 -8
- package/dist/chunk-fgk8cqew.js +0 -152
- package/dist/chunk-he9a874b.js +0 -769
- package/dist/chunk-k2yyatfw.js +0 -10
- package/dist/chunk-k4px0bnv.js +0 -23
- package/dist/chunk-nsgqsmrh.js +0 -1779
- package/dist/chunk-q0st3se8.js +0 -42033
- package/dist/chunk-qr803fye.js +0 -2122
- package/dist/chunk-rds0sy87.js +0 -1771
- package/dist/chunk-ttz2ra5j.js +0 -12
- package/dist/chunk-v0bahtg2.js +0 -4
- package/dist/chunk-va2yd85b.js +0 -200
- package/dist/chunk-x9s0cqfx.js +0 -13
- package/dist/chunk-zqtpg06c.js +0 -1752
package/dist/aws/index.js
CHANGED
|
@@ -1,269 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ApplicationAutoScalingClient,
|
|
3
|
-
AwsBackupClient,
|
|
4
|
-
BedrockAgentClient,
|
|
5
|
-
BedrockAgentRuntimeClient,
|
|
6
|
-
BedrockClient,
|
|
7
|
-
BedrockRuntimeClient,
|
|
8
|
-
CloudWatchLogsClient,
|
|
9
|
-
ComprehendClient,
|
|
10
|
-
ConnectClient,
|
|
11
|
-
CostExplorerClient,
|
|
12
|
-
DynamoDBClient,
|
|
13
|
-
ECSClient,
|
|
14
|
-
EFSClient,
|
|
15
|
-
ELBv2Client,
|
|
16
|
-
ElastiCacheClient,
|
|
17
|
-
EventBridgeClient,
|
|
18
|
-
ImapServer,
|
|
19
|
-
KendraClient,
|
|
20
|
-
LambdaClient,
|
|
21
|
-
OpenSearchClient,
|
|
22
|
-
PersonalizeClient,
|
|
23
|
-
PersonalizeEventsClient,
|
|
24
|
-
PersonalizeRuntimeClient,
|
|
25
|
-
PollyClient,
|
|
26
|
-
RekognitionClient,
|
|
27
|
-
Route53DomainsClient,
|
|
28
|
-
SNSClient,
|
|
29
|
-
SQSClient,
|
|
30
|
-
STSClient,
|
|
31
|
-
SchedulerClient,
|
|
32
|
-
SecretsManagerClient,
|
|
33
|
-
SmsClient,
|
|
34
|
-
SmtpServer,
|
|
35
|
-
SupportClient,
|
|
36
|
-
SupportTemplates,
|
|
37
|
-
TextractClient,
|
|
38
|
-
TranscribeClient,
|
|
39
|
-
TranslateClient,
|
|
40
|
-
VoiceClient,
|
|
41
|
-
analyzeSentiment,
|
|
42
|
-
completeWithClaude,
|
|
43
|
-
containsPii,
|
|
44
|
-
countFacesInS3Image,
|
|
45
|
-
createDeliveryReceiptHandler,
|
|
46
|
-
createObjectStorageClient,
|
|
47
|
-
createRecordingHandler,
|
|
48
|
-
createSSML,
|
|
49
|
-
createScheduledSmsHandler,
|
|
50
|
-
createSmsClient,
|
|
51
|
-
createSmsInboxHandler,
|
|
52
|
-
createSmsInfrastructure,
|
|
53
|
-
createVoiceClient,
|
|
54
|
-
createVoicemailHandler,
|
|
55
|
-
detectLabelsFromS3,
|
|
56
|
-
detectLanguage,
|
|
57
|
-
extractEntities,
|
|
58
|
-
extractFormsFromS3,
|
|
59
|
-
extractTablesFromS3,
|
|
60
|
-
extractTextFromS3,
|
|
61
|
-
formatPhoneNumber,
|
|
62
|
-
generateEmbeddings,
|
|
63
|
-
getCountryCode,
|
|
64
|
-
getRecommendations,
|
|
65
|
-
getSimilarItems,
|
|
66
|
-
getSmsInfrastructureStatus,
|
|
67
|
-
isContentSafe,
|
|
68
|
-
isSamePhoneNumber,
|
|
69
|
-
isValidPhoneNumber,
|
|
70
|
-
keyMatchesFilters,
|
|
71
|
-
listClaudeModels,
|
|
72
|
-
listLanguages,
|
|
73
|
-
listVoices,
|
|
74
|
-
migrateObjectStorage,
|
|
75
|
-
normalizePhoneNumber,
|
|
76
|
-
providerEndpoint,
|
|
77
|
-
remapKey,
|
|
78
|
-
requestModelAccess,
|
|
79
|
-
resolveObjectStorage,
|
|
80
|
-
retrieveForRag,
|
|
81
|
-
search,
|
|
82
|
-
setupSmsInfrastructure,
|
|
83
|
-
startImapServer,
|
|
84
|
-
startSmtpServer,
|
|
85
|
-
textToSpeech,
|
|
86
|
-
trackEvent,
|
|
87
|
-
translate,
|
|
88
|
-
translateToMultiple
|
|
89
|
-
} from "../chunk-6a1t7fnq.js";
|
|
90
|
-
import {
|
|
91
|
-
EmailClient,
|
|
92
|
-
IAMClient,
|
|
93
|
-
SESClient,
|
|
94
|
-
email
|
|
95
|
-
} from "../chunk-nsgqsmrh.js";
|
|
96
|
-
import {
|
|
97
|
-
CloudFrontClient
|
|
98
|
-
} from "../chunk-01d86gt1.js";
|
|
99
|
-
import {
|
|
100
|
-
ECRClient
|
|
101
|
-
} from "../chunk-50jpda9q.js";
|
|
102
|
-
import {
|
|
103
|
-
RDSClient
|
|
104
|
-
} from "../chunk-he9a874b.js";
|
|
105
|
-
import {
|
|
106
|
-
ACMClient,
|
|
107
|
-
ACMDnsValidator,
|
|
108
|
-
CloudflareProvider,
|
|
109
|
-
DnsProviderFactory,
|
|
110
|
-
GoDaddyProvider,
|
|
111
|
-
PROXIABLE_RECORD_TYPES,
|
|
112
|
-
PorkbunProvider,
|
|
113
|
-
Route53Provider,
|
|
114
|
-
UnifiedDnsValidator,
|
|
115
|
-
createDnsProvider,
|
|
116
|
-
createGoDaddyValidator,
|
|
117
|
-
createPorkbunValidator,
|
|
118
|
-
createRoute53Validator,
|
|
119
|
-
detectDnsProvider,
|
|
120
|
-
dnsProviders,
|
|
121
|
-
policyTag,
|
|
122
|
-
qualifyName,
|
|
123
|
-
reconcileDeclaredRecords,
|
|
124
|
-
resolveDeclaredRecords
|
|
125
|
-
} from "../chunk-qr803fye.js";
|
|
126
|
-
import {
|
|
127
|
-
Route53Client
|
|
128
|
-
} from "../chunk-32e7ya18.js";
|
|
129
|
-
import {
|
|
130
|
-
EC2Client,
|
|
131
|
-
SSMClient
|
|
132
|
-
} from "../chunk-7m60qnc8.js";
|
|
133
|
-
import {
|
|
134
|
-
CloudFormationClient
|
|
135
|
-
} from "../chunk-4cjrg98a.js";
|
|
136
|
-
import {
|
|
137
|
-
S3Client
|
|
138
|
-
} from "../chunk-rds0sy87.js";
|
|
139
|
-
import {
|
|
140
|
-
AWSClient,
|
|
141
|
-
buildQueryParams,
|
|
142
|
-
detectCredentialSource,
|
|
143
|
-
resolveS3Endpoint
|
|
144
|
-
} from "../chunk-zqtpg06c.js";
|
|
145
|
-
import"../chunk-v0bahtg2.js";
|
|
146
|
-
export {
|
|
147
|
-
translateToMultiple,
|
|
148
|
-
translate,
|
|
149
|
-
trackEvent,
|
|
150
|
-
textToSpeech,
|
|
151
|
-
startSmtpServer,
|
|
152
|
-
startImapServer,
|
|
153
|
-
setupSmsInfrastructure,
|
|
154
|
-
search,
|
|
155
|
-
retrieveForRag,
|
|
156
|
-
resolveS3Endpoint,
|
|
157
|
-
resolveObjectStorage,
|
|
158
|
-
resolveDeclaredRecords,
|
|
159
|
-
requestModelAccess,
|
|
160
|
-
remapKey,
|
|
161
|
-
reconcileDeclaredRecords,
|
|
162
|
-
qualifyName,
|
|
163
|
-
providerEndpoint,
|
|
164
|
-
policyTag,
|
|
165
|
-
normalizePhoneNumber,
|
|
166
|
-
migrateObjectStorage,
|
|
167
|
-
listVoices,
|
|
168
|
-
listLanguages,
|
|
169
|
-
listClaudeModels,
|
|
170
|
-
keyMatchesFilters,
|
|
171
|
-
isValidPhoneNumber,
|
|
172
|
-
isSamePhoneNumber,
|
|
173
|
-
isContentSafe,
|
|
174
|
-
getSmsInfrastructureStatus,
|
|
175
|
-
getSimilarItems,
|
|
176
|
-
getRecommendations,
|
|
177
|
-
getCountryCode,
|
|
178
|
-
generateEmbeddings,
|
|
179
|
-
formatPhoneNumber,
|
|
180
|
-
extractTextFromS3,
|
|
181
|
-
extractTablesFromS3,
|
|
182
|
-
extractFormsFromS3,
|
|
183
|
-
extractEntities,
|
|
184
|
-
email,
|
|
185
|
-
dnsProviders,
|
|
186
|
-
detectLanguage,
|
|
187
|
-
detectLabelsFromS3,
|
|
188
|
-
detectDnsProvider,
|
|
189
|
-
detectCredentialSource,
|
|
190
|
-
createVoicemailHandler,
|
|
191
|
-
createVoiceClient,
|
|
192
|
-
createSmsInfrastructure,
|
|
193
|
-
createSmsInboxHandler,
|
|
194
|
-
createSmsClient,
|
|
195
|
-
createScheduledSmsHandler,
|
|
196
|
-
createSSML,
|
|
197
|
-
createRoute53Validator,
|
|
198
|
-
createRecordingHandler,
|
|
199
|
-
createPorkbunValidator,
|
|
200
|
-
createObjectStorageClient,
|
|
201
|
-
createGoDaddyValidator,
|
|
202
|
-
createDnsProvider,
|
|
203
|
-
createDeliveryReceiptHandler,
|
|
204
|
-
countFacesInS3Image,
|
|
205
|
-
containsPii,
|
|
206
|
-
completeWithClaude,
|
|
207
|
-
buildQueryParams,
|
|
208
|
-
analyzeSentiment,
|
|
209
|
-
VoiceClient,
|
|
210
|
-
UnifiedDnsValidator,
|
|
211
|
-
TranslateClient,
|
|
212
|
-
TranscribeClient,
|
|
213
|
-
TextractClient,
|
|
214
|
-
SupportTemplates,
|
|
215
|
-
SupportClient,
|
|
216
|
-
SmtpServer,
|
|
217
|
-
SmsClient,
|
|
218
|
-
SecretsManagerClient,
|
|
219
|
-
SchedulerClient,
|
|
220
|
-
STSClient,
|
|
221
|
-
SSMClient,
|
|
222
|
-
SQSClient,
|
|
223
|
-
SNSClient,
|
|
224
|
-
SESClient,
|
|
225
|
-
S3Client,
|
|
226
|
-
Route53Provider,
|
|
227
|
-
Route53DomainsClient,
|
|
228
|
-
Route53Client,
|
|
229
|
-
RekognitionClient,
|
|
230
|
-
RDSClient,
|
|
231
|
-
PorkbunProvider,
|
|
232
|
-
PollyClient,
|
|
233
|
-
PersonalizeRuntimeClient,
|
|
234
|
-
PersonalizeEventsClient,
|
|
235
|
-
PersonalizeClient,
|
|
236
|
-
PROXIABLE_RECORD_TYPES,
|
|
237
|
-
OpenSearchClient,
|
|
238
|
-
LambdaClient,
|
|
239
|
-
KendraClient,
|
|
240
|
-
ImapServer,
|
|
241
|
-
IAMClient,
|
|
242
|
-
GoDaddyProvider,
|
|
243
|
-
EventBridgeClient,
|
|
244
|
-
EmailClient,
|
|
245
|
-
ElastiCacheClient,
|
|
246
|
-
ELBv2Client,
|
|
247
|
-
EFSClient,
|
|
248
|
-
ECSClient,
|
|
249
|
-
ECRClient,
|
|
250
|
-
EC2Client,
|
|
251
|
-
DynamoDBClient,
|
|
252
|
-
DnsProviderFactory,
|
|
253
|
-
CostExplorerClient,
|
|
254
|
-
ConnectClient,
|
|
255
|
-
ComprehendClient,
|
|
256
|
-
CloudflareProvider,
|
|
257
|
-
CloudWatchLogsClient,
|
|
258
|
-
CloudFrontClient,
|
|
259
|
-
CloudFormationClient,
|
|
260
|
-
BedrockRuntimeClient,
|
|
261
|
-
BedrockClient,
|
|
262
|
-
BedrockAgentRuntimeClient,
|
|
263
|
-
BedrockAgentClient,
|
|
264
|
-
AwsBackupClient,
|
|
265
|
-
ApplicationAutoScalingClient,
|
|
266
|
-
AWSClient,
|
|
267
|
-
ACMDnsValidator,
|
|
268
|
-
ACMClient
|
|
269
|
-
};
|
|
1
|
+
import{$d as $,$e as $a,Ae as Aa,Be as Ba,Ce as Ca,De as Da,Ee as Ea,Fe as Fa,Ge as Ga,He as Ha,Ie as Ia,Jd as k,Je as Ja,Kd as l,Ke as Ka,Ld as m,Le as La,Md as n,Me as Ma,Nd as o,Ne as Na,Od as p,Oe as Oa,Pd as q,Pe as Pa,Qd as r,Qe as Qa,Rd as t,Re as Ra,Sd as w,Se as Sa,Td as R,Te as Ta,Ud as T,Ue as Ua,Vd as U,Ve as Va,Wd as V,We as Wa,Xd as W,Xe as Xa,Yd as X,Ye as Ya,Zd as Y,Ze as Za,_d as Z,_e as _a,ae as aa,af as ab,be as ba,bf as bb,ce as ca,cf as cb,de as da,df as db,ee as ea,ef as eb,fe as fa,ff as fb,ge as ga,gf as gb,he as ha,hf as hb,ie as ia,if as ib,je as ja,jf as jb,ke as ka,kf as kb,le as la,lf as lb,me as ma,mf as mb,ne as na,nf as nb,oe as oa,pe as pa,qe as qa,re as ra,se as sa,te as ta,ue as ua,ve as va,we as wa,xe as xa,ye as ya,ze as za}from"../chunk-8ea5022g.js";import{of as e,pf as h,qf as i,rf as j}from"../chunk-hg3c48cp.js";import{sf as v}from"../chunk-sdqa9ghv.js";import{tf as Q}from"../chunk-bggt4n6e.js";import{uf as _}from"../chunk-m5azeva3.js";import{Af as B,Bf as C,Cf as D,Df as E,Ef as F,Ff as G,Gf as H,Hf as I,If as J,Jf as K,Kf as L,Lf as M,Mf as N,Nf as O,Of as P,vf as x,wf as y,xf as z,zf as A}from"../chunk-8xqn3c0w.js";import{Pf as f}from"../chunk-wdzjbecg.js";import{Nh as u,Oh as S}from"../chunk-y21zk0pn.js";import{Ph as s}from"../chunk-b4esxhmw.js";import{Rh as g}from"../chunk-r3qf56b3.js";import{Sh as a,Th as b,Uh as c,Vh as d}from"../chunk-0ccta6z6.js";import"../chunk-xt3s24vr.js";export{Da as translateToMultiple,Ca as translate,Ka as trackEvent,ya as textToSpeech,Va as startSmtpServer,Ta as startImapServer,kb as setupSmsInfrastructure,Ma as search,Na as retrieveForRag,a as resolveS3Endpoint,q as resolveObjectStorage,D as resolveDeclaredRecords,ga as requestModelAccess,m as remapKey,E as reconcileDeclaredRecords,C as qualifyName,p as providerEndpoint,B as policyTag,$a as normalizePhoneNumber,o as migrateObjectStorage,za as listVoices,Ea as listLanguages,ha as listClaudeModels,n as keyMatchesFilters,bb as isValidPhoneNumber,db as isSamePhoneNumber,sa as isContentSafe,lb as getSmsInfrastructureStatus,Ja as getSimilarItems,Ia as getRecommendations,cb as getCountryCode,ja as generateEmbeddings,ab as formatPhoneNumber,ua as extractTextFromS3,wa as extractTablesFromS3,va as extractFormsFromS3,ma as extractEntities,j as email,N as dnsProviders,na as detectLanguage,qa as detectLabelsFromS3,L as detectDnsProvider,d as detectCredentialSource,fb as createVoicemailHandler,hb as createVoiceClient,mb as createSmsInfrastructure,Xa as createSmsInboxHandler,Za as createSmsClient,Ya as createScheduledSmsHandler,Aa as createSSML,J as createRoute53Validator,gb as createRecordingHandler,H as createPorkbunValidator,r as createObjectStorageClient,I as createGoDaddyValidator,K as createDnsProvider,_a as createDeliveryReceiptHandler,ra as countFacesInS3Image,oa as containsPii,ia as completeWithClaude,c as buildQueryParams,la as analyzeSentiment,eb as VoiceClient,G as UnifiedDnsValidator,Ba as TranslateClient,ba as TranscribeClient,ta as TextractClient,jb as SupportTemplates,ib as SupportClient,Ua as SmtpServer,Wa as SmsClient,T as SecretsManagerClient,Qa as SchedulerClient,k as STSClient,S as SSMClient,V as SQSClient,U as SNSClient,h as SESClient,g as S3Client,F as Route53Provider,w as Route53DomainsClient,f as Route53Client,pa as RekognitionClient,_ as RDSClient,y as PorkbunProvider,xa as PollyClient,Ga as PersonalizeRuntimeClient,Ha as PersonalizeEventsClient,Fa as PersonalizeClient,x as PROXIABLE_RECORD_TYPES,aa as OpenSearchClient,W as LambdaClient,La as KendraClient,Sa as ImapServer,e as IAMClient,z as GoDaddyProvider,Oa as EventBridgeClient,i as EmailClient,Pa as ElastiCacheClient,Z as ELBv2Client,nb as EFSClient,R as ECSClient,Q as ECRClient,u as EC2Client,$ as DynamoDBClient,M as DnsProviderFactory,t as CostExplorerClient,Y as ConnectClient,ka as ComprehendClient,A as CloudflareProvider,X as CloudWatchLogsClient,v as CloudFrontClient,s as CloudFormationClient,ca as BedrockRuntimeClient,da as BedrockClient,ea as BedrockAgentRuntimeClient,fa as BedrockAgentClient,l as AwsBackupClient,Ra as ApplicationAutoScalingClient,b as AWSClient,P as ACMDnsValidator,O as ACMClient};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qg as a}from"./chunk-2empps47.js";import"./chunk-mr0atd2s.js";import"./chunk-271gk1n2.js";import"./chunk-fpm59y25.js";import"./chunk-rxcvf10f.js";import"./chunk-mh0kdzqp.js";export{a as buildAndPushServerlessImage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{We as ct}from"./chunk-ax9mr6wm.js";import{lg as xr,ng as p}from"./chunk-ry030a6b.js";var no=["edge.requests","edge.egress_gb","function.invocations","function.gb_seconds","build.minutes","compute.instance_hours","storage.gb_hours","object.egress_gb","object.requests","database.gb_hours","database.io_requests","telemetry.ingest_gb","image.transformations"],He={"edge.requests":{key:"edge.requests",unit:"requests",label:"Edge requests",precision:0},"edge.egress_gb":{key:"edge.egress_gb",unit:"gb",label:"Edge egress",precision:3},"function.invocations":{key:"function.invocations",unit:"invocations",label:"Function invocations",precision:0},"function.gb_seconds":{key:"function.gb_seconds",unit:"gb_seconds",label:"Function compute",precision:2},"build.minutes":{key:"build.minutes",unit:"minutes",label:"Build minutes",precision:2},"compute.instance_hours":{key:"compute.instance_hours",unit:"hours",label:"Instance hours",precision:2},"storage.gb_hours":{key:"storage.gb_hours",unit:"gb_hours",label:"Block storage",precision:2},"object.egress_gb":{key:"object.egress_gb",unit:"gb",label:"Object storage egress",precision:3},"object.requests":{key:"object.requests",unit:"requests",label:"Object storage requests",precision:0},"database.gb_hours":{key:"database.gb_hours",unit:"gb_hours",label:"Database storage",precision:2},"database.io_requests":{key:"database.io_requests",unit:"requests",label:"Database I/O",precision:0},"telemetry.ingest_gb":{key:"telemetry.ingest_gb",unit:"gb",label:"Telemetry ingest",precision:3},"image.transformations":{key:"image.transformations",unit:"count",label:"Image transformations",precision:0}},oo=["notify","block_builds","block_deployments","throttle_requests","suspend_functions","serve_static","suspend_project"],N={notify:0,block_builds:1,block_deployments:2,throttle_requests:3,suspend_functions:4,serve_static:5,suspend_project:6};var ao=1e6;function Hr(e){if(e.tiers&&e.tiers.length>0)return e.tiers;return[{upToQuantity:null,microCentsPerUnit:e.microCentsPerUnit??0}]}function Et(e,t){if(!(e>0))return 0;let r=[...t].sort((i,a)=>{if(i.upToQuantity===null)return 1;if(a.upToQuantity===null)return-1;return i.upToQuantity-a.upToQuantity}),s=e,n=0,o=0;for(let i of r){if(s<=0)break;let d=(i.upToQuantity===null?1/0:i.upToQuantity)-n;if(d<=0)continue;let c=Math.min(s,d);o+=c*i.microCentsPerUnit,s-=c,n+=c}if(s>0){let i=r.reduce((a,d)=>Math.max(a,d.microCentsPerUnit),0);o+=s*i}return o}function Lr(e,t,r,s){let n=e.entries.filter((a)=>a.meter===t);if(n.length===0)return;let o=n.filter((a)=>a.provider===r),i=o.length>0?o:n.filter((a)=>a.provider==="*");return i.find((a)=>a.region===s)??i.find((a)=>a.region==null)}function Le(e,t,r=0){let s=Lr(e,t.meter,t.provider,t.region),n=Math.max(0,t.quantity);if(!s)return{meter:t.meter,provider:t.provider??"unknown",region:t.region,quantity:n,includedQuantity:0,billableQuantity:n,costCents:0,unpriced:!0};let o=Math.max(0,s.includedQuantity??0),i=Math.max(0,r-o),a=Math.max(0,o-Math.max(0,r)),d=Math.min(n,a),c=n-d,l=Hr(s),u=Et(i+c,l)-Et(i,l);return{meter:t.meter,provider:s.provider,region:s.region??t.region,quantity:n,includedQuantity:d,billableQuantity:c,costCents:u/1e6,unpriced:!1}}function co(e,t){let r=new Map,s=[];for(let n of t){let o=`${n.meter}\x00${n.provider??""}\x00${n.region??""}`,i=r.get(o)??0,a=Le(e,n,i);r.set(o,i+a.quantity),s.push(a)}return{currency:e.currency,totalCents:s.reduce((n,o)=>n+o.costCents,0),lines:s,unpricedMeters:[...new Set(s.filter((n)=>n.unpriced).map((n)=>String(n.meter)))]}}function mo(e){return Math.round(e*100)/100}function lo(e,...t){let r=new Map,s=(o)=>`${o.meter}\x00${o.provider}\x00${o.region??""}`;for(let o of e.entries)r.set(s(o),o);let n=e.currency;for(let o of t){n=o.currency||n;for(let i of o.entries)r.set(s(i),i)}return{currency:n,entries:[...r.values()]}}var L=(e)=>Math.round(e*1e6),M=(e)=>Math.round(e*1e6),Ct={currency:"USD",entries:[{meter:"edge.requests",provider:"aws",microCentsPerUnit:M(0.00075)},{meter:"edge.egress_gb",provider:"aws",includedQuantity:100,tiers:[{upToQuantity:10240,microCentsPerUnit:L(8.5)},{upToQuantity:51200,microCentsPerUnit:L(8)},{upToQuantity:null,microCentsPerUnit:L(6)}]},{meter:"function.invocations",provider:"aws",includedQuantity:1e6,microCentsPerUnit:M(0.002)},{meter:"function.gb_seconds",provider:"aws",includedQuantity:400000,microCentsPerUnit:M(0.00166667)},{meter:"storage.gb_hours",provider:"aws",microCentsPerUnit:M(0.010958904109589041)},{meter:"object.egress_gb",provider:"aws",includedQuantity:100,microCentsPerUnit:L(9)},{meter:"object.requests",provider:"aws",microCentsPerUnit:M(0.000039999999999999996)},{meter:"database.gb_hours",provider:"aws",microCentsPerUnit:M(0.015753424657534248)},{meter:"compute.instance_hours",provider:"aws",microCentsPerUnit:M(4.16)},{meter:"edge.egress_gb",provider:"hetzner",includedQuantity:20480,microCentsPerUnit:L(0.108)},{meter:"object.egress_gb",provider:"hetzner",includedQuantity:1024,microCentsPerUnit:L(0.108)},{meter:"compute.instance_hours",provider:"hetzner",microCentsPerUnit:M(0.95)},{meter:"storage.gb_hours",provider:"hetzner",microCentsPerUnit:M(0.006027397260273972)},{meter:"edge.requests",provider:"hetzner",microCentsPerUnit:0},{meter:"edge.requests",provider:"local",microCentsPerUnit:0},{meter:"edge.egress_gb",provider:"local",microCentsPerUnit:0},{meter:"function.invocations",provider:"local",microCentsPerUnit:0},{meter:"function.gb_seconds",provider:"local",microCentsPerUnit:0},{meter:"build.minutes",provider:"*",includedQuantity:6000,microCentsPerUnit:M(0.8)},{meter:"telemetry.ingest_gb",provider:"*",includedQuantity:5,microCentsPerUnit:L(50)},{meter:"image.transformations",provider:"*",includedQuantity:5000,microCentsPerUnit:M(0.05)}]};var Pt=new Map;function Dt(e){let t=Pt.get(e);if(!t)t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hourCycle:"h23"}),Pt.set(e,t);return t}var qr={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function ve(e){try{return Dt(e),!0}catch{return!1}}function qe(e,t){let r=Dt(t).formatToParts(e),s=(n)=>r.find((o)=>o.type===n)?.value??"0";return{year:Number(s("year")),month:Number(s("month")),day:Number(s("day")),hour:Number(s("hour")),minute:Number(s("minute")),second:Number(s("second")),weekday:qr[s("weekday")]??0}}function kt(e,t){let r=qe(e,t);return Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second)-Math.floor(e.getTime()/1000)*1000}function z(e,t,r,s,n=0){let o=Date.UTC(t,r-1,s,n),i=new Date(o-kt(new Date(o),e));return new Date(o-kt(i,e))}function Jr(e,t){return new Date(Date.UTC(e,t-1,1)).toLocaleString("en-US",{month:"long",year:"numeric",timeZone:"UTC"})}function q(e,t,r=new Date){let s=ve(t)?t:"UTC",n=qe(r,s),o,i,a;if(e==="daily")o=z(s,n.year,n.month,n.day),i=z(s,n.year,n.month,n.day+1),a=`${n.year}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`;else if(e==="weekly"){let l=(n.weekday+6)%7;o=z(s,n.year,n.month,n.day-l),i=z(s,n.year,n.month,n.day-l+7);let u=qe(o,s);a=`week of ${u.year}-${String(u.month).padStart(2,"0")}-${String(u.day).padStart(2,"0")}`}else o=z(s,n.year,n.month,1),i=z(s,n.year,n.month+1,1),a=Jr(n.year,n.month);let d=i.getTime()-o.getTime(),c=Math.max(0,Math.min(d,r.getTime()-o.getTime()));return{start:o.toISOString(),end:i.toISOString(),elapsedMs:c,totalMs:d,label:a}}function go(e,t,r=new Date){let s=q(e,t,r),n=new Date(new Date(s.start).getTime()-1),o=q(e,t,n);return{...o,elapsedMs:o.totalMs}}function re(e){let r=(typeof e==="string"?new Date(e):e).getTime();if(!Number.isFinite(r))throw Error("hourBucket requires a valid date");return new Date(Math.floor(r/3600000)*3600000).toISOString()}function ho(e,t,r=9600){let s=Math.floor(new Date(e).getTime()/3600000)*3600000,n=new Date(t).getTime();if(!Number.isFinite(s)||!Number.isFinite(n))throw Error("hourBucketsBetween requires valid dates");let o=[];for(let i=s;i<n&&o.length<r;i+=3600000)o.push(new Date(i).toISOString());return o}import{createHash as Ur}from"node:crypto";var Ie=1073741824,Nt=[{match:"request.count",meter:"edge.requests"},{match:"traffic.requests",meter:"edge.requests"},{match:"http.request",meter:"edge.requests",field:"count"},{match:"traffic.bytes_out",meter:"edge.egress_gb",scale:1/Ie},{match:"storage.egress.day",meter:"object.egress_gb",scale:1/Ie},{match:"storage.egress.month",meter:"object.egress_gb",scale:1/Ie,cumulative:!0},{match:"storage.egress.day_downloads",meter:"object.requests"},{match:"function.invocation",meter:"function.invocations",field:"count"},{match:"function.duration_ms",meter:"function.gb_seconds",scale:0.001},{match:"build.duration_ms",meter:"build.minutes",scale:0.000016666666666666667},{match:"telemetry.ingest_bytes",meter:"telemetry.ingest_gb",scale:1/Ie},{match:"image.transform",meter:"image.transformations",field:"count"}];function Wr(e,t){return e.match.endsWith("*")?t.startsWith(e.match.slice(0,-1)):e.match===t}function wr(e,t=Nt){return t.find((r)=>!r.match.endsWith("*")&&r.match===e)??t.find((r)=>Wr(r,e))}function Qr(e,t){let r=t.field??"value",s=r==="count"?1:r==="bytesOut"?e.bytesOut:r==="bytesIn"?e.bytesIn:r==="durationMs"?e.durationMs:e.value;if(s==null||!Number.isFinite(s))return;return s*(t.scale??1)}function zr(e,t){return Ur("sha256").update([t,e.meter,e.organizationId,e.projectId??"",e.environmentId??"",e.resourceId??"",e.timestamp].join("\x00")).digest("hex").slice(0,32)}class Je{resetToleranceRatio;last=new Map;constructor(e=0.999){this.resetToleranceRatio=e}delta(e,t,r=new Date){if(!Number.isFinite(t)||t<0)return;let s=new Date(r).getTime(),n=this.last.get(e);if(!n)return this.last.set(e,{value:t,at:s}),t>0?t:void 0;if(s<n.at)return;if(t<n.value&&t>=n.value*this.resetToleranceRatio)return;if(this.last.set(e,{value:t,at:s}),t>=n.value){let o=t-n.value;return o>0?o:void 0}return t>0?t:void 0}prune(e){let t=e.getTime(),r=0;for(let[s,n]of this.last)if(n.at<t)this.last.delete(s),r++;return r}get size(){return this.last.size}}function Ot(e,t){let r=e[t];return typeof r==="string"&&r.length>0?r:void 0}function Tt(e,t,r={}){let s=r.mappings??Nt,n=r.counters,o=[];for(let i of t){let a=wr(i.name,s);if(!a)continue;let d=Qr(i,a);if(d==null)continue;if(a.cumulative){if(!n)continue;let l=[i.projectId,i.environmentId??"",i.resourceId??"",i.name,i.source].join("\x00"),u=n.delta(l,d,i.timestamp);if(u==null)continue;d=u}if(!(d>0))continue;let c={organizationId:e,projectId:i.projectId,environmentId:i.environmentId,resourceId:i.resourceId,provider:Ot(i.attributes,"provider")??r.defaultProvider,region:i.region??Ot(i.attributes,"region"),meter:a.meter,quantity:d,timestamp:i.timestamp,attributes:{source:i.source,signal:i.name}};o.push({...c,key:zr(c,i.id)})}return o}function $t(e){let t=new Map;for(let r of e){let s=new Date(Math.floor(new Date(r.timestamp).getTime()/3600000)*3600000).toISOString(),n=[r.organizationId,r.projectId??"",r.environmentId??"",r.resourceId??"",r.provider??"",r.region??"",r.meter,s].join("\x00"),o=t.get(n);if(o)o.quantity+=r.quantity;else t.set(n,{...r,timestamp:s})}return[...t.values()]}import{createHash as Kr}from"node:crypto";var se=(e)=>{if(typeof e!=="string")return{};try{return JSON.parse(e)}catch{return{}}},V=(e)=>typeof e==="string"&&e!==""?e:void 0,be=(e)=>Number(e)===1,Mt=(e)=>e==null?void 0:Number(e);function Vt(e){return{id:String(e.id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),name:String(e.name),period:String(e.period),timezone:String(e.timezone),currency:String(e.currency),softLimitCents:Mt(e.soft_limit_cents),hardLimitCents:Mt(e.hard_limit_cents),thresholds:se(e.thresholds),meters:se(e.meters),graceSeconds:Number(e.grace_seconds),hysteresisPercent:Number(e.hysteresis_percent),dryRun:be(e.dry_run),enabled:be(e.enabled),version:Number(e.version),createdAt:String(e.created_at),updatedAt:String(e.updated_at)}}function Ue(e){return{id:String(e.id),budgetId:String(e.budget_id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),action:String(e.action),state:String(e.state),reason:String(e.reason),restore:se(e.restore),triggeredAtPercent:Number(e.triggered_at_percent),simulated:be(e.simulated),appliedAt:V(e.applied_at),releasedAt:V(e.released_at),error:V(e.error),createdAt:String(e.created_at),updatedAt:String(e.updated_at)}}function xt(e){return{id:String(e.id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),signal:String(e.signal),direction:String(e.direction),observed:Number(e.observed),expected:Number(e.expected),score:Number(e.score),deltaPercent:Number(e.delta_percent),severity:String(e.severity),bucketStart:String(e.bucket_start),evidence:se(e.evidence),acknowledgedAt:V(e.acknowledged_at),createdAt:String(e.created_at)}}function Fr(e){return{organizationId:String(e.organization_id),projectId:String(e.project_id),environmentId:String(e.environment_id),resourceId:String(e.resource_id),provider:String(e.provider),region:String(e.region),meter:String(e.meter),bucketStart:String(e.bucket_start),quantity:Number(e.quantity),costCents:Number(e.cost_cents),sampleCount:Number(e.sample_count),updatedAt:String(e.updated_at)}}function J(e,t,r){return[e,t??"",r??""].join("/")}var Yr=[{atPercent:50,actions:["notify"]},{atPercent:80,actions:["notify"]},{atPercent:100,actions:["notify"],onProjection:!0},{atPercent:100,actions:["notify","block_builds","block_deployments"]},{atPercent:115,actions:["notify","block_builds","block_deployments","throttle_requests"]}];class Xr{controlPlane;options;constructor(e,t={}){this.controlPlane=e;this.options=t}now(){return(this.options.now?.()??new Date).toISOString()}get priceBook(){return this.options.priceBook??Ct}query(e,t=[]){return this.controlPlane.database.query(e).all(...t)}createBudget(e){let t=e.name.trim();if(!t)throw Error("Budgets require a name.");if(e.softLimitCents==null&&e.hardLimitCents==null)throw Error("A budget needs a soft limit, a hard limit, or both.");if(e.softLimitCents!=null&&e.hardLimitCents!=null&&e.softLimitCents>e.hardLimitCents)throw Error("The soft limit must not exceed the hard limit.");let r=e.timezone??"UTC";if(!ve(r))throw Error(`Unknown timezone: ${r}`);let s=(e.thresholds??[...Yr]).filter((i)=>Number.isFinite(i.atPercent)&&i.atPercent>=0);if(e.environmentId&&!e.projectId)throw Error("An environment-scoped budget must also name its project.");let n=crypto.randomUUID(),o=this.now();return this.controlPlane.database.run("INSERT INTO spend_budgets (id,organization_id,project_id,environment_id,name,period,timezone,currency,soft_limit_cents,hard_limit_cents,thresholds,meters,grace_seconds,hysteresis_percent,dry_run,enabled,version,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,1,?,?)",[n,e.organizationId,e.projectId??null,e.environmentId??null,t,e.period,r,e.currency??"USD",e.softLimitCents??null,e.hardLimitCents??null,JSON.stringify(s),JSON.stringify(e.meters??[]),Math.max(0,Math.floor(e.graceSeconds??0)),Math.max(0,e.hysteresisPercent??5),e.dryRun?1:0,e.enabled===!1?0:1,o,o]),this.getBudget(n)}getBudget(e){let t=this.query("SELECT * FROM spend_budgets WHERE id = ?",[e])[0];return t?Vt(t):void 0}listBudgets(e){let t=["organization_id = ?"],r=[e.organizationId];if(e.projectId)t.push("(project_id IS NULL OR project_id = ?)"),r.push(e.projectId);if(e.enabledOnly)t.push("enabled = 1");return this.query(`SELECT * FROM spend_budgets WHERE ${t.join(" AND ")} ORDER BY created_at`,r).map(Vt)}budgetsForScope(e,t,r){return this.listBudgets({organizationId:e,enabledOnly:!0}).filter((s)=>{if(s.projectId&&s.projectId!==t)return!1;if(s.environmentId&&s.environmentId!==r)return!1;return!0}).sort((s,n)=>Number(!!s.projectId)-Number(!!n.projectId)||Number(!!s.environmentId)-Number(!!n.environmentId))}updateBudget(e,t,r){let s=this.getBudget(e);if(!s)throw Error("Budget was not found.");if(r!=null&&r!==s.version)throw Error(`Budget was modified concurrently (expected version ${r}, found ${s.version}).`);let n={...s,...t};if(n.softLimitCents==null&&n.hardLimitCents==null)throw Error("A budget needs a soft limit, a hard limit, or both.");if(n.softLimitCents!=null&&n.hardLimitCents!=null&&n.softLimitCents>n.hardLimitCents)throw Error("The soft limit must not exceed the hard limit.");if(t.timezone&&!ve(t.timezone))throw Error(`Unknown timezone: ${t.timezone}`);return this.controlPlane.database.run("UPDATE spend_budgets SET name=?,period=?,timezone=?,currency=?,soft_limit_cents=?,hard_limit_cents=?,thresholds=?,meters=?,grace_seconds=?,hysteresis_percent=?,dry_run=?,enabled=?,version=version+1,updated_at=? WHERE id=?",[n.name,n.period,n.timezone,n.currency??"USD",n.softLimitCents??null,n.hardLimitCents??null,JSON.stringify(n.thresholds??[]),JSON.stringify(n.meters??[]),Math.max(0,Math.floor(n.graceSeconds??0)),Math.max(0,n.hysteresisPercent??5),n.dryRun?1:0,n.enabled===!1?0:1,this.now(),e]),this.getBudget(e)}deleteBudget(e){return this.controlPlane.database.run("DELETE FROM spend_budgets WHERE id = ?",[e]).changes>0}ingestUsage(e){let t={applied:0,duplicates:0,costCents:0,unpricedMeters:[]},r=new Set,s=this.now();return this.controlPlane.database.transaction((o)=>{for(let i of o){if(!(i.quantity>0)||!Number.isFinite(i.quantity))continue;let a=i.key??this.deltaFallbackKey(i);if(this.controlPlane.database.run("INSERT OR IGNORE INTO spend_usage_receipts (key,organization_id,bucket_start,created_at) VALUES (?,?,?,?)",[a,i.organizationId,re(i.timestamp),s]).changes===0){t.duplicates++;continue}let c={projectId:i.projectId??"",environmentId:i.environmentId??"",resourceId:i.resourceId??"",provider:i.provider??"",region:i.region??""},l=this.periodQuantity(i),u=Le(this.priceBook,{meter:i.meter,quantity:i.quantity,provider:i.provider,region:i.region},l);if(u.unpriced)r.add(String(i.meter));this.controlPlane.database.run(`INSERT INTO spend_usage (organization_id,project_id,environment_id,resource_id,provider,region,meter,bucket_start,quantity,cost_cents,sample_count,updated_at)
|
|
1
|
+
import{We as ct}from"./chunk-ax9mr6wm.js";import{lg as xr,ng as p}from"./chunk-etrb03mt.js";var no=["edge.requests","edge.egress_gb","function.invocations","function.gb_seconds","build.minutes","compute.instance_hours","storage.gb_hours","object.egress_gb","object.requests","database.gb_hours","database.io_requests","telemetry.ingest_gb","image.transformations"],He={"edge.requests":{key:"edge.requests",unit:"requests",label:"Edge requests",precision:0},"edge.egress_gb":{key:"edge.egress_gb",unit:"gb",label:"Edge egress",precision:3},"function.invocations":{key:"function.invocations",unit:"invocations",label:"Function invocations",precision:0},"function.gb_seconds":{key:"function.gb_seconds",unit:"gb_seconds",label:"Function compute",precision:2},"build.minutes":{key:"build.minutes",unit:"minutes",label:"Build minutes",precision:2},"compute.instance_hours":{key:"compute.instance_hours",unit:"hours",label:"Instance hours",precision:2},"storage.gb_hours":{key:"storage.gb_hours",unit:"gb_hours",label:"Block storage",precision:2},"object.egress_gb":{key:"object.egress_gb",unit:"gb",label:"Object storage egress",precision:3},"object.requests":{key:"object.requests",unit:"requests",label:"Object storage requests",precision:0},"database.gb_hours":{key:"database.gb_hours",unit:"gb_hours",label:"Database storage",precision:2},"database.io_requests":{key:"database.io_requests",unit:"requests",label:"Database I/O",precision:0},"telemetry.ingest_gb":{key:"telemetry.ingest_gb",unit:"gb",label:"Telemetry ingest",precision:3},"image.transformations":{key:"image.transformations",unit:"count",label:"Image transformations",precision:0}},oo=["notify","block_builds","block_deployments","throttle_requests","suspend_functions","serve_static","suspend_project"],N={notify:0,block_builds:1,block_deployments:2,throttle_requests:3,suspend_functions:4,serve_static:5,suspend_project:6};var ao=1e6;function Hr(e){if(e.tiers&&e.tiers.length>0)return e.tiers;return[{upToQuantity:null,microCentsPerUnit:e.microCentsPerUnit??0}]}function Et(e,t){if(!(e>0))return 0;let r=[...t].sort((i,a)=>{if(i.upToQuantity===null)return 1;if(a.upToQuantity===null)return-1;return i.upToQuantity-a.upToQuantity}),s=e,n=0,o=0;for(let i of r){if(s<=0)break;let d=(i.upToQuantity===null?1/0:i.upToQuantity)-n;if(d<=0)continue;let c=Math.min(s,d);o+=c*i.microCentsPerUnit,s-=c,n+=c}if(s>0){let i=r.reduce((a,d)=>Math.max(a,d.microCentsPerUnit),0);o+=s*i}return o}function Lr(e,t,r,s){let n=e.entries.filter((a)=>a.meter===t);if(n.length===0)return;let o=n.filter((a)=>a.provider===r),i=o.length>0?o:n.filter((a)=>a.provider==="*");return i.find((a)=>a.region===s)??i.find((a)=>a.region==null)}function Le(e,t,r=0){let s=Lr(e,t.meter,t.provider,t.region),n=Math.max(0,t.quantity);if(!s)return{meter:t.meter,provider:t.provider??"unknown",region:t.region,quantity:n,includedQuantity:0,billableQuantity:n,costCents:0,unpriced:!0};let o=Math.max(0,s.includedQuantity??0),i=Math.max(0,r-o),a=Math.max(0,o-Math.max(0,r)),d=Math.min(n,a),c=n-d,l=Hr(s),u=Et(i+c,l)-Et(i,l);return{meter:t.meter,provider:s.provider,region:s.region??t.region,quantity:n,includedQuantity:d,billableQuantity:c,costCents:u/1e6,unpriced:!1}}function co(e,t){let r=new Map,s=[];for(let n of t){let o=`${n.meter}\x00${n.provider??""}\x00${n.region??""}`,i=r.get(o)??0,a=Le(e,n,i);r.set(o,i+a.quantity),s.push(a)}return{currency:e.currency,totalCents:s.reduce((n,o)=>n+o.costCents,0),lines:s,unpricedMeters:[...new Set(s.filter((n)=>n.unpriced).map((n)=>String(n.meter)))]}}function mo(e){return Math.round(e*100)/100}function lo(e,...t){let r=new Map,s=(o)=>`${o.meter}\x00${o.provider}\x00${o.region??""}`;for(let o of e.entries)r.set(s(o),o);let n=e.currency;for(let o of t){n=o.currency||n;for(let i of o.entries)r.set(s(i),i)}return{currency:n,entries:[...r.values()]}}var L=(e)=>Math.round(e*1e6),M=(e)=>Math.round(e*1e6),Ct={currency:"USD",entries:[{meter:"edge.requests",provider:"aws",microCentsPerUnit:M(0.00075)},{meter:"edge.egress_gb",provider:"aws",includedQuantity:100,tiers:[{upToQuantity:10240,microCentsPerUnit:L(8.5)},{upToQuantity:51200,microCentsPerUnit:L(8)},{upToQuantity:null,microCentsPerUnit:L(6)}]},{meter:"function.invocations",provider:"aws",includedQuantity:1e6,microCentsPerUnit:M(0.002)},{meter:"function.gb_seconds",provider:"aws",includedQuantity:400000,microCentsPerUnit:M(0.00166667)},{meter:"storage.gb_hours",provider:"aws",microCentsPerUnit:M(0.010958904109589041)},{meter:"object.egress_gb",provider:"aws",includedQuantity:100,microCentsPerUnit:L(9)},{meter:"object.requests",provider:"aws",microCentsPerUnit:M(0.000039999999999999996)},{meter:"database.gb_hours",provider:"aws",microCentsPerUnit:M(0.015753424657534248)},{meter:"compute.instance_hours",provider:"aws",microCentsPerUnit:M(4.16)},{meter:"edge.egress_gb",provider:"hetzner",includedQuantity:20480,microCentsPerUnit:L(0.108)},{meter:"object.egress_gb",provider:"hetzner",includedQuantity:1024,microCentsPerUnit:L(0.108)},{meter:"compute.instance_hours",provider:"hetzner",microCentsPerUnit:M(0.95)},{meter:"storage.gb_hours",provider:"hetzner",microCentsPerUnit:M(0.006027397260273972)},{meter:"edge.requests",provider:"hetzner",microCentsPerUnit:0},{meter:"edge.requests",provider:"local",microCentsPerUnit:0},{meter:"edge.egress_gb",provider:"local",microCentsPerUnit:0},{meter:"function.invocations",provider:"local",microCentsPerUnit:0},{meter:"function.gb_seconds",provider:"local",microCentsPerUnit:0},{meter:"build.minutes",provider:"*",includedQuantity:6000,microCentsPerUnit:M(0.8)},{meter:"telemetry.ingest_gb",provider:"*",includedQuantity:5,microCentsPerUnit:L(50)},{meter:"image.transformations",provider:"*",includedQuantity:5000,microCentsPerUnit:M(0.05)}]};var Pt=new Map;function Dt(e){let t=Pt.get(e);if(!t)t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hourCycle:"h23"}),Pt.set(e,t);return t}var qr={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function ve(e){try{return Dt(e),!0}catch{return!1}}function qe(e,t){let r=Dt(t).formatToParts(e),s=(n)=>r.find((o)=>o.type===n)?.value??"0";return{year:Number(s("year")),month:Number(s("month")),day:Number(s("day")),hour:Number(s("hour")),minute:Number(s("minute")),second:Number(s("second")),weekday:qr[s("weekday")]??0}}function kt(e,t){let r=qe(e,t);return Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second)-Math.floor(e.getTime()/1000)*1000}function z(e,t,r,s,n=0){let o=Date.UTC(t,r-1,s,n),i=new Date(o-kt(new Date(o),e));return new Date(o-kt(i,e))}function Jr(e,t){return new Date(Date.UTC(e,t-1,1)).toLocaleString("en-US",{month:"long",year:"numeric",timeZone:"UTC"})}function q(e,t,r=new Date){let s=ve(t)?t:"UTC",n=qe(r,s),o,i,a;if(e==="daily")o=z(s,n.year,n.month,n.day),i=z(s,n.year,n.month,n.day+1),a=`${n.year}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`;else if(e==="weekly"){let l=(n.weekday+6)%7;o=z(s,n.year,n.month,n.day-l),i=z(s,n.year,n.month,n.day-l+7);let u=qe(o,s);a=`week of ${u.year}-${String(u.month).padStart(2,"0")}-${String(u.day).padStart(2,"0")}`}else o=z(s,n.year,n.month,1),i=z(s,n.year,n.month+1,1),a=Jr(n.year,n.month);let d=i.getTime()-o.getTime(),c=Math.max(0,Math.min(d,r.getTime()-o.getTime()));return{start:o.toISOString(),end:i.toISOString(),elapsedMs:c,totalMs:d,label:a}}function go(e,t,r=new Date){let s=q(e,t,r),n=new Date(new Date(s.start).getTime()-1),o=q(e,t,n);return{...o,elapsedMs:o.totalMs}}function re(e){let r=(typeof e==="string"?new Date(e):e).getTime();if(!Number.isFinite(r))throw Error("hourBucket requires a valid date");return new Date(Math.floor(r/3600000)*3600000).toISOString()}function ho(e,t,r=9600){let s=Math.floor(new Date(e).getTime()/3600000)*3600000,n=new Date(t).getTime();if(!Number.isFinite(s)||!Number.isFinite(n))throw Error("hourBucketsBetween requires valid dates");let o=[];for(let i=s;i<n&&o.length<r;i+=3600000)o.push(new Date(i).toISOString());return o}import{createHash as Ur}from"node:crypto";var Ie=1073741824,Nt=[{match:"request.count",meter:"edge.requests"},{match:"traffic.requests",meter:"edge.requests"},{match:"http.request",meter:"edge.requests",field:"count"},{match:"traffic.bytes_out",meter:"edge.egress_gb",scale:1/Ie},{match:"storage.egress.day",meter:"object.egress_gb",scale:1/Ie},{match:"storage.egress.month",meter:"object.egress_gb",scale:1/Ie,cumulative:!0},{match:"storage.egress.day_downloads",meter:"object.requests"},{match:"function.invocation",meter:"function.invocations",field:"count"},{match:"function.duration_ms",meter:"function.gb_seconds",scale:0.001},{match:"build.duration_ms",meter:"build.minutes",scale:0.000016666666666666667},{match:"telemetry.ingest_bytes",meter:"telemetry.ingest_gb",scale:1/Ie},{match:"image.transform",meter:"image.transformations",field:"count"}];function Wr(e,t){return e.match.endsWith("*")?t.startsWith(e.match.slice(0,-1)):e.match===t}function wr(e,t=Nt){return t.find((r)=>!r.match.endsWith("*")&&r.match===e)??t.find((r)=>Wr(r,e))}function Qr(e,t){let r=t.field??"value",s=r==="count"?1:r==="bytesOut"?e.bytesOut:r==="bytesIn"?e.bytesIn:r==="durationMs"?e.durationMs:e.value;if(s==null||!Number.isFinite(s))return;return s*(t.scale??1)}function zr(e,t){return Ur("sha256").update([t,e.meter,e.organizationId,e.projectId??"",e.environmentId??"",e.resourceId??"",e.timestamp].join("\x00")).digest("hex").slice(0,32)}class Je{resetToleranceRatio;last=new Map;constructor(e=0.999){this.resetToleranceRatio=e}delta(e,t,r=new Date){if(!Number.isFinite(t)||t<0)return;let s=new Date(r).getTime(),n=this.last.get(e);if(!n)return this.last.set(e,{value:t,at:s}),t>0?t:void 0;if(s<n.at)return;if(t<n.value&&t>=n.value*this.resetToleranceRatio)return;if(this.last.set(e,{value:t,at:s}),t>=n.value){let o=t-n.value;return o>0?o:void 0}return t>0?t:void 0}prune(e){let t=e.getTime(),r=0;for(let[s,n]of this.last)if(n.at<t)this.last.delete(s),r++;return r}get size(){return this.last.size}}function Ot(e,t){let r=e[t];return typeof r==="string"&&r.length>0?r:void 0}function Tt(e,t,r={}){let s=r.mappings??Nt,n=r.counters,o=[];for(let i of t){let a=wr(i.name,s);if(!a)continue;let d=Qr(i,a);if(d==null)continue;if(a.cumulative){if(!n)continue;let l=[i.projectId,i.environmentId??"",i.resourceId??"",i.name,i.source].join("\x00"),u=n.delta(l,d,i.timestamp);if(u==null)continue;d=u}if(!(d>0))continue;let c={organizationId:e,projectId:i.projectId,environmentId:i.environmentId,resourceId:i.resourceId,provider:Ot(i.attributes,"provider")??r.defaultProvider,region:i.region??Ot(i.attributes,"region"),meter:a.meter,quantity:d,timestamp:i.timestamp,attributes:{source:i.source,signal:i.name}};o.push({...c,key:zr(c,i.id)})}return o}function $t(e){let t=new Map;for(let r of e){let s=new Date(Math.floor(new Date(r.timestamp).getTime()/3600000)*3600000).toISOString(),n=[r.organizationId,r.projectId??"",r.environmentId??"",r.resourceId??"",r.provider??"",r.region??"",r.meter,s].join("\x00"),o=t.get(n);if(o)o.quantity+=r.quantity;else t.set(n,{...r,timestamp:s})}return[...t.values()]}import{createHash as Kr}from"node:crypto";var se=(e)=>{if(typeof e!=="string")return{};try{return JSON.parse(e)}catch{return{}}},V=(e)=>typeof e==="string"&&e!==""?e:void 0,be=(e)=>Number(e)===1,Mt=(e)=>e==null?void 0:Number(e);function Vt(e){return{id:String(e.id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),name:String(e.name),period:String(e.period),timezone:String(e.timezone),currency:String(e.currency),softLimitCents:Mt(e.soft_limit_cents),hardLimitCents:Mt(e.hard_limit_cents),thresholds:se(e.thresholds),meters:se(e.meters),graceSeconds:Number(e.grace_seconds),hysteresisPercent:Number(e.hysteresis_percent),dryRun:be(e.dry_run),enabled:be(e.enabled),version:Number(e.version),createdAt:String(e.created_at),updatedAt:String(e.updated_at)}}function Ue(e){return{id:String(e.id),budgetId:String(e.budget_id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),action:String(e.action),state:String(e.state),reason:String(e.reason),restore:se(e.restore),triggeredAtPercent:Number(e.triggered_at_percent),simulated:be(e.simulated),appliedAt:V(e.applied_at),releasedAt:V(e.released_at),error:V(e.error),createdAt:String(e.created_at),updatedAt:String(e.updated_at)}}function xt(e){return{id:String(e.id),organizationId:String(e.organization_id),projectId:V(e.project_id),environmentId:V(e.environment_id),signal:String(e.signal),direction:String(e.direction),observed:Number(e.observed),expected:Number(e.expected),score:Number(e.score),deltaPercent:Number(e.delta_percent),severity:String(e.severity),bucketStart:String(e.bucket_start),evidence:se(e.evidence),acknowledgedAt:V(e.acknowledged_at),createdAt:String(e.created_at)}}function Fr(e){return{organizationId:String(e.organization_id),projectId:String(e.project_id),environmentId:String(e.environment_id),resourceId:String(e.resource_id),provider:String(e.provider),region:String(e.region),meter:String(e.meter),bucketStart:String(e.bucket_start),quantity:Number(e.quantity),costCents:Number(e.cost_cents),sampleCount:Number(e.sample_count),updatedAt:String(e.updated_at)}}function J(e,t,r){return[e,t??"",r??""].join("/")}var Yr=[{atPercent:50,actions:["notify"]},{atPercent:80,actions:["notify"]},{atPercent:100,actions:["notify"],onProjection:!0},{atPercent:100,actions:["notify","block_builds","block_deployments"]},{atPercent:115,actions:["notify","block_builds","block_deployments","throttle_requests"]}];class Xr{controlPlane;options;constructor(e,t={}){this.controlPlane=e;this.options=t}now(){return(this.options.now?.()??new Date).toISOString()}get priceBook(){return this.options.priceBook??Ct}query(e,t=[]){return this.controlPlane.database.query(e).all(...t)}createBudget(e){let t=e.name.trim();if(!t)throw Error("Budgets require a name.");if(e.softLimitCents==null&&e.hardLimitCents==null)throw Error("A budget needs a soft limit, a hard limit, or both.");if(e.softLimitCents!=null&&e.hardLimitCents!=null&&e.softLimitCents>e.hardLimitCents)throw Error("The soft limit must not exceed the hard limit.");let r=e.timezone??"UTC";if(!ve(r))throw Error(`Unknown timezone: ${r}`);let s=(e.thresholds??[...Yr]).filter((i)=>Number.isFinite(i.atPercent)&&i.atPercent>=0);if(e.environmentId&&!e.projectId)throw Error("An environment-scoped budget must also name its project.");let n=crypto.randomUUID(),o=this.now();return this.controlPlane.database.run("INSERT INTO spend_budgets (id,organization_id,project_id,environment_id,name,period,timezone,currency,soft_limit_cents,hard_limit_cents,thresholds,meters,grace_seconds,hysteresis_percent,dry_run,enabled,version,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,1,?,?)",[n,e.organizationId,e.projectId??null,e.environmentId??null,t,e.period,r,e.currency??"USD",e.softLimitCents??null,e.hardLimitCents??null,JSON.stringify(s),JSON.stringify(e.meters??[]),Math.max(0,Math.floor(e.graceSeconds??0)),Math.max(0,e.hysteresisPercent??5),e.dryRun?1:0,e.enabled===!1?0:1,o,o]),this.getBudget(n)}getBudget(e){let t=this.query("SELECT * FROM spend_budgets WHERE id = ?",[e])[0];return t?Vt(t):void 0}listBudgets(e){let t=["organization_id = ?"],r=[e.organizationId];if(e.projectId)t.push("(project_id IS NULL OR project_id = ?)"),r.push(e.projectId);if(e.enabledOnly)t.push("enabled = 1");return this.query(`SELECT * FROM spend_budgets WHERE ${t.join(" AND ")} ORDER BY created_at`,r).map(Vt)}budgetsForScope(e,t,r){return this.listBudgets({organizationId:e,enabledOnly:!0}).filter((s)=>{if(s.projectId&&s.projectId!==t)return!1;if(s.environmentId&&s.environmentId!==r)return!1;return!0}).sort((s,n)=>Number(!!s.projectId)-Number(!!n.projectId)||Number(!!s.environmentId)-Number(!!n.environmentId))}updateBudget(e,t,r){let s=this.getBudget(e);if(!s)throw Error("Budget was not found.");if(r!=null&&r!==s.version)throw Error(`Budget was modified concurrently (expected version ${r}, found ${s.version}).`);let n={...s,...t};if(n.softLimitCents==null&&n.hardLimitCents==null)throw Error("A budget needs a soft limit, a hard limit, or both.");if(n.softLimitCents!=null&&n.hardLimitCents!=null&&n.softLimitCents>n.hardLimitCents)throw Error("The soft limit must not exceed the hard limit.");if(t.timezone&&!ve(t.timezone))throw Error(`Unknown timezone: ${t.timezone}`);return this.controlPlane.database.run("UPDATE spend_budgets SET name=?,period=?,timezone=?,currency=?,soft_limit_cents=?,hard_limit_cents=?,thresholds=?,meters=?,grace_seconds=?,hysteresis_percent=?,dry_run=?,enabled=?,version=version+1,updated_at=? WHERE id=?",[n.name,n.period,n.timezone,n.currency??"USD",n.softLimitCents??null,n.hardLimitCents??null,JSON.stringify(n.thresholds??[]),JSON.stringify(n.meters??[]),Math.max(0,Math.floor(n.graceSeconds??0)),Math.max(0,n.hysteresisPercent??5),n.dryRun?1:0,n.enabled===!1?0:1,this.now(),e]),this.getBudget(e)}deleteBudget(e){return this.controlPlane.database.run("DELETE FROM spend_budgets WHERE id = ?",[e]).changes>0}ingestUsage(e){let t={applied:0,duplicates:0,costCents:0,unpricedMeters:[]},r=new Set,s=this.now();return this.controlPlane.database.transaction((o)=>{for(let i of o){if(!(i.quantity>0)||!Number.isFinite(i.quantity))continue;let a=i.key??this.deltaFallbackKey(i);if(this.controlPlane.database.run("INSERT OR IGNORE INTO spend_usage_receipts (key,organization_id,bucket_start,created_at) VALUES (?,?,?,?)",[a,i.organizationId,re(i.timestamp),s]).changes===0){t.duplicates++;continue}let c={projectId:i.projectId??"",environmentId:i.environmentId??"",resourceId:i.resourceId??"",provider:i.provider??"",region:i.region??""},l=this.periodQuantity(i),u=Le(this.priceBook,{meter:i.meter,quantity:i.quantity,provider:i.provider,region:i.region},l);if(u.unpriced)r.add(String(i.meter));this.controlPlane.database.run(`INSERT INTO spend_usage (organization_id,project_id,environment_id,resource_id,provider,region,meter,bucket_start,quantity,cost_cents,sample_count,updated_at)
|
|
2
2
|
VALUES (?,?,?,?,?,?,?,?,?,?,1,?)
|
|
3
3
|
ON CONFLICT(organization_id,project_id,environment_id,resource_id,provider,region,meter,bucket_start) DO UPDATE SET
|
|
4
4
|
quantity = quantity + excluded.quantity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,b as l,c as m,d as n,e as o,f as p,g as q,h as z,i as A,j as B,k as C,l as D,m as E,n as F,o as G}from"./chunk-hzgz13nf.js";import{Je as H,Ke as I,Le as J,Me as K,Ne as L,Oe as M}from"./chunk-3gykfyq4.js";import{Pe as r,Qe as s,Re as t,Se as u,Te as v,Ue as w,Ve as x,We as y}from"./chunk-ax9mr6wm.js";import{do as a,eo as b,fo as c,go as d,ho as e,io as f,jo as g,ko as h,lo as i,mo as j}from"./chunk-
|
|
1
|
+
import{a as k,b as l,c as m,d as n,e as o,f as p,g as q,h as z,i as A,j as B,k as C,l as D,m as E,n as F,o as G}from"./chunk-hzgz13nf.js";import{Je as H,Ke as I,Le as J,Me as K,Ne as L,Oe as M}from"./chunk-3gykfyq4.js";import{Pe as r,Qe as s,Re as t,Se as u,Te as v,Ue as w,Ve as x,We as y}from"./chunk-ax9mr6wm.js";import{do as a,eo as b,fo as c,go as d,ho as e,io as f,jo as g,ko as h,lo as i,mo as j}from"./chunk-rxcvf10f.js";import"./chunk-mh0kdzqp.js";export{M as wafEventTelemetry,t as sysctlHardening,m as ruleMatches,L as renderWafInstallScript,K as renderWafConfig,u as renderSysctlFile,v as renderNftablesRuleset,w as renderDdosInstallScript,j as recursionBlockedResponse,n as rateLimitKey,p as rateLimitHeaders,i as propagationHeaders,x as planMitigation,f as parseChain,G as mergeControlsIntoConfig,s as isValidCidr,I as isSafePattern,g as inspectInvocation,J as globToRegex,l as globMatches,d as functionFingerprint,H as escapeSecLang,D as describePosture,q as defaultRateLimitRules,y as applyMitigationFactor,E as applyControlsToRateLimits,F as applyControlsToDdos,c as TRACE_HEADER,h as RecursionGuard,o as RateLimiter,k as RATE_LIMIT_KEY_SEPARATOR,C as ProtectionControlStore,z as PROTECTION_SETTING,A as MAX_CONTROL_HOURS,a as DEPTH_HEADER,e as DEFAULT_RECURSION_LIMITS,r as DEFAULT_DDOS_THRESHOLDS,B as DEFAULT_ATTACK_MODE_HOURS,b as CHAIN_HEADER};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{rg as w}from"./chunk-mr0atd2s.js";import{yg as E}from"./chunk-271gk1n2.js";import{$n as R,Co as u,Ho as D,Io as F,Pn as H,Rn as C}from"./chunk-
|
|
1
|
+
import{rg as w}from"./chunk-mr0atd2s.js";import{yg as E}from"./chunk-271gk1n2.js";import{$n as R,Co as u,Ho as D,Io as F,Pn as H,Rn as C}from"./chunk-rxcvf10f.js";import{execFileSync as P}from"node:child_process";import{mkdirSync as _,mkdtempSync as k,rmSync as S,writeFileSync as Z}from"node:fs";import{tmpdir as m}from"node:os";import{dirname as h,join as J}from"node:path";function A(M,q){for(let z of q){let V=J(M,z.name);_(h(V),{recursive:!0}),Z(V,z.data,z.mode?{mode:z.mode}:void 0)}}async function p(M){let{app:q,projectRoot:z,region:V,repository:W}=M,b=q.architecture??"x86_64",f=b==="arm64"?"linux/arm64":"linux/amd64",U=q.kind==="php",K=M.onStep??(()=>{}),N=k(J(m(),"tscloud-img-"));try{let $=J(N,"app");_($,{recursive:!0});let v,B;if(U){D({projectRoot:z,app:q,skipBuild:M.skipBuild,onStep:K}),K("staging application tree");let G=F(z);A($,G),A(J(N,"runtime"),u().map((T)=>({name:T.path,data:T.contents,mode:T.mode})));let O=q.handlers?.http??"public/index.php";v={http:O,queue:q.handlers?.queue??O,cli:q.handlers?.cli??O},B=H(G.map((T)=>`${T.name}:${T.data.length}`).join("|"))}else{K("bundling application");let G=await C({projectRoot:z,app:q,skipBuild:M.skipBuild,onStep:K});Z(J($,"index.mjs"),G.bundle),v=G.handlers,B=G.sha256}let x=B.slice(0,16);Z(J(N,"Dockerfile"),R({kind:q.kind??"node",phpVersion:q.phpVersion,architecture:b}));let I=new w(V),Q;try{Q=(await I.describeRepositories({repositoryNames:[W]})).repositories?.[0]?.repositoryUri??""}catch{Q=""}if(!Q)K(`creating ECR repository ${W}`),Q=(await I.createRepository({repositoryName:W,imageScanningConfiguration:{scanOnPush:!0}})).repository?.repositoryUri??"";if(!Q)throw Error(`could not resolve ECR repository URI for ${W}`);let X=`${Q}:${x}`;K("docker build"),P("docker",["build","--platform",f,"--provenance=false","--sbom=false","-t",X,N],{stdio:"inherit"}),K("ecr auth + push");let Y=(await I.getAuthorizationToken()).authorizationData?.[0];if(!Y?.authorizationToken||!Y.proxyEndpoint)throw Error("failed to get an ECR authorization token");let j=Y.proxyEndpoint.replace(/^https?:\/\//,""),L=J(N,".docker");return _(L,{recursive:!0}),Z(J(L,"config.json"),JSON.stringify({auths:{[j]:{auth:Y.authorizationToken}}})),P("docker",["push",X],{stdio:"inherit",env:{...process.env,DOCKER_CONFIG:L}}),E(`Image: ${X}`),{imageUri:X,tag:x,handlers:v}}finally{S(N,{recursive:!0,force:!0})}}
|
|
2
2
|
export{p as qg};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{qh as T}from"./chunk-
|
|
1
|
+
import{qh as T}from"./chunk-rxcvf10f.js";import"./chunk-mh0kdzqp.js";function _(q){let j=q.sites||{};for(let D of Object.values(j))if(D?.repository?.url)return{provider:D.repository.provider,branch:D.repository.branch};return}function x(q){let j=q.trim().toLowerCase();if(j.includes("github.com"))return"github";if(j.includes("gitlab.com"))return"gitlab";if(j.includes("bitbucket.org"))return"bitbucket";return}function Q(q){return`'${q.replace(/'/g,"'\\''")}'`}function $(q){return q.replace(/'/g,"''")}function k(q,j){let D=["bunx --bun @stacksjs/ts-cloud deploy","--env",Q(q)];if(j.site)D.push("--site",Q(j.site));if(j.skipDnsVerification)D.push("--skip-dns-verification");return D.push("--yes"),D.join(" ")}function I(q,j="production",D={}){let N=_(q),F=D.provider||N?.provider;if(F!=="github"&&F!=="gitlab"&&F!=="bitbucket")return null;let G=q.environments?.[j],H=G?.deployBranch||N?.branch||"main",L=k(j,D),M=JSON.stringify(H),V=JSON.stringify(j),O=G?.domain?G.domain.startsWith("http")?G.domain:`https://${G.domain}`:void 0,W=O?`
|
|
2
2
|
url: ${JSON.stringify(O)}`:"",X=D.setup==="pantry"?` - name: Setup Pantry
|
|
3
3
|
uses: home-lang/pantry/packages/action@main`:` - uses: oven-sh/setup-bun@v2
|
|
4
4
|
- run: bun install --frozen-lockfile`,Y=T(q)==="hetzner"&&!!q.infrastructure?.compute,J=D.sshPrivateKeySecret||"SSH_PRIVATE_KEY";if(!/^[A-Z_][A-Z0-9_]*$/i.test(J))throw Error(`Invalid SSH private key secret name '${J}'`);let Z=Y?`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xd as a}from"./chunk-vm3q5gf2.js";import"./chunk-4vrqm9h0.js";import"./chunk-mz0wbbsj.js";import"./chunk-p66ptpmr.js";import"./chunk-axhnkn5g.js";import"./chunk-h5pa5men.js";import"./chunk-fy8j3y8p.js";import"./chunk-271gk1n2.js";import"./chunk-fpm59y25.js";import"./chunk-rxcvf10f.js";import"./chunk-mh0kdzqp.js";export{a as resolveDashboardData};
|