@kensio/yulin 1.21.27 → 1.21.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/eslint/cffjs2.eslint.config.js +4 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock-action.d.ts +18 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock-action.js +71 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock-input.d.ts +11 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock-input.js +45 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock.d.ts +10 -0
- package/dist/sdk/wire/sim-sdk-wire-bedrock.js +47 -0
- package/dist/sdk/wire/sim-sdk-wire-call.d.ts +30 -0
- package/dist/sdk/wire/sim-sdk-wire-call.js +32 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js +7 -9
- package/dist/sdk/wire/sim-sdk-wire-event-stream.d.ts +16 -0
- package/dist/sdk/wire/sim-sdk-wire-event-stream.js +79 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.js +2 -2
- package/dist/service/bedrock/command/authorize/sim-bedrock-authorizer.js +7 -3
- package/dist/service/cloudformation/parameters/sim-cfn-parameter-list-type.d.ts +7 -0
- package/dist/service/cloudformation/parameters/sim-cfn-parameter-list-type.js +9 -0
- package/dist/service/cloudformation/parameters/sim-cfn-parameter-values.d.ts +10 -0
- package/dist/service/cloudformation/parameters/sim-cfn-parameter-values.js +20 -0
- package/dist/service/cloudformation/parameters/sim-cfn-parameters.type.d.ts +7 -5
- package/dist/service/cloudformation/parameters/store/sim-cfn-parameter-store-value-type.js +2 -1
- package/dist/service/cloudformation/template/node/fn/join/sim-cfn-fn-join.d.ts +19 -14
- package/dist/service/cloudformation/template/node/fn/join/sim-cfn-fn-join.js +47 -28
- package/dist/service/cloudformation/template/parse/fn/join/sim-cfn-fn-join-parser.d.ts +7 -4
- package/dist/service/cloudformation/template/parse/fn/join/sim-cfn-fn-join-parser.js +11 -7
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +2 -2
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +5 -9
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +11 -22
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-host-globals.d.ts +4 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-host-globals.js +87 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +3 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +10 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-exchanges.d.ts +32 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-exchanges.js +39 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-messages.d.ts +33 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-messages.js +87 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-module.d.ts +27 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-module.js +53 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-session.d.ts +31 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http2-session.js +57 -0
- package/dist/service/lambda/function/outbound/sim-lambda-transport-module.d.ts +11 -0
- package/dist/service/lambda/function/outbound/sim-lambda-transport-module.js +24 -0
- package/docs/serve/README.md +1 -1
- package/docs/services/cloudformation/README.md +28 -5
- package/docs/services/dynamodb/README.md +2 -2
- package/docs/services/lambda/README.md +18 -8
- package/docs/services/s3/README.md +1 -1
- package/docs/services/sqs/README.md +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SimLambdaHttp2Session, } from "./sim-lambda-http2-session.js";
|
|
2
|
+
/**
|
|
3
|
+
* The specifiers a bundler and a hand-written require may ask for the
|
|
4
|
+
* HTTP/2 module by.
|
|
5
|
+
*/
|
|
6
|
+
const http2ModuleSpecifiers = new Set([
|
|
7
|
+
"http2",
|
|
8
|
+
"node:http2",
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* Whether a module specifier names the HTTP/2 module.
|
|
12
|
+
*/
|
|
13
|
+
export function isSimLambdaHttp2ModuleSpecifier(specifier) {
|
|
14
|
+
return http2ModuleSpecifiers.has(specifier);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build the `node:http2` module sim Lambda function code connects through.
|
|
18
|
+
*
|
|
19
|
+
* Everything the real module exports is kept, and only `connect` is
|
|
20
|
+
* replaced. A session to a hostname the simulation serves is a real HTTP/2
|
|
21
|
+
* session, connected over an in-memory socket pair to a server in this
|
|
22
|
+
* process that hands each request to the simulation. Every other session is
|
|
23
|
+
* the host module's, connected exactly as it was asked for.
|
|
24
|
+
*
|
|
25
|
+
* Bedrock Runtime's SDK client sends over HTTP/2, so this is where its calls
|
|
26
|
+
* from function code reach simulated Bedrock.
|
|
27
|
+
*/
|
|
28
|
+
export function makeSimLambdaHttp2Module(properties) {
|
|
29
|
+
const { hostModule, outbound } = properties;
|
|
30
|
+
const hostConnect = hostModule["connect"];
|
|
31
|
+
return {
|
|
32
|
+
...hostModule,
|
|
33
|
+
connect: (...callArguments) => {
|
|
34
|
+
const authority = authorityUrl(callArguments[0]);
|
|
35
|
+
if (authority === undefined || !outbound.serves(authority.hostname)) {
|
|
36
|
+
return hostConnect(...callArguments);
|
|
37
|
+
}
|
|
38
|
+
return new SimLambdaHttp2Session(authority, outbound).connect(hostConnect, callArguments);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The URL `connect` was asked for, as a string or a URL, or undefined for
|
|
44
|
+
* anything that is not one.
|
|
45
|
+
*/
|
|
46
|
+
function authorityUrl(authority) {
|
|
47
|
+
if (authority instanceof URL) {
|
|
48
|
+
return authority;
|
|
49
|
+
}
|
|
50
|
+
return typeof authority === "string" && URL.canParse(authority)
|
|
51
|
+
? new URL(authority)
|
|
52
|
+
: undefined;
|
|
53
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import http2 from "node:http2";
|
|
2
|
+
import type { SimLambdaOutboundHttp } from "./sim-lambda-outbound-http.js";
|
|
3
|
+
/**
|
|
4
|
+
* The host module's `connect`.
|
|
5
|
+
*/
|
|
6
|
+
export type SimLambdaHttp2Connect = (...callArguments: unknown[]) => http2.ClientHttp2Session;
|
|
7
|
+
/**
|
|
8
|
+
* One HTTP/2 session the simulation answers.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimLambdaHttp2Session {
|
|
11
|
+
private readonly authority;
|
|
12
|
+
private readonly outbound;
|
|
13
|
+
private readonly exchanges;
|
|
14
|
+
constructor(authority: URL, outbound: SimLambdaOutboundHttp);
|
|
15
|
+
/**
|
|
16
|
+
* Connect the host module's client to an in-process server.
|
|
17
|
+
*
|
|
18
|
+
* The host client does all the HTTP/2 work, so streams, flow control,
|
|
19
|
+
* timeouts and resets behave as they do over a network socket. Only the
|
|
20
|
+
* socket it runs over is supplied.
|
|
21
|
+
*/
|
|
22
|
+
connect(hostConnect: SimLambdaHttp2Connect, callArguments: readonly unknown[]): http2.ClientHttp2Session;
|
|
23
|
+
private answer;
|
|
24
|
+
/**
|
|
25
|
+
* Answer one request from the simulation.
|
|
26
|
+
*
|
|
27
|
+
* A request the simulation cannot answer fails the client's stream with the
|
|
28
|
+
* error that explains it, which is what the SDK rejects the call with.
|
|
29
|
+
*/
|
|
30
|
+
private respond;
|
|
31
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import http2 from "node:http2";
|
|
2
|
+
import { duplexPair } from "node:stream";
|
|
3
|
+
import { simLambdaHttp2ConnectArguments, simLambdaHttp2Request, simLambdaHttp2ResponseHeaders, } from "./sim-lambda-http2-messages.js";
|
|
4
|
+
import { SimLambdaHttp2Exchanges } from "./sim-lambda-http2-exchanges.js";
|
|
5
|
+
/**
|
|
6
|
+
* One HTTP/2 session the simulation answers.
|
|
7
|
+
*/
|
|
8
|
+
export class SimLambdaHttp2Session {
|
|
9
|
+
authority;
|
|
10
|
+
outbound;
|
|
11
|
+
exchanges = new SimLambdaHttp2Exchanges();
|
|
12
|
+
constructor(authority, outbound) {
|
|
13
|
+
this.authority = authority;
|
|
14
|
+
this.outbound = outbound;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Connect the host module's client to an in-process server.
|
|
18
|
+
*
|
|
19
|
+
* The host client does all the HTTP/2 work, so streams, flow control,
|
|
20
|
+
* timeouts and resets behave as they do over a network socket. Only the
|
|
21
|
+
* socket it runs over is supplied.
|
|
22
|
+
*/
|
|
23
|
+
connect(hostConnect, callArguments) {
|
|
24
|
+
const { options, listener } = simLambdaHttp2ConnectArguments(callArguments);
|
|
25
|
+
const server = http2.createServer((request, response) => {
|
|
26
|
+
this.answer(request, response);
|
|
27
|
+
});
|
|
28
|
+
const [clientSocket, serverSocket] = duplexPair();
|
|
29
|
+
server.emit("connection", serverSocket);
|
|
30
|
+
const session = hostConnect(this.authority, { ...options, createConnection: () => clientSocket }, ...listener);
|
|
31
|
+
this.exchanges.track(session);
|
|
32
|
+
return session;
|
|
33
|
+
}
|
|
34
|
+
answer(request, response) {
|
|
35
|
+
const exchange = this.exchanges.exchangeFor(request);
|
|
36
|
+
exchange.scope.runInAsyncScope(() => {
|
|
37
|
+
void this.respond(request, response, exchange.stream);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Answer one request from the simulation.
|
|
42
|
+
*
|
|
43
|
+
* A request the simulation cannot answer fails the client's stream with the
|
|
44
|
+
* error that explains it, which is what the SDK rejects the call with.
|
|
45
|
+
*/
|
|
46
|
+
async respond(request, response, clientStream) {
|
|
47
|
+
try {
|
|
48
|
+
const answered = await this.outbound.fetch(await simLambdaHttp2Request(this.authority, this.outbound, request));
|
|
49
|
+
const body = Buffer.from(await answered.arrayBuffer());
|
|
50
|
+
response.writeHead(answered.status, simLambdaHttp2ResponseHeaders(answered.headers));
|
|
51
|
+
response.end(body);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
clientStream.destroy(error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SimLambdaOutboundHttp } from "./sim-lambda-outbound-http.js";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a module specifier names one of the transport modules function code
|
|
4
|
+
* makes requests through: `node:http`, `node:https` or `node:http2`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isSimLambdaTransportModuleSpecifier(specifier: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The transport module a specifier names, with its requests to the hostnames
|
|
9
|
+
* the simulation serves answered by the simulation.
|
|
10
|
+
*/
|
|
11
|
+
export declare function makeSimLambdaTransportModule(specifier: string, hostModule: Record<string, unknown>, outbound: SimLambdaOutboundHttp): Record<string, unknown>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isSimLambdaHttpModuleSpecifier, makeSimLambdaHttpModule, simLambdaHttpModuleScheme, } from "./sim-lambda-http-module.js";
|
|
2
|
+
import { isSimLambdaHttp2ModuleSpecifier, makeSimLambdaHttp2Module, } from "./sim-lambda-http2-module.js";
|
|
3
|
+
/**
|
|
4
|
+
* Whether a module specifier names one of the transport modules function code
|
|
5
|
+
* makes requests through: `node:http`, `node:https` or `node:http2`.
|
|
6
|
+
*/
|
|
7
|
+
export function isSimLambdaTransportModuleSpecifier(specifier) {
|
|
8
|
+
return (isSimLambdaHttpModuleSpecifier(specifier) ||
|
|
9
|
+
isSimLambdaHttp2ModuleSpecifier(specifier));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The transport module a specifier names, with its requests to the hostnames
|
|
13
|
+
* the simulation serves answered by the simulation.
|
|
14
|
+
*/
|
|
15
|
+
export function makeSimLambdaTransportModule(specifier, hostModule, outbound) {
|
|
16
|
+
if (isSimLambdaHttp2ModuleSpecifier(specifier)) {
|
|
17
|
+
return makeSimLambdaHttp2Module({ hostModule, outbound });
|
|
18
|
+
}
|
|
19
|
+
return makeSimLambdaHttpModule({
|
|
20
|
+
hostModule,
|
|
21
|
+
outbound,
|
|
22
|
+
scheme: simLambdaHttpModuleScheme(specifier),
|
|
23
|
+
});
|
|
24
|
+
}
|
package/docs/serve/README.md
CHANGED
|
@@ -415,6 +415,6 @@ service guide lists its supported commands.
|
|
|
415
415
|
- `yulin watch` does not preserve simulated state across a restart or reload changed Lambda and
|
|
416
416
|
CloudFront Function code inside the current process.
|
|
417
417
|
- The shared AWS API endpoint refuses unsupported protocols and operations with `501 Not
|
|
418
|
-
Implemented`.
|
|
418
|
+
Implemented`.
|
|
419
419
|
- Some service functionality is available only through `SimAws` or SDK interception. Check the
|
|
420
420
|
relevant service guide before depending on access through the local endpoint.
|
|
@@ -948,8 +948,20 @@ console.log(
|
|
|
948
948
|
|
|
949
949
|
A parameter with no supplied value takes the template default, when the template has one.
|
|
950
950
|
|
|
951
|
-
A
|
|
952
|
-
|
|
951
|
+
A `CommaDelimitedList` or `List<...>` parameter (`List<String>`, `List<Number>`,
|
|
952
|
+
`List<AWS::EC2::Subnet::Id>` and the rest) is given one comma-separated string. A `Ref` to it
|
|
953
|
+
resolves to the list of members, each trimmed of the spaces around it. `Fn::Join` and `Fn::Select`
|
|
954
|
+
read that list as they read any other:
|
|
955
|
+
|
|
956
|
+
```json
|
|
957
|
+
{ "Fn::Join": ["-", { "Ref": "Names" }] }
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
With `Names` declared as a `CommaDelimitedList` and given `a, b, c`, this resolves to `a-b-c`. The
|
|
961
|
+
members of a `List<Number>` are strings, as CloudFormation gives them.
|
|
962
|
+
|
|
963
|
+
The `AWS::SSM::Parameter::Value<...>` types hold a Parameter Store name and resolve to the value
|
|
964
|
+
stored under it. See
|
|
953
965
|
[reading a parameter through a template Parameter](https://yulinsim.dev/services/ssm/#reading-a-parameter-through-a-template-parameter).
|
|
954
966
|
Every other type is accepted and its value used as written, with no validation of the value against
|
|
955
967
|
the type.
|
|
@@ -1217,6 +1229,17 @@ await simAws.cloudFormation().deployTemplate({
|
|
|
1217
1229
|
});
|
|
1218
1230
|
```
|
|
1219
1231
|
|
|
1232
|
+
The second argument may also be a function that returns the whole list. CDK writes this for
|
|
1233
|
+
`Fn.join(",", zone.hostedZoneNameServers)`:
|
|
1234
|
+
|
|
1235
|
+
```json
|
|
1236
|
+
{ "Fn::Join": [",", { "Fn::GetAtt": ["Zone", "NameServers"] }] }
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
`Fn::Split`, an `Fn::FindInMap` of a list value, `Fn::If` and a `Ref` to a list parameter can supply
|
|
1240
|
+
the list the same way. A list that resolves to anything but strings fails the deployment. That
|
|
1241
|
+
includes a number, and a list nested inside the list (CloudFormation joins one level only).
|
|
1242
|
+
|
|
1220
1243
|
### `Fn::Sub`
|
|
1221
1244
|
|
|
1222
1245
|
```typescript sim-cloudformation-fn-sub
|
|
@@ -4545,9 +4568,9 @@ Each service's own docs describe what its resource types support.
|
|
|
4545
4568
|
would reject as well. The simulator just rejects them later rather than up front.
|
|
4546
4569
|
- `Fn::If` is a condition function inside the `Conditions` section, and is not a value an
|
|
4547
4570
|
`Fn::Equals` can compare. Real CloudFormation allows only `Ref` and `Fn::FindInMap` there.
|
|
4548
|
-
- `Fn::Split` and `Fn::Select` accept any argument that resolves to the type they
|
|
4549
|
-
CloudFormation allows only a named set of functions inside each of them. A template the
|
|
4550
|
-
resolves may still be one CloudFormation rejects.
|
|
4571
|
+
- `Fn::Join`, `Fn::Split` and `Fn::Select` accept any argument that resolves to the type they
|
|
4572
|
+
need. Real CloudFormation allows only a named set of functions inside each of them. A template the
|
|
4573
|
+
simulator resolves may still be one CloudFormation rejects.
|
|
4551
4574
|
- The SAM transform is expanded for `AWS::Serverless::Function`, `AWS::Serverless::SimpleTable`,
|
|
4552
4575
|
`AWS::Serverless::HttpApi` and `AWS::Serverless::Api`. Every other `AWS::Serverless::*` resource
|
|
4553
4576
|
type is recorded as unsupported. `Api`, `HttpApi`, `SQS`, `DynamoDB`, `SNS`, `S3`, `Cognito`,
|
|
@@ -3940,7 +3940,7 @@ is written.
|
|
|
3940
3940
|
`AWS::DynamoDB::Table` path does, with the replica's `TableClass`, `DeletionProtectionEnabled` and
|
|
3941
3941
|
`Tags` read off it, the table's writes and the replica's reads put back together into one
|
|
3942
3942
|
provisioned capacity for the table and for each global secondary index, and `Ref`, `Fn::GetAtt …
|
|
3943
|
-
Arn`, `Fn::GetAtt … StreamArn` and `Fn::GetAtt … TableId` answering. A CDK `TableV2` stack deploys
|
|
3943
|
+
Arn`, `Fn::GetAtt … StreamArn` and `Fn::GetAtt … TableId` answering. A CDK `TableV2` stack deploys
|
|
3944
3944
|
through it without hand-editing.
|
|
3945
3945
|
- SDK interception, and an intercepted `DynamoDBClient` or `DynamoDBStreamsClient` reaches the
|
|
3946
3946
|
simulation.
|
|
@@ -4035,7 +4035,7 @@ Arn`, `Fn::GetAtt … StreamArn` and `Fn::GetAtt … TableId` answering. A CDK `
|
|
|
4035
4035
|
- Time to live expiry is dispatched by moving the clock through `simAws.clock()`, not by real time
|
|
4036
4036
|
elapsing. An item whose window goes by while a running-mode clock tracks the host stays where it
|
|
4037
4037
|
is until something moves the clock. A simulated DynamoDB constructed standalone as `new
|
|
4038
|
-
SimDynamoDb()` has no clock control at all. No item there ever expires.
|
|
4038
|
+
SimDynamoDb()` has no clock control at all. No item there ever expires.
|
|
4039
4039
|
- A Lambda event source mapping is the only simulated service integration that consumes a stream.
|
|
4040
4040
|
Anything else reads one through the Streams API itself. A Kinesis Data Streams destination is
|
|
4041
4041
|
absent.
|
|
@@ -152,6 +152,9 @@ The vm runtime models the real Node.js runtime closely:
|
|
|
152
152
|
(`AWS_REGION`, `AWS_LAMBDA_FUNCTION_NAME`, `AWS_LAMBDA_FUNCTION_MEMORY_SIZE`, ...).
|
|
153
153
|
- The sandbox provides writable `process.stdout` and `process.stderr`, with its `console` built
|
|
154
154
|
over them, as the real runtime does. See [What a handler prints](#what-a-handler-prints).
|
|
155
|
+
- The sandbox provides the other globals of the Node.js runtime, including `global`, the WHATWG
|
|
156
|
+
streams, `EventTarget`, `atob`, `performance` and `navigator`. `Date` and the timers follow the
|
|
157
|
+
simulated clock. `performance.now()` reads host time.
|
|
155
158
|
- Import and handler problems surface as invocation errors, with the real runtime error types
|
|
156
159
|
(`Runtime.ImportModuleError`, `Runtime.HandlerNotFound`, `Runtime.UserCodeSyntaxError`,
|
|
157
160
|
`Runtime.MalformedHandlerName`). Creation succeeds either way.
|
|
@@ -728,8 +731,8 @@ Some deployment packages inline the SDK rather than relying on the runtime to pr
|
|
|
728
731
|
`NodejsFunction` does that when given `bundling: { externalModules: [] }`. There is then no
|
|
729
732
|
`@aws-sdk/*` module left for the runtime to provide, and nothing to intercept.
|
|
730
733
|
|
|
731
|
-
Those functions reach the simulation anyway. The runtime provides their HTTP transport, `node:http
|
|
732
|
-
and `node:
|
|
734
|
+
Those functions reach the simulation anyway. The runtime provides their HTTP transport, `node:http`,
|
|
735
|
+
`node:https` and `node:http2`, and a request addressed to an AWS API endpoint is answered from the same
|
|
733
736
|
simulated services, as the same execution role, instead of going to the network. The execution
|
|
734
737
|
role credentials are in the function's environment, as real Lambda puts them there. The SDK resolves
|
|
735
738
|
credentials inside the sandbox, where it would otherwise fail with `CredentialsProviderError`.
|
|
@@ -746,6 +749,13 @@ sends. A function can read and write Objects with an `S3Client` its archive inli
|
|
|
746
749
|
Role authorizes each request, and a read it holds no `s3:GetObject` for comes back to the SDK as
|
|
747
750
|
`AccessDenied`.
|
|
748
751
|
|
|
752
|
+
Bedrock Runtime states its operation and its model in the path, and its client sends over HTTP/2.
|
|
753
|
+
`Converse`, `ConverseStream`, `InvokeModel` and `InvokeModelWithResponseStream` from a bundled
|
|
754
|
+
`BedrockRuntimeClient` return what `simAws.bedrock().responses()` declares, and the SDK reads the
|
|
755
|
+
two streaming operations as it reads a real event stream. A model id given as an inference profile
|
|
756
|
+
ARN works too. The execution Role authorizes each call, and a denial reaches the handler as
|
|
757
|
+
`AccessDeniedException`.
|
|
758
|
+
|
|
749
759
|
A bundled call to any other simulated service, such as SNS, SES or Lambda itself, fails with an
|
|
750
760
|
error naming the service. Leaving the SDK out of that archive puts it back
|
|
751
761
|
on the module interception path above, which every simulated service is reachable through.
|
|
@@ -761,8 +771,8 @@ hostname, along with everything else a handler asks for over HTTP.
|
|
|
761
771
|
## The HTTP requests function code makes
|
|
762
772
|
|
|
763
773
|
A request from a handler to a hostname the simulation serves is answered by the simulation. It
|
|
764
|
-
never leaves the process. `fetch`, `node:http` and `node:
|
|
765
|
-
difference which client the handler was written with.
|
|
774
|
+
never leaves the process. `fetch`, `node:http`, `node:https` and `node:http2` all reach it, so it
|
|
775
|
+
makes no difference which client the handler was written with.
|
|
766
776
|
|
|
767
777
|
Two kinds of hostname are served. Everything simulated Route53 resolves is answered over the same
|
|
768
778
|
in-process HTTP entry point a browser on localhost reaches. That covers a
|
|
@@ -4358,9 +4368,9 @@ Sim Lambda currently supports:
|
|
|
4358
4368
|
- Per-function environment variables with `Environment.Variables`
|
|
4359
4369
|
- Runtime-provided `@aws-sdk/*` packages inside function code, routed into the owning simulated AWS
|
|
4360
4370
|
environment
|
|
4361
|
-
- `fetch`, `node:http` and `node:
|
|
4362
|
-
every hostname it serves, including a Cognito user pool domain's OAuth endpoints
|
|
4363
|
-
token verifier fetches from the regional Cognito endpoint
|
|
4371
|
+
- `fetch`, `node:http`, `node:https` and `node:http2` requests from function code, answered by the
|
|
4372
|
+
simulation for every hostname it serves, including a Cognito user pool domain's OAuth endpoints
|
|
4373
|
+
and the JWKS a token verifier fetches from the regional Cognito endpoint
|
|
4364
4374
|
- Execution roles, evaluated against simulated IAM
|
|
4365
4375
|
- Published versions and aliases, with `PublishVersion`, `ListVersionsByFunction`, `CreateAlias`,
|
|
4366
4376
|
`UpdateAlias`, `GetAlias`, `ListAliases` and `DeleteAlias`, and a `Qualifier` on `Invoke`,
|
|
@@ -4470,7 +4480,7 @@ Current documented limitations:
|
|
|
4470
4480
|
- Environment variables declared with `Environment.Variables` reach a real in-process handler
|
|
4471
4481
|
function only while it runs, so a variable read at module scope sees the host process value
|
|
4472
4482
|
instead. See [Environment variables](#environment-variables).
|
|
4473
|
-
- Outbound HTTP is routed for `fetch`, `node:http` and `node:
|
|
4483
|
+
- Outbound HTTP is routed for `fetch`, `node:http`, `node:https` and `node:http2` alone. A handler using another
|
|
4474
4484
|
client, or a request made from a handler module while it is being imported, reaches the network.
|
|
4475
4485
|
A routed response comes back as the simulation answered it, with redirects left for the caller to
|
|
4476
4486
|
follow. See [The HTTP requests function code makes](#the-http-requests-function-code-makes).
|
|
@@ -1079,7 +1079,7 @@ A delete on a versioned Bucket raises `s3:ObjectRemoved:DeleteMarkerCreated` rat
|
|
|
1079
1079
|
|
|
1080
1080
|
- MFA delete is refused with `NotImplemented` rather than stored. Nothing here could enforce it, and
|
|
1081
1081
|
a Bucket reporting a protection it does not apply is worse than one that says so. `MFADelete:
|
|
1082
|
-
"Disabled"` is taken, and any other value is refused with `InvalidArgument`.
|
|
1082
|
+
"Disabled"` is taken, and any other value is refused with `InvalidArgument`.
|
|
1083
1083
|
- A `versionId` in a `CopySource` is still refused with `NotImplemented`. A copy reads the current
|
|
1084
1084
|
version.
|
|
1085
1085
|
- `NoncurrentVersionTransitions` is stored and unread, because storage classes are left out. An
|
|
@@ -1214,7 +1214,7 @@ Current documented limitations:
|
|
|
1214
1214
|
- A Lambda event source mapping polls one batch at a time. Real Lambda runs several pollers at once
|
|
1215
1215
|
and scales them with the queue, and what that concurrency does to ordering is invisible here. See
|
|
1216
1216
|
[simulated Lambda](https://yulinsim.dev/services/lambda/#triggering-a-function-from-an-sqs-queue "Simulated Lambda event
|
|
1217
|
-
source mapping docs") for the rest of the mapping limitations.
|
|
1217
|
+
source mapping docs") for the rest of the mapping limitations.
|
|
1218
1218
|
- `AWS::SQS::Queue` and `AWS::SQS::QueuePolicy` are the SQS resource types CloudFormation creates.
|
|
1219
1219
|
Any other is reported as unsupported and skipped. A queue attribute outside the range real SQS
|
|
1220
1220
|
accepts fails the resource, and a property it has no behaviour for is recorded and the queue
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensio/yulin",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.29",
|
|
4
4
|
"description": "AWS system behaviour simulation for isolated unit testing",
|
|
5
5
|
"repository": "https://github.com/KensioSoftware/yulin",
|
|
6
6
|
"homepage": "https://yulinsim.dev/",
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
"hyparquet": "^1.29.2",
|
|
300
300
|
"hyparquet-writer": "^0.16.9",
|
|
301
301
|
"node-sql-parser": "^5.4.0",
|
|
302
|
-
"oxfmt": "^0.
|
|
302
|
+
"oxfmt": "^0.72.0",
|
|
303
303
|
"oxlint": "^1.77.0",
|
|
304
304
|
"oxlint-tsgolint": "^7.0.2001",
|
|
305
305
|
"semantic-release": "25.0.9",
|