@catladder/pipeline 3.23.1 → 3.25.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 (54) hide show
  1. package/dist/build/artifacts/createBuildJobArtifact.js +13 -5
  2. package/dist/build/index.js +2 -1
  3. package/dist/build/types.d.ts +10 -0
  4. package/dist/constants.js +1 -1
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/examples/__snapshots__/automatic-releases.test.ts.snap +4 -0
  7. package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +4 -0
  8. package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +4 -0
  9. package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +4 -0
  10. package/examples/__snapshots__/cloud-run-http2.test.ts.snap +4 -0
  11. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +4 -0
  12. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +4 -0
  13. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +4 -0
  14. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +4 -0
  15. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +4 -0
  16. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +4 -0
  17. package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +4 -0
  18. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +4 -0
  19. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +4 -0
  20. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +4 -0
  21. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +4 -0
  22. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +4 -0
  23. package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +4 -0
  24. package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +4 -0
  25. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +4 -0
  26. package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +4 -0
  27. package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +12 -0
  28. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +8 -0
  29. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +4 -0
  30. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +4 -0
  31. package/examples/__snapshots__/custom-deploy.test.ts.snap +4 -0
  32. package/examples/__snapshots__/custom-envs.test.ts.snap +6 -0
  33. package/examples/__snapshots__/custom-verify-job.test.ts.snap +4 -0
  34. package/examples/__snapshots__/git-submodule.test.ts.snap +4 -0
  35. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +8 -0
  36. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +8 -0
  37. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +12 -0
  38. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +8 -0
  39. package/examples/__snapshots__/local-dot-env.test.ts.snap +8 -0
  40. package/examples/__snapshots__/modify-generated-files.test.ts.snap +4 -0
  41. package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +4 -0
  42. package/examples/__snapshots__/multiline-var.test.ts.snap +12 -0
  43. package/examples/__snapshots__/native-app.test.ts.snap +8 -0
  44. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +4 -0
  45. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +4 -0
  46. package/examples/__snapshots__/override-secrets.test.ts.snap +4 -0
  47. package/examples/__snapshots__/referencing-other-vars.test.ts.snap +12 -0
  48. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +8 -0
  49. package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +8 -0
  50. package/examples/__snapshots__/workspace-api-www.test.ts.snap +8 -0
  51. package/package.json +1 -1
  52. package/src/build/artifacts/createBuildJobArtifact.ts +35 -7
  53. package/src/build/index.ts +1 -0
  54. package/src/build/types.ts +11 -0
@@ -312,6 +312,7 @@ app1 🧪 test:
312
312
  - app1/dist
313
313
  exclude:
314
314
  - app1/.env
315
+ - app1/.next/cache/**/*
315
316
  expire_in: 1 day
316
317
  when: always
317
318
  reports: {}
@@ -669,6 +670,7 @@ app1 🧪 test:
669
670
  - app1/dist
670
671
  exclude:
671
672
  - app1/.env
673
+ - app1/.next/cache/**/*
672
674
  expire_in: 1 day
673
675
  when: always
674
676
  reports: {}
@@ -1032,6 +1034,7 @@ app1 🧪 test:
1032
1034
  - app1/dist
1033
1035
  exclude:
1034
1036
  - app1/.env
1037
+ - app1/.next/cache/**/*
1035
1038
  expire_in: 1 day
1036
1039
  when: always
1037
1040
  reports: {}
@@ -1382,6 +1385,7 @@ app1 🧪 test:
1382
1385
  - app1/dist
1383
1386
  exclude:
1384
1387
  - app1/.env
1388
+ - app1/.next/cache/**/*
1385
1389
  expire_in: 1 day
1386
1390
  when: always
1387
1391
  reports: {}
@@ -1852,6 +1856,7 @@ app2 🧪 test:
1852
1856
  - app2/dist
1853
1857
  exclude:
1854
1858
  - app2/.env
1859
+ - app2/.next/cache/**/*
1855
1860
  expire_in: 1 day
1856
1861
  when: always
1857
1862
  reports: {}
@@ -2229,6 +2234,7 @@ app2 🧪 test:
2229
2234
  - app2/dist
2230
2235
  exclude:
2231
2236
  - app2/.env
