@aws/nx-plugin 0.76.0 → 0.78.0

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.
Files changed (57) hide show
  1. package/LICENSE-THIRD-PARTY +96 -10
  2. package/package.json +9 -9
  3. package/src/infra/app/__snapshots__/generator.spec.ts.snap +378 -7
  4. package/src/infra/app/files/app/src/main.ts.template +17 -2
  5. package/src/infra/app/generator.js +34 -9
  6. package/src/infra/app/generator.js.map +1 -1
  7. package/src/infra/app/schema.d.ts +1 -0
  8. package/src/infra/app/schema.json +6 -0
  9. package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +16 -13
  10. package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +1 -1
  11. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
  12. package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +6 -6
  13. package/src/smithy/react-connection/__snapshots__/generator.spec.ts.snap +2 -2
  14. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +23 -17
  15. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +60 -34
  16. package/src/trpc/backend/files/src/handler.ts.template +48 -0
  17. package/src/trpc/backend/files/src/index.ts.template +1 -1
  18. package/src/trpc/backend/files/src/router.ts.template +0 -38
  19. package/src/trpc/backend/files/src/schema/z-async-iterable.ts.template +115 -0
  20. package/src/trpc/backend/generator.js +6 -2
  21. package/src/trpc/backend/generator.js.map +1 -1
  22. package/src/trpc/react/__snapshots__/generator.spec.ts.snap +274 -27
  23. package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +57 -1
  24. package/src/trpc/react/generator.js +11 -1
  25. package/src/trpc/react/generator.js.map +1 -1
  26. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  27. package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +1 -1
  28. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +13 -13
  29. package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +13 -1
  30. package/src/utils/api-constructs/files/cdk/core/api/trpc/trpc-utils.ts.template +3 -3
  31. package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +8 -3
  32. package/src/utils/api-constructs/files/terraform/core/api/rest/rest-api/rest-api.tf.template +1 -1
  33. package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +1 -1
  34. package/src/utils/files/common/infra-config/src/index.ts.template +3 -0
  35. package/src/utils/files/common/infra-config/src/resolve-stage.ts.template +23 -0
  36. package/src/utils/files/common/infra-config/src/stages.config.ts.template +48 -0
  37. package/src/utils/files/common/infra-config/src/stages.types.ts.template +66 -0
  38. package/src/utils/files/common/scripts/src/index.ts.template +1 -0
  39. package/src/utils/files/common/scripts/src/infra-deploy.ts.template +2 -0
  40. package/src/utils/files/common/scripts/src/infra-destroy.ts.template +2 -0
  41. package/src/utils/files/common/scripts/src/stage-credentials/cdk-command.ts.template +18 -0
  42. package/src/utils/files/common/scripts/src/stage-credentials/credentials.ts.template +100 -0
  43. package/src/utils/files/common/scripts/src/stage-credentials/run.ts.template +52 -0
  44. package/src/utils/files/common/scripts/src/stage-credentials/stage-parser.ts.template +15 -0
  45. package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +81 -33
  46. package/src/utils/shared-constructs-constants.d.ts +4 -0
  47. package/src/utils/shared-constructs-constants.js +5 -1
  48. package/src/utils/shared-constructs-constants.js.map +1 -1
  49. package/src/utils/shared-infra-config.d.ts +11 -0
  50. package/src/utils/shared-infra-config.js +47 -0
  51. package/src/utils/shared-infra-config.js.map +1 -0
  52. package/src/utils/shared-scripts.d.ts +12 -0
  53. package/src/utils/shared-scripts.js +49 -0
  54. package/src/utils/shared-scripts.js.map +1 -0
  55. package/src/utils/versions.d.ts +31 -28
  56. package/src/utils/versions.js +30 -27
  57. package/src/utils/versions.js.map +1 -1
@@ -12,6 +12,8 @@ const generator_1 = tslib_1.__importStar(require("../../ts/lib/generator"));
12
12
  const versions_1 = require("../../utils/versions");
13
13
  const npm_scope_1 = require("../../utils/npm-scope");
14
14
  const shared_constructs_1 = require("../../utils/shared-constructs");
