Skip to content

Commit eb8104f

Browse files
committed
refactor(cli): rename logs to logs-monitor
We are about to move this module into a different package, and the target package is gitignoring any directory called `logs`. We could just fix the gitignore, but the module name is very inacurate anyway. Therefore we are renaming it. Also moves `rwlock` from `api/utils` to `api`. This was an oversight and doesn't warrant a separate PR. Finally moves some test files into their correct corresponding directories.
1 parent 98c0c78 commit eb8104f

File tree

15 files changed

+32
-30
lines changed

15 files changed

+32
-30
lines changed

packages/aws-cdk/lib/api/cxapp/exec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import { PROJECT_CONFIG, USER_DEFAULTS } from '../../cli/user-configuration';
1414
import { versionNumber } from '../../cli/version';
1515
import { splitBySize } from '../../util';
1616
import type { SdkProvider } from '../aws-auth';
17+
import type { ILock } from '../rwlock';
18+
import { RWLock } from '../rwlock';
1719
import type { Settings } from '../settings';
18-
import type { ILock } from '../util/rwlock';
19-
import { RWLock } from '../util/rwlock';
2020

2121
export interface ExecProgramResult {
2222
readonly assembly: cxapi.CloudAssembly;

packages/aws-cdk/lib/api/logs/find-cloudwatch-logs.ts renamed to packages/aws-cdk/lib/api/logs-monitor/find-cloudwatch-logs.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { promises as fs } from 'fs';
22
import * as path from 'path';
3-
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
3+
import { ToolkitError } from '../../../@aws-cdk/tmp-toolkit-helpers/src/api';
44

55
/**
66
* A single-writer/multi-reader lock on a directory

packages/aws-cdk/lib/cli/cdk-toolkit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import type { DeploymentMethod, SuccessfulDeployStackResult, Deployments } from
2929
import { createDiffChangeSet } from '../api/deployments/cfn-api';
3030
import { GarbageCollector } from '../api/garbage-collection/garbage-collector';
3131
import { HotswapMode, HotswapPropertyOverrides, EcsHotswapProperties } from '../api/hotswap/common';
32-
import { findCloudWatchLogGroups } from '../api/logs/find-cloudwatch-logs';
33-
import { CloudWatchLogEventMonitor } from '../api/logs/logs-monitor';
32+
import { findCloudWatchLogGroups } from '../api/logs-monitor/find-cloudwatch-logs';
33+
import { CloudWatchLogEventMonitor } from '../api/logs-monitor/logs-monitor';
3434
import { ResourceImporter, removeNonImportResources, ResourceMigrator } from '../api/resource-import';
3535
import { tagsForStack, type Tag } from '../api/tags';
3636
import type { AssetBuildNode, AssetPublishNode, Concurrency, StackNode, WorkGraph } from '../api/work-graph';

packages/aws-cdk/lib/cli/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import type { DeploymentMethod } from '../api/deployments';
2525
import { Deployments } from '../api/deployments';
2626
import { HotswapMode } from '../api/hotswap/common';
2727
import { PluginHost } from '../api/plugin';
28+
import type { ILock } from '../api/rwlock';
2829
import type { Settings } from '../api/settings';
2930
import { ToolkitInfo } from '../api/toolkit-info';
30-
import type { ILock } from '../api/util/rwlock';
3131
import { contextHandler as context } from '../commands/context';
3232
import { docs } from '../commands/docs';
3333
import { doctor } from '../commands/doctor';

packages/aws-cdk/test/api/evaluate-cloudformation-template.test.ts renamed to packages/aws-cdk/test/api/cloudformation/evaluate-cloudformation-template.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
CfnEvaluationException,
44
EvaluateCloudFormationTemplate,
55
Template,
6-
} from '../../lib/api/cloudformation';
7-
import { MockSdk, mockCloudFormationClient, restoreSdkMocksToDefault } from '../_helpers/mock-sdk';
6+
} from '../../../lib/api/cloudformation';
7+
import { MockSdk, mockCloudFormationClient, restoreSdkMocksToDefault } from '../../_helpers/mock-sdk';
88

99
const sdk = new MockSdk();
1010

packages/aws-cdk/test/api/lazy-list-stack-resources.test.ts renamed to packages/aws-cdk/test/api/cloudformation/lazy-list-stack-resources.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'aws-sdk-client-mock-jest';
22

33
import { ListStackResourcesCommand } from '@aws-sdk/client-cloudformation';
4-
import { LazyListStackResources } from '../../lib/api/cloudformation';
5-
import { MockSdk, mockCloudFormationClient } from '../_helpers/mock-sdk';
4+
import { LazyListStackResources } from '../../../lib/api/cloudformation';
5+
import { MockSdk, mockCloudFormationClient } from '../../_helpers/mock-sdk';
66

77
describe('Lazy ListStackResources', () => {
88
test('correctly caches calls to the CloudFormation API', async () => {

packages/aws-cdk/test/api/lazy-lookup-export.test.ts renamed to packages/aws-cdk/test/api/cloudformation/lazy-lookup-export.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ListExportsCommand } from '@aws-sdk/client-cloudformation';
2-
import { LazyLookupExport } from '../../lib/api/cloudformation';
3-
import { MockSdk, mockCloudFormationClient, restoreSdkMocksToDefault } from '../_helpers/mock-sdk';
2+
import { LazyLookupExport } from '../../../lib/api/cloudformation';
3+
import { MockSdk, mockCloudFormationClient, restoreSdkMocksToDefault } from '../../_helpers/mock-sdk';
44

55
describe('LazyLookupExport', () => {
66
const mockSdk = new MockSdk();

0 commit comments

Comments
 (0)