@rebasepro/server-core 0.0.1-canary.eae7889 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/app/frontend/node_modules/esbuild/LICENSE.md +21 -0
  2. package/app/frontend/node_modules/esbuild/README.md +3 -0
  3. package/app/frontend/node_modules/esbuild/bin/esbuild +220 -0
  4. package/app/frontend/node_modules/esbuild/install.js +285 -0
  5. package/app/frontend/node_modules/esbuild/lib/main.d.ts +705 -0
  6. package/app/frontend/node_modules/esbuild/lib/main.js +2239 -0
  7. package/app/frontend/node_modules/esbuild/package.json +46 -0
  8. package/dist/index.es.js +1186 -1673
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.umd.js +1185 -1672
  11. package/dist/index.umd.js.map +1 -1
  12. package/dist/server-core/src/api/rest/api-generator.d.ts +15 -3
  13. package/dist/server-core/src/auth/admin-routes.d.ts +5 -0
  14. package/dist/server-core/src/auth/google-oauth.d.ts +36 -3
  15. package/dist/server-core/src/auth/index.d.ts +1 -0
  16. package/dist/server-core/src/cron/cron-scheduler.d.ts +45 -0
  17. package/dist/server-core/src/cron/index.d.ts +1 -1
  18. package/dist/server-core/src/init.d.ts +11 -1
  19. package/dist/types/src/controllers/auth.d.ts +8 -2
  20. package/dist/types/src/controllers/client.d.ts +13 -0
  21. package/dist/types/src/controllers/collection_registry.d.ts +2 -1
  22. package/dist/types/src/controllers/data_driver.d.ts +36 -1
  23. package/dist/types/src/controllers/navigation.d.ts +18 -6
  24. package/dist/types/src/controllers/registry.d.ts +9 -1
  25. package/dist/types/src/controllers/side_entity_controller.d.ts +7 -0
  26. package/dist/types/src/rebase_context.d.ts +17 -0
  27. package/dist/types/src/types/backend_hooks.d.ts +187 -0
  28. package/dist/types/src/types/collections.d.ts +31 -11
  29. package/dist/types/src/types/component_ref.d.ts +47 -0
  30. package/dist/types/src/types/cron.d.ts +1 -1
  31. package/dist/types/src/types/entity_views.d.ts +6 -7
  32. package/dist/types/src/types/formex.d.ts +40 -0
  33. package/dist/types/src/types/index.d.ts +3 -0
  34. package/dist/types/src/types/plugins.d.ts +6 -3
  35. package/dist/types/src/types/properties.d.ts +72 -88
  36. package/dist/types/src/types/slots.d.ts +20 -10
  37. package/dist/types/src/types/translations.d.ts +6 -0
  38. package/examples/firebase/node_modules/esbuild/LICENSE.md +21 -0
  39. package/examples/firebase/node_modules/esbuild/README.md +3 -0
  40. package/examples/firebase/node_modules/esbuild/bin/esbuild +220 -0
  41. package/examples/firebase/node_modules/esbuild/install.js +285 -0
  42. package/examples/firebase/node_modules/esbuild/lib/main.d.ts +705 -0
  43. package/examples/firebase/node_modules/esbuild/lib/main.js +2239 -0
  44. package/examples/firebase/node_modules/esbuild/package.json +46 -0
  45. package/examples/medmot-staging/frontend/node_modules/esbuild/LICENSE.md +21 -0
  46. package/examples/medmot-staging/frontend/node_modules/esbuild/README.md +3 -0
  47. package/examples/medmot-staging/frontend/node_modules/esbuild/bin/esbuild +220 -0
  48. package/examples/medmot-staging/frontend/node_modules/esbuild/install.js +285 -0
  49. package/examples/medmot-staging/frontend/node_modules/esbuild/lib/main.d.ts +705 -0
  50. package/examples/medmot-staging/frontend/node_modules/esbuild/lib/main.js +2239 -0
  51. package/examples/medmot-staging/frontend/node_modules/esbuild/package.json +46 -0
  52. package/examples/sdk-demo/node_modules/esbuild/LICENSE.md +21 -0
  53. package/examples/sdk-demo/node_modules/esbuild/README.md +3 -0
  54. package/examples/sdk-demo/node_modules/esbuild/bin/esbuild +223 -0
  55. package/examples/sdk-demo/node_modules/esbuild/install.js +289 -0
  56. package/examples/sdk-demo/node_modules/esbuild/lib/main.d.ts +716 -0
  57. package/examples/sdk-demo/node_modules/esbuild/lib/main.js +2242 -0
  58. package/examples/sdk-demo/node_modules/esbuild/package.json +49 -0
  59. package/package.json +9 -9
  60. package/packages/client/node_modules/esbuild/LICENSE.md +21 -0
  61. package/packages/client/node_modules/esbuild/README.md +3 -0
  62. package/packages/client/node_modules/esbuild/bin/esbuild +220 -0
  63. package/packages/client/node_modules/esbuild/install.js +285 -0
  64. package/packages/client/node_modules/esbuild/lib/main.d.ts +705 -0
  65. package/packages/client/node_modules/esbuild/lib/main.js +2239 -0
  66. package/packages/client/node_modules/esbuild/package.json +46 -0
  67. package/packages/client-postgresql/node_modules/esbuild/LICENSE.md +21 -0
  68. package/packages/client-postgresql/node_modules/esbuild/README.md +3 -0
  69. package/packages/client-postgresql/node_modules/esbuild/bin/esbuild +220 -0
  70. package/packages/client-postgresql/node_modules/esbuild/install.js +285 -0
  71. package/packages/client-postgresql/node_modules/esbuild/lib/main.d.ts +705 -0
  72. package/packages/client-postgresql/node_modules/esbuild/lib/main.js +2239 -0
  73. package/packages/client-postgresql/node_modules/esbuild/package.json +46 -0
  74. package/packages/common/node_modules/esbuild/LICENSE.md +21 -0
  75. package/packages/common/node_modules/esbuild/README.md +3 -0
  76. package/packages/common/node_modules/esbuild/bin/esbuild +220 -0
  77. package/packages/common/node_modules/esbuild/install.js +285 -0
  78. package/packages/common/node_modules/esbuild/lib/main.d.ts +705 -0
  79. package/packages/common/node_modules/esbuild/lib/main.js +2239 -0
  80. package/packages/common/node_modules/esbuild/package.json +46 -0
  81. package/packages/server-mongodb/node_modules/esbuild/LICENSE.md +21 -0
  82. package/packages/server-mongodb/node_modules/esbuild/README.md +3 -0
  83. package/packages/server-mongodb/node_modules/esbuild/bin/esbuild +220 -0
  84. package/packages/server-mongodb/node_modules/esbuild/install.js +285 -0
  85. package/packages/server-mongodb/node_modules/esbuild/lib/main.d.ts +705 -0
  86. package/packages/server-mongodb/node_modules/esbuild/lib/main.js +2239 -0
  87. package/packages/server-mongodb/node_modules/esbuild/package.json +46 -0
  88. package/packages/server-postgresql/node_modules/esbuild/LICENSE.md +21 -0
  89. package/packages/server-postgresql/node_modules/esbuild/README.md +3 -0
  90. package/packages/server-postgresql/node_modules/esbuild/bin/esbuild +220 -0
  91. package/packages/server-postgresql/node_modules/esbuild/install.js +285 -0
  92. package/packages/server-postgresql/node_modules/esbuild/lib/main.d.ts +705 -0
  93. package/packages/server-postgresql/node_modules/esbuild/lib/main.js +2239 -0
  94. package/packages/server-postgresql/node_modules/esbuild/package.json +46 -0
  95. package/packages/types/node_modules/esbuild/LICENSE.md +21 -0
  96. package/packages/types/node_modules/esbuild/README.md +3 -0
  97. package/packages/types/node_modules/esbuild/bin/esbuild +220 -0
  98. package/packages/types/node_modules/esbuild/install.js +285 -0
  99. package/packages/types/node_modules/esbuild/lib/main.d.ts +705 -0
  100. package/packages/types/node_modules/esbuild/lib/main.js +2239 -0
  101. package/packages/types/node_modules/esbuild/package.json +46 -0
  102. package/packages/utils/node_modules/esbuild/LICENSE.md +21 -0
  103. package/packages/utils/node_modules/esbuild/README.md +3 -0
  104. package/packages/utils/node_modules/esbuild/bin/esbuild +220 -0
  105. package/packages/utils/node_modules/esbuild/install.js +285 -0
  106. package/packages/utils/node_modules/esbuild/lib/main.d.ts +705 -0
  107. package/packages/utils/node_modules/esbuild/lib/main.js +2239 -0
  108. package/packages/utils/node_modules/esbuild/package.json +46 -0
  109. package/src/api/errors.ts +3 -2
  110. package/src/api/rest/api-generator-count.test.ts +113 -0
  111. package/src/api/rest/api-generator.ts +123 -22
  112. package/src/api/server.ts +8 -4
  113. package/src/auth/admin-routes.ts +133 -57
  114. package/src/auth/apple-oauth.ts +8 -18
  115. package/src/auth/google-oauth.ts +192 -22
  116. package/src/auth/index.ts +1 -0
  117. package/src/auth/rate-limiter.ts +9 -5
  118. package/src/auth/routes.ts +25 -5
  119. package/src/collections/loader.ts +3 -3
  120. package/src/cron/cron-scheduler.test.ts +301 -175
  121. package/src/cron/cron-scheduler.ts +220 -57
  122. package/src/cron/index.ts +1 -1
  123. package/src/init.ts +27 -5
  124. package/src/storage/LocalStorageController.ts +37 -13
  125. package/src/storage/S3StorageController.ts +4 -1
  126. package/src/storage/routes.ts +51 -5
  127. package/test/backend-hooks-admin.test.ts +394 -0
  128. package/test/backend-hooks-data.test.ts +408 -0
  129. package/history_diff.log +0 -385
  130. package/scratch.ts +0 -9
  131. package/test-ast.ts +0 -28
  132. package/test_output.txt +0 -1133