15
+ const shared_infra_config_1 = require("../../utils/shared-infra-config");
16
+ const shared_scripts_1 = require("../../utils/shared-scripts");
15
17
  const shared_constructs_constants_1 = require("../../utils/shared-constructs-constants");
16
18
  const path_1 = tslib_1.__importDefault(require("path"));
17
19
  const format_1 = require("../../utils/format");
@@ -23,6 +25,7 @@ const py_1 = require("../../utils/py");
23
25
  exports.INFRA_APP_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
24
26
  function tsInfraGenerator(tree, schema) {
25
27
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ var _a;
26
29
  const lib = (0, generator_1.getTsLibDetails)(tree, schema);
27
30
  yield (0, generator_1.default)(tree, schema);
28
31
  (0, nx_1.addGeneratorMetadata)(tree, lib.fullyQualifiedName, exports.INFRA_APP_GENERATOR_INFO);
@@ -30,6 +33,13 @@ function tsInfraGenerator(tree, schema) {
30
33
  yield (0, shared_constructs_1.sharedConstructsGenerator)(tree, {
31
34
  iacProvider: 'CDK',
32
35
  });
36
+ // Shared infra-config and infra-scripts packages (lazy creation, only when enabled)
37
+ const enableStageConfig = (_a = schema.enableStageConfig) !== null && _a !== void 0 ? _a : false;
38
+ if (enableStageConfig) {
39
+ yield (0, shared_infra_config_1.sharedInfraConfigGenerator)(tree);
40
+ yield (0, shared_scripts_1.sharedScriptsGenerator)(tree);
41
+ }
42
+ const synthDirFromRoot = `/dist/${lib.dir}/cdk.out`;
33
43
  const synthDirFromProject = lib.dir
34
44
  .split('/')
35
45
  .map(() => '..')
@@ -46,7 +56,7 @@ function tsInfraGenerator(tree, schema) {
46
56
  tree.delete((0, devkit_1.joinPathFragments)(libraryRoot, 'src'));
47
57
  (0, devkit_1.generateFiles)(tree, // the virtual file system
48
58
  (0, devkit_1.joinPathFragments)(__dirname, './files/app'), // path to the file templates
49
- libraryRoot, Object.assign({ synthDir: synthDirFromProject, scopeAlias: scopeAlias, namespace: (0, names_1.kebabCase)(fullyQualifiedName), fullyQualifiedName, pkgMgrCmd: (0, devkit_1.getPackageManagerCommand)().exec, dir: lib.dir }, schema), {
59
+ libraryRoot, Object.assign({ synthDir: synthDirFromProject, scopeAlias: scopeAlias, namespace: (0, names_1.kebabCase)(fullyQualifiedName), fullyQualifiedName, pkgMgrCmd: (0, devkit_1.getPackageManagerCommand)().exec, dir: lib.dir, enableStageConfig }, schema), {
50
60
  overwriteStrategy: devkit_1.OverwriteStrategy.Overwrite,
51
61
  });
52
62
  (0, devkit_1.updateJson)(tree, `${libraryRoot}/project.json`, (config) => {
@@ -84,10 +94,14 @@ function tsInfraGenerator(tree, schema) {
84
94
  config.targets.deploy = {
85
95
  executor: 'nx:run-commands',
86
96
  dependsOn: ['^build', 'compile'],
87
- options: {
88
- cwd: '{projectRoot}',
89
- command: `cdk deploy --require-approval=never`,
90
- },
97
+ options: enableStageConfig
98
+ ? {
99
+ command: `tsx packages/common/scripts/src/infra-deploy.ts ${libraryRoot}`,
100
+ }
101
+ : {
102
+ cwd: '{projectRoot}',
103
+ command: 'cdk deploy --require-approval=never',
104
+ },
91
105
  };
92
106
  config.targets['deploy-ci'] = {
93
107
  executor: 'nx:run-commands',
@@ -99,10 +113,14 @@ function tsInfraGenerator(tree, schema) {
99
113
  config.targets.destroy = {
100
114
  executor: 'nx:run-commands',
101
115
  dependsOn: ['^build', 'compile'],
102
- options: {
103
- cwd: '{projectRoot}',
104
- command: `cdk destroy --require-approval=never`,
105
- },
116
+ options: enableStageConfig
117
+ ? {
118
+ command: `tsx packages/common/scripts/src/infra-destroy.ts ${libraryRoot}`,
119
+ }
120
+ : {
121
+ cwd: '{projectRoot}',
122
+ command: 'cdk destroy --require-approval=never',
123
+ },
106
124
  };
107
125
  config.targets['destroy-ci'] = {
108
126
  executor: 'nx:run-commands',
@@ -140,6 +158,13 @@ function tsInfraGenerator(tree, schema) {
140
158
  {
141
159
  path: `${path_1.default.relative(libraryRoot, `${tree.root}/${shared_constructs_constants_1.PACKAGES_DIR}`)}/${shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR}/tsconfig.lib.json`,
142
160
  },
161
+ ...(enableStageConfig
162
+ ? [
163
+ {
164
+ path: `${path_1.default.relative(libraryRoot, `${tree.root}/${shared_constructs_constants_1.PACKAGES_DIR}`)}/${shared_constructs_constants_1.SHARED_INFRA_CONFIG_DIR}/tsconfig.json`,
165
+ },
166
+ ]
167
+ : []),
143
168
  ] })));
144
169
  yield (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [exports.INFRA_APP_GENERATOR_INFO]);
145
170
  yield (0, format_1.formatFilesInSubtree)(tree);
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"names":[],"mappings":";;;AAyCA,4CAsKC;;AA/MD;;;GAGG;AACH,uCAYoB;AAEpB,4EAA6E;AAC7E,mDAAoD;AACpD,qDAAwE;AACxE,qEAA0E;AAC1E,yFAGiD;AACjD,wDAAwB;AACxB,+CAA0D;AAC1D,+CAAoD;AACpD,uCAIwB;AACxB,iDAAsE;AACtE,6CAA8C;AAC9C,uCAA4C;AAE/B,QAAA,wBAAwB,GACnC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAE/B,SAAsB,gBAAgB,CACpC,IAAU,EACV,MAA8B;;QAE9B,MAAM,GAAG,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,IAAA,mBAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEvC,IAAA,yBAAoB,EAAC,IAAI,EAAE,GAAG,CAAC,kBAAkB,EAAE,gCAAwB,CAAC,CAAC;QAE7E,iEAAiE;QACjE,MAAM,IAAA,6CAAyB,EAAC,IAAI,EAAE;YACpC,WAAW,EAAE,KAAK;SAC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AExE,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;QACjC,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,gBAAgB,CAAC"}
@@ -8,4 +8,5 @@ export interface TsInfraGeneratorSchema {
8
8
  // unitTestRunner?: 'jest' | 'vitest' | 'none';
9
9
  // linter?: Linter;
10
10
  skipInstall?: boolean;
11
+ enableStageConfig?: boolean;
11
12
  }
@@ -21,6 +21,12 @@
21
21
  "x-priority": "important",
22
22
  "default": "packages",
23
23
  "x-prompt": "What directory would you like to store your application in?"
24
+ },
25
+ "enableStageConfig": {
26
+ "description": "Enable centralized stage configuration (credentials, account, region) for multi-environment CDK deployments.",
27
+ "type": "boolean",
28
+ "default": false,
29
+ "x-prompt": "Would you like to enable centralized stage credential configuration?"
24
30
  }
25
31
  },
26
32
  "required": ["name"]
@@ -942,7 +942,10 @@ export class TestApi<
942
942
  } satisfies FunctionProps,
943
943
  buildDefaultIntegration: (op, props: FunctionProps) => {
944
944
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
945
- return { handler, integration: new LambdaIntegration(handler) };
945
+ return {
946
+ handler,
947
+ integration: new LambdaIntegration(handler),
948
+ };
946
949
  },
947
950
  });
