@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.
- package/aws/{common/index.d.ts → index.d.ts} +0 -2
- package/aws/{common/index.js → index.js} +0 -2
- package/aws/{common/s3 → s3}/index.d.ts +0 -1
- package/aws/{common/s3 → s3}/index.js +0 -1
- package/cache/common/cache-key/cache-key/configs.d.ts +1 -1
- package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.d.ts +1 -0
- package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/index.js +1 -0
- package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.d.ts +2 -0
- package/cache/common/cache-key/page-data-dictionary-cache-key/page-data-dictionary-cache-key-page/type-guards.js +2 -0
- package/cache/common/cache-key/page-dictionary-cache-key/configs.d.ts +1 -1
- package/common/index.d.ts +0 -2
- package/common/index.js +0 -2
- package/common/page/configs.d.ts +1 -1
- package/common/page/configs.js +1 -0
- package/common/translation/translation-code/page/configs.d.ts +1 -1
- package/common/translation/translation-code/page/configs.js +1 -0
- package/common/translation/translation-code/page/maps.d.ts +3 -0
- package/common/translation/translation-code/page/maps.js +3 -0
- package/package.json +3 -8
- package/aws/cdk/ec2/index.d.ts +0 -1
- package/aws/cdk/ec2/index.js +0 -1
- package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.d.ts +0 -2
- package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/index.js +0 -4
- package/aws/cdk/ec2/utils/add-security-group-ingress-rule-cdk/types.d.ts +0 -2
- package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.d.ts +0 -2
- package/aws/cdk/ec2/utils/create-ec2-instance-cdk/index.js +0 -30
- package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.d.ts +0 -8
- package/aws/cdk/ec2/utils/create-ec2-instance-cdk/type.js +0 -1
- package/aws/cdk/ec2/utils/create-security-group-cdk/index.d.ts +0 -2
- package/aws/cdk/ec2/utils/create-security-group-cdk/index.js +0 -6
- package/aws/cdk/ec2/utils/create-security-group-cdk/type.d.ts +0 -3
- package/aws/cdk/ec2/utils/create-security-group-cdk/type.js +0 -1
- package/aws/cdk/ec2/utils/create-vpc-cdk/index.d.ts +0 -2
- package/aws/cdk/ec2/utils/create-vpc-cdk/index.js +0 -17
- package/aws/cdk/ec2/utils/create-vpc-cdk/type.d.ts +0 -3
- package/aws/cdk/ec2/utils/create-vpc-cdk/type.js +0 -1
- package/aws/cdk/ec2/utils/index.d.ts +0 -4
- package/aws/cdk/ec2/utils/index.js +0 -4
- package/aws/cdk/index.d.ts +0 -7
- package/aws/cdk/index.js +0 -7
- package/aws/cdk/lambda/index.d.ts +0 -1
- package/aws/cdk/lambda/index.js +0 -1
- package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.d.ts +0 -2
- package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/index.js +0 -25
- package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.d.ts +0 -8
- package/aws/cdk/lambda/utils/attach-sqs-to-lambda-cdk/types.js +0 -1
- package/aws/cdk/lambda/utils/create-lambda-cdk/index.d.ts +0 -2
- package/aws/cdk/lambda/utils/create-lambda-cdk/index.js +0 -37
- package/aws/cdk/lambda/utils/create-lambda-cdk/types.d.ts +0 -10
- package/aws/cdk/lambda/utils/create-lambda-cdk/types.js +0 -1
- package/aws/cdk/lambda/utils/index.d.ts +0 -2
- package/aws/cdk/lambda/utils/index.js +0 -2
- package/aws/cdk/s3/index.d.ts +0 -1
- package/aws/cdk/s3/index.js +0 -1
- package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.d.ts +0 -2
- package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/index.js +0 -9
- package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.d.ts +0 -3
- package/aws/cdk/s3/utils/attach-s3-bucket-policy-cdk/types.js +0 -1
- package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.d.ts +0 -2
- package/aws/cdk/s3/utils/create-s3-bucket-cdk/index.js +0 -23
- package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.d.ts +0 -5
- package/aws/cdk/s3/utils/create-s3-bucket-cdk/type.js +0 -1
- package/aws/cdk/s3/utils/index.d.ts +0 -2
- package/aws/cdk/s3/utils/index.js +0 -2
- package/aws/cdk/s3-deployment/index.d.ts +0 -1
- package/aws/cdk/s3-deployment/index.js +0 -1
- package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.d.ts +0 -2
- package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/index.js +0 -10
- package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.d.ts +0 -7
- package/aws/cdk/s3-deployment/utils/deploy-s3-bucket-cdk/type.js +0 -1
- package/aws/cdk/s3-deployment/utils/index.d.ts +0 -1
- package/aws/cdk/s3-deployment/utils/index.js +0 -1
- package/aws/cdk/sqs/index.d.ts +0 -1
- package/aws/cdk/sqs/index.js +0 -1
- package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.d.ts +0 -2
- package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/index.js +0 -9
- package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.d.ts +0 -4
- package/aws/cdk/sqs/utils/attach-sqs-policy-cdk/types.js +0 -1
- package/aws/cdk/sqs/utils/index.d.ts +0 -1
- package/aws/cdk/sqs/utils/index.js +0 -1
- package/aws/cdk/ssm/index.d.ts +0 -1
- package/aws/cdk/ssm/index.js +0 -1
- package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.d.ts +0 -2
- package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/index.js +0 -9
- package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.d.ts +0 -3
- package/aws/cdk/ssm/utils/attach-ssm-policy-cdk/types.js +0 -1
- package/aws/cdk/ssm/utils/index.d.ts +0 -1
- package/aws/cdk/ssm/utils/index.js +0 -1
- package/aws/cdk/utils/compose-cdk-stack/index.d.ts +0 -2
- package/aws/cdk/utils/compose-cdk-stack/index.js +0 -2
- package/aws/cdk/utils/compose-cdk-stack/types.d.ts +0 -2
- package/aws/cdk/utils/compose-cdk-stack/types.js +0 -1
- package/aws/cdk/utils/index.d.ts +0 -1
- package/aws/cdk/utils/index.js +0 -1
- package/aws/common/s3/s3-arn/constants.d.ts +0 -1
- package/aws/common/s3/s3-arn/constants.js +0 -1
- package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.d.ts +0 -2
- package/aws/common/s3/s3-arn/utils/compose-s3-arn/index.js +0 -2
- package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.d.ts +0 -1
- package/aws/common/s3/s3-arn/utils/compose-s3-arn/types.js +0 -1
- package/aws/common/s3/s3-arn/utils/index.d.ts +0 -1
- package/aws/common/s3/s3-arn/utils/index.js +0 -1
- package/aws/common/s3/s3-url/index.d.ts +0 -2
- package/aws/common/s3/s3-url/index.js +0 -2
- package/aws/common/s3/s3-url/utils/compose-s3-url/types.js +0 -1
- package/aws/common/sqs/index.d.ts +0 -3
- package/aws/common/sqs/index.js +0 -3
- package/aws/common/sqs/queue/index.d.ts +0 -1
- package/aws/common/sqs/queue/index.js +0 -1
- package/aws/common/sqs/queue/queue-name/constants.d.ts +0 -1
- package/aws/common/sqs/queue/queue-name/constants.js +0 -6
- package/aws/common/sqs/queue/queue-name/domains.d.ts +0 -2
- package/aws/common/sqs/queue/queue-name/domains.js +0 -1
- package/aws/common/sqs/queue/queue-name/index.d.ts +0 -2
- package/aws/common/sqs/queue/queue-name/index.js +0 -2
- package/aws/common/sqs/sqs-arn/constants.d.ts +0 -1
- package/aws/common/sqs/sqs-arn/constants.js +0 -3
- package/aws/common/sqs/sqs-arn/index.d.ts +0 -2
- package/aws/common/sqs/sqs-arn/index.js +0 -2
- package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.d.ts +0 -2
- package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/index.js +0 -2
- package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.d.ts +0 -2
- package/aws/common/sqs/sqs-arn/utils/compose-sqs-arn/types.js +0 -1
- package/aws/common/sqs/sqs-arn/utils/index.d.ts +0 -1
- package/aws/common/sqs/sqs-arn/utils/index.js +0 -1
- package/aws/common/sqs/sqs-url/constants.d.ts +0 -1
- package/aws/common/sqs/sqs-url/constants.js +0 -2
- package/aws/common/sqs/sqs-url/index.d.ts +0 -2
- package/aws/common/sqs/sqs-url/index.js +0 -2
- package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.d.ts +0 -2
- package/aws/common/sqs/sqs-url/utils/compose-sqs-url/index.js +0 -2
- package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.d.ts +0 -3
- package/aws/common/sqs/sqs-url/utils/compose-sqs-url/types.js +0 -1
- package/aws/common/sqs/sqs-url/utils/index.d.ts +0 -1
- package/aws/common/sqs/sqs-url/utils/index.js +0 -1
- package/aws/common/ssm/index.d.ts +0 -1
- package/aws/common/ssm/index.js +0 -1
- package/aws/common/ssm/ssm-arn/constants.d.ts +0 -1
- package/aws/common/ssm/ssm-arn/constants.js +0 -3
- package/aws/common/ssm/ssm-arn/index.d.ts +0 -2
- package/aws/common/ssm/ssm-arn/index.js +0 -2
- package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.d.ts +0 -2
- package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/index.js +0 -2
- package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.d.ts +0 -1
- package/aws/common/ssm/ssm-arn/utils/compose-ssm-arn/types.js +0 -1
- package/aws/common/ssm/ssm-arn/utils/index.d.ts +0 -1
- package/aws/common/ssm/ssm-arn/utils/index.js +0 -1
- package/aws/sdk/ec2/index.d.ts +0 -1
- package/aws/sdk/ec2/index.js +0 -1
- package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.d.ts +0 -2
- package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/index.js +0 -51
- package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.d.ts +0 -2
- package/aws/sdk/ec2/utils/get-instance-public-ip-sdk/type.js +0 -1
- package/aws/sdk/ec2/utils/index.d.ts +0 -1
- package/aws/sdk/ec2/utils/index.js +0 -1
- package/aws/sdk/index.d.ts +0 -3
- package/aws/sdk/index.js +0 -3
- package/aws/sdk/route53/index.d.ts +0 -1
- package/aws/sdk/route53/index.js +0 -1
- package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.d.ts +0 -2
- package/aws/sdk/route53/utils/add-route53-a-record-sdk/index.js +0 -35
- package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.d.ts +0 -6
- package/aws/sdk/route53/utils/add-route53-a-record-sdk/type.js +0 -1
- package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.d.ts +0 -2
- package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/index.js +0 -33
- package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.d.ts +0 -2
- package/aws/sdk/route53/utils/get-hosted-zone-id-sdk/type.js +0 -1
- package/aws/sdk/route53/utils/index.d.ts +0 -2
- package/aws/sdk/route53/utils/index.js +0 -2
- package/aws/sdk/sqs/index.d.ts +0 -2
- package/aws/sdk/sqs/index.js +0 -2
- package/aws/sdk/sqs/utils/get-sqs-client/index.d.ts +0 -2
- package/aws/sdk/sqs/utils/get-sqs-client/index.js +0 -8
- package/aws/sdk/sqs/utils/get-sqs-client/type.d.ts +0 -3
- package/aws/sdk/sqs/utils/get-sqs-client/type.js +0 -1
- package/aws/sdk/sqs/utils/index.d.ts +0 -1
- package/aws/sdk/sqs/utils/index.js +0 -1
- package/aws/sdk/sqs/workers/index.d.ts +0 -2
- package/aws/sdk/sqs/workers/index.js +0 -31
- package/aws/sdk/sqs/workers/type.d.ts +0 -9
- package/aws/sdk/sqs/workers/type.js +0 -1
- package/common/background-image/config.d.ts +0 -7
- package/common/background-image/config.js +0 -8
- package/common/background-image/domain.d.ts +0 -1
- package/common/background-image/domain.js +0 -1
- package/common/background-image/index.d.ts +0 -2
- package/common/background-image/index.js +0 -2
- package/common/styles/index.d.ts +0 -1
- package/common/styles/index.js +0 -1
- package/common/styles/screen/index.d.ts +0 -2
- package/common/styles/screen/index.js +0 -2
- package/common/styles/screen/screen/configs.d.ts +0 -2
- package/common/styles/screen/screen/configs.js +0 -11
- package/common/styles/screen/screen/domains.d.ts +0 -3
- package/common/styles/screen/screen/domains.js +0 -1
- package/common/styles/screen/screen/index.d.ts +0 -3
- package/common/styles/screen/screen/index.js +0 -3
- package/common/styles/screen/screen/utils/get-screen-by-width/index.d.ts +0 -2
- package/common/styles/screen/screen/utils/get-screen-by-width/index.js +0 -15
- package/common/styles/screen/screen/utils/get-screen-by-width/type.d.ts +0 -2
- package/common/styles/screen/screen/utils/get-screen-by-width/type.js +0 -1
- package/common/styles/screen/screen/utils/index.d.ts +0 -1
- package/common/styles/screen/screen/utils/index.js +0 -1
- package/common/styles/screen/screen-width/configs.d.ts +0 -2
- package/common/styles/screen/screen-width/configs.js +0 -53
- package/common/styles/screen/screen-width/domains.d.ts +0 -7
- package/common/styles/screen/screen-width/domains.js +0 -1
- package/common/styles/screen/screen-width/index.d.ts +0 -3
- package/common/styles/screen/screen-width/index.js +0 -3
- package/common/styles/screen/screen-width/utils/compose-screen-widths/index.d.ts +0 -2
- package/common/styles/screen/screen-width/utils/compose-screen-widths/index.js +0 -14
- package/common/styles/screen/screen-width/utils/compose-screen-widths/type.d.ts +0 -2
- package/common/styles/screen/screen-width/utils/compose-screen-widths/type.js +0 -1
- package/common/styles/screen/screen-width/utils/index.d.ts +0 -1
- package/common/styles/screen/screen-width/utils/index.js +0 -1
- /package/aws/{common/account-id → account-id}/constants.d.ts +0 -0
- /package/aws/{common/account-id → account-id}/constants.js +0 -0
- /package/aws/{common/account-id → account-id}/index.d.ts +0 -0
- /package/aws/{common/account-id → account-id}/index.js +0 -0
- /package/aws/{common/region → region}/constants.d.ts +0 -0
- /package/aws/{common/region → region}/constants.js +0 -0
- /package/aws/{common/region → region}/defaults.d.ts +0 -0
- /package/aws/{common/region → region}/defaults.js +0 -0
- /package/aws/{common/region → region}/domains.d.ts +0 -0
- /package/aws/{common/region → region}/domains.js +0 -0
- /package/aws/{common/region → region}/index.d.ts +0 -0
- /package/aws/{common/region → region}/index.js +0 -0
- /package/aws/{common/s3 → s3}/s3-url/constants.d.ts +0 -0
- /package/aws/{common/s3 → s3}/s3-url/constants.js +0 -0
- /package/aws/{common/s3/s3-arn → s3/s3-url}/index.d.ts +0 -0
- /package/aws/{common/s3/s3-arn → s3/s3-url}/index.js +0 -0
- /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.d.ts +0 -0
- /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/index.js +0 -0
- /package/aws/{common/s3 → s3}/s3-url/utils/compose-s3-url/types.d.ts +0 -0
- /package/aws/{cdk/ec2/utils/add-security-group-ingress-rule-cdk → s3/s3-url/utils/compose-s3-url}/types.js +0 -0
- /package/aws/{common/s3 → s3}/s3-url/utils/index.d.ts +0 -0
- /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 +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';
|
package/aws/sdk/index.d.ts
DELETED
package/aws/sdk/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils/index.js';
|
package/aws/sdk/route53/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils/index.js';
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
package/aws/sdk/sqs/index.d.ts
DELETED
package/aws/sdk/sqs/index.js
DELETED
|
@@ -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,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 +0,0 @@
|
|
|
1
|
-
export type BackgroundImage = 'mobile' | 'tablet' | 'desktop';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/common/styles/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './screen/index.js';
|
package/common/styles/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './screen/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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,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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|