Skip to content

Commit cd1c95f

Browse files
committed
toolkit-lib shenannigans
1 parent c9dec4e commit cd1c95f

File tree

12 files changed

+37
-13
lines changed

12 files changed

+37
-13
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

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: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
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+
PermissionChangeType,
8+
ExpandStackSelection,
9+
StackSelectionStrategy,
10+
} from '../../../tmp-toolkit-helpers/src/api';
11+
12+
export type {
13+
IoMessageLevel,
14+
IoMessageCode,
15+
IIoHost,
16+
IoMessage,
17+
IoRequest,
18+
ToolkitAction,
19+
StackSelector,
20+
} from '../../../tmp-toolkit-helpers/src/api';
21+
22+
export type * from '../../../tmp-toolkit-helpers/src/api/io/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';

packages/@aws-cdk/toolkit-lib/test/_helpers/test-io-host.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { IIoHost, IoMessage, IoMessageLevel, IoRequest } from '../../lib/api/io';
2-
import { asIoHelper, isMessageRelevantForLevel, type IoHelper } from '../../lib/api/shared-private';
3-
import { RequireApproval } from '../../lib/toolkit';
2+
import { asIoHelper, isMessageRelevantForLevel, RequireApproval, type IoHelper } from '../../lib/api/shared-private';
43

54
/**
65
* A test implementation of IIoHost that does nothing but can be spied on.

0 commit comments

Comments
 (0)