948
951
  };
@@ -3123,7 +3126,7 @@ terraform {
3123
3126
  required_providers {
3124
3127
  aws = {
3125
3128
  source = "hashicorp/aws"
3126
- version = "~> 6.0"
3129
+ version = "~> 6.33"
3127
3130
  }
3128
3131
  }
3129
3132
  }
@@ -3270,7 +3273,7 @@ output "api_root_resource_id" {
3270
3273
  required_providers {
3271
3274
  aws = {
3272
3275
  source = "hashicorp/aws"
3273
- version = "~> 6.0"
3276
+ version = "~> 6.33"
3274
3277
  }
3275
3278
  }
3276
3279
  }
@@ -3467,8 +3470,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
3467
3470
  http_method = aws_api_gateway_method.proxy_method.http_method
3468
3471
 
3469
3472
  integration_http_method = "POST"
3470
- type = "AWS_PROXY"
3471
- uri = aws_lambda_function.api_lambda.invoke_arn
3473
+ type = "AWS_PROXY"
3474
+ uri = aws_lambda_function.api_lambda.invoke_arn
3472
3475
 
3473
3476
  depends_on = [aws_lambda_function.api_lambda]
3474
3477
  }
@@ -3759,7 +3762,7 @@ terraform {
3759
3762
  required_providers {
3760
3763
  aws = {
3761
3764
  source = "hashicorp/aws"
3762
- version = "~> 6.0"
3765
+ version = "~> 6.33"
3763
3766
  }
3764
3767
  }
3765
3768
  }
