@kensio/yulin 1.16.1 → 1.16.2
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/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +2 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
- package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
- package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
- package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
- package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
- package/dist/service/cognito/command/user/password-reset.command.js +2 -0
- package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +27 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +2 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +2 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +9 -6
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +26 -11
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +18 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +23 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +2 -10
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +16 -21
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
- package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
- package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
- package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +9 -10
- package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.js +2 -1
- package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
- package/package.json +2 -2
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +0 -1
|
@@ -21,8 +21,9 @@ export class CreateFunctionCommandHandler {
|
|
|
21
21
|
codeResolver;
|
|
22
22
|
environmentConflicts;
|
|
23
23
|
logs;
|
|
24
|
+
outboundHttp;
|
|
24
25
|
constructor(properties) {
|
|
25
|
-
const { accountRegionScope, functions, runAsOwner, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), codeStore, containerImages, vmSdkModuleProvider, environmentConflicts = new SimLambdaEnvironmentConflicts(), logs, } = properties;
|
|
26
|
+
const { accountRegionScope, functions, runAsOwner, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), codeStore, containerImages, vmSdkModuleProvider, environmentConflicts = new SimLambdaEnvironmentConflicts(), logs, outboundHttp, } = properties;
|
|
26
27
|
this.accountRegionScope = accountRegionScope;
|
|
27
28
|
this.functions = functions;
|
|
28
29
|
this.runAsOwner = runAsOwner;
|
|
@@ -32,12 +33,14 @@ export class CreateFunctionCommandHandler {
|
|
|
32
33
|
codeStore,
|
|
33
34
|
containerImages,
|
|
34
35
|
vmSdkModuleProvider,
|
|
36
|
+
outboundHttp,
|
|
35
37
|
// The background scheduler is this simulation's clock, and the same one
|
|
36
38
|
// the created function is given.
|
|
37
39
|
clock: background,
|
|
38
40
|
});
|
|
39
41
|
this.environmentConflicts = environmentConflicts;
|
|
40
42
|
this.logs = logs;
|
|
43
|
+
this.outboundHttp = outboundHttp;
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* Create a sim Lambda function.
|
|
@@ -66,6 +69,7 @@ export class CreateFunctionCommandHandler {
|
|
|
66
69
|
runAsOwner: this.runAsOwner,
|
|
67
70
|
clock: this.background,
|
|
68
71
|
logs: this.logs,
|
|
72
|
+
outboundHttp: this.outboundHttp,
|
|
69
73
|
});
|
|
70
74
|
this.functions.set(simFunction.name, simFunction);
|
|
71
75
|
// New function becomes Active async in the background.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAInD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAInD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAErF,OAAO,EAAE,qBAAqB,EAAE,M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ages } from "../../function/code/image/sim-lam
|
|
|
7
7
|
import type { SimLambdaCodeStore } from "../../function/code/store/sim-lambda-code-store.js";
|
|
8
8
|
import type { SimLambdaVmSdkModuleProvider } from "../../function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
9
9
|
import type { SimLogsServiceWriter } from "../../../logs/write/sim-logs-service-writer.js";
|
|
10
|
+
import type { SimLambdaOutboundHttp } from "../../function/outbound/sim-lambda-outbound-http.js";
|
|
10
11
|
import type { SimLambdaEnvironmentConflicts } from "../../function/environment/sim-lambda-environment-conflicts.js";
|
|
11
12
|
import type { SimLambdaFunctionMap } from "../../function/sim-lambda-function.js";
|
|
12
13
|
import type { SimLambdaFunctionUrlStore } from "../../function/url/sim-lambda-function-url-store.js";
|
|
@@ -26,6 +27,7 @@ interface SimLambdaFunctionCommandsProperties {
|
|
|
26
27
|
readonly containerImages?: SimLambdaContainerImages | undefined;
|
|
27
28
|
readonly vmSdkModuleProvider?: SimLambdaVmSdkModuleProvider | undefined;
|
|
28
29
|
readonly logs?: SimLogsServiceWriter | undefined;
|
|
30
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
29
31
|
}
|
|
30
32
|
interface SimLambdaFunctionCommandOptions {
|
|
31
33
|
readonly caller?: SimAwsCaller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-function-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/function/sim-lambda-function-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACt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AAG,SAAS,CAAC;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-function-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/function/sim-lambda-function-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iEAAiE,CAAC;AACpH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gEAAgE,CAAC;AACpH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAErG,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB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AO,CAAC,8BAA8B,CAAC,CAKzC;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,sBAAsB,CAAC,CAKjC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-function-commands.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/function/sim-lambda-function-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-lambda-function-commands.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/function/sim-lambda-function-commands.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAK7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAK7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAKpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAyBnE;;;;;;GAMG;AACH,MAAM,OAAO,yBAAyB;IACnB,UAAU,CAAsC;IAEjE,YAAY,UAA+C;QACzD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAyC;QAEzC,OAAO,MAAM,IAAI,4BAA4B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CACnE,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAA8B,EAC9B,OAAyC;QAEzC,OAAO,MAAM,IAAI,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAChE,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAyC;QAEzC,OAAO,MAAM,IAAI,4BAA4B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CACnE,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAyB,EACzB,OAAyC;QAEzC,OAAO,MAAM,IAAI,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAC3D,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -6,9 +6,16 @@ import type { SimLambdaCodeSource } from "./lambda-code-source.js";
|
|
|
6
6
|
import { type SimLambdaExecutableCode } from "./sim-lambda-executable-code.js";
|
|
7
7
|
import { type SimLambdaCodeStore } from "./store/sim-lambda-code-store.js";
|
|
8
8
|
import type { SimLambdaVmSdkModuleProvider } from "./vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
9
|
+
import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
|
|
9
10
|
interface SimLambdaCodeResolverProperties {
|
|
10
11
|
readonly codeStore?: SimLambdaCodeStore | undefined;
|
|
11
12
|
readonly vmSdkModuleProvider?: SimLambdaVmSdkModuleProvider | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Where the HTTP requests vm zip code makes to hostnames the simulation
|
|
15
|
+
* serves are answered. A handler reference needs none: it runs in the host
|
|
16
|
+
* scope, where the invocation bridges the HTTP clients.
|
|
17
|
+
*/
|
|
18
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
12
19
|
/**
|
|
13
20
|
* Where a container image URI is resolved to a real in-process handler.
|
|
14
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-code-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-code-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-code-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-code-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,UAAU,+BAA+B;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;IACxE;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC1D;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAChE;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4B;IAE7D,YAAY,UAAU,EAAE,+BAA+B,EAStD;IAED;;OAEG;IACG,OAAO,CACX,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,uBAAuB,CAAC,CAsBlC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;CAa9B"}
|
|
@@ -21,6 +21,7 @@ export class SimLambdaCodeResolver {
|
|
|
21
21
|
properties.containerImages ?? new SimLambdaNoContainerImages();
|
|
22
22
|
this.vmZipCodeFactory = new SimLambdaVmZipCodeFactory({
|
|
23
23
|
vmSdkModuleProvider: properties.vmSdkModuleProvider,
|
|
24
|
+
outboundHttp: properties.outboundHttp,
|
|
24
25
|
clock: properties.clock,
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-code-resolver.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-code-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAG1F,OAAO,EAEL,0BAA0B,GAC3B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAEL,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAEL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-code-resolver.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-code-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAG1F,OAAO,EAEL,0BAA0B,GAC3B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAEL,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAEL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAoC1C;;;;;;;GAOG;AACH,MAAM,OAAO,qBAAqB;IACf,SAAS,CAAqB;IAC9B,eAAe,CAA2B;IAC1C,gBAAgB,CAA4B;IAE7D,YAAY,UAA2C;QACrD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,IAAI,oBAAoB,EAAE,CAAC;QACpE,IAAI,CAAC,eAAe;YAClB,UAAU,CAAC,eAAe,IAAI,IAAI,0BAA0B,EAAE,CAAC;QACjE,IAAI,CAAC,gBAAgB,GAAG,IAAI,yBAAyB,CAAC;YACpD,mBAAmB,EAAE,UAAU,CAAC,mBAAmB;YACnD,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,KAAK,EAAE,UAAU,CAAC,KAAK;SACxB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CACX,MAA2B,EAC3B,OAAoC;QAEpC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,mBAAmB,EAAE,CAAC;gBACzB,OAAO,IAAI,6BAA6B,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACnE,CAAC;YACD,KAAK,WAAW,EAAE,CAAC;gBACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC9D,CAAC;YACD,KAAK,aAAa,EAAE,CAAC;gBACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;oBAChD,UAAU,EAAE,MAAM,CAAC,UAAU;oBAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,MAAM,EAAE,OAAO,CAAC,MAAM;iBACvB,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACvD,CAAC;YACD,KAAK,iBAAiB,EAAE,CAAC;gBACvB,OAAO,IAAI,6BAA6B,CACtC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAC5C,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACK,qBAAqB,CAAC,QAAgB;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEnD,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uCAAuC,CAC/C,gBAAgB,QAAQ,kBAAkB;gBACxC,GAAG,KAAK,CAAC,iBAAiB,EAAE,uCAAuC;gBACnE,4DAA4D,CAC/D,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -2,8 +2,10 @@ import type { SimClock } from "../../../../util/clock/sim-clock.js";
|
|
|
2
2
|
import type { SimLambdaCodeResolveContext } from "./sim-lambda-code-resolver.js";
|
|
3
3
|
import { SimLambdaVmZipCode } from "./sim-lambda-vm-zip-code.js";
|
|
4
4
|
import type { SimLambdaVmSdkModuleProvider } from "./vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
5
|
+
import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
|
|
5
6
|
interface SimLambdaVmZipCodeFactoryProperties {
|
|
6
7
|
readonly vmSdkModuleProvider?: SimLambdaVmSdkModuleProvider | undefined;
|
|
8
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
7
9
|
readonly clock?: SimClock | undefined;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
@@ -15,6 +17,7 @@ interface SimLambdaVmZipCodeFactoryProperties {
|
|
|
15
17
|
*/
|
|
16
18
|
export declare class SimLambdaVmZipCodeFactory {
|
|
17
19
|
private readonly vmSdkModuleProvider;
|
|
20
|
+
private readonly outboundHttp;
|
|
18
21
|
private readonly clock;
|
|
19
22
|
constructor(properties: SimLambdaVmZipCodeFactoryProperties);
|
|
20
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-zip-code-factory.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAIpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-zip-code-factory.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAIpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;IACxE,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;GAMG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAEtB;IACd,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IACjE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IAE7C,YAAY,UAAU,EAAE,mCAAmC,EAI1D;IAED;;OAEG;IACH,IAAI,CACF,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,2BAA2B,GACnC,kBAAkB,CAcpB;IAED,OAAO,CAAC,KAAK;CAWd"}
|
|
@@ -11,9 +11,11 @@ import { SimLambdaVmZipCode } from "./sim-lambda-vm-zip-code.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export class SimLambdaVmZipCodeFactory {
|
|
13
13
|
vmSdkModuleProvider;
|
|
14
|
+
outboundHttp;
|
|
14
15
|
clock;
|
|
15
16
|
constructor(properties) {
|
|
16
17
|
this.vmSdkModuleProvider = properties.vmSdkModuleProvider;
|
|
18
|
+
this.outboundHttp = properties.outboundHttp;
|
|
17
19
|
this.clock = properties.clock;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -26,6 +28,7 @@ export class SimLambdaVmZipCodeFactory {
|
|
|
26
28
|
handlerName: context.handlerName,
|
|
27
29
|
environment: context.environment,
|
|
28
30
|
sdkModuleProvider: this.vmSdkModuleProvider,
|
|
31
|
+
outboundHttp: this.outboundHttp,
|
|
29
32
|
clock: this.clock,
|
|
30
33
|
});
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-zip-code-factory.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-zip-code-factory.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAUjE;;;;;;GAMG;AACH,MAAM,OAAO,yBAAyB;IACnB,mBAAmB,CAEtB;IACG,YAAY,CAAoC;IAChD,KAAK,CAAuB;IAE7C,YAAY,UAA+C;QACzD,IAAI,CAAC,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;QAC1D,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAoB,EACpB,OAAoC;QAEpC,aAAa,CACX,OAAO,CAAC,WAAW,EACnB,oEAAoE,CACrE,CAAC;QAEF,OAAO,IAAI,kBAAkB,CAAC;YAC5B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,iBAAiB,EAAE,IAAI,CAAC,mBAAmB;YAC3C,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,QAAoB;QAChC,IAAI,CAAC;YACH,OAAO,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,uCAAuC,CAC/C,yDAAyD;gBACvD,2BAA2B,EAC7B,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import type { SimClock } from "../../../../util/clock/sim-clock.js";
|
|
2
1
|
import type { SimZipArchive } from "../../../../util/zip/zip-archive.js";
|
|
3
2
|
import type { SimLambdaHandler } from "../sim-lambda-handler.type.js";
|
|
4
3
|
import { type SimLambdaVmSdkModuleProvider } from "./vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
5
|
-
import type { SimLambdaEnvironment } from "../environment/sim-lambda-environment.js";
|
|
6
4
|
import type { SimLambdaExecutableCode } from "./sim-lambda-executable-code.js";
|
|
5
|
+
import { type SimLambdaVmContextProperties } from "./vm/sim-lambda-vm-context.js";
|
|
7
6
|
import { type SimLambdaOutputSink } from "../logging/sim-lambda-output-sink.js";
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The archive and handler this code runs, on top of everything its sandbox is
|
|
9
|
+
* built from.
|
|
10
|
+
*/
|
|
11
|
+
interface SimLambdaVmZipCodeProperties extends SimLambdaVmContextProperties {
|
|
9
12
|
readonly archive: SimZipArchive;
|
|
10
13
|
readonly handlerName: string;
|
|
11
|
-
readonly environment: SimLambdaEnvironment;
|
|
12
14
|
readonly sdkModuleProvider?: SimLambdaVmSdkModuleProvider | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Clock the sandbox's Date reports, so function code asking JavaScript for
|
|
15
|
-
* the time gets the simulation's time.
|
|
16
|
-
*/
|
|
17
|
-
readonly clock?: SimClock | undefined;
|
|
18
15
|
}
|
|
19
16
|
/**
|
|
20
17
|
* Executable sim Lambda code compiled from a zip archive in a vm context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-zip-code.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-zip-code.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,CAAC;AAG9C;;;GAGG;AACH,UAAU,4BAA6B,SAAQ,4BAA4B;IACzE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;CACvE;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,YAAW,uBAAuB;;IAUpD,OAAO,CAAC,QAAQ,CAAC,UAAU;IATvC;;;OAGG;IACH,QAAQ,CAAC,eAAe,SAAS;IAKjC,YAA6B,UAAU,EAAE,4BAA4B,EAAI;IAEzE;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAE9C;IAED;;OAEG;IACH,eAAe,IAAI,gBAAgB,CAGlC;IAED,OAAO,CAAC,SAAS;IAyBjB;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;CAiB5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SimLambdaRuntimeError } from "../../error/sim-lambda-runtime.error.js";
|
|
2
2
|
import { SimLambdaNoVmSdkModuleProvider, } from "./vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
3
3
|
import { parseLambdaHandlerName } from "./sim-lambda-handler-name.js";
|
|
4
|
-
import { makeSimLambdaVmContext } from "./vm/sim-lambda-vm-context.js";
|
|
4
|
+
import { makeSimLambdaVmContext, } from "./vm/sim-lambda-vm-context.js";
|
|
5
5
|
import { simLambdaNoOutputSink, } from "../logging/sim-lambda-output-sink.js";
|
|
6
6
|
import { SimLambdaVmModules } from "./vm/sim-lambda-vm-modules.js";
|
|
7
7
|
/**
|
|
@@ -42,11 +42,11 @@ export class SimLambdaVmZipCode {
|
|
|
42
42
|
return this.#handler;
|
|
43
43
|
}
|
|
44
44
|
coldStart() {
|
|
45
|
-
const { archive, handlerName,
|
|
45
|
+
const { archive, handlerName, sdkModuleProvider } = this.properties;
|
|
46
46
|
const parsedName = parseLambdaHandlerName(handlerName);
|
|
47
47
|
const modules = new SimLambdaVmModules({
|
|
48
48
|
archive,
|
|
49
|
-
context: makeSimLambdaVmContext(
|
|
49
|
+
context: makeSimLambdaVmContext({ ...this.properties, sink: this.#sink }),
|
|
50
50
|
sdkModuleProvider: sdkModuleProvider ?? new SimLambdaNoVmSdkModuleProvider(),
|
|
51
51
|
});
|
|
52
52
|
const moduleExports = this.importHandlerModule(modules, parsedName.modulePath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-zip-code.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-zip-code.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/code/sim-lambda-vm-zip-code.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,OAAO,EACL,8BAA8B,GAE/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,sBAAsB,GAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,GAEtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAYnE;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAkB;IAUA,UAAU;IATvC;;;OAGG;IACM,eAAe,GAAG,KAAK,CAAC;IAEjC,QAAQ,CAA+B;IACvC,KAAK,GAAwB,qBAAqB,CAAC;IAEnD,YAA6B,UAAwC;0BAAxC,UAAU;IAAiC,CAAC;IAEzE;;;;;;OAMG;IACH,cAAc,CAAC,IAAyB;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,eAAe;QACb,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEO,SAAS;QACf,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QACpE,MAAM,UAAU,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAEvD,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC;YACrC,OAAO;YACP,OAAO,EAAE,sBAAsB,CAAC,E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AAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC1B,CAAC;YACD,MAAM,IAAI,qBAAqB,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AwsRegionName } from "../../../../../aws/sim-aws-region.js";
|
|
2
2
|
import type { SimAws } from "../../../../../aws/sim-aws.js";
|
|
3
|
+
import type { SimLambdaOutboundHttp } from "../../../outbound/sim-lambda-outbound-http.js";
|
|
3
4
|
import { type SimLambdaVmSdkModuleProvider } from "./sim-lambda-vm-sdk-module-provider.js";
|
|
4
5
|
interface SimSdkLambdaVmModuleProviderProperties {
|
|
5
6
|
readonly simAws: SimAws;
|
|
@@ -10,6 +11,13 @@ interface SimSdkLambdaVmModuleProviderProperties {
|
|
|
10
11
|
* package layouts that do not hoist dependencies.
|
|
11
12
|
*/
|
|
12
13
|
readonly requireModule?: ((specifier: string) => unknown) | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Where a request the transport modules carry is answered. The AWS service
|
|
16
|
+
* API endpoints alone by default, which is what this provider can reach on
|
|
17
|
+
* its own; a provider built beside a whole simulated environment is given
|
|
18
|
+
* one that answers for everything that environment serves.
|
|
19
|
+
*/
|
|
20
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Provides host-installed AWS SDK v3 packages to sim Lambda vm function
|
|
@@ -23,13 +31,13 @@ interface SimSdkLambdaVmModuleProviderProperties {
|
|
|
23
31
|
* A deployment package that bundles the SDK asks for no SDK module at all, so
|
|
24
32
|
* there is nothing there to intercept. Such a package still gets its HTTP
|
|
25
33
|
* transport from the runtime, and the modules provided for it answer requests
|
|
26
|
-
*
|
|
27
|
-
* the two paths a function takes is then only a question of how it was
|
|
34
|
+
* the simulation serves from the same simulation, by the same routing. Which
|
|
35
|
+
* of the two paths a function takes is then only a question of how it was
|
|
28
36
|
* packaged, rather than of whether it works.
|
|
29
37
|
*/
|
|
30
38
|
export declare class SimSdkLambdaVmModuleProvider implements SimLambdaVmSdkModuleProvider {
|
|
31
39
|
private readonly interceptor;
|
|
32
|
-
private readonly
|
|
40
|
+
private readonly outboundHttp;
|
|
33
41
|
private readonly requireModule;
|
|
34
42
|
private readonly providedModules;
|
|
35
43
|
constructor(properties: SimSdkLambdaVmModuleProviderProperties);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-sdk-lambda-vm-module-provider.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-sdk-lambda-vm-module-provider.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAO5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,wCAAwC,CAAC;AAIhD,UAAU,sCAAsC;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IACtE;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,4BAA6B,YAAW,4BAA4B;IAC/E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IACrD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;IAE9D,YAAY,UAAU,EAAE,sCAAsC,EAU7D;IAED;;;OAGG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAqBxC;IAED,OAAO,CAAC,iBAAiB;CA2B1B"}
|
|
@@ -2,8 +2,8 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { SimSdkModuleClientInterceptor } from "../../../../../../sdk/module/sim-sdk-module-client-interceptor.js";
|
|
4
4
|
import { SimSdkCommandDispatcher } from "../../../../../../sdk/sim-sdk-command-dispatcher.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { SimLambdaAwsApiOutbound } from "../../../outbound/sim-lambda-aws-api-outbound.js";
|
|
6
|
+
import { isSimLambdaHttpModuleSpecifier, makeSimLambdaHttpModule, simLambdaHttpModuleScheme, } from "../../../outbound/sim-lambda-http-module.js";
|
|
7
7
|
import { awsSdkPackagePrefix, } from "./sim-lambda-vm-sdk-module-provider.js";
|
|
8
8
|
const hostRequire = createRequire(import.meta.url);
|
|
9
9
|
/**
|
|
@@ -18,13 +18,13 @@ const hostRequire = createRequire(import.meta.url);
|
|
|
18
18
|
* A deployment package that bundles the SDK asks for no SDK module at all, so
|
|
19
19
|
* there is nothing there to intercept. Such a package still gets its HTTP
|
|
20
20
|
* transport from the runtime, and the modules provided for it answer requests
|
|
21
|
-
*
|
|
22
|
-
* the two paths a function takes is then only a question of how it was
|
|
21
|
+
* the simulation serves from the same simulation, by the same routing. Which
|
|
22
|
+
* of the two paths a function takes is then only a question of how it was
|
|
23
23
|
* packaged, rather than of whether it works.
|
|
24
24
|
*/
|
|
25
25
|
export class SimSdkLambdaVmModuleProvider {
|
|
26
26
|
interceptor;
|
|
27
|
-
|
|
27
|
+
outboundHttp;
|
|
28
28
|
requireModule;
|
|
29
29
|
providedModules = new Map();
|
|
30
30
|
constructor(properties) {
|
|
@@ -33,7 +33,8 @@ export class SimSdkLambdaVmModuleProvider {
|
|
|
33
33
|
sendHandler: (command, client) => dispatcher.dispatch(command, client, undefined),
|
|
34
34
|
defaultRegionName: properties.regionName,
|
|
35
35
|
});
|
|
36
|
-
this.
|
|
36
|
+
this.outboundHttp =
|
|
37
|
+
properties.outboundHttp ?? new SimLambdaAwsApiOutbound(properties);
|
|
37
38
|
this.requireModule = properties.requireModule ?? requireHostModule;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
@@ -41,7 +42,7 @@ export class SimSdkLambdaVmModuleProvider {
|
|
|
41
42
|
* undefined for other specifiers.
|
|
42
43
|
*/
|
|
43
44
|
provideModule(specifier) {
|
|
44
|
-
const isTransport =
|
|
45
|
+
const isTransport = isSimLambdaHttpModuleSpecifier(specifier);
|
|
45
46
|
if (!isTransport && !specifier.startsWith(awsSdkPackagePrefix)) {
|
|
46
47
|
return undefined;
|
|
47
48
|
}
|
|
@@ -51,7 +52,11 @@ export class SimSdkLambdaVmModuleProvider {
|
|
|
51
52
|
}
|
|
52
53
|
const hostExports = this.hostModuleExports(specifier);
|
|
53
54
|
const module = isTransport
|
|
54
|
-
?
|
|
55
|
+
? makeSimLambdaHttpModule({
|
|
56
|
+
hostModule: hostExports,
|
|
57
|
+
outbound: this.outboundHttp,
|
|
58
|
+
scheme: simLambdaHttpModuleScheme(specifier),
|
|
59
|
+
})
|
|
55
60
|
: this.interceptor.interceptModule(hostExports);
|
|
56
61
|
this.providedModules.set(specifier, module);
|
|
57
62
|
return module;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-sdk-lambda-vm-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mEAAmE,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-sdk-lambda-vm-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mEAAmE,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAG9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,mBAAmB,GAEpB,MAAM,wCAAwC,CAAC;AAEhD,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAoBnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,4BAA4B;IACtB,WAAW,CAAgC;IAC3C,YAAY,CAAwB;IACpC,aAAa,CAAiC;IAC9C,eAAe,GAAG,IAAI,GAAG,EAAmB,CAAC;IAE9D,YAAY,UAAkD;QAC5D,MAAM,UAAU,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,WAAW,GAAG,IAAI,6BAA6B,CAAC;YACnD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAoB,EAAE,CACjD,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;YACjD,iBAAiB,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ACrE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClC,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,oCAAoC;gBAC7D,+DAA+D;gBAC/D,kEAAkE;gBAClE,eAAe,EACjB,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,yCAAyC;gBAClE,uCAAuC,CAC1C,CAAC;QACJ,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;GAOG;AACH,SAAS,iBAAiB,CAAC,SAAiB;IAC1C,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP;6EACqE;QACrE,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,MAAM,IAAI,KAAK;QACf,CAAC,KAAK,CAAC,IAAI,KAAK,kBAAkB,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,CAAC,CAC7E,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,23 @@ import vm from "node:vm";
|
|
|
2
2
|
import { type SimClock } from "../../../../../util/clock/sim-clock.js";
|
|
3
3
|
import type { SimLambdaEnvironment } from "../../environment/sim-lambda-environment.js";
|
|
4
4
|
import { type SimLambdaOutputSink } from "../../logging/sim-lambda-output-sink.js";
|
|
5
|
+
import type { SimLambdaOutboundHttp } from "../../outbound/sim-lambda-outbound-http.js";
|
|
6
|
+
/**
|
|
7
|
+
* What the sandbox a function's code runs in is built from.
|
|
8
|
+
*/
|
|
9
|
+
export interface SimLambdaVmContextProperties {
|
|
10
|
+
readonly environment: SimLambdaEnvironment;
|
|
11
|
+
/** The time the sandbox reports, the real one by default. */
|
|
12
|
+
readonly clock?: SimClock | undefined;
|
|
13
|
+
/** Where the sandbox's output is recorded, nowhere by default. */
|
|
14
|
+
readonly sink?: SimLambdaOutputSink | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Where the sandbox's `fetch` requests to hostnames the simulation serves
|
|
17
|
+
* are answered. Without one every request reaches the network, as the host
|
|
18
|
+
* `fetch` would.
|
|
19
|
+
*/
|
|
20
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
21
|
+
}
|
|
5
22
|
/**
|
|
6
23
|
* Create the sandbox vm context that sim Lambda function code runs in.
|
|
7
24
|
*
|
|
@@ -14,7 +31,9 @@ import { type SimLambdaOutputSink } from "../../logging/sim-lambda-output-sink.j
|
|
|
14
31
|
* Zip code needs nothing like the process.env and Date handling the
|
|
15
32
|
* in-process handler path does: this sandbox already owns its globals, so
|
|
16
33
|
* both the host environment and the host clock are invisible here, and
|
|
17
|
-
* nothing outside the sandbox is touched to arrange that.
|
|
34
|
+
* nothing outside the sandbox is touched to arrange that. The same goes for
|
|
35
|
+
* the HTTP clients: the `fetch` in here is the sandbox's own, and it answers
|
|
36
|
+
* from the simulation for the hostnames the simulation serves.
|
|
18
37
|
*/
|
|
19
|
-
export declare function makeSimLambdaVmContext(
|
|
38
|
+
export declare function makeSimLambdaVmContext(properties: SimLambdaVmContextProperties): vm.Context;
|
|
20
39
|
//# sourceMappingURL=sim-lambda-vm-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-context.d.ts","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-context.d.ts","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGxF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEtC,kEAAkE;IAClE,QAAQ,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAEhD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,4BAA4B,GACvC,EAAE,CAAC,OAAO,CAyDZ"}
|
|
@@ -3,6 +3,7 @@ import vm from "node:vm";
|
|
|
3
3
|
import { makeSimClockDate } from "../../../../../util/clock/sim-clock-date.js";
|
|
4
4
|
import { SimRealClock, } from "../../../../../util/clock/sim-clock.js";
|
|
5
5
|
import { simLambdaNoOutputSink, } from "../../logging/sim-lambda-output-sink.js";
|
|
6
|
+
import { makeSimLambdaOutboundFetch } from "../../outbound/sim-lambda-outbound-fetch.js";
|
|
6
7
|
import { SimLambdaVmOutputStream } from "./sim-lambda-vm-output-stream.js";
|
|
7
8
|
/**
|
|
8
9
|
* Create the sandbox vm context that sim Lambda function code runs in.
|
|
@@ -16,9 +17,12 @@ import { SimLambdaVmOutputStream } from "./sim-lambda-vm-output-stream.js";
|
|
|
16
17
|
* Zip code needs nothing like the process.env and Date handling the
|
|
17
18
|
* in-process handler path does: this sandbox already owns its globals, so
|
|
18
19
|
* both the host environment and the host clock are invisible here, and
|
|
19
|
-
* nothing outside the sandbox is touched to arrange that.
|
|
20
|
+
* nothing outside the sandbox is touched to arrange that. The same goes for
|
|
21
|
+
* the HTTP clients: the `fetch` in here is the sandbox's own, and it answers
|
|
22
|
+
* from the simulation for the hostnames the simulation serves.
|
|
20
23
|
*/
|
|
21
|
-
export function makeSimLambdaVmContext(
|
|
24
|
+
export function makeSimLambdaVmContext(properties) {
|
|
25
|
+
const { environment, clock = new SimRealClock(), sink = simLambdaNoOutputSink, outboundHttp, } = properties;
|
|
22
26
|
// Writable standard streams, as the real runtime provides. Code that builds
|
|
23
27
|
// its own console over them, as AWS Lambda Powertools' logger does, throws
|
|
24
28
|
// at module load without them.
|
|
@@ -53,6 +57,18 @@ export function makeSimLambdaVmContext(environment, clock = new SimRealClock(),
|
|
|
53
57
|
URLSearchParams,
|
|
54
58
|
structuredClone,
|
|
55
59
|
crypto,
|
|
60
|
+
// The Fetch API the Node.js runtime provides, with the client itself
|
|
61
|
+
// routed into the simulation. The rest are the host's own, so the objects
|
|
62
|
+
// a handler builds and the ones the simulation answers with are the same
|
|
63
|
+
// kind of thing.
|
|
64
|
+
fetch: makeSimLambdaOutboundFetch(outboundHttp),
|
|
65
|
+
Headers,
|
|
66
|
+
Request,
|
|
67
|
+
Response,
|
|
68
|
+
FormData,
|
|
69
|
+
Blob,
|
|
70
|
+
AbortController,
|
|
71
|
+
AbortSignal,
|
|
56
72
|
});
|
|
57
73
|
}
|
|
58
74
|
//# sourceMappingURL=sim-lambda-vm-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-context.js","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAEL,YAAY,GACb,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,qBAAqB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-context.js","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAEL,YAAY,GACb,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,qBAAqB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAEzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAsB3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAwC;IAExC,MAAM,EACJ,WAAW,EACX,KAAK,GAAG,IAAI,YAAY,EAAE,EAC1B,IAAI,GAAG,qBAAqB,EAC5B,YAAY,GACb,GAAG,UAAU,CAAC;IAEf,4EAA4E;IAC5E,2EAA2E;IAC3E,+BAA+B;IAC/B,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjE,2EAA2E;IAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEtB,OAAO,EAAE,CAAC,aAAa,CAAC;QACtB,iEAAiE;QACjE,qEAAqE;QACrE,wEAAwE;QACxE,OAAO,EAAE,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACxC,MAAM;QACN,OAAO,EAAE;YACP,GAAG,EAAE,WAAW,CAAC,SAAS,EAAE;YAC5B,MAAM;YACN,MAAM;SACP;QACD,qEAAqE;QACrE,mEAAmE;QACnE,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAC7B,UAAU;QACV,YAAY;QACZ,WAAW;QACX,aAAa;QACb,YAAY;QACZ,cAAc;QACd,WAAW;QACX,WAAW;QACX,GAAG;QACH,eAAe;QACf,eAAe;QACf,MAAM;QACN,qEAAqE;QACrE,0EAA0E;QAC1E,yEAAyE;QACzE,iBAAiB;QACjB,KAAK,EAAE,0BAA0B,CAAC,YAAY,CAAC;QAC/C,OAAO;QACP,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,IAAI;QACJ,eAAe;QACf,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimClock } from "../../../../util/clock/sim-clock.js";
|
|
2
|
+
import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
|
|
3
|
+
/**
|
|
4
|
+
* What an invocation of host-scope code has bridged to it.
|
|
5
|
+
*/
|
|
6
|
+
interface SimLambdaHostScope {
|
|
7
|
+
/** The time the invocation reports as the current time. */
|
|
8
|
+
readonly clock: SimClock;
|
|
9
|
+
/**
|
|
10
|
+
* Where the requests the invocation makes to hostnames the simulation
|
|
11
|
+
* serves are answered. A function outside a simulated environment has none,
|
|
12
|
+
* and its requests go where they were addressed.
|
|
13
|
+
*/
|
|
14
|
+
readonly outboundHttp: SimLambdaOutboundHttp | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Run an invocation of code in the host scope with the process globals it
|
|
18
|
+
* reads bridged to its simulation.
|
|
19
|
+
*
|
|
20
|
+
* Only code running in the host scope needs this. Zip code reads the Date and
|
|
21
|
+
* the HTTP clients its own vm sandbox was given, so a function backed by one
|
|
22
|
+
* leaves the globals alone entirely and never comes here.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runSimLambdaInHostScope<T>(scope: SimLambdaHostScope, run: () => Promise<T>): Promise<T>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=sim-lambda-host-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-host-scope.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-host-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAIrF;;GAEG;AACH,UAAU,kBAAkB;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC1D;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAQZ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { simLambdaProcessClock } from "./sim-lambda-process-clock.js";
|
|
2
|
+
import { simLambdaProcessOutbound } from "./sim-lambda-process-outbound.js";
|
|
3
|
+
/**
|
|
4
|
+
* Run an invocation of code in the host scope with the process globals it
|
|
5
|
+
* reads bridged to its simulation.
|
|
6
|
+
*
|
|
7
|
+
* Only code running in the host scope needs this. Zip code reads the Date and
|
|
8
|
+
* the HTTP clients its own vm sandbox was given, so a function backed by one
|
|
9
|
+
* leaves the globals alone entirely and never comes here.
|
|
10
|
+
*/
|
|
11
|
+
export async function runSimLambdaInHostScope(scope, run) {
|
|
12
|
+
const { outboundHttp } = scope;
|
|
13
|
+
return await simLambdaProcessClock.run(scope.clock, async () => outboundHttp === undefined
|
|
14
|
+
? await run()
|
|
15
|
+
: await simLambdaProcessOutbound.run(outboundHttp, run));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=sim-lambda-host-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-host-scope.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-host-scope.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAiB5E;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAAyB,EACzB,GAAqB;IAErB,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,MAAM,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAC7D,YAAY,KAAK,SAAS;QACxB,CAAC,CAAC,MAAM,GAAG,EAAE;QACb,CAAC,CAAC,MAAM,wBAAwB,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
|
|
2
|
+
/**
|
|
3
|
+
* Replace the process-wide HTTP clients with ones an outbound HTTP answers
|
|
4
|
+
* for.
|
|
5
|
+
*
|
|
6
|
+
* The global `fetch` is defined rather than assigned, to keep it the
|
|
7
|
+
* configurable, writable, non-enumerable global property it already was:
|
|
8
|
+
* anything else replacing it has to find what it expects.
|
|
9
|
+
*
|
|
10
|
+
* The transport modules are what a handler holds, so the two functions that
|
|
11
|
+
* start a request are replaced on them in place, leaving everything else the
|
|
12
|
+
* modules export as it was. The built-in modules' named ES module exports are
|
|
13
|
+
* a snapshot of those properties, so they are re-synchronised afterwards for
|
|
14
|
+
* the handler that imported `request` by name rather than the module.
|
|
15
|
+
*/
|
|
16
|
+
export declare function installSimLambdaOutboundClients(outbound: SimLambdaOutboundHttp): void;
|
|
17
|
+
//# sourceMappingURL=sim-lambda-outbound-clients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-outbound-clients.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-outbound-clients.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAWrF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAkBN"}
|