package/history_diff.log DELETED
@@ -1,385 +0,0 @@
1
- [recordHistory: posts/1 - update]
2
- CHANGED FIELDS: null
3
- PREVIOUS: {
4
- "title": "same"
5
- }
6
- NEW: {
7
- "title": "same"
8
- }
9
-
10
- [recordHistory: posts/1 - update]
11
- CHANGED FIELDS: ["title","tags"]
12
- PREVIOUS: {
13
- "title": "old",
14
- "tags": [
15
- {
16
- "id": 1
17
- }
18
- ]
19
- }
20
- NEW: {
21
- "title": "new",
22
- "tags": [
23
- {
24
- "id": 2
25
- }
26
- ]
27
- }
28
-
29
- [recordHistory: posts/1 - create]
30
- CHANGED FIELDS: null
31
- PREVIOUS: undefined
32
- NEW: {
33
- "title": "new"
34
- }
35
-
36
- [recordHistory: posts/1 - update]
37
- CHANGED FIELDS: null
38
- PREVIOUS: {
39
- "title": "same"
40
- }
41
- NEW: {
42
- "title": "same"
43
- }
44
-
45
- [recordHistory: posts/1 - update]
46
- CHANGED FIELDS: ["title","tags"]
47
- PREVIOUS: {
48
- "title": "old",
49
- "tags": [
50
- {
51
- "id": 1
52
- }
53
- ]
54
- }
55
- NEW: {
56
- "title": "new",
57
- "tags": [
58
- {
59
- "id": 2
60
- }
61
- ]
62
- }
63
-
64
- [recordHistory: posts/1 - create]
65
- CHANGED FIELDS: null
66
- PREVIOUS: undefined
67
- NEW: {
68
- "title": "new"
69
- }
70
-
71
- [recordHistory: posts/1 - update]
72
- CHANGED FIELDS: null
73
- PREVIOUS: {
74
- "title": "same"
75
- }
76
- NEW: {
77
- "title": "same"
78
- }
79
-
80
- [recordHistory: posts/1 - update]
81
- CHANGED FIELDS: ["title","tags"]
82
- PREVIOUS: {
83
- "title": "old",
84
- "tags": [
85
- {
86
- "id": 1
87
- }
88
- ]
89
- }
90
- NEW: {
91
- "title": "new",
92
- "tags": [
93
- {
94
- "id": 2
95
- }
96
- ]
97
- }
98
-
99
- [recordHistory: posts/1 - create]
100
- CHANGED FIELDS: null
101
- PREVIOUS: undefined
102
- NEW: {
103
- "title": "new"
104
- }
105
-
106
- [recordHistory: posts/1 - update]
107
- CHANGED FIELDS: null
108
- PREVIOUS: {
109
- "title": "same"
110
- }
111
- NEW: {
112
- "title": "same"
113
- }
114
-
115
- [recordHistory: posts/1 - update]
116
- CHANGED FIELDS: ["title","tags"]
117
- PREVIOUS: {
118
- "title": "old",
119
- "tags": [
120
- {
121
- "id": 1
122
- }
123
- ]
124
- }
125
- NEW: {
126
- "title": "new",
127
- "tags": [
128
- {
129
- "id": 2
130
- }
131
- ]
132
- }
133
-
134
- [recordHistory: posts/1 - create]
135
- CHANGED FIELDS: null
136
- PREVIOUS: undefined
137
- NEW: {
138
- "title": "new"
139
- }
140
-
141
- [recordHistory: posts/1 - update]
142
- CHANGED FIELDS: null
143
- PREVIOUS: {
144
- "title": "same"
145
- }
146
- NEW: {
147
- "title": "same"
148
- }
149
-
150
- [recordHistory: posts/1 - update]
151
- CHANGED FIELDS: ["title","tags"]
152
- PREVIOUS: {
153
- "title": "old",
154
- "tags": [
155
- {
156
- "id": 1
157
- }
158
- ]
159
- }
160
- NEW: {
161
- "title": "new",
162
- "tags": [
163
- {
164
- "id": 2
165
- }
166
- ]
167
- }
168
-
169
- [recordHistory: posts/1 - create]
170
- CHANGED FIELDS: null
171
- PREVIOUS: undefined
172
- NEW: {
173
- "title": "new"
174
- }
175
-
176
- [recordHistory: posts/1 - update]
177
- CHANGED FIELDS: null
178
- PREVIOUS: {
179
- "title": "same"
180
- }
181
- NEW: {
182
- "title": "same"
183
- }
184
-
185
- [recordHistory: posts/1 - update]
186
- CHANGED FIELDS: ["title","tags"]
187
- PREVIOUS: {
188
- "title": "old",
189
- "tags": [
190
- {
191
- "id": 1
192
- }
193
- ]
194
- }
195
- NEW: {
196
- "title": "new",
197
- "tags": [
198
- {
199
- "id": 2
200
- }
201
- ]
202
- }
203
-
204
- [recordHistory: posts/1 - create]
205
- CHANGED FIELDS: null
206
- PREVIOUS: undefined
207
- NEW: {
208
- "title": "new"
209
- }
210
-
211
- [recordHistory: posts/1 - update]
212
- CHANGED FIELDS: null
213
- PREVIOUS: {
214
- "title": "same"
215
- }
216
- NEW: {
217
- "title": "same"
218
- }
219
-
220
- [recordHistory: posts/1 - update]
221
- CHANGED FIELDS: ["title","tags"]
222
- PREVIOUS: {
223
- "title": "old",
224
- "tags": [
225
- {
226
- "id": 1
227
- }
228
- ]
229
- }
230
- NEW: {
231
- "title": "new",
232
- "tags": [
233
- {
234
- "id": 2
235
- }
236
- ]
237
- }
238
-
239
- [recordHistory: posts/1 - create]
240
- CHANGED FIELDS: null
241
- PREVIOUS: undefined
242
- NEW: {
243
- "title": "new"
244
- }
245
-
246
- [recordHistory: posts/1 - update]
247
- CHANGED FIELDS: null
248
- PREVIOUS: {
249
- "title": "same"
250
- }
251
- NEW: {
252
- "title": "same"
253
- }
254
-
255
- [recordHistory: posts/1 - update]
256
- CHANGED FIELDS: ["title","tags"]
257
- PREVIOUS: {
258
- "title": "old",
259
- "tags": [
260
- {
261
- "id": 1
262
- }
263
- ]
264
- }
265
- NEW: {
266
- "title": "new",
267
- "tags": [
268
- {
269
- "id": 2
270
- }
271
- ]
272
- }
273
-
274
- [recordHistory: posts/1 - create]
275
- CHANGED FIELDS: null
276
- PREVIOUS: undefined
277
- NEW: {
278
- "title": "new"
279
- }
280
-
281
- [recordHistory: posts/1 - update]
282
- CHANGED FIELDS: null
283
- PREVIOUS: {
284
- "title": "same"
285
- }
286
- NEW: {
287
- "title": "same"
288
- }
289
-
290
- [recordHistory: posts/1 - update]
291
- CHANGED FIELDS: ["title","tags"]
292
- PREVIOUS: {
293
- "title": "old",
294
- "tags": [
295
- {
296
- "id": 1
297
- }
298
- ]
299
- }
300
- NEW: {
301
- "title": "new",
302
- "tags": [
303
- {
304
- "id": 2
305
- }
306
- ]
307
- }
308
-
309
- [recordHistory: posts/1 - create]
310
- CHANGED FIELDS: null
311
- PREVIOUS: undefined
312
- NEW: {
313
- "title": "new"
314
- }
315
-
316
- [recordHistory: posts/1 - update]
317
- CHANGED FIELDS: null
318
- PREVIOUS: {
319
- "title": "same"
320
- }
321
- NEW: {
322
- "title": "same"
323
- }
324
-
325
- [recordHistory: posts/1 - update]
326
- CHANGED FIELDS: ["title","tags"]
327
- PREVIOUS: {
328
- "title": "old",
329
- "tags": [
330
- {
331
- "id": 1
332
- }
333
- ]
334
- }
335
- NEW: {
336
- "title": "new",
337
- "tags": [
338
- {
339
- "id": 2
340
- }
341
- ]
342
- }
343
-
344
- [recordHistory: posts/1 - create]
345
- CHANGED FIELDS: null
346
- PREVIOUS: undefined
347
- NEW: {
348
- "title": "new"
349
- }
350
-
351
- [recordHistory: posts/1 - update]
352
- CHANGED FIELDS: null
353
- PREVIOUS: {
354
- "title": "same"
355
- }
356
- NEW: {
357
- "title": "same"
358
- }
359
-
360
- [recordHistory: posts/1 - update]
361
- CHANGED FIELDS: ["title","tags"]
362
- PREVIOUS: {
363
- "title": "old",
364
- "tags": [
365
- {
366
- "id": 1
367
- }
368
- ]
369
- }
370
- NEW: {
371
- "title": "new",
372
- "tags": [
373
- {
374
- "id": 2
375
- }
376
- ]
377
- }
378
-
379
- [recordHistory: posts/1 - create]
380
- CHANGED FIELDS: null
381
- PREVIOUS: undefined
382
- NEW: {
383
- "title": "new"
384
- }
385
-
package/scratch.ts DELETED
@@ -1,9 +0,0 @@
1
- import { Hono } from "hono";
2
- const app = new Hono();
3
- const child = new Hono();
4
- child.get("/*", (c) => {
5
- return c.json({ star: c.req.param("*"),
6
- path: c.req.path });
7
- })
8
- app.route("/api", child);
9
- app.request(new Request("http://localhost/api/users/1/posts")).then(r => r.json()).then(console.log);
package/test-ast.ts DELETED
@@ -1,28 +0,0 @@
1
- import { AstSchemaEditor } from "./src/api/ast-schema-editor";
2
- import * as fs from "fs";
3
-
4
- const collectionsDir = __dirname + "/collections-test";
5
- fs.mkdirSync(collectionsDir, { recursive: true });
6
- fs.writeFileSync(collectionsDir + "/users.ts", `
7
- export default {
8
- name: "Users",
9
- slug: "users",
10
- properties: {},
11
- securityRules: [
12
- { name: "test", operation: "read", mode: "permissive", roles: ["public"] }
13
- ]
14
- };
15
- `);
16
-
17
- async function main() {
18
- const editor = new AstSchemaEditor(collectionsDir);
19
- await editor.saveCollection("users", {
20
- name: "Users",
21
- slug: "users",
22
- properties: {},
23
- securityRules: []
24
- });
25
- console.log("AFTER SAVE:", fs.readFileSync(collectionsDir + "/users.ts", "utf8"));
26
- }
27
-
28
- main().catch(console.error);