@@ -3906,7 +3909,7 @@ output "api_root_resource_id" {
3906
3909
  required_providers {
3907
3910
  aws = {
3908
3911
  source = "hashicorp/aws"
3909
- version = "~> 6.0"
3912
+ version = "~> 6.33"
3910
3913
  }
3911
3914
  }
3912
3915
  }
@@ -4085,8 +4088,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
4085
4088
  http_method = aws_api_gateway_method.proxy_method.http_method
4086
4089
 
4087
4090
  integration_http_method = "POST"
4088
- type = "AWS_PROXY"
4089
- uri = aws_lambda_function.api_lambda.invoke_arn
4091
+ type = "AWS_PROXY"
4092
+ uri = aws_lambda_function.api_lambda.invoke_arn
4090
4093
 
4091
4094
  depends_on = [aws_lambda_function.api_lambda]
4092
4095
  }
@@ -4387,7 +4390,7 @@ terraform {
4387
4390
  required_providers {
4388
4391
  aws = {
4389
4392
  source = "hashicorp/aws"
4390
- version = "~> 6.0"
4393
+ version = "~> 6.33"
4391
4394
  }
4392
4395
  }
4393
4396
  }
@@ -4534,7 +4537,7 @@ output "api_root_resource_id" {
4534
4537
  required_providers {
4535
4538
  aws = {
4536
4539
  source = "hashicorp/aws"
4537
- version = "~> 6.0"
4540
+ version = "~> 6.33"
4538
4541
  }
4539
4542
  }
4540
4543
  }
@@ -4713,8 +4716,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
4713
4716
  http_method = aws_api_gateway_method.proxy_method.http_method
4714
4717
 
4715
4718
  integration_http_method = "POST"
4716
- type = "AWS_PROXY"
4717
- uri = aws_lambda_function.api_lambda.invoke_arn
4719
+ type = "AWS_PROXY"
4720
+ uri = aws_lambda_function.api_lambda.invoke_arn
4718
4721
 
4719
4722
  depends_on = [aws_lambda_function.api_lambda]
4720
4723
  }
@@ -182,7 +182,7 @@ const useCreateTestApiClient = (): TestApi => {
182
182
  () =>
183
183
  new TestApi({
184
184
  url: apiUrl,
185
- fetch: sigv4Client,
185
+ fetch: sigv4Client.fetch,
186
186
  }),
187
187
  [apiUrl, sigv4Client],
188
188
  );
@@ -562,8 +562,8 @@ name = "proj.test_project"
562
562
  version = "0.1.0"
563
563
  dependencies = [
564
564
  "mcp==1.26.0",
565
- "uvicorn==0.40.0",
566
- "boto3==1.42.49",
565
+ "uvicorn==0.41.0",
566
+ "boto3==1.42.54",
567
567
  "aws-opentelemetry-distro==0.15.0"
568
568
  ]
569
569
 
@@ -589,16 +589,16 @@ version = "0.1.0"
589
589
  dependencies = [
590
590
  "aws-opentelemetry-distro==0.15.0",
591
591
  "bedrock-agentcore==0.1.7",
592
- "fastapi==0.129.0",
593
- "boto3==1.42.49",
592
+ "fastapi==0.131.0",
593
+ "boto3==1.42.54",
594
594
  "mcp==1.26.0",
595
- "strands-agents==1.26.0",
596
- "strands-agents-tools==0.2.20",
597
- "uvicorn==0.40.0"
595
+ "strands-agents==1.27.0",
596
+ "strands-agents-tools==0.2.21",
597
+ "uvicorn==0.41.0"
598
598
  ]
