@stacksjs/ts-cloud 0.16.17 → 0.16.19
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 -1
- package/dist/bin/{chunk-r2vrq2gr.js → chunk-0f1qpmd6.js} +5 -5
- package/dist/bin/chunk-0h6cggyt.js +1 -0
- package/dist/bin/{chunk-8af2sky9.js → chunk-0trtkv9g.js} +4 -4
- package/dist/bin/{chunk-30jk87p4.js → chunk-148x1zq8.js} +2 -2
- package/dist/bin/{chunk-e7kqxsqh.js → chunk-1j8b1d58.js} +1 -1
- package/dist/bin/chunk-28ztnqjk.js +1 -0
- package/dist/bin/chunk-2g2zrtjs.js +2 -0
- package/dist/bin/{chunk-xenj3py3.js → chunk-2mv692y4.js} +5 -5
- package/dist/bin/chunk-3ay4kfaw.js +1 -0
- package/dist/bin/{chunk-grs2cwm7.js → chunk-3n733cgx.js} +2 -2
- package/dist/bin/{chunk-z4rx32w4.js → chunk-48x0wc2g.js} +3 -3
- package/dist/bin/chunk-4cs098d1.js +1 -0
- package/dist/bin/{chunk-s5br13d9.js → chunk-4sa22raw.js} +60 -60
- package/dist/bin/chunk-52fhq35h.js +1 -0
- package/dist/bin/{chunk-fren71ry.js → chunk-5a7sxtwn.js} +1 -1
- package/dist/bin/{chunk-g8yaztb1.js → chunk-6d8chxyr.js} +3 -3
- package/dist/bin/{chunk-rt51mrj9.js → chunk-6kx50dyc.js} +2 -2
- package/dist/bin/chunk-6se7ygxa.js +1 -0
- package/dist/bin/chunk-72g1hr4z.js +1 -0
- package/dist/bin/chunk-7thhxyzy.js +1 -0
- package/dist/bin/{chunk-dp2fsnpe.js → chunk-8jbkphmg.js} +7 -7
- package/dist/bin/{chunk-g954ew3x.js → chunk-90102shh.js} +1 -1
- package/dist/bin/{chunk-dg918k6w.js → chunk-9vmtm7nq.js} +1 -1
- package/dist/bin/chunk-apnhhfkj.js +2 -0
- package/dist/bin/chunk-c7vxdwth.js +1 -0
- package/dist/bin/{chunk-kymrvq47.js → chunk-djjj62c0.js} +2 -2
- package/dist/bin/{chunk-znfh0mx7.js → chunk-dmdg23a5.js} +1 -1
- package/dist/bin/{chunk-etvcw9we.js → chunk-dyh0vndw.js} +1 -1
- package/dist/bin/chunk-e0c3agf2.js +1 -0
- package/dist/bin/{chunk-bxfnhnqd.js → chunk-e24bscb0.js} +15 -15
- package/dist/bin/chunk-e55fdn0r.js +92 -0
- package/dist/bin/{chunk-frbwzrx4.js → chunk-egn33pr9.js} +1 -1
- package/dist/bin/{chunk-q6cayjpr.js → chunk-ehb9mpt8.js} +112 -112
- package/dist/bin/chunk-gf7yavs5.js +1 -0
- package/dist/bin/chunk-gp5w7e4c.js +1 -0
- package/dist/bin/{chunk-850n63e0.js → chunk-h1rb8qvt.js} +2 -2
- package/dist/bin/chunk-hagakkgm.js +1 -0
- package/dist/bin/chunk-hr3vbg6y.js +1 -0
- package/dist/bin/chunk-hyb5v8wr.js +1 -0
- package/dist/bin/{chunk-va9y882b.js → chunk-k7wh1wr5.js} +1 -1
- package/dist/bin/{chunk-afzrsjmc.js → chunk-mx9ppkmn.js} +4 -4
- package/dist/bin/{chunk-98m9rbpk.js → chunk-mxvekmdx.js} +126 -126
- package/dist/bin/chunk-ndddd2ft.js +3 -0
- package/dist/bin/{chunk-0znhykt9.js → chunk-ngyqqy6d.js} +5 -5
- package/dist/bin/chunk-nqb1faqj.js +1 -0
- package/dist/bin/chunk-p831sptd.js +1 -0
- package/dist/bin/chunk-qxx1a51w.js +1 -0
- package/dist/bin/{chunk-6wc8a9cs.js → chunk-rbtt23vx.js} +3 -3
- package/dist/bin/chunk-sh248v2y.js +1 -0
- package/dist/bin/chunk-swfmx4f8.js +1 -0
- package/dist/bin/{chunk-evtcxme1.js → chunk-t10e32an.js} +7 -7
- package/dist/bin/{chunk-jq36fh46.js → chunk-vjkyj3xy.js} +1 -1
- package/dist/bin/chunk-w8k1gyzr.js +1 -0
- package/dist/bin/chunk-wagzxm7z.js +1 -0
- package/dist/bin/{chunk-36aywmsq.js → chunk-x63yz8xg.js} +1 -1
- package/dist/bin/chunk-xdxk6baf.js +1 -0
- package/dist/bin/chunk-y286zhty.js +1 -0
- package/dist/bin/{chunk-gn745j0p.js → chunk-ys5n5c84.js} +4 -4
- package/dist/bin/{chunk-94pvxv17.js → chunk-z1dtdw3j.js} +5 -5
- package/dist/bin/cli.js +275 -275
- package/dist/bin/dashboard-server.js +1 -1
- package/dist/chunk-07rjctzz.js +1 -0
- package/dist/{chunk-1ayadqry.js → chunk-2m262b2n.js} +14 -14
- package/dist/{chunk-nz3ygqjb.js → chunk-31tvc877.js} +1 -1
- package/dist/{chunk-hasa64d4.js → chunk-3m9ghthh.js} +2 -2
- package/dist/chunk-4j8ef0pe.js +1 -0
- package/dist/{chunk-4bcf62qk.js → chunk-5255nr93.js} +90 -90
- package/dist/{chunk-mytcpvg5.js → chunk-5far81q7.js} +2 -2
- package/dist/chunk-6kcmbymp.js +1 -0
- package/dist/{chunk-6jzg0gtw.js → chunk-7xnwa0s8.js} +4 -4
- package/dist/chunk-9asn5fpt.js +92 -0
- package/dist/{chunk-2vr8rqg8.js → chunk-9wmer0zx.js} +1 -1
- package/dist/{chunk-ynjfj2rt.js → chunk-bcy9z4ks.js} +162 -162
- package/dist/{chunk-enhddb1a.js → chunk-bxrzsth8.js} +2 -2
- package/dist/chunk-dak9hfrd.js +1 -0
- package/dist/{chunk-2ht2ve4t.js → chunk-e52me1c6.js} +1 -1
- package/dist/{chunk-z13hksc9.js → chunk-e8e1h2h9.js} +2 -2
- package/dist/{chunk-84w9n41b.js → chunk-g6g33pt9.js} +7 -7
- package/dist/{chunk-m1x32x81.js → chunk-hyeeqga9.js} +5 -5
- package/dist/{chunk-3rh4m6ag.js → chunk-k53agv2m.js} +1 -1
- package/dist/{chunk-nca98yaf.js → chunk-kczzc599.js} +25 -25
- package/dist/{chunk-f3hhmec2.js → chunk-ptq9v346.js} +1 -1
- package/dist/{chunk-ygrxsjcz.js → chunk-qcaqc5b8.js} +2 -2
- package/dist/{chunk-81yetzg2.js → chunk-r1wpwfff.js} +7 -7
- package/dist/{chunk-pn8bczhy.js → chunk-srrscggm.js} +5 -5
- package/dist/{chunk-6m18fz5f.js → chunk-v2p7c7s4.js} +325 -325
- package/dist/{chunk-a9pqpqrh.js → chunk-vs0qrm09.js} +1 -1
- package/dist/{chunk-x3xs6qvx.js → chunk-w9jhyy09.js} +4 -4
- package/dist/{chunk-r2v44ba2.js → chunk-z3wynefj.js} +19 -19
- package/dist/chunk-z4xzd43p.js +1 -0
- package/dist/{chunk-590gwv9d.js → chunk-zx8ecz8b.js} +4 -4
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +1 -1
- package/dist/deploy/storage-failover.d.ts +54 -0
- package/dist/dns/index.js +1 -1
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/shared/cloudfront-origin.d.ts +9 -2
- package/dist/generators/infrastructure.d.ts +9 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -48
- package/dist/operations/index.js +1 -1
- package/dist/protection/index.js +1 -1
- package/dist/spend/index.js +1 -1
- 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 +1 -1
- package/dist/ui/data/backups.html +6 -6
- package/dist/ui/data/services.html +6 -6
- package/dist/ui/data/volumes.html +6 -6
- package/dist/ui/index.html +6 -6
- package/dist/ui/infrastructure/topology.html +6 -6
- package/dist/ui/integrations.html +2 -2
- package/dist/ui/operations/alerts.html +6 -6
- package/dist/ui/operations/configuration.html +6 -6
- package/dist/ui/operations/jobs.html +6 -6
- package/dist/ui/operations/maintenance.html +6 -6
- 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 +2 -2
- package/dist/ui/server/actions.html +6 -6
- 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 +2 -2
- package/dist/ui/server/sites.html +5 -5
- package/dist/ui/server/ssh-keys.html +6 -6
- package/dist/ui/server/team.html +6 -6
- package/dist/ui/server/terminal.html +2 -2
- package/dist/ui/serverless/alarms.html +6 -6
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +2 -2
- 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-1aqrfqbz.js +0 -1
- package/dist/bin/chunk-1k1dyh5k.js +0 -92
- package/dist/bin/chunk-71rdf1sw.js +0 -1
- package/dist/bin/chunk-75kmf1ke.js +0 -1
- package/dist/bin/chunk-7q37vt87.js +0 -1
- package/dist/bin/chunk-8r0gvent.js +0 -1
- package/dist/bin/chunk-925xkkf9.js +0 -1
- package/dist/bin/chunk-am4recks.js +0 -1
- package/dist/bin/chunk-az3emrhh.js +0 -1
- package/dist/bin/chunk-btfh77e4.js +0 -1
- package/dist/bin/chunk-bxy657va.js +0 -1
- package/dist/bin/chunk-d5sd5xtt.js +0 -1
- package/dist/bin/chunk-fbhf8kh5.js +0 -1
- package/dist/bin/chunk-g0z3a0wx.js +0 -1
- package/dist/bin/chunk-hn961k5f.js +0 -3
- package/dist/bin/chunk-m2kr333s.js +0 -2
- package/dist/bin/chunk-mtbav1sg.js +0 -1
- package/dist/bin/chunk-pk2xwzke.js +0 -1
- package/dist/bin/chunk-sbhbne4d.js +0 -1
- package/dist/bin/chunk-sd0twb8d.js +0 -1
- package/dist/bin/chunk-va8pr0ch.js +0 -1
- package/dist/bin/chunk-vwa96q94.js +0 -1
- package/dist/bin/chunk-y6vnwk4e.js +0 -1
- package/dist/bin/chunk-y7w98fc1.js +0 -1
- package/dist/bin/chunk-yw65b70x.js +0 -1
- package/dist/bin/chunk-z65rp2mn.js +0 -1
- package/dist/chunk-3jrvr0pv.js +0 -1
- package/dist/chunk-ajwt2hzh.js +0 -1
- package/dist/chunk-fw9hk0xt.js +0 -92
- package/dist/chunk-mcxmdch0.js +0 -1
- package/dist/chunk-wqhhvh3k.js +0 -1
- package/dist/chunk-xhn2v84m.js +0 -1
package/dist/ui/serverless.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="
|
|
2
|
-
function
|
|
1
|
+
<!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="mutayv15h6xkkr"><meta name="title" content="stx Project"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="stx Project"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="stx Project"><meta name="twitter:description" content="A website built with stx templating engine"> <script data-stx-runtime src="/_stx/runtime.dbee66d1.js"></script> <script data-stx-composables src="/_stx/chunk.9fd39d5b.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ts-cloud · Serverless</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_stx/style.448ab192.css"> <script data-stx-scoped>
|
|
2
|
+
function __stx_setup_1791087025950_36() {
|
|
3
3
|
const { batch, computed, configureFetch, defineEmits, defineExpose, definePageMeta, defineProps, defineSlots, defineStore, derived, effect, goBack, goForward, inject, invalidateRoute, isDerived, isSignal, navigate, nextTick, onBeforeMount, onBeforeUnmount, onDestroy, onMount, onMounted, onUnmounted, peek, provide, reactive, ref, refresh, registerStoresClient, setRouteParams, state, untrack, useAsync, useClickOutside, useColorMode, useCookie, useCounter, useDark, useDebounce, useDebouncedValue, useEventListener, useFetch, useFocus, useHead, useId, useInterval, useLocalStorage, useMediaQuery, useMutation, useOptimistic, usePreferredContrast, usePreferredDark, usePreferredLight, usePreferredReducedMotion, useQuery, useReactiveProp, useRef, useRoute, useRouteParam, useRouteParams, useScrollLock, useSearchParams, useSeoMeta, useSessionStorage, useSlots, useStore, useThrottle, useTimeout, useToggle, useWebSocket, watch, watchEffect, watchMultiple, withDefaults } = window.stx;
|
|
4
4
|
|
|
5
5
|
var initialMaintenance = false;
|
|
@@ -180,9 +180,9 @@ runOp = __stxBundle_0bd12f9ee3a9["runOp"];
|
|
|
180
180
|
typed = __stxBundle_0bd12f9ee3a9["typed"];
|
|
181
181
|
return { appCmd, askAppCmd, askOp, busy, canRun, cancelAppCmd, cancelOp, cmdBusy, cmdCanRun, cmdOut, cmdPending, cmdShown, cmdTyped, confirmDanger, confirmLabel, confirmTok, confirmVerb, maint, opOutput, opShown, pending, runAppCmd, runOp, typed, __stxBundle_0bd12f9ee3a9 };
|
|
182
182
|
}
|
|
183
|
-
window.__stx_latestSetup=
|
|
184
|
-
if(window.stx)window.stx._latestSetup=
|
|
185
|
-
</script> <style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.b7a99a5c.css"></head><body data-stx="
|
|
183
|
+
window.__stx_latestSetup=__stx_setup_1791087025950_36;
|
|
184
|
+
if(window.stx)window.stx._latestSetup=__stx_setup_1791087025950_36;
|
|
185
|
+
</script> <style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.b7a99a5c.css"></head><body data-stx="__stx_setup_1791087025950_36"><a data-stx-scope="stx_scope_nav_53" class="skip-link" href="#main-content">Skip to content</a><button class="nav-toggle-button" type="button" aria-label="Open navigation" aria-controls="primary-navigation" aria-expanded="false"><span></span><span></span><span></span></button><button class="nav-scrim" type="button" aria-label="Close navigation"></button><aside class="app-sidebar" id="primary-navigation" aria-label="Primary navigation"><a class="brand" href="/?env=production"><span class="dot"></span><span>ts-cloud</span></a><div class="sidebar-context"><span class="context-label">Project</span><strong>Project</strong></div><div class="environment-picker" aria-label="Environment"><span class="context-label">Environment</span><details><summary class="environment-current production"><span>PROD</span><strong>production</strong></summary></details></div><button class="command-trigger" type="button" aria-keyshortcuts="Meta+K Control+K"><span>Search resources</span><kbd>⌘ K</kbd></button><div class="nav-groups"><section class="nav-group"><h2>Overview</h2><a class="" href="/?env=production">Dashboard</a><a href="/server/activity?env=production">Activity</a></section><section class="nav-group"><h2>Applications</h2><a class="" href="/server/sites?env=production">Services</a><a class="" href="/server/deployments?env=production">Deployments</a><a class="" href="/server/logs?env=production">Logs</a><a class="" href="/integrations?env=production">Git integrations</a><a class="" href="/applications/new?env=production">Create application</a><a class="" href="/applications/compose?env=production">Compose applications</a></section><section class="nav-group"><h2>Operations</h2><a class="" href="/operations/queue?env=production">Deployment queue</a><a class="" href="/operations/previews?env=production">Preview environments</a><a class="" href="/operations/releases?env=production">Releases & promotion</a><a class="" href="/operations/regions?env=production">Regions & failover</a><a class="" href="/operations/maintenance?env=production">Maintenance & DR</a><a class="" href="/operations/workloads?env=production">Workloads</a><a class="" href="/operations/observability?env=production">Observability</a><a class="" href="/operations/alerts?env=production">Alerts & health</a><a class="" href="/operations/spend?env=production">Spend & budgets</a><a href="/server/metrics?env=production">Metrics</a><a href="/server/services?env=production">Runtime services</a><a class="" href="/operations/jobs?env=production">Workers & schedules</a><a class="" href="/operations/configuration?env=production">Environment & secrets</a><a class="" href="/data/backups?env=production">Backups & recovery</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/actions?env=production">Run operations</a></section><section class="nav-group"><h2>Infrastructure</h2><a class="" href="/infrastructure/topology?env=production">Infrastructure map</a><a class="" href="/data/services?env=production">Data services</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/firewall?env=production">Network & firewall</a><a href="/server/ssh-keys?env=production">SSH keys</a><a class="" href="/server/fleet?env=production">Fleet inventory</a><a class="" href="/server/capacity?env=production">Capacity & placement</a><a href="/security?env=production">Security posture</a><a href="/server/terminal?env=production">Terminal</a></section><section class="nav-group"><h2>Organization</h2><a class="" href="/server/team?env=production">People & access</a><a class="" href="/account/automation?env=production">API & automation</a></section><section class="nav-group"><h2>Account</h2><a class="" href="/account/security?env=production">Sign-in & security</a></section></div><form method="post" action="/api/logout" class="signout"><button type="submit">Sign out</button></form></aside><dialog class="command-palette" aria-labelledby="command-title"><div class="command-search"><span aria-hidden="true">⌕</span><input type="search" placeholder="Search services, domains, deployments…" aria-label="Search resources" autocomplete="off"><button type="button" class="command-close" aria-label="Close search">Esc</button></div><h2 id="command-title" class="sr-only">Search resources and navigation</h2><div class="command-status" role="status">Start typing to search this project.</div><section class="saved-views" aria-labelledby="saved-views-title"><div class="saved-views-heading"><h3 id="saved-views-title">Saved views</h3><form class="save-view-form"><label class="sr-only" for="save-view-name">Saved view name</label><input id="save-view-name" maxlength="64" placeholder="Name this view" autocomplete="off"><button type="submit">Save current filters</button></form></div><div class="saved-view-list"></div></section><form class="tag-result-form"><label for="tag-result-name">Tag selected resource</label><input id="tag-result-name" maxlength="32" placeholder="customer-facing" pattern="[A-Za-z0-9][A-Za-z0-9 -]{0,31}" autocomplete="off"><input class="tag-color" type="color" value="#5a8be0" aria-label="Tag color"><button type="submit">Add tag</button></form><div class="command-results" role="listbox" aria-label="Search results"></div><footer><span>↑ ↓ navigate</span><span>Enter open</span><span>Esc close</span></footer></dialog><div class="context-bar" aria-label="Current scope"><div class="context-path"><div class="context-breadcrumb"><span>Project</span><i>/</i><strong>production</strong></div><div class="context-filters" aria-label="Active filters"></div></div><span class="scope-safety production">Production scope</span></div> <script data-stx-scoped data-stx-run="always">
|
|
186
186
|
(function() {
|
|
187
187
|
var { batch, computed, configureFetch, defineEmits, defineExpose, definePageMeta, defineProps, defineSlots, defineStore, derived, effect, goBack, goForward, inject, invalidateRoute, isDerived, isSignal, navigate, nextTick, onBeforeMount, onBeforeUnmount, onDestroy, onMount, onMounted, onUnmounted, peek, provide, reactive, ref, refresh, registerStoresClient, setRouteParams, state, untrack, useAsync, useClickOutside, useColorMode, useCookie, useCounter, useDark, useDebounce, useDebouncedValue, useEventListener, useFetch, useFocus, useHead, useId, useInterval, useLocalStorage, useMediaQuery, useMutation, useOptimistic, usePreferredContrast, usePreferredDark, usePreferredLight, usePreferredReducedMotion, useQuery, useReactiveProp, useRef, useRoute, useRouteParam, useRouteParams, useScrollLock, useSearchParams, useSeoMeta, useSessionStorage, useSlots, useStore, useThrottle, useTimeout, useToggle, useWebSocket, watch, watchEffect, watchMultiple, withDefaults } = window.stx;
|
|
188
188
|
var __destroyHooks = [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ts-cloud",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.19",
|
|
5
5
|
"description": "A lightweight, performant infrastructure-as-code library and CLI for deploying both server-based (EC2) and serverless applications.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@stacksjs/ts-xml": "^0.1.2",
|
|
105
|
-
"@ts-cloud/aws-types": "0.16.
|
|
106
|
-
"@ts-cloud/core": "0.16.
|
|
105
|
+
"@ts-cloud/aws-types": "0.16.19",
|
|
106
|
+
"@ts-cloud/core": "0.16.19",
|
|
107
107
|
"hash-wasm": "^4.12.0"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yu,_l,ca,la,xl,Su,bu,zt,an,Ht,vi,vu,cn,xo}from"./chunk-36aywmsq.js";import{Ge,cs,Fa,ei,ls,Uu}from"./chunk-0znhykt9.js";import{Zl,Wi,ed,td,rd,mr,Bu,Gi}from"./chunk-dp2fsnpe.js";import{ra,na,ia,vl,Do,Tl,El,oa,wl,Cl}from"./chunk-98m9rbpk.js";export{na as CHAIN_HEADER,an as DEFAULT_ATTACK_MODE_HOURS,Zl as DEFAULT_DDOS_THRESHOLDS,Do as DEFAULT_RECURSION_LIMITS,ra as DEPTH_HEADER,zt as MAX_CONTROL_HOURS,Ht as ProtectionControlStore,yu as RATE_LIMIT_KEY_SEPARATOR,xl as RateLimiter,oa as RecursionGuard,ia as TRACE_HEADER,cn as applyControlsToDdos,vu as applyControlsToRateLimits,Gi as applyMitigationFactor,bu as defaultRateLimitRules,vi as describePosture,Ge as escapeSecLang,vl as functionFingerprint,_l as globMatches,Fa as globToRegex,El as inspectInvocation,cs as isSafePattern,Wi as isValidCidr,xo as mergeControlsIntoConfig,Tl as parseChain,Bu as planMitigation,wl as propagationHeaders,Su as rateLimitHeaders,la as rateLimitKey,Cl as recursionBlockedResponse,mr as renderDdosInstallScript,rd as renderNftablesRuleset,td as renderSysctlFile,ei as renderWafConfig,ls as renderWafInstallScript,ca as ruleMatches,ed as sysctlHardening,Uu as wafEventTelemetry};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import{di,u}from"./chunk-afzrsjmc.js";import{li}from"./chunk-m2kr333s.js";import*as c from"node:crypto";import{readFileSync as D}from"node:fs";import{readdir as U}from"node:fs/promises";import{join as L}from"node:path";function St(e){if(e){let r=R(e);if(!r)throw Error(`AWS profile '${e}' not found in ~/.aws/credentials`);return r}let t=process.env.AWS_ACCESS_KEY_ID,s=process.env.AWS_SECRET_ACCESS_KEY;if(t&&s)return{accessKeyId:t,secretAccessKey:s,sessionToken:process.env.AWS_SESSION_TOKEN};return R(process.env.AWS_PROFILE||"default")??{accessKeyId:"",secretAccessKey:""}}function R(e){let{existsSync:t,readFileSync:s}=li("node:fs"),{homedir:r}=li("node:os"),{join:n}=li("node:path"),i=process.env.AWS_SHARED_CREDENTIALS_FILE||n(r(),".aws","credentials");if(!t(i))return null;let o=s(i,"utf-8"),a=null,g,l,h;for(let d of o.split(`
|
|
2
|
-
`)){let p=d.trim();if(!p||p.startsWith("#")||p.startsWith(";"))continue;let y=p.match(/^\[([^\]]+)\]$/);if(y){if(a===e&&g&&l)return{accessKeyId:g,secretAccessKey:l,sessionToken:h};a=y[1],g=void 0,l=void 0,h=void 0;continue}if(a===e){let[b,...S]=p.split("="),m=S.join("=").trim();switch(b.trim().toLowerCase()){case"aws_access_key_id":g=m;break;case"aws_secret_access_key":l=m;break;case"aws_session_token":h=m;break}}}if(a===e&&g&&l)return{accessKeyId:g,secretAccessKey:l,sessionToken:h};return null}function B(e){let{buffer:t,byteOffset:s,byteLength:r}=e;if(t instanceof ArrayBuffer)return t.slice(s,s+r);let n=new ArrayBuffer(r);return new Uint8Array(n).set(new Uint8Array(e)),n}class f{client;region;explicitProfile;endpoint;endpointProtocol="https";forcePathStyle;explicitCredentials;constructor(e="us-east-1",t,s){let r=typeof e==="string"?s:e,n=typeof e==="string"?e:e.region??"us-east-1",i=typeof e==="string"?t:e.profile,o=r?.endpoint?di({region:n,path:"/",endpoint:r.endpoint}):void 0;this.region=n,this.explicitProfile=i,this.endpoint=o?.host,this.endpointProtocol=o?.protocol??"https",this.forcePathStyle=r?.forcePathStyle,this.explicitCredentials=r?.credentials,this.client=new u(r?.credentials,{profile:i,endpoint:r?.endpoint,forcePathStyle:r?.forcePathStyle})}getCredentials(){if(this.explicitCredentials?.accessKeyId&&this.explicitCredentials.secretAccessKey)return this.explicitCredentials;let e=St(this.explicitProfile);if(e.accessKeyId&&e.secretAccessKey)return e;throw Error("S3 credentials not found. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (or pass explicit credentials/profile), or configure ~/.aws/credentials.")}s3BaseHost(){return this.endpoint||`s3.${this.region}.amazonaws.com`}s3VirtualHost(e){return this.forcePathStyle?this.s3BaseHost():`${e}.${this.s3BaseHost()}`}objectPath(e,t){return this.forcePathStyle?`/${e}/${t}`:`/${t}`}objectUrl(e,t){return`${this.endpointProtocol}://${this.s3VirtualHost(e)}${this.objectPath(e,t)}`}async listBuckets(){let e=await this.client.request({service:"s3",region:this.region,method:"GET",path:"/"}),t=[],r=(e?.ListAllMyBucketsResult??e)?.Buckets?.Bucket;if(r){let n=Array.isArray(r)?r:[r];for(let i of n)t.push({Name:i.Name,CreationDate:i.CreationDate})}return{Buckets:t}}async createBucket(e,t){let s={};if(t?.acl)s["x-amz-acl"]=t.acl;let r;if(this.region!=="us-east-1"&&!this.endpoint)r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
3
|
-
<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
4
|
-
<LocationConstraint>${this.region}</LocationConstraint>
|
|
5
|
-
</CreateBucketConfiguration>`,s["Content-Type"]="application/xml";await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,headers:s,body:r})}async deleteBucket(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`})}async emptyAndDeleteBucket(e){let t=!0;while(t){let s=await this.listAllObjects({bucket:e});if(s.length===0){t=!1;break}let r=s.map((n)=>n.Key);for(let n=0;n<r.length;n+=1000){let i=r.slice(n,n+1000);await this.deleteObjects(e,i)}}await this.deleteBucket(e)}async listAllObjects(e){let t=[],s;do{let r={"list-type":"2","max-keys":"1000"};if(e.prefix)r.prefix=e.prefix;if(s)r["continuation-token"]=s;let n=await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e.bucket}`,queryParams:r}),i=n?.ListBucketResult??n,o=i?.Contents;if(o){let g=Array.isArray(o)?o:[o];for(let l of g)t.push({Key:l.Key,LastModified:l.LastModified||"",Size:Number.parseInt(l.Size||"0"),ETag:l.ETag})}let a=i?.IsTruncated;s=a==="true"||a===!0?i?.NextContinuationToken:void 0}while(s);return t}async list(e){let t=await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e.bucket}`}),s=[],n=(t?.ListBucketResult??t)?.Contents;if(n){let i=Array.isArray(n)?n:[n];for(let o of i){if(e.prefix&&!o.Key?.startsWith(e.prefix))continue;if(s.push({Key:o.Key||"",LastModified:o.LastModified||"",Size:Number.parseInt(o.Size||"0"),ETag:o.ETag}),e.maxKeys&&s.length>=e.maxKeys)break}}return s}async putObject(e){let t={};if(e.acl)t["x-amz-acl"]=e.acl;if(e.cacheControl)t["Cache-Control"]=e.cacheControl;if(e.contentType)t["Content-Type"]=e.contentType;if(e.metadata)for(let[n,i]of Object.entries(e.metadata))t[`x-amz-meta-${n}`]=i;let s=e.key.split("/").map((n)=>encodeURIComponent(n)).join("/"),r=e.body instanceof Uint8Array&&!Buffer.isBuffer(e.body)?Buffer.from(e.body):e.body;if(Buffer.isBuffer(r)||r instanceof Uint8Array){let n=Buffer.isBuffer(r)?r:Buffer.from(r),{accessKeyId:i,secretAccessKey:o,sessionToken:a}=this.getCredentials(),g=this.s3VirtualHost(e.bucket),l=this.objectPath(e.bucket,s),h=this.objectUrl(e.bucket,s),d=new Date,p=d.toISOString().replace(/[:-]|\.\d{3}/g,""),y=d.toISOString().slice(0,10).replace(/-/g,""),b=c.createHash("sha256").update(n).digest("hex"),S={host:g,"x-amz-date":p,"x-amz-content-sha256":b,...t};if(a)S["x-amz-security-token"]=a;let m=Object.keys(S).sort().map((P)=>`${P.toLowerCase()}:${S[P].trim()}
|
|
6
|
-
`).join(""),k=Object.keys(S).sort().map((P)=>P.toLowerCase()).join(";"),T=["PUT",l,"",m,k,b].join(`
|
|
7
|
-
`),w="AWS4-HMAC-SHA256",C=`${y}/${this.region}/s3/aws4_request`,q=[w,p,C,c.createHash("sha256").update(T).digest("hex")].join(`
|
|
8
|
-
`),j=c.createHmac("sha256",`AWS4${o}`).update(y).digest(),I=c.createHmac("sha256",j).update(this.region).digest(),H=c.createHmac("sha256",I).update("s3").digest(),E=c.createHmac("sha256",H).update("aws4_request").digest(),v=c.createHmac("sha256",E).update(q).digest("hex"),A=`${w} Credential=${i}/${C}, SignedHeaders=${k}, Signature=${v}`,x=await fetch(h,{method:"PUT",headers:{...S,Authorization:A},body:B(n)});if(!x.ok){let P=await x.text();throw Error(`S3 PUT failed: ${x.status} ${P}`)}return}await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${s}`,bucket:e.bucket,headers:t,body:e.body})}async getObject(e,t){let s=t.split("/").map((n)=>encodeURIComponent(n)).join("/");return await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${s}`,bucket:e,rawResponse:!0})}async getObjectBytes(e,t){let{accessKeyId:s,secretAccessKey:r,sessionToken:n}=this.getCredentials(),i=this.s3VirtualHost(e),o=t.split("/").map((P)=>encodeURIComponent(P)).join("/"),a=this.objectPath(e,o),g=this.objectUrl(e,o),l=new Date,h=l.toISOString().replace(/[:-]|\.\d{3}/g,""),d=l.toISOString().slice(0,10).replace(/-/g,""),p=c.createHash("sha256").update("").digest("hex"),y={host:i,"x-amz-date":h,"x-amz-content-sha256":p};if(n)y["x-amz-security-token"]=n;let b=Object.keys(y).sort().map((P)=>`${P.toLowerCase()}:${y[P].trim()}
|
|
9
|
-
`).join(""),S=Object.keys(y).sort().map((P)=>P.toLowerCase()).join(";"),m=["GET",a,"",b,S,p].join(`
|
|
10
|
-
`),k="AWS4-HMAC-SHA256",T=`${d}/${this.region}/s3/aws4_request`,w=[k,h,T,c.createHash("sha256").update(m).digest("hex")].join(`
|
|
11
|
-
`),C=c.createHmac("sha256",`AWS4${r}`).update(d).digest(),q=c.createHmac("sha256",C).update(this.region).digest(),j=c.createHmac("sha256",q).update("s3").digest(),I=c.createHmac("sha256",j).update("aws4_request").digest(),H=c.createHmac("sha256",I).update(w).digest("hex"),E=`${k} Credential=${s}/${T}, SignedHeaders=${S}, Signature=${H}`,v=await fetch(g,{method:"GET",headers:{...y,Authorization:E}});if(!v.ok){let P=await v.text();throw Error(`S3 GET failed: ${v.status} ${P}`)}let A=await v.arrayBuffer(),x=v.headers.get("content-length");return{body:new Uint8Array(A),contentType:v.headers.get("content-type")??void 0,contentLength:x?Number.parseInt(x,10):void 0}}async copyObject(e){let t={"x-amz-copy-source":`/${e.sourceBucket}/${e.sourceKey}`};if(e.metadataDirective)t["x-amz-metadata-directive"]=e.metadataDirective;if(e.contentType)t["Content-Type"]=e.contentType;if(e.metadata)for(let[s,r]of Object.entries(e.metadata))t[`x-amz-meta-${s}`]=r;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e.destinationBucket}/${e.destinationKey}`,headers:t})}async deleteObject(e,t){let s=t.split("/").map((r)=>encodeURIComponent(r)).join("/");await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${s}`,bucket:e})}async deleteObjects(e,t){let s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
12
|
-
<Delete>
|
|
13
|
-
${t.map((n)=>`<Object><Key>${n}</Key></Object>`).join(`
|
|
14
|
-
`)}
|
|
15
|
-
</Delete>`,r=c.createHash("md5").update(s).digest("base64");await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${e}`,queryParams:{delete:""},body:s,headers:{"Content-Type":"application/xml","Content-MD5":r}})}async bucketExists(e){try{return await this.client.request({service:"s3",region:this.region,method:"HEAD",path:`/${e}`}),!0}catch{return!1}}async copy(e){let t=D(e.source);await this.putObject({bucket:e.bucket,key:e.key,body:t,acl:e.acl,cacheControl:e.cacheControl,contentType:e.contentType,metadata:e.metadata})}async sync(e){let t=await this.listFilesRecursive(e.source);for(let s of t){if(e.exclude&&e.exclude.some((i)=>s.includes(i)))continue;if(e.include&&!e.include.some((i)=>s.includes(i)))continue;let r=s.substring(e.source.length+1),n=e.prefix?`${e.prefix}/${r}`:r;if(!e.dryRun){let i=D(s);await this.putObject({bucket:e.bucket,key:n,body:i,acl:e.acl,cacheControl:e.cacheControl,contentType:e.contentType,metadata:e.metadata})}}}async delete(e,t){await this.deleteObject(e,t)}async deletePrefix(e,t){let r=(await this.list({bucket:e,prefix:t})).map((n)=>n.Key);if(r.length>0)await this.deleteObjects(e,r)}async getBucketSize(e,t){return(await this.list({bucket:e,prefix:t})).reduce((r,n)=>r+n.Size,0)}async listFilesRecursive(e){let t=[],s=await U(e,{withFileTypes:!0});for(let r of s){let n=L(e,r.name);if(r.isDirectory()){let i=await this.listFilesRecursive(n);t.push(...i)}else t.push(n)}return t}async putBucketPolicy(e,t){let{accessKeyId:s,secretAccessKey:r,sessionToken:n}=this.getCredentials(),i=this.s3BaseHost(),o=typeof t==="string"?t:JSON.stringify(t),a=new Date,g=a.toISOString().replace(/[:-]|\.\d{3}/g,""),l=a.toISOString().slice(0,10).replace(/-/g,""),h=c.createHash("sha256").update(o).digest("hex"),d="/"+e,p="policy=",y={host:i,"x-amz-date":g,"x-amz-content-sha256":h,"content-type":"application/json"};if(n)y["x-amz-security-token"]=n;let b=Object.keys(y).sort().map((x)=>`${x.toLowerCase()}:${y[x].trim()}
|
|
16
|
-
`).join(""),S=Object.keys(y).sort().map((x)=>x.toLowerCase()).join(";"),m=["PUT",d,"policy=",b,S,h].join(`
|
|
17
|
-
`),k="AWS4-HMAC-SHA256",T=`${l}/${this.region}/s3/aws4_request`,w=[k,g,T,c.createHash("sha256").update(m).digest("hex")].join(`
|
|
18
|
-
`),C=c.createHmac("sha256","AWS4"+r).update(l).digest(),q=c.createHmac("sha256",C).update(this.region).digest(),j=c.createHmac("sha256",q).update("s3").digest(),I=c.createHmac("sha256",j).update("aws4_request").digest(),H=c.createHmac("sha256",I).update(w).digest("hex"),E=`${k} Credential=${s}/${T}, SignedHeaders=${S}, Signature=${H}`,v=`${this.endpointProtocol}://${i}${d}?policy=`,A=await fetch(v,{method:"PUT",headers:{...y,Authorization:E},body:o});if(!A.ok){let x=await A.text();throw Error(`Failed to put bucket policy: ${A.status} ${x}`)}}async getBucketPolicy(e){let{accessKeyId:t,secretAccessKey:s,sessionToken:r}=this.getCredentials(),n=this.s3BaseHost(),i=new Date,o=i.toISOString().replace(/[:-]|\.\d{3}/g,""),a=i.toISOString().slice(0,10).replace(/-/g,""),g=c.createHash("sha256").update("").digest("hex"),l="/"+e,h="policy=",d={host:n,"x-amz-date":o,"x-amz-content-sha256":g};if(r)d["x-amz-security-token"]=r;let p=Object.keys(d).sort().map((A)=>`${A.toLowerCase()}:${d[A].trim()}
|
|
19
|
-
`).join(""),y=Object.keys(d).sort().map((A)=>A.toLowerCase()).join(";"),b=["GET",l,"policy=",p,y,g].join(`
|
|
20
|
-
`),S="AWS4-HMAC-SHA256",m=`${a}/${this.region}/s3/aws4_request`,k=[S,o,m,c.createHash("sha256").update(b).digest("hex")].join(`
|
|
21
|
-
`),T=c.createHmac("sha256","AWS4"+s).update(a).digest(),w=c.createHmac("sha256",T).update(this.region).digest(),C=c.createHmac("sha256",w).update("s3").digest(),q=c.createHmac("sha256",C).update("aws4_request").digest(),j=c.createHmac("sha256",q).update(k).digest("hex"),I=`${S} Credential=${t}/${m}, SignedHeaders=${y}, Signature=${j}`,H=`${this.endpointProtocol}://${n}${l}?policy=`,E=await fetch(H,{method:"GET",headers:{...d,Authorization:I}});if(E.status===404)return null;if(!E.ok){let A=await E.text();throw Error(`Failed to get bucket policy: ${E.status} ${A}`)}let v=await E.text();return JSON.parse(v)}async deleteBucketPolicy(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{policy:""}})}async headBucket(e){try{return{exists:!0,region:(await this.client.request({service:"s3",region:this.region,method:"HEAD",path:`/${e}`,returnHeaders:!0}))?.headers?.["x-amz-bucket-region"]}}catch(t){if(t.statusCode===404)return{exists:!1};throw t}}async headObject(e,t){try{let s=await this.client.request({service:"s3",region:this.region,method:"HEAD",path:`/${e}/${t}`,returnHeaders:!0});return{ContentLength:s?.headers?.["content-length"]?parseInt(s.headers["content-length"]):void 0,ContentType:s?.headers?.["content-type"],ETag:s?.headers?.etag,LastModified:s?.headers?.["last-modified"]}}catch(s){if(s.statusCode===404)return null;throw s}}async getObjectBuffer(e,t){let s=await this.getObject(e,t);return Buffer.from(s)}async getObjectJson(e,t){let s=await this.getObject(e,t);return JSON.parse(s)}async putObjectJson(e,t,s,r){await this.putObject({bucket:e,key:t,body:JSON.stringify(s),contentType:"application/json",...r})}async getBucketVersioning(e){return{Status:(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{versioning:""}}))?.VersioningConfiguration?.Status}}async putBucketVersioning(e,t){let s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
22
|
-
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
23
|
-
<Status>${t}</Status>
|
|
24
|
-
</VersioningConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{versioning:""},headers:{"Content-Type":"application/xml"},body:s})}async getBucketLifecycleConfiguration(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{lifecycle:""}}))?.LifecycleConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async putBucketLifecycleConfiguration(e,t){let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
25
|
-
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
26
|
-
${t.map((n)=>{let i=`<Rule><ID>${n.ID}</ID><Status>${n.Status}</Status>`;if(n.Filter)i+=`<Filter><Prefix>${n.Filter.Prefix||""}</Prefix></Filter>`;else i+="<Filter><Prefix></Prefix></Filter>";if(n.Expiration){if(n.Expiration.Days)i+=`<Expiration><Days>${n.Expiration.Days}</Days></Expiration>`;else if(n.Expiration.Date)i+=`<Expiration><Date>${n.Expiration.Date}</Date></Expiration>`}if(n.Transitions)for(let o of n.Transitions)i+=`<Transition><Days>${o.Days}</Days><StorageClass>${o.StorageClass}</StorageClass></Transition>`;if(n.NoncurrentVersionExpiration)i+=`<NoncurrentVersionExpiration><NoncurrentDays>${n.NoncurrentVersionExpiration.NoncurrentDays}</NoncurrentDays></NoncurrentVersionExpiration>`;return i+="</Rule>",i}).join("")}
|
|
27
|
-
</LifecycleConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{lifecycle:""},headers:{"Content-Type":"application/xml"},body:r})}async deleteBucketLifecycleConfiguration(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{lifecycle:""}})}async getBucketCors(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{cors:""}}))?.CORSConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async putBucketCors(e,t){let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
28
|
-
<CORSConfiguration>
|
|
29
|
-
${t.map((n)=>{let i="<CORSRule>";for(let o of n.AllowedOrigins)i+=`<AllowedOrigin>${o}</AllowedOrigin>`;for(let o of n.AllowedMethods)i+=`<AllowedMethod>${o}</AllowedMethod>`;if(n.AllowedHeaders)for(let o of n.AllowedHeaders)i+=`<AllowedHeader>${o}</AllowedHeader>`;if(n.ExposeHeaders)for(let o of n.ExposeHeaders)i+=`<ExposeHeader>${o}</ExposeHeader>`;if(n.MaxAgeSeconds)i+=`<MaxAgeSeconds>${n.MaxAgeSeconds}</MaxAgeSeconds>`;return i+="</CORSRule>",i}).join("")}
|
|
30
|
-
</CORSConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{cors:""},headers:{"Content-Type":"application/xml"},body:r})}async deleteBucketCors(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{cors:""}})}async getBucketEncryption(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{encryption:""}}))?.ServerSideEncryptionConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async putBucketEncryption(e,t,s){let r=`<ApplyServerSideEncryptionByDefault><SSEAlgorithm>${t}</SSEAlgorithm>`;if(s)r+=`<KMSMasterKeyID>${s}</KMSMasterKeyID>`;r+="</ApplyServerSideEncryptionByDefault>";let n=`<?xml version="1.0" encoding="UTF-8"?>
|
|
31
|
-
<ServerSideEncryptionConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
32
|
-
<Rule>${r}</Rule>
|
|
33
|
-
</ServerSideEncryptionConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{encryption:""},headers:{"Content-Type":"application/xml"},body:n})}async deleteBucketEncryption(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{encryption:""}})}async getBucketTagging(e){try{let s=(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{tagging:""}}))?.Tagging?.TagSet?.Tag;if(!s)return[];return Array.isArray(s)?s:[s]}catch(t){if(t.statusCode===404)return[];throw t}}async putBucketTagging(e,t){let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
34
|
-
<Tagging>
|
|
35
|
-
<TagSet>${t.map((n)=>`<Tag><Key>${n.Key}</Key><Value>${n.Value}</Value></Tag>`).join("")}</TagSet>
|
|
36
|
-
</Tagging>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{tagging:""},headers:{"Content-Type":"application/xml"},body:r})}async deleteBucketTagging(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{tagging:""}})}async getObjectTagging(e,t){try{let r=(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}/${t}`,queryParams:{tagging:""}}))?.Tagging?.TagSet?.Tag;if(!r)return[];return Array.isArray(r)?r:[r]}catch(s){if(s.statusCode===404)return[];throw s}}async putObjectTagging(e,t,s){let n=`<?xml version="1.0" encoding="UTF-8"?>
|
|
37
|
-
<Tagging>
|
|
38
|
-
<TagSet>${s.map((i)=>`<Tag><Key>${i.Key}</Key><Value>${i.Value}</Value></Tag>`).join("")}</TagSet>
|
|
39
|
-
</Tagging>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}/${t}`,queryParams:{tagging:""},headers:{"Content-Type":"application/xml"},body:n})}async deleteObjectTagging(e,t){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}/${t}`,queryParams:{tagging:""}})}async getBucketAcl(e){return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{acl:""}}))?.AccessControlPolicy}async putBucketAcl(e,t){await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{acl:""},headers:{"x-amz-acl":t}})}async getObjectAcl(e,t){return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}/${t}`,queryParams:{acl:""}}))?.AccessControlPolicy}async putObjectAcl(e,t,s){await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}/${t}`,queryParams:{acl:""},headers:{"x-amz-acl":s}})}async getBucketLocation(e){return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{location:""}}))?.LocationConstraint||"us-east-1"}async getBucketLogging(e){return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{logging:""}}))?.BucketLoggingStatus}async putBucketLogging(e,t,s){let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
40
|
-
<BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
41
|
-
<LoggingEnabled>
|
|
42
|
-
<TargetBucket>${t}</TargetBucket>
|
|
43
|
-
<TargetPrefix>${s}</TargetPrefix>
|
|
44
|
-
</LoggingEnabled>
|
|
45
|
-
</BucketLoggingStatus>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{logging:""},headers:{"Content-Type":"application/xml"},body:r})}async getBucketNotificationConfiguration(e){return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{notification:""}}))?.NotificationConfiguration}async putBucketNotificationConfiguration(e,t){let s="";if(t.LambdaFunctionConfigurations)for(let n of t.LambdaFunctionConfigurations){if(s+="<CloudFunctionConfiguration>",n.Id)s+=`<Id>${n.Id}</Id>`;s+=`<CloudFunction>${n.LambdaFunctionArn}</CloudFunction>`;for(let i of n.Events)s+=`<Event>${i}</Event>`;if(n.Filter?.Key?.FilterRules){s+="<Filter><S3Key>";for(let i of n.Filter.Key.FilterRules)s+=`<FilterRule><Name>${i.Name}</Name><Value>${i.Value}</Value></FilterRule>`;s+="</S3Key></Filter>"}s+="</CloudFunctionConfiguration>"}if(t.TopicConfigurations)for(let n of t.TopicConfigurations){if(s+="<TopicConfiguration>",n.Id)s+=`<Id>${n.Id}</Id>`;s+=`<Topic>${n.TopicArn}</Topic>`;for(let i of n.Events)s+=`<Event>${i}</Event>`;s+="</TopicConfiguration>"}if(t.QueueConfigurations)for(let n of t.QueueConfigurations){if(s+="<QueueConfiguration>",n.Id)s+=`<Id>${n.Id}</Id>`;s+=`<Queue>${n.QueueArn}</Queue>`;for(let i of n.Events)s+=`<Event>${i}</Event>`;s+="</QueueConfiguration>"}let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
46
|
-
<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
47
|
-
${s}
|
|
48
|
-
</NotificationConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{notification:""},headers:{"Content-Type":"application/xml"},body:r})}async getBucketWebsite(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{website:""}}))?.WebsiteConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async putBucketWebsite(e,t){let s="";if(t.RedirectAllRequestsTo)s=`<RedirectAllRequestsTo>
|
|
49
|
-
<HostName>${t.RedirectAllRequestsTo.HostName}</HostName>
|
|
50
|
-
${t.RedirectAllRequestsTo.Protocol?`<Protocol>${t.RedirectAllRequestsTo.Protocol}</Protocol>`:""}
|
|
51
|
-
</RedirectAllRequestsTo>`;else if(s=`<IndexDocument><Suffix>${t.IndexDocument}</Suffix></IndexDocument>`,t.ErrorDocument)s+=`<ErrorDocument><Key>${t.ErrorDocument}</Key></ErrorDocument>`;let r=`<?xml version="1.0" encoding="UTF-8"?>
|
|
52
|
-
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
53
|
-
${s}
|
|
54
|
-
</WebsiteConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{website:""},headers:{"Content-Type":"application/xml"},body:r})}async deleteBucketWebsite(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{website:""}})}async getBucketReplication(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{replication:""}}))?.ReplicationConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async deleteBucketReplication(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{replication:""}})}async getPublicAccessBlock(e){try{return(await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${e}`,queryParams:{publicAccessBlock:""}}))?.PublicAccessBlockConfiguration}catch(t){if(t.statusCode===404)return null;throw t}}async putPublicAccessBlock(e,t){let s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
55
|
-
<PublicAccessBlockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
56
|
-
<BlockPublicAcls>${t.BlockPublicAcls??!0}</BlockPublicAcls>
|
|
57
|
-
<IgnorePublicAcls>${t.IgnorePublicAcls??!0}</IgnorePublicAcls>
|
|
58
|
-
<BlockPublicPolicy>${t.BlockPublicPolicy??!0}</BlockPublicPolicy>
|
|
59
|
-
<RestrictPublicBuckets>${t.RestrictPublicBuckets??!0}</RestrictPublicBuckets>
|
|
60
|
-
</PublicAccessBlockConfiguration>`;await this.client.request({service:"s3",region:this.region,method:"PUT",path:`/${e}`,queryParams:{publicAccessBlock:""},headers:{"Content-Type":"application/xml"},body:s})}async deletePublicAccessBlock(e){await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${e}`,queryParams:{publicAccessBlock:""}})}generatePresignedGetUrl(e,t,s=3600){let{accessKeyId:r,secretAccessKey:n}=this.getCredentials(),i=this.s3VirtualHost(e),o=new Date,a=o.toISOString().replace(/[:-]|\.\d{3}/g,""),g=o.toISOString().slice(0,10).replace(/-/g,""),l=`${g}/${this.region}/s3/aws4_request`,h=`${r}/${l}`,d=t.split("/").map((C)=>encodeURIComponent(C)).join("/"),p=new URLSearchParams({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":h,"X-Amz-Date":a,"X-Amz-Expires":s.toString(),"X-Amz-SignedHeaders":"host"}),y=["GET",this.objectPath(e,d),p.toString(),`host:${i}
|
|
61
|
-
`,"host","UNSIGNED-PAYLOAD"].join(`
|
|
62
|
-
`),b=["AWS4-HMAC-SHA256",a,l,c.createHash("sha256").update(y).digest("hex")].join(`
|
|
63
|
-
`),S=c.createHmac("sha256",`AWS4${n}`).update(g).digest(),m=c.createHmac("sha256",S).update(this.region).digest(),k=c.createHmac("sha256",m).update("s3").digest(),T=c.createHmac("sha256",k).update("aws4_request").digest(),w=c.createHmac("sha256",T).update(b).digest("hex");return p.append("X-Amz-Signature",w),`${this.endpointProtocol}://${i}${this.objectPath(e,d)}?${p.toString()}`}generatePresignedPutUrl(e,t,s,r=3600){let{accessKeyId:n,secretAccessKey:i}=this.getCredentials(),o=this.s3VirtualHost(e),a=new Date,g=a.toISOString().replace(/[:-]|\.\d{3}/g,""),l=a.toISOString().slice(0,10).replace(/-/g,""),h=`${l}/${this.region}/s3/aws4_request`,d=`${n}/${h}`,p=t.split("/").map((q)=>encodeURIComponent(q)).join("/"),y=new URLSearchParams({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":d,"X-Amz-Date":g,"X-Amz-Expires":r.toString(),"X-Amz-SignedHeaders":"content-type;host"}),b=["PUT",this.objectPath(e,p),y.toString(),`content-type:${s}
|
|
64
|
-
host:${o}
|
|
65
|
-
`,"content-type;host","UNSIGNED-PAYLOAD"].join(`
|
|
66
|
-
`),S=["AWS4-HMAC-SHA256",g,h,c.createHash("sha256").update(b).digest("hex")].join(`
|
|
67
|
-
`),m=c.createHmac("sha256",`AWS4${i}`).update(l).digest(),k=c.createHmac("sha256",m).update(this.region).digest(),T=c.createHmac("sha256",k).update("s3").digest(),w=c.createHmac("sha256",T).update("aws4_request").digest(),C=c.createHmac("sha256",w).update(S).digest("hex");return y.append("X-Amz-Signature",C),`${this.endpointProtocol}://${o}${this.objectPath(e,p)}?${y.toString()}`}async createMultipartUpload(e,t,s){let r={};if(s?.contentType)r["Content-Type"]=s.contentType;if(s?.metadata)for(let[a,g]of Object.entries(s.metadata))r[`x-amz-meta-${a}`]=g;let n=t.split("/").map((a)=>encodeURIComponent(a)).join("/"),i=await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${n}`,bucket:e,queryParams:{uploads:""},headers:r});return{UploadId:(i?.InitiateMultipartUploadResult??i)?.UploadId}}async uploadPart(e,t,s,r,n){let{accessKeyId:i,secretAccessKey:o,sessionToken:a}=this.getCredentials(),g=this.s3VirtualHost(e),l=t.split("/").map((K)=>encodeURIComponent(K)).join("/"),h=this.objectPath(e,l),d=`${this.objectUrl(e,l)}?partNumber=${r}&uploadId=${encodeURIComponent(s)}`,p=new Date,y=p.toISOString().replace(/[:-]|\.\d{3}/g,""),b=p.toISOString().slice(0,10).replace(/-/g,""),S=c.createHash("sha256").update(n).digest("hex"),m={host:g,"x-amz-date":y,"x-amz-content-sha256":S};if(a)m["x-amz-security-token"]=a;let k=Object.keys(m).sort().map((K)=>`${K.toLowerCase()}:${m[K].trim()}
|
|
68
|
-
`).join(""),T=Object.keys(m).sort().map((K)=>K.toLowerCase()).join(";"),w=["PUT",h,`partNumber=${r}&uploadId=${encodeURIComponent(s)}`,k,T,S].join(`
|
|
69
|
-
`),C="AWS4-HMAC-SHA256",q=`${b}/${this.region}/s3/aws4_request`,j=[C,y,q,c.createHash("sha256").update(w).digest("hex")].join(`
|
|
70
|
-
`),I=c.createHmac("sha256",`AWS4${o}`).update(b).digest(),H=c.createHmac("sha256",I).update(this.region).digest(),E=c.createHmac("sha256",H).update("s3").digest(),v=c.createHmac("sha256",E).update("aws4_request").digest(),A=c.createHmac("sha256",v).update(j).digest("hex"),x=`${C} Credential=${i}/${q}, SignedHeaders=${T}, Signature=${A}`,P=await fetch(d,{method:"PUT",headers:{...m,Authorization:x},body:B(n)});if(!P.ok){let K=await P.text();throw Error(`Upload part failed: ${P.status} ${K}`)}return{ETag:P.headers.get("etag")||""}}async completeMultipartUpload(e,t,s,r){let n=t.split("/").map((a)=>encodeURIComponent(a)).join("/"),o=`<?xml version="1.0" encoding="UTF-8"?>
|
|
71
|
-
<CompleteMultipartUpload>${r.sort((a,g)=>a.PartNumber-g.PartNumber).map((a)=>`<Part><PartNumber>${a.PartNumber}</PartNumber><ETag>${a.ETag}</ETag></Part>`).join("")}</CompleteMultipartUpload>`;await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${n}`,bucket:e,queryParams:{uploadId:s},headers:{"Content-Type":"application/xml"},body:o})}async abortMultipartUpload(e,t,s){let r=t.split("/").map((n)=>encodeURIComponent(n)).join("/");await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${r}`,bucket:e,queryParams:{uploadId:s}})}async listMultipartUploads(e){let t=await this.client.request({service:"s3",region:this.region,method:"GET",path:"/",bucket:e,queryParams:{uploads:""}}),s=(t?.ListMultipartUploadsResult??t)?.Upload;if(!s)return[];return(Array.isArray(s)?s:[s]).map((n)=>({Key:n.Key,UploadId:n.UploadId,Initiated:n.Initiated}))}async restoreObject(e,t,s,r="Standard"){let n=`<?xml version="1.0" encoding="UTF-8"?>
|
|
72
|
-
<RestoreRequest>
|
|
73
|
-
<Days>${s}</Days>
|
|
74
|
-
<GlacierJobParameters>
|
|
75
|
-
<Tier>${r}</Tier>
|
|
76
|
-
</GlacierJobParameters>
|
|
77
|
-
</RestoreRequest>`;await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${e}/${t}`,queryParams:{restore:""},headers:{"Content-Type":"application/xml"},body:n})}async selectObjectContent(e,t,s,r,n="JSON"){let i="";if(r==="CSV")i="<CSV><FileHeaderInfo>USE</FileHeaderInfo></CSV>";else if(r==="JSON")i="<JSON><Type>DOCUMENT</Type></JSON>";else i="<Parquet/>";let o="";if(n==="CSV")o="<CSV/>";else o="<JSON/>";let a=`<?xml version="1.0" encoding="UTF-8"?>
|
|
78
|
-
<SelectObjectContentRequest>
|
|
79
|
-
<Expression>${s}</Expression>
|
|
80
|
-
<ExpressionType>SQL</ExpressionType>
|
|
81
|
-
<InputSerialization>${i}</InputSerialization>
|
|
82
|
-
<OutputSerialization>${o}</OutputSerialization>
|
|
83
|
-
</SelectObjectContentRequest>`;return await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${e}/${t}`,queryParams:{select:"","select-type":"2"},headers:{"Content-Type":"application/xml"},body:a,rawResponse:!0})}async getSignedUrl(e){let{bucket:t,key:s,expiresIn:r=3600,operation:n="getObject"}=e,{accessKeyId:i,secretAccessKey:o,sessionToken:a}=this.getCredentials(),g=new Date,l=g.toISOString().replace(/[:-]|\.\d{3}/g,""),h=g.toISOString().slice(0,10).replace(/-/g,""),d=this.s3VirtualHost(t),p=n==="putObject"?"PUT":"GET",y="AWS4-HMAC-SHA256",b=`${h}/${this.region}/s3/aws4_request`,m={"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":`${i}/${b}`,"X-Amz-Date":l,"X-Amz-Expires":r.toString(),"X-Amz-SignedHeaders":"host"};if(a)m["X-Amz-Security-Token"]=a;let T=Object.keys(m).sort().map((O)=>`${encodeURIComponent(O)}=${encodeURIComponent(m[O])}`).join("&"),w=s.split("/").map((O)=>encodeURIComponent(O)).join("/"),C=this.objectPath(t,w),q=`host:${d}
|
|
84
|
-
`,H=[p,C,T,q,"host","UNSIGNED-PAYLOAD"].join(`
|
|
85
|
-
`),E=["AWS4-HMAC-SHA256",l,b,c.createHash("sha256").update(H).digest("hex")].join(`
|
|
86
|
-
`),v=c.createHmac("sha256",`AWS4${o}`).update(h).digest(),A=c.createHmac("sha256",v).update(this.region).digest(),x=c.createHmac("sha256",A).update("s3").digest(),P=c.createHmac("sha256",x).update("aws4_request").digest(),K=c.createHmac("sha256",P).update(E).digest("hex");return`${this.endpointProtocol}://${d}${C}?${T}&X-Amz-Signature=${K}`}async listObjects(e){let{bucket:t,prefix:s,maxKeys:r=1000,continuationToken:n}=e,i={"list-type":"2","max-keys":r.toString()};if(s)i.prefix=s;if(n)i["continuation-token"]=n;let o=await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${t}`,queryParams:i}),a=[],g=o?.ListBucketResult??o;if(g?.Contents){let l=Array.isArray(g.Contents)?g.Contents:[g.Contents];for(let h of l)a.push({Key:h.Key||"",LastModified:h.LastModified||"",Size:Number.parseInt(h.Size||"0"),ETag:h.ETag})}return{objects:a,nextContinuationToken:g?.NextContinuationToken}}async emptyBucket(e){let t=0,s=await this.listAllObjects({bucket:e});if(s.length>0)for(let r=0;r<s.length;r+=1000){let i=s.slice(r,r+1000).map((o)=>o.Key);await this.deleteObjects(e,i),t+=i.length}try{let r,n;do{let i=await this.listObjectVersions({bucket:e,keyMarker:r,versionIdMarker:n,maxKeys:1000}),o=[];if(i.versions)for(let a of i.versions)o.push({Key:a.Key,VersionId:a.VersionId});if(i.deleteMarkers)for(let a of i.deleteMarkers)o.push({Key:a.Key,VersionId:a.VersionId});if(o.length>0)await this.deleteObjectVersions(e,o),t+=o.length;r=i.nextKeyMarker,n=i.nextVersionIdMarker}while(r)}catch{}return{deletedCount:t}}async listObjectVersions(e){let{bucket:t,prefix:s,keyMarker:r,versionIdMarker:n,maxKeys:i=1000}=e,o={versions:"","max-keys":i.toString()};if(s)o.prefix=s;if(r)o["key-marker"]=r;if(n)o["version-id-marker"]=n;let a=await this.client.request({service:"s3",region:this.region,method:"GET",path:`/${t}`,queryParams:o}),g=[],l=[];if(a.Version){let h=Array.isArray(a.Version)?a.Version:[a.Version];for(let d of h)g.push({Key:d.Key,VersionId:d.VersionId,IsLatest:d.IsLatest==="true"})}if(a.DeleteMarker){let h=Array.isArray(a.DeleteMarker)?a.DeleteMarker:[a.DeleteMarker];for(let d of h)l.push({Key:d.Key,VersionId:d.VersionId,IsLatest:d.IsLatest==="true"})}return{versions:g,deleteMarkers:l,nextKeyMarker:a.NextKeyMarker,nextVersionIdMarker:a.NextVersionIdMarker}}async deleteObjectVersions(e,t){let s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
87
|
-
<Delete>
|
|
88
|
-
<Quiet>true</Quiet>
|
|
89
|
-
${t.map((n)=>`<Object><Key>${n.Key}</Key>${n.VersionId?`<VersionId>${n.VersionId}</VersionId>`:""}</Object>`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
</Delete>`,r=c.createHash("md5").update(s).digest("base64");await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${e}`,queryParams:{delete:""},body:s,headers:{"Content-Type":"application/xml","Content-MD5":r}})}}
|
|
92
|
-
export{St,f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v}from"./chunk-jq36fh46.js";import"./chunk-afzrsjmc.js";export{v as CloudFormationClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Cu,qr,Ui,re,Au,Ta,Ul,Ko,Iu,Ru,Pu,Ea,Bi,Jo,wa,Wr,dr,Nu,Xn,Du,Ca,Bl,Fl,Xo,Aa,Ia,ur,Fi,pr,Ra,Qo,Qn,jl,ji,Pa,Na,Vi,Vl,Da,ka,_a,xa,Yo,zl,Hl,ku,ql,$a,zi,Wl,Gl,Zo,kt,es,ts,rs,Oa,Kl,La,ns,_u,mt,xu,Ma,_t,Ua,$u,Ba,Jl,Ou,X,Xl,is,Lu,Hi,Yn,Zn,os,Ql,Yl,Mu,ss,as}from"./chunk-bxfnhnqd.js";import"./chunk-8af2sky9.js";import"./chunk-98m9rbpk.js";export{Zo as AnomalyConfigStore,Ql as AwsSpendTransport,Yl as ComputeSpendTransport,Xo as CounterTracker,Ca as DEFAULT_METER_MAPPINGS,Ea as DEFAULT_PRICE_BOOK,Fi as DEFAULT_THRESHOLDS,kt as DETECTABLE_SIGNALS,Ui as ENFORCEMENT_ACTIONS,Vi as ENFORCEMENT_DESCRIPTIONS,re as ENFORCEMENT_SEVERITY,Kl as FOCUS_VERSION,qr as METERS,Cu as METER_KEYS,Au as MICRO_CENTS,jl as MIN_PROJECTION_CONFIDENCE,Jl as RecordingSpendTransport,Wl as SENSITIVITY_THRESHOLDS,Zn as SPEND_CYCLE_SECONDS,Ma as SPEND_GATE_SETTING,Lu as SPEND_LEASE_SETTING,ts as SignalSource,Ua as SpendCapError,_t as SpendGate,Hi as SpendLoopLease,is as SpendNotificationRouter,Yn as SpendRunner,mt as SpendService,pr as SpendStore,Ou as URGENT_SPEND_EVENTS,Vl as USER_VISIBLE_ACTIONS,Ia as aggregateDeltas,zi as anomalyOptionsForSignal,$u as assertSpendAllows,dr as budgetWindow,Mu as compositeSpendTransport,Ba as createEnforcementHandlers,ql as detectAnomalies,$a as detectLatestAnomaly,Pa as evaluateBudget,ku as ewma,Bl as findMapping,Ul as findPriceEntry,X as formatCents,Qn as formatTimeToExhaustion,ji as governingLimitCents,ss as handleSpendRequest,Xn as hourBucket,Du as hourBucketsBetween,xa as isOperationAllowed,Bi as isValidTimeZone,Oa as lookbackHoursForSignal,Yo as median,zl as medianAbsoluteDeviation,Na as mergeDecisions,Pu as mergePriceBooks,Aa as meterTelemetry,rs as optionsForSignal,Qo as percentOfLimit,Da as planEnforcement,Nu as previousBudgetWindow,Ko as priceUsage,Iu as priceUsageLines,Ra as projectSpend,Hl as robustZScore,Ru as roundCents,Gl as routeMatches,ka as runEnforcement,ur as scopeKey,es as signalDefinition,Xl as spendNotificationText,as as spendOpenApiPaths,os as startSpendLoop,_u as streamFocusJsonl,_a as strongestActiveAction,Ta as tieredMicroCents,ns as toFocusJsonl,La as toFocusRecords,Fl as usageDeltaKey,Wr as utcInstantOfLocal,xu as zeroFill,wa as zoneOffsetMs,Jo as zonedParts};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hn}from"./chunk-s5br13d9.js";import"./chunk-g954ew3x.js";import"./chunk-gn745j0p.js";import"./chunk-evtcxme1.js";import"./chunk-jq36fh46.js";import"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";import"./chunk-98m9rbpk.js";export{Hn as resolveServerDashboardData};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f}from"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";export{f as S3Client};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Za,oe,ec,cd,Ku,ui,Ju,Xu,Os,Qu,Yu,Zu,ep,tp,rp,np,tc,rc,Ls,Ms,yo,Ye,A,Us,nc,V,wr,C,ld,pi,Bs,Fs,U,So,ip,op,sp,ap,l,s,cp,lp,E,js,Vs,zs,dp,up,Pe,Hs,bo,dd,pp,mp,Le,vt,qs,ic,oc,gp,ud,sc,Ws,vo,To,Me,Se,B,S,x,Ze,D,pd,Tt,pe,Ut,fp,md,be,Eo,Ue,Bt,mi,ve,wo,Ne,gd,gi,Te,Ee,ee,fi,G,Ft,Et,we,t,Co,hp,ac,Gs,yp,Sp,bp,vp,Ks,Tp,Ep,wp,Cp,Ap,Ip,Rp,Pp,Np,Dp,kp,_p,fd,hd,yd,Sd,bd,vd,Td,jt,cc,lc,Cr,hi,xp,dc,$p,Op,rn,Lp,Mp,Up,Bp,Fp,jp,Ed,wd,Cd,Ad,Id,Ao,Vp,Js,Rd,Pd,Nd,uc,Ce,zp,Dd,wt,Io,Ar,kd,pc,_d,xd,$d,mc,De,Hp,qp,Wp,Gp,Od,Kp,Ae,Jp,Xp,Qp,gc,fc,Yp,hc,yc,Zp,em,tm,rm,nm,Ld,Xs,im,om,sm,am,cm,Md,Ud,lm,dm,um,pm,mm,gm,fm,hm,ym,Sc,Qs,Sm,bm,vm,Tm,bc,vc,Tc,Em,Ec,wm,Cm,Am,Im,wc,Rm,Pm,Nm,Dm,km,_m,xm,$m,Bd,Fd,jd,Vd,Cc,Om,Lm,Mm,Um,Bm,Fm,jm,Vm,zm,zd,Hd,qd,Wd,Hm,qm,Ac,Wm,Ic,Rc,Pc,Nc,Gm,Km,Jm,Xm,et,yi,Qm,Ym,Zm,eg,tg,rg,ng,ig,Gd,og,sg,Dc,kc,ag,cg,Kd,lg,dg,ug,pg,mg,gg,fg,hg,yg,Sg,bg,vg,Tg,Eg,wg,Cg,Ag,Ig,Rg,Pg,Ng,_c,Dg,xc,kg,$c,_g,Oc,xg,Lc,$g,nn,Og,Mc,Lg,Ro,Mg,Uc,Ug,Bc,Bg,Fc,Fg,jc,jg,Vc,Vg,on,zg,zc,Hg,Hc,qg,qc,Wg,Wc,Gg,Gc,Kg,Kc,Jg,Jc,Xg,Xc,Qg,Qc,Yg,Yc,Zg,Zc,ef,el,tf,tl,rf,rl,nf,nl,of,il,sf,ol,af,sl,cf,al,lf,cl,df,ll,uf,dl,pf,ul,mf,pl,gf,ml,ff,Jd,Xd,Qd,Yd,gl,hf,fl,yf,hl,Sf,yl,bf,Si,Zd,eu,Po,Ys,sn,tu,No,Vt,Zs,ea,ru,nu,Sl,iu,ta,bl,vf,Tf,ra,na,ia,vl,Do,Tl,El,oa,wl,Cl,Al,ou,su,au,Ef,cu,lu,wf,du,Il,uu,pu,mu,Cf,gu,bi,sa,fu,Af,hu,ko,_o,aa,Rl,If,Pl,Rf,Nl,Pf,Dl,Nf,kl,Df}from"./chunk-98m9rbpk.js";export{Uc as ABTestManager,Ue as AI,_d as AWSAPIError,$c as AWSConfigManager,hp as AWS_PSEUDO_PARAMETERS,et as AWS_REGIONS,wo as ApiGateway,Co as Arn,ee as AssetHasher,Te as Auth,_c as BackupManager,hl as BatchProcessingManager,Mc as BlueGreenManager,dl as BounceComplaintHandler,Yc as BuildOptimizationManager,Me as CDN,na as CHAIN_HEADER,qs as CLOUDFRONT_FAILOVER_STATUS_CODES,dg as COMMON_CROSS_ACCOUNT_ROLES,mi as Cache,Ro as CanaryManager,Jc as CertificateManager,wt as CloudError,ac as CloudFormationBuilder,Nd as CloudFormationClient,Dd as CloudFrontClient,Oc as CloudTrailManager,Wd as CommandHistory,we as Communication,S as Compute,Io as ConfigurationError,Zc as ContainerRegistryManager,Ar as CredentialError,Ic as CrossRegionReferenceManager,hd as DASHBOARD_ENTRY,yd as DASHBOARD_PORT_BASE,Sd as DASHBOARD_PORT_SPAN,fd as DASHBOARD_STATE_DIR,ic as DEFAULT_FAILOVER_STATUS_CODES,Do as DEFAULT_RECURSION_LIMITS,Ae as DEFAULT_SERVICE_LIMITS,tc as DEFAULT_STATE_DIR,ra as DEPTH_HEADER,fl as DLQMonitoringManager,Se as DNS,cl as DNSSECManager,Bt as Database,Wc as DatabaseUserManager,De as DebugLogger,dd as DependencyGraph,Ee as Deployment,kd as DeploymentError,xc as DisasterRecoveryManager,D as Email,Jd as EmailAdvanced,ul as EmailAnalyticsManager,Xd as EmailHandlers,ml as EmailTemplateManager,xd as ErrorCodes,gl as FIFOQueueManager,gc as FileCache,Ze as FileSystem,t as Fn,Rc as GlobalResourceManager,Lc as GuardDutyManager,Ld as HashCache,Nl as HealthCheckManager,Qc as ImageScanningManager,Ut as JobLoader,fu as LARAVEL_SERVERLESS_BUILD_STEPS,nl as LambdaConcurrencyManager,sl as LambdaDLQManager,il as LambdaDestinationsManager,tl as LambdaLayersManager,ol as LambdaVPCManager,rl as LambdaVersionsManager,Vc as LogsManager,tu as MANAGED_NODE_VERSIONS,cc as MANAGEMENT_DASHBOARD_SITE_PREFIX,Ne as Messaging,jc as MetricsManager,zc as MigrationManager,bc as MockCloudFormation,Tc as MockDynamoDB,vc as MockS3,gi as Monitoring,Dc as MultiAccountManager,Ac as MultiRegionManager,Fd as MultiStepProgress,x as Network,Dl as NetworkSecurityManager,oc as ORIGIN_GROUP_ALLOWED_METHODS,gp as ORIGIN_GROUP_ID_SUFFIX,kc as OrganizationManager,hu as PHP_DEFAULT_EXCLUDES,ru as PHP_LAYER_EXTENSIONS,G as ParameterStore,qc as PerformanceManager,ve as Permissions,Tt as Phone,Qd as PhoneAdvanced,pd as PhoneHandlers,Ec as PreviewEnvironmentManager,wc as PreviewNotificationService,Bd as ProgressBar,Bc as ProgressiveDeploymentManager,ap as Pseudo,pe as Queue,yl as QueueManagementManager,rp as QueuePresets,Kd as RECOMMENDED_ACCOUNT_STRUCTURES,lg as RECOMMENDED_SCPS,zd as REPL,qd as REPLCommandBuilder,Hd as REPLContext,Md as RateLimiter,np as RealtimePresets,oa as RecursionGuard,Et as Redirects,Pc as RegionPairManager,vt as Registry,Hc as ReplicaManager,kl as ResourceManagementManager,ll as Route53ResolverManager,al as Route53RoutingManager,uc as S3Client,Ce as S3Error,be as SMS,rc as STATE_DIR_ENV_VAR,Ft as Search,fi as Secrets,Kc as SecretsManager,Gc as SecretsRotationManager,B as Security,nn as SecurityHubManager,Xc as SecurityScanningManager,pl as SenderReputationManager,el as ServiceMeshManager,Eo as Sftp,Yd as SmsAdvanced,md as SmsHandlers,jd as Spinner,Nc as StackDependencyManager,fp as StacksIntegration,Rl as StaticSiteManager,Le as Storage,Pl as StorageAdvancedManager,on as SyntheticsManager,ia as TRACE_HEADER,Vd as TaskList,So as TemplateBuilder,fc as TemplateCache,pc as ValidationError,gd as Workflow,Fc as XRayManager,Ug as abTestManager,pp as analyzeStackDiff,Ys as artifactKey,vo as assertOriginGroupMethods,Bm as autocomplete,_g as awsConfigManager,Dg as backupManager,im as batch,Sf as batchProcessingManager,Lg as blueGreenManager,pf as bounceComplaintHandler,Tf as buildBunRuntimeLayerZip,Gs as buildCloudFormationTemplate,Fs as buildMailEnv,vf as buildNodeRuntimeLayerZip,Zg as buildOptimizationManager,sc as buildOriginGroup,Ws as buildOriginGroups,Af as buildPhpRuntimeLayerZip,Mg as canaryManager,mm as categorizeChanges,Xg as certificateManager,Gp as checkIAMPermissions,cu as checkInvocation,Jp as checkServiceQuotas,Ud as chunk,Yu as clearSigningKeyCache,hm as cloudConfigSchema,xg as cloudTrailManager,_o as collectPhpAppEntries,$p as composePresets,ea as composeServerlessAppTemplate,ef as containerRegistryManager,Ep as createApiBackendPreset,mu as createCliHandler,Vp as createCredentialProvider,_p as createDashboardSite,Rp as createDataPipelinePreset,mc as createError,Ks as createExistingStaticFullStackPreset,Tp as createFullStackAppPreset,Cf as createHandlers,uu as createHttpHandler,Cp as createJamstackPreset,Dp as createLaravelPreset,Pp as createMLApiPreset,Ap as createMicroservicesPreset,Em as createMockAWS,Sp as createNodeJsServerPreset,bp as createNodeJsServerlessPreset,Op as createPreset,cd as createPresignedUrl,Ku as createPresignedUrlAsync,pu as createQueueHandler,Ip as createRealtimeAppPreset,zp as createS3Client,kp as createServerlessLaravelPreset,vp as createServerlessNodePreset,yp as createStaticSitePreset,Np as createTraditionalWebAppPreset,wp as createWordPressPreset,Si as createZip,Gm as crossRegionReferenceManager,Gg as databaseUserManager,Sc as defaultLocalConfig,wr as deploymentCoexistenceError,bd as deriveManagementDashboardPort,nc as detectDeploymentTargets,qp as detectMisconfigurations,Za as detectServiceRegion,dm as diffTemplates,yf as dlqMonitoringManager,df as dnssecManager,kg as drManager,mf as emailAnalyticsManager,ff as emailTemplateManager,du as eventToRequest,dc as extendPreset,hf as fifoQueueManager,nm as findChangedFiles,gg as formatAccountStructure,km as formatBytes,mp as formatDiff,_m as formatDuration,jm as formatFlagSuggestions,Hm as formatHistory,qm as formatHistoryStats,$m as formatKeyValue,xm as formatList,Dm as formatProgressBar,Gd as formatRegion,og as formatRegionList,Om as formatSuggestion,Pm as formatTable,Nm as formatTree,Cd as fromEC2Metadata,Ad as fromECSMetadata,Ed as fromEnvironment,wd as fromSharedCredentials,Id as fromWebIdentity,vl as functionFingerprint,ta as generateAppImageDockerfile,Pg as generateApprovalConfig,Zd as generateBootstrap,Am as generateCleanupWorkflow,Im as generateCostReportWorkflow,pg as generateCrossAccountRoleCF,Ag as generateDeploymentConfig,vg as generateDeploymentPipeline,fg as generateDeploymentWorkflow,s as generateLogicalId,Cg as generateManualPipeline,bg as generateMatrixWorkflow,Ig as generateMultiEnvConfig,Tg as generateMultiEnvPipeline,hg as generateMultiEnvWorkflow,yg as generatePRPreviewWorkflow,Ng as generateParallelConfig,gu as generatePhpFpmConfig,iu as generatePhpLayerDockerfile,Eg as generatePreviewPipeline,Cm as generatePreviewWorkflow,l as generateResourceName,Rg as generateScheduledConfig,wg as generateScheduledPipeline,Sg as generateScheduledWorkflow,Pd as getAccountId,Qm as getAllRegions,rg as getClosestRegion,Vm as getCommandUsage,Mm as getContextualHelp,Ao as getCredentials,gm as getDeploymentStrategy,fm as getDiffStats,um as getDiffSummary,$d as getErrorDetails,Qs as getLocalConfig,vm as getLocalCredentials,bm as getLocalEndpoint,Tm as getLocalEnvVars,Xp as getQuotaUsageSummary,ug as getRecommendedStructure,yi as getRegion,sg as getRegionStats,Zm as getRegionsByCompliance,Ym as getRegionsByLocation,eg as getRegionsByPricingTier,Od as getRequiredPermissions,Zu as getSigningKeyCacheSize,cp as getTimestamp,Km as globalResourceManager,$g as guardDutyManager,jt as hasManagementDashboardSite,Zp as hashBuffer,em as hashDirectory,hc as hashFile,tm as hashManifest,yc as hashString,Pf as healthCheckManager,Yg as imageScanningManager,El as inspectInvocation,su as installRecursionFetch,Al as invocationContext,Lm as isLikelyTypo,Sm as isLocalDevelopment,Cr as isManagementDashboardSiteName,ep as isNodeCryptoAvailable,To as isS3RestEndpoint,Ms as isStateDirConfigured,Us as isStatePath,tg as isValidRegion,tp as isWebCryptoAvailable,of as lambdaConcurrencyManager,cf as lambdaDLQManager,sf as lambdaDestinationsManager,rf as lambdaLayersManager,af as lambdaVPCManager,nf as lambdaVersionsManager,sa as laravelServerlessEnvDefaults,Vg as logsManager,ld as mailEnabled,Bs as mailFirewallPorts,ui as makeAWSRequest,Xu as makeAWSRequestAsync,Ju as makeAWSRequestOnce,lc as managementDashboardSiteName,rn as mergeInfrastructure,jg as metricsManager,Hg as migrationManager,ag as multiAccountManager,Wm as multiRegionManager,Nf as networkSecurityManager,cg as organizationManager,aa as packagePhpApp,sn as packageServerlessApp,Xs as parallel,om as parallelMap,sm as parallelWithRetry,Tl as parseChain,Qu as parseJSONResponse,Os as parseXMLResponse,Wg as performanceManager,Sl as phpLayerBuildStage,nu as phpLayerPackages,bi as phpRuntimeLayerAssets,wm as previewManager,Rm as previewNotifications,lm as processInChunks,Bg as progressiveDeploymentManager,wl as propagationHeaders,bf as queueManagementManager,rm as quickHash,Cl as recursionBlockedResponse,Jm as regionPairManager,qg as replicaManager,pm as requiresReplacement,Ef as resetRecursionRuntime,wf as resolveApp,C as resolveAppDatabase,U as resolveCloudProvider,Js as resolveCredentials,vd as resolveDashboardDomain,Td as resolveDashboardDomains,up as resolveDeployBucketName,V as resolveDeploymentMode,ud as resolveFailoverStatusCodes,pi as resolveMailService,xp as resolveManagementDashboardSite,hi as resolveManagementDashboardSites,E as resolveProjectStackName,Zs as resolveQueueNames,Vt as resolveQueues,ou as resolveRecursionConfig,Rd as resolveRegion,Pe as resolveServerlessAppStackName,Hs as resolveServerlessArtifactBucketName,bo as resolveServerlessAssetBucketName,No as resolveServerlessRuntime,zs as resolveSiteBucketName,Vs as resolveSiteResourceName,js as resolveSiteStackName,A as resolveStatePath,dp as resolveStorageBucketName,Df as resourceManagementManager,Il as responseToResult,uf as route53ResolverManager,lf as route53RoutingManager,eu as runBuildHooks,ko as runPhpBuildHooks,lp as sanitizeName,Um as searchCommands,Jg as secretsManager,Kg as secretsRotationManager,Og as securityHubManager,Qg as securityScanningManager,gf as senderReputationManager,am as sequence,tf as serviceMeshManager,Ls as setStateDir,Po as sha256,au as sharedRecursionGuard,bl as sharedRuntimeLoop,oe as signRequest,ec as signRequestAsync,Xm as stackDependencyManager,yo as stateDir,Ye as statePath,If as staticSiteManager,Rf as storageAdvancedManager,Cc as suggestCommand,Fm as suggestFlags,Kp as suggestIAMPolicy,Qp as suggestQuotaIncrease,ig as suggestRegionPairs,ng as suggestRegions,zg as syntheticsManager,Yp as templateCache,mg as validateAccountStructure,ym as validateAgainstSchema,zm as validateCommand,Hp as validateConfiguration,Wp as validateCredentials,sp as validateResourceLimits,ip as validateTemplate,op as validateTemplateSize,Fp as withCDN,Bp as withCache,Up as withDatabase,lu as withInvocation,Lp as withMonitoring,jp as withQueue,Mp as withSecurity,cm as withTimeout,Fg as xrayManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ci}from"./chunk-z4rx32w4.js";import"./chunk-frbwzrx4.js";import"./chunk-hn961k5f.js";import"./chunk-rt51mrj9.js";import"./chunk-xenj3py3.js";import"./chunk-jq36fh46.js";import"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";import"./chunk-98m9rbpk.js";export{ci as resolveDashboardData};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{di,u,N,xs}from"./chunk-afzrsjmc.js";export{u as AWSClient,N as buildQueryParams,xs as detectCredentialSource,di as resolveS3Endpoint};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qo}from"./chunk-850n63e0.js";export{qo as encodeDashboardPayload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P}from"./chunk-rt51mrj9.js";import"./chunk-afzrsjmc.js";export{P as LambdaClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yr,Qa,Ya,bt,Sr,br,vr,Tr,Zr}from"./chunk-94pvxv17.js";import"./chunk-8af2sky9.js";import"./chunk-98m9rbpk.js";export{Sr as AwsSecretsManagerConfigurationBackend,br as AwsSsmConfigurationBackend,Tr as ConfigurationService,yr as ConfigurationStore,vr as ExternalConfigurationBackend,bt as LocalEncryptedConfigurationBackend,Qa as parseDotenv,Ya as serializeDotenv,Zr as synchronizeConfiguredConfiguration};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H,eo}from"./chunk-30jk87p4.js";import"./chunk-dg918k6w.js";import"./chunk-afzrsjmc.js";export{H as ACMClient,eo as ACMDnsValidator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nd,ja,id,to,ro,no,ps}from"./chunk-gn745j0p.js";import"./chunk-98m9rbpk.js";export{nd as MANAGEMENT_DASHBOARD_SITE,ps as buildManagementDashboardArtifact,ja as dashboardCredentialsFile,ro as ensureManagementDashboard,no as managementDashboardSiteNames,id as resolveDashboardAuth,to as resolveUiSource};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Pe,Hs,bo,Ys,sn,No,Zs,ea,sa,aa}from"./chunk-98m9rbpk.js";import{n,r,a,e,m,i,he}from"./chunk-xenj3py3.js";import{u}from"./chunk-afzrsjmc.js";import{v}from"./chunk-jq36fh46.js";import{P}from"./chunk-rt51mrj9.js";import{f}from"./chunk-1k1dyh5k.js";import{existsSync as de,readdirSync as me,readFileSync as pe,statSync as fe}from"node:fs";import{join as ne,relative as Se}from"node:path";class W{client;region;constructor(t="us-east-1",s){this.region=t,this.client=new u}async createSecret(t){let s={Name:t.Name};if(t.Description)s.Description=t.Description;if(t.KmsKeyId)s.KmsKeyId=t.KmsKeyId;if(t.SecretBinary)s.SecretBinary=t.SecretBinary;if(t.SecretString)s.SecretString=t.SecretString;if(t.Tags&&t.Tags.length>0)s.Tags=t.Tags;if(t.AddReplicaRegions&&t.AddReplicaRegions.length>0)s.AddReplicaRegions=t.AddReplicaRegions;if(t.ForceOverwriteReplicaSecret!==void 0)s.ForceOverwriteReplicaSecret=t.ForceOverwriteReplicaSecret;s.ClientRequestToken=t.ClientRequestToken||crypto.randomUUID();let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.CreateSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,VersionId:o.VersionId,ReplicationStatus:o.ReplicationStatus}}async updateSecret(t){let s={SecretId:t.SecretId};if(t.Description)s.Description=t.Description;if(t.KmsKeyId)s.KmsKeyId=t.KmsKeyId;if(t.SecretBinary)s.SecretBinary=t.SecretBinary;if(t.SecretString)s.SecretString=t.SecretString;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.UpdateSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,VersionId:o.VersionId}}async putSecretValue(t){let s={SecretId:t.SecretId};if(t.SecretBinary)s.SecretBinary=t.SecretBinary;if(t.SecretString)s.SecretString=t.SecretString;if(t.VersionStages&&t.VersionStages.length>0)s.VersionStages=t.VersionStages;if(t.ClientRequestToken)s.ClientRequestToken=t.ClientRequestToken;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.PutSecretValue","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,VersionId:o.VersionId,VersionStages:o.VersionStages}}async getSecretValue(t){let s={SecretId:t.SecretId};if(t.VersionId)s.VersionId=t.VersionId;if(t.VersionStage)s.VersionStage=t.VersionStage;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.GetSecretValue","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,VersionId:o.VersionId,SecretBinary:o.SecretBinary,SecretString:o.SecretString,VersionStages:o.VersionStages,CreatedDate:o.CreatedDate}}async describeSecret(t){let s={SecretId:t},o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.DescribeSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return this.parseSecret(o)}async listSecrets(t){let s={};if(t?.MaxResults)s.MaxResults=t.MaxResults;if(t?.NextToken)s.NextToken=t.NextToken;if(t?.Filters&&t.Filters.length>0)s.Filters=t.Filters;if(t?.SortOrder)s.SortOrder=t.SortOrder;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.ListSecrets","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{SecretList:o.SecretList?.map((c)=>this.parseSecret(c)),NextToken:o.NextToken}}async deleteSecret(t){let s={SecretId:t.SecretId};if(t.RecoveryWindowInDays!==void 0)s.RecoveryWindowInDays=t.RecoveryWindowInDays;if(t.ForceDeleteWithoutRecovery!==void 0)s.ForceDeleteWithoutRecovery=t.ForceDeleteWithoutRecovery;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.DeleteSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,DeletionDate:o.DeletionDate}}async restoreSecret(t){let s={SecretId:t},o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.RestoreSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name}}async rotateSecret(t){let s={SecretId:t.SecretId};if(t.ClientRequestToken)s.ClientRequestToken=t.ClientRequestToken;if(t.RotationLambdaARN)s.RotationLambdaARN=t.RotationLambdaARN;if(t.RotationRules)s.RotationRules=t.RotationRules;if(t.RotateImmediately!==void 0)s.RotateImmediately=t.RotateImmediately;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.RotateSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,VersionId:o.VersionId}}async cancelRotateSecret(t){let s={SecretId:t},o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.CancelRotateSecret","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name}}async getResourcePolicy(t){let s={SecretId:t},o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.GetResourcePolicy","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name,ResourcePolicy:o.ResourcePolicy}}async putResourcePolicy(t){let s={SecretId:t.SecretId,ResourcePolicy:t.ResourcePolicy};if(t.BlockPublicPolicy!==void 0)s.BlockPublicPolicy=t.BlockPublicPolicy;let o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.PutResourcePolicy","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name}}async deleteResourcePolicy(t){let s={SecretId:t},o=await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.DeleteResourcePolicy","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)});return{ARN:o.ARN,Name:o.Name}}async tagResource(t){let s={SecretId:t.SecretId,Tags:t.Tags};await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.TagResource","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)})}async untagResource(t){let s={SecretId:t.SecretId,TagKeys:t.TagKeys};await this.client.request({service:"secretsmanager",region:this.region,method:"POST",path:"/",headers:{"X-Amz-Target":"secretsmanager.UntagResource","Content-Type":"application/x-amz-json-1.1"},body:JSON.stringify(s)})}async setString(t,s,o){try{let c=await this.putSecretValue({SecretId:t,SecretString:s});return{ARN:c.ARN,VersionId:c.VersionId}}catch(c){if(c.code==="ResourceNotFoundException"){let l=await this.createSecret({Name:t,SecretString:s,Description:o?.description,KmsKeyId:o?.kmsKeyId,Tags:o?.tags});return{ARN:l.ARN,VersionId:l.VersionId}}throw c}}async setJson(t,s,o){return this.setString(t,JSON.stringify(s),o)}async getString(t){return(await this.getSecretValue({SecretId:t})).SecretString}async getJson(t){let s=await this.getString(t);if(s)return JSON.parse(s);return}async listAll(){let t=[],s;do{let o=await this.listSecrets({NextToken:s});if(o.SecretList)t.push(...o.SecretList);s=o.NextToken}while(s);return t}parseSecret(t){return{ARN:t.ARN,Name:t.Name,Description:t.Description,KmsKeyId:t.KmsKeyId,RotationEnabled:t.RotationEnabled,RotationLambdaARN:t.RotationLambdaARN,RotationRules:t.RotationRules,LastRotatedDate:t.LastRotatedDate,LastChangedDate:t.LastChangedDate,LastAccessedDate:t.LastAccessedDate,DeletedDate:t.DeletedDate,NextRotationDate:t.NextRotationDate,Tags:t.Tags,SecretVersionsToStages:t.SecretVersionsToStages,CreatedDate:t.CreatedDate,PrimaryRegion:t.PrimaryRegion}}}function k(t,s){let o=t.environments?.[s]?.app;if(!o)throw Error(`No serverless app configured for environment '${s}'. Add environments.${s}.app to your config.`);let c=t.project.slug,l=t.environments?.[s]?.region||t.project.region||"us-east-1";return{app:o,slug:c,region:l,stackName:Pe(t,s),artifactBucket:Hs(c,s),assetsBucket:bo(c,s)}}function yt(t,s){let o=k(t,s),c=`${o.slug}-${s}`;return{region:o.region,slug:o.slug,stackName:o.stackName,functions:{http:`${c}-http`,queue:`${c}-queue`,cli:`${c}-cli`}}}async function L(t,s=8){let o;for(let c=0;c<s;c++)try{return await t()}catch(l){let g=l?.code||l?.name||"",d=String(l?.message||"");if(g==="ResourceConflictException"||/update is in progress|currently in the following state/i.test(d)){o=l,await new Promise((p)=>setTimeout(p,3000));continue}throw l}throw o}var ie=(t,s)=>`releases/${t}/${s}/current.json`;async function G(t,s,o,c){try{return await t.getObjectJson(s,ie(o,c))}catch{return null}}async function ae(t,s,o,c,l){await t.putObjectJson(s,ie(o,c),l)}async function ye(t,s){if(!t.secrets)return{};let o=new W(s),c={},l=Array.isArray(t.secrets)?t.secrets.map((g)=>({envName:g.split("/").pop().toUpperCase().replace(/[^A-Z0-9_]/g,"_"),secretId:g})):Object.entries(t.secrets).map(([g,d])=>({envName:g,secretId:d}));if(Array.isArray(t.secrets)){let g=new Map;for(let{envName:p,secretId:S}of l)g.set(p,[...g.get(p)??[],S]);let d=[...g.entries()].filter(([,p])=>p.length>1);if(d.length){let p=d.map(([S,R])=>`${S} ← ${R.join(", ")}`).join("; ");throw Error(`serverless secrets: multiple secrets map to the same env var (${p}). Use the map form { ENV_NAME: 'secret/id' } to disambiguate.`)}}for(let{envName:g,secretId:d}of l){let S=(await o.getSecretValue({SecretId:d})).SecretString??"";try{let R=JSON.parse(S);if(R&&typeof R==="object"&&!Array.isArray(R)){for(let[w,N]of Object.entries(R))c[w]=String(N);continue}}catch{}c[g]=S}return c}function od(t,s){let o={},c=s.DbProxyEndpoint||s.DbEndpoint;if(c)o.DB_CONNECTION="mysql",o.DB_HOST=c,o.DB_PORT="3306",o.DB_DATABASE=o.DB_DATABASE||"app";if(s.CacheEndpoint){if(o.REDIS_HOST=s.CacheEndpoint,o.REDIS_PORT="6379",t.cache?.driver==="elasticache")o.CACHE_STORE="redis",o.CACHE_DRIVER="redis",o.SESSION_DRIVER="redis"}return o}function As(t,s,o,c,l,g,d,p={}){let S=t.kind==="php"?sa({cacheDriver:t.cache?.driver==="elasticache"?"redis":"dynamodb"}):{};return{TSCLOUD_LAMBDA_MODE:c,TSCLOUD_ENV:o,MAINTENANCE_MODE:"0",...t.octane?{TSCLOUD_OCTANE:"1"}:{},...t.serveAssets?{TSCLOUD_SERVE_ASSETS:"1"}:{},...t.redirectRobotsTxt===!1?{TSCLOUD_REDIRECT_ROBOTS_TXT:"0"}:{},...S,...p,...s.app.cache?.driver!=="elasticache"?{TSCLOUD_CACHE_TABLE:`${s.slug}-${o}-cache`}:{},...d?{TSCLOUD_QUEUE:d,SQS_QUEUE:d}:{},...g?{ASSET_URL:g}:{},...t.env??{},...l}}function Re(t){let s=t.slice(t.lastIndexOf(".")).toLowerCase();return{".html":"text/html",".css":"text/css",".js":"text/javascript",".mjs":"text/javascript",".json":"application/json",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".txt":"text/plain",".map":"application/json"}[s]??"application/octet-stream"}function*oe(t){for(let s of me(t)){let o=ne(t,s);if(fe(o).isDirectory())yield*oe(o);else yield o}}async function ve(t,s,o,c,l=!1){let g=0;for(let d of oe(o)){let p=Se(o,d).replace(/\\/g,"/");if(!l&&p.split("/").some((S)=>S.startsWith(".")))continue;await t.putObject({bucket:s,key:`${c}/${p}`,body:pe(d),contentType:Re(d),cacheControl:"public, max-age=31536000, immutable"}),g++}return g}function go(t,s){let o=Object.entries(s).reduce((c,[l,g])=>c+Buffer.byteLength(`${l}=${g}`,"utf8"),0);if(o>4096){let c=Object.entries(s).map(([l,g])=>[l,Buffer.byteLength(`${l}=${g}`,"utf8")]).sort((l,g)=>g[1]-l[1]).slice(0,5).map(([l,g])=>`${l} (${g}B)`).join(", ");throw Error(`${t}: environment variables total ${o}B, over AWS's 4096B limit (${o-4096}B too large). Largest: ${c}. Move large/secret values out of env — store them in Secrets Manager and fetch at cold start.`)}}async function U(t,s,o,c){go(s,o),await L(()=>t.updateFunctionConfiguration({FunctionName:s,Environment:{Variables:o}})),await t.waitForFunctionActive(s,120);let l=c.kind==="image"?{FunctionName:s,ImageUri:c.imageUri}:{FunctionName:s,S3Bucket:c.bucket,S3Key:c.key};await L(()=>t.updateFunctionCode(l)),await t.waitForFunctionActive(s,120)}async function X(t,s){let c=(await L(()=>t.publishVersion({FunctionName:s}))).Version;if(!c)throw Error(`publishVersion returned no version for ${s}`);return await L(()=>t.updateAlias({FunctionName:s,Name:"live",FunctionVersion:c})),c}async function Vu(t,s,o={}){let c=k(t,s),{app:l,slug:g,region:d,stackName:p,artifactBucket:S}=c,R=o.projectRoot??process.cwd();i(`Deploying serverless app: ${g} (${s})`),e(`Stack: ${p}`),e(`Region: ${d}`);let w=new f(d),N=new v(d),T=new P(d),D=l.kind==="php",O=l.packaging==="image",h=No(l),V,E,b,Y,z=[];if(O&&h.usesLayer&&h.layerKind!=="php")throw Error(`packaging: 'image' currently supports PHP and managed Node runtimes. ${h.kind}${h.kind==="node"?` ${h.version}`:""} uses a custom runtime — `+"use the default zip packaging (the runtime layer is built + attached automatically).");if(O){m("Building + pushing container image");let{buildAndPushServerlessImage:y}=await import("./chunk-yw65b70x.js"),C=await y({app:l,projectRoot:R,region:d,repository:`${g}-${s}`,skipBuild:o.skipBuild,onStep:(I)=>e(` ${I}`)});V=C.handlers,E={kind:"image",imageUri:C.imageUri},b=C.tag,z.push({ParameterKey:"ImageUri",ParameterValue:C.imageUri})}else{m("Packaging application");let y=D?aa({projectRoot:R,app:l,skipBuild:o.skipBuild,onStep:(x)=>e(` ${x}`)}):await sn({projectRoot:R,app:l,skipBuild:o.skipBuild,onStep:(x)=>e(` ${x}`)}),C=Ys(g,s,y.sha256);if(e(`Artifact: ${y.sha256.slice(0,12)} (${(y.zip.length/1024).toFixed(0)} KB)`),V=y.handlers,b=y.sha256,h.usesLayer){let x=h.layerEnvVar?process.env[h.layerEnvVar]:void 0;if(Y=l.layers??(x?[x]:void 0),!Y?.length){let ge=h.layerKind==="php"?"serverless:build-php-layer":h.layerKind==="bun"?"serverless:build-bun-layer":"serverless:build-node-layer";throw Error(`${h.kind} apps on provided.al2023 need a runtime layer. Set environments.<env>.app.layers or the ${h.layerEnvVar} env var (build one with \`cloud ${ge}\`)${h.kind==="node"?", or use a managed Node version (18/20/22)":""}.`)}}if(!await w.bucketExists(S))m(`Creating artifact bucket ${S}`),await w.createBucket(S);if(await w.headObject(S,C).then((x)=>x!==null).catch(()=>!1))e("Artifact already uploaded — reusing");else m("Uploading artifact"),await w.putObject({bucket:S,key:C,body:y.zip,contentType:"application/zip"});E={kind:"zip",bucket:S,key:C},z.push({ParameterKey:"ArtifactBucket",ParameterValue:S},{ParameterKey:"ArtifactKey",ParameterValue:C})}let A=ea({config:t,environment:s,app:l,handlers:V,runtimeLayers:Y}),te=JSON.stringify(A.template),re=["CAPABILITY_NAMED_IAM"],q=await N.describeStacks({stackName:p}).then((y)=>y.Stacks[0]?.StackStatus).catch(()=>{return}),M=q!==void 0;if(q&&/DELETE_IN_PROGRESS/.test(q))m("Waiting for an in-progress stack delete to finish"),await N.waitForStack(p,"stack-delete-complete").catch(()=>{}),M=!1;else if(q&&/(?:ROLLBACK_COMPLETE|REVIEW_IN_PROGRESS|CREATE_FAILED)/.test(q))m(`Deleting unusable stack (status ${q}) before recreate`),await N.deleteStack(p),await N.waitForStack(p,"stack-delete-complete").catch(()=>{}),M=!1;m(M?"Updating infrastructure stack":"Creating infrastructure stack");try{if(M)await N.updateStack({stackName:p,templateBody:te,parameters:z,capabilities:re}),await N.waitForStack(p,"stack-update-complete");else await N.createStack({stackName:p,templateBody:te,parameters:z,capabilities:re,onFailure:"DELETE"}),await N.waitForStack(p,"stack-create-complete")}catch(y){if(/No updates are to be performed/i.test(String(y?.message)))e("No infrastructure changes");else throw y}let Q=await N.getStackOutputs(p).catch(()=>({})),B;if(l.assets){let y=ne(R,l.assets);if(de(y)){let C=l.assetDomain||Q.AssetsCdnDomain;B=C?`https://${C}/${b}`:void 0,m(`Syncing assets from ${l.assets}`);let I=await ve(w,c.assetsBucket,y,b,l.dotFilesAsAssets);e(`Uploaded ${I} asset(s)${B?` → ${B}`:""}`)}else a(`Assets directory not found: ${y}`)}m("Resolving secrets");let _=await ye(l,d);if(l.database?.connection==="aurora-serverless")try{let C=await new W(d).getSecretValue({SecretId:`${g}/${s}/db`}),I=JSON.parse(C.SecretString??"{}");if(I.username)_.DB_USERNAME=I.username;if(I.password)_.DB_PASSWORD=I.password}catch(y){a(`Could not resolve Aurora DB credentials: ${y.message}`)}if(!await w.bucketExists(S))await w.createBucket(S);let J=await G(w,S,g,s),F={},Z=A.queueNames[0],ee=od(l,Q);if(m("Activating functions"),F.http=As(l,c,s,"http",_,B,Z,ee),await U(T,A.functionNames.http,F.http,E),F.cli=As(l,c,s,"cli",_,B,Z,ee),await U(T,A.functionNames.cli,F.cli,E),A.queueNames.length)F.queue=As(l,c,s,"queue",_,B,Z,ee),await U(T,A.functionNames.queue,F.queue,E);let se=(l.provisionedConcurrency??0)>0,H={};if(se){if(m("Publishing versions + flipping live alias"),H.http=await X(T,A.functionNames.http),H.cli=await X(T,A.functionNames.cli),A.queueNames.length)H.queue=await X(T,A.functionNames.queue)}if(await ae(w,S,g,s,{sha:b,code:E,previousSha:J?.sha,previousCode:J?.code,previousFunctionEnv:J?.functionEnv,...se?{functionVersions:H,previousFunctionVersions:J?.functionVersions}:{},functionEnv:F,functionNames:{http:A.functionNames.http,cli:A.functionNames.cli,...A.queueNames.length?{queue:A.functionNames.queue}:{}},assetUrl:B,timestamp:new Date().toISOString()}),!o.skipDeployHooks&&l.deploy?.length){m("Running deploy hooks");for(let y of l.deploy){e(` deploy: ${y}`);let C=await T.invoke({FunctionName:A.functionNames.cli,InvocationType:"RequestResponse",Payload:{command:y},LogType:"Tail"});if(C.FunctionError)throw r("Deploy hook failed — the new build is ALREADY LIVE."),e(` Roll back with: cloud serverless:rollback --env ${s}`),Error(`Deploy hook failed (${y}): ${C.Payload}`)}}let K=Q.HttpApiEndpoint;if(!o.skipHealthCheck&&K){m("Health check");try{let y=await fetch(K,{method:"GET"});e(`GET ${K} → ${y.status}`)}catch(y){a(`Health check could not reach ${K}: ${y.message}`)}}he(["Serverless deploy complete","",K?`URL: ${K}`:"",`Stack: ${p}`,`Build: ${b.slice(0,12)}`].filter(Boolean).join(`
|
|
2
|
-
`),"green")}async function Is(t,s){let o=k(t,s),c=new f(o.region),l=new P(o.region),g=await G(c,o.artifactBucket,o.slug,s);if(!g)throw Error("No previous release to redeploy. Run a full deploy first.");i(`Redeploying ${o.slug} (${s}) — build ${g.sha.slice(0,12)}`);for(let[d,p]of Object.entries(g.functionNames)){if(!p)continue;m(`Re-activating ${d} (${p})`),await U(l,p,g.functionEnv[d]??{},g.code);let S=g.functionVersions?.[d];if(S)await L(()=>l.updateAlias({FunctionName:p,Name:"live",FunctionVersion:S}))}n("Redeploy complete")}async function Rs(t,s){let o=k(t,s),c=new f(o.region),l=new P(o.region),g=await G(c,o.artifactBucket,o.slug,s);if(!g?.previousCode)throw Error("No previous release to roll back to.");i(`Rolling back ${o.slug} (${s}) → ${g.previousSha?.slice(0,12)}`);for(let[d,p]of Object.entries(g.functionNames)){if(!p)continue;m(`Restoring ${d} (${p})`);let S=g.previousFunctionEnv?.[d]??g.functionEnv[d]??{};await U(l,p,S,g.previousCode);let R=g.previousFunctionVersions?.[d];if(R)await L(()=>l.updateAlias({FunctionName:p,Name:"live",FunctionVersion:R}))}await ae(c,o.artifactBucket,o.slug,s,{...g,sha:g.previousSha??g.sha,code:g.previousCode,functionEnv:g.previousFunctionEnv??g.functionEnv,functionVersions:g.previousFunctionVersions??g.functionVersions,previousSha:void 0,previousCode:void 0,previousFunctionEnv:void 0,previousFunctionVersions:void 0,timestamp:new Date().toISOString()}),n("Rollback complete")}async function fo(t,s,o,c){let l=k(t,s),g=new P(l.region),d=`${l.slug}-${s}-http`,S={...(await g.getFunction(d)).Configuration?.Environment?.Variables??{}};if(S.MAINTENANCE_MODE=o?"1":"0",o&&c)S.MAINTENANCE_BYPASS_SECRET=c;if(!o)delete S.MAINTENANCE_BYPASS_SECRET;if(await L(()=>g.updateFunctionConfiguration({FunctionName:d,Environment:{Variables:S}})),(l.app.provisionedConcurrency??0)>0)await g.waitForFunctionActive(d,120),await X(g,d);n(o?"Application is now in maintenance mode (503)":"Application is live")}async function Lt(t,s,o){let c=k(t,s),l=new P(c.region),g=`${c.slug}-${s}-cli`,d=await l.invoke({FunctionName:g,InvocationType:"RequestResponse",Payload:{command:o},LogType:"Tail"});if(d.FunctionError)throw Error(`Command failed: ${d.Payload}`);return d.Payload??""}var ce=(t,s)=>`commands/${t}/${s}/history.json`,Ne=50;async function le(t,s,o,c){try{return(await t.getObjectJson(s,ce(o,c)))?.records??[]}catch{return[]}}async function zu(t,s,o){let c=k(t,s),l=new P(c.region),g=`${c.slug}-${s}-cli`,d=await l.invoke({FunctionName:g,InvocationType:"RequestResponse",Payload:{command:o},LogType:"Tail"}),p=d.Payload??"",S=d.FunctionError?"error":"ok",R=-1;try{let w=new f(c.region);if(await w.bucketExists(c.artifactBucket)){let N=await le(w,c.artifactBucket,c.slug,s);R=N.reduce((T,D)=>Math.max(T,D.id),0)+1,N.push({id:R,command:o,timestamp:new Date().toISOString(),status:S,output:p.slice(0,4000)}),await w.putObjectJson(c.artifactBucket,ce(c.slug,s),{records:N.slice(-Ne)})}}catch{}if(d.FunctionError)throw Error(`Command failed${R>0?` (#${R})`:""}: ${p}`);return{id:R,status:S,output:p}}async function sd(t,s){let o=k(t,s),c=new f(o.region);return le(c,o.artifactBucket,o.slug,s)}async function Hu(t,s,o){let c=await sd(t,s);if(!c.length)return;return o==null?c[c.length-1]:c.find((l)=>l.id===o)}async function qu(t,s,o){let c=Buffer.from(o,"utf-8").toString("base64");return Lt(t,s,`tscloud:db-query --sql-base64=${c}`)}async function j(t,s){let o=k(t,s),c=new v(o.region),l=new P(o.region),g=new f(o.region),d="not deployed",p={};try{let{Stacks:O}=await c.describeStacks({stackName:o.stackName});d=O?.[0]?.StackStatus??d;for(let h of O?.[0]?.Outputs??[])if(h.OutputKey)p[h.OutputKey]=h.OutputValue??""}catch{}let S=Zs(o.app,o.slug,s),R=o.app.provisionedConcurrency??0,w=["http","cli",...S.length?["queue"]:[]],N=`${o.slug}-${s}`,T=[];for(let O of w){let h=`${N}-${O}`,V={mode:O,name:h,version:"$LATEST"};if(R>0){let E=await l.getAlias(h,"live").catch(()=>null);if(E?.FunctionVersion){V.version=E.FunctionVersion;let b=await l.getProvisionedConcurrencyConfig(h,"live").catch(()=>null);if(b)V.provisioned={status:b.Status??"-",allocated:b.AllocatedProvisionedConcurrentExecutions??0,requested:b.RequestedProvisionedConcurrentExecutions??0}}}T.push(V)}let D=await G(g,o.artifactBucket,o.slug,s).catch(()=>null);return{slug:o.slug,environment:s,region:o.region,stackStatus:d,endpoint:p.HttpApiEndpoint,assetUrl:D?.assetUrl,scheduler:o.app.scheduler??"on",queues:S,provisionedConcurrency:R,functions:T,lastRelease:D?{sha:D.sha,timestamp:D.timestamp}:void 0}}function ue(t,s){return`${t}-${s}-db`}async function Ps(t,s,o,c){let l=k(t,s);if(l.app.database?.connection!=="aurora-serverless")throw Error("No Aurora Serverless v2 database is configured for this environment.");let{RDSClient:g}=await import("./chunk-va8pr0ch.js"),d=new g(l.region),p=ue(l.slug,s);m(`Scaling ${p} → ${o}–${c} ACUs`),await d.modifyDBCluster({DBClusterIdentifier:p,ServerlessV2ScalingConfiguration:{MinCapacity:o,MaxCapacity:c},ApplyImmediately:!0}),n(`Scaling applied to ${p} (takes effect shortly).`)}async function Wu(t,s,o){let c=k(t,s);if(c.app.database?.connection!=="aurora-serverless")throw Error("No Aurora Serverless v2 database is configured for this environment.");if(!o.toTime&&!o.latest)throw Error("Specify a restore point: --to <ISO timestamp> or --latest.");let{RDSClient:l}=await import("./chunk-va8pr0ch.js"),g=new l(c.region),d=ue(c.slug,s),p=o.latest?"latest":o.toTime.toISOString().replace(/[^0-9]/g,"").slice(0,14),S=o.target??`${d}-restore-${p}`;m(`Restoring ${d} → new cluster ${S} (${o.latest?"latest restorable time":o.toTime.toISOString()})`),await g.restoreDBClusterToPointInTime({DBClusterIdentifier:S,SourceDBClusterIdentifier:d,RestoreToTime:o.toTime,UseLatestRestorableTime:o.latest}),m("Waiting for the restored cluster to be ready");for(let R=0;R<120;R++){let{DBClusters:w}=await g.describeDBClusters({DBClusterIdentifier:S}),N=w?.[0]?.Status;if(N&&N!=="creating")break;await new Promise((T)=>setTimeout(T,15000))}return m("Adding a writer instance"),await g.createDBInstance({DBInstanceIdentifier:`${S}-1`,DBClusterIdentifier:S,Engine:"aurora-mysql",DBInstanceClass:"db.serverless"}),n(`Restore complete → cluster ${S} with writer ${S}-1. Point an env's database at it once available.`),S}
|
|
3
|
-
export{W,yt,od,As,go,Vu,Is,Rs,fo,Lt,zu,sd,Hu,qu,j,Ps,Wu};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt,od,As,go,Vu,Is,Rs,fo,Lt,zu,sd,Hu,qu,j,Ps,Wu}from"./chunk-hn961k5f.js";import"./chunk-rt51mrj9.js";import"./chunk-xenj3py3.js";import"./chunk-jq36fh46.js";import"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";import"./chunk-98m9rbpk.js";export{go as assertEnvWithinLimit,As as buildFunctionEnv,Vu as deployServerlessApp,Hu as getCommandRecord,od as infraEnvFromOutputs,sd as listCommandHistory,Is as redeployServerlessApp,yt as resolveServerlessFunctions,Wu as restoreServerlessDatabase,Rs as rollbackServerlessApp,zu as runAndRecordCommand,qu as runDbQuery,Lt as runRemoteCommand,Ps as scaleServerlessDatabase,j as serverlessInfo,fo as setMaintenance};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{st}from"./chunk-fren71ry.js";import"./chunk-afzrsjmc.js";export{st as STSClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F}from"./chunk-frbwzrx4.js";import"./chunk-afzrsjmc.js";export{F as SQSClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w}from"./chunk-etvcw9we.js";import"./chunk-afzrsjmc.js";export{w as CloudFrontClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ue}from"./chunk-va9y882b.js";import"./chunk-afzrsjmc.js";export{ue as RDSClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K}from"./chunk-g954ew3x.js";import"./chunk-afzrsjmc.js";export{K as EC2Client};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$l,Ol,Ll,Ml,Eu,wu}from"./chunk-r2vrq2gr.js";import"./chunk-30jk87p4.js";import"./chunk-etvcw9we.js";import"./chunk-jq36fh46.js";import"./chunk-dg918k6w.js";import"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";export{Eu as deleteStaticSite,Ol as deployStaticSite,wu as deployStaticSiteFull,$l as generateStaticSiteTemplate,Ml as invalidateCache,Ll as uploadStaticFiles};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Xa,Gu}from"./chunk-g8yaztb1.js";import"./chunk-dg918k6w.js";import"./chunk-1k1dyh5k.js";import"./chunk-afzrsjmc.js";export{Xa as EmailClient,Gu as email};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Tu}from"./chunk-kymrvq47.js";import"./chunk-e7kqxsqh.js";import"./chunk-xenj3py3.js";import"./chunk-afzrsjmc.js";import"./chunk-98m9rbpk.js";export{Tu as buildAndPushServerlessImage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ms,Fu,ju,gs}from"./chunk-6wc8a9cs.js";import"./chunk-evtcxme1.js";import"./chunk-98m9rbpk.js";export{Fu as getComputeDeployHistory,gs as restoreDatabaseBackup,ms as rollbackComputeSite,ju as runComputeRecipe};
|
package/dist/chunk-3jrvr0pv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j}from"./chunk-3rh4m6ag.js";import"./chunk-590gwv9d.js";export{j as RDSClient};
|
package/dist/chunk-ajwt2hzh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Xi,Yi,Zi,es,Na,ka}from"./chunk-m1x32x81.js";import"./chunk-nz3ygqjb.js";import"./chunk-z13hksc9.js";import"./chunk-2vr8rqg8.js";import"./chunk-f3hhmec2.js";import"./chunk-fw9hk0xt.js";import"./chunk-590gwv9d.js";export{Na as deleteStaticSite,Yi as deployStaticSite,ka as deployStaticSiteFull,Xi as generateStaticSiteTemplate,es as invalidateCache,Zi as uploadStaticFiles};
|