2237
+ - app2/.next/cache/**/*
2232
2238
  expire_in: 1 day
2233
2239
  when: always
2234
2240
  reports: {}
@@ -2612,6 +2618,7 @@ app2 🧪 test:
2612
2618
  - app2/dist
2613
2619
  exclude:
2614
2620
  - app2/.env
2621
+ - app2/.next/cache/**/*
2615
2622
  expire_in: 1 day
2616
2623
  when: always
2617
2624
  reports: {}
@@ -2982,6 +2989,7 @@ app2 🧪 test:
2982
2989
  - app2/dist
2983
2990
  exclude:
2984
2991
  - app2/.env
2992
+ - app2/.next/cache/**/*
2985
2993
  expire_in: 1 day
2986
2994
  when: always
2987
2995
  reports: {}
@@ -3497,6 +3505,7 @@ kube 🧪 test:
3497
3505
  - kube/dist
3498
3506
  exclude:
3499
3507
  - kube/.env
3508
+ - kube/.next/cache/**/*
3500
3509
  expire_in: 1 day
3501
3510
  when: always
3502
3511
  reports: {}
@@ -4100,6 +4109,7 @@ kube 🧪 test:
4100
4109
  - kube/dist
4101
4110
  exclude:
4102
4111
  - kube/.env
4112
+ - kube/.next/cache/**/*
4103
4113
  expire_in: 1 day
4104
4114
  when: always
4105
4115
  reports: {}
@@ -4704,6 +4714,7 @@ kube 🧪 test:
4704
4714
  - kube/dist
4705
4715
  exclude:
4706
4716
  - kube/.env
4717
+ - kube/.next/cache/**/*
4707
4718
  expire_in: 1 day
4708
4719
  when: always
4709
4720
  reports: {}
@@ -5300,6 +5311,7 @@ kube 🧪 test:
5300
5311
  - kube/dist
5301
5312
  exclude:
5302
5313
  - kube/.env
5314
+ - kube/.next/cache/**/*
5303
5315
  expire_in: 1 day
5304
5316
  when: always
5305
5317
  reports: {}
@@ -309,6 +309,7 @@ app 🧪 test:
309
309
  - app/dist
310
310
  exclude:
311
311
  - app/.env
312
+ - app/.next/cache/**/*
312
313
  expire_in: 1 day
313
314
  when: always
314
315
  reports: {}
@@ -496,6 +497,7 @@ app 🧪 test:
496
497
  - app/dist
497
498
  exclude:
498
499
  - app/.env
500
+ - app/.next/cache/**/*
499
501
  expire_in: 1 day
500
502
  when: always
501
503
  reports: {}
@@ -683,6 +685,7 @@ app 🧪 test:
683
685
  - app/dist
684
686
  exclude:
685
687
  - app/.env
688
+ - app/.next/cache/**/*
686
689
  expire_in: 1 day
687
690
  when: always
688
691
  reports: {}
@@ -864,6 +867,7 @@ app 🧪 test:
864
867
  - app/dist
865
868
  exclude:
866
869
  - app/.env
870
+ - app/.next/cache/**/*
867
871
  expire_in: 1 day
868
872
  when: always
869
873
  reports: {}
@@ -1141,6 +1145,7 @@ api 🧪 test:
1141
1145
  - api/dist
1142
1146
  exclude:
1143
1147
  - api/.env
1148
+ - api/.next/cache/**/*
1144
1149
  expire_in: 1 day
1145
1150
  when: always
1146
1151
  reports: {}
@@ -1450,6 +1455,7 @@ api 🧪 test:
1450
1455
  - api/dist
1451
1456
  exclude:
1452
1457
  - api/.env
1458
+ - api/.next/cache/**/*
1453
1459
  expire_in: 1 day
1454
1460
  when: always
1455
1461
  reports: {}
@@ -1765,6 +1771,7 @@ api 🧪 test:
1765
1771
  - api/dist
1766
1772
  exclude:
1767
1773
  - api/.env
1774
+ - api/.next/cache/**/*
1768
1775
  expire_in: 1 day
1769
1776
  when: always
1770
1777
  reports: {}
@@ -2067,6 +2074,7 @@ api 🧪 test:
2067
2074
  - api/dist
2068
2075
  exclude:
