@aws/nx-plugin 1.0.0-rc.49 → 1.0.0-rc.50

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 (41) hide show
  1. package/LICENSE-THIRD-PARTY +436 -29
  2. package/migrations.json +17 -1
  3. package/package.json +2 -1
  4. package/src/migrations/latest/modernize-function-props-cast/migration.d.ts +6 -0
  5. package/src/migrations/latest/modernize-function-props-cast/migration.js +66 -0
  6. package/src/migrations/latest/modernize-function-props-cast/migration.js.map +1 -0
  7. package/src/migrations/latest/restrict-cors-to-custom-domains/migration.d.ts +6 -0
  8. package/src/migrations/latest/restrict-cors-to-custom-domains/migration.js +110 -0
  9. package/src/migrations/latest/restrict-cors-to-custom-domains/migration.js.map +1 -0
  10. package/src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration.d.ts +6 -0
  11. package/src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration.js +129 -0
  12. package/src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration.js.map +1 -0
  13. package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +1 -0
  14. package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +25 -15
  15. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +1 -0
  16. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +26 -16
  17. package/src/terraform/project/files/application/scripts/bootstrap.ts.template +40 -1
  18. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +75 -45
  19. package/src/ts/agent/__snapshots__/generator.spec.ts.snap +1 -0
  20. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +1 -0
  21. package/src/ts/nx-migration/files/migration.ts.template +6 -0
  22. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +1 -0
  23. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +43 -0
  24. package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +11 -14
  25. package/src/utils/__snapshots__/shared-constructs.spec.ts.snap +21 -0
  26. package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +12 -7
  27. package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +13 -8
  28. package/src/utils/files/common/constructs/src/core/cloudfront.ts.template +14 -0
  29. package/src/utils/files/common/constructs/src/core/index.ts.template +1 -0
  30. package/src/utils/format.js +118 -240
  31. package/src/utils/format.js.map +1 -1
  32. package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +7 -14
  33. package/src/utils/ruff.d.ts +59 -0
  34. package/src/utils/ruff.js +140 -0
  35. package/src/utils/ruff.js.map +1 -0
  36. package/src/utils/toml.d.ts +5 -0
  37. package/src/utils/toml.js +10 -0
  38. package/src/utils/toml.js.map +1 -1
  39. package/src/utils/warm-ruff-cache.d.ts +0 -8
  40. package/src/utils/warm-ruff-cache.js +0 -30
  41. package/src/utils/warm-ruff-cache.js.map +0 -1
@@ -217,6 +217,442 @@ OTHER DEALINGS IN THE SOFTWARE.
217
217
 
218
218
  ---
219
219
 
220
+ The following software may be included in this product: @astral-sh/ruff-wasm-nodejs (0.15.22)
221
+ This software contains the following license and notice below:
222
+
223
+ MIT License
224
+
225
+ Copyright (c) 2022 Charles Marsh
226
+
227
+ Permission is hereby granted, free of charge, to any person obtaining a copy
228
+ of this software and associated documentation files (the "Software"), to deal
229
+ in the Software without restriction, including without limitation the rights
230
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
231
+ copies of the Software, and to permit persons to whom the Software is
232
+ furnished to do so, subject to the following conditions:
233
+
234
+ The above copyright notice and this permission notice shall be included in all
235
+ copies or substantial portions of the Software.
236
+
237
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
238
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
239
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
240
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
241
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
242
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
243
+ SOFTWARE.
244
+
245
+ end of terms and conditions
246
+
247
+ The externally maintained libraries from which parts of the Software is derived
248
+ are:
249
+
250
+ - autoflake, licensed as follows:
251
+ """
252
+ Copyright (C) 2012-2018 Steven Myint
253
+
254
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
255
+ this software and associated documentation files (the "Software"), to deal in
256
+ the Software without restriction, including without limitation the rights to
257
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
258
+ of the Software, and to permit persons to whom the Software is furnished to do
259
+ so, subject to the following conditions:
260
+
261
+ The above copyright notice and this permission notice shall be included in all
262
+ copies or substantial portions of the Software.
263
+
264
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
265
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
266
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
267
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
268
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
269
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
270
+ SOFTWARE.
271
+ """
272
+
273
+ - autotyping, licensed as follows:
274
+ """
275
+ MIT License
276
+
277
+ Copyright (c) 2023 Jelle Zijlstra
278
+
279
+ Permission is hereby granted, free of charge, to any person obtaining a copy
280
+ of this software and associated documentation files (the "Software"), to deal
281
+ in the Software without restriction, including without limitation the rights
282
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
283
+ copies of the Software, and to permit persons to whom the Software is
284
+ furnished to do so, subject to the following conditions:
285
+
286
+ The above copyright notice and this permission notice shall be included in all
287
+ copies or substantial portions of the Software.
288
+
289
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
290
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
291
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
292
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
293
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
294
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
295
+ SOFTWARE.
296
+ """
297
+
298
+ - Flake8, licensed as follows:
299
+ """
300
+ == Flake8 License (MIT) ==
301
+
302
+ Copyright (C) 2011-2013 Tarek Ziade <tarek@ziade.org>
303
+ Copyright (C) 2012-2016 Ian Cordasco <graffatcolmingov@gmail.com>
304
+
305
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
306
+ this software and associated documentation files (the "Software"), to deal in
307
+ the Software without restriction, including without limitation the rights to
308
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
309
+ of the Software, and to permit persons to whom the Software is furnished to do
310
+ so, subject to the following conditions:
311
+
312
+ The above copyright notice and this permission notice shall be included in all
313
+ copies or substantial portions of the Software.
314
+
315
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
316
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
317
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
318
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
319
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
320
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
321
+ SOFTWARE.
322
+ """
323
+
324
+ - flake8-eradicate, licensed as follows:
325
+ """
326
+ MIT License
327
+
328
+ Copyright (c) 2018 Nikita Sobolev
329
+
330
+ Permission is hereby granted, free of charge, to any person obtaining a copy
331
+ of this software and associated documentation files (the "Software"), to deal
332
+ in the Software without restriction, including without limitation the rights
333
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
334
+ copies of the Software, and to permit persons to whom the Software is
335
+ furnished to do so, subject to the following conditions:
336
+
337
+ The above copyright notice and this permission notice shall be included in all
338
+ copies or substantial portions of the Software.
339
+
340
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
341
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
342
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
343
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
344
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
345
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
346
+ SOFTWARE.
347
+ """
348
+
349
+ - flake8-pyi, licensed as follows:
350
+ """
351
+ The MIT License (MIT)
352
+
353
+ Copyright (c) 2016 Łukasz Langa
354
+
355
+ Permission is hereby granted, free of charge, to any person obtaining a copy
356
+ of this software and associated documentation files (the "Software"), to deal
357
+ in the Software without restriction, including without limitation the rights
358
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
359
+ copies of the Software, and to permit persons to whom the Software is
360
+ furnished to do so, subject to the following conditions:
361
+
362
+ The above copyright notice and this permission notice shall be included in all
363
+ copies or substantial portions of the Software.
364
+
365
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
366
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
367
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
368
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
369
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
370
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
371
+ SOFTWARE.
372
+ """
373
+
374
+ - flake8-simplify, licensed as follows:
375
+ """
376
+ MIT License
377
+
378
+ Copyright (c) 2020 Martin Thoma
379
+
380
+ Permission is hereby granted, free of charge, to any person obtaining a copy
381
+ of this software and associated documentation files (the "Software"), to deal
382
+ in the Software without restriction, including without limitation the rights
383
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
384
+ copies of the Software, and to permit persons to whom the Software is
385
+ furnished to do so, subject to the following conditions:
386
+
387
+ The above copyright notice and this permission notice shall be included in all
388
+ copies or substantial portions of the Software.
389
+
390
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
391
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
392
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
393
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
394
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
395
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
396
+ SOFTWARE.
397
+ """
398
+
399
+ - isort, licensed as follows:
400
+ """
401
+ The MIT License (MIT)
402
+
403
+ Copyright (c) 2013 Timothy Edmund Crosley
404
+
405
+ Permission is hereby granted, free of charge, to any person obtaining a copy
406
+ of this software and associated documentation files (the "Software"), to deal
407
+ in the Software without restriction, including without limitation the rights
408
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
409
+ copies of the Software, and to permit persons to whom the Software is
410
+ furnished to do so, subject to the following conditions:
411
+
412
+ The above copyright notice and this permission notice shall be included in
413
+ all copies or substantial portions of the Software.
414
+
415
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
416
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
417
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
418
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
419
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
420
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
421
+ THE SOFTWARE.
422
+ """
423
+
424
+ - pygrep-hooks, licensed as follows:
425
+ """
426
+ Copyright (c) 2018 Anthony Sottile
427
+
428
+ Permission is hereby granted, free of charge, to any person obtaining a copy
429
+ of this software and associated documentation files (the "Software"), to deal
430
+ in the Software without restriction, including without limitation the rights
431
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
432
+ copies of the Software, and to permit persons to whom the Software is
433
+ furnished to do so, subject to the following conditions:
434
+
435
+ The above copyright notice and this permission notice shall be included in
436
+ all copies or substantial portions of the Software.
437
+
438
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
439
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
440
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
441
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
442
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
443
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
444
+ THE SOFTWARE.
445
+ """
446
+
447
+ - pycodestyle, licensed as follows:
448
+ """
449
+ Copyright © 2006-2009 Johann C. Rocholl <johann@rocholl.net>
450
+ Copyright © 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
451
+ Copyright © 2014-2020 Ian Lee <IanLee1521@gmail.com>
452
+
453
+ Licensed under the terms of the Expat License
454
+
455
+ Permission is hereby granted, free of charge, to any person
456
+ obtaining a copy of this software and associated documentation files
457
+ (the "Software"), to deal in the Software without restriction,
458
+ including without limitation the rights to use, copy, modify, merge,
459
+ publish, distribute, sublicense, and/or sell copies of the Software,
460
+ and to permit persons to whom the Software is furnished to do so,
461
+ subject to the following conditions:
462
+
463
+ The above copyright notice and this permission notice shall be
464
+ included in all copies or substantial portions of the Software.
465
+
466
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
467
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
468
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
469
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
470
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
471
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
472
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
473
+ SOFTWARE.
474
+ """
475
+
476
+ - pydocstyle, licensed as follows:
477
+ """
478
+ Copyright (c) 2012 GreenSteam, <http://greensteam.dk/>
479
+
480
+ Copyright (c) 2014-2020 Amir Rachum, <http://amir.rachum.com/>
481
+
482
+ Copyright (c) 2020 Sambhav Kothari, <https://github.com/samj1912>
483
+
484
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
485
+ this software and associated documentation files (the "Software"), to deal in
486
+ the Software without restriction, including without limitation the rights to
487
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
488
+ of the Software, and to permit persons to whom the Software is furnished to do
489
+ so, subject to the following conditions:
490
+
491
+ The above copyright notice and this permission notice shall be included in all
492
+ copies or substantial portions of the Software.
493
+
494
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
495
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
496
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
497
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
498
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
499
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
500
+ SOFTWARE.
501
+ """
502
+
503
+ - Pyflakes, licensed as follows:
504
+ """
505
+ Copyright 2005-2011 Divmod, Inc.
506
+ Copyright 2013-2014 Florent Xicluna
507
+
508
+ Permission is hereby granted, free of charge, to any person obtaining
509
+ a copy of this software and associated documentation files (the
510
+ "Software"), to deal in the Software without restriction, including
511
+ without limitation the rights to use, copy, modify, merge, publish,
512
+ distribute, sublicense, and/or sell copies of the Software, and to
513
+ permit persons to whom the Software is furnished to do so, subject to
514
+ the following conditions:
515
+
516
+ The above copyright notice and this permission notice shall be
517
+ included in all copies or substantial portions of the Software.
518
+
519
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
520
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
521
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
522
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
523
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
524
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
525
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
526
+ """
527
+
528
+ - Pyright, licensed as follows:
529
+ """
530
+ MIT License
531
+
532
+ Pyright - A static type checker for the Python language
533
+ Copyright (c) Microsoft Corporation. All rights reserved.
534
+
535
+ Permission is hereby granted, free of charge, to any person obtaining a copy
536
+ of this software and associated documentation files (the "Software"), to deal
537
+ in the Software without restriction, including without limitation the rights
538
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
539
+ copies of the Software, and to permit persons to whom the Software is
540
+ furnished to do so, subject to the following conditions:
541
+
542
+ The above copyright notice and this permission notice shall be included in all
543
+ copies or substantial portions of the Software.
544
+
545
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
546
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
547
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
548
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
549
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
550
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
551
+ SOFTWARE
552
+ """
553
+
554
+ - pyupgrade, licensed as follows:
555
+ """
556
+ Copyright (c) 2017 Anthony Sottile
557
+
558
+ Permission is hereby granted, free of charge, to any person obtaining a copy
559
+ of this software and associated documentation files (the "Software"), to deal
560
+ in the Software without restriction, including without limitation the rights
561
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
562
+ copies of the Software, and to permit persons to whom the Software is
563
+ furnished to do so, subject to the following conditions:
564
+
565
+ The above copyright notice and this permission notice shall be included in
566
+ all copies or substantial portions of the Software.
567
+
568
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
569
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
570
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
571
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
572
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
573
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
574
+ THE SOFTWARE.
575
+ """
576
+
577
+ - rome/tools, licensed under the MIT license:
578
+ """
579
+ MIT License
580
+
581
+ Copyright (c) Rome Tools, Inc. and its affiliates.
582
+
583
+ Permission is hereby granted, free of charge, to any person obtaining a copy
584
+ of this software and associated documentation files (the "Software"), to deal
585
+ in the Software without restriction, including without limitation the rights
586
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
587
+ copies of the Software, and to permit persons to whom the Software is
588
+ furnished to do so, subject to the following conditions:
589
+
590
+ The above copyright notice and this permission notice shall be included in all
591
+ copies or substantial portions of the Software.
592
+
593
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
594
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
595
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
596
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
597
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
598
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
599
+ SOFTWARE.
600
+ """
601
+
602
+ - RustPython, licensed as follows:
603
+ """
604
+ MIT License
605
+
606
+ Copyright (c) 2020 RustPython Team
607
+
608
+ Permission is hereby granted, free of charge, to any person obtaining a copy
609
+ of this software and associated documentation files (the "Software"), to deal
610
+ in the Software without restriction, including without limitation the rights
611
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
612
+ copies of the Software, and to permit persons to whom the Software is
613
+ furnished to do so, subject to the following conditions:
614
+
615
+ The above copyright notice and this permission notice shall be included in all
616
+ copies or substantial portions of the Software.
617
+
618
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
619
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
620
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
621
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
622
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
623
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
624
+ SOFTWARE.
625
+ """
626
+
627
+ - rust-analyzer/text-size, licensed under the MIT license:
628
+ """
629
+ Permission is hereby granted, free of charge, to any
630
+ person obtaining a copy of this software and associated
631
+ documentation files (the "Software"), to deal in the
632
+ Software without restriction, including without
633
+ limitation the rights to use, copy, modify, merge,
634
+ publish, distribute, sublicense, and/or sell copies of
635
+ the Software, and to permit persons to whom the Software
636
+ is furnished to do so, subject to the following
637
+ conditions:
638
+
639
+ The above copyright notice and this permission notice
640
+ shall be included in all copies or substantial portions
641
+ of the Software.
642
+
643
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
644
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
645
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
646
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
647
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
648
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
649
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
650
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
651
+ DEALINGS IN THE SOFTWARE.
652
+ """
653
+
654
+ ---
655
+
220
656
  The following software may be included in this product: @babel/code-frame (7.29.0)
221
657
  This software contains the following license and notice below:
222
658
 
@@ -10041,35 +10477,6 @@ SOFTWARE.
10041
10477
 
10042
10478
  ---
10043
10479
 
10044
- The following software may be included in this product: brace-expansion (5.0.5)
10045
- This software contains the following license and notice below:
10046
-
10047
- MIT License
10048
-
10049
- Copyright Julian Gruber <julian@juliangruber.com>
10050
-
10051
- TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
10052
-
10053
- Permission is hereby granted, free of charge, to any person obtaining a copy
10054
- of this software and associated documentation files (the "Software"), to deal
10055
- in the Software without restriction, including without limitation the rights
10056
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10057
- copies of the Software, and to permit persons to whom the Software is
10058
- furnished to do so, subject to the following conditions:
10059
-
10060
- The above copyright notice and this permission notice shall be included in all
10061
- copies or substantial portions of the Software.
10062
-
10063
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10064
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10065
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10066
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10067
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10068
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
10069
- SOFTWARE.
10070
-
10071
- ---
10072
-
10073
10480
  The following software may be included in this product: brace-expansion (5.0.6)
10074
10481
  This software contains the following license and notice below:
10075
10482
 
package/migrations.json CHANGED
@@ -1,5 +1,21 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "name": "@aws/nx-plugin",
4
- "generators": {}
4
+ "generators": {
5
+ "latest-modernize-function-props-cast": {
6
+ "version": "1.0.0-rc.50",
7
+ "description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
8
+ "implementation": "./src/migrations/latest/modernize-function-props-cast/migration"
9
+ },
10
+ "latest-restrict-cors-to-custom-domains": {
11
+ "version": "1.0.0-rc.50",
12
+ "description": "Include CloudFront custom domain aliases in restrictCorsTo and UserIdentity callback URLs",
13
+ "implementation": "./src/migrations/latest/restrict-cors-to-custom-domains/migration"
14
+ },
15
+ "latest-terraform-bootstrap-adopt-existing-bucket": {
16
+ "version": "1.0.0-rc.50",
17
+ "description": "Adopt an existing Terraform state bucket in the vended bootstrap script when its state object is missing",
18
+ "implementation": "./src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration"
19
+ }
20
+ }
5
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.49",
3
+ "version": "1.0.0-rc.50",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -40,6 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@apidevtools/swagger-parser": "12.1.0",
43
+ "@astral-sh/ruff-wasm-nodejs": "0.15.22",
43
44
  "@biomejs/js-api": "6.0.0",
