@effect-aws/client-cloudwatch-logs 1.3.0 → 1.9.3

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 (68) hide show
  1. package/CloudWatchLogsClientInstance/package.json +6 -0
  2. package/CloudWatchLogsService/package.json +6 -0
  3. package/CloudWatchLogsServiceConfig/package.json +6 -0
  4. package/Errors/package.json +6 -0
  5. package/dist/cjs/CloudWatchLogsClientInstance.d.ts +24 -0
  6. package/dist/cjs/CloudWatchLogsClientInstance.d.ts.map +1 -0
  7. package/dist/cjs/CloudWatchLogsClientInstance.js +50 -0
  8. package/dist/cjs/CloudWatchLogsClientInstance.js.map +1 -0
  9. package/{lib → dist/cjs}/CloudWatchLogsService.d.ts +17 -130
  10. package/dist/cjs/CloudWatchLogsService.d.ts.map +1 -0
  11. package/dist/cjs/CloudWatchLogsService.js +148 -0
  12. package/dist/cjs/CloudWatchLogsService.js.map +1 -0
  13. package/dist/cjs/CloudWatchLogsServiceConfig.d.ts +25 -0
  14. package/dist/cjs/CloudWatchLogsServiceConfig.d.ts.map +1 -0
  15. package/dist/cjs/CloudWatchLogsServiceConfig.js +35 -0
  16. package/dist/cjs/CloudWatchLogsServiceConfig.js.map +1 -0
  17. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  18. package/dist/cjs/Errors.d.ts.map +1 -0
  19. package/dist/cjs/Errors.js +27 -0
  20. package/dist/cjs/Errors.js.map +1 -0
  21. package/dist/cjs/index.d.ts +39 -0
  22. package/dist/cjs/index.d.ts.map +1 -0
  23. package/dist/cjs/index.js +56 -0
  24. package/dist/cjs/index.js.map +1 -0
  25. package/dist/dts/CloudWatchLogsClientInstance.d.ts +24 -0
  26. package/dist/dts/CloudWatchLogsClientInstance.d.ts.map +1 -0
  27. package/dist/dts/CloudWatchLogsService.d.ts +397 -0
  28. package/dist/dts/CloudWatchLogsService.d.ts.map +1 -0
  29. package/dist/dts/CloudWatchLogsServiceConfig.d.ts +25 -0
  30. package/dist/dts/CloudWatchLogsServiceConfig.d.ts.map +1 -0
  31. package/dist/dts/Errors.d.ts +26 -0
  32. package/dist/dts/Errors.d.ts.map +1 -0
  33. package/dist/dts/index.d.ts +39 -0
  34. package/dist/dts/index.d.ts.map +1 -0
  35. package/dist/esm/CloudWatchLogsClientInstance.js +23 -0
  36. package/dist/esm/CloudWatchLogsClientInstance.js.map +1 -0
  37. package/dist/esm/CloudWatchLogsService.js +121 -0
  38. package/dist/esm/CloudWatchLogsService.js.map +1 -0
  39. package/dist/esm/CloudWatchLogsServiceConfig.js +31 -0
  40. package/dist/esm/CloudWatchLogsServiceConfig.js.map +1 -0
  41. package/dist/esm/Errors.js +24 -0
  42. package/dist/esm/Errors.js.map +1 -0
  43. package/dist/esm/index.js +27 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/package.json +4 -0
  46. package/package.json +60 -43
  47. package/src/CloudWatchLogsClientInstance.ts +33 -0
  48. package/src/CloudWatchLogsService.ts +1568 -0
  49. package/src/CloudWatchLogsServiceConfig.ts +52 -0
  50. package/src/Errors.ts +68 -0
  51. package/src/index.ts +44 -0
  52. package/CHANGELOG.md +0 -41
  53. package/docgen.json +0 -8
  54. package/lib/CloudWatchLogsClientInstance.d.ts +0 -31
  55. package/lib/CloudWatchLogsClientInstance.js +0 -57
  56. package/lib/CloudWatchLogsClientInstanceConfig.d.ts +0 -23
  57. package/lib/CloudWatchLogsClientInstanceConfig.js +0 -44
  58. package/lib/CloudWatchLogsService.js +0 -177
  59. package/lib/Errors.js +0 -27
  60. package/lib/esm/CloudWatchLogsClientInstance.js +0 -30
  61. package/lib/esm/CloudWatchLogsClientInstanceConfig.js +0 -40
  62. package/lib/esm/CloudWatchLogsService.js +0 -173
  63. package/lib/esm/Errors.js +0 -24
  64. package/lib/esm/index.js +0 -5
  65. package/lib/index.d.ts +0 -4
  66. package/lib/index.js +0 -21
  67. package/project.json +0 -77
  68. package/vitest.config.ts +0 -3
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AssociateKmsKeyCommand, CancelExportTaskCommand, CreateDeliveryCommand, CreateExportTaskCommand, CreateLogAnomalyDetectorCommand, CreateLogGroupCommand, CreateLogStreamCommand, DeleteAccountPolicyCommand, DeleteDataProtectionPolicyCommand, DeleteDeliveryCommand, DeleteDeliveryDestinationCommand, DeleteDeliveryDestinationPolicyCommand, DeleteDeliverySourceCommand, DeleteDestinationCommand, DeleteIndexPolicyCommand, DeleteIntegrationCommand, DeleteLogAnomalyDetectorCommand, DeleteLogGroupCommand, DeleteLogStreamCommand, DeleteMetricFilterCommand, DeleteQueryDefinitionCommand, DeleteResourcePolicyCommand, DeleteRetentionPolicyCommand, DeleteSubscriptionFilterCommand, DeleteTransformerCommand, DescribeAccountPoliciesCommand, DescribeConfigurationTemplatesCommand, DescribeDeliveriesCommand, DescribeDeliveryDestinationsCommand, DescribeDeliverySourcesCommand, DescribeDestinationsCommand, DescribeExportTasksCommand, DescribeFieldIndexesCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, DescribeLogStreamsCommand, DescribeMetricFiltersCommand, DescribeQueriesCommand, DescribeQueryDefinitionsCommand, DescribeResourcePoliciesCommand, DescribeSubscriptionFiltersCommand, DisassociateKmsKeyCommand, FilterLogEventsCommand, GetDataProtectionPolicyCommand, GetDeliveryCommand, GetDeliveryDestinationCommand, GetDeliveryDestinationPolicyCommand, GetDeliverySourceCommand, GetIntegrationCommand, GetLogAnomalyDetectorCommand, GetLogEventsCommand, GetLogGroupFieldsCommand, GetLogRecordCommand, GetQueryResultsCommand, GetTransformerCommand, ListAnomaliesCommand, ListIntegrationsCommand, ListLogAnomalyDetectorsCommand, ListLogGroupsForQueryCommand, ListTagsForResourceCommand, ListTagsLogGroupCommand, PutAccountPolicyCommand, PutDataProtectionPolicyCommand, PutDeliveryDestinationCommand, PutDeliveryDestinationPolicyCommand, PutDeliverySourceCommand, PutDestinationCommand, PutDestinationPolicyCommand, PutIndexPolicyCommand, PutIntegrationCommand, PutLogEventsCommand, PutMetricFilterCommand, PutQueryDefinitionCommand, PutResourcePolicyCommand, PutRetentionPolicyCommand, PutSubscriptionFilterCommand, PutTransformerCommand, StartLiveTailCommand, StartQueryCommand, StopQueryCommand, TagLogGroupCommand, TagResourceCommand, TestMetricFilterCommand, TestTransformerCommand, UntagLogGroupCommand, UntagResourceCommand, UpdateAnomalyCommand, UpdateDeliveryConfigurationCommand, UpdateLogAnomalyDetectorCommand, } from "@aws-sdk/client-cloudwatch-logs";
5
+ import { Service } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import * as Instance from "./CloudWatchLogsClientInstance.js";
8
+ import * as CloudWatchLogsServiceConfig from "./CloudWatchLogsServiceConfig.js";
9
+ import { AllServiceErrors } from "./Errors.js";
10
+ const commands = {
11
+ AssociateKmsKeyCommand,
12
+ CancelExportTaskCommand,
13
+ CreateDeliveryCommand,
14
+ CreateExportTaskCommand,
15
+ CreateLogAnomalyDetectorCommand,
16
+ CreateLogGroupCommand,
17
+ CreateLogStreamCommand,
18
+ DeleteAccountPolicyCommand,
19
+ DeleteDataProtectionPolicyCommand,
20
+ DeleteDeliveryCommand,
21
+ DeleteDeliveryDestinationCommand,
22
+ DeleteDeliveryDestinationPolicyCommand,
23
+ DeleteDeliverySourceCommand,
24
+ DeleteDestinationCommand,
25
+ DeleteIndexPolicyCommand,
26
+ DeleteIntegrationCommand,
27
+ DeleteLogAnomalyDetectorCommand,
28
+ DeleteLogGroupCommand,
29
+ DeleteLogStreamCommand,
30
+ DeleteMetricFilterCommand,
31
+ DeleteQueryDefinitionCommand,
32
+ DeleteResourcePolicyCommand,
33
+ DeleteRetentionPolicyCommand,
34
+ DeleteSubscriptionFilterCommand,
35
+ DeleteTransformerCommand,
36
+ DescribeAccountPoliciesCommand,
37
+ DescribeConfigurationTemplatesCommand,
38
+ DescribeDeliveriesCommand,
39
+ DescribeDeliveryDestinationsCommand,
40
+ DescribeDeliverySourcesCommand,
41
+ DescribeDestinationsCommand,
42
+ DescribeExportTasksCommand,
43
+ DescribeFieldIndexesCommand,
44
+ DescribeIndexPoliciesCommand,
45
+ DescribeLogGroupsCommand,
46
+ DescribeLogStreamsCommand,
47
+ DescribeMetricFiltersCommand,
48
+ DescribeQueriesCommand,
49
+ DescribeQueryDefinitionsCommand,
50
+ DescribeResourcePoliciesCommand,
51
+ DescribeSubscriptionFiltersCommand,
52
+ DisassociateKmsKeyCommand,
53
+ FilterLogEventsCommand,
54
+ GetDataProtectionPolicyCommand,
55
+ GetDeliveryCommand,
56
+ GetDeliveryDestinationCommand,
57
+ GetDeliveryDestinationPolicyCommand,
58
+ GetDeliverySourceCommand,
59
+ GetIntegrationCommand,
60
+ GetLogAnomalyDetectorCommand,
61
+ GetLogEventsCommand,
62
+ GetLogGroupFieldsCommand,
63
+ GetLogRecordCommand,
64
+ GetQueryResultsCommand,
65
+ GetTransformerCommand,
66
+ ListAnomaliesCommand,
67
+ ListIntegrationsCommand,
68
+ ListLogAnomalyDetectorsCommand,
69
+ ListLogGroupsForQueryCommand,
70
+ ListTagsForResourceCommand,
71
+ ListTagsLogGroupCommand,
72
+ PutAccountPolicyCommand,
73
+ PutDataProtectionPolicyCommand,
74
+ PutDeliveryDestinationCommand,
75
+ PutDeliveryDestinationPolicyCommand,
76
+ PutDeliverySourceCommand,
77
+ PutDestinationCommand,
78
+ PutDestinationPolicyCommand,
79
+ PutIndexPolicyCommand,
80
+ PutIntegrationCommand,
81
+ PutLogEventsCommand,
82
+ PutMetricFilterCommand,
83
+ PutQueryDefinitionCommand,
84
+ PutResourcePolicyCommand,
85
+ PutRetentionPolicyCommand,
86
+ PutSubscriptionFilterCommand,
87
+ PutTransformerCommand,
88
+ StartLiveTailCommand,
89
+ StartQueryCommand,
90
+ StopQueryCommand,
91
+ TagLogGroupCommand,
92
+ TagResourceCommand,
93
+ TestMetricFilterCommand,
94
+ TestTransformerCommand,
95
+ UntagLogGroupCommand,
96
+ UntagResourceCommand,
97
+ UpdateAnomalyCommand,
98
+ UpdateDeliveryConfigurationCommand,
99
+ UpdateLogAnomalyDetectorCommand,
100
+ };
101
+ /**
102
+ * @since 1.0.0
103
+ * @category constructors
104
+ */
105
+ export const makeCloudWatchLogsService = Effect.gen(function* () {
106
+ const client = yield* Instance.CloudWatchLogsClientInstance;
107
+ return Service.fromClientAndCommands(client, commands, {
108
+ errorTags: AllServiceErrors,
109
+ resolveClientConfig: CloudWatchLogsServiceConfig.toCloudWatchLogsClientConfig,
110
+ });
111
+ });
112
+ /**
113
+ * @since 1.0.0
114
+ * @category models
115
+ */
116
+ export class CloudWatchLogsService extends Effect.Tag("@effect-aws/client-cloudwatch-logs/CloudWatchLogsService")() {
117
+ static defaultLayer = Layer.effect(this, makeCloudWatchLogsService).pipe(Layer.provide(Instance.layer));
118
+ static layer = (config) => Layer.effect(this, makeCloudWatchLogsService).pipe(Layer.provide(Instance.layer), Layer.provide(CloudWatchLogsServiceConfig.setCloudWatchLogsServiceConfig(config)));
119
+ static baseLayer = (evaluate) => Layer.effect(this, makeCloudWatchLogsService).pipe(Layer.provide(Layer.effect(Instance.CloudWatchLogsClientInstance, Effect.map(CloudWatchLogsServiceConfig.toCloudWatchLogsClientConfig, evaluate))));
120
+ }
121
+ //# sourceMappingURL=CloudWatchLogsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudWatchLogsService.js","sourceRoot":"","sources":["../../src/CloudWatchLogsService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,sBAAsB,EAGtB,uBAAuB,EAKvB,qBAAqB,EAGrB,uBAAuB,EAGvB,+BAA+B,EAG/B,qBAAqB,EAGrB,sBAAsB,EAGtB,0BAA0B,EAG1B,iCAAiC,EAGjC,qBAAqB,EAGrB,gCAAgC,EAGhC,sCAAsC,EAGtC,2BAA2B,EAG3B,wBAAwB,EAGxB,wBAAwB,EAGxB,wBAAwB,EAGxB,+BAA+B,EAG/B,qBAAqB,EAGrB,sBAAsB,EAG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AyB,CAAC,CAAC,IAAI,CAChD,KAAK,CAAC,OAAO,CACX,KAAK,CAAC,MAAM,CACV,QAAQ,CAAC,4BAA4B,EACrC,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAC/E,CACF,CACF,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ServiceLogger } from "@effect-aws/commons";
2
+ import { Effect, FiberRef, Layer } from "effect";
3
+ import { dual } from "effect/Function";
4
+ import { globalValue } from "effect/GlobalValue";
5
+ /**
6
+ * @since 1.0.0
7
+ * @category cloudwatch-logs service config
8
+ */
9
+ const currentCloudWatchLogsServiceConfig = globalValue("@effect-aws/client-cloudwatch-logs/currentCloudWatchLogsServiceConfig", () => FiberRef.unsafeMake({}));
10
+ /**
11
+ * @since 1.0.0
12
+ * @category cloudwatch-logs service config
13
+ */
14
+ export const withCloudWatchLogsServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentCloudWatchLogsServiceConfig, config));
15
+ /**
16
+ * @since 1.0.0
17
+ * @category cloudwatch-logs service config
18
+ */
19
+ export const setCloudWatchLogsServiceConfig = (config) => Layer.locallyScoped(currentCloudWatchLogsServiceConfig, config);
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export const toCloudWatchLogsClientConfig = Effect.gen(function* () {
25
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentCloudWatchLogsServiceConfig);
26
+ const logger = serviceLogger === true
27
+ ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
28
+ : (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
29
+ return { logger, ...config };
30
+ });
31
+ //# sourceMappingURL=CloudWatchLogsServiceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudWatchLogsServiceConfig.js","sourceRoot":"","sources":["../../src/CloudWatchLogsServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAA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AAM,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
2
+ export const AllServiceErrors = [
3
+ "AccessDeniedException",
4
+ "ConflictException",
5
+ "DataAlreadyAcceptedException",
6
+ "InvalidOperationException",
7
+ "InvalidParameterException",
8
+ "InvalidSequenceTokenException",
9
+ "LimitExceededException",
10
+ "MalformedQueryException",
11
+ "OperationAbortedException",
12
+ "ResourceAlreadyExistsException",
13
+ "ResourceNotFoundException",
14
+ "ServiceQuotaExceededException",
15
+ "ServiceUnavailableException",
16
+ "SessionStreamingException",
17
+ "SessionTimeoutException",
18
+ "ThrottlingException",
19
+ "TooManyTagsException",
20
+ "UnrecognizedClientException",
21
+ "ValidationException",
22
+ ];
23
+ export const SdkError = CommonSdkError;
24
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,mBAAmB;IACnB,8BAA8B;IAC9B,2BAA2B;IAC3B,2BAA2B;IAC3B,+BAA+B;IAC/B,wBAAwB;IACxB,yBAAyB;IACzB,2BAA2B;IAC3B,gCAAgC;IAChC,2BAA2B;IAC3B,+BAA+B;IAC/B,6BAA6B;IAC7B,2BAA2B;IAC3B,yBAAyB;IACzB,qBAAqB;IACrB,sBAAsB;IACtB,6BAA6B;IAC7B,qBAAqB;CACb,CAAC;AAuBX,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { CloudWatchLogsService } from "./CloudWatchLogsService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as CloudWatchLogsClientInstance from "./CloudWatchLogsClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as CloudWatchLogsServiceConfig from "./CloudWatchLogsServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./CloudWatchLogsService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias CloudWatchLogsService
25
+ */
26
+ export const CloudWatchLogs = CloudWatchLogsService;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,4BAA4B,MAAM,mCAAmC,CAAC;AAElF;;GAEG;AACH,OAAO,KAAK,2BAA2B,MAAM,kCAAkC,CAAC;AAEhF;;GAEG;AACH,cAAc,4BAA4B,CAAC;AAe3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": []
4
+ }
package/package.json CHANGED
@@ -1,54 +1,71 @@
1
1
  {
2
2
  "name": "@effect-aws/client-cloudwatch-logs",
3
+ "version": "1.9.3",
4
+ "description": "Effectful AWS CloudWatch Logs client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-cloudwatch-logs"
10
+ },
11
+ "sideEffects": [],
3
12
  "author": {
4
13
  "name": "Victor Korzunin",
5
- "email": "ifloydrose@gmail.com",
6
- "organization": false
14
+ "email": "ifloydrose@gmail.com"
7
15
  },