2069
2076
  - api/.env
2077
+ - api/.next/cache/**/*
2070
2078
  expire_in: 1 day
2071
2079
  when: always
2072
2080
  reports: {}
@@ -289,6 +289,7 @@ www 🧪 test:
289
289
  - www/dist
290
290
  exclude:
291
291
  - www/.env
292
+ - www/.next/cache/**/*
292
293
  expire_in: 1 day
293
294
  when: always
294
295
  reports: {}
@@ -598,6 +599,7 @@ www 🧪 test:
598
599
  - www/dist
599
600
  exclude:
600
601
  - www/.env
602
+ - www/.next/cache/**/*
601
603
  expire_in: 1 day
602
604
  when: always
603
605
  reports: {}
@@ -913,6 +915,7 @@ www 🧪 test:
913
915
  - www/dist
914
916
  exclude:
915
917
  - www/.env
918
+ - www/.next/cache/**/*
916
919
  expire_in: 1 day
917
920
  when: always
918
921
  reports: {}
@@ -1215,6 +1218,7 @@ www 🧪 test:
1215
1218
  - www/dist
1216
1219
  exclude:
1217
1220
  - www/.env
1221
+ - www/.next/cache/**/*
1218
1222
  expire_in: 1 day
1219
1223
  when: always
1220
1224
  reports: {}
@@ -289,6 +289,7 @@ www 🧪 test:
289
289
  - www/dist
290
290
  exclude:
291
291
  - www/.env
292
+ - www/.next/cache/**/*
292
293
  expire_in: 1 day
293
294
  when: always
294
295
  reports: {}
@@ -600,6 +601,7 @@ www 🧪 test:
600
601
  - www/dist
601
602
  exclude:
602
603
  - www/.env
604
+ - www/.next/cache/**/*
603
605
  expire_in: 1 day
604
606
  when: always
605
607
  reports: {}
@@ -917,6 +919,7 @@ www 🧪 test:
917
919
  - www/dist
918
920
  exclude:
919
921
  - www/.env
922
+ - www/.next/cache/**/*
920
923
  expire_in: 1 day
921
924
  when: always
922
925
  reports: {}
@@ -1221,6 +1224,7 @@ www 🧪 test:
1221
1224
  - www/dist
1222
1225
  exclude:
1223
1226
  - www/.env
1227
+ - www/.next/cache/**/*
1224
1228
  expire_in: 1 day
1225
1229
  when: always
1226
1230
  reports: {}
@@ -291,6 +291,7 @@ my-app 🧪 test:
291
291
  - app/dist
292
292
  exclude:
293
293
  - app/.env
294
+ - app/.next/cache/**/*
294
295
  expire_in: 1 day
295
296
  when: always
296
297
  reports: {}
@@ -607,6 +608,7 @@ my-app 🧪 test:
607
608
  - app/dist
608
609
  exclude:
609
610
  - app/.env
611
+ - app/.next/cache/**/*
610
612
  expire_in: 1 day
611
613
  when: always
612
614
  reports: {}
@@ -930,6 +932,7 @@ my-app 🧪 test:
930
932
  - app/dist
931
933
  exclude:
932
934
  - app/.env
935
+ - app/.next/cache/**/*
933
936
  expire_in: 1 day
934
937
  when: always
935
938
  reports: {}
@@ -1237,6 +1240,7 @@ my-app 🧪 test:
1237
1240
  - app/dist
1238
1241
  exclude:
1239
1242
  - app/.env
1243
+ - app/.next/cache/**/*
1240
1244
  expire_in: 1 day
1241
1245
  when: always
1242
1246
  reports: {}
@@ -299,6 +299,7 @@ app1 🧪 test:
299
299
  - app1/dist
300
300
  exclude:
301
301
  - app1/.env
302
+ - app1/.next/cache/**/*
302
303
  expire_in: 1 day
303
304
  when: always
304
305
  reports: {}
@@ -633,6 +634,7 @@ app1 🧪 test:
633
634
  - app1/dist
634
635
  exclude:
635
636
  - app1/.env
637
+ - app1/.next/cache/**/*
636
638
  expire_in: 1 day
637
639
  when: always
638
640
  reports: {}
@@ -973,6 +975,7 @@ app1 🧪 test:
973
975
  - app1/dist
