@tachybase/module-backup 1.0.6 → 1.0.25

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 (42) hide show
  1. package/dist/client/AutoBackup.d.ts +1 -0
  2. package/dist/client/collections/autoBackup.d.ts +3 -0
  3. package/dist/client/components/RepeatField.d.ts +4 -0
  4. package/dist/client/components/locale/Cron.zh-CN.d.ts +34 -0
  5. package/dist/client/cron-jobs-table/AutoBackupTable.d.ts +1 -0
  6. package/dist/client/cron-jobs-table/AutoBackupTable.schema.d.ts +629 -0
  7. package/dist/client/index.js +30 -1
  8. package/dist/client/locale/index.d.ts +4 -1
  9. package/dist/constants.d.ts +1 -0
  10. package/dist/constants.js +27 -0
  11. package/dist/externalVersion.js +7 -6
  12. package/dist/locale/en-US.json +1 -0
  13. package/dist/locale/zh-CN.json +30 -0
  14. package/dist/node_modules/@hapi/topo/package.json +1 -1
  15. package/dist/node_modules/archiver/package.json +1 -1
  16. package/dist/node_modules/cron-parser/LICENSE +21 -0
  17. package/dist/node_modules/cron-parser/lib/date.js +252 -0
  18. package/dist/node_modules/cron-parser/lib/expression.js +1002 -0
  19. package/dist/node_modules/cron-parser/lib/field_compactor.js +70 -0
  20. package/dist/node_modules/cron-parser/lib/field_stringify.js +58 -0
  21. package/dist/node_modules/cron-parser/lib/parser.js +1 -0
  22. package/dist/node_modules/cron-parser/package.json +1 -0
  23. package/dist/node_modules/cron-parser/types/common.d.ts +131 -0
  24. package/dist/node_modules/cron-parser/types/index.d.ts +45 -0
  25. package/dist/node_modules/cron-parser/types/ts3/index.d.ts +28 -0
  26. package/dist/node_modules/mkdirp/package.json +1 -1
  27. package/dist/node_modules/semver/package.json +1 -1
  28. package/dist/node_modules/yauzl/package.json +1 -1
  29. package/dist/server/collections/autoBackup.d.ts +2 -0
  30. package/dist/server/collections/autoBackup.js +64 -0
  31. package/dist/server/commands/backup-command.d.ts +2 -0
  32. package/dist/server/commands/backup-command.js +78 -0
  33. package/dist/server/dumper.d.ts +10 -4
  34. package/dist/server/dumper.js +23 -32
  35. package/dist/server/model/AutoBackupModel.d.ts +15 -0
  36. package/dist/server/model/AutoBackupModel.js +29 -0
  37. package/dist/server/resourcers/backup-files.js +30 -16
  38. package/dist/server/server.d.ts +12 -1
  39. package/dist/server/server.js +185 -6
  40. package/dist/server/utils/files.d.ts +6 -0
  41. package/dist/server/utils/files.js +59 -0
  42. package/package.json +14 -9
