alchemy 0.11.1 → 0.11.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/lib/aws/function.d.ts +6 -1
- package/lib/aws/function.js +6 -1
- package/package.json +1 -1
- package/src/aws/function.ts +11 -1
package/lib/aws/function.d.ts
CHANGED
|
@@ -59,6 +59,10 @@ export interface FunctionProps {
|
|
|
59
59
|
* Function URL configuration for direct HTTP(S) invocation
|
|
60
60
|
*/
|
|
61
61
|
url?: {
|
|
62
|
+
/**
|
|
63
|
+
* Configure type of response for the function URL
|
|
64
|
+
*/
|
|
65
|
+
invokeMode?: "BUFFERED" | "RESPONSE_STREAM";
|
|
62
66
|
/**
|
|
63
67
|
* Authentication type for the function URL
|
|
64
68
|
*/
|
|
@@ -220,7 +224,7 @@ export interface Function extends Resource<"lambda::Function">, FunctionProps {
|
|
|
220
224
|
* });
|
|
221
225
|
*
|
|
222
226
|
* @example
|
|
223
|
-
* // Create a function with a public URL endpoint and
|
|
227
|
+
* // Create a function with a public URL endpoint, CORS and optional response streaming
|
|
224
228
|
* const apiFunction = await Function("public-api", {
|
|
225
229
|
* functionName: "public-api",
|
|
226
230
|
* zipPath: "./dist/api.zip",
|
|
@@ -228,6 +232,7 @@ export interface Function extends Resource<"lambda::Function">, FunctionProps {
|
|
|
228
232
|
* handler: "api.handler",
|
|
229
233
|
* url: {
|
|
230
234
|
* authType: "NONE",
|
|
235
|
+
* invokeMode: "RESPONSE_STREAM",
|
|
231
236
|
* cors: {
|
|
232
237
|
* allowOrigins: ["*"],
|
|
233
238
|
* allowMethods: ["GET", "POST"],
|
package/lib/aws/function.js
CHANGED
|
@@ -38,7 +38,7 @@ import { ignore } from "../util/ignore";
|
|
|
38
38
|
* });
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* // Create a function with a public URL endpoint and
|
|
41
|
+
* // Create a function with a public URL endpoint, CORS and optional response streaming
|
|
42
42
|
* const apiFunction = await Function("public-api", {
|
|
43
43
|
* functionName: "public-api",
|
|
44
44
|
* zipPath: "./dist/api.zip",
|
|
@@ -46,6 +46,7 @@ import { ignore } from "../util/ignore";
|
|
|
46
46
|
* handler: "api.handler",
|
|
47
47
|
* url: {
|
|
48
48
|
* authType: "NONE",
|
|
49
|
+
* invokeMode: "RESPONSE_STREAM",
|
|
49
50
|
* cors: {
|
|
50
51
|
* allowOrigins: ["*"],
|
|
51
52
|
* allowMethods: ["GET", "POST"],
|
|
@@ -122,6 +123,7 @@ export const Function = Resource("lambda::Function", async function (id, props)
|
|
|
122
123
|
const updateResult = await client.send(new UpdateFunctionUrlConfigCommand({
|
|
123
124
|
FunctionName: props.functionName,
|
|
124
125
|
AuthType: props.url.authType || "NONE",
|
|
126
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
125
127
|
Cors: props.url.cors
|
|
126
128
|
? {
|
|
127
129
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -157,6 +159,7 @@ export const Function = Resource("lambda::Function", async function (id, props)
|
|
|
157
159
|
const createResult = await client.send(new CreateFunctionUrlConfigCommand({
|
|
158
160
|
FunctionName: props.functionName,
|
|
159
161
|
AuthType: props.url.authType || "NONE",
|
|
162
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
160
163
|
Cors: props.url.cors
|
|
161
164
|
? {
|
|
162
165
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -194,6 +197,7 @@ export const Function = Resource("lambda::Function", async function (id, props)
|
|
|
194
197
|
const createResult = await client.send(new CreateFunctionUrlConfigCommand({
|
|
195
198
|
FunctionName: props.functionName,
|
|
196
199
|
AuthType: props.url.authType || "NONE",
|
|
200
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
197
201
|
Cors: props.url.cors
|
|
198
202
|
? {
|
|
199
203
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -300,6 +304,7 @@ export const Function = Resource("lambda::Function", async function (id, props)
|
|
|
300
304
|
const createResult = await client.send(new CreateFunctionUrlConfigCommand({
|
|
301
305
|
FunctionName: props.functionName,
|
|
302
306
|
AuthType: props.url.authType || "NONE",
|
|
307
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
303
308
|
Cors: props.url.cors
|
|
304
309
|
? {
|
|
305
310
|
AllowCredentials: props.url.cors.allowCredentials,
|
package/package.json
CHANGED
package/src/aws/function.ts
CHANGED
|
@@ -88,6 +88,11 @@ export interface FunctionProps {
|
|
|
88
88
|
* Function URL configuration for direct HTTP(S) invocation
|
|
89
89
|
*/
|
|
90
90
|
url?: {
|
|
91
|
+
/**
|
|
92
|
+
* Configure type of response for the function URL
|
|
93
|
+
*/
|
|
94
|
+
invokeMode?: "BUFFERED" | "RESPONSE_STREAM";
|
|
95
|
+
|
|
91
96
|
/**
|
|
92
97
|
* Authentication type for the function URL
|
|
93
98
|
*/
|
|
@@ -277,7 +282,7 @@ export interface Function extends Resource<"lambda::Function">, FunctionProps {
|
|
|
277
282
|
* });
|
|
278
283
|
*
|
|
279
284
|
* @example
|
|
280
|
-
* // Create a function with a public URL endpoint and
|
|
285
|
+
* // Create a function with a public URL endpoint, CORS and optional response streaming
|
|
281
286
|
* const apiFunction = await Function("public-api", {
|
|
282
287
|
* functionName: "public-api",
|
|
283
288
|
* zipPath: "./dist/api.zip",
|
|
@@ -285,6 +290,7 @@ export interface Function extends Resource<"lambda::Function">, FunctionProps {
|
|
|
285
290
|
* handler: "api.handler",
|
|
286
291
|
* url: {
|
|
287
292
|
* authType: "NONE",
|
|
293
|
+
* invokeMode: "RESPONSE_STREAM",
|
|
288
294
|
* cors: {
|
|
289
295
|
* allowOrigins: ["*"],
|
|
290
296
|
* allowMethods: ["GET", "POST"],
|
|
@@ -387,6 +393,7 @@ export const Function = Resource(
|
|
|
387
393
|
new UpdateFunctionUrlConfigCommand({
|
|
388
394
|
FunctionName: props.functionName,
|
|
389
395
|
AuthType: props.url.authType || "NONE",
|
|
396
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
390
397
|
Cors: props.url.cors
|
|
391
398
|
? {
|
|
392
399
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -425,6 +432,7 @@ export const Function = Resource(
|
|
|
425
432
|
new CreateFunctionUrlConfigCommand({
|
|
426
433
|
FunctionName: props.functionName,
|
|
427
434
|
AuthType: props.url.authType || "NONE",
|
|
435
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
428
436
|
Cors: props.url.cors
|
|
429
437
|
? {
|
|
430
438
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -465,6 +473,7 @@ export const Function = Resource(
|
|
|
465
473
|
new CreateFunctionUrlConfigCommand({
|
|
466
474
|
FunctionName: props.functionName,
|
|
467
475
|
AuthType: props.url.authType || "NONE",
|
|
476
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
468
477
|
Cors: props.url.cors
|
|
469
478
|
? {
|
|
470
479
|
AllowCredentials: props.url.cors.allowCredentials,
|
|
@@ -585,6 +594,7 @@ export const Function = Resource(
|
|
|
585
594
|
new CreateFunctionUrlConfigCommand({
|
|
586
595
|
FunctionName: props.functionName,
|
|
587
596
|
AuthType: props.url.authType || "NONE",
|
|
597
|
+
InvokeMode: props.url.invokeMode || "BUFFERED",
|
|
588
598
|
Cors: props.url.cors
|
|
589
599
|
? {
|
|
590
600
|
AllowCredentials: props.url.cors.allowCredentials,
|