974
976
  exclude:
975
977
  - app1/.env
978
+ - app1/.next/cache/**/*
976
979
  expire_in: 1 day
977
980
  when: always
978
981
  reports: {}
@@ -1300,6 +1303,7 @@ app1 🧪 test:
1300
1303
  - app1/dist
1301
1304
  exclude:
1302
1305
  - app1/.env
1306
+ - app1/.next/cache/**/*
1303
1307
  expire_in: 1 day
1304
1308
  when: always
1305
1309
  reports: {}
@@ -1741,6 +1745,7 @@ app2 🧪 test:
1741
1745
  - app2/dist
1742
1746
  exclude:
1743
1747
  - app2/.env
1748
+ - app2/.next/cache/**/*
1744
1749
  expire_in: 1 day
1745
1750
  when: always
1746
1751
  reports: {}
@@ -2085,6 +2090,7 @@ app2 🧪 test:
2085
2090
  - app2/dist
2086
2091
  exclude:
2087
2092
  - app2/.env
2093
+ - app2/.next/cache/**/*
2088
2094
  expire_in: 1 day
2089
2095
  when: always
2090
2096
  reports: {}
@@ -2435,6 +2441,7 @@ app2 🧪 test:
2435
2441
  - app2/dist
2436
2442
  exclude:
2437
2443
  - app2/.env
2444
+ - app2/.next/cache/**/*
2438
2445
  expire_in: 1 day
2439
2446
  when: always
2440
2447
  reports: {}
@@ -2772,6 +2779,7 @@ app2 🧪 test:
2772
2779
  - app2/dist
2773
2780
  exclude:
2774
2781
  - app2/.env
2782
+ - app2/.next/cache/**/*
2775
2783
  expire_in: 1 day
2776
2784
  when: always
2777
2785
  reports: {}
@@ -3213,6 +3221,7 @@ app3 🧪 test:
3213
3221
  - kube/dist
3214
3222
  exclude:
3215
3223
  - kube/.env
3224
+ - kube/.next/cache/**/*
3216
3225
  expire_in: 1 day
3217
3226
  when: always
3218
3227
  reports: {}
@@ -3637,6 +3646,7 @@ app3 🧪 test:
3637
3646
  - kube/dist
3638
3647
  exclude:
3639
3648
  - kube/.env
3649
+ - kube/.next/cache/**/*
3640
3650
  expire_in: 1 day
3641
3651
  when: always
3642
3652
  reports: {}
@@ -4062,6 +4072,7 @@ app3 🧪 test:
4062
4072
  - kube/dist
4063
4073
  exclude:
4064
4074
  - kube/.env
4075
+ - kube/.next/cache/**/*
4065
4076
  expire_in: 1 day
4066
4077
  when: always
4067
4078
  reports: {}
@@ -4479,6 +4490,7 @@ app3 🧪 test:
4479
4490
  - kube/dist
4480
4491
  exclude:
4481
4492
  - kube/.env
4493
+ - kube/.next/cache/**/*
4482
4494
  expire_in: 1 day
4483
4495
  when: always
4484
4496
  reports: {}
@@ -281,6 +281,7 @@ api 🧪 test:
281
281
  - api/dist
282
282
  exclude:
283
283
  - api/.env
284
+ - api/.next/cache/**/*
284
285
  expire_in: 1 day
285
286
  when: always
286
287
  reports: {}
@@ -428,6 +429,7 @@ api 🧪 test:
428
429
  - api/dist
429
430
  exclude:
430
431
  - api/.env
432
+ - api/.next/cache/**/*
431
433
  expire_in: 1 day
432
434
  when: always
433
435
  reports: {}
@@ -575,6 +577,7 @@ api 🧪 test:
575
577
  - api/dist
576
578
  exclude:
577
579
  - api/.env
580
+ - api/.next/cache/**/*
578
581
  expire_in: 1 day
579
582
  when: always
580
583
  reports: {}
@@ -716,6 +719,7 @@ api 🧪 test:
716
719
  - api/dist
717
720
  exclude:
718
721
  - api/.env
722
+ - api/.next/cache/**/*
719
723
  expire_in: 1 day
720
724
  when: always
721
725
  reports: {}
