Skip to content

Commit 4e2459b

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 969b10b commit 4e2459b

28 files changed

+69
-50
lines changed

.projenrc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,7 @@ toolkitLib.postCompileTask.exec('node build-tools/bundle.mjs');
12701270
toolkitLib.postCompileTask.exec('node ./lib/index.js >/dev/null 2>/dev/null </dev/null');
12711271
toolkitLib.postCompileTask.exec('node ./lib/api/aws-cdk.js >/dev/null 2>/dev/null </dev/null');
12721272
toolkitLib.postCompileTask.exec('node ./lib/api/shared-public.js >/dev/null 2>/dev/null </dev/null');
1273+
toolkitLib.postCompileTask.exec('node ./lib/api/shared-private.js >/dev/null 2>/dev/null </dev/null');
12731274
toolkitLib.postCompileTask.exec('node ./lib/private/util.js >/dev/null 2>/dev/null </dev/null');
12741275

12751276
// Do include all .ts files inside init-templates

packages/@aws-cdk/toolkit-lib/.projen/tasks.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/toolkit-lib/lib/actions/bootstrap/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type * as cxapi from '@aws-cdk/cx-api';
22
import { environmentsFromDescriptors } from './private';
33
import type { Tag } from '../../api/aws-cdk';
4-
import type { ICloudAssemblySource, IIoHost } from '../../api/cloud-assembly';
4+
import type { ICloudAssemblySource } from '../../api/cloud-assembly';
55
import { ALL_STACKS } from '../../api/cloud-assembly/private';
6+
import type { IIoHost } from '../../api/io';
67
import { asIoHelper } from '../../api/shared-private';
78
import { assemblyFromSource } from '../../toolkit/private';
89

packages/@aws-cdk/toolkit-lib/lib/api/aws-cdk.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ export { CloudWatchLogEventMonitor, findCloudWatchLogGroups } from '../../../../
1212
export { type WorkGraph, WorkGraphBuilder, AssetBuildNode, AssetPublishNode, StackNode, Concurrency } from '../../../../aws-cdk/lib/api/work-graph';
1313
export { Bootstrapper } from '../../../../aws-cdk/lib/api/bootstrap';
1414
export { loadTree, some } from '../../../../aws-cdk/lib/api/tree';
15+
export { RWLock, type ILock } from '../../../../aws-cdk/lib/api/rwlock';
16+
export { HotswapMode, HotswapPropertyOverrides, EcsHotswapProperties } from '../../../../aws-cdk/lib/api/hotswap';
1517

1618
// Context Providers
1719
export * as contextproviders from '../../../../aws-cdk/lib/context-providers';
1820

19-
// @todo APIs not clean import
20-
export { HotswapMode } from '../../../../aws-cdk/lib/api/hotswap';
21-
export { HotswapPropertyOverrides, EcsHotswapProperties } from '../../../../aws-cdk/lib/api/hotswap';
22-
export { RWLock, type ILock } from '../../../../aws-cdk/lib/api/util/rwlock';
23-
2421
// @todo Cloud Assembly and Executable - this is a messy API right now
2522
export { CloudAssembly, sanitizePatterns, StackCollection, ExtendedStackSelection } from '../../../../aws-cdk/lib/api/cxapp/cloud-assembly';
26-
export { prepareDefaultEnvironment, prepareContext, spaceAvailableForContext } from '../../../../aws-cdk/lib/api/cxapp/exec';
27-
export { guessExecutable } from '../../../../aws-cdk/lib/api/cxapp/exec';
23+
export { guessExecutable, prepareDefaultEnvironment, prepareContext, spaceAvailableForContext } from '../../../../aws-cdk/lib/api/cxapp/exec';
2824

2925
// @todo Should not use! investigate how to replace
3026
export { versionNumber } from '../../../../aws-cdk/lib/cli/version';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from '../../api/shared-public';
1+
export { StackSelectionStrategy, StackSelector } from '../../api/shared-public';
22
export * from './source-builder';
33
export * from './types';
44

packages/@aws-cdk/toolkit-lib/lib/api/shared-private.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
export * from '../../../tmp-toolkit-helpers/src/api/io/private';
44
export * from '../../../tmp-toolkit-helpers/src/private';
5+
export * from '../../../tmp-toolkit-helpers/src/api';
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
/* eslint-disable import/no-restricted-paths */
22

3-
export * from '../../../tmp-toolkit-helpers/src/api';
3+
export {
4+
ToolkitError,
5+
AuthenticationError,
6+
AssemblyError,
7+
ExpandStackSelection,
8+
StackSelectionStrategy,
9+
} from '../../../tmp-toolkit-helpers/src/api';
10+
11+
export type {
12+
IoMessageLevel,
13+
IoMessageCode,
14+
IIoHost,
15+
IoMessage,
16+
IoRequest,
17+
ToolkitAction,
18+
StackSelector,
19+
} from '../../../tmp-toolkit-helpers/src/api';
420

521
export * from '../../../tmp-toolkit-helpers/src/payloads';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './toolkit';
22
export * from './non-interactive-io-host';
3-
export * from '../api/shared-public';

packages/@aws-cdk/toolkit-lib/lib/toolkit/non-interactive-io-host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as chalk from 'chalk';
2+
import type { IIoHost, IoMessage, IoMessageLevel, IoRequest } from '../api/io';
23
import type { IActivityPrinter } from '../api/shared-private';
34
import { HistoryActivityPrinter, isMessageRelevantForLevel } from '../api/shared-private';
4-
import type { IIoHost, IoMessage, IoMessageLevel, IoRequest } from '../api/shared-public';
55
import { isCI, isTTY } from '../util/shell-env';
66

77
export interface NonInteractiveIoHostProps {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ import { ALL_STACKS, CloudAssemblySourceBuilder, IdentityCloudAssemblySource } f
3030
import type { IIoHost, IoMessageLevel } from '../api/io';
3131
import { IO, SPAN, asSdkLogger, withoutColor, withoutEmojis, withTrimmedWhitespace } from '../api/io/private';
3232
import type { IoHelper } from '../api/shared-private';
33-
import { asIoHelper } from '../api/shared-private';
34-
import type { AssemblyData, StackDetails, ToolkitAction } from '../api/shared-public';
35-
import { DiffFormatter, RequireApproval, ToolkitError, removeNonImportResources } from '../api/shared-public';
33+
import { asIoHelper, DiffFormatter, RequireApproval, ToolkitError, removeNonImportResources } from '../api/shared-private';
34+
import type { ToolkitAction, AssemblyData, StackDetails } from '../api/shared-public';
3635
import { obscureTemplate, serializeStructure, validateSnsTopicArn, formatTime, formatErrorMessage, deserializeStructure } from '../private/util';
3736
import { pLimit } from '../util/concurrency';
3837
import { promiseWithResolvers } from '../util/promises';

0 commit comments

Comments
 (0)