@strapi/admin 4.16.2 → 4.18.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.
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +55 -41
- package/strapi-server.js +3 -3
- package/dist/_chunks/AuthenticatedApp-342bf22f.js +0 -1476
- package/dist/_chunks/AuthenticatedApp-342bf22f.js.map +0 -1
- package/dist/_chunks/AuthenticatedApp-bb31f306.mjs +0 -1450
- package/dist/_chunks/AuthenticatedApp-bb31f306.mjs.map +0 -1
- package/dist/_chunks/DragLayer-bff96835.mjs +0 -44
- package/dist/_chunks/DragLayer-bff96835.mjs.map +0 -1
- package/dist/_chunks/DragLayer-f07eee6c.js +0 -43
- package/dist/_chunks/DragLayer-f07eee6c.js.map +0 -1
- package/dist/_chunks/HomePage-0c7717c0.mjs +0 -49
- package/dist/_chunks/HomePage-0c7717c0.mjs.map +0 -1
- package/dist/_chunks/HomePage-175f79c7.js +0 -49
- package/dist/_chunks/HomePage-175f79c7.js.map +0 -1
- package/dist/_chunks/HomePage-246cc590.mjs +0 -542
- package/dist/_chunks/HomePage-246cc590.mjs.map +0 -1
- package/dist/_chunks/HomePage-6ff9e578.js +0 -563
- package/dist/_chunks/HomePage-6ff9e578.js.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-170aff77.mjs +0 -134
- package/dist/_chunks/InstalledPluginsPage-170aff77.mjs.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js +0 -153
- package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js.map +0 -1
- package/dist/_chunks/InternalErrorPage-040dc993.mjs +0 -41
- package/dist/_chunks/InternalErrorPage-040dc993.mjs.map +0 -1
- package/dist/_chunks/InternalErrorPage-d0e51ac2.js +0 -41
- package/dist/_chunks/InternalErrorPage-d0e51ac2.js.map +0 -1
- package/dist/_chunks/Layout-4b3e434a.js +0 -92
- package/dist/_chunks/Layout-4b3e434a.js.map +0 -1
- package/dist/_chunks/Layout-72fa2ace.mjs +0 -90
- package/dist/_chunks/Layout-72fa2ace.mjs.map +0 -1
- package/dist/_chunks/LimitsModal-203482b8.js +0 -84
- package/dist/_chunks/LimitsModal-203482b8.js.map +0 -1
- package/dist/_chunks/LimitsModal-da04700e.mjs +0 -82
- package/dist/_chunks/LimitsModal-da04700e.mjs.map +0 -1
- package/dist/_chunks/Login-576bbc11.js +0 -64
- package/dist/_chunks/Login-576bbc11.js.map +0 -1
- package/dist/_chunks/Login-d627bb0a.mjs +0 -62
- package/dist/_chunks/Login-d627bb0a.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs +0 -1011
- package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-e7cd973b.js +0 -1035
- package/dist/_chunks/MarketplacePage-e7cd973b.js.map +0 -1
- package/dist/_chunks/ProfilePage-52844daa.js +0 -665
- package/dist/_chunks/ProfilePage-52844daa.js.map +0 -1
- package/dist/_chunks/ProfilePage-ef400907.mjs +0 -642
- package/dist/_chunks/ProfilePage-ef400907.mjs.map +0 -1
- package/dist/_chunks/SSOProviders-62bfad92.mjs +0 -58
- package/dist/_chunks/SSOProviders-62bfad92.mjs.map +0 -1
- package/dist/_chunks/SSOProviders-b395a4e6.js +0 -59
- package/dist/_chunks/SSOProviders-b395a4e6.js.map +0 -1
- package/dist/_chunks/SalesPage-4a0a68fb.js +0 -51
- package/dist/_chunks/SalesPage-4a0a68fb.js.map +0 -1
- package/dist/_chunks/SalesPage-56bf9463.mjs +0 -48
- package/dist/_chunks/SalesPage-56bf9463.mjs.map +0 -1
- package/dist/_chunks/SalesPage-66f9ea32.js +0 -51
- package/dist/_chunks/SalesPage-66f9ea32.js.map +0 -1
- package/dist/_chunks/SalesPage-d0cdc1a7.js +0 -48
- package/dist/_chunks/SalesPage-d0cdc1a7.js.map +0 -1
- package/dist/_chunks/SalesPage-f9597ae7.mjs +0 -51
- package/dist/_chunks/SalesPage-f9597ae7.mjs.map +0 -1
- package/dist/_chunks/SalesPage-fceedf48.mjs +0 -51
- package/dist/_chunks/SalesPage-fceedf48.mjs.map +0 -1
- package/dist/_chunks/ar-21279f4c.js +0 -936
- package/dist/_chunks/ar-21279f4c.js.map +0 -1
- package/dist/_chunks/ar-62e5e2b3.mjs +0 -936
- package/dist/_chunks/ar-62e5e2b3.mjs.map +0 -1
- package/dist/_chunks/build-1026ce7c.mjs +0 -68
- package/dist/_chunks/build-1026ce7c.mjs.map +0 -1
- package/dist/_chunks/build-d99bcc06.js +0 -68
- package/dist/_chunks/build-d99bcc06.js.map +0 -1
- package/dist/_chunks/ca-d05fb350.js +0 -724
- package/dist/_chunks/ca-d05fb350.js.map +0 -1
- package/dist/_chunks/ca-e99de225.mjs +0 -724
- package/dist/_chunks/ca-e99de225.mjs.map +0 -1
- package/dist/_chunks/colors-c24a54f0.js +0 -33
- package/dist/_chunks/colors-c24a54f0.js.map +0 -1
- package/dist/_chunks/colors-e7489dd4.mjs +0 -34
- package/dist/_chunks/colors-e7489dd4.mjs.map +0 -1
- package/dist/_chunks/constants-2a8f4e41.mjs +0 -11
- package/dist/_chunks/constants-2a8f4e41.mjs.map +0 -1
- package/dist/_chunks/constants-40ffa931.js +0 -11
- package/dist/_chunks/constants-40ffa931.js.map +0 -1
- package/dist/_chunks/constants-4aca55b6.js +0 -85
- package/dist/_chunks/constants-4aca55b6.js.map +0 -1
- package/dist/_chunks/constants-64899732.js +0 -30
- package/dist/_chunks/constants-64899732.js.map +0 -1
- package/dist/_chunks/constants-6c68e9a0.js +0 -229
- package/dist/_chunks/constants-6c68e9a0.js.map +0 -1
- package/dist/_chunks/constants-6ecddc43.mjs +0 -111
- package/dist/_chunks/constants-6ecddc43.mjs.map +0 -1
- package/dist/_chunks/constants-74b8a935.mjs +0 -52
- package/dist/_chunks/constants-74b8a935.mjs.map +0 -1
- package/dist/_chunks/constants-7596f6f3.js +0 -132
- package/dist/_chunks/constants-7596f6f3.js.map +0 -1
- package/dist/_chunks/constants-8092eeb5.mjs +0 -59
- package/dist/_chunks/constants-8092eeb5.mjs.map +0 -1
- package/dist/_chunks/constants-85da8cc4.js +0 -58
- package/dist/_chunks/constants-85da8cc4.js.map +0 -1
- package/dist/_chunks/constants-a6fd64fc.mjs +0 -80
- package/dist/_chunks/constants-a6fd64fc.mjs.map +0 -1
- package/dist/_chunks/constants-a92ce583.mjs +0 -7
- package/dist/_chunks/constants-a92ce583.mjs.map +0 -1
- package/dist/_chunks/constants-ae0b83df.mjs +0 -227
- package/dist/_chunks/constants-ae0b83df.mjs.map +0 -1
- package/dist/_chunks/constants-c1f1f698.mjs +0 -85
- package/dist/_chunks/constants-c1f1f698.mjs.map +0 -1
- package/dist/_chunks/constants-d3dd8ed6.mjs +0 -7
- package/dist/_chunks/constants-d3dd8ed6.mjs.map +0 -1
- package/dist/_chunks/constants-d5d67ca8.js +0 -6
- package/dist/_chunks/constants-d5d67ca8.js.map +0 -1
- package/dist/_chunks/constants-da2542a3.js +0 -6
- package/dist/_chunks/constants-da2542a3.js.map +0 -1
- package/dist/_chunks/constants-ddd2d586.js +0 -82
- package/dist/_chunks/constants-ddd2d586.js.map +0 -1
- package/dist/_chunks/constants-def33545.mjs +0 -30
- package/dist/_chunks/constants-def33545.mjs.map +0 -1
- package/dist/_chunks/constants-e05f06d4.js +0 -52
- package/dist/_chunks/constants-e05f06d4.js.map +0 -1
- package/dist/_chunks/cs-2fa881a2.mjs +0 -291
- package/dist/_chunks/cs-2fa881a2.mjs.map +0 -1
- package/dist/_chunks/cs-eee75b10.js +0 -291
- package/dist/_chunks/cs-eee75b10.js.map +0 -1
- package/dist/_chunks/de-28f8bc28.mjs +0 -716
- package/dist/_chunks/de-28f8bc28.mjs.map +0 -1
- package/dist/_chunks/de-976cc986.js +0 -716
- package/dist/_chunks/de-976cc986.js.map +0 -1
- package/dist/_chunks/develop-72394876.mjs +0 -61
- package/dist/_chunks/develop-72394876.mjs.map +0 -1
- package/dist/_chunks/develop-da585b1e.js +0 -61
- package/dist/_chunks/develop-da585b1e.js.map +0 -1
- package/dist/_chunks/dk-0b759a56.mjs +0 -634
- package/dist/_chunks/dk-0b759a56.mjs.map +0 -1
- package/dist/_chunks/dk-6189917e.js +0 -634
- package/dist/_chunks/dk-6189917e.js.map +0 -1
- package/dist/_chunks/edit-29bdf5d6.js +0 -50
- package/dist/_chunks/edit-29bdf5d6.js.map +0 -1
- package/dist/_chunks/edit-923cefa0.mjs +0 -32
- package/dist/_chunks/edit-923cefa0.mjs.map +0 -1
- package/dist/_chunks/en-0e9e9327.js +0 -1022
- package/dist/_chunks/en-0e9e9327.js.map +0 -1
- package/dist/_chunks/en-e728accb.mjs +0 -1022
- package/dist/_chunks/en-e728accb.mjs.map +0 -1
- package/dist/_chunks/es-18b29db2.mjs +0 -796
- package/dist/_chunks/es-18b29db2.mjs.map +0 -1
- package/dist/_chunks/es-3ee0992a.js +0 -796
- package/dist/_chunks/es-3ee0992a.js.map +0 -1
- package/dist/_chunks/eu-8fd773c2.mjs +0 -832
- package/dist/_chunks/eu-8fd773c2.mjs.map +0 -1
- package/dist/_chunks/eu-be749f31.js +0 -832
- package/dist/_chunks/eu-be749f31.js.map +0 -1
- package/dist/_chunks/formatAPIErrors-b599cf27.js +0 -20
- package/dist/_chunks/formatAPIErrors-b599cf27.js.map +0 -1
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs +0 -21
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs.map +0 -1
- package/dist/_chunks/fr-29c84e1f.js +0 -762
- package/dist/_chunks/fr-29c84e1f.js.map +0 -1
- package/dist/_chunks/fr-f37df086.mjs +0 -762
- package/dist/_chunks/fr-f37df086.mjs.map +0 -1
- package/dist/_chunks/gu-377a4b46.js +0 -623
- package/dist/_chunks/gu-377a4b46.js.map +0 -1
- package/dist/_chunks/gu-69f0e13a.mjs +0 -623
- package/dist/_chunks/gu-69f0e13a.mjs.map +0 -1
- package/dist/_chunks/he-aec27352.js +0 -326
- package/dist/_chunks/he-aec27352.js.map +0 -1
- package/dist/_chunks/he-bd769d7e.mjs +0 -326
- package/dist/_chunks/he-bd769d7e.mjs.map +0 -1
- package/dist/_chunks/hi-1bdc7a46.js +0 -722
- package/dist/_chunks/hi-1bdc7a46.js.map +0 -1
- package/dist/_chunks/hi-d397a24b.mjs +0 -722
- package/dist/_chunks/hi-d397a24b.mjs.map +0 -1
- package/dist/_chunks/hu-e2c05f40.js +0 -832
- package/dist/_chunks/hu-e2c05f40.js.map +0 -1
- package/dist/_chunks/hu-eb88bd0c.mjs +0 -832
- package/dist/_chunks/hu-eb88bd0c.mjs.map +0 -1
- package/dist/_chunks/id-586df3a2.js +0 -448
- package/dist/_chunks/id-586df3a2.js.map +0 -1
- package/dist/_chunks/id-f47699e6.mjs +0 -448
- package/dist/_chunks/id-f47699e6.mjs.map +0 -1
- package/dist/_chunks/index-10a05917.mjs +0 -51
- package/dist/_chunks/index-10a05917.mjs.map +0 -1
- package/dist/_chunks/index-115d317b.mjs +0 -244
- package/dist/_chunks/index-115d317b.mjs.map +0 -1
- package/dist/_chunks/index-171715e4.js +0 -697
- package/dist/_chunks/index-171715e4.js.map +0 -1
- package/dist/_chunks/index-176cc121.mjs +0 -469
- package/dist/_chunks/index-176cc121.mjs.map +0 -1
- package/dist/_chunks/index-1bac5263.js +0 -338
- package/dist/_chunks/index-1bac5263.js.map +0 -1
- package/dist/_chunks/index-200c5a6a.js +0 -51
- package/dist/_chunks/index-200c5a6a.js.map +0 -1
- package/dist/_chunks/index-215b5421.mjs +0 -51
- package/dist/_chunks/index-215b5421.mjs.map +0 -1
- package/dist/_chunks/index-23401c29.js +0 -418
- package/dist/_chunks/index-23401c29.js.map +0 -1
- package/dist/_chunks/index-242c859c.js +0 -335
- package/dist/_chunks/index-242c859c.js.map +0 -1
- package/dist/_chunks/index-26fcb3ca.mjs +0 -1432
- package/dist/_chunks/index-26fcb3ca.mjs.map +0 -1
- package/dist/_chunks/index-28dd9303.mjs +0 -51
- package/dist/_chunks/index-28dd9303.mjs.map +0 -1
- package/dist/_chunks/index-296c14bf.mjs +0 -362
- package/dist/_chunks/index-296c14bf.mjs.map +0 -1
- package/dist/_chunks/index-2de06c32.js +0 -51
- package/dist/_chunks/index-2de06c32.js.map +0 -1
- package/dist/_chunks/index-2eb69b5d.mjs +0 -399
- package/dist/_chunks/index-2eb69b5d.mjs.map +0 -1
- package/dist/_chunks/index-2f61e3ae.js +0 -585
- package/dist/_chunks/index-2f61e3ae.js.map +0 -1
- package/dist/_chunks/index-308b73ba.mjs +0 -60
- package/dist/_chunks/index-308b73ba.mjs.map +0 -1
- package/dist/_chunks/index-34e41e15.js +0 -134
- package/dist/_chunks/index-34e41e15.js.map +0 -1
- package/dist/_chunks/index-38115cde.js +0 -66
- package/dist/_chunks/index-38115cde.js.map +0 -1
- package/dist/_chunks/index-383efae4.mjs +0 -55
- package/dist/_chunks/index-383efae4.mjs.map +0 -1
- package/dist/_chunks/index-3b426575.js +0 -47
- package/dist/_chunks/index-3b426575.js.map +0 -1
- package/dist/_chunks/index-47af1603.js +0 -253
- package/dist/_chunks/index-47af1603.js.map +0 -1
- package/dist/_chunks/index-49b7e6ff.mjs +0 -1266
- package/dist/_chunks/index-49b7e6ff.mjs.map +0 -1
- package/dist/_chunks/index-4d9b2cb9.js +0 -47
- package/dist/_chunks/index-4d9b2cb9.js.map +0 -1
- package/dist/_chunks/index-4de70b5d.js +0 -3404
- package/dist/_chunks/index-4de70b5d.js.map +0 -1
- package/dist/_chunks/index-59b1f604.js +0 -380
- package/dist/_chunks/index-59b1f604.js.map +0 -1
- package/dist/_chunks/index-5a5217e0.mjs +0 -308
- package/dist/_chunks/index-5a5217e0.mjs.map +0 -1
- package/dist/_chunks/index-5da07c41.js +0 -418
- package/dist/_chunks/index-5da07c41.js.map +0 -1
- package/dist/_chunks/index-600cb5dd.js +0 -51
- package/dist/_chunks/index-600cb5dd.js.map +0 -1
- package/dist/_chunks/index-608d8d10.mjs +0 -393
- package/dist/_chunks/index-608d8d10.mjs.map +0 -1
- package/dist/_chunks/index-74812118.mjs +0 -53
- package/dist/_chunks/index-74812118.mjs.map +0 -1
- package/dist/_chunks/index-7d578921.js +0 -847
- package/dist/_chunks/index-7d578921.js.map +0 -1
- package/dist/_chunks/index-8109fa91.mjs +0 -676
- package/dist/_chunks/index-8109fa91.mjs.map +0 -1
- package/dist/_chunks/index-82c7a120.js +0 -15401
- package/dist/_chunks/index-82c7a120.js.map +0 -1
- package/dist/_chunks/index-83d53962.js +0 -62
- package/dist/_chunks/index-83d53962.js.map +0 -1
- package/dist/_chunks/index-88298941.js +0 -54
- package/dist/_chunks/index-88298941.js.map +0 -1
- package/dist/_chunks/index-8933483b.mjs +0 -3374
- package/dist/_chunks/index-8933483b.mjs.map +0 -1
- package/dist/_chunks/index-91df57b1.mjs +0 -826
- package/dist/_chunks/index-91df57b1.mjs.map +0 -1
- package/dist/_chunks/index-973c363e.mjs +0 -63
- package/dist/_chunks/index-973c363e.mjs.map +0 -1
- package/dist/_chunks/index-989bbeec.mjs +0 -232
- package/dist/_chunks/index-989bbeec.mjs.map +0 -1
- package/dist/_chunks/index-9910dda4.js +0 -55
- package/dist/_chunks/index-9910dda4.js.map +0 -1
- package/dist/_chunks/index-9afb163a.js +0 -418
- package/dist/_chunks/index-9afb163a.js.map +0 -1
- package/dist/_chunks/index-9f61bef8.js +0 -51
- package/dist/_chunks/index-9f61bef8.js.map +0 -1
- package/dist/_chunks/index-ab31623a.mjs +0 -273
- package/dist/_chunks/index-ab31623a.mjs.map +0 -1
- package/dist/_chunks/index-ac85118a.mjs +0 -47
- package/dist/_chunks/index-ac85118a.mjs.map +0 -1
- package/dist/_chunks/index-ad8e55c0.mjs +0 -866
- package/dist/_chunks/index-ad8e55c0.mjs.map +0 -1
- package/dist/_chunks/index-aedeaf5a.js +0 -311
- package/dist/_chunks/index-aedeaf5a.js.map +0 -1
- package/dist/_chunks/index-bbac142a.js +0 -125
- package/dist/_chunks/index-bbac142a.js.map +0 -1
- package/dist/_chunks/index-bd18f803.mjs +0 -15320
- package/dist/_chunks/index-bd18f803.mjs.map +0 -1
- package/dist/_chunks/index-c8b8a2ee.mjs +0 -359
- package/dist/_chunks/index-c8b8a2ee.mjs.map +0 -1
- package/dist/_chunks/index-c97f5820.js +0 -1456
- package/dist/_chunks/index-c97f5820.js.map +0 -1
- package/dist/_chunks/index-cb6a72d2.mjs +0 -127
- package/dist/_chunks/index-cb6a72d2.mjs.map +0 -1
- package/dist/_chunks/index-cbc7c054.js +0 -266
- package/dist/_chunks/index-cbc7c054.js.map +0 -1
- package/dist/_chunks/index-ce5995cd.mjs +0 -132
- package/dist/_chunks/index-ce5995cd.mjs.map +0 -1
- package/dist/_chunks/index-d1152896.js +0 -294
- package/dist/_chunks/index-d1152896.js.map +0 -1
- package/dist/_chunks/index-d1dd825b.js +0 -365
- package/dist/_chunks/index-d1dd825b.js.map +0 -1
- package/dist/_chunks/index-d2d9df41.mjs +0 -270
- package/dist/_chunks/index-d2d9df41.mjs.map +0 -1
- package/dist/_chunks/index-d3e1fd86.js +0 -490
- package/dist/_chunks/index-d3e1fd86.js.map +0 -1
- package/dist/_chunks/index-d4517ac4.mjs +0 -582
- package/dist/_chunks/index-d4517ac4.mjs.map +0 -1
- package/dist/_chunks/index-d49fa655.js +0 -873
- package/dist/_chunks/index-d49fa655.js.map +0 -1
- package/dist/_chunks/index-d6694cab.mjs +0 -125
- package/dist/_chunks/index-d6694cab.mjs.map +0 -1
- package/dist/_chunks/index-e117c643.mjs +0 -55
- package/dist/_chunks/index-e117c643.mjs.map +0 -1
- package/dist/_chunks/index-e1b90981.mjs +0 -314
- package/dist/_chunks/index-e1b90981.mjs.map +0 -1
- package/dist/_chunks/index-e24df0bf.js +0 -403
- package/dist/_chunks/index-e24df0bf.js.map +0 -1
- package/dist/_chunks/index-e2d2f58e.mjs +0 -47
- package/dist/_chunks/index-e2d2f58e.mjs.map +0 -1
- package/dist/_chunks/index-e369d741.mjs +0 -383
- package/dist/_chunks/index-e369d741.mjs.map +0 -1
- package/dist/_chunks/index-e79b2b9e.mjs +0 -338
- package/dist/_chunks/index-e79b2b9e.mjs.map +0 -1
- package/dist/_chunks/index-ea18ff22.mjs +0 -51
- package/dist/_chunks/index-ea18ff22.mjs.map +0 -1
- package/dist/_chunks/index-eb67694f.mjs +0 -261
- package/dist/_chunks/index-eb67694f.mjs.map +0 -1
- package/dist/_chunks/index-ed3696ec.js +0 -272
- package/dist/_chunks/index-ed3696ec.js.map +0 -1
- package/dist/_chunks/index-ee1ea38b.js +0 -129
- package/dist/_chunks/index-ee1ea38b.js.map +0 -1
- package/dist/_chunks/index-efc967f5.js +0 -55
- package/dist/_chunks/index-efc967f5.js.map +0 -1
- package/dist/_chunks/index-fc700e52.js +0 -263
- package/dist/_chunks/index-fc700e52.js.map +0 -1
- package/dist/_chunks/index-fd4e5616.mjs +0 -412
- package/dist/_chunks/index-fd4e5616.mjs.map +0 -1
- package/dist/_chunks/index-ffd2f664.js +0 -1337
- package/dist/_chunks/index-ffd2f664.js.map +0 -1
- package/dist/_chunks/it-4006227c.mjs +0 -459
- package/dist/_chunks/it-4006227c.mjs.map +0 -1
- package/dist/_chunks/it-9c4295f1.js +0 -459
- package/dist/_chunks/it-9c4295f1.js.map +0 -1
- package/dist/_chunks/ja-db43ca3d.mjs +0 -633
- package/dist/_chunks/ja-db43ca3d.mjs.map +0 -1
- package/dist/_chunks/ja-eb74520f.js +0 -633
- package/dist/_chunks/ja-eb74520f.js.map +0 -1
- package/dist/_chunks/ko-18e71df4.js +0 -631
- package/dist/_chunks/ko-18e71df4.js.map +0 -1
- package/dist/_chunks/ko-a7826e25.mjs +0 -631
- package/dist/_chunks/ko-a7826e25.mjs.map +0 -1
- package/dist/_chunks/ml-90131768.mjs +0 -722
- package/dist/_chunks/ml-90131768.mjs.map +0 -1
- package/dist/_chunks/ml-c5199364.js +0 -722
- package/dist/_chunks/ml-c5199364.js.map +0 -1
- package/dist/_chunks/ms-bc514df6.js +0 -342
- package/dist/_chunks/ms-bc514df6.js.map +0 -1
- package/dist/_chunks/ms-f4f16a83.mjs +0 -342
- package/dist/_chunks/ms-f4f16a83.mjs.map +0 -1
- package/dist/_chunks/nl-887ce2c3.mjs +0 -828
- package/dist/_chunks/nl-887ce2c3.mjs.map +0 -1
- package/dist/_chunks/nl-f1aedbe2.js +0 -828
- package/dist/_chunks/nl-f1aedbe2.js.map +0 -1
- package/dist/_chunks/no-ec6c2927.js +0 -310
- package/dist/_chunks/no-ec6c2927.js.map +0 -1
- package/dist/_chunks/no-f0b02541.mjs +0 -310
- package/dist/_chunks/no-f0b02541.mjs.map +0 -1
- package/dist/_chunks/pl-9be86414.js +0 -721
- package/dist/_chunks/pl-9be86414.js.map +0 -1
- package/dist/_chunks/pl-9ccd35d9.mjs +0 -721
- package/dist/_chunks/pl-9ccd35d9.mjs.map +0 -1
- package/dist/_chunks/pt-4fcc08f1.js +0 -296
- package/dist/_chunks/pt-4fcc08f1.js.map +0 -1
- package/dist/_chunks/pt-8acb6ac1.mjs +0 -296
- package/dist/_chunks/pt-8acb6ac1.mjs.map +0 -1
- package/dist/_chunks/pt-BR-d43239e3.js +0 -794
- package/dist/_chunks/pt-BR-d43239e3.js.map +0 -1
- package/dist/_chunks/pt-BR-fd73cb13.mjs +0 -794
- package/dist/_chunks/pt-BR-fd73cb13.mjs.map +0 -1
- package/dist/_chunks/ru-9aad40c5.mjs +0 -993
- package/dist/_chunks/ru-9aad40c5.mjs.map +0 -1
- package/dist/_chunks/ru-c0293425.js +0 -993
- package/dist/_chunks/ru-c0293425.js.map +0 -1
- package/dist/_chunks/sa-6bf4c20e.mjs +0 -722
- package/dist/_chunks/sa-6bf4c20e.mjs.map +0 -1
- package/dist/_chunks/sa-8ffb7ca7.js +0 -722
- package/dist/_chunks/sa-8ffb7ca7.js.map +0 -1
- package/dist/_chunks/schema-260fec28.js +0 -514
- package/dist/_chunks/schema-260fec28.js.map +0 -1
- package/dist/_chunks/schema-6bd8bd85.mjs +0 -490
- package/dist/_chunks/schema-6bd8bd85.mjs.map +0 -1
- package/dist/_chunks/sk-58d31b17.mjs +0 -690
- package/dist/_chunks/sk-58d31b17.mjs.map +0 -1
- package/dist/_chunks/sk-a9308737.js +0 -690
- package/dist/_chunks/sk-a9308737.js.map +0 -1
- package/dist/_chunks/sv-0f5ffd1e.js +0 -827
- package/dist/_chunks/sv-0f5ffd1e.js.map +0 -1
- package/dist/_chunks/sv-d80ad633.mjs +0 -827
- package/dist/_chunks/sv-d80ad633.mjs.map +0 -1
- package/dist/_chunks/th-a53bbf7a.js +0 -430
- package/dist/_chunks/th-a53bbf7a.js.map +0 -1
- package/dist/_chunks/th-e72c6a22.mjs +0 -430
- package/dist/_chunks/th-e72c6a22.mjs.map +0 -1
- package/dist/_chunks/tr-b84a68b0.js +0 -785
- package/dist/_chunks/tr-b84a68b0.js.map +0 -1
- package/dist/_chunks/tr-e35ecfe8.mjs +0 -785
- package/dist/_chunks/tr-e35ecfe8.mjs.map +0 -1
- package/dist/_chunks/uk-de367ec1.mjs +0 -343
- package/dist/_chunks/uk-de367ec1.mjs.map +0 -1
- package/dist/_chunks/uk-e5226227.js +0 -343
- package/dist/_chunks/uk-e5226227.js.map +0 -1
- package/dist/_chunks/useAdminRolePermissions-603a2709.mjs +0 -2322
- package/dist/_chunks/useAdminRolePermissions-603a2709.mjs.map +0 -1
- package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js +0 -2337
- package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js.map +0 -1
- package/dist/_chunks/useAdminRoles-68d5d608.js +0 -62
- package/dist/_chunks/useAdminRoles-68d5d608.js.map +0 -1
- package/dist/_chunks/useAdminRoles-7ab5d521.mjs +0 -44
- package/dist/_chunks/useAdminRoles-7ab5d521.mjs.map +0 -1
- package/dist/_chunks/useAdminUsers-05d6b26a.js +0 -61
- package/dist/_chunks/useAdminUsers-05d6b26a.js.map +0 -1
- package/dist/_chunks/useAdminUsers-09f86a58.mjs +0 -43
- package/dist/_chunks/useAdminUsers-09f86a58.mjs.map +0 -1
- package/dist/_chunks/useContentTypes-53b449bb.mjs +0 -67
- package/dist/_chunks/useContentTypes-53b449bb.mjs.map +0 -1
- package/dist/_chunks/useContentTypes-7da293cc.js +0 -85
- package/dist/_chunks/useContentTypes-7da293cc.js.map +0 -1
- package/dist/_chunks/useDebounce-4712871e.js +0 -35
- package/dist/_chunks/useDebounce-4712871e.js.map +0 -1
- package/dist/_chunks/useDebounce-9364f340.mjs +0 -17
- package/dist/_chunks/useDebounce-9364f340.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs +0 -80
- package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js +0 -100
- package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js.map +0 -1
- package/dist/_chunks/useLicenseLimits-13a102d3.mjs +0 -31
- package/dist/_chunks/useLicenseLimits-13a102d3.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimits-81ef3cce.js +0 -49
- package/dist/_chunks/useLicenseLimits-81ef3cce.js.map +0 -1
- package/dist/_chunks/useReviewWorkflows-799e0305.js +0 -59
- package/dist/_chunks/useReviewWorkflows-799e0305.js.map +0 -1
- package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs +0 -41
- package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs.map +0 -1
- package/dist/_chunks/validateWorkflow-5693ea2d.js +0 -1124
- package/dist/_chunks/validateWorkflow-5693ea2d.js.map +0 -1
- package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs +0 -1101
- package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs.map +0 -1
- package/dist/_chunks/vi-096bccbb.mjs +0 -298
- package/dist/_chunks/vi-096bccbb.mjs.map +0 -1
- package/dist/_chunks/vi-c5fabb75.js +0 -298
- package/dist/_chunks/vi-c5fabb75.js.map +0 -1
- package/dist/_chunks/zh-24f618cb.js +0 -836
- package/dist/_chunks/zh-24f618cb.js.map +0 -1
- package/dist/_chunks/zh-Hans-35d2c374.js +0 -957
- package/dist/_chunks/zh-Hans-35d2c374.js.map +0 -1
- package/dist/_chunks/zh-Hans-ccf4be4b.mjs +0 -957
- package/dist/_chunks/zh-Hans-ccf4be4b.mjs.map +0 -1
- package/dist/_chunks/zh-ba29b2e1.mjs +0 -836
- package/dist/_chunks/zh-ba29b2e1.mjs.map +0 -1
- package/dist/admin/index.js +0 -34
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs +0 -34
- package/dist/admin/index.mjs.map +0 -1
- package/dist/admin/src/App.d.ts +0 -6
- package/dist/admin/src/StrapiApp.d.ts +0 -140
- package/dist/admin/src/components/AuthenticatedApp.d.ts +0 -2
- package/dist/admin/src/components/ConfigurationProvider.d.ts +0 -11
- package/dist/admin/src/components/DefaultDocument.d.ts +0 -5
- package/dist/admin/src/components/DragLayer.d.ts +0 -10
- package/dist/admin/src/components/GuidedTour/Homepage.d.ts +0 -2
- package/dist/admin/src/components/GuidedTour/Modal.d.ts +0 -2
- package/dist/admin/src/components/GuidedTour/Ornaments.d.ts +0 -13
- package/dist/admin/src/components/GuidedTour/Provider.d.ts +0 -6
- package/dist/admin/src/components/GuidedTour/constants.d.ts +0 -165
- package/dist/admin/src/components/LanguageProvider.d.ts +0 -19
- package/dist/admin/src/components/LeftMenu.d.ts +0 -5
- package/dist/admin/src/components/NoJavascript.d.ts +0 -7
- package/dist/admin/src/components/NpsSurvey.d.ts +0 -17
- package/dist/admin/src/components/Onboarding.d.ts +0 -2
- package/dist/admin/src/components/PluginsInitializer.d.ts +0 -5
- package/dist/admin/src/components/PrivateRoute.d.ts +0 -8
- package/dist/admin/src/components/Providers.d.ts +0 -13
- package/dist/admin/src/components/RBACProvider.d.ts +0 -27
- package/dist/admin/src/components/Theme.d.ts +0 -6
- package/dist/admin/src/components/ThemeToggleProvider.d.ts +0 -12
- package/dist/admin/src/components/UnauthenticatedLogo.d.ts +0 -2
- package/dist/admin/src/constants.d.ts +0 -195
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksContent.d.ts +0 -5
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksEditor.d.ts +0 -34
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksInput.d.ts +0 -18
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksToolbar.d.ts +0 -2
- package/dist/admin/src/content-manager/components/BlocksInput/hooks/useBlocksStore.d.ts +0 -32
- package/dist/admin/src/content-manager/components/BlocksInput/hooks/useModifiersStore.d.ts +0 -20
- package/dist/admin/src/content-manager/components/BlocksInput/plugins/withLinks.d.ts +0 -8
- package/dist/admin/src/content-manager/components/BlocksInput/plugins/withStrapiSchema.d.ts +0 -8
- package/dist/admin/src/content-manager/components/BlocksInput/tests/mock-schema.d.ts +0 -2
- package/dist/admin/src/content-manager/components/BlocksInput/utils/links.d.ts +0 -10
- package/dist/admin/src/content-manager/components/BlocksInput/utils/types.d.ts +0 -6
- package/dist/admin/src/contexts/admin.d.ts +0 -14
- package/dist/admin/src/contexts/apiTokenPermissions.d.ts +0 -36
- package/dist/admin/src/contexts/configuration.d.ts +0 -27
- package/dist/admin/src/contexts/themeToggle.d.ts +0 -22
- package/dist/admin/src/core/apis/Components.d.ts +0 -10
- package/dist/admin/src/core/apis/CustomFields.d.ts +0 -8
- package/dist/admin/src/core/apis/Fields.d.ts +0 -10
- package/dist/admin/src/core/apis/Middlewares.d.ts +0 -9
- package/dist/admin/src/core/apis/Plugin.d.ts +0 -19
- package/dist/admin/src/core/apis/Reducers.d.ts +0 -10
- package/dist/admin/src/core/store/configure.d.ts +0 -29
- package/dist/admin/src/core/store/hooks.d.ts +0 -37
- package/dist/admin/src/core/utils/basename.d.ts +0 -1
- package/dist/admin/src/core/utils/createHook.d.ts +0 -10
- package/dist/admin/src/hooks/__mocks__/useAdminUsers.d.ts +0 -2
- package/dist/admin/src/hooks/__mocks__/useContentTypes.d.ts +0 -2
- package/dist/admin/src/hooks/__mocks__/useSettingsMenu.d.ts +0 -2
- package/dist/admin/src/hooks/useAdminRoles.d.ts +0 -13
- package/dist/admin/src/hooks/useAdminUsers.d.ts +0 -19
- package/dist/admin/src/hooks/useContentTypes.d.ts +0 -7
- package/dist/admin/src/hooks/useDebounce.d.ts +0 -1
- package/dist/admin/src/hooks/useEnterprise.d.ts +0 -8
- package/dist/admin/src/hooks/useInjectReducer.d.ts +0 -10
- package/dist/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
- package/dist/admin/src/hooks/useMenu.d.ts +0 -9
- package/dist/admin/src/hooks/useSettingsMenu.d.ts +0 -24
- package/dist/admin/src/index.d.ts +0 -3
- package/dist/admin/src/layouts/AppLayout.d.ts +0 -7
- package/dist/admin/src/layouts/UnauthenticatedLayout.d.ts +0 -11
- package/dist/admin/src/pages/Admin.d.ts +0 -7
- package/dist/admin/src/pages/Auth/AuthPage.d.ts +0 -6
- package/dist/admin/src/pages/Auth/components/FieldActionWrapper.d.ts +0 -3
- package/dist/admin/src/pages/Auth/components/ForgotPassword.d.ts +0 -3
- package/dist/admin/src/pages/Auth/components/ForgotPasswordSuccess.d.ts +0 -2
- package/dist/admin/src/pages/Auth/components/Login.d.ts +0 -8
- package/dist/admin/src/pages/Auth/components/Oops.d.ts +0 -2
- package/dist/admin/src/pages/Auth/components/Register.d.ts +0 -7
- package/dist/admin/src/pages/Auth/components/ResetPassword.d.ts +0 -3
- package/dist/admin/src/pages/Auth/constants.d.ts +0 -14
- package/dist/admin/src/pages/HomePage.d.ts +0 -3
- package/dist/admin/src/pages/InstalledPluginsPage.d.ts +0 -3
- package/dist/admin/src/pages/InternalErrorPage.d.ts +0 -7
- package/dist/admin/src/pages/Marketplace/MarketplacePage.d.ts +0 -19
- package/dist/admin/src/pages/Marketplace/components/NpmPackageCard.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/NpmPackagesFilters.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/NpmPackagesGrid.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/OfflineLayout.d.ts +0 -2
- package/dist/admin/src/pages/Marketplace/components/PageHeader.d.ts +0 -8
- package/dist/admin/src/pages/Marketplace/components/SortSelect.d.ts +0 -51
- package/dist/admin/src/pages/Marketplace/hooks/__mocks__/useNavigatorOnline.d.ts +0 -1
- package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +0 -92
- package/dist/admin/src/pages/Marketplace/hooks/useNavigatorOnline.d.ts +0 -5
- package/dist/admin/src/pages/NotFoundPage.d.ts +0 -1
- package/dist/admin/src/pages/ProfilePage.d.ts +0 -2
- package/dist/admin/src/pages/SettingsPage/hooks/useRegenerate.d.ts +0 -4
- package/dist/admin/src/pages/SettingsPage/pages/Roles/EditPage/hooks/usePermissionsDataManager.d.ts +0 -24
- package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/__mocks__/useAdminRolePermissions.d.ts +0 -2
- package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissions.d.ts +0 -11
- package/dist/admin/src/pages/SettingsPage/utils/makeUniqueRoutes.d.ts +0 -6
- package/dist/admin/src/pages/UseCasePage.d.ts +0 -8
- package/dist/admin/src/reducer.d.ts +0 -21
- package/dist/admin/src/render.d.ts +0 -10
- package/dist/admin/src/selectors.d.ts +0 -21
- package/dist/admin/src/shared/components/InjectionZone.d.ts +0 -53
- package/dist/admin/src/shared/hooks/__mocks__/useInjectionZone.d.ts +0 -1
- package/dist/admin/src/shared/hooks/useInjectionZone.d.ts +0 -2
- package/dist/admin/src/translations/languageNativeNames.d.ts +0 -36
- package/dist/admin/src/types/permissions.d.ts +0 -17
- package/dist/admin/src/utils/createRoute.d.ts +0 -6
- package/dist/admin/src/utils/formatAPIErrors.d.ts +0 -6
- package/dist/admin/src/utils/getFullName.d.ts +0 -1
- package/dist/admin/src/utils/hashAdminUserEmail.d.ts +0 -6
- package/dist/cli.js +0 -48
- package/dist/cli.js.map +0 -1
- package/dist/cli.mjs +0 -48
- package/dist/cli.mjs.map +0 -1
- package/dist/ee/admin/src/constants.d.ts +0 -55
- package/dist/ee/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
- package/dist/ee/admin/src/pages/AuthPage/components/Login.d.ts +0 -3
- package/dist/ee/admin/src/pages/AuthPage/components/Providers.d.ts +0 -2
- package/dist/ee/admin/src/pages/AuthPage/components/SSOProviders.d.ts +0 -8
- package/dist/ee/admin/src/pages/AuthPage/constants.d.ts +0 -3
- package/dist/ee/admin/src/pages/AuthResponse.d.ts +0 -2
- package/dist/ee/admin/src/pages/HomePage.d.ts +0 -1
- package/dist/shared/contracts/admin.d.ts +0 -23
- package/dist/shared/contracts/authentication.d.ts +0 -126
- package/dist/shared/contracts/providers.d.ts +0 -34
- package/dist/shared/contracts/roles.d.ts +0 -52
- package/dist/shared/contracts/shared.d.ts +0 -39
- package/dist/shared/contracts/user.d.ts +0 -40
- package/dist/shared/contracts/users.d.ts +0 -52
- package/dist/shared/schema.d.ts +0 -7
- package/ee/server/bootstrap.js +0 -41
- package/ee/server/config/admin-actions.js +0 -72
- package/ee/server/constants/default-stages.json +0 -18
- package/ee/server/constants/default-workflow.json +0 -3
- package/ee/server/constants/webhookEvents.js +0 -5
- package/ee/server/constants/workflows.js +0 -33
- package/ee/server/content-types/index.js +0 -9
- package/ee/server/content-types/workflow/index.js +0 -41
- package/ee/server/content-types/workflow-stage/index.js +0 -51
- package/ee/server/controllers/__tests__/stages.test.js +0 -174
- package/ee/server/controllers/admin.js +0 -50
- package/ee/server/controllers/audit-logs.js +0 -24
- package/ee/server/controllers/authentication/constants.js +0 -11
- package/ee/server/controllers/authentication/index.js +0 -11
- package/ee/server/controllers/authentication/middlewares.js +0 -117
- package/ee/server/controllers/authentication/utils.js +0 -23
- package/ee/server/controllers/authentication.js +0 -64
- package/ee/server/controllers/index.js +0 -12
- package/ee/server/controllers/role.js +0 -64
- package/ee/server/controllers/user.js +0 -110
- package/ee/server/controllers/workflows/assignees/index.js +0 -44
- package/ee/server/controllers/workflows/index.js +0 -188
- package/ee/server/controllers/workflows/stages/index.js +0 -189
- package/ee/server/destroy.js +0 -12
- package/ee/server/index.js +0 -11
- package/ee/server/middlewares/__tests__/review-workflows.test.js +0 -40
- package/ee/server/middlewares/review-workflows.js +0 -40
- package/ee/server/migrations/audit-logs-table.js +0 -45
- package/ee/server/migrations/review-workflows-content-types.js +0 -29
- package/ee/server/migrations/review-workflows-deleted-ct-in-workflows.js +0 -39
- package/ee/server/migrations/review-workflows-stage-attribute.js +0 -49
- package/ee/server/migrations/review-workflows-stages-color.js +0 -20
- package/ee/server/migrations/review-workflows-stages-roles.js +0 -68
- package/ee/server/migrations/review-workflows-workflow-name.js +0 -28
- package/ee/server/register.js +0 -40
- package/ee/server/routes/audit-logs.js +0 -43
- package/ee/server/routes/index.js +0 -8
- package/ee/server/routes/license-limit.js +0 -29
- package/ee/server/routes/review-workflows.js +0 -164
- package/ee/server/routes/sso.js +0 -69
- package/ee/server/routes/utils.js +0 -15
- package/ee/server/services/__tests__/assignees.test.js +0 -76
- package/ee/server/services/__tests__/audit-logs.test.js +0 -300
- package/ee/server/services/__tests__/passport.test.js +0 -95
- package/ee/server/services/__tests__/review-workflows-validation.test.js +0 -100
- package/ee/server/services/__tests__/review-workflows.test.js +0 -163
- package/ee/server/services/__tests__/sso.test.js +0 -117
- package/ee/server/services/__tests__/stages.test.js +0 -275
- package/ee/server/services/__tests__/workflows.test.js +0 -203
- package/ee/server/services/audit-logs.js +0 -236
- package/ee/server/services/auth.js +0 -75
- package/ee/server/services/index.js +0 -18
- package/ee/server/services/passport/provider-registry.js +0 -27
- package/ee/server/services/passport/sso.js +0 -37
- package/ee/server/services/passport.js +0 -46
- package/ee/server/services/review-workflows/__tests__/entity-service-decorator.test.js +0 -211
- package/ee/server/services/review-workflows/assignees.js +0 -54
- package/ee/server/services/review-workflows/entity-service-decorator.js +0 -101
- package/ee/server/services/review-workflows/metrics/__tests__/weekly-metrics.test.js +0 -65
- package/ee/server/services/review-workflows/metrics/index.js +0 -56
- package/ee/server/services/review-workflows/metrics/weekly-metrics.js +0 -76
- package/ee/server/services/review-workflows/review-workflows.js +0 -133
- package/ee/server/services/review-workflows/stage-permissions.js +0 -60
- package/ee/server/services/review-workflows/stages.js +0 -384
- package/ee/server/services/review-workflows/validation.js +0 -68
- package/ee/server/services/review-workflows/workflows/__tests__/content-types.test.js +0 -146
- package/ee/server/services/review-workflows/workflows/content-types.js +0 -89
- package/ee/server/services/review-workflows/workflows/index.js +0 -237
- package/ee/server/services/role.js +0 -24
- package/ee/server/services/seat-enforcement.js +0 -114
- package/ee/server/services/user.js +0 -234
- package/ee/server/utils/__tests__/persisted-tables.test.js +0 -38
- package/ee/server/utils/__tests__/sso-lock.test.js +0 -84
- package/ee/server/utils/index.js +0 -8
- package/ee/server/utils/persisted-tables.js +0 -139
- package/ee/server/utils/review-workflows.js +0 -39
- package/ee/server/utils/sso-lock.js +0 -42
- package/ee/server/validation/audit-logs.js +0 -18
- package/ee/server/validation/authentication.js +0 -36
- package/ee/server/validation/review-workflows.js +0 -92
- package/ee/server/validation/role.js +0 -68
- package/ee/server/validation/user.js +0 -27
- package/ee/strapi-server.js +0 -3
- package/server/bootstrap.js +0 -101
- package/server/config/admin-actions.js +0 -216
- package/server/config/admin-conditions.js +0 -26
- package/server/config/email-templates/forgot-password.js +0 -25
- package/server/config/index.js +0 -9
- package/server/config/settings.js +0 -9
- package/server/content-types/Permission.js +0 -64
- package/server/content-types/Role.js +0 -59
- package/server/content-types/User.js +0 -112
- package/server/content-types/api-token-permission.js +0 -36
- package/server/content-types/api-token.js +0 -76
- package/server/content-types/index.js +0 -11
- package/server/content-types/transfer-token-permission.js +0 -36
- package/server/content-types/transfer-token.js +0 -66
- package/server/controllers/__tests__/admin.test.js +0 -106
- package/server/controllers/__tests__/api-token.test.js +0 -496
- package/server/controllers/__tests__/content-api.test.js +0 -173
- package/server/controllers/__tests__/permission.test.js +0 -200
- package/server/controllers/__tests__/role.test.js +0 -201
- package/server/controllers/__tests__/transfer/token.test.js +0 -520
- package/server/controllers/__tests__/user.test.js +0 -326
- package/server/controllers/admin.js +0 -151
- package/server/controllers/api-token.js +0 -135
- package/server/controllers/authenticated-user.js +0 -52
- package/server/controllers/authentication.js +0 -172
- package/server/controllers/content-api.js +0 -15
- package/server/controllers/formatters/conditions.js +0 -12
- package/server/controllers/formatters/format-actions-by-sections.js +0 -40
- package/server/controllers/formatters/index.js +0 -9
- package/server/controllers/index.js +0 -14
- package/server/controllers/permission.js +0 -45
- package/server/controllers/role.js +0 -198
- package/server/controllers/transfer/index.js +0 -13
- package/server/controllers/transfer/runner.js +0 -28
- package/server/controllers/transfer/token.js +0 -131
- package/server/controllers/user.js +0 -141
- package/server/controllers/webhooks.js +0 -132
- package/server/destroy.js +0 -10
- package/server/domain/action/__tests__/action-domain.test.js +0 -230
- package/server/domain/action/__tests__/action-provider.test.js +0 -376
- package/server/domain/action/index.js +0 -142
- package/server/domain/action/provider.js +0 -83
- package/server/domain/condition/__tests__/condition-domain.test.js +0 -122
- package/server/domain/condition/__tests__/condition-provider.test.js +0 -156
- package/server/domain/condition/index.js +0 -92
- package/server/domain/condition/provider.js +0 -42
- package/server/domain/permission/__tests__/permission-domain.test.js +0 -285
- package/server/domain/permission/index.js +0 -156
- package/server/domain/user.js +0 -28
- package/server/index.js +0 -26
- package/server/middlewares/data-transfer.js +0 -29
- package/server/middlewares/index.js +0 -8
- package/server/middlewares/rateLimit.js +0 -47
- package/server/policies/hasPermissions.js +0 -38
- package/server/policies/index.js +0 -7
- package/server/policies/isAuthenticatedAdmin.js +0 -5
- package/server/policies/isTelemetryEnabled.js +0 -16
- package/server/register.js +0 -19
- package/server/routes/admin.js +0 -71
- package/server/routes/api-tokens.js +0 -70
- package/server/routes/authentication.js +0 -57
- package/server/routes/content-api.js +0 -20
- package/server/routes/index.js +0 -28
- package/server/routes/permissions.js +0 -20
- package/server/routes/roles.js +0 -107
- package/server/routes/serve-admin-panel.js +0 -71
- package/server/routes/transfer.js +0 -102
- package/server/routes/users.js +0 -88
- package/server/routes/webhooks.js +0 -81
- package/server/services/__tests__/action.test.js +0 -98
- package/server/services/__tests__/api-token.test.js +0 -980
- package/server/services/__tests__/auth.test.js +0 -319
- package/server/services/__tests__/content-type.test.js +0 -405
- package/server/services/__tests__/metrics.test.js +0 -65
- package/server/services/__tests__/passport.test.js +0 -90
- package/server/services/__tests__/permission.test.js +0 -177
- package/server/services/__tests__/permissions-manager-sanitize.test.js +0 -117
- package/server/services/__tests__/permissions-manager-validate.test.js +0 -119
- package/server/services/__tests__/permissions-manager.test.js +0 -318
- package/server/services/__tests__/permissions.section-builder.section.test.js +0 -136
- package/server/services/__tests__/project-settings.test.js +0 -397
- package/server/services/__tests__/role.test.js +0 -970
- package/server/services/__tests__/token.test.js +0 -217
- package/server/services/__tests__/transfer/token.test.js +0 -878
- package/server/services/__tests__/user.test.js +0 -786
- package/server/services/action.js +0 -35
- package/server/services/api-token.js +0 -453
- package/server/services/auth.js +0 -117
- package/server/services/condition.js +0 -14
- package/server/services/constants.js +0 -37
- package/server/services/content-type.js +0 -208
- package/server/services/index.js +0 -18
- package/server/services/metrics.js +0 -44
- package/server/services/passport/local-strategy.js +0 -28
- package/server/services/passport.js +0 -45
- package/server/services/permission/engine.js +0 -85
- package/server/services/permission/permissions-manager/index.js +0 -53
- package/server/services/permission/permissions-manager/query-builders.js +0 -72
- package/server/services/permission/permissions-manager/sanitize.js +0 -286
- package/server/services/permission/permissions-manager/validate.js +0 -218
- package/server/services/permission/queries.js +0 -190
- package/server/services/permission/sections-builder/builder.js +0 -84
- package/server/services/permission/sections-builder/handlers.js +0 -156
- package/server/services/permission/sections-builder/index.js +0 -50
- package/server/services/permission/sections-builder/section.js +0 -71
- package/server/services/permission/sections-builder/utils.js +0 -26
- package/server/services/permission.js +0 -33
- package/server/services/project-settings.js +0 -174
- package/server/services/role.js +0 -471
- package/server/services/token.js +0 -70
- package/server/services/transfer/index.js +0 -7
- package/server/services/transfer/permission.js +0 -22
- package/server/services/transfer/token.js +0 -449
- package/server/services/transfer/utils.js +0 -38
- package/server/services/user.js +0 -363
- package/server/strategies/__tests__/admin.test.js +0 -118
- package/server/strategies/__tests__/api-token.test.js +0 -364
- package/server/strategies/admin.js +0 -52
- package/server/strategies/api-token.js +0 -140
- package/server/strategies/data-transfer.js +0 -113
- package/server/strategies/index.js +0 -26
- package/server/utils/index.d.ts +0 -25
- package/server/utils/index.js +0 -9
- package/server/validation/__tests__/common-functions.test.js +0 -54
- package/server/validation/action-provider.js +0 -67
- package/server/validation/api-tokens.js +0 -32
- package/server/validation/authentication/forgot-password.js +0 -14
- package/server/validation/authentication/index.js +0 -19
- package/server/validation/authentication/register.js +0 -45
- package/server/validation/authentication/renew-token.js +0 -7
- package/server/validation/authentication/reset-password.js +0 -15
- package/server/validation/common-functions/check-fields-are-correctly-nested.js +0 -28
- package/server/validation/common-functions/check-fields-dont-have-duplicates.js +0 -17
- package/server/validation/common-functions/index.js +0 -9
- package/server/validation/common-validators.js +0 -209
- package/server/validation/permission.js +0 -53
- package/server/validation/policies/hasPermissions.js +0 -27
- package/server/validation/project-settings.js +0 -48
- package/server/validation/role.js +0 -59
- package/server/validation/transfer/index.js +0 -5
- package/server/validation/transfer/token.js +0 -42
- package/server/validation/user.js +0 -65
|
@@ -1,1266 +0,0 @@
|
|
|
1
|
-
import EE from "@strapi/strapi/dist/utils/ee";
|
|
2
|
-
import * as tsUtils from "@strapi/typescript-utils";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
import fs, { access } from "node:fs/promises";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import inquirer from "inquirer";
|
|
7
|
-
import semver from "semver";
|
|
8
|
-
import resolveFrom from "resolve-from";
|
|
9
|
-
import execa from "execa";
|
|
10
|
-
import readPkgUp from "read-pkg-up";
|
|
11
|
-
import { performance } from "perf_hooks";
|
|
12
|
-
import browserslist from "browserslist";
|
|
13
|
-
import strapiFactory from "@strapi/strapi";
|
|
14
|
-
import { env, getConfigUrls, joinBy } from "@strapi/utils";
|
|
15
|
-
import dotenv from "dotenv";
|
|
16
|
-
import { register } from "esbuild-register/dist/node";
|
|
17
|
-
import fs$1 from "node:fs";
|
|
18
|
-
import camelCase from "lodash/camelCase";
|
|
19
|
-
import boxen from "boxen";
|
|
20
|
-
import chalk from "chalk";
|
|
21
|
-
import outdent from "outdent";
|
|
22
|
-
import { format } from "prettier";
|
|
23
|
-
import { createElement } from "react";
|
|
24
|
-
import { renderToStaticMarkup } from "react-dom/server";
|
|
25
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
-
import webpack, { HotModuleReplacementPlugin, DefinePlugin, webpack as webpack$1 } from "webpack";
|
|
27
|
-
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
28
|
-
import { ESBuildMinifyPlugin } from "esbuild-loader";
|
|
29
|
-
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
30
|
-
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
31
|
-
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
32
|
-
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
33
|
-
import crypto from "node:crypto";
|
|
34
|
-
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
|
35
|
-
import path$1 from "path";
|
|
36
|
-
import findRoot from "find-root";
|
|
37
|
-
import chokidar from "chokidar";
|
|
38
|
-
import cluster from "node:cluster";
|
|
39
|
-
import { promisify } from "node:util";
|
|
40
|
-
import webpackDevMiddleware from "webpack-dev-middleware";
|
|
41
|
-
import webpackHotMiddleware from "webpack-hot-middleware";
|
|
42
|
-
const build$2 = ({ command, ctx }) => {
|
|
43
|
-
command.command("build").option("-d, --debug", "Enable debugging mode with verbose logs", false).option("--ignore-prompts", "Ignore all prompts", false).option("--minify", "Minify the output", true).option("--no-optimization", "[deprecated]: use minify instead").option("--silent", "Don't log anything", false).option("--sourcemap", "Produce sourcemaps", false).option("--stats", "Print build statistics to the console", false).description("Build the strapi admin app").action(async (options) => {
|
|
44
|
-
const { build: build2 } = await import("./build-1026ce7c.mjs");
|
|
45
|
-
return build2({ ...options, ...ctx });
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
const develop$1 = ({ command, ctx }) => {
|
|
49
|
-
command.command("develop").alias("dev").option("-d, --debug", "Enable debugging mode with verbose logs", false).option("--silent", "Don't log anything", false).option("--ignore-prompts", "Ignore all prompts", false).option("--polling", "Watch for file changes in network directories", false).option("--watch-admin", "Watch the admin panel for hot changes", false).option(
|
|
50
|
-
"--no-build",
|
|
51
|
-
"[deprecated]: there is middleware for the server, it is no longer a separate process"
|
|
52
|
-
).option(
|
|
53
|
-
"--watch-admin",
|
|
54
|
-
"[deprecated]: there is now middleware for watching, it is no longer a separate process"
|
|
55
|
-
).option("--browser <name>", "[deprecated]: use open instead").option("--open", "Open the admin in your browser", true).description("Start your Strapi application in development mode").action(async (options) => {
|
|
56
|
-
const { develop: develop2 } = await import("./develop-72394876.mjs");
|
|
57
|
-
return develop2({ ...options, ...ctx });
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
61
|
-
__proto__: null,
|
|
62
|
-
build: build$2,
|
|
63
|
-
develop: develop$1
|
|
64
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
65
|
-
const getPackageManager = () => {
|
|
66
|
-
const agent = process.env.npm_config_user_agent || "";
|
|
67
|
-
if (agent.includes("yarn")) {
|
|
68
|
-
return "yarn";
|
|
69
|
-
}
|
|
70
|
-
if (agent.includes("pnpm")) {
|
|
71
|
-
return "pnpm";
|
|
72
|
-
}
|
|
73
|
-
if (/^npm\/\d/.test(agent)) {
|
|
74
|
-
return "npm";
|
|
75
|
-
}
|
|
76
|
-
return void 0;
|
|
77
|
-
};
|
|
78
|
-
const PEER_DEPS = {
|
|
79
|
-
react: "^18.0.0",
|
|
80
|
-
"react-dom": "^18.0.0",
|
|
81
|
-
"react-router-dom": "^5.2.0",
|
|
82
|
-
"styled-components": "^5.2.1"
|
|
83
|
-
};
|
|
84
|
-
const checkRequiredDependencies = async ({
|
|
85
|
-
cwd,
|
|
86
|
-
logger,
|
|
87
|
-
ignorePrompts
|
|
88
|
-
}) => {
|
|
89
|
-
const pkg = await readPkgUp({ cwd });
|
|
90
|
-
if (!pkg) {
|
|
91
|
-
throw new Error(`Could not find package.json at path: ${cwd}`);
|
|
92
|
-
}
|
|
93
|
-
logger.debug("Loaded package.json:", os.EOL, pkg.packageJson);
|
|
94
|
-
const { install, review } = Object.entries(PEER_DEPS).reduce(
|
|
95
|
-
(acc, [name, version]) => {
|
|
96
|
-
if (!pkg.packageJson.dependencies) {
|
|
97
|
-
throw new Error(`Could not find dependencies in package.json at path: ${cwd}`);
|
|
98
|
-
}
|
|
99
|
-
const declaredVersion = pkg.packageJson.dependencies[name];
|
|
100
|
-
if (!declaredVersion) {
|
|
101
|
-
acc.install.push({
|
|
102
|
-
name,
|
|
103
|
-
wantedVersion: version
|
|
104
|
-
});
|
|
105
|
-
} else {
|
|
106
|
-
acc.review.push({
|
|
107
|
-
name,
|
|
108
|
-
wantedVersion: version,
|
|
109
|
-
declaredVersion
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return acc;
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
install: [],
|
|
116
|
-
review: []
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
if (install.length > 0) {
|
|
120
|
-
logger.info(
|
|
121
|
-
"The Strapi admin needs to install the following dependencies:",
|
|
122
|
-
os.EOL,
|
|
123
|
-
install.map(({ name, wantedVersion }) => ` - ${name}@${wantedVersion}`).join(os.EOL)
|
|
124
|
-
);
|
|
125
|
-
if (process.env.NODE_ENV !== "development" || ignorePrompts) {
|
|
126
|
-
return { didInstall: false };
|
|
127
|
-
}
|
|
128
|
-
const { install: installAns } = await inquirer.prompt({
|
|
129
|
-
type: "confirm",
|
|
130
|
-
name: "install",
|
|
131
|
-
default: true,
|
|
132
|
-
message: "Would you like to install these dependencies now? These are not required but are recommended, from V5 these will be required."
|
|
133
|
-
});
|
|
134
|
-
if (installAns) {
|
|
135
|
-
await installDependencies(install, {
|
|
136
|
-
cwd,
|
|
137
|
-
logger
|
|
138
|
-
});
|
|
139
|
-
const [file, ...args] = process.argv;
|
|
140
|
-
await execa(file, args, { cwd, stdio: "inherit" });
|
|
141
|
-
return { didInstall: true };
|
|
142
|
-
} else {
|
|
143
|
-
return { didInstall: false };
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if (review.length) {
|
|
147
|
-
const errors = [];
|
|
148
|
-
for (const dep of review) {
|
|
149
|
-
let minDeclaredVersion = null;
|
|
150
|
-
try {
|
|
151
|
-
minDeclaredVersion = semver.minVersion(dep.declaredVersion);
|
|
152
|
-
} catch (err) {
|
|
153
|
-
}
|
|
154
|
-
if (!minDeclaredVersion) {
|
|
155
|
-
errors.push(
|
|
156
|
-
`The declared dependency, ${dep.name} has an invalid version in package.json: ${dep.declaredVersion}`
|
|
157
|
-
);
|
|
158
|
-
} else if (!semver.satisfies(minDeclaredVersion, dep.wantedVersion)) {
|
|
159
|
-
logger.warn(
|
|
160
|
-
[
|
|
161
|
-
`Declared version of ${dep.name} (${minDeclaredVersion}) is not compatible with the version required by Strapi (${dep.wantedVersion}).`,
|
|
162
|
-
"You may experience issues, we recommend you change this."
|
|
163
|
-
].join(os.EOL)
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
const installedVersion = await getModuleVersion(dep.name, cwd);
|
|
167
|
-
if (!installedVersion) {
|
|
168
|
-
errors.push(
|
|
169
|
-
`The declared dependency, ${dep.name} is not installed. You should install before re-running this command`
|
|
170
|
-
);
|
|
171
|
-
} else if (!semver.satisfies(installedVersion, dep.wantedVersion)) {
|
|
172
|
-
logger.warn(
|
|
173
|
-
[
|
|
174
|
-
`Declared version of ${dep.name} (${installedVersion}) is not compatible with the version required by Strapi (${dep.wantedVersion}).`,
|
|
175
|
-
"You may experience issues, we recommend you change this."
|
|
176
|
-
].join(os.EOL)
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (errors.length > 0 && process.env.NODE_ENV === "development") {
|
|
181
|
-
throw new Error(`${os.EOL}- ${errors.join(`${os.EOL}- `)}`);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return { didInstall: false };
|
|
185
|
-
};
|
|
186
|
-
const getModule = async (name, cwd) => {
|
|
187
|
-
const modulePackagePath = resolveFrom.silent(cwd, path.join(name, "package.json"));
|
|
188
|
-
if (!modulePackagePath) {
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
const file = await fs.readFile(modulePackagePath, "utf8").then((res) => JSON.parse(res));
|
|
192
|
-
return file;
|
|
193
|
-
};
|
|
194
|
-
const getModuleVersion = async (name, cwd) => {
|
|
195
|
-
const pkg = await getModule(name, cwd);
|
|
196
|
-
return pkg?.version || null;
|
|
197
|
-
};
|
|
198
|
-
const installDependencies = async (install, { cwd, logger }) => {
|
|
199
|
-
const packageManager = getPackageManager();
|
|
200
|
-
if (!packageManager) {
|
|
201
|
-
logger.error(
|
|
202
|
-
"Could not find a supported package manager, please install the dependencies manually."
|
|
203
|
-
);
|
|
204
|
-
process.exit(1);
|
|
205
|
-
}
|
|
206
|
-
const execOptions = {
|
|
207
|
-
encoding: "utf8",
|
|
208
|
-
cwd,
|
|
209
|
-
stdio: "inherit"
|
|
210
|
-
};
|
|
211
|
-
const packages = install.map(({ name, wantedVersion }) => `${name}@${wantedVersion}`);
|
|
212
|
-
let result;
|
|
213
|
-
if (packageManager === "npm") {
|
|
214
|
-
const npmArgs = ["install", "--legacy-peer-deps", "--save", ...packages];
|
|
215
|
-
logger.info(`Running 'npm ${npmArgs.join(" ")}'`);
|
|
216
|
-
result = await execa("npm", npmArgs, execOptions);
|
|
217
|
-
} else if (packageManager === "yarn") {
|
|
218
|
-
const yarnArgs = ["add", ...packages];
|
|
219
|
-
logger.info(`Running 'yarn ${yarnArgs.join(" ")}'`);
|
|
220
|
-
result = await execa("yarn", yarnArgs, execOptions);
|
|
221
|
-
} else if (packageManager === "pnpm") {
|
|
222
|
-
const pnpmArgs = ["add", "--save-prod", ...packages];
|
|
223
|
-
logger.info(`Running 'pnpm ${pnpmArgs.join(" ")}'`);
|
|
224
|
-
result = await execa("pnpm", pnpmArgs, execOptions);
|
|
225
|
-
}
|
|
226
|
-
if (result?.exitCode || result?.failed) {
|
|
227
|
-
throw new Error("Package installation failed");
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
function getTimer() {
|
|
231
|
-
const timings = {};
|
|
232
|
-
const startTimes = {};
|
|
233
|
-
function start(name) {
|
|
234
|
-
if (typeof startTimes[name] !== "undefined") {
|
|
235
|
-
throw new Error(`Timer "${name}" already started, cannot overwrite`);
|
|
236
|
-
}
|
|
237
|
-
startTimes[name] = performance.now();
|
|
238
|
-
}
|
|
239
|
-
function end(name) {
|
|
240
|
-
if (typeof startTimes[name] === "undefined") {
|
|
241
|
-
throw new Error(`Timer "${name}" never started, cannot end`);
|
|
242
|
-
}
|
|
243
|
-
timings[name] = performance.now() - startTimes[name];
|
|
244
|
-
return timings[name];
|
|
245
|
-
}
|
|
246
|
-
return { start, end, getTimings: () => timings };
|
|
247
|
-
}
|
|
248
|
-
const prettyTime = (timeInMs) => {
|
|
249
|
-
return Math.ceil(timeInMs) + "ms";
|
|
250
|
-
};
|
|
251
|
-
const pathExists = async (path2) => {
|
|
252
|
-
try {
|
|
253
|
-
await access(path2);
|
|
254
|
-
return true;
|
|
255
|
-
} catch (error) {
|
|
256
|
-
return false;
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
const loadFile = async (path2) => {
|
|
260
|
-
if (await pathExists(path2)) {
|
|
261
|
-
const esbuildOptions = {
|
|
262
|
-
extensions: [".js", ".mjs", ".ts"]
|
|
263
|
-
};
|
|
264
|
-
const { unregister } = register(esbuildOptions);
|
|
265
|
-
const mod = require(path2);
|
|
266
|
-
unregister();
|
|
267
|
-
const file = mod?.default || mod || void 0;
|
|
268
|
-
return file;
|
|
269
|
-
}
|
|
270
|
-
return void 0;
|
|
271
|
-
};
|
|
272
|
-
const convertSystemPathToModulePath = (sysPath) => {
|
|
273
|
-
if (process.platform === "win32") {
|
|
274
|
-
return sysPath.split(path.sep).join(path.posix.sep);
|
|
275
|
-
} else {
|
|
276
|
-
return sysPath;
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
const convertModulePathToSystemPath = (modulePath) => {
|
|
280
|
-
if (process.platform === "win32") {
|
|
281
|
-
return modulePath.split(path.posix.sep).join(path.sep);
|
|
282
|
-
} else {
|
|
283
|
-
return modulePath;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
const loadEnv = async (cwd) => {
|
|
287
|
-
const pathToEnv = path.resolve(cwd, ".env");
|
|
288
|
-
if (await pathExists(pathToEnv)) {
|
|
289
|
-
dotenv.config({ path: pathToEnv });
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
const getStrapiAdminEnvVars = (defaultEnv) => {
|
|
293
|
-
return Object.keys(process.env).filter((key) => key.toUpperCase().startsWith("STRAPI_ADMIN_")).reduce((acc, key) => {
|
|
294
|
-
acc[key] = process.env[key];
|
|
295
|
-
return acc;
|
|
296
|
-
}, defaultEnv);
|
|
297
|
-
};
|
|
298
|
-
const isError = (err) => err instanceof Error;
|
|
299
|
-
const handleUnexpectedError = (err) => {
|
|
300
|
-
console.error(
|
|
301
|
-
chalk.red(
|
|
302
|
-
`[ERROR] `,
|
|
303
|
-
"There seems to be an unexpected error, try again with --debug for more information",
|
|
304
|
-
os.EOL
|
|
305
|
-
)
|
|
306
|
-
);
|
|
307
|
-
if (isError(err) && err.stack) {
|
|
308
|
-
console.log(
|
|
309
|
-
chalk.red(
|
|
310
|
-
boxen(err.stack, {
|
|
311
|
-
padding: 1,
|
|
312
|
-
align: "left"
|
|
313
|
-
})
|
|
314
|
-
)
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
process.exit(1);
|
|
318
|
-
};
|
|
319
|
-
const validatePackageHasStrapi = (pkg) => "strapi" in pkg && typeof pkg.strapi === "object" && !Array.isArray(pkg.strapi) && pkg.strapi !== null;
|
|
320
|
-
const validatePackageIsPlugin = (pkg) => validatePackageHasStrapi(pkg) && pkg.strapi.kind === "plugin";
|
|
321
|
-
const getEnabledPlugins = async ({
|
|
322
|
-
cwd,
|
|
323
|
-
logger,
|
|
324
|
-
runtimeDir,
|
|
325
|
-
strapi
|
|
326
|
-
}) => {
|
|
327
|
-
const plugins = {};
|
|
328
|
-
const deps = strapi.config.get("info.dependencies", {});
|
|
329
|
-
logger.debug("Dependencies from user's project", os.EOL, deps);
|
|
330
|
-
for (const dep of Object.keys(deps)) {
|
|
331
|
-
const pkg = await getModule(dep, cwd);
|
|
332
|
-
if (pkg && validatePackageIsPlugin(pkg)) {
|
|
333
|
-
const name = pkg.strapi.name || pkg.name;
|
|
334
|
-
if (!name) {
|
|
335
|
-
throw Error(
|
|
336
|
-
"You're trying to import a plugin that doesn't have a name – check the package.json of that plugin!"
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
plugins[name] = {
|
|
340
|
-
name,
|
|
341
|
-
importName: camelCase(name),
|
|
342
|
-
type: "module",
|
|
343
|
-
modulePath: dep
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
const userPluginsFile = await loadUserPluginsFile(strapi.dirs.app.config);
|
|
348
|
-
logger.debug("User's plugins file", os.EOL, userPluginsFile);
|
|
349
|
-
for (const [userPluginName, userPluginConfig] of Object.entries(userPluginsFile)) {
|
|
350
|
-
if (userPluginConfig.enabled && userPluginConfig.resolve) {
|
|
351
|
-
const sysPath = convertModulePathToSystemPath(userPluginConfig.resolve);
|
|
352
|
-
plugins[userPluginName] = {
|
|
353
|
-
name: userPluginName,
|
|
354
|
-
importName: camelCase(userPluginName),
|
|
355
|
-
type: "local",
|
|
356
|
-
/**
|
|
357
|
-
* User plugin paths are resolved from the entry point
|
|
358
|
-
* of the app, because that's how you import them.
|
|
359
|
-
*/
|
|
360
|
-
modulePath: convertSystemPathToModulePath(path.relative(runtimeDir, sysPath)),
|
|
361
|
-
path: sysPath
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return plugins;
|
|
366
|
-
};
|
|
367
|
-
const PLUGIN_CONFIGS = ["plugins.js", "plugins.mjs", "plugins.ts"];
|
|
368
|
-
const loadUserPluginsFile = async (root) => {
|
|
369
|
-
for (const file of PLUGIN_CONFIGS) {
|
|
370
|
-
const filePath = path.join(root, file);
|
|
371
|
-
const configFile = await loadFile(filePath);
|
|
372
|
-
if (configFile) {
|
|
373
|
-
return typeof configFile === "function" ? configFile({ env }) : configFile;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return {};
|
|
377
|
-
};
|
|
378
|
-
const getMapOfPluginsWithAdmin = (plugins) => Object.values(plugins).filter((plugin) => {
|
|
379
|
-
if (!plugin) {
|
|
380
|
-
return false;
|
|
381
|
-
}
|
|
382
|
-
try {
|
|
383
|
-
const isLocalPluginWithLegacyAdminFile = plugin.path && fs$1.existsSync(path.join(plugin.path, "strapi-admin.js"));
|
|
384
|
-
if (!isLocalPluginWithLegacyAdminFile) {
|
|
385
|
-
const isModuleWithFE = require.resolve(`${plugin.modulePath}/strapi-admin`);
|
|
386
|
-
return isModuleWithFE;
|
|
387
|
-
}
|
|
388
|
-
return isLocalPluginWithLegacyAdminFile;
|
|
389
|
-
} catch (err) {
|
|
390
|
-
if (isError(err) && "code" in err && err.code === "MODULE_NOT_FOUND") {
|
|
391
|
-
return false;
|
|
392
|
-
}
|
|
393
|
-
throw err;
|
|
394
|
-
}
|
|
395
|
-
}).map((plugin) => ({
|
|
396
|
-
...plugin,
|
|
397
|
-
modulePath: `${plugin.modulePath}/strapi-admin`
|
|
398
|
-
}));
|
|
399
|
-
const ADMIN_APP_FILES = ["app.js", "app.mjs", "app.ts", "app.jsx", "app.tsx"];
|
|
400
|
-
const loadUserAppFile = async ({
|
|
401
|
-
runtimeDir,
|
|
402
|
-
appDir
|
|
403
|
-
}) => {
|
|
404
|
-
for (const file of ADMIN_APP_FILES) {
|
|
405
|
-
const filePath = path.join(appDir, "src", "admin", file);
|
|
406
|
-
if (await pathExists(filePath)) {
|
|
407
|
-
return {
|
|
408
|
-
path: filePath,
|
|
409
|
-
modulePath: convertSystemPathToModulePath(path.relative(runtimeDir, filePath))
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
return void 0;
|
|
414
|
-
};
|
|
415
|
-
const DEFAULT_BROWSERSLIST = [
|
|
416
|
-
"last 3 major versions",
|
|
417
|
-
"Firefox ESR",
|
|
418
|
-
"last 2 Opera versions",
|
|
419
|
-
"not dead"
|
|
420
|
-
];
|
|
421
|
-
const createBuildContext = async ({
|
|
422
|
-
cwd,
|
|
423
|
-
logger,
|
|
424
|
-
tsconfig,
|
|
425
|
-
strapi,
|
|
426
|
-
options = {}
|
|
427
|
-
}) => {
|
|
428
|
-
const strapiInstance = strapi ?? strapiFactory({
|
|
429
|
-
// Directories
|
|
430
|
-
appDir: cwd,
|
|
431
|
-
distDir: tsconfig?.config.options.outDir ?? "",
|
|
432
|
-
// Options
|
|
433
|
-
autoReload: true,
|
|
434
|
-
serveAdminPanel: false
|
|
435
|
-
});
|
|
436
|
-
const { serverUrl, adminPath } = getConfigUrls(strapiInstance.config, true);
|
|
437
|
-
const appDir = strapiInstance.dirs.app.root;
|
|
438
|
-
await loadEnv(cwd);
|
|
439
|
-
const env2 = getStrapiAdminEnvVars({
|
|
440
|
-
ADMIN_PATH: adminPath,
|
|
441
|
-
STRAPI_ADMIN_BACKEND_URL: serverUrl,
|
|
442
|
-
STRAPI_TELEMETRY_DISABLED: String(strapiInstance.telemetry.isDisabled)
|
|
443
|
-
});
|
|
444
|
-
const envKeys = Object.keys(env2);
|
|
445
|
-
if (envKeys.length > 0) {
|
|
446
|
-
logger.info(
|
|
447
|
-
[
|
|
448
|
-
"Including the following ENV variables as part of the JS bundle:",
|
|
449
|
-
...envKeys.map((key) => ` - ${key}`)
|
|
450
|
-
].join(os.EOL)
|
|
451
|
-
);
|
|
452
|
-
}
|
|
453
|
-
const distPath = path.join(strapiInstance.dirs.dist.root, "build");
|
|
454
|
-
const distDir = path.relative(cwd, distPath);
|
|
455
|
-
try {
|
|
456
|
-
logger.debug(`Cleaning dist folder: ${distPath}`);
|
|
457
|
-
await fs.rm(distPath, { recursive: true, force: true });
|
|
458
|
-
logger.debug("Cleaned dist folder");
|
|
459
|
-
} catch {
|
|
460
|
-
logger.debug("There was no dist folder to clean");
|
|
461
|
-
}
|
|
462
|
-
const runtimeDir = path.join(cwd, ".strapi", "client");
|
|
463
|
-
const entry = path.relative(cwd, path.join(runtimeDir, "app.js"));
|
|
464
|
-
const plugins = await getEnabledPlugins({ cwd, logger, runtimeDir, strapi: strapiInstance });
|
|
465
|
-
logger.debug("Enabled plugins", os.EOL, plugins);
|
|
466
|
-
const pluginsWithFront = getMapOfPluginsWithAdmin(plugins);
|
|
467
|
-
logger.debug("Enabled plugins with FE", os.EOL, plugins);
|
|
468
|
-
const target = browserslist.loadConfig({ path: cwd }) ?? DEFAULT_BROWSERSLIST;
|
|
469
|
-
const customisations = await loadUserAppFile({ appDir, runtimeDir });
|
|
470
|
-
const features = strapiInstance.config.get("features", void 0);
|
|
471
|
-
const buildContext = {
|
|
472
|
-
appDir,
|
|
473
|
-
basePath: `${adminPath}/`,
|
|
474
|
-
customisations,
|
|
475
|
-
cwd,
|
|
476
|
-
distDir,
|
|
477
|
-
distPath,
|
|
478
|
-
entry,
|
|
479
|
-
env: env2,
|
|
480
|
-
logger,
|
|
481
|
-
options,
|
|
482
|
-
plugins: pluginsWithFront,
|
|
483
|
-
runtimeDir,
|
|
484
|
-
strapi: strapiInstance,
|
|
485
|
-
target,
|
|
486
|
-
tsconfig,
|
|
487
|
-
features
|
|
488
|
-
};
|
|
489
|
-
return buildContext;
|
|
490
|
-
};
|
|
491
|
-
const styles = `
|
|
492
|
-
.strapi--root {
|
|
493
|
-
position: absolute;
|
|
494
|
-
top: 0;
|
|
495
|
-
right: 0;
|
|
496
|
-
left: 0;
|
|
497
|
-
bottom: 0;
|
|
498
|
-
background: #fff;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.strapi--no-js {
|
|
502
|
-
position: absolute;
|
|
503
|
-
top: 50%;
|
|
504
|
-
left: 50%;
|
|
505
|
-
transform: translate(-50%, -50%);
|
|
506
|
-
text-align: center;
|
|
507
|
-
font-family: helvetica, arial, sans-serif;
|
|
508
|
-
}
|
|
509
|
-
`;
|
|
510
|
-
const NoJavascript = () => {
|
|
511
|
-
return /* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("div", { className: "strapi--root", children: /* @__PURE__ */ jsxs("div", { className: "strapi--no-js", children: [
|
|
512
|
-
/* @__PURE__ */ jsx("style", { type: "text/css", children: styles }),
|
|
513
|
-
/* @__PURE__ */ jsx("h1", { children: "JavaScript disabled" }),
|
|
514
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
515
|
-
"Please ",
|
|
516
|
-
/* @__PURE__ */ jsx("a", { href: "https://www.enable-javascript.com/", children: "enable JavaScript" }),
|
|
517
|
-
" in your browser and reload the page to proceed."
|
|
518
|
-
] })
|
|
519
|
-
] }) }) });
|
|
520
|
-
};
|
|
521
|
-
const globalStyles = `
|
|
522
|
-
html,
|
|
523
|
-
body,
|
|
524
|
-
#strapi {
|
|
525
|
-
height: 100%;
|
|
526
|
-
}
|
|
527
|
-
body {
|
|
528
|
-
margin: 0;
|
|
529
|
-
-webkit-font-smoothing: antialiased;
|
|
530
|
-
}
|
|
531
|
-
`;
|
|
532
|
-
const DefaultDocument = () => {
|
|
533
|
-
return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
|
|
534
|
-
/* @__PURE__ */ jsxs("head", { children: [
|
|
535
|
-
/* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
|
|
536
|
-
/* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, viewport-fit=cover" }),
|
|
537
|
-
/* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex" }),
|
|
538
|
-
/* @__PURE__ */ jsx("meta", { name: "referrer", content: "same-origin" }),
|
|
539
|
-
/* @__PURE__ */ jsx("title", { children: "Strapi Admin" }),
|
|
540
|
-
/* @__PURE__ */ jsx("style", { children: globalStyles })
|
|
541
|
-
] }),
|
|
542
|
-
/* @__PURE__ */ jsxs("body", { children: [
|
|
543
|
-
/* @__PURE__ */ jsx("div", { id: "strapi" }),
|
|
544
|
-
/* @__PURE__ */ jsx(NoJavascript, {})
|
|
545
|
-
] })
|
|
546
|
-
] });
|
|
547
|
-
};
|
|
548
|
-
const getEntryModule = (ctx) => {
|
|
549
|
-
const pluginsObject = ctx.plugins.map(({ name, importName }) => `'${name}': ${importName}`).join(",\n");
|
|
550
|
-
const pluginsImport = ctx.plugins.map(({ importName, modulePath }) => `import ${importName} from '${modulePath}';`).join("\n");
|
|
551
|
-
return outdent`
|
|
552
|
-
/**
|
|
553
|
-
* This file was automatically generated by Strapi.
|
|
554
|
-
* Any modifications made will be discarded.
|
|
555
|
-
*/
|
|
556
|
-
${pluginsImport}
|
|
557
|
-
import { renderAdmin } from "@strapi/strapi/admin"
|
|
558
|
-
|
|
559
|
-
${ctx.customisations?.modulePath ? `import customisations from '${ctx.customisations.modulePath}'` : ""}
|
|
560
|
-
|
|
561
|
-
renderAdmin(
|
|
562
|
-
document.getElementById("strapi"),
|
|
563
|
-
{
|
|
564
|
-
${ctx.customisations?.modulePath ? "customisations," : ""}
|
|
565
|
-
${ctx.features ? `features: ${JSON.stringify(ctx.features)},` : ""}
|
|
566
|
-
plugins: {
|
|
567
|
-
${pluginsObject}
|
|
568
|
-
}
|
|
569
|
-
})
|
|
570
|
-
`;
|
|
571
|
-
};
|
|
572
|
-
const getDocumentHTML = async ({ logger }) => {
|
|
573
|
-
const result = renderToStaticMarkup(createElement(DefaultDocument));
|
|
574
|
-
logger.debug("Rendered the HTML");
|
|
575
|
-
return outdent`<!DOCTYPE html>${result}`;
|
|
576
|
-
};
|
|
577
|
-
const AUTO_GENERATED_WARNING = `
|
|
578
|
-
This file was automatically generated by Strapi.
|
|
579
|
-
Any modifications made will be discarded.
|
|
580
|
-
`.trim();
|
|
581
|
-
const decorateHTMLWithAutoGeneratedWarning = (htmlTemplate) => htmlTemplate.replace(/<head/, `
|
|
582
|
-
<!--
|
|
583
|
-
${AUTO_GENERATED_WARNING}
|
|
584
|
-
-->
|
|
585
|
-
<head`);
|
|
586
|
-
const writeStaticClientFiles = async (ctx) => {
|
|
587
|
-
await fs.mkdir(ctx.runtimeDir, { recursive: true });
|
|
588
|
-
ctx.logger.debug("Created the runtime directory");
|
|
589
|
-
const indexHtml = decorateHTMLWithAutoGeneratedWarning(
|
|
590
|
-
await getDocumentHTML({ logger: ctx.logger })
|
|
591
|
-
);
|
|
592
|
-
await fs.writeFile(
|
|
593
|
-
path.join(ctx.runtimeDir, "index.html"),
|
|
594
|
-
format(indexHtml, {
|
|
595
|
-
parser: "html"
|
|
596
|
-
})
|
|
597
|
-
);
|
|
598
|
-
ctx.logger.debug("Wrote the index.html file");
|
|
599
|
-
await fs.writeFile(
|
|
600
|
-
path.join(ctx.runtimeDir, "app.js"),
|
|
601
|
-
format(getEntryModule(ctx), {
|
|
602
|
-
parser: "babel"
|
|
603
|
-
})
|
|
604
|
-
);
|
|
605
|
-
ctx.logger.debug("Wrote the app.js file");
|
|
606
|
-
};
|
|
607
|
-
const adminPackageAliases = [
|
|
608
|
-
"@strapi/design-system",
|
|
609
|
-
"@strapi/helper-plugin",
|
|
610
|
-
"@strapi/icons",
|
|
611
|
-
"date-fns",
|
|
612
|
-
"formik",
|
|
613
|
-
"history",
|
|
614
|
-
"immer",
|
|
615
|
-
"qs",
|
|
616
|
-
"lodash",
|
|
617
|
-
"react",
|
|
618
|
-
"react-dnd",
|
|
619
|
-
"react-dnd-html5-backend",
|
|
620
|
-
"react-dom",
|
|
621
|
-
"react-error-boundary",
|
|
622
|
-
"react-helmet",
|
|
623
|
-
"react-is",
|
|
624
|
-
"react-intl",
|
|
625
|
-
"react-query",
|
|
626
|
-
"react-redux",
|
|
627
|
-
"react-router-dom",
|
|
628
|
-
"react-window",
|
|
629
|
-
"react-select",
|
|
630
|
-
"redux",
|
|
631
|
-
"reselect",
|
|
632
|
-
"styled-components",
|
|
633
|
-
"yup"
|
|
634
|
-
];
|
|
635
|
-
const getAdminDependencyAliases = (monorepo) => adminPackageAliases.filter(
|
|
636
|
-
(moduleName) => !monorepo?.path || monorepo.path && moduleName !== "@strapi/helper-plugin"
|
|
637
|
-
).reduce((acc, moduleName) => {
|
|
638
|
-
acc[`${moduleName}$`] = findRoot(require.resolve(moduleName));
|
|
639
|
-
return acc;
|
|
640
|
-
}, {});
|
|
641
|
-
const devAliases = {
|
|
642
|
-
"@strapi/admin/strapi-admin": "./packages/core/admin/admin/src",
|
|
643
|
-
"@strapi/content-releases/strapi-admin": "./packages/core/content-releases/admin/src",
|
|
644
|
-
"@strapi/content-type-builder/strapi-admin": "./packages/core/content-type-builder/admin/src",
|
|
645
|
-
"@strapi/email/strapi-admin": "./packages/core/email/admin/src",
|
|
646
|
-
"@strapi/upload/strapi-admin": "./packages/core/upload/admin/src",
|
|
647
|
-
"@strapi/plugin-color-picker/strapi-admin": "./packages/plugins/color-picker/admin/src",
|
|
648
|
-
"@strapi/plugin-documentation/strapi-admin": "./packages/plugins/documentation/admin/src",
|
|
649
|
-
"@strapi/plugin-graphql/strapi-admin": "./packages/plugins/graphql/admin/src",
|
|
650
|
-
"@strapi/plugin-i18n/strapi-admin": "./packages/plugins/i18n/admin/src",
|
|
651
|
-
"@strapi/plugin-sentry/strapi-admin": "./packages/plugins/sentry/admin/src",
|
|
652
|
-
"@strapi/plugin-users-permissions/strapi-admin": "./packages/plugins/users-permissions/admin/src",
|
|
653
|
-
"@strapi/helper-plugin": "./packages/core/helper-plugin/src"
|
|
654
|
-
};
|
|
655
|
-
const getAliases = (cwd, monorepo) => {
|
|
656
|
-
const adminAliases = getAdminDependencyAliases(monorepo);
|
|
657
|
-
const monorepoAliases = monorepo ? Object.fromEntries(
|
|
658
|
-
Object.entries(devAliases).map(([key, modulePath]) => {
|
|
659
|
-
return [key, path$1.join(monorepo.path, modulePath)];
|
|
660
|
-
})
|
|
661
|
-
) : {};
|
|
662
|
-
return {
|
|
663
|
-
...adminAliases,
|
|
664
|
-
...monorepoAliases
|
|
665
|
-
};
|
|
666
|
-
};
|
|
667
|
-
async function loadStrapiMonorepo(cwd) {
|
|
668
|
-
let p = cwd;
|
|
669
|
-
while (p !== "/") {
|
|
670
|
-
const readResult = await readPkgUp({ cwd: p });
|
|
671
|
-
if (!readResult) {
|
|
672
|
-
return void 0;
|
|
673
|
-
}
|
|
674
|
-
if (readResult.packageJson.isStrapiMonorepo) {
|
|
675
|
-
return { path: path$1.dirname(readResult.path) };
|
|
676
|
-
}
|
|
677
|
-
p = path$1.dirname(path$1.dirname(readResult.path));
|
|
678
|
-
}
|
|
679
|
-
return void 0;
|
|
680
|
-
}
|
|
681
|
-
const resolveBaseConfig = async (ctx) => {
|
|
682
|
-
const monorepo = await loadStrapiMonorepo(ctx.cwd);
|
|
683
|
-
const target = browserslistToEsbuild(ctx.target);
|
|
684
|
-
return {
|
|
685
|
-
experiments: {
|
|
686
|
-
topLevelAwait: true
|
|
687
|
-
},
|
|
688
|
-
entry: {
|
|
689
|
-
main: [`./${ctx.entry}`]
|
|
690
|
-
},
|
|
691
|
-
resolve: {
|
|
692
|
-
alias: getAliases(ctx.cwd, monorepo),
|
|
693
|
-
extensions: [".js", ".jsx", ".react.js", ".ts", ".tsx"]
|
|
694
|
-
},
|
|
695
|
-
module: {
|
|
696
|
-
rules: [
|
|
697
|
-
{
|
|
698
|
-
test: /\.(ts|tsx)$/,
|
|
699
|
-
loader: require.resolve("esbuild-loader"),
|
|
700
|
-
options: {
|
|
701
|
-
loader: "tsx",
|
|
702
|
-
target,
|
|
703
|
-
jsx: "automatic"
|
|
704
|
-
}
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
test: /\.(js|jsx|mjs)$/,
|
|
708
|
-
use: {
|
|
709
|
-
loader: require.resolve("esbuild-loader"),
|
|
710
|
-
options: {
|
|
711
|
-
loader: "jsx",
|
|
712
|
-
target,
|
|
713
|
-
jsx: "automatic"
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
test: /\.m?js/,
|
|
719
|
-
resolve: {
|
|
720
|
-
fullySpecified: false
|
|
721
|
-
}
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
test: /\.css$/i,
|
|
725
|
-
use: [require.resolve("style-loader"), require.resolve("css-loader")]
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
test: /\.(svg|eot|otf|ttf|woff|woff2)$/,
|
|
729
|
-
type: "asset/resource"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.ico$/],
|
|
733
|
-
type: "asset",
|
|
734
|
-
parser: {
|
|
735
|
-
dataUrlCondition: {
|
|
736
|
-
maxSize: 1e3
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
test: /\.(mp4|webm)$/,
|
|
742
|
-
type: "asset",
|
|
743
|
-
parser: {
|
|
744
|
-
dataUrlCondition: {
|
|
745
|
-
maxSize: 1e4
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
]
|
|
750
|
-
},
|
|
751
|
-
plugins: [
|
|
752
|
-
new HtmlWebpackPlugin({
|
|
753
|
-
inject: true,
|
|
754
|
-
template: path.resolve(ctx.runtimeDir, "index.html")
|
|
755
|
-
}),
|
|
756
|
-
new DefinePlugin(
|
|
757
|
-
Object.entries(ctx.env).reduce((acc, [key, value]) => {
|
|
758
|
-
acc[`process.env.${key}`] = JSON.stringify(value);
|
|
759
|
-
return acc;
|
|
760
|
-
}, {})
|
|
761
|
-
),
|
|
762
|
-
ctx.tsconfig && new ForkTsCheckerPlugin({
|
|
763
|
-
typescript: {
|
|
764
|
-
configFile: ctx.tsconfig.path,
|
|
765
|
-
configOverwrite: {
|
|
766
|
-
compilerOptions: {
|
|
767
|
-
sourceMap: ctx.options.sourcemaps
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
})
|
|
772
|
-
].filter(Boolean)
|
|
773
|
-
};
|
|
774
|
-
};
|
|
775
|
-
const resolveDevelopmentConfig = async (ctx) => {
|
|
776
|
-
const baseConfig = await resolveBaseConfig(ctx);
|
|
777
|
-
return {
|
|
778
|
-
...baseConfig,
|
|
779
|
-
cache: {
|
|
780
|
-
type: "filesystem",
|
|
781
|
-
// version cache when there are changes to aliases
|
|
782
|
-
buildDependencies: {
|
|
783
|
-
config: [__filename]
|
|
784
|
-
},
|
|
785
|
-
version: crypto.createHash("md5").update(Object.entries(baseConfig.resolve.alias).join()).digest("hex")
|
|
786
|
-
},
|
|
787
|
-
entry: {
|
|
788
|
-
...baseConfig.entry,
|
|
789
|
-
main: [
|
|
790
|
-
`${require.resolve("webpack-hot-middleware/client")}?path=/__webpack_hmr`,
|
|
791
|
-
...baseConfig.entry.main
|
|
792
|
-
]
|
|
793
|
-
},
|
|
794
|
-
stats: "errors-warnings",
|
|
795
|
-
mode: "development",
|
|
796
|
-
devtool: "inline-source-map",
|
|
797
|
-
output: {
|
|
798
|
-
filename: "[name].js",
|
|
799
|
-
path: ctx.distPath,
|
|
800
|
-
publicPath: ctx.basePath
|
|
801
|
-
},
|
|
802
|
-
infrastructureLogging: {
|
|
803
|
-
level: "error"
|
|
804
|
-
},
|
|
805
|
-
plugins: [
|
|
806
|
-
...baseConfig.plugins,
|
|
807
|
-
new HotModuleReplacementPlugin(),
|
|
808
|
-
new ReactRefreshWebpackPlugin()
|
|
809
|
-
]
|
|
810
|
-
};
|
|
811
|
-
};
|
|
812
|
-
const resolveProductionConfig = async (ctx) => {
|
|
813
|
-
const target = browserslistToEsbuild(ctx.target);
|
|
814
|
-
const baseConfig = await resolveBaseConfig(ctx);
|
|
815
|
-
return {
|
|
816
|
-
...baseConfig,
|
|
817
|
-
stats: "errors-only",
|
|
818
|
-
mode: "production",
|
|
819
|
-
bail: true,
|
|
820
|
-
devtool: ctx.options.sourcemaps ? "source-map" : false,
|
|
821
|
-
output: {
|
|
822
|
-
path: ctx.distPath,
|
|
823
|
-
publicPath: ctx.basePath,
|
|
824
|
-
// Utilize long-term caching by adding content hashes (not compilation hashes)
|
|
825
|
-
// to compiled assets for production
|
|
826
|
-
filename: "[name].[contenthash:8].js",
|
|
827
|
-
chunkFilename: "[name].[contenthash:8].chunk.js"
|
|
828
|
-
},
|
|
829
|
-
optimization: {
|
|
830
|
-
minimize: ctx.options.minify,
|
|
831
|
-
minimizer: [
|
|
832
|
-
new ESBuildMinifyPlugin({
|
|
833
|
-
target,
|
|
834
|
-
css: true
|
|
835
|
-
// Apply minification to CSS assets
|
|
836
|
-
})
|
|
837
|
-
],
|
|
838
|
-
moduleIds: "deterministic",
|
|
839
|
-
runtimeChunk: true
|
|
840
|
-
},
|
|
841
|
-
// @ts-expect-error
|
|
842
|
-
plugins: [
|
|
843
|
-
...baseConfig.plugins,
|
|
844
|
-
new MiniCssExtractPlugin({
|
|
845
|
-
filename: "[name].[chunkhash].css",
|
|
846
|
-
chunkFilename: "[name].[chunkhash].chunkhash.css",
|
|
847
|
-
ignoreOrder: true
|
|
848
|
-
}),
|
|
849
|
-
ctx.options.stats && new BundleAnalyzerPlugin()
|
|
850
|
-
].filter(Boolean)
|
|
851
|
-
};
|
|
852
|
-
};
|
|
853
|
-
const USER_CONFIGS = ["webpack.config.js", "webpack.config.mjs", "webpack.config.ts"];
|
|
854
|
-
const getUserConfig = async (ctx) => {
|
|
855
|
-
for (const file of USER_CONFIGS) {
|
|
856
|
-
const filePath = path.join(ctx.appDir, "src", "admin", file);
|
|
857
|
-
const configFile = await loadFile(filePath);
|
|
858
|
-
if (configFile) {
|
|
859
|
-
return configFile;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
return void 0;
|
|
863
|
-
};
|
|
864
|
-
const mergeConfigWithUserConfig = async (config, ctx) => {
|
|
865
|
-
const userConfig = await getUserConfig(ctx);
|
|
866
|
-
if (userConfig) {
|
|
867
|
-
if (typeof userConfig === "function") {
|
|
868
|
-
const webpack2 = await import("webpack");
|
|
869
|
-
return userConfig(config, webpack2);
|
|
870
|
-
} else {
|
|
871
|
-
ctx.logger.warn(
|
|
872
|
-
`You've exported something other than a function from ${path.join(
|
|
873
|
-
ctx.appDir,
|
|
874
|
-
"src",
|
|
875
|
-
"admin",
|
|
876
|
-
"webpack.config"
|
|
877
|
-
)}, this will ignored.`
|
|
878
|
-
);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
return config;
|
|
882
|
-
};
|
|
883
|
-
const build$1 = async (ctx) => new Promise(async (resolve, reject) => {
|
|
884
|
-
const config = await resolveProductionConfig(ctx);
|
|
885
|
-
const finalConfig = await mergeConfigWithUserConfig(config, ctx);
|
|
886
|
-
ctx.logger.debug("Webpack config", finalConfig);
|
|
887
|
-
webpack(finalConfig, (err, stats) => {
|
|
888
|
-
if (stats) {
|
|
889
|
-
if (stats.hasErrors()) {
|
|
890
|
-
ctx.logger.error(
|
|
891
|
-
stats.toString({
|
|
892
|
-
chunks: false,
|
|
893
|
-
colors: true
|
|
894
|
-
})
|
|
895
|
-
);
|
|
896
|
-
reject(false);
|
|
897
|
-
} else if (ctx.options.stats) {
|
|
898
|
-
ctx.logger.info(
|
|
899
|
-
stats.toString({
|
|
900
|
-
chunks: false,
|
|
901
|
-
colors: true
|
|
902
|
-
})
|
|
903
|
-
);
|
|
904
|
-
}
|
|
905
|
-
resolve(true);
|
|
906
|
-
}
|
|
907
|
-
if (err && isError(err)) {
|
|
908
|
-
ctx.logger.error(err.message);
|
|
909
|
-
reject(false);
|
|
910
|
-
}
|
|
911
|
-
});
|
|
912
|
-
});
|
|
913
|
-
const build = async ({ logger, cwd, tsconfig, ignorePrompts, ...options }) => {
|
|
914
|
-
const timer = getTimer();
|
|
915
|
-
const { didInstall } = await checkRequiredDependencies({ cwd, logger, ignorePrompts }).catch(
|
|
916
|
-
(err) => {
|
|
917
|
-
logger.error(err.message);
|
|
918
|
-
process.exit(1);
|
|
919
|
-
}
|
|
920
|
-
);
|
|
921
|
-
if (didInstall) {
|
|
922
|
-
return;
|
|
923
|
-
}
|
|
924
|
-
if (tsconfig?.config) {
|
|
925
|
-
timer.start("compilingTS");
|
|
926
|
-
const compilingTsSpinner = logger.spinner(`Compiling TS`).start();
|
|
927
|
-
tsUtils.compile(cwd, { configOptions: { ignoreDiagnostics: false } });
|
|
928
|
-
const compilingDuration = timer.end("compilingTS");
|
|
929
|
-
compilingTsSpinner.text = `Compiling TS (${prettyTime(compilingDuration)})`;
|
|
930
|
-
compilingTsSpinner.succeed();
|
|
931
|
-
}
|
|
932
|
-
timer.start("createBuildContext");
|
|
933
|
-
const contextSpinner = logger.spinner(`Building build context`).start();
|
|
934
|
-
console.log("");
|
|
935
|
-
const ctx = await createBuildContext({
|
|
936
|
-
cwd,
|
|
937
|
-
logger,
|
|
938
|
-
tsconfig,
|
|
939
|
-
options
|
|
940
|
-
});
|
|
941
|
-
const contextDuration = timer.end("createBuildContext");
|
|
942
|
-
contextSpinner.text = `Building build context (${prettyTime(contextDuration)})`;
|
|
943
|
-
contextSpinner.succeed();
|
|
944
|
-
timer.start("buildAdmin");
|
|
945
|
-
const buildingSpinner = logger.spinner(`Building admin panel`).start();
|
|
946
|
-
console.log("");
|
|
947
|
-
try {
|
|
948
|
-
EE.init(cwd);
|
|
949
|
-
await writeStaticClientFiles(ctx);
|
|
950
|
-
await build$1(ctx);
|
|
951
|
-
const buildDuration = timer.end("buildAdmin");
|
|
952
|
-
buildingSpinner.text = `Building admin panel (${prettyTime(buildDuration)})`;
|
|
953
|
-
buildingSpinner.succeed();
|
|
954
|
-
} catch (err) {
|
|
955
|
-
buildingSpinner.fail();
|
|
956
|
-
throw err;
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
const watch = async (ctx) => {
|
|
960
|
-
const config = await resolveDevelopmentConfig(ctx);
|
|
961
|
-
const finalConfig = await mergeConfigWithUserConfig(config, ctx);
|
|
962
|
-
ctx.logger.debug("Final webpack config:", os.EOL, finalConfig);
|
|
963
|
-
return new Promise((res) => {
|
|
964
|
-
const compiler = webpack$1(finalConfig);
|
|
965
|
-
const devMiddleware = webpackDevMiddleware(compiler);
|
|
966
|
-
const hotMiddleware = webpackHotMiddleware(compiler, {
|
|
967
|
-
log: false,
|
|
968
|
-
path: "/__webpack_hmr"
|
|
969
|
-
});
|
|
970
|
-
ctx.strapi.server.app.use((ctx2, next) => {
|
|
971
|
-
return new Promise((resolve, reject) => {
|
|
972
|
-
hotMiddleware(ctx2.req, ctx2.res, (err) => {
|
|
973
|
-
if (err)
|
|
974
|
-
reject(err);
|
|
975
|
-
else
|
|
976
|
-
resolve(next());
|
|
977
|
-
});
|
|
978
|
-
});
|
|
979
|
-
});
|
|
980
|
-
ctx.strapi.server.app.use((context, next) => {
|
|
981
|
-
const ready = new Promise((resolve, reject) => {
|
|
982
|
-
devMiddleware.waitUntilValid(() => {
|
|
983
|
-
resolve(true);
|
|
984
|
-
});
|
|
985
|
-
});
|
|
986
|
-
const init = new Promise((resolve) => {
|
|
987
|
-
devMiddleware(
|
|
988
|
-
context.req,
|
|
989
|
-
{
|
|
990
|
-
// @ts-expect-error
|
|
991
|
-
end: (content) => {
|
|
992
|
-
context.body = content;
|
|
993
|
-
resolve(true);
|
|
994
|
-
},
|
|
995
|
-
getHeader: context.get.bind(context),
|
|
996
|
-
// @ts-expect-error
|
|
997
|
-
setHeader: context.set.bind(context),
|
|
998
|
-
locals: context.state
|
|
999
|
-
},
|
|
1000
|
-
() => resolve(next())
|
|
1001
|
-
);
|
|
1002
|
-
});
|
|
1003
|
-
return Promise.all([ready, init]);
|
|
1004
|
-
});
|
|
1005
|
-
const serveAdmin = async (ctx2, next) => {
|
|
1006
|
-
await next();
|
|
1007
|
-
if (devMiddleware.context.outputFileSystem.createReadStream) {
|
|
1008
|
-
if (ctx2.method !== "HEAD" && ctx2.method !== "GET") {
|
|
1009
|
-
return;
|
|
1010
|
-
}
|
|
1011
|
-
if (ctx2.body != null || ctx2.status !== 404) {
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
const filename = path.resolve(finalConfig.output?.path, "index.html");
|
|
1015
|
-
ctx2.type = "html";
|
|
1016
|
-
ctx2.body = devMiddleware.context.outputFileSystem.createReadStream(filename);
|
|
1017
|
-
}
|
|
1018
|
-
};
|
|
1019
|
-
ctx.strapi.server.routes([
|
|
1020
|
-
{
|
|
1021
|
-
method: "GET",
|
|
1022
|
-
path: `${ctx.basePath}:path*`,
|
|
1023
|
-
handler: serveAdmin,
|
|
1024
|
-
config: { auth: false }
|
|
1025
|
-
}
|
|
1026
|
-
]);
|
|
1027
|
-
devMiddleware.waitUntilValid(() => {
|
|
1028
|
-
res({
|
|
1029
|
-
async close() {
|
|
1030
|
-
await Promise.all([
|
|
1031
|
-
promisify(devMiddleware.close.bind(devMiddleware))(),
|
|
1032
|
-
hotMiddleware.close(),
|
|
1033
|
-
promisify(compiler.close.bind(compiler))()
|
|
1034
|
-
]);
|
|
1035
|
-
}
|
|
1036
|
-
});
|
|
1037
|
-
});
|
|
1038
|
-
});
|
|
1039
|
-
};
|
|
1040
|
-
const cleanupDistDirectory = async ({
|
|
1041
|
-
tsconfig,
|
|
1042
|
-
logger,
|
|
1043
|
-
timer
|
|
1044
|
-
}) => {
|
|
1045
|
-
const distDir = tsconfig?.config?.options?.outDir;
|
|
1046
|
-
if (!distDir || // we don't have a dist dir
|
|
1047
|
-
await fs.access(distDir).then(() => false).catch(() => true)) {
|
|
1048
|
-
return;
|
|
1049
|
-
}
|
|
1050
|
-
const timerName = "cleaningDist" + Date.now();
|
|
1051
|
-
timer.start(timerName);
|
|
1052
|
-
const cleaningSpinner = logger.spinner(`Cleaning dist dir ${distDir}`).start();
|
|
1053
|
-
try {
|
|
1054
|
-
const dirContent = await fs.readdir(distDir);
|
|
1055
|
-
const validFilenames = dirContent.filter((filename) => filename !== "build");
|
|
1056
|
-
for (const filename of validFilenames) {
|
|
1057
|
-
await fs.rm(path.resolve(distDir, filename), { recursive: true });
|
|
1058
|
-
}
|
|
1059
|
-
} catch (err) {
|
|
1060
|
-
const generatingDuration2 = timer.end(timerName);
|
|
1061
|
-
cleaningSpinner.text = `Error cleaning dist dir: ${err} (${prettyTime(generatingDuration2)})`;
|
|
1062
|
-
cleaningSpinner?.fail();
|
|
1063
|
-
return;
|
|
1064
|
-
}
|
|
1065
|
-
const generatingDuration = timer.end(timerName);
|
|
1066
|
-
cleaningSpinner.text = `Cleaning dist dir (${prettyTime(generatingDuration)})`;
|
|
1067
|
-
cleaningSpinner?.succeed();
|
|
1068
|
-
};
|
|
1069
|
-
const develop = async ({
|
|
1070
|
-
cwd,
|
|
1071
|
-
polling,
|
|
1072
|
-
logger,
|
|
1073
|
-
tsconfig,
|
|
1074
|
-
ignorePrompts,
|
|
1075
|
-
watchAdmin,
|
|
1076
|
-
...options
|
|
1077
|
-
}) => {
|
|
1078
|
-
const timer = getTimer();
|
|
1079
|
-
if (cluster.isPrimary) {
|
|
1080
|
-
const { didInstall } = await checkRequiredDependencies({ cwd, logger, ignorePrompts }).catch(
|
|
1081
|
-
(err) => {
|
|
1082
|
-
logger.error(err.message);
|
|
1083
|
-
process.exit(1);
|
|
1084
|
-
}
|
|
1085
|
-
);
|
|
1086
|
-
if (didInstall) {
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
|
-
if (tsconfig?.config) {
|
|
1090
|
-
await cleanupDistDirectory({ tsconfig, logger, timer });
|
|
1091
|
-
await tsUtils.compile(cwd, { configOptions: { ignoreDiagnostics: true } });
|
|
1092
|
-
}
|
|
1093
|
-
if (!watchAdmin) {
|
|
1094
|
-
timer.start("createBuildContext");
|
|
1095
|
-
const contextSpinner = logger.spinner(`Building build context`).start();
|
|
1096
|
-
console.log("");
|
|
1097
|
-
const ctx = await createBuildContext({
|
|
1098
|
-
cwd,
|
|
1099
|
-
logger,
|
|
1100
|
-
tsconfig,
|
|
1101
|
-
options
|
|
1102
|
-
});
|
|
1103
|
-
const contextDuration = timer.end("createBuildContext");
|
|
1104
|
-
contextSpinner.text = `Building build context (${prettyTime(contextDuration)})`;
|
|
1105
|
-
contextSpinner.succeed();
|
|
1106
|
-
timer.start("creatingAdmin");
|
|
1107
|
-
const adminSpinner = logger.spinner(`Creating admin`).start();
|
|
1108
|
-
EE.init(cwd);
|
|
1109
|
-
await writeStaticClientFiles(ctx);
|
|
1110
|
-
await build$1(ctx);
|
|
1111
|
-
const adminDuration = timer.end("creatingAdmin");
|
|
1112
|
-
adminSpinner.text = `Creating admin (${prettyTime(adminDuration)})`;
|
|
1113
|
-
adminSpinner.succeed();
|
|
1114
|
-
}
|
|
1115
|
-
cluster.on("message", async (worker, message) => {
|
|
1116
|
-
switch (message) {
|
|
1117
|
-
case "reload": {
|
|
1118
|
-
if (tsconfig?.config) {
|
|
1119
|
-
await cleanupDistDirectory({ tsconfig, logger, timer });
|
|
1120
|
-
await tsUtils.compile(cwd, { configOptions: { ignoreDiagnostics: true } });
|
|
1121
|
-
}
|
|
1122
|
-
logger.debug("cluster has the reload message, sending the worker kill message");
|
|
1123
|
-
worker.send("kill");
|
|
1124
|
-
break;
|
|
1125
|
-
}
|
|
1126
|
-
case "killed": {
|
|
1127
|
-
logger.debug("cluster has the killed message, forking the cluster");
|
|
1128
|
-
cluster.fork();
|
|
1129
|
-
break;
|
|
1130
|
-
}
|
|
1131
|
-
case "stop": {
|
|
1132
|
-
process.exit(1);
|
|
1133
|
-
break;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
});
|
|
1137
|
-
cluster.fork();
|
|
1138
|
-
}
|
|
1139
|
-
if (cluster.isWorker) {
|
|
1140
|
-
timer.start("loadStrapi");
|
|
1141
|
-
const loadStrapiSpinner = logger.spinner(`Loading Strapi`).start();
|
|
1142
|
-
const strapi = strapiFactory({
|
|
1143
|
-
appDir: cwd,
|
|
1144
|
-
distDir: tsconfig?.config.options.outDir ?? "",
|
|
1145
|
-
autoReload: true,
|
|
1146
|
-
serveAdminPanel: !watchAdmin
|
|
1147
|
-
});
|
|
1148
|
-
let webpackWatcher;
|
|
1149
|
-
if (watchAdmin) {
|
|
1150
|
-
timer.start("createBuildContext");
|
|
1151
|
-
const contextSpinner = logger.spinner(`Building build context`).start();
|
|
1152
|
-
console.log("");
|
|
1153
|
-
const ctx = await createBuildContext({
|
|
1154
|
-
cwd,
|
|
1155
|
-
logger,
|
|
1156
|
-
strapi,
|
|
1157
|
-
tsconfig,
|
|
1158
|
-
options
|
|
1159
|
-
});
|
|
1160
|
-
const contextDuration = timer.end("createBuildContext");
|
|
1161
|
-
contextSpinner.text = `Building build context (${prettyTime(contextDuration)})`;
|
|
1162
|
-
contextSpinner.succeed();
|
|
1163
|
-
timer.start("creatingAdmin");
|
|
1164
|
-
const adminSpinner = logger.spinner(`Creating admin`).start();
|
|
1165
|
-
EE.init(cwd);
|
|
1166
|
-
await writeStaticClientFiles(ctx);
|
|
1167
|
-
webpackWatcher = await watch(ctx);
|
|
1168
|
-
const adminDuration = timer.end("creatingAdmin");
|
|
1169
|
-
adminSpinner.text = `Creating admin (${prettyTime(adminDuration)})`;
|
|
1170
|
-
adminSpinner.succeed();
|
|
1171
|
-
}
|
|
1172
|
-
const strapiInstance = await strapi.load();
|
|
1173
|
-
const loadStrapiDuration = timer.end("loadStrapi");
|
|
1174
|
-
loadStrapiSpinner.text = `Loading Strapi (${prettyTime(loadStrapiDuration)})`;
|
|
1175
|
-
loadStrapiSpinner.succeed();
|
|
1176
|
-
timer.start("generatingTS");
|
|
1177
|
-
const generatingTsSpinner = logger.spinner(`Generating types`).start();
|
|
1178
|
-
await tsUtils.generators.generate({
|
|
1179
|
-
strapi: strapiInstance,
|
|
1180
|
-
pwd: cwd,
|
|
1181
|
-
rootDir: void 0,
|
|
1182
|
-
logger: { silent: true, debug: false },
|
|
1183
|
-
artifacts: { contentTypes: true, components: true }
|
|
1184
|
-
});
|
|
1185
|
-
const generatingDuration = timer.end("generatingTS");
|
|
1186
|
-
generatingTsSpinner.text = `Generating types (${prettyTime(generatingDuration)})`;
|
|
1187
|
-
generatingTsSpinner.succeed();
|
|
1188
|
-
if (tsconfig?.config) {
|
|
1189
|
-
timer.start("compilingTS");
|
|
1190
|
-
const compilingTsSpinner = logger.spinner(`Compiling TS`).start();
|
|
1191
|
-
await cleanupDistDirectory({ tsconfig, logger, timer });
|
|
1192
|
-
await tsUtils.compile(cwd, { configOptions: { ignoreDiagnostics: false } });
|
|
1193
|
-
const compilingDuration = timer.end("compilingTS");
|
|
1194
|
-
compilingTsSpinner.text = `Compiling TS (${prettyTime(compilingDuration)})`;
|
|
1195
|
-
compilingTsSpinner.succeed();
|
|
1196
|
-
}
|
|
1197
|
-
const restart = async () => {
|
|
1198
|
-
if (strapiInstance.reload.isWatching && !strapiInstance.reload.isReloading) {
|
|
1199
|
-
strapiInstance.reload.isReloading = true;
|
|
1200
|
-
strapiInstance.reload();
|
|
1201
|
-
}
|
|
1202
|
-
};
|
|
1203
|
-
const watcher = chokidar.watch(cwd, {
|
|
1204
|
-
ignoreInitial: true,
|
|
1205
|
-
usePolling: polling,
|
|
1206
|
-
ignored: [
|
|
1207
|
-
/(^|[/\\])\../,
|
|
1208
|
-
// dot files
|
|
1209
|
-
/tmp/,
|
|
1210
|
-
"**/src/admin/**",
|
|
1211
|
-
"**/src/plugins/**/admin/**",
|
|
1212
|
-
"**/dist/src/plugins/test/admin/**",
|
|
1213
|
-
"**/documentation",
|
|
1214
|
-
"**/documentation/**",
|
|
1215
|
-
"**/node_modules",
|
|
1216
|
-
"**/node_modules/**",
|
|
1217
|
-
"**/plugins.json",
|
|
1218
|
-
"**/build",
|
|
1219
|
-
"**/build/**",
|
|
1220
|
-
"**/index.html",
|
|
1221
|
-
"**/public",
|
|
1222
|
-
"**/public/**",
|
|
1223
|
-
strapiInstance.dirs.static.public,
|
|
1224
|
-
joinBy("/", strapiInstance.dirs.static.public, "**"),
|
|
1225
|
-
"**/*.db*",
|
|
1226
|
-
"**/exports/**",
|
|
1227
|
-
"**/dist/**",
|
|
1228
|
-
"**/*.d.ts",
|
|
1229
|
-
...strapiInstance.config.get("admin.watchIgnoreFiles", [])
|
|
1230
|
-
]
|
|
1231
|
-
}).on("add", (path2) => {
|
|
1232
|
-
strapiInstance.log.info(`File created: ${path2}`);
|
|
1233
|
-
restart();
|
|
1234
|
-
}).on("change", (path2) => {
|
|
1235
|
-
strapiInstance.log.info(`File changed: ${path2}`);
|
|
1236
|
-
restart();
|
|
1237
|
-
}).on("unlink", (path2) => {
|
|
1238
|
-
strapiInstance.log.info(`File deleted: ${path2}`);
|
|
1239
|
-
restart();
|
|
1240
|
-
});
|
|
1241
|
-
process.on("message", async (message) => {
|
|
1242
|
-
switch (message) {
|
|
1243
|
-
case "kill": {
|
|
1244
|
-
logger.debug(
|
|
1245
|
-
"child process has the kill message, destroying the strapi instance and sending the killed process message"
|
|
1246
|
-
);
|
|
1247
|
-
await watcher.close();
|
|
1248
|
-
await strapiInstance.destroy();
|
|
1249
|
-
if (webpackWatcher) {
|
|
1250
|
-
webpackWatcher.close();
|
|
1251
|
-
}
|
|
1252
|
-
process.send?.("killed");
|
|
1253
|
-
break;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
});
|
|
1257
|
-
strapiInstance.start();
|
|
1258
|
-
}
|
|
1259
|
-
};
|
|
1260
|
-
export {
|
|
1261
|
-
build as b,
|
|
1262
|
-
develop as d,
|
|
1263
|
-
handleUnexpectedError as h,
|
|
1264
|
-
index as i
|
|
1265
|
-
};
|
|
1266
|
-
//# sourceMappingURL=index-49b7e6ff.mjs.map
|