Commit 012772d
RFC: pubOp for creating and updating pubs more easily (#965)
* feat: new fluent pub mutation api
* feat: add ability to replace pub relations
* feat: beautiful better implementation
* fix: cleanup a bit
* feat: allow to properly purge orphans
* fix: get rid of the concept of a pubId map and just pregenerate the ids
* chore: add some comments
* feat: add ability to move stages
* fix: update test
* feat: allow inline specification of pubops
+ cleanup of api
* refactor: rename override option to 'replaceExisting'
* test: add test for multiple relate
* fix: fix type issues
* refactor: add slightly better error handling
* fix: add back deletePubValuesByValueId
* fix: add back pubvalue upsert functions
* fix: sort pubvalues deeply for tests
* fix: fix tests and imports
* feat: make upsert override by default
* docs: add better documentation to orphan
* refactor: simplify createPub logic a bit
* chore: clean up
* fix: update matcher types
---------
Co-authored-by: Eric McDaniel <[email protected]>1 parent 40074da commit 012772d
File tree
22 files changed
+3112
-190
lines changed- core
- actions/_lib
- app
- api/v0/c/[communitySlug]/site/[...ts-rest]
- components/pubs/PubEditor
- lib
- __tests__
- server
- prisma/seed
- packages
- schemas
- utils
- src
22 files changed
+3112
-190
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
11 | 47 | | |
12 | 48 | | |
13 | 49 | | |
| |||
17 | 53 | | |
18 | 54 | | |
19 | 55 | | |
| 56 | + | |
| 57 | + | |
20 | 58 | | |
21 | 59 | | |
22 | 60 | | |
| |||
58 | 96 | | |
59 | 97 | | |
60 | 98 | | |
| 99 | + | |
61 | 100 | | |
62 | 101 | | |
63 | 102 | | |
| |||
79 | 118 | | |
80 | 119 | | |
81 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
82 | 124 | | |
83 | 125 | | |
84 | 126 | | |
| |||
87 | 129 | | |
88 | 130 | | |
89 | 131 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 132 | | |
97 | 133 | | |
98 | 134 | | |
| |||
110 | 146 | | |
111 | 147 | | |
112 | 148 | | |
| 149 | + | |
113 | 150 | | |
114 | 151 | | |
115 | 152 | | |
116 | 153 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 154 | | |
123 | 155 | | |
124 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments