@aws/nx-plugin 0.14.2 → 0.15.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 (34) hide show
  1. package/package.json +2 -2
  2. package/src/open-api/ts-client/__snapshots__/generator.additional-properties.spec.ts.snap +2236 -0
  3. package/src/open-api/ts-client/__snapshots__/generator.complex-types.spec.ts.snap +2307 -0
  4. package/src/open-api/ts-client/__snapshots__/generator.composite-types.spec.ts.snap +1495 -0
  5. package/src/open-api/ts-client/__snapshots__/generator.primitive-types.spec.ts.snap +1470 -0
  6. package/src/open-api/ts-client/__snapshots__/generator.request.spec.ts.snap +1138 -0
  7. package/src/open-api/ts-client/__snapshots__/generator.response.spec.ts.snap +732 -0
  8. package/src/open-api/ts-client/__snapshots__/generator.tags.spec.ts.snap +743 -0
  9. package/src/open-api/ts-client/files/client.gen.ts.template +52 -15
  10. package/src/open-api/ts-client/files/types.gen.ts.template +5 -0
  11. package/src/open-api/ts-hooks/__snapshots__/generator.spec.tsx.snap +1092 -0
  12. package/src/open-api/ts-hooks/files/options-proxy.gen.ts.template +210 -0
  13. package/src/open-api/ts-hooks/generator.d.ts +5 -0
  14. package/src/open-api/ts-hooks/generator.js +15 -2
  15. package/src/open-api/ts-hooks/generator.js.map +1 -1
  16. package/src/open-api/ts-hooks/generator.spec.tsx +1787 -0
  17. package/src/open-api/utils/codegen-data/types.d.ts +25 -0
  18. package/src/open-api/utils/codegen-data/types.js +26 -1
  19. package/src/open-api/utils/codegen-data/types.js.map +1 -1
  20. package/src/open-api/utils/codegen-data.js +187 -79
  21. package/src/open-api/utils/codegen-data.js.map +1 -1
  22. package/src/open-api/utils/normalise.js +11 -1
  23. package/src/open-api/utils/normalise.js.map +1 -1
  24. package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +120 -10
  25. package/src/py/fast-api/react/files/website/components/__apiNameClassName__Provider.tsx.template +40 -0
  26. package/src/py/fast-api/react/files/website/hooks/use__apiNameClassName__.tsx.template +13 -18
  27. package/src/py/fast-api/react/files/website/hooks/use__apiNameClassName__Client.tsx.template +13 -0
  28. package/src/py/fast-api/react/generator.js +35 -9
  29. package/src/py/fast-api/react/generator.js.map +1 -1
  30. package/src/py/project/generator.js +5 -0
  31. package/src/py/project/generator.js.map +1 -1
  32. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +7 -9
  33. package/src/utils/files/http-api/common/constructs/src/core/http-api.ts.template +7 -9
  34. package/src/open-api/ts-client/__snapshots__/generator.spec.ts.snap +0 -7880
@@ -344,7 +344,7 @@ import {
344
344
  } from 'aws-cdk-lib/aws-apigatewayv2';
345
345
  import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
346
346
  import { Code, Function, Runtime, Tracing } from 'aws-cdk-lib/aws-lambda';
347
- import { Effect, IRole, PolicyStatement } from 'aws-cdk-lib/aws-iam';
347
+ import { Grant, IGrantable } from 'aws-cdk-lib/aws-iam';
348
348
  import { RuntimeConfig } from './runtime-config.js';
349
349
 
350
350
  export interface HttpApiProps {
@@ -413,14 +413,12 @@ export class HttpApi extends Construct {
413
413
  };
414
414
  }
415
415
 
416
- public grantInvokeAccess(role: IRole) {
417
- role.addToPrincipalPolicy(
418
- new PolicyStatement({
419
- effect: Effect.ALLOW,
420
- actions: ['execute-api:Invoke'],
421
- resources: [this.api.arnForExecuteApi('*', '/*', '*')],
422
- }),
423
- );
416
+ public grantInvokeAccess(grantee: IGrantable) {
417
+ Grant.addToPrincipal({
418
+ grantee,
419
+ actions: ['execute-api:Invoke'],
420
+ resourceArns: [this.api.arnForExecuteApi('*', '/*', '*')],
421
+ });
424
422
  }
425
423
  }
426
424
  "
@@ -8,7 +8,7 @@ import {
8
8
  } from 'aws-cdk-lib/aws-apigatewayv2';
9
9
  import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
10
10
  import { Code, Function, Runtime, Tracing } from 'aws-cdk-lib/aws-lambda';
11
- import { Effect, IRole, PolicyStatement } from 'aws-cdk-lib/aws-iam';
11
+ import { Grant, IGrantable } from 'aws-cdk-lib/aws-iam';
12
12
  import { RuntimeConfig } from './runtime-config.js';
13
13
 
14
14
  export interface HttpApiProps {
@@ -77,13 +77,11 @@ export class HttpApi extends Construct {
77
77
  };
78
78
  }
79
79
 
80
- public grantInvokeAccess(role: IRole) {
81
- role.addToPrincipalPolicy(
82
- new PolicyStatement({
83
- effect: Effect.ALLOW,
84
- actions: ['execute-api:Invoke'],
85
- resources: [this.api.arnForExecuteApi('*', '/*', '*')],
86
- }),
87
- );
80
+ public grantInvokeAccess(grantee: IGrantable) {
81
+ Grant.addToPrincipal({
82
+ grantee,
83
+ actions: ['execute-api:Invoke'],
84
+ resourceArns: [this.api.arnForExecuteApi('*', '/*', '*')],
85
+ });
88
86
  }
89
87
  }