agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

40
cdk/node_modules/aws-cdk/lib/commands/context.d.ts generated vendored Normal file
View File

@@ -0,0 +1,40 @@
import type { Context } from '../api/context';
import type { IoHelper } from '../api-private';
/**
* Options for the context command
*/
export interface ContextOptions {
/**
* The context object sourced from all context locations
*/
readonly context: Context;
/**
* The context key (or its index) to reset
*
* @default undefined
*/
readonly reset?: string;
/**
* Ignore missing key error
*
* @default false
*/
readonly force?: boolean;
/**
* Clear all context
*
* @default false
*/
readonly clear?: boolean;
/**
* Use JSON output instead of YAML when templates are printed to STDOUT
*
* @default false
*/
readonly json?: boolean;
/**
* IoHelper for messaging.
*/
readonly ioHelper: IoHelper;
}
export declare function contextHandler(options: ContextOptions): Promise<number>;

158
cdk/node_modules/aws-cdk/lib/commands/context.js generated vendored Normal file

File diff suppressed because one or more lines are too long

13
cdk/node_modules/aws-cdk/lib/commands/deploy.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* Supported display modes for stack deployment activity
*/
export declare enum StackActivityProgress {
/**
* Displays a progress bar with only the events for the resource currently being deployed
*/
BAR = "bar",
/**
* Displays complete history with all CloudFormation stack events
*/
EVENTS = "events"
}

