@lokalise/harmony 1.40.3-exp-epic2x.2 → 1.40.3-exp-epic2x.3
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/dist/harmony.cjs +71 -68
- package/dist/harmony.cjs.map +1 -1
- package/dist/harmony.mjs +71 -68
- package/dist/harmony.mjs.map +1 -1
- package/dist/harmony10.cjs +30 -23
- package/dist/harmony10.cjs.map +1 -1
- package/dist/harmony10.mjs +30 -23
- package/dist/harmony10.mjs.map +1 -1
- package/dist/harmony100.cjs +13 -12
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +12 -11
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +12 -22
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +11 -21
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony102.cjs +21 -99
- package/dist/harmony102.cjs.map +1 -1
- package/dist/harmony102.mjs +20 -81
- package/dist/harmony102.mjs.map +1 -1
- package/dist/harmony103.cjs +96 -11
- package/dist/harmony103.cjs.map +1 -1
- package/dist/harmony103.mjs +79 -11
- package/dist/harmony103.mjs.map +1 -1
- package/dist/harmony104.cjs +14 -20
- package/dist/harmony104.cjs.map +1 -1
- package/dist/harmony104.mjs +14 -20
- package/dist/harmony104.mjs.map +1 -1
- package/dist/harmony105.cjs +20 -87
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +20 -87
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +87 -30
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +87 -30
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +31 -10
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +30 -9
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +9 -12
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +8 -11
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +6 -9
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +8 -11
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony11.cjs +16 -45
- package/dist/harmony11.cjs.map +1 -1
- package/dist/harmony11.mjs +16 -45
- package/dist/harmony11.mjs.map +1 -1
- package/dist/harmony110.cjs +5 -9
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +5 -9
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +16 -7
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +17 -8
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +7 -24
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +7 -24
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +21 -6
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +22 -7
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +7 -33
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +9 -35
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +33 -7
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +35 -9
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +8 -18
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +8 -18
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +13 -27
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +13 -27
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +36 -21
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +35 -20
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +21 -21
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +20 -20
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony12.cjs +51 -8
- package/dist/harmony12.cjs.map +1 -1
- package/dist/harmony12.mjs +51 -8
- package/dist/harmony12.mjs.map +1 -1
- package/dist/harmony120.cjs +21 -6
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +20 -5
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +3 -12
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +3 -12
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony122.cjs +15 -5
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +15 -5
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +5 -5
- package/dist/harmony123.mjs +5 -5
- package/dist/harmony124.cjs +6 -97
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +5 -96
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +94 -11
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +94 -11
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +12 -13
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +12 -13
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +13 -35
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +13 -35
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony128.cjs +32 -24
- package/dist/harmony128.cjs.map +1 -1
- package/dist/harmony128.mjs +32 -24
- package/dist/harmony128.mjs.map +1 -1
- package/dist/harmony129.cjs +28 -10
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +28 -10
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony13.cjs +8 -4
- package/dist/harmony13.cjs.map +1 -1
- package/dist/harmony13.mjs +8 -4
- package/dist/harmony13.mjs.map +1 -1
- package/dist/harmony130.cjs +10 -9
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +9 -8
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +6 -3
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +6 -3
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +3 -6
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +3 -6
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony133.cjs +6 -21
- package/dist/harmony133.cjs.map +1 -1
- package/dist/harmony133.mjs +6 -21
- package/dist/harmony133.mjs.map +1 -1
- package/dist/harmony134.cjs +21 -3
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +21 -3
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +3 -9
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +3 -9
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +9 -3
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +9 -3
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +7 -14
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +6 -13
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +12 -14
- package/dist/harmony138.cjs.map +1 -1
- package/dist/harmony138.mjs +12 -14
- package/dist/harmony138.mjs.map +1 -1
- package/dist/harmony139.cjs +13 -14
- package/dist/harmony139.cjs.map +1 -1
- package/dist/harmony139.mjs +13 -14
- package/dist/harmony139.mjs.map +1 -1
- package/dist/harmony14.cjs +5 -32
- package/dist/harmony14.cjs.map +1 -1
- package/dist/harmony14.mjs +5 -32
- package/dist/harmony14.mjs.map +1 -1
- package/dist/harmony140.cjs +15 -10
- package/dist/harmony140.cjs.map +1 -1
- package/dist/harmony140.mjs +15 -10
- package/dist/harmony140.mjs.map +1 -1
- package/dist/harmony141.cjs +10 -15
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +10 -15
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +13 -18
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +13 -18
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +19 -10
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +19 -10
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +11 -5
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +11 -5
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +5 -11
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +5 -11
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +11 -31
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +11 -31
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +28 -10
- package/dist/harmony147.cjs.map +1 -1
- package/dist/harmony147.mjs +28 -10
- package/dist/harmony147.mjs.map +1 -1
- package/dist/harmony148.cjs +17 -0
- package/dist/harmony148.cjs.map +1 -0
- package/dist/harmony148.mjs +17 -0
- package/dist/harmony148.mjs.map +1 -0
- package/dist/harmony15.cjs +32 -5
- package/dist/harmony15.cjs.map +1 -1
- package/dist/harmony15.mjs +32 -5
- package/dist/harmony15.mjs.map +1 -1
- package/dist/harmony16.cjs +5 -11
- package/dist/harmony16.cjs.map +1 -1
- package/dist/harmony16.mjs +5 -11
- package/dist/harmony16.mjs.map +1 -1
- package/dist/harmony17.cjs +9 -9
- package/dist/harmony17.cjs.map +1 -1
- package/dist/harmony17.mjs +9 -9
- package/dist/harmony17.mjs.map +1 -1
- package/dist/harmony18.cjs +9 -16
- package/dist/harmony18.cjs.map +1 -1
- package/dist/harmony18.mjs +9 -16
- package/dist/harmony18.mjs.map +1 -1
- package/dist/harmony19.cjs +16 -14
- package/dist/harmony19.cjs.map +1 -1
- package/dist/harmony19.mjs +16 -14
- package/dist/harmony19.mjs.map +1 -1
- package/dist/harmony20.cjs +13 -139
- package/dist/harmony20.cjs.map +1 -1
- package/dist/harmony20.mjs +13 -139
- package/dist/harmony20.mjs.map +1 -1
- package/dist/harmony21.cjs +142 -20
- package/dist/harmony21.cjs.map +1 -1
- package/dist/harmony21.mjs +142 -20
- package/dist/harmony21.mjs.map +1 -1
- package/dist/harmony22.cjs +20 -14
- package/dist/harmony22.cjs.map +1 -1
- package/dist/harmony22.mjs +20 -14
- package/dist/harmony22.mjs.map +1 -1
- package/dist/harmony23.cjs +13 -16
- package/dist/harmony23.cjs.map +1 -1
- package/dist/harmony23.mjs +13 -16
- package/dist/harmony23.mjs.map +1 -1
- package/dist/harmony24.cjs +10 -11
- package/dist/harmony24.cjs.map +1 -1
- package/dist/harmony24.mjs +10 -11
- package/dist/harmony24.mjs.map +1 -1
- package/dist/harmony25.cjs +16 -18
- package/dist/harmony25.cjs.map +1 -1
- package/dist/harmony25.mjs +16 -18
- package/dist/harmony25.mjs.map +1 -1
- package/dist/harmony26.cjs +17 -17
- package/dist/harmony26.cjs.map +1 -1
- package/dist/harmony26.mjs +18 -18
- package/dist/harmony26.mjs.map +1 -1
- package/dist/harmony27.cjs +19 -9
- package/dist/harmony27.cjs.map +1 -1
- package/dist/harmony27.mjs +19 -9
- package/dist/harmony27.mjs.map +1 -1
- package/dist/harmony28.cjs +7 -8
- package/dist/harmony28.cjs.map +1 -1
- package/dist/harmony28.mjs +7 -8
- package/dist/harmony28.mjs.map +1 -1
- package/dist/harmony29.cjs +11 -55
- package/dist/harmony29.cjs.map +1 -1
- package/dist/harmony29.mjs +11 -55
- package/dist/harmony29.mjs.map +1 -1
- package/dist/harmony3.cjs +3 -3
- package/dist/harmony3.mjs +3 -3
- package/dist/harmony30.cjs +49 -25
- package/dist/harmony30.cjs.map +1 -1
- package/dist/harmony30.mjs +50 -26
- package/dist/harmony30.mjs.map +1 -1
- package/dist/harmony31.cjs +28 -8
- package/dist/harmony31.cjs.map +1 -1
- package/dist/harmony31.mjs +29 -9
- package/dist/harmony31.mjs.map +1 -1
- package/dist/harmony32.cjs +10 -54
- package/dist/harmony32.cjs.map +1 -1
- package/dist/harmony32.mjs +10 -54
- package/dist/harmony32.mjs.map +1 -1
- package/dist/harmony33.cjs +50 -25
- package/dist/harmony33.cjs.map +1 -1
- package/dist/harmony33.mjs +51 -26
- package/dist/harmony33.mjs.map +1 -1
- package/dist/harmony34.cjs +27 -15
- package/dist/harmony34.cjs.map +1 -1
- package/dist/harmony34.mjs +28 -16
- package/dist/harmony34.mjs.map +1 -1
- package/dist/harmony35.cjs +15 -25
- package/dist/harmony35.cjs.map +1 -1
- package/dist/harmony35.mjs +16 -26
- package/dist/harmony35.mjs.map +1 -1
- package/dist/harmony36.cjs +25 -11
- package/dist/harmony36.cjs.map +1 -1
- package/dist/harmony36.mjs +26 -12
- package/dist/harmony36.mjs.map +1 -1
- package/dist/harmony37.cjs +14 -14
- package/dist/harmony37.cjs.map +1 -1
- package/dist/harmony37.mjs +14 -14
- package/dist/harmony37.mjs.map +1 -1
- package/dist/harmony38.cjs +6 -6
- package/dist/harmony38.cjs.map +1 -1
- package/dist/harmony38.mjs +6 -6
- package/dist/harmony38.mjs.map +1 -1
- package/dist/harmony39.cjs +4 -4
- package/dist/harmony39.cjs.map +1 -1
- package/dist/harmony39.mjs +4 -4
- package/dist/harmony39.mjs.map +1 -1
- package/dist/harmony4.cjs +2 -2
- package/dist/harmony4.mjs +2 -2
- package/dist/harmony40.cjs +6 -6
- package/dist/harmony40.cjs.map +1 -1
- package/dist/harmony40.mjs +6 -6
- package/dist/harmony40.mjs.map +1 -1
- package/dist/harmony41.cjs +6 -5
- package/dist/harmony41.cjs.map +1 -1
- package/dist/harmony41.mjs +6 -5
- package/dist/harmony41.mjs.map +1 -1
- package/dist/harmony42.cjs +6 -15
- package/dist/harmony42.cjs.map +1 -1
- package/dist/harmony42.mjs +7 -16
- package/dist/harmony42.mjs.map +1 -1
- package/dist/harmony43.cjs +16 -7
- package/dist/harmony43.cjs.map +1 -1
- package/dist/harmony43.mjs +16 -7
- package/dist/harmony43.mjs.map +1 -1
- package/dist/harmony44.cjs +4 -4
- package/dist/harmony44.cjs.map +1 -1
- package/dist/harmony44.mjs +4 -4
- package/dist/harmony44.mjs.map +1 -1
- package/dist/harmony45.cjs +7 -11
- package/dist/harmony45.cjs.map +1 -1
- package/dist/harmony45.mjs +9 -13
- package/dist/harmony45.mjs.map +1 -1
- package/dist/harmony46.cjs +8 -8
- package/dist/harmony46.cjs.map +1 -1
- package/dist/harmony46.mjs +8 -8
- package/dist/harmony46.mjs.map +1 -1
- package/dist/harmony47.cjs +14 -12
- package/dist/harmony47.cjs.map +1 -1
- package/dist/harmony47.mjs +14 -12
- package/dist/harmony47.mjs.map +1 -1
- package/dist/harmony48.cjs +8 -8
- package/dist/harmony48.cjs.map +1 -1
- package/dist/harmony48.mjs +9 -9
- package/dist/harmony48.mjs.map +1 -1
- package/dist/harmony49.cjs +9 -9
- package/dist/harmony49.cjs.map +1 -1
- package/dist/harmony49.mjs +10 -10
- package/dist/harmony49.mjs.map +1 -1
- package/dist/harmony5.cjs +25 -10
- package/dist/harmony5.cjs.map +1 -1
- package/dist/harmony5.mjs +25 -10
- package/dist/harmony5.mjs.map +1 -1
- package/dist/harmony50.cjs +12 -14
- package/dist/harmony50.cjs.map +1 -1
- package/dist/harmony50.mjs +12 -14
- package/dist/harmony50.mjs.map +1 -1
- package/dist/harmony51.cjs +10 -10
- package/dist/harmony51.cjs.map +1 -1
- package/dist/harmony51.mjs +10 -10
- package/dist/harmony51.mjs.map +1 -1
- package/dist/harmony52.cjs +8 -8
- package/dist/harmony52.cjs.map +1 -1
- package/dist/harmony52.mjs +8 -8
- package/dist/harmony52.mjs.map +1 -1
- package/dist/harmony53.cjs +7 -7
- package/dist/harmony53.cjs.map +1 -1
- package/dist/harmony53.mjs +7 -7
- package/dist/harmony53.mjs.map +1 -1
- package/dist/harmony54.cjs +8 -8
- package/dist/harmony54.cjs.map +1 -1
- package/dist/harmony54.mjs +8 -8
- package/dist/harmony54.mjs.map +1 -1
- package/dist/harmony55.cjs +14 -12
- package/dist/harmony55.cjs.map +1 -1
- package/dist/harmony55.mjs +14 -12
- package/dist/harmony55.mjs.map +1 -1
- package/dist/harmony56.cjs +12 -14
- package/dist/harmony56.cjs.map +1 -1
- package/dist/harmony56.mjs +12 -14
- package/dist/harmony56.mjs.map +1 -1
- package/dist/harmony57.cjs +8 -8
- package/dist/harmony57.cjs.map +1 -1
- package/dist/harmony57.mjs +8 -8
- package/dist/harmony57.mjs.map +1 -1
- package/dist/harmony58.cjs +8 -9
- package/dist/harmony58.cjs.map +1 -1
- package/dist/harmony58.mjs +9 -10
- package/dist/harmony58.mjs.map +1 -1
- package/dist/harmony59.cjs +11 -7
- package/dist/harmony59.cjs.map +1 -1
- package/dist/harmony59.mjs +12 -8
- package/dist/harmony59.mjs.map +1 -1
- package/dist/harmony6.cjs +9 -47
- package/dist/harmony6.cjs.map +1 -1
- package/dist/harmony6.mjs +11 -49
- package/dist/harmony6.mjs.map +1 -1
- package/dist/harmony60.cjs +4 -4
- package/dist/harmony60.cjs.map +1 -1
- package/dist/harmony60.mjs +4 -4
- package/dist/harmony60.mjs.map +1 -1
- package/dist/harmony61.cjs +13 -123
- package/dist/harmony61.cjs.map +1 -1
- package/dist/harmony61.mjs +13 -123
- package/dist/harmony61.mjs.map +1 -1
- package/dist/harmony62.cjs +102 -60
- package/dist/harmony62.cjs.map +1 -1
- package/dist/harmony62.mjs +102 -60
- package/dist/harmony62.mjs.map +1 -1
- package/dist/harmony63.cjs +80 -4
- package/dist/harmony63.cjs.map +1 -1
- package/dist/harmony63.mjs +80 -4
- package/dist/harmony63.mjs.map +1 -1
- package/dist/harmony64.cjs +4 -21
- package/dist/harmony64.cjs.map +1 -1
- package/dist/harmony64.mjs +4 -21
- package/dist/harmony64.mjs.map +1 -1
- package/dist/harmony65.cjs +20 -36
- package/dist/harmony65.cjs.map +1 -1
- package/dist/harmony65.mjs +20 -36
- package/dist/harmony65.mjs.map +1 -1
- package/dist/harmony66.cjs +34 -141
- package/dist/harmony66.cjs.map +1 -1
- package/dist/harmony66.mjs +31 -138
- package/dist/harmony66.mjs.map +1 -1
- package/dist/harmony67.cjs +145 -36
- package/dist/harmony67.cjs.map +1 -1
- package/dist/harmony67.mjs +144 -35
- package/dist/harmony67.mjs.map +1 -1
- package/dist/harmony68.cjs +36 -25
- package/dist/harmony68.cjs.map +1 -1
- package/dist/harmony68.mjs +36 -25
- package/dist/harmony68.mjs.map +1 -1
- package/dist/harmony69.cjs +24 -6
- package/dist/harmony69.cjs.map +1 -1
- package/dist/harmony69.mjs +24 -6
- package/dist/harmony69.mjs.map +1 -1
- package/dist/harmony7.cjs +45 -14
- package/dist/harmony7.cjs.map +1 -1
- package/dist/harmony7.mjs +47 -16
- package/dist/harmony7.mjs.map +1 -1
- package/dist/harmony70.cjs +6 -82
- package/dist/harmony70.cjs.map +1 -1
- package/dist/harmony70.mjs +6 -82
- package/dist/harmony70.mjs.map +1 -1
- package/dist/harmony71.cjs +79 -49
- package/dist/harmony71.cjs.map +1 -1
- package/dist/harmony71.mjs +79 -49
- package/dist/harmony71.mjs.map +1 -1
- package/dist/harmony72.cjs +53 -17
- package/dist/harmony72.cjs.map +1 -1
- package/dist/harmony72.mjs +53 -17
- package/dist/harmony72.mjs.map +1 -1
- package/dist/harmony73.cjs +19 -16
- package/dist/harmony73.cjs.map +1 -1
- package/dist/harmony73.mjs +18 -15
- package/dist/harmony73.mjs.map +1 -1
- package/dist/harmony74.cjs +15 -18
- package/dist/harmony74.cjs.map +1 -1
- package/dist/harmony74.mjs +15 -18
- package/dist/harmony74.mjs.map +1 -1
- package/dist/harmony75.cjs +18 -61
- package/dist/harmony75.cjs.map +1 -1
- package/dist/harmony75.mjs +18 -61
- package/dist/harmony75.mjs.map +1 -1
- package/dist/harmony76.cjs +59 -37
- package/dist/harmony76.cjs.map +1 -1
- package/dist/harmony76.mjs +59 -37
- package/dist/harmony76.mjs.map +1 -1
- package/dist/harmony77.cjs +37 -35
- package/dist/harmony77.cjs.map +1 -1
- package/dist/harmony77.mjs +38 -36
- package/dist/harmony77.mjs.map +1 -1
- package/dist/harmony78.cjs +37 -9
- package/dist/harmony78.cjs.map +1 -1
- package/dist/harmony78.mjs +36 -8
- package/dist/harmony78.mjs.map +1 -1
- package/dist/harmony79.cjs +10 -9
- package/dist/harmony79.cjs.map +1 -1
- package/dist/harmony79.mjs +9 -8
- package/dist/harmony79.mjs.map +1 -1
- package/dist/harmony8.cjs +15 -56
- package/dist/harmony8.cjs.map +1 -1
- package/dist/harmony8.mjs +16 -57
- package/dist/harmony8.mjs.map +1 -1
- package/dist/harmony80.cjs +5 -26
- package/dist/harmony80.cjs.map +1 -1
- package/dist/harmony80.mjs +8 -29
- package/dist/harmony80.mjs.map +1 -1
- package/dist/harmony81.cjs +29 -3
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +29 -3
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +3 -33
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +3 -33
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony83.cjs +33 -43
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +33 -43
- package/dist/harmony83.mjs.map +1 -1
- package/dist/harmony84.cjs +43 -29
- package/dist/harmony84.cjs.map +1 -1
- package/dist/harmony84.mjs +43 -29
- package/dist/harmony84.mjs.map +1 -1
- package/dist/harmony85.cjs +26 -63
- package/dist/harmony85.cjs.map +1 -1
- package/dist/harmony85.mjs +26 -63
- package/dist/harmony85.mjs.map +1 -1
- package/dist/harmony86.cjs +66 -15
- package/dist/harmony86.cjs.map +1 -1
- package/dist/harmony86.mjs +66 -15
- package/dist/harmony86.mjs.map +1 -1
- package/dist/harmony87.cjs +15 -3
- package/dist/harmony87.cjs.map +1 -1
- package/dist/harmony87.mjs +15 -3
- package/dist/harmony87.mjs.map +1 -1
- package/dist/harmony88.cjs +3 -166
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +3 -166
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +159 -37
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +160 -38
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony9.cjs +59 -30
- package/dist/harmony9.cjs.map +1 -1
- package/dist/harmony9.mjs +59 -30
- package/dist/harmony9.mjs.map +1 -1
- package/dist/harmony90.cjs +43 -11
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +43 -11
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +4 -13
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +3 -12
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +18 -3
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +18 -3
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +71 -13
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +73 -15
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +11 -75
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +11 -75
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +30 -12
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +30 -12
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +9 -30
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +9 -30
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +46 -8
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +47 -9
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +9 -47
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +8 -46
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +12 -9
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +11 -8
- package/dist/harmony99.mjs.map +1 -1
- package/dist/types/src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.stories.d.ts +1 -0
- package/dist/types/src/components/Sidebar/utils/content.d.ts +4 -0
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +2 -2
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +2 -2
- package/dist/types/src/features/navigation/hooks/useNavigationQueries.d.ts +12 -12
- package/dist/types/src/features/publicApi/contributors.d.ts +32 -32
- package/dist/types/src/features/publicApi/hooks/useAddContributorsMutation.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useGetTeamUsersQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useListContributorsQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +3 -3
- package/dist/types/src/features/publicApi/hooks/useListTeamUsersQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useListTeamsQuery.d.ts +4 -4
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useRetrieveTeamQuery.d.ts +4 -4
- package/dist/types/src/features/publicApi/hooks/useUpdateContributorMutation.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +2 -2
- package/dist/types/src/features/publicApi/projects.d.ts +22 -22
- package/dist/types/src/features/publicApi/team.d.ts +36 -36
- package/dist/types/src/features/publicApi/teamUsers.d.ts +16 -16
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +36 -36
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +14 -14
- package/dist/types/src/features/publicApi/types/teamTypes.d.ts +42 -42
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +20 -20
- package/dist/types/src/node.d.ts +1 -0
- package/package.json +1 -1
package/dist/harmony21.cjs
CHANGED
@@ -1,23 +1,145 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
class HeaderBuilder {
|
4
|
+
/**
|
5
|
+
* This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
|
6
|
+
* that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
|
7
|
+
* static create method.
|
8
|
+
*
|
9
|
+
* @private
|
10
|
+
*/
|
11
|
+
constructor(factories) {
|
12
|
+
this.factories = factories;
|
13
|
+
}
|
14
|
+
static create(initialHeaders = {}) {
|
15
|
+
return new HeaderBuilder([() => initialHeaders]);
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* Adds a single header to the builder by providing a key and a value.
|
19
|
+
*
|
20
|
+
* @example
|
21
|
+
* ```typescript
|
22
|
+
* const builder = HeaderBuilder.create()
|
23
|
+
* .add('Content-Type', 'application/json')
|
24
|
+
* .add('authorization', 'Bearer token')
|
25
|
+
*
|
26
|
+
* const headers = await builder.resolve()
|
27
|
+
* console.log(headers)
|
28
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* @param key - The key of the header
|
32
|
+
* @param value - The value of the header
|
33
|
+
*/
|
34
|
+
add(key, value) {
|
35
|
+
return new HeaderBuilder([...this.factories, () => ({ [key]: value })]);
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
39
|
+
*
|
40
|
+
* @example
|
41
|
+
* ```typescript
|
42
|
+
* const builder = HeaderBuilder.create()
|
43
|
+
* .and({ 'Content-Type': 'application/json', 'authorization': 'Bearer token' })
|
44
|
+
* .and(Promise.resolve({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' }))
|
45
|
+
*
|
46
|
+
* const headers = await builder.resolve()
|
47
|
+
* console.log(headers)
|
48
|
+
* // Prints: {
|
49
|
+
* // 'Content-Type': 'application/json',
|
50
|
+
* // 'authorization': 'Bearer token',
|
51
|
+
* // 'X-Custom-Header': 'custom',
|
52
|
+
* // 'X-Another-Header': 'another'
|
53
|
+
* // }
|
54
|
+
* ```
|
55
|
+
*
|
56
|
+
* @param extension - An object with the headers to add
|
57
|
+
*/
|
58
|
+
and(extension) {
|
59
|
+
return new HeaderBuilder([...this.factories, () => extension]);
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* Adds a factory function that returns a promise of headers to the builder.
|
63
|
+
* This is useful when you need to fetch some data asynchronously to build the headers.
|
64
|
+
*
|
65
|
+
* @example
|
66
|
+
* ```typescript
|
67
|
+
* const builder = HeaderBuilder.create()
|
68
|
+
* .from(async () => {
|
69
|
+
* const token = await fetchToken()
|
70
|
+
* return { 'authorization': `Bearer ${token}` }
|
71
|
+
* })
|
72
|
+
*
|
73
|
+
* const headers = await builder.resolve()
|
74
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
75
|
+
* ```
|
76
|
+
*
|
77
|
+
* @param factory - A function that returns a promise of headers
|
78
|
+
*/
|
79
|
+
from(factory) {
|
80
|
+
return new HeaderBuilder([...this.factories, factory]);
|
81
|
+
}
|
82
|
+
/**
|
83
|
+
* Takes a middleware function that receives the current builder and returns a new, modified, builder.
|
84
|
+
*
|
85
|
+
* @example
|
86
|
+
* ```typescript
|
87
|
+
* const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {
|
88
|
+
* const token = await fetchToken()
|
89
|
+
* return builder.add('authorization', `Bearer ${token}`)
|
90
|
+
* })
|
91
|
+
*
|
92
|
+
* const builder = HeaderBuilder.create()
|
93
|
+
* .with(authMiddleware)
|
94
|
+
*
|
95
|
+
* const headers = await builder.resolve() // Type of headers is { 'authorization': string }
|
96
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
97
|
+
* ```
|
98
|
+
*
|
99
|
+
* @param middleware
|
100
|
+
*/
|
101
|
+
with(middleware) {
|
102
|
+
return middleware.apply(this);
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Merges the current builder with another builder.
|
106
|
+
*
|
107
|
+
* @example
|
108
|
+
* ```typescript
|
109
|
+
* const builderA = HeaderBuilder.create()
|
110
|
+
* .add('Content-Type', 'application/json')
|
111
|
+
*
|
112
|
+
* const builderB = HeaderBuilder.create()
|
113
|
+
* .add('authorization', 'Bearer token')
|
114
|
+
*
|
115
|
+
* const mergedBuilder = builderA.merge(builderB)
|
116
|
+
*
|
117
|
+
* const headers = await mergedBuilder.resolve()
|
118
|
+
* console.log(headers)
|
119
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
120
|
+
* ```
|
121
|
+
*
|
122
|
+
* @param builder - The builder to merge with
|
123
|
+
*/
|
124
|
+
merge(builder) {
|
125
|
+
return new HeaderBuilder([...this.factories, ...builder.factories]);
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* Resolves the headers by waiting for all the promises to resolve and merging them together.
|
129
|
+
*
|
130
|
+
* @example
|
131
|
+
* ```typescript
|
132
|
+
* const builder = HeaderBuilder.create()
|
133
|
+
* .add('Content-Type', 'application/json')
|
134
|
+
*
|
135
|
+
* const headers = await builder.resolve()
|
136
|
+
* console.log(headers) // { 'Content-Type': 'application/json' }
|
137
|
+
*/
|
138
|
+
async resolve() {
|
139
|
+
const headers = this.factories.map((header) => header());
|
140
|
+
const resolvedHeaders = await Promise.all(headers);
|
141
|
+
return Object.assign({}, ...resolvedHeaders);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
exports.HeaderBuilder = HeaderBuilder;
|
23
145
|
//# sourceMappingURL=harmony21.cjs.map
|
package/dist/harmony21.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony21.cjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony21.cjs","sources":["../src/features/auth/core/headers/headerBuilder.ts"],"sourcesContent":["import type { HeaderBuilderMiddleware } from '@features/auth/core/headers/createHeaderBuilderMiddleware'\n\nexport type Headers<K extends string = string, V extends string = string> = Record<K, V>\n\n// biome-ignore lint/complexity/noBannedTypes: To represent no headers we need use an empty object\ntype NoHeaders = {}\n\n/**\n * A builder class that helps to build up a set of headers in a type-safe way.\n * It allows you to add headers, merge them together, and resolve them into a single object.\n * The builder is immutable, so every operation returns a new instance of the builder.\n * It offers a middleware function that allows you to modify the builder, asynchronously, in a type-safe way.\n *\n * @example\n * ```typescript\n * const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {\n * const token = await fetchToken()\n * return builder.add('authorization', `Bearer ${token}`)\n * })\n *\n * const builder = HeaderBuilder.create()\n * .add('Content-Type', 'application/json')\n * .and({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' })\n * .with(authMiddleware)\n *\n * const headers = await builder.resolve()\n * console.log(headers)\n * // Prints: {\n * // 'Content-Type': 'application/json',\n * // 'X-Custom-Header': 'custom',\n * // 'X-Another-Header': 'another',\n * // 'authorization': 'Bearer <token>'\n * // }\n */\nexport class HeaderBuilder<H extends Headers = NoHeaders> {\n\t/**\n\t * Creates a new HeaderBuilder, optionally with an initial set of headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t *\n\t * const builderWithHeaders = HeaderBuilder.create({ 'Content-Type': 'application/json' })\n\t *\n\t * console.log(builder) // {}\n\t * console.log(builderWithHeaders) // { 'Content-Type': 'application/json' }\n\t * ```\n\t */\n\t// biome-ignore lint/complexity/noBannedTypes: If headers are not provided the initial type is an empty object\n\tstatic create<const H extends Headers = {}>(): HeaderBuilder<H>\n\tstatic create<const H extends Headers>(initialHeaders: H): HeaderBuilder<H>\n\tstatic create<const H extends Headers>(initialHeaders = {} as H): HeaderBuilder<H> {\n\t\treturn new HeaderBuilder([() => initialHeaders])\n\t}\n\n\t/**\n\t * This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail\n\t * that users of this class should not be aware of. The only way to create a HeaderBuilder is through the\n\t * static create method.\n\t *\n\t * @private\n\t */\n\tprivate constructor(\n\t\t// This is a list of headers that will be put together in the resolve method.\n\t\t// You can think of this as building up a history of added headers that will be\n\t\t// merged together when they are needed.\n\t\tprivate readonly factories: (() => Promise<Headers> | Headers)[],\n\t) {}\n\n\t/**\n\t * Adds a single header to the builder by providing a key and a value.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t * .add('authorization', 'Bearer token')\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers)\n\t * // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }\n\t * ```\n\t *\n\t * @param key - The key of the header\n\t * @param value - The value of the header\n\t */\n\tadd<const K extends string, const V>(key: K, value: V): HeaderBuilder<H & { [k in K]: V }> {\n\t\treturn new HeaderBuilder([...this.factories, () => ({ [key]: value }) as Headers])\n\t}\n\n\t/**\n\t * Adds multiple headers to the builder by providing an object or a promise of an object with the headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .and({ 'Content-Type': 'application/json', 'authorization': 'Bearer token' })\n\t * .and(Promise.resolve({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' }))\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers)\n\t * // Prints: {\n\t * // 'Content-Type': 'application/json',\n\t * // 'authorization': 'Bearer token',\n\t * // 'X-Custom-Header': 'custom',\n\t * // 'X-Another-Header': 'another'\n\t * // }\n\t * ```\n\t *\n\t * @param extension - An object with the headers to add\n\t */\n\tand<const K extends string, const V extends string, E extends Headers<K, V>>(\n\t\textension: E | Promise<E>,\n\t): HeaderBuilder<H & E> {\n\t\treturn new HeaderBuilder([...this.factories, () => extension])\n\t}\n\n\t/**\n\t * Adds a factory function that returns a promise of headers to the builder.\n\t * This is useful when you need to fetch some data asynchronously to build the headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .from(async () => {\n\t * const token = await fetchToken()\n\t * return { 'authorization': `Bearer ${token}` }\n\t * })\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers) // { 'authorization': 'Bearer <token>' }\n\t * ```\n\t *\n\t * @param factory - A function that returns a promise of headers\n\t */\n\tfrom<E extends Headers>(factory: () => E | Promise<E>): HeaderBuilder<H & E> {\n\t\treturn new HeaderBuilder([...this.factories, factory])\n\t}\n\n\t/**\n\t * Takes a middleware function that receives the current builder and returns a new, modified, builder.\n\t *\n\t * @example\n\t * ```typescript\n\t * const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {\n\t * const token = await fetchToken()\n\t * return builder.add('authorization', `Bearer ${token}`)\n\t * })\n\t *\n\t * const builder = HeaderBuilder.create()\n\t * .with(authMiddleware)\n\t *\n\t * const headers = await builder.resolve() // Type of headers is { 'authorization': string }\n\t * console.log(headers) // { 'authorization': 'Bearer <token>' }\n\t * ```\n\t *\n\t * @param middleware\n\t */\n\twith<const T extends Headers>(middleware: HeaderBuilderMiddleware<T>) {\n\t\treturn middleware.apply(this)\n\t}\n\n\t/**\n\t * Merges the current builder with another builder.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builderA = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t *\n\t * const builderB = HeaderBuilder.create()\n\t * .add('authorization', 'Bearer token')\n\t *\n\t * const mergedBuilder = builderA.merge(builderB)\n\t *\n\t * const headers = await mergedBuilder.resolve()\n\t * console.log(headers)\n\t * // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }\n\t * ```\n\t *\n\t * @param builder - The builder to merge with\n\t */\n\tmerge<const T extends Headers>(builder: HeaderBuilder<T>): HeaderBuilder<H & T> {\n\t\treturn new HeaderBuilder([...this.factories, ...builder.factories])\n\t}\n\n\t/**\n\t * Resolves the headers by waiting for all the promises to resolve and merging them together.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers) // { 'Content-Type': 'application/json' }\n\t */\n\tasync resolve(): Promise<H> {\n\t\tconst headers = this.factories.map((header) => header())\n\t\tconst resolvedHeaders = await Promise.all(headers)\n\n\t\treturn Object.assign({}, ...resolvedHeaders)\n\t}\n}\n"],"names":[],"mappings":";;AAkCO,MAAM,cAA6C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BjD,YAIU,WAChB;AADgB,SAAA,YAAA;AAAA,EAAA;AAAA,EAflB,OAAO,OAAgC,iBAAiB,IAA2B;AAClF,WAAO,IAAI,cAAc,CAAC,MAAM,cAAc,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkChD,IAAqC,KAAQ,OAA8C;AAC1F,WAAO,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,OAAO,EAAE,CAAC,GAAG,GAAG,QAAmB,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBlF,IACC,WACuB;AAChB,WAAA,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,MAAM,SAAS,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9D,KAAwB,SAAqD;AAC5E,WAAO,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,OAAO,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBtD,KAA8B,YAAwC;AAC9D,WAAA,WAAW,MAAM,IAAI;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuB7B,MAA+B,SAAiD;AACxE,WAAA,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ,SAAS,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcnE,MAAM,UAAsB;AAC3B,UAAM,UAAU,KAAK,UAAU,IAAI,CAAC,WAAW,QAAQ;AACvD,UAAM,kBAAkB,MAAM,QAAQ,IAAI,OAAO;AAEjD,WAAO,OAAO,OAAO,CAAC,GAAG,GAAG,eAAe;AAAA,EAAA;AAE7C;;"}
|
package/dist/harmony21.mjs
CHANGED
@@ -1,23 +1,145 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
class HeaderBuilder {
|
2
|
+
/**
|
3
|
+
* This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
|
4
|
+
* that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
|
5
|
+
* static create method.
|
6
|
+
*
|
7
|
+
* @private
|
8
|
+
*/
|
9
|
+
constructor(factories) {
|
10
|
+
this.factories = factories;
|
11
|
+
}
|
12
|
+
static create(initialHeaders = {}) {
|
13
|
+
return new HeaderBuilder([() => initialHeaders]);
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Adds a single header to the builder by providing a key and a value.
|
17
|
+
*
|
18
|
+
* @example
|
19
|
+
* ```typescript
|
20
|
+
* const builder = HeaderBuilder.create()
|
21
|
+
* .add('Content-Type', 'application/json')
|
22
|
+
* .add('authorization', 'Bearer token')
|
23
|
+
*
|
24
|
+
* const headers = await builder.resolve()
|
25
|
+
* console.log(headers)
|
26
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* @param key - The key of the header
|
30
|
+
* @param value - The value of the header
|
31
|
+
*/
|
32
|
+
add(key, value) {
|
33
|
+
return new HeaderBuilder([...this.factories, () => ({ [key]: value })]);
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
37
|
+
*
|
38
|
+
* @example
|
39
|
+
* ```typescript
|
40
|
+
* const builder = HeaderBuilder.create()
|
41
|
+
* .and({ 'Content-Type': 'application/json', 'authorization': 'Bearer token' })
|
42
|
+
* .and(Promise.resolve({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' }))
|
43
|
+
*
|
44
|
+
* const headers = await builder.resolve()
|
45
|
+
* console.log(headers)
|
46
|
+
* // Prints: {
|
47
|
+
* // 'Content-Type': 'application/json',
|
48
|
+
* // 'authorization': 'Bearer token',
|
49
|
+
* // 'X-Custom-Header': 'custom',
|
50
|
+
* // 'X-Another-Header': 'another'
|
51
|
+
* // }
|
52
|
+
* ```
|
53
|
+
*
|
54
|
+
* @param extension - An object with the headers to add
|
55
|
+
*/
|
56
|
+
and(extension) {
|
57
|
+
return new HeaderBuilder([...this.factories, () => extension]);
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Adds a factory function that returns a promise of headers to the builder.
|
61
|
+
* This is useful when you need to fetch some data asynchronously to build the headers.
|
62
|
+
*
|
63
|
+
* @example
|
64
|
+
* ```typescript
|
65
|
+
* const builder = HeaderBuilder.create()
|
66
|
+
* .from(async () => {
|
67
|
+
* const token = await fetchToken()
|
68
|
+
* return { 'authorization': `Bearer ${token}` }
|
69
|
+
* })
|
70
|
+
*
|
71
|
+
* const headers = await builder.resolve()
|
72
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
73
|
+
* ```
|
74
|
+
*
|
75
|
+
* @param factory - A function that returns a promise of headers
|
76
|
+
*/
|
77
|
+
from(factory) {
|
78
|
+
return new HeaderBuilder([...this.factories, factory]);
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Takes a middleware function that receives the current builder and returns a new, modified, builder.
|
82
|
+
*
|
83
|
+
* @example
|
84
|
+
* ```typescript
|
85
|
+
* const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {
|
86
|
+
* const token = await fetchToken()
|
87
|
+
* return builder.add('authorization', `Bearer ${token}`)
|
88
|
+
* })
|
89
|
+
*
|
90
|
+
* const builder = HeaderBuilder.create()
|
91
|
+
* .with(authMiddleware)
|
92
|
+
*
|
93
|
+
* const headers = await builder.resolve() // Type of headers is { 'authorization': string }
|
94
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
95
|
+
* ```
|
96
|
+
*
|
97
|
+
* @param middleware
|
98
|
+
*/
|
99
|
+
with(middleware) {
|
100
|
+
return middleware.apply(this);
|
101
|
+
}
|
102
|
+
/**
|
103
|
+
* Merges the current builder with another builder.
|
104
|
+
*
|
105
|
+
* @example
|
106
|
+
* ```typescript
|
107
|
+
* const builderA = HeaderBuilder.create()
|
108
|
+
* .add('Content-Type', 'application/json')
|
109
|
+
*
|
110
|
+
* const builderB = HeaderBuilder.create()
|
111
|
+
* .add('authorization', 'Bearer token')
|
112
|
+
*
|
113
|
+
* const mergedBuilder = builderA.merge(builderB)
|
114
|
+
*
|
115
|
+
* const headers = await mergedBuilder.resolve()
|
116
|
+
* console.log(headers)
|
117
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
118
|
+
* ```
|
119
|
+
*
|
120
|
+
* @param builder - The builder to merge with
|
121
|
+
*/
|
122
|
+
merge(builder) {
|
123
|
+
return new HeaderBuilder([...this.factories, ...builder.factories]);
|
124
|
+
}
|
125
|
+
/**
|
126
|
+
* Resolves the headers by waiting for all the promises to resolve and merging them together.
|
127
|
+
*
|
128
|
+
* @example
|
129
|
+
* ```typescript
|
130
|
+
* const builder = HeaderBuilder.create()
|
131
|
+
* .add('Content-Type', 'application/json')
|
132
|
+
*
|
133
|
+
* const headers = await builder.resolve()
|
134
|
+
* console.log(headers) // { 'Content-Type': 'application/json' }
|
135
|
+
*/
|
136
|
+
async resolve() {
|
137
|
+
const headers = this.factories.map((header) => header());
|
138
|
+
const resolvedHeaders = await Promise.all(headers);
|
139
|
+
return Object.assign({}, ...resolvedHeaders);
|
140
|
+
}
|
141
|
+
}
|
20
142
|
export {
|
21
|
-
|
143
|
+
HeaderBuilder
|
22
144
|
};
|
23
145
|
//# sourceMappingURL=harmony21.mjs.map
|
package/dist/harmony21.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony21.mjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony21.mjs","sources":["../src/features/auth/core/headers/headerBuilder.ts"],"sourcesContent":["import type { HeaderBuilderMiddleware } from '@features/auth/core/headers/createHeaderBuilderMiddleware'\n\nexport type Headers<K extends string = string, V extends string = string> = Record<K, V>\n\n// biome-ignore lint/complexity/noBannedTypes: To represent no headers we need use an empty object\ntype NoHeaders = {}\n\n/**\n * A builder class that helps to build up a set of headers in a type-safe way.\n * It allows you to add headers, merge them together, and resolve them into a single object.\n * The builder is immutable, so every operation returns a new instance of the builder.\n * It offers a middleware function that allows you to modify the builder, asynchronously, in a type-safe way.\n *\n * @example\n * ```typescript\n * const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {\n * const token = await fetchToken()\n * return builder.add('authorization', `Bearer ${token}`)\n * })\n *\n * const builder = HeaderBuilder.create()\n * .add('Content-Type', 'application/json')\n * .and({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' })\n * .with(authMiddleware)\n *\n * const headers = await builder.resolve()\n * console.log(headers)\n * // Prints: {\n * // 'Content-Type': 'application/json',\n * // 'X-Custom-Header': 'custom',\n * // 'X-Another-Header': 'another',\n * // 'authorization': 'Bearer <token>'\n * // }\n */\nexport class HeaderBuilder<H extends Headers = NoHeaders> {\n\t/**\n\t * Creates a new HeaderBuilder, optionally with an initial set of headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t *\n\t * const builderWithHeaders = HeaderBuilder.create({ 'Content-Type': 'application/json' })\n\t *\n\t * console.log(builder) // {}\n\t * console.log(builderWithHeaders) // { 'Content-Type': 'application/json' }\n\t * ```\n\t */\n\t// biome-ignore lint/complexity/noBannedTypes: If headers are not provided the initial type is an empty object\n\tstatic create<const H extends Headers = {}>(): HeaderBuilder<H>\n\tstatic create<const H extends Headers>(initialHeaders: H): HeaderBuilder<H>\n\tstatic create<const H extends Headers>(initialHeaders = {} as H): HeaderBuilder<H> {\n\t\treturn new HeaderBuilder([() => initialHeaders])\n\t}\n\n\t/**\n\t * This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail\n\t * that users of this class should not be aware of. The only way to create a HeaderBuilder is through the\n\t * static create method.\n\t *\n\t * @private\n\t */\n\tprivate constructor(\n\t\t// This is a list of headers that will be put together in the resolve method.\n\t\t// You can think of this as building up a history of added headers that will be\n\t\t// merged together when they are needed.\n\t\tprivate readonly factories: (() => Promise<Headers> | Headers)[],\n\t) {}\n\n\t/**\n\t * Adds a single header to the builder by providing a key and a value.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t * .add('authorization', 'Bearer token')\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers)\n\t * // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }\n\t * ```\n\t *\n\t * @param key - The key of the header\n\t * @param value - The value of the header\n\t */\n\tadd<const K extends string, const V>(key: K, value: V): HeaderBuilder<H & { [k in K]: V }> {\n\t\treturn new HeaderBuilder([...this.factories, () => ({ [key]: value }) as Headers])\n\t}\n\n\t/**\n\t * Adds multiple headers to the builder by providing an object or a promise of an object with the headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .and({ 'Content-Type': 'application/json', 'authorization': 'Bearer token' })\n\t * .and(Promise.resolve({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' }))\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers)\n\t * // Prints: {\n\t * // 'Content-Type': 'application/json',\n\t * // 'authorization': 'Bearer token',\n\t * // 'X-Custom-Header': 'custom',\n\t * // 'X-Another-Header': 'another'\n\t * // }\n\t * ```\n\t *\n\t * @param extension - An object with the headers to add\n\t */\n\tand<const K extends string, const V extends string, E extends Headers<K, V>>(\n\t\textension: E | Promise<E>,\n\t): HeaderBuilder<H & E> {\n\t\treturn new HeaderBuilder([...this.factories, () => extension])\n\t}\n\n\t/**\n\t * Adds a factory function that returns a promise of headers to the builder.\n\t * This is useful when you need to fetch some data asynchronously to build the headers.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .from(async () => {\n\t * const token = await fetchToken()\n\t * return { 'authorization': `Bearer ${token}` }\n\t * })\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers) // { 'authorization': 'Bearer <token>' }\n\t * ```\n\t *\n\t * @param factory - A function that returns a promise of headers\n\t */\n\tfrom<E extends Headers>(factory: () => E | Promise<E>): HeaderBuilder<H & E> {\n\t\treturn new HeaderBuilder([...this.factories, factory])\n\t}\n\n\t/**\n\t * Takes a middleware function that receives the current builder and returns a new, modified, builder.\n\t *\n\t * @example\n\t * ```typescript\n\t * const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {\n\t * const token = await fetchToken()\n\t * return builder.add('authorization', `Bearer ${token}`)\n\t * })\n\t *\n\t * const builder = HeaderBuilder.create()\n\t * .with(authMiddleware)\n\t *\n\t * const headers = await builder.resolve() // Type of headers is { 'authorization': string }\n\t * console.log(headers) // { 'authorization': 'Bearer <token>' }\n\t * ```\n\t *\n\t * @param middleware\n\t */\n\twith<const T extends Headers>(middleware: HeaderBuilderMiddleware<T>) {\n\t\treturn middleware.apply(this)\n\t}\n\n\t/**\n\t * Merges the current builder with another builder.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builderA = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t *\n\t * const builderB = HeaderBuilder.create()\n\t * .add('authorization', 'Bearer token')\n\t *\n\t * const mergedBuilder = builderA.merge(builderB)\n\t *\n\t * const headers = await mergedBuilder.resolve()\n\t * console.log(headers)\n\t * // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }\n\t * ```\n\t *\n\t * @param builder - The builder to merge with\n\t */\n\tmerge<const T extends Headers>(builder: HeaderBuilder<T>): HeaderBuilder<H & T> {\n\t\treturn new HeaderBuilder([...this.factories, ...builder.factories])\n\t}\n\n\t/**\n\t * Resolves the headers by waiting for all the promises to resolve and merging them together.\n\t *\n\t * @example\n\t * ```typescript\n\t * const builder = HeaderBuilder.create()\n\t * .add('Content-Type', 'application/json')\n\t *\n\t * const headers = await builder.resolve()\n\t * console.log(headers) // { 'Content-Type': 'application/json' }\n\t */\n\tasync resolve(): Promise<H> {\n\t\tconst headers = this.factories.map((header) => header())\n\t\tconst resolvedHeaders = await Promise.all(headers)\n\n\t\treturn Object.assign({}, ...resolvedHeaders)\n\t}\n}\n"],"names":[],"mappings":"AAkCO,MAAM,cAA6C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4BjD,YAIU,WAChB;AADgB,SAAA,YAAA;AAAA,EAAA;AAAA,EAflB,OAAO,OAAgC,iBAAiB,IAA2B;AAClF,WAAO,IAAI,cAAc,CAAC,MAAM,cAAc,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkChD,IAAqC,KAAQ,OAA8C;AAC1F,WAAO,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,OAAO,EAAE,CAAC,GAAG,GAAG,QAAmB,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBlF,IACC,WACuB;AAChB,WAAA,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,MAAM,SAAS,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqB9D,KAAwB,SAAqD;AAC5E,WAAO,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,OAAO,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBtD,KAA8B,YAAwC;AAC9D,WAAA,WAAW,MAAM,IAAI;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuB7B,MAA+B,SAAiD;AACxE,WAAA,IAAI,cAAc,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ,SAAS,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcnE,MAAM,UAAsB;AAC3B,UAAM,UAAU,KAAK,UAAU,IAAI,CAAC,WAAW,QAAQ;AACvD,UAAM,kBAAkB,MAAM,QAAQ,IAAI,OAAO;AAEjD,WAAO,OAAO,OAAO,CAAC,GAAG,GAAG,eAAe;AAAA,EAAA;AAE7C;"}
|
package/dist/harmony22.cjs
CHANGED
@@ -1,17 +1,23 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
|
3
|
+
const wretch = require("wretch");
|
4
|
+
const publicApiHeaderBuilderMiddleware = require("./harmony16.cjs");
|
5
|
+
const headerBuilder = require("./harmony21.cjs");
|
6
|
+
const jwtAuthHeaderBuilderMiddleware = require("./harmony15.cjs");
|
7
|
+
const refreshExpiredToken = require("./harmony25.cjs");
|
8
|
+
const cookieTokenUtils = require("./harmony19.cjs");
|
9
|
+
const createAuthenticationHeaderBuilder = (apiUrl) => {
|
10
|
+
const authProviderHttpClient = wretch(apiUrl).errorType("json");
|
11
|
+
return headerBuilder.HeaderBuilder.create().with(
|
12
|
+
jwtAuthHeaderBuilderMiddleware.JwtAuthHeaderBuilderMiddleware({
|
13
|
+
getCurrentToken: cookieTokenUtils.getJwtTokenFromCookie,
|
14
|
+
refreshToken: refreshExpiredToken.refreshExpiredToken(authProviderHttpClient)
|
15
|
+
})
|
16
|
+
);
|
17
|
+
};
|
18
|
+
const createPublicApiHeaderBuilder = (apiUrl) => {
|
19
|
+
const authenticationHeaderBuilder = createAuthenticationHeaderBuilder(apiUrl);
|
20
|
+
return authenticationHeaderBuilder.with(publicApiHeaderBuilderMiddleware.PublicApiHeaderBuilderMiddleware);
|
21
|
+
};
|
22
|
+
exports.createPublicApiHeaderBuilder = createPublicApiHeaderBuilder;
|
17
23
|
//# sourceMappingURL=harmony22.cjs.map
|
package/dist/harmony22.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony22.cjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony22.cjs","sources":["../src/features/auth/factories/headerBuilderFactories.ts"],"sourcesContent":["import {\n\tHeaderBuilder,\n\tJwtAuthHeaderBuilderMiddleware,\n\tPublicApiHeaderBuilderMiddleware,\n\tgetJwtTokenFromCookie,\n\trefreshExpiredToken,\n} from '@features/auth/node'\nimport wretch from 'wretch'\n\n/**\n * Creates authentication header builder with configurable API URL\n */\nconst createAuthenticationHeaderBuilder = (apiUrl: string) => {\n\tconst authProviderHttpClient = wretch(apiUrl).errorType('json')\n\n\treturn HeaderBuilder.create().with(\n\t\tJwtAuthHeaderBuilderMiddleware({\n\t\t\tgetCurrentToken: getJwtTokenFromCookie,\n\t\t\trefreshToken: refreshExpiredToken(authProviderHttpClient),\n\t\t}),\n\t)\n}\n\n/**\n * Creates public API header builder with configurable API URL\n */\nexport const createPublicApiHeaderBuilder = (apiUrl: string) => {\n\tconst authenticationHeaderBuilder = createAuthenticationHeaderBuilder(apiUrl)\n\n\treturn authenticationHeaderBuilder.with(PublicApiHeaderBuilderMiddleware)\n}\n"],"names":["HeaderBuilder","JwtAuthHeaderBuilderMiddleware","getJwtTokenFromCookie","refreshExpiredToken","PublicApiHeaderBuilderMiddleware"],"mappings":";;;;;;;;AAYA,MAAM,oCAAoC,CAAC,WAAmB;AAC7D,QAAM,yBAAyB,OAAO,MAAM,EAAE,UAAU,MAAM;AAEvD,SAAAA,cAAA,cAAc,SAAS;AAAA,IAC7BC,8DAA+B;AAAA,MAC9B,iBAAiBC,iBAAA;AAAA,MACjB,cAAcC,wCAAoB,sBAAsB;AAAA,IACxD,CAAA;AAAA,EACF;AACD;AAKa,MAAA,+BAA+B,CAAC,WAAmB;AACzD,QAAA,8BAA8B,kCAAkC,MAAM;AAErE,SAAA,4BAA4B,KAAKC,iEAAgC;AACzE;;"}
|
package/dist/harmony22.mjs
CHANGED
@@ -1,17 +1,23 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
1
|
+
import wretch from "wretch";
|
2
|
+
import { PublicApiHeaderBuilderMiddleware } from "./harmony16.mjs";
|
3
|
+
import { HeaderBuilder } from "./harmony21.mjs";
|
4
|
+
import { JwtAuthHeaderBuilderMiddleware } from "./harmony15.mjs";
|
5
|
+
import { refreshExpiredToken } from "./harmony25.mjs";
|
6
|
+
import { getJwtTokenFromCookie } from "./harmony19.mjs";
|
7
|
+
const createAuthenticationHeaderBuilder = (apiUrl) => {
|
8
|
+
const authProviderHttpClient = wretch(apiUrl).errorType("json");
|
9
|
+
return HeaderBuilder.create().with(
|
10
|
+
JwtAuthHeaderBuilderMiddleware({
|
11
|
+
getCurrentToken: getJwtTokenFromCookie,
|
12
|
+
refreshToken: refreshExpiredToken(authProviderHttpClient)
|
13
|
+
})
|
14
|
+
);
|
15
|
+
};
|
16
|
+
const createPublicApiHeaderBuilder = (apiUrl) => {
|
17
|
+
const authenticationHeaderBuilder = createAuthenticationHeaderBuilder(apiUrl);
|
18
|
+
return authenticationHeaderBuilder.with(PublicApiHeaderBuilderMiddleware);
|
19
|
+
};
|
14
20
|
export {
|
15
|
-
|
21
|
+
createPublicApiHeaderBuilder
|
16
22
|
};
|
17
23
|
//# sourceMappingURL=harmony22.mjs.map
|
package/dist/harmony22.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony22.mjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony22.mjs","sources":["../src/features/auth/factories/headerBuilderFactories.ts"],"sourcesContent":["import {\n\tHeaderBuilder,\n\tJwtAuthHeaderBuilderMiddleware,\n\tPublicApiHeaderBuilderMiddleware,\n\tgetJwtTokenFromCookie,\n\trefreshExpiredToken,\n} from '@features/auth/node'\nimport wretch from 'wretch'\n\n/**\n * Creates authentication header builder with configurable API URL\n */\nconst createAuthenticationHeaderBuilder = (apiUrl: string) => {\n\tconst authProviderHttpClient = wretch(apiUrl).errorType('json')\n\n\treturn HeaderBuilder.create().with(\n\t\tJwtAuthHeaderBuilderMiddleware({\n\t\t\tgetCurrentToken: getJwtTokenFromCookie,\n\t\t\trefreshToken: refreshExpiredToken(authProviderHttpClient),\n\t\t}),\n\t)\n}\n\n/**\n * Creates public API header builder with configurable API URL\n */\nexport const createPublicApiHeaderBuilder = (apiUrl: string) => {\n\tconst authenticationHeaderBuilder = createAuthenticationHeaderBuilder(apiUrl)\n\n\treturn authenticationHeaderBuilder.with(PublicApiHeaderBuilderMiddleware)\n}\n"],"names":[],"mappings":";;;;;;AAYA,MAAM,oCAAoC,CAAC,WAAmB;AAC7D,QAAM,yBAAyB,OAAO,MAAM,EAAE,UAAU,MAAM;AAEvD,SAAA,cAAc,SAAS;AAAA,IAC7B,+BAA+B;AAAA,MAC9B,iBAAiB;AAAA,MACjB,cAAc,oBAAoB,sBAAsB;AAAA,IACxD,CAAA;AAAA,EACF;AACD;AAKa,MAAA,+BAA+B,CAAC,WAAmB;AACzD,QAAA,8BAA8B,kCAAkC,MAAM;AAErE,SAAA,4BAA4B,KAAK,gCAAgC;AACzE;"}
|
package/dist/harmony23.cjs
CHANGED
@@ -1,20 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
headers: await headerBuilder.HeaderBuilder.create().add("x-csrf-token", csrfToken).resolve()
|
16
|
-
});
|
17
|
-
};
|
3
|
+
const jwtTokenPayload = require("./harmony18.cjs");
|
4
|
+
const cookieTokenUtils = require("./harmony19.cjs");
|
5
|
+
function getAuthenticatedSessionDetailFromRequest() {
|
6
|
+
const cookie = cookieTokenUtils.getJwtTokenFromCookie();
|
7
|
+
if (!cookie) {
|
8
|
+
return void 0;
|
9
|
+
}
|
10
|
+
const payload = jwtTokenPayload.parseJwtTokenPayload(cookie.accessToken);
|
11
|
+
if (!payload) {
|
12
|
+
return void 0;
|
13
|
+
}
|
14
|
+
return { ...cookie, payload };
|
18
15
|
}
|
19
|
-
exports.
|
16
|
+
exports.getAuthenticatedSessionDetailFromRequest = getAuthenticatedSessionDetailFromRequest;
|
20
17
|
//# sourceMappingURL=harmony23.cjs.map
|
package/dist/harmony23.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony23.cjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony23.cjs","sources":["../src/features/auth/backend/services/getAuthenticatedSessionDetailFromRequest.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport { getJwtTokenFromCookie } from '@features/auth/frontend/utils/cookieTokenUtils'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype AuthenticatedSessionDetail = JwtToken & { payload: JwtTokenPayload }\n\n/**\n * Returns the JWT tokens and parses the attached payload.\n */\nexport function getAuthenticatedSessionDetailFromRequest(): AuthenticatedSessionDetail | undefined {\n\tconst cookie = getJwtTokenFromCookie()\n\tif (!cookie) {\n\t\treturn undefined\n\t}\n\n\tconst payload = parseJwtTokenPayload(cookie.accessToken)\n\tif (!payload) {\n\t\treturn undefined\n\t}\n\n\treturn { ...cookie, payload }\n}\n"],"names":["getJwtTokenFromCookie","parseJwtTokenPayload"],"mappings":";;;;AAUO,SAAS,2CAAmF;AAClG,QAAM,SAASA,iBAAAA,sBAAsB;AACrC,MAAI,CAAC,QAAQ;AACL,WAAA;AAAA,EAAA;AAGF,QAAA,UAAUC,gBAAAA,qBAAqB,OAAO,WAAW;AACvD,MAAI,CAAC,SAAS;AACN,WAAA;AAAA,EAAA;AAGD,SAAA,EAAE,GAAG,QAAQ,QAAQ;AAC7B;;"}
|
package/dist/harmony23.mjs
CHANGED
@@ -1,20 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
headers: await HeaderBuilder.create().add("x-csrf-token", csrfToken).resolve()
|
14
|
-
});
|
15
|
-
};
|
1
|
+
import { parseJwtTokenPayload } from "./harmony18.mjs";
|
2
|
+
import { getJwtTokenFromCookie } from "./harmony19.mjs";
|
3
|
+
function getAuthenticatedSessionDetailFromRequest() {
|
4
|
+
const cookie = getJwtTokenFromCookie();
|
5
|
+
if (!cookie) {
|
6
|
+
return void 0;
|
7
|
+
}
|
8
|
+
const payload = parseJwtTokenPayload(cookie.accessToken);
|
9
|
+
if (!payload) {
|
10
|
+
return void 0;
|
11
|
+
}
|
12
|
+
return { ...cookie, payload };
|
16
13
|
}
|
17
14
|
export {
|
18
|
-
|
15
|
+
getAuthenticatedSessionDetailFromRequest
|
19
16
|
};
|
20
17
|
//# sourceMappingURL=harmony23.mjs.map
|
package/dist/harmony23.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony23.mjs","sources":["../src/features/auth/
|
1
|
+
{"version":3,"file":"harmony23.mjs","sources":["../src/features/auth/backend/services/getAuthenticatedSessionDetailFromRequest.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport { getJwtTokenFromCookie } from '@features/auth/frontend/utils/cookieTokenUtils'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype AuthenticatedSessionDetail = JwtToken & { payload: JwtTokenPayload }\n\n/**\n * Returns the JWT tokens and parses the attached payload.\n */\nexport function getAuthenticatedSessionDetailFromRequest(): AuthenticatedSessionDetail | undefined {\n\tconst cookie = getJwtTokenFromCookie()\n\tif (!cookie) {\n\t\treturn undefined\n\t}\n\n\tconst payload = parseJwtTokenPayload(cookie.accessToken)\n\tif (!payload) {\n\t\treturn undefined\n\t}\n\n\treturn { ...cookie, payload }\n}\n"],"names":[],"mappings":";;AAUO,SAAS,2CAAmF;AAClG,QAAM,SAAS,sBAAsB;AACrC,MAAI,CAAC,QAAQ;AACL,WAAA;AAAA,EAAA;AAGF,QAAA,UAAU,qBAAqB,OAAO,WAAW;AACvD,MAAI,CAAC,SAAS;AACN,WAAA;AAAA,EAAA;AAGD,SAAA,EAAE,GAAG,QAAQ,QAAQ;AAC7B;"}
|