599
599
 
600
600
  [dependency-groups]
601
- dev = [ "fastapi[standard]==0.129.0" ]
601
+ dev = [ "fastapi[standard]==0.131.0" ]
602
602
 
603
603
  [tool.uv]
604
604
  dev-dependencies = [ ]
@@ -57,7 +57,7 @@ const useCreateTestApiClient = (): TestApi => {
57
57
  () =>
58
58
  new TestApi({
59
59
  url: apiUrl,
60
- fetch: sigv4Client,
60
+ fetch: sigv4Client.fetch,
61
61
  }),
62
62
  [apiUrl, sigv4Client],
63
63
  );
@@ -175,7 +175,7 @@ const useCreateTestApiClient = (): TestApi => {
175
175
  () =>
176
176
  new TestApi({
177
177
  url: apiUrl,
178
- fetch: sigv4Client,
178
+ fetch: sigv4Client.fetch,
179
179
  }),
180
180
  [apiUrl, sigv4Client],
181
181
  );
@@ -123,7 +123,10 @@ export class TestApi<
123
123
  } satisfies FunctionProps,
124
124
  buildDefaultIntegration: (op, props: FunctionProps) => {
125
125
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
126
- return { handler, integration: new LambdaIntegration(handler) };
126
+ return {
127
+ handler,
128
+ integration: new LambdaIntegration(handler),
129
+ };
127
130
  },
128
131
  });
129
132
  };
@@ -281,7 +284,10 @@ export class TestApi<
281
284
  } satisfies FunctionProps,
282
285
  buildDefaultIntegration: (op, props: FunctionProps) => {
283
286
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
284
- return { handler, integration: new LambdaIntegration(handler) };
287
+ return {
288
+ handler,
289
+ integration: new LambdaIntegration(handler),
290
+ };
285
291
  },
286
292
  });
287
293
  };
@@ -385,7 +391,7 @@ terraform {
385
391
  required_providers {
386
392
  aws = {
387
393
  source = "hashicorp/aws"
388
- version = "~> 6.0"
394
+ version = "~> 6.33"
389
395
  }
390
396
  }
391
397
  }
