Compare commits

..

1393 Commits

Author SHA1 Message Date
elhombretecla
6b724d9572 Add new optimized gifs 2023-04-03 11:22:59 +02:00
elhombretecla
2789ecc22a Add new spacing optimized gif 2023-04-03 11:07:37 +02:00
Alejandro
2eba317797 Merge pull request #3099 from penpot/alotor-bugfixing-15
🐛 Fix problem with opacity in imported SVG's
2023-04-03 09:49:52 +02:00
alonso.torres
5856e3cc03 🐛 Fix problem with opacity in imported SVG's 2023-04-03 09:24:54 +02:00
Alejandro
cc469b116d Merge pull request #3093 from penpot/alotor-bugfixing-14
Alotor bugfixing 14
2023-03-31 13:56:25 +02:00
Andrey Antukh
9fe49b5546 🐛 Fix unexpected responste truncation related to shared links
that contains old data that is not used but can be still present
on the table; we should consider right now to proceed to delete
the row completly
2023-03-31 12:48:24 +02:00
Andrey Antukh
0c89b7cdb1 🐛 Fix some issues on read-only database connection 2023-03-31 12:48:24 +02:00
Andrey Antukh
90d48c1d30 Add the ability to check read-only state of connection
on the db ns helper; previously it only worked with datasource
instances
2023-03-31 12:48:24 +02:00
alonso.torres
2792c22ec9 🐛 Fix problem with overlays positioning 2023-03-31 12:22:16 +02:00
alonso.torres
a838dac01b 🐛 Fix problem when calculating group bounds 2023-03-31 11:20:42 +02:00
Alejandro Alonso
d5bbc7b1aa 🐛 Fix hide grid keyboard shortcut 2023-03-31 09:57:24 +02:00
Alejandro
e1e6816544 Merge pull request #3089 from penpot/alotor-bugfixing-13
Alotor bugfixing 13
2023-03-31 08:49:46 +02:00
alonso.torres
64c0273554 🐛 Fix problem when reorder layers removes show in viewer 2023-03-30 16:30:21 +02:00
alonso.torres
532caea169 🐛 Fix relative position overlay positioning 2023-03-30 16:20:37 +02:00
alonso.torres
0c8d8d92ba 🐛 Fix precision for wrap in flex 2023-03-30 16:20:36 +02:00
Alejandro Alonso
af428ab0ae 🐛 Fix view mode header buttons overlapping in small resolutions 2023-03-30 16:16:24 +02:00
Alejandro Alonso
85b3605c33 🐛 Fix dashboard scrolling using 'Page Up' and 'Page Down' 2023-03-30 16:16:24 +02:00
Alejandro
f1431b7b77 Merge pull request #3086 from penpot/release-info-1.18
Add new onboarding slides 1.18 info
2023-03-30 14:37:38 +02:00
elhombretecla
1ea1d53971 Add new 1.18 info 2023-03-30 14:35:10 +02:00
Alejandro Alonso
8bf01858bb 🐛 Fix alt+P combination while left bar buttons focused 2023-03-29 16:26:34 +02:00
Alejandro Alonso
f05f527336 🐛 Fix allow change team image for editor role users 2023-03-29 16:26:34 +02:00
Alejandro Alonso
fa4c7a1eb7 🐛 Fix last update project timer update after creating new file 2023-03-29 16:26:34 +02:00
Alejandro Alonso
3e6b3bcdc4 🐛 Fix unpublish and delete shared library warning messages 2023-03-29 16:26:34 +02:00
Alejandro
aca242046e Merge pull request #3082 from penpot/alotor-bugfixing-12
🐛 Fix problem with invalid SVG shape
2023-03-29 16:05:57 +02:00
alonso.torres
be27ce4914 🐛 Fix problem with invalid SVG shape 2023-03-29 16:00:07 +02:00
Alejandro
190b77ff95 Merge pull request #3080 from penpot/alotor-bugfixing-11
🐛 Fix problem with SVG and flex layout
2023-03-29 11:47:09 +02:00
alonso.torres
6e78745ed5 🐛 Fix problem with SVG and flex layout 2023-03-29 11:22:26 +02:00
Alejandro
f03def32fd Merge pull request #3078 from penpot/alotor-bugfixing-10
Alotor bugfixing 10
2023-03-29 09:32:18 +02:00
alonso.torres
a98ae69a03 🐛 Disable empty names on rename files 2023-03-29 09:18:22 +02:00
alonso.torres
43fe2390c8 🐛 Fix problem with copy/paste shapes 2023-03-29 09:12:03 +02:00
alonso.torres
d54e152a3d 🐛 Fix problem creating files in project page 2023-03-29 09:12:03 +02:00
alonso.torres
ac23c7bb4a 🐛 Remove "show in view mode" flag when moving frame to frame 2023-03-29 09:12:03 +02:00
alonso.torres
66444e27b1 🐛 Fix problem with selection colors and texts 2023-03-29 09:12:03 +02:00
Alejandro Alonso
92baf75ccd 🐛 Fix import typo 2023-03-29 08:53:10 +02:00
Alejandro Alonso
0714dc34c5 🐛 Fix spelling mistake in confirmation after importing only 1 file 2023-03-28 17:25:44 +02:00
Alejandro Alonso
aa068c70c2 🐛 Fix expanded typography on assets sidebar is moving 2023-03-28 17:25:44 +02:00
Alejandro Alonso
70974efc74 🐛 Fix dashboard left sidebar, the [x] overlaps the field 2023-03-28 17:25:44 +02:00
Alejandro Alonso
acccba6ed4 🐛 Fix invalid files amount after moving on dashboard 2023-03-28 17:25:44 +02:00
Alejandro Alonso
2e549b164f 🐛 Fix internal error on imported svgs 2023-03-28 17:25:44 +02:00
Alejandro Alonso
3df2b80427 🐛 Fix rename option is absent in RMB menu for file 2023-03-28 17:25:44 +02:00
Alejandro Alonso
0ec89e8bbe 🐛 Fix enter emails on onboarding new user creating team 2023-03-28 17:25:44 +02:00
Alejandro Alonso
694497803b 🐛 Fix don't show invite user hero to users with editor role 2023-03-28 17:25:44 +02:00
Alejandro
88db456127 Merge pull request #3075 from penpot/alotor-bugfixes-9
Alotor bugfixes 9
2023-03-28 09:08:45 +02:00
alonso.torres
6832b4a304 🐛 Fix problem with text carring over next line when changing to fixed 2023-03-27 17:06:45 +02:00
alonso.torres
5079582e1f 🐛 Fix problem with round corners scaling 2023-03-27 13:26:24 +02:00
alonso.torres
4313c45870 🐛 Fix sending invitation to existing members 2023-03-27 13:18:52 +02:00
alonso.torres
1f9e7f2ae8 🐛 Fix markdown message 2023-03-27 13:18:52 +02:00
alonso.torres
f7bba745ab 🐛 Changes to the header menu 2023-03-27 13:18:52 +02:00
alonso.torres
391ba77da9 🐛 Fix scaling of texts 2023-03-27 13:18:52 +02:00
alonso.torres
1d7b43ffbc 🐛 Fix problem with outer stroke in texts 2023-03-27 13:18:52 +02:00
alonso.torres
7256759488 🐛 Fix problem with color picker not able to change hue 2023-03-27 13:18:52 +02:00
alonso.torres
f11c782c0f 🐛 Fix problem when copy/pasting shapes 2023-03-27 13:18:52 +02:00
Pablo Alba
26aec7d129 🐛 Fix usiong padding/marging value on updating with shift 2023-03-27 13:18:08 +02:00
Pablo Alba
d61c799846 🐛 Fix padding/gap/margin remain glowing when the shape is deselected and selected again 2023-03-27 13:18:08 +02:00
Pablo Alba
c3c41c5b7d 🐛 Fix rotate board breaks paddings 2023-03-27 13:18:08 +02:00
Pablo Alba
eeb76b1e50 🐛 Fix during scale paddings glow 2023-03-27 13:18:08 +02:00
Pablo Alba
caf462e9b8 🐛 Fix padding prediction does not work with one shape 2023-03-27 13:18:08 +02:00
Pablo Alba
4d70d3b909 🐛 Bad padding gui on nil sizing 2023-03-27 13:18:08 +02:00
Alejandro Alonso
91e81823a5 🐛 Fix deleted files appear in search results 2023-03-24 12:20:00 +01:00
Alejandro Alonso
d0ab0bccb9 🐛 Fix drag and drop files from browser or file explorer under circumstances 2023-03-24 12:20:00 +01:00
Alejandro Alonso
b2b91bfa57 🐛 Fix change email and password for users signed in via social login 2023-03-24 12:20:00 +01:00
Alejandro
fc857aad08 Merge pull request #3068 from penpot/alotor-bugfixes-8
Alotor bugfixes 8
2023-03-24 08:32:38 +01:00
alonso.torres
5874922367 🐛 Fix problem with guides not showing when moving over nested frames 2023-03-23 17:13:04 +01:00
alonso.torres
1657f06a48 🐛 Select children after ungroup action 2023-03-23 16:41:00 +01:00
alonso.torres
2ad9c3cc72 🐛 Forbid empty names for assets 2023-03-23 16:11:23 +01:00
alonso.torres
fae76f6d4e 🐛 Fix problem with geometry of groups 2023-03-23 12:03:25 +01:00
alonso.torres
d0878aa805 🐛 Fix visual problem in select options 2023-03-23 12:03:25 +01:00
alonso.torres
020454e701 🐛 Fix header not showing when exiting fullscreen mode in viewer 2023-03-23 12:03:25 +01:00
alonso.torres
eedb83e863 🐛 Fix problem with text out of borders when changing from auto-width to fixed 2023-03-23 12:03:25 +01:00
alonso.torres
8a6809848e 🐛 Show warning when trying to invite a user that is already in members 2023-03-23 12:03:25 +01:00
Alejandro Alonso
3b2083134e 🐛 Fix multiplayer username sometimes is not displayed correctly 2023-03-23 09:14:58 +01:00
Alejandro Alonso
b5fc074e35 🐛 Fix horizontal margins drag don't always start from place 2023-03-23 09:14:58 +01:00
Alejandro
bc794816db Merge pull request #3066 from penpot/alotor-bugfixes-7
Alotor bugfixes 7
2023-03-22 16:28:19 +01:00
alonso.torres
f1b5ac27a9 🐛 Fix path options not showing when editing rects or ellipses 2023-03-22 14:45:19 +01:00
alonso.torres
ea438d3626 🐛 Add tooltip for text alignment options 2023-03-22 14:25:32 +01:00
alonso.torres
6d93501dc7 🐛 Fix shortcuts for alignment 2023-03-22 14:25:24 +01:00
alonso.torres
09d0a9e3f8 🐛 Fix problem when assigning color from palette or assets 2023-03-22 12:36:40 +01:00
alonso.torres
2fef90e7eb 🐛 Fix problem with selected colors and texts 2023-03-22 11:58:33 +01:00
Alejandro Alonso
c851f60de4 🐛 Fix deleted files appear in search results 2023-03-22 09:47:03 +01:00
Alejandro Alonso
6b4bca50ee bug: Fix manipulate duplicated project 2023-03-22 09:47:03 +01:00
Alejandro Alonso
f05e37590a 🐛 Fix font kerning on export 2023-03-22 09:30:07 +01:00
Alejandro Alonso
fbf06a4de0 Use tabulators to navigate layers 2023-03-22 09:23:06 +01:00
Alejandro
25014a81c3 Merge pull request #3062 from penpot/alotor-bugfixes-6
Bugfixes
2023-03-22 07:29:43 +01:00
alonso.torres
5d77f7e5b1 🐛 Fix linter issues 2023-03-21 17:11:23 +01:00
alonso.torres
131e4f2446 🐛 Fix nested frame interaction created flow in wrong frame 2023-03-21 16:50:59 +01:00
alonso.torres
8ab264af80 🐛 Fix problem in Firefox with scroll jumping when changin pages 2023-03-21 16:43:04 +01:00
Alejandro
b32e0f458c Merge pull request #3050 from penpot/alotor-fixes-layout
Alotor fixes layout
2023-03-17 08:24:30 +01:00
Alejandro
484a50949a Merge pull request #3049 from penpot/alotor-bugfixes-5
Bugfixes
2023-03-17 08:23:39 +01:00
alonso.torres
a118f34b49 🐛 Add version to presence and fixes off-page updates 2023-03-17 08:23:03 +01:00
alonso.torres
120d3005ea 🐛 Fix change layer index when moving absolute positioned shape 2023-03-16 17:39:11 +01:00
alonso.torres
2272977d67 🐛 Fix problem when editing gap/margins in layout 2023-03-16 17:11:46 +01:00
alonso.torres
cbe8587db3 🐛 Fix problem with z positioning of elements 2023-03-16 15:08:49 +01:00
alonso.torres
6a4d505033 🐛 Fix problem with alt getting stuck when alt+tab 2023-03-16 15:08:03 +01:00
alonso.torres
bd44f49175 🐛 Fix problem with board titles misplaced 2023-03-15 15:51:30 +01:00
alonso.torres
acdcf82c6c 🐛 Fix filter in layers z-index 2023-03-15 15:48:45 +01:00
Alejandro
bda2468a86 Merge pull request #3046 from penpot/alotor-bugfixes-4
Alotor bugfixes 4
2023-03-15 09:43:48 +01:00
alonso.torres
2dea2d9d27 🐛 Ignore remote changes in size 2023-03-15 09:28:46 +01:00
alonso.torres
107d607d37 🐛 Fix error with empty curves 2023-03-15 09:28:46 +01:00
alonso.torres
2c6513ac85 🐛 Fix problems with touch devices and Wacom tablets 2023-03-15 09:28:46 +01:00
alonso.torres
5bd4be1950 🐛 No select frames without fill should happen only on ctrl click 2023-03-14 15:42:46 +01:00
alonso.torres
dad88cb42e 🐛 Fix close colorpicker on Firefox when mouse-up is outside the picker 2023-03-14 15:42:45 +01:00
Alejandro
b6e01077ed Merge pull request #3044 from penpot/azazeln28-improve-rotate-matrix
Improve rotate matrix
2023-03-14 13:42:31 +01:00
Aitor
538a05b359 improve rotate matrix 2023-03-14 13:05:52 +01:00
Alejandro
1b3281457e Merge pull request #3042 from penpot/azazeln28-fix-scaling-frame-proportionally
Fix scaling frame proportionally
2023-03-14 12:33:04 +01:00
Alejandro
37b20571d2 Merge pull request #3041 from penpot/azazeln28-improve-scale-matrix
Improve scale matrix
2023-03-14 12:27:32 +01:00
Alejandro
4661fb26dc Merge pull request #3039 from penpot/alotor-fix-text-sync
Fix text sync problems
2023-03-14 12:22:14 +01:00
Aitor
b9559d99da Improve scale matrix computation 2023-03-14 11:24:15 +01:00
alonso.torres
aa4a3ef940 🐛 Fix apply structure modifiers to children 2023-03-14 11:02:11 +01:00
alonso.torres
3a2e1b5c94 Adapt scale to flex elements 2023-03-14 11:02:10 +01:00
Aitor
44c35e6aee 🐛 Fix scaling frame proportionally 2023-03-14 11:01:57 +01:00
alonso.torres
a56dc25fae 🐛 Fix problems with text synchronization 2023-03-13 13:15:36 +01:00
Pablo Alba
4eeef41ed4 🐛 Fix flex layout gaps showing for nested items 2023-03-13 11:52:00 +01:00
Alejandro Alonso
9cd207595f 📎 Prepare new development cycle 2023-03-13 10:37:34 +01:00
Alejandro
c21e0739f2 Merge pull request #3037 from penpot/alotor-bugfixes-3
Bug fixes
2023-03-13 10:34:35 +01:00
alonso.torres
83367dd519 🐛 Fix viewer layers styles 2023-03-13 10:30:12 +01:00
alonso.torres
0d9695de1d 🐛 Fix shortcuts for zoom now take into account the mouse position 2023-03-13 10:30:12 +01:00
alonso.torres
468e61e1e0 🐛 Fix snap pixel when moving path points on high zoom 2023-03-13 10:30:12 +01:00
alonso.torres
481e9b0d32 🐛 Fix unlink library color when blur color picker input 2023-03-13 10:30:12 +01:00
alonso.torres
ce85a1b1d5 🐛 Fix problem with text editor in Safari 2023-03-13 10:22:57 +01:00
Alejandro Alonso
da74d0d732 🐛 Fix viewer wrong translations 2023-03-13 10:21:53 +01:00
Pablo Alba
e6306e5109 Add visualization and mouse control to paddings, margins and gaps in frames with layout 2023-03-10 13:59:50 +01:00
Alejandro
5fae9526d6 Merge pull request #3028 from penpot/alotor-bugfixes-fixes
Fixes after QA revision
2023-03-09 17:39:23 +01:00
alonso.torres
37f52cafc9 🐛 Fix problem with rules when changing pages 2023-03-09 17:28:21 +01:00
alonso.torres
2a632512b3 🐛 Fix select in area of hidden children elements 2023-03-09 16:15:11 +01:00
alonso.torres
079cff0bc0 🐛 Fix problem with undo transactions 2023-03-09 15:53:10 +01:00
Alejandro
7954ad0edf Merge pull request #3025 from penpot/alotor-bugfixes2
Bug fixes
2023-03-09 13:21:32 +01:00
alonso.torres
2500d192e8 🐛 Changed the text dominant-baseline to use ideographic 2023-03-09 10:57:49 +01:00
Pablo Alba
480a72b6e2 🐛 Fix paddings and gaps prediction on create layout 2023-03-09 09:25:10 +01:00
alonso.torres
b2c3dc1504 🐛 Fix problem when loading fonts 2023-03-08 15:22:31 +01:00
alonso.torres
e170011e3c 🐛 Fix problem on selection numeric inputs on Firefox 2023-03-08 15:22:31 +01:00
alonso.torres
f3f611848c 🐛 Improve deeps selection of nested arboards 2023-03-08 15:22:31 +01:00
Alejandro Alonso
c3ce0eb794 Merge remote-tracking branch 'origin/staging' into develop 2023-03-08 07:25:19 +01:00
alonso.torres
1643287775 🐛 Fix problem with area selection 2023-03-07 15:55:39 +01:00
Alejandro Alonso
9e35229ebd 🐛 Fix components texts not displayed in assets panel 2023-03-07 15:22:24 +01:00
alonso.torres
046bd59726 🐛 Fix style for absolute positioning 2023-03-07 14:16:42 +01:00
Alejandro
e8027d3316 Merge pull request #3010 from penpot/niwinz-docker-frontend-2
🐳 Add backend and exporter uri env vars to frontend docker image
2023-03-07 13:08:59 +01:00
Andrey Antukh
ad34ebff89 🐳 Add backend and exporter uri env vars to frontend docker image 2023-03-07 13:08:38 +01:00
Alejandro Alonso
f733497f0f 🐛 Fix some typos on english translation 2023-03-07 10:57:37 +01:00
Alejandro Alonso
ed917fa194 🐛 Fix font translations not detected as markdown 2023-03-07 10:57:37 +01:00
Alejandro Alonso
313df74202 🐛 Fix handle correctly slashes in emails 2023-03-07 10:51:31 +01:00
Alejandro
db7c234053 Merge pull request #3019 from penpot/alotor-bugfixes
Alotor bugfixes
2023-03-07 10:49:57 +01:00
Alejandro Alonso
91c12ca34f 🐛 Fix change colors from selected colors 2023-03-07 10:42:58 +01:00
Alejandro Alonso
9f66e8e5d1 🐛 Fix search field shared styles 2023-03-07 10:37:11 +01:00
alonso.torres
b5be938480 🐛 Improve behavior for undo on text edition 2023-03-07 09:11:51 +01:00
alonso.torres
36583d1171 🐛 Allow selection of empty board by partial rect 2023-03-06 16:27:50 +01:00
alonso.torres
05e13ad05f 🐛 Fix problem when undoing multiple selected colors 2023-03-06 16:27:50 +01:00
alonso.torres
475ce08d3e 🐛 Fix selecting children from hidden parent layers 2023-03-06 16:27:50 +01:00
alonso.torres
6962e15b6d 🐛 Fix error streen when uploading wrong SVG 2023-03-06 16:27:50 +01:00
alonso.torres
7b72906096 🐛 Fix problem on finalize page 2023-03-06 16:27:13 +01:00
Eva Marco
9d43bb4252 Merge pull request #3011 from penpot/alotor-poc-css-modules
 Adds CSS modules to the build pipeline
2023-03-06 15:59:13 +01:00
alonso.torres
7dd24bb79b Merge remote-tracking branch 'origin/staging' into develop 2023-03-06 14:52:43 +01:00
Alejandro
82e402c271 Merge pull request #3012 from penpot/alotor-bug-redo
🐛 Fix problem with redo shortcut
2023-03-06 14:37:28 +01:00
alonso.torres
827ce6c42a 🐛 Fix problem with redo shortcut 2023-03-06 14:23:26 +01:00
alonso.torres
94a98a1866 Adds CSS modules to the build pipeline 2023-03-06 14:20:18 +01:00
Alejandro
0e585cd585 Merge pull request #3002 from penpot/alotor-fixes-rules
🐛 Fix problem with rules position on changing pages
2023-03-06 09:56:50 +01:00
alonso.torres
cd505ecced 🐛 Fix problem with rules position on changing pages 2023-03-03 14:20:53 +01:00
Alejandro
c8360b1994 Merge pull request #2996 from penpot/alotor-grid-layout
Partial merge of the grid layout infrastructure
2023-03-03 11:15:32 +01:00
alonso.torres
a12baf684c Review fixes 2023-03-03 10:53:46 +01:00
Alejandro Alonso
910352280c Merge remote-tracking branch 'origin/staging' into develop 2023-03-03 10:36:29 +01:00
Alejandro Alonso
dec854a012 🐛 Fix full screen not clickable on inspect mode after user entered full screen 2023-03-03 10:31:04 +01:00
Alejandro
03d4e97ad7 Merge pull request #2997 from penpot/alotor-fix-shadow-multi-selection
🐛 Fix problem withs shadows and blur on multiple selection
2023-03-02 16:35:24 +01:00
alonso.torres
e061ba8123 🐛 Fix problem with shadows and blur on multiple selection 2023-03-02 16:32:21 +01:00
alonso.torres
23104b28b6 Edition mode for grid 2023-03-02 14:05:51 +01:00
alonso.torres
b497de0dae UI Integration 2023-03-02 13:56:11 +01:00
Eva
284fc2acbc Add grid cell options 2023-03-02 13:56:11 +01:00
Eva
cc8347a871 Add options to sidebar 2023-03-02 13:56:11 +01:00
alonso.torres
eb425dc4f2 Edit cell panel 2023-03-02 13:56:11 +01:00
alonso.torres
4b7e93ab84 First draft of cell display 2023-03-02 13:56:11 +01:00
alonso.torres
6f99209a62 Grid layout editor interface 2023-03-02 13:51:41 +01:00
alonso.torres
a0cd94cfae Grid layout infrastructure 2023-03-02 13:51:27 +01:00
alonso.torres
2030f987db Performance improvements 2023-03-01 16:38:09 +01:00
Alejandro Alonso
94e87f8a7d Merge remote-tracking branch 'origin/staging' into develop 2023-03-01 16:08:57 +01:00
Alejandro Alonso
9a272f69c7 🐛 Fix height 100% cropped 2023-03-01 14:19:48 +01:00
Alejandro Alonso
fc1f2b2a9f 🐛 Fix some layout tooltips cropped 2023-03-01 14:19:48 +01:00
Alejandro Alonso
89fbe28ed1 🐛 Fix wrap and nowrap spelling issues 2023-03-01 14:19:48 +01:00
Alejandro Alonso
216d101e56 🐛 Fix flex layout min height bigger than board when height is 100% 2023-03-01 14:19:48 +01:00
Aitor
e57262136c Scale content now scales strokes, shadows, blur and corners 2023-03-01 14:11:03 +01:00
Alejandro
0b9bef066b Merge pull request #2989 from penpot/alotor-fix-position-absolute-auto
Fix position absolute auto
2023-03-01 08:38:43 +01:00
alonso.torres
4111cee3d6 🐛 Fix clipping overlay 2023-02-28 15:22:04 +01:00
alonso.torres
0ef5a37e33 🐛 Allow set position when position absolute 2023-02-28 15:22:04 +01:00
alonso.torres
8b5a36a49f 🐛 Fix problem with auto layout an absolute positioning 2023-02-28 15:22:04 +01:00
Eva
c6d1f80af2 🐛 Fix toggle collapse layer icon 2023-02-28 13:09:43 +01:00
Alejandro Alonso
b73b40b23c Merge remote-tracking branch 'origin/staging' into develop 2023-02-28 10:53:09 +01:00
Alejandro Alonso
ccf91a129c 🐛 Fix custom fonts not rendered correctly 2023-02-28 10:43:59 +01:00
Alejandro
1f3f6ce1e9 Merge pull request #2980 from penpot/eva-fix-paste-nested-boards
🐛 Fix copy paste a very nested boards inside itself
2023-02-28 09:51:21 +01:00
Eva
8f2e3d5fe4 🐛 Fix copy paste a very nested boards inside itself 2023-02-28 09:51:12 +01:00
Alejandro
b581752bd5 Merge pull request #2981 from penpot/alotor-small-fixes-flex
🐛 Fix problem when moving absolute positioned element
2023-02-28 09:46:06 +01:00
Alejandro
47481986a1 Merge pull request #2987 from penpot/alotor-fix-layout-from-selected
🐛 Fix problem when creating layout from selection
2023-02-28 09:40:18 +01:00
alonso.torres
9af0e6ca44 🐛 Fix problem when creating layout from selection 2023-02-27 16:43:59 +01:00
Alejandro Alonso
9c419ef114 Merge remote-tracking branch 'origin/staging' into develop 2023-02-27 10:39:11 +01:00
Alejandro Alonso
24fa4f71ad 📎 Update version.txt file 2023-02-27 10:37:39 +01:00
Andrey Antukh
fa21dc4cf9 📎 Fix tests 2023-02-25 10:35:00 +01:00
Andrey Antukh
9b5a321a62 📎 Fix tests 2023-02-25 10:24:41 +01:00
Andrey Antukh
738cf6407c 📎 Fix liner issue 2023-02-25 10:24:22 +01:00
Andrey Antukh
1d21ee7089 Merge remote-tracking branch 'origin/staging' into develop 2023-02-24 18:30:05 +01:00
Alejandro
2460f36bab Merge pull request #2983 from penpot/niwinz-invitations-fixes
Fix issues with invitation user flow
2023-02-24 15:50:40 +01:00
Andrey Antukh
4d627f8993 🐛 Fix incorrect invitation flow 2023-02-24 15:44:29 +01:00
Andrey Antukh
7771467aa0 🐛 Fix missing member-id field on invitation copy-link 2023-02-24 15:41:15 +01:00
Andrey Antukh
01b361fd3c Fix minor issue on contributing.md rendering output 2023-02-24 14:58:56 +01:00
alonso.torres
4d46460f90 🐛 Fix problem when moving absolute positioned element 2023-02-24 14:26:33 +01:00
alonso.torres
e9942e5527 🐛 Fix position absolute showing on first-level flex containers 2023-02-24 13:18:21 +01:00
Alejandro
8aa0e96377 Merge pull request #2979 from penpot/alotor-small-fixes-absolute
🐛 Fix problems with position absolute
2023-02-24 12:05:56 +01:00
alonso.torres
a12fce1c1f Change names for flex items 2023-02-24 11:24:23 +01:00
alonso.torres
e9d50eb10d 🐛 Fix problems with position absolute 2023-02-24 10:57:56 +01:00
Alejandro
0e97182ef0 Merge pull request #2977 from penpot/niwinz-invitations-1
 Add proper audit log for invitations
2023-02-24 10:57:13 +01:00
Andrey Antukh
f0c0e5e43a Add proper audit log for invitations 2023-02-24 10:28:07 +01:00
Alejandro
8c618f95f7 Merge pull request #2976 from penpot/alotor-flex-position-absolute
Flex position absolute & z-index
2023-02-24 07:42:43 +01:00
alonso.torres
d309628e1d Add z-index option to flex items elements 2023-02-24 07:37:37 +01:00
alonso.torres
f3f1dbc2d1 Allow for absolute positioned elements inside layout 2023-02-24 07:37:35 +01:00
alonso.torres
664f73b8a5 🐛 Fix problem when converting an empty frame to layout 2023-02-24 07:37:11 +01:00
Alejandro
94f2681223 Merge pull request #2970 from penpot/palba-layout-padding-display
 Add visualization and mouse control to paddings in frames with layout
2023-02-24 07:32:48 +01:00
Eva
a182ca3ab7 🚑 Fix CI 2023-02-23 11:03:54 +01:00
Ondřej Konečný
be865af1fc ♻️ connect values with variables in CSS and remove unused code
Signed-off-by: Ondřej Konečný <ondrej.konecny@gmail.com>
2023-02-23 10:58:27 +01:00
Prithvi Tharun
c6ad8ee110 Improves tooltip content for Corner and Padding options (#2971)
Improves tooltip content for Corner and Padding options

Closes #2964

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-02-23 10:41:43 +01:00
Pablo Alba
4d90d36225 Add visualization and mouse control to paddings in frames with layout 2023-02-22 17:19:29 +01:00
Alejandro
fd673b39a4 Merge pull request #2959 from penpot/azazeln28-visual-feedback-scale-k
 add visual feedback to scale text
2023-02-22 12:39:19 +01:00
Aitor
1758b34eed add visual feedback to scale text 2023-02-22 12:38:55 +01:00
Alejandro Alonso
16bd5e2ebc Merge remote-tracking branch 'origin/staging' into develop 2023-02-22 11:48:41 +01:00
Alejandro
475b6ff6e0 Merge pull request #2969 from penpot/alotor-fix-redo-curve-tool
🐛 Fix problem with redo curve drawings
2023-02-22 11:25:40 +01:00
alonso.torres
a1f41c80a2 🐛 Fix problem with redo curve drawings 2023-02-22 10:43:51 +01:00
Eva Marco
4297b6fda8 Merge pull request #2968 from penpot/alotor-bug-width-fill
🐛 Fix problem with align center and width 100%
2023-02-21 16:25:08 +01:00
Eva
c892411484 📎 Update changes file 2023-02-21 15:56:23 +01:00
alonso.torres
28dce3cc8b 🐛 Fix problem with align center and width 100% 2023-02-21 15:44:13 +01:00
Aitor
96ce475206 Merge pull request #2952 from penpot/eva-ally-context-3
Add new accessibility functionality to the dashboard
2023-02-20 13:30:42 +01:00
Andrey Antukh
788dc9b3f8 Merge branch 'staging' into develop 2023-02-20 13:29:03 +01:00
Andrey Antukh
3c650ae47e Merge branch 'main' into staging 2023-02-20 13:28:51 +01:00
Andrey Antukh
80af0bb148 Merge branch 'main' into develop 2023-02-20 13:28:01 +01:00
Eva
fcb8b15ef2 Add new accessibility functionalities to dashboard 2023-02-17 15:17:24 +01:00
Alejandro
1806200613 Merge pull request #2947 from penpot/alotor-performance-improvement
 Performance improvement
2023-02-16 09:38:05 +01:00
alonso.torres
ed22e2c6d1 Performance improvement 2023-02-15 15:17:50 +01:00
Alejandro
0487539b23 Merge pull request #2946 from penpot/alotor-bug-new-frame
🐛 Fix problem with new frame inside layout
2023-02-15 13:48:57 +01:00
Alejandro
9e190d9810 Merge pull request #2945 from penpot/palba-layout-predictive-gap2
 Adds paddings and gaps prediction on layout creation
2023-02-15 13:43:01 +01:00
alonso.torres
fd15ff940f 🐛 Fix problem with new frame inside layout 2023-02-15 13:38:03 +01:00
Pablo Alba
85a47e36b5 Adds paddings and gaps prediction on layout creation 2023-02-15 12:42:23 +01:00
Alejandro
ece6193260 Merge pull request #2939 from penpot/palba-fix-undo-duplicate-with-alt
Fix duplicate with alt and undo only undo one step
2023-02-15 12:21:00 +01:00
Pablo Alba
813a188e24 🐛 Fix duplicate with alt and undo only undo one step 2023-02-15 12:20:47 +01:00
Alejandro
0f07def536 Merge pull request #2940 from penpot/alotor-layout-improvements
 Add space-evenly option
2023-02-15 12:08:36 +01:00
alonso.torres
490f5f19f1 Add space-evenly option 2023-02-15 12:08:22 +01:00
Alejandro
b3216000fd Merge pull request #2941 from penpot/alotor-fix-frame-opacity
🐛 Fix problem with opacity in frames
2023-02-15 11:57:10 +01:00
Alejandro
2ef3e4b325 Merge pull request #2944 from penpot/alotor-fix-unhandled-error
🐛 Fix crash when resizing frame
2023-02-15 11:49:17 +01:00
alonso.torres
70edd2c290 🐛 Fix crash when resizing frame 2023-02-15 09:59:28 +01:00
alonso.torres
02543b1a4f 🐛 Fix problem with opacity in frames 2023-02-14 17:54:51 +01:00
Alejandro
4852882c28 Merge pull request #2938 from penpot/alotor-fix-size-auto-center-align
🐛 Fix problem with align center and size auto
2023-02-13 16:58:15 +01:00
Alejandro
094556926e Merge pull request #2932 from penpot/eva-change-onboarding-images
💄 Update onboarding images with new style
2023-02-13 16:54:23 +01:00
alonso.torres
f3c5aed5d0 🐛 Fix problem with align center and size auto 2023-02-13 16:47:28 +01:00
Andrey Antukh
c0eb20d31d 🐛 Add missing require on rpc ns 2023-02-11 00:59:08 +01:00
Andrey Antukh
f23d29deb7 🐛 Fix unexpected exception on logger caused by log4j2 plugin 2023-02-11 00:52:23 +01:00
alonso.torres
cdd268afbc Merge remote-tracking branch 'origin/staging' into develop 2023-02-10 15:06:23 +01:00
Andrey Antukh
1ed3b3cf75 📎 Add missing restart policy to some containers
on default compose file
2023-02-10 14:07:12 +01:00
Eva
1637e82018 💄 Update onboarding images with new style 2023-02-10 13:52:53 +01:00
Andrey Antukh
c467d04d50 🐛 Fix permission issue on docker images 2023-02-10 13:37:33 +01:00
Andrey Antukh
8d19c067e8 🐛 Fix incorrect mountpoint on docker compose 2023-02-10 13:23:22 +01:00
Alejandro
a99fb7ada3 Merge pull request #2922 from penpot/palba-fix-middle-button-drags-guides
🐛 Fix middle button panning can drag guides
2023-02-09 14:27:28 +01:00
Alejandro
2f1d1a6c41 Merge pull request #2921 from penpot/eva-fix-invite-members-btn
🐛 Fix invite members text on modal button
2023-02-09 14:23:40 +01:00
Eva
7f963edf9e 🐛 Fix invite members text on modal button 2023-02-09 13:51:43 +01:00
Eva Marco
9c99d86e08 Merge pull request #2927 from penpot/alotor-fix-auto-size
Fix auto size
2023-02-09 13:51:03 +01:00
Eva
6a5bfdd7fb ❤️ Add thanks for ondrejkonec 2023-02-09 13:36:26 +01:00
Ondřej Konečný
a98ba72c12 added width property to avoid shrinking on icons 2023-02-09 13:33:06 +01:00
Eva Marco
b2b224e5a7 Merge pull request #2923 from ondrejkonec/BUG-fix-icon-resizing-on-small-displays
🐛 Add min-width property to avoid shrinking on icons
2023-02-09 13:17:34 +01:00
alonso.torres
ee42dd8b01 🐛 Fix layout on multiple selection 2023-02-09 11:18:37 +01:00
alonso.torres
da209b7507 🐛 Fix problem with auto sizes 2023-02-09 10:41:18 +01:00
Pablo Alba
d49e1f1641 🐛 Fix middle button panning can drag guides 2023-02-09 08:53:42 +01:00
Ondřej Konečný
4b9d6fc794 added width property to avoid shrinking on icons 2023-02-08 12:16:34 +01:00
Pablo Alba
8e35ad0f7f Merge pull request #2896 from penpot/eva-bugfixing-6
🐛 Fix paste a frame inside itself
2023-02-08 12:16:09 +01:00
Eva
be3a973d09 🐛 Fix paste a frame inside itself 2023-02-08 12:01:11 +01:00
Pablo Alba
c3c6e533e3 Merge pull request #2903 from ondrejkonec/a11y-udpate-change-hover-color-for-zoom-widget-button
 Added darker color for hover button in zoom widget to improve a11y
2023-02-08 11:40:38 +01:00
Pablo Alba
af30df58dc Merge pull request #2902 from glippi/drop-shadow-negative-spread
 Allow negative values for shadow spread
2023-02-08 11:31:23 +01:00
Andrey Antukh
78aea0f24e 🐛 Fix incorrect props cleaning on auditlog 2023-02-08 10:35:57 +01:00
Alejandro
3587362c4a Merge pull request #2909 from penpot/niwinz-refactor-remove-legacy
🔥 Remove legacy code and internal refactor of storage module
2023-02-08 10:34:18 +01:00
Andrey Antukh
06a30316c2 🐛 Fix logging initialization on exporter 2023-02-07 19:10:57 +01:00
Andrey Antukh
8161d3ae09 🐛 Fix incorrect props cleaning on auditlog 2023-02-07 18:38:54 +01:00
Andrey Antukh
ea470068bb ⬆️ Update jdk and postgresql-client on devenv 2023-02-07 18:17:36 +01:00
Andrey Antukh
e3378181ee 📎 Update docker log4j config 2023-02-07 18:17:08 +01:00
Andrey Antukh
9162f0e1fd 🐛 Fix auth flag handling on rpc metadata 2023-02-07 18:16:55 +01:00
Andrey Antukh
69556f19ac Add more logging to OIDC providers 2023-02-07 18:16:55 +01:00
Andrey Antukh
ab3b9cba45 ♻️ Refactor storage and assets related modules
- improve internal error handling
- add more specs and more asserts
2023-02-07 18:16:55 +01:00
Andrey Antukh
4b4f78b4cc Add minor change to srepl module options
Replace unqualified attrs with fully qualified
2023-02-07 18:16:55 +01:00
Andrey Antukh
0c48f76911 Add better spec validation on http module 2023-02-07 18:16:55 +01:00
Andrey Antukh
3cf4a3facc Improve db/pool initialization and reusability 2023-02-07 18:16:55 +01:00
Andrey Antukh
41d34de9e1 🔥 Remove zmq mentions on devenv log4j config 2023-02-07 18:16:55 +01:00
Andrey Antukh
dfdebc35c8 💄 Improve readability on error report templates 2023-02-07 18:16:55 +01:00
Andrey Antukh
bd2745d1fe ♻️ Clean email related namespaces
- Remove legacy and outdated mjml directory
- Rename namespace to a proper name
- Add more specs
2023-02-07 18:16:55 +01:00
Andrey Antukh
64f2d874fe Merge remote-tracking branch 'origin/staging' into develop 2023-02-07 18:16:37 +01:00
Andrey Antukh
6e1ce62aad Merge branch 'staging' 2023-02-07 17:06:42 +01:00
Alejandro
070ea135e5 Merge pull request #2919 from penpot/niwinz-docker-oidc-fixes
🐛 Docker & OIDC fixes
2023-02-07 16:56:22 +01:00
Andrey Antukh
5ae1fe5867 📎 Add nano editor to backend docker image 2023-02-07 16:50:58 +01:00
Andrey Antukh
eef2cba976 🐛 Fix incorrect registration flag handling on frontend
registration flag should not prevent include register on the
router because a registration process can be started from oidc
auth process
2023-02-07 16:50:52 +01:00
Andrey Antukh
1c4dcf1574 Add minor improvements to logging on docker images 2023-02-07 15:06:35 +01:00
Andrey Antukh
220b80799d Add more logging to OIDC providers 2023-02-07 14:49:12 +01:00
Andrey Antukh
58668c11f3 Merge remote-tracking branch 'origin/staging' into develop 2023-02-07 14:46:18 +01:00
elhombretecla
bab1a417df Update README.md 2023-02-07 11:55:32 +01:00
elhombretecla
b16718bfe4 Update README.md 2023-02-07 11:54:48 +01:00
elhombretecla
8f58bb4f2c Update README.md 2023-02-07 11:51:16 +01:00
elhombretecla
9cdb25344b Update README.md 2023-02-07 11:49:45 +01:00
Alejandro Alonso
22b6d4241d 📎 Update version.txt file 2023-02-07 11:47:50 +01:00
elhombretecla
96ce631784 review readme 2023-02-07 11:32:59 +01:00
Alejandro
fa02df7106 Merge pull request #2914 from penpot/alotor-small-fixes
Small fixes
2023-02-07 11:23:54 +01:00
Andrey Antukh
5d6462b2a7 🐛 Fix compatibility issues on docker upgrade path 2023-02-07 11:19:46 +01:00
Alejandro
3464842c1e Merge pull request #2917 from penpot/eva-bugfixing-7
🐛 Fix tooltips on left toolbar
2023-02-07 11:18:43 +01:00
Pablo Alba
d74af6ddc1 Revert "🐛 Fix line-height inconsistent"
This reverts commit 3974a4778a.
2023-02-07 11:18:01 +01:00
Alejandro
8cb33dc19c Merge pull request #2908 from penpot/niwinz-bugfix-oidc-autidiscover
🐛 Fix issue with oidc autodiscover
2023-02-07 11:16:00 +01:00
Eva
4912107fcc 🐛 Fix tooltips on left toolbar 2023-02-07 10:03:18 +01:00
alonso.torres
d5c7a6e547 🐛 Fix problem with auto-width and space-around 2023-02-07 00:17:16 +01:00
Andrey Antukh
f1085aadd1 🐛 Fix compatibility issues on docker upgrade path 2023-02-06 19:21:55 +01:00
alonso.torres
ca5b59f102 🐛 Fix sizing when moving shapes into/out of a layout 2023-02-06 17:50:59 +01:00
alonso.torres
a0898fbabd 🐛 Named redis volume 2023-02-06 17:00:42 +01:00
Andrey Antukh
aaf332ed18 🐛 Fix issue with oidc autodiscover 2023-02-06 14:20:57 +01:00
Christian Clauss
b05ca4bb82 🐛 Fix undefined name RuntimeException on manage.py script
Python defines [`RuntimeError`](https://docs.python.org/3.7/library/exceptions.html#RuntimeError)
but it does not define `RuntimeException` so a `NameError` will be raised when any of these lines
are executed.

% `python3 -c "RuntimeException('This is a test...')"`
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'RuntimeException' is not defined
```

% `flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
```
./backend/scripts/manage.py:22:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:25:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:49:23: F821 undefined name 'RuntimeException'
                raise RuntimeException("unexpected response from PREPL")
                      ^
3     F821 undefined name 'RuntimeException'
3
```
2023-02-05 11:19:41 +01:00
Christian Clauss
b46b23b027 🐛 Fix undefined name RuntimeException on manage.py script
Python defines [`RuntimeError`](https://docs.python.org/3.7/library/exceptions.html#RuntimeError)
but it does not define `RuntimeException` so a `NameError` will be raised when any of these lines
are executed.

% `python3 -c "RuntimeException('This is a test...')"`
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'RuntimeException' is not defined
```

% `flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
```
./backend/scripts/manage.py:22:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:25:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:49:23: F821 undefined name 'RuntimeException'
                raise RuntimeException("unexpected response from PREPL")
                      ^
3     F821 undefined name 'RuntimeException'
3
```
2023-02-05 11:19:28 +01:00
Andrey Antukh
01d463b4aa Merge branch 'cclauss-patch-1' into develop 2023-02-05 11:19:12 +01:00
Christian Clauss
58001f367a 🐛 Fix undefined name RuntimeException on manage.py script
Python defines [`RuntimeError`](https://docs.python.org/3.7/library/exceptions.html#RuntimeError)
but it does not define `RuntimeException` so a `NameError` will be raised when any of these lines
are executed.

% `python3 -c "RuntimeException('This is a test...')"`
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'RuntimeException' is not defined
```

% `flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
```
./backend/scripts/manage.py:22:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:25:15: F821 undefined name 'RuntimeException'
        raise RuntimeException(f"invalid PREPL_URI: {PREPL_URI}")
              ^
./backend/scripts/manage.py:49:23: F821 undefined name 'RuntimeException'
                raise RuntimeException("unexpected response from PREPL")
                      ^
3     F821 undefined name 'RuntimeException'
3
```
2023-02-05 11:18:01 +01:00
Mario Bašić
29c0190b7a 🐛 Add mailcatch to penpot network on docker compose
Without this the backend complains that it cannot connect to the smtp host (when using mailcatcher). The reason is because the mailcatcher is not on the same network as the backend application.
2023-02-05 11:16:34 +01:00
Mario Bašić
f1b09e763e 🐛 Add mailcatch to penpot network on docker compose
Without this the backend complains that it cannot connect to the smtp host (when using mailcatcher). The reason is because the mailcatcher is not on the same network as the backend application.
2023-02-05 11:16:07 +01:00
Andrey Antukh
517210eeb5 Merge branch 'mabasic-patch-1' into develop 2023-02-05 11:15:49 +01:00
Mario Bašić
22034c22c6 🐛 Add mailcatch to penpot network on docker compose
Without this the backend complains that it cannot connect to the smtp host (when using mailcatcher). The reason is because the mailcatcher is not on the same network as the backend application.
2023-02-05 11:15:01 +01:00
Ondřej Konečný
9fae26765a added darker color for hover button in zoom widget to improve a11y 2023-02-03 13:19:21 +01:00
Alejandro
2e5e772392 Merge pull request #2900 from penpot/alotor-fix-space-around-bounds
🐛 Fix problem with space-around
2023-02-02 19:47:41 +01:00
alonso.torres
ecd4bb54c9 🐛 Fix problem with space-around 2023-02-02 19:31:02 +01:00
Alejandro Alonso
3cfc432c23 Merge remote-tracking branch 'origin/staging' 2023-02-02 18:07:20 +01:00
Alejandro Alonso
2ea81c0114 Merge remote-tracking branch 'origin/staging' into develop 2023-02-02 18:06:59 +01:00
Alejandro
a4cef16ef2 Merge pull request #2895 from penpot/niwinz-refactor-logging
♻️ Refactor logging and error reporting
2023-02-02 18:05:47 +01:00
Alejandro
e426425cb5 Merge pull request #2898 from penpot/alotor-fix-safari-thumbnails
🐛 Temporary deactivate thumbnails in Safari
2023-02-02 17:37:25 +01:00
alonso.torres
3a0cc63fa7 🐛 Temporary deactivate thumbnails in Safari 2023-02-02 17:32:12 +01:00
Alejandro
88a8370e8d Merge pull request #2897 from penpot/alotor-pro-fixes
Fixes
2023-02-02 16:08:30 +01:00
alonso.torres
e8972dd802 🐛 Fix problem with thumbnail updating 2023-02-02 15:34:35 +01:00
Andrey Antukh
1325e46192 Improve internal state validation on db module 2023-02-02 14:20:13 +01:00
Andrey Antukh
071ecca875 🐛 Fix internal executor naming issue 2023-02-02 13:38:04 +01:00
Andrey Antukh
d91e6e381e 🔧 Do not compile clj source (allow dynamic instrumentation on runtime) 2023-02-02 13:38:04 +01:00
Andrey Antukh
b54bf2bba4 📎 Add helpers for instrumenting vars 2023-02-02 13:38:04 +01:00
Andrey Antukh
32b8a2c243 ⬆️ Update dependencies on backend and common 2023-02-02 13:38:04 +01:00
Andrey Antukh
bb055a3c84 ♻️ Refactor logging subsystem and error reporting 2023-02-02 13:38:04 +01:00
alonso.torres
3e52bef6d4 🐛 Fix problem with multiple selection of layout items 2023-02-02 13:37:34 +01:00
alonso.torres
7c215dc11b 🐛 Align-items center/end weren't respected when layout was outside bounds 2023-02-02 13:37:34 +01:00
alonso.torres
48c3e3e00b 🐛 Fix problem with Safari canvas behavior 2023-02-02 13:37:34 +01:00
Alejandro
412dcae01a Merge pull request #2894 from penpot/fix-social-urls
🐛 Fix social links broken
2023-02-02 13:20:25 +01:00
Pablo Alba
cc5f245209 🐛 Fix social links broken 2023-02-02 13:13:24 +01:00
Alejandro
dc4aabe263 Merge pull request #2893 from penpot/palba-fix-can-move-shape-with-lens-zoom
🐛 Fix can move shape with lens zoom active
2023-02-02 13:12:34 +01:00
Pablo Alba
708a8ce27b 🐛 Fix can move shape with lens zoom active 2023-02-02 12:59:02 +01:00
Alejandro
7c1d9ce06f Merge pull request #2892 from penpot/alotor-fix-safari-problem
🐛 Fix problem with thumbnails in safari
2023-02-02 11:36:19 +01:00
Aitor
b0cbf09950 Merge pull request #2885 from penpot/eva-bugfixing-5
Some bug fixing
2023-02-02 11:33:25 +01:00
Aitor
f31bc7457f Merge branch 'staging' into eva-bugfixing-5 2023-02-02 11:31:49 +01:00
alonso.torres
e47ce3235e 🐛 Fix problem with thumbnails in safari 2023-02-02 11:31:10 +01:00
Alejandro
fe76e0fab6 Merge pull request #2884 from penpot/alotor-post-release-fixes
Post release fixes
2023-02-02 11:22:53 +01:00
glippi
57a89b733e Allow negative values for shadow spread 2023-02-02 10:56:58 +01:00
Alejandro
297ba10e9d Merge pull request #2886 from penpot/hiru-dashboard-names
🐛 Fix weird numeration creating elements in dashboard
2023-02-02 10:51:26 +01:00
Andrés Moya
dd2321a37b 🐛 Fix weird numeration creating elements in dashboard 2023-02-02 10:19:36 +01:00
Eva
f98630a46b 🐛 Fix invitations input on team management and onboarding modal 2023-02-02 09:37:21 +01:00
Eva
82d6ba790c 🐛 Fix button spacing on delete account modal 2023-02-02 09:37:19 +01:00
Eva
575aec209c 🐛 Fix button spacing on delete acount modal 2023-02-02 09:37:00 +01:00
alonso.torres
00e265695c Change parent/children constraint for problematic configurations 2023-02-02 09:18:53 +01:00
alonso.torres
071ac0366c 🐛 Fix problem with max-size 0 2023-02-02 09:18:53 +01:00
alonso.torres
1a2a90f829 🐛 Fix problems with strange file 2023-02-02 09:18:53 +01:00
alonso.torres
028c084b22 🐛 Add limit to growth fill shapes to the bounds of the layout 2023-02-02 09:18:53 +01:00
alonso.torres
e7e80e99bd 🐛 Fix thumbnail not updating when changing pages 2023-02-02 09:18:53 +01:00
alonso.torres
70fa169d0d 🐛 Fix problem with selection on nested boards 2023-02-02 09:18:53 +01:00
Andrey Antukh
50ee0ad3fd Merge remote-tracking branch 'origin/staging' into develop 2023-02-01 23:25:25 +01:00
Alejandro
6be83fc6d6 Merge pull request #2889 from penpot/palba-fix-commad-z-in-mac
🐛 Fix typing CMD+Z on MacOS turns the cursor into a Zoom cursor
2023-02-01 22:45:26 +01:00
Pablo Alba
1e9ece43d0 🐛 Fix typing CMD+Z on MacOS turns the cursor into a Zoom cursor 2023-02-01 21:56:30 +01:00
Andrés Moya
b7c55b4700 💄 Move all README images to a subfolder 2023-02-01 21:09:17 +01:00
Alejandro
965c0d6fa2 Merge pull request #2888 from penpot/hiru-move-readme-images
💄 Move all README images to a subfolder
2023-02-01 20:40:14 +01:00
Andrés Moya
950d5dcc2f 💄 Move all README images to a subfolder 2023-02-01 19:31:12 +01:00
Andrey Antukh
43d034798c Merge branch 'staging' 2023-02-01 18:06:50 +01:00
Andrey Antukh
86712f977d 🐛 Skip unnecesary mutation events from audit log 2023-02-01 18:06:12 +01:00
Andrey Antukh
6240323704 💄 Add minor cosmetic changes to common.spec ns 2023-02-01 16:39:59 +01:00
Andrey Antukh
d666564112 🐛 Fix loading issue on app.rpc ns 2023-02-01 16:39:59 +01:00
Andrey Antukh
f4d4559cd4 💄 Add cosmetic improvemnts on http client validation 2023-02-01 16:39:59 +01:00
Alejandro Alonso
e9c3b0567b Merge remote-tracking branch 'origin/staging' into develop 2023-02-01 13:24:39 +01:00
Alejandro Alonso
707e6c2a33 Merge remote-tracking branch 'origin/staging' 2023-02-01 13:12:34 +01:00
Alejandro
3dfd87eee1 Merge pull request #2883 from penpot/palba-fix-components-groups-names-in-list-mode
🐛 Fix components groups items show the component name in list mode
2023-02-01 10:41:33 +01:00
Alejandro
037ba19e87 Merge pull request #2882 from penpot/niwinz-webhooks-fix
🐛 Fix incorrect state management on webhooks crud
2023-02-01 10:38:33 +01:00
Pablo Alba
cdbab2c098 🐛 Fix components groups items show the component name in list mode 2023-02-01 10:23:51 +01:00
Andrey Antukh
e8ea61ee78 🐛 Fix incorrect state management on webhooks crud 2023-02-01 10:15:25 +01:00
Andrey Antukh
56cf7064f5 Merge remote-tracking branch 'origin/staging' into develop 2023-01-31 23:04:26 +01:00
Andrey Antukh
7ab91f68af Merge branch 'staging' 2023-01-31 23:02:22 +01:00
Andrey Antukh
91ececa59e 🐛 Fix backend flags on docker compose sample file 2023-01-31 23:01:58 +01:00
Andrey Antukh
8758723200 Merge pull request #2874 from penpot/niwinz-hotfix-1
🐛 Fix docker images issues in the latest release
2023-01-31 23:00:30 +01:00
Alejandro Alonso
8a968dc081 🐛 Fix upload team image 2023-01-31 22:29:05 +01:00
Andrey Antukh
f8cb505196 🐛 Fix arguments handling on docker/images/build.sh script 2023-01-31 19:48:41 +01:00
Andrey Antukh
14e3439cae 🔥 Remove admin mention from compose, still not working correctly 2023-01-31 19:08:38 +01:00
Andrey Antukh
7dd55c7f9d Revert JRE/JLINK changes from Dockerfile.backend file 2023-01-31 18:50:53 +01:00
Alejandro Alonso
e8e3398a74 🐛 Fix default nginx configuration for docker images 2023-01-31 17:42:28 +01:00
Alejandro Alonso
95cad24c18 Merge remote-tracking branch 'origin/staging' 2023-01-31 13:57:30 +01:00
Alejandro
d31138db72 Merge pull request #2868 from penpot/alotor-fix-layout-problems
Fix layout problems
2023-01-31 12:19:20 +01:00
Alejandro Alonso
2c5f35e192 🐛 Fix penpot.app urls 2023-01-31 12:10:06 +01:00
Alejandro Alonso
5a8f8ba349 🐛 Fix create team and invite 2023-01-31 12:09:13 +01:00
alonso.torres
3fe5cd3752 🐛 Fix problem when resizing layout to zero size 2023-01-31 12:07:17 +01:00
alonso.torres
da60911d81 🐛 Create new layouts without clip content 2023-01-31 12:03:23 +01:00
Alejandro Alonso
a905f49721 Merge remote-tracking branch 'origin/staging' into develop 2023-01-31 10:29:41 +01:00
Alejandro
f4f1f80050 Merge pull request #2864 from penpot/alotor-fix-hug-compacting
🐛 Fix problem with size 100% and auto parent
2023-01-31 10:29:06 +01:00
alonso.torres
18445ea5f4 🐛 Fix problem with size 100% and auto parent 2023-01-31 09:40:01 +01:00
Alejandro
2d28e02742 Merge pull request #2865 from penpot/superalex-fix-onboarding-poll
🐛 Fix onboarding poll
2023-01-31 09:30:32 +01:00
Alejandro Alonso
b0b963fb7c 🐛 Fix onboarding poll 2023-01-31 09:24:50 +01:00
Alejandro Alonso
5cfee13956 🐛 Remove beta word 2023-01-30 17:35:18 +01:00
Alejandro Alonso
11db7590eb Merge remote-tracking branch 'origin/staging' into develop 2023-01-30 15:39:17 +01:00
Alejandro
7271e98df3 Merge pull request #2862 from penpot/niwinz-multipart-encodign-bugfix
⬆️ Update yetti to v9.12
2023-01-30 15:38:44 +01:00
Andrey Antukh
f0386ef7b0 ⬆️ Update yetti to v9.12
Fixes encoding bug on multipart uploads
2023-01-30 15:29:53 +01:00
Alejandro
185cabb2fa Merge pull request #2861 from penpot/alotor-regenerate-empty-thumbnails
🐛 Try to refresh thumbnails on empty stored data in back
2023-01-30 14:05:57 +01:00
alonso.torres
3a19223264 🐛 Try to refresh thumbnails on empty stored data in back 2023-01-30 13:45:56 +01:00
Alejandro Alonso
2c38f31aa9 🐛 Fix clean archived auditlog 2023-01-30 13:11:50 +01:00
Andrés Moya
e1d1ecbc24 Merge remote-tracking branch 'origin/staging' into develop 2023-01-30 12:47:20 +01:00
Alejandro
a1dcb11261 Merge pull request #2860 from penpot/palba-fix-paste-texts-typos
🐛 Fix copy paste texts with typography assets linked
2023-01-30 12:32:32 +01:00
Pablo Alba
9f8d86a80e 🐛 Fix copy paste texts with typography assets linked 2023-01-30 12:26:31 +01:00
Alejandro Alonso
c59fc87fc4 🐛 Fix styling info at the libraries modal 2023-01-30 12:22:50 +01:00
Alejandro Alonso
3421e6ef57 🐛 Fix viewer misalignment when expanding code tab 2023-01-30 11:54:18 +01:00
Alejandro Alonso
40349c8ece 🐛 Fix line-height inconsistent 2023-01-30 11:44:20 +01:00
Alejandro
5a53376b01 Merge pull request #2859 from penpot/alotor-fix-code-generator-hangs
🐛 Fix problem with code view hanging
2023-01-30 11:18:55 +01:00
Alejandro
d4dfdaff57 Merge pull request #2854 from penpot/palba-fix-incorrect-state-after-undo-page-creation
🐛 Fix incorrect state after undo page creation
2023-01-30 11:14:17 +01:00
Pablo Alba
c7f87d0f26 🐛 Fix incorrect state after undo page creation 2023-01-30 11:13:59 +01:00
alonso.torres
c7954990f0 🐛 Fix problem with code view hanging 2023-01-30 11:13:05 +01:00
Alejandro
fe118819ce Merge pull request #2858 from penpot/info-release-1.17
Info release 1.17
2023-01-30 10:42:39 +01:00
Alejandro
073ec9ea2b Merge pull request #2856 from penpot/alotor-fix-transform-precision
🐛 Fix problem with transform when a coordinate was very close to …
2023-01-30 09:57:50 +01:00
Alejandro
f85a731969 Merge pull request #2855 from penpot/alotor-migration-fix-frame-id
🐛 Add migration to fix problem with frame-id
2023-01-30 09:39:18 +01:00
Alejandro
a3a88d7a0a Merge pull request #2850 from penpot/alotor-fix-frame-overlay
🐛 Fix frame overlays in workspace
2023-01-30 07:19:08 +01:00
Alejandro
1660dd634e Merge pull request #2857 from penpot/palba-fix-resend-invitation-doesnt-reset-expiration
🐛 Fix resend invitation doesn't reset the expiration date
2023-01-30 06:55:47 +01:00
Pablo Alba
6e698110d6 🐛 Fix resend invitation doesn't reset the expiration date 2023-01-27 16:56:19 +01:00
alonso.torres
951c67a2d5 🐛 Fix problem with transform when a coordinate was very close to zero 2023-01-27 16:09:44 +01:00
Alejandro
50b7337b8c Merge pull request #2852 from penpot/eva-bugfixing-4
Eva bugfixing 4
2023-01-27 15:07:20 +01:00
Eva
15e62ff649 🐛 Remove copy all button in fills and strokes 2023-01-27 14:58:53 +01:00
Eva
e7ddd6055f ♻️ Improve a case 2023-01-27 14:53:32 +01:00
Eva
aa3438f800 ♻️ Improve some functions 2023-01-27 14:53:31 +01:00
Eva
a45380a91c 🐛 Fix typo 2023-01-27 14:53:08 +01:00
alonso.torres
86b68aeca4 🐛 Add migration to fix problem with frame-id 2023-01-27 14:43:55 +01:00
alonso.torres
d69d392362 🐛 Fix duplicate frames 2023-01-27 13:41:20 +01:00
Andrés Moya
506c2b8d7b 🔧 Add script to rename some layout attrs in existing files 2023-01-27 13:11:46 +01:00
Eva
b463ebc17b 🐛 Fix layout spec with proper names 2023-01-27 13:11:46 +01:00
alonso.torres
f90fda2c90 🐛 Fix frame overlays in workspace 2023-01-27 11:26:35 +01:00
Eva Marco
87c5aa71a3 Merge pull request #2847 from penpot/superalex-text-weight-inspect-code
🐛 Fix text weight on inspect code
2023-01-27 10:09:11 +01:00
Alejandro Alonso
4f82f6bde4 🐛 Fix text weight on inspect code 2023-01-27 10:00:54 +01:00
Alejandro
545b3860b4 Merge pull request #2844 from penpot/alotor-fix-transparent-thumbnails
🐛 Fix problem with transparent frame thumbnails
2023-01-27 09:29:26 +01:00
alonso.torres
d4921c8eb9 🐛 Fix problem with transparent frame thumbnails 2023-01-27 09:27:18 +01:00
Alejandro Alonso
18652d0b6f 🐛 Fix outline corner radius 2023-01-27 09:26:10 +01:00
Alejandro Alonso
2dbeda1d8f 🐛 Fix outline corner radius 2023-01-27 09:14:11 +01:00
elhombretecla
9422d1e9e2 Fix wording 2023-01-27 07:45:31 +01:00
Alejandro
e0441bc16a Merge pull request #2845 from penpot/palba-text-shortcuts-multi-layer
 Apply text format shortcuts to several layers
2023-01-27 07:03:11 +01:00
Pablo Alba
d7d6166232 Apply text format shortcuts to several layers (even inside groups) 2023-01-26 18:46:16 +01:00
Alejandro
6fd6205634 Merge pull request #2841 from penpot/alotor-polishing-11
Polishing
2023-01-26 16:27:05 +01:00
Eva
7cd6f5ba70 🐛 User icons are not centered 2023-01-26 15:56:21 +01:00
Eva
9cc3cceb06 💄 Change layout flex by flex layout text 2023-01-26 15:56:21 +01:00
Eva
6f6bcd2f7e 💄 Improve warning message css in fonts 2023-01-26 15:56:21 +01:00
Alejandro Alonso
f9f3b3951f 🐛 Fix external borders not considered for thumbnails 2023-01-26 15:43:11 +01:00
Andrés Moya
22ded62000 🐛 Fix paths not flagged as modified when resized 2023-01-26 15:29:20 +01:00
Alejandro Alonso
71d104f768 🐛 Fix fills and strokes on inspect code 2023-01-26 15:18:26 +01:00
alonso.torres
5a36cbceb7 Enter to select children allow for multiselection 2023-01-26 14:27:14 +01:00
Pablo Alba
f2033c46f3 🐛 Fix ctrl+z shows zoom icon 2023-01-26 14:07:21 +01:00
alonso.torres
6b225a10b5 🐛 Fix problem with align and flex layout 2023-01-26 13:44:40 +01:00
alonso.torres
38fe6e856a 🐛 Fix problems with content between/around and auto-width 2023-01-26 12:55:40 +01:00
alonso.torres
1984109436 🐛 Fix problem with change frame groups 2023-01-26 12:55:40 +01:00
alonso.torres
9f9d9277a6 🐛 Fix problem with space-around and auto-width/height 2023-01-26 12:55:40 +01:00
alonso.torres
e041f93680 🐛 Fix space-between preserves gap distances 2023-01-26 12:55:40 +01:00
alonso.torres
2d779a4414 🐛 Fix problem with empty text rendering 2023-01-26 12:55:40 +01:00
Alejandro
21fc9289a6 Merge pull request #2835 from penpot/palba-fix-multiplayer-shadow
🐛 Fix multiuser - "Shadow" element is not updating immediately
2023-01-26 07:33:47 +01:00
Pablo Alba
b40ea3fb2a 🐛 Fix multiuser - "Shadow" element is not updating immediately 2023-01-25 17:48:40 +01:00
Pablo Alba
444e9a3081 Merge pull request #2833 from penpot/hiru-fix-unwanted-popup
🐛 Fix unneeded popup when updating local components
2023-01-25 16:51:29 +01:00
Andrés Moya
f93d305545 🐛 Fix unneeded popup when updating local components 2023-01-25 16:50:41 +01:00
Pablo Alba
09a91c87be Merge pull request #2834 from penpot/superalex-fix-ctrl-c-in-inspect-code
🐛 Fix ctrl+c on inspect code
2023-01-25 16:23:38 +01:00
Alejandro Alonso
e71d569cda 🐛 Fix ctrl+c on inspect code 2023-01-25 16:11:58 +01:00
alonso.torres
a56a9868dc 🐛 Fix error on thumbnail generation 2023-01-25 13:20:06 +01:00
Pablo Alba
a09198b46e 🐛 Fix wrong pop on setup shortcuts 2023-01-25 13:05:03 +01:00
Alejandro
c7e9c658cd Merge pull request #2827 from penpot/eva-flex-bugfixing-2
🐛 Fix missing flex props on code generation
2023-01-25 11:46:34 +01:00
Alejandro
58d7bc5c14 Merge pull request #2831 from penpot/azazeln28-fix-viewer-all-mouse-wheel-issues
Fix all viewer mouse wheel issues
2023-01-25 11:38:31 +01:00
Alejandro
e939db927e Merge pull request #2825 from penpot/palba-text-formatting-shortcuts
🎉 Shortcuts for text formatting
2023-01-25 11:33:17 +01:00
Pablo Alba
efe50479de 🎉 Shortcuts for text formatting 2023-01-25 11:32:59 +01:00
Eva
ea1b3bd058 🐛 Fix missing flex props on code generation 2023-01-25 08:19:33 +01:00
Aitor
4751d7d385 🐛 Fix all viewer mouse wheel issues 2023-01-24 17:44:15 +01:00
Hosted Weblate
bc88e30efa Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/
2023-01-24 16:17:30 +01:00
Andrés Moya
9623dbfbd6 📚 Validate translations 2023-01-24 16:17:30 +01:00
Andrés Moya
f177de6661 Merge remote-tracking branch 'weblate/develop' into translations 2023-01-24 16:17:30 +01:00
Alejandro
43043e2dc1 Merge pull request #2830 from penpot/alotor-polishing-10
Small bugfixes
2023-01-24 15:53:16 +01:00
Hosted Weblate
4a46cf2ab7 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/
2023-01-24 15:44:15 +01:00
Andrés Moya
30725af367 📚 Validate translations 2023-01-24 15:42:34 +01:00
Andrés Moya
ece324a76f Merge remote-tracking branch 'weblate/develop' into translations 2023-01-24 15:39:47 +01:00
alonso.torres
05d21d7d07 🐛 Fix reorder layers with keys not refreshing layout 2023-01-24 15:30:20 +01:00
Amerey.eu
2ea69a84b2 🌐 Add translations for: Czech.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/cs/
2023-01-24 15:27:43 +01:00
Mikel Larreategi
f2f0d292e0 🌐 Add translations for: Basque.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/eu/
2023-01-24 15:27:40 +01:00
Ahmad HosseinBor
fc0fad29d0 🌐 Add translations for: Persian.
Currently translated at 59.9% (728 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2023-01-24 15:27:40 +01:00
Linerly
9a954ab430 🌐 Add translations for: Indonesian.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2023-01-24 15:27:39 +01:00
Vin
90caaaa14a 🌐 Add translations for: Russian.
Currently translated at 68.3% (831 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2023-01-24 15:27:36 +01:00
GradelerM
98360ed9e8 🌐 Add translations for: French.
Currently translated at 93.1% (1132 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2023-01-24 15:27:35 +01:00
Rubén
f64a74e7b9 🌐 Add translations for: Catalan.
Currently translated at 95.8% (1164 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2023-01-24 15:27:35 +01:00
alonso.torres
02aab37ee7 🐛 Fix bold typefaces in thumbnails 2023-01-24 15:08:58 +01:00
elhombretecla
d3aee1afa3 Add new images 2023-01-24 15:01:18 +01:00
elhombretecla
ac361cdb36 Adds new 1.17 onboarding info 2023-01-24 14:53:12 +01:00
Aitor
7ac6f49c08 Merge pull request #2808 from penpot/superalex-fix-font-vertical-metrics
🐛 Fix font vertical metrics
2023-01-24 14:26:14 +01:00
Alejandro Alonso
d3e11433bf 🐛 Fix font vertical metrics 2023-01-24 14:21:16 +01:00
Pablo Alba
771d1d9194 🐛 Fix double click and lens zoom 2023-01-24 14:19:14 +01:00
Alejandro
4a3a53182b Merge pull request #2797 from penpot/palba-lens-tool
🎉 Zoom lense tool
2023-01-24 13:34:23 +01:00
Pablo Alba
c25cf043fa 🎉 Zoom lense tool 2023-01-24 13:34:04 +01:00
elhombretecla
7440d38c94 Add new login image 2023-01-24 13:19:16 +01:00
Alejandro
a8c0d437ce Merge pull request #2828 from penpot/superalex-update-changes
 Update changes
2023-01-24 12:55:35 +01:00
Alejandro
8d683beae4 Merge pull request #2829 from penpot/fix-safari-thumbnails
🐛 Fix thumbnails for Safari browsers
2023-01-24 12:36:15 +01:00
Alejandro Alonso
4007d8713c Update changes 2023-01-24 12:26:17 +01:00
alonso.torres
ead64a1820 🐛 Fix thumbnails for Safari browsers 2023-01-24 11:56:59 +01:00
Alejandro Alonso
aae78055c8 Merge remote-tracking branch 'origin/staging' into develop 2023-01-24 10:00:51 +01:00
Alejandro
88e2a5c56e Merge pull request #2826 from penpot/alotor-thumbnails-performance
Thumbnails performance
2023-01-24 09:59:20 +01:00
alonso.torres
9782d9077f Improved and fixed thumbnail generation 2023-01-24 09:44:56 +01:00
Alejandro
b4c4511d9d Merge pull request #2823 from penpot/alotor-polishing-9
Improved thumbnails behavior
2023-01-23 17:18:53 +01:00
alonso.torres
316b3d4539 🐛 Try to remove cases when the thumbnail could be empty 2023-01-23 14:07:51 +01:00
alonso.torres
1c54e9fa4d Allow debug in for release build 2023-01-23 14:03:28 +01:00
alonso.torres
3d064b804b Improve performance on multiple options 2023-01-23 14:03:02 +01:00
Alejandro Alonso
6b25bf6c4f Merge remote-tracking branch 'origin/staging' into develop 2023-01-23 11:06:05 +01:00
alonso.torres
088a8af345 🐛 Fix problem with empty styles 2023-01-23 11:05:28 +01:00
Alejandro
125e6238d1 Merge pull request #2821 from penpot/niwinz-dev-bugfixes
🐛 Bugfixes + unit tests
2023-01-23 10:35:55 +01:00
Andrés Moya
77cd645e25 🔧 Update docker-compose without needing config file 2023-01-23 10:34:00 +01:00
Andrey Antukh
504f75a1cf 🐛 Fix health check http endpoint 2023-01-23 09:59:55 +01:00
Andrey Antukh
fa17ce5d40 📎 Avoid email index change on profile indexes migration 2023-01-23 09:56:21 +01:00
Andrey Antukh
14f39b8028 🎉 Add unit tests for access tokens rpc methods 2023-01-23 09:56:21 +01:00
Andrey Antukh
7e9a5c4a8f Merge remote-tracking branch 'origin/staging' into develop 2023-01-23 09:55:50 +01:00
Alejandro
8ee7915c1d Merge pull request #2820 from penpot/eva-typos
🐛 Fix some typos on translation
2023-01-23 09:54:24 +01:00
Eva
ea8755ce24 🐛 Fix some typos on translation 2023-01-23 09:41:16 +01:00
Prithvi Tharun
381aae735d Improves empty state content
Reads in neutral content without alarming the users

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-23 09:38:52 +01:00
Prithvi Tharun
a4826eddcd Improves empty state content
Better instructions explaining multiple ways people can add files to library. Also, reads in neutral tone withour blaming and alarming the users

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-23 09:38:52 +01:00
Prithvi Tharun
31e2fff4d4 Improves tooltip
X and Y position tooltips updated to communicate more info

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-23 09:38:52 +01:00
Alejandro
021c714867 Merge pull request #2817 from penpot/niwinz-docker-and-admin
 Improvements on PREPL
2023-01-23 09:12:06 +01:00
Andrey Antukh
231ac00934 🎉 Add manage.py script for docker images 2023-01-20 17:14:32 +01:00
Andrey Antukh
578ff944a6 📎 Use name instead of pr-str of error type 2023-01-20 16:52:58 +01:00
Andrey Antukh
bf8a514871 Add more flexible prepl api for external tools 2023-01-20 16:52:58 +01:00
Andrey Antukh
8d60b3fc3e 🐛 Add missing hint on duplicate profile exception 2023-01-20 16:52:58 +01:00
Andrey Antukh
8468e7af24 🎉 Add admin example service to default docker compose file 2023-01-20 16:52:58 +01:00
Alejandro Alonso
b8043a9755 Merge remote-tracking branch 'origin/staging' into develop 2023-01-20 15:52:04 +01:00
Alejandro
50eee3f597 Merge pull request #2816 from penpot/eva-bugfix-2
Eva polishing
2023-01-20 15:50:59 +01:00
Eva Marco
b9b3fcdb6a Merge pull request #2813 from penpot/superalex-fix-svg-import
🐛 Fix svg import
2023-01-20 14:36:59 +01:00
Eva
f0d74ab63e 🐛 Fix hsla information in viewer 2023-01-20 14:30:17 +01:00
Alejandro
dad5d953ce Merge pull request #2814 from penpot/alotor-polishing-8
Fix some mask issues
2023-01-20 14:04:45 +01:00
Alejandro Alonso
da517f2d35 Merge remote-tracking branch 'origin/staging' into develop 2023-01-20 13:58:08 +01:00
Alejandro
f6058aa71e Merge pull request #2815 from penpot/alotor-debug-names
 Add debug tool to display name and id for shapes
2023-01-20 13:57:18 +01:00
alonso.torres
85d56e6057 Add debug tool to display name and id for shapes 2023-01-20 13:47:40 +01:00
Eva
c353d3703b Add some accessibility on shortcuts panel 2023-01-20 12:39:07 +01:00
Andrés Moya
9367788898 Small improvement 2023-01-20 12:04:47 +01:00
Andrés Moya
2b978777d7 🐛 Fix import/export components with boards inside 2023-01-20 12:04:47 +01:00
Eva
2a30c23334 🐛 Fix hidden shapes inside hidden group 2023-01-20 11:15:14 +01:00
Alejandro Alonso
2f188e7fb4 🐛 Fix regression with library svgs 2023-01-20 11:01:22 +01:00
alonso.torres
0743b07667 🐛 Fix problem with mask disappearing in root frame 2023-01-20 10:56:55 +01:00
alonso.torres
f38197b227 Remove restriction to move mask layers 2023-01-20 10:56:55 +01:00
alonso.torres
bc9be7846a 🐛 Fix problem with empty mask on layout 2023-01-20 10:56:55 +01:00
Andrey Antukh
62aa6569f2 Merge remote-tracking branch 'origin/staging' into develop 2023-01-20 09:59:56 +01:00
Alejandro
42e97f8be1 Merge pull request #2793 from penpot/niwinz-access-tokens
🎉 ♻️ Refactor & Access Tokens (part 1)
2023-01-20 09:36:47 +01:00
Eva Marco
28114b166c Merge pull request #2812 from penpot/hiru-avoid-bad-nested-component
Avoid creating component with shapes that belong to other one
2023-01-20 09:22:25 +01:00
Alejandro Alonso
be74cd2c7b 🐛 Fix import svgs with currentColor as stroke fill 2023-01-20 09:17:04 +01:00
Eva Marco
b329de6487 Merge pull request #2807 from penpot/hiru-fix-layout-sync
Fix layout attributes sync in components
2023-01-20 09:06:36 +01:00
Alejandro Alonso
9c66998530 🐛 Fix svg import 2023-01-20 07:35:21 +01:00
Eva
8b377ac556 💄 Add entry on changes 2023-01-19 19:33:00 +01:00
Andrés Moya
8c6f07ab65 🐛 Fix right sidebar component options menu 2023-01-19 16:54:30 +01:00
Andrés Moya
dc89610d07 🐛 Avoid creating component with shapes that belong to other one 2023-01-19 16:40:27 +01:00
Eva
40195a4f52 🐛 Fix index on layout created over group 2023-01-19 16:16:22 +01:00
Eva
6a257503ae 🐛 Fix create layout over mask destroy mask 2023-01-19 16:16:22 +01:00
Eva Marco
a3e583d745 Merge pull request #2809 from penpot/hiru-fix-asset-with-board
🐛 Fix display of components with frame root in assets panel
2023-01-19 15:47:52 +01:00
alonso.torres
685a071e87 🐛 Fix rounding error with matrices 2023-01-19 15:47:25 +01:00
Andrey Antukh
73658c47f3 🐛 Fix issues on rlimit module 2023-01-19 15:41:12 +01:00
Andrey Antukh
d98fd76032 🎉 Add namespace with a set of helpers for access throught the BREPL 2023-01-19 15:41:12 +01:00
Andrey Antukh
2fef3dc881 🎉 Add prepl support
And rename the current repl to urepl (user-repl).
2023-01-19 15:41:12 +01:00
Eva Marco
a1a0444cc7 Merge pull request #2806 from penpot/alotor-polishing-7
Changes to paths and fixed reorder
2023-01-19 14:42:51 +01:00
Andrés Moya
792c17fe46 🐛 Fix display of components with frame root in assets panel 2023-01-19 14:18:55 +01:00
Andrés Moya
77d71abb5d 🐛 Sync correctly all layout attributes 2023-01-19 13:44:28 +01:00
alonso.torres
75d6e21af8 Show tools on path creation. Change snap while drawing 2023-01-19 13:39:21 +01:00
alonso.torres
0632111e96 🐛 Fix reorder layers with keys 2023-01-19 13:39:21 +01:00
Eva Marco
fe77ef4438 Merge pull request #2802 from penpot/alotor-polishing-6
Polishing after confluence test
2023-01-19 12:55:59 +01:00
Andrey Antukh
9a407ab714 🎉 Add namespace with a set of helpers for access throught the BREPL 2023-01-19 12:42:39 +01:00
alonso.torres
e7ac7ff7fb 🐛 Fix problem with disappearing titles 2023-01-19 11:51:53 +01:00
alonso.torres
d78ad30e23 Enter on containers selects children 2023-01-19 11:51:53 +01:00
alonso.torres
4b5caf5fb9 Shift+move ignores snap-pixel on the axis moving 2023-01-19 11:51:53 +01:00
alonso.torres
4e1eb2d6e9 🐛 Fix problem when flipping a mask 2023-01-19 11:51:53 +01:00
alonso.torres
ab7683f1e3 Improved text layout handling 2023-01-19 11:51:53 +01:00
alonso.torres
89371e10d1 🐛 Fix problem moving shapes inside a group inside a layout 2023-01-19 11:51:53 +01:00
alonso.torres
9fd6c65d93 🐛 Fix problem with empty paths 2023-01-19 11:51:53 +01:00
Eva
1f9c89fb32 🐛 Fix add svg did not update layout 2023-01-19 11:31:46 +01:00
Eva
61e83d7e01 🐛 Add selected colors on rightbar when selecting a board 2023-01-19 11:31:46 +01:00
Eva
a1a3d09998 🐛 Remove numbers in layer creation 2023-01-19 11:31:46 +01:00
Eva
de7a1d34c0 🐛 Fix board preset size selector css 2023-01-19 11:31:46 +01:00
Eva
f93d0e1c4d 🐛 Fix snap to pixel on path creation and edit 2023-01-19 11:31:46 +01:00
andrés gonzález
750e00c981 Merge pull request #2803 from iprithvitharun/2791-renaming-export-board-option
 Renamed Export boards to PDF option
2023-01-19 09:55:18 +01:00
Prithvi Tharun
d2847e9507 Renamed Export boards to PDF option
Two instances of this changed

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-18 23:09:39 +05:30
Andrey Antukh
8a5afefc1c 🎉 Add prepl support
And rename the current repl to urepl (user-repl).
2023-01-18 17:14:22 +01:00
Eva Marco
c5d8d77070 Merge pull request #2799 from penpot/alotor-polishing-5
Polishing
2023-01-18 11:38:40 +01:00
Andrey Antukh
3dd65db651 Use commands instead of mutations for assets upload
And properly deprecate media rpc mutations
2023-01-18 11:20:36 +01:00
alonso.torres
c18d3c66a8 Changes to snap to pixel 2023-01-18 11:04:24 +01:00
alonso.torres
0d96b5b798 🐛 Fix problems with mask elements modifiers when moving child 2023-01-18 11:04:24 +01:00
alonso.torres
24f45fafbf 🐛 Fix problem with disappearing frame titles 2023-01-18 11:04:13 +01:00
Andrey Antukh
1e1f551383 Move share link mutations to commands 2023-01-18 10:51:58 +01:00
Andrey Antukh
4258a840ac ♻️ Use proper namespace qualified access to pool 2023-01-18 10:51:58 +01:00
Andrey Antukh
bca98f91e4 🎉 Add rpc methods for access tokens 2023-01-18 10:51:58 +01:00
Andrey Antukh
a79d2cf899 🔥 Remove deprecated teams mutations and queries 2023-01-18 10:51:58 +01:00
Andrey Antukh
6a699d7f09 Properly move viewer queries to commands
And change deprecation version on viewer queries
2023-01-18 10:51:58 +01:00
Andrey Antukh
ba2729fa4a Move fonts queries and mutations to commands 2023-01-18 10:51:58 +01:00
Andrey Antukh
dba7a9d424 Move projects queries and mutations to commands 2023-01-18 10:51:58 +01:00
Andrey Antukh
dc77c6b655 Remove deprecated code and reoganize file related methods 2023-01-18 10:51:58 +01:00
Andrey Antukh
ed87814f50 🐛 Properly handle storage features on binfile import 2023-01-18 10:51:58 +01:00
Andrey Antukh
d8faff47a8 ♻️ Move profile queries and mutations to commands 2023-01-18 10:51:58 +01:00
Andrey Antukh
ecb757bcaf 🎉 Move user feedback http handler to RPC command method 2023-01-18 10:51:58 +01:00
Andrey Antukh
73a6f0a347 📎 Update backend scripts/repl file 2023-01-18 10:51:58 +01:00
Andrey Antukh
db689d151e ♻️ Refactor profile and session handling
- makes the profile access more efficient (replace in-app joins to a
  simple select query on profile table
- add partial support for access-tokens (still missing some RPC methods)
- move router definitions to specific modules and simplify the main http
  module definitions to simple includes
- simplifiy authentication code related to access-tokens and sessions
- normalize db parameters with proper namespaced props
- more work on convert all modules initialization to use proper specs
  with fully-qualified keyword config props
2023-01-18 10:51:58 +01:00
Alejandro
ca8df3a8d8 Merge pull request #2788 from penpot/niwinz-bugfix-binfile-import-storage-features
🐛 Properly handle storage features on binfile import
2023-01-18 09:52:51 +01:00
Ahmad HosseinBor
6bdd25b5d1 🌐 Add translations for: Persian.
Currently translated at 56.3% (685 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2023-01-18 06:48:14 +01:00
Eva
d14f4c5c4a 🐛 Fix open color palette from colorpicker 2023-01-17 23:28:02 +01:00
Eva
f6ff80a3d4 🐛 Fix Apply library colors to gradient points 2023-01-17 23:28:02 +01:00
Eva
b2d8f807f9 🐛 Fix alignment inside dropdown 2023-01-17 23:28:02 +01:00
Eva
03b3b441b5 🐛 Fix create mask inside layout 2023-01-17 23:28:02 +01:00
Andrey Antukh
523539e403 🐛 Properly handle storage features on binfile import 2023-01-17 10:14:30 +01:00
Alejandro
3280a6853e Merge pull request #2784 from penpot/palba-fix-undo-in-multiplayer
🐛 Fix undo corner case in multiplayer
2023-01-17 09:32:52 +01:00
andrés gonzález
a7ec9d7d1f Merge pull request #2790 from iprithvitharun/2789-inconsistent-casing-fixes
  Fixes wrong casing
2023-01-17 08:58:03 +01:00
Eva
fb060cb806 🐛 Fix padding values and add tooltip 2023-01-16 18:24:48 +01:00
Eva
8892cebb6f 🐛 Fix create layout flex around component 2023-01-16 18:24:48 +01:00
Eva
6fb97e54a9 🐛 Fix context menu when two elements where selected 2023-01-16 18:24:48 +01:00
Eva Marco
1c3470ca53 Merge pull request #2785 from penpot/azazeln28-fix-mousewheel-on-viewer-inspector
🐛 Fix mouse wheel on viewer inspector
2023-01-16 18:00:52 +01:00
alonso.torres
0ae42be851 🐛 Fix pipeline for thumbnails 2023-01-16 17:42:17 +01:00
alonso.torres
ff6f0b2744 🐛 Fix debugging util 2023-01-16 17:33:28 +01:00
Aitor
a3a2ab1ecd 🐛 Fix mouse wheel on viewer inspector 2023-01-16 17:30:18 +01:00
Alejandro Alonso
7f9911f164 Merge remote-tracking branch 'origin/staging' into develop 2023-01-16 17:14:56 +01:00
Eva Marco
01ba68fd6f Merge pull request #2786 from penpot/alotor-fix-text-loop
Fix problem with text hanging the application
2023-01-16 17:14:01 +01:00
alonso.torres
1ab669cc7b 🐛 Fix problems with texts looping 2023-01-16 17:05:34 +01:00
Prithvi Tharun
0e07617877 Fixes wrong casing
several casings fixed

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-16 21:04:50 +05:30
Alejandro Alonso
c78cb89943 Merge remote-tracking branch 'origin/staging' into develop 2023-01-16 16:21:35 +01:00
Rubén
42b8c3669f 🌐 Add translations for: Catalan.
Currently translated at 95.5% (1161 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2023-01-16 15:50:44 +01:00
Pablo Alba
ab421ac3f9 🐛 Fix undo corner case in multiplayer 2023-01-16 11:43:42 +01:00
Pablo Alba
0faa0b21a4 Merge pull request #2776 from penpot/superalex-justify-text-is-stretched
🐛 Fix justify text is stretched
2023-01-16 07:09:24 +01:00
Alejandro Alonso
4ca6a89e6f 🐛 Fix justify text is stretched 2023-01-13 16:55:00 +01:00
Alejandro Alonso
6c0a8afba2 Merge remote-tracking branch 'origin/staging' into develop 2023-01-13 15:00:30 +01:00
Eva Marco
ab5fd68689 Merge pull request #2777 from penpot/alotor-polishing-4
Polishing
2023-01-13 14:58:38 +01:00
Alejandro Alonso
19bac6bd10 Merge remote-tracking branch 'origin/staging' into develop 2023-01-13 14:37:06 +01:00
Alejandro
275eb993ce Merge pull request #2775 from penpot/niwinz-bugfixes-1
🐛 Several backend bugfixes
2023-01-13 14:33:46 +01:00
Alejandro
88143cfb8b Merge pull request #2778 from penpot/palba-filter-gfonts-variants
🐛 Filter gfonts variants for figma exporter plugin
2023-01-13 14:33:32 +01:00
alonso.torres
5f0f3abeae 🐛 Fix problem when dropping indices in flipped frames 2023-01-13 14:23:11 +01:00
alonso.torres
b203c87dbb 🐛 Fix problem with rotated texts inside flex layout 2023-01-13 14:23:11 +01:00
alonso.torres
7a796bc83f 🐛 Fix problem with thumbnails when duplicating artboards 2023-01-13 14:23:11 +01:00
alonso.torres
196e193281 🐛 Fix error message when the thumbnail fails to be added 2023-01-13 14:23:11 +01:00
alonso.torres
d0a15cda96 🐛 Fix issue when mirroring artboard 2023-01-13 14:23:11 +01:00
Pablo Alba
c3733ed2e1 🐛 Filter gfonts variants for figma exporter plugin 2023-01-13 14:19:57 +01:00
Pablo Alba
379623d629 Merge pull request #2773 from penpot/azazeln28-fix-library-list-spacing
🐛 Fix library list spacing
2023-01-13 13:32:13 +01:00
Pablo Alba
cb2553a8ca Merge pull request #2772 from penpot/azazeln28-fix-cannot-move-vertical-scroll-in-viewer
🐛 Fixes vertical scroll in viewer (code mode)
2023-01-13 13:30:10 +01:00
Aitor
1b7ea6ed53 Adds method to-fixed to math
Changes matrix/toString to use `to-fixed`
2023-01-13 11:43:50 +01:00
Eva
57a569a07a 🐛 Fix alignment on justify content space between 2023-01-13 11:43:05 +01:00
Andrey Antukh
a5006b1687 🐛 Remove www-form encoding from webhooks
It is broken by design, so we just do not support it
2023-01-13 10:34:56 +01:00
Aitor
24dc40a1b0 🐛 Fix library list spacing 2023-01-13 10:34:02 +01:00
Andrey Antukh
b4fc39f73c 📎 Disable quotes by default 2023-01-13 10:23:00 +01:00
Andrey Antukh
095dc2ad11 Do not merge path params into params
makes conflict with possible params coming from user
2023-01-13 10:19:39 +01:00
Andrey Antukh
fcbbe8e5c7 🐛 Fix incorrect logging context setup 2023-01-13 10:19:39 +01:00
Andrey Antukh
bafe3ec087 Revert some changes related to admin that are no longer necessary 2023-01-13 10:19:39 +01:00
andrés gonzález
1f5fb43454 Merge pull request #2771 from iprithvitharun/2770-update-position-x-y-tooltips
 Improves tooltip
2023-01-13 09:48:52 +01:00
Aitor
5d44d75465 🐛 Fixes vertical scroll in viewer (code mode) 2023-01-12 16:57:15 +01:00
Prithvi Tharun
cd3f1d5ded Improves tooltip
X and Y position tooltips updated to communicate more info

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2023-01-12 20:57:46 +05:30
Alejandro Alonso
47c983ed88 Merge remote-tracking branch 'origin/staging' into develop 2023-01-12 13:33:23 +01:00
Alejandro
44102050ee Merge pull request #2768 from penpot/palba-more-undo-tuning
🐛 Fix undo ungroup (shift+g) scrambles positions
2023-01-12 13:31:59 +01:00
Eva Marco
cae436f365 Merge pull request #2766 from penpot/alotor-polishing-3
Polishing
2023-01-12 13:24:04 +01:00
alonso.torres
e6d80e34b9 Drawing shapes over flex layout checks its drop index 2023-01-12 13:18:38 +01:00
Alejandro Alonso
c39c58198d Merge remote-tracking branch 'origin/staging' into develop 2023-01-12 13:14:25 +01:00
Alejandro
fbec07bd48 Merge pull request #2767 from penpot/azazeln28-fix-ignore-file-library-sync-status
🐛 Fix ignore file library sync status
2023-01-12 13:13:54 +01:00
Pablo Alba
a555028ee2 🐛 Fix undo ungroup (shift+g) scrambles positions 2023-01-12 12:54:07 +01:00
Aitor
d91e8c349e 🐛 Fix ignore file library sync status
- Adds missing `update` of `:features` using `db/decode-pgarray`
2023-01-12 12:38:26 +01:00
alonso.torres
abe26007d7 🐛 Fix problem with measures for frames 2023-01-12 12:35:20 +01:00
alonso.torres
2da421bb7a 🐛 Fix error on path editing 2023-01-12 12:35:20 +01:00
alonso.torres
7d48b86e46 ❇️ Debugging panel for development 2023-01-12 12:35:20 +01:00
alonso.torres
28663b5ff6 Improved performance of svg paths 2023-01-12 12:29:02 +01:00
Alejandro Alonso
651d4f794b 🐛 Fix copy paste line break 2023-01-12 12:28:05 +01:00
alonso.torres
58aa6b3666 🐛 Fix problem with gap-row/gap-column 2023-01-12 12:17:26 +01:00
Eva
131c2f331e 🐛 Fix gap 2023-01-12 12:17:26 +01:00
Eva
8df861faaa 🐛 Fix some undo while actions in flex 2023-01-12 12:17:26 +01:00
Eva
4f81f9636a ♻️ Change uuid/next for js/Symbol on undo-id for transactions 2023-01-12 12:17:26 +01:00
Eva
31dfdf51c9 🐛 Fix some errors on flex layout 2023-01-12 12:17:26 +01:00
Pablo Alba
acf51ea744 💄 Use css color variable instead of fixed value 2023-01-12 09:21:57 +01:00
Pablo Alba
a54f5484e8 🎉 Added a tag to mark read only mode (now on pages) 2023-01-11 17:25:49 +01:00
Pablo Alba
3a8486f4b0 🐛 Fix share prototype styles on hover: color and tooltip 2023-01-11 17:16:43 +01:00
Pablo Alba
43c3d67521 🐛 Fix max height in library dialog 2023-01-11 17:10:56 +01:00
Aitor Moreno
4b2d82e100 :fix: react warning duplicate keys 2023-01-11 15:10:53 +01:00
Aitor Moreno
f2fd380979 Improves matrix serialization 2023-01-11 15:03:18 +01:00
Alejandro
984187037c Merge pull request #2757 from penpot/palba-fix-expanded-code
🐛 Fix switching tabs produces strange behaviour when "expanded" v…
2023-01-11 12:55:33 +01:00
Alejandro
173e5da98e Merge pull request #2759 from penpot/palba-read-only-tag
🎉 Added a tag to mark read only mode
2023-01-11 12:53:10 +01:00
Alejandro Alonso
76c9f11922 Merge remote-tracking branch 'origin/staging' into develop 2023-01-11 12:45:05 +01:00
Pablo Alba
2ab3ed9ab4 🎉 Added a tag to mark read only mode 2023-01-11 12:06:42 +01:00
Aitor
74e4273549 Merge pull request #2754 from penpot/superalex-fix-move-boards-with-comments
🐛 Fix move boards with comments
2023-01-11 10:28:04 +01:00
Pablo Alba
12392a4038 🐛 Fix switching tabs produces strange behaviour when "expanded" view mode was used for Code 2023-01-10 17:19:45 +01:00
Pablo Alba
987b7f44f4 🐛 Fix layer orders messed up on move, group, reparent and undo 2023-01-10 16:45:08 +01:00
Alejandro
3480d6979b Merge pull request #2755 from penpot/eva-fix-icon
🐛 Fix pin icon in project
2023-01-10 15:55:23 +01:00
Eva
9ca1efc128 🐛 Fix pin icon in project 2023-01-10 14:26:52 +01:00
Alejandro Alonso
81a95d362c 🐛 Fix move boards with comments 2023-01-10 13:55:41 +01:00
Alejandro Alonso
a25f069f8e Merge remote-tracking branch 'origin/staging' into develop 2023-01-10 11:27:38 +01:00
Eva Marco
a7dfda515b Merge pull request #2753 from penpot/alotor-polishing-2
Fix problems with text positons
2023-01-10 11:26:49 +01:00
andrés gonzález
d87bc5fa1b Merge pull request #2682 from iprithvitharun/2678-updating-custom-fonts-empty-state-content
 Improves empty state content
2023-01-10 11:17:09 +01:00
andrés gonzález
5a482298e8 Merge pull request #2683 from iprithvitharun/2679-updating-empty-state-content-libraries-section
 Improves empty state content
2023-01-10 11:16:00 +01:00
alonso.torres
b5c1199f4d 🐛 Fix problem with texts randomly moving 2023-01-10 11:02:40 +01:00
alonso.torres
4aa8baa129 Add debug history overlay 2023-01-10 11:02:40 +01:00
Alejandro
553f2f5576 Merge pull request #2748 from penpot/eva-workspace-visual-changes
Bugfixing
2023-01-10 10:35:32 +01:00
Alejandro
b132837432 Merge pull request #2743 from penpot/niwinz-enhancements-2
🐛 Bugfixes
2023-01-10 09:56:45 +01:00
Eva
36bc276d93 🐛 Fix outline in color type selector on view mode 2023-01-10 09:40:24 +01:00
Alejandro Alonso
34d874f56d Merge remote-tracking branch 'origin/staging' into develop 2023-01-09 16:41:40 +01:00
Eva Marco
35aa391129 Merge pull request #2749 from penpot/hiru-fix-ghost-sync
🐛 Fix ghost shapes after sync groups in components
2023-01-09 16:20:20 +01:00
Eva
2c2755b35e 🐛 Fix allow names selection in dashboard 2023-01-09 16:06:00 +01:00
Andrés Moya
bedaef961b 🐛 Fix ghost shapes after sync groups in components 2023-01-09 14:21:29 +01:00
Eva
fe7f4004f1 🐛 Fix scape key to clear focus on input 2023-01-09 13:01:15 +01:00
Eva
eef42acf79 🐛 Fix component list on update 2023-01-09 13:01:15 +01:00
Eva
937713311e 🐛 Fix some visual errors 2023-01-09 13:01:15 +01:00
Alejandro
762681a421 Merge pull request #2747 from penpot/azazeln28-fix-import-dialog-react-duplicate-key-warning
🐛 Fix import dialog React duplicate key warning
2023-01-09 12:44:04 +01:00
Alejandro
94fc067286 Merge pull request #2744 from penpot/alotor-fix-svg-upload
🐛 Fix problem uploading svg with style tag
2023-01-09 12:43:32 +01:00
Alejandro
ae6ea7744e Merge pull request #2738 from penpot/alotor-polishing
Polishing
2023-01-09 12:35:43 +01:00
Aitor Moreno
b73ab37c94 🐛 Fix import dialog React duplicate key warning 2023-01-09 12:28:41 +01:00
Andrey Antukh
f628955a15 🐛 Set the same tenant default on backend and exporter 2023-01-09 11:57:13 +01:00
Andrey Antukh
6cdf696fc4 🐛 Fix issues on ldap provider and rpc method 2023-01-09 11:57:13 +01:00
alonso.torres
c42ef7c5b0 🐛 Fix problem uploading svg with style tag 2023-01-09 11:56:02 +01:00
Andrey Antukh
853be27780 🐛 Fix issues on database logger 2023-01-09 11:43:26 +01:00
Andrey Antukh
b235d3f0f2 Improve update-file webhook batching
make it per user
2023-01-09 11:43:02 +01:00
Alejandro
04dc9f7881 Merge pull request #2736 from penpot/superalex-fix-text-sync-hotfix
🐛 Fix text content sync and touched detection in shape displacement
2023-01-09 11:35:59 +01:00
alonso.torres
1fdf09a692 🐛 Fix problem with snap-pixel for very big shapes 2023-01-09 11:06:09 +01:00
alonso.torres
c2e0b18f26 🐛 Fix problem with thumbnails uploading 2023-01-09 11:05:31 +01:00
K.B.Dharun Krishna
0039585848 🌐 Add translations for: Tamil.
Currently translated at 2.7% (34 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ta/
2023-01-06 11:48:00 +01:00
alonso.torres
672cfa4ecc 🐛 Fix problem when forcing persistence on screen change 2023-01-05 16:20:37 +01:00
alonso.torres
c459c56f37 Improved performance of snap to distances 2023-01-05 16:20:37 +01:00
Alejandro Alonso
df5ccb6e77 Merge remote-tracking branch 'origin/staging' into develop 2023-01-05 13:30:16 +01:00
Andrés Moya
0863a96f93 🐛 Fix text content sync and touched detection in shape displacement 2023-01-05 13:26:33 +01:00
Andrey Antukh
97a884018f Move media mutations to commands 2023-01-05 13:23:57 +01:00
Andrey Antukh
1718f49a90 💄 Fix code consistency issues on comments rpc methods
related to the ::rpc/profile-id usage.
2023-01-05 13:23:57 +01:00
Alejandro
2c1fb1424c Merge pull request #2734 from penpot/hiru-fix-text-sync
🐛 Fix text content sync and touched detection in shape displacement
2023-01-05 12:13:30 +01:00
Andrés Moya
5e1cabc857 🐛 Fix text content sync and touched detection in shape displacement 2023-01-05 10:23:34 +01:00
Andrés Moya
be5e7f1536 💄 Fix line removed by merge 2023-01-05 09:59:30 +01:00
Andrés Moya
d68f53733d Merge remote-tracking branch 'origin/staging' into develop 2023-01-05 09:58:20 +01:00
Andrés Moya
6f72ea0530 💄 Clean up CHANGES.md (staging) 2023-01-05 09:57:10 +01:00
Andrés Moya
dba90726c1 💄 Clean up CHANGES.md 2023-01-05 09:54:33 +01:00
Alejandro Alonso
84dcd8f89c Merge remote-tracking branch 'origin/staging' into develop 2023-01-05 09:45:14 +01:00
Alejandro
c2d8c1994c Merge pull request #2671 from penpot/hiru-sync-groups
🐛 Fix group/ungroup shapes inside a component
2023-01-05 09:21:58 +01:00
Andrés Moya
985d5cc20c 🐛 Fix group/ungroup shapes inside a component 2023-01-05 09:21:42 +01:00
Alejandro
a0364e8835 Merge pull request #2728 from penpot/eva-bugfixin-flex
🐛 Fix some bugs reported on flex feedback
2023-01-05 08:54:55 +01:00
Alejandro Alonso
3b0bded82c Merge remote-tracking branch 'origin/staging' into develop 2023-01-05 07:40:25 +01:00
Alejandro
b273bd44c5 Merge pull request #2733 from penpot/alotor-performance
Performance enhancements
2023-01-05 07:39:57 +01:00
Alejandro
ec2fff31a0 Merge pull request #2732 from penpot/palba-create-group-form-enter
🐛 Fix confirm group name with enter doesn't work in assets modal
2023-01-05 07:07:58 +01:00
Pablo Alba
53a8718e8d 🐛 Fix confirm group name with enter doesn't work in assets modal 2023-01-05 07:07:43 +01:00
Alejandro
216a43cc43 Merge pull request #2731 from penpot/superalex-fix-enter-events-hotfix
🐛 Fix enter events
2023-01-05 07:02:34 +01:00
alonso.torres
10439934d4 Use the function hypot for distances 2023-01-04 16:21:41 +01:00
alonso.torres
84e9f69213 Improved text rendering performance 2023-01-04 16:12:12 +01:00
alonso.torres
837b52aea1 Improved performand for hug content in layout 2023-01-04 16:12:12 +01:00
alonso.torres
98698cf2db Improved modifiers lens 2023-01-04 16:12:12 +01:00
alonso.torres
d5ab0eea1a Removed reflow in viewport 2023-01-04 16:12:12 +01:00
Pablo Alba
333acacbbf Merge pull request #2730 from penpot/superalex-fix-enter-events
🐛 Fix enter events
2023-01-04 14:37:15 +01:00
Eva
598959cd3f 🐛 Fix some bugs reported on flex feedback 2023-01-04 14:00:13 +01:00
Alejandro Alonso
05431cc757 🐛 Fix enter events 2023-01-04 13:23:05 +01:00
Alejandro Alonso
f56b8be33d 🐛 Fix enter events 2023-01-04 13:09:39 +01:00
Alejandro Alonso
dd0ac64e28 Merge remote-tracking branch 'origin/staging' into develop 2023-01-04 09:25:30 +01:00
alonso.torres
644854a651 Reorder layers through keys in flex layout 2023-01-04 09:24:47 +01:00
alonso.torres
e926b11fef Changes to the margin-item and min/max width/height 2023-01-04 09:24:42 +01:00
alonso.torres
40da1c302a Support hidden elements in flex layout 2023-01-04 09:24:35 +01:00
Alejandro Alonso
aa56e2cdcf Merge remote-tracking branch 'origin/staging' into develop 2023-01-02 14:18:00 +01:00
Alejandro Alonso
b5e53b57d1 🎉 Dynamic alignment only in sight 2023-01-02 14:12:14 +01:00
Alejandro Alonso
07ac43ec0e Merge remote-tracking branch 'origin/staging' into develop 2023-01-02 14:07:56 +01:00
Alejandro
e8d561ac7f Merge pull request #2724 from penpot/hiru-fix-component-board
Avoid extra group when creating a component from a board
2023-01-02 13:52:14 +01:00
Alejandro Alonso
31661d5484 Merge remote-tracking branch 'origin/staging' into develop 2023-01-02 13:48:36 +01:00
Alejandro
cf87c54ed4 Merge pull request #2726 from penpot/palba-error-import-file
🐛 Fix export/import svg + json format isn't working
2023-01-02 13:48:14 +01:00
Pablo Alba
3ce1540331 🐛 Fix export/import svg + json format isn't working 2023-01-02 13:36:49 +01:00
Alejandro
cda2dade95 Merge pull request #2725 from penpot/alotor-bug-fixing
Bug fixing
2023-01-02 11:56:51 +01:00
Andrés Moya
baf4dfdecc 🐛 Allow to create component from frame 2023-01-02 11:33:58 +01:00
alonso.torres
ade13d3bca 🐛 Fix problem with auto-height text resize 2023-01-02 11:25:53 +01:00
alonso.torres
ff9b2090cf 🐛 Fix problem with shapes moving randomly 2023-01-02 11:25:53 +01:00
alonso.torres
733b35dd53 ⬆️ Updated potok dependency 2023-01-02 11:25:53 +01:00
Alejandro
466e018411 Merge pull request #2700 from penpot/palba-orphans-st
🐛 Add function to reparent orphan shapes
2023-01-02 11:16:22 +01:00
alonso.torres
32d39c35e4 🐛 Fix problem with flipped shapes 2023-01-02 11:12:59 +01:00
Alejandro
5f77df1996 Merge pull request #2713 from penpot/palba-show-color-name-inspect
🐛 Show color name on inspect
2023-01-02 10:35:36 +01:00
Alejandro
24538add3f Merge pull request #2723 from penpot/eva-a11y-bugfixing
🐛 Fix some visual errors
2023-01-02 10:33:23 +01:00
Eva
407831ffd1 🐛 Fix some visual errors 2023-01-02 09:46:42 +01:00
Alejandro
379997f9db Merge pull request #2716 from penpot/palba-fix-internal-error-set-text-style
🐛 Fix internal error at setting text style
2023-01-02 09:41:48 +01:00
Alejandro
b1d99232a9 Merge pull request #2718 from penpot/niwinz-bugfixes
🐛 Bugfixes
2023-01-02 09:23:39 +01:00
Alejandro Alonso
7e21d827c9 🐛 Fix duplicate frame issues 2023-01-02 08:52:45 +01:00
Alejandro
443d8b21c1 Merge pull request #2719 from penpot/niwinz-quotes
🎉 Quotes & Soft Quotes
2023-01-02 08:13:14 +01:00
Andrey Antukh
e372e8ba3e 🐛 Fix s3 client issues with s3 compatible services 2022-12-31 16:37:42 +01:00
Andrey Antukh
27451b9796 ♻️ Refactor comments RPC methods and add tests 2022-12-31 12:00:57 +01:00
Andrey Antukh
73a3e0c0ae 🎉 Add usage quotes 2022-12-31 11:22:36 +01:00
Andrey Antukh
d68be0869b Improve error report on point constructor 2022-12-31 11:11:22 +01:00
Andrey Antukh
7a8b0e710b Improve trace reporting on unhandled exception 2022-12-31 11:11:17 +01:00
Andrey Antukh
3b61a7dd91 🐛 Fix incorrect arguments to process-changes 2022-12-31 11:11:13 +01:00
Andrey Antukh
941aa6ad5d 🔥 Remove unused configuration attrs 2022-12-31 09:22:57 +01:00
Pablo Alba
42b69df671 🐛 Fix internal error at setting text style 2022-12-30 13:34:47 +01:00
Pablo Alba
4442246e08 Merge pull request #2714 from penpot/superalex-fix-ignoring-boolean-operations-on-ctrl-click-actions
🐛 Fix ignore booleans on ctrl + click selection
2022-12-30 12:11:30 +01:00
Pablo Alba
d1dbc3850d 🐛 Show color name on inspect 2022-12-30 11:59:46 +01:00
Alejandro Alonso
ed4a5f6c60 🐛 Fix ignore booleans on ctrl + click selection 2022-12-30 11:33:03 +01:00
Alejandro
0144939f34 Merge pull request #2702 from penpot/palba-fix-boolean-shapes-color
🐛 Fix incorrect color in properties of multiple bool shapes
2022-12-30 08:06:48 +01:00
Pablo Alba
ede07e4f44 🐛 Fix incorrect color in properties of multiple bool shapes 2022-12-30 08:05:26 +01:00
Alejandro Alonso
9c44cd343f Merge remote-tracking branch 'origin/staging' into develop 2022-12-30 07:46:38 +01:00
Alejandro
b2c55c79a4 Merge pull request #2710 from penpot/palba-convert-current-color-in-svg
🐛 Fix "currentColor" is not converted when importing SVG
2022-12-30 07:45:05 +01:00
Pablo Alba
0b2ffbe1fa 🐛 Fix "currentColor" is not converted when importing SVG 2022-12-30 07:44:47 +01:00
Alejandro
ebfe651b7d Merge pull request #2711 from penpot/palba-create-component-menu
🐛 Fix missing create component menu for frames
2022-12-30 07:40:20 +01:00
Pablo Alba
dac11d1606 🐛 Fix missing create component menu for frames 2022-12-30 07:28:27 +01:00
Alejandro
c8bd1e89d6 Merge pull request #2708 from penpot/palba-fix-selection-stroke-on-multiple-fonts
🐛 Fix selection stroke missing in properties of multiple texts
2022-12-30 07:25:50 +01:00
Alejandro Alonso
2d22f575a0 Merge remote-tracking branch 'origin/staging' into develop 2022-12-29 14:26:00 +01:00
Alejandro
8111db1110 Merge pull request #2709 from penpot/eva-bugfixing-css
🐛 Fix some visual errors
2022-12-29 14:25:30 +01:00
Eva
0a8dfde0a2 🐛 Fix some visual errors 2022-12-29 14:20:02 +01:00
Pablo Alba
9f6a3cbc23 🐛 Fix selection stroke missing in properties of multiple texts 2022-12-29 13:53:35 +01:00
Alejandro Alonso
87a264ae40 Merge remote-tracking branch 'origin/staging' into develop 2022-12-29 13:15:15 +01:00
Alejandro
6592456085 Merge pull request #2707 from penpot/alotor-remove-handoff-references
Remove handoff references
2022-12-29 13:14:55 +01:00
alonso.torres
3bbf632121 ♻️ Changed handoff for inspect everywhere 2022-12-29 13:06:16 +01:00
Alejandro
690090acb4 Merge pull request #2706 from penpot/alotor-flex-improvements
Flex improvements
2022-12-29 12:06:47 +01:00
Alejandro
104059a7b1 Merge pull request #2703 from penpot/palba-add-loading-icon-shared-libraries
🐛 Fix missing loading icon on shared libraries
2022-12-29 11:56:00 +01:00
Pablo Alba
f75af88877 🐛 Fix missing loading icon on shared libraries 2022-12-29 11:47:31 +01:00
alonso.torres
3c5be31222 Reorder layers through keys in flex layout 2022-12-29 11:16:54 +01:00
alonso.torres
a66b40d79e Changes to the margin-item and min/max width/height 2022-12-29 11:11:37 +01:00
alonso.torres
7e31c55e37 Support hidden elements in flex layout 2022-12-29 11:11:36 +01:00
Alejandro Alonso
9e30f974ef Merge remote-tracking branch 'origin/staging' into develop 2022-12-29 10:07:20 +01:00
Alejandro Alonso
d4360be96e 🐛 Fix guides inside frames issues 2022-12-29 09:50:04 +01:00
Fernando Krik
5e6d079fea 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 99.9% (1214 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-12-29 00:47:37 +01:00
Alejandro Alonso
4cc841d629 Merge remote-tracking branch 'origin/staging' into develop 2022-12-28 13:17:11 +01:00
Andrey Antukh
dcf95a7502 ⬇️ Downgrade promesa library
Causes incorect release build for some unknown reasons
2022-12-28 13:15:35 +01:00
Pablo Alba
4fc3f316e0 🐛 Add function to reparent orphan shapes 2022-12-28 12:49:07 +01:00
Alejandro Alonso
1497e8ef0f Merge remote-tracking branch 'origin/staging' into develop 2022-12-28 11:55:30 +01:00
Alejandro
83c8e7f03a Merge pull request #2699 from penpot/alotor-bugfixes
Alotor bugfixes
2022-12-28 11:53:57 +01:00
alonso.torres
074864a6bf 🐛 Fix problem when drawing boxes won't detect mouse-up 2022-12-28 11:48:38 +01:00
alonso.torres
aed7f0ad43 🐛 Fix problem when moving texts with keyboard 2022-12-28 11:48:36 +01:00
alonso.torres
cd2df41e87 🐛 Fix problems with transparent frames thumbnails 2022-12-28 11:48:14 +01:00
alonso.torres
00fbfd6e9e 🐛 Fix problem when moving shape inside frame 2022-12-28 11:48:14 +01:00
alonso.torres
93726cf8fe 🐛 Fix wrong interaction between comments and panning modes 2022-12-28 11:48:14 +01:00
Andrey Antukh
1dc6464974 🐛 Fix unexpected behavior of font-variant query
Missing coersion of team-id parameter
2022-12-28 11:30:27 +01:00
Alejandro
81cebb2aa8 Merge pull request #2693 from penpot/palba-fix-non-persistent-display-type-st
🐛 Fix display type of component library not persistent
2022-12-28 11:23:47 +01:00
Pablo Alba
6c8144a18a 🐛 Fix display type of component library not persistent 2022-12-28 11:15:42 +01:00
Alejandro Alonso
47bf758ad7 🐛 Fix guides spec failure 2022-12-28 11:14:51 +01:00
Alejandro
13cfe56301 Merge pull request #2698 from penpot/palba-interaction-bad-positioning-when-fixed
🐛 Fix bad element positioning on interaction with fixed scroll
2022-12-28 11:02:23 +01:00
Pablo Alba
33f7cec933 🐛 Fix bad element positioning on interaction with fixed scroll 2022-12-28 10:57:45 +01:00
Alejandro
1f00d91dd7 Merge pull request #2694 from penpot/niwinz-enhancements-6
🐛 Bugfixes
2022-12-28 09:57:07 +01:00
Andrey Antukh
c1a8437b6d Merge pull request #2697 from penpot/palba-outline-rounded-rect
🐛 Fix show outline with rounded corners on rects
2022-12-28 09:33:01 +01:00
Pablo Alba
5cb3aa5dbc 🐛 Fix show outline with rounded corners on rects 2022-12-28 09:23:11 +01:00
Andrey Antukh
de72dc5769 🐛 Fix race conditions issues on concurrent edition 2022-12-28 09:10:06 +01:00
Andrey Antukh
b827037f90 📎 Add experimental label on admin image on compose file 2022-12-28 09:10:06 +01:00
Andrey Antukh
60fb3f3d0e 🐛 Fix storage/pointer-map support issues on thumbnails and libs loading 2022-12-28 09:10:06 +01:00
Andrey Antukh
84fd952471 Improve storage/* features support on srepl helpers 2022-12-28 09:10:06 +01:00
Andrey Antukh
e37fc00351 🐛 Fix pointer-map support issue on get-team-shared-files RPC method 2022-12-28 09:10:06 +01:00
Andrey Antukh
4164c8f012 ⬆️ Update dependencies 2022-12-28 09:10:06 +01:00
Alejandro
c86af68349 Merge pull request #2695 from penpot/alotor-safari-fix-texts
🐛 Fix problems with Safari texts
2022-12-28 07:16:05 +01:00
Fernando Krik
4c392e3a31 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-12-27 23:22:16 +01:00
alonso.torres
4302ab05e4 🐛 Fix problems with Safari texts 2022-12-27 15:22:28 +01:00
Alejandro
777e2fb0a3 Merge pull request #2692 from penpot/palba-fix-style-team-invite
🐛 Fix style for team invite in deutsch
2022-12-27 12:49:05 +01:00
Alejandro Alonso
f7412ccbd7 📎 Fix version number and changelog 2022-12-27 12:05:42 +01:00
Alejandro Alonso
145d6f831a 📎 Prepare new development cycle 2022-12-27 12:04:02 +01:00
Alejandro
fe11b37b8f Merge pull request #2686 from penpot/niwinz-enhancements-5
General enhancements & Bugfixes
2022-12-27 11:58:22 +01:00
Pablo Alba
c469bd5757 🐛 Fix style for team invite in deutsch 2022-12-27 09:10:19 +01:00
Andrey Antukh
7d817eb080 🎉 Add new version of docker-compose.yaml
That not depends on config.env file and has better examples
2022-12-22 16:42:45 +01:00
Andrey Antukh
2840cb893e 🎉 Add login-with-password flag
As replacement to `login` flag
2022-12-22 16:42:45 +01:00
Andrey Antukh
7f5491f45b 💄 Add minor cosmetic changes to manage.sh script 2022-12-22 16:42:45 +01:00
Andrey Antukh
ef9dcf391d 🐛 Fix slow exit of exporter docker container 2022-12-22 16:42:45 +01:00
Andrey Antukh
81ecb26f8b Make exporter docker image run on non-root user 2022-12-22 16:42:45 +01:00
Andrey Antukh
35fd3ce150 Make backend docker image run on non-root user 2022-12-22 16:42:45 +01:00
Andrey Antukh
68d2afc75d Add missing type hints on backend code 2022-12-22 16:42:45 +01:00
Andrey Antukh
d094eb3595 Use custom jre for backend docker image
Reduces in 230M the image size.
Also updates JRE.
2022-12-22 16:42:45 +01:00
Andrey Antukh
f0d4ad4b20 🎉 Add local docker image building to manage.sh 2022-12-22 16:42:45 +01:00
Andrey Antukh
b929564fa7 ♻️ Add admin facilities on the code base
- Fix bugs related to orphan teams on profile deletion
- Separate session based profile-id param from api user provided
2022-12-22 16:42:45 +01:00
Andrey Antukh
53d9b547c3 🐛 Fix several rpc events not emiting webhooks 2022-12-22 16:42:45 +01:00
Andrey Antukh
50c17e1261 🐛 Fix invitation link translations issues 2022-12-22 16:42:45 +01:00
Andrey Antukh
a113a64554 🐛 Fix invitation link validation issue 2022-12-22 16:42:41 +01:00
matl-17
8aa1f29865 🌐 Add translations for: Czech.
Currently translated at 15.8% (192 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/cs/
2022-12-22 01:45:30 +01:00
Midka
62b730f5f0 🌐 Add translations for: Finnish (fin_FI).
Currently translated at 5.0% (61 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fin_FI/
2022-12-20 21:48:51 +01:00
Prithvi Tharun
f35095e053 Improves empty state content
Better instructions explaining multiple ways people can add files to library. Also, reads in neutral tone withour blaming and alarming the users

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2022-12-20 23:30:37 +05:30
Prithvi Tharun
9e3515619d Improves empty state content
Reads in neutral content without alarming the users

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2022-12-20 22:35:05 +05:30
andy
de7fb393c9 🌐 Added translation for: Finnish (fin_FI). 2022-12-19 10:22:15 +01:00
Ahmad HosseinBor
fed320be36 🌐 Add translations for: Persian.
Currently translated at 55.3% (673 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2022-12-17 17:49:47 +01:00
Andrey Antukh
c13730dca7 🐛 Fix incorrect request flow handling on session middleware
an issue introduced in previous commits
2022-12-16 16:59:34 +01:00
Prithvi Tharun
498ec29e47 Improves empty state content
Closes #2643 Reads positive and appreciative of their effort to keep up-to-date with the team. Plus, communicates when they'll see new notifications.

Signed-off-by: Prithvi Tharun <ptrithu8@gmail.com>
2022-12-16 16:12:41 +01:00
Alejandro
880d01368f Merge pull request #2669 from penpot/alotor-layout-fixes
🐛 Fix problem with auto-width and transforms
2022-12-16 14:07:20 +01:00
alonso.torres
1fe1a352c3 🐛 Fix problem with auto-width and transforms 2022-12-16 13:11:20 +01:00
Alejandro
8ffe023d3e Merge pull request #2667 from penpot/hiru-fix-sync-path
🐛 Fix component sync when shape is converted to path
2022-12-16 13:02:06 +01:00
Andrés Moya
16f30316c0 🐛 Fix component sync when shape is converted to path 2022-12-16 12:57:10 +01:00
Alejandro
ac7cb3c8c7 Merge pull request #2654 from penpot/eva-a11y-dashboard
 Improve dashboard accessibility
2022-12-16 12:52:53 +01:00
Alejandro
61c1b65072 Merge pull request #2661 from penpot/niwinz-enhancements-3
Enhancements & Bugfixes
2022-12-16 12:09:57 +01:00
Alejandro Alonso
ef994548c1 🐛 Fix typos 2022-12-16 12:09:45 +01:00
Alejandro Alonso
159085fd83 Merge branch 'niwinz-enhancements-3' of github.com:penpot/penpot into niwinz-enhancements-3 2022-12-16 11:39:50 +01:00
Andrey Antukh
84bee9fb93 🐛 Fix minor issue on logging when cause is nil 2022-12-16 10:31:48 +01:00
Andrey Antukh
2dcb4a155e Add import, export and management events to webhooks 2022-12-16 10:31:48 +01:00
Andrey Antukh
abf397fe5b Remove share-id from comments webhook 2022-12-16 10:31:48 +01:00
Andrey Antukh
0087447b01 Remove nils from audit/webhook props 2022-12-16 10:31:48 +01:00
Andrey Antukh
f47c20e079 🐛 Fix params inconsistency between mutation and commands 2022-12-16 10:31:48 +01:00
Andrey Antukh
4b26b6fc02 🐛 Fix incorrect output on webhook internal queries 2022-12-16 10:31:48 +01:00
Andrey Antukh
abeec9f869 📎 Add missing doc metadata on comments commands 2022-12-16 10:31:48 +01:00
Andrey Antukh
c9c070b5f4 Use new retry mechanism on comment thread creation 2022-12-16 10:31:48 +01:00
Andrey Antukh
d80a24b1e3 Add font events to webhooks 2022-12-16 10:31:48 +01:00
Andrey Antukh
ae8000df26 🔥 Remove unused code on RPC main ns 2022-12-16 10:31:48 +01:00
Andrey Antukh
f239c401e2 🐛 Fix incorrect auth cookie decoding on first stage session middleware 2022-12-16 10:31:48 +01:00
Andrey Antukh
f2e2700c79 💄 Change worker logging 2022-12-16 10:31:48 +01:00
Andrey Antukh
d38c495807 Add more project events to webhooks 2022-12-16 10:31:44 +01:00
Andrey Antukh
025cd44eae 🐛 Fix incorrect deduplication of tasks on webhooks 2022-12-16 10:31:13 +01:00
Andrey Antukh
8ac96d09cd 🐛 Properly remove qualified keys on audit/replace-props 2022-12-16 10:31:13 +01:00
Andrey Antukh
8f2a02ae72 🎉 Add webhooks to the API doc 2022-12-16 10:31:13 +01:00
Andrey Antukh
710878a667 Improve webhook URI validation 2022-12-16 10:31:13 +01:00
Andrey Antukh
350e4a1d1b Improve default update-file webhook batch timeout 2022-12-16 10:31:13 +01:00
Andrey Antukh
801d926946 💄 Fix linter issues 2022-12-16 10:31:13 +01:00
Andrey Antukh
e50ecd70c6 📎 Add some cosmetic changes to kondo config 2022-12-16 10:31:13 +01:00
Andrey Antukh
f11da06637 🎉 Add the ability to copy team invitation link 2022-12-16 10:31:13 +01:00
Andrey Antukh
a6b26f0563 🔥 Remove deprecated RPC methods 2022-12-16 10:31:13 +01:00
Andrey Antukh
dbf743d58a 📎 Add missing doc/added metadata on fonts related RPC methods 2022-12-16 10:31:13 +01:00
Andrey Antukh
d35e35acde 🔥 Remove old deprecated method from fonts queries RPC 2022-12-16 10:31:13 +01:00
Andrey Antukh
36f2ca6bb2 Add generic (blocking) retry macro
And use it on audit handling
2022-12-16 10:31:13 +01:00
Andrey Antukh
c570557203 ♻️ Move teams queries and mutations to commands 2022-12-16 10:31:13 +01:00
Andrey Antukh
797ae22526 Use the same value for created_at and tracked_at on audit 2022-12-16 10:31:13 +01:00
Andrey Antukh
4e1e67fc3d 🐛 Fix unexpected redirect on invitation acceptation 2022-12-16 10:31:13 +01:00
Alejandro Alonso
76a83bece9 Merge remote-tracking branch 'origin/staging' into develop 2022-12-16 10:29:42 +01:00
Andrey Antukh
0cc6c76cdb 🐛 Fix minor issue on logging when cause is nil 2022-12-16 09:41:32 +01:00
Andrey Antukh
fa7cf70cee Add import, export and management events to webhooks 2022-12-16 09:41:32 +01:00
Andrey Antukh
e25cf13783 Remove share-id from comments webhook 2022-12-16 09:41:32 +01:00
Andrey Antukh
6b199bef89 Remove nils from audit/webhook props 2022-12-16 09:41:32 +01:00
Andrey Antukh
74e6c01213 🐛 Fix params inconsistency between mutation and commands 2022-12-16 09:41:32 +01:00
Andrey Antukh
970dc04bc6 🐛 Fix incorrect output on webhook internal queries 2022-12-16 09:41:32 +01:00
Andrey Antukh
aefdbfa8ef Merge pull request #2662 from penpot/palba-fix-cant-select-text-assets-inputs
🐛 Fix unable to select text at assets inputs in firefox
2022-12-16 09:35:00 +01:00
Andrey Antukh
1b3976da47 📎 Add missing doc metadata on comments commands 2022-12-16 09:33:55 +01:00
Andrey Antukh
c52046d25b Use new retry mechanism on comment thread creation 2022-12-16 09:33:55 +01:00
Andrey Antukh
609fa87fe2 Add font events to webhooks 2022-12-16 09:33:52 +01:00
Andrey Antukh
9ca2450813 🔥 Remove unused code on RPC main ns 2022-12-16 09:33:24 +01:00
Andrey Antukh
408d33bdec 🐛 Fix incorrect auth cookie decoding on first stage session middleware 2022-12-16 09:33:24 +01:00
Andrey Antukh
226afe98e0 💄 Change worker logging 2022-12-15 11:33:10 +01:00
Andrey Antukh
db7920435b :sparkless: Add more project events to webhooks 2022-12-15 11:28:18 +01:00
Andrey Antukh
bdd00be5e4 🐛 Fix incorrect deduplication of tasks on webhooks 2022-12-15 11:27:43 +01:00
Andrey Antukh
6eedb5315b 🐛 Properly remove qualified keys on audit/replace-props 2022-12-15 11:26:19 +01:00
Eva
7045496a39 Improve dashboard accessibility 2022-12-15 09:17:14 +01:00
Andrey Antukh
02f29ed4d0 🎉 Add webhooks to the API doc 2022-12-15 08:18:29 +01:00
Andrey Antukh
6ea0279c9e Improve webhook URI validation 2022-12-14 16:22:13 +01:00
Andrey Antukh
6a7a25121e Improve default update-file webhook batch timeout 2022-12-14 16:22:13 +01:00
Andrey Antukh
a8f65ba69e 💄 Fix linter issues 2022-12-14 16:22:13 +01:00
Andrey Antukh
096b5f096c 📎 Add some cosmetic changes to kondo config 2022-12-14 16:22:13 +01:00
Andrey Antukh
842463ed1b 🎉 Add the ability to copy team invitation link 2022-12-14 16:22:13 +01:00
Andrey Antukh
7d2e3a0864 🔥 Remove deprecated RPC methods 2022-12-14 16:22:13 +01:00
Andrey Antukh
c2ced974b1 📎 Add missing doc/added metadata on fonts related RPC methods 2022-12-14 16:22:13 +01:00
Andrey Antukh
653b6bdb42 🔥 Remove old deprecated method from fonts queries RPC 2022-12-14 16:22:13 +01:00
Andrey Antukh
c820c49fc5 Add generic (blocking) retry macro
And use it on audit handling
2022-12-14 16:22:13 +01:00
Andrey Antukh
7a9172560d ♻️ Move teams queries and mutations to commands 2022-12-14 16:22:13 +01:00
Andrey Antukh
be5053ce22 Use the same value for created_at and tracked_at on audit 2022-12-14 16:22:13 +01:00
Andrey Antukh
44e87e75e6 🐛 Fix unexpected redirect on invitation acceptation 2022-12-14 16:22:13 +01:00
Alejandro
c9ad82edc3 Merge pull request #2642 from penpot/niwinz-backend-webhooks-4
🎉 Add webhooks processing & errors UI integration
2022-12-14 15:53:11 +01:00
Alejandro
430752383b Merge pull request #2664 from penpot/alotor-improve-thumbnails
 Improve thumbnail generation
2022-12-14 15:26:41 +01:00
alonso.torres
e9064611cf Improve thumbnail generation 2022-12-14 14:38:56 +01:00
alonso.torres
2ce36ce052 Merge remote-tracking branch 'origin/staging' into develop 2022-12-14 13:01:23 +01:00
Pablo Alba
84903ae1f2 🐛 Fix unable to select text at assets inputs in firefox 2022-12-14 12:00:06 +01:00
Andrey Antukh
507800ae4e Merge pull request #2659 from penpot/alotor-flex-layout-features
Flex layout features
2022-12-14 09:07:40 +01:00
Andrey Antukh
d56082307b 🎉 Add update-file (batched) to webhooks 2022-12-13 23:14:55 +01:00
Andrey Antukh
782f2ed57d 🎉 Enable comments events on webhooks 2022-12-13 23:13:48 +01:00
Andrey Antukh
d7459db292 🎉 Add task deduplication by label 2022-12-13 23:13:11 +01:00
Pablo Alba
fd7d189bb7 💄 Change style of cancel button on webhooks modal 2022-12-13 22:22:21 +01:00
alonso.torres
5aaaab4f80 Show ghost when moving elemets from/into layout 2022-12-13 17:45:47 +01:00
alonso.torres
03228a9801 🐛 Fix problem with snap pixel 2022-12-13 17:45:47 +01:00
alonso.torres
2fbd1d8078 🐛 Fix problem with hug and item margins 2022-12-13 17:45:47 +01:00
alonso.torres
029efefb62 Import/export layout data 2022-12-13 16:43:28 +01:00
Andrey Antukh
ae79ee435e 🎉 Add many rpc calls to webhooks registry 2022-12-13 16:17:31 +01:00
Andrey Antukh
240e480b2e 🎉 Allow application/json on Accept header 2022-12-13 16:17:31 +01:00
Andrey Antukh
f2b60261f8 🎉 Add tests for webhooks rpc and logger 2022-12-13 16:17:31 +01:00
Andrey Antukh
21abd98b95 Integrate error handling for webhooks UI 2022-12-13 16:17:31 +01:00
Andrey Antukh
edaa62b05b 💄 Replace us/assert with us/assert! on dashboard data ns 2022-12-13 16:17:31 +01:00
Andrey Antukh
5b9f0ed0b1 🎉 Add webhook processing worker 2022-12-13 16:17:31 +01:00
Andrey Antukh
d768711caa Improve null handling on more db helpers 2022-12-13 16:17:31 +01:00
Andrey Antukh
d584ae5a0f Improve json encode/decode api 2022-12-13 16:17:31 +01:00
Andrey Antukh
9debfa3b27 📎 Minor cange on exception formating 2022-12-13 16:17:31 +01:00
Andrey Antukh
c0a4b7dc76 Improve worker queue management
and add specific worker instance for webhooks
2022-12-13 16:17:31 +01:00
Andrey Antukh
7f589b09ca ♻️ Move audit http handler to RPC 2022-12-13 16:17:31 +01:00
Andrey Antukh
27c4cdb5f9 Merge pull request #2658 from penpot/palba-inspect-bugs
Fix inspect bugs
2022-12-13 13:16:27 +01:00
Andrey Antukh
fb0cf6fcbc 📎 Revert some hacky code from previous commit 2022-12-13 13:14:44 +01:00
Andrey Antukh
7ca74c0467 📎 Fix unexpected linter issue 2022-12-13 12:58:57 +01:00
Pablo Alba
cd6aa8f691 🐛 Fix can't select a board in inspect mode 2022-12-13 12:57:32 +01:00
Pablo Alba
90bc9943bc 🐛 Fix expand right sidebar on workspace inspect 2022-12-13 12:46:53 +01:00
Andrey Antukh
fe7b4331d1 Merge pull request #2653 from penpot/alotor-poc-improve-transform
♻️ Changed transform calculation
2022-12-13 12:37:18 +01:00
alonso.torres
e1de3ba5e7 ♻️ Changed transform calculation 2022-12-13 12:36:54 +01:00
Eva Marco
5cd108c21a Merge pull request #2657 from penpot/palba-inspect-bugfixing
🐛 Fix flex elemen info doesn't show on inspect tab
2022-12-13 11:59:54 +01:00
Andrey Antukh
c53420c1f5 Merge pull request #2655 from penpot/eva-fix-login-icon
🐛 Fix home icon in login page
2022-12-13 08:47:45 +01:00
Pablo Alba
05e437ee06 🐛 Fix flex elemen info doesn't show on inspect tab 2022-12-12 16:56:25 +01:00
Eva
d0d63169e2 🐛 Fix home icon in login page 2022-12-12 16:53:05 +01:00
Andrey Antukh
c148326d1c Merge pull request #2648 from penpot/palba-empty-inspect
🎉 Add placeholder for empty inspect tab
2022-12-12 15:32:18 +01:00
Pablo Alba
76a19a82c3 🎉 Add placeholder for empty inspect tab 2022-12-12 15:26:36 +01:00
Andrey Antukh
4d1a22bd11 Merge pull request #2606 from penpot/eva-a11y-login
 Improve login accessibility
2022-12-12 13:53:15 +01:00
Eva
95a18fce8d Improve login accessibility 2022-12-12 13:52:58 +01:00
Andrey Antukh
8bc265a598 Merge pull request #2647 from penpot/alotor-flex-ui-changes
 Changes to the flex UI
2022-12-12 13:50:30 +01:00
alonso.torres
de6cba8c0b Changes to the flex UI 2022-12-12 13:50:14 +01:00
Andrey Antukh
f2fe1dd6f8 Merge pull request #2645 from penpot/palba-webhooks-flag
🎉 Add flag for enabling webhooks
2022-12-12 13:47:33 +01:00
Andrey Antukh
2ec479afd4 Merge pull request #2651 from penpot/alotor-fix-empty-thumbnails
🐛 Fix problems with empty thumbnails
2022-12-12 13:45:03 +01:00
Andrey Antukh
67682fe211 🐛 Fix shape exportation 2022-12-12 07:34:11 +01:00
Ahmad HosseinBor
1b30d023ef 🌐 Add translations for: Persian.
Currently translated at 54.9% (668 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2022-12-10 16:48:15 +01:00
Alex Howell
806a818cb3 🌐 Add translations for: Romanian.
Currently translated at 99.5% (1210 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ro/
2022-12-10 16:48:15 +01:00
GradelerM
4014fec195 🌐 Add translations for: French.
Currently translated at 92.0% (1119 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-12-10 16:48:14 +01:00
Andrey Antukh
79f27a849c Merge pull request #2652 from ryanbreen/fix-duplicate-require
💄 Remove duplicate require in backend/dev/user.clj
2022-12-10 14:21:08 +01:00
Ryan Breen
f607540f23 💄 Remove duplicate require in backend/dev/user.clj
Cleanup a duplicate require of srepl

Signed-off-by: Ryan Breen <rbreen@zmags.com>
2022-12-10 07:14:00 -05:00
alonso.torres
8609308cb4 🐛 Fix problems with empty thumbnails 2022-12-10 00:08:01 +01:00
Andrey Antukh
28f1e671cb Merge pull request #2650 from ryanbreen/comment-move-fix
🐛 Fix moving comment threads
2022-12-09 23:31:04 +01:00
Ryan Breen
c411ce248e 🐛 Fix moving comment threads
Moving comment threads was failing with assert errors because the speced type is gpt/point whereas update-comment-thread-position was passing a raw map of coordinates.

Signed-off-by: Ryan Breen <rbreen@zmags.com>
2022-12-09 13:35:02 -05:00
Pablo Alba
cae0311db6 🌐 Added translation for: Korean. 2022-12-09 16:36:55 +01:00
Pablo Alba
d283c6418e 🎉 Add flag for enabling webhooks 2022-12-09 13:00:23 +01:00
alonso.torres
415a3cad7b Calculate selrect from points 2022-12-09 11:01:24 +01:00
Andrey Antukh
36d2f72768 Merge pull request #2640 from penpot/alotor-performance-enhance
Flex layout fixes
2022-12-07 15:39:53 +01:00
alonso.torres
a64d92b005 Change default parameters on selection to layout 2022-12-07 15:05:38 +01:00
alonso.torres
172f4c142b Remove unused functions 2022-12-07 15:05:38 +01:00
alonso.torres
4b55c7a8e0 🐛 Fix problem with text not growing the hug container 2022-12-07 15:05:38 +01:00
alonso.torres
7dbe39b1b5 🐛 Fix problems with cache and thumbnails 2022-12-07 15:05:38 +01:00
alonso.torres
6c2d2e142b Improve reflow texts 2022-12-07 15:05:38 +01:00
Andrey Antukh
2183599c8d Merge pull request #2639 from penpot/palba-webhooks-crud
🎉 Add team webhooks section
2022-12-07 14:39:02 +01:00
Pablo Alba
cdbfec4f19 🎉 Add team webhooks section 2022-12-07 14:08:14 +01:00
María Ozámiz
7c6dfef1c6 🌐 Add translations for: Galician.
Currently translated at 33.9% (412 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/gl/
2022-12-06 22:48:04 +01:00
Alex Howell
51440964a7 🌐 Add translations for: Romanian.
Currently translated at 76.4% (929 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ro/
2022-12-06 22:48:04 +01:00
Ally Tiago
f7a819fd57 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 99.9% (1214 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-12-06 22:48:03 +01:00
Pablo Alba
02d619ed48 Merge pull request #2635 from penpot/niwinz-backend-webhooks-3
🎉 Add webhook RPC API
2022-12-05 17:06:38 +01:00
Andrey Antukh
d97afa0e6d 📎 Add helper/devenv script for kill nonresponsive repl 2022-12-05 15:20:29 +01:00
Andrey Antukh
baade567ca 📎 Improve bundle run template script 2022-12-05 15:20:29 +01:00
Andrey Antukh
39b9daa3a7 🎉 Add webhooks rpc API 2022-12-05 15:20:29 +01:00
Pablo Alba
d8bb62c498 🐛 Fix layer drag enabled on chrome when is readonly 2022-12-05 10:37:56 +01:00
Alejandro
b45a0a979b Merge pull request #2613 from penpot/niwinz-backend-webhooks-2
♻️ Refactor audit and http client module
2022-12-05 10:34:48 +01:00
Andrey Antukh
861328af3e ⬆️ Update promesa library to 10.0.570 2022-12-05 09:06:24 +01:00
Andrey Antukh
8bad9d8340 ♻️ Refactor loggers/audit, auth/oidc, and http/clent modules 2022-12-05 08:53:00 +01:00
Andrey Antukh
7f7efc5760 Improve exception formating on backend 2022-12-05 08:51:54 +01:00
Salman Hossain Saif
378b9f3f67 🌐 Add translations for: Bengali.
Currently translated at 1.5% (19 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/bn/
2022-12-03 15:47:26 +01:00
María Ozámiz
cb3a7a1da0 🌐 Add translations for: Galician.
Currently translated at 31.1% (379 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/gl/
2022-12-03 15:47:25 +01:00
andy
6f4b533fc7 🌐 Added translation for: Bengali. 2022-12-02 14:10:07 +01:00
alonso.torres
e43fc0feb0 🐛 Fix masks in layout flex 2022-12-02 10:21:34 +01:00
alonso.torres
e53e715861 Disable feature toggle for layout flex 2022-12-02 10:21:34 +01:00
alonso.torres
32350bcf87 Improved performance for auto-width/auto-height texts 2022-12-02 10:21:34 +01:00
alonso.torres
29b1b4dbc9 🐛 Fix problem with hug layout and groups 2022-12-02 10:21:34 +01:00
Andrey Antukh
2c558a6a02 Merge pull request #2625 from penpot/hiru-detect-version-import
 Include features info in exported zipfiles
2022-12-02 09:19:28 +01:00
Andrey Antukh
95876c271c Merge pull request #2619 from penpot/hiru-fix-blank-page-import
🐛 Fix adding an extra blank page on import
2022-12-01 17:55:51 +01:00
Andrey Antukh
ccff27ac23 Merge pull request #2628 from penpot/hiru-fix-touched-import
🐛 Avoid setting touched flags in imported components
2022-12-01 17:55:30 +01:00
Andrés Moya
148f6cb3c2 🐛 Fix adding an extra blank page on import 2022-12-01 17:15:20 +01:00
alonso.torres
c9dbeec689 🐛 Fix right sidebar style 2022-12-01 17:12:08 +01:00
Andrés Moya
2b7c967920 🐛 Avoid setting touched flags in imported components 2022-12-01 16:01:51 +01:00
Andrés Moya
94cdd4a481 Include features info in exported zipfiles 2022-12-01 15:33:13 +01:00
Andrey Antukh
296b6c646e 🐛 Fix incorrect flag parsing on frontend features 2022-12-01 15:02:56 +01:00
Alejandro Alonso
ad491ccc8f Merge remote-tracking branch 'origin/staging' into develop 2022-12-01 14:50:26 +01:00
Alejandro
efb4b2cb7d Merge pull request #2623 from penpot/niwinz-parse-frontend-features-from-flags
 Parse frontend features from flags
2022-12-01 14:28:19 +01:00
Andrey Antukh
0e949679d9 Parse frontend features from flags
Simplifies setting features on deployments.
2022-12-01 13:43:57 +01:00
Alejandro
1b8e4dfdfa Merge pull request #2621 from penpot/superalex-fix-develop
🐛 Fix develop branch
2022-12-01 11:48:34 +01:00
GradelerM
dbdc656e3e 🌐 Add translations for: French.
Currently translated at 89.1% (1083 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-12-01 11:47:02 +01:00
Alejandro Alonso
afe8883e37 🐛 Fix develop branch 2022-12-01 11:42:18 +01:00
Andrey Antukh
d5398e672f Merge pull request #2614 from penpot/superalex-support-library-colors-on-library-build
🎉 Add support assets management via library
2022-12-01 11:32:29 +01:00
Alejandro Alonso
3252088494 🎉 Add support typography management via library 2022-12-01 11:30:37 +01:00
Alejandro Alonso
fffacf3552 🎉 Add support media management via library 2022-12-01 11:30:33 +01:00
Alejandro Alonso
a19417417a 🎉 Add support components managemente via library 2022-12-01 11:30:29 +01:00
Alejandro Alonso
4c1f2cfded 🎉 Add support color management via library 2022-12-01 11:30:24 +01:00
Alejandro Alonso
a907041564 Merge remote-tracking branch 'origin/staging' into develop 2022-12-01 10:57:32 +01:00
Andrey Antukh
32cd32649e Merge pull request #2617 from penpot/palba-workspace-inspect-tab
🎉 Add inspect tab to workspace
2022-11-30 14:56:52 +01:00
Andrey Antukh
678b6a285f Merge pull request #2616 from penpot/hiru-pretty-debug
💄 Make cleaner debug logs
2022-11-30 14:56:20 +01:00
Andrés Moya
de1a3de433 💄 Make cleaner debug logs 2022-11-30 14:07:56 +01:00
Pablo Alba
412564b418 🎉 Add inspect tab to workspace 2022-11-30 13:55:09 +01:00
Andrey Antukh
c451c7bb9d 🐛 Fix regression on worker task handling 2022-11-30 13:13:11 +01:00
alonso.torres
be24989eab 🐛 Fix problem with hug layout 2022-11-30 12:21:00 +01:00
alonso.torres
a439fb65ce 🐛 Fix multiple selection in layout container and items 2022-11-30 11:49:08 +01:00
Andrey Antukh
c98635bca1 Merge pull request #2610 from penpot/alotor-performance-enhance
Alotor performance enhance
2022-11-30 10:42:09 +01:00
alonso.torres
0d2b228eb7 Keep group constraint behaviour inside flex layout 2022-11-30 10:00:30 +01:00
alonso.torres
c79d549f53 Change modifiers to records 2022-11-30 10:00:30 +01:00
alonso.torres
600f9ef071 Performance improvements 2022-11-30 10:00:30 +01:00
Andrey Antukh
04243be4a5 📎 Update frontend bench namespace 2022-11-30 10:00:30 +01:00
Andrey Antukh
fc4e755f2b Optimize point functions 2022-11-30 10:00:30 +01:00
Andrey Antukh
c28534555b 📎 Add minor microptimizations and tests to points->rect 2022-11-30 10:00:30 +01:00
Andrey Antukh
380cba3a72 📎 Add bench namespace to fronend/dev 2022-11-30 10:00:29 +01:00
Andrey Antukh
89a19dec5b 🎉 Add cljs optimized get-prop helper macro 2022-11-30 10:00:29 +01:00
Andrey Antukh
f6305db2a8 Reorganize a bit the common.data ns 2022-11-30 10:00:29 +01:00
Andrey Antukh
197eff93e8 📎 Fix nodejs compatibility issue on uuid_impl 2022-11-30 10:00:29 +01:00
Andrey Antukh
12cc5c6c97 Merge pull request #2600 from penpot/palba-workspace-read-only
🎉 Add workspace read-only setting
2022-11-29 17:45:37 +01:00
Pablo Alba
cd47c0356a 🎉 Add workspace read-only setting 2022-11-29 17:28:00 +01:00
Dário
797aa68bfa 🌐 Add translations for: Chinese (Simplified).
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-11-29 15:48:08 +01:00
HIYIZI
80c17e5dcf 🌐 Add translations for: Chinese (Simplified).
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-11-29 15:48:07 +01:00
K.B.Dharun Krishna
7083c4e111 🌐 Add translations for: Tamil.
Currently translated at 2.1% (26 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ta/
2022-11-28 15:06:27 +01:00
HIYIZI
e0e0f0a9b1 🌐 Add translations for: Chinese (Simplified).
Currently translated at 99.5% (1210 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-11-28 15:06:27 +01:00
Maemolee
b57c5ec92a 🌐 Add translations for: Chinese (Simplified).
Currently translated at 99.5% (1210 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-11-28 15:06:27 +01:00
Andrey Antukh
1c2a462124 Merge pull request #2596 from penpot/niwinz-backend-webhooks
 Improve scalability of the worker abstraction
2022-11-28 12:46:41 +01:00
Andrey Antukh
329b1eb6f3 📎 Fix on test initialization on CI 2022-11-28 12:37:48 +01:00
Andrey Antukh
bcfb4e0f81 🐛 Fix metrics code on rpc.climit 2022-11-28 12:25:30 +01:00
Andrey Antukh
69011007ac Change execution model of storage.tmp cleaner 2022-11-28 12:21:46 +01:00
Andrey Antukh
0600b2abe4 ♻️ Make the worker abstraction more scalable
Start using redis for dispatcher to worker communication
and add the ability to start multiple threads to worker
for increase the concurrency.
2022-11-28 12:21:44 +01:00
Andrey Antukh
13a092b192 ♻️ Normalize internal naming on the worker module 2022-11-28 12:20:58 +01:00
Andrey Antukh
10bf6c5e56 ♻️ Normalize redis api and its usage in msgbus module 2022-11-28 12:20:58 +01:00
Alejandro Alonso
427e43585c 🐛 Fix strokes class 2022-11-28 09:56:52 +01:00
Andrey Antukh
667fabbdc5 Merge pull request #2602 from penpot/alotor-performance-enhance
 Viewport and hug performance enhances
2022-11-28 09:33:12 +01:00
Eva Marco
8413a8eb3e Merge pull request #2599 from penpot/niwinz-restore-search-rpc
🎉 Restore removed by mistake search rpc method
2022-11-28 09:02:05 +01:00
alonso.torres
f579bb0c8d Viewport and hug performance enhances 2022-11-25 16:08:41 +01:00
Andrey Antukh
706714d557 🎉 Restore removed by mistake search rpc method 2022-11-25 10:42:17 +01:00
Andrey Antukh
399d57ace0 Merge branch 'iprithvitharun-2588-invitations-page-improvements' into develop 2022-11-24 16:53:16 +01:00
Prithvi Tharun
f2525f8159 Add several improvements to invitations page 2022-11-24 16:53:00 +01:00
Andrey Antukh
9593ded808 📎 Add missing copy on postgres upgrade script 2022-11-24 13:38:53 +01:00
Andrey Antukh
99adbbe91d 📎 Add postgres-upgrade.sh script 2022-11-24 12:47:41 +01:00
Andrey Antukh
6f1c2f474b 📎 Add missing change on devenv compose 2022-11-24 12:21:58 +01:00
Andrey Antukh
0061b37c13 Merge pull request #2597 from penpot/alotor-performance-enhance
 Improve transforms performance
2022-11-24 11:06:34 +01:00
alonso.torres
69bb4654c9 Improve transforms performance 2022-11-24 10:01:37 +01:00
Eva
694d90d485 Add id functionality to undo transactions 2022-11-24 10:00:32 +01:00
Eva
32746a5960 🐛 Fix some layout errors 2022-11-24 10:00:32 +01:00
Andrey Antukh
7c3f87d7b0 Merge pull request #2585 from penpot/superalex-fix-show-board-miniature-in-manual-overlay-setting
🐛 Fix show board miniature in manual overlay setting
2022-11-24 09:07:17 +01:00
Alejandro Alonso
b4e4a5cab4 🐛 Fix show board miniature in manual overlay setting 2022-11-24 09:06:42 +01:00
Andrey Antukh
c12c9a4419 Merge pull request #2566 from penpot/hiru-remove-graphics-popup
 Enhance modal of convert graphics into components
2022-11-24 09:06:04 +01:00
Andrés Moya
cc60cfc86d Enhance modal of convert graphics into components 2022-11-24 09:05:50 +01:00
Andrey Antukh
879c477ada Merge remote-tracking branch 'origin/staging' into develop 2022-11-24 08:52:35 +01:00
Andrey Antukh
6b7adec617 Merge pull request #2592 from penpot/palba-handoff-improvements
 Add several improvements to handoff
2022-11-23 13:49:36 +01:00
Pablo Alba
461e5cb376 Add several improvements to handoff 2022-11-23 09:44:04 +01:00
Andrey Antukh
77a397de0c Merge pull request #2586 from penpot/hiru-fix-min-size
🐛 Fix min size when creating shapes
2022-11-23 09:39:18 +01:00
Andrey Antukh
c656dd146c Merge pull request #2589 from penpot/alotor-fixes
Flex layout fixes
2022-11-22 17:15:40 +01:00
alonso.torres
441e142349 🐛 Fix reflow layout when changes in paths and texts 2022-11-22 17:08:23 +01:00
alonso.torres
54fd836dd4 🐛 Fix problem when dragging layout children with frames 2022-11-22 16:41:44 +01:00
alonso.torres
7ffdf21657 🐛 Fix paste shapes into layout 2022-11-22 16:40:20 +01:00
Andrés Moya
8a6f1d82e5 🐛 Fix min size when creating shapes 2022-11-22 15:38:04 +01:00
Andrey Antukh
87ebb2e24c ⬆️ Update yetti dependency to v9.11 2022-11-22 14:06:14 +01:00
Andrey Antukh
9334138510 🐛 Fix persistence loop on dev code hot reload 2022-11-22 14:06:14 +01:00
Andrey Antukh
1b9dea01e2 🔥 Remove unused d/update-vals function
Already available as clojure.core/update-vals
2022-11-22 14:06:14 +01:00
Andrey Antukh
ccb7c466bf 🎉 Add lazy loading and storage/pointer-map support on viewer 2022-11-22 14:06:14 +01:00
Andrey Antukh
c72be4ae2a ⬆️ Update redis and postgresql on devenv docker 2022-11-22 14:06:14 +01:00
Andrey Antukh
fbd042d4ee 🐛 Remove not working chrono-units on duration constructor 2022-11-22 14:06:14 +01:00
Andrey Antukh
bbf95434d8 🎉 Add lazy loading and storage/pointer-map support on workspace
This also rewrites the workspace load process making it a bit more
efficient independently if lazy loading is used.
2022-11-22 14:06:14 +01:00
alonso.torres
2a46989ec9 🐛 Fix problem with flex direction 2022-11-22 12:06:12 +01:00
alonso.torres
baf9124304 🐛 Fix problem with texts in viewer 2022-11-22 12:05:59 +01:00
Prithvi Tharun
6565655ac3 🐛 Fix the corners icon name
Closes #2581
2022-11-22 11:46:32 +01:00
Pablo Alba
3d381b92d9 Merge pull request #2580 from iprithvitharun/2579-updating-login-error-msg
 Login error message updated
2022-11-21 16:45:53 +01:00
Prithvi Tharun
08399ebac1 Error message updated
Updated to be accurate and concise.
2022-11-21 19:31:33 +05:30
Andrey Antukh
6a296a3e52 Merge pull request #2575 from penpot/hiru-reset-changes-deleted-component 2022-11-21 13:59:05 +01:00
Andrés Moya
af03f720b0 Allow to reset changes from a deleted component 2022-11-21 13:58:31 +01:00
Andrey Antukh
5400fdb293 Merge pull request #2573 from penpot/hiru-delete-copy-elements
🎉 When deleting a shape inside a component copy, just hide it
2022-11-21 11:56:50 +01:00
Andrés Moya
831839080f 🎉 When deleting a shape inside a component copy, just hide it 2022-11-21 11:56:15 +01:00
Andrey Antukh
8b7310032b Merge pull request #2562 from penpot/hiru-show-main-component
 Improve show main component menu
2022-11-20 20:26:07 +01:00
Andrés Moya
848f5125d8 Improve show main component menu 2022-11-20 20:25:53 +01:00
Andrey Antukh
9fd778f9c1 Merge pull request #2561 from penpot/hiru-bulk-import-graphics 2022-11-20 20:24:55 +01:00
Andrés Moya
ce7852329a 🎉 Add the ability to create components in bulk from images 2022-11-20 20:24:33 +01:00
Bogi Napoleon Wennerstrøm
08eb2bceb1 🌐 Add translations for: Faroese.
Currently translated at 14.1% (172 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-11-18 20:48:29 +01:00
Pablo Alba
527e4643da Merge pull request #2565 from penpot/eva-autolayout-code
Eva autolayout code
2022-11-18 13:17:13 +01:00
Eva
e3616ea2b5 🔧 Update highlight.js library 2022-11-18 09:42:50 +01:00
Eva
2a2b5c7dba Add code block to layout elements 2022-11-18 09:42:50 +01:00
Tummas Jóhan Sigvardsen
f439d10128 🌐 Add translations for: Faroese.
Currently translated at 13.2% (161 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-11-17 20:21:01 +01:00
Bogi Napoleon Wennerstrøm
b87022ef28 🌐 Add translations for: Faroese.
Currently translated at 13.2% (161 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-11-17 20:21:01 +01:00
Alejandro Alonso
93bbe1b2f8 Merge remote-tracking branch 'origin/staging' into develop 2022-11-17 12:21:56 +01:00
Andrey Antukh
3de217a52e Merge pull request #2537 from penpot/alotor-autolayout-v2
Autolayout & refactor transformations
2022-11-17 11:35:41 +01:00
alonso.torres
afa6a97693 Fixes problem with bool shapes 2022-11-17 09:29:47 +01:00
alonso.torres
32756db1c1 Redone the calculus of sizing auto 2022-11-17 09:29:47 +01:00
alonso.torres
efc1b87ab0 Performance improvements 2022-11-17 09:29:47 +01:00
alonso.torres
7b2f0303e8 Fixed problems with masks 2022-11-17 09:29:47 +01:00
alonso.torres
4c5e8f42ce Review changes 2022-11-17 09:29:47 +01:00
alonso.torres
6e35b5c6b6 Fixed problem with new modifiers and text auto-heigh 2022-11-17 09:29:47 +01:00
alonso.torres
39041bb63b Fix problem with constraints 2022-11-17 09:29:47 +01:00
Eva
56efb571be Add add flex layout option in context menu 2022-11-17 09:29:47 +01:00
alonso.torres
c1affe75e1 Fix problem with fixed constraints 2022-11-17 09:29:47 +01:00
alonso.torres
cdaba395c4 Small fixes for flex layout 2022-11-17 09:29:45 +01:00
alonso.torres
e61e76a074 Fix problems with flipped layouts 2022-11-17 09:29:31 +01:00
alonso.torres
a2e26210d1 Renamed modifiers functions 2022-11-17 09:29:31 +01:00
alonso.torres
b5df7bbfc5 Remove constraints when autolayout 2022-11-17 09:29:30 +01:00
alonso.torres
7375eed18f Refactor modifiers 2022-11-17 09:29:03 +01:00
alonso.torres
861eb283e8 Flex layout small fixes 2022-11-17 09:29:03 +01:00
alonso.torres
c86d88834e Fix problems moving frames 2022-11-17 09:29:03 +01:00
alonso.torres
7caf4b9136 Removed constraints when layout child 2022-11-17 09:29:03 +01:00
alonso.torres
4ecc166055 Remove fill/auto when resizing 2022-11-17 09:29:03 +01:00
alonso.torres
7f0054959f Hug content to frames 2022-11-17 09:29:03 +01:00
alonso.torres
0274567d83 Visual adjustments 2022-11-17 09:29:03 +01:00
alonso.torres
cebda20dd4 Adapt to handoff changes 2022-11-17 09:29:03 +01:00
alonso.torres
94602feab1 Updated translation keys 2022-11-17 09:29:03 +01:00
alonso.torres
503a1dabac Align self and stretch fixes 2022-11-17 09:29:03 +01:00
alonso.torres
81d2f9dd9d Adds align-content options 2022-11-17 09:29:03 +01:00
alonso.torres
4b61e3228f Add min/max width/height for elements 2022-11-17 09:29:03 +01:00
alonso.torres
b8c90fdcf3 Refactor flex layout namespace 2022-11-17 09:29:03 +01:00
alonso.torres
58fd20094a Adapted dynamic modifiers and options for new modifiers 2022-11-17 09:29:03 +01:00
alonso.torres
af098bb64d Adds integration with new UI 2022-11-17 09:29:03 +01:00
alonso.torres
11f347941e Refactor for new modifiers 2022-11-17 09:29:03 +01:00
alonso.torres
c3ed46d3ab Move auto-layout children 2022-11-17 09:29:03 +01:00
alonso.torres
025cac0228 Drop-zone autolayout calculation 2022-11-17 09:29:03 +01:00
alonso.torres
8bcb9e1976 Autofill vectors calculation 2022-11-17 09:29:03 +01:00
alonso.torres
bc890a0b33 Refactor frames 2022-11-17 09:29:03 +01:00
alonso.torres
8d9ed4f8af Fill elements in auto-layout 2022-11-17 09:29:03 +01:00
alonso.torres
c01c46041d Adds autolayout positions calculations 2022-11-17 09:29:02 +01:00
alonso.torres
5050c35257 Adds layout items options 2022-11-17 09:26:17 +01:00
Pablo Alba
3c424786a7 Show board miniature in manual overlay setting 2022-11-16 14:31:44 +01:00
Pablo Alba
1affb53a26 Better overlays interactions on boards inside boards 2022-11-16 14:31:44 +01:00
Andrey Antukh
58dbe21544 Merge branch 'hiru-remove-graphics' into develop 2022-11-14 14:44:55 +01:00
Andrés Moya
6b1ecfd89c 📎 Add some code enhancements 2022-11-14 14:44:18 +01:00
Andrés Moya
20738545b8 🎉 Transform graphics into components 2022-11-11 09:56:40 +01:00
Andrey Antukh
8852ed815f 🐛 Fix unexpected exception on file-gc cron task 2022-11-10 14:54:50 +01:00
Andrey Antukh
fde03e21b0 🎉 Add conditional reading to RPC 2022-11-10 14:54:50 +01:00
Andrey Antukh
5192b36669 💄 Add some cosmetic adjustements 2022-11-10 14:54:50 +01:00
Andrey Antukh
b20d2badfe Load workspace thumbnails in a separated request 2022-11-10 14:54:50 +01:00
Andrey Antukh
dfb73192b8 📎 Change rpc middleware order (minor) 2022-11-10 14:54:50 +01:00
Andrey Antukh
59ba87d9cd Properly report malformed json error 2022-11-10 14:54:50 +01:00
Andrey Antukh
38ed3b076a 🔥 Remove unused config entry 2022-11-10 14:54:50 +01:00
Andrey Antukh
f3472fcd79 📚 Add documentation to objects and pointer map namespaces 2022-11-08 13:02:14 +01:00
Andrey Antukh
3ef99c287e ♻️ Refactor tests directory structure 2022-11-08 13:02:14 +01:00
Andrey Antukh
12e2d3ad96 📎 Rename app-tests to backend-tests for naming consistency 2022-11-08 13:02:14 +01:00
Andrey Antukh
0dc3dba428 📎 Set definitive fressian handler ids for objects and pointer map 2022-11-08 13:02:14 +01:00
Andrey Antukh
efb0ec46bf 🎉 Add tests for pointer map 2022-11-08 13:02:14 +01:00
Andrey Antukh
aa9e125e31 🎉 Add tests for objects map 2022-11-08 13:02:14 +01:00
Andrey Antukh
16afa90b9c Improve internal impl of objects-map 2022-11-08 13:02:14 +01:00
Andrey Antukh
fa93e5a1a7 ♻️ Refactor backend tests directory tree 2022-11-08 13:02:14 +01:00
Andrey Antukh
1298956d92 Improve srepl helpers for activate profile 2022-11-08 13:02:14 +01:00
Andrey Antukh
67b4d5a1c7 🐛 Fix issues when RPC returns nil values 2022-11-08 13:02:14 +01:00
Andrey Antukh
bfccae2373 🔥 Remove unused namespace 2022-11-08 13:02:14 +01:00
Andrey Antukh
5d9606f4d0 📎 Update .gitignore file 2022-11-08 13:02:14 +01:00
Andrey Antukh
76333cec26 🎉 Integrate storage/pointer-map file feature 2022-11-08 13:02:14 +01:00
Andrey Antukh
a42d7164ad 🎉 Add more helpers on srepl ns 2022-11-08 13:02:14 +01:00
Andrey Antukh
c027de2592 Make nil safe some decode helpers on db ns 2022-11-08 13:02:14 +01:00
Andrey Antukh
ce99ca0aa8 🎉 Add generic PointerMap abstraction 2022-11-08 13:02:14 +01:00
Andrey Antukh
751b99bf47 ⬆️ Update devenv dockerfiles 2022-11-08 13:02:14 +01:00
Andrey Antukh
67fc499001 Merge branch 'niwinz-enhancements' into develop 2022-11-07 16:57:35 +01:00
Andrey Antukh
6713d8eb3f Make metrics more modular 2022-11-07 11:18:22 +01:00
Andrey Antukh
e36d611f19 🔥 Remove obsolete code from scripts/repl 2022-11-07 11:17:49 +01:00
Andrey Antukh
111cf54ff6 ♻️ Refactor common module tests and add generative testing for types 2022-11-07 10:22:16 +01:00
Andrey Antukh
1f73558f1b 📎 Fix linter issues 2022-11-07 10:05:56 +01:00
Andrey Antukh
37ad04d2a6 🎉 Add robust concurrency limiter for RPC 2022-11-07 10:05:56 +01:00
Andrey Antukh
6ad9a5aadb 🐛 Fix many bugs on rlimit module 2022-11-07 08:37:43 +01:00
Andrey Antukh
9c33dc529d Improve error report list template 2022-11-07 08:37:43 +01:00
Andrey Antukh
82d72fd388 🐛 Add missing profile-id on the internal error reports 2022-11-07 08:37:43 +01:00
Andrey Antukh
43ab19f690 ♻️ Refactor (minor) of http session code
The rationale behind the refactor:
- Make available profile data to other middlewares without
  the need to access to the database (mainly for error reporting).
- Align with codestyle with the rest of internal modules.
- Simplify code.
2022-11-07 08:37:43 +01:00
Andrey Antukh
dbe516f725 ⬆️ Update deps (bugfixes on deps) 2022-11-07 08:37:43 +01:00
Stas Haas
17d1c16d9c 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-11-05 11:09:39 +01:00
Andrés Moya
358d25680b 🐛 Yet some more typos 2022-11-03 15:37:05 +01:00
Andrey Antukh
57e7691e66 Merge remote-tracking branch 'origin/staging' into develop 2022-11-03 14:14:27 +01:00
Andrés Moya
ee4f063889 🐛 Fix one more typo 2022-11-03 14:13:31 +01:00
Andrés Moya
38d74b93b3 🐛 Fix some typos in library modals 2022-11-03 14:11:48 +01:00
Tummas Jóhan Sigvardsen
0e3675ce1f 🌐 Add translations for: Faroese.
Currently translated at 11.6% (141 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-11-01 15:29:29 +01:00
Bogi Napoleon Wennerstrøm
92cd4693f4 🌐 Add translations for: Faroese.
Currently translated at 11.6% (141 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-11-01 15:29:28 +01:00
Tatsuto Yamamoto
7905b9fbeb 🌐 Add translations for: Japanese (jpn_JP).
Currently translated at 21.8% (265 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/jpn_JP/
2022-11-01 15:29:28 +01:00
Andrey Antukh
a85a65a554 Merge branch 'staging' into develop 2022-10-31 10:44:15 +01:00
Mikel Larreategi
0b4318b32c 🌐 Add translations for: Basque.
Currently translated at 99.5% (1210 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/eu/
2022-10-29 15:03:18 +02:00
Stas Haas
0fd80bedf2 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-29 15:03:17 +02:00
Marius
380f297af3 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-29 15:03:17 +02:00
Henrik Steffens
f8f0944816 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-29 15:03:17 +02:00
nautilusx
a5f833759a 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-29 15:03:16 +02:00
Tummas Jóhan Sigvardsen
7ab90c6b6f 🌐 Add translations for: Faroese.
Currently translated at 9.0% (110 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-27 15:02:46 +02:00
Pablo Alba
a5a0d51ca7 🌐 Add translations for: French.
Currently translated at 87.9% (1069 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-10-27 15:02:46 +02:00
Eva
d663d2bebf Add new handoff flex item section" 2022-10-27 12:17:25 +02:00
Andrés Moya
c3fe8c8ebd 🐛 Upgrade gitpod docker file 2022-10-27 11:39:19 +02:00
Pablo Alba
afe4250ea9 Merge pull request #2471 from penpot/eva-unpublish-several-libs
🎉 Add unpublish option on context menu
2022-10-27 07:36:33 +02:00
Eva
2375f9ab83 🎉 Add unpublish option on context menu 2022-10-26 09:25:13 +02:00
Pablo Alba
8f325e4303 Merge pull request #2485 from penpot/niwinz-new-langs
Add new langs and some fixes
2022-10-25 17:12:20 +02:00
Pablo Alba
cc577a21db Merge pull request #2528 from penpot/translations
Translations
2022-10-25 17:08:28 +02:00
Pablo Alba
76b235e608 Update translations 2022-10-25 17:07:07 +02:00
Pablo Alba
b98cf29134 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-25 14:22:23 +02:00
Tummas Jóhan Sigvardsen
cc06bb7755 🌐 Add translations for: Faroese.
Currently translated at 7.7% (94 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-25 14:20:35 +02:00
Vin
bd1003e383 🌐 Add translations for: Russian.
Currently translated at 67.1% (816 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2022-10-25 14:20:35 +02:00
Eva Marco
627f497e7f Merge pull request #2497 from penpot/palba-confirm-unpublish-library
 Confirm unpublish library on libraries popup
2022-10-25 08:59:18 +02:00
Andrés Moya
b191df0351 🐛 Fix bug about decoding :features PgArray 2022-10-24 12:27:31 +02:00
Bogi Napoleon Wennerstrøm
76675e1949 🌐 Add translations for: Faroese.
Currently translated at 6.5% (80 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-22 14:05:04 +02:00
Pablo Alba
66055a0b14 Confirm unpublish library on libraries popup 2022-10-21 16:25:25 +02:00
Alejandro Alonso
2ee15c3147 Merge remote-tracking branch 'origin/staging' into develop 2022-10-21 13:22:34 +02:00
Alejandro Alonso
52239a9670 Merge remote-tracking branch 'origin/staging' into develop 2022-10-20 12:44:58 +02:00
Alejandro Alonso
e6b2c40441 Merge remote-tracking branch 'origin/staging' into develop 2022-10-20 12:12:54 +02:00
Eva
e16da8bd2d 🎉 Add new flex layout menu 2022-10-20 11:53:32 +02:00
Andrey Antukh
f51e35aa9c 🐛 Prevent duplicate locale watcher on hot code reload 2022-10-20 00:11:20 +02:00
Andrey Antukh
6323c3ac92 🐛 Fix autodetect language issues 2022-10-20 00:06:50 +02:00
Andrey Antukh
59e6ef5609 🎉 Add new langs (gl, ja_jp, pt_pt, hr) 2022-10-20 00:02:24 +02:00
nautilusx
eafb723415 🌐 Add translations for: German.
Currently translated at 100.0% (1215 of 1215 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-20 00:02:23 +02:00
Andrey Antukh
5463671db1 Merge pull request #2477 from penpot/palba-cleanup-translations
Cleanup translations
2022-10-19 16:32:07 +02:00
Pablo Alba
c24596b7f9 📎 Clean old translations 2022-10-19 16:23:24 +02:00
Pablo Alba
47be9a21f4 🎉 New script to find unused translations 2022-10-19 16:23:01 +02:00
Andrés Moya
39c601a51f 🐛 Fix small import problem 2022-10-19 11:14:07 +02:00
Alejandro Alonso
6894d90137 Merge remote-tracking branch 'origin/staging' into develop 2022-10-19 09:06:11 +02:00
Alejandro Alonso
cdb4524c45 Merge remote-tracking branch 'origin/staging' into develop 2022-10-19 07:56:54 +02:00
Hosted Weblate
89a27e298d Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/
2022-10-18 20:20:18 +02:00
Hosted Weblate
9df8935d48 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/
2022-10-18 20:20:15 +02:00
Tummas Jóhan Sigvardsen
fb3d6b04af 🌐 Add translations for: Faroese.
Currently translated at 5.5% (67 of 1216 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-18 20:20:13 +02:00
Yaron Shahrabani
66c086d4d3 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (1216 of 1216 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2022-10-18 20:20:13 +02:00
nautilusx
5e55dddd87 🌐 Add translations for: German.
Currently translated at 100.0% (1216 of 1216 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-18 20:20:12 +02:00
Oğuz Ersen
bc0f0064ed 🌐 Add translations for: Turkish.
Currently translated at 100.0% (1216 of 1216 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2022-10-18 20:20:12 +02:00
Tummas Jóhan Sigvardsen
ca8919dff0 🌐 Add translations for: Faroese.
Currently translated at 4.7% (58 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-18 20:20:11 +02:00
Stas Haas
5aeac28f36 🌐 Add translations for: German.
Currently translated at 100.0% (1214 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-18 20:20:11 +02:00
Pablo Alba
a6113df552 🐛 Remove unused translation 2022-10-18 20:14:41 +02:00
Andrey Antukh
f28b62cd3d 🐛 Fix inconsistencies on common/types specs 2022-10-18 15:49:18 +02:00
Andrey Antukh
8de1ae0478 📎 Add update-file process time log entry 2022-10-18 15:49:18 +02:00
Andrey Antukh
4fe767c169 Add missing type hints on binfile ns 2022-10-18 15:49:18 +02:00
Andrey Antukh
e50137d186 Minor improvement on internal RPC metadata api 2022-10-18 15:49:18 +02:00
Andrey Antukh
8e6b93e2a7 📎 Set correct license holder on common module sources 2022-10-18 15:49:18 +02:00
Andrey Antukh
2befad433f Remove unnecesary index building on :mov-objects 2022-10-18 15:49:18 +02:00
Andrey Antukh
96af4e26b0 Improve performance issues on backend shape validation 2022-10-18 15:49:18 +02:00
Andrey Antukh
3dc2c52f64 🐛 Fix compatibility issues with jdk19 on util/async ns 2022-10-18 15:49:18 +02:00
Andrey Antukh
b2cbb1e60f Update srepl helpers 2022-10-18 15:49:18 +02:00
Andrey Antukh
c0eab96253 Do not return the whole file on file rename 2022-10-18 15:49:18 +02:00
Andrey Antukh
951b3eb4fe Integrate objects-map and introduce file feature flags 2022-10-18 15:49:18 +02:00
Andrey Antukh
69f084e1df Add deleted at index to file table 2022-10-18 15:49:18 +02:00
Andrey Antukh
c4104c816b 🎉 Add serialization optimized ObjectsMap data type 2022-10-18 15:49:18 +02:00
Andrey Antukh
4ece0cdeda Make transit module extensible 2022-10-18 15:49:18 +02:00
Andrey Antukh
b1296ef765 Make fressian module extensible 2022-10-18 15:49:18 +02:00
Andrey Antukh
5fe3842d1e 🎉 Add v5 blob format (lz4 framed, less gc) 2022-10-18 15:49:18 +02:00
Andrey Antukh
d71c5e4105 📎 Add another print preference method 2022-10-18 15:49:18 +02:00
Andrey Antukh
8ad4dfe454 📎 Minor changes on user namespace 2022-10-18 15:49:18 +02:00
Andrés Moya
c23167a455 Merge pull request #2474 from penpot/translations
Update Translations
2022-10-18 15:33:11 +02:00
Pablo Alba
5a6b7800d7 Update translation files 2022-10-18 13:05:14 +02:00
Pablo Alba
3e118177d0 Merge remote-tracking branch 'weblate/develop' into translations 2022-10-18 12:58:17 +02:00
Andrey Antukh
aaf645bad4 Merge pull request #2459 from penpot/hiru-refactor-types
♻️ Move internal.xxx namespaces to separated files
2022-10-18 11:58:46 +02:00
Bogi Napoleon Wennerstrøm
00e724ce09 🌐 Add translations for: Faroese.
Currently translated at 4.4% (54 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-18 10:01:34 +02:00
Tummas Jóhan Sigvardsen
8451444861 🌐 Add translations for: Faroese.
Currently translated at 4.4% (54 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-18 10:01:34 +02:00
Stas Haas
ef5bc687ab 🌐 Add translations for: German.
Currently translated at 100.0% (1214 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-18 10:01:34 +02:00
Andrés Moya
8463d501cd ♻️ Remove some undeclared namespaces 2022-10-18 09:54:47 +02:00
Andrey Antukh
a59ca5b781 Merge pull request #2443 from penpot/palba-figma-plugin
🎉 Basic changes to use penpot as a library
2022-10-18 09:07:33 +02:00
Pablo Alba
369dc8ffb5 🎉 Basic changes to use penpot as a library 2022-10-18 08:51:28 +02:00
Andrés Moya
04f8bbb1f2 📚 Fix copyright 2022-10-17 16:32:00 +02:00
Alejandro Alonso
10e0cf121b Merge remote-tracking branch 'origin/staging' into develop 2022-10-17 15:21:11 +02:00
Bogi Napoleon Wennerstrøm
948bda7cc8 🌐 Add translations for: Faroese.
Currently translated at 1.0% (13 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-16 15:49:43 +02:00
Tummas Jóhan Sigvardsen
8baaae1770 🌐 Add translations for: Faroese.
Currently translated at 1.0% (13 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fo/
2022-10-16 15:49:43 +02:00
ascarida
ea10ec22c2 🌐 Add translations for: Galician.
Currently translated at 30.6% (372 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/gl/
2022-10-16 15:49:42 +02:00
Yaron Shahrabani
160e0d218b 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (1214 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2022-10-16 15:49:42 +02:00
Andrés Moya
7e70f0ce30 ♻️ Move internal.xxx namespaces to separated files 2022-10-14 18:25:04 +02:00
Pablo Alba
0618aa32a0 Merge pull request #2407 from penpot/hiru-restore-remote-comp
🐛 Make restore component work in external libraries
2022-10-14 18:08:23 +02:00
Alejandro
8b1e8408f2 Merge pull request #2435 from penpot/eva-fix-loading-placeholder
🐛 Fix loading placeholder
2022-10-11 15:59:17 +02:00
Eva
796211c655 🐛 Fix loading placeholder 2022-10-11 14:16:17 +02:00
Alejandro Alonso
0afef0fa44 Merge remote-tracking branch 'origin/staging' into develop 2022-10-11 14:02:51 +02:00
Stas Haas
fca26f4022 🌐 Add translations for: German.
Currently translated at 99.0% (1203 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-10-10 19:35:00 +02:00
Oğuz Ersen
5caaa2d593 🌐 Add translations for: Turkish.
Currently translated at 100.0% (1214 of 1214 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2022-10-10 19:34:59 +02:00
Alejandro Alonso
c4c419b971 Merge remote-tracking branch 'origin/staging' into develop 2022-10-10 18:10:52 +02:00
Eva Marco
bcd9aa7ba7 Merge pull request #2411 from penpot/hiru-bug-sync-undo
🐛 Fix component sync in undo
2022-10-10 17:23:46 +02:00
ascarida
5423999913 🌐 Add translations for: Galician.
Currently translated at 30.2% (366 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/gl/
2022-10-10 10:05:33 +02:00
Valentina Chapellu
670365acb7 🌐 Add translations for: Italian.
Currently translated at 43.5% (526 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-10-10 10:05:33 +02:00
Shuaib Zahda
9915990e10 🌐 Add translations for: Arabic.
Currently translated at 66.6% (806 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-10-10 10:05:32 +02:00
Andrey Antukh
748ab5f75e Merge branch 'translations' into develop 2022-10-10 10:05:11 +02:00
Andrey Antukh
b995830693 📎 Sort translation files 2022-10-10 10:04:11 +02:00
Andrey Antukh
d47d4c2d58 Merge remote-tracking branch 'weblate/develop' into translations 2022-10-10 09:58:38 +02:00
Andrey Antukh
4b2b7278a7 Merge branch 'luzpaz-source-typos' into develop 2022-10-10 09:52:06 +02:00
Andrey Antukh
85bd44e37b 📎 Update translation files 2022-10-10 09:51:37 +02:00
luz paz
374909e05e 🔧 Fix typos in source code (follow-up)
This is a follow-up to e30bea0b6f but fixes source typos.
2022-10-10 09:48:38 +02:00
Alejandro Alonso
e3f0c2eaeb 🌐 Added translation for: Faroese. 2022-10-10 08:47:38 +02:00
K.B.Dharun Krishna
919fb96b34 🌐 Add translations for: Tamil.
Currently translated at 2.0% (25 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ta/
2022-10-07 04:17:08 +02:00
Alejandro Alonso
c5ff785ff5 Merge remote-tracking branch 'origin/staging' into develop 2022-10-05 11:17:13 +02:00
Andrés Moya
66cd60e02c 🐛 Fix component sync in undo 2022-10-05 10:39:32 +02:00
Alejandro Alonso
da33d539bf Merge remote-tracking branch 'origin/staging' into develop 2022-10-05 09:34:18 +02:00
Denys M
c925528212 🌐 Add translations for: Ukrainian (ukr_UA).
Currently translated at 19.6% (238 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ukr_UA/
2022-10-04 20:22:42 +02:00
Zvonimir Juranko
fc44610893 🌐 Add translations for: Croatian.
Currently translated at 93.0% (1125 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/hr/
2022-10-04 20:22:41 +02:00
Kevin Nowald
ccb17e68e2 🌐 Add translations for: Polish.
Currently translated at 94.8% (1147 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pl/
2022-10-04 20:22:41 +02:00
Youkho
5bdc2cc25d 🌐 Add translations for: Arabic.
Currently translated at 65.0% (786 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-10-04 20:22:40 +02:00
Antonio
f466d7a484 🌐 Add translations for: Catalan.
Currently translated at 96.2% (1164 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ca/
2022-10-04 20:22:40 +02:00
Alejandro Alonso
cbe51fcabd Merge remote-tracking branch 'origin/staging' into develop 2022-10-04 16:00:46 +02:00
Andrey Antukh
fadb1dfba6 Merge remote-tracking branch 'origin/staging' into develop 2022-10-04 15:33:00 +02:00
Andrés Moya
eb7f93d2e6 🐛 Make restore component work in external libraries 2022-10-04 15:26:14 +02:00
Andrey Antukh
fc01acffc7 Merge pull request #2379 from penpot/hiru-gc-deleted-comp
 Add garbage collect of deleted components
2022-10-04 13:59:53 +02:00
Andrés Moya
687e4dce2a 🔧 Adjust code style 2022-10-04 13:50:23 +02:00
Andrés Moya
c5b875c925 Add garbage collect of deleted components 2022-10-04 13:50:23 +02:00
Andrey Antukh
a08b9adeee 📎 Fix merge issues from staging to develop 2022-10-04 13:31:06 +02:00
Andrey Antukh
c2158b0f3c Merge remote-tracking branch 'origin/staging' into develop 2022-10-04 13:29:03 +02:00
Andrey Antukh
97c36ce86c Merge pull request #2405 from penpot/eva-fix-colorpicker-library
🐛 Fix color bullets in colorpicker modal on libraries
2022-10-04 13:17:39 +02:00
Eva
b41ca75512 🐛 Fix color bullets in colorpicker modal on libraries 2022-10-04 13:15:36 +02:00
Pablo Alba
5bbfe376cf Merge pull request #2390 from penpot/hiru-delete-comp-assets
🐛 Fix delete component from assets panel in v2
2022-10-04 11:47:28 +02:00
Andrey Antukh
c9ba5ff31e Merge branch 'schalkneethling-2395-switch-to-issue-forms' into develop 2022-10-04 10:44:50 +02:00
Schalk Neethling
0c1d04919f 📎 Switch to issue forms (on github)
GitHub launched issue template forms some time ago. These have helped other open source projects I have been involved in. As you can make certain fields required, it also helps cut down on issue spam.

fix #2395
2022-10-04 10:44:18 +02:00
Andrey Antukh
746f492632 Merge branch 'luzpaz-typos' into develop 2022-10-04 10:41:32 +02:00
luz paz
e30bea0b6f 🔧 Fix typos in source code
Found via `codespell -q 3 -S *.po,./frontend/yarn.lock -L childs,clen,fpr,inflight,ody,ot,ro,te,trys,ue`
2022-10-04 10:40:34 +02:00
Andrey Antukh
ac4218a3c2 Merge branch 'Vesther-fix/feedback-twitter-link' into develop 2022-10-04 10:37:06 +02:00
Kevin Nowald
0680d25fd7 🐛 Fix twitter feedback link
Refers to unexisting PenpotSupport Twitter account

Signed-off-by: Kevin Nowald <kevin@nowald.pl>
2022-10-04 10:35:48 +02:00
Alejandro Alonso
4a3a181403 Merge branch 'lol768-patch-1' into develop 2022-10-04 10:33:04 +02:00
Adam Williams
9ae40b392f 🐛 Fix word-break on comments, changed to break-word 2022-10-04 10:32:05 +02:00
Denys M
8c20890c7b 🌐 Add translations for: Ukrainian (ukr_UA).
Currently translated at 7.5% (91 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ukr_UA/
2022-10-01 16:17:53 +02:00
Zvonimir Juranko
dc863e8b97 🌐 Add translations for: Croatian.
Currently translated at 79.9% (967 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/hr/
2022-10-01 16:17:52 +02:00
K.B.Dharun Krishna
44241ada56 🌐 Add translations for: Tamil.
Currently translated at 0.5% (7 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ta/
2022-10-01 16:17:48 +02:00
Jacopo Lodovico Trabia
f9b7235f8b 🌐 Add translations for: Italian.
Currently translated at 43.0% (520 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-10-01 16:17:48 +02:00
Ahmad HosseinBor
cc68eaa9f7 🌐 Add translations for: Persian.
Currently translated at 55.1% (667 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2022-10-01 16:17:47 +02:00
Shuaib Zahda
af640234b5 🌐 Add translations for: Arabic.
Currently translated at 58.3% (706 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-10-01 16:17:47 +02:00
Youkho
3c1ab1d58a 🌐 Add translations for: Arabic.
Currently translated at 58.3% (706 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-10-01 16:17:47 +02:00
Andrés Moya
243e29fdb4 🐛 Fix delete component from assets panel in v2 2022-09-30 15:26:29 +02:00
Eva
a4bbb43555 🐛 Fix shortcut texts alignment 2022-09-30 13:31:27 +02:00
Alejandro Alonso
98f490703f 🌐 Added translation for: Ukrainian (ukr_UA). 2022-09-30 07:16:21 +02:00
Alejandro Alonso
8f786407af Merge remote-tracking branch 'origin/staging' into develop 2022-09-29 14:22:05 +02:00
Andrey Antukh
fd6d72128b Merge remote-tracking branch 'origin/staging' into develop 2022-09-29 10:37:13 +02:00
elhombretecla
f470efc9c7 🎉 Add new contributors to thankyou.md 2022-09-29 09:28:47 +02:00
Andrey Antukh
a59a4d9891 Merge remote-tracking branch 'origin/staging' into develop 2022-09-29 08:40:07 +02:00
Andrey Antukh
2a55d2ebdb Merge remote-tracking branch 'origin/staging' into develop 2022-09-28 15:36:12 +02:00
Alejandro Alonso
43ceb6bb44 Merge remote-tracking branch 'origin/main' into develop 2022-09-28 14:30:28 +02:00
Alejandro
a5b36fd3f8 Merge pull request #2365 from penpot/eva-fix-texts
🐛 Fix some texts and a typo
2022-09-28 14:25:53 +02:00
Eva Marco
41d5a490d4 Merge pull request #2363 from penpot/palba-accesibility-elements-without-name
 Fix elements-without-names and html-lang-missing accesibility issues
2022-09-28 13:41:57 +02:00
Pablo Alba
6a329fac27 Fix html-lang-missing accesibility issues 2022-09-28 13:16:36 +02:00
Pablo Alba
4ef876bf58 Fix elements-without-names accesibility issues 2022-09-28 12:47:33 +02:00
Andrey Antukh
7303d311d5 Merge remote-tracking branch 'origin/staging' into develop 2022-09-28 12:16:06 +02:00
Eva
1a7583e6ad 🐛 Fix some texts and a typo 2022-09-28 09:42:08 +02:00
andy
f2de69e1f3 🌐 Added translation for: Croatian. 2022-09-27 17:35:28 +02:00
andy
2030e845bb 🌐 Added translation for: Tamil. 2022-09-27 17:32:55 +02:00
Dário
b1edc53a1c 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-27 17:18:10 +02:00
Youkho
4d56b5f1b9 🌐 Add translations for: Arabic.
Currently translated at 53.1% (642 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-09-27 17:18:10 +02:00
Oğuz Ersen
e1960b4472 🌐 Add translations for: Turkish.
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/tr/
2022-09-27 17:18:09 +02:00
Alejandro
86993c0e21 Merge pull request #2360 from penpot/eva-a11y-add-title
 Add title to color bullets
2022-09-27 13:54:31 +02:00
Alejandro Alonso
c373b3741f 📎 Increase version 2022-09-27 13:02:43 +02:00
Eva
494b08b975 Add title to color bullets 2022-09-27 12:57:20 +02:00
Hugo Figueira
161a139194 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-25 01:03:26 +02:00
Shuaib Zahda
407423b480 🌐 Add translations for: Arabic.
Currently translated at 52.6% (637 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-09-25 01:03:25 +02:00
Hugo Figueira
aadc3c25db 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-25 01:03:25 +02:00
Hugo Figueira
26b32634f7 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-24 10:30:23 +02:00
Jaziel Cavalcante
836511f5c7 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-24 10:30:23 +02:00
Hugo Figueira
043683775f 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-23 22:54:31 +02:00
Dário
f6792ce67f 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-23 22:54:31 +02:00
Dário
84760f940c 🌐 Add translations for: Indonesian.
Currently translated at 9.3% (113 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2022-09-23 22:54:30 +02:00
Stas Haas
4faa3db6f8 🌐 Add translations for: German.
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-09-23 22:54:30 +02:00
Filipe Pessanha
71f2e4cabe 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 99.1% (1199 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-23 22:54:30 +02:00
Jaziel Cavalcante
96ef9a3c52 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 99.1% (1199 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-23 22:54:29 +02:00
Hugo Figueira
83f734977f 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 99.1% (1199 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-23 22:54:29 +02:00
Stas Haas
9d02bbcc1c 🌐 Add translations for: Russian.
Currently translated at 66.5% (805 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2022-09-23 22:54:27 +02:00
Dário
f4264e47f0 🌐 Add translations for: Spanish.
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/es/
2022-09-23 22:54:27 +02:00
Dário
0fa8f54ce4 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 99.0% (1198 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-23 16:27:47 +02:00
Hugo Figueira
920cb86849 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 62.7% (759 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-23 16:27:45 +02:00
Dário
706bf86c95 🌐 Add translations for: Portuguese (Portugal).
Currently translated at 64.9% (785 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_PT/
2022-09-23 13:07:40 +02:00
Vik
fbaa19d405 🌐 Add translations for: Russian.
Currently translated at 66.5% (804 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2022-09-23 13:06:07 +02:00
Valentina Chapellu
69ab9e9696 🌐 Add translations for: Italian.
Currently translated at 37.7% (456 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-09-22 23:21:44 +02:00
Jacopo Lodovico Trabia
d5fea6100d 🌐 Add translations for: Italian.
Currently translated at 37.7% (456 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-09-22 23:21:44 +02:00
nautilusx
47ba8383e8 🌐 Add translations for: German.
Currently translated at 99.6% (1205 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-09-22 23:21:43 +02:00
Ruan Aragão
48e6cc5a6b 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 60.6% (733 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-22 23:21:42 +02:00
Mateus Muller
da5fabbc66 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 60.6% (733 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-22 23:21:42 +02:00
Vik
691a9fa877 🌐 Add translations for: Russian.
Currently translated at 65.8% (796 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2022-09-22 23:21:42 +02:00
andy
2667e515f7 🌐 Added translation for: Portuguese (Portugal). 2022-09-22 16:43:43 +02:00
andy
f1552e4091 🌐 Added translation for: Finnish. 2022-09-22 16:40:29 +02:00
Valentina Chapellu
e2b39c0680 🌐 Add translations for: Italian.
Currently translated at 32.5% (394 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-09-20 15:46:24 +02:00
Jacopo Lodovico Trabia
58d604a20a 🌐 Add translations for: Italian.
Currently translated at 32.5% (394 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/it/
2022-09-20 15:46:24 +02:00
Shuaib Zahda
dc7e252972 🌐 Add translations for: Arabic.
Currently translated at 48.6% (588 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ar/
2022-09-20 15:46:23 +02:00
Filipe Pessanha
4433c1136c 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 59.3% (717 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-20 15:46:23 +02:00
Semon Xue
0dbefcc401 🌐 Add translations for: Chinese (Simplified).
Currently translated at 99.9% (1208 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-09-20 15:46:22 +02:00
Vik
051a65c346 🌐 Add translations for: Russian.
Currently translated at 62.2% (752 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/ru/
2022-09-20 15:46:22 +02:00
Swapnil C
449a6c9127 🌐 Add translations for: French.
Currently translated at 88.8% (1074 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-09-20 15:46:20 +02:00
andy
f72b94ac9b 🌐 Added translation for: Czech. 2022-09-20 12:34:09 +02:00
Semon Xue
9a4ad38957 🌐 Add translations for: Chinese (Simplified).
Currently translated at 92.5% (1119 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-09-19 11:17:40 +02:00
Ahmad HosseinBor
1019a037d8 🌐 Add translations for: Persian.
Currently translated at 54.9% (664 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2022-09-19 06:15:22 +02:00
liimee
9af04c8fbb 🌐 Add translations for: Indonesian.
Currently translated at 9.3% (113 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2022-09-19 06:15:22 +02:00
Mikel Larreategi
9d63bc99bf 🌐 Add translations for: Basque.
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/eu/
2022-09-16 23:18:21 +02:00
Eranot
516735cd0b 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 58.7% (710 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-16 23:18:21 +02:00
Ally Tiago
4497d8842a 🌐 Add translations for: Portuguese (Brazil).
Currently translated at 58.7% (710 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/pt_BR/
2022-09-16 23:18:21 +02:00
Beeby Xia
be5a232994 🌐 Add translations for: Chinese (Simplified).
Currently translated at 92.4% (1118 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-09-14 16:15:35 +02:00
Beeby Xia
81a4c6b3f1 🌐 Add translations for: Chinese (Simplified).
Currently translated at 90.4% (1094 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-09-13 15:19:14 +02:00
Stas Haas
4027241bc0 🌐 Add translations for: German.
Currently translated at 99.0% (1197 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-09-12 15:20:09 +02:00
Mikel Larreategi
8ac1dfce29 🌐 Add translations for: Basque.
Currently translated at 97.4% (1178 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/eu/
2022-09-10 19:20:27 +02:00
Ahmad HosseinBor
8e0e77fd3c 🌐 Add translations for: Persian.
Currently translated at 54.6% (661 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fa/
2022-09-10 19:20:26 +02:00
Yaron Shahrabani
5b92dca270 🌐 Add translations for: Hebrew.
Currently translated at 100.0% (1209 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/he/
2022-09-10 19:20:26 +02:00
liimee
5454cabf98 🌐 Add translations for: Indonesian.
Currently translated at 7.8% (95 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/id/
2022-09-10 19:20:25 +02:00
Stas Haas
e4e0deeb1c 🌐 Add translations for: German.
Currently translated at 98.9% (1196 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/de/
2022-09-10 19:20:25 +02:00
Beeby Xia
d47d687b43 🌐 Add translations for: Chinese (Simplified).
Currently translated at 89.9% (1088 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/zh_Hans/
2022-09-10 19:20:24 +02:00
Philippe Accorsi
0595d6b88d 🌐 Add translations for: French.
Currently translated at 86.3% (1044 of 1209 strings)

Translation: Penpot/frontend
Translate-URL: https://hosted.weblate.org/projects/penpot/frontend/fr/
2022-09-10 19:20:23 +02:00
817 changed files with 59308 additions and 28743 deletions

View File

@@ -3,19 +3,19 @@ jobs:
build:
docker:
- image: penpotapp/devenv:latest
- image: cimg/postgres:13.5
- image: cimg/postgres:14.5
environment:
POSTGRES_USER: penpot_test
POSTGRES_PASSWORD: penpot_test
POSTGRES_DB: penpot_test
- image: cimg/redis:6.2.6
- image: cimg/redis:7.0.5
working_directory: ~/repo
resource_class: large
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx1g
JVM_OPTS: -Xmx4g
steps:
- checkout
@@ -29,6 +29,13 @@ jobs:
- run: cd .clj-kondo && cat config.edn
- run:
name: frontend styles prettier
working_directory: "./frontend"
command: |
yarn install
yarn run lint-scss
- run:
name: common lint
working_directory: "./common"
@@ -43,13 +50,6 @@ jobs:
clj-kondo --version
clj-kondo --parallel --lint src/
- run:
name: frontend styles prettier
working_directory: "./frontend"
command: |
yarn install
yarn run lint-scss
- run:
name: backend lint
working_directory: "./backend"
@@ -57,47 +57,42 @@ jobs:
clj-kondo --version
clj-kondo --parallel --lint src/
# run backend test
- run:
working_directory: "./common"
name: common tests
command: |
yarn install
yarn test
clojure -X:dev:test :patterns '["common-tests.*-test"]'
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
JVM_OPTS: -Xmx4g
NODE_OPTIONS: --max-old-space-size=4096
- run:
name: backend test
working_directory: "./backend"
command: "clojure -X:dev:test"
command: |
clojure -X:dev:test :patterns '["backend-tests.*-test"]'
environment:
PENPOT_TEST_DATABASE_URI: "postgresql://localhost/penpot_test"
PENPOT_TEST_DATABASE_USERNAME: penpot_test
PENPOT_TEST_DATABASE_PASSWORD: penpot_test
PENPOT_TEST_REDIS_URI: "redis://localhost/1"
JVM_OPTS: -Xmx4g
- run:
name: frontend tests
working_directory: "./frontend"
command: |
yarn install
clojure -M:dev:shadow-cljs compile test
node target/tests.js
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
- run:
working_directory: "./common"
name: common tests (cljs)
command: |
yarn install
yarn run compile-test
node target/test.js
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
- run:
working_directory: "./common"
name: common tests (clj)
command: |
clojure -X:dev:test
yarn test
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
NODE_OPTIONS: --max-old-space-size=4096
- save_cache:
paths:

View File

@@ -7,6 +7,7 @@
app.common.data/export clojure.core/def
app.db/with-atomic clojure.core/with-open
app.common.data.macros/get-in clojure.core/get-in
app.common.data.macros/with-open clojure.core/with-open
app.common.data.macros/select-keys clojure.core/select-keys
app.common.logging/with-context clojure.core/do}
@@ -44,6 +45,15 @@
:redundant-do
{:level :off}
:earmuffed-var-not-dynamic
{:level :off}
:dynamic-var-not-earmuffed
{:level :off}
:used-underscored-binding
{:level :warning}
:unused-binding
{:exclude-destructured-as true
:exclude-destructured-keys-in-fn-args false

89
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,89 @@
description: Create a report to help us improve
labels: ["bug"]
name: Bug report
title: "bug: "
body:
- type: markdown
attributes:
value: |
## Before you start
Please search our [existing issues](https://github.com/penpot/penpot/issues) and open [pull requests](https://github.com/penpot/penpot/pulls) to lessen the change of filing duplicate issues or feature requests. Thank you.
---
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
validations:
required: true
- type: textarea
id: expected
attributes:
description: A clear and concise description of what you expected to happen.
label: Expected behavior
validations:
required: true
- type: textarea
id: actual
attributes:
description: A clear and concise description of what happens instead; what the bug is.
label: Actual behavior
validations:
required: true
- type: textarea
id: screenshots
attributes:
description: If applicable, add screenshots to help explain your problem.
label: Screenshots or video
- type: textarea
id: desktop
attributes:
label: Desktop (please complete the following information)
placeholder: |
- OS (e.g. iOS):
- Browser & version (e.g. Chrome 89.0):
- type: textarea
id: mobile
attributes:
label: Smartphone (please complete the following information)
placeholder: |
- Device & model (e.g. iPhone 6):
- OS & version (e.g. iOS 8.1):
- Browser & version (e.g. stock browser 22):
- type: textarea
id: environment
attributes:
label: Environment (please complete the following information)
placeholder: |
- Host (e.g. https://design.penpot.app, local instance):
*If self-hosted:*
- OS Version (e.g. Ubuntu 16.04):
- Docker / Docker-compose version (e.g. Docker version 18.03.0-ce, build 0520e24):
- Image version (e.g. Alpine):
Docker commands or docker-compose file (if possible and if proceed.x):
```
```
- type: textarea
id: frontend-trace
attributes:
label: Frontend Stack Trace
render: console
- type: textarea
id: backend-trace
attributes:
label: Backend Stack Trace
render: console
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Any other context about the problem.

View File

@@ -1,72 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
A clear and concise description of what happens instead; what the bug is.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS (e.g. iOS):
- Browser & version (e.g. Chrome 89.0):
**Smartphone (please complete the following information):**
- Device & model (e.g. iPhone 6):
- OS & version (e.g. iOS 8.1):
- Browser & version (e.g. stock browser 22):
**Environment (please complete the following information):**
- Host (e.g. https://design.penpot.app, local instance):
*If self-hosted:*
- OS Version (e.g. Ubuntu 16.04):
- Docker / Docker-compose version (e.g. Docker version 18.03.0-ce, build 0520e24):
- Image version (e.g. Alpine):
Docker commands or docker-compose file (if possible and if proceed.x):
```
```
Frontend Stack Trace:
<details>
```
```
</details>
Backend Stack Trace:
<details>
```
```
</details>
**Additional context:**
Any other context about the problem.

View File

@@ -0,0 +1,37 @@
description: Suggest an idea for this project.
labels: ["needs triage", "enhancement"]
name: "Feature request"
title: "feature: "
body:
- type: markdown
attributes:
value: |
## Before you start
Please search our [existing issues](https://github.com/penpot/penpot/issues) and open [pull requests](https://github.com/penpot/penpot/pulls) to lessen the change of filing duplicate issues or feature requests. Thank you.
---
- type: textarea
id: problem
attributes:
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when (...)
label: Is your feature request related to a problem? Please describe.
validations:
required: true
- type: textarea
id: solution
attributes:
description: A clear and concise description of what you want to happen.
label: Describe the solution you'd like.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered.
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

View File

@@ -1,21 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when (...)
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

34
.gitignore vendored
View File

@@ -1,55 +1,59 @@
*-init.clj
*.jar
*.penpot
*.orig
*.penpot
.calva
.clj-kondo
.cpcache
.lein-deps-sum
.lein-failures
.lein-plugins/
.lein-repl-history
.lsp
.nrepl-port
.nyc_output
.rebel_readline_history
.repl
.shadow-cljs
/*.jpg
/*.md
/*.png
/*.sql
/*.txt
/*.yml
/*.zip
/.clj-kondo/.cache
/_dump
/backend/-
/backend/*.md
/backend/*.sql
/backend/*.txt
/backend/assets/
/backend/builtin-templates
/backend/dist/
/backend/logs/
/backend/resources/public/assets
/backend/resources/public/media
/backend/target/
/backend/builtin-templates
/bundle*
/cd.md
/clj-profiler/
/common/.shadow-cljs
/common/coverage
/common/target
/deploy
/docker/images/bundle*
/exporter/.shadow-cljs
/exporter/target
/frontend/.shadow-cljs
/frontend/package-lock.json
/frontend/cypress/videos/*/
/frontend/cypress/fixtures/validuser.json
/frontend/cypress/videos/*/
/frontend/cypress/videos/*/
/frontend/dist/
/frontend/npm-debug.log
/frontend/out/
/frontend/package-lock.json
/frontend/resources/fonts/experiments
/frontend/resources/public/*
/frontend/target/
/frontend/cypress/videos/*/
/media
/other/
/scripts/
/telemetry/
/tmp/
/vendor/**/target
/vendor/svgclean/bundle*.js
/web
clj-profiler/
figwheel_server.log
node_modules

View File

@@ -1,6 +1,209 @@
# CHANGELOG
## 1.18.0
### :sparkles: New features
- Adds more accessibility improvements in dashboard [Taiga #4577](https://tree.taiga.io/project/penpot/us/4577)
- Adds paddings and gaps prediction on layout creation [Taiga #4838](https://tree.taiga.io/project/penpot/task/4838)
- Add visual feedback when proportionally scaling text elements with **K** [Taiga #3415](https://tree.taiga.io/project/penpot/us/3415)
- Add visualization and mouse control to paddings, margins and gaps in frames with layout [Taiga #4839](https://tree.taiga.io/project/penpot/task/4839)
- Allow for absolute positioned elements inside layout [Taiga #4834](https://tree.taiga.io/project/penpot/us/4834)
- Add z-index option for flex layout items [Taiga #2980](https://tree.taiga.io/project/penpot/us/2980)
- Scale content proportionally affects strokes, shadows, blurs and corners [Taiga #1951](https://tree.taiga.io/project/penpot/us/1951)
- Use tabulators to navigate layers [Taiga #5010](https://tree.taiga.io/project/penpot/issue/5010)
### :bug: Bugs fixed
- Fix problem with rules position on changing pages [Taiga #4847](https://tree.taiga.io/project/penpot/issue/4847)
- Fix error streen when uploading wrong SVG [#2995](https://github.com/penpot/penpot/issues/2995)
- Fix selecting children from hidden parent layers [Taiga #4934](https://tree.taiga.io/project/penpot/issue/4934)
- Fix problem when undoing multiple selected colors [Taiga #4920](https://tree.taiga.io/project/penpot/issue/4920)
- Allow selection of empty board by partial rect [Taiga #4806](https://tree.taiga.io/project/penpot/issue/4806)
- Improve behavior for undo on text edition [Taiga #4693](https://tree.taiga.io/project/penpot/issue/4693)
- Improve deeps selection of nested arboards [Taiga #4913](https://tree.taiga.io/project/penpot/issue/4913)
- Fix problem on selection numeric inputs on Firefox [#2991](https://github.com/penpot/penpot/issues/2991)
- Changed the text dominant-baseline to use ideographic [Taiga #4791](https://tree.taiga.io/project/penpot/issue/4791)
- Viewer wrong translations [Github #3035](https://github.com/penpot/penpot/issues/3035)
- Fix problem with text editor in Safari
- Fix unlink library color when blur color picker input [#3026](https://github.com/penpot/penpot/issues/3026)
- Fix snap pixel when moving path points on high zoom [#2930](https://github.com/penpot/penpot/issues/2930)
- Fix shortcuts for zoom now take into account the mouse position [#2924](https://github.com/penpot/penpot/issues/2924)
- Fix close colorpicker on Firefox when mouse-up is outside the picker [#2911](https://github.com/penpot/penpot/issues/2911)
- Fix problems with touch devices and Wacom tablets [#2216](https://github.com/penpot/penpot/issues/2216)
- Fix problem with board titles misplaced [Taiga #4738](https://tree.taiga.io/project/penpot/issue/4738)
- Fix problem with alt getting stuck when alt+tab [Taiga #5013](https://tree.taiga.io/project/penpot/issue/5013)
- Fix problem with z positioning of elements [Taiga #5014](https://tree.taiga.io/project/penpot/issue/5014)
- Fix problem in Firefox with scroll jumping when changin pages [#3052](https://github.com/penpot/penpot/issues/3052)
- Fix nested frame interaction created flow in wrong frame [Taiga #5043](https://tree.taiga.io/project/penpot/issue/5043)
- Font-Kerning does not work on Artboard Export to PNG/JPG/PDF [#3029](https://github.com/penpot/penpot/issues/3029)
- Fix manipulate duplicated project (delete, duplicate, rename, pin/unpin...) [Taiga #5027](https://tree.taiga.io/project/penpot/issue/5027)
- Fix deleted files appear in search results [Taiga #5002](https://tree.taiga.io/project/penpot/issue/5002)
- Fix problem with selected colors and texts [Taiga #5051](https://tree.taiga.io/project/penpot/issue/5051)
- Fix problem when assigning color from palette or assets [Taiga #5050](https://tree.taiga.io/project/penpot/issue/5050)
- Fix shortcuts for alignment [Taiga #5030](https://tree.taiga.io/project/penpot/issue/5030)
- Fix path options not showing when editing rects or ellipses [Taiga #5053](https://tree.taiga.io/project/penpot/issue/5053)
- Fix tooltips for some alignment options are truncated on design tab [Taiga #5040](https://tree.taiga.io/project/penpot/issue/5040)
- Fix horizontal margins drag don't always start from place [Taiga #5020](https://tree.taiga.io/project/penpot/issue/5020)
- Fix multiplayer username sometimes is not displayed correctly [Taiga #4400](https://tree.taiga.io/project/penpot/issue/4400)
- Show warning when trying to invite a user that is already in members [Taiga #4147](https://tree.taiga.io/project/penpot/issue/4147)
- Fix problem with text out of borders when changing from auto-width to fixed [Taiga #4308](https://tree.taiga.io/project/penpot/issue/4308)
- Fix header not showing when exiting fullscreen mode in viewer [Taiga #4244](https://tree.taiga.io/project/penpot/issue/4244)
- Fix visual problem in select options [Taiga #5028](https://tree.taiga.io/project/penpot/issue/5028)
- Forbid empty names for assets [Taiga #5056](https://tree.taiga.io/project/penpot/issue/5056)
- Select children after ungroup action [Taiga #4917](https://tree.taiga.io/project/penpot/issue/4917)
- Fix problem with guides not showing when moving over nested frames [Taiga #4905](https://tree.taiga.io/project/penpot/issue/4905)
- Fix change email and password for users signed in via social login [Taiga #4273](https://tree.taiga.io/project/penpot/issue/4273)
- Fix drag and drop files from browser or file explorer under circumstances [Taiga #5054](https://tree.taiga.io/project/penpot/issue/5054)
- Fix problem when copy/pasting shapes [Taiga #4931](https://tree.taiga.io/project/penpot/issue/4931)
- Fix problem with color picker not able to change hue [Taiga #5065](https://tree.taiga.io/project/penpot/issue/5065)
- Fix problem with outer stroke in texts [Taiga #5078](https://tree.taiga.io/project/penpot/issue/5078)
- Fix problem with text carring over next line when changing to fixed [Taiga #5067](https://tree.taiga.io/project/penpot/issue/5067)
- Fix don't show invite user hero to users with editor role [Taiga #5086](https://tree.taiga.io/project/penpot/issue/5086)
- Fix enter emails on onboarding new user creating team [Taiga #5089](https://tree.taiga.io/project/penpot/issue/5089)
- Fix invalid files amount after moving on dashboard [Taiga #5080](https://tree.taiga.io/project/penpot/issue/5080)
- Fix dashboard left sidebar, the [x] overlaps the field [Taiga #5064](https://tree.taiga.io/project/penpot/issue/5064)
- Fix expanded typography on assets sidebar is moving [Taiga #5063](https://tree.taiga.io/project/penpot/issue/5063)
- Fix spelling mistake in confirmation after importing only 1 file [Taiga #5095](https://tree.taiga.io/project/penpot/issue/5095)
- Fix problem with selection colors and texts [Taiga #5079](https://tree.taiga.io/project/penpot/issue/5079)
- Remove "show in view mode" flag when moving frame to frame [Taiga #5091](https://tree.taiga.io/project/penpot/issue/5091)
- Fix problem creating files in project page [Taiga #5060](https://tree.taiga.io/project/penpot/issue/5060)
- Disable empty names on rename files [Taiga #5088](https://tree.taiga.io/project/penpot/issue/5088)
- Fix problem with SVG and flex layout [Taiga #](https://tree.taiga.io/project/penpot/issue/5099)
- Fix unpublish and delete shared library warning messages [Taiga #5090](https://tree.taiga.io/project/penpot/issue/5090)
- Fix last update project timer update after creating new file [Taiga #5096](https://tree.taiga.io/project/penpot/issue/5096)
- Fix dashboard scrolling using 'Page Up' and 'Page Down' [Taiga #5081](https://tree.taiga.io/project/penpot/issue/5081)
- Fix view mode header buttons overlapping in small resolutions [Taiga #5058](https://tree.taiga.io/project/penpot/issue/5058)
- Fix precision for wrap in flex [Taiga #5072](https://tree.taiga.io/project/penpot/issue/5072)
- Fix relative position overlay positioning [Taiga #5092](https://tree.taiga.io/project/penpot/issue/5092)
- Fix hide grid keyboard shortcut [Github #3071](https://github.com/penpot/penpot/pull/3071)
- Fix problem with opacity in imported SVG's [Taiga #4923](https://tree.taiga.io/project/penpot/issue/4923)
### :heart: Community contributions by (Thank you!)
- To @ondrejkonec: for contributing to the code with:
- Refactor CSS variables [Github #2948](https://github.com/penpot/penpot/pull/2948)
## 1.17.3
### :bug: Bugs fixed
- Fix copy and paste very nested inside itself [Taiga #4848](https://tree.taiga.io/project/penpot/issue/4848)
- Fix custom fonts not rendered correctly [Taiga #4874](https://tree.taiga.io/project/penpot/issue/4874)
- Fix problem with shadows and blur on multiple selection
- Fix problem with redo shortcut
- Fix Component texts not displayed in assets panel [Taiga #4907](https://tree.taiga.io/project/penpot/issue/4907)
- Fix search field has implemented shared styles for "close icon" and "search icon" [Taiga #4927](https://tree.taiga.io/project/penpot/issue/4927)
- Fix Handling correctly slashes "/" in emails [Taiga #4906](https://tree.taiga.io/project/penpot/issue/4906)
- Fix Change text color from selected colors [Taiga #4933](https://tree.taiga.io/project/penpot/issue/4933)
### :sparkles: Enhancements
- Adds environment variables for specifying the export and backend URI for the frontend docker image, thanks to @Supernova3339 for the initial PR and suggestion [Github #2984](https://github.com/penpot/penpot/issues/2984)
## 1.17.2
### :bug: Bugs fixed
- Fix invite members button text [Taiga #4794](https://tree.taiga.io/project/penpot/issue/4794)
- Fix problem with opacity in frames [Taiga #4795](https://tree.taiga.io/project/penpot/issue/4795)
- Fix correct behaviour for space-around and added space-evenly option
- Fix duplicate with alt and undo only undo one step [Taiga #4746](https://tree.taiga.io/project/penpot/issue/4746)
- Fix problem creating frames inside layout [Taiga #4844](https://tree.taiga.io/project/penpot/issue/4844)
- Fix paste board inside itself [Taiga #4775](https://tree.taiga.io/project/penpot/issue/4775)
- Fix middle button panning can drag guides [Taiga #4266](https://tree.taiga.io/project/penpot/issue/4266)
### :heart: Community contributions by (Thank you!)
- To @ondrejkonec: for some code contributions on this release.
## 1.17.1
### :bug: Bugs fixed
- Fix components groups items show the component name in list mode [Taiga #4770](https://tree.taiga.io/project/penpot/issue/4770)
- Fix typing CMD+Z on MacOS turns the cursor into a Zoom cursor [Taiga #4778](https://tree.taiga.io/project/penpot/issue/4778)
- Fix white space on small screens [Taiga #4774](https://tree.taiga.io/project/penpot/issue/4774)
- Fix button spacing on delete acount modal [Taiga #4762](https://tree.taiga.io/project/penpot/issue/4762)
- Fix invitations input on team management and onboarding modal [Taiga #4760](https://tree.taiga.io/project/penpot/issue/4760)
- Fix weird numeration creating new elements in dashboard [Taiga #4755](https://tree.taiga.io/project/penpot/issue/4755)
- Fix can move shape with lens zoom active [Taiga #4787](https://tree.taiga.io/project/penpot/issue/4787)
- Fix social links broken [Taiga #4759](https://tree.taiga.io/project/penpot/issue/4759)
- Fix tooltips on left toolbar [Taiga #4793](https://tree.taiga.io/project/penpot/issue/4793)
## 1.17.0
### :sparkles: New features
- Adds layout flex functionality for boards
- Better overlays interactions on boards inside boards [Taiga #4386](https://tree.taiga.io/project/penpot/us/4386)
- Show board miniature in manual overlay setting [Taiga #4475](https://tree.taiga.io/project/penpot/issue/4475)
- Handoff visual improvements [Taiga #3124](https://tree.taiga.io/project/penpot/us/3124)
- Dynamic alignment only in sight [Github 1971](https://github.com/penpot/penpot/issues/1971)
- Add some accessibility to shortcut panel [Taiga #4713](https://tree.taiga.io/project/penpot/issue/4713)
- Add shortcuts for text editing [Taiga #2052](https://tree.taiga.io/project/penpot/us/2052)
- Second level boards treated as groups in terms of selection [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269)
- Performance improvements both for backend and frontend
- Accessibility improvements for login area [Taiga #4353](https://tree.taiga.io/project/penpot/us/4353)
- Outbound webhooks [Taiga #4577](https://tree.taiga.io/project/penpot/us/4577)
- Add copy invitation link to the invitation options [Taiga #4213](https://tree.taiga.io/project/penpot/us/4213)
- Dynamic alignment only in sight [Taiga #3537](https://tree.taiga.io/project/penpot/us/3537)
- Improve naming of layers [Taiga #4036](https://tree.taiga.io/project/penpot/us/4036)
- Add zoom lense [Taiga #4691](https://tree.taiga.io/project/penpot/us/4691)
- Detect potential problems with custom font vertical metrics [Taiga #4697](https://tree.taiga.io/project/penpot/us/4697)
### :bug: Bugs fixed
- Add title to color bullets [Taiga #4218](https://tree.taiga.io/project/penpot/task/4218)
- Fix color bullets in library color modal [Taiga #4186](https://tree.taiga.io/project/penpot/issue/4186)
- Fix shortcut texts alignment [Taiga #4275](https://tree.taiga.io/project/penpot/issue/4275)
- Fix some texts and a typo [Taiga #4215](https://tree.taiga.io/project/penpot/issue/4215)
- Fix twitter support account link [Taiga #4279](https://tree.taiga.io/project/penpot/issue/4279)
- Fix lang autodetect issue [Taiga #4277](https://tree.taiga.io/project/penpot/issue/4277)
- Fix adding an extra page on import [Taiga #4543](https://tree.taiga.io/project/penpot/task/4543)
- Fix unable to select text at assets inputs in firefox [Taiga #4572](https://tree.taiga.io/project/penpot/issue/4572)
- Fix component sync when converting to path [Taiga #3642](https://tree.taiga.io/project/penpot/issue/3642)
- Fix style for team invite in deutsch [Taiga #4614](https://tree.taiga.io/project/penpot/issue/4614)
- Fix problem with text edition in Safari [Taiga #4046](https://tree.taiga.io/project/penpot/issue/4046)
- Fix show outline with rounded corners on rects [Taiga #4053](https://tree.taiga.io/project/penpot/issue/4053)
- Fix wrong interaction between comments and panning modes [Taiga #4297](https://tree.taiga.io/project/penpot/issue/4297)
- Fix bad element positioning on interaction with fixed scroll [Github #2660](https://github.com/penpot/penpot/issues/2660)
- Fix display type of component library not persistent [Taiga #4512](https://tree.taiga.io/project/penpot/issue/4512)
- Fix problem when moving texts with keyboard [#2690](https://github.com/penpot/penpot/issues/2690)
- Fix problem when drawing boxes won't detect mouse-up [Taiga #4618](https://tree.taiga.io/project/penpot/issue/4618)
- Fix missing loading icon on shared libraries [Taiga #4148](https://tree.taiga.io/project/penpot/issue/4148)
- Fix selection stroke missing in properties of multiple texts [Taiga #4048](https://tree.taiga.io/project/penpot/issue/4048)
- Fix missing create component menu for frames [Github #2670](https://github.com/penpot/penpot/issues/2670)
- Fix "currentColor" is not converted when importing SVG [Github 2276](https://github.com/penpot/penpot/issues/2276)
- Fix incorrect color in properties of multiple bool shapes [Taiga #4355](https://tree.taiga.io/project/penpot/issue/4355)
- Fix pressing the enter key gives you an internal error [Github 2675](https://github.com/penpot/penpot/issues/2675) [Github 2577](https://github.com/penpot/penpot/issues/2577)
- Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506)
- Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052)
- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646)
- Fix problem with SVG imports with style [#2605](https://github.com/penpot/penpot/issues/2605)
- Fix ghost shapes after sync groups in components [Taiga #4649](https://tree.taiga.io/project/penpot/issue/4649)
- Fix layer orders messed up on move, group, reparent and undo [Github #2672](https://github.com/penpot/penpot/issues/2672)
- Fix max height in library dialog [Github #2335](https://github.com/penpot/penpot/issues/2335)
- Fix undo ungroup (shift+g) scrambles positions [Taiga #4674](https://tree.taiga.io/project/penpot/issue/4674)
- Fix justified text is stretched [Github #2539](https://github.com/penpot/penpot/issues/2539)
- Fix mousewheel on viewer inspector [Taiga #4221](https://tree.taiga.io/project/penpot/issue/4221)
- Fix path edition activated on boards [Taiga #4105](https://tree.taiga.io/project/penpot/issue/4105)
- Fix hidden layers inside groups become visible after the group visibility is changed[Taiga #4710](https://tree.taiga.io/project/penpot/issue/4710)
- Fix format of HSLA color on viewer [Taiga #4393](https://tree.taiga.io/project/penpot/issue/4393)
- Fix some typos [Taiga #4724](https://tree.taiga.io/project/penpot/issue/4724)
- Fix ctrl+c for inspect code [Taiga #4739](https://tree.taiga.io/project/penpot/issue/4739)
- Fix text in custom font is not at the expected position at export [Taiga #4394](https://tree.taiga.io/project/penpot/issue/4394)
- Fix unneeded popup when updating local components [Taiga #4430](https://tree.taiga.io/project/penpot/issue/4430)
- Fix multiuser - "Shadow" element is not updating immediately [Taiga #4709](https://tree.taiga.io/project/penpot/issue/4709)
- Fix paths not flagged as modified when resized [Taiga #4742](https://tree.taiga.io/project/penpot/issue/4742)
- Fix resend invitation doesn't reset the expiration date [Taiga #4741](https://tree.taiga.io/project/penpot/issue/4741)
- Fix incorrect state after undo page creation [Taiga #4690](https://tree.taiga.io/project/penpot/issue/4690)
- Fix copy paste texts with typography assets linked [Taiga #4750](https://tree.taiga.io/project/penpot/issue/4750)
### :heart: Community contributions by (Thank you!)
- To @iprithvitharun: let's make UX Writing contributions in Open Source a trend!
## 1.16.2-beta
### :bug: Bugs fixed
- Fix strage cursor behaviour after clicking viewport with text pool [Github #2447](https://github.com/penpot/penpot/issues/2447)
## 1.16.1-beta
@@ -30,7 +233,7 @@
- Removed the support for v2 internal file data blob format. This
version has never been documented nor set as default value so
technicaly this is not a breaking change because we are removing
technically this is not a breaking change because we are removing
a "private API".
### :sparkles: New features
@@ -70,11 +273,11 @@
- Fix grid not syncing immediately in multiuser [Taiga #4339](https://tree.taiga.io/project/penpot/issue/4339)
- Fix custom font upload fails silently for unsupported formats [Taiga #4279](https://tree.taiga.io/project/penpot/issue/4280)
### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!)
- To @andrewzhurov for many code contributions on this release.
- UI improvements in Project section (by @Waishnav) [#2285](https://github.com/penpot/penpot/pull/2285)
- Fix fronted comments (by @lol768) [#2368](https://github.com/penpot/penpot/pull/2368)
## 1.15.5-beta
@@ -166,7 +369,7 @@
- The `PENPOT_LDAP_ATTRS_PHOTO` finally removed, it was unused for many
versions.
- If you are using social login (google, github, gitlab or generic OIDC) you
will need to ensure to add the following flags respectivelly to let them
will need to ensure to add the following flags respectively to let them
enabled: `enable-login-with-google`, `enable-login-with-github`,
`enable-login-with-gitlab` and `enable-login-with-oidc`. If not, they will
remain disabled after application start independently if you set the client-id
@@ -271,7 +474,7 @@
- Fix undo when drawing curves [Taiga #3523](https://tree.taiga.io/project/penpot/issue/3523)
- Fix issue with text edition and certain fonts (WorkSans, Raleway, ...) and foreign objects [Taiga #3521](https://tree.taiga.io/project/penpot/issue/3521)
- Fix thumbnail generation when concurrent edition [Taiga #3522](https://tree.taiga.io/project/penpot/issue/3522)
- Fix environment imporot for exporter in Docker
- Fix environment import for exporter in Docker
- Fix auto scroll layers in Firefox [Taiga #3531](https://tree.taiga.io/project/penpot/issue/3531)
- Fix base background not visible for imported SVG
@@ -355,7 +558,7 @@
- Fix mouse leave in handoff close overlay animation breaks [Taiga #3173](https://tree.taiga.io/project/penpot/issue/3173)
- Fix different behaviour during image drag [Taiga #2279](https://tree.taiga.io/project/penpot/issue/2279)
- Fix hidden file name on import [Taiga #3172](https://tree.taiga.io/project/penpot/issue/3172)
- Fix unneccessary scrollbars at the color list [Taiga #3211](https://tree.taiga.io/project/penpot/issue/3211)
- Fix unnecessary scrollbars at the color list [Taiga #3211](https://tree.taiga.io/project/penpot/issue/3211)
- "Show in exports" is showing in multiselections [Taiga #3194](https://tree.taiga.io/project/penpot/issue/3194)
- Edit file name navigates to the file workspace [Taiga #3183](https://tree.taiga.io/project/penpot/issue/3183)
- Fix scroll into view behind fixed element [Taiga #3170](https://tree.taiga.io/project/penpot/issue/3170)
@@ -364,7 +567,7 @@
- Fix duplicate multi selected elements [Taiga #3155](https://tree.taiga.io/project/penpot/issue/3155)
- Fix add fills to artboard modify children [Taiga #3151](https://tree.taiga.io/project/penpot/issue/3151)
- Avoid numeric inputs to allow big numbers [Taiga #2858](https://tree.taiga.io/project/penpot/issue/2858)
- Fix component contex menu size [Taiga #2480](https://tree.taiga.io/project/penpot/issue/2480)
- Fix component context menu size [Taiga #2480](https://tree.taiga.io/project/penpot/issue/2480)
- Add shadow to artboard make it lose the fill [Taiga #3139](https://tree.taiga.io/project/penpot/issue/3139)
- Avoid numeric inputs to change its value without focusing them [Taiga #3140](https://tree.taiga.io/project/penpot/issue/3140)
- Fix comments modal when changing pages [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2508)
@@ -493,7 +696,7 @@
- Fix issue on handling empty content on boolean shapes
- Fix race condition issue on component renaming
- Handle EOF errors on writting streamed response
- Handle EOF errors on writing streamed response
- Handle EOF errors on websocket send/ping methods
- Disable parallel upload of file media on import (causes too much
contention on the rlimit subsistem that does not works as expected
@@ -605,7 +808,7 @@
## 1.10.4-beta
### :sparkles: Enhacements
### :sparkles: Enhancements
- Allow parametrice file snapshoting interval
@@ -617,7 +820,7 @@
## 1.10.3-beta
### :sparkles: Enhacements
### :sparkles: Enhancements
- Make all logging asynchronous, this avoid some overhead on jetty threads at cost of logging latency.
- Increase default session time to 15 days.
@@ -953,7 +1156,7 @@
- Add better auth module logging.
- Add missing `email` scope to OIDC backend.
- Add missing cause prop on error loging.
- Add missing cause prop on error logging.
- Fix empty font-family handling on custom fonts page.
- Fix incorrect unicode code points handling on draft-to-penpot conversion.
- Fix some problems with paths.

View File

@@ -99,16 +99,16 @@ Each commit should have:
- An entry on the CHANGES.md file if applicable, referencing the
github or taiga issue/user-story using the these same rules.
Examples of good commit messags:
Examples of good commit messages:
- :bug: Fix unexpected error on launching modal
- :bug: Set proper error message on generic error
- :sparkles: Enable new modal for profile
- :zap: Improve performance of dashboard navigation
- :wrench: Update default backend configuration
- :books: Add more documentation for authentication process
- :ambulance: Fix critical bug on user registration process
- :tada: Add new approach for user registration
- `:bug: Fix unexpected error on launching modal`
- `:bug: Set proper error message on generic error`
- `:sparkles: Enable new modal for profile`
- `:zap: Improve performance of dashboard navigation`
- `:wrench: Update default backend configuration`
- `:books: Add more documentation for authentication process`
- `:ambulance: Fix critical bug on user registration process`
- `:tada: Add new approach for user registration`
## Code of conduct ##

View File

@@ -4,7 +4,7 @@
<h1 align="center">
<br>
<img src="https://penpot.app/images/readme/readme-logo.jpg" alt="PENPOT">
<img src="https://penpot.app/images/readme/git-readme-header.png" alt="PENPOT">
</h1>
<p align="center"><a href="https://www.mozilla.org/en-US/MPL/2.0" rel="nofollow"><img src="https://camo.githubusercontent.com/3fcf3d6b678ea15fde3cf7d6af0e242160366282d62a7c182d83a50bfee3f45e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d504c2d322e302d626c75652e737667" alt="License: MPL-2.0" data-canonical-src="https://img.shields.io/badge/MPL-2.0-blue.svg" style="max-width:100%;"></a>
@@ -50,7 +50,7 @@ Being web based, Penpot is not dependent on operating systems or local installat
Using SVG as no other design and prototyping tool does, Penpot files sport compatibility with most of the vectorial tools, are tech friendly and extremely easy to use on the web. We make sure you will always own your work.
<p align="center">
<img src="https://penpot.app/images/open-source.png" alt="Open Source">
<img src="https://penpot.app/images/readme/git-open.png" alt="Open Source" style="width: 65%;">
</p>
@@ -74,7 +74,7 @@ Heres a step-by-step guide on [getting started with Docker.](https://help.pen
If you prefer not to install Penpot in a local environment, [login or register on our Penpot cloud app](https://design.penpot.app). Create a team to work together on projects and share design assets or jump right away into Penpot and **start designing** on your own.
<p align="center">
<img src="https://help.penpot.app/img/home-techguide.png" alt="Getting started">
<img src="https://penpot.app/images/readme/git-self-host.png" alt="Getting started" style="width: 65%;">
</p>
## Community ##
@@ -93,7 +93,7 @@ You will find the following categories:
- [Penpot in your language](https://community.penpot.app/c/penpot-in-your-language/12)
<p align="center">
<img src="https://penpot.app/images/cross-teams.webp" alt="Community">
<img src="https://penpot.app/images/readme/git-collaborate.png" alt="Communnity" style="width: 65%;">
</p>
## Contributing ##
@@ -111,7 +111,7 @@ Every sort of contribution will be very helpful to enhance Penpot. How youll
To find (almost) everything you need to know on how to contribute to Penpot, refer to the [contributing-guide](https://help.penpot.app/contributing-guide/).
<p align="center">
<img src="https://help.penpot.app/img/home-contributing.png" alt="Contributing">
<img src="https://penpot.app/images/readme/git-community.png" alt="Contributing" style="width: 65%;">
</p>
## Resources ##

View File

@@ -85,4 +85,13 @@ We want to thank to the amazing people that help us! Thank you! You're the best!
* [Yaron](https://hosted.weblate.org/user/Yaron)
* [yrd](https://hosted.weblate.org/user/yrd)
* [YukiYuigishi](https://hosted.weblate.org/user/YukiYuigishi)
* [zcraber](https://hosted.weblate.org/user/zcraber)
* [zcraber](https://hosted.weblate.org/user/zcraber)
## Libraries & templates
* systxema
* plumilla
* victor crespo
* xtech
* candidexmedia
* merih güz
* klarr agency

View File

@@ -16,16 +16,11 @@
{:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/compile-clj
{:basis basis
:src-dirs ["src"]
:class-dir class-dir})
(b/uber
{:class-dir class-dir
:uber-file jar-file
:main 'clojure.main
:exclude [#"goog.*" #"^javasist.*"]
:exclude [#".*Log4j2Plugins\.dat$"]
:basis basis}))
(defn compile [_]

View File

@@ -1,12 +1,9 @@
{:deps
{penpot/common {:local/root "../common"}
org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/core.async {:mvn/version "1.5.648"}
org.clojure/core.async {:mvn/version "1.6.673"}
;; Logging
org.zeromq/jeromq {:mvn/version "0.5.2"}
com.github.luben/zstd-jni {:mvn/version "1.5.2-4"}
com.github.luben/zstd-jni {:mvn/version "1.5.2-5"}
org.clojure/data.fressian {:mvn/version "1.0.0"}
io.prometheus/simpleclient {:mvn/version "0.16.0"}
@@ -16,21 +13,20 @@
:exclusions [org.eclipse.jetty/jetty-server
org.eclipse.jetty/jetty-servlet]}
io.prometheus/simpleclient_httpserver {:mvn/version "0.16.0"}
io.lettuce/lettuce-core {:mvn/version "6.2.0.RELEASE"}
io.lettuce/lettuce-core {:mvn/version "6.2.2.RELEASE"}
java-http-clj/java-http-clj {:mvn/version "0.4.3"}
funcool/yetti
{:git/tag "v9.9"
:git/sha "f0a455d"
{:git/tag "v9.12"
:git/sha "51646d8"
:git/url "https://github.com/funcool/yetti.git"
:exclusions [org.slf4j/slf4j-api]}
com.github.seancorfield/next.jdbc {:mvn/version "1.3.828"}
com.github.seancorfield/next.jdbc {:mvn/version "1.3.847"}
metosin/reitit-core {:mvn/version "0.5.18"}
org.postgresql/postgresql {:mvn/version "42.5.0"}
org.postgresql/postgresql {:mvn/version "42.5.2"}
com.zaxxer/HikariCP {:mvn/version "5.0.1"}
io.whitfin/siphash {:mvn/version "2.0.0"}
@@ -38,7 +34,9 @@
buddy/buddy-hashers {:mvn/version "1.8.158"}
buddy/buddy-sign {:mvn/version "3.4.333"}
org.jsoup/jsoup {:mvn/version "1.15.1"}
com.github.ben-manes.caffeine/caffeine {:mvn/version "3.1.2"}
org.jsoup/jsoup {:mvn/version "1.15.3"}
org.im4java/im4java
{:git/tag "1.4.0-penpot-2"
:git/sha "e2b3e16"
@@ -50,11 +48,12 @@
integrant/integrant {:mvn/version "0.8.0"}
dawran6/emoji {:mvn/version "0.1.5"}
markdown-clj/markdown-clj {:mvn/version "1.11.3"}
markdown-clj/markdown-clj {:mvn/version "1.11.4"}
;; Pretty Print specs
pretty-spec/pretty-spec {:mvn/version "0.1.4"}
software.amazon.awssdk/s3 {:mvn/version "2.17.278"}}
software.amazon.awssdk/s3 {:mvn/version "2.19.29"}
}
:paths ["src" "resources" "target/classes"]
:aliases
@@ -62,7 +61,6 @@
{:extra-deps
{com.bhauman/rebel-readline {:mvn/version "RELEASE"}
org.clojure/tools.namespace {:mvn/version "RELEASE"}
org.clojure/test.check {:mvn/version "RELEASE"}
clojure-humanize/clojure-humanize {:mvn/version "0.2.2"}
org.clojure/data.csv {:mvn/version "RELEASE"}
com.clojure-goes-fast/clj-async-profiler {:mvn/version "RELEASE"}
@@ -70,7 +68,8 @@
:extra-paths ["test" "dev"]}
:build
{:extra-deps {io.github.clojure/tools.build {:git/tag "v0.8.3" :git/sha "0d20256"}}
{:extra-deps
{io.github.clojure/tools.build {:git/tag "v0.9.3" :git/sha "e537cd1"}}
:ns-default build}
:test

View File

@@ -12,9 +12,12 @@
[app.common.logging :as l]
[app.common.perf :as perf]
[app.common.pprint :as pp]
[app.common.spec :as us]
[app.common.transit :as t]
[app.common.uuid :as uuid]
[app.config :as cfg]
[app.main :as main]
[app.srepl.helpers]
[app.srepl.main :as srepl]
[app.util.blob :as blob]
[app.util.fressian :as fres]
@@ -26,10 +29,13 @@
[clojure.pprint :refer [pprint print-table]]
[clojure.repl :refer :all]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.stacktrace :as trace]
[clojure.test :as test]
[clojure.test.check.generators :as gen]
[clojure.tools.namespace.repl :as repl]
[clojure.walk :refer [macroexpand-all]]
[criterium.core :as crit]
[cuerdas.core :as str]
[datoteka.core]
[integrant.core :as ig]))
@@ -42,24 +48,24 @@
(defmacro run-quick-bench
[& exprs]
`(with-progress-reporting (quick-bench (do ~@exprs) :verbose)))
`(crit/with-progress-reporting (crit/quick-bench (do ~@exprs) :verbose)))
(defmacro run-quick-bench'
[& exprs]
`(quick-bench (do ~@exprs)))
`(crit/quick-bench (do ~@exprs)))
(defmacro run-bench
[& exprs]
`(with-progress-reporting (bench (do ~@exprs) :verbose)))
`(crit/with-progress-reporting (crit/bench (do ~@exprs) :verbose)))
(defmacro run-bench'
[& exprs]
`(bench (do ~@exprs)))
`(crit/bench (do ~@exprs)))
;; --- Development Stuff
(defn- run-tests
([] (run-tests #"^app.*-test$"))
([] (run-tests #"^backend-tests.*-test$"))
([o]
(repl/refresh)
(cond
@@ -74,19 +80,22 @@
(defn- start
[]
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
(-> (merge main/system-config main/worker-config)
(ig/prep)
(ig/init))))
:started)
(try
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
(-> (merge main/system-config main/worker-config)
(ig/prep)
(ig/init))))
:started
(catch Throwable cause
(ex/print-throwable cause))))
(defn- stop
[]
(alter-var-root #'system (fn [sys]
(when sys (ig/halt! sys))
nil))
:stoped)
:stopped)
(defn restart
[]
@@ -100,12 +109,20 @@
(defn compression-bench
[data]
(let [humanize (fn [v] (hum/filesize v :binary true :format " %.4f "))]
(let [humanize (fn [v] (hum/filesize v :binary true :format " %.4f "))
v1 (time (humanize (alength (blob/encode data {:version 1}))))
v3 (time (humanize (alength (blob/encode data {:version 3}))))
v4 (time (humanize (alength (blob/encode data {:version 4}))))
v5 (time (humanize (alength (blob/encode data {:version 5}))))
v6 (time (humanize (alength (blob/encode data {:version 6}))))
]
(print-table
[{:v1 (humanize (alength (blob/encode data {:version 1})))
:v2 (humanize (alength (blob/encode data {:version 2})))
:v3 (humanize (alength (blob/encode data {:version 3})))
:v4 (humanize (alength (blob/encode data {:version 4})))
[{
:v1 v1
:v3 v3
:v4 v4
:v5 v5
:v6 v6
}])))
(defonce debug-tap

View File

@@ -103,9 +103,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -129,9 +129,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -143,7 +143,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -157,9 +157,9 @@
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -211,9 +211,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -225,7 +225,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -239,9 +239,9 @@
<td style="direction:ltr;font-size:0px;padding:24px 0 0 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:425px;"
>
@@ -257,9 +257,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -271,7 +271,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -285,9 +285,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -301,7 +301,7 @@
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -321,7 +321,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -341,7 +341,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -361,7 +361,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -370,7 +370,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://instagram.com/penpotapp/" target="_blank">
<a href="https://www.instagram.com/penpot.app/" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-instagram.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -381,7 +381,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -390,7 +390,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://tree.taiga.io/project/uxbox" target="_blank">
<a href="https://tree.taiga.io/project/penpot" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-taiga.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -401,7 +401,7 @@
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
@@ -411,9 +411,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -425,7 +425,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -439,9 +439,9 @@
<td style="direction:ltr;font-size:0px;padding:0 0 24px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -457,9 +457,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>

View File

@@ -103,9 +103,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -129,9 +129,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -143,7 +143,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -157,9 +157,9 @@
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -201,9 +201,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -215,7 +215,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -229,9 +229,9 @@
<td style="direction:ltr;font-size:0px;padding:24px 0 0 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:425px;"
>
@@ -247,9 +247,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -261,7 +261,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -275,9 +275,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -291,7 +291,7 @@
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -311,7 +311,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -331,7 +331,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -351,7 +351,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -360,7 +360,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://instagram.com/penpotapp/" target="_blank">
<a href="https://www.instagram.com/penpot.app/" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-instagram.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -371,7 +371,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -380,7 +380,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://tree.taiga.io/project/uxbox" target="_blank">
<a href="https://tree.taiga.io/project/penpot" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-taiga.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -391,7 +391,7 @@
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
@@ -401,9 +401,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -415,7 +415,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -429,9 +429,9 @@
<td style="direction:ltr;font-size:0px;padding:0 0 24px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -447,9 +447,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>

View File

@@ -103,9 +103,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -129,9 +129,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -143,7 +143,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -157,9 +157,9 @@
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -206,9 +206,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -220,7 +220,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -234,9 +234,9 @@
<td style="direction:ltr;font-size:0px;padding:24px 0 0 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:425px;"
>
@@ -252,9 +252,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -266,7 +266,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -280,9 +280,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -296,7 +296,7 @@
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -316,7 +316,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -336,7 +336,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -356,7 +356,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -365,7 +365,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://instagram.com/penpotapp/" target="_blank">
<a href="https://www.instagram.com/penpot.app/" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-instagram.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -376,7 +376,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -385,7 +385,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://tree.taiga.io/project/uxbox" target="_blank">
<a href="https://tree.taiga.io/project/penpot" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-taiga.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -396,7 +396,7 @@
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
@@ -406,9 +406,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -420,7 +420,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -434,9 +434,9 @@
<td style="direction:ltr;font-size:0px;padding:0 0 24px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -452,9 +452,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>

View File

@@ -103,9 +103,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -129,9 +129,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -143,7 +143,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -157,9 +157,9 @@
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -201,9 +201,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -215,7 +215,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -229,9 +229,9 @@
<td style="direction:ltr;font-size:0px;padding:24px 0 0 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:425px;"
>
@@ -247,9 +247,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -261,7 +261,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -275,9 +275,9 @@
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -291,7 +291,7 @@
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -311,7 +311,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -331,7 +331,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -351,7 +351,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -360,7 +360,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://instagram.com/penpotapp/" target="_blank">
<a href="https://www.instagram.com/penpot.app/" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-instagram.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -371,7 +371,7 @@
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
@@ -380,7 +380,7 @@
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-radius:3px;width:24px;">
<tr>
<td style="font-size:0;height:24px;vertical-align:middle;width:24px;">
<a href="https://tree.taiga.io/project/uxbox" target="_blank">
<a href="https://tree.taiga.io/project/penpot" target="_blank">
<img height="24" src="{{ public-uri }}/images/email/logo-taiga.png" style="border-radius:3px;display:block;" width="24" />
</a>
</td>
@@ -391,7 +391,7 @@
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
@@ -401,9 +401,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
@@ -415,7 +415,7 @@
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
@@ -429,9 +429,9 @@
<td style="direction:ltr;font-size:0px;padding:0 0 24px 0;text-align:center;">
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
@@ -447,9 +447,9 @@
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>

View File

@@ -1,66 +0,0 @@
<mjml>
<mj-head>
<mj-font name="Source Sans Pro" href="https://fonts.googleapis.com/css?family=Source%20Sans%20Pro" />
<mj-attributes>
<mj-text font-family="Source Sans Pro, sans-serif" font-size="16px" color="#000000" line-height="150%" />
<mj-button background-color="#31EFB8" color="#1F1F1F" font-family="Source Sans Pro, sans-serif" font-size="16px" />
</mj-attributes>
</mj-head>
<mj-body background-color="#E5E5E5">
<mj-section padding="0">
<mj-column>
<mj-image src="{{ public-uri }}/images/email/uxbox-title.png"
width="97px" height="32px" align="left" padding="16px" />
</mj-column>
</mj-section>
<mj-section background-color="#FFFFFF">
<mj-column>
<mj-text font-size="24px" font-weight="600">Hello {{name}}!</mj-text>
<mj-text>We received a request to change your current email to {{ pending-email }}.</mj-text>
<mj-text>Click to the link below to confirm the change:</mj-text>
<mj-button href="{{ public-uri }}/#/auth/verify-token?token={{token}}">
Confirm email change
</mj-button>
<mj-text>
If you received this email by mistake, please consider changing your password
for security reasons.
</mj-text>
<mj-text>Enjoy!</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
Penpot is the first Open Source design and prototyping platform meant for cross-domain teams.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column>
<mj-social icon-size="24px" mode="horizontal">
<mj-social-element src="{{ public-uri }}/images/email/logo-uxbox.png" href="https://penpot.app/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-twitter.png" href="https://twitter.com/penpotapp" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-github.png" href="https://github.com/penpot/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-instagram.png" href="https://instagram.com/penpotapp/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-taiga.png" href="https://tree.taiga.io/project/uxbox" padding="0 8px" />
</mj-social>
</mj-column>
</mj-section>
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>
</mg-body>
</mjml>

View File

@@ -1,59 +0,0 @@
<mjml>
<mj-head>
<mj-font name="Source Sans Pro" href="https://fonts.googleapis.com/css?family=Source%20Sans%20Pro" />
<mj-attributes>
<mj-text font-family="Source Sans Pro, sans-serif" font-size="16px" color="#000000" line-height="150%" />
<mj-button background-color="#31EFB8" color="#1F1F1F" font-family="Source Sans Pro, sans-serif" font-size="16px" />
</mj-attributes>
</mj-head>
<mj-body background-color="#E5E5E5">
<mj-section padding="0">
<mj-column>
<mj-image src="{{ public-uri }}/images/email/uxbox-title.png"
width="97px" height="32px" align="left" padding="16px" />
</mj-column>
</mj-section>
<mj-section background-color="#FFFFFF">
<mj-column>
<mj-text font-size="24px" font-weight="600">Hello!</mj-text>
<mj-text>
{{invited-by}} has invited you to join the team “{{ team }}”.
</mj-text>
<mj-button href="{{ public-uri }}/#/auth/verify-token?token={{token}}">
Accept invite
</mj-button>
<mj-text>Enjoy!</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
Penpot is the first Open Source design and prototyping platform meant for cross-domain teams.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column>
<mj-social icon-size="24px" mode="horizontal">
<mj-social-element src="{{ public-uri }}/images/email/logo-uxbox.png" href="https://penpot.app/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-twitter.png" href="https://twitter.com/penpotapp" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-github.png" href="https://github.com/penpot/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-instagram.png" href="https://instagram.com/penpotapp/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-taiga.png" href="https://tree.taiga.io/project/uxbox" padding="0 8px" />
</mj-social>
</mj-column>
</mj-section>
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>
</mg-body>
</mjml>

View File

@@ -1,68 +0,0 @@
<mjml>
<mj-head>
<mj-font name="Source Sans Pro" href="https://fonts.googleapis.com/css?family=Source%20Sans%20Pro" />
<mj-attributes>
<mj-text font-family="Source Sans Pro, sans-serif" font-size="16px" color="#000000" line-height="150%" />
<mj-button background-color="#31EFB8" color="#1F1F1F" font-family="Source Sans Pro, sans-serif" font-size="16px" />
</mj-attributes>
</mj-head>
<mj-body background-color="#E5E5E5">
<mj-section padding="0">
<mj-column>
<mj-image src="{{ public-uri }}/images/email/uxbox-title.png"
width="97px" height="32px" align="left" padding="16px" />
</mj-column>
</mj-section>
<mj-section background-color="#FFFFFF">
<mj-column>
<mj-text font-size="24px" font-weight="600">Hello {{name}}!</mj-text>
<mj-text>
We have received a request to reset your password. Click the link
below to choose a new one:
</mj-text>
<mj-button href="{{ public-uri }}/#/auth/recovery?token={{token}}">
Reset password
</mj-button>
<mj-text>
If you received this email by mistake, you can safely ignore
it. Your password won't be changed.
</mj-text>
<mj-text>Enjoy!</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
Penpot is the first Open Source design and prototyping platform meant for cross-domain teams.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column>
<mj-social icon-size="24px" mode="horizontal">
<mj-social-element src="{{ public-uri }}/images/email/logo-uxbox.png" href="https://penpot.app/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-twitter.png" href="https://twitter.com/penpotapp" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-github.png" href="https://github.com/penpot/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-instagram.png" href="https://instagram.com/penpotapp/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-taiga.png" href="https://tree.taiga.io/project/uxbox" padding="0 8px" />
</mj-social>
</mj-column>
</mj-section>
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>
</mg-body>
</mjml>

View File

@@ -1,65 +0,0 @@
<mjml>
<mj-head>
<mj-font name="Source Sans Pro" href="https://fonts.googleapis.com/css?family=Source%20Sans%20Pro" />
<mj-attributes>
<mj-text font-family="Source Sans Pro, sans-serif" font-size="16px" color="#000000" line-height="150%" />
<mj-button background-color="#31EFB8" color="#1F1F1F" font-family="Source Sans Pro, sans-serif" font-size="16px" />
</mj-attributes>
</mj-head>
<mj-body background-color="#E5E5E5">
<mj-section padding="0">
<mj-column>
<mj-image src="{{ public-uri }}/images/email/uxbox-title.png"
width="97px" height="32px" align="left" padding="16px" />
</mj-column>
</mj-section>
<mj-section background-color="#FFFFFF">
<mj-column>
<mj-text font-size="24px" font-weight="600">Hello {{name}}!</mj-text>
<mj-text>
Thanks for signing up for your Penpot account! Please verify your
email using the link below and get started building mockups and
prototypes today!
</mj-text>
<mj-button href="{{ public-uri }}/#/auth/verify-token?token={{token}}">
Verify email
</mj-button>
<mj-text>Enjoy!</mj-text>
<mj-text>The Penpot team.</mj-text>
</mj-column>
</mj-section>
<mj-section padding="24px 0 0 0">
<mj-column width="425px">
<mj-text align="center" font-size="14px" color="#64666A">
Penpot is the first Open Source design and prototyping platform meant for cross-domain teams.
</mj-text>
</mj-column>
</mj-section>
<mj-section padding="0">
<mj-column>
<mj-social icon-size="24px" mode="horizontal">
<mj-social-element src="{{ public-uri }}/images/email/logo-uxbox.png" href="https://penpot.app/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-twitter.png" href="https://twitter.com/penpotapp" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-github.png" href="https://github.com/penpot/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-instagram.png" href="https://instagram.com/penpotapp/" padding="0 8px" />
<mj-social-element src="{{ public-uri }}/images/email/logo-taiga.png" href="https://tree.taiga.io/project/uxbox" padding="0 8px" />
</mj-social>
</mj-column>
</mj-section>
<mj-section padding="0 0 24px 0">
<mj-column>
<mj-text align="center" font-size="14px" color="#64666A" line-height="150%">
Penpot © 2020 | Made with &lt;3 and Open Source
</mj-text>
</mj-column>
</mj-section>
</mg-body>
</mjml>

View File

@@ -6,14 +6,21 @@
<div class="tags">
{% if item.deprecated %}
<span class="tag">
<span>Deprecated:</span>
<span>since v{{item.deprecated}}</span>,
<span>DEPRECATED</span>
</span>
{% endif %}
{% if item.auth %}
<span class="tag">
<span>AUTH</span>
</span>
{% endif %}
{% if item.webhook %}
<span class="tag">
<span>WEBHOOK</span>
</span>
{% endif %}
<span class="tag">
<span>Auth:</span>
<span>{% if item.auth %}YES{% else %}NO{% endif %}</span>
</span>
</div>
</div>
<div class="rpc-row-detail hidden">

View File

@@ -77,7 +77,7 @@ Debug Main Page
<legend>Import binfile:</legend>
<desc>Import penpot file in binary
format. If <strong>overwrite</strong> is checked, all files will
be overwriten using the same ids found in the file instead of
be overwritten using the same ids found in the file instead of
generating a new ones.</desc>
<form method="post" enctype="multipart/form-data" action="/dbg/file/import">
@@ -90,7 +90,7 @@ Debug Main Page
<input type="checkbox" name="overwrite" />
<br />
<small>
Instead of creating a new file with all relations remaped,
Instead of creating a new file with all relations remapped,
reuses all ids and updates/overwrites the objects that are
already exists on the database.
<strong>Warning, this operation should be used with caution.</strong>
@@ -111,7 +111,7 @@ Debug Main Page
<input type="checkbox" name="ignore-index-errors" checked/>
<br />
<small>
Do not break on index lookup erros (remap operation).
Do not break on index lookup errors (remap operation).
Useful when importing a broken file that has broken
relations or missing pieces.
</small>

View File

@@ -11,7 +11,8 @@ penpot - error list
<main class="horizontal-list">
<ul>
{% for item in items %}
<li><a href="/dbg/error/{{item.id}}">{{item.created-at}}</a></li>
<li><a class="date" href="/dbg/error/{{item.id}}">{{item.created-at}}</a>
<span class="title">{{item.hint|abbreviate:150}}</span></li>
{% endfor %}
</ul>
</main>

View File

@@ -0,0 +1,112 @@
{% extends "app/templates/base.tmpl" %}
{% block title %}
penpot - error report v2 {{id}}
{% endblock %}
{% block content %}
<nav>
<div>[<a href="/dbg/error">⮜</a>]</div>
<div>[<a href="#message">message</a>]</div>
<div>[<a href="#props">props</a>]</div>
<div>[<a href="#context">context</a>]</div>
{% if params %}
<div>[<a href="#params">request params</a>]</div>
{% endif %}
{% if data %}
<div>[<a href="#edata">error data</a>]</div>
{% endif %}
{% if spec-explain %}
<div>[<a href="#spec-explain">spec explain</a>]</div>
{% endif %}
{% if spec-problems %}
<div>[<a href="#spec-problems">spec problems</a>]</div>
{% endif %}
{% if spec-value %}
<div>[<a href="#spec-value">spec value</a>]</div>
{% endif %}
{% if trace %}
<div>[<a href="#trace">error trace</a>]</div>
{% endif %}
</nav>
<main>
<div class="table">
<div class="table-row multiline">
<div id="message" class="table-key">MESSAGE: </div>
<div class="table-val">
<h1>{{hint}}</h1>
</div>
</div>
<div class="table-row multiline">
<div id="props" class="table-key">LOG PROPS: </div>
<div class="table-val">
<pre>{{props}}</pre>
</div>
</div>
<div class="table-row multiline">
<div id="context" class="table-key">CONTEXT: </div>
<div class="table-val">
<pre>{{context}}</pre>
</div>
</div>
{% if params %}
<div class="table-row multiline">
<div id="params" class="table-key">REQUEST PARAMS: </div>
<div class="table-val">
<pre>{{params}}</pre>
</div>
</div>
{% endif %}
{% if data %}
<div class="table-row multiline">
<div id="edata" class="table-key">ERROR DATA: </div>
<div class="table-val">
<pre>{{data}}</pre>
</div>
</div>
{% endif %}
{% if spec-explain %}
<div class="table-row multiline">
<div id="spec-explain" class="table-key">SPEC EXPLAIN: </div>
<div class="table-val">
<pre>{{spec-explain}}</pre>
</div>
</div>
{% endif %}
{% if spec-problems %}
<div class="table-row multiline">
<div id="spec-problems" class="table-key">SPEC PROBLEMS: </div>
<div class="table-val">
<pre>{{spec-problems}}</pre>
</div>
</div>
{% endif %}
{% if spec-value %}
<div class="table-row multiline">
<div id="spec-value" class="table-key">SPEC VALUE: </div>
<div class="table-val">
<pre>{{spec-value}}</pre>
</div>
</div>
{% endif %}
{% if trace %}
<div class="table-row multiline">
<div id="trace" class="table-key">TRACE:</div>
<div class="table-val">
<pre>{{trace}}</pre>
</div>
</div>
{% endif %}
</div>
</main>
{% endblock %}

View File

@@ -23,6 +23,10 @@ input[type=text], input[type=submit] {
padding: 3px;
}
pre {
white-space: pre-wrap;
}
main {
margin: 20px;
}
@@ -137,8 +141,6 @@ nav > div:not(:last-child) {
margin: 0px;
padding: 0px;
flex-direction: column;
flex-wrap: wrap;
height: calc(100vh - 75px);
justify-content: flex-start;
}
@@ -151,19 +153,31 @@ nav > div:not(:last-child) {
margin: 0px 20px;
cursor: pointer;
display: flex;
justify-content: center;
border-radius: 3px;
}
.horizontal-list li:hover {
background-color: #e9e9e9;
}
.horizontal-list li > *:not(:last-child) {
margin-right: 10px;
}
.horizontal-list li > a {
text-decoration: none;
color: inherit;
}
.horizontal-list li > .date {
font-weight: 200;
color: #686868;
min-width: 210px;
}
form .row {
padding: 5px 0;
}

View File

@@ -0,0 +1,9 @@
;; Example climit.edn file
;; Required: concurrency
;; Optional: queue-size, ommited means Integer/MAX_VALUE
{:update-file {:concurrency 1 :queue-size 3}
:auth {:concurrency 128}
:process-font {:concurrency 4 :queue-size 32}
:process-image {:concurrency 8 :queue-size 32}
:push-audit-events
{:concurrency 1 :queue-size 3}}

View File

@@ -2,21 +2,18 @@
<Configuration status="info" monitorInterval="30">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"
alwaysWriteExceptions="false" />
</Console>
<RollingFile name="main" fileName="logs/main.log" filePattern="logs/main-%i.log">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"
alwaysWriteExceptions="false" />
<Policies>
<SizeBasedTriggeringPolicy size="50M"/>
</Policies>
<DefaultRolloverStrategy max="9"/>
</RollingFile>
<JeroMQ name="zmq">
<Property name="endpoint">tcp://localhost:45556</Property>
<JsonLayout complete="false" compact="true" includeTimeMillis="true" stacktraceAsString="true" properties="true" />
</JeroMQ>
</Appenders>
<Loggers>
@@ -32,10 +29,8 @@
<Logger name="app.util.websocket" level="info" />
<Logger name="app.redis" level="info" />
<Logger name="app.rpc.rlimit" level="info" />
<Logger name="app.cli" level="debug" additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="app.rpc.climit" level="info" />
<Logger name="app.rpc.mutations.files" level="info" />
<Logger name="app.loggers" level="debug" additivity="false">
<AppenderRef ref="main" level="debug" />
@@ -43,7 +38,6 @@
<Logger name="app" level="all" additivity="false">
<AppenderRef ref="main" level="trace" />
<AppenderRef ref="zmq" level="debug" />
</Logger>
<Logger name="user" level="trace" additivity="false">

View File

@@ -2,7 +2,8 @@
<Configuration status="info" monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"/>
<PatternLayout pattern="[%d{YYYY-MM-dd HH:mm:ss.SSS}] %level{length=1} %logger{36} - %msg%n"
alwaysWriteExceptions="false" />
</Console>
</Appenders>
@@ -11,6 +12,7 @@
<Logger name="com.zaxxer.hikari" level="error" />
<Logger name="org.postgresql" level="error" />
<Logger name="app.util" level="info" />
<Logger name="app" level="info" additivity="false">
<AppenderRef ref="console" />
</Logger>

View File

@@ -1,6 +1,10 @@
;; Example rlimit.edn file
^{:refresh "30s"}
{:default
[[:default :window "200000/h"]]
#{:query/profile}
[[:burst :bucket "100/60/1m"]]}
#{:command/get-teams}
[[:burst :bucket "5/1/5s"]]
#{:command/get-profile}
[[:burst :bucket "60/60/1m"]]}

View File

@@ -12,10 +12,11 @@ cp ../CHANGES.md target/classes/changelog.md;
clojure -T:build jar;
mv target/penpot.jar target/dist/penpot.jar
cp resources/log4j2.xml target/dist/log4j2.xml
cp scripts/run.template.sh target/dist/run.sh;
cp scripts/manage.template.sh target/dist/manage.sh;
cp scripts/manage.py target/dist/manage.py
chmod +x target/dist/run.sh;
chmod +x target/dist/manage.sh;
chmod +x target/dist/manage.py
# Prefetch
bb ./scripts/prefetch-templates.clj resources/app/onboarding.edn builtin-templates/

4
backend/scripts/kill-repl.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -x
jcmd |grep "rebel" |sed -nE 's/^([0-9]+).*$/\1/p' | xargs kill -9

167
backend/scripts/manage.py Executable file
View File

@@ -0,0 +1,167 @@
#!/usr/bin/env python3
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) KALEIDOS INC
import argparse
import json
import socket
import sys
from getpass import getpass
from urllib.parse import urlparse
PREPL_URI = "tcp://localhost:6063"
def get_prepl_conninfo():
uri_data = urlparse(PREPL_URI)
if uri_data.scheme != "tcp":
raise RuntimeError(f"invalid PREPL_URI: {PREPL_URI}")
if not isinstance(uri_data.netloc, str):
raise RuntimeError(f"invalid PREPL_URI: {PREPL_URI}")
host, port = uri_data.netloc.split(":", 2)
if port is None:
port = 6063
if isinstance(port, str):
port = int(port)
return host, port
def send_eval(expr):
host, port = get_prepl_conninfo()
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((host, port))
s.send(expr.encode("utf-8"))
s.send(b":repl/quit\n\n")
with s.makefile() as f:
result = json.load(f)
tag = result.get("tag", None)
if tag != "ret":
raise RuntimeError("unexpected response from PREPL")
return result.get("val", None), result.get("exception", None)
def encode(val):
return json.dumps(json.dumps(val))
def print_error(res):
for error in res["via"]:
print("ERR:", error["message"])
break
def run_cmd(params):
expr = "(app.srepl.ext/run-json-cmd {})".format(encode(params))
res, failed = send_eval(expr)
if failed:
print_error(res)
sys.exit(-1)
return res
def create_profile(fullname, email, password):
params = {
"cmd": "create-profile",
"params": {
"fullname": fullname,
"email": email,
"password": password
}
}
res = run_cmd(params)
print(f"Created: {res['email']} / {res['id']}")
def update_profile(email, fullname, password, is_active):
params = {
"cmd": "update-profile",
"params": {
"email": email,
"fullname": fullname,
"password": password,
"is_active": is_active
}
}
res = run_cmd(params)
if res is True:
print(f"Updated")
else:
print(f"No profile found with email {email}")
def derive_password(password):
params = {
"cmd": "derive-password",
"params": {
"password": password,
}
}
res = run_cmd(params)
print(f"Derived password: \"{res}\"")
available_commands = [
"create-profile",
"update-profile",
"derive-password"
]
parser = argparse.ArgumentParser(
description=(
"Penpot Command Line Interface (CLI)"
)
)
parser.add_argument("-V", "--version", action="version", version="Penpot CLI %%develop%%")
parser.add_argument("action", action="store", choices=available_commands)
parser.add_argument("-n", "--fullname", help="Fullname", action="store")
parser.add_argument("-e", "--email", help="Email", action="store")
parser.add_argument("-p", "--password", help="Password", action="store")
parser.add_argument("-c", "--connect", help="Connect to PREPL", action="store", default="tcp://localhost:6063")
args = parser.parse_args()
PREPL_URI = args.connect
if args.action == "create-profile":
email = args.email
password = args.password
fullname = args.fullname
if email is None:
email = input("Email: ")
if fullname is None:
fullname = input("Fullname: ")
if password is None:
password = getpass("Password: ")
create_profile(fullname, email, password)
elif args.action == "update-profile":
email = args.email
password = args.password
if email is None:
email = input("Email: ")
if password is None:
password = getpass("Password: ")
update_profile(email, None, password, None)
elif args.action == "derive-password":
password = args.password
if password is None:
password = getpass("Password: ")
derive_password(password)

View File

@@ -1,19 +0,0 @@
#!/usr/bin/env bash
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
fi
if [ -f ./environ ]; then
source ./environ
fi
exec $JAVA_CMD $JVM_OPTS -jar penpot.jar -m app.cli.manage "$@"

View File

@@ -2,7 +2,21 @@
export PENPOT_HOST=devenv
export PENPOT_TENANT=dev
export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-transit-readable-response enable-demo-users disable-secure-session-cookies enable-rpc-rate-limit enable-warn-rpc-rate-limits enable-smtp"
export PENPOT_FLAGS="\
$PENPOT_FLAGS \
enable-backend-asserts \
enable-audit-log \
enable-transit-readable-response \
enable-demo-users \
disable-secure-session-cookies \
enable-smtp \
enable-prepl-server \
enable-urepl-server \
enable-rpc-climit \
enable-rpc-rlimit \
enable-soft-rpc-rlimit \
enable-webhooks \
enable-access-tokens";
# export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot"
# export PENPOT_DATABASE_USERNAME="penpot"
@@ -16,8 +30,6 @@ export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enabl
# export PENPOT_LOGGERS_LOKI_URI="http://172.17.0.1:3100/loki/api/v1/push"
# export PENPOT_AUDIT_LOG_ARCHIVE_URI="http://localhost:6070/api/audit"
export PENPOT_DEFAULT_RATE_LIMIT="default,window,10000/h"
# Initialize MINIO config
mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin
mc admin user add penpot-s3 penpot-devenv penpot-devenv
@@ -31,13 +43,14 @@ export PENPOT_STORAGE_ASSETS_S3_ENDPOINT=http://minio:9000
export PENPOT_STORAGE_ASSETS_S3_BUCKET=penpot
export OPTIONS="
-A:dev:jmx-remote \
-A:jmx-remote -A:dev \
-J-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
-J-Dlog4j2.configurationFile=log4j2-devenv.xml \
-J-XX:+UseG1GC \
-J-XX:-OmitStackTraceInFastThrow \
-J-Xms50m -J-Xmx1024m \
-J-Djdk.attach.allowAttachSelf \
-J-Dlog4j2.configurationFile=log4j2-devenv.xml \
-J-Xms50m \
-J-Xmx1024m \
-J-XX:+UseZGC \
-J-XX:-OmitStackTraceInFastThrow \
-J-XX:+UnlockDiagnosticVMOptions \
-J-XX:+DebugNonSafepoints";

View File

@@ -1,20 +1,24 @@
#!/usr/bin/env bash
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
JAVA_CMD="$JAVA_HOME/bin/java"
else
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
>&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
exit 1
fi
fi
fi
if [ -f ./environ ]; then
source ./environ
source ./environ
fi
export JVM_OPTS="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow $JVM_OPTS"
set -x
exec $JAVA_CMD $JVM_OPTS "$@" -jar penpot.jar -m app.main

View File

@@ -2,7 +2,7 @@
export PENPOT_HOST=devenv
export PENPOT_TENANT=dev
export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-transit-readable-response enable-demo-users disable-secure-session-cookies enable-smtp"
export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-transit-readable-response enable-demo-users disable-secure-session-cookies enable-smtp enable-webhooks"
set -ex

26
backend/src/app/auth.clj Normal file
View File

@@ -0,0 +1,26 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.auth
(:require
[buddy.hashers :as hashers]))
(defn derive-password
[password]
(hashers/derive password
{:alg :argon2id
:memory 16384
:iterations 20
:parallelism 2}))
(defn verify-password
[attempt password]
(try
(hashers/verify attempt password)
(catch Throwable _
{:update false
:valid false})))

View File

@@ -41,15 +41,18 @@
(reduce-kv clojure.string/replace s replacements))
(defn- search-user
[{:keys [conn attrs base-dn] :as cfg} email]
(let [query (replace-several (:query cfg) ":username" email)
[{:keys [::conn base-dn] :as cfg} email]
(let [query (replace-several (:query cfg) ":username" email)
attrs [(:attrs-username cfg)
(:attrs-email cfg)
(:attrs-fullname cfg)]
params {:filter query
:sizelimit 1
:attributes attrs}]
(first (ldap/search conn base-dn params))))
(defn- retrieve-user
[{:keys [conn] :as cfg} {:keys [email password]}]
[{:keys [::conn] :as cfg} {:keys [email password]}]
(when-let [{:keys [dn] :as user} (search-user cfg email)]
(when (ldap/bind? conn dn password)
{:fullname (get user (-> cfg :attrs-fullname keyword))
@@ -66,7 +69,7 @@
(defn authenticate
[cfg params]
(with-open [conn (connect cfg)]
(when-let [user (-> (assoc cfg :conn conn)
(when-let [user (-> (assoc cfg ::conn conn)
(retrieve-user params))]
(when-not (s/valid? ::info-data user)
(let [explain (s/explain-str ::info-data user)]
@@ -100,17 +103,6 @@
:host (:host cfg) :port (:port cfg) :cause cause)
nil))))
(defn- prepare-attributes
[cfg]
(assoc cfg :attrs [(:attrs-username cfg)
(:attrs-email cfg)
(:attrs-fullname cfg)]))
(defmethod ig/init-key ::provider
[_ cfg]
(when (:enabled? cfg)
(some-> cfg try-connectivity prepare-attributes)))
(s/def ::enabled? ::us/boolean)
(s/def ::host ::cf/ldap-host)
(s/def ::port ::cf/ldap-port)
@@ -124,8 +116,7 @@
(s/def ::attrs-fullname ::cf/ldap-attrs-fullname)
(s/def ::attrs-username ::cf/ldap-attrs-username)
(defmethod ig/pre-init-spec ::provider
[_]
(s/def ::provider-params
(s/keys :opt-un [::host ::port
::ssl ::tls
::enabled?
@@ -135,3 +126,14 @@
::attrs-email
::attrs-username
::attrs-fullname]))
(s/def ::provider
(s/nilable ::provider-params))
(defmethod ig/pre-init-spec ::provider
[_]
(s/spec ::provider))
(defmethod ig/init-key ::provider
[_ cfg]
(when (:enabled? cfg)
(try-connectivity cfg)))

View File

@@ -7,6 +7,7 @@
(ns app.auth.oidc
"OIDC client implementation."
(:require
[app.auth.oidc.providers :as-alias providers]
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.exceptions :as ex]
@@ -17,8 +18,10 @@
[app.db :as db]
[app.http.client :as http]
[app.http.middleware :as hmw]
[app.http.session :as session]
[app.loggers.audit :as audit]
[app.rpc.queries.profile :as profile]
[app.main :as-alias main]
[app.rpc.commands.profile :as profile]
[app.tokens :as tokens]
[app.util.json :as json]
[app.util.time :as dt]
@@ -47,9 +50,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- discover-oidc-config
[{:keys [http-client]} {:keys [base-uri] :as opts}]
[cfg {:keys [base-uri] :as opts}]
(let [discovery-uri (u/join base-uri ".well-known/openid-configuration")
response (ex/try (http/req! http-client {:method :get :uri (str discovery-uri)} {:sync? true}))]
response (ex/try! (http/req! cfg
{:method :get :uri (str discovery-uri)}
{:sync? true}))]
(cond
(ex/exception? response)
(do
@@ -59,10 +64,17 @@
nil)
(= 200 (:status response))
(let [data (json/read (:body response))]
{:token-uri (get data :token_endpoint)
:auth-uri (get data :authorization_endpoint)
:user-uri (get data :userinfo_endpoint)})
(let [data (json/decode (:body response))
token-uri (get data :token_endpoint)
auth-uri (get data :authorization_endpoint)
user-uri (get data :userinfo_endpoint)]
(l/debug :hint "oidc uris discovered"
:token-uri token-uri
:auth-uri auth-uri
:user-uri user-uri)
{:token-uri token-uri
:auth-uri auth-uri
:user-uri user-uri})
:else
(do
@@ -73,15 +85,15 @@
(defn- prepare-oidc-opts
[cfg]
(let [opts {:base-uri (:base-uri cfg)
:client-id (:client-id cfg)
:client-secret (:client-secret cfg)
:token-uri (:token-uri cfg)
:auth-uri (:auth-uri cfg)
:user-uri (:user-uri cfg)
:scopes (:scopes cfg #{"openid" "profile" "email"})
:roles-attr (:roles-attr cfg)
:roles (:roles cfg)
(let [opts {:base-uri (cf/get :oidc-base-uri)
:client-id (cf/get :oidc-client-id)
:client-secret (cf/get :oidc-client-secret)
:token-uri (cf/get :oidc-token-uri)
:auth-uri (cf/get :oidc-auth-uri)
:user-uri (cf/get :oidc-user-uri)
:scopes (cf/get :oidc-scopes #{"openid" "profile" "email"})
:roles-attr (cf/get :oidc-roles-attr)
:roles (cf/get :oidc-roles)
:name "oidc"}
opts (d/without-nils opts)]
@@ -96,61 +108,56 @@
(some-> (discover-oidc-config cfg opts)
(merge opts {:discover? true}))))))
(defmethod ig/prep-key ::generic-provider
[_ cfg]
(d/without-nils cfg))
(defmethod ig/pre-init-spec ::providers/generic [_]
(s/keys :req [::http/client]))
(defmethod ig/init-key ::generic-provider
(defmethod ig/init-key ::providers/generic
[_ cfg]
(when (:enabled? cfg)
(when (contains? cf/flags :login-with-oidc)
(if-let [opts (prepare-oidc-opts cfg)]
(do
(l/info :hint "provider initialized"
:provider :oidc
:provider "oidc"
:method (if (:discover? opts) "discover" "manual")
:client-id (:client-id opts)
:client-secret (obfuscate-string (:client-secret opts))
:scopes (str/join "," (:scopes opts))
:auth-uri (:auth-uri opts)
:user-uri (:user-uri opts)
:token-uri (:token-uri opts)
:scopes (str/join "," (:scopes opts))
:auth-uri (:auth-uri opts)
:user-uri (:user-uri opts)
:token-uri (:token-uri opts)
:roles-attr (:roles-attr opts)
:roles (:roles opts))
opts)
(do
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider :oidc)
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider "oidc")
nil))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GOOGLE AUTH PROVIDER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod ig/prep-key ::google-provider
[_ cfg]
(d/without-nils cfg))
(defmethod ig/init-key ::google-provider
[_ cfg]
(let [opts {:client-id (:client-id cfg)
:client-secret (:client-secret cfg)
(defmethod ig/init-key ::providers/google
[_ _]
(let [opts {:client-id (cf/get :google-client-id)
:client-secret (cf/get :google-client-secret)
:scopes #{"openid" "email" "profile"}
:auth-uri "https://accounts.google.com/o/oauth2/v2/auth"
:token-uri "https://oauth2.googleapis.com/token"
:user-uri "https://openidconnect.googleapis.com/v1/userinfo"
:name "google"}]
(when (:enabled? cfg)
(when (contains? cf/flags :login-with-google)
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :hint "provider initialized"
:provider :google
:provider "google"
:client-id (:client-id opts)
:client-secret (obfuscate-string (:client-secret opts)))
opts)
(do
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider :google)
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider "google")
nil)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -158,29 +165,29 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- retrieve-github-email
[{:keys [http-client]} tdata info]
[cfg tdata info]
(or (some-> info :email p/resolved)
(-> (http/req! http-client {:uri "https://api.github.com/user/emails"
:headers {"Authorization" (dm/str (:type tdata) " " (:token tdata))}
:timeout 6000
:method :get})
(p/then (fn [{:keys [status body] :as response}]
(->> (http/req! cfg
{:uri "https://api.github.com/user/emails"
:headers {"Authorization" (dm/str (:type tdata) " " (:token tdata))}
:timeout 6000
:method :get})
(p/map (fn [{:keys [status body] :as response}]
(when-not (s/int-in-range? 200 300 status)
(ex/raise :type :internal
:code :unable-to-retrieve-github-emails
:hint "unable to retrieve github emails"
:http-status status
:http-body body))
(->> response :body json/read (filter :primary) first :email))))))
(->> response :body json/decode (filter :primary) first :email))))))
(defmethod ig/prep-key ::github-provider
[_ cfg]
(d/without-nils cfg))
(defmethod ig/pre-init-spec ::providers/github [_]
(s/keys :req [::http/client]))
(defmethod ig/init-key ::github-provider
(defmethod ig/init-key ::providers/github
[_ cfg]
(let [opts {:client-id (:client-id cfg)
:client-secret (:client-secret cfg)
(let [opts {:client-id (cf/get :github-client-id)
:client-secret (cf/get :github-client-secret)
:scopes #{"read:user" "user:email"}
:auth-uri "https://github.com/login/oauth/authorize"
:token-uri "https://github.com/login/oauth/access_token"
@@ -191,52 +198,48 @@
;; retrieve emails.
:get-email-fn (partial retrieve-github-email cfg)}]
(when (:enabled? cfg)
(when (contains? cf/flags :login-with-github)
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :hint "provider initialized"
:provider :github
:provider "github"
:client-id (:client-id opts)
:client-secret (obfuscate-string (:client-secret opts)))
opts)
(do
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider :github)
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider "github")
nil)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GITLAB AUTH PROVIDER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod ig/prep-key ::gitlab-provider
[_ cfg]
(d/without-nils cfg))
(defmethod ig/init-key ::gitlab-provider
[_ cfg]
(let [base (:base-uri cfg "https://gitlab.com")
(defmethod ig/init-key ::providers/gitlab
[_ _]
(let [base (cf/get :gitlab-base-uri "https://gitlab.com")
opts {:base-uri base
:client-id (:client-id cfg)
:client-secret (:client-secret cfg)
:client-id (cf/get :gitlab-client-id)
:client-secret (cf/get :gitlab-client-secret)
:scopes #{"openid" "profile" "email"}
:auth-uri (str base "/oauth/authorize")
:token-uri (str base "/oauth/token")
:user-uri (str base "/oauth/userinfo")
:name "gitlab"}]
(when (:enabled? cfg)
(when (contains? cf/flags :login-with-gitlab)
(if (and (string? (:client-id opts))
(string? (:client-secret opts)))
(do
(l/info :hint "provider initialized"
:provider :gitlab
:provider "gitlab"
:base-uri base
:client-id (:client-id opts)
:client-secret (obfuscate-string (:client-secret opts)))
opts)
(do
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider :gitlab)
(l/warn :hint "unable to initialize auth provider, missing configuration" :provider "gitlab")
nil)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -245,7 +248,7 @@
(defn- build-redirect-uri
[{:keys [provider] :as cfg}]
(let [public (u/uri (:public-uri cfg))]
(let [public (u/uri (cf/get :public-uri))]
(str (assoc public :path (str "/api/auth/oauth/" (:name provider) "/callback")))))
(defn- build-auth-uri
@@ -268,7 +271,7 @@
props))
(defn retrieve-access-token
[{:keys [provider http-client] :as cfg} code]
[{:keys [provider] :as cfg} code]
(let [params {:client_id (:client-id provider)
:client_secret (:client-secret provider)
:code code
@@ -279,26 +282,44 @@
"accept" "application/json"}
:uri (:token-uri provider)
:body (u/map->query-string params)}]
(p/then
(http/req! http-client req)
(fn [{:keys [status body] :as res}]
(if (= status 200)
(let [data (json/read body)]
{:token (get data :access_token)
:type (get data :token_type)})
(ex/raise :type :internal
:code :unable-to-retrieve-token
:http-status status
:http-body body))))))
(l/trace :hint "request access token"
:provider (:name provider)
:client-id (:client-id provider)
:client-secret (obfuscate-string (:client-secret provider))
:grant-type (:grant_type params)
:redirect-uri (:redirect_uri params))
(->> (http/req! cfg req)
(p/map (fn [{:keys [status body] :as res}]
(l/trace :hint "access token response"
:status status
:body body)
(if (= status 200)
(let [data (json/decode body)]
{:token (get data :access_token)
:type (get data :token_type)})
(ex/raise :type :internal
:code :unable-to-retrieve-token
:http-status status
:http-body body)))))))
(defn- retrieve-user-info
[{:keys [provider http-client] :as cfg} tdata]
[{:keys [provider] :as cfg} tdata]
(letfn [(retrieve []
(http/req! http-client {:uri (:user-uri provider)
:headers {"Authorization" (str (:type tdata) " " (:token tdata))}
:timeout 6000
:method :get}))
(l/trace :hint "request user info"
:uri (:user-uri provider)
:token (obfuscate-string (:token tdata))
:token-type (:type tdata))
(http/req! cfg
{:uri (:user-uri provider)
:headers {"Authorization" (str (:type tdata) " " (:token tdata))}
:timeout 6000
:method :get}))
(validate-response [response]
(l/trace :hint "user info response"
:status (:status response)
:body (:body response))
(when-not (s/int-in-range? 200 300 (:status response))
(ex/raise :type :internal
:code :unable-to-retrieve-user-info
@@ -313,14 +334,14 @@
(if-let [get-email-fn (:get-email-fn provider)]
(get-email-fn tdata info)
(let [attr-kw (cf/get :oidc-email-attr :email)]
(get info attr-kw))))
(p/resolved (get info attr-kw)))))
(get-name [info]
(let [attr-kw (cf/get :oidc-name-attr :name)]
(get info attr-kw)))
(process-response [response]
(p/let [info (-> response :body json/read)
(p/let [info (-> response :body json/decode)
email (get-email info)]
{:backend (:name provider)
:email email
@@ -329,6 +350,7 @@
(qualify-props provider))}))
(validate-info [info]
(l/trace :hint "authentication info" :info info)
(when-not (s/valid? ::info info)
(l/warn :hint "received incomplete profile info object (please set correct scopes)"
:info (pr-str info))
@@ -338,10 +360,10 @@
:info info))
info)]
(-> (retrieve)
(p/then validate-response)
(p/then process-response)
(p/then validate-info))))
(->> (retrieve)
(p/fmap validate-response)
(p/mcat process-response)
(p/fmap validate-info))))
(s/def ::backend ::us/not-empty-string)
(s/def ::email ::us/not-empty-string)
@@ -353,8 +375,8 @@
::fullname
::props]))
(defn retrieve-info
[{:keys [sprops provider] :as cfg} {:keys [params] :as request}]
(defn get-info
[{:keys [provider] :as cfg} {:keys [params] :as request}]
(letfn [(validate-oidc [info]
;; If the provider is OIDC, we can proceed to check
;; roles if they are defined.
@@ -393,44 +415,42 @@
(let [state (get params :state)
code (get params :code)
state (tokens/verify sprops {:token state :iss :oauth})]
state (tokens/verify (::main/props cfg) {:token state :iss :oauth})]
(-> (p/resolved code)
(p/then #(retrieve-access-token cfg %))
(p/then #(retrieve-user-info cfg %))
(p/then' validate-oidc)
(p/then' (partial post-process state))))))
(defn- retrieve-profile
[{:keys [pool executor] :as cfg} info]
(defn- get-profile
[{:keys [::db/pool ::wrk/executor] :as cfg} info]
(px/with-dispatch executor
(with-open [conn (db/open pool)]
(some->> (:email info)
(profile/retrieve-profile-data-by-email conn)
(profile/populate-additional-data conn)
(profile/decode-profile-row)))))
(profile/get-profile-by-email conn)))))
(defn- redirect-response
[uri]
(yrs/response :status 302 :headers {"location" (str uri)}))
(defn- generate-error-redirect
[cfg error]
(let [uri (-> (u/uri (:public-uri cfg))
[_ error]
(let [uri (-> (u/uri (cf/get :public-uri))
(assoc :path "/#/auth/login")
(assoc :query (u/map->query-string {:error "unable-to-auth" :hint (ex-message error)})))]
(redirect-response uri)))
(defn- generate-redirect
[{:keys [sprops session audit] :as cfg} request info profile]
[cfg request info profile]
(if profile
(let [sxf ((:create session) (:id profile))
(let [sxf (session/create-fn cfg (:id profile))
token (or (:invitation-token info)
(tokens/generate sprops {:iss :auth
:exp (dt/in-future "15m")
:profile-id (:id profile)}))
(tokens/generate (::main/props cfg)
{:iss :auth
:exp (dt/in-future "15m")
:profile-id (:id profile)}))
params {:token token}
uri (-> (u/uri (:public-uri cfg))
uri (-> (u/uri (cf/get :public-uri))
(assoc :path "/#/auth/verify-token")
(assoc :query (u/map->query-string params)))]
@@ -438,13 +458,11 @@
(ex/raise :type :restriction
:code :profile-blocked))
(when (fn? audit)
(audit :cmd :submit
:type "command"
:name "login"
:profile-id (:id profile)
:ip-addr (audit/parse-client-ip request)
:props (audit/profile->props profile)))
(audit/submit! cfg {:type "command"
:name "login-with-password"
:profile-id (:id profile)
:ip-addr (audit/parse-client-ip request)
:props (audit/profile->props profile)})
(->> (redirect-response uri)
(sxf request)))
@@ -453,19 +471,19 @@
:iss :prepared-register
:is-active true
:exp (dt/in-future {:hours 48}))
token (tokens/generate sprops info)
token (tokens/generate (::main/props cfg) info)
params (d/without-nils
{:token token
:fullname (:fullname info)})
uri (-> (u/uri (:public-uri cfg))
uri (-> (u/uri (cf/get :public-uri))
(assoc :path "/#/auth/register/validate")
(assoc :query (u/map->query-string params)))]
(redirect-response uri))))
(defn- auth-handler
[{:keys [sprops] :as cfg} {:keys [params] :as request}]
[cfg {:keys [params] :as request}]
(let [props (audit/extract-utm-params params)
state (tokens/generate sprops
state (tokens/generate (::main/props cfg)
{:iss :oauth
:invitation-token (:invitation-token params)
:props props
@@ -476,8 +494,8 @@
(defn- callback-handler
[cfg request]
(letfn [(process-request []
(p/let [info (retrieve-info cfg request)
profile (retrieve-profile cfg info)]
(p/let [info (get-info cfg request)
profile (get-profile cfg info)]
(generate-redirect cfg request info profile)))
(handle-error [cause]
@@ -491,7 +509,7 @@
{:compile
(fn [& _]
(fn [handler]
(fn [{:keys [providers] :as cfg} request]
(fn [{:keys [::providers] :as cfg} request]
(let [provider (some-> request :path-params :provider keyword)]
(if-let [provider (get providers provider)]
(handler (assoc cfg :provider provider) request)
@@ -500,41 +518,54 @@
:provider provider
:hint "provider not configured"))))))})
(s/def ::public-uri ::us/not-empty-string)
(s/def ::http-client ::http/client)
(s/def ::session map?)
(s/def ::sprops map?)
(s/def ::providers map?)
(s/def ::client-id ::cf/oidc-client-id)
(s/def ::client-secret ::cf/oidc-client-secret)
(s/def ::base-uri ::cf/oidc-base-uri)
(s/def ::token-uri ::cf/oidc-token-uri)
(s/def ::auth-uri ::cf/oidc-auth-uri)
(s/def ::user-uri ::cf/oidc-user-uri)
(s/def ::scopes ::cf/oidc-scopes)
(s/def ::roles ::cf/oidc-roles)
(s/def ::roles-attr ::cf/oidc-roles-attr)
(s/def ::email-attr ::cf/oidc-email-attr)
(s/def ::name-attr ::cf/oidc-name-attr)
;; FIXME: migrate to qualified-keywords
(s/def ::provider
(s/keys :req-un [::client-id
::client-secret]
:opt-un [::base-uri
::token-uri
::auth-uri
::user-uri
::scopes
::roles
::roles-attr
::email-attr
::name-attr]))
(s/def ::providers (s/map-of ::us/keyword (s/nilable ::provider)))
(s/def ::routes vector?)
(defmethod ig/pre-init-spec ::routes
[_]
(s/keys :req-un [::public-uri
::session
::sprops
::http-client
::providers
::db/pool
::wrk/executor]))
(s/keys :req [::session/manager
::http/client
::wrk/executor
::main/props
::db/pool
::providers]))
(defmethod ig/init-key ::routes
[_ {:keys [executor session] :as cfg}]
[_ {:keys [::wrk/executor] :as cfg}]
(let [cfg (update cfg :provider d/without-nils)]
["" {:middleware [[(:middleware session)]
["" {:middleware [[session/authz cfg]
[hmw/with-dispatch executor]
[hmw/with-config cfg]
[provider-lookup]
]}
;; We maintain the both URI prefixes for backward compatibility.
[provider-lookup]]}
["/auth/oauth"
["/:provider"
{:handler auth-handler
:allowed-methods #{:post}}]
["/:provider/callback"
{:handler callback-handler
:allowed-methods #{:get}}]]
["/auth/oidc"
["/:provider"
{:handler auth-handler
:allowed-methods #{:post}}]

View File

@@ -10,9 +10,8 @@
[app.common.logging :as l]
[app.db :as db]
[app.main :as main]
[app.rpc.commands.auth :as cmd.auth]
[app.rpc.mutations.profile :as profile]
[app.rpc.queries.profile :refer [retrieve-profile-data-by-email]]
[app.rpc.commands.auth :as auth]
[app.rpc.commands.profile :as profile]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
[integrant.core :as ig])
@@ -55,16 +54,17 @@
:type :password}))]
(try
(db/with-atomic [conn (:app.db/pool system)]
(->> (cmd.auth/create-profile conn
{:fullname fullname
:email email
:password password
:is-active true
:is-demo false})
(cmd.auth/create-profile-relations conn)))
(->> (auth/create-profile! conn
{:fullname fullname
:email email
:password password
:is-active true
:is-demo false})
(auth/create-profile-rels! conn)))
(when (pos? (:verbosity options))
(println "User created successfully."))
(System/exit 0)
(catch Exception _e
@@ -79,7 +79,7 @@
(db/with-atomic [conn (:app.db/pool system)]
(let [email (or (:email options)
(read-from-console {:label "Email:"}))
profile (retrieve-profile-data-by-email conn email)]
profile (profile/get-profile-by-email conn email)]
(when-not profile
(when (pos? (:verbosity options))
(println "Profile does not exists."))
@@ -111,7 +111,7 @@
:id :verbosity
:default 1
:update-fn inc]
["-q" nil "Dont' print to console"
["-q" nil "Don't print to console"
:id :verbosity
:update-fn (constantly 0)]
["-h" "--help"]])

View File

@@ -27,6 +27,10 @@
clojure.lang.IRecord
clojure.lang.IDeref)
(prefer-method print-method
clojure.lang.IPersistentMap
clojure.lang.IDeref)
(prefer-method pprint/simple-dispatch
clojure.lang.IPersistentMap
clojure.lang.IDeref)
@@ -46,20 +50,19 @@
:database-username "penpot"
:database-password "penpot"
:default-blob-version 4
:loggers-zmq-uri "tcp://localhost:45556"
:default-blob-version 5
:rpc-rlimit-config (fs/path "resources/rlimit.edn")
:rpc-climit-config (fs/path "resources/climit.edn")
:file-change-snapshot-every 5
:file-change-snapshot-timeout "3h"
:public-uri "http://localhost:3449"
:host "localhost"
:tenant "main"
:tenant "default"
:redis-uri "redis://redis/0"
:srepl-host "127.0.0.1"
:srepl-port 6062
:assets-storage-backend :assets-fs
:storage-assets-fs-directory "assets"
@@ -86,6 +89,7 @@
(s/def ::default-rpc-rlimit ::us/vector-of-strings)
(s/def ::rpc-rlimit-config ::fs/path)
(s/def ::rpc-climit-config ::fs/path)
(s/def ::media-max-file-size ::us/integer)
@@ -93,13 +97,17 @@
(s/def ::telemetry-enabled ::us/boolean)
(s/def ::audit-log-archive-uri ::us/string)
(s/def ::audit-log-http-handler-concurrency ::us/integer)
(s/def ::admins ::us/set-of-strings)
(s/def ::admins ::us/set-of-valid-emails)
(s/def ::file-change-snapshot-every ::us/integer)
(s/def ::file-change-snapshot-timeout ::dt/duration)
(s/def ::default-executor-parallelism ::us/integer)
(s/def ::worker-executor-parallelism ::us/integer)
(s/def ::scheduled-executor-parallelism ::us/integer)
(s/def ::worker-default-parallelism ::us/integer)
(s/def ::worker-webhook-parallelism ::us/integer)
(s/def ::authenticated-cookie-domain ::us/string)
(s/def ::authenticated-cookie-name ::us/string)
@@ -116,6 +124,17 @@
(s/def ::database-min-pool-size ::us/integer)
(s/def ::database-max-pool-size ::us/integer)
(s/def ::quotes-teams-per-profile ::us/integer)
(s/def ::quotes-access-tokens-per-profile ::us/integer)
(s/def ::quotes-projects-per-team ::us/integer)
(s/def ::quotes-invitations-per-team ::us/integer)
(s/def ::quotes-profiles-per-team ::us/integer)
(s/def ::quotes-files-per-project ::us/integer)
(s/def ::quotes-files-per-team ::us/integer)
(s/def ::quotes-font-variants-per-team ::us/integer)
(s/def ::quotes-comment-threads-per-file ::us/integer)
(s/def ::quotes-comments-per-file ::us/integer)
(s/def ::default-blob-version ::us/integer)
(s/def ::error-report-webhook ::us/string)
(s/def ::user-feedback-destination ::us/string)
@@ -144,7 +163,6 @@
(s/def ::http-server-max-multipart-body-size ::us/integer)
(s/def ::http-server-io-threads ::us/integer)
(s/def ::http-server-worker-threads ::us/integer)
(s/def ::initial-project-skey ::us/string)
(s/def ::ldap-attrs-email ::us/string)
(s/def ::ldap-attrs-fullname ::us/string)
(s/def ::ldap-attrs-username ::us/string)
@@ -156,8 +174,6 @@
(s/def ::ldap-ssl ::us/boolean)
(s/def ::ldap-starttls ::us/boolean)
(s/def ::ldap-user-query ::us/string)
(s/def ::loggers-loki-uri ::us/string)
(s/def ::loggers-zmq-uri ::us/string)
(s/def ::media-directory ::us/string)
(s/def ::media-uri ::us/string)
(s/def ::profile-bounce-max-age ::dt/duration)
@@ -168,11 +184,6 @@
(s/def ::redis-uri ::us/string)
(s/def ::registration-domain-whitelist ::us/set-of-strings)
(s/def ::semaphore-process-font ::us/integer)
(s/def ::semaphore-process-image ::us/integer)
(s/def ::semaphore-update-file ::us/integer)
(s/def ::semaphore-auth ::us/integer)
(s/def ::smtp-default-from ::us/string)
(s/def ::smtp-default-reply-to ::us/string)
(s/def ::smtp-host ::us/string)
@@ -181,18 +192,15 @@
(s/def ::smtp-ssl ::us/boolean)
(s/def ::smtp-tls ::us/boolean)
(s/def ::smtp-username (s/nilable ::us/string))
(s/def ::srepl-host ::us/string)
(s/def ::srepl-port ::us/integer)
(s/def ::urepl-host ::us/string)
(s/def ::urepl-port ::us/integer)
(s/def ::prepl-host ::us/string)
(s/def ::prepl-port ::us/integer)
(s/def ::assets-storage-backend ::us/keyword)
(s/def ::fdata-storage-backend ::us/keyword)
(s/def ::storage-assets-fs-directory ::us/string)
(s/def ::storage-assets-s3-bucket ::us/string)
(s/def ::storage-assets-s3-region ::us/keyword)
(s/def ::storage-assets-s3-endpoint ::us/string)
(s/def ::storage-fdata-s3-bucket ::us/string)
(s/def ::storage-fdata-s3-region ::us/keyword)
(s/def ::storage-fdata-s3-prefix ::us/string)
(s/def ::storage-fdata-s3-endpoint ::us/string)
(s/def ::telemetry-uri ::us/string)
(s/def ::telemetry-with-taiga ::us/boolean)
(s/def ::tenant ::us/string)
@@ -203,6 +211,7 @@
::admins
::allow-demo-users
::audit-log-archive-uri
::audit-log-http-handler-concurrency
::auth-token-cookie-name
::auth-token-cookie-max-age
::authenticated-cookie-name
@@ -217,7 +226,9 @@
::default-rpc-rlimit
::error-report-webhook
::default-executor-parallelism
::worker-executor-parallelism
::scheduled-executor-parallelism
::worker-default-parallelism
::worker-webhook-parallelism
::file-change-snapshot-every
::file-change-snapshot-timeout
::user-feedback-destination
@@ -246,7 +257,6 @@
::http-server-max-multipart-body-size
::http-server-io-threads
::http-server-worker-threads
::initial-project-skey
::ldap-attrs-email
::ldap-attrs-fullname
::ldap-attrs-username
@@ -259,14 +269,24 @@
::ldap-starttls
::ldap-user-query
::local-assets-uri
::loggers-loki-uri
::loggers-zmq-uri
::media-max-file-size
::profile-bounce-max-age
::profile-bounce-threshold
::profile-complaint-max-age
::profile-complaint-threshold
::public-uri
::quotes-teams-per-profile
::quotes-access-tokens-per-profile
::quotes-projects-per-team
::quotes-invitations-per-team
::quotes-profiles-per-team
::quotes-files-per-project
::quotes-files-per-team
::quotes-font-variants-per-team
::quotes-comment-threads-per-file
::quotes-comments-per-file
::redis-uri
::registration-domain-whitelist
::rpc-rlimit-config
@@ -285,19 +305,16 @@
::smtp-tls
::smtp-username
::srepl-host
::srepl-port
::urepl-host
::urepl-port
::prepl-host
::prepl-port
::assets-storage-backend
::storage-assets-fs-directory
::storage-assets-s3-bucket
::storage-assets-s3-region
::storage-assets-s3-endpoint
::fdata-storage-backend
::storage-fdata-s3-bucket
::storage-fdata-s3-region
::storage-fdata-s3-prefix
::storage-fdata-s3-endpoint
::telemetry-enabled
::telemetry-uri
::telemetry-referer
@@ -335,10 +352,11 @@
(merge defaults)
(us/conform ::config))
(catch Throwable e
(when (ex/ex-info? e)
(when (ex/error? e)
(println ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;")
(println "Error on validating configuration:")
(println (us/pretty-explain (ex-data e)))
(println (some-> e ex-data ex/explain))
(println (ex/explain (ex-data e)))
(println ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"))
(throw e))))

View File

@@ -17,7 +17,6 @@
[app.db.sql :as sql]
[app.metrics :as mtx]
[app.util.json :as json]
[app.util.migrations :as mg]
[app.util.time :as dt]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
@@ -32,7 +31,6 @@
io.whitfin.siphash.SipHasherContainer
java.io.InputStream
java.io.OutputStream
java.lang.AutoCloseable
java.sql.Connection
java.sql.Savepoint
org.postgresql.PGConnection
@@ -50,12 +48,9 @@
;; Initialization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare apply-migrations!)
(s/def ::connection-timeout ::us/integer)
(s/def ::max-size ::us/integer)
(s/def ::min-size ::us/integer)
(s/def ::migrations map?)
(s/def ::name keyword?)
(s/def ::password ::us/string)
(s/def ::uri ::us/not-empty-string)
@@ -64,26 +59,26 @@
(s/def ::read-only? ::us/boolean)
(s/def ::pool-options
(s/keys :opt-un [::uri ::name
::min-size
::max-size
::connection-timeout
::validation-timeout
::migrations
::username
::password
::mtx/metrics
::read-only?]))
(s/keys :opt [::uri
::name
::min-size
::max-size
::connection-timeout
::validation-timeout
::username
::password
::mtx/metrics
::read-only?]))
(def defaults
{:name :main
:min-size 0
:max-size 60
:connection-timeout 10000
:validation-timeout 10000
:idle-timeout 120000 ; 2min
:max-lifetime 1800000 ; 30m
:read-only? false})
{::name :main
::min-size 0
::max-size 60
::connection-timeout 10000
::validation-timeout 10000
::idle-timeout 120000 ; 2min
::max-lifetime 1800000 ; 30m
::read-only? false})
(defmethod ig/prep-key ::pool
[_ cfg]
@@ -93,39 +88,23 @@
(defmethod ig/pre-init-spec ::pool [_] ::pool-options)
(defmethod ig/init-key ::pool
[_ {:keys [migrations read-only? uri] :as cfg}]
(if uri
(let [pool (create-pool cfg)]
(l/info :hint "initialize connection pool"
:name (d/name (:name cfg))
:uri uri
:read-only read-only?
:with-credentials (and (contains? cfg :username)
(contains? cfg :password))
:min-size (:min-size cfg)
:max-size (:max-size cfg))
(when-not read-only?
(some->> (seq migrations) (apply-migrations! pool)))
pool)
(do
(l/warn :hint "unable to initialize pool, missing url"
:name (d/name (:name cfg))
:read-only read-only?)
nil)))
[_ {:keys [::uri ::read-only?] :as cfg}]
(when uri
(l/info :hint "initialize connection pool"
:name (d/name (::name cfg))
:uri uri
:read-only read-only?
:with-credentials (and (contains? cfg ::username)
(contains? cfg ::password))
:min-size (::min-size cfg)
:max-size (::max-size cfg))
(create-pool cfg)))
(defmethod ig/halt-key! ::pool
[_ pool]
(when pool
(.close ^HikariDataSource pool)))
(defn- apply-migrations!
[pool migrations]
(with-open [conn ^AutoCloseable (open pool)]
(mg/setup! conn)
(doseq [[name steps] migrations]
(mg/migrate! conn {:name (d/name name) :steps steps}))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; API & Impl
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -135,19 +114,19 @@
"SET idle_in_transaction_session_timeout = 300000;"))
(defn- create-datasource-config
[{:keys [metrics uri] :as cfg}]
[{:keys [::mtx/metrics ::uri] :as cfg}]
(let [config (HikariConfig.)]
(doto config
(.setJdbcUrl (str "jdbc:" uri))
(.setPoolName (d/name (:name cfg)))
(.setPoolName (d/name (::name cfg)))
(.setAutoCommit true)
(.setReadOnly (:read-only? cfg))
(.setConnectionTimeout (:connection-timeout cfg))
(.setValidationTimeout (:validation-timeout cfg))
(.setIdleTimeout (:idle-timeout cfg))
(.setMaxLifetime (:max-lifetime cfg))
(.setMinimumIdle (:min-size cfg))
(.setMaximumPoolSize (:max-size cfg))
(.setReadOnly (::read-only? cfg))
(.setConnectionTimeout (::connection-timeout cfg))
(.setValidationTimeout (::validation-timeout cfg))
(.setIdleTimeout (::idle-timeout cfg))
(.setMaxLifetime (::max-lifetime cfg))
(.setMinimumIdle (::min-size cfg))
(.setMaximumPoolSize (::max-size cfg))
(.setConnectionInitSql initsql)
(.setInitializationFailTimeout -1))
@@ -157,8 +136,8 @@
(PrometheusMetricsTrackerFactory.)
(.setMetricsTrackerFactory config)))
(some->> ^String (:username cfg) (.setUsername config))
(some->> ^String (:password cfg) (.setPassword config))
(some->> ^String (::username cfg) (.setUsername config))
(some->> ^String (::password cfg) (.setPassword config))
config))
@@ -166,15 +145,28 @@
[v]
(instance? javax.sql.DataSource v))
(s/def ::conn some?)
(s/def ::nilable-pool (s/nilable ::pool))
(s/def ::pool pool?)
(s/def ::pool-or-conn some?)
(defn closed?
[pool]
(.isClosed ^HikariDataSource pool))
(defn read-only?
[pool]
(.isReadOnly ^HikariDataSource pool))
[pool-or-conn]
(cond
(instance? HikariDataSource pool-or-conn)
(.isReadOnly ^HikariDataSource pool-or-conn)
(instance? Connection pool-or-conn)
(.isReadOnly ^Connection pool-or-conn)
:else
(ex/raise :type :internal
:code :invalid-connection
:hint "invalid connection provided")))
(defn create-pool
[cfg]
@@ -232,44 +224,46 @@
[pool]
(jdbc/get-connection pool))
(def ^:private default-opts
{:builder-fn sql/as-kebab-maps})
(defn exec!
([ds sv]
(exec! ds sv {}))
(jdbc/execute! ds sv default-opts))
([ds sv opts]
(jdbc/execute! ds sv (assoc opts :builder-fn sql/as-kebab-maps))))
(jdbc/execute! ds sv (merge default-opts opts))))
(defn exec-one!
([ds sv] (exec-one! ds sv {}))
([ds sv]
(jdbc/execute-one! ds sv default-opts))
([ds sv opts]
(jdbc/execute-one! ds sv (assoc opts :builder-fn sql/as-kebab-maps))))
(jdbc/execute-one! ds sv
(-> (merge default-opts opts)
(assoc :return-keys (::return-keys? opts false))))))
(defn insert!
([ds table params] (insert! ds table params nil))
([ds table params opts]
(exec-one! ds
(sql/insert table params opts)
(merge {:return-keys true} opts))))
[ds table params & {:as opts}]
(exec-one! ds
(sql/insert table params opts)
(merge {::return-keys? true} opts)))
(defn insert-multi!
([ds table cols rows] (insert-multi! ds table cols rows nil))
([ds table cols rows opts]
(exec! ds
(sql/insert-multi table cols rows opts)
(merge {:return-keys true} opts))))
[ds table cols rows & {:as opts}]
(exec! ds
(sql/insert-multi table cols rows opts)
(merge {::return-keys? true} opts)))
(defn update!
([ds table params where] (update! ds table params where nil))
([ds table params where opts]
(exec-one! ds
(sql/update table params where opts)
(merge {:return-keys true} opts))))
[ds table params where & {:as opts}]
(exec-one! ds
(sql/update table params where opts)
(merge {::return-keys? true} opts)))
(defn delete!
([ds table params] (delete! ds table params nil))
([ds table params opts]
(exec-one! ds
(sql/delete table params opts)
(assoc opts :return-keys true))))
[ds table params & {:as opts}]
(exec-one! ds
(sql/delete table params opts)
(merge {::return-keys? true} opts)))
(defn is-row-deleted?
[{:keys [deleted-at]}]
@@ -278,54 +272,34 @@
(inst-ms (dt/now)))))
(defn get*
"Internal function for retrieve a single row from database that
matches a simple filters."
([ds table params]
(get* ds table params nil))
([ds table params {:keys [check-deleted?] :or {check-deleted? true} :as opts}]
(let [rows (exec! ds (sql/select table params opts))
rows (cond->> rows
check-deleted?
(remove is-row-deleted?))]
(first rows))))
"Retrieve a single row from database that matches a simple filters. Do
not raises exceptions."
[ds table params & {:as opts}]
(let [rows (exec! ds (sql/select table params opts))
rows (cond->> rows
(::remove-deleted? opts true)
(remove is-row-deleted?))]
(first rows)))
(defn get
([ds table params]
(get ds table params nil))
([ds table params {:keys [check-deleted?] :or {check-deleted? true} :as opts}]
(let [row (get* ds table params opts)]
(when (and (not row) check-deleted?)
(ex/raise :type :not-found
:table table
:hint "database object not found"))
row)))
(defn get-by-params
"DEPRECATED"
([ds table params]
(get-by-params ds table params nil))
([ds table params {:keys [check-not-found] :or {check-not-found true} :as opts}]
(let [row (get* ds table params (assoc opts :check-deleted? check-not-found))]
(when (and (not row) check-not-found)
(ex/raise :type :not-found
:table table
:hint "database object not found"))
row)))
"Retrieve a single row from database that matches a simple
filters. Raises :not-found exception if no object is found."
[ds table params & {:as opts}]
(let [row (get* ds table params opts)]
(when (and (not row) (::check-deleted? opts true))
(ex/raise :type :not-found
:code :object-not-found
:table table
:hint "database object not found"))
row))
(defn get-by-id
([ds table id]
(get ds table {:id id} nil))
([ds table id opts]
(let [opts (cond-> opts
(contains? opts :check-not-found)
(assoc :check-deleted? (:check-not-found opts)))]
(get ds table {:id id} opts))))
[ds table id & {:as opts}]
(get ds table {:id id} opts))
(defn query
([ds table params]
(query ds table params nil))
([ds table params opts]
(exec! ds (sql/select table params opts))))
[ds table params & {:as opts}]
(exec! ds (sql/select table params opts)))
(defn pgobject?
([v]
@@ -352,10 +326,13 @@
[v]
(and (pgarray? v) (= "uuid" (.getBaseTypeName ^PgArray v))))
;; TODO rename to decode-pgarray-into
(defn decode-pgarray
([v] (some->> ^PgArray v .getArray vec))
([v in] (some->> ^PgArray v .getArray (into in)))
([v in xf] (some->> ^PgArray v .getArray (into in xf))))
([v] (decode-pgarray v []))
([v in]
(into in (some-> ^PgArray v .getArray)))
([v in xf]
(into in xf (some-> ^PgArray v .getArray))))
(defn pgarray->set
[v]
@@ -417,47 +394,58 @@
(defn decode-json-pgobject
[^PGobject o]
(let [typ (.getType o)
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(json/read val)
val)))
(when o
(let [typ (.getType o)
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(json/decode val)
val))))
(defn decode-transit-pgobject
[^PGobject o]
(let [typ (.getType o)
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(t/decode-str val)
val)))
(when o
(let [typ (.getType o)
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(t/decode-str val)
val))))
(defn inet
[ip-addr]
(doto (org.postgresql.util.PGobject.)
(.setType "inet")
(.setValue (str ip-addr))))
(when ip-addr
(doto (org.postgresql.util.PGobject.)
(.setType "inet")
(.setValue (str ip-addr)))))
(defn decode-inet
[^PGobject o]
(if (= "inet" (.getType o))
(.getValue o)
nil))
(when o
(if (= "inet" (.getType o))
(.getValue o)
nil)))
(defn tjson
"Encode as transit json."
[data]
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (t/encode-str data {:type :json-verbose}))))
(when data
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (t/encode-str data {:type :json-verbose})))))
(defn json
"Encode as plain json."
[data]
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (json/write-str data))))
(when data
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (json/encode-str data)))))
(defn get-update-count
[result]
(:next.jdbc/update-count result))
;; --- Locks
@@ -488,3 +476,18 @@
(let [n (xact-check-param n)
row (exec-one! conn ["select pg_try_advisory_xact_lock(?::bigint) as lock" n])]
(:lock row)))
(defn sql-exception?
[cause]
(instance? java.sql.SQLException cause))
(defn connection-error?
[cause]
(and (sql-exception? cause)
(contains? #{"08003" "08006" "08001" "08004"}
(.getSQLState ^java.sql.SQLException cause))))
(defn serialization-error?
[cause]
(and (sql-exception? cause)
(= "40001" (.getSQLState ^java.sql.SQLException cause))))

View File

@@ -7,6 +7,7 @@
(ns app.db.sql
(:refer-clojure :exclude [update])
(:require
[app.db :as-alias db]
[clojure.string :as str]
[next.jdbc.optional :as jdbc-opt]
[next.jdbc.sql.builder :as sql]))
@@ -43,8 +44,10 @@
([table where-params opts]
(let [opts (merge default-opts opts)
opts (cond-> opts
(:for-update opts) (assoc :suffix "FOR UPDATE")
(:for-key-share opts) (assoc :suffix "FOR KEY SHARE"))]
(::db/for-update? opts) (assoc :suffix "FOR UPDATE")
(::db/for-share? opts) (assoc :suffix "FOR KEY SHARE")
(:for-update opts) (assoc :suffix "FOR UPDATE")
(:for-key-share opts) (assoc :suffix "FOR KEY SHARE"))]
(sql/for-query table where-params opts))))
(defn update

View File

@@ -4,7 +4,7 @@
;;
;; Copyright (c) KALEIDOS INC
(ns app.emails
(ns app.email
"Main api for send emails."
(:require
[app.common.exceptions :as ex]
@@ -14,7 +14,7 @@
[app.config :as cf]
[app.db :as db]
[app.db.sql :as sql]
[app.emails.invite-to-team :as-alias emails.invite-to-team]
[app.email.invite-to-team :as-alias email.invite-to-team]
[app.metrics :as mtx]
[app.util.template :as tmpl]
[app.worker :as wrk]
@@ -71,7 +71,7 @@
(.addFrom ^MimeMessage mmsg from)))))
(defn- assign-reply-to
[mmsg {:keys [default-reply-to] :as cfg} {:keys [reply-to] :as params}]
[mmsg {:keys [::default-reply-to] :as cfg} {:keys [reply-to] :as params}]
(let [reply-to (or reply-to default-reply-to)]
(when reply-to
(let [reply-to (parse-address reply-to)]
@@ -127,9 +127,8 @@
mmsg))
(defn- opts->props
[{:keys [username tls host port timeout default-from]
:or {timeout 30000}
:as opts}]
[{:keys [::username ::tls ::host ::port ::timeout ::default-from]
:or {timeout 30000}}]
(reduce-kv
(fn [^Properties props k v]
(if (nil? v)
@@ -150,8 +149,8 @@
"mail.smtp.connectiontimeout" timeout}))
(defn- create-smtp-session
[opts]
(let [props (opts->props opts)]
[cfg]
(let [props (opts->props cfg)]
(Session/getInstance props)))
(defn- create-smtp-message
@@ -171,7 +170,7 @@
;; TEMPLATE EMAIL IMPL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def ^:private email-path "app/emails/%(id)s/%(lang)s.%(type)s")
(def ^:private email-path "app/email/%(id)s/%(lang)s.%(type)s")
(defn- render-email-template-part
[type id context]
@@ -257,15 +256,17 @@
"Schedule an already defined email to be sent using asynchronously
using worker task."
[{:keys [::conn ::factory] :as context}]
(us/verify fn? factory)
(us/verify some? conn)
(let [email (factory context)]
(wrk/submit! (assoc email
::wrk/task :sendmail
::wrk/delay 0
::wrk/max-retries 4
::wrk/priority 200
::wrk/conn conn))))
(let [email (if factory
(factory context)
(dissoc context ::conn))]
(wrk/submit! (merge
{::wrk/task :sendmail
::wrk/delay 0
::wrk/max-retries 4
::wrk/priority 200
::wrk/conn conn}
email))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SENDMAIL FN / TASK HANDLER
@@ -281,14 +282,14 @@
(s/def ::default-from ::cf/smtp-default-from)
(s/def ::smtp-config
(s/keys :opt-un [::username
::password
::tls
::ssl
::host
::port
::default-from
::default-reply-to]))
(s/keys :opt [::username
::password
::tls
::ssl
::host
::port
::default-from
::default-reply-to]))
(declare send-to-logger!)
@@ -304,8 +305,8 @@
(let [session (create-smtp-session cfg)]
(with-open [transport (.getTransport session (if (:ssl cfg) "smtps" "smtp"))]
(.connect ^Transport transport
^String (:username cfg)
^String (:password cfg))
^String (::username cfg)
^String (::password cfg))
(let [^MimeMessage message (create-smtp-message cfg session params)]
(.sendMessage ^Transport transport
@@ -317,10 +318,10 @@
(send-to-logger! cfg params))))
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::sendmail ::mtx/metrics]))
(s/keys :req [::sendmail ::mtx/metrics]))
(defmethod ig/init-key ::handler
[_ {:keys [sendmail]}]
[_ {:keys [::sendmail]}]
(fn [{:keys [props] :as task}]
(sendmail props)))
@@ -378,14 +379,14 @@
"Password change confirmation email"
(template-factory ::change-email))
(s/def ::emails.invite-to-team/invited-by ::us/string)
(s/def ::emails.invite-to-team/team ::us/string)
(s/def ::emails.invite-to-team/token ::us/string)
(s/def ::email.invite-to-team/invited-by ::us/string)
(s/def ::email.invite-to-team/team ::us/string)
(s/def ::email.invite-to-team/token ::us/string)
(s/def ::invite-to-team
(s/keys :req-un [::emails.invite-to-team/invited-by
::emails.invite-to-team/token
::emails.invite-to-team/team]))
(s/keys :req-un [::email.invite-to-team/invited-by
::email.invite-to-team/token
::email.invite-to-team/team]))
(def invite-to-team
"Teams member invitation email."

View File

@@ -6,12 +6,22 @@
(ns app.http
(:require
[app.auth.oidc :as-alias oidc]
[app.common.data :as d]
[app.common.logging :as l]
[app.common.transit :as t]
[app.db :as-alias db]
[app.http.access-token :as actoken]
[app.http.assets :as-alias assets]
[app.http.awsns :as-alias awsns]
[app.http.debug :as-alias debug]
[app.http.errors :as errors]
[app.http.middleware :as mw]
[app.http.session :as session]
[app.http.websocket :as-alias ws]
[app.metrics :as mtx]
[app.rpc :as-alias rpc]
[app.rpc.doc :as-alias rpc.doc]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
@@ -36,47 +46,53 @@
(s/def ::max-body-size integer?)
(s/def ::max-multipart-body-size integer?)
(s/def ::io-threads integer?)
(s/def ::worker-threads integer?)
(defmethod ig/prep-key ::server
[_ cfg]
(merge {:name "http"
:port 6060
:host "0.0.0.0"
:max-body-size (* 1024 1024 30) ; 30 MiB
:max-multipart-body-size (* 1024 1024 120)} ; 120 MiB
(merge {::port 6060
::host "0.0.0.0"
::max-body-size (* 1024 1024 30) ; 30 MiB
::max-multipart-body-size (* 1024 1024 120)} ; 120 MiB
(d/without-nils cfg)))
(defmethod ig/pre-init-spec ::server [_]
(s/and
(s/keys :req-un [::port ::host ::name ::max-body-size ::max-multipart-body-size]
:opt-un [::router ::handler ::io-threads ::worker-threads ::wrk/executor])
(fn [cfg]
(or (contains? cfg :router)
(contains? cfg :handler)))))
(s/keys :req [::port ::host]
:opt [::max-body-size
::max-multipart-body-size
::router
::handler
::io-threads
::wrk/executor]))
(defmethod ig/init-key ::server
[_ {:keys [handler router port name host] :as cfg}]
(l/info :hint "starting http server" :port port :host host :name name)
[_ {:keys [::handler ::router ::host ::port] :as cfg}]
(l/info :hint "starting http server" :port port :host host)
(let [options {:http/port port
:http/host host
:http/max-body-size (:max-body-size cfg)
:http/max-multipart-body-size (:max-multipart-body-size cfg)
:xnio/io-threads (:io-threads cfg)
:xnio/worker-threads (:worker-threads cfg)
:xnio/dispatch (:executor cfg)
:http/max-body-size (::max-body-size cfg)
:http/max-multipart-body-size (::max-multipart-body-size cfg)
:xnio/io-threads (::io-threads cfg)
:xnio/dispatch (::wrk/executor cfg)
:ring/async true}
handler (if (some? router)
handler (cond
(some? router)
(wrap-router router)
handler)
server (yt/server handler (d/without-nils options))]
(assoc cfg :server (yt/start! server))))
(some? handler)
handler
:else
(throw (UnsupportedOperationException. "handler or router are required")))
options (d/without-nils options)
server (yt/server handler options)]
(assoc cfg ::server (yt/start! server))))
(defmethod ig/halt-key! ::server
[_ {:keys [server name port] :as cfg}]
(l/info :msg "stoping http server" :name name :port port)
[_ {:keys [::server ::port] :as cfg}]
(l/info :msg "stopping http server" :port port)
(yt/stop! server))
(defn- not-found-handler
@@ -90,9 +106,7 @@
(let [params (:path-params match)
result (:result match)
handler (or (:handler result) not-found-handler)
request (-> request
(assoc :path-params params)
(update :params merge params))]
request (assoc request :path-params params)]
(handler request respond raise))
(not-found-handler request respond raise)))
@@ -114,67 +128,41 @@
;; HTTP ROUTER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::assets map?)
(s/def ::audit-handler fn?)
(s/def ::awsns-handler fn?)
(s/def ::debug-routes (s/nilable vector?))
(s/def ::doc-routes (s/nilable vector?))
(s/def ::feedback fn?)
(s/def ::oauth map?)
(s/def ::oidc-routes (s/nilable vector?))
(s/def ::rpc-routes (s/nilable vector?))
(s/def ::session map?)
(s/def ::storage map?)
(s/def ::ws fn?)
(defmethod ig/pre-init-spec ::router [_]
(s/keys :req-un [::mtx/metrics
::ws
::storage
::assets
::session
::feedback
::awsns-handler
::debug-routes
::oidc-routes
::audit-handler
::rpc-routes
::doc-routes]))
(s/keys :req [::session/manager
::actoken/manager
::ws/routes
::rpc/routes
::rpc.doc/routes
::oidc/routes
::assets/routes
::debug/routes
::db/pool
::mtx/routes
::awsns/routes]))
(defmethod ig/init-key ::router
[_ {:keys [ws session metrics assets feedback] :as cfg}]
[_ cfg]
(rr/router
[["" {:middleware [[mw/server-timing]
[mw/format-response]
[mw/params]
[mw/parse-request]
[session/soft-auth cfg]
[actoken/soft-auth cfg]
[mw/errors errors/handle]
[mw/restrict-methods]]}
["/metrics" {:handler (::mtx/handler metrics)
:allowed-methods #{:get}}]
["/assets" {:middleware [(:middleware session)]}
["/by-id/:id" {:handler (:objects-handler assets)}]
["/by-file-media-id/:id" {:handler (:file-objects-handler assets)}]
["/by-file-media-id/:id/thumbnail" {:handler (:file-thumbnails-handler assets)}]]
(:debug-routes cfg)
(::mtx/routes cfg)
(::assets/routes cfg)
(::debug/routes cfg)
["/webhooks"
["/sns" {:handler (:awsns-handler cfg)
:allowed-methods #{:post}}]]
(::awsns/routes cfg)]
["/ws/notifications" {:middleware [(:middleware session)]
:handler ws
:allowed-methods #{:get}}]
(::ws/routes cfg)
["/api" {:middleware [[mw/cors]
[(:middleware session)]]}
["/audit/events" {:handler (:audit-handler cfg)
:allowed-methods #{:post}}]
["/feedback" {:handler feedback
:allowed-methods #{:post}}]
(:doc-routes cfg)
(:oidc-routes cfg)
(:rpc-routes cfg)]]]))
["/api" {:middleware [[mw/cors]]}
(::oidc/routes cfg)
(::rpc.doc/routes cfg)
(::rpc/routes cfg)]]]))

View File

@@ -0,0 +1,96 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.http.access-token
(:require
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as db]
[app.main :as-alias main]
[app.tokens :as tokens]
[app.worker :as-alias wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]
[promesa.exec :as px]
[yetti.request :as yrq]))
(s/def ::manager
(s/keys :req [::db/pool ::wrk/executor ::main/props]))
(defmethod ig/pre-init-spec ::manager [_] ::manager)
(defmethod ig/init-key ::manager [_ cfg] cfg)
(defmethod ig/halt-key! ::manager [_ _])
(def header-re #"^Token\s+(.*)")
(defn- get-token
[request]
(some->> (yrq/get-header request "authorization")
(re-matches header-re)
(second)))
(defn- decode-token
[props token]
(when token
(tokens/verify props {:token token :iss "access-token"})))
(defn- get-token-perms
[pool token-id]
(when-not (db/read-only? pool)
(when-let [token (db/get* pool :access-token {:id token-id} {:columns [:perms]})]
(some-> (:perms token)
(db/decode-pgarray #{})))))
(defn- wrap-soft-auth
[handler {:keys [::manager]}]
(us/assert! ::manager manager)
(let [{:keys [::wrk/executor ::main/props]} manager]
(fn [request respond raise]
(let [token (get-token request)]
(->> (px/submit! executor (partial decode-token props token))
(p/fnly (fn [claims cause]
(when cause
(l/trace :hint "exception on decoding malformed token" :cause cause))
(let [request (cond-> request
(map? claims)
(assoc ::id (:tid claims)))]
(handler request respond raise)))))))))
(defn- wrap-authz
[handler {:keys [::manager]}]
(us/assert! ::manager manager)
(let [{:keys [::wrk/executor ::db/pool]} manager]
(fn [request respond raise]
(if-let [token-id (::id request)]
(->> (px/submit! executor (partial get-token-perms pool token-id))
(p/fnly (fn [perms cause]
(cond
(some? cause)
(raise cause)
(nil? perms)
(handler request respond raise)
:else
(let [request (assoc request ::perms perms)]
(handler request respond raise))))))
(handler request respond raise)))))
(def soft-auth
{:name ::soft-auth
:compile (fn [& _]
(when (contains? cf/flags :access-tokens)
wrap-soft-auth))})
(def authz
{:name ::authz
:compile (fn [& _]
(when (contains? cf/flags :access-tokens)
wrap-authz))})

View File

@@ -7,18 +7,17 @@
(ns app.http.assets
"Assets related handlers."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.common.uri :as u]
[app.db :as db]
[app.metrics :as mtx]
[app.storage :as sto]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]
[promesa.exec :as px]
[yetti.response :as yrs]))
(def ^:private cache-max-age
@@ -27,105 +26,100 @@
(def ^:private signature-max-age
(dt/duration {:hours 24 :minutes 15}))
(defn coerce-id
[id]
(let [res (parse-uuid id)]
(when-not (uuid? res)
(ex/raise :type :not-found
:hint "object not found"))
res))
(defn get-id
[{:keys [path-params]}]
(if-let [id (some-> path-params :id d/parse-uuid)]
(p/resolved id)
(p/rejected (ex/error :type :not-found
:hunt "object not found"))))
(defn- get-file-media-object
[{:keys [pool executor] :as storage} id]
(px/with-dispatch executor
(let [id (coerce-id id)
mobj (db/exec-one! pool ["select * from file_media_object where id=?" id])]
(when-not mobj
(ex/raise :type :not-found
:hint "object does not found"))
mobj)))
[pool id]
(db/get pool :file-media-object {:id id}))
(defn- serve-object-from-s3
[{:keys [::sto/storage] :as cfg} obj]
(let [mdata (meta obj)]
(->> (sto/get-object-url storage obj {:max-age signature-max-age})
(p/fmap (fn [{:keys [host port] :as url}]
(let [headers {"location" (str url)
"x-host" (cond-> host port (str ":" port))
"x-mtype" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))}]
(yrs/response
:status 307
:headers headers)))))))
(defn- serve-object-from-fs
[{:keys [::path]} obj]
(let [purl (u/join (u/uri path)
(sto/object->relative-path obj))
mdata (meta obj)
headers {"x-accel-redirect" (:path purl)
"content-type" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))}]
(p/resolved
(yrs/response :status 204 :headers headers))))
(defn- serve-object
"Helper function that returns the appropriate response depending on
the storage object backend type."
[{:keys [storage] :as cfg} obj]
(let [mdata (meta obj)
backend (sto/resolve-backend storage (:backend obj))]
(case (:type backend)
:s3
(p/let [{:keys [host port] :as url} (sto/get-object-url storage obj {:max-age signature-max-age})]
(yrs/response :status 307
:headers {"location" (str url)
"x-host" (cond-> host port (str ":" port))
"x-mtype" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))}))
:fs
(p/let [purl (u/uri (:assets-path cfg))
purl (u/join purl (sto/object->relative-path obj))]
(yrs/response :status 204
:headers {"x-accel-redirect" (:path purl)
"content-type" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cache-max-age))})))))
[{:keys [::sto/storage] :as cfg} {:keys [backend] :as obj}]
(let [backend (sto/resolve-backend storage backend)]
(case (::sto/type backend)
:s3 (serve-object-from-s3 cfg obj)
:fs (serve-object-from-fs cfg obj))))
(defn objects-handler
"Handler that servers storage objects by id."
[{:keys [storage executor] :as cfg} request respond raise]
(-> (px/with-dispatch executor
(p/let [id (get-in request [:path-params :id])
id (coerce-id id)
obj (sto/get-object storage id)]
(if obj
(serve-object cfg obj)
(yrs/response 404))))
(p/bind p/wrap)
(p/then' respond)
(p/catch raise)))
[{:keys [::sto/storage ::wrk/executor] :as cfg} request respond raise]
(->> (get-id request)
(p/mcat executor (fn [id] (sto/get-object storage id)))
(p/mcat executor (fn [obj]
(if (some? obj)
(serve-object cfg obj)
(p/resolved (yrs/response 404)))))
(p/fnly executor (fn [result cause]
(if cause (raise cause) (respond result))))))
(defn- generic-handler
"A generic handler helper/common code for file-media based handlers."
[{:keys [storage] :as cfg} request kf]
(p/let [id (get-in request [:path-params :id])
mobj (get-file-media-object storage id)
obj (sto/get-object storage (kf mobj))]
(if obj
(serve-object cfg obj)
(yrs/response 404))))
[{:keys [::sto/storage ::wrk/executor] :as cfg} request kf]
(let [pool (::db/pool storage)]
(->> (get-id request)
(p/fmap executor (fn [id] (get-file-media-object pool id)))
(p/mcat executor (fn [mobj] (sto/get-object storage (kf mobj))))
(p/mcat executor (fn [sobj]
(if sobj
(serve-object cfg sobj)
(p/resolved (yrs/response 404))))))))
(defn file-objects-handler
"Handler that serves storage objects by file media id."
[cfg request respond raise]
(-> (generic-handler cfg request :media-id)
(p/then respond)
(p/catch raise)))
(->> (generic-handler cfg request :media-id)
(p/fnly (fn [result cause]
(if cause (raise cause) (respond result))))))
(defn file-thumbnails-handler
"Handler that serves storage objects by thumbnail-id and quick
fallback to file-media-id if no thumbnail is available."
[cfg request respond raise]
(-> (generic-handler cfg request #(or (:thumbnail-id %) (:media-id %)))
(p/then respond)
(p/catch raise)))
(->> (generic-handler cfg request #(or (:thumbnail-id %) (:media-id %)))
(p/fnly (fn [result cause]
(if cause (raise cause) (respond result))))))
;; --- Initialization
(s/def ::storage some?)
(s/def ::assets-path ::us/string)
(s/def ::cache-max-age ::dt/duration)
(s/def ::signature-max-age ::dt/duration)
(s/def ::path ::us/string)
(s/def ::routes vector?)
(defmethod ig/pre-init-spec ::handlers [_]
(s/keys :req-un [::storage
::wrk/executor
::mtx/metrics
::assets-path
::cache-max-age
::signature-max-age]))
(defmethod ig/pre-init-spec ::routes [_]
(s/keys :req [::sto/storage ::wrk/executor ::path]))
(defmethod ig/init-key ::handlers
(defmethod ig/init-key ::routes
[_ cfg]
{:objects-handler (partial objects-handler cfg)
:file-objects-handler (partial file-objects-handler cfg)
:file-thumbnails-handler (partial file-thumbnails-handler cfg)})
["/assets"
["/by-id/:id" {:handler (partial objects-handler cfg)}]
["/by-file-media-id/:id" {:handler (partial file-objects-handler cfg)}]
["/by-file-media-id/:id/thumbnail" {:handler (partial file-thumbnails-handler cfg)}]])

View File

@@ -12,7 +12,9 @@
[app.db :as db]
[app.db.sql :as sql]
[app.http.client :as http]
[app.main :as-alias main]
[app.tokens :as tokens]
[app.worker :as-alias wrk]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
@@ -26,21 +28,23 @@
(declare parse-notification)
(declare process-report)
(s/def ::http-client ::http/client)
(s/def ::sprops map?)
(defmethod ig/pre-init-spec ::routes [_]
(s/keys :req [::http/client
::main/props
::db/pool
::wrk/executor]))
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::db/pool ::http-client ::sprops]))
(defmethod ig/init-key ::handler
[_ {:keys [executor] :as cfg}]
(fn [request respond _]
(let [data (-> request yrq/body slurp)]
(px/run! executor #(handle-request cfg data)))
(respond (yrs/response 200))))
(defmethod ig/init-key ::routes
[_ {:keys [::wrk/executor] :as cfg}]
(letfn [(handler [request respond _]
(let [data (-> request yrq/body slurp)]
(px/run! executor #(handle-request cfg data)))
(respond (yrs/response 200)))]
["/sns" {:handler handler
:allowed-methods #{:post}}]))
(defn handle-request
[{:keys [http-client] :as cfg} data]
[cfg data]
(try
(let [body (parse-json data)
mtype (get body "Type")]
@@ -49,7 +53,7 @@
(let [surl (get body "SubscribeURL")
stopic (get body "TopicArn")]
(l/info :action "subscription received" :topic stopic :url surl)
(http/req! http-client {:uri surl :method :post :timeout 10000} {:sync? true}))
(http/req! cfg {:uri surl :method :post :timeout 10000} {:sync? true}))
(= mtype "Notification")
(when-let [message (parse-json (get body "Message"))]
@@ -100,10 +104,10 @@
(get mail "headers")))
(defn- extract-identity
[{:keys [sprops]} headers]
[cfg headers]
(let [tdata (get headers "x-penpot-data")]
(when-not (str/empty? tdata)
(let [result (tokens/verify sprops {:token tdata :iss :profile-identity})]
(let [result (tokens/verify (::main/props cfg) {:token tdata :iss :profile-identity})]
(:profile-id result)))))
(defn- parse-notification
@@ -136,7 +140,7 @@
(j/read-value v)))
(defn- register-bounce-for-profile
[{:keys [pool]} {:keys [type kind profile-id] :as report}]
[{:keys [::db/pool]} {:keys [type kind profile-id] :as report}]
(when (= kind "permanent")
(db/with-atomic [conn pool]
(db/insert! conn :profile-complaint-report
@@ -165,7 +169,7 @@
{:id profile-id}))))))
(defn- register-complaint-for-profile
[{:keys [pool]} {:keys [type profile-id] :as report}]
[{:keys [::db/pool]} {:keys [type profile-id] :as report}]
(db/with-atomic [conn pool]
(db/insert! conn :profile-complaint-report
{:profile-id profile-id

View File

@@ -7,34 +7,45 @@
(ns app.http.client
"Http client abstraction layer."
(:require
[app.common.spec :as us]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[java-http-clj.core :as http]))
[java-http-clj.core :as http]
[promesa.core :as p])
(:import
java.net.http.HttpClient))
(s/def ::client fn?)
(s/def ::client #(instance? HttpClient %))
(s/def ::client-holder
(s/keys :req [::client]))
(defmethod ig/pre-init-spec :app.http/client [_]
(s/keys :req-un [::wrk/executor]))
(defmethod ig/pre-init-spec ::client [_]
(s/keys :req [::wrk/executor]))
(defmethod ig/init-key :app.http/client
[_ {:keys [executor] :as cfg}]
(let [client (http/build-client {:executor executor
:connect-timeout 30000 ;; 10s
:follow-redirects :always})]
(with-meta
(fn send
([req] (send req {}))
([req {:keys [response-type sync?] :or {response-type :string sync? false}}]
(if sync?
(http/send req {:client client :as response-type})
(http/send-async req {:client client :as response-type}))))
{::client client})))
(defmethod ig/init-key ::client
[_ {:keys [::wrk/executor] :as cfg}]
(http/build-client {:executor executor
:connect-timeout 30000 ;; 10s
:follow-redirects :always}))
(defn send!
([client req] (send! client req {}))
([client req {:keys [response-type sync?] :or {response-type :string sync? false}}]
(us/assert! ::client client)
(if sync?
(http/send req {:client client :as response-type})
(try
(http/send-async req {:client client :as response-type})
(catch Throwable cause
(p/rejected cause))))))
(defn req!
"A convencience toplevel function for gradual migration to a new API
convention."
([client request]
(client request))
([client request options]
(client request options)))
([{:keys [::client]} request]
(us/assert! ::client client)
(send! client request {}))
([{:keys [::client]} request options]
(us/assert! ::client client)
(send! client request options)))

View File

@@ -14,9 +14,10 @@
[app.config :as cf]
[app.db :as db]
[app.http.middleware :as mw]
[app.http.session :as session]
[app.rpc.commands.binfile :as binf]
[app.rpc.mutations.files :refer [create-file]]
[app.rpc.queries.profile :as profile]
[app.rpc.commands.files-create :refer [create-file]]
[app.rpc.commands.profile :as profile]
[app.util.blob :as blob]
[app.util.template :as tmpl]
[app.util.time :as dt]
@@ -38,9 +39,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn authorized?
[pool {:keys [profile-id]}]
[pool {:keys [::session/profile-id]}]
(or (= "devenv" (cf/get :host))
(let [profile (ex/ignoring (profile/retrieve-profile-data pool profile-id))
(let [profile (ex/ignoring (profile/get-profile pool profile-id))
admins (or (cf/get :admins) #{})]
(contains? admins (:email profile)))))
@@ -60,7 +61,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn index-handler
[{:keys [pool]} request]
[{:keys [::db/pool]} request]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
@@ -80,7 +81,7 @@
"select revn, changes, data from file_change where file_id=? and revn = ?")
(defn- retrieve-file-data
[{:keys [pool]} {:keys [params profile-id] :as request}]
[{:keys [::db/pool]} {:keys [params ::session/profile-id] :as request}]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
@@ -106,8 +107,9 @@
(prepare-download-response data filename)
(contains? params :clone)
(let [project-id (some-> (profile/retrieve-additional-data pool profile-id) :default-project-id)
data (some-> data blob/decode)]
(let [profile (profile/get-profile pool profile-id)
project-id (:default-project-id profile)
data (blob/decode data)]
(create-file pool {:id (uuid/next)
:name (str "Cloned file: " filename)
:project-id project-id
@@ -116,7 +118,7 @@
(yrs/response 201 "OK CREATED"))
:else
(prepare-response (some-> data blob/decode))))))
(prepare-response (blob/decode data))))))
(defn- is-file-exists?
[pool id]
@@ -124,8 +126,9 @@
(-> (db/exec-one! pool [sql id]) :exists)))
(defn- upload-file-data
[{:keys [pool]} {:keys [profile-id params] :as request}]
(let [project-id (some-> (profile/retrieve-additional-data pool profile-id) :default-project-id)
[{:keys [::db/pool]} {:keys [::session/profile-id params] :as request}]
(let [profile (profile/get-profile pool profile-id)
project-id (:default-project-id profile)
data (some-> params :file :path io/read-as-bytes blob/decode)]
(if (and data project-id)
@@ -161,7 +164,7 @@
:code :method-not-found)))
(defn file-changes-handler
[{:keys [pool]} {:keys [params] :as request}]
[{:keys [::db/pool]} {:keys [params] :as request}]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
@@ -201,57 +204,63 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn error-handler
[{:keys [pool]} request]
(letfn [(parse-id [request]
(let [id (get-in request [:path-params :id])
id (parse-uuid id)]
(when (uuid? id)
id)))
(retrieve-report [id]
[{:keys [::db/pool]} request]
(letfn [(get-report [{:keys [path-params]}]
(ex/ignoring
(some-> (db/get-by-id pool :server-error-report id) :content db/decode-transit-pgobject)))
(let [report-id (some-> path-params :id parse-uuid)]
(some-> (db/get-by-id pool :server-error-report report-id)
(update :content db/decode-transit-pgobject)))))
(render-template [report]
(let [context (dissoc report
(render-template-v1 [{:keys [content]}]
(let [context (dissoc content
:trace :cause :params :data :spec-problems :message
:spec-explain :spec-value :error :explain :hint)
params {:context (pp/pprint-str context :width 200)
:hint (:hint report)
:spec-explain (:spec-explain report)
:spec-problems (:spec-problems report)
:spec-value (:spec-value report)
:data (:data report)
:trace (or (:trace report)
(some-> report :error :trace))
:params (:params report)}]
:hint (:hint content)
:spec-explain (:spec-explain content)
:spec-problems (:spec-problems content)
:spec-value (:spec-value content)
:data (:data content)
:trace (or (:trace content)
(some-> content :error :trace))
:params (:params content)}]
(-> (io/resource "app/templates/error-report.tmpl")
(tmpl/render params))))]
(tmpl/render params))))
(render-template-v2 [{report :content}]
(-> (io/resource "app/templates/error-report.v2.tmpl")
(tmpl/render report)))
]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [result (some-> (parse-id request)
(retrieve-report)
(render-template))]
(if result
(if-let [report (get-report request)]
(let [result (if (= 1 (:version report))
(render-template-v1 report)
(render-template-v2 report))]
(yrs/response :status 200
:body result
:headers {"content-type" "text/html; charset=utf-8"
"x-robots-tag" "noindex"})
(yrs/response 404 "not found")))))
"x-robots-tag" "noindex"}))
(yrs/response 404 "not found"))))
(def sql:error-reports
"select id, created_at from server_error_report order by created_at desc limit 100")
"SELECT id, created_at,
content->>'~:hint' AS hint
FROM server_error_report
ORDER BY created_at DESC
LIMIT 100")
(defn error-list-handler
[{:keys [pool]} request]
[{:keys [::db/pool]} request]
(when-not (authorized? pool request)
(ex/raise :type :authentication
:code :only-admins-allowed))
(let [items (db/exec! pool [sql:error-reports])
items (map #(update % :created-at dt/format-instant :rfc1123) items)]
(let [items (->> (db/exec! pool [sql:error-reports])
(map #(update % :created-at dt/format-instant :rfc1123)))]
(yrs/response :status 200
:body (-> (io/resource "app/templates/error-list.tmpl")
(tmpl/render {:items items}))
@@ -263,7 +272,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn export-handler
[{:keys [pool] :as cfg} {:keys [params profile-id] :as request}]
[{:keys [::db/pool] :as cfg} {:keys [params ::session/profile-id] :as request}]
(let [file-ids (->> (:file-ids params)
(remove empty?)
@@ -282,7 +291,8 @@
(assoc ::binf/include-libraries? libs?)
(binf/export-to-tmpfile!))]
(if clone?
(let [project-id (some-> (profile/retrieve-additional-data pool profile-id) :default-project-id)]
(let [profile (profile/get-profile pool profile-id)
project-id (:default-project-id profile)]
(binf/import!
(assoc cfg
::binf/input path
@@ -304,15 +314,16 @@
(defn import-handler
[{:keys [pool] :as cfg} {:keys [params profile-id] :as request}]
[{:keys [::db/pool] :as cfg} {:keys [params ::session/profile-id] :as request}]
(when-not (contains? params :file)
(ex/raise :type :validation
:code :missing-upload-file
:hint "missing upload file"))
(let [project-id (some-> (profile/retrieve-additional-data pool profile-id) :default-project-id)
(let [profile (profile/get-profile pool profile-id)
project-id (:default-project-id profile)
overwrite? (contains? params :overwrite)
migrate? (contains? params :migrate)
migrate? (contains? params :migrate)
ignore-index-errors? (contains? params :ignore-index-errors)]
(when-not project-id
@@ -340,15 +351,14 @@
(defn health-handler
"Mainly a task that performs a health check."
[{:keys [pool]} _]
(db/with-atomic [conn pool]
(try
(db/exec-one! conn ["select count(*) as count from server_prop;"])
(yrs/response 200 "OK")
(catch Throwable cause
(l/warn :hint "unable to execute query on health handler"
:cause cause)
(yrs/response 503 "KO")))))
[{:keys [::db/pool]} _]
(try
(db/exec-one! pool ["select count(*) as count from server_prop;"])
(yrs/response 200 "OK")
(catch Throwable cause
(l/warn :hint "unable to execute query on health handler"
:cause cause)
(yrs/response 503 "KO"))))
(defn changelog-handler
[_ _]
@@ -376,18 +386,17 @@
(raise (ex/error :type :authentication
:code :only-admins-allowed))))))})
(s/def ::session map?)
(defmethod ig/pre-init-spec ::routes [_]
(s/keys :req-un [::db/pool ::wrk/executor ::session]))
(s/keys :req [::db/pool
::wrk/executor
::session/manager]))
(defmethod ig/init-key ::routes
[_ {:keys [session pool executor] :as cfg}]
[_ {:keys [::db/pool ::wrk/executor] :as cfg}]
[["/readyz" {:middleware [[mw/with-dispatch executor]
[mw/with-config cfg]]
:handler health-handler}]
["/dbg" {:middleware [[(:middleware session)]
["/dbg" {:middleware [[session/authz cfg]
[with-authorization pool]
[mw/with-dispatch executor]
[mw/with-config cfg]]}

View File

@@ -9,33 +9,34 @@
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.http :as-alias http]
[app.http.access-token :as-alias actoken]
[app.http.session :as-alias session]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[yetti.request :as yrq]
[yetti.response :as yrs]))
(def ^:dynamic *context* {})
(defn- parse-client-ip
[request]
(or (some-> (yrq/get-header request "x-forwarded-for") (str/split ",") first)
(yrq/get-header request "x-real-ip")
(yrq/remote-addr request)))
(defn get-context
(defn request->context
"Extracts error report relevant context data from request."
[request]
(merge
*context*
{:path (:path request)
:method (:method request)
:params (:params request)
:ip-addr (parse-client-ip request)
:profile-id (:profile-id request)}
(let [headers (:headers request)]
{:user-agent (get headers "user-agent")
:frontend-version (get headers "x-frontend-version" "unknown")})))
(let [claims (-> {}
(into (::session/token-claims request))
(into (::actoken/token-claims request)))]
{:path (:path request)
:method (:method request)
:params (:params request)
:ip-addr (parse-client-ip request)
:user-agent (yrq/get-header request "user-agent")
:profile-id (:uid claims)
:version (or (yrq/get-header request "x-frontend-version")
"unknown")}))
(defmulti handle-exception
(fn [err & _rest]
@@ -47,6 +48,10 @@
[err _]
(yrs/response 401 (ex-data err)))
(defmethod handle-exception :authorization
[err _]
(yrs/response 403 (ex-data err)))
(defmethod handle-exception :restriction
[err _]
(yrs/response 400 (ex-data err)))
@@ -61,7 +66,7 @@
(let [{:keys [code] :as data} (ex-data err)]
(cond
(= code :spec-validation)
(let [explain (us/pretty-explain data)]
(let [explain (ex/explain data)]
(yrs/response :status 400
:body (-> data
(dissoc ::s/problems ::s/value)
@@ -75,44 +80,57 @@
(defmethod handle-exception :assertion
[error request]
(let [edata (ex-data error)
explain (us/pretty-explain edata)]
(l/error ::l/raw (str (ex-message error) "\n" explain)
::l/context (get-context request)
:cause error)
(yrs/response :status 500
:body {:type :server-error
:code :assertion
:data (-> edata
(dissoc ::s/problems ::s/value ::s/spec)
(cond-> explain (assoc :explain explain)))})))
(let [edata (ex-data error)
explain (ex/explain edata)]
(binding [l/*context* (request->context request)]
(l/error :hint "Assertion error" :message (ex-message error) :cause error)
(yrs/response :status 500
:body {:type :server-error
:code :assertion
:data (-> edata
(dissoc ::s/problems ::s/value ::s/spec)
(cond-> explain (assoc :explain explain)))}))))
(defmethod handle-exception :not-found
[err _]
(yrs/response 404 (ex-data err)))
(defmethod handle-exception :internal
[error request]
(let [{:keys [code] :as edata} (ex-data error)]
(cond
(= :concurrency-limit-reached code)
(yrs/response 429)
:else
(binding [l/*context* (request->context request)]
(l/error :hint "Internal error" :message (ex-message error) :cause error)
(yrs/response 500 {:type :server-error
:code :unhandled
:hint (ex-message error)
:data edata})))))
(defmethod handle-exception org.postgresql.util.PSQLException
[error request]
(let [state (.getSQLState ^java.sql.SQLException error)]
(l/error ::l/raw (ex-message error)
::l/context (get-context request)
:cause error)
(cond
(= state "57014")
(yrs/response 504 {:type :server-error
:code :statement-timeout
:hint (ex-message error)})
(binding [l/*context* (request->context request)]
(l/error :hint "PSQL error" :message (ex-message error) :cause error)
(cond
(= state "57014")
(yrs/response 504 {:type :server-error
:code :statement-timeout
:hint (ex-message error)})
(= state "25P03")
(yrs/response 504 {:type :server-error
:code :idle-in-transaction-timeout
:hint (ex-message error)})
(= state "25P03")
(yrs/response 504 {:type :server-error
:code :idle-in-transaction-timeout
:hint (ex-message error)})
:else
(yrs/response 500 {:type :server-error
:code :unexpected
:hint (ex-message error)
:state state}))))
:else
(yrs/response 500 {:type :server-error
:code :unexpected
:hint (ex-message error)
:state state})))))
(defmethod handle-exception :default
[error request]
@@ -120,10 +138,8 @@
(cond
;; This means that exception is not a controlled exception.
(nil? edata)
(do
(l/error ::l/raw (ex-message error)
::l/context (get-context request)
:cause error)
(binding [l/*context* (request->context request)]
(l/error :hint "Unexpected error" :message (ex-message error) :cause error)
(yrs/response 500 {:type :server-error
:code :unexpected
:hint (ex-message error)}))
@@ -138,10 +154,8 @@
(handle-exception (:handling edata) request)
:else
(do
(l/error ::l/raw (ex-message error)
::l/context (get-context request)
:cause error)
(binding [l/*context* (request->context request)]
(l/error :hint "Unhandled error" :message (ex-message error) :cause error)
(yrs/response 500 {:type :server-error
:code :unhandled
:hint (ex-message error)
@@ -149,16 +163,7 @@
(defn handle
[cause request]
(cond
(or (instance? java.util.concurrent.CompletionException cause)
(instance? java.util.concurrent.ExecutionException cause))
(handle-exception (.getCause ^Throwable cause) request)
(ex/wrapped? cause)
(let [context (meta cause)
cause (deref cause)]
(binding [*context* context]
(handle-exception cause request)))
:else
(if (or (instance? java.util.concurrent.CompletionException cause)
(instance? java.util.concurrent.ExecutionException cause))
(handle-exception (ex-cause cause) request)
(handle-exception cause request)))

View File

@@ -1,80 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.http.feedback
"A general purpose feedback module."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as db]
[app.emails :as eml]
[app.rpc.queries.profile :as profile]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]
[promesa.exec :as px]
[yetti.request :as yrq]
[yetti.response :as yrs]))
(declare ^:private send-feedback)
(declare ^:private handler)
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::db/pool ::wrk/executor]))
(defmethod ig/init-key ::handler
[_ {:keys [executor] :as cfg}]
(let [enabled? (contains? cf/flags :user-feedback)]
(if enabled?
(fn [request respond raise]
(-> (px/submit! executor #(handler cfg request))
(p/then' respond)
(p/catch raise)))
(fn [_ _ raise]
(raise (ex/error :type :validation
:code :feedback-disabled
:hint "feedback module is disabled"))))))
(defn- handler
[{:keys [pool] :as cfg} {:keys [profile-id] :as request}]
(let [ftoken (cf/get :feedback-token ::no-token)
token (yrq/get-header request "x-feedback-token")
params (d/merge (:params request)
(:body-params request))]
(cond
(uuid? profile-id)
(let [profile (profile/retrieve-profile-data pool profile-id)
params (assoc params :from (:email profile))]
(send-feedback pool profile params))
(= token ftoken)
(send-feedback cfg nil params))
(yrs/response 204)))
(s/def ::content ::us/string)
(s/def ::from ::us/email)
(s/def ::subject ::us/string)
(s/def ::feedback
(s/keys :req-un [::from ::subject ::content]))
(defn- send-feedback
[pool profile params]
(let [params (us/conform ::feedback params)
destination (cf/get :feedback-destination)]
(eml/send! {::eml/conn pool
::eml/factory eml/feedback
:from destination
:to destination
:profile profile
:reply-to (:from params)
:email (:from params)
:subject (:subject params)
:content (:content params)})
nil))

View File

@@ -19,6 +19,7 @@
[yetti.request :as yrq]
[yetti.response :as yrs])
(:import
com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.core.io.JsonEOFException
io.undertow.server.RequestTooBigException
java.io.OutputStream))
@@ -31,6 +32,12 @@
{:name ::params
:compile (constantly ymw/wrap-params)})
(def ^:private json-mapper
(json/mapper
{:encode-key-fn str/camel
:decode-key-fn (comp keyword str/kebab)
:pretty true}))
(defn wrap-parse-request
[handler]
(letfn [(process-request [request]
@@ -45,7 +52,7 @@
(str/starts-with? header "application/json")
(with-open [is (yrq/body request)]
(let [params (json/read is)]
(let [params (json/decode is json-mapper)]
(-> request
(assoc :body-params params)
(update :params merge params))))
@@ -60,21 +67,23 @@
:code :request-body-too-large
:hint (ex-message cause)))
(instance? JsonEOFException cause)
(or (instance? JsonEOFException cause)
(instance? JsonParseException cause))
(raise (ex/error :type :validation
:code :malformed-json
:hint (ex-message cause)))
:hint (ex-message cause)
:cause cause))
:else
(raise cause)))]
(fn [request respond raise]
(when-let [request (try
(process-request request)
(catch RuntimeException cause
(handle-error raise (or (.getCause cause) cause)))
(catch Throwable cause
(handle-error raise cause)))]
(handler request respond raise)))))
(let [request (ex/try! (process-request request))]
(if (ex/exception? request)
(if (ex/runtime-exception? request)
(handle-error raise (or (ex-cause request) request))
(handle-error raise request))
(handler request respond raise))))))
(def parse-request
{:name ::parse-request
@@ -113,7 +122,32 @@
(finally
(.close ^OutputStream output-stream))))))
(format-response [response request]
(json-streamable-body [data]
(reify yrs/StreamableResponseBody
(-write-body-to-stream [_ _ output-stream]
(try
(with-open [bos (buffered-output-stream output-stream buffer-size)]
(json/write! bos data json-mapper))
(catch java.io.IOException _cause
;; Do nothing, EOF means client closes connection abruptly
nil)
(catch Throwable cause
(l/warn :hint "unexpected error on encoding response"
:cause cause))
(finally
(.close ^OutputStream output-stream))))))
(format-response-with-json [response _]
(let [body (yrs/body response)]
(if (or (boolean? body) (coll? body))
(-> response
(update :headers assoc "content-type" "application/json")
(assoc :body (json-streamable-body body)))
response)))
(format-response-with-transit [response request]
(let [body (yrs/body response)]
(if (or (boolean? body) (coll? body))
(let [qs (yrq/query request)
@@ -126,6 +160,20 @@
(assoc :body (transit-streamable-body body opts))))
response)))
(format-response [response request]
(let [accept (yrq/get-header request "accept")]
(cond
(or (= accept "application/transit+json")
(str/includes? accept "application/transit+json"))
(format-response-with-transit response request)
(or (= accept "application/json")
(str/includes? accept "application/json"))
(format-response-with-json response request)
:else
(format-response-with-transit response request))))
(process-response [response request]
(cond-> response
(map? response) (format-response request)))]

View File

@@ -5,21 +5,31 @@
;; Copyright (c) KALEIDOS INC
(ns app.http.session
(:refer-clojure :exclude [read])
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as db]
[app.db.sql :as sql]
[app.http.session.tasks :as-alias tasks]
[app.main :as-alias main]
[app.tokens :as tokens]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
[promesa.core :as p]
[promesa.exec :as px]
[yetti.request :as yrq]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; DEFAULTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; A default cookie name for storing the session.
(def default-auth-token-cookie-name "auth-token")
@@ -33,119 +43,243 @@
;; Default age for automatic session renewal
(def default-renewal-max-age (dt/duration {:hours 6}))
(defprotocol ISessionStore
(read-session [store key])
(write-session [store key data])
(update-session [store data])
(delete-session [store key]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PROTOCOLS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- make-database-store
[{:keys [pool sprops executor]}]
(reify ISessionStore
(read-session [_ token]
(defprotocol ISessionManager
(read [_ key])
(write! [_ key data])
(update! [_ data])
(delete! [_ key]))
(s/def ::manager #(satisfies? ISessionManager %))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; STORAGE IMPL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::session-params
(s/keys :req-un [::user-agent
::profile-id
::created-at]))
(defn- prepare-session-params
[key params]
(us/assert! ::us/not-empty-string key)
(us/assert! ::session-params params)
{:user-agent (:user-agent params)
:profile-id (:profile-id params)
:created-at (:created-at params)
:updated-at (:created-at params)
:id key})
(defn- database-manager
[{:keys [::db/pool ::wrk/executor ::main/props]}]
^{::wrk/executor executor
::db/pool pool
::main/props props}
(reify ISessionManager
(read [_ token]
(px/with-dispatch executor
(db/exec-one! pool (sql/select :http-session {:id token}))))
(write-session [_ _ data]
(write! [_ key params]
(px/with-dispatch executor
(let [profile-id (:profile-id data)
user-agent (:user-agent data)
created-at (or (:created-at data) (dt/now))
token (tokens/generate sprops {:iss "authentication"
:iat created-at
:uid profile-id})
params {:user-agent user-agent
:profile-id profile-id
:created-at created-at
:updated-at created-at
:id token}]
(db/insert! pool :http-session params))))
(let [params (prepare-session-params key params)]
(db/insert! pool :http-session params)
params)))
(update-session [_ data]
(update! [_ params]
(let [updated-at (dt/now)]
(px/with-dispatch executor
(db/update! pool :http-session
{:updated-at updated-at}
{:id (:id data)})
(assoc data :updated-at updated-at))))
{:id (:id params)})
(assoc params :updated-at updated-at))))
(delete-session [_ token]
(delete! [_ token]
(px/with-dispatch executor
(db/delete! pool :http-session {:id token})
nil))))
(defn make-inmemory-store
[{:keys [sprops]}]
(defn inmemory-manager
[{:keys [::db/pool ::wrk/executor ::main/props]}]
(let [cache (atom {})]
(reify ISessionStore
(read-session [_ token]
^{::main/props props
::wrk/executor executor
::db/pool pool}
(reify ISessionManager
(read [_ token]
(p/do (get @cache token)))
(write-session [_ _ data]
(write! [_ key params]
(p/do
(let [profile-id (:profile-id data)
user-agent (:user-agent data)
created-at (or (:created-at data) (dt/now))
token (tokens/generate sprops {:iss "authentication"
:iat created-at
:uid profile-id})
params {:user-agent user-agent
:created-at created-at
:updated-at created-at
:profile-id profile-id
:id token}]
(swap! cache assoc token params)
(let [params (prepare-session-params key params)]
(swap! cache assoc key params)
params)))
(update-session [_ data]
(let [updated-at (dt/now)]
(swap! cache update (:id data) assoc :updated-at updated-at)
(assoc data :updated-at updated-at)))
(update! [_ params]
(p/do
(let [updated-at (dt/now)]
(swap! cache update (:id params) assoc :updated-at updated-at)
(assoc params :updated-at updated-at))))
(delete-session [_ token]
(delete! [_ token]
(p/do
(swap! cache dissoc token)
nil)))))
(s/def ::sprops map?)
(defmethod ig/pre-init-spec ::store [_]
(s/keys :req-un [::db/pool ::wrk/executor ::sprops]))
(defmethod ig/pre-init-spec ::manager [_]
(s/keys :req [::db/pool ::wrk/executor ::main/props]))
(defmethod ig/init-key ::store
[_ {:keys [pool] :as cfg}]
(defmethod ig/init-key ::manager
[_ {:keys [::db/pool] :as cfg}]
(if (db/read-only? pool)
(make-inmemory-store cfg)
(make-database-store cfg)))
(inmemory-manager cfg)
(database-manager cfg)))
(defmethod ig/halt-key! ::store
(defmethod ig/halt-key! ::manager
[_ _])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; MANAGER IMPL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare ^:private assign-auth-token-cookie)
(declare ^:private assign-authenticated-cookie)
(declare ^:private clear-auth-token-cookie)
(declare ^:private clear-authenticated-cookie)
(declare ^:private gen-token)
(defn create-fn
[{:keys [::manager]} profile-id]
(us/assert! ::manager manager)
(us/assert! ::us/uuid profile-id)
(let [props (-> manager meta ::main/props)]
(fn [request response]
(let [uagent (yrq/get-header request "user-agent")
params {:profile-id profile-id
:user-agent uagent
:created-at (dt/now)}
token (gen-token props params)]
(->> (write! manager token params)
(p/fmap (fn [session]
(l/trace :hint "create" :profile-id (str profile-id))
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)))))))))
(defn delete-fn
[{:keys [::manager]}]
(us/assert! ::manager manager)
(letfn [(delete [{:keys [profile-id] :as request}]
(let [cname (cf/get :auth-token-cookie-name default-auth-token-cookie-name)
cookie (yrq/get-cookie request cname)]
(l/trace :hint "delete" :profile-id profile-id)
(some->> (:value cookie) (delete! manager))))]
(fn [request response]
(p/do
(delete request)
(-> response
(assoc :status 204)
(assoc :body nil)
(clear-auth-token-cookie)
(clear-authenticated-cookie))))))
(defn- gen-token
[props {:keys [profile-id created-at]}]
(tokens/generate props {:iss "authentication"
:iat created-at
:uid profile-id}))
(defn- decode-token
[props token]
(when token
(tokens/verify props {:token token :iss "authentication"})))
(defn- get-token
[request]
(let [cname (cf/get :auth-token-cookie-name default-auth-token-cookie-name)
cookie (some-> (yrq/get-cookie request cname) :value)]
(when-not (str/empty? cookie)
cookie)))
(defn- get-session
[manager token]
(some->> token (read manager)))
(defn- renew-session?
[{:keys [updated-at] :as session}]
(and (dt/instant? updated-at)
(let [elapsed (dt/diff updated-at (dt/now))]
(neg? (compare default-renewal-max-age elapsed)))))
(defn- wrap-reneval
[respond manager session]
(fn [response]
(p/let [session (update! manager session)]
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)
(respond)))))
(defn- wrap-soft-auth
[handler {:keys [::manager]}]
(us/assert! ::manager manager)
(let [{:keys [::wrk/executor ::main/props]} (meta manager)]
(fn [request respond raise]
(let [token (ex/try! (get-token request))]
(if (ex/exception? token)
(raise token)
(->> (px/submit! executor (partial decode-token props token))
(p/fnly (fn [claims cause]
(when cause
(l/trace :hint "exception on decoding malformed token" :cause cause))
(let [request (cond-> request
(map? claims)
(-> (assoc ::token-claims claims)
(assoc ::token token)))]
(handler request respond raise))))))))))
(defn- wrap-authz
[handler {:keys [::manager]}]
(us/assert! ::manager manager)
(fn [request respond raise]
(if-let [token (::token request)]
(->> (get-session manager token)
(p/fnly (fn [session cause]
(cond
(some? cause)
(raise cause)
(nil? session)
(handler request respond raise)
:else
(let [request (-> request
(assoc ::profile-id (:profile-id session))
(assoc ::id (:id session)))
respond (cond-> respond
(renew-session? session)
(wrap-reneval manager session))]
(handler request respond raise))))))
(handler request respond raise))))
(def soft-auth
{:name ::soft-auth
:compile (constantly wrap-soft-auth)})
(def authz
{:name ::authz
:compile (constantly wrap-authz)})
;; --- IMPL
(defn- create-session!
[store profile-id user-agent]
(let [params {:user-agent user-agent
:profile-id profile-id}]
(write-session store nil params)))
(defn- update-session!
[store session]
(update-session store session))
(defn- delete-session!
[store {:keys [cookies] :as request}]
(let [name (cf/get :auth-token-cookie-name default-auth-token-cookie-name)]
(when-let [token (get-in cookies [name :value])]
(delete-session store token))))
(defn- retrieve-session
[store request]
(let [cookie-name (cf/get :auth-token-cookie-name default-auth-token-cookie-name)]
(when-let [cookie (yrq/get-cookie request cookie-name)]
(read-session store (:value cookie)))))
(defn assign-auth-token-cookie
(defn- assign-auth-token-cookie
[response {token :id updated-at :updated-at}]
(let [max-age (cf/get :auth-token-cookie-max-age default-cookie-max-age)
created-at (or updated-at (dt/now))
@@ -164,16 +298,19 @@
:secure secure?}]
(update response :cookies assoc name cookie)))
(defn assign-authenticated-cookie
(defn- assign-authenticated-cookie
[response {updated-at :updated-at}]
(let [max-age (cf/get :auth-token-cookie-max-age default-cookie-max-age)
domain (cf/get :authenticated-cookie-domain)
cname (cf/get :authenticated-cookie-name "authenticated")
created-at (or updated-at (dt/now))
renewal (dt/plus created-at default-renewal-max-age)
expires (dt/plus created-at max-age)
comment (str "Renewal at: " (dt/format-instant renewal :rfc1123))
secure? (contains? cf/flags :secure-session-cookies)
domain (cf/get :authenticated-cookie-domain)
name (cf/get :authenticated-cookie-name "authenticated")
cookie {:domain domain
:expires expires
:path "/"
@@ -183,114 +320,46 @@
:secure secure?}]
(cond-> response
(string? domain)
(update :cookies assoc name cookie))))
(update :cookies assoc cname cookie))))
(defn clear-auth-token-cookie
(defn- clear-auth-token-cookie
[response]
(let [name (cf/get :auth-token-cookie-name default-auth-token-cookie-name)]
(update response :cookies assoc name {:path "/" :value "" :max-age -1})))
(let [cname (cf/get :auth-token-cookie-name default-auth-token-cookie-name)]
(update response :cookies assoc cname {:path "/" :value "" :max-age 0})))
(defn- clear-authenticated-cookie
[response]
(let [name (cf/get :authenticated-cookie-name default-authenticated-cookie-name)
(let [cname (cf/get :authenticated-cookie-name default-authenticated-cookie-name)
domain (cf/get :authenticated-cookie-domain)]
(cond-> response
(string? domain)
(update :cookies assoc name {:domain domain :path "/" :value "" :max-age -1}))))
(defn- make-middleware
[{:keys [store] :as cfg}]
(letfn [;; Check if time reached for automatic session renewal
(renew-session? [{:keys [updated-at] :as session}]
(and (dt/instant? updated-at)
(let [elapsed (dt/diff updated-at (dt/now))]
(neg? (compare default-renewal-max-age elapsed)))))
;; Wrap respond with session renewal code
(wrap-respond [respond session]
(fn [response]
(p/let [session (update-session! store session)]
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)
(respond)))))]
{:name :session
:compile (fn [& _]
(fn [handler]
(fn [request respond raise]
(try
(-> (retrieve-session store request)
(p/finally (fn [session cause]
(cond
(some? cause)
(raise cause)
(nil? session)
(handler request respond raise)
:else
(let [request (-> request
(assoc :profile-id (:profile-id session))
(assoc :session-id (:id session)))
respond (cond-> respond
(renew-session? session)
(wrap-respond session))]
(handler request respond raise))))))
(catch Throwable cause
(raise cause))))))}))
(update :cookies assoc cname {:domain domain :path "/" :value "" :max-age 0}))))
;; --- STATE INIT: SESSION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TASK: SESSION GC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::store #(satisfies? ISessionStore %))
(s/def ::tasks/max-age ::dt/duration)
(defmethod ig/pre-init-spec :app.http/session [_]
(s/keys :req-un [::store]))
(defmethod ig/pre-init-spec ::tasks/gc [_]
(s/keys :req [::db/pool]
:opt [::tasks/max-age]))
(defmethod ig/prep-key :app.http/session
(defmethod ig/prep-key ::tasks/gc
[_ cfg]
(d/merge {:buffer-size 128}
(d/without-nils cfg)))
(let [max-age (cf/get :auth-token-cookie-max-age default-cookie-max-age)]
(merge {::tasks/max-age max-age} (d/without-nils cfg))))
(defmethod ig/init-key :app.http/session
[_ {:keys [store] :as cfg}]
(-> cfg
(assoc :middleware (make-middleware cfg))
(assoc :create (fn [profile-id]
(fn [request response]
(p/let [uagent (yrq/get-header request "user-agent")
session (create-session! store profile-id uagent)]
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session))))))
(assoc :delete (fn [request response]
(p/do
(delete-session! store request)
(-> response
(assoc :status 204)
(assoc :body nil)
(clear-auth-token-cookie)
(clear-authenticated-cookie)))))))
(def ^:private
sql:delete-expired
"delete from http_session
where updated_at < now() - ?::interval
or (updated_at is null and
created_at < now() - ?::interval)")
;; --- STATE INIT: SESSION GC
(declare sql:delete-expired)
(s/def ::max-age ::dt/duration)
(defmethod ig/pre-init-spec ::gc-task [_]
(s/keys :req-un [::db/pool]
:opt-un [::max-age]))
(defmethod ig/prep-key ::gc-task
[_ cfg]
(merge {:max-age default-cookie-max-age}
(d/without-nils cfg)))
(defmethod ig/init-key ::gc-task
[_ {:keys [pool max-age] :as cfg}]
(defmethod ig/init-key ::tasks/gc
[_ {:keys [::db/pool ::tasks/max-age] :as cfg}]
(l/debug :hint "initializing session gc task" :max-age max-age)
(fn [_]
(db/with-atomic [conn pool]
@@ -302,9 +371,3 @@
:deleted result)
result))))
(def ^:private
sql:delete-expired
"delete from http_session
where updated_at < now() - ?::interval
or (updated_at is null and
created_at < now() - ?::interval)")

View File

@@ -12,6 +12,7 @@
[app.common.pprint :as pp]
[app.common.spec :as us]
[app.db :as db]
[app.http.session :as session]
[app.metrics :as mtx]
[app.msgbus :as mbus]
[app.util.time :as dt]
@@ -34,7 +35,7 @@
(def state (atom {}))
(defn- on-connect
[{:keys [metrics]} wsp]
[{:keys [::mtx/metrics]} wsp]
(let [created-at (dt/now)]
(swap! state assoc (::ws/id @wsp) wsp)
(mtx/run! metrics
@@ -48,7 +49,7 @@
:val (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0)))))
(defn- on-rcv-message
[{:keys [metrics]} _ message]
[{:keys [::mtx/metrics]} _ message]
(mtx/run! metrics
:id :websocket-messages-total
:labels recv-labels
@@ -56,7 +57,7 @@
message)
(defn- on-snd-message
[{:keys [metrics]} _ message]
[{:keys [::mtx/metrics]} _ message]
(mtx/run! metrics
:id :websocket-messages-total
:labels send-labels
@@ -95,7 +96,6 @@
:user-agent (::ws/user-agent @wsp)
:ip-addr (::ws/remote-addr @wsp)
:last-activity-at (::ws/last-activity-at @wsp)
:http-session-id (::ws/http-session-id @wsp)
:subscribed-file (-> wsp deref ::file-subscription :file-id)
:subscribed-team (-> wsp deref ::team-subscription :team-id)}))
@@ -120,7 +120,7 @@
(defmethod handle-message :connect
[cfg wsp _]
(let [msgbus (:msgbus cfg)
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
profile-id (::profile-id @wsp)
session-id (::session-id @wsp)
@@ -139,7 +139,7 @@
(defmethod handle-message :disconnect
[cfg wsp _]
(let [msgbus (:msgbus cfg)
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
profile-id (::profile-id @wsp)
session-id (::session-id @wsp)
@@ -173,7 +173,7 @@
(defmethod handle-message :subscribe-team
[cfg wsp {:keys [team-id] :as params}]
(let [msgbus (:msgbus cfg)
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
session-id (::session-id @wsp)
output-ch (::ws/output-ch @wsp)
@@ -204,8 +204,8 @@
(a/<! (mbus/sub! msgbus :topic team-id :chan channel)))))
(defmethod handle-message :subscribe-file
[cfg wsp {:keys [file-id] :as params}]
(let [msgbus (:msgbus cfg)
[cfg wsp {:keys [file-id version] :as params}]
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
profile-id (::profile-id @wsp)
session-id (::session-id @wsp)
@@ -239,7 +239,8 @@
(let [message {:type :presence
:file-id file-id
:session-id session-id
:profile-id profile-id}]
:profile-id profile-id
:version version}]
(a/<! (mbus/pub! msgbus :topic file-id :message message))))
(a/>! output-ch message)
(recur))))
@@ -258,7 +259,7 @@
(defmethod handle-message :unsubscribe-file
[cfg wsp {:keys [file-id] :as params}]
(let [msgbus (:msgbus cfg)
(let [msgbus (::mbus/msgbus cfg)
conn-id (::ws/id @wsp)
session-id (::session-id @wsp)
profile-id (::profile-id @wsp)
@@ -288,7 +289,7 @@
(defmethod handle-message :pointer-update
[cfg wsp {:keys [file-id] :as message}]
(let [msgbus (:msgbus cfg)
(let [msgbus (::mbus/msgbus cfg)
profile-id (::profile-id @wsp)
session-id (::session-id @wsp)
subs (::file-subscription @wsp)
@@ -313,39 +314,47 @@
;; HTTP HANDLER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(s/def ::msgbus ::mbus/msgbus)
(s/def ::session-id ::us/uuid)
(s/def ::handler-params
(s/keys :req-un [::session-id]))
(defmethod ig/pre-init-spec ::handler [_]
(s/keys :req-un [::msgbus ::db/pool ::mtx/metrics]))
(defn- http-handler
[cfg {:keys [params ::session/profile-id] :as request} respond raise]
(let [{:keys [session-id]} (us/conform ::handler-params params)]
(cond
(not profile-id)
(raise (ex/error :type :authentication
:hint "Authentication required."))
(defmethod ig/init-key ::handler
(not (yws/upgrade-request? request))
(raise (ex/error :type :validation
:code :websocket-request-expected
:hint "this endpoint only accepts websocket connections"))
:else
(do
(l/trace :hint "websocket request" :profile-id profile-id :session-id session-id)
(->> (ws/handler
::ws/on-rcv-message (partial on-rcv-message cfg)
::ws/on-snd-message (partial on-snd-message cfg)
::ws/on-connect (partial on-connect cfg)
::ws/handler (partial handle-message cfg)
::profile-id profile-id
::session-id session-id)
(yws/upgrade request)
(respond))))))
(defmethod ig/pre-init-spec ::routes [_]
(s/keys :req [::mbus/msgbus
::mtx/metrics
::db/pool
::session/manager]))
(s/def ::routes vector?)
(defmethod ig/init-key ::routes
[_ cfg]
(fn [{:keys [profile-id params] :as req} respond raise]
(let [{:keys [session-id]} (us/conform ::handler-params params)]
(cond
(not profile-id)
(raise (ex/error :type :authentication
:hint "Authentication required."))
(not (yws/upgrade-request? req))
(raise (ex/error :type :validation
:code :websocket-request-expected
:hint "this endpoint only accepts websocket connections"))
:else
(do
(l/trace :hint "websocket request" :profile-id profile-id :session-id session-id)
(->> (ws/handler
::ws/on-rcv-message (partial on-rcv-message cfg)
::ws/on-snd-message (partial on-snd-message cfg)
::ws/on-connect (partial on-connect cfg)
::ws/handler (partial handle-message cfg)
::profile-id profile-id
::session-id session-id)
(yws/upgrade req)
(respond)))))))
["/ws/notifications" {:middleware [[session/authz cfg]]
:handler (partial http-handler cfg)
:allowed-methods #{:get}}])

View File

@@ -8,6 +8,7 @@
"Services related to the user activity (audit log)."
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
@@ -15,19 +16,25 @@
[app.common.uuid :as uuid]
[app.config :as cf]
[app.db :as db]
[app.http.client :as http]
[app.loggers.audit.tasks :as-alias tasks]
[app.loggers.webhooks :as-alias webhooks]
[app.main :as-alias main]
[app.rpc :as-alias rpc]
[app.tokens :as tokens]
[app.util.async :as aa]
[app.util.retry :as rtry]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]
[lambdaisland.uri :as u]
[promesa.core :as p]
[promesa.exec :as px]
[yetti.request :as yrq]
[yetti.response :as yrs]))
[yetti.request :as yrq]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HELPERS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn parse-client-ip
[request]
@@ -49,210 +56,169 @@
(assoc (->> sk str/kebab (keyword "penpot")) v))))]
(reduce-kv process-param {} params)))
(def ^:private
profile-props
[:id
:is-active
:is-muted
:auth-backend
:email
:default-team-id
:default-project-id
:fullname
:lang])
(defn profile->props
[profile]
(-> profile
(select-keys [:id :is-active :is-muted :auth-backend :email :default-team-id :default-project-id :fullname :lang])
(select-keys profile-props)
(merge (:props profile))
(d/without-nils)))
(def reserved-props
#{:session-id
:password
:old-password
:token})
(defn clean-props
[{:keys [profile-id] :as event}]
(let [invalid-keys #{:session-id
:password
:old-password
:token}
xform (comp
(remove (fn [kv]
(qualified-keyword? (first kv))))
(remove (fn [kv]
(contains? invalid-keys (first kv))))
(remove (fn [[k v]]
(and (= k :profile-id)
(= v profile-id))))
(filter (fn [[_ v]]
(or (string? v)
(keyword? v)
(uuid? v)
(boolean? v)
(number? v)))))]
[props]
(into {}
(comp
(d/without-nils)
(d/without-qualified)
(remove #(contains? reserved-props (key %))))
props))
(update event :props #(into {} xform %))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTTP Handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare persist-http-events)
;; --- SPECS
(s/def ::profile-id ::us/uuid)
(s/def ::name ::us/string)
(s/def ::type ::us/string)
(s/def ::props (s/map-of ::us/keyword any?))
(s/def ::timestamp dt/instant?)
(s/def ::context (s/map-of ::us/keyword any?))
(s/def ::ip-addr ::us/string)
(s/def ::frontend-event
(s/keys :req-un [::type ::name ::props ::timestamp ::profile-id]
:opt-un [::context]))
(s/def ::webhooks/event? ::us/boolean)
(s/def ::webhooks/batch-timeout ::dt/duration)
(s/def ::webhooks/batch-key
(s/or :fn fn? :str string? :kw keyword?))
(s/def ::frontend-events (s/every ::frontend-event))
(defmethod ig/init-key ::http-handler
[_ {:keys [executor pool] :as cfg}]
(if (or (db/read-only? pool) (not (contains? cf/flags :audit-log)))
(do
(l/warn :hint "audit log http handler disabled or db is read-only")
(fn [_ respond _]
(respond (yrs/response 204))))
(letfn [(handler [{:keys [profile-id] :as request}]
(let [events (->> (:events (:params request))
(remove #(not= profile-id (:profile-id %)))
(us/conform ::frontend-events))
ip-addr (parse-client-ip request)
cfg (-> cfg
(assoc :source "frontend")
(assoc :events events)
(assoc :ip-addr ip-addr))]
(persist-http-events cfg)))
(handle-error [cause]
(let [xdata (ex-data cause)]
(if (= :spec-validation (:code xdata))
(l/error ::l/raw (str "spec validation on persist-events:\n" (us/pretty-explain xdata)))
(l/error :hint "error on persist-events" :cause cause))))]
(fn [request respond _]
;; Fire and forget, log error in case of errro
(-> (px/submit! executor #(handler request))
(p/catch handle-error))
(respond (yrs/response 204))))))
(defn- persist-http-events
[{:keys [pool events ip-addr source] :as cfg}]
(let [columns [:id :name :source :type :tracked-at :profile-id :ip-addr :props :context]
prepare-xf (map (fn [event]
[(uuid/next)
(:name event)
source
(:type event)
(:timestamp event)
(:profile-id event)
(db/inet ip-addr)
(db/tjson (:props event))
(db/tjson (d/without-nils (:context event)))]))]
(when (seq events)
(->> (into [] prepare-xf events)
(db/insert-multi! pool :audit-log columns)))))
(s/def ::event
(s/keys :req-un [::type ::name ::profile-id]
:opt-un [::ip-addr ::props]
:opt [::webhooks/event?
::webhooks/batch-timeout
::webhooks/batch-key]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Collector
;; COLLECTOR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Defines a service that collects the audit/activity log using
;; internal database. Later this audit log can be transferred to
;; an external storage and data cleared.
(declare persist-events)
(s/def ::collector
(s/keys :req [::wrk/executor ::db/pool]))
(defmethod ig/pre-init-spec ::collector [_]
(s/keys :req-un [::db/pool ::wrk/executor]))
(s/def ::ip-addr string?)
(s/def ::backend-event
(s/keys :req-un [::type ::name ::profile-id]
:opt-un [::ip-addr ::props]))
(def ^:private backend-event-xform
(comp
(filter #(us/valid? ::backend-event %))
(map clean-props)))
(s/keys :req [::db/pool ::wrk/executor]))
(defmethod ig/init-key ::collector
[_ {:keys [pool] :as cfg}]
[_ {:keys [::db/pool] :as cfg}]
(cond
(not (contains? cf/flags :audit-log))
(do
(l/info :hint "audit log collection disabled")
(constantly nil))
(db/read-only? pool)
(do
(l/warn :hint "audit log collection disabled, db is read-only")
(constantly nil))
(l/warn :hint "audit: disabled (db is read-only)")
:else
(let [input (a/chan 512 backend-event-xform)
buffer (aa/batch input {:max-batch-size 100
:max-batch-age (* 10 1000) ; 10s
:init []})]
(l/info :hint "audit log collector initialized")
(a/go-loop []
(when-let [[_type events] (a/<! buffer)]
(let [res (a/<! (persist-events cfg events))]
(when (ex/exception? res)
(l/error :hint "error on persisting events" :cause res))
(recur))))
cfg))
(fn [& {:keys [cmd] :as params}]
(case cmd
:stop
(a/close! input)
(defn- handle-event!
[conn-or-pool event]
(us/verify! ::event event)
(let [params {:id (uuid/next)
:name (:name event)
:type (:type event)
:profile-id (:profile-id event)
:ip-addr (:ip-addr event)
:props (:props event)}]
:submit
(let [params (-> params
(dissoc :cmd)
(assoc :tracked-at (dt/now)))]
(when-not (a/offer! input params)
(l/warn :hint "activity channel is full"))))))))
(when (contains? cf/flags :audit-log)
;; NOTE: this operation may cause primary key conflicts on inserts
;; because of the timestamp precission (two concurrent requests), in
;; this case we just retry the operation.
(rtry/with-retry {::rtry/when rtry/conflict-exception?
::rtry/max-retries 6
::rtry/label "persist-audit-log"}
(let [now (dt/now)]
(db/insert! conn-or-pool :audit-log
(-> params
(update :props db/tjson)
(update :ip-addr db/inet)
(assoc :created-at now)
(assoc :tracked-at now)
(assoc :source "backend"))))))
(defn- persist-events
[{:keys [pool executor] :as cfg} events]
(letfn [(event->row [event]
[(uuid/next)
(:name event)
(:type event)
(:profile-id event)
(:tracked-at event)
(some-> (:ip-addr event) db/inet)
(db/tjson (:props event))
"backend"])]
(aa/with-thread executor
(when (seq events)
(db/with-atomic [conn pool]
(db/insert-multi! conn :audit-log
[:id :name :type :profile-id :tracked-at :ip-addr :props :source]
(sequence (keep event->row) events)))))))
(when (and (contains? cf/flags :webhooks)
(::webhooks/event? event))
(let [batch-key (::webhooks/batch-key event)
batch-timeout (::webhooks/batch-timeout event)
label (dm/str "rpc:" (:name params))
label (cond
(ifn? batch-key) (dm/str label ":" (batch-key (::rpc/params event)))
(string? batch-key) (dm/str label ":" batch-key)
:else label)
dedupe? (boolean (and batch-key batch-timeout))]
(wrk/submit! ::wrk/conn conn-or-pool
::wrk/task :process-webhook-event
::wrk/queue :webhooks
::wrk/max-retries 0
::wrk/delay (or batch-timeout 0)
::wrk/dedupe dedupe?
::wrk/label label
::webhooks/event
(-> params
(dissoc :ip-addr)
(dissoc :type)))))
params))
(defn submit!
"Submit audit event to the collector."
[{:keys [::wrk/executor] :as cfg} params]
(let [conn (or (::db/conn cfg) (::db/pool cfg))]
(us/assert! ::wrk/executor executor)
(us/assert! ::db/pool-or-conn conn)
(try
(handle-event! conn (d/without-nils params))
(catch Throwable cause
(l/error :hint "audit: unexpected error processing event" :cause cause)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Archive Task
;; TASK: ARCHIVE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is a task responsible to send the accumulated events to an
;; This is a task responsible to send the accumulated events to
;; external service for archival.
(declare archive-events)
(s/def ::http-client fn?)
(s/def ::uri ::us/string)
(s/def ::sprops map?)
(s/def ::tasks/uri ::us/string)
(defmethod ig/pre-init-spec ::archive-task [_]
(s/keys :req-un [::db/pool ::sprops ::http-client]
:opt-un [::uri]))
(defmethod ig/pre-init-spec ::tasks/archive-task [_]
(s/keys :req [::db/pool ::main/props ::http/client]))
(defmethod ig/init-key ::archive-task
[_ {:keys [uri] :as cfg}]
(fn [props]
(defmethod ig/init-key ::tasks/archive
[_ cfg]
(fn [params]
;; NOTE: this let allows overwrite default configured values from
;; the repl, when manually invoking the task.
(let [enabled (or (contains? cf/flags :audit-log-archive)
(:enabled props false))
uri (or uri (:uri props))
cfg (assoc cfg :uri uri)]
(:enabled params false))
uri (cf/get :audit-log-archive-uri)
uri (or uri (:uri params))
cfg (assoc cfg ::uri uri)]
(when (and enabled (not uri))
(ex/raise :type :internal
@@ -264,20 +230,21 @@
(let [n (archive-events cfg)]
(if n
(do
(aa/thread-sleep 100)
(px/sleep 100)
(recur (+ total n)))
(when (pos? total)
(l/trace :hint "events chunk archived" :num total)))))))))
(l/debug :hint "events archived" :total total)))))))))
(def sql:retrieve-batch-of-audit-log
"select * from audit_log
(def ^:private sql:retrieve-batch-of-audit-log
"select *
from audit_log
where archived_at is null
order by created_at asc
limit 256
limit 128
for update skip locked;")
(defn archive-events
[{:keys [pool uri sprops http-client] :as cfg}]
[{:keys [::db/pool ::uri] :as cfg}]
(letfn [(decode-row [{:keys [props ip-addr context] :as row}]
(cond-> row
(db/pgobject? props)
@@ -301,9 +268,10 @@
:context]))
(send [events]
(let [token (tokens/generate sprops {:iss "authentication"
:iat (dt/now)
:uid uuid/zero})
(let [token (tokens/generate (::main/props cfg)
{:iss "authentication"
:iat (dt/now)
:uid uuid/zero})
body (t/encode {:events events})
headers {"content-type" "application/transit+json"
"origin" (cf/get :public-uri)
@@ -313,7 +281,7 @@
:method :post
:headers headers
:body body}
resp (http-client params {:sync? true})]
resp (http/req! cfg params {:sync? true})]
(if (= (:status resp) 204)
true
(do
@@ -334,7 +302,7 @@
(map row->event))
events (into [] xform rows)]
(when-not (empty? events)
(l/debug :action "archive-events" :uri uri :events (count events))
(l/trace :hint "archive events chunk" :uri uri :events (count events))
(when (send events)
(mark-as-archived conn rows)
(count events)))))))
@@ -343,21 +311,21 @@
;; GC Task
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def sql:clean-archived
(def ^:private sql:clean-archived
"delete from audit_log
where archived_at is not null")
(defn- clean-archived
[{:keys [pool]}]
[{:keys [::db/pool]}]
(let [result (db/exec-one! pool [sql:clean-archived])
result (:next.jdbc/update-count result)]
(l/debug :hint "delete archived audit log entries" :deleted result)
result))
(defmethod ig/pre-init-spec ::gc-task [_]
(s/keys :req-un [::db/pool]))
(defmethod ig/pre-init-spec ::tasks/gc [_]
(s/keys :req [::db/pool]))
(defmethod ig/init-key ::gc-task
(defmethod ig/init-key ::tasks/gc
[_ cfg]
(fn [_]
(clean-archived cfg)))

View File

@@ -7,16 +7,17 @@
(ns app.loggers.database
"A specific logger impl that persists errors on the database."
(:require
[app.common.data :as d]
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.uuid :as uuid]
[app.common.pprint :as pp]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as db]
[app.util.async :as aa]
[app.worker :as wrk]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]))
[integrant.core :as ig]
[promesa.exec :as px]
[promesa.exec.csp :as sp]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Error Listener
@@ -27,67 +28,81 @@
(defonce enabled (atom true))
(defn- persist-on-database!
[{:keys [pool] :as cfg} {:keys [id] :as event}]
[pool id report]
(when-not (db/read-only? pool)
(db/insert! pool :server-error-report {:id id :content (db/tjson event)})))
(db/insert! pool :server-error-report
{:id id
:version 2
:content (db/tjson report)})))
(defn- parse-event-data
[event]
(reduce-kv
(fn [acc k v]
(cond
(= k :id) (assoc acc k (uuid/uuid v))
(= k :profile-id) (assoc acc k (uuid/uuid v))
(str/blank? v) acc
:else (assoc acc k v)))
{}
event))
(defn record->report
[{:keys [::l/context ::l/message ::l/props ::l/logger ::l/level ::l/cause] :as record}]
(us/assert! ::l/record record)
(defn parse-event
[event]
(-> (parse-event-data event)
(assoc :hint (or (:hint event) (:message event)))
(assoc :tenant (cf/get :tenant))
(assoc :host (cf/get :host))
(assoc :public-uri (cf/get :public-uri))
(assoc :version (:full cf/version))
(update :id #(or % (uuid/next)))))
(merge
{:context (-> context
(assoc :tenant (cf/get :tenant))
(assoc :host (cf/get :host))
(assoc :public-uri (cf/get :public-uri))
(assoc :version (:full cf/version))
(assoc :logger-name logger)
(assoc :logger-level level)
(dissoc :params)
(pp/pprint-str :width 200))
:params (some-> (:params context)
(pp/pprint-str :width 200))
:props (pp/pprint-str props :width 200)
:hint (or (ex-message cause) @message)
:trace (ex/format-throwable cause :data? false :explain? false :header? false :summary? false)}
(defn handle-event
[{:keys [executor] :as cfg} event]
(aa/with-thread executor
(try
(let [event (parse-event event)
uri (cf/get :public-uri)]
(when-let [data (ex-data cause)]
{:spec-value (some-> (::s/value data) (pp/pprint-str :width 200))
:spec-explain (ex/explain data)
:data (-> data
(dissoc ::s/problems ::s/value ::s/spec :hint)
(pp/pprint-str :width 200))})))
(l/debug :hint "registering error on database" :id (:id event)
:uri (str uri "/dbg/error/" (:id event)))
(defn- handle-event
[{:keys [::db/pool]} {:keys [::l/id] :as record}]
(try
(let [uri (cf/get :public-uri)
report (-> record record->report d/without-nils)]
(l/debug :hint "registering error on database" :id id
:uri (str uri "/dbg/error/" id))
(persist-on-database! cfg event))
(catch Exception cause
(l/warn :hint "unexpected exception on database error logger" :cause cause)))))
(persist-on-database! pool id report))
(catch Throwable cause
(l/warn :hint "unexpected exception on database error logger" :cause cause))))
(defn error-record?
[{:keys [::l/level ::l/cause]}]
(and (= :error level)
(ex/exception? cause)))
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::wrk/executor ::db/pool ::receiver]))
(defn error-event?
[event]
(= "error" (:logger/level event)))
(s/keys :req [::db/pool]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver] :as cfg}]
(l/info :msg "initializing database error persistence")
(let [output (a/chan (a/sliding-buffer 5) (filter error-event?))]
(receiver :sub output)
(a/go-loop []
(let [msg (a/<! output)]
(if (nil? msg)
(l/info :msg "stoping error reporting loop")
(do
(a/<! (handle-event cfg msg))
(recur)))))
output))
[_ cfg]
(let [input (sp/chan (sp/sliding-buffer 32) (filter error-record?))]
(add-watch l/log-record ::reporter #(sp/put! input %4))
(px/thread
{:name "penpot/database-reporter" :virtual true}
(l/info :hint "initializing database error persistence")
(try
(loop []
(when-let [record (sp/take! input)]
(handle-event cfg record)
(recur)))
(catch InterruptedException _
(l/debug :hint "reporter interrupted"))
(catch Throwable cause
(l/error :hint "unexpected error" :cause cause))
(finally
(sp/close! input)
(remove-watch l/log-record ::reporter)
(l/info :hint "reporter terminated"))))))
(defmethod ig/halt-key! ::reporter
[_ output]
(a/close! output))
[_ thread]
(some-> thread px/interrupt!))

View File

@@ -1,92 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.loggers.loki
"A Loki integration."
(:require
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cfg]
[app.util.json :as json]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]))
(declare ^:private handle-event)
(declare ^:private start-rcv-loop)
(s/def ::uri ::us/string)
(s/def ::receiver fn?)
(s/def ::http-client fn?)
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [ ::receiver ::http-client]
:opt-un [::uri]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver uri] :as cfg}]
(when uri
(l/info :msg "initializing loki reporter" :uri uri)
(let [input (a/chan (a/dropping-buffer 2048))]
(receiver :sub input)
(doto (Thread. #(start-rcv-loop cfg input))
(.setDaemon true)
(.setName "penpot/loki-sender")
(.start))
input)))
(defmethod ig/halt-key! ::reporter
[_ output]
(when output
(a/close! output)))
(defn- start-rcv-loop
[cfg input]
(loop []
(let [msg (a/<!! input)]
(when-not (nil? msg)
(handle-event cfg msg)
(recur))))
(l/info :msg "stoping error reporting loop"))
(defn- prepare-payload
[event]
(let [labels {:host (cfg/get :host)
:tenant (cfg/get :tenant)
:version (:full cfg/version)
:logger (:logger/name event)
:level (:logger/level event)}]
{:streams
[{:stream labels
:values [[(str (* (inst-ms (:created-at event)) 1000000))
(str (:message event)
(when-let [error (:trace event)]
(str "\n" error)))]]}]}))
(defn- make-request
[{:keys [http-client uri] :as cfg} payload]
(http-client {:uri uri
:timeout 3000
:method :post
:headers {"content-type" "application/json"}
:body (json/write payload)}
{:sync? true}))
(defn- handle-event
[cfg event]
(try
(let [payload (prepare-payload event)
response (make-request cfg payload)]
(when-not (= 204 (:status response))
(l/error :hint "error on sending log to loki (unexpected response)"
:response (pr-str response))))
(catch Throwable cause
(l/error :hint "error on sending log to loki (unexpected exception)"
:cause cause))))

View File

@@ -7,69 +7,92 @@
(ns app.loggers.mattermost
"A mattermost integration for error reporting."
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.config :as cf]
[app.http.client :as http]
[app.loggers.database :as ldb]
[app.util.json :as json]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]))
[promesa.exec :as px]
[promesa.exec.csp :as sp]))
(defonce enabled (atom true))
(defonce enabled (atom false))
(defn- send-mattermost-notification!
[{:keys [http-client] :as cfg} {:keys [host id public-uri] :as event}]
(let [uri (:uri cfg)
text (str "Exception on (host: " host ", url: " public-uri "/dbg/error/" id ")\n"
(when-let [pid (:profile-id event)]
(str "- profile-id: #uuid-" pid "\n")))]
(p/then
(http-client {:uri uri
:method :post
:headers {"content-type" "application/json"}
:body (json/write-str {:text text})})
(fn [{:keys [status] :as rsp}]
(when (not= status 200)
(l/warn :hint "error on sending data to mattermost"
:response (pr-str rsp)))))))
[cfg {:keys [id public-uri] :as report}]
(let [text (str "Exception: " public-uri "/dbg/error/" id " "
(when-let [pid (:profile-id report)]
(str "(pid: #uuid-" pid ")"))
"\n"
"```\n"
"- host: `" (:host report) "`\n"
"- tenant: `" (:tenant report) "`\n"
"- version: `" (:version report) "`\n"
"\n"
"Trace:\n"
(:trace report)
"```")
resp (http/req! cfg
{:uri (cf/get :error-report-webhook)
:method :post
:headers {"content-type" "application/json"}
:body (json/encode-str {:text text})}
{:sync? true})]
(when (not= 200 (:status resp))
(l/warn :hint "error on sending data"
:response (pr-str resp)))))
(defn record->report
[{:keys [::l/context ::l/id ::l/cause] :as record}]
(us/assert! ::l/record record)
{:id id
:tenant (cf/get :tenant)
:host (cf/get :host)
:public-uri (cf/get :public-uri)
:version (:full cf/version)
:profile-id (:profile-id context)
:trace (ex/format-throwable cause :detail? false :header? false)})
(defn handle-event
[cfg event]
(let [ch (a/chan)]
(-> (p/let [event (ldb/parse-event event)]
(send-mattermost-notification! cfg event))
(p/finally (fn [_ cause]
(when cause
(l/warn :hint "unexpected exception on error reporter" :cause cause))
(a/close! ch))))
ch))
(s/def ::http-client fn?)
(s/def ::uri ::cf/error-report-webhook)
[cfg record]
(when @enabled
(try
(let [report (record->report record)]
(send-mattermost-notification! cfg report))
(catch Throwable cause
(l/warn :hint "unhandled error" :cause cause)))))
(defmethod ig/pre-init-spec ::reporter [_]
(s/keys :req-un [::http-client ::receiver]
:opt-un [::uri]))
(s/keys :req [::http/client]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver uri] :as cfg}]
(when uri
(l/info :msg "initializing mattermost error reporter" :uri uri)
(let [output (a/chan (a/sliding-buffer 128)
(filter (fn [event]
(= (:logger/level event) "error"))))]
(receiver :sub output)
(a/go-loop []
(let [msg (a/<! output)]
(if (nil? msg)
(l/info :msg "stoping error reporting loop")
(do
(a/<! (handle-event cfg msg))
(recur)))))
output)))
[_ cfg]
(when-let [uri (cf/get :error-report-webhook)]
(px/thread
{:name "penpot/mattermost-reporter"
:virtual true}
(l/info :hint "initializing error reporter" :uri uri)
(let [input (sp/chan (sp/sliding-buffer 128) (filter ldb/error-record?))]
(add-watch l/log-record ::reporter #(sp/put! input %4))
(try
(loop []
(when-let [msg (sp/take! input)]
(handle-event cfg msg)
(recur)))
(catch InterruptedException _
(l/debug :hint "reporter interrupted"))
(catch Throwable cause
(l/error :hint "unexpected error" :cause cause))
(finally
(sp/close! input)
(remove-watch l/log-record ::reporter)
(l/info :hint "reporter terminated")))))))
(defmethod ig/halt-key! ::reporter
[_ output]
(when output
(a/close! output)))
[_ thread]
(some-> thread px/interrupt!))

View File

@@ -0,0 +1,186 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.loggers.webhooks
"A mattermost integration for error reporting."
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.logging :as l]
[app.common.transit :as t]
[app.common.uri :as uri]
[app.config :as cf]
[app.db :as db]
[app.http.client :as http]
[app.util.json :as json]
[app.util.time :as dt]
[app.worker :as wrk]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig]))
;; --- HELPERS
(defn key-fn
[k & keys]
(fn [params]
(reduce #(dm/str %1 ":" (get params %2))
(dm/str (get params k))
keys)))
;; --- PROC
(defn- lookup-webhooks-by-team
[pool team-id]
(db/exec! pool ["select w.* from webhook as w where team_id=? and is_active=true" team-id]))
(defn- lookup-webhooks-by-project
[pool project-id]
(let [sql [(str "select w.* from webhook as w"
" join project as p on (p.team_id = w.team_id)"
" where p.id = ? and w.is_active = true")
project-id]]
(db/exec! pool sql)))
(defn- lookup-webhooks-by-file
[pool file-id]
(let [sql [(str "select w.* from webhook as w"
" join project as p on (p.team_id = w.team_id)"
" join file as f on (f.project_id = p.id)"
" where f.id = ? and w.is_active = true")
file-id]]
(db/exec! pool sql)))
(defn- lookup-webhooks
[{:keys [::db/pool]} {:keys [props] :as event}]
(or (some->> (:team-id props) (lookup-webhooks-by-team pool))
(some->> (:project-id props) (lookup-webhooks-by-project pool))
(some->> (:file-id props) (lookup-webhooks-by-file pool))))
(defmethod ig/pre-init-spec ::process-event-handler [_]
(s/keys :req [::db/pool]))
(defmethod ig/init-key ::process-event-handler
[_ {:keys [::db/pool] :as cfg}]
(fn [{:keys [props] :as task}]
(let [event (::event props)]
(l/debug :hint "process webhook event"
:name (:name event))
(when-let [items (lookup-webhooks cfg event)]
(l/trace :hint "webhooks found for event" :total (count items))
(db/with-atomic [conn pool]
(doseq [item items]
(wrk/submit! ::wrk/conn conn
::wrk/task :run-webhook
::wrk/queue :webhooks
::wrk/max-retries 3
::event event
::config item)))))))
;; --- RUN
(declare interpret-exception)
(declare interpret-response)
(def ^:private json-mapper
(json/mapper
{:encode-key-fn str/camel
:decode-key-fn (comp keyword str/kebab)
:pretty true}))
(defmethod ig/pre-init-spec ::run-webhook-handler [_]
(s/keys :req [::http/client ::db/pool]))
(defmethod ig/prep-key ::run-webhook-handler
[_ cfg]
(merge {::max-errors 3} (d/without-nils cfg)))
(defmethod ig/init-key ::run-webhook-handler
[_ {:keys [::db/pool ::max-errors] :as cfg}]
(letfn [(update-webhook! [whook err]
(if err
(let [sql [(str "update webhook "
" set error_code=?, "
" error_count=error_count+1 "
" where id=?")
err
(:id whook)]
res (db/exec-one! pool sql {::db/return-keys? true})]
(when (>= (:error-count res) max-errors)
(db/update! pool :webhook {:is-active false} {:id (:id whook)})))
(db/update! pool :webhook
{:updated-at (dt/now)
:error-code nil
:error-count 0}
{:id (:id whook)})))
(report-delivery! [whook req rsp err]
(db/insert! pool :webhook-delivery
{:webhook-id (:id whook)
:created-at (dt/now)
:error-code err
:req-data (db/tjson req)
:rsp-data (db/tjson rsp)}))]
(fn [{:keys [props] :as task}]
(let [event (::event props)
whook (::config props)
body (case (:mtype whook)
"application/json" (json/encode-str event json-mapper)
"application/transit+json" (t/encode-str event)
"application/x-www-form-urlencoded" (uri/map->query-string event))]
(l/debug :hint "run webhook"
:event-name (:name event)
:webhook-id (:id whook)
:webhook-uri (:uri whook)
:webhook-mtype (:mtype whook))
(let [req {:uri (:uri whook)
:headers {"content-type" (:mtype whook)
"user-agent" (str/ffmt "penpot/%" (:main cf/version))}
:timeout (dt/duration "4s")
:method :post
:body body}]
(try
(let [rsp (http/req! cfg req {:response-type :input-stream :sync? true})
err (interpret-response rsp)]
(report-delivery! whook req rsp err)
(update-webhook! whook err))
(catch Throwable cause
(let [err (interpret-exception cause)]
(report-delivery! whook req nil err)
(update-webhook! whook err)
(when (= err "unknown")
(l/error :hint "unknown error on webhook request"
:cause cause))))))))))
(defn interpret-response
[{:keys [status] :as response}]
(when-not (or (= 200 status)
(= 204 status))
(str/ffmt "unexpected-status:%" status)))
(defn interpret-exception
[cause]
(cond
(instance? javax.net.ssl.SSLHandshakeException cause)
"ssl-validation-error"
(instance? java.net.ConnectException cause)
"connection-error"
(instance? java.lang.IllegalArgumentException cause)
"invalid-uri"
(instance? java.net.http.HttpConnectTimeoutException cause)
"timeout"
))

View File

@@ -1,110 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.loggers.zmq
"A generic ZMQ listener."
(:require
[app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.spec :as us]
[app.util.json :as json]
[app.util.time :as dt]
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[integrant.core :as ig])
(:import
org.zeromq.SocketType
org.zeromq.ZMQ$Socket
org.zeromq.ZContext))
(declare prepare)
(declare start-rcv-loop)
(s/def ::endpoint ::us/string)
(defmethod ig/pre-init-spec ::receiver [_]
(s/keys :opt-un [::endpoint]))
(defmethod ig/init-key ::receiver
[_ {:keys [endpoint] :as cfg}]
(l/info :msg "initializing ZMQ receiver" :bind endpoint)
(let [buffer (a/chan 1)
output (a/chan 1 (comp (filter map?)
(keep prepare)))
mult (a/mult output)]
(when endpoint
(let [thread (Thread. #(start-rcv-loop {:out buffer :endpoint endpoint}))]
(.setDaemon thread false)
(.setName thread "penpot/zmq-logger-receiver")
(.start thread)))
(a/pipe buffer output)
(with-meta
(fn [cmd ch]
(case cmd
:sub (a/tap mult ch)
:unsub (a/untap mult ch))
ch)
{::output output
::buffer buffer
::mult mult})))
(defmethod ig/halt-key! ::receiver
[_ f]
(a/close! (::buffer (meta f))))
(def ^:private json-mapper
(json/mapper
{:encode-key-fn str/camel
:decode-key-fn (comp keyword str/kebab)}))
(defn- start-rcv-loop
([] (start-rcv-loop nil))
([{:keys [out endpoint] :or {endpoint "tcp://localhost:5556"}}]
(let [out (or out (a/chan 1))
zctx (ZContext. 1)
socket (.. zctx (createSocket SocketType/SUB))]
(.. socket (connect ^String endpoint))
(.. socket (subscribe ""))
(.. socket (setReceiveTimeOut 5000))
(loop []
(let [msg (.recv ^ZMQ$Socket socket)
msg (ex/ignoring (json/read msg json-mapper))
msg (if (nil? msg) :empty msg)]
(if (a/>!! out msg)
(recur)
(do
(.close ^java.lang.AutoCloseable socket)
(.destroy ^ZContext zctx))))))))
(s/def ::logger-name string?)
(s/def ::level string?)
(s/def ::thread string?)
(s/def ::time-millis integer?)
(s/def ::message string?)
(s/def ::context-map map?)
(s/def ::thrown map?)
(s/def ::log4j-event
(s/keys :req-un [::logger-name ::level ::thread ::time-millis ::message]
:opt-un [::context-map ::thrown]))
(defn- prepare
[event]
(if (s/valid? ::log4j-event event)
(merge {:message (:message event)
:created-at (dt/instant (:time-millis event))
:logger/name (:logger-name event)
:logger/level (str/lower (:level event))}
(when-let [trace (-> event :thrown :extended-stack-trace)]
{:trace trace})
(:context-map event))
(do
(l/warn :hint "invalid event" :event event)
nil)))

View File

@@ -6,108 +6,246 @@
(ns app.main
(:require
[app.auth.oidc]
[app.auth.ldap :as-alias ldap]
[app.auth.oidc :as-alias oidc]
[app.auth.oidc.providers :as-alias oidc.providers]
[app.common.logging :as l]
[app.config :as cf]
[app.db :as-alias db]
[app.email :as-alias email]
[app.http :as-alias http]
[app.http.access-token :as-alias actoken]
[app.http.assets :as-alias http.assets]
[app.http.awsns :as http.awsns]
[app.http.client :as-alias http.client]
[app.http.debug :as-alias http.debug]
[app.http.session :as-alias session]
[app.http.session.tasks :as-alias session.tasks]
[app.http.websocket :as http.ws]
[app.loggers.audit.tasks :as-alias audit.tasks]
[app.loggers.webhooks :as-alias webhooks]
[app.metrics :as-alias mtx]
[app.metrics.definition :as-alias mdef]
[app.msgbus :as-alias mbus]
[app.redis :as-alias rds]
[app.rpc :as-alias rpc]
[app.rpc.doc :as-alias rpc.doc]
[app.srepl :as-alias srepl]
[app.storage :as-alias sto]
[app.storage.fs :as-alias sto.fs]
[app.storage.s3 :as-alias sto.s3]
[app.util.time :as dt]
[app.worker :as-alias wrk]
[cuerdas.core :as str]
[integrant.core :as ig])
(:gen-class))
(def default-metrics
{:update-file-changes
{::mdef/name "penpot_rpc_update_file_changes_total"
::mdef/help "A total number of changes submitted to update-file."
::mdef/type :counter}
:update-file-bytes-processed
{::mdef/name "penpot_rpc_update_file_bytes_processed_total"
::mdef/help "A total number of bytes processed by update-file."
::mdef/type :counter}
:rpc-mutation-timing
{::mdef/name "penpot_rpc_mutation_timing"
::mdef/help "RPC mutation method call timing."
::mdef/labels ["name"]
::mdef/type :histogram}
:rpc-command-timing
{::mdef/name "penpot_rpc_command_timing"
::mdef/help "RPC command method call timing."
::mdef/labels ["name"]
::mdef/type :histogram}
:rpc-query-timing
{::mdef/name "penpot_rpc_query_timing"
::mdef/help "RPC query method call timing."
::mdef/labels ["name"]
::mdef/type :histogram}
:websocket-active-connections
{::mdef/name "penpot_websocket_active_connections"
::mdef/help "Active websocket connections gauge"
::mdef/type :gauge}
:websocket-messages-total
{::mdef/name "penpot_websocket_message_total"
::mdef/help "Counter of processed messages."
::mdef/labels ["op"]
::mdef/type :counter}
:websocket-session-timing
{::mdef/name "penpot_websocket_session_timing"
::mdef/help "Websocket session timing (seconds)."
::mdef/type :summary}
:session-update-total
{::mdef/name "penpot_http_session_update_total"
::mdef/help "A counter of session update batch events."
::mdef/type :counter}
:tasks-timing
{::mdef/name "penpot_tasks_timing"
::mdef/help "Background tasks timing (milliseconds)."
::mdef/labels ["name"]
::mdef/type :summary}
:redis-eval-timing
{::mdef/name "penpot_redis_eval_timing"
::mdef/help "Redis EVAL commands execution timings (ms)"
::mdef/labels ["name"]
::mdef/type :summary}
:rpc-climit-queue-size
{::mdef/name "penpot_rpc_climit_queue_size"
::mdef/help "Current number of queued submissions on the CLIMIT."
::mdef/labels ["name"]
::mdef/type :gauge}
:rpc-climit-concurrency
{::mdef/name "penpot_rpc_climit_concurrency"
::mdef/help "Current number of used concurrency capacity on the CLIMIT"
::mdef/labels ["name"]
::mdef/type :gauge}
:rpc-climit-timing
{::mdef/name "penpot_rpc_climit_timing"
::mdef/help "Summary of the time between queuing and executing on the CLIMIT"
::mdef/labels ["name"]
::mdef/type :summary}
:audit-http-handler-queue-size
{::mdef/name "penpot_audit_http_handler_queue_size"
::mdef/help "Current number of queued submissions on the audit log http handler"
::mdef/labels []
::mdef/type :gauge}
:audit-http-handler-concurrency
{::mdef/name "penpot_audit_http_handler_concurrency"
::mdef/help "Current number of used concurrency capacity on the audit log http handler"
::mdef/labels []
::mdef/type :gauge}
:audit-http-handler-timing
{::mdef/name "penpot_audit_http_handler_timing"
::mdef/help "Summary of the time between queuing and executing on the audit log http handler"
::mdef/labels []
::mdef/type :summary}
:executors-active-threads
{::mdef/name "penpot_executors_active_threads"
::mdef/help "Current number of threads available in the executor service."
::mdef/labels ["name"]
::mdef/type :gauge}
:executors-completed-tasks
{::mdef/name "penpot_executors_completed_tasks_total"
::mdef/help "Approximate number of completed tasks by the executor."
::mdef/labels ["name"]
::mdef/type :counter}
:executors-running-threads
{::mdef/name "penpot_executors_running_threads"
::mdef/help "Current number of threads with state RUNNING."
::mdef/labels ["name"]
::mdef/type :gauge}
:executors-queued-submissions
{::mdef/name "penpot_executors_queued_submissions"
::mdef/help "Current number of queued submissions."
::mdef/labels ["name"]
::mdef/type :gauge}})
(def system-config
{:app.db/pool
{:uri (cf/get :database-uri)
:username (cf/get :database-username)
:password (cf/get :database-password)
:read-only (cf/get :database-readonly false)
:metrics (ig/ref :app.metrics/metrics)
:migrations (ig/ref :app.migrations/all)
:name :main
:min-size (cf/get :database-min-pool-size 0)
:max-size (cf/get :database-max-pool-size 60)}
{::db/pool
{::db/uri (cf/get :database-uri)
::db/username (cf/get :database-username)
::db/password (cf/get :database-password)
::db/read-only? (cf/get :database-readonly false)
::db/min-size (cf/get :database-min-pool-size 0)
::db/max-size (cf/get :database-max-pool-size 60)
::mtx/metrics (ig/ref ::mtx/metrics)}
;; Default thread pool for IO operations
[::default :app.worker/executor]
{:parallelism (cf/get :default-executor-parallelism 70)}
::wrk/executor
{::wrk/parallelism (cf/get :default-executor-parallelism 100)}
;; Dedicated thread pool for backround tasks execution.
[::worker :app.worker/executor]
{:parallelism (cf/get :worker-executor-parallelism 20)}
::wrk/scheduled-executor
{::wrk/parallelism (cf/get :scheduled-executor-parallelism 20)}
:app.worker/scheduler
{:parallelism 1
:prefix :scheduler}
:app.worker/executors
{:default (ig/ref [::default :app.worker/executor])
:worker (ig/ref [::worker :app.worker/executor])}
:app.worker/executor-monitor
{:metrics (ig/ref :app.metrics/metrics)
:executors (ig/ref :app.worker/executors)}
::wrk/monitor
{::mtx/metrics (ig/ref ::mtx/metrics)
::wrk/name "default"
::wrk/executor (ig/ref ::wrk/executor)}
:app.migrations/migrations
{}
{::db/pool (ig/ref ::db/pool)}
:app.metrics/metrics
{}
::mtx/metrics
{:default default-metrics}
:app.migrations/all
{:main (ig/ref :app.migrations/migrations)}
::mtx/routes
{::mtx/metrics (ig/ref ::mtx/metrics)}
:app.redis/redis
{:uri (cf/get :redis-uri)
:metrics (ig/ref :app.metrics/metrics)}
::rds/redis
{::rds/uri (cf/get :redis-uri)
::mtx/metrics (ig/ref ::mtx/metrics)}
:app.msgbus/msgbus
::mbus/msgbus
{:backend (cf/get :msgbus-backend :redis)
:executor (ig/ref [::default :app.worker/executor])
:redis (ig/ref :app.redis/redis)}
:executor (ig/ref ::wrk/executor)
:redis (ig/ref ::rds/redis)}
:app.storage.tmp/cleaner
{:executor (ig/ref [::worker :app.worker/executor])
:scheduler (ig/ref :app.worker/scheduler)}
{::wrk/executor (ig/ref ::wrk/executor)
::wrk/scheduled-executor (ig/ref ::wrk/scheduled-executor)}
:app.storage/gc-deleted-task
{:pool (ig/ref :app.db/pool)
:storage (ig/ref :app.storage/storage)
:executor (ig/ref [::worker :app.worker/executor])}
::sto/gc-deleted-task
{::db/pool (ig/ref ::db/pool)
::sto/storage (ig/ref ::sto/storage)}
:app.storage/gc-touched-task
{:pool (ig/ref :app.db/pool)}
::sto/gc-touched-task
{::db/pool (ig/ref ::db/pool)}
:app.http/client
{:executor (ig/ref [::default :app.worker/executor])}
::http.client/client
{::wrk/executor (ig/ref ::wrk/executor)}
:app.http/session
{:store (ig/ref :app.http.session/store)}
::session/manager
{::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::props (ig/ref :app.setup/props)}
:app.http.session/store
{:pool (ig/ref :app.db/pool)
:sprops (ig/ref :app.setup/props)
:executor (ig/ref [::default :app.worker/executor])}
::actoken/manager
{::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::props (ig/ref :app.setup/props)}
:app.http.session/gc-task
{:pool (ig/ref :app.db/pool)
:max-age (cf/get :auth-token-cookie-max-age)}
::session.tasks/gc
{::db/pool (ig/ref ::db/pool)}
:app.http.awsns/handler
{:sprops (ig/ref :app.setup/props)
:pool (ig/ref :app.db/pool)
:http-client (ig/ref :app.http/client)
:executor (ig/ref [::worker :app.worker/executor])}
::http.awsns/routes
{::props (ig/ref :app.setup/props)
::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)
::wrk/executor (ig/ref ::wrk/executor)}
:app.http/server
{:port (cf/get :http-server-port)
:host (cf/get :http-server-host)
:router (ig/ref :app.http/router)
:metrics (ig/ref :app.metrics/metrics)
:executor (ig/ref [::default :app.worker/executor])
:io-threads (cf/get :http-server-io-threads)
:max-body-size (cf/get :http-server-max-body-size)
:max-multipart-body-size (cf/get :http-server-max-multipart-body-size)}
::http/server
{::http/port (cf/get :http-server-port)
::http/host (cf/get :http-server-host)
::http/router (ig/ref ::http/router)
::http/metrics (ig/ref ::mtx/metrics)
::http/executor (ig/ref ::wrk/executor)
::http/io-threads (cf/get :http-server-io-threads)
::http/max-body-size (cf/get :http-server-max-body-size)
::http/max-multipart-body-size (cf/get :http-server-max-multipart-body-size)}
:app.auth.ldap/provider
::ldap/provider
{:host (cf/get :ldap-host)
:port (cf/get :ldap-port)
:ssl (cf/get :ldap-ssl)
@@ -121,252 +259,218 @@
:bind-password (cf/get :ldap-bind-password)
:enabled? (contains? cf/flags :login-with-ldap)}
:app.auth.oidc/google-provider
{:enabled? (contains? cf/flags :login-with-google)
:client-id (cf/get :google-client-id)
:client-secret (cf/get :google-client-secret)}
::oidc.providers/google
{}
:app.auth.oidc/github-provider
{:enabled? (contains? cf/flags :login-with-github)
:http-client (ig/ref :app.http/client)
:client-id (cf/get :github-client-id)
:client-secret (cf/get :github-client-secret)}
::oidc.providers/github
{::http.client/client (ig/ref ::http.client/client)}
:app.auth.oidc/gitlab-provider
{:enabled? (contains? cf/flags :login-with-gitlab)
:base-uri (cf/get :gitlab-base-uri "https://gitlab.com")
:client-id (cf/get :gitlab-client-id)
:client-secret (cf/get :gitlab-client-secret)}
::oidc.providers/gitlab
{}
:app.auth.oidc/generic-provider
{:enabled? (contains? cf/flags :login-with-oidc)
:http-client (ig/ref :app.http/client)
::oidc.providers/generic
{::http.client/client (ig/ref ::http.client/client)}
:client-id (cf/get :oidc-client-id)
:client-secret (cf/get :oidc-client-secret)
::oidc/routes
{::http.client/client (ig/ref ::http.client/client)
::db/pool (ig/ref ::db/pool)
::props (ig/ref :app.setup/props)
::wrk/executor (ig/ref ::wrk/executor)
::oidc/providers {:google (ig/ref ::oidc.providers/google)
:github (ig/ref ::oidc.providers/github)
:gitlab (ig/ref ::oidc.providers/gitlab)
:oidc (ig/ref ::oidc.providers/generic)}
::session/manager (ig/ref ::session/manager)}
:base-uri (cf/get :oidc-base-uri)
:token-uri (cf/get :oidc-token-uri)
:auth-uri (cf/get :oidc-auth-uri)
:user-uri (cf/get :oidc-user-uri)
:scopes (cf/get :oidc-scopes)
:roles-attr (cf/get :oidc-roles-attr)
:roles (cf/get :oidc-roles)}
:app.auth.oidc/routes
{:providers {:google (ig/ref :app.auth.oidc/google-provider)
:github (ig/ref :app.auth.oidc/github-provider)
:gitlab (ig/ref :app.auth.oidc/gitlab-provider)
:oidc (ig/ref :app.auth.oidc/generic-provider)}
:sprops (ig/ref :app.setup/props)
:http-client (ig/ref :app.http/client)
:pool (ig/ref :app.db/pool)
:session (ig/ref :app.http/session)
:public-uri (cf/get :public-uri)
:executor (ig/ref [::default :app.worker/executor])}
;; TODO: revisit the dependencies of this service, looks they are too much unused of them
:app.http/router
{:assets (ig/ref :app.http.assets/handlers)
:feedback (ig/ref :app.http.feedback/handler)
:session (ig/ref :app.http/session)
:awsns-handler (ig/ref :app.http.awsns/handler)
:debug-routes (ig/ref :app.http.debug/routes)
:oidc-routes (ig/ref :app.auth.oidc/routes)
:ws (ig/ref :app.http.websocket/handler)
:metrics (ig/ref :app.metrics/metrics)
:public-uri (cf/get :public-uri)
:storage (ig/ref :app.storage/storage)
:audit-handler (ig/ref :app.loggers.audit/http-handler)
:rpc-routes (ig/ref :app.rpc/routes)
:doc-routes (ig/ref :app.rpc.doc/routes)
:executor (ig/ref [::default :app.worker/executor])}
{::session/manager (ig/ref ::session/manager)
::actoken/manager (ig/ref ::actoken/manager)
::wrk/executor (ig/ref ::wrk/executor)
::db/pool (ig/ref ::db/pool)
::rpc/routes (ig/ref ::rpc/routes)
::rpc.doc/routes (ig/ref ::rpc.doc/routes)
::props (ig/ref :app.setup/props)
::mtx/routes (ig/ref ::mtx/routes)
::oidc/routes (ig/ref ::oidc/routes)
::http.debug/routes (ig/ref ::http.debug/routes)
::http.assets/routes (ig/ref ::http.assets/routes)
::http.ws/routes (ig/ref ::http.ws/routes)
::http.awsns/routes (ig/ref ::http.awsns/routes)}
:app.http.debug/routes
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])
:storage (ig/ref :app.storage/storage)
:session (ig/ref :app.http/session)}
{::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::session/manager (ig/ref ::session/manager)}
:app.http.websocket/handler
{:pool (ig/ref :app.db/pool)
:metrics (ig/ref :app.metrics/metrics)
:msgbus (ig/ref :app.msgbus/msgbus)}
:app.http.websocket/routes
{::db/pool (ig/ref ::db/pool)
::mtx/metrics (ig/ref ::mtx/metrics)
::mbus/msgbus (ig/ref :app.msgbus/msgbus)
::session/manager (ig/ref ::session/manager)}
:app.http.assets/handlers
{:metrics (ig/ref :app.metrics/metrics)
:assets-path (cf/get :assets-path)
:storage (ig/ref :app.storage/storage)
:executor (ig/ref [::default :app.worker/executor])
:cache-max-age (dt/duration {:hours 24})
:signature-max-age (dt/duration {:hours 24 :minutes 5})}
:app.http.assets/routes
{::http.assets/path (cf/get :assets-path)
::http.assets/cache-max-age (dt/duration {:hours 24})
::http.assets/cache-max-agesignature-max-age (dt/duration {:hours 24 :minutes 5})
::sto/storage (ig/ref ::sto/storage)
::wrk/executor (ig/ref ::wrk/executor)}
:app.http.feedback/handler
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::default :app.worker/executor])}
:app.rpc/semaphores
{:metrics (ig/ref :app.metrics/metrics)
:executor (ig/ref [::default :app.worker/executor])}
:app.rpc/climit
{::mtx/metrics (ig/ref ::mtx/metrics)
::wrk/executor (ig/ref ::wrk/executor)}
:app.rpc/rlimit
{:executor (ig/ref [::worker :app.worker/executor])
:scheduler (ig/ref :app.worker/scheduler)}
{::wrk/executor (ig/ref ::wrk/executor)
::wrk/scheduled-executor (ig/ref ::wrk/scheduled-executor)}
:app.rpc/methods
{:pool (ig/ref :app.db/pool)
:session (ig/ref :app.http/session)
:sprops (ig/ref :app.setup/props)
:metrics (ig/ref :app.metrics/metrics)
:storage (ig/ref :app.storage/storage)
:msgbus (ig/ref :app.msgbus/msgbus)
:public-uri (cf/get :public-uri)
:redis (ig/ref :app.redis/redis)
:audit (ig/ref :app.loggers.audit/collector)
:ldap (ig/ref :app.auth.ldap/provider)
:http-client (ig/ref :app.http/client)
:rlimit (ig/ref :app.rpc/rlimit)
:executors (ig/ref :app.worker/executors)
:executor (ig/ref [::default :app.worker/executor])
:templates (ig/ref :app.setup/builtin-templates)
:semaphores (ig/ref :app.rpc/semaphores)
{::http.client/client (ig/ref ::http.client/client)
::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::session/manager (ig/ref ::session/manager)
::ldap/provider (ig/ref ::ldap/provider)
::sto/storage (ig/ref ::sto/storage)
::mtx/metrics (ig/ref ::mtx/metrics)
::mbus/msgbus (ig/ref ::mbus/msgbus)
::rds/redis (ig/ref ::rds/redis)
::rpc/climit (ig/ref ::rpc/climit)
::rpc/rlimit (ig/ref ::rpc/rlimit)
::props (ig/ref :app.setup/props)
:pool (ig/ref ::db/pool)
:templates (ig/ref :app.setup/builtin-templates)
}
:app.rpc.doc/routes
{:methods (ig/ref :app.rpc/methods)}
:app.rpc/routes
{:methods (ig/ref :app.rpc/methods)}
{::rpc/methods (ig/ref :app.rpc/methods)
::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::session/manager (ig/ref ::session/manager)
::actoken/manager (ig/ref ::actoken/manager)
::props (ig/ref :app.setup/props)}
:app.worker/registry
{:metrics (ig/ref :app.metrics/metrics)
:tasks
{:sendmail (ig/ref :app.emails/handler)
::wrk/registry
{::mtx/metrics (ig/ref ::mtx/metrics)
::wrk/tasks
{:sendmail (ig/ref ::email/handler)
:objects-gc (ig/ref :app.tasks.objects-gc/handler)
:file-gc (ig/ref :app.tasks.file-gc/handler)
:file-xlog-gc (ig/ref :app.tasks.file-xlog-gc/handler)
:storage-gc-deleted (ig/ref :app.storage/gc-deleted-task)
:storage-gc-touched (ig/ref :app.storage/gc-touched-task)
:storage-gc-deleted (ig/ref ::sto/gc-deleted-task)
:storage-gc-touched (ig/ref ::sto/gc-touched-task)
:tasks-gc (ig/ref :app.tasks.tasks-gc/handler)
:telemetry (ig/ref :app.tasks.telemetry/handler)
:session-gc (ig/ref :app.http.session/gc-task)
:audit-log-archive (ig/ref :app.loggers.audit/archive-task)
:audit-log-gc (ig/ref :app.loggers.audit/gc-task)}}
:session-gc (ig/ref ::session.tasks/gc)
:audit-log-archive (ig/ref ::audit.tasks/archive)
:audit-log-gc (ig/ref ::audit.tasks/gc)
:process-webhook-event
(ig/ref ::webhooks/process-event-handler)
:run-webhook
(ig/ref ::webhooks/run-webhook-handler)}}
:app.emails/sendmail
{:host (cf/get :smtp-host)
:port (cf/get :smtp-port)
:ssl (cf/get :smtp-ssl)
:tls (cf/get :smtp-tls)
:username (cf/get :smtp-username)
:password (cf/get :smtp-password)
:default-reply-to (cf/get :smtp-default-reply-to)
:default-from (cf/get :smtp-default-from)}
::email/sendmail
{::email/host (cf/get :smtp-host)
::email/port (cf/get :smtp-port)
::email/ssl (cf/get :smtp-ssl)
::email/tls (cf/get :smtp-tls)
::email/username (cf/get :smtp-username)
::email/password (cf/get :smtp-password)
::email/default-reply-to (cf/get :smtp-default-reply-to)
::email/default-from (cf/get :smtp-default-from)}
:app.emails/handler
{:sendmail (ig/ref :app.emails/sendmail)
:metrics (ig/ref :app.metrics/metrics)}
::email/handler
{::email/sendmail (ig/ref ::email/sendmail)
::mtx/metrics (ig/ref ::mtx/metrics)}
:app.tasks.tasks-gc/handler
{:pool (ig/ref :app.db/pool)
:max-age cf/deletion-delay}
{::db/pool (ig/ref ::db/pool)}
:app.tasks.objects-gc/handler
{:pool (ig/ref :app.db/pool)
:storage (ig/ref :app.storage/storage)}
{::db/pool (ig/ref ::db/pool)
::sto/storage (ig/ref ::sto/storage)}
:app.tasks.file-gc/handler
{:pool (ig/ref :app.db/pool)}
{::db/pool (ig/ref ::db/pool)}
:app.tasks.file-xlog-gc/handler
{:pool (ig/ref :app.db/pool)}
{::db/pool (ig/ref ::db/pool)}
:app.tasks.telemetry/handler
{:pool (ig/ref :app.db/pool)
:version (:full cf/version)
:uri (cf/get :telemetry-uri)
:sprops (ig/ref :app.setup/props)
:http-client (ig/ref :app.http/client)}
{::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)
::props (ig/ref :app.setup/props)}
:app.srepl/server
{:port (cf/get :srepl-port)
:host (cf/get :srepl-host)}
[::srepl/urepl ::srepl/server]
{::srepl/port (cf/get :urepl-port 6062)
::srepl/host (cf/get :urepl-host "localhost")}
[::srepl/prepl ::srepl/server]
{::srepl/port (cf/get :prepl-port 6063)
::srepl/host (cf/get :prepl-host "localhost")}
:app.setup/builtin-templates
{:http-client (ig/ref :app.http/client)}
{::http.client/client (ig/ref ::http.client/client)}
:app.setup/props
{:pool (ig/ref :app.db/pool)
:key (cf/get :secret-key)}
{::db/pool (ig/ref ::db/pool)
::key (cf/get :secret-key)
:app.loggers.zmq/receiver
{:endpoint (cf/get :loggers-zmq-uri)}
;; NOTE: this dependency is only necessary for proper initialization ordering, props
;; module requires the migrations to run before initialize.
::migrations (ig/ref :app.migrations/migrations)}
:app.loggers.audit/http-handler
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::default :app.worker/executor])}
::audit.tasks/archive
{::props (ig/ref :app.setup/props)
::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)}
:app.loggers.audit/collector
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
::audit.tasks/gc
{::db/pool (ig/ref ::db/pool)}
:app.loggers.audit/archive-task
{:uri (cf/get :audit-log-archive-uri)
:sprops (ig/ref :app.setup/props)
:pool (ig/ref :app.db/pool)
:http-client (ig/ref :app.http/client)}
::webhooks/process-event-handler
{::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)}
:app.loggers.audit/gc-task
{:pool (ig/ref :app.db/pool)}
:app.loggers.loki/reporter
{:uri (cf/get :loggers-loki-uri)
:receiver (ig/ref :app.loggers.zmq/receiver)
:http-client (ig/ref :app.http/client)}
::webhooks/run-webhook-handler
{::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)}
:app.loggers.mattermost/reporter
{:uri (cf/get :error-report-webhook)
:receiver (ig/ref :app.loggers.zmq/receiver)
:http-client (ig/ref :app.http/client)}
{::http.client/client (ig/ref ::http.client/client)}
:app.loggers.database/reporter
{:receiver (ig/ref :app.loggers.zmq/receiver)
:pool (ig/ref :app.db/pool)
:executor (ig/ref [::worker :app.worker/executor])}
{::db/pool (ig/ref ::db/pool)}
:app.storage/storage
{:pool (ig/ref :app.db/pool)
:executor (ig/ref [::default :app.worker/executor])
:backends
::sto/storage
{::db/pool (ig/ref ::db/pool)
::wrk/executor (ig/ref ::wrk/executor)
::sto/backends
{:assets-s3 (ig/ref [::assets :app.storage.s3/backend])
:assets-fs (ig/ref [::assets :app.storage.fs/backend])
;; keep this for backward compatibility
:s3 (ig/ref [::assets :app.storage.s3/backend])
:fs (ig/ref [::assets :app.storage.fs/backend])}}
:assets-fs (ig/ref [::assets :app.storage.fs/backend])}}
[::assets :app.storage.s3/backend]
{:region (cf/get :storage-assets-s3-region)
:endpoint (cf/get :storage-assets-s3-endpoint)
:bucket (cf/get :storage-assets-s3-bucket)
:executor (ig/ref [::default :app.worker/executor])}
{::sto.s3/region (cf/get :storage-assets-s3-region)
::sto.s3/endpoint (cf/get :storage-assets-s3-endpoint)
::sto.s3/bucket (cf/get :storage-assets-s3-bucket)
::wrk/executor (ig/ref ::wrk/executor)}
[::assets :app.storage.fs/backend]
{:directory (cf/get :storage-assets-fs-directory)}
{::sto.fs/directory (cf/get :storage-assets-fs-directory)}
})
(def worker-config
{:app.worker/cron
{:executor (ig/ref [::worker :app.worker/executor])
:scheduler (ig/ref :app.worker/scheduler)
:tasks (ig/ref :app.worker/registry)
:pool (ig/ref :app.db/pool)
:entries
{::wrk/cron
{::wrk/scheduled-executor (ig/ref ::wrk/scheduled-executor)
::wrk/registry (ig/ref ::wrk/registry)
::db/pool (ig/ref ::db/pool)
::wrk/entries
[{:cron #app/cron "0 0 * * * ?" ;; hourly
:task :file-xlog-gc}
@@ -399,11 +503,27 @@
{:cron #app/cron "30 */5 * * * ?" ;; every 5m
:task :audit-log-gc})]}
:app.worker/worker
{:executor (ig/ref [::worker :app.worker/executor])
:tasks (ig/ref :app.worker/registry)
:metrics (ig/ref :app.metrics/metrics)
:pool (ig/ref :app.db/pool)}})
::wrk/dispatcher
{::rds/redis (ig/ref ::rds/redis)
::mtx/metrics (ig/ref ::mtx/metrics)
::db/pool (ig/ref ::db/pool)}
[::default ::wrk/worker]
{::wrk/parallelism (cf/get ::worker-default-parallelism 1)
::wrk/queue :default
::rds/redis (ig/ref ::rds/redis)
::wrk/registry (ig/ref ::wrk/registry)
::mtx/metrics (ig/ref ::mtx/metrics)
::db/pool (ig/ref ::db/pool)}
[::webhook ::wrk/worker]
{::wrk/parallelism (cf/get ::worker-webhook-parallelism 1)
::wrk/queue :webhooks
::rds/redis (ig/ref ::rds/redis)
::wrk/registry (ig/ref ::wrk/registry)
::mtx/metrics (ig/ref ::mtx/metrics)
::db/pool (ig/ref ::db/pool)}})
(def system nil)
@@ -417,7 +537,7 @@
(merge worker-config))
(ig/prep)
(ig/init))))
(l/info :msg "welcome to penpot"
(l/info :hint "welcome to penpot"
:flags (str/join "," (map name cf/flags))
:worker? (contains? cf/flags :backend-worker)
:version (:full cf/version)))
@@ -430,4 +550,9 @@
(defn -main
[& _args]
(start))
(try
(start)
(catch Throwable cause
(l/error :hint (ex-message cause)
:cause cause)
(System/exit -1))))

View File

@@ -12,6 +12,8 @@
[app.common.media :as cm]
[app.common.spec :as us]
[app.config :as cf]
[app.db :as-alias db]
[app.storage :as-alias sto]
[app.storage.tmp :as tmp]
[app.util.svg :as svg]
[buddy.core.bytes :as bb]
@@ -220,7 +222,7 @@
(ttf-or-otf->woff [data]
;; NOTE: foutput is not used directly, it represents the
;; default output of the exection of the underlying
;; default output of the execution of the underlying
;; command.
(let [finput (tmp/tempfile :prefix "penpot.font." :suffix "")
foutput (fs/path (str finput ".woff"))
@@ -297,8 +299,7 @@
"Given storage map, returns a storage configured with the appropriate
backend for assets and optional connection attached."
([storage]
(assoc storage :backend (cf/get :assets-storage-backend :assets-fs)))
([storage conn]
(-> storage
(assoc :conn conn)
(assoc :backend (cf/get :assets-storage-backend :assets-fs)))))
(assoc storage ::sto/backend (cf/get :assets-storage-backend :assets-fs)))
([storage pool-or-conn]
(-> (configure-assets-storage storage)
(assoc ::db/pool-or-conn pool-or-conn))))

View File

@@ -38,110 +38,6 @@
;; METRICS SERVICE PROVIDER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def default-metrics
{:update-file-changes
{::mdef/name "penpot_rpc_update_file_changes_total"
::mdef/help "A total number of changes submitted to update-file."
::mdef/type :counter}
:update-file-bytes-processed
{::mdef/name "penpot_rpc_update_file_bytes_processed_total"
::mdef/help "A total number of bytes processed by update-file."
::mdef/type :counter}
:rpc-mutation-timing
{::mdef/name "penpot_rpc_mutation_timing"
::mdef/help "RPC mutation method call timming."
::mdef/labels ["name"]
::mdef/type :histogram}
:rpc-command-timing
{::mdef/name "penpot_rpc_command_timing"
::mdef/help "RPC command method call timming."
::mdef/labels ["name"]
::mdef/type :histogram}
:rpc-query-timing
{::mdef/name "penpot_rpc_query_timing"
::mdef/help "RPC query method call timing."
::mdef/labels ["name"]
::mdef/type :histogram}
:websocket-active-connections
{::mdef/name "penpot_websocket_active_connections"
::mdef/help "Active websocket connections gauge"
::mdef/type :gauge}
:websocket-messages-total
{::mdef/name "penpot_websocket_message_total"
::mdef/help "Counter of processed messages."
::mdef/labels ["op"]
::mdef/type :counter}
:websocket-session-timing
{::mdef/name "penpot_websocket_session_timing"
::mdef/help "Websocket session timing (seconds)."
::mdef/type :summary}
:session-update-total
{::mdef/name "penpot_http_session_update_total"
::mdef/help "A counter of session update batch events."
::mdef/type :counter}
:tasks-timing
{::mdef/name "penpot_tasks_timing"
::mdef/help "Background tasks timing (milliseconds)."
::mdef/labels ["name"]
::mdef/type :summary}
:redis-eval-timing
{::mdef/name "penpot_redis_eval_timing"
::mdef/help "Redis EVAL commands execution timings (ms)"
::mdef/labels ["name"]
::mdef/type :summary}
:semaphore-queued-submissions
{::mdef/name "penpot_semaphore_queued_submissions"
::mdef/help "Current number of queued submissions on SEMAPHORE."
::mdef/labels ["name"]
::mdef/type :gauge}
:semaphore-used-permits
{::mdef/name "penpot_semaphore_used_permits"
::mdef/help "Current number of used permits on SEMAPHORE."
::mdef/labels ["name"]
::mdef/type :gauge}
:semaphore-timing
{::mdef/name "penpot_semaphore_timing"
::mdef/help "Total timing of SEMAPHORE."
::mdef/labels ["name"]
::mdef/type :summary}
:executors-active-threads
{::mdef/name "penpot_executors_active_threads"
::mdef/help "Current number of threads available in the executor service."
::mdef/labels ["name"]
::mdef/type :gauge}
:executors-completed-tasks
{::mdef/name "penpot_executors_completed_tasks_total"
::mdef/help "Aproximate number of completed tasks by the executor."
::mdef/labels ["name"]
::mdef/type :counter}
:executors-running-threads
{::mdef/name "penpot_executors_running_threads"
::mdef/help "Current number of threads with state RUNNING."
::mdef/labels ["name"]
::mdef/type :gauge}
:executors-queued-submissions
{::mdef/name "penpot_executors_queued_submissions"
::mdef/help "Current number of queued submissions."
::mdef/labels ["name"]
::mdef/type :gauge}})
(s/def ::mdef/name string?)
(s/def ::mdef/help string?)
(s/def ::mdef/labels (s/every string? :kind vector?))
@@ -169,8 +65,13 @@
::handler
::definitions]))
(s/def ::default ::definitions)
(defmethod ig/pre-init-spec ::metrics [_]
(s/keys :req-un [::default]))
(defmethod ig/init-key ::metrics
[_ _]
[_ cfg]
(l/info :action "initialize metrics")
(let [registry (create-registry)
definitions (reduce-kv (fn [res k v]
@@ -178,7 +79,7 @@
(create-collector)
(assoc res k)))
{}
default-metrics)]
(:default cfg))]
(us/verify! ::definitions definitions)
@@ -186,6 +87,7 @@
::definitions definitions
::registry registry}))
(defn- handler
[registry _ respond _]
(let [samples (.metricFamilySamples ^CollectorRegistry registry)
@@ -194,6 +96,18 @@
(respond {:headers {"content-type" TextFormat/CONTENT_TYPE_004}
:body (.toString writer)})))
(s/def ::routes vector?)
(defmethod ig/pre-init-spec ::routes [_]
(s/keys :req [::metrics]))
(defmethod ig/init-key ::routes
[_ {:keys [::metrics]}]
(let [registry (::registry metrics)]
["/metrics" {:handler (partial handler registry)
:allowed-methods #{:get}}]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -231,7 +145,7 @@
(defmethod run-collector! :counter
[{:keys [::mdef/instance]} {:keys [inc labels] :or {inc 1 labels default-empty-labels}}]
(let [instance (.labels instance (if (is-array? labels) labels (into-array String labels)))]
(let [instance (.labels ^Counter instance (if (is-array? labels) labels (into-array String labels)))]
(.inc ^Counter$Child instance (double inc))))
(defmethod run-collector! :gauge

View File

@@ -6,8 +6,12 @@
(ns app.migrations
(:require
[app.common.data.macros :as dm]
[app.common.logging :as l]
[app.db :as db]
[app.migrations.clj.migration-0023 :as mg0023]
[app.util.migrations :as mg]
[clojure.spec.alpha :as s]
[integrant.core :as ig]))
(def migrations
@@ -247,7 +251,84 @@
{:name "0079-mod-profile-table"
:fn (mg/resource "app/migrations/sql/0079-mod-profile-table.sql")}
])
{:name "0080-mod-index-names"
:fn (mg/resource "app/migrations/sql/0080-mod-index-names.sql")}
(defmethod ig/init-key ::migrations [_ _] migrations)
{:name "0081-add-deleted-at-index-to-file-table"
:fn (mg/resource "app/migrations/sql/0081-add-deleted-at-index-to-file-table.sql")}
{:name "0082-add-features-column-to-file-table"
:fn (mg/resource "app/migrations/sql/0082-add-features-column-to-file-table.sql")}
{:name "0083-add-file-data-fragment-table"
:fn (mg/resource "app/migrations/sql/0083-add-file-data-fragment-table.sql")}
{:name "0084-add-features-column-to-file-change-table"
:fn (mg/resource "app/migrations/sql/0084-add-features-column-to-file-change-table.sql")}
{:name "0085-add-webhook-table"
:fn (mg/resource "app/migrations/sql/0085-add-webhook-table.sql")}
{:name "0086-add-webhook-delivery-table"
:fn (mg/resource "app/migrations/sql/0086-add-webhook-delivery-table.sql")}
{:name "0087-mod-task-table"
:fn (mg/resource "app/migrations/sql/0087-mod-task-table.sql")}
{:name "0088-mod-team-profile-rel-table"
:fn (mg/resource "app/migrations/sql/0088-mod-team-profile-rel-table.sql")}
{:name "0089-mod-project-profile-rel-table"
:fn (mg/resource "app/migrations/sql/0089-mod-project-profile-rel-table.sql")}
{:name "0090-mod-http-session-table"
:fn (mg/resource "app/migrations/sql/0090-mod-http-session-table.sql")}
{:name "0091-mod-team-project-profile-rel-table"
:fn (mg/resource "app/migrations/sql/0091-mod-team-project-profile-rel-table.sql")}
{:name "0092-mod-team-invitation-table"
:fn (mg/resource "app/migrations/sql/0092-mod-team-invitation-table.sql")}
{:name "0093-del-file-share-tokens-table"
:fn (mg/resource "app/migrations/sql/0093-del-file-share-tokens-table.sql")}
{:name "0094-del-profile-attr-table"
:fn (mg/resource "app/migrations/sql/0094-del-profile-attr-table.sql")}
{:name "0095-del-storage-data-table"
:fn (mg/resource "app/migrations/sql/0095-del-storage-data-table.sql")}
{:name "0096-del-storage-pending-table"
:fn (mg/resource "app/migrations/sql/0096-del-storage-pending-table.sql")}
{:name "0098-add-quotes-table"
:fn (mg/resource "app/migrations/sql/0098-add-quotes-table.sql")}
{:name "0099-add-access-token-table"
:fn (mg/resource "app/migrations/sql/0099-add-access-token-table.sql")}
{:name "0100-mod-profile-indexes"
:fn (mg/resource "app/migrations/sql/0100-mod-profile-indexes.sql")}
{:name "0101-mod-server-error-report-table"
:fn (mg/resource "app/migrations/sql/0101-mod-server-error-report-table.sql")}
])
(defn apply-migrations!
[pool name migrations]
(dm/with-open [conn (db/open pool)]
(mg/setup! conn)
(mg/migrate! conn {:name name :steps migrations})))
(defmethod ig/pre-init-spec ::migrations
[_]
(s/keys :req [::db/pool]))
(defmethod ig/init-key ::migrations
[module {:keys [::db/pool]}]
(when-not (db/read-only? pool)
(l/info :hint "running migrations" :module module)
(some->> (seq migrations) (apply-migrations! pool "main"))))

View File

@@ -0,0 +1,11 @@
ALTER INDEX team_font_variant_deleted_at_idx
RENAME TO team_font_variant__deleted_at__idx;
ALTER INDEX team_deleted_at_idx
RENAME TO team__deleted_at__idx;
ALTER INDEX profile_deleted_at_idx
RENAME TO profile__deleted_at__idx;
ALTER INDEX project_deleted_at_idx
RENAME TO project__deleted_at__idx;

View File

@@ -0,0 +1,3 @@
CREATE INDEX file__deleted_at__idx
ON file (deleted_at, id)
WHERE deleted_at IS NOT NULL;

View File

@@ -0,0 +1,2 @@
ALTER TABLE file
ADD COLUMN features text[] DEFAULT NULL;

View File

@@ -0,0 +1,15 @@
CREATE TABLE file_data_fragment (
id uuid NOT NULL,
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE DEFERRABLE,
created_at timestamptz NOT NULL DEFAULT now(),
metadata jsonb NULL,
content bytea NOT NULL,
PRIMARY KEY (file_id, id)
);
ALTER TABLE file_data_fragment
ALTER COLUMN metadata SET STORAGE external,
ALTER COLUMN content SET STORAGE external;

View File

@@ -0,0 +1,8 @@
ALTER TABLE file_change
ADD COLUMN features text[] DEFAULT NULL;
ALTER TABLE file_change
ALTER COLUMN features SET STORAGE external;
ALTER TABLE file
ALTER COLUMN features SET STORAGE external;

View File

@@ -0,0 +1,25 @@
CREATE TABLE webhook (
id uuid PRIMARY KEY,
team_id uuid NOT NULL REFERENCES team(id) ON DELETE CASCADE DEFERRABLE,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
uri text NOT NULL,
mtype text NOT NULL,
error_code text NULL,
error_count smallint DEFAULT 0,
is_active boolean DEFAULT true,
secret_key text NULL
);
ALTER TABLE webhook
ALTER COLUMN uri SET STORAGE external,
ALTER COLUMN mtype SET STORAGE external,
ALTER COLUMN error_code SET STORAGE external,
ALTER COLUMN secret_key SET STORAGE external;
CREATE INDEX webhook__team_id__idx ON webhook (team_id);

View File

@@ -0,0 +1,16 @@
CREATE TABLE webhook_delivery (
webhook_id uuid NOT NULL REFERENCES webhook(id) ON DELETE CASCADE DEFERRABLE,
created_at timestamptz NOT NULL DEFAULT now(),
error_code text NULL,
req_data jsonb NULL,
rsp_data jsonb NULL,
PRIMARY KEY (webhook_id, created_at)
);
ALTER TABLE webhook_delivery
ALTER COLUMN error_code SET STORAGE external,
ALTER COLUMN req_data SET STORAGE external,
ALTER COLUMN rsp_data SET STORAGE external;

View File

@@ -0,0 +1,9 @@
ALTER TABLE task
ADD COLUMN label text NULL;
ALTER TABLE task
ALTER COLUMN label SET STORAGE external;
CREATE INDEX task__label__idx
ON task (label, name, queue)
WHERE status = 'new';

View File

@@ -0,0 +1,3 @@
ALTER TABLE team_profile_rel DROP CONSTRAINT team_profile_rel_pkey;
ALTER TABLE team_profile_rel ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY KEY;
ALTER TABLE team_profile_rel ADD CONSTRAINT team_profile_rel_unique UNIQUE (team_id, profile_id);

View File

@@ -0,0 +1,3 @@
ALTER TABLE project_profile_rel DROP CONSTRAINT project_profile_rel_pkey;
ALTER TABLE project_profile_rel ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY KEY;
ALTER TABLE project_profile_rel ADD CONSTRAINT project_profile_rel_unique UNIQUE (project_id, profile_id);

View File

@@ -0,0 +1,2 @@
ALTER TABLE http_session DROP CONSTRAINT http_session_pkey;
ALTER TABLE http_session ADD CONSTRAINT http_session_pkey PRIMARY KEY (id);

View File

@@ -0,0 +1,3 @@
ALTER TABLE team_project_profile_rel DROP CONSTRAINT team_project_profile_rel_pkey;
ALTER TABLE team_project_profile_rel ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY KEY;
ALTER TABLE team_project_profile_rel ADD CONSTRAINT team_project_profile_rel_unique UNIQUE (team_id, project_id, profile_id);

View File

@@ -0,0 +1,3 @@
ALTER TABLE team_invitation DROP CONSTRAINT team_invitation_pkey;
ALTER TABLE team_invitation ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY KEY;
ALTER TABLE team_invitation ADD CONSTRAINT team_invitation_unique UNIQUE (team_id, email_to);

View File

@@ -0,0 +1 @@
DROP TABLE file_share_token;

View File

@@ -0,0 +1 @@
DROP TABLE profile_attr;

View File

@@ -0,0 +1 @@
DROP TABLE storage_data;

View File

@@ -0,0 +1 @@
DROP TABLE storage_pending;

View File

@@ -0,0 +1,82 @@
CREATE TABLE usage_quote (
id uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
target text NOT NULL,
quote bigint NOT NULL,
profile_id uuid NULL REFERENCES profile(id) ON DELETE CASCADE DEFERRABLE,
project_id uuid NULL REFERENCES project(id) ON DELETE CASCADE DEFERRABLE,
team_id uuid NULL REFERENCES team(id) ON DELETE CASCADE DEFERRABLE,
file_id uuid NULL REFERENCES file(id) ON DELETE CASCADE DEFERRABLE
);
ALTER TABLE usage_quote
ALTER COLUMN target SET STORAGE external;
CREATE INDEX usage_quote__profile_id__idx ON usage_quote(profile_id, target);
CREATE INDEX usage_quote__project_id__idx ON usage_quote(project_id, target);
CREATE INDEX usage_quote__team_id__idx ON usage_quote(team_id, target);
-- DROP TABLE IF EXISTS usage_quote_test;
-- CREATE TABLE usage_quote_test (
-- id bigserial NOT NULL PRIMARY KEY,
-- target text NOT NULL,
-- quote bigint NOT NULL,
-- profile_id bigint NULL,
-- team_id bigint NULL,
-- project_id bigint NULL,
-- file_id bigint NULL
-- );
-- ALTER TABLE usage_quote_test
-- ALTER COLUMN target SET STORAGE external;
-- CREATE INDEX usage_quote_test__profile_id__idx ON usage_quote_test(profile_id, target);
-- CREATE INDEX usage_quote_test__project_id__idx ON usage_quote_test(project_id, target);
-- CREATE INDEX usage_quote_test__team_id__idx ON usage_quote_test(team_id, target);
-- -- CREATE INDEX usage_quote_test__target__idx ON usage_quote_test(target);
-- DELETE FROM usage_quote_test;
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 50*RANDOM(), 2000*RANDOM(), null, null
-- FROM generate_series(1, 5000);
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 200*RANDOM(), 300*RANDOM(), 300*RANDOM(), null
-- FROM generate_series(1, 1000);
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 100*RANDOM(), 300*RANDOM(), null, 300*RANDOM()
-- FROM generate_series(1, 1000);
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 100*RANDOM(), 300*RANDOM(), 300*RANDOM(), 300*RANDOM()
-- FROM generate_series(1, 1000);
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 30*RANDOM(), null, 2000*RANDOM(), null
-- FROM generate_series(1, 5000);
-- INSERT INTO usage_quote_test (target, quote, profile_id, team_id, project_id)
-- SELECT 'files-per-project', 10*RANDOM(), null, null, 2000*RANDOM()
-- FROM generate_series(1, 5000);
-- VACUUM ANALYZE usage_quote_test;
-- select * from usage_quote_test
-- where target = 'files-per-project'
-- and profile_id = 1
-- and team_id is null
-- and project_id is null;
-- select * from usage_quote_test
-- where target = 'files-per-project'
-- and ((team_id = 1 and (profile_id = 1 or profile_id is null)) or
-- (profile_id = 1 and team_id is null and project_id is null));
-- select * from usage_quote_test
-- where target = 'files-per-project'
-- and ((project_id = 1 and (profile_id = 1 or profile_id is null)) or
-- (team_id = 1 and (profile_id = 1 or profile_id is null)) or
-- (profile_id = 1 and team_id is null and project_id is null));

View File

@@ -0,0 +1,19 @@
DROP TABLE IF EXISTS access_token;
CREATE TABLE access_token (
id uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
profile_id uuid NOT NULL REFERENCES profile(id) ON DELETE CASCADE DEFERRABLE,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
name text NOT NULL,
token text NOT NULL,
perms text[] NULL
);
ALTER TABLE access_token
ALTER COLUMN name SET STORAGE external,
ALTER COLUMN token SET STORAGE external,
ALTER COLUMN perms SET STORAGE external;
CREATE INDEX access_token__profile_id__idx ON access_token(profile_id);

View File

@@ -0,0 +1,31 @@
ALTER TABLE profile
ADD COLUMN default_project_id uuid NULL REFERENCES project(id) ON DELETE SET NULL DEFERRABLE,
ADD COLUMN default_team_id uuid NULL REFERENCES team(id) ON DELETE SET NULL DEFERRABLE;
CREATE INDEX profile__default_project__idx ON profile(default_project_id);
CREATE INDEX profile__default_team__idx ON profile(default_team_id);
with profiles as (
select p.id,
tpr.team_id as default_team_id,
ppr.project_id as default_project_id
from profile as p
join team_profile_rel as tpr
on (tpr.profile_id = p.id and
tpr.is_owner is true)
join project_profile_rel as ppr
on (ppr.profile_id = p.id and
ppr.is_owner is true)
join project as pj
on (pj.id = ppr.project_id)
join team as tm
on (tm.id = tpr.team_id)
where pj.is_default is true
and tm.is_default is true
and pj.team_id = tm.id
)
update profile
set default_team_id = p.default_team_id,
default_project_id = p.default_project_id
from profiles as p
where profile.id = p.id;

View File

@@ -0,0 +1,2 @@
ALTER TABLE server_error_report
ADD COLUMN version integer DEFAULT 1;

View File

@@ -20,7 +20,8 @@
[clojure.core.async :as a]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[promesa.core :as p]))
[promesa.core :as p]
[promesa.exec :as px]))
(set! *warn-on-reflection* true)
@@ -52,8 +53,8 @@
(s/def ::rcv-ch ::aa/channel)
(s/def ::pub-ch ::aa/channel)
(s/def ::state ::us/agent)
(s/def ::pconn ::redis/connection)
(s/def ::sconn ::redis/connection)
(s/def ::pconn ::redis/connection-holder)
(s/def ::sconn ::redis/connection-holder)
(s/def ::msgbus
(s/keys :req [::cmd-ch ::rcv-ch ::pub-ch ::state ::pconn ::sconn ::wrk/executor]))
@@ -78,7 +79,7 @@
(us/verify! ::msgbus msgbus)
(set-error-handler! state #(l/error :cause % :hint "unexpected error on agent" ::l/async false))
(set-error-handler! state #(l/error :cause % :hint "unexpected error on agent" ::l/sync? true))
(set-error-mode! state :continue)
(start-io-loop! msgbus)
@@ -122,8 +123,8 @@
(defn- redis-disconnect
[{:keys [::pconn ::sconn] :as cfg}]
(redis/close! pconn)
(redis/close! sconn))
(d/close! pconn)
(d/close! sconn))
(defn- conj-subscription
"A low level function that is responsible to create on-demand
@@ -132,18 +133,18 @@
[nsubs cfg topic chan]
(let [nsubs (if (nil? nsubs) #{chan} (conj nsubs chan))]
(when (= 1 (count nsubs))
(l/trace :hint "open subscription" :topic topic ::l/async false)
(l/trace :hint "open subscription" :topic topic ::l/sync? true)
(redis-sub cfg topic))
nsubs))
(defn- disj-subscription
"A low level function responsible on removing subscriptions. The
subscription is trully removed from redis once no single local
subscription is truly removed from redis once no single local
subscription is look for it. Intended to be executed in agent."
[nsubs cfg topic chan]
(let [nsubs (disj nsubs chan)]
(when (empty? nsubs)
(l/trace :hint "close subscription" :topic topic ::l/async false)
(l/trace :hint "close subscription" :topic topic ::l/sync? true)
(redis-unsub cfg topic))
nsubs))
@@ -159,7 +160,7 @@
topics))))
(defn- unsubscribe-single-channel
"Auxiliar function responsible on removing a single local
"Auxiliary function responsible on removing a single local
subscription from the state."
[state cfg chan]
(let [topics (get-in state [:chans chan])
@@ -205,31 +206,33 @@
(when-let [closed (a/<! (send-to-topic topic message))]
(send-via executor state unsubscribe-channels cfg closed nil))))
]
(px/thread
{:name "penpot/msgbus-io-loop"}
(loop []
(let [[val port] (a/alts!! [pub-ch rcv-ch])]
(cond
(nil? val)
(do
(l/trace :hint "stopping io-loop, nil received")
(send-via executor state (fn [state]
(->> (vals state)
(mapcat identity)
(filter some?)
(run! a/close!))
nil)))
(a/go-loop []
(let [[val port] (a/alts! [pub-ch rcv-ch])]
(cond
(nil? val)
(do
(l/trace :hint "stoping io-loop, nil received")
(send-via executor state (fn [state]
(->> (vals state)
(mapcat identity)
(filter some?)
(run! a/close!))
nil)))
(= port rcv-ch)
(do
(a/<!! (process-incoming val))
(recur))
(= port rcv-ch)
(do
(a/<! (process-incoming val))
(recur))
(= port pub-ch)
(let [result (a/<! (redis-pub cfg val))]
(when (ex/exception? result)
(l/error :hint "unexpected error on publishing" :message val
:cause result))
(recur)))))))
(= port pub-ch)
(let [result (a/<!! (redis-pub cfg val))]
(when (ex/exception? result)
(l/error :hint "unexpected error on publishing"
:message val
:cause result))
(recur))))))))
(defn- redis-pub
"Publish a message to the redis server. Asynchronous operation,

Some files were not shown because too many files have changed in this diff Show More