44
45
  "@biomejs/wasm-nodejs": "2.5.4",
45
46
  "@getgrit/gritql": "0.0.3",
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { type MigrationReturnObject, type Tree } from '@nx/devkit';
6
+ export default function migration(tree: Tree): Promise<MigrationReturnObject>;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ import { visitNotIgnoredFiles } from "@nx/devkit";
5
+ import { formatFilesInSubtree } from "../../../utils/format.js";
6
+ import { PACKAGES_DIR, SHARED_CONSTRUCTS_DIR } from "../../../utils/shared-constructs-constants.js";
7
+ /**
8
+ * Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs
9
+ *
10
+ * The legacy `<FunctionProps>{ ... }` cast form is not supported by GritQL's
11
+ * TypeScript parser, which silently breaks parsing (and therefore matching)
12
+ * for the entire containing file. Since several other migrations rely on
13
+ * GritQL to update these API construct files, this cast is replaced here with
14
+ * the equivalent, GritQL-compatible `{ ... } as FunctionProps` form. This is
15
+ * matched as an exact literal (rather than via GritQL) since GritQL cannot
16
+ * parse the file while the legacy cast is still present.
17
+ *
18
+ * How to write a migration:
19
+ * - https://nx.dev/docs/kb/migration-generators
20
+ * - What `nextSteps` means: https://nx.dev/docs/reference/devkit/MigrationReturnObject
21
+ *
22
+ * Guardrails:
23
+ * - Pattern-match before writing: skip files that have diverged from the shape
24
+ * your generators produce and report them via `nextSteps`, or consider a
25
+ * hybrid migration, rather than clobbering the user's changes.
26
+ * - Idempotent: re-running must be a no-op.
27
+ * - Format what you write: finish with `formatFilesInSubtree` so the files your
28
+ * migration wrote are formatted correctly.
29
+ */ const APIS_APP_DIR = `${PACKAGES_DIR}/${SHARED_CONSTRUCTS_DIR}/src/app/apis`;
30
+ const OLD_CAST_OPEN = 'defaultIntegrationOptions: <FunctionProps>{';
31
+ const NEW_CAST_OPEN = 'defaultIntegrationOptions: {';
32
+ const OLD_CAST_CLOSE = '\n },\n buildDefaultIntegration:';
33
+ const NEW_CAST_CLOSE = '\n } as FunctionProps,\n buildDefaultIntegration:';
34
+ export default async function migration(tree) {
35
+ const nextSteps = [];
36
+ if (!tree.exists(APIS_APP_DIR)) {
37
+ return {
38
+ nextSteps
39
+ };
40
+ }
41
+ const apiAppFiles = [];
42
+ visitNotIgnoredFiles(tree, APIS_APP_DIR, (filePath)=>{
43
+ apiAppFiles.push(filePath);
44
+ });
45
+ for (const filePath of apiAppFiles){
46
+ if (!filePath.endsWith('.ts') || filePath.endsWith('/index.ts')) {
47
+ continue;
48
+ }
49
+ const contents = tree.read(filePath, 'utf-8') ?? '';
50
+ if (!contents.includes(OLD_CAST_OPEN)) {
51
+ continue;
52
+ }
53
+ if (!contents.includes(OLD_CAST_CLOSE)) {
54
+ nextSteps.push(`${filePath}: the defaultIntegrationOptions cast has diverged from the generated shape - left untouched. Manually replace \`<FunctionProps>{ ... }\` with \`{ ... } as FunctionProps\`.`);
55
+ continue;
56
+ }
57
+ tree.write(filePath, contents.replace(OLD_CAST_OPEN, NEW_CAST_OPEN).replace(OLD_CAST_CLOSE, NEW_CAST_CLOSE));
58
+ nextSteps.push(`${filePath}: replaced the legacy <FunctionProps> cast with the modern as FunctionProps syntax.`);
59
+ }
60
+ await formatFilesInSubtree(tree);
61
+ return {
62
+ nextSteps
63
+ };
64
+ }
65
+
66
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/modernize-function-props-cast/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type MigrationReturnObject,\n type Tree,\n visitNotIgnoredFiles,\n} from '@nx/devkit';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DIR,\n} from '../../../utils/shared-constructs-constants';\n\n/**\n * Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs\n *\n * The legacy `<FunctionProps>{ ... }` cast form is not supported by GritQL's\n * TypeScript parser, which silently breaks parsing (and therefore matching)\n * for the entire containing file. Since several other migrations rely on\n * GritQL to update these API construct files, this cast is replaced here with\n * the equivalent, GritQL-compatible `{ ... } as FunctionProps` form. This is\n * matched as an exact literal (rather than via GritQL) since GritQL cannot\n * parse the file while the legacy cast is still present.\n *\n * How to write a migration:\n * - https://nx.dev/docs/kb/migration-generators\n * - What `nextSteps` means: https://nx.dev/docs/reference/devkit/MigrationReturnObject\n *\n * Guardrails:\n * - Pattern-match before writing: skip files that have diverged from the shape\n * your generators produce and report them via `nextSteps`, or consider a\n * hybrid migration, rather than clobbering the user's changes.\n * - Idempotent: re-running must be a no-op.\n * - Format what you write: finish with `formatFilesInSubtree` so the files your\n * migration wrote are formatted correctly.\n */\n\nconst APIS_APP_DIR = `${PACKAGES_DIR}/${SHARED_CONSTRUCTS_DIR}/src/app/apis`;\n\nconst OLD_CAST_OPEN = 'defaultIntegrationOptions: <FunctionProps>{';\nconst NEW_CAST_OPEN = 'defaultIntegrationOptions: {';\nconst OLD_CAST_CLOSE = '\\n },\\n buildDefaultIntegration:';\nconst NEW_CAST_CLOSE =\n '\\n } as FunctionProps,\\n buildDefaultIntegration:';\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n if (!tree.exists(APIS_APP_DIR)) {\n return { nextSteps };\n }\n\n const apiAppFiles: string[] = [];\n visitNotIgnoredFiles(tree, APIS_APP_DIR, (filePath) => {\n apiAppFiles.push(filePath);\n });\n\n for (const filePath of apiAppFiles) {\n if (!filePath.endsWith('.ts') || filePath.endsWith('/index.ts')) {\n continue;\n }\n const contents = tree.read(filePath, 'utf-8') ?? '';\n if (!contents.includes(OLD_CAST_OPEN)) {\n // Already migrated, or doesn't use this shape.\n continue;\n }\n if (!contents.includes(OLD_CAST_CLOSE)) {\n nextSteps.push(\n `${filePath}: the defaultIntegrationOptions cast has diverged from the generated shape - left untouched. Manually replace \\`<FunctionProps>{ ... }\\` with \\`{ ... } as FunctionProps\\`.`,\n );\n continue;\n }\n tree.write(\n filePath,\n contents\n .replace(OLD_CAST_OPEN, NEW_CAST_OPEN)\n .replace(OLD_CAST_CLOSE, NEW_CAST_CLOSE),\n );\n nextSteps.push(\n `${filePath}: replaced the legacy <FunctionProps> cast with the modern as FunctionProps syntax.`,\n );\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["visitNotIgnoredFiles","formatFilesInSubtree","PACKAGES_DIR","SHARED_CONSTRUCTS_DIR","APIS_APP_DIR","OLD_CAST_OPEN","NEW_CAST_OPEN","OLD_CAST_CLOSE","NEW_CAST_CLOSE","migration","tree","nextSteps","exists","apiAppFiles","filePath","push","endsWith","contents","read","includes","write","replace"],"mappings":"AAAA;;;CAGC,GACD,SAGEA,oBAAoB,QACf,aAAa;AACpB,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SACEC,YAAY,EACZC,qBAAqB,QAChB,gDAA6C;AAEpD;;;;;;;;;;;;;;;;;;;;;;CAsBC,GAED,MAAMC,eAAe,GAAGF,aAAa,CAAC,EAAEC,sBAAsB,aAAa,CAAC;AAE5E,MAAME,gBAAgB;AACtB,MAAMC,gBAAgB;AACtB,MAAMC,iBAAiB;AACvB,MAAMC,iBACJ;AAEF,eAAe,eAAeC,UAC5BC,IAAU;IAEV,MAAMC,YAAsB,EAAE;IAE9B,IAAI,CAACD,KAAKE,MAAM,CAACR,eAAe;QAC9B,OAAO;YAAEO;QAAU;IACrB;IAEA,MAAME,cAAwB,EAAE;IAChCb,qBAAqBU,MAAMN,cAAc,CAACU;QACxCD,YAAYE,IAAI,CAACD;IACnB;IAEA,KAAK,MAAMA,YAAYD,YAAa;QAClC,IAAI,CAACC,SAASE,QAAQ,CAAC,UAAUF,SAASE,QAAQ,CAAC,cAAc;YAC/D;QACF;QACA,MAAMC,WAAWP,KAAKQ,IAAI,CAACJ,UAAU,YAAY;QACjD,IAAI,CAACG,SAASE,QAAQ,CAACd,gBAAgB;YAErC;QACF;QACA,IAAI,CAACY,SAASE,QAAQ,CAACZ,iBAAiB;YACtCI,UAAUI,IAAI,CACZ,GAAGD,SAAS,2KAA2K,CAAC;YAE1L;QACF;QACAJ,KAAKU,KAAK,CACRN,UACAG,SACGI,OAAO,CAAChB,eAAeC,eACvBe,OAAO,CAACd,gBAAgBC;QAE7BG,UAAUI,IAAI,CACZ,GAAGD,SAAS,mFAAmF,CAAC;IAEpG;IAEA,MAAMb,qBAAqBS;IAE3B,OAAO;QAAEC;IAAU;AACrB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { type MigrationReturnObject, type Tree } from '@nx/devkit';
6
+ export default function migration(tree: Tree): Promise<MigrationReturnObject>;