8
- "devDependencies": {
9
- "@types/node": "^18",
10
- "@typescript-eslint/eslint-plugin": "^7",
11
- "@typescript-eslint/parser": "^7",
12
- "aws-sdk-client-mock": "^4.0.2",
13
- "aws-sdk-client-mock-vitest": "^4.0.0",
14
- "effect": "3.0.0",
15
- "eslint": "^8",
16
- "eslint-config-prettier": "^9.1.0",
17
- "eslint-import-resolver-typescript": "^3.6.1",
18
- "eslint-plugin-import": "^2.29.1",
19
- "eslint-plugin-prettier": "^5.2.1",
20
- "prettier": "^3.2.5",
21
- "typescript": "^5.4.2",
22
- "vitest": "^2.0.5"
16
+ "homepage": "https://floydspace.github.io/effect-aws/docs/client-cloudwatch-logs",
17
+ "dependencies": {
18
+ "@aws-sdk/client-cloudwatch-logs": "^3",
19
+ "@effect-aws/commons": "^0.2.0"
23
20
  },
24
21
  "peerDependencies": {
25
- "effect": ">=3.0.0 <4.0.0"
22
+ "effect": ">=3.0.4 <4.0.0"
26
23
  },
27
- "dependencies": {
28
- "@aws-sdk/client-cloudwatch-logs": "^3"
29
- },
30
- "main": "lib/index.js",
31
- "license": "MIT",
32
- "homepage": "https://floydspace.github.io/effect-aws",
33
- "publishConfig": {
34
- "access": "public"
24
+ "main": "./dist/cjs/index.js",
25
+ "module": "./dist/esm/index.js",
26
+ "types": "./dist/dts/index.d.ts",
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ ".": {
30
+ "types": "./dist/dts/index.d.ts",
31
+ "import": "./dist/esm/index.js",
32
+ "default": "./dist/cjs/index.js"
33
+ },
34
+ "./CloudWatchLogsClientInstance": {
35
+ "types": "./dist/dts/CloudWatchLogsClientInstance.d.ts",
36
+ "import": "./dist/esm/CloudWatchLogsClientInstance.js",
37
+ "default": "./dist/cjs/CloudWatchLogsClientInstance.js"
38
+ },
39
+ "./CloudWatchLogsService": {
40
+ "types": "./dist/dts/CloudWatchLogsService.d.ts",
41
+ "import": "./dist/esm/CloudWatchLogsService.js",
42
+ "default": "./dist/cjs/CloudWatchLogsService.js"
43
+ },
44
+ "./CloudWatchLogsServiceConfig": {
45
+ "types": "./dist/dts/CloudWatchLogsServiceConfig.d.ts",
46
+ "import": "./dist/esm/CloudWatchLogsServiceConfig.js",
47
+ "default": "./dist/cjs/CloudWatchLogsServiceConfig.js"
48
+ },
49
+ "./Errors": {
50
+ "types": "./dist/dts/Errors.d.ts",
51
+ "import": "./dist/esm/Errors.js",
52
+ "default": "./dist/cjs/Errors.js"
53
+ }
35
54
  },
36
- "version": "1.3.0",
37
- "types": "lib/index.d.ts",
38
- "module": "lib/esm/index.js",
39
- "sideEffects": [],
40
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
41
- "scripts": {
42
- "build": "npx projen build",
43
- "compile": "npx projen compile",
44
- "default": "npx projen default",
45
- "eslint": "npx projen eslint",
46
- "package": "npx projen package",
47
- "post-compile": "npx projen post-compile",
48
- "pre-compile": "npx projen pre-compile",
49
- "test": "npx projen test",
50
- "test:watch": "npx projen test:watch",
51
- "watch": "npx projen watch",
52
- "docgen": "docgen"
55
+ "typesVersions": {
56
+ "*": {
57
+ "CloudWatchLogsClientInstance": [
58
+ "./dist/dts/CloudWatchLogsClientInstance.d.ts"
59
+ ],
60
+ "CloudWatchLogsService": [
61
+ "./dist/dts/CloudWatchLogsService.d.ts"
62
+ ],
63
+ "CloudWatchLogsServiceConfig": [
64
+ "./dist/dts/CloudWatchLogsServiceConfig.d.ts"
65
+ ],
66
+ "Errors": [
67
+ "./dist/dts/Errors.d.ts"
68
+ ]
69
+ }
53
70
  }
54
71
  }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { CloudWatchLogsClient } from "@aws-sdk/client-cloudwatch-logs";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as CloudWatchLogsServiceConfig from "./CloudWatchLogsServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class CloudWatchLogsClientInstance extends Context.Tag(
13
+ "@effect-aws/client-cloudwatch-logs/CloudWatchLogsClientInstance",
14
+ )<CloudWatchLogsClientInstance, CloudWatchLogsClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ CloudWatchLogsServiceConfig.toCloudWatchLogsClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new CloudWatchLogsClient(config)),
25
+ (client) => Effect.sync(() => client.destroy()),
26
+ ),
27
+ );
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category layers
32
+ */
33
+ export const layer = Layer.scoped(CloudWatchLogsClientInstance, make);