intlayer-editor 7.5.8 → 7.5.10
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/client/dist/assets/{CodeBlockShiki-DOHz3hxi.js → CodeBlockShiki-DpCGruCb.js} +3 -3
- package/client/dist/assets/{bundle-web-BeYtMvYb.js → bundle-web-B0b7KTfP.js} +1 -1
- package/client/dist/assets/{index-BfDGXG1A.js → index-ChXpK4Au.js} +568 -490
- package/client/dist/assets/{index-ROdmYOAM.css → index-DxwJ6VyR.css} +123 -4
- package/client/dist/index.html +2 -2
- package/package.json +19 -21
- package/server/dist/controllers/configuration.controller.cjs +3 -5
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.d.ts +2 -2
- package/server/dist/controllers/configuration.controller.mjs +3 -5
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +13 -17
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.d.ts +6 -5
- package/server/dist/controllers/dictionary.controller.mjs +7 -11
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/index.cjs +45 -30
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/index.mjs +38 -25
- package/server/dist/index.mjs.map +1 -1
- package/server/dist/routes/config.routes.cjs +3 -3
- package/server/dist/routes/config.routes.cjs.map +1 -1
- package/server/dist/routes/config.routes.d.ts +2 -2
- package/server/dist/routes/config.routes.mjs +3 -3
- package/server/dist/routes/config.routes.mjs.map +1 -1
- package/server/dist/routes/dictionary.routes.cjs +4 -4
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.d.ts +2 -2
- package/server/dist/routes/dictionary.routes.mjs +4 -4
- package/server/dist/routes/dictionary.routes.mjs.map +1 -1
|
@@ -672,6 +672,10 @@
|
|
|
672
672
|
bottom: calc(var(--spacing) * 2);
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
+
.bottom-4 {
|
|
676
|
+
bottom: calc(var(--spacing) * 4);
|
|
677
|
+
}
|
|
678
|
+
|
|
675
679
|
.bottom-\[calc\(100\%\+0\.5rem\)\] {
|
|
676
680
|
bottom: calc(100% + .5rem);
|
|
677
681
|
}
|
|
@@ -732,6 +736,14 @@
|
|
|
732
736
|
z-index: 20;
|
|
733
737
|
}
|
|
734
738
|
|
|
739
|
+
.z-30 {
|
|
740
|
+
z-index: 30;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.z-40 {
|
|
744
|
+
z-index: 40;
|
|
745
|
+
}
|
|
746
|
+
|
|
735
747
|
.z-50 {
|
|
736
748
|
z-index: 50;
|
|
737
749
|
}
|
|
@@ -864,6 +876,10 @@
|
|
|
864
876
|
margin-inline: calc(var(--spacing) * 6);
|
|
865
877
|
}
|
|
866
878
|
|
|
879
|
+
.mx-8 {
|
|
880
|
+
margin-inline: calc(var(--spacing) * 8);
|
|
881
|
+
}
|
|
882
|
+
|
|
867
883
|
.mx-auto {
|
|
868
884
|
margin-inline: auto;
|
|
869
885
|
}
|
|
@@ -920,6 +936,10 @@
|
|
|
920
936
|
margin-top: calc(var(--spacing) * 16);
|
|
921
937
|
}
|
|
922
938
|
|
|
939
|
+
.mt-\[30\%\] {
|
|
940
|
+
margin-top: 30%;
|
|
941
|
+
}
|
|
942
|
+
|
|
923
943
|
.mr-2 {
|
|
924
944
|
margin-right: calc(var(--spacing) * 2);
|
|
925
945
|
}
|
|
@@ -1128,6 +1148,10 @@
|
|
|
1128
1148
|
height: calc(var(--spacing) * 2);
|
|
1129
1149
|
}
|
|
1130
1150
|
|
|
1151
|
+
.h-2\.5 {
|
|
1152
|
+
height: calc(var(--spacing) * 2.5);
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1131
1155
|
.h-3 {
|
|
1132
1156
|
height: calc(var(--spacing) * 3);
|
|
1133
1157
|
}
|
|
@@ -1228,6 +1252,10 @@
|
|
|
1228
1252
|
max-height: calc(var(--spacing) * 4);
|
|
1229
1253
|
}
|
|
1230
1254
|
|
|
1255
|
+
.max-h-5 {
|
|
1256
|
+
max-height: calc(var(--spacing) * 5);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1231
1259
|
.max-h-24 {
|
|
1232
1260
|
max-height: calc(var(--spacing) * 24);
|
|
1233
1261
|
}
|
|
@@ -1360,14 +1388,14 @@
|
|
|
1360
1388
|
width: calc(var(--spacing) * 60) !important;
|
|
1361
1389
|
}
|
|
1362
1390
|
|
|
1363
|
-
.w-0 {
|
|
1364
|
-
width: calc(var(--spacing) * 0);
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
1391
|
.w-2 {
|
|
1368
1392
|
width: calc(var(--spacing) * 2);
|
|
1369
1393
|
}
|
|
1370
1394
|
|
|
1395
|
+
.w-2\.5 {
|
|
1396
|
+
width: calc(var(--spacing) * 2.5);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1371
1399
|
.w-2\/3 {
|
|
1372
1400
|
width: 66.6667%;
|
|
1373
1401
|
}
|
|
@@ -1488,6 +1516,10 @@
|
|
|
1488
1516
|
max-width: var(--container-4xl);
|
|
1489
1517
|
}
|
|
1490
1518
|
|
|
1519
|
+
.max-w-5 {
|
|
1520
|
+
max-width: calc(var(--spacing) * 5);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1491
1523
|
.max-w-5xl {
|
|
1492
1524
|
max-width: var(--container-5xl);
|
|
1493
1525
|
}
|
|
@@ -1734,6 +1766,13 @@
|
|
|
1734
1766
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
1735
1767
|
}
|
|
1736
1768
|
|
|
1769
|
+
.scale-110 {
|
|
1770
|
+
--tw-scale-x: 110%;
|
|
1771
|
+
--tw-scale-y: 110%;
|
|
1772
|
+
--tw-scale-z: 110%;
|
|
1773
|
+
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1737
1776
|
.scale-120 {
|
|
1738
1777
|
--tw-scale-x: 120%;
|
|
1739
1778
|
--tw-scale-y: 120%;
|
|
@@ -1781,6 +1820,10 @@
|
|
|
1781
1820
|
cursor: ew-resize;
|
|
1782
1821
|
}
|
|
1783
1822
|
|
|
1823
|
+
.cursor-grab {
|
|
1824
|
+
cursor: grab;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1784
1827
|
.cursor-help {
|
|
1785
1828
|
cursor: help;
|
|
1786
1829
|
}
|
|
@@ -2714,6 +2757,16 @@
|
|
|
2714
2757
|
}
|
|
2715
2758
|
}
|
|
2716
2759
|
|
|
2760
|
+
.bg-card\/90 {
|
|
2761
|
+
background-color: #e7e7e7e6;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2765
|
+
.bg-card\/90 {
|
|
2766
|
+
background-color: color-mix(in oklab, var(--color-card) 90%, transparent);
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2717
2770
|
.bg-card\/95 {
|
|
2718
2771
|
background-color: #e7e7e7f2;
|
|
2719
2772
|
}
|
|
@@ -3389,6 +3442,11 @@
|
|
|
3389
3442
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
3390
3443
|
}
|
|
3391
3444
|
|
|
3445
|
+
.mask-\[linear-gradient\(to_right\,transparent_0\,black_128px\,black_calc\(100\%-128px\)\,transparent_100\%\)\] {
|
|
3446
|
+
-webkit-mask-image: linear-gradient(to right, #0000 0, #000 128px calc(100% - 128px), #0000 100%);
|
|
3447
|
+
mask-image: linear-gradient(to right, #0000 0, #000 128px calc(100% - 128px), #0000 100%);
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3392
3450
|
.box-decoration-clone {
|
|
3393
3451
|
-webkit-box-decoration-break: clone;
|
|
3394
3452
|
box-decoration-break: clone;
|
|
@@ -3694,6 +3752,10 @@
|
|
|
3694
3752
|
padding-block: calc(var(--spacing) * 1);
|
|
3695
3753
|
}
|
|
3696
3754
|
|
|
3755
|
+
.py-1\! {
|
|
3756
|
+
padding-block: calc(var(--spacing) * 1) !important;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3697
3759
|
.py-1\.5 {
|
|
3698
3760
|
padding-block: calc(var(--spacing) * 1.5);
|
|
3699
3761
|
}
|
|
@@ -4454,6 +4516,10 @@
|
|
|
4454
4516
|
opacity: .7;
|
|
4455
4517
|
}
|
|
4456
4518
|
|
|
4519
|
+
.opacity-75 {
|
|
4520
|
+
opacity: .75;
|
|
4521
|
+
}
|
|
4522
|
+
|
|
4457
4523
|
.opacity-90 {
|
|
4458
4524
|
opacity: .9;
|
|
4459
4525
|
}
|
|
@@ -4781,6 +4847,11 @@
|
|
|
4781
4847
|
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
4782
4848
|
}
|
|
4783
4849
|
|
|
4850
|
+
.grayscale-80 {
|
|
4851
|
+
--tw-grayscale: grayscale(80%);
|
|
4852
|
+
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
4853
|
+
}
|
|
4854
|
+
|
|
4784
4855
|
.filter {
|
|
4785
4856
|
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
4786
4857
|
}
|
|
@@ -4803,6 +4874,12 @@
|
|
|
4803
4874
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
4804
4875
|
}
|
|
4805
4876
|
|
|
4877
|
+
.transition-\[height\] {
|
|
4878
|
+
transition-property: height;
|
|
4879
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
4880
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
4881
|
+
}
|
|
4882
|
+
|
|
4806
4883
|
.transition-\[left\,width\] {
|
|
4807
4884
|
transition-property: left, width;
|
|
4808
4885
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -4910,6 +4987,10 @@
|
|
|
4910
4987
|
transition-timing-function: var(--ease-in-out);
|
|
4911
4988
|
}
|
|
4912
4989
|
|
|
4990
|
+
.will-change-transform {
|
|
4991
|
+
will-change: transform;
|
|
4992
|
+
}
|
|
4993
|
+
|
|
4913
4994
|
.outline-none {
|
|
4914
4995
|
--tw-outline-style: none;
|
|
4915
4996
|
outline-style: none;
|
|
@@ -5005,6 +5086,11 @@
|
|
|
5005
5086
|
opacity: 1;
|
|
5006
5087
|
}
|
|
5007
5088
|
|
|
5089
|
+
.group-hover\:grayscale-0:is(:where(.group):hover *) {
|
|
5090
|
+
--tw-grayscale: grayscale(0%);
|
|
5091
|
+
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
5092
|
+
}
|
|
5093
|
+
|
|
5008
5094
|
.group-hover\/dropdown\:visible:is(:where(.group\/dropdown):hover *) {
|
|
5009
5095
|
visibility: visible;
|
|
5010
5096
|
}
|
|
@@ -5724,6 +5810,16 @@
|
|
|
5724
5810
|
}
|
|
5725
5811
|
}
|
|
5726
5812
|
|
|
5813
|
+
.hover\:bg-text\/40:hover {
|
|
5814
|
+
background-color: #12121266;
|
|
5815
|
+
}
|
|
5816
|
+
|
|
5817
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
5818
|
+
.hover\:bg-text\/40:hover {
|
|
5819
|
+
background-color: color-mix(in oklab, var(--color-text) 40%, transparent);
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5822
|
+
|
|
5727
5823
|
.hover\:bg-transparent:hover {
|
|
5728
5824
|
background-color: #0000;
|
|
5729
5825
|
}
|
|
@@ -5949,6 +6045,10 @@
|
|
|
5949
6045
|
--tw-ring-color: var(--color-indigo-300);
|
|
5950
6046
|
}
|
|
5951
6047
|
|
|
6048
|
+
.focus\:ring-neutral-400:focus {
|
|
6049
|
+
--tw-ring-color: var(--color-neutral-400);
|
|
6050
|
+
}
|
|
6051
|
+
|
|
5952
6052
|
.focus\:ring-purple-300:focus {
|
|
5953
6053
|
--tw-ring-color: var(--color-purple-300);
|
|
5954
6054
|
}
|
|
@@ -5957,6 +6057,11 @@
|
|
|
5957
6057
|
--tw-ring-color: var(--color-purple-500);
|
|
5958
6058
|
}
|
|
5959
6059
|
|
|
6060
|
+
.focus\:ring-offset-0:focus {
|
|
6061
|
+
--tw-ring-offset-width: 0px;
|
|
6062
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
6063
|
+
}
|
|
6064
|
+
|
|
5960
6065
|
.focus\:ring-offset-1:focus {
|
|
5961
6066
|
--tw-ring-offset-width: 1px;
|
|
5962
6067
|
--tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
@@ -6017,6 +6122,11 @@
|
|
|
6017
6122
|
}
|
|
6018
6123
|
}
|
|
6019
6124
|
|
|
6125
|
+
.focus-visible\:ring-0:focus-visible {
|
|
6126
|
+
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
6127
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6020
6130
|
.focus-visible\:ring-2:focus-visible {
|
|
6021
6131
|
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
6022
6132
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -6046,6 +6156,11 @@
|
|
|
6046
6156
|
--tw-ring-color: var(--color-neutral-200);
|
|
6047
6157
|
}
|
|
6048
6158
|
|
|
6159
|
+
.focus-visible\:ring-offset-0:focus-visible {
|
|
6160
|
+
--tw-ring-offset-width: 0px;
|
|
6161
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
6162
|
+
}
|
|
6163
|
+
|
|
6049
6164
|
.focus-visible\:ring-offset-2:focus-visible {
|
|
6050
6165
|
--tw-ring-offset-width: 2px;
|
|
6051
6166
|
--tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
@@ -6060,6 +6175,10 @@
|
|
|
6060
6175
|
outline-style: none;
|
|
6061
6176
|
}
|
|
6062
6177
|
|
|
6178
|
+
.active\:cursor-grabbing:active {
|
|
6179
|
+
cursor: grabbing;
|
|
6180
|
+
}
|
|
6181
|
+
|
|
6063
6182
|
.active\:border-neutral-400:active {
|
|
6064
6183
|
border-color: var(--color-neutral-400);
|
|
6065
6184
|
}
|
package/client/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-ChXpK4Au.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DxwJ6VyR.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -85,27 +85,25 @@
|
|
|
85
85
|
"typecheck": "tsc --project ./server/tsconfig.types.json --noEmit"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
88
|
+
"@fastify/compress": "^8.0.0",
|
|
89
|
+
"@fastify/cookie": "^10.0.0",
|
|
90
|
+
"@fastify/cors": "^10.0.0",
|
|
91
|
+
"@fastify/formbody": "^8.0.0",
|
|
92
|
+
"@fastify/helmet": "^12.0.0",
|
|
93
|
+
"@fastify/static": "^8.0.0",
|
|
94
|
+
"@intlayer/chokidar": "7.5.10",
|
|
95
|
+
"@intlayer/config": "7.5.10",
|
|
96
|
+
"@intlayer/unmerged-dictionaries-entry": "7.5.10",
|
|
97
|
+
"fastify": "5.6.2",
|
|
98
|
+
"fastify-intlayer": "7.5.10",
|
|
97
99
|
"mime": "4.1.0"
|
|
98
100
|
},
|
|
99
101
|
"devDependencies": {
|
|
100
|
-
"@intlayer/design-system": "7.5.
|
|
101
|
-
"@intlayer/editor-react": "7.5.
|
|
102
|
-
"@intlayer/types": "7.5.
|
|
102
|
+
"@intlayer/design-system": "7.5.10",
|
|
103
|
+
"@intlayer/editor-react": "7.5.10",
|
|
104
|
+
"@intlayer/types": "7.5.10",
|
|
103
105
|
"@tailwindcss/vite": "4.1.18",
|
|
104
106
|
"@tanstack/react-query": "5.90.12",
|
|
105
|
-
"@types/compression": "1.8.1",
|
|
106
|
-
"@types/cookie-parser": "1.4.10",
|
|
107
|
-
"@types/cors": "2.8.19",
|
|
108
|
-
"@types/express": "5.0.6",
|
|
109
107
|
"@types/node": "25.0.3",
|
|
110
108
|
"@types/react": "19.2.7",
|
|
111
109
|
"@types/react-dom": "19.2.3",
|
|
@@ -117,22 +115,22 @@
|
|
|
117
115
|
"framer-motion": "12.23.26",
|
|
118
116
|
"fuse.js": "7.1.0",
|
|
119
117
|
"globals": "16.5.0",
|
|
120
|
-
"intlayer": "7.5.
|
|
118
|
+
"intlayer": "7.5.10",
|
|
121
119
|
"lucide-react": "0.562.0",
|
|
122
120
|
"react": "19.2.3",
|
|
123
121
|
"react-dom": "19.2.3",
|
|
124
|
-
"react-intlayer": "7.5.
|
|
122
|
+
"react-intlayer": "7.5.10",
|
|
125
123
|
"react-router-dom": "7.9.6",
|
|
126
124
|
"tailwind-merge": "3.4.0",
|
|
127
125
|
"tailwindcss": "4.1.18",
|
|
128
126
|
"tsdown": "0.18.2",
|
|
129
127
|
"typescript": "5.9.3",
|
|
130
128
|
"vite": "7.3.0",
|
|
131
|
-
"vite-intlayer": "7.5.
|
|
129
|
+
"vite-intlayer": "7.5.10",
|
|
132
130
|
"vitest": "4.0.16"
|
|
133
131
|
},
|
|
134
132
|
"engines": {
|
|
135
|
-
"node": ">=
|
|
133
|
+
"node": ">=18.0.0"
|
|
136
134
|
},
|
|
137
135
|
"bug": {
|
|
138
136
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
@@ -6,11 +6,10 @@ let _intlayer_config = require("@intlayer/config");
|
|
|
6
6
|
/**
|
|
7
7
|
* Get the Intlayer configuration
|
|
8
8
|
*/
|
|
9
|
-
const getConfiguration = async (_req, res
|
|
9
|
+
const getConfiguration = async (_req, res) => {
|
|
10
10
|
try {
|
|
11
11
|
const formattedResponse = require_utils_responseData.formatResponse({ data: (0, _intlayer_config.getConfiguration)() });
|
|
12
|
-
res.
|
|
13
|
-
return;
|
|
12
|
+
return res.send(formattedResponse);
|
|
14
13
|
} catch (err) {
|
|
15
14
|
const errorMessage = err ?? {
|
|
16
15
|
message: "Internal Server Error",
|
|
@@ -24,8 +23,7 @@ const getConfiguration = async (_req, res, _next) => {
|
|
|
24
23
|
},
|
|
25
24
|
status: errorMessage.status ?? 500
|
|
26
25
|
});
|
|
27
|
-
res.
|
|
28
|
-
return;
|
|
26
|
+
return res.send(formattedErrorResponse);
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type {
|
|
1
|
+
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;AAClB,KAAI;EAGF,MAAM,oBAAoBA,0CAA+B,EACvD,8CAH0C,EAI3C,CAAC;AAEF,SAAO,IAAI,KAAK,kBAAkB;UAC3B,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;GACT;EAED,MAAM,yBAAyBA,0CAA+B;GAC5D,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;IACR;GACD,QAAQ,aAAa,UAAU;GAChC,CAAC;AAEF,SAAO,IAAI,KAAK,uBAAuB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ResponseData } from "../utils/responseData.js";
|
|
2
2
|
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
-
import {
|
|
3
|
+
import { FastifyReply, FastifyRequest } from "fastify";
|
|
4
4
|
|
|
5
5
|
//#region src/controllers/configuration.controller.d.ts
|
|
6
6
|
type GetConfigurationResult = ResponseData<IntlayerConfig>;
|
|
7
7
|
/**
|
|
8
8
|
* Get the Intlayer configuration
|
|
9
9
|
*/
|
|
10
|
-
declare const getConfiguration: (_req:
|
|
10
|
+
declare const getConfiguration: (_req: FastifyRequest, res: FastifyReply) => Promise<void>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { GetConfigurationResult, getConfiguration };
|
|
13
13
|
//# sourceMappingURL=configuration.controller.d.ts.map
|
|
@@ -5,11 +5,10 @@ import { getConfiguration as getConfiguration$1 } from "@intlayer/config";
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the Intlayer configuration
|
|
7
7
|
*/
|
|
8
|
-
const getConfiguration = async (_req, res
|
|
8
|
+
const getConfiguration = async (_req, res) => {
|
|
9
9
|
try {
|
|
10
10
|
const formattedResponse = formatResponse({ data: getConfiguration$1() });
|
|
11
|
-
res.
|
|
12
|
-
return;
|
|
11
|
+
return res.send(formattedResponse);
|
|
13
12
|
} catch (err) {
|
|
14
13
|
const errorMessage = err ?? {
|
|
15
14
|
message: "Internal Server Error",
|
|
@@ -23,8 +22,7 @@ const getConfiguration = async (_req, res, _next) => {
|
|
|
23
22
|
},
|
|
24
23
|
status: errorMessage.status ?? 500
|
|
25
24
|
});
|
|
26
|
-
res.
|
|
27
|
-
return;
|
|
25
|
+
return res.send(formattedErrorResponse);
|
|
28
26
|
}
|
|
29
27
|
};
|
|
30
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.mjs","names":["getApplicationConfiguration"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type {
|
|
1
|
+
{"version":3,"file":"configuration.controller.mjs","names":["getApplicationConfiguration"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;AAClB,KAAI;EAGF,MAAM,oBAAoB,eAA+B,EACvD,MAHaA,oBAA6B,EAI3C,CAAC;AAEF,SAAO,IAAI,KAAK,kBAAkB;UAC3B,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;GACT;EAED,MAAM,yBAAyB,eAA+B;GAC5D,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;IACR;GACD,QAAQ,aAAa,UAAU;GAChC,CAAC;AAEF,SAAO,IAAI,KAAK,uBAAuB"}
|
|
@@ -3,17 +3,16 @@ const require_utils_responseData = require('../utils/responseData.cjs');
|
|
|
3
3
|
let _intlayer_config = require("@intlayer/config");
|
|
4
4
|
let _intlayer_chokidar = require("@intlayer/chokidar");
|
|
5
5
|
let _intlayer_unmerged_dictionaries_entry = require("@intlayer/unmerged-dictionaries-entry");
|
|
6
|
-
let
|
|
6
|
+
let fastify_intlayer = require("fastify-intlayer");
|
|
7
7
|
|
|
8
8
|
//#region src/controllers/dictionary.controller.ts
|
|
9
9
|
/**
|
|
10
10
|
* Get the Intlayer configuration
|
|
11
11
|
*/
|
|
12
|
-
const getDictionaries = async (_req, res
|
|
12
|
+
const getDictionaries = async (_req, res) => {
|
|
13
13
|
try {
|
|
14
14
|
const formattedResponse = require_utils_responseData.formatResponse({ data: (0, _intlayer_unmerged_dictionaries_entry.getUnmergedDictionaries)() });
|
|
15
|
-
res.
|
|
16
|
-
return;
|
|
15
|
+
return res.send(formattedResponse);
|
|
17
16
|
} catch (err) {
|
|
18
17
|
const errorMessage = err ?? {
|
|
19
18
|
message: "Internal Server Error",
|
|
@@ -27,49 +26,48 @@ const getDictionaries = async (_req, res, _next) => {
|
|
|
27
26
|
},
|
|
28
27
|
status: errorMessage.status ?? 500
|
|
29
28
|
});
|
|
30
|
-
res.
|
|
31
|
-
return;
|
|
29
|
+
return res.send(formattedErrorResponse);
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
32
|
/**
|
|
35
33
|
* Adds a new dictionary to the database.
|
|
36
34
|
*/
|
|
37
|
-
const writeContentDeclaration = async (req, res
|
|
35
|
+
const writeContentDeclaration = async (req, res) => {
|
|
38
36
|
try {
|
|
39
37
|
const dictionaryData = req.body.dictionary;
|
|
40
38
|
const result = await (0, _intlayer_chokidar.writeContentDeclaration)(dictionaryData, (0, _intlayer_config.getConfiguration)());
|
|
41
39
|
let description = "";
|
|
42
40
|
switch (result.status) {
|
|
43
41
|
case "created":
|
|
44
|
-
description = (0,
|
|
42
|
+
description = (0, fastify_intlayer.t)({
|
|
45
43
|
en: "Content declaration created successfully",
|
|
46
44
|
fr: "Déclaration de contenu créée avec succès",
|
|
47
45
|
es: "Declaración de contenido creada con éxito"
|
|
48
46
|
});
|
|
49
47
|
break;
|
|
50
48
|
case "updated":
|
|
51
|
-
description = (0,
|
|
49
|
+
description = (0, fastify_intlayer.t)({
|
|
52
50
|
en: "Content declaration updated successfully",
|
|
53
51
|
fr: "Déclaration de contenu mise à jour avec succès",
|
|
54
52
|
es: "Declaración de contenido actualizada con éxito"
|
|
55
53
|
});
|
|
56
54
|
break;
|
|
57
55
|
case "reimported in JSON":
|
|
58
|
-
description = (0,
|
|
56
|
+
description = (0, fastify_intlayer.t)({
|
|
59
57
|
en: "Content declaration reimported in JSON successfully",
|
|
60
58
|
fr: "Déclaration de contenu réimportée en JSON avec succès",
|
|
61
59
|
es: "Declaración de contenido reimportada en JSON con éxito"
|
|
62
60
|
});
|
|
63
61
|
break;
|
|
64
62
|
case "new content file":
|
|
65
|
-
description = (0,
|
|
63
|
+
description = (0, fastify_intlayer.t)({
|
|
66
64
|
en: "Content declaration new content file successfully",
|
|
67
65
|
fr: "Déclaration de contenu réimportée dans un nouveau emplacement avec succès",
|
|
68
66
|
es: "Declaración de contenido reimportada en un nuevo lugar con éxito"
|
|
69
67
|
});
|
|
70
68
|
break;
|
|
71
69
|
default:
|
|
72
|
-
description = (0,
|
|
70
|
+
description = (0, fastify_intlayer.t)({
|
|
73
71
|
en: "Content declaration written successfully",
|
|
74
72
|
fr: "Déclaration de contenu écrite avec succès",
|
|
75
73
|
es: "Declaración de contenido escrita con éxito"
|
|
@@ -78,15 +76,14 @@ const writeContentDeclaration = async (req, res, _next) => {
|
|
|
78
76
|
}
|
|
79
77
|
const formattedResponse = require_utils_responseData.formatResponse({
|
|
80
78
|
data: result,
|
|
81
|
-
message: (0,
|
|
79
|
+
message: (0, fastify_intlayer.t)({
|
|
82
80
|
en: "Content declaration written",
|
|
83
81
|
fr: "Déclaration de contenu écrite",
|
|
84
82
|
es: "Declaración de contenido escrita"
|
|
85
83
|
}),
|
|
86
84
|
description
|
|
87
85
|
});
|
|
88
|
-
res.
|
|
89
|
-
return;
|
|
86
|
+
return res.send(formattedResponse);
|
|
90
87
|
} catch (err) {
|
|
91
88
|
const errorMessage = err ?? {
|
|
92
89
|
message: "Internal Server Error",
|
|
@@ -101,8 +98,7 @@ const writeContentDeclaration = async (req, res, _next) => {
|
|
|
101
98
|
},
|
|
102
99
|
status: errorMessage.status ?? 500
|
|
103
100
|
});
|
|
104
|
-
res.
|
|
105
|
-
return;
|
|
101
|
+
return res.send(formattedErrorResponse);
|
|
106
102
|
}
|
|
107
103
|
};
|
|
108
104
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport type { Dictionary } from '@intlayer/types';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type {
|
|
1
|
+
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar';\nimport { getConfiguration } from '@intlayer/config';\nimport type { Dictionary } from '@intlayer/types';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\nimport { t } from 'fastify-intlayer';\n\ntype GetDictionariesResult = ResponseData<UnmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<UnmergedDictionaries>({\n data: getUnmergedDictionaries(),\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<UnmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: FastifyRequest<{ Body: WriteContentDeclarationBody }>,\n res: FastifyReply\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n let description = '';\n\n switch (result.status) {\n case 'created': {\n description = t({\n en: 'Content declaration created successfully',\n fr: 'Déclaration de contenu créée avec succès',\n es: 'Declaración de contenido creada con éxito',\n });\n break;\n }\n\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description,\n }\n );\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;;;;AAmBA,MAAa,kBAAkB,OAC7B,MACA,QACkB;AAClB,KAAI;EACF,MAAM,oBAAoBA,0CAAqC,EAC7D,0EAA+B,EAChC,CAAC;AAEF,SAAO,IAAI,KAAK,kBAAkB;UAC3B,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;GACT;EAED,MAAM,yBAAyBA,0CAAqC;GAClE,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;IACR;GACD,QAAQ,aAAa,UAAU;GAChC,CAAC;AAEF,SAAO,IAAI,KAAK,uBAAuB;;;;;;AAe3C,MAAa,0BAA0B,OACrC,KACA,QACkB;AAClB,KAAI;EACF,MAAM,iBAAiB,IAAI,KAAK;EAIhC,MAAM,SAAS,sDAAoC,wDAFlB,CAEyC;EAE1E,IAAI,cAAc;AAElB,UAAQ,OAAO,QAAf;GACE,KAAK;AACH,0CAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAAC;AACF;GAGF,KAAK;AACH,0CAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAAC;AACF;GAEF,KAAK;AACH,0CAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAAC;AACF;GAEF,KAAK;AACH,0CAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAAC;AACF;GAEF;AACE,0CAAgB;KACd,IAAI;KACJ,IAAI;KACJ,IAAI;KACL,CAAC;AACF;;EAIJ,MAAM,oBAAoBA,0CACxB;GACE,MAAM;GACN,iCAAW;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;IACL,CAAC;GACF;GACD,CACF;AAED,SAAO,IAAI,KAAK,kBAAkB;UAC3B,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;GACT;AAED,UAAQ,MAAM,aAAa;EAE3B,MAAM,yBACJA,0CAAkD;GAChD,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;IACR;GACD,QAAQ,aAAa,UAAU;GAChC,CAAC;AAEJ,SAAO,IAAI,KAAK,uBAAuB"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ResponseData } from "../utils/responseData.js";
|
|
2
2
|
import { Dictionary } from "@intlayer/types";
|
|
3
|
-
import {
|
|
3
|
+
import { FastifyReply, FastifyRequest } from "fastify";
|
|
4
4
|
import { DictionaryStatus } from "@intlayer/chokidar";
|
|
5
|
-
import { UnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
6
5
|
|
|
7
6
|
//#region src/controllers/dictionary.controller.d.ts
|
|
8
|
-
|
|
7
|
+
|
|
9
8
|
/**
|
|
10
9
|
* Get the Intlayer configuration
|
|
11
10
|
*/
|
|
12
|
-
declare const getDictionaries: (_req:
|
|
11
|
+
declare const getDictionaries: (_req: FastifyRequest, res: FastifyReply) => Promise<void>;
|
|
13
12
|
type WriteContentDeclarationBody = {
|
|
14
13
|
dictionary: Dictionary;
|
|
15
14
|
};
|
|
@@ -21,7 +20,9 @@ type WriteContentDeclarationResult = ResponseData<WriteContentDeclarationResultD
|
|
|
21
20
|
/**
|
|
22
21
|
* Adds a new dictionary to the database.
|
|
23
22
|
*/
|
|
24
|
-
declare const writeContentDeclaration: (req:
|
|
23
|
+
declare const writeContentDeclaration: (req: FastifyRequest<{
|
|
24
|
+
Body: WriteContentDeclarationBody;
|
|
25
|
+
}>, res: FastifyReply) => Promise<void>;
|
|
25
26
|
//#endregion
|
|
26
27
|
export { WriteContentDeclarationBody, WriteContentDeclarationResult, getDictionaries, writeContentDeclaration };
|
|
27
28
|
//# sourceMappingURL=dictionary.controller.d.ts.map
|