@candlerip/shared 0.0.116 → 0.0.118

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 (229) hide show
  1. package/aws/{common/index.d.ts → index.d.ts} +0 -2
  2. package/aws/{common/index.js → index.js} +0 -2
  3. package/aws/{common/s3 → s3}/index.d.ts +0 -1
  4. package/aws/{common/s3 → s3}/index.js +0 -1
  5. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.d.ts +1 -0
  6. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.js +1 -0
  7. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.d.ts +2 -0
  8. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.js +2 -0
  9. package/common/index.d.ts +0 -2
  10. package/common/index.js +0 -2
  11. package/package.json +3 -8
  12. package/aws/cdk/ec2/index.d.ts +0 -1
  13. package/aws/cdk/ec2/index.js +0 -1
  14. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.d.ts +0 -2
  15. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.js +0 -4
  16. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/types.d.ts +0 -2
  17. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.d.ts +0 -2
  18. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.js +0 -30
  19. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.d.ts +0 -8
  20. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.js +0 -1
  21. package/aws/cdk/ec2/utils/create-security-group-cdk/index.d.ts +0 -2
  22. package/aws/cdk/ec2/utils/create-security-group-cdk/index.js +0 -6
  23. package/aws/cdk/ec2/utils/create-security-group-cdk/type.d.ts +0 -3
  24. package/aws/cdk/ec2/utils/create-security-group-cdk/type.js +0 -1
  25. package/aws/cdk/ec2/utils/create-vpc-cdk/index.d.ts +0 -2
  26. package/aws/cdk/ec2/utils/create-vpc-cdk/index.js +0 -17
  27. package/aws/cdk/ec2/utils/create-vpc-cdk/type.d.ts +0 -3
  28. package/aws/cdk/ec2/utils/create-vpc-cdk/type.js +0 -1
  29. package/aws/cdk/ec2/utils/index.d.ts +0 -4
  30. package/aws/cdk/ec2/utils/index.js +0 -4
  31. package/aws/cdk/index.d.ts +0 -7
  32. package/aws/cdk/index.js +0 -7
  33. package/aws/cdk/lambda/index.d.ts +0 -1
  34. package/aws/cdk/lambda/index.js +0 -1
  35. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.d.ts +0 -2
  36. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.js +0 -25
  37. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.d.ts +0 -8
  38. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.js +0 -1
  39. package/aws/cdk/lambda/utils/create-lambda-cdk/index.d.ts +0 -2
  40. package/aws/cdk/lambda/utils/create-lambda-cdk/index.js +0 -37
  41. package/aws/cdk/lambda/utils/create-lambda-cdk/types.d.ts +0 -10
  42. package/aws/cdk/lambda/utils/create-lambda-cdk/types.js +0 -1
  43. package/aws/cdk/lambda/utils/index.d.ts +0 -2
  44. package/aws/cdk/lambda/utils/index.js +0 -2
  45. package/aws/cdk/s3/index.d.ts +0 -1
  46. package/aws/cdk/s3/index.js +0 -1
  47. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.d.ts +0 -2
  48. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.js +0 -9
  49. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.d.ts +0 -3
  50. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.js +0 -1
  51. package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.d.ts +0 -2
  52. package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.js +0 -23
  53. package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.d.ts +0 -5
  54. package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.js +0 -1
  55. package/aws/cdk/s3/utils/index.d.ts +0 -2
  56. package/aws/cdk/s3/utils/index.js +0 -2
  57. package/aws/cdk/s3-deployment/index.d.ts +0 -1
  58. package/aws/cdk/s3-deployment/index.js +0 -1
  59. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.d.ts +0 -2
  60. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.js +0 -10
  61. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.d.ts +0 -7
  62. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.js +0 -1
  63. package/aws/cdk/s3-deployment/utils/index.d.ts +0 -1
  64. package/aws/cdk/s3-deployment/utils/index.js +0 -1
  65. package/aws/cdk/sqs/index.d.ts +0 -1
  66. package/aws/cdk/sqs/index.js +0 -1
  67. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.d.ts +0 -2
  68. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.js +0 -9
  69. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.d.ts +0 -4
  70. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.js +0 -1
  71. package/aws/cdk/sqs/utils/index.d.ts +0 -1
  72. package/aws/cdk/sqs/utils/index.js +0 -1
  73. package/aws/cdk/ssm/index.d.ts +0 -1
  74. package/aws/cdk/ssm/index.js +0 -1
  75. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.d.ts +0 -2
  76. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.js +0 -9
  77. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.d.ts +0 -3
  78. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.js +0 -1
  79. package/aws/cdk/ssm/utils/index.d.ts +0 -1
  80. package/aws/cdk/ssm/utils/index.js +0 -1
  81. package/aws/cdk/utils/compose-cdk-stack/index.d.ts +0 -2
  82. package/aws/cdk/utils/compose-cdk-stack/index.js +0 -2
  83. package/aws/cdk/utils/compose-cdk-stack/types.d.ts +0 -2
  84. package/aws/cdk/utils/compose-cdk-stack/types.js +0 -1
  85. package/aws/cdk/utils/index.d.ts +0 -1
  86. package/aws/cdk/utils/index.js +0 -1
  87. package/aws/common/s3/s3-arn/constants.d.ts +0 -1
  88. package/aws/common/s3/s3-arn/constants.js +0 -1
  89. package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.d.ts +0 -2
  90. package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.js +0 -2
  91. package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.d.ts +0 -1
  92. package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.js +0 -1
  93. package/aws/common/s3/s3-arn/utils/index.d.ts +0 -1
  94. package/aws/common/s3/s3-arn/utils/index.js +0 -1
  95. package/aws/common/s3/s3-url/index.d.ts +0 -2
  96. package/aws/common/s3/s3-url/index.js +0 -2
  97. package/aws/common/s3/s3-url/utils/compose-s3-url/types.js +0 -1
  98. package/aws/common/sqs/index.d.ts +0 -3
  99. package/aws/common/sqs/index.js +0 -3
  100. package/aws/common/sqs/queue/index.d.ts +0 -1
  101. package/aws/common/sqs/queue/index.js +0 -1
  102. package/aws/common/sqs/queue/queue-name/constants.d.ts +0 -1
  103. package/aws/common/sqs/queue/queue-name/constants.js +0 -6
  104. package/aws/common/sqs/queue/queue-name/domains.d.ts +0 -2
  105. package/aws/common/sqs/queue/queue-name/domains.js +0 -1
  106. package/aws/common/sqs/queue/queue-name/index.d.ts +0 -2
  107. package/aws/common/sqs/queue/queue-name/index.js +0 -2
  108. package/aws/common/sqs/sqs-arn/constants.d.ts +0 -1
  109. package/aws/common/sqs/sqs-arn/constants.js +0 -3
  110. package/aws/common/sqs/sqs-arn/index.d.ts +0 -2
  111. package/aws/common/sqs/sqs-arn/index.js +0 -2
  112. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.d.ts +0 -2
  113. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.js +0 -2
  114. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.d.ts +0 -2
  115. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.js +0 -1
  116. package/aws/common/sqs/sqs-arn/utils/index.d.ts +0 -1
  117. package/aws/common/sqs/sqs-arn/utils/index.js +0 -1
  118. package/aws/common/sqs/sqs-url/constants.d.ts +0 -1
  119. package/aws/common/sqs/sqs-url/constants.js +0 -2
  120. package/aws/common/sqs/sqs-url/index.d.ts +0 -2
  121. package/aws/common/sqs/sqs-url/index.js +0 -2
  122. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.d.ts +0 -2
  123. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.js +0 -2
  124. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.d.ts +0 -3
  125. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.js +0 -1
  126. package/aws/common/sqs/sqs-url/utils/index.d.ts +0 -1
  127. package/aws/common/sqs/sqs-url/utils/index.js +0 -1
  128. package/aws/common/ssm/index.d.ts +0 -1
  129. package/aws/common/ssm/index.js +0 -1
  130. package/aws/common/ssm/ssm-arn/constants.d.ts +0 -1
  131. package/aws/common/ssm/ssm-arn/constants.js +0 -3
  132. package/aws/common/ssm/ssm-arn/index.d.ts +0 -2
  133. package/aws/common/ssm/ssm-arn/index.js +0 -2
  134. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.d.ts +0 -2
  135. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.js +0 -2
  136. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.d.ts +0 -1
  137. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.js +0 -1
  138. package/aws/common/ssm/ssm-arn/utils/index.d.ts +0 -1
  139. package/aws/common/ssm/ssm-arn/utils/index.js +0 -1
  140. package/aws/sdk/ec2/index.d.ts +0 -1
  141. package/aws/sdk/ec2/index.js +0 -1
  142. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.d.ts +0 -2
  143. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.js +0 -51
  144. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.d.ts +0 -2
  145. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.js +0 -1
  146. package/aws/sdk/ec2/utils/index.d.ts +0 -1
  147. package/aws/sdk/ec2/utils/index.js +0 -1
  148. package/aws/sdk/index.d.ts +0 -3
  149. package/aws/sdk/index.js +0 -3
  150. package/aws/sdk/route53/index.d.ts +0 -1
  151. package/aws/sdk/route53/index.js +0 -1
  152. package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.d.ts +0 -2
  153. package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.js +0 -35
  154. package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.d.ts +0 -6
  155. package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.js +0 -1
  156. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.d.ts +0 -2
  157. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.js +0 -33
  158. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.d.ts +0 -2
  159. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.js +0 -1
  160. package/aws/sdk/route53/utils/index.d.ts +0 -2
  161. package/aws/sdk/route53/utils/index.js +0 -2
  162. package/aws/sdk/sqs/index.d.ts +0 -2
  163. package/aws/sdk/sqs/index.js +0 -2
  164. package/aws/sdk/sqs/utils/get-sqs-client/index.d.ts +0 -2
  165. package/aws/sdk/sqs/utils/get-sqs-client/index.js +0 -8
  166. package/aws/sdk/sqs/utils/get-sqs-client/type.d.ts +0 -3
  167. package/aws/sdk/sqs/utils/get-sqs-client/type.js +0 -1
  168. package/aws/sdk/sqs/utils/index.d.ts +0 -1
  169. package/aws/sdk/sqs/utils/index.js +0 -1
  170. package/aws/sdk/sqs/workers/index.d.ts +0 -2
  171. package/aws/sdk/sqs/workers/index.js +0 -31
  172. package/aws/sdk/sqs/workers/type.d.ts +0 -9
  173. package/aws/sdk/sqs/workers/type.js +0 -1
  174. package/common/background-image/config.d.ts +0 -7
  175. package/common/background-image/config.js +0 -8
  176. package/common/background-image/domain.d.ts +0 -1
  177. package/common/background-image/domain.js +0 -1
  178. package/common/background-image/index.d.ts +0 -2
  179. package/common/background-image/index.js +0 -2
  180. package/common/styles/index.d.ts +0 -1
  181. package/common/styles/index.js +0 -1
  182. package/common/styles/screen/index.d.ts +0 -2
  183. package/common/styles/screen/index.js +0 -2
  184. package/common/styles/screen/screen/configs.d.ts +0 -2
  185. package/common/styles/screen/screen/configs.js +0 -11
  186. package/common/styles/screen/screen/domains.d.ts +0 -3
  187. package/common/styles/screen/screen/domains.js +0 -1
  188. package/common/styles/screen/screen/index.d.ts +0 -3
  189. package/common/styles/screen/screen/index.js +0 -3
  190. package/common/styles/screen/screen/utils/get-screen-by-width/index.d.ts +0 -2
  191. package/common/styles/screen/screen/utils/get-screen-by-width/index.js +0 -15
  192. package/common/styles/screen/screen/utils/get-screen-by-width/type.d.ts +0 -2
  193. package/common/styles/screen/screen/utils/get-screen-by-width/type.js +0 -1
  194. package/common/styles/screen/screen/utils/index.d.ts +0 -1
  195. package/common/styles/screen/screen/utils/index.js +0 -1
  196. package/common/styles/screen/screen-width/configs.d.ts +0 -2
  197. package/common/styles/screen/screen-width/configs.js +0 -53
  198. package/common/styles/screen/screen-width/domains.d.ts +0 -7
  199. package/common/styles/screen/screen-width/domains.js +0 -1
  200. package/common/styles/screen/screen-width/index.d.ts +0 -3
  201. package/common/styles/screen/screen-width/index.js +0 -3
  202. package/common/styles/screen/screen-width/utils/compose-screen-widths/index.d.ts +0 -2
  203. package/common/styles/screen/screen-width/utils/compose-screen-widths/index.js +0 -14
  204. package/common/styles/screen/screen-width/utils/compose-screen-widths/type.d.ts +0 -2
  205. package/common/styles/screen/screen-width/utils/compose-screen-widths/type.js +0 -1
  206. package/common/styles/screen/screen-width/utils/index.d.ts +0 -1
  207. package/common/styles/screen/screen-width/utils/index.js +0 -1
  208. /package/aws/{common/account-id → account-id}/constants.d.ts +0 -0
  209. /package/aws/{common/account-id → account-id}/constants.js +0 -0
  210. /package/aws/{common/account-id → account-id}/index.d.ts +0 -0
  211. /package/aws/{common/account-id → account-id}/index.js +0 -0
  212. /package/aws/{common/region → region}/constants.d.ts +0 -0
  213. /package/aws/{common/region → region}/constants.js +0 -0
  214. /package/aws/{common/region → region}/defaults.d.ts +0 -0
  215. /package/aws/{common/region → region}/defaults.js +0 -0
  216. /package/aws/{common/region → region}/domains.d.ts +0 -0
  217. /package/aws/{common/region → region}/domains.js +0 -0
  218. /package/aws/{common/region → region}/index.d.ts +0 -0
  219. /package/aws/{common/region → region}/index.js +0 -0
  220. /package/aws/{common/s3 → s3}/s3-url/constants.d.ts +0 -0
  221. /package/aws/{common/s3 → s3}/s3-url/constants.js +0 -0
  222. /package/aws/{common/s3/s3-arn → s3/s3-url}/index.d.ts +0 -0
  223. /package/aws/{common/s3/s3-arn → s3/s3-url}/index.js +0 -0
  224. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.d.ts +0 -0
  225. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.js +0 -0
  226. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/types.d.ts +0 -0
  227. /package/aws/{cdk/ec2/utils/add-security-group-ingress-rule-cdk → s3/s3-url/utils/compose-s3-url}/types.js +0 -0
  228. /package/aws/{common/s3 → s3}/s3-url/utils/index.d.ts +0 -0
  229. /package/aws/{common/s3 → s3}/s3-url/utils/index.js +0 -0
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './compose-s3-arn/index.js';
@@ -1 +0,0 @@
1
- export * from './compose-s3-arn/index.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export * from './queue/index.js';
2
- export * from './sqs-arn/index.js';
3
- export * from './sqs-url/index.js';
@@ -1,3 +0,0 @@
1
- export * from './queue/index.js';
2
- export * from './sqs-arn/index.js';
3
- export * from './sqs-url/index.js';
@@ -1 +0,0 @@
1
- export * from './queue-name/index.js';
@@ -1 +0,0 @@
1
- export * from './queue-name/index.js';
@@ -1 +0,0 @@
1
- export declare const AWS_QUEUE_NAMES: readonly ["cache-service-development", "cache-service-development-dlq", "cache-service-production", "cache-service-production-dlq"];
@@ -1,6 +0,0 @@
1
- export const AWS_QUEUE_NAMES = [
2
- 'cache-service-development',
3
- 'cache-service-development-dlq',
4
- 'cache-service-production',
5
- 'cache-service-production-dlq',
6
- ];
@@ -1,2 +0,0 @@
1
- import { AWS_QUEUE_NAMES } from './constants.js';
2
- export type AwsQueueName = (typeof AWS_QUEUE_NAMES)[number];
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './domains.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './domains.js';
@@ -1 +0,0 @@
1
- export declare const SQS_ARN: string;
@@ -1,3 +0,0 @@
1
- import { AWS_ACCOUNT_ID } from '../../account-id/index.js';
2
- import { DEFAULT_AWS_REGION } from '../../region/index.js';
3
- export const SQS_ARN = `arn:aws:sqs:${DEFAULT_AWS_REGION}:${AWS_ACCOUNT_ID}:<QUEUE_NAME>`;
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { ComposeSqsArn } from './types.js';
2
- export declare const composeSqsArn: ComposeSqsArn;
@@ -1,2 +0,0 @@
1
- import { SQS_ARN } from '../../constants.js';
2
- export const composeSqsArn = (queueName) => SQS_ARN.replace('<QUEUE_NAME>', queueName);
@@ -1,2 +0,0 @@
1
- import { AwsQueueName } from '../../../queue/index.js';
2
- export type ComposeSqsArn = (queueName: AwsQueueName) => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './compose-sqs-arn/index.js';
@@ -1 +0,0 @@
1
- export * from './compose-sqs-arn/index.js';
@@ -1 +0,0 @@
1
- export declare const SQS_URL = "https://sqs.<AWS_REGION>.amazonaws.com/430408040574/<QUEUE_NAME>";
@@ -1,2 +0,0 @@
1
- import { AWS_ACCOUNT_ID } from '../../account-id/index.js';
2
- export const SQS_URL = `https://sqs.<AWS_REGION>.amazonaws.com/${AWS_ACCOUNT_ID}/<QUEUE_NAME>`;
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { ComposeSqsUrl } from './types.js';
2
- export declare const composeSqsUrl: ComposeSqsUrl;
@@ -1,2 +0,0 @@
1
- import { SQS_URL } from '../../constants.js';
2
- export const composeSqsUrl = (queueName, awsRegion) => SQS_URL.replace('<AWS_REGION>', awsRegion).replace('<QUEUE_NAME>', queueName);
@@ -1,3 +0,0 @@
1
- import { AwsRegion } from '../../../../region/index.js';
2
- import { AwsQueueName } from '../../../queue/index.js';
3
- export type ComposeSqsUrl = (queueName: AwsQueueName, awsRegion: AwsRegion) => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './compose-sqs-url/index.js';
@@ -1 +0,0 @@
1
- export * from './compose-sqs-url/index.js';
@@ -1 +0,0 @@
1
- export * from './ssm-arn/index.js';
@@ -1 +0,0 @@
1
- export * from './ssm-arn/index.js';
@@ -1 +0,0 @@
1
- export declare const SSM_ARN: string;
@@ -1,3 +0,0 @@
1
- import { AWS_ACCOUNT_ID } from '../../account-id/index.js';
2
- import { DEFAULT_AWS_REGION } from '../../region/index.js';
3
- export const SSM_ARN = `arn:aws:ssm:${DEFAULT_AWS_REGION}:${AWS_ACCOUNT_ID}:parameter/*`;
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- export * from './constants.js';
2
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { ComposeSsmArn } from './types.js';
2
- export declare const composeSsmArn: ComposeSsmArn;
@@ -1,2 +0,0 @@
1
- import { SSM_ARN } from '../../constants.js';
2
- export const composeSsmArn = () => SSM_ARN;
@@ -1 +0,0 @@
1
- export type ComposeSsmArn = () => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './compose-ssm-arn/index.js';
@@ -1 +0,0 @@
1
- export * from './compose-ssm-arn/index.js';
@@ -1 +0,0 @@
1
- export * from './utils/index.js';
@@ -1 +0,0 @@
1
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { GetInstancePublicIpSdk } from './type.js';
2
- export declare const getInstancePublicIpSdk: GetInstancePublicIpSdk;
@@ -1,51 +0,0 @@
1
- import * as ec2 from '@aws-sdk/client-ec2';
2
- import { CustomErrorWorker } from '../../../../../common/index.js';
3
- export const getInstancePublicIpSdk = async (name) => {
4
- const { composeCustomError } = CustomErrorWorker({ info: { name } });
5
- const client = new ec2.EC2Client();
6
- let resp;
7
- try {
8
- resp = await client.send(new ec2.DescribeInstancesCommand({
9
- Filters: [
10
- {
11
- Name: `tag:Name`,
12
- Values: [name],
13
- },
14
- ],
15
- }));
16
- }
17
- catch (err) {
18
- return {
19
- customError: composeCustomError('Get instance', {
20
- err,
21
- }),
22
- };
23
- }
24
- const { Reservations: reservations } = resp;
25
- if (!reservations || reservations.length === 0) {
26
- return {
27
- customError: composeCustomError('No instance found'),
28
- };
29
- }
30
- let instances = [];
31
- reservations.forEach((it) => {
32
- if (!it.Instances) {
33
- return;
34
- }
35
- instances = instances.concat(...it.Instances);
36
- });
37
- if (!instances || instances.length === 0) {
38
- return {
39
- customError: composeCustomError('No instance found'),
40
- };
41
- }
42
- const [{ PublicIpAddress }] = instances.filter((it) => it.State?.Name === 'running');
43
- if (!PublicIpAddress) {
44
- return {
45
- customError: composeCustomError('Instance has no public IP'),
46
- };
47
- }
48
- return {
49
- data: PublicIpAddress,
50
- };
51
- };
@@ -1,2 +0,0 @@
1
- import { TCustomError } from '../../../../../common/index.js';
2
- export type GetInstancePublicIpSdk = (name: string) => Promise<TCustomError<string>>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './get-instance-public-ip-sdk/index.js';
@@ -1 +0,0 @@
1
- export * from './get-instance-public-ip-sdk/index.js';
@@ -1,3 +0,0 @@
1
- export * from './ec2/index.js';
2
- export * from './route53/index.js';
3
- export * from './sqs/index.js';
package/aws/sdk/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './ec2/index.js';
2
- export * from './route53/index.js';
3
- export * from './sqs/index.js';
@@ -1 +0,0 @@
1
- export * from './utils/index.js';
@@ -1 +0,0 @@
1
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { AddRoute53ARecordSdk } from './type.js';
2
- export declare const addRoute53ARecordSdk: AddRoute53ARecordSdk;
@@ -1,35 +0,0 @@
1
- import * as route53 from '@aws-sdk/client-route-53';
2
- import { CustomErrorWorker } from '../../../../../common/index.js';
3
- export const addRoute53ARecordSdk = async (domainName, hostedZoneId, value) => {
4
- const client = new route53.Route53Client();
5
- const { composeCustomError } = CustomErrorWorker({ info: { domainName, hostedZoneId, value } });
6
- try {
7
- await client.send(new route53.ChangeResourceRecordSetsCommand({
8
- ChangeBatch: {
9
- Changes: [
10
- {
11
- Action: 'UPSERT',
12
- ResourceRecordSet: {
13
- Name: domainName,
14
- ResourceRecords: [
15
- {
16
- Value: value.ip,
17
- },
18
- ],
19
- TTL: 60,
20
- Type: 'A',
21
- },
22
- },
23
- ],
24
- },
25
- HostedZoneId: hostedZoneId,
26
- }));
27
- }
28
- catch (err) {
29
- return {
30
- customError: composeCustomError('Error during set A record', {
31
- err,
32
- }),
33
- };
34
- }
35
- };
@@ -1,6 +0,0 @@
1
- import { CustomError } from '../../../../../common/index.js';
2
- export type AddRoute53ARecordSdk = (domainName: string, hostedZoneId: string, value: {
3
- ip: string;
4
- }) => Promise<undefined | {
5
- customError: CustomError;
6
- }>;
@@ -1,2 +0,0 @@
1
- import { GetHostedZoneIdSdk } from './type.js';
2
- export declare const getHostedZoneIdSdk: GetHostedZoneIdSdk;
@@ -1,33 +0,0 @@
1
- import * as route53 from '@aws-sdk/client-route-53';
2
- import { CustomErrorWorker } from '../../../../../common/index.js';
3
- export const getHostedZoneIdSdk = async (name) => {
4
- const client = new route53.Route53Client();
5
- const { composeCustomError } = CustomErrorWorker({ info: { name } });
6
- let resp;
7
- try {
8
- resp = await client.send(new route53.ListHostedZonesByNameCommand({}));
9
- }
10
- catch (err) {
11
- return {
12
- customError: composeCustomError('Error during list hosted zones', {
13
- err,
14
- }),
15
- };
16
- }
17
- const { HostedZones: hostedZones } = resp;
18
- if (!hostedZones || hostedZones.length === 0) {
19
- return {
20
- customError: composeCustomError('No hosted zone found'),
21
- };
22
- }
23
- // NOTE: Hosted zone name contains '.' at the end
24
- const hostedZone = hostedZones.find((it) => it.Name === `${name}.`);
25
- if (!hostedZone) {
26
- return {
27
- customError: composeCustomError('No hosted zone found'),
28
- };
29
- }
30
- const { Id: id } = hostedZone;
31
- // NOTE: '/hostedzone/XXX' => 'XXX'
32
- return { data: id.substring(id.lastIndexOf('/') + 1) };
33
- };
@@ -1,2 +0,0 @@
1
- import { TCustomError } from '../../../../../common/index.js';
2
- export type GetHostedZoneIdSdk = (name: string) => Promise<TCustomError<string>>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './add-route53-a-record-sdk/index.js';
2
- export * from './get-hosted-zone-id-sdk/index.js';
@@ -1,2 +0,0 @@
1
- export * from './add-route53-a-record-sdk/index.js';
2
- export * from './get-hosted-zone-id-sdk/index.js';
@@ -1,2 +0,0 @@
1
- export * from './utils/index.js';
2
- export * from './workers/index.js';
@@ -1,2 +0,0 @@
1
- export * from './utils/index.js';
2
- export * from './workers/index.js';
@@ -1,2 +0,0 @@
1
- import { GetSqsClient } from './type.js';
2
- export declare const getSqsClient: GetSqsClient;
@@ -1,8 +0,0 @@
1
- import { SQSClient } from '@aws-sdk/client-sqs';
2
- let _client = null;
3
- export const getSqsClient = (awsRegion) => {
4
- if (!_client) {
5
- _client = new SQSClient({ region: awsRegion });
6
- }
7
- return _client;
8
- };
@@ -1,3 +0,0 @@
1
- import { SQSClient } from '@aws-sdk/client-sqs';
2
- export type Client = SQSClient | null;
3
- export type GetSqsClient = (awsRegion: string) => SQSClient;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './get-sqs-client/index.js';
@@ -1 +0,0 @@
1
- export * from './get-sqs-client/index.js';
@@ -1,2 +0,0 @@
1
- import { TSqsWorker } from './type.js';
2
- export declare const SqsWorker: TSqsWorker;
@@ -1,31 +0,0 @@
1
- import { getSqsClient } from '../utils/index.js';
2
- import { SendMessageCommand } from '@aws-sdk/client-sqs';
3
- import { composeSqsUrl } from '../../../common/index.js';
4
- import { CustomErrorWorker } from '../../../../common/index.js';
5
- export const SqsWorker = ({ awsRegion }) => {
6
- const _client = getSqsClient(awsRegion);
7
- const _customErrorWorker = CustomErrorWorker({
8
- info: { awsRegion },
9
- });
10
- const sendSqsMessage = async (queueName, message) => {
11
- const params = {
12
- MessageBody: JSON.stringify(message),
13
- QueueUrl: composeSqsUrl(queueName, awsRegion),
14
- };
15
- let data;
16
- try {
17
- data = await _client.send(new SendMessageCommand(params));
18
- }
19
- catch (err) {
20
- return {
21
- customError: _customErrorWorker.composeCustomError(`Error during send message to ${queueName}`, { err, queueName }),
22
- };
23
- }
24
- return {
25
- data,
26
- };
27
- };
28
- return {
29
- sendSqsMessage,
30
- };
31
- };
@@ -1,9 +0,0 @@
1
- import { SendMessageCommandOutput } from '@aws-sdk/client-sqs';
2
- import { AwsRegion, AwsQueueName } from '../../../common/index.js';
3
- import { TCustomError } from '../../../../common/index.js';
4
- export type TSqsWorker = (props: {
5
- awsRegion: AwsRegion;
6
- }) => {
7
- sendSqsMessage: SendSqsMessage;
8
- };
9
- export type SendSqsMessage = (queueName: AwsQueueName, message: Record<string, unknown>) => Promise<TCustomError<SendMessageCommandOutput>>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { Screen } from '../styles/index.js';
2
- import { BackgroundImage } from './domain.js';
3
- export declare const BACKGROUND_IMAGES: BackgroundImages;
4
- type BackgroundImages = {
5
- [key in Screen]: BackgroundImage;
6
- };
7
- export {};
@@ -1,8 +0,0 @@
1
- export const BACKGROUND_IMAGES = {
2
- tiny: 'mobile',
3
- mobile: 'mobile',
4
- tablet: 'tablet',
5
- laptop: 'tablet',
6
- desktop: 'desktop',
7
- lg: 'desktop',
8
- };
@@ -1 +0,0 @@
1
- export type BackgroundImage = 'mobile' | 'tablet' | 'desktop';
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './domain.js';
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './domain.js';
@@ -1 +0,0 @@
1
- export * from './screen/index.js';
@@ -1 +0,0 @@
1
- export * from './screen/index.js';
@@ -1,2 +0,0 @@
1
- export * from './screen/index.js';
2
- export * from './screen-width/index.js';
@@ -1,2 +0,0 @@
1
- export * from './screen/index.js';
2
- export * from './screen-width/index.js';
@@ -1,2 +0,0 @@
1
- export declare const CUSTOM_SCREENS: readonly ["max-mobile", "min-mobile", "max-tablet", "min-tablet", "max-laptop", "min-laptop", "max-desktop", "min-desktop"];
2
- export declare const SCREENS: readonly ["tiny", "mobile", "tablet", "laptop", "desktop", "lg"];
@@ -1,11 +0,0 @@
1
- export const CUSTOM_SCREENS = [
2
- 'max-mobile',
3
- 'min-mobile',
4
- 'max-tablet',
5
- 'min-tablet',
6
- 'max-laptop',
7
- 'min-laptop',
8
- 'max-desktop',
9
- 'min-desktop',
10
- ];
11
- export const SCREENS = ['tiny', 'mobile', 'tablet', 'laptop', 'desktop', 'lg'];
@@ -1,3 +0,0 @@
1
- import { SCREENS, CUSTOM_SCREENS } from './configs.js';
2
- export type CustomScreen = (typeof CUSTOM_SCREENS)[number];
3
- export type Screen = (typeof SCREENS)[number];
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export * from './configs.js';
2
- export * from './domains.js';
3
- export * from './utils/index.js';
@@ -1,3 +0,0 @@
1
- export * from './configs.js';
2
- export * from './domains.js';
3
- export * from './utils/index.js';
@@ -1,2 +0,0 @@
1
- import { GetScreenByWidth } from './type.js';
2
- export declare const getScreenByWidth: GetScreenByWidth;
@@ -1,15 +0,0 @@
1
- import { isUndefined } from '../../../../../type/index.js';
2
- import { SCREEN_WIDTHS } from '../../../screen-width/index.js';
3
- import { SCREENS } from '../../configs.js';
4
- export const getScreenByWidth = (width) => {
5
- let screenBreakpoint = 'tiny';
6
- SCREENS.forEach((it) => {
7
- const isMoreOrEqualMin = width >= SCREEN_WIDTHS[it].min;
8
- const max = SCREEN_WIDTHS[it].max;
9
- const isLessOrEqualMax = isUndefined(max) || (!isUndefined(max) && width <= max);
10
- if (isMoreOrEqualMin && isLessOrEqualMax) {
11
- screenBreakpoint = it;
12
- }
13
- });
14
- return screenBreakpoint;
15
- };
@@ -1,2 +0,0 @@
1
- import { Screen } from '../../domains.js';
2
- export type GetScreenByWidth = (width: number) => Screen;
@@ -1 +0,0 @@
1
- export * from './get-screen-by-width/index.js';
@@ -1 +0,0 @@
1
- export * from './get-screen-by-width/index.js';
@@ -1,2 +0,0 @@
1
- import { ScreenWidths } from './domains.js';
2
- export declare const SCREEN_WIDTHS: ScreenWidths<number>;