@@ -0,0 +1,629 @@
1
+ export declare const table: {
2
+ type: string;
3
+ 'x-decorator': string;
4
+ 'x-acl-action': string;
5
+ 'x-use-decorator-props': string;
6
+ 'x-decorator-props': {
7
+ collection: string;
8
+ dataSource: string;
9
+ action: string;
10
+ params: {
11
+ pageSize: number;
12
+ };
13
+ rowKey: string;
14
+ showIndex: boolean;
15
+ dragSort: boolean;
16
+ };
17
+ 'x-component': string;
18
+ 'x-filter-targets': any[];
19
+ properties: {
20
+ actions: {
21
+ type: string;
22
+ 'x-component': string;
23
+ 'x-component-props': {
24
+ style: {
25
+ marginBottom: string;
26
+ };
27
+ };
28
+ properties: {
29
+ refresh: {
30
+ type: string;
31
+ title: string;
32
+ 'x-action': string;
33
+ 'x-component': string;
34
+ 'x-settings': string;
35
+ 'x-component-props': {
36
+ icon: string;
37
+ };
38
+ 'x-use-component-props': string;
39
+ };
40
+ create: {
41
+ type: string;
42
+ 'x-action': string;
43
+ 'x-acl-action': string;
44
+ title: string;
45
+ 'x-component': string;
46
+ 'x-decorator': string;
47
+ 'x-component-props': {
48
+ openMode: string;
49
+ type: string;
50
+ component: string;
51
+ icon: string;
52
+ };
53
+ 'x-align': string;
54
+ 'x-acl-action-props': {
55
+ skipScopeCheck: boolean;
56
+ };
57
+ properties: {
58
+ drawer: {
59
+ type: string;
60
+ title: string;
61
+ 'x-component': string;
62
+ 'x-component-props': {
63
+ className: string;
64
+ };
65
+ properties: {
66
+ form: import("@tachybase/schema").Stringify<{
67
+ [key: symbol]: any;
68
+ [key: `x-${string}`]: any;
69
+ [key: `x-${number}`]: any;
70
+ version?: string;
71
+ name?: import("@tachybase/schema").SchemaKey;
72
+ title?: any;
73
+ description?: any;
74
+ default?: any;
75
+ readOnly?: boolean;
76
+ writeOnly?: boolean;
77
+ type?: import("@tachybase/schema").SchemaTypes;
78
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
79
+ const?: any;
80
+ multipleOf?: number;
81
+ maximum?: number;
82
+ exclusiveMaximum?: number;
83
+ minimum?: number;
84
+ exclusiveMinimum?: number;
85
+ maxLength?: number;
86
+ minLength?: number;
87
+ pattern?: string | RegExp;
88
+ maxItems?: number;
89
+ minItems?: number;
90
+ uniqueItems?: boolean;
91
+ maxProperties?: number;
92
+ minProperties?: number;
93
+ required?: string[] | boolean | string;
94
+ format?: string;
95
+ $ref?: string;
96
+ $namespace?: string;
97
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
98
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
99
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
100
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
101
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
102
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
103
+ "x-value"?: any;
104
+ "x-index"?: number;
105
+ "x-pattern"?: any;
106
+ "x-display"?: any;
107
+ "x-validator"?: any;
108
+ "x-decorator"?: any;
109
+ "x-decorator-props"?: any;
110
+ "x-component"?: any;
111
+ "x-component-props"?: any;
112
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
113
+ "x-content"?: any;
114
+ "x-data"?: any;
115
+ "x-visible"?: boolean;
116
+ "x-hidden"?: boolean;
117
+ "x-disabled"?: boolean;
118
+ "x-editable"?: boolean;
119
+ "x-read-only"?: boolean;
120
+ "x-read-pretty"?: boolean;
121
+ "x-compile-omitted"?: string[];
122
+ }>;
123
+ };
124
+ };
125
+ };
126
+ };
127
+ };
128
+ };
129
+ table: {
130
+ type: string;
131
+ 'x-component': string;
132
+ 'x-use-component-props': string;
133
+ 'x-component-props': {
134
+ rowKey: string;
135
+ rowSelection: {
136
+ type: string;
137
+ };
138
+ };
139
+ properties: {
140
+ title: {
141
+ type: string;
142
+ 'x-decorator': string;
143
+ 'x-component': string;
144
+ properties: {
145
+ title: {
146
+ 'x-collection-field': string;
147
+ 'x-component': string;
148
+ 'x-component-props': {
149
+ ellipsis: boolean;
150
+ };
151
+ 'x-read-pretty': boolean;
152
+ 'x-decorator': any;
153
+ 'x-decorator-props': {
154
+ labelStyle: {
155
+ display: string;
156
+ };
157
+ };
158
+ };
159
+ };
160
+ };
161
+ enabled: {
162
+ type: string;
163
+ 'x-decorator': string;
164
+ 'x-component': string;
165
+ properties: {
166
+ enabled: {
167
+ 'x-collection-field': string;
168
+ 'x-component': string;
169
+ 'x-component-props': {
170
+ ellipsis: boolean;
171
+ };
172
+ 'x-read-pretty': boolean;
173
+ 'x-decorator': any;
174
+ 'x-decorator-props': {
175
+ labelStyle: {
176
+ display: string;
177
+ };
178
+ };
179
+ };
180
+ };
181
+ };
182
+ maxNumber: {
183
+ type: string;
184
+ 'x-decorator': string;
185
+ 'x-component': string;
186
+ properties: {
187
+ maxNumber: {
188
+ 'x-collection-field': string;
189
+ 'x-component': string;
190
+ 'x-component-props': {
191
+ ellipsis: boolean;
192
+ };
193
+ 'x-read-pretty': boolean;
194
+ 'x-decorator': any;
195
+ 'x-decorator-props': {
196
+ labelStyle: {
197
+ display: string;
198
+ };
199
+ };
200
+ };
201
+ };
202
+ };
203
+ actions: {
204
+ type: string;
205
+ title: string;
206
+ 'x-action-column': string;
207
+ 'x-decorator': string;
208
+ 'x-component': string;
209
+ 'x-component-props': {
210
+ width: number;
211
+ fixed: string;
212
+ };
213
+ properties: {
214
+ actions: {
215
+ type: string;
216
+ 'x-component': string;
217
+ properties: {
218
+ editAction: import("@tachybase/schema").Stringify<{
219
+ [key: symbol]: any;
220
+ [key: `x-${string}`]: any;
221
+ [key: `x-${number}`]: any;
222
+ version?: string;
223
+ name?: import("@tachybase/schema").SchemaKey;
224
+ title?: any;
225
+ description?: any;
226
+ default?: any;
227
+ readOnly?: boolean;
228
+ writeOnly?: boolean;
229
+ type?: import("@tachybase/schema").SchemaTypes;
230
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
231
+ const?: any;
232
+ multipleOf?: number;
233
+ maximum?: number;
234
+ exclusiveMaximum?: number;
235
+ minimum?: number;
236
+ exclusiveMinimum?: number;
237
+ maxLength?: number;
238
+ minLength?: number;
239
+ pattern?: string | RegExp;
240
+ maxItems?: number;
241
+ minItems?: number;
242
+ uniqueItems?: boolean;
243
+ maxProperties?: number;
244
+ minProperties?: number;
245
+ required?: string[] | boolean | string;
246
+ format?: string;
247
+ $ref?: string;
248
+ $namespace?: string;
249
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
250
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
251
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
252
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
253
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
254
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
255
+ "x-value"?: any;
256
+ "x-index"?: number;
257
+ "x-pattern"?: any;
258
+ "x-display"?: any;
259
+ "x-validator"?: any;
260
+ "x-decorator"?: any;
261
+ "x-decorator-props"?: any;
262
+ "x-component"?: any;
263
+ "x-component-props"?: any;
264
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
265
+ "x-content"?: any;
266
+ "x-data"?: any;
267
+ "x-visible"?: boolean;
268
+ "x-hidden"?: boolean;
269
+ "x-disabled"?: boolean;
270
+ "x-editable"?: boolean;
271
+ "x-read-only"?: boolean;
272
+ "x-read-pretty"?: boolean;
273
+ "x-compile-omitted"?: string[];
274
+ }>;
275
+ delete: {
276
+ type: string;
277
+ title: string;
278
+ 'x-action': string;
279
+ 'x-component': string;
280
+ 'x-component-props': {
281
+ confirm: {
282
+ title: string;
283
+ content: string;
284
+ };
285
+ };
286
+ 'x-decorator': string;
287
+ 'x-use-component-props': string;
288
+ };
289
+ clear: {
290
+ type: string;
291
+ title: string;
292
+ 'x-action': string;
293
+ 'x-component': string;
294
+ 'x-component-props': {
295
+ confirm: {
296
+ title: string;
297
+ content: string;
298
+ };
299
+ };
300
+ 'x-decorator': string;
301
+ 'x-use-component-props': () => {
302
+ onClick(): Promise<void>;
303
+ };
304
+ };
305
+ };
306
+ };
307
+ };
308
+ };
309
+ };
310
+ };
311
+ };
312
+ };
313
+ export declare const schema: {
314
+ type: string;
315
+ properties: {
316
+ autoBackupTable: {
317
+ type: string;
318
+ 'x-decorator': string;
319
+ 'x-acl-action': string;
320
+ 'x-use-decorator-props': string;
321
+ 'x-decorator-props': {
322
+ collection: string;
323
+ dataSource: string;
324
+ action: string;
325
+ params: {
326
+ pageSize: number;
327
+ };
328
+ rowKey: string;
329
+ showIndex: boolean;
330
+ dragSort: boolean;
331
+ };
332
+ 'x-component': string;
333
+ 'x-filter-targets': any[];
334
+ properties: {
335
+ actions: {
336
+ type: string;
337
+ 'x-component': string;
338
+ 'x-component-props': {
339
+ style: {
340
+ marginBottom: string;
341
+ };
342
+ };
343
+ properties: {
344
+ refresh: {
345
+ type: string;
346
+ title: string;
347
+ 'x-action': string;
348
+ 'x-component': string;
349
+ 'x-settings': string;
350
+ 'x-component-props': {
351
+ icon: string;
352
+ };
353
+ 'x-use-component-props': string;
354
+ };
355
+ create: {
356
+ type: string;
357
+ 'x-action': string;
358
+ 'x-acl-action': string;
359
+ title: string;
360
+ 'x-component': string;
361
+ 'x-decorator': string;
362
+ 'x-component-props': {
363
+ openMode: string;
364
+ type: string;
365
+ component: string;
366
+ icon: string;
367
+ };
368
+ 'x-align': string;
369
+ 'x-acl-action-props': {
370
+ skipScopeCheck: boolean;
371
+ };
372
+ properties: {
373
+ drawer: {
374
+ type: string;
375
+ title: string;
376
+ 'x-component': string;
377
+ 'x-component-props': {
378
+ className: string;
379
+ };
380
+ properties: {
381
+ form: import("@tachybase/schema").Stringify<{
382
+ [key: symbol]: any;
383
+ [key: `x-${string}`]: any;
384
+ [key: `x-${number}`]: any;
385
+ version?: string;
386
+ name?: import("@tachybase/schema").SchemaKey;
387
+ title?: any;
388
+ description?: any;
389
+ default?: any;
390
+ readOnly?: boolean;
391
+ writeOnly?: boolean;
392
+ type?: import("@tachybase/schema").SchemaTypes;
393
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
394
+ const?: any;
395
+ multipleOf?: number;
396
+ maximum?: number;
397
+ exclusiveMaximum?: number;
398
+ minimum?: number;
399
+ exclusiveMinimum?: number;
400
+ maxLength?: number;
401
+ minLength?: number;
402
+ pattern?: string | RegExp;
403
+ maxItems?: number;
404
+ minItems?: number;
405
+ uniqueItems?: boolean;
406
+ maxProperties?: number;
407
+ minProperties?: number;
408
+ required?: string[] | boolean | string;
409
+ format?: string;
410
+ $ref?: string;
411
+ $namespace?: string;
412
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
413
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
414
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
415
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
416
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
417
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
418
+ "x-value"?: any;
419
+ "x-index"?: number;
420
+ "x-pattern"?: any;
421
+ "x-display"?: any;
422
+ "x-validator"?: any;
423
+ "x-decorator"?: any;
424
+ "x-decorator-props"?: any;
425
+ "x-component"?: any;
426
+ "x-component-props"?: any;
427
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
428
+ "x-content"?: any;
429
+ "x-data"?: any;
430
+ "x-visible"?: boolean;
431
+ "x-hidden"?: boolean;
432
+ "x-disabled"?: boolean;
433
+ "x-editable"?: boolean;
434
+ "x-read-only"?: boolean;
435
+ "x-read-pretty"?: boolean;
436
+ "x-compile-omitted"?: string[];
437
+ }>;
438
+ };
439
+ };
440
+ };
441
+ };
442
+ };
443
+ };
444
+ table: {
445
+ type: string;
446
+ 'x-component': string;
447
+ 'x-use-component-props': string;
448
+ 'x-component-props': {
449
+ rowKey: string;
450
+ rowSelection: {
451
+ type: string;
452
+ };
453
+ };
454
+ properties: {
455
+ title: {
456
+ type: string;
457
+ 'x-decorator': string;
458
+ 'x-component': string;
459
+ properties: {
460
+ title: {
461
+ 'x-collection-field': string;
462
+ 'x-component': string;
463
+ 'x-component-props': {
464
+ ellipsis: boolean;
465
+ };
466
+ 'x-read-pretty': boolean;
467
+ 'x-decorator': any;
468
+ 'x-decorator-props': {
469
+ labelStyle: {
470
+ display: string;
471
+ };
472
+ };
473
+ };
474
+ };
475
+ };
476
+ enabled: {
477
+ type: string;
478
+ 'x-decorator': string;
479
+ 'x-component': string;
480
+ properties: {
481
+ enabled: {
482
+ 'x-collection-field': string;
483
+ 'x-component': string;
484
+ 'x-component-props': {
485
+ ellipsis: boolean;
486
+ };
487
+ 'x-read-pretty': boolean;
488
+ 'x-decorator': any;
489
+ 'x-decorator-props': {
490
+ labelStyle: {
491
+ display: string;
492
+ };
493
+ };
494
+ };
495
+ };
496
+ };
497
+ maxNumber: {
498
+ type: string;
499
+ 'x-decorator': string;
500
+ 'x-component': string;
501
+ properties: {
502
+ maxNumber: {
503
+ 'x-collection-field': string;
504
+ 'x-component': string;
505
+ 'x-component-props': {
506
+ ellipsis: boolean;
507
+ };
508
+ 'x-read-pretty': boolean;
509
+ 'x-decorator': any;
510
+ 'x-decorator-props': {
511
+ labelStyle: {
512
+ display: string;
513
+ };
514
+ };
515
+ };
516
+ };
517
+ };
518
+ actions: {
519
+ type: string;
520
+ title: string;
521
+ 'x-action-column': string;
522
+ 'x-decorator': string;
523
+ 'x-component': string;
524
+ 'x-component-props': {
525
+ width: number;
526
+ fixed: string;
527
+ };
528
+ properties: {
529
+ actions: {
530
+ type: string;
531
+ 'x-component': string;
532
+ properties: {
533
+ editAction: import("@tachybase/schema").Stringify<{
534
+ [key: symbol]: any;
535
+ [key: `x-${string}`]: any;
536
+ [key: `x-${number}`]: any;
537
+ version?: string;
538
+ name?: import("@tachybase/schema").SchemaKey;
539
+ title?: any;
540
+ description?: any;
541
+ default?: any;
542
+ readOnly?: boolean;
543
+ writeOnly?: boolean;
544
+ type?: import("@tachybase/schema").SchemaTypes;
545
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
546
+ const?: any;
547
+ multipleOf?: number;
548
+ maximum?: number;
549
+ exclusiveMaximum?: number;
550
+ minimum?: number;
551
+ exclusiveMinimum?: number;
552
+ maxLength?: number;
553
+ minLength?: number;
554
+ pattern?: string | RegExp;
555
+ maxItems?: number;
556
+ minItems?: number;
557
+ uniqueItems?: boolean;
558
+ maxProperties?: number;
559
+ minProperties?: number;
560
+ required?: string[] | boolean | string;
561
+ format?: string;
562
+ $ref?: string;
563
+ $namespace?: string;
564
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
565
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
566
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
567
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
568
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
569
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
570
+ "x-value"?: any;
571
+ "x-index"?: number;
572
+ "x-pattern"?: any;
573
+ "x-display"?: any;
574
+ "x-validator"?: any;
575
+ "x-decorator"?: any;
576
+ "x-decorator-props"?: any;
577
+ "x-component"?: any;
578
+ "x-component-props"?: any;
579
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
580
+ "x-content"?: any;
581
+ "x-data"?: any;
582
+ "x-visible"?: boolean;
583
+ "x-hidden"?: boolean;
584
+ "x-disabled"?: boolean;
585
+ "x-editable"?: boolean;
586
+ "x-read-only"?: boolean;
587
+ "x-read-pretty"?: boolean;
588
+ "x-compile-omitted"?: string[];
589
+ }>;
590
+ delete: {
591
+ type: string;
592
+ title: string;
593
+ 'x-action': string;
594
+ 'x-component': string;
595
+ 'x-component-props': {
596
+ confirm: {
597
+ title: string;
598
+ content: string;
599
+ };
600
+ };
601
+ 'x-decorator': string;
602
+ 'x-use-component-props': string;
603
+ };
604
+ clear: {
605
+ type: string;
606
+ title: string;
607
+ 'x-action': string;
608
+ 'x-component': string;
609
+ 'x-component-props': {
610
+ confirm: {
611
+ title: string;
612
+ content: string;
613
+ };
614
+ };
615
+ 'x-decorator': string;
616
+ 'x-use-component-props': () => {
617
+ onClick(): Promise<void>;
618
+ };
619
+ };
620
+ };
621
+ };
622
+ };
623
+ };
624
+ };
625
+ };
626
+ };
627
+ };
628
+ };
629
+ };