@@ -967,6 +971,7 @@ www 🧪 test:
967
971
  - www/dist
968
972
  exclude:
969
973
  - www/.env
974
+ - www/.next/cache/**/*
970
975
  expire_in: 1 day
971
976
  when: always
972
977
  reports: {}
@@ -1116,6 +1121,7 @@ www 🧪 test:
1116
1121
  - www/dist
1117
1122
  exclude:
1118
1123
  - www/.env
1124
+ - www/.next/cache/**/*
1119
1125
  expire_in: 1 day
1120
1126
  when: always
1121
1127
  reports: {}
@@ -1265,6 +1271,7 @@ www 🧪 test:
1265
1271
  - www/dist
1266
1272
  exclude:
1267
1273
  - www/.env
1274
+ - www/.next/cache/**/*
1268
1275
  expire_in: 1 day
1269
1276
  when: always
1270
1277
  reports: {}
@@ -1408,6 +1415,7 @@ www 🧪 test:
1408
1415
  - www/dist
1409
1416
  exclude:
1410
1417
  - www/.env
1418
+ - www/.next/cache/**/*
1411
1419
  expire_in: 1 day
1412
1420
  when: always
1413
1421
  reports: {}
@@ -298,7 +298,9 @@ before_script:
298
298
  - www/dist
299
299
  exclude:
300
300
  - api/.env
301
+ - api/.next/cache/**/*
301
302
  - www/.env
303
+ - www/.next/cache/**/*
302
304
  expire_in: 1 day
303
305
  when: always
304
306
  reports: {}
@@ -390,7 +392,9 @@ before_script:
390
392
  - www/dist
391
393
  exclude:
392
394
  - api/.env
395
+ - api/.next/cache/**/*
393
396
  - www/.env
397
+ - www/.next/cache/**/*
394
398
  expire_in: 1 day
395
399
  when: always
396
400
  reports: {}
@@ -482,7 +486,9 @@ before_script:
482
486
  - www/dist
483
487
  exclude:
484
488
  - api/.env
489
+ - api/.next/cache/**/*
485
490
  - www/.env
491
+ - www/.next/cache/**/*
486
492
  expire_in: 1 day
487
493
  when: always
488
494
  reports: {}
@@ -574,7 +580,9 @@ before_script:
574
580
  - www/dist
575
581
  exclude:
576
582
  - api/.env
583
+ - api/.next/cache/**/*
577
584
  - www/.env
585
+ - www/.next/cache/**/*
578
586
  expire_in: 1 day
579
587
  when: always
580
588
  reports: {}
@@ -296,7 +296,9 @@ before_script:
296
296
  - www/dist
297
297
  exclude:
298
298
  - api/.env
299
+ - api/.next/cache/**/*
299
300
  - www/.env
301
+ - www/.next/cache/**/*
300
302
  expire_in: 1 day
301
303
  when: always
302
304
  reports: {}
@@ -386,7 +388,9 @@ before_script:
386
388
  - www/dist
387
389
  exclude:
388
390
  - api/.env
391
+ - api/.next/cache/**/*
389
392
  - www/.env
393
+ - www/.next/cache/**/*
390
394
  expire_in: 1 day
391
395
  when: always
392
396
  reports: {}
@@ -476,7 +480,9 @@ before_script:
476
480
  - www/dist
477
481
  exclude:
478
482
  - api/.env
483
+ - api/.next/cache/**/*
479
484
  - www/.env
485
+ - www/.next/cache/**/*
480
486
  expire_in: 1 day
481
487
  when: always
482
488
  reports: {}
@@ -566,7 +572,9 @@ before_script:
566
572
  - www/dist
567
573
  exclude:
568
574
  - api/.env
575
+ - api/.next/cache/**/*
569
576
  - www/.env
577
+ - www/.next/cache/**/*
570
578
  expire_in: 1 day
571
579
  when: always