18
cdk/node_modules/aws-cdk/lib/commands/deploy.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StackActivityProgress = void 0;
/**
* Supported display modes for stack deployment activity
*/
var StackActivityProgress;
(function (StackActivityProgress) {
/**
* Displays a progress bar with only the events for the resource currently being deployed
*/
StackActivityProgress["BAR"] = "bar";
/**
* Displays complete history with all CloudFormation stack events
*/
StackActivityProgress["EVENTS"] = "events";
})(StackActivityProgress || (exports.StackActivityProgress = StackActivityProgress = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVwbG95LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOztHQUVHO0FBQ0gsSUFBWSxxQkFVWDtBQVZELFdBQVkscUJBQXFCO0lBQy9COztPQUVHO0lBQ0gsb0NBQVcsQ0FBQTtJQUVYOztPQUVHO0lBQ0gsMENBQWlCLENBQUE7QUFDbkIsQ0FBQyxFQVZXLHFCQUFxQixxQ0FBckIscUJBQXFCLFFBVWhDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBTdXBwb3J0ZWQgZGlzcGxheSBtb2RlcyBmb3Igc3RhY2sgZGVwbG95bWVudCBhY3Rpdml0eVxuICovXG5leHBvcnQgZW51bSBTdGFja0FjdGl2aXR5UHJvZ3Jlc3Mge1xuICAvKipcbiAgICogRGlzcGxheXMgYSBwcm9ncmVzcyBiYXIgd2l0aCBvbmx5IHRoZSBldmVudHMgZm9yIHRoZSByZXNvdXJjZSBjdXJyZW50bHkgYmVpbmcgZGVwbG95ZWRcbiAgICovXG4gIEJBUiA9ICdiYXInLFxuXG4gIC8qKlxuICAgKiBEaXNwbGF5cyBjb21wbGV0ZSBoaXN0b3J5IHdpdGggYWxsIENsb3VkRm9ybWF0aW9uIHN0YWNrIGV2ZW50c1xuICAgKi9cbiAgRVZFTlRTID0gJ2V2ZW50cycsXG59XG4iXX0=

18
cdk/node_modules/aws-cdk/lib/commands/docs.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import type { IoHelper } from '../api-private';
export declare const command = "docs";
export declare const describe = "Opens the reference documentation in a browser";
export declare const aliases: string[];
/**
* Options for the docs command
*/
export interface DocsOptions {
/**
* The command to use to open the browser
*/
readonly browser: string;
/**
* IoHelper for messaging
*/
readonly ioHelper: IoHelper;
}
export declare function docs(options: DocsOptions): Promise<number>;

33
cdk/node_modules/aws-cdk/lib/commands/docs.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aliases = exports.describe = exports.command = void 0;
exports.docs = docs;
const childProcess = require("child_process");
const node_util_1 = require("node:util");
const chalk = require("chalk");
exports.command = 'docs';
exports.describe = 'Opens the reference documentation in a browser';
exports.aliases = ['doc'];
async function docs(options) {
const ioHelper = options.ioHelper;
const url = 'https://docs.aws.amazon.com/cdk/api/v2/';
await ioHelper.defaults.info(chalk.green(url));
const browserCommand = (options.browser).replace(/%u/g, url);
await ioHelper.defaults.debug(`Opening documentation ${chalk.green(browserCommand)}`);
const exec = (0, node_util_1.promisify)(childProcess.exec);
try {
const { stdout, stderr } = await exec(browserCommand);
if (stdout) {
await ioHelper.defaults.debug(stdout);
}
if (stderr) {
await ioHelper.defaults.warn(stderr);
}
}
catch (err) {
const e = err;
await ioHelper.defaults.debug(`An error occurred when trying to open a browser: ${e.stack || e.message}`);
}
return 0;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRvY3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBd0JBLG9CQXVCQztBQS9DRCw4Q0FBOEM7QUFDOUMseUNBQXNDO0FBQ3RDLCtCQUErQjtBQUdsQixRQUFBLE9BQU8sR0FBRyxNQUFNLENBQUM7QUFDakIsUUFBQSxRQUFRLEdBQUcsZ0RBQWdELENBQUM7QUFDNUQsUUFBQSxPQUFPLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQWlCeEIsS0FBSyxVQUFVLElBQUksQ0FBQyxPQUFvQjtJQUM3QyxNQUFNLFFBQVEsR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDO0lBQ2xDLE1BQU0sR0FBRyxHQUFHLHlDQUF5QyxDQUFDO0lBQ3RELE1BQU0sUUFBUSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEtBQUssQ0F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k7XG4gIGF3YWl0IGlvSGVscGVyLmRlZmF1bHRzLmRlYnVnKGBPcGVuaW5nIGRvY3VtZW50YXRpb24gJHtjaGFsay5ncmVlbihicm93c2VyQ29tbWFuZCl9YCk7XG5cbiAgY29uc3QgZXhlYyA9IHByb21pc2lmeShjaGlsZFByb2Nlc3MuZXhlYyk7XG5cbiAgdHJ5IHtcbiAgICBjb25zdCB7IHN0ZG91dCwgc3RkZXJyIH0gPSBhd2FpdCBleGVjKGJyb3dzZXJDb21tYW5kKTtcbiAgICBpZiAoc3Rkb3V0KSB7XG4gICAgICBhd2FpdCBpb0hlbHBlci5kZWZhdWx0cy5kZWJ1ZyhzdGRvdXQpO1xuICAgIH1cbiAgICBpZiAoc3RkZXJyKSB7XG4gICAgICBhd2FpdCBpb0hlbHBlci5kZWZhdWx0cy53YXJuKHN0ZGVycik7XG4gICAgfVxuICB9IGNhdGNoIChlcnI6IHVua25vd24pIHtcbiAgICBjb25zdCBlID0gZXJyIGFzIGNoaWxkUHJvY2Vzcy5FeGVjRXhjZXB0aW9uO1xuICAgIGF3YWl0IGlvSGVscGVyLmRlZmF1bHRzLmRlYnVnKGBBbiBlcnJvciBvY2N1cnJlZCB3aGVuIHRyeWluZyB0byBvcGVuIGEgYnJvd3NlcjogJHtlLnN0YWNrIHx8IGUubWVzc2FnZX1gKTtcbiAgfVxuXG4gIHJldHVybiAwO1xufVxuIl19

4
cdk/node_modules/aws-cdk/lib/commands/doctor.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import type { IoHelper } from '../api-private';
export declare function doctor({ ioHelper }: {
ioHelper: IoHelper;
}): Promise<number>;

69
cdk/node_modules/aws-cdk/lib/commands/doctor.js generated vendored Normal file

File diff suppressed because one or more lines are too long

13
cdk/node_modules/aws-cdk/lib/commands/flags/flags.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import type { FeatureFlag, Toolkit } from '@aws-cdk/toolkit-lib';
import type { FlagOperationsParams } from './types';
import type { IoHelper } from '../../api-private';
export declare class FlagCommandHandler {
private readonly flags;
private readonly router;
private readonly options;
private readonly ioHelper;
/** Main component that sets up all flag operation components */
constructor(flagData: FeatureFlag[], ioHelper: IoHelper, options: FlagOperationsParams, toolkit: Toolkit, cliContextValues?: Record<string, any>);
/** Main entry point that processes the flags command */
processFlagsCommand(): Promise<void>;
}

30
cdk/node_modules/aws-cdk/lib/commands/flags/flags.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlagCommandHandler = void 0;
const interactive_handler_1 = require("./interactive-handler");
const obsolete_flags_1 = require("./obsolete-flags");
const operations_1 = require("./operations");
const router_1 = require("./router");
const validator_1 = require("./validator");
class FlagCommandHandler {
/** Main component that sets up all flag operation components */
constructor(flagData, ioHelper, options, toolkit, cliContextValues = {}) {
this.flags = flagData.filter(flag => !obsolete_flags_1.OBSOLETE_FLAGS.includes(flag.name));
this.options = { ...options, concurrency: options.concurrency ?? 4 };
this.ioHelper = ioHelper;
const validator = new validator_1.FlagValidator(ioHelper);
const flagOperations = new operations_1.FlagOperations(this.flags, toolkit, ioHelper, cliContextValues);
const interactiveHandler = new interactive_handler_1.InteractiveHandler(this.flags, flagOperations);
this.router = new router_1.FlagOperationRouter(validator, interactiveHandler, flagOperations);
}
/** Main entry point that processes the flags command */
async processFlagsCommand() {
if (this.flags.length === 0) {
await this.ioHelper.defaults.error('The \'cdk flags\' command is not compatible with the AWS CDK library used by your application. Please upgrade to 2.212.0 or above.');
return;
}
await this.router.route(this.options);
}
}
exports.FlagCommandHandler = FlagCommandHandler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmbGFncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSwrREFBMkQ7QUFDM0QscURBQWtEO0FBQ2xELDZDQUE4QztBQUM5QyxxQ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1xuICB9XG5cbiAgLyoqIE1haW4gZW50cnkgcG9pbnQgdGhhdCBwcm9jZXNzZXMgdGhlIGZsYWdzIGNvbW1hbmQgKi9cbiAgYXN5bmMgcHJvY2Vzc0ZsYWdzQ29tbWFuZCgpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICBpZiAodGhpcy5mbGFncy5sZW5ndGggPT09IDApIHtcbiAgICAgIGF3YWl0IHRoaXMuaW9IZWxwZXIuZGVmYXVsdHMuZXJyb3IoJ1RoZSBcXCdjZGsgZmxhZ3NcXCcgY29tbWFuZCBpcyBub3QgY29tcGF0aWJsZSB3aXRoIHRoZSBBV1MgQ0RLIGxpYnJhcnkgdXNlZCBieSB5b3VyIGFwcGxpY2F0aW9uLiBQbGVhc2UgdXBncmFkZSB0byAyLjIxMi4wIG9yIGFib3ZlLicpO1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGF3YWl0IHRoaXMucm91dGVyLnJvdXRlKHRoaXMub3B0aW9ucyk7XG4gIH1cbn1cbiJdfQ==

View File

@@ -0,0 +1,16 @@
import type { FeatureFlag } from '@aws-cdk/toolkit-lib';
import type { FlagOperations } from './operations';
import { type FlagOperationsParams } from './types';
export declare class InteractiveHandler {
private readonly flags;
private readonly flagOperations;
constructor(flags: FeatureFlag[], flagOperations: FlagOperations);
/** Displays flags that have differences between user and recommended values */
private displayFlagsWithDifferences;
/** Checks if user value matches recommended value */
private isUserValueEqualToRecommended;
/** Main interactive mode handler that shows menu and processes user selection */
handleInteractiveMode(): Promise<FlagOperationsParams | null>;
/** Handles the specific flag selection flow with flag and value prompts */
private handleSpecificFlagSelection;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
export declare const OBSOLETE_FLAGS: string[];

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OBSOLETE_FLAGS = void 0;
exports.OBSOLETE_FLAGS = [
'@aws-cdk/core:enableStackNameDuplicates',
'@aws-cdk/aws-s3:grantWriteWithoutAcl',
'@aws-cdk/aws-kms:defaultKeyPolicies',
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2Jzb2xldGUtZmxhZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvYnNvbGV0ZS1mbGFncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLGNBQWMsR0FBRztJQUM1Qix5Q0FBeUM7SUFDekMsc0NBQXNDO0lBQ3RDLHFDQUFxQztDQUN0QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IE9CU09MRVRFX0ZMQUdTID0gW1xuICAnQGF3cy1jZGsvY29yZTplbmFibGVTdGFja05hbWVEdXBsaWNhdGVzJyxcbiAgJ0Bhd3MtY2RrL2F3cy1zMzpncmFudFdyaXRlV2l0aG91dEFjbCcsXG4gICdAYXdzLWNkay9hd3Mta21zOmRlZmF1bHRLZXlQb2xpY2llcycsXG5dO1xuIl19

View File

@@ -0,0 +1,80 @@
import type { FeatureFlag, Toolkit } from '@aws-cdk/toolkit-lib';
import type { FlagOperationsParams } from './types';
import type { IoHelper } from '../../api-private';
export declare class FlagOperations {
private readonly flags;
private readonly toolkit;
private readonly ioHelper;
private readonly cliContextValues;
/**
* Returns only those feature flags that need configuration
*
* That is those flags:
* - That are unconfigured
* - That are not obsolete
* - Whose default value is different from the recommended value
*
* The default value being equal to the recommended value sounds odd, but
* crops up in a number of situtations:
*
* - Security-related fixes that we want to force on people, but want to
* give them a flag to back out of the changes if they really need to.
* - Flags that changed their default value in the most recent major
* version.
* - Flags that we've introduced at some point in the past, but have gone
* back on.
*/
static filterNeedsAttention(flags: FeatureFlag[]): FeatureFlag[];
private app;
private baseContextValues;
private allStacks;
private queue;
private baselineTempDir?;
constructor(flags: FeatureFlag[], toolkit: Toolkit, ioHelper: IoHelper, cliContextValues?: Record<string, any>);
/** Main entry point that routes to either flag setting or display operations */
execute(params: FlagOperationsParams): Promise<void>;
/** Sets a single specific flag with validation and user confirmation */
setFlag(params: FlagOperationsParams): Promise<void>;
/** Sets multiple flags (all or unconfigured) with validation and user confirmation */
setMultipleFlags(params: FlagOperationsParams): Promise<void>;
/** Determines which flags should be set based on the provided parameters */
private getFlagsToSet;
/** Sets flags that don't cause template changes */
setSafeFlags(params: FlagOperationsParams): Promise<void>;
/** Initializes the safety check by reading context and synthesizing baseline templates */
private initializeSafetyCheck;
/** Cleans up temporary directories created during safety checks */
private cleanupSafetyCheck;
/** Tests multiple flags together and isolates unsafe ones using binary search */
private batchTestFlags;
/** Tests if a set of context values causes template changes by synthesizing and diffing */
private testBatch;
/** Uses binary search to isolate which flags are safe to set without template changes */
private isolateUnsafeFlags;
/** Prototypes flag changes by synthesizing templates and showing diffs to the user */
private prototypeChanges;
/** Displays a summary of flag changes showing old and new values */
private displayFlagChanges;
/** Builds the update object with new flag values based on parameters and current context */
private buildUpdateObject;
/** Prompts user for confirmation and applies changes if accepted */
private handleUserResponse;
/** Removes temporary directories created during flag operations */
private cleanupTempDirectories;
/** Actually modifies the cdk.json file with the new flag values */
private modifyValues;
/** Displays flags in a table format, either specific flags or filtered by criteria */
displayFlags(params: FlagOperationsParams): Promise<void>;
/** Displays detailed information for specific flags matching the given names */
private displaySpecificFlags;
/** Returns sort order for flags */
private getFlagSortOrder;
/** Displays flags in a formatted table grouped by module and sorted */
displayFlagTable(flags: FeatureFlag[]): Promise<void>;
/** Checks if a flag has a boolean recommended value */
isBooleanFlag(flag: FeatureFlag): boolean;
/** Shows helpful usage examples and available command options */
displayHelpMessage(): Promise<void>;
}
/** Checks if the flags current effective value matches the recommended value */
export declare function isEffectiveValueEqualToRecommended(flag: FeatureFlag): boolean;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,18 @@
import type { InteractiveHandler } from './interactive-handler';
import type { FlagOperations } from './operations.ts';
import type { FlagOperationsParams } from './types';
import type { FlagValidator } from './validator';
export declare class FlagOperationRouter {
private readonly validator;
private readonly interactiveHandler;
private readonly flagOperations;
constructor(validator: FlagValidator, interactiveHandler: InteractiveHandler, flagOperations: FlagOperations);
/** Routes flag operations to appropriate handlers based on parameters */
route(params: FlagOperationsParams): Promise<void>;
/** Handles flag setting operations, routing to single or multiple flag methods */
private handleSetOperations;
/** Manages interactive mode */
private handleInteractiveMode;
/** Shows help message when no specific options are provided */
private showHelpMessage;
}

60
cdk/node_modules/aws-cdk/lib/commands/flags/router.js generated vendored Normal file

File diff suppressed because one or more lines are too long

12
cdk/node_modules/aws-cdk/lib/commands/flags/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import type { FlagsOptions } from '../../cli/user-input';
export declare enum FlagsMenuOptions {
ALL_TO_RECOMMENDED = "Set all flags to recommended values",
UNCONFIGURED_TO_RECOMMENDED = "Set unconfigured flags to recommended values",
UNCONFIGURED_TO_DEFAULT = "Set unconfigured flags to their implied configuration (record current behavior)",
MODIFY_SPECIFIC_FLAG = "Modify a specific flag",
EXIT = "Exit"
}
export interface FlagOperationsParams extends FlagsOptions {
/** User provided --app option */
app?: string;
}

12
cdk/node_modules/aws-cdk/lib/commands/flags/types.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlagsMenuOptions = void 0;
var FlagsMenuOptions;
(function (FlagsMenuOptions) {
FlagsMenuOptions["ALL_TO_RECOMMENDED"] = "Set all flags to recommended values";
FlagsMenuOptions["UNCONFIGURED_TO_RECOMMENDED"] = "Set unconfigured flags to recommended values";
FlagsMenuOptions["UNCONFIGURED_TO_DEFAULT"] = "Set unconfigured flags to their implied configuration (record current behavior)";
FlagsMenuOptions["MODIFY_SPECIFIC_FLAG"] = "Modify a specific flag";
FlagsMenuOptions["EXIT"] = "Exit";
})(FlagsMenuOptions || (exports.FlagsMenuOptions = FlagsMenuOptions = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidH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Q==

View File

@@ -0,0 +1,22 @@
import type { FlagOperationsParams } from './types';
import type { IoHelper } from '../../api-private';
export declare class FlagValidator {
private readonly ioHelper;
constructor(ioHelper: IoHelper);
/** Shows error message when CDK version is incompatible with flags command */
showIncompatibleVersionError(): Promise<void>;
/** Validates all parameters and returns true if valid, false if any validation fails */
validateParams(params: FlagOperationsParams): Promise<boolean>;
/** Validates that --all and specific flag names are not used together */
private validateFlagNameAndAll;
/** Validates that modification options require --set flag */
private validateSetRequirement;
/** Validates that --value requires a specific flag name */
private validateValueRequirement;
/** Validates that mutually exclusive options are not used together */
private validateMutuallyExclusive;
/** Validates that --unconfigured is not used with specific flag names */
private validateUnconfiguredUsage;
/** Validates that --set operations have required accompanying options */
private validateSetWithFlags;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
export * from './init';

18
cdk/node_modules/aws-cdk/lib/commands/init/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./init"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXVCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9pbml0JztcbiJdfQ==

View File

@@ -0,0 +1,41 @@
import type { IoHelper } from '../../api-private';
export type SubstitutePlaceholders = (...fileNames: string[]) => Promise<void>;
/**
* Helpers passed to hook functions
*/
export interface HookContext {
/**
* Callback function to replace placeholders on arbitrary files
*
* This makes token substitution available to non-`.template` files.
*/
readonly substitutePlaceholdersIn: SubstitutePlaceholders;
/**
* Return a single placeholder
*/
placeholder(name: string): string;
}
export type InvokeHook = (targetDirectory: string, context: HookContext) => Promise<void>;
export interface HookTarget {
readonly targetDirectory: string;
readonly templateName: string;
readonly language: string;
}
/**
* Invoke hooks for the given init template
*
* Sometimes templates need more complex logic than just replacing tokens. A 'hook' can be
* used to do additional processing other than copying files.
*
* Hooks used to be defined externally to the CLI, by running arbitrarily
* substituted shell scripts in the target directory.
*
* In practice, they're all TypeScript files and all the same, and the dynamism
* that the original solution allowed wasn't used at all. Worse, since the CLI
* is now bundled the hooks can't even reuse code from the CLI libraries at all
* anymore, so all shared code would have to be copy/pasted.
*
* Bundle hooks as built-ins into the CLI, so they get bundled and can take advantage
* of all shared code.
*/
export declare function invokeBuiltinHooks(ioHelper: IoHelper, target: HookTarget, context: HookContext): Promise<void>;

File diff suppressed because one or more lines are too long

139
cdk/node_modules/aws-cdk/lib/commands/init/init.d.ts generated vendored Normal file
View File

@@ -0,0 +1,139 @@
import type { IoHelper } from '../../api-private';
import { type JsPackageManager } from './package-manager';
export interface CliInitOptions {
/**
* Template name to initialize
* @default undefined
*/
readonly type?: string;
/**
* Programming language for the project
* @default - Optional/auto-detected if template supports only one language, otherwise required
*/
readonly language?: string;
/**
* @default true
*/
readonly canUseNetwork?: boolean;
/**
* @default false
*/
readonly generateOnly?: boolean;
/**
* @default process.cwd()
*/
readonly workDir?: string;
/**
* @default undefined
*/
readonly projectName?: string;
/**
* @default undefined
*/
readonly stackName?: string;
/**
* @default undefined
*/
readonly migrate?: boolean;
/**
* Override the built-in CDK version
* @default undefined
*/
readonly libVersion?: string;
/**
* Path to a local custom template directory
* @default undefined
*/
readonly fromPath?: string;
/**
* Path to a specific template within a multi-template repository.
* This parameter requires --from-path to be specified.
* @default undefined
*/
readonly templatePath?: string;
/**
* The package manager to use for installing dependencies. Only applicable for TypeScript and JavaScript projects.
* @default - If specified language is 'typescript' or 'javascript', 'npm' is selected. Otherwise, no package manager is used.
*/
readonly packageManager?: JsPackageManager;
readonly ioHelper: IoHelper;
}
/**
* Initialize a CDK package in the current directory
*/
export declare function cliInit(options: CliInitOptions): Promise<void>;
interface TemplateInitInfo {
readonly description: string;
readonly aliases?: string[];
}
declare enum TemplateType {
BUILT_IN = "builtin",
CUSTOM = "custom"
}
export declare class InitTemplate {
private readonly basePath;
readonly name: string;
readonly languages: string[];
static fromName(templatesDir: string, name: string): Promise<InitTemplate>;
static fromPath(templatePath: string): Promise<InitTemplate>;
readonly description?: string;
readonly aliases: Set<string>;
readonly templateType: TemplateType;
constructor(basePath: string, name: string, languages: string[], initInfo: TemplateInitInfo | null, templateType: TemplateType);
/**
* @param name - the name that is being checked
* @returns ``true`` if ``name`` is the name of this template or an alias of it.
*/
hasName(name: string): boolean;
/**
* Creates a new instance of this ``InitTemplate`` for a given language to a specified folder.
*
* @param language - the language to instantiate this template with
* @param targetDirectory - the directory where the template is to be instantiated into
* @param stackName - the name of the stack to create
* @default undefined
* @param libVersion - the version of the CDK library to use
* @default undefined
*/
install(ioHelper: IoHelper, language: string, targetDirectory: string, projectName?: string, stackName?: string, libVersion?: string, packageManager?: JsPackageManager): Promise<void>;
private installFiles;
private installProcessed;
/**
* Copy template files without processing placeholders (for custom templates)
*/
private installFilesWithoutProcessing;
/**
* Adds context variables to `cdk.json` in the generated project directory to
* enable future behavior for new projects.
*/
private applyFutureFlags;
addMigrateContext(projectDir: string): Promise<void>;
}
export declare function expandPlaceholders(template: string, language: string, project: ProjectInfo, packageManager?: JsPackageManager): string;
interface ProjectInfo {
/** The value used for %name% */
readonly name: string;
readonly stackName?: string;
readonly versions: Versions;
}
export declare function availableInitTemplates(): Promise<InitTemplate[]>;
export declare function availableInitLanguages(): Promise<string[]>;
/**
* Print available templates to the user
* @param ioHelper - IO helper for user interaction
* @param language - Programming language filter
* @default undefined
*/
export declare function printAvailableTemplates(ioHelper: IoHelper, language?: string): Promise<void>;
interface Versions {
['aws-cdk']: string;
['aws-cdk-lib']: string;
constructs: string;
}
/**
* Return the currently recommended flags for `aws-cdk-lib`.
*
* These have been built into the CLI at build time.
*/
export declare function currentlyRecommendedAwsCdkLibFlags(): Promise<any>;
export {};

788
cdk/node_modules/aws-cdk/lib/commands/init/init.js generated vendored Normal file

File diff suppressed because one or more lines are too long

8
cdk/node_modules/aws-cdk/lib/commands/init/os.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { IoHelper } from '../../api-private';
/**
* OS helpers
*
* Shell function which both prints to stdout and collects the output into a
* string.
*/
export declare function shell(ioHelper: IoHelper, command: string[]): Promise<string>;

91
cdk/node_modules/aws-cdk/lib/commands/init/os.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
export declare const JS_PACKAGE_MANAGERS: readonly [{
readonly name: "npm";
readonly commandPrefix: "npm run";
}, {
readonly name: "yarn";
readonly commandPrefix: "yarn";
}, {
readonly name: "pnpm";
readonly commandPrefix: "pnpm";
}, {
readonly name: "bun";
readonly commandPrefix: "bun run";
}];
export type JsPackageManager = (typeof JS_PACKAGE_MANAGERS)[number]['name'];
export declare const getPmCmdPrefix: (packageManager: JsPackageManager) => string;

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPmCmdPrefix = exports.JS_PACKAGE_MANAGERS = void 0;
exports.JS_PACKAGE_MANAGERS = [
{ name: 'npm', commandPrefix: 'npm run' },
{ name: 'yarn', commandPrefix: 'yarn' },
{ name: 'pnpm', commandPrefix: 'pnpm' },
{ name: 'bun', commandPrefix: 'bun run' },
];
const getPmCmdPrefix = (packageManager) => {
return exports.JS_PACKAGE_MANAGERS.find(pm => pm.name === packageManager).commandPrefix;
};
exports.getPmCmdPrefix = getPmCmdPrefix;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZS1tYW5hZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicGFja2FnZS1tYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsbUJBQW1CLEdBQUc7SUFDakMsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUU7SUFDekMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxNQUFNLEVBQUU7SUFDdkMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxNQUFNLEVBQUU7SUFDdkMsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUU7Q0FDakMsQ0FBQztBQUlKLE1BQU0sY0FBYyxHQUFHLENBQUMsY0FBZ0MsRUFBVSxFQUFFO0lBQ3pFLE9BQU8sMkJBQW1CLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLElBQUksS0FBSyxjQUFjLENBQUUsQ0FBQyxhQUFhLENBQUM7QUFDbkYsQ0FBQyxDQUFDO0FBRlcsUUFBQSxjQUFjLGtCQUV6QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBKU19QQUNLQUdFX01BTkFHRVJTID0gW1xuICB7IG5hbWU6ICducG0nLCBjb21tYW5kUHJlZml4OiAnbnBtIHJ1bicgfSxcbiAgeyBuYW1lOiAneWFybicsIGNvbW1hbmRQcmVmaXg6ICd5YXJuJyB9LFxuICB7IG5hbWU6ICdwbnBtJywgY29tbWFuZFByZWZpeDogJ3BucG0nIH0sXG4gIHsgbmFtZTogJ2J1bicsIGNvbW1hbmRQcmVmaXg6ICdidW4gcnVuJyB9LFxuXSBhcyBjb25zdDtcblxuZXhwb3J0IHR5cGUgSnNQYWNrYWdlTWFuYWdlciA9ICh0eXBlb2YgSlNfUEFDS0FHRV9NQU5BR0VSUylbbnVtYmVyXVsnbmFtZSddO1xuXG5leHBvcnQgY29uc3QgZ2V0UG1DbWRQcmVmaXggPSAocGFja2FnZU1hbmFnZXI6IEpzUGFja2FnZU1hbmFnZXIpOiBzdHJpbmcgPT4ge1xuICByZXR1cm4gSlNfUEFDS0FHRV9NQU5BR0VSUy5maW5kKHBtID0+IHBtLm5hbWUgPT09IHBhY2thZ2VNYW5hZ2VyKSEuY29tbWFuZFByZWZpeDtcbn07XG4iXX0=

30
cdk/node_modules/aws-cdk/lib/commands/language.d.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
export interface LanguageInfo {
name: string;
alias: string;
extensions: string[];
}
export declare const SUPPORTED_LANGUAGES: LanguageInfo[];
/**
* get the language alias from the language name or alias
*
* @example
* getLanguageAlias('typescript') // returns 'ts'
* getLanguageAlias('python') // returns 'py'
*/
export declare function getLanguageAlias(language: string): string | undefined;
/**
* get the language name from the language alias or name
*
* @example
* getLanguageFromAlias('ts') // returns 'typescript'
* getLanguageFromAlias('py') // returns 'python'
*/
export declare function getLanguageFromAlias(alias: string): string | undefined;
/**
* get the file extensions for a given language name or alias
*
* @example
* getLanguageExtensions('typescript') // returns ['.ts', '.js']
* getLanguageExtensions('python') // returns ['.py']
*/
export declare function getLanguageExtensions(language: string): string[];

46
cdk/node_modules/aws-cdk/lib/commands/language.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SUPPORTED_LANGUAGES = void 0;
exports.getLanguageAlias = getLanguageAlias;
exports.getLanguageFromAlias = getLanguageFromAlias;
exports.getLanguageExtensions = getLanguageExtensions;
exports.SUPPORTED_LANGUAGES = [
{ name: 'csharp', alias: 'cs', extensions: ['.cs'] },
{ name: 'fsharp', alias: 'fs', extensions: ['.fs'] },
{ name: 'go', alias: 'go', extensions: ['.go'] },
{ name: 'java', alias: 'java', extensions: ['.java'] },
{ name: 'javascript', alias: 'js', extensions: ['.js'] },
{ name: 'python', alias: 'py', extensions: ['.py'] },
{ name: 'typescript', alias: 'ts', extensions: ['.ts', '.js'] },
];
/**
* get the language alias from the language name or alias
*
* @example
* getLanguageAlias('typescript') // returns 'ts'
* getLanguageAlias('python') // returns 'py'
*/
function getLanguageAlias(language) {
return exports.SUPPORTED_LANGUAGES.find((l) => l.name === language || l.alias === language)?.alias;
}
/**
* get the language name from the language alias or name
*
* @example
* getLanguageFromAlias('ts') // returns 'typescript'
* getLanguageFromAlias('py') // returns 'python'
*/
function getLanguageFromAlias(alias) {
return exports.SUPPORTED_LANGUAGES.find((l) => l.alias === alias || l.name === alias)?.name;
}
/**
* get the file extensions for a given language name or alias
*
* @example
* getLanguageExtensions('typescript') // returns ['.ts', '.js']
* getLanguageExtensions('python') // returns ['.py']
*/
function getLanguageExtensions(language) {
return exports.SUPPORTED_LANGUAGES.find((l) => l.name === language || l.alias === language)?.extensions ?? [];
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFuZ3VhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsYW5ndWFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF1QkEsNENBRUM7QUFTRCxvREFFQztBQVNELHNEQUVDO0FBekNZLFFBQUEsbUJBQW1CLEdBQW1CO0lBQ2pELEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLFVBQVUsRUFBRSxDQUFDLEtBQUssQ0FBQyxFQUFFO0lBQ3BELEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLFVBQV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YSBnaXZlbiBsYW5ndWFnZSBuYW1lIG9yIGFsaWFzXG4gKlxuICogQGV4YW1wbGVcbiAqIGdldExhbmd1YWdlRXh0ZW5zaW9ucygndHlwZXNjcmlwdCcpIC8vIHJldHVybnMgWycudHMnLCAnLmpzJ11cbiAqIGdldExhbmd1YWdlRXh0ZW5zaW9ucygncHl0aG9uJykgLy8gcmV0dXJucyBbJy5weSddXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRMYW5ndWFnZUV4dGVuc2lvbnMobGFuZ3VhZ2U6IHN0cmluZyk6IHN0cmluZ1tdIHtcbiAgcmV0dXJuIFNVUFBPUlRFRF9MQU5HVUFHRVMuZmluZCgobCkgPT4gbC5uYW1lID09PSBsYW5ndWFnZSB8fCBsLmFsaWFzID09PSBsYW5ndWFnZSk/LmV4dGVuc2lvbnMgPz8gW107XG59XG4iXX0=

21
cdk/node_modules/aws-cdk/lib/commands/list-stacks.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import type { StackDetails } from '@aws-cdk/toolkit-lib';
import type { CdkToolkit } from '../cli/cdk-toolkit';
/**
* Options for List Stacks
*/
export interface ListStacksOptions {
/**
* Stacks to list
*
* @default - All stacks are listed
*/
readonly selectors: string[];
}
/**
* List Stacks
*
* @param toolkit - cdk toolkit
* @param options - list stacks options
* @returns StackDetails[]
*/
export declare function listStacks(toolkit: CdkToolkit, options: ListStacksOptions): Promise<StackDetails[]>;

28
cdk/node_modules/aws-cdk/lib/commands/list-stacks.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listStacks = listStacks;
const cxapp_1 = require("../cxapp");
/**
* List Stacks
*
* @param toolkit - cdk toolkit
* @param options - list stacks options
* @returns StackDetails[]
*/
async function listStacks(toolkit, options) {
const assembly = await toolkit.assembly();
const stacks = await assembly.selectStacks({
patterns: options.selectors,
}, {
extend: cxapp_1.ExtendedStackSelection.Upstream,
defaultBehavior: cxapp_1.DefaultSelection.AllStacks,
});
// we only want to print a subset of information in `cdk list --json`
return stacks.withDependencies().map(stack => ({
id: stack.id,
name: stack.name,
environment: stack.environment,
dependencies: stack.dependencies,
}));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC1zdGFja3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsaXN0LXN0YWNrcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQXVCQSxnQ0FpQkM7QUF0Q0Qsb0NBQW9FO0FBY3BFOzs7Ozs7R0FNRztBQUNJLEtBQUssVUFBVSxVQUFVLENBQUMsT0FBbUIsRUFBRSxPQUEwQjtJQUM5RSxNQUFNLFFBQVEsR0FBRyxNQUFNLE9BQU8sQ0FBQyxRQUFRLEVBQUUsQ0FBQztJQUUxQyxNQUFNLE1BQU0sR0FBRyxNQUFNLFFBQVEsQ0FBQyxZQUFZLENBQUM7UUFDekMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxTQUFTO0tBQzVCLEVBQUU7UUFDRCxNQUFNLEVBQUUsOEJBQXNCLENBQUMsUUFBUTtRQUN2QyxlQUFlLEVBQUUsd0JBQWdCLENBQUMsU0FBUztLQUM1QyxDQUFDLENBQUM7SUFFSCxxRUFBcUU7SUFDckUsT0FBTyxNQUFNLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQzdDLEVBQUUsRUFBRSxLQUFLLENBQUMsRUFBRTtRQUNaLElBQUksRUFBRSxLQUFLLENBQUMsSUFBSTtRQUNoQixXQUFXLEVBQUUsS0FBSyxDQUFDLFdBQVc7UUFDOUIsWUFBWSxFQUFFLEtBQUssQ0FBQyxZQUFZO0tBQ2pDLENBQUMsQ0FBQyxDQUFDO0FBQ04sQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgU3RhY2tEZXR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hdmlvcjogRGVmYXVsdFNlbGVjdGlvbi5BbGxTdGFja3MsXG4gIH0pO1xuXG4gIC8vIHdlIG9ubHkgd2FudCB0byBwcmludCBhIHN1YnNldCBvZiBpbmZvcm1hdGlvbiBpbiBgY2RrIGxpc3QgLS1qc29uYFxuICByZXR1cm4gc3RhY2tzLndpdGhEZXBlbmRlbmNpZXMoKS5tYXAoc3RhY2sgPT4gKHtcbiAgICBpZDogc3RhY2suaWQsXG4gICAgbmFtZTogc3RhY2submFtZSxcbiAgICBlbnZpcm9ubWVudDogc3RhY2suZW52aXJvbm1lbnQsXG4gICAgZGVwZW5kZW5jaWVzOiBzdGFjay5kZXBlbmRlbmNpZXMsXG4gIH0pKTtcbn1cbiJdfQ==

316
cdk/node_modules/aws-cdk/lib/commands/migrate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,316 @@
import type { Environment } from '@aws-cdk/cloud-assembly-api';
import type { DescribeGeneratedTemplateCommandOutput, DescribeResourceScanCommandOutput, GetGeneratedTemplateCommandOutput, ResourceDefinition, ResourceDetail, ResourceIdentifierSummary, ResourceScanSummary, ScannedResource, ScannedResourceIdentifier } from '@aws-sdk/client-cloudformation';
import type { ICloudFormationClient, SdkProvider } from '../api/aws-auth';
import type { IoHelper } from '../api-private';
/**
* Generates a CDK app from a yaml or json template.
*
* @param stackName - The name to assign to the stack in the generated app
* @param stack - The yaml or json template for the stack
* @param language - The language to generate the CDK app in
* @param outputPath - The path at which to generate the CDK app
*/
export declare function generateCdkApp(ioHelper: IoHelper, stackName: string, stack: string, language: string, outputPath?: string, compress?: boolean): Promise<void>;
/**
* Generates a CDK stack file.
* @param template - The template to translate into a CDK stack
* @param stackName - The name to assign to the stack
* @param language - The language to generate the stack in
* @returns A string representation of a CDK stack file
*/
export declare function generateStack(template: string, stackName: string, language: string): string;
/**
* Reads and returns a stack template from a local path.
*
* @param inputPath - The location of the template
* @returns A string representation of the template if present, otherwise undefined
*/
export declare function readFromPath(inputPath: string): string;
/**
* Reads and returns a stack template from a deployed CloudFormation stack.
*
* @param stackName - The name of the stack
* @param sdkProvider - The sdk provider for making CloudFormation calls
* @param environment - The account and region where the stack is deployed
* @returns A string representation of the template if present, otherwise undefined
*/
export declare function readFromStack(stackName: string, sdkProvider: SdkProvider, environment: Environment): Promise<string | undefined>;
/**
* Takes in a stack name and account and region and returns a generated cloudformation template using the cloudformation
* template generator.
*
* @param GenerateTemplateOptions - An object containing the stack name, filters, sdkProvider, environment, and newScan flag
* @returns a generated cloudformation template
*/
export declare function generateTemplate(options: GenerateTemplateOptions): Promise<GenerateTemplateOutput>;
/**
* Takes a list of any type and breaks it up into chunks of a specified size.
*
* @param list - The list to break up
* @param chunkSize - The size of each chunk
* @returns A list of lists of the specified size
*/
export declare function chunks(list: any[], chunkSize: number): any[][];
/**
* Sets the account and region for making CloudFormation calls.
* @param account - The account to use
* @param region - The region to use
* @returns The environment object
*/
export declare function setEnvironment(account?: string, region?: string): Environment;
/**
* Enum for the source options for the template
*/
export declare enum TemplateSourceOptions {
PATH = "path",
STACK = "stack",
SCAN = "scan"
}
/**
* An object representing the source of a template.
*/
type TemplateSource = {
source: TemplateSourceOptions.SCAN;
} | {
source: TemplateSourceOptions.PATH;
templatePath: string;
} | {
source: TemplateSourceOptions.STACK;
stackName: string;
};
/**
* Enum for the status of a resource scan
*/
export declare enum ScanStatus {
IN_PROGRESS = "IN_PROGRESS",
COMPLETE = "COMPLETE",
FAILED = "FAILED"
}
export declare enum FilterType {
RESOURCE_IDENTIFIER = "resource-identifier",
RESOURCE_TYPE_PREFIX = "resource-type-prefix",
TAG_KEY = "tag-key",
TAG_VALUE = "tag-value"
}
/**
* Validates that exactly one source option has been provided.
* @param fromPath - The content of the flag `--from-path`
* @param fromStack - the content of the flag `--from-stack`
*/
export declare function parseSourceOptions(fromPath?: string, fromStack?: boolean, stackName?: string): TemplateSource;
/**
* Prints a progress bar to the console. To be used in a while loop to show progress of a long running task.
* The progress bar deletes the current line on the console and rewrites it with the progress amount.
*
* @param width - The width of the progress bar
* @param progress - The current progress to display as a percentage of 100
*/
export declare function printBar(width: number, progress: number): void;
/**
* Prints a message to the console with a series periods appended to it. To be used in a while loop to show progress of a long running task.
* The message deletes the current line and rewrites it several times to display 1-3 periods to show the user that the task is still running.
*
* @param message - The message to display
* @param timeoutx4 - The amount of time to wait before printing the next period
*/
export declare function printDots(message: string, timeoutx4: number): Promise<void>;
/**
* Rewrites the current line on the console and writes a new message to it.
* This is a helper funciton for printDots and printBar.
*
* @param message - The message to display
*/
export declare function rewriteLine(message: string): void;
/**
* Writes a migrate.json file to the output directory.
*
* @param outputPath - The path to write the migrate.json file to
* @param stackName - The name of the stack
* @param generatedOutput - The output of the template generator
*/
export declare function writeMigrateJsonFile(outputPath: string | undefined, stackName: string, migrateJson: MigrateJsonFormat): void;
/**
* Takes a string representing the from-scan flag and returns a FromScan enum value.
*
* @param scanType - A string representing the from-scan flag
* @returns A FromScan enum value
*/
export declare function getMigrateScanType(scanType: string): FromScan;
/**
* Takes a generatedTemplateOutput objct and returns a boolean representing whether there are any warnings on any rescources.
*
* @param generatedTemplateOutput - A GenerateTemplateOutput object
* @returns A boolean representing whether there are any warnings on any rescources
*/
export declare function isThereAWarning(generatedTemplateOutput: GenerateTemplateOutput): boolean;
/**
* Builds the GenerateTemplateOutput object from the DescribeGeneratedTemplateOutput and the template body.
*
* @param generatedTemplateSummary - The output of the describe generated template call
* @param templateBody - The body of the generated template
* @returns A GenerateTemplateOutput object
*/
export declare function buildGeneratedTemplateOutput(generatedTemplateSummary: DescribeGeneratedTemplateCommandOutput, templateBody: string, source: string): GenerateTemplateOutput;
/**
* Builds a CloudFormation sdk client for making requests with the CFN template generator.
*
* @param sdkProvider - The sdk provider for making CloudFormation calls
* @param environment - The account and region where the stack is deployed
* @returns A CloudFormation sdk client
*/
export declare function buildCfnClient(sdkProvider: SdkProvider, environment: Environment): Promise<ICloudFormationClient>;
/**
* Appends a list of warnings to a readme file.
*
* @param filepath - The path to the readme file
* @param resources - A list of resources to append warnings for
*/
export declare function appendWarningsToReadme(filepath: string, resources: ResourceDetail[]): void;
/**
* Class for making CloudFormation template generator calls
*/
export declare class CfnTemplateGeneratorProvider {
private cfn;
private ioHelper;
constructor(cfn: ICloudFormationClient, ioHelper: IoHelper);
checkForResourceScan(resourceScanSummaries: ResourceScanSummary[] | undefined, options: GenerateTemplateOptions, clientRequestToken: string): Promise<void>;
/**
* Retrieves a tokenized list of resources and their associated scan. If a token is present the function
* will loop through all pages and combine them into a single list of ScannedRelatedResources
*
* @param scanId - scan id for the to list resources for
* @param resources - A list of resources to find related resources for
*/
getResourceScanRelatedResources(scanId: string, resources: ScannedResource[]): Promise<ScannedResourceIdentifier[]>;
/**
* Kicks off a scan of a customers account, returning the scan id. A scan can take
* 10 minutes or longer to complete. However this will return a scan id as soon as
* the scan has begun.
*
* @returns A string representing the scan id
*/
startResourceScan(requestToken: string): Promise<string | undefined>;
/**
* Gets the most recent scans a customer has completed
*
* @returns a list of resource scan summaries
*/
listResourceScans(): Promise<import("@aws-sdk/client-cloudformation").ListResourceScansCommandOutput>;
/**
* Retrieves a tokenized list of resources from a resource scan. If a token is present, this function
* will loop through all pages and combine them into a single list of ScannedResource[].
* Additionally will apply any filters provided by the customer.
*
* @param scanId - scan id for the to list resources for
* @param filters - a string of filters in the format of key1=value1,key2=value2
* @returns a combined list of all resources from the scan
*/
listResourceScanResources(scanId: string, filters?: string[]): Promise<ScannedResourceIdentifier[]>;
/**
* Retrieves information about a resource scan.
*
* @param scanId - scan id for the to list resources for
* @returns information about the scan
*/
describeResourceScan(scanId: string): Promise<DescribeResourceScanCommandOutput>;
/**
* Describes the current status of the template being generated.
*
* @param templateId - A string representing the template id
* @returns DescribeGeneratedTemplateOutput an object containing the template status and results
*/
describeGeneratedTemplate(templateId: string): Promise<DescribeGeneratedTemplateCommandOutput>;
/**
* Retrieves a completed generated cloudformation template from the template generator.
*
* @param templateId - A string representing the template id
* @param cloudFormation - The CloudFormation sdk client to use
* @returns DescribeGeneratedTemplateOutput an object containing the template status and body
*/
getGeneratedTemplate(templateId: string): Promise<GetGeneratedTemplateCommandOutput>;
/**
* Kicks off a template generation for a set of resources.
*
* @param stackName - The name of the stack
* @param resources - A list of resources to generate the template from
* @returns CreateGeneratedTemplateOutput an object containing the template arn to query on later
*/
createGeneratedTemplate(stackName: string, resources: ResourceDefinition[]): Promise<import("@aws-sdk/client-cloudformation").CreateGeneratedTemplateCommandOutput>;
/**
* Deletes a generated template from the template generator.
*
* @param templateArn - The arn of the template to delete
* @returns A promise that resolves when the template has been deleted
*/
deleteGeneratedTemplate(templateArn: string): Promise<void>;
}
/**
* The possible ways to choose a scan to generate a CDK application from
*/
export declare enum FromScan {
/**
* Initiate a new resource scan to build the CDK application from.
*/
NEW = 0,
/**
* Use the last successful scan to build the CDK application from. Will fail if no scan is found.
*/
MOST_RECENT = 1,
/**
* Starts a scan if none exists, otherwise uses the most recent successful scan to build the CDK application from.
*/
DEFAULT = 2
}
/**
* Interface for the options object passed to the generateTemplate function
*
* @param stackName - The name of the stack
* @param filters - A list of filters to apply to the scan
* @param fromScan - An enum value specifying whether a new scan should be started or the most recent successful scan should be used
* @param sdkProvider - The sdk provider for making CloudFormation calls
* @param environment - The account and region where the stack is deployed
*/
export interface GenerateTemplateOptions {
stackName: string;
filters?: string[];
fromScan?: FromScan;
sdkProvider: SdkProvider;
environment: Environment;
ioHelper: IoHelper;
}
/**
* Interface for the output of the generateTemplate function
*
* @param migrateJson - The generated Migrate.json file
* @param resources - The generated template
*/
export interface GenerateTemplateOutput {
migrateJson: MigrateJsonFormat;
resources?: ResourceDetail[];
templateId?: string;
}
/**
* Interface defining the format of the generated Migrate.json file
*
* @param TemplateBody - The generated template
* @param Source - The source of the template
* @param Resources - A list of resources that were used to generate the template
*/
export interface MigrateJsonFormat {
templateBody: string;
source: string;
resources?: GeneratedResourceImportIdentifier[];
}
/**
* Interface representing the format of a resource identifier required for resource import
*
* @param ResourceType - The type of resource
* @param LogicalResourceId - The logical id of the resource
* @param ResourceIdentifier - The resource identifier of the resource
*/
export interface GeneratedResourceImportIdentifier {
ResourceType: string;
LogicalResourceId: string;
ResourceIdentifier: ResourceIdentifierSummary;
}
export {};

801
cdk/node_modules/aws-cdk/lib/commands/migrate.js generated vendored Normal file

File diff suppressed because one or more lines are too long