Commit Graph

2274 Commits

Author SHA1 Message Date
Brainslug
0d56357475 Sort is set to NULL for new items (#15241)
* Fix sort field assignment in relationships

* fixed a merge error

* add sort logic to API

* using isNil for a more concise condition expression

* Removed the custom getSortMax function in favor of Math.max

* increment sort value accordingly for bulk creates

* make reordering sort start with 1 instead of 0

* account for bulk create in API side

* removed the redundant frontend sorting code

* reverted change from pr #14987

* updated selectedOnPage to support both item duplication and sorting

* Revert "account for bulk create in API side"

This reverts commit b37ed207f3.

* re-add bulk create increment sort logic

* prevent sending "+" as primary key for newly created relational items (#15353)

* re-add the removed new line as it felt odd

* ensure sql query fires once only

* fix return value

* use `.max()`

Co-authored-by: André Gaul <andre@gaul.io>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-09-02 15:58:30 -04:00
Rijk van Zanten
0de05b40a7 Don't reset body on singleton non-SEARCH reqs (#15369)
Fixes #15364
2022-09-02 11:11:52 -04:00
ian
d29c2dfc3f Fix lint warnings (#15358) 2022-09-02 00:08:23 -04:00
Nicola Krumschmidt
38fb314950 Do not parse json in transform operation if it is already an object (#15354)
Fixes #14814
2022-09-01 15:42:32 -04:00
Sébastien JEAN
99f38285fd Implement query hook (#10551)
* Implement query hook

* Only run hook if events aren't explicitly skipped

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-31 18:08:06 +00:00
Rijk van Zanten
f17b96cf3b Reduce overengineering on async-handler (#15340) 2022-08-31 12:17:53 -04:00
Rijk van Zanten
1f66049c42 Fix SEARCH query not functioning on singleton collections (#15339)
* Don't short-circuit on batch read singletons in search methods

* Add tests

100% babyyyyyyy

* Cleanup middleware
2022-08-31 11:59:03 -04:00
ian
f3b6e5ee9d Remove functions from non-read actions in GraphQL types (#15251) 2022-08-30 17:22:23 -04:00
Rijk van Zanten
1619c03767 Allow setting SMTP name (#15327)
Fixes #15294
2022-08-30 15:14:13 -04:00
ian
2c22940574 Throw rejected error for filter event in Flows (#15283)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-30 15:05:07 -04:00
nazarevrn
9c55ed6728 Make threshold checks configurable (#15284)
* Make threshold checks configurable

* Fix linter

Co-authored-by: Roman Nazarev <roman.nazarev@skyeng.ru>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-30 14:41:26 -04:00
ian
a971455216 Add origin to accountability (#15273)
* Add origin to accountability

* Remove origin column from seeds
2022-08-30 14:15:44 -04:00
Brainslug
a91e96d6d1 Moved CORS headers before the JSON body is parsed (#15308) 2022-08-30 10:11:45 -04:00
ian
92b54c4d09 Use encodeurl package to escape URLs for axios (#15257)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-29 15:05:29 -04:00
John Flow
5e8137367b Added COOKIE_OPTIONS to /refresh (#15302)
* Added COOKIE_OPTIONS to /refresh

* Remove unused import

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-28 15:53:05 -04:00
tenebrius
a98a83b5da Update node-cron to 3.0.2 (#15234)
* Update node-cron to 3.0.2

* Update lockfile accordingly

* Fix lockfile resolution

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-25 18:46:10 -04:00
Pascal Jufer
93954af2e2 Add new flow env to allowed list & remove comment leftover (#15268) 2022-08-25 14:11:52 -04:00
ian
05d05f2cb8 Return empty array if scope is not defined (#15228)
* Return empty array if scope is not defined

* Add empty event trigger text when option is removed
2022-08-24 17:34:04 -04:00
ian
f64e1d36d3 Expose login stall time environment variable (#15215)
* Expose login stall time environment variable

* Update env stub template

* Update description

* Increase default stall time to 500ms
2022-08-24 16:52:23 -04:00
Nicola Krumschmidt
4150315a85 Update watched extensions when enabling watcher (#15209)
This fixes watching for package extensions.
2022-08-22 12:30:03 -04:00
rijkvanzanten
f21f8c4707 v9.16.1 2022-08-19 09:13:10 -04:00
rijkvanzanten
58f6a6fcde v9.16.0 2022-08-18 16:55:44 -04:00
ian
73fa8d66ac Emit nested action events after the transaction completes (#14981)
* Emit nested action events after the transaction completes

* Propagate mutation options for the disabling of nested emits

* Disable emit in test

* Shift emitting
2022-08-18 16:07:33 -04:00
José Varela
63b667e45d API: Bypass cache for /server/ping (#15149)
* Bypass schema cache

* Bypass request cache

* Short-circuit on ping calls

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-18 16:04:45 -04:00
Azri Kahar
ad97b309cd Allow array of user IDs for Notify operation (#14694)
* Allow array of user IDs for Notify operation

* Update app/src/operations/notification/index.ts

* use csv for all tags interfaces in Flow operations
2022-08-18 15:39:51 -04:00
Rijk van Zanten
a21b28b423 Add "Run Script" operation (#15101)
* [WIP] Start working on script operation

* WIP Remove npx-import experiment

* Don't break on string value in options scope

* WIP Add module whitelist

* Mission critical import cleanup work

* Add translated labels

* Use nodeVM for everything

Keeps the export function callback structure consistent

* Tweak wording

* WIP start on tests

* Improve typing in shared define types

* Add missing base reactive properties in server store

* Add tests for exec index in app

* Add tests

* Optimize error handling
2022-08-18 15:39:25 -04:00
Rijk van Zanten
19ddd89d8d Move unit tests to files they apply to (#15130)
* Move unit tests to files they apply to

* Remove tests root
2022-08-17 16:01:16 -04:00
ian
f8ea4fdcd2 Remove limit when loading flows (#15106) 2022-08-17 11:41:04 -04:00
ian
24b49a9662 Remove usage of .send() when ending stream (#15097) 2022-08-16 14:35:47 -04:00
Azri Kahar
8559d37df5 Add messenger env variables to allow list (#15081) 2022-08-16 11:52:59 -04:00
Azri Kahar
e255bf80e4 Fix schema apply when deleting interrelated collections (#15072)
* Fix apply when deleting interrelated collections

* test

* fix unit test

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-16 11:30:42 -04:00
Azri Kahar
91a36120fa fix operations foreign key errors on Flow deletion (#15087) 2022-08-16 11:00:01 -04:00
José Varela
5087fcd1e4 Graphql: Fix geometry type in arguments (#15050)
* Handle matrixes as args
This was the less intrusive way I figure out.
We may need to refactor this parseArgs properly in order to handle this types

* App/Graphql: Send filter query as proper JSON instead of escaped string

* Make panel variables readonly when no-editing
Prevents Geometry type mismatch error

* Fix proper way to parse args
2022-08-15 09:58:43 -04:00
Rijk van Zanten
6d08672c88 Update knex-schema-inspector to 2.0.4 (#15047) 2022-08-12 11:02:17 -04:00
Azri Kahar
8fc7218c55 Add Content-Type header when applicable (#15029) 2022-08-11 11:23:16 -04:00
ian
3586409a0b Only allow null filter operators for fields with "conceal" special (#15010)
* Only allow null filter operators for fields with "conceal" special

* Add tests

* Use GraphQLHash type for fields with "conceal" special

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-10 11:19:04 -04:00
ian
d29536208c Encode webhook url only if it does not contain encoded values (#15009) 2022-08-10 10:17:27 -04:00
ian
0fd492cdd2 Send error status only if no data is written (#15007) 2022-08-10 09:28:08 -04:00
Azri Kahar
59b62d4655 Fix macos-release error in server info (#14840) 2022-08-05 16:53:33 -04:00
Bjørnar Hagen
3757167d4b Fix duplicate env keys (#14845) 2022-08-05 16:34:25 -04:00
ian
2a5314f753 Encode file import url if not already encoded (#14854) 2022-08-05 15:21:24 -04:00
rijkvanzanten
1ebda96a69 v9.15.1 2022-08-05 14:50:06 -04:00
ian
62a19b40d5 Fix filter type check for functions (#14885)
* Fix filter type check for functions

* Use stripFunction util

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-05 11:56:22 -04:00
rijkvanzanten
3270df00c1 9.15.0 2022-08-04 18:19:19 -04:00
José Varela
cc343fdf91 Improve cache performance by compressing records (#14833)
* Utils to compress/decompress data
Gzip was chosen because we want smaller data but quick algorithm since this will be ran for every request

* Compress system cache

* Decompress system cache

* Set/Get compressed cache for individual requests

* Switch from gzip to snappy, use json compression too

* Fix cache exp set/get

* Remove unused import

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-08-04 17:35:27 -04:00
ian
3dedf1cb3f Check for allowed filter operators when applying filter (#14829)
* Check for allowed filter operators when applying filter

* Add hash type to GraphQL

* Add tests

* Specify text type
2022-08-03 14:14:19 -04:00
Azri Kahar
5d96d752f4 Support custom aspect ratios in image editor (#14786)
* Support custom aspect ratios in image editor

* Add custom aspect ratios in file items as well

* Revert file item custom-aspect-ratio changes

* Use globally configured custom aspect ratios

* Remove previos custom-aspect-ratio logic

* code style tweak

* use migration instead of seed

* rename field to custom_aspect_ratios

* keep defaults + change icon

Co-authored-by: qborisb <boris@qdentity.nl>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-08-03 22:25:25 +08:00
Erick Torres
791854ab08 Move serializers option to the right place for pino-http (#14803) 2022-08-03 08:43:45 -04:00
rijkvanzanten
73d31b7c53 Fix location of head return call 2022-08-02 14:39:11 -04:00
rijkvanzanten
8085b0d788 Don't crash on invalid file storage paths 2022-08-02 13:21:44 -04:00