@candlerip/shared 0.0.116 → 0.0.119

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 (237) 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/cache-key/configs.d.ts +1 -1
  6. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.d.ts +1 -0
  7. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.js +1 -0
  8. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.d.ts +2 -0
  9. package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.js +2 -0
  10. package/cache/common/cache-key/page-dictionary-cache-key/configs.d.ts +1 -1
  11. package/common/index.d.ts +0 -2
  12. package/common/index.js +0 -2
  13. package/common/page/configs.d.ts +1 -1
  14. package/common/page/configs.js +1 -0
  15. package/common/translation/translation-code/page/configs.d.ts +1 -1
  16. package/common/translation/translation-code/page/configs.js +1 -0
  17. package/common/translation/translation-code/page/maps.d.ts +3 -0
  18. package/common/translation/translation-code/page/maps.js +3 -0
  19. package/package.json +3 -8
  20. package/aws/cdk/ec2/index.d.ts +0 -1
  21. package/aws/cdk/ec2/index.js +0 -1
  22. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.d.ts +0 -2
  23. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.js +0 -4
  24. package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/types.d.ts +0 -2
  25. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.d.ts +0 -2
  26. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.js +0 -30
  27. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.d.ts +0 -8
  28. package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.js +0 -1
  29. package/aws/cdk/ec2/utils/create-security-group-cdk/index.d.ts +0 -2
  30. package/aws/cdk/ec2/utils/create-security-group-cdk/index.js +0 -6
  31. package/aws/cdk/ec2/utils/create-security-group-cdk/type.d.ts +0 -3
  32. package/aws/cdk/ec2/utils/create-security-group-cdk/type.js +0 -1
  33. package/aws/cdk/ec2/utils/create-vpc-cdk/index.d.ts +0 -2
  34. package/aws/cdk/ec2/utils/create-vpc-cdk/index.js +0 -17
  35. package/aws/cdk/ec2/utils/create-vpc-cdk/type.d.ts +0 -3
  36. package/aws/cdk/ec2/utils/create-vpc-cdk/type.js +0 -1
  37. package/aws/cdk/ec2/utils/index.d.ts +0 -4
  38. package/aws/cdk/ec2/utils/index.js +0 -4
  39. package/aws/cdk/index.d.ts +0 -7
  40. package/aws/cdk/index.js +0 -7
  41. package/aws/cdk/lambda/index.d.ts +0 -1
  42. package/aws/cdk/lambda/index.js +0 -1
  43. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.d.ts +0 -2
  44. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.js +0 -25
  45. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.d.ts +0 -8
  46. package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.js +0 -1
  47. package/aws/cdk/lambda/utils/create-lambda-cdk/index.d.ts +0 -2
  48. package/aws/cdk/lambda/utils/create-lambda-cdk/index.js +0 -37
  49. package/aws/cdk/lambda/utils/create-lambda-cdk/types.d.ts +0 -10
  50. package/aws/cdk/lambda/utils/create-lambda-cdk/types.js +0 -1
  51. package/aws/cdk/lambda/utils/index.d.ts +0 -2
  52. package/aws/cdk/lambda/utils/index.js +0 -2
  53. package/aws/cdk/s3/index.d.ts +0 -1
  54. package/aws/cdk/s3/index.js +0 -1
  55. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.d.ts +0 -2
  56. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.js +0 -9
  57. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.d.ts +0 -3
  58. package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.js +0 -1
  59. package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.d.ts +0 -2
  60. package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.js +0 -23
  61. package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.d.ts +0 -5
  62. package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.js +0 -1
  63. package/aws/cdk/s3/utils/index.d.ts +0 -2
  64. package/aws/cdk/s3/utils/index.js +0 -2
  65. package/aws/cdk/s3-deployment/index.d.ts +0 -1
  66. package/aws/cdk/s3-deployment/index.js +0 -1
  67. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.d.ts +0 -2
  68. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.js +0 -10
  69. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.d.ts +0 -7
  70. package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.js +0 -1
  71. package/aws/cdk/s3-deployment/utils/index.d.ts +0 -1
  72. package/aws/cdk/s3-deployment/utils/index.js +0 -1
  73. package/aws/cdk/sqs/index.d.ts +0 -1
  74. package/aws/cdk/sqs/index.js +0 -1
  75. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.d.ts +0 -2
  76. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.js +0 -9
  77. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.d.ts +0 -4
  78. package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.js +0 -1
  79. package/aws/cdk/sqs/utils/index.d.ts +0 -1
  80. package/aws/cdk/sqs/utils/index.js +0 -1
  81. package/aws/cdk/ssm/index.d.ts +0 -1
  82. package/aws/cdk/ssm/index.js +0 -1
  83. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.d.ts +0 -2
  84. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.js +0 -9
  85. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.d.ts +0 -3
  86. package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.js +0 -1
  87. package/aws/cdk/ssm/utils/index.d.ts +0 -1
  88. package/aws/cdk/ssm/utils/index.js +0 -1
  89. package/aws/cdk/utils/compose-cdk-stack/index.d.ts +0 -2
  90. package/aws/cdk/utils/compose-cdk-stack/index.js +0 -2
  91. package/aws/cdk/utils/compose-cdk-stack/types.d.ts +0 -2
  92. package/aws/cdk/utils/compose-cdk-stack/types.js +0 -1
  93. package/aws/cdk/utils/index.d.ts +0 -1
  94. package/aws/cdk/utils/index.js +0 -1
  95. package/aws/common/s3/s3-arn/constants.d.ts +0 -1
  96. package/aws/common/s3/s3-arn/constants.js +0 -1
  97. package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.d.ts +0 -2
  98. package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.js +0 -2
  99. package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.d.ts +0 -1
  100. package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.js +0 -1
  101. package/aws/common/s3/s3-arn/utils/index.d.ts +0 -1
  102. package/aws/common/s3/s3-arn/utils/index.js +0 -1
  103. package/aws/common/s3/s3-url/index.d.ts +0 -2
  104. package/aws/common/s3/s3-url/index.js +0 -2
  105. package/aws/common/s3/s3-url/utils/compose-s3-url/types.js +0 -1
  106. package/aws/common/sqs/index.d.ts +0 -3
  107. package/aws/common/sqs/index.js +0 -3
  108. package/aws/common/sqs/queue/index.d.ts +0 -1
  109. package/aws/common/sqs/queue/index.js +0 -1
  110. package/aws/common/sqs/queue/queue-name/constants.d.ts +0 -1
  111. package/aws/common/sqs/queue/queue-name/constants.js +0 -6
  112. package/aws/common/sqs/queue/queue-name/domains.d.ts +0 -2
  113. package/aws/common/sqs/queue/queue-name/domains.js +0 -1
  114. package/aws/common/sqs/queue/queue-name/index.d.ts +0 -2
  115. package/aws/common/sqs/queue/queue-name/index.js +0 -2
  116. package/aws/common/sqs/sqs-arn/constants.d.ts +0 -1
  117. package/aws/common/sqs/sqs-arn/constants.js +0 -3
  118. package/aws/common/sqs/sqs-arn/index.d.ts +0 -2
  119. package/aws/common/sqs/sqs-arn/index.js +0 -2
  120. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.d.ts +0 -2
  121. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.js +0 -2
  122. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.d.ts +0 -2
  123. package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.js +0 -1
  124. package/aws/common/sqs/sqs-arn/utils/index.d.ts +0 -1
  125. package/aws/common/sqs/sqs-arn/utils/index.js +0 -1
  126. package/aws/common/sqs/sqs-url/constants.d.ts +0 -1
  127. package/aws/common/sqs/sqs-url/constants.js +0 -2
  128. package/aws/common/sqs/sqs-url/index.d.ts +0 -2
  129. package/aws/common/sqs/sqs-url/index.js +0 -2
  130. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.d.ts +0 -2
  131. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.js +0 -2
  132. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.d.ts +0 -3
  133. package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.js +0 -1
  134. package/aws/common/sqs/sqs-url/utils/index.d.ts +0 -1
  135. package/aws/common/sqs/sqs-url/utils/index.js +0 -1
  136. package/aws/common/ssm/index.d.ts +0 -1
  137. package/aws/common/ssm/index.js +0 -1
  138. package/aws/common/ssm/ssm-arn/constants.d.ts +0 -1
  139. package/aws/common/ssm/ssm-arn/constants.js +0 -3
  140. package/aws/common/ssm/ssm-arn/index.d.ts +0 -2
  141. package/aws/common/ssm/ssm-arn/index.js +0 -2
  142. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.d.ts +0 -2
  143. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.js +0 -2
  144. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.d.ts +0 -1
  145. package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.js +0 -1
  146. package/aws/common/ssm/ssm-arn/utils/index.d.ts +0 -1
  147. package/aws/common/ssm/ssm-arn/utils/index.js +0 -1
  148. package/aws/sdk/ec2/index.d.ts +0 -1
  149. package/aws/sdk/ec2/index.js +0 -1
  150. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.d.ts +0 -2
  151. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.js +0 -51
  152. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.d.ts +0 -2
  153. package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.js +0 -1
  154. package/aws/sdk/ec2/utils/index.d.ts +0 -1
  155. package/aws/sdk/ec2/utils/index.js +0 -1
  156. package/aws/sdk/index.d.ts +0 -3
  157. package/aws/sdk/index.js +0 -3
  158. package/aws/sdk/route53/index.d.ts +0 -1
  159. package/aws/sdk/route53/index.js +0 -1
  160. package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.d.ts +0 -2
  161. package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.js +0 -35
  162. package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.d.ts +0 -6
  163. package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.js +0 -1
  164. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.d.ts +0 -2
  165. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.js +0 -33
  166. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.d.ts +0 -2
  167. package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.js +0 -1
  168. package/aws/sdk/route53/utils/index.d.ts +0 -2
  169. package/aws/sdk/route53/utils/index.js +0 -2
  170. package/aws/sdk/sqs/index.d.ts +0 -2
  171. package/aws/sdk/sqs/index.js +0 -2
  172. package/aws/sdk/sqs/utils/get-sqs-client/index.d.ts +0 -2
  173. package/aws/sdk/sqs/utils/get-sqs-client/index.js +0 -8
  174. package/aws/sdk/sqs/utils/get-sqs-client/type.d.ts +0 -3
  175. package/aws/sdk/sqs/utils/get-sqs-client/type.js +0 -1
  176. package/aws/sdk/sqs/utils/index.d.ts +0 -1
  177. package/aws/sdk/sqs/utils/index.js +0 -1
  178. package/aws/sdk/sqs/workers/index.d.ts +0 -2
  179. package/aws/sdk/sqs/workers/index.js +0 -31
  180. package/aws/sdk/sqs/workers/type.d.ts +0 -9
  181. package/aws/sdk/sqs/workers/type.js +0 -1
  182. package/common/background-image/config.d.ts +0 -7
  183. package/common/background-image/config.js +0 -8
  184. package/common/background-image/domain.d.ts +0 -1
  185. package/common/background-image/domain.js +0 -1
  186. package/common/background-image/index.d.ts +0 -2
  187. package/common/background-image/index.js +0 -2
  188. package/common/styles/index.d.ts +0 -1
  189. package/common/styles/index.js +0 -1
  190. package/common/styles/screen/index.d.ts +0 -2
  191. package/common/styles/screen/index.js +0 -2
  192. package/common/styles/screen/screen/configs.d.ts +0 -2
  193. package/common/styles/screen/screen/configs.js +0 -11
  194. package/common/styles/screen/screen/domains.d.ts +0 -3
  195. package/common/styles/screen/screen/domains.js +0 -1
  196. package/common/styles/screen/screen/index.d.ts +0 -3
  197. package/common/styles/screen/screen/index.js +0 -3
  198. package/common/styles/screen/screen/utils/get-screen-by-width/index.d.ts +0 -2
  199. package/common/styles/screen/screen/utils/get-screen-by-width/index.js +0 -15
  200. package/common/styles/screen/screen/utils/get-screen-by-width/type.d.ts +0 -2
  201. package/common/styles/screen/screen/utils/get-screen-by-width/type.js +0 -1
  202. package/common/styles/screen/screen/utils/index.d.ts +0 -1
  203. package/common/styles/screen/screen/utils/index.js +0 -1
  204. package/common/styles/screen/screen-width/configs.d.ts +0 -2
  205. package/common/styles/screen/screen-width/configs.js +0 -53
  206. package/common/styles/screen/screen-width/domains.d.ts +0 -7
  207. package/common/styles/screen/screen-width/domains.js +0 -1
  208. package/common/styles/screen/screen-width/index.d.ts +0 -3
  209. package/common/styles/screen/screen-width/index.js +0 -3
  210. package/common/styles/screen/screen-width/utils/compose-screen-widths/index.d.ts +0 -2
  211. package/common/styles/screen/screen-width/utils/compose-screen-widths/index.js +0 -14
  212. package/common/styles/screen/screen-width/utils/compose-screen-widths/type.d.ts +0 -2
  213. package/common/styles/screen/screen-width/utils/compose-screen-widths/type.js +0 -1
  214. package/common/styles/screen/screen-width/utils/index.d.ts +0 -1
  215. package/common/styles/screen/screen-width/utils/index.js +0 -1
  216. /package/aws/{common/account-id → account-id}/constants.d.ts +0 -0
  217. /package/aws/{common/account-id → account-id}/constants.js +0 -0
  218. /package/aws/{common/account-id → account-id}/index.d.ts +0 -0
  219. /package/aws/{common/account-id → account-id}/index.js +0 -0
  220. /package/aws/{common/region → region}/constants.d.ts +0 -0
  221. /package/aws/{common/region → region}/constants.js +0 -0
  222. /package/aws/{common/region → region}/defaults.d.ts +0 -0
  223. /package/aws/{common/region → region}/defaults.js +0 -0
  224. /package/aws/{common/region → region}/domains.d.ts +0 -0
  225. /package/aws/{common/region → region}/domains.js +0 -0
  226. /package/aws/{common/region → region}/index.d.ts +0 -0
  227. /package/aws/{common/region → region}/index.js +0 -0
  228. /package/aws/{common/s3 → s3}/s3-url/constants.d.ts +0 -0
  229. /package/aws/{common/s3 → s3}/s3-url/constants.js +0 -0
  230. /package/aws/{common/s3/s3-arn → s3/s3-url}/index.d.ts +0 -0
  231. /package/aws/{common/s3/s3-arn → s3/s3-url}/index.js +0 -0
  232. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.d.ts +0 -0
  233. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.js +0 -0
  234. /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/types.d.ts +0 -0
  235. /package/aws/{cdk/ec2/utils/add-security-group-ingress-rule-cdk → s3/s3-url/utils/compose-s3-url}/types.js +0 -0
  236. /package/aws/{common/s3 → s3}/s3-url/utils/index.d.ts +0 -0
  237. /package/aws/{common/s3 → s3}/s3-url/utils/index.js +0 -0
