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

View File

@@ -0,0 +1,106 @@
import type { Construct } from 'constructs';
import * as iam from '../../../aws-iam';
import { Resource } from '../../../core';
import type { DeploymentGroupReference, IApplicationRef, IDeploymentConfigRef } from '../../../interfaces/generated/aws-codedeploy-interfaces.generated';
import type { CfnDeploymentGroup } from '../codedeploy.generated';
/**
*/
export interface ImportedDeploymentGroupBaseProps {
/**
* The reference to the CodeDeploy Application that this Deployment Group belongs to.
*/
readonly application: IApplicationRef;
/**
* The physical, human-readable name of the CodeDeploy Deployment Group
* that we are referencing.
*
* @default Either deploymentGroupName or deploymentGroupArn is required
*/
readonly deploymentGroupName: string;
}
/**
* @internal
*/
export declare class ImportedDeploymentGroupBase extends Resource {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
readonly applicationName: string;
readonly deploymentGroupName: string;
readonly deploymentGroupArn: string;
get deploymentGroupRef(): DeploymentGroupReference;
constructor(scope: Construct, id: string, props: ImportedDeploymentGroupBaseProps);
/**
* Bind DeploymentGroupConfig to the current group, if supported
*
* @internal
*/
protected _bindDeploymentConfig(config: IDeploymentConfigRef): IDeploymentConfigRef;
}
export interface DeploymentGroupBaseProps {
/**
* The physical, human-readable name of the CodeDeploy Deployment Group.
*
* @default An auto-generated name will be used.
*/
readonly deploymentGroupName?: string;
/**
* The service Role of this Deployment Group.
*
* @default A new Role will be created.
*/
readonly role?: iam.IRole;
/**
* Id of the role construct, if created by this construct
*
* Exists because when we factored this out, there was a difference between the
* 3 deployment groups.
*/
readonly roleConstructId: string;
}
/**
* @internal
*/
export declare class DeploymentGroupBase extends Resource {
/** Uniquely identifies this class. */
static readonly PROPERTY_INJECTION_ID: string;
/**
* The name of the Application.
*/
readonly applicationName: string;
/**
* The name of the Deployment Group.
*/
readonly deploymentGroupName: string;
/**
* The ARN of the Deployment Group.
*/
readonly deploymentGroupArn: string;
/**
* A reference to a DeploymentGroup resource.
*/
get deploymentGroupRef(): DeploymentGroupReference;
/**
* The service Role of this Deployment Group.
*
* (Can't make `role` properly public here, as it's typed as optional in one
* interface and typing it here as definitely set interferes with that.)
*
* @internal
*/
readonly _role: iam.IRole;
constructor(scope: Construct, id: string, props: DeploymentGroupBaseProps);
/**
* Bind DeploymentGroupConfig to the current group, if supported
*
* @internal
*/
protected _bindDeploymentConfig(config: IDeploymentConfigRef): IDeploymentConfigRef;
/**
* Set name and ARN properties.
*
* Must be called in the child constructor.
*
* @internal
*/
protected _setNameAndArn(resource: CfnDeploymentGroup, application: IApplicationRef): void;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
import type { IBindableDeploymentConfig } from '../base-deployment-config';
import type { IDeploymentConfigRef } from '../codedeploy.generated';
export declare function isIBindableDeploymentConfig(x: IDeploymentConfigRef): x is IBindableDeploymentConfig;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIBindableDeploymentConfig=isIBindableDeploymentConfig;function isIBindableDeploymentConfig(x){return typeof x=="object"&&!!x&&"bindEnvironment"in x}

View File

@@ -0,0 +1,31 @@
import type { IApplicationRef, IDeploymentConfigRef } from '../../../interfaces/generated/aws-codedeploy-interfaces.generated';
import type { IBaseDeploymentConfig } from '../base-deployment-config';
import type { IEcsApplication } from '../ecs/application';
import type { IEcsDeploymentConfig } from '../ecs/deployment-config';
import type { ILambdaApplication } from '../lambda/application';
import type { IServerApplication } from '../server/application';
import type { IServerDeploymentConfig } from '../server/deployment-config';
/**
* Convert an IApplicationRef to IServerApplication, validating it has the required properties
*/
export declare function toIServerApplication(app: IApplicationRef): IServerApplication;
/**
* Convert an IApplicationRef to IEcsApplication, validating it has the required properties
*/
export declare function toIEcsApplication(app: IApplicationRef): IEcsApplication;
/**
* Convert an IApplicationRef to ILambdaApplication, validating it has the required properties
*/
export declare function toILambdaApplication(app: IApplicationRef): ILambdaApplication;
/**
* Convert an IDeploymentConfigRef to IServerDeploymentConfig, validating it has the required properties
*/
export declare function toIServerDeploymentConfig(config: IDeploymentConfigRef): IServerDeploymentConfig;
/**
* Convert an IDeploymentConfigRef to IEcsDeploymentConfig, validating it has the required properties
*/
export declare function toIEcsDeploymentConfig(config: IDeploymentConfigRef): IEcsDeploymentConfig;
/**
* Convert an IDeploymentConfigRef to ILambdaDeploymentConfig, validating it has the required properties
*/
export declare function toIBaseDeploymentConfig(config: IDeploymentConfigRef): IBaseDeploymentConfig;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toIServerApplication=toIServerApplication,exports.toIEcsApplication=toIEcsApplication,exports.toILambdaApplication=toILambdaApplication,exports.toIServerDeploymentConfig=toIServerDeploymentConfig,exports.toIEcsDeploymentConfig=toIEcsDeploymentConfig,exports.toIBaseDeploymentConfig=toIBaseDeploymentConfig;var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function toIServerApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement IServerApplication, but doesn't: ${app.constructor.name}`);return app}function toIEcsApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement IEcsApplication, but doesn't: ${app.constructor.name}`);return app}function toILambdaApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement ILambdaApplication, but doesn't: ${app.constructor.name}`);return app}function toIServerDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementServer`,`'deploymentConfig' instance should implement IServerDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}function toIEcsDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementEcs`,`'deploymentConfig' instance should implement IEcsDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}function toIBaseDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementLambda`,`'deploymentConfig' instance should implement ILambdaDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}