@@ -535,7 +541,7 @@ exports[`tsSmithyApiGenerator > should generate smithy ts api with Terraform pro
535
541
  required_providers {
536
542
  aws = {
537
543
  source = "hashicorp/aws"
538
- version = "~> 6.0"
544
+ version = "~> 6.33"
539
545
  }
540
546
  }
541
547
  }
@@ -714,8 +720,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
714
720
  http_method = aws_api_gateway_method.proxy_method.http_method
715
721
 
716
722
  integration_http_method = "POST"
717
- type = "AWS_PROXY"
718
- uri = aws_lambda_function.api_lambda.invoke_arn
723
+ type = "AWS_PROXY"
724
+ uri = aws_lambda_function.api_lambda.invoke_arn
719
725
 
720
726
  depends_on = [aws_lambda_function.api_lambda]
721
727
  }
@@ -1391,7 +1397,7 @@ terraform {
1391
1397
  required_providers {
1392
1398
  aws = {
1393
1399
  source = "hashicorp/aws"
1394
- version = "~> 6.0"
1400
+ version = "~> 6.33"
1395
1401
  }
1396
1402
  }
1397
1403
  }
@@ -1538,7 +1544,7 @@ output "api_root_resource_id" {
1538
1544
  required_providers {
1539
1545
  aws = {
1540
1546
  source = "hashicorp/aws"
1541
- version = "~> 6.0"
1547
+ version = "~> 6.33"
1542
1548
  }
1543
1549
  }
1544
1550
  }
@@ -1735,8 +1741,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
1735
1741
  http_method = aws_api_gateway_method.proxy_method.http_method
1736
1742
 
1737
1743
  integration_http_method = "POST"
1738
- type = "AWS_PROXY"
1739
- uri = aws_lambda_function.api_lambda.invoke_arn
1744
+ type = "AWS_PROXY"
1745
+ uri = aws_lambda_function.api_lambda.invoke_arn
1740
1746
 
1741
1747
  depends_on = [aws_lambda_function.api_lambda]
1742
1748
  }
@@ -2027,7 +2033,7 @@ terraform {
2027
2033
  required_providers {
2028
2034
  aws = {
2029
2035
  source = "hashicorp/aws"
2030
- version = "~> 6.0"
2036
+ version = "~> 6.33"
2031
2037
  }
2032
2038
  }
2033
2039
  }
@@ -2174,7 +2180,7 @@ output "api_root_resource_id" {
2174
2180
  required_providers {
2175
2181
  aws = {
2176
2182
  source = "hashicorp/aws"
2177
- version = "~> 6.0"
2183
+ version = "~> 6.33"
2178
2184
  }
2179
2185
  }
2180
2186
  }
@@ -2353,8 +2359,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
2353
2359
  http_method = aws_api_gateway_method.proxy_method.http_method
2354
2360
 
2355
2361
  integration_http_method = "POST"
2356
- type = "AWS_PROXY"
2357
- uri = aws_lambda_function.api_lambda.invoke_arn
2362
+ type = "AWS_PROXY"
2363
+ uri = aws_lambda_function.api_lambda.invoke_arn
2358
2364
 
2359
2365
  depends_on = [aws_lambda_function.api_lambda]
2360
2366
  }
@@ -2651,7 +2657,7 @@ exports[`tsSmithyApiGenerator > terraform iacProvider > should generate terrafor
2651
2657
  required_providers {
2652
2658
  aws = {
2653
2659
  source = "hashicorp/aws"
2654
- version = "~> 6.0"
2660
+ version = "~> 6.33"
2655
2661
  }
2656
2662
  }
2657
2663
  }
@@ -2830,8 +2836,8 @@ resource "aws_api_gateway_integration" "lambda_integration" {
2830
2836
  http_method = aws_api_gateway_method.proxy_method.http_method
2831
2837
 
2832
2838
  integration_http_method = "POST"
2833
- type = "AWS_PROXY"
2834
- uri = aws_lambda_function.api_lambda.invoke_arn
2839
+ type = "AWS_PROXY"
2840
+ uri = aws_lambda_function.api_lambda.invoke_arn
2835
2841
 
2836
2842
  depends_on = [aws_lambda_function.api_lambda]
2837
2843
  }
@@ -29,6 +29,23 @@ export const createTestApiClient = (config: TestApiClientConfig) => {
29
29
  "
30
30
  `;
31
31
 
32
+ exports[`trpc backend generator > should generate the project > apps/test-api/src/handler.ts 1`] = `
33
+ "import {
34
+ CreateAWSLambdaContextOptions,
35
+ awsLambdaRequestHandler,
36
+ } from '@trpc/server/adapters/aws-lambda';
37
+ import type { APIGatewayProxyEventV2WithIAMAuthorizer } from 'aws-lambda';
38
+ import { appRouter } from './router.js';
39
+
40
+ export const handler = awsLambdaRequestHandler({
41
+ router: appRouter,
42
+ createContext: (
43
+ ctx: CreateAWSLambdaContextOptions<APIGatewayProxyEventV2WithIAMAuthorizer>,
44
+ ) => ctx,
45
+ });
46
+ "
47
+ `;
48
+
32
49
  exports[`trpc backend generator > should generate the project > apps/test-api/src/index.ts 1`] = `
33
50
  "export type { AppRouter } from './router.js';
34
51
  export { appRouter } from './router.js';
@@ -269,13 +286,8 @@ export const echo = publicProcedure
269
286
  `;
270
287
 
271
288
  exports[`trpc backend generator > should generate the project > apps/test-api/src/router.ts 1`] = `
272
- "import {
273
- awsLambdaRequestHandler,
274
- CreateAWSLambdaContextOptions,
275
- } from '@trpc/server/adapters/aws-lambda';
276
- import { echo } from './procedures/echo.js';
289
+ "import { echo } from './procedures/echo.js';
277
290
  import { t } from './init.js';
278
- import type { APIGatewayProxyEventV2WithIAMAuthorizer } from 'aws-lambda';
279
291
 
