@elumixor/devkit 0.12.13 → 0.12.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cloud/aws.ts +24 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elumixor/devkit",
3
- "version": "0.12.13",
3
+ "version": "0.12.14",
4
4
  "description": "Dev orchestrator for bun monorepos — free ports, run apps side-by-side, open the browser when ready",
5
5
  "author": "elumixor",
6
6
  "license": "ISC",
package/src/cloud/aws.ts CHANGED
@@ -25,19 +25,30 @@ function lazy<T>(make: () => T) {
25
25
  return () => (instance ??= make());
26
26
  }
27
27
 
28
- export const lambda = lazy(() => new LambdaClient({ region: REGION }));
29
- export const s3 = lazy(() => new S3Client({ region: REGION }));
30
- export const ssm = lazy(() => new SSMClient({ region: REGION }));
31
- export const iam = lazy(() => new IAMClient({ region: REGION }));
32
- export const logs = lazy(() => new CloudWatchLogsClient({ region: REGION }));
33
- export const cloudwatch = lazy(() => new CloudWatchClient({ region: REGION }));
34
- export const scheduler = lazy(() => new SchedulerClient({ region: REGION }));
35
- export const sts = lazy(() => new STSClient({ region: REGION }));
36
- export const cloudfront = lazy(() => new CloudFrontClient({ region: GLOBAL_REGION }));
37
- export const kvs = lazy(() => new CloudFrontKeyValueStoreClient({ region: GLOBAL_REGION }));
38
- export const acm = lazy(() => new ACMClient({ region: GLOBAL_REGION }));
39
- export const budgets = lazy(() => new BudgetsClient({ region: GLOBAL_REGION }));
40
- export const costExplorer = lazy(() => new CostExplorerClient({ region: GLOBAL_REGION }));
28
+ /**
29
+ * A socket that goes quiet for this long is dropped and the call retried: without it a stalled S3
30
+ * request hangs a deploy forever.
31
+ */
32
+ const home = {
33
+ region: REGION,
34
+ maxAttempts: 5,
35
+ requestHandler: { connectionTimeout: 10_000, requestTimeout: 120_000 },
36
+ };
37
+ const edge = { ...home, region: GLOBAL_REGION };
38
+
39
+ export const lambda = lazy(() => new LambdaClient(home));
40
+ export const s3 = lazy(() => new S3Client(home));
41
+ export const ssm = lazy(() => new SSMClient(home));
42
+ export const iam = lazy(() => new IAMClient(home));
43
+ export const logs = lazy(() => new CloudWatchLogsClient(home));
44
+ export const cloudwatch = lazy(() => new CloudWatchClient(home));
45
+ export const scheduler = lazy(() => new SchedulerClient(home));
46
+ export const sts = lazy(() => new STSClient(home));
47
+ export const cloudfront = lazy(() => new CloudFrontClient(edge));
48
+ export const kvs = lazy(() => new CloudFrontKeyValueStoreClient(edge));
49
+ export const acm = lazy(() => new ACMClient(edge));
50
+ export const budgets = lazy(() => new BudgetsClient(edge));
51
+ export const costExplorer = lazy(() => new CostExplorerClient(edge));
41
52
 
42
53
  let account: Promise<string> | undefined;
43
54