View File

@@ -0,0 +1,36 @@
import type { Construct } from 'constructs';
import type { Stack, IEnvironmentAware } from '../../../core';
import type { IAlarmRef } from '../../../interfaces/generated/aws-cloudwatch-interfaces.generated';
import type { IBaseDeploymentConfig, IBindableDeploymentConfig } from '../base-deployment-config';
import type { CfnDeploymentGroup } from '../codedeploy.generated';
import type { AutoRollbackConfig } from '../rollback-config';
export declare function arnForApplication(stack: Stack, applicationName: string): string;
export declare function nameFromDeploymentGroupArn(deploymentGroupArn: string): string;
export declare function arnForDeploymentConfig(name: string, resource?: IEnvironmentAware): string;
export interface renderAlarmConfigProps {
/**
* Array of Cloudwatch alarms
*/
readonly alarms: IAlarmRef[];
/**
* Whether to ignore failure to fetch the status of alarms from CloudWatch
*/
readonly ignorePollAlarmFailure?: boolean;
/**
* When no alarms are provided on an update, removes previously existing alarms from the construct.
* @see {@link https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/FEATURE_FLAGS.md#aws-cdkaws-codedeployremovealarmsfromdeploymentgroup}
*
* @default true
*/
readonly removeAlarms?: boolean;
/**
* Whether to skip the step of checking CloudWatch alarms during the deployment process
*
* @default false
*/
ignoreAlarmConfiguration?: boolean;
}
export declare function renderAlarmConfiguration(props: renderAlarmConfigProps): CfnDeploymentGroup.AlarmConfigurationProperty | undefined;
export declare function deploymentConfig(name: string): IBaseDeploymentConfig & IBindableDeploymentConfig;
export declare function renderAutoRollbackConfiguration(scope: Construct, alarms: IAlarmRef[], autoRollbackConfig?: AutoRollbackConfig): CfnDeploymentGroup.AutoRollbackConfigurationProperty | undefined;
export declare function validateName(type: 'Application' | 'Deployment group' | 'Deployment config', name: string): string[];

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arnForApplication=arnForApplication,exports.nameFromDeploymentGroupArn=nameFromDeploymentGroupArn,exports.arnForDeploymentConfig=arnForDeploymentConfig,exports.renderAlarmConfiguration=renderAlarmConfiguration,exports.deploymentConfig=deploymentConfig,exports.renderAutoRollbackConfiguration=renderAutoRollbackConfiguration,exports.validateName=validateName;var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},detached_construct_1=()=>{var tmp=require("../../../core/lib/private/detached-construct");return detached_construct_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function arnForApplication(stack,applicationName){return stack.formatArn({service:"codedeploy",resource:"application",resourceName:applicationName,arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME})}function nameFromDeploymentGroupArn(deploymentGroupArn){const components=core_1().Arn.split(deploymentGroupArn,core_1().ArnFormat.COLON_RESOURCE_NAME);return core_1().Fn.select(1,core_1().Fn.split("/",components.resourceName??""))}function arnForDeploymentConfig(name,resource){return core_1().Arn.format({partition:core_1().Aws.PARTITION,account:resource?.env.account??core_1().Aws.ACCOUNT_ID,region:resource?.env.region??core_1().Aws.REGION,service:"codedeploy",resource:"deploymentconfig",resourceName:name,arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME})}function renderAlarmConfiguration(props){const ignoreAlarmConfiguration=props.ignoreAlarmConfiguration??!1;return props.removeAlarms??!0?{alarms:props.alarms.length>0?props.alarms.map(a=>({name:a.alarmRef.alarmName})):void 0,enabled:!ignoreAlarmConfiguration&&props.alarms.length>0,ignorePollAlarmFailure:props.ignorePollAlarmFailure}:props.alarms.length===0?void 0:{alarms:props.alarms.map(a=>({name:a.alarmRef.alarmName})),enabled:!ignoreAlarmConfiguration,ignorePollAlarmFailure:props.ignorePollAlarmFailure}}function deploymentConfig(name){return new class extends detached_construct_1().DetachedConstruct{deploymentConfigName=name;deploymentConfigArn=arnForDeploymentConfig(name);deploymentConfigRef={deploymentConfigName:name};bindEnvironment(resource){return new class extends detached_construct_1().DetachedConstruct{deploymentConfigName=name;deploymentConfigArn=arnForDeploymentConfig(name,resource);deploymentConfigRef={deploymentConfigName:name}}("Objects returned by 'deploymentConfig()' cannot be used in this API: they are not real constructs and do not have a construct tree")}}("Objects returned by 'deploymentConfig()' cannot be used in this API: they are not real constructs and do not have a construct tree")}var AutoRollbackEvent;(function(AutoRollbackEvent2){AutoRollbackEvent2.DEPLOYMENT_FAILURE="DEPLOYMENT_FAILURE",AutoRollbackEvent2.DEPLOYMENT_STOP_ON_ALARM="DEPLOYMENT_STOP_ON_ALARM",AutoRollbackEvent2.DEPLOYMENT_STOP_ON_REQUEST="DEPLOYMENT_STOP_ON_REQUEST"})(AutoRollbackEvent||(AutoRollbackEvent={}));function renderAutoRollbackConfiguration(scope,alarms,autoRollbackConfig={}){const events=new Array;if(autoRollbackConfig.failedDeployment!==!1&&events.push(AutoRollbackEvent.DEPLOYMENT_FAILURE),autoRollbackConfig.stoppedDeployment===!0&&events.push(AutoRollbackEvent.DEPLOYMENT_STOP_ON_REQUEST),autoRollbackConfig.deploymentInAlarm!==!1){if(alarms.length>0)events.push(AutoRollbackEvent.DEPLOYMENT_STOP_ON_ALARM);else if(autoRollbackConfig.deploymentInAlarm===!0)throw new(core_1()).ValidationError((0,literal_string_1().lit)`DeploymentInAlarmRequiresCloudWatchAlarms`,"The auto-rollback setting 'deploymentInAlarm' does not have any effect unless you associate at least one CloudWatch alarm with the Deployment Group",scope)}return autoRollbackConfig.failedDeployment===!1&&autoRollbackConfig.stoppedDeployment!==!0&&autoRollbackConfig.deploymentInAlarm===!1?{enabled:!1}:events.length>0?{enabled:!0,events}:void 0}function validateName(type,name){const ret=[];return!core_1().Token.isUnresolved(name)&&name!==void 0&&(name.length>100&&ret.push(`${type} name: "${name}" can be a max of 100 characters.`),/^[a-z0-9._+=,@-]+$/i.test(name)||ret.push(`${type} name: "${name}" can only contain letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), + (plus signs), = (equals signs), , (commas), @ (at signs), - (minus signs).`)),ret}