280
292
  export const router = t.router;
281
293
 
@@ -283,13 +295,6 @@ export const appRouter = router({
283
295
  echo,
284
296
  });
285
297
 
286
- export const handler = awsLambdaRequestHandler({
287
- router: appRouter,
288
- createContext: (
289
- ctx: CreateAWSLambdaContextOptions<APIGatewayProxyEventV2WithIAMAuthorizer>,
290
- ) => ctx,
291
- });
292
-
293
298
  export type AppRouter = typeof appRouter;
294
299
  "
295
300
  `;
@@ -359,6 +364,7 @@ import {
359
364
  AuthorizationType,
360
365
  Cors,
361
366
  LambdaIntegration,
367
+ ResponseTransferMode,
362
368
  CognitoUserPoolsAuthorizer,
363
369
  } from 'aws-cdk-lib/aws-apigateway';
364
370
  import { Duration } from 'aws-cdk-lib';
@@ -437,7 +443,12 @@ export class TestApi<
437
443
  } satisfies FunctionProps,
438
444
  buildDefaultIntegration: (op, props: FunctionProps) => {
439
445
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
440
- return { handler, integration: new LambdaIntegration(handler) };
446
+ return {
447
+ handler,
448
+ integration: new LambdaIntegration(handler, {
449
+ responseTransferMode: ResponseTransferMode.STREAM,
450
+ }),
451
+ };
441
452
  },
442
453
  });
443
454
  };
@@ -747,6 +758,7 @@ import {
747
758
  AuthorizationType,
748
759
  Cors,
749
760
  LambdaIntegration,
761
+ ResponseTransferMode,
750
762
  } from 'aws-cdk-lib/aws-apigateway';
751
763
  import { Duration } from 'aws-cdk-lib';
752
764
  import {
@@ -817,7 +829,12 @@ export class TestApi<
817
829
  } satisfies FunctionProps,
818
830
  buildDefaultIntegration: (op, props: FunctionProps) => {
819
831
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
820
- return { handler, integration: new LambdaIntegration(handler) };
832
+ return {
833
+ handler,
834
+ integration: new LambdaIntegration(handler, {
835
+ responseTransferMode: ResponseTransferMode.STREAM,
836
+ }),
837
+ };
821
838
  },
822
839
  });
823
840
  };
@@ -1436,9 +1453,9 @@ export const routerToOperations = <TRouter extends AnyTRPCRouter>(
1436
1453
  {
1437
1454
  path: fullPath,
1438
1455
  method:
1439
- procedureOrRouter._def.type === 'query'
1440
- ? HttpMethod.GET
1441
- : HttpMethod.POST,
1456
+ procedureOrRouter._def.type === 'mutation'
1457
+ ? HttpMethod.POST
1458
+ : HttpMethod.GET,
1442
1459
  },
1443
1460
  ],
1444
1461
  ];
@@ -1827,6 +1844,7 @@ import {
1827
1844
  AuthorizationType,
1828
1845
  Cors,
1829
1846
  LambdaIntegration,
1847
+ ResponseTransferMode,
1830
1848
  } from 'aws-cdk-lib/aws-apigateway';
1831
1849
  import { Duration } from 'aws-cdk-lib';
1832
1850
  import {
@@ -1899,7 +1917,12 @@ export class TestApi<
1899
1917
  } satisfies FunctionProps,
1900
1918
  buildDefaultIntegration: (op, props: FunctionProps) => {
1901
1919
  const handler = new Function(scope, \`TestApi\${op}Handler\`, props);
1902
- return { handler, integration: new LambdaIntegration(handler) };
1920
+ return {
1921
+ handler,
1922
+ integration: new LambdaIntegration(handler, {
1923
+ responseTransferMode: ResponseTransferMode.STREAM,
1924
+ }),
1925
+ };
1903
1926
  },
1904
1927
  });
1905
1928
  };
@@ -2051,9 +2074,9 @@ export const routerToOperations = <TRouter extends AnyTRPCRouter>(
2051
2074
  {
2052
2075
  path: fullPath,
2053
2076
  method:
2054
- procedureOrRouter._def.type === 'query'
2055
- ? HttpMethod.GET
2056
- : HttpMethod.POST,
2077
+ procedureOrRouter._def.type === 'mutation'
2078
+ ? HttpMethod.POST
2079
+ : HttpMethod.GET,
2057
2080
  },
2058
2081
  ],
2059
2082
  ];
@@ -4151,7 +4174,7 @@ terraform {
4151
4174
  required_providers {
4152
4175
  aws = {
4153
4176
  source = "hashicorp/aws"
4154
- version = "~> 6.0"
4177
+ version = "~> 6.33"
4155
4178
  }
4156
4179
  }
4157
4180
  }
@@ -4298,7 +4321,7 @@ output "api_root_resource_id" {
4298
4321
  required_providers {
4299
4322
  aws = {
4300
4323
  source = "hashicorp/aws"
4301
- version = "~> 6.0"
4324
+ version = "~> 6.33"
4302
4325
  }
4303
4326
  }
4304
4327
  }
@@ -4495,8 +4518,9 @@ resource "aws_api_gateway_integration" "lambda_integration" {
4495
4518
  http_method = aws_api_gateway_method.proxy_method.http_method
4496
4519
 
4497
4520
  integration_http_method = "POST"
4498
- type = "AWS_PROXY"
4499
- uri = aws_lambda_function.api_lambda.invoke_arn
4521
+ type = "AWS_PROXY"
4522
+ uri = aws_lambda_function.api_lambda.response_streaming_invoke_arn
4523
+ response_transfer_mode = "STREAM"
4500
4524
 
4501
4525
  depends_on = [aws_lambda_function.api_lambda]
4502
4526
  }
@@ -4787,7 +4811,7 @@ terraform {
4787
4811
  required_providers {
4788
4812
  aws = {
4789
4813
  source = "hashicorp/aws"
4790
- version = "~> 6.0"
4814
+ version = "~> 6.33"
4791
4815
  }
4792
4816
  }
4793
4817
  }
@@ -4934,7 +4958,7 @@ output "api_root_resource_id" {
4934
4958
  required_providers {
4935
4959
  aws = {
4936
4960
  source = "hashicorp/aws"
4937
- version = "~> 6.0"
4961
+ version = "~> 6.33"
4938
4962
  }
4939
4963
  }
4940
4964
  }
@@ -5113,8 +5137,9 @@ resource "aws_api_gateway_integration" "lambda_integration" {
5113
5137
  http_method = aws_api_gateway_method.proxy_method.http_method
5114
5138
 
5115
5139
  integration_http_method = "POST"
5116
- type = "AWS_PROXY"
5117
- uri = aws_lambda_function.api_lambda.invoke_arn
5140
+ type = "AWS_PROXY"
5141
+ uri = aws_lambda_function.api_lambda.response_streaming_invoke_arn
5142
+ response_transfer_mode = "STREAM"
5118
5143
 
5119
5144
  depends_on = [aws_lambda_function.api_lambda]
5120
5145
  }
@@ -5415,7 +5440,7 @@ terraform {
5415
5440
  required_providers {
5416
5441
  aws = {
5417
5442
  source = "hashicorp/aws"
5418
- version = "~> 6.0"
5443
+ version = "~> 6.33"
5419
5444
  }
5420
5445
  }
5421
5446
  }
@@ -5562,7 +5587,7 @@ output "api_root_resource_id" {
5562
5587
  required_providers {
5563
5588
  aws = {
5564
5589
  source = "hashicorp/aws"
5565
- version = "~> 6.0"
5590
+ version = "~> 6.33"
5566
5591
  }
5567
5592
  }
5568
5593
  }
@@ -5741,8 +5766,9 @@ resource "aws_api_gateway_integration" "lambda_integration" {
5741
5766
  http_method = aws_api_gateway_method.proxy_method.http_method
5742
5767
 
5743
5768
  integration_http_method = "POST"
5744
- type = "AWS_PROXY"
5745
- uri = aws_lambda_function.api_lambda.invoke_arn
5769
+ type = "AWS_PROXY"
5770
+ uri = aws_lambda_function.api_lambda.response_streaming_invoke_arn
5771
+ response_transfer_mode = "STREAM"
5746
5772
 
5747
5773
  depends_on = [aws_lambda_function.api_lambda]
5748
5774
  }