572
580
  reports: {}
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "3.23.1",
56
+ "version": "3.25.0",
57
57
  "scripts": {
58
58
  "build:tsc": "yarn tsc",
59
59
  "build": "yarn build:compile && yarn build:inline-variables",
@@ -15,11 +15,13 @@ export const createBuildJobArtifacts = (
15
15
  context.type === "workspace"
16
16
  ? context.components.flatMap((c) => getArtifactsPathForComponent(c))
17
17
  : getArtifactsPathForComponent(context, ["__build_info.json"]);
18
- // esxclude .env files if generated
18
+
19
19
  const exclude =
20
20
  context.type === "workspace"
21
- ? context.components.flatMap((c) => getDotEnvPathsForComponent(c))
22
- : getDotEnvPathsForComponent(context);
21
+ ? context.components.flatMap((c) =>
22
+ getAllArtifactExcludePathsForComponent(c),
23
+ )
24
+ : getAllArtifactExcludePathsForComponent(context);
23
25
  return {
24
26
  paths: uniq(paths).sort((a, b) => a.localeCompare(b)),
25
27
  ...(exclude.length > 0 ? { exclude } : {}),
@@ -36,14 +38,13 @@ export const createBuildJobArtifacts = (
36
38
  : {},
37
39
  };
38
40
  };
39
- const getArtifactsPathForComponent = (
41
+ const _getArtifactPathsForComponent = (
40
42
  c: ComponentContext,
43
+ configKey: "artifactsPaths" | "artifactsExcludePaths",
41
44
  additionalPaths?: string[],
42
45
  ): string[] => {
43
46
  return [
44
- ...(c.build.type !== "disabled"
45
- ? (c.build.config.artifactsPaths ?? [])
46
- : []),
47
+ ...(c.build.type !== "disabled" ? (c.build.config[configKey] ?? []) : []),
47
48
  ...(additionalPaths ?? []),
48
49
  ]?.flatMap((artifact) =>
49
50
  c.build
@@ -55,6 +56,33 @@ const getArtifactsPathForComponent = (
55
56
  );
56
57
  };
57
58
 
59
+ const getArtifactsPathForComponent = (
60
+ c: ComponentContext,
61
+ additionalPaths?: string[],
62
+ ): string[] => {
63
+ return _getArtifactPathsForComponent(c, "artifactsPaths", additionalPaths);
64
+ };
65
+
66
+ const getAllArtifactExcludePathsForComponent = (
67
+ c: ComponentContext,
68
+ ): string[] => {
69
+ return [
70
+ ...getDotEnvPathsForComponent(c), // always exclude .env files
71
+ ...getArtifactExcludePathsForComponent(c),
72
+ ];
73
+ };
74
+
75
+ const getArtifactExcludePathsForComponent = (
76
+ c: ComponentContext,
77
+ additionalPaths?: string[],
78
+ ): string[] => {
79
+ return _getArtifactPathsForComponent(
80
+ c,
81
+ "artifactsExcludePaths",
82
+ additionalPaths,
83
+ );
84
+ };
85
+
58
86
  const getDotEnvPathsForComponent = (c: ComponentContext): string[] => {
59
87
  if (componentContextNeedsBuildTimeDotEnv(c)) {
60
88
  return [join(c.build.dir, ".env")];
@@ -33,6 +33,7 @@ export const BUILD_TYPES: BuildTypes = {
33
33
  buildCommand: "yarn build",
34
34
  startCommand: "yarn start",
35
35
  artifactsPaths: ["dist", ".next"],
36
+ artifactsExcludePaths: [".next/cache/**/*"],
36
37
  }),
37
38
  },
38
39
  "node-static": {
@@ -122,6 +122,12 @@ export type BuildConfigBase = {
122
122
  */
123
123
  artifactsPaths?: string[];
124
124
 
125
+ /**
126
+ * paths for artifacts to exclude,
127
+ *
128
+ */
129
+ artifactsExcludePaths?: string[];
130
+
125
131
  /**
126
132
  * additional CI/CD artifacts reports,
127
133
  * use to display information in merge requests, pipeline views and security dashboards.
@@ -336,6 +342,11 @@ export type BuildConfigFromWorkspace = {
336
342
  * by default "dist" and ".next" are allways included
337
343
  */
338
344
  artifactsPaths?: string[];
345
+ /**
346
+ * paths for artifacts to exclude,
347
+ *
348
+ */
349
+ artifactsExcludePaths?: string[];
339
350
  } & WithCacheConfig;
340
351
  export type BuildConfigStandalone =
341
352
  | BuildConfigNode