@@ -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>;
@@ -1,53 +0,0 @@
1
- export const SCREEN_WIDTHS = {
2
- tiny: {
3
- min: 0,
4
- max: 319,
5
- },
6
- mobile: {
7
- min: 320,
8
- max: 575,
9
- },
10
- 'max-mobile': {
11
- min: 0,
12
- max: 575,
13
- },
14
- 'min-mobile': {
15
- min: 320,
16
- },
17
- tablet: {
18
- min: 576,
19
- max: 991,
20
- },
21
- 'max-tablet': {
22
- min: 0,
23
- max: 991,
24
- },
25
- 'min-tablet': {
26
- min: 576,
27
- },
28
- laptop: {
29
- min: 992,
30
- max: 1279,
31
- },
32
- 'max-laptop': {
33
- min: 0,
34
- max: 1279,
35
- },
36
- 'min-laptop': {
37
- min: 992,
38
- },
39
- desktop: {
40
- min: 1280,
41
- max: 1919,
42
- },
43
- 'max-desktop': {
44
- min: 0,
45
- max: 1919,
46
- },
47
- 'min-desktop': {
48
- min: 1280,
49
- },
50
- lg: {
51
- min: 1920,
52
- },
53
- };
@@ -1,7 +0,0 @@
1
- import { CustomScreen, Screen } from '../screen/domains.js';
2
- export type ScreenWidths<T extends string | number = never> = {
3
- [key in Screen | CustomScreen]: {
4
- min: T;
5
- max?: T;
6
- };
7
- };
@@ -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 { ComposeScreenWidths } from './type.js';
2
- export declare const composeScreenWidths: ComposeScreenWidths;
@@ -1,14 +0,0 @@
1
- import { SCREEN_WIDTHS } from '../../configs.js';
2
- export const composeScreenWidths = (unit = 'px') => {
3
- const screenWidths = {};
4
- Object.keys(SCREEN_WIDTHS).forEach((screen) => {
5
- const { min, max } = SCREEN_WIDTHS[screen];
6
- screenWidths[screen] = {
7
- min: `${min}${unit}`,
8
- };
9
- if (max) {
10
- screenWidths[screen].max = `${max}${unit}`;
11
- }
12
- });
13
- return screenWidths;
14
- };
@@ -1,2 +0,0 @@
1
- import { ScreenWidths } from '../../domains.js';
2
- export type ComposeScreenWidths = (unit?: 'px') => ScreenWidths<string>;
@@ -1 +0,0 @@
1
- export * from './compose-screen-widths/index.js';
@@ -1 +0,0 @@
1
- export * from './compose-screen-widths/index.js';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes