agent-claw: automated task changes
This commit is contained in:
86
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/intrinstics.d.ts
generated
vendored
Normal file
86
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/intrinstics.d.ts
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
export type IntrinsicExpression = StringLiteralExpression | PathExpression | FnCallExpression;
|
||||
export type TopLevelIntrinsic = PathExpression | FnCallExpression;
|
||||
export interface StringLiteralExpression {
|
||||
readonly type: 'string-literal';
|
||||
readonly literal: string;
|
||||
}
|
||||
export interface PathExpression {
|
||||
readonly type: 'path';
|
||||
readonly path: string;
|
||||
}
|
||||
export interface FnCallExpression {
|
||||
readonly type: 'fncall';
|
||||
readonly functionName: string;
|
||||
readonly arguments: IntrinsicExpression[];
|
||||
}
|
||||
/**
|
||||
* LL(1) parser for StepFunctions intrinsics
|
||||
*
|
||||
* The parser implements a state machine over a cursor into an expression
|
||||
* string. The cusor gets moved, the character at the cursor gets inspected
|
||||
* and based on the character we accumulate some value and potentially move
|
||||
* to a different state.
|
||||
*
|
||||
* Literal strings are not allowed at the top level, but are allowed inside
|
||||
* function calls.
|
||||
*/
|
||||
export declare class IntrinsicParser {
|
||||
private readonly expression;
|
||||
private i;
|
||||
constructor(expression: string);
|
||||
parseTopLevelIntrinsic(): TopLevelIntrinsic;
|
||||
private parseIntrinsic;
|
||||
/**
|
||||
* Simplified path parsing
|
||||
*
|
||||
* JSON path can actually be quite complicated, but we don't need to validate
|
||||
* it precisely. We just need to know how far it extends.
|
||||
*
|
||||
* Therefore, we only care about:
|
||||
*
|
||||
* - Starts with a $
|
||||
* - Accept ., $ and alphanums
|
||||
* - Accept single-quoted strings ('...')
|
||||
* - Accept anything between matched square brackets ([...])
|
||||
*/
|
||||
private parsePath;
|
||||
/**
|
||||
* Parse a fncall
|
||||
*
|
||||
* Cursor should be on call identifier. Afterwards, cursor will be on closing
|
||||
* quote.
|
||||
*/
|
||||
private parseFnCall;
|
||||
/**
|
||||
* Parse a string literal
|
||||
*
|
||||
* Cursor is expected to be on the first opening quote. Afterwards,
|
||||
* cursor will be after the closing quote.
|
||||
*/
|
||||
private parseStringLiteral;
|
||||
/**
|
||||
* Parse a bracketed expression
|
||||
*
|
||||
* Cursor is expected to be on the opening brace. Afterwards,
|
||||
* the cursor will be after the closing brace.
|
||||
*/
|
||||
private consumeBracketedExpression;
|
||||
/**
|
||||
* Parse a string literal
|
||||
*
|
||||
* Cursor is expected to be on the first opening quote. Afterwards,
|
||||
* cursor will be after the closing quote.
|
||||
*/
|
||||
private consumeQuotedString;
|
||||
/**
|
||||
* Consume whitespace if it exists
|
||||
*
|
||||
* Move the cursor to the next non-whitespace character.
|
||||
*/
|
||||
private ws;
|
||||
private get eof();
|
||||
private char;
|
||||
private next;
|
||||
private consume;
|
||||
private raiseError;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/intrinstics.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/intrinstics.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IntrinsicParser=void 0;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};class IntrinsicParser{expression;i=0;constructor(expression){this.expression=expression}parseTopLevelIntrinsic(){this.ws();let ret;return this.char()==="$"?ret=this.parsePath():isAlphaNum(this.char())?ret=this.parseFnCall():this.raiseError("expected '$' or a function call"),this.ws(),this.eof||this.raiseError("unexpected trailing characters"),ret}parseIntrinsic(){if(this.ws(),this.char()==="$")return this.parsePath();if(isAlphaNum(this.char()))return this.parseFnCall();if(this.char()==="'")return this.parseStringLiteral();this.raiseError("expected $, function or single-quoted string")}parsePath(){const pathString=new Array;this.char()!=="$"&&this.raiseError("expected '$'"),pathString.push(this.consume());let done=!1;for(;!done&&!this.eof;)switch(this.char()){case".":case"$":pathString.push(this.consume());break;case"'":const{quoted}=this.consumeQuotedString();pathString.push(quoted);break;case"[":pathString.push(this.consumeBracketedExpression("]"));break;default:if(isAlphaNum(this.char())){pathString.push(this.consume());break}done=!0}return{type:"path",path:pathString.join("")}}parseFnCall(){const name=new Array;for(;this.char()!=="(";)name.push(this.consume());this.next(),this.ws();const args=[];for(;this.char()!==")";)if(args.push(this.parseIntrinsic()),this.ws(),this.char()===","){this.next();continue}else{if(this.char()===")")continue;this.raiseError("expected , or )")}return this.next(),{type:"fncall",arguments:args,functionName:name.join("")}}parseStringLiteral(){const{unquoted}=this.consumeQuotedString();return{type:"string-literal",literal:unquoted}}consumeBracketedExpression(closingBrace){const ret=new Array;for(ret.push(this.consume());this.char()!==closingBrace;)this.char()==="["?ret.push(this.consumeBracketedExpression("]")):this.char()==="{"?ret.push(this.consumeBracketedExpression("}")):ret.push(this.consume());return ret.push(this.consume()),ret.join("")}consumeQuotedString(){const quoted=new Array,unquoted=new Array;for(quoted.push(this.consume());this.char()!=="'";)this.char()==="\\"&"ed.push(this.consume()),quoted.push(this.char()),unquoted.push(this.char()),this.next();return quoted.push(this.consume()),{quoted:quoted.join(""),unquoted:unquoted.join("")}}ws(){for(;!this.eof&&[" "," ",`
|
||||
`].includes(this.char());)this.next()}get eof(){return this.i>=this.expression.length}char(){return this.eof&&this.raiseError("unexpected end of string"),this.expression[this.i]}next(){this.i++}consume(){const ret=this.char();return this.next(),ret}raiseError(message){throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`InvalidJsonPathExpression`,`Invalid JSONPath expression: ${message} at index ${this.i} in ${JSON.stringify(this.expression)}`)}}exports.IntrinsicParser=IntrinsicParser;function isAlphaNum(x){return x.match(/^[a-zA-Z0-9]$/)}
|
||||
57
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.d.ts
generated
vendored
Normal file
57
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.d.ts
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { IResolvable, IResolveContext } from '../../../core';
|
||||
export declare class JsonPathToken implements IResolvable {
|
||||
readonly path: string;
|
||||
static isJsonPathToken(this: void, x: IResolvable): x is JsonPathToken;
|
||||
readonly creationStack: string[];
|
||||
displayHint: string;
|
||||
constructor(path: string);
|
||||
resolve(_ctx: IResolveContext): string;
|
||||
toString(): string;
|
||||
toJSON(): string;
|
||||
}
|
||||
/**
|
||||
* Deep render a JSON object to expand JSON path fields, updating the key to end in '.$'
|
||||
*/
|
||||
export declare function renderObject(obj: object | undefined): object | undefined;
|
||||
/**
|
||||
* Return all JSON paths that are used in the given structure
|
||||
*/
|
||||
export declare function findReferencedPaths(obj: object | undefined): Set<string>;
|
||||
interface FieldHandlers {
|
||||
handleString(key: string, x: string): {
|
||||
[key: string]: string;
|
||||
};
|
||||
handleList(key: string, x: string[]): {
|
||||
[key: string]: string[] | string;
|
||||
};
|
||||
handleNumber(key: string, x: number): {
|
||||
[key: string]: number | string;
|
||||
};
|
||||
handleBoolean(key: string, x: boolean): {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
handleResolvable(key: string, x: IResolvable): {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
export declare function recurseObject(obj: object | undefined, handlers: FieldHandlers, visited?: object[]): object | undefined;
|
||||
/**
|
||||
* If the indicated string is an encoded JSON path, return the path
|
||||
*
|
||||
* Otherwise return undefined.
|
||||
*/
|
||||
export declare function jsonPathString(x: string): string | undefined;
|
||||
export declare function jsonPathFromAny(x: any): string | undefined;
|
||||
/**
|
||||
* Render the string or number value in a valid JSON Path expression.
|
||||
*
|
||||
* If the value is a Tokenized JSON path reference -- return the JSON path reference inside it.
|
||||
* If the value is a number -- convert it to string.
|
||||
* If the value is a string -- single-quote it.
|
||||
* Otherwise, throw errors.
|
||||
*
|
||||
* Call this function whenever you're building compound JSONPath expressions, in
|
||||
* order to avoid having tokens-in-tokens-in-tokens which become very hard to parse.
|
||||
*/
|
||||
export declare function renderInExpression(x: any): string;
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/jsonata.d.ts
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/jsonata.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const isValidJsonataExpression: (expression: string) => boolean;
|
||||
export declare const findJsonataExpressions: (value: any) => Set<string>;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/jsonata.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/jsonata.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findJsonataExpressions=exports.isValidJsonataExpression=void 0;const isValidJsonataExpression=expression=>/^{%(.*)%}$/s.test(expression);exports.isValidJsonataExpression=isValidJsonataExpression;const findJsonataExpressions=value=>{const recursive=v=>typeof v=="string"&&(0,exports.isValidJsonataExpression)(v)?[v]:v===null?[]:Array.isArray(v)?v.flatMap(recursive):typeof v=="object"?Object.values(v).flatMap(recursive):[];return new Set(recursive(value))};exports.findJsonataExpressions=findJsonataExpressions;
|
||||
11
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/util.d.ts
generated
vendored
Normal file
11
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { EncryptionConfiguration } from '../encryption-configuration';
|
||||
export declare function noEmptyObject<A>(o: Record<string, A>): Record<string, A> | undefined;
|
||||
export declare function buildEncryptionConfiguration(encryptionConfiguration?: EncryptionConfiguration): {
|
||||
type: string;
|
||||
kmsKeyId?: undefined;
|
||||
kmsDataKeyReusePeriodSeconds?: undefined;
|
||||
} | {
|
||||
kmsKeyId: string;
|
||||
kmsDataKeyReusePeriodSeconds: number;
|
||||
type: string;
|
||||
} | undefined;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/util.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-stepfunctions/lib/private/util.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.noEmptyObject=noEmptyObject,exports.buildEncryptionConfiguration=buildEncryptionConfiguration;var aws_owned_key_encryption_configuration_1=()=>{var tmp=require("../aws-owned-key-encryption-configuration");return aws_owned_key_encryption_configuration_1=()=>tmp,tmp},customer_managed_key_encryption_configuration_1=()=>{var tmp=require("../customer-managed-key-encryption-configuration");return customer_managed_key_encryption_configuration_1=()=>tmp,tmp};function noEmptyObject(o){if(Object.keys(o).length!==0)return o}function buildEncryptionConfiguration(encryptionConfiguration){if(encryptionConfiguration instanceof aws_owned_key_encryption_configuration_1().AwsOwnedEncryptionConfiguration)return{type:encryptionConfiguration.type};if(encryptionConfiguration instanceof customer_managed_key_encryption_configuration_1().CustomerManagedEncryptionConfiguration)return{kmsKeyId:encryptionConfiguration.kmsKey.keyArn,kmsDataKeyReusePeriodSeconds:encryptionConfiguration.kmsDataKeyReusePeriodSeconds?encryptionConfiguration.kmsDataKeyReusePeriodSeconds.toSeconds():300,type:encryptionConfiguration.type}}
|
||||
Reference in New Issue
Block a user