datatruck 0.0.4 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # datatruck
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`24a1e5e`](https://github.com/swordev/datatruck/commit/24a1e5e86336e7a92556287e49548dc542f0e579), [`88d46cd`](https://github.com/swordev/datatruck/commit/88d46cd56293df4c6fc21a9ad61d6236ac91f325)]:
8
+ - @datatruck/cli@0.1.0
9
+
10
+ ## 0.0.6
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`8de6e6c`](https://github.com/swordev/datatruck/commit/8de6e6ceddb59635cb4634d884e7690eeaf59bac)]:
15
+ - @datatruck/cli@0.0.6
16
+
17
+ ## 0.0.5
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`78cb0c1`](https://github.com/swordev/datatruck/commit/78cb0c17558543841cd7080dc4c672e6cbfd5634)]:
22
+ - @datatruck/cli@0.0.5
23
+
3
24
  ## 0.0.4
4
25
 
5
26
  ### Patch Changes
@@ -0,0 +1,816 @@
1
+ {
2
+ "definitions": {
3
+ "stringlist-util": {
4
+ "type": "array",
5
+ "items": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "repository": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": [
13
+ "type",
14
+ "name"
15
+ ],
16
+ "properties": {
17
+ "type": {
18
+ "type": "string"
19
+ },
20
+ "name": {
21
+ "type": "string"
22
+ },
23
+ "config": {}
24
+ },
25
+ "anyOf": [
26
+ {
27
+ "if": {
28
+ "type": "object",
29
+ "properties": {
30
+ "type": {
31
+ "const": "restic"
32
+ }
33
+ }
34
+ },
35
+ "then": {
36
+ "type": "object",
37
+ "properties": {
38
+ "config": {
39
+ "$ref": "#/definitions/restic-repository"
40
+ }
41
+ }
42
+ },
43
+ "else": false
44
+ },
45
+ {
46
+ "if": {
47
+ "type": "object",
48
+ "properties": {
49
+ "type": {
50
+ "const": "local"
51
+ }
52
+ }
53
+ },
54
+ "then": {
55
+ "type": "object",
56
+ "properties": {
57
+ "config": {
58
+ "$ref": "#/definitions/local-repository"
59
+ }
60
+ }
61
+ },
62
+ "else": false
63
+ },
64
+ {
65
+ "if": {
66
+ "type": "object",
67
+ "properties": {
68
+ "type": {
69
+ "const": "git"
70
+ }
71
+ }
72
+ },
73
+ "then": {
74
+ "type": "object",
75
+ "properties": {
76
+ "config": {
77
+ "$ref": "#/definitions/git-repository"
78
+ }
79
+ }
80
+ },
81
+ "else": false
82
+ }
83
+ ]
84
+ },
85
+ "package": {
86
+ "type": "object",
87
+ "required": [
88
+ "name"
89
+ ],
90
+ "additionalProperties": false,
91
+ "properties": {
92
+ "name": {
93
+ "type": "string"
94
+ },
95
+ "enabled": {
96
+ "type": "boolean"
97
+ },
98
+ "task": {
99
+ "$ref": "#/definitions/task"
100
+ },
101
+ "path": {
102
+ "type": "string"
103
+ },
104
+ "restorePath": {
105
+ "type": "string"
106
+ },
107
+ "restorePermissions": {
108
+ "type": "object",
109
+ "required": [
110
+ "uid",
111
+ "gid"
112
+ ],
113
+ "additionalProperties": false,
114
+ "properties": {
115
+ "uid": {
116
+ "anyOf": [
117
+ {
118
+ "type": "string"
119
+ },
120
+ {
121
+ "type": "integer"
122
+ }
123
+ ]
124
+ },
125
+ "gid": {
126
+ "anyOf": [
127
+ {
128
+ "type": "string"
129
+ },
130
+ {
131
+ "type": "integer"
132
+ }
133
+ ]
134
+ }
135
+ }
136
+ },
137
+ "include": {
138
+ "type": "array",
139
+ "items": {
140
+ "anyOf": [
141
+ {
142
+ "type": "string"
143
+ },
144
+ {
145
+ "$ref": "#/definitions/paths-object"
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ "exclude": {
151
+ "type": "array",
152
+ "items": {
153
+ "anyOf": [
154
+ {
155
+ "type": "string"
156
+ },
157
+ {
158
+ "$ref": "#/definitions/paths-object"
159
+ }
160
+ ]
161
+ }
162
+ },
163
+ "repositoryNames": {
164
+ "$ref": "#/definitions/stringlist-util"
165
+ },
166
+ "repositoryConfigs": {
167
+ "type": "array",
168
+ "items": {
169
+ "$ref": "#/definitions/package-repository"
170
+ }
171
+ },
172
+ "prunePolicy": {
173
+ "$ref": "#/definitions/prune-policy"
174
+ }
175
+ }
176
+ },
177
+ "package-repository": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "type"
182
+ ],
183
+ "properties": {
184
+ "type": {
185
+ "type": "string"
186
+ },
187
+ "names": {
188
+ "$ref": "#/definitions/stringlist-util"
189
+ },
190
+ "config": {}
191
+ },
192
+ "anyOf": [
193
+ {
194
+ "if": {
195
+ "type": "object",
196
+ "properties": {
197
+ "type": {
198
+ "const": "restic"
199
+ }
200
+ }
201
+ },
202
+ "then": {
203
+ "type": "object",
204
+ "properties": {
205
+ "config": {
206
+ "$ref": "#/definitions/restic-package-repository"
207
+ }
208
+ }
209
+ },
210
+ "else": false
211
+ },
212
+ {
213
+ "if": {
214
+ "type": "object",
215
+ "properties": {
216
+ "type": {
217
+ "const": "local"
218
+ }
219
+ }
220
+ },
221
+ "then": {
222
+ "type": "object",
223
+ "properties": {
224
+ "config": {
225
+ "$ref": "#/definitions/local-package-repository"
226
+ }
227
+ }
228
+ },
229
+ "else": false
230
+ },
231
+ {
232
+ "if": {
233
+ "type": "object",
234
+ "properties": {
235
+ "type": {
236
+ "const": "git"
237
+ }
238
+ }
239
+ },
240
+ "then": {
241
+ "type": "object",
242
+ "properties": {
243
+ "config": {
244
+ "$ref": "#/definitions/git-package-repository"
245
+ }
246
+ }
247
+ },
248
+ "else": false
249
+ }
250
+ ]
251
+ },
252
+ "task": {
253
+ "type": "object",
254
+ "required": [
255
+ "name"
256
+ ],
257
+ "properties": {
258
+ "name": {
259
+ "enum": [
260
+ "git",
261
+ "mariadb",
262
+ "mssql",
263
+ "mysql-dump",
264
+ "postgresql-dump"
265
+ ]
266
+ },
267
+ "config": {}
268
+ },
269
+ "anyOf": [
270
+ {
271
+ "if": {
272
+ "type": "object",
273
+ "properties": {
274
+ "name": {
275
+ "const": "git"
276
+ }
277
+ }
278
+ },
279
+ "then": {
280
+ "type": "object",
281
+ "properties": {
282
+ "config": {
283
+ "$ref": "#/definitions/git-task"
284
+ }
285
+ }
286
+ },
287
+ "else": false
288
+ },
289
+ {
290
+ "if": {
291
+ "type": "object",
292
+ "properties": {
293
+ "name": {
294
+ "const": "mariadb"
295
+ }
296
+ }
297
+ },
298
+ "then": {
299
+ "type": "object",
300
+ "properties": {
301
+ "config": {
302
+ "$ref": "#/definitions/mariadb-task"
303
+ }
304
+ }
305
+ },
306
+ "else": false
307
+ },
308
+ {
309
+ "if": {
310
+ "type": "object",
311
+ "properties": {
312
+ "name": {
313
+ "const": "mssql"
314
+ }
315
+ }
316
+ },
317
+ "then": {
318
+ "type": "object",
319
+ "properties": {
320
+ "config": {
321
+ "$ref": "#/definitions/mssql-task"
322
+ }
323
+ }
324
+ },
325
+ "else": false
326
+ },
327
+ {
328
+ "if": {
329
+ "type": "object",
330
+ "properties": {
331
+ "name": {
332
+ "const": "mysql-dump"
333
+ }
334
+ }
335
+ },
336
+ "then": {
337
+ "type": "object",
338
+ "properties": {
339
+ "config": {
340
+ "$ref": "#/definitions/mysql-dump-task"
341
+ }
342
+ }
343
+ },
344
+ "else": false
345
+ },
346
+ {
347
+ "if": {
348
+ "type": "object",
349
+ "properties": {
350
+ "name": {
351
+ "const": "postgresql-dump"
352
+ }
353
+ }
354
+ },
355
+ "then": {
356
+ "type": "object",
357
+ "properties": {
358
+ "config": {
359
+ "$ref": "#/definitions/postgresql-dump-task"
360
+ }
361
+ }
362
+ },
363
+ "else": false
364
+ }
365
+ ]
366
+ },
367
+ "git-repository": {
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "required": [
371
+ "repo"
372
+ ],
373
+ "properties": {
374
+ "repo": {
375
+ "type": "string"
376
+ },
377
+ "branch": {
378
+ "type": "string"
379
+ }
380
+ }
381
+ },
382
+ "git-package-repository": {
383
+ "type": "object",
384
+ "additionalProperties": false,
385
+ "properties": {}
386
+ },
387
+ "local-repository": {
388
+ "type": "object",
389
+ "required": [
390
+ "outPath"
391
+ ],
392
+ "additionalProperties": false,
393
+ "properties": {
394
+ "outPath": {
395
+ "type": "string"
396
+ },
397
+ "compress": {
398
+ "type": "boolean"
399
+ }
400
+ }
401
+ },
402
+ "local-package-repository": {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "properties": {
406
+ "compress": {
407
+ "anyOf": [
408
+ {
409
+ "type": "boolean"
410
+ },
411
+ {
412
+ "type": "object",
413
+ "additionalProperties": false,
414
+ "properties": {
415
+ "packs": {
416
+ "type": "array",
417
+ "items": {
418
+ "type": "object",
419
+ "additionalProperties": false,
420
+ "required": [
421
+ "include"
422
+ ],
423
+ "properties": {
424
+ "include": {
425
+ "$ref": "#/definitions/stringlist-util"
426
+ },
427
+ "exclude": {
428
+ "$ref": "#/definitions/stringlist-util"
429
+ },
430
+ "onePackByResult": {
431
+ "type": "boolean"
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ ]
439
+ }
440
+ }
441
+ },
442
+ "restic-repository": {
443
+ "type": "object",
444
+ "required": [
445
+ "passwordFile",
446
+ "repository"
447
+ ],
448
+ "additionalProperties": false,
449
+ "properties": {
450
+ "passwordFile": {
451
+ "type": "string"
452
+ },
453
+ "repository": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "required": [
457
+ "backend"
458
+ ],
459
+ "properties": {
460
+ "name": {
461
+ "type": "string"
462
+ },
463
+ "env": {
464
+ "type": "object",
465
+ "patternProperties": {
466
+ ".+": {
467
+ "type": "string"
468
+ }
469
+ }
470
+ },
471
+ "backend": {
472
+ "enum": [
473
+ "local",
474
+ "rest",
475
+ "sftp",
476
+ "s3",
477
+ "azure",
478
+ "gs",
479
+ "rclone"
480
+ ]
481
+ },
482
+ "protocol": {
483
+ "enum": [
484
+ "http",
485
+ "https"
486
+ ]
487
+ },
488
+ "host": {
489
+ "type": "string"
490
+ },
491
+ "username": {
492
+ "type": "string"
493
+ },
494
+ "passwordFile": {
495
+ "type": "string"
496
+ },
497
+ "port": {
498
+ "type": "integer"
499
+ },
500
+ "path": {
501
+ "type": "string"
502
+ }
503
+ }
504
+ }
505
+ }
506
+ },
507
+ "restic-package-repository": {
508
+ "type": "object",
509
+ "additionalProperties": false,
510
+ "properties": {}
511
+ },
512
+ "git-task": {
513
+ "type": "object",
514
+ "additionalProperties": false,
515
+ "properties": {
516
+ "command": {
517
+ "type": "string"
518
+ },
519
+ "includeModified": {
520
+ "anyOf": [
521
+ {
522
+ "type": "boolean"
523
+ },
524
+ {
525
+ "$ref": "#/definitions/stringlist-util"
526
+ }
527
+ ]
528
+ },
529
+ "includeUntracked": {
530
+ "anyOf": [
531
+ {
532
+ "type": "boolean"
533
+ },
534
+ {
535
+ "$ref": "#/definitions/stringlist-util"
536
+ }
537
+ ]
538
+ },
539
+ "includeIgnored": {
540
+ "anyOf": [
541
+ {
542
+ "type": "boolean"
543
+ },
544
+ {
545
+ "$ref": "#/definitions/stringlist-util"
546
+ }
547
+ ]
548
+ },
549
+ "includeConfig": {
550
+ "type": "boolean"
551
+ }
552
+ }
553
+ },
554
+ "sqldump-task": {
555
+ "type": "object",
556
+ "required": [
557
+ "password",
558
+ "hostname",
559
+ "username",
560
+ "database"
561
+ ],
562
+ "properties": {
563
+ "password": {
564
+ "anyOf": [
565
+ {
566
+ "type": "string"
567
+ },
568
+ {
569
+ "type": "object",
570
+ "additionalProperties": false,
571
+ "required": [
572
+ "path"
573
+ ],
574
+ "properties": {
575
+ "path": {
576
+ "type": "string"
577
+ }
578
+ }
579
+ }
580
+ ]
581
+ },
582
+ "hostname": {
583
+ "type": "string"
584
+ },
585
+ "port": {
586
+ "type": "integer"
587
+ },
588
+ "username": {
589
+ "type": "string"
590
+ },
591
+ "database": {
592
+ "type": "string"
593
+ },
594
+ "targetDatabase": {
595
+ "type": "object",
596
+ "required": [
597
+ "name"
598
+ ],
599
+ "properties": {
600
+ "name": {
601
+ "type": "string"
602
+ },
603
+ "charset": {
604
+ "type": "string"
605
+ },
606
+ "collate": {
607
+ "type": "string"
608
+ }
609
+ }
610
+ },
611
+ "includeTables": {
612
+ "$ref": "#/definitions/stringlist-util"
613
+ },
614
+ "excludeTables": {
615
+ "$ref": "#/definitions/stringlist-util"
616
+ },
617
+ "oneFileByTable": {
618
+ "type": "boolean"
619
+ }
620
+ }
621
+ },
622
+ "mariadb-task": {
623
+ "type": "object",
624
+ "required": [
625
+ "hostname",
626
+ "username",
627
+ "password"
628
+ ],
629
+ "additionalProperties": false,
630
+ "properties": {
631
+ "command": {
632
+ "type": "string"
633
+ },
634
+ "hostname": {
635
+ "type": "string"
636
+ },
637
+ "username": {
638
+ "type": "string"
639
+ },
640
+ "password": {
641
+ "anyOf": [
642
+ {
643
+ "type": "string"
644
+ },
645
+ {
646
+ "type": "object",
647
+ "additionalProperties": false,
648
+ "required": [
649
+ "path"
650
+ ],
651
+ "properties": {
652
+ "path": {
653
+ "type": "string"
654
+ }
655
+ }
656
+ }
657
+ ]
658
+ },
659
+ "includeTables": {
660
+ "$ref": "#/definitions/stringlist-util"
661
+ },
662
+ "excludeTables": {
663
+ "$ref": "#/definitions/stringlist-util"
664
+ },
665
+ "includeDatabases": {
666
+ "$ref": "#/definitions/stringlist-util"
667
+ },
668
+ "excludeDatabases": {
669
+ "$ref": "#/definitions/stringlist-util"
670
+ }
671
+ }
672
+ },
673
+ "mssql-task": {
674
+ "type": "object",
675
+ "additionalProperties": false,
676
+ "properties": {
677
+ "command": {
678
+ "type": "string"
679
+ },
680
+ "hostname": {
681
+ "type": "string"
682
+ },
683
+ "username": {
684
+ "type": "string"
685
+ },
686
+ "passwordFile": {
687
+ "type": "string"
688
+ },
689
+ "includeDatabases": {
690
+ "$ref": "#/definitions/stringlist-util"
691
+ },
692
+ "excludeDatabases": {
693
+ "$ref": "#/definitions/stringlist-util"
694
+ }
695
+ }
696
+ },
697
+ "mysql-dump-task": {
698
+ "allOf": [
699
+ {
700
+ "$ref": "#/definitions/sqldump-task"
701
+ }
702
+ ]
703
+ },
704
+ "postgresql-dump-task": {
705
+ "allOf": [
706
+ {
707
+ "$ref": "#/definitions/sqldump-task"
708
+ }
709
+ ]
710
+ },
711
+ "config": {
712
+ "type": "object",
713
+ "required": [
714
+ "repositories",
715
+ "packages"
716
+ ],
717
+ "additionalProperties": false,
718
+ "properties": {
719
+ "$schema": {
720
+ "type": "string"
721
+ },
722
+ "repositories": {
723
+ "type": "array",
724
+ "items": {
725
+ "$ref": "#/definitions/repository"
726
+ }
727
+ },
728
+ "packages": {
729
+ "type": "array",
730
+ "items": {
731
+ "$ref": "#/definitions/package"
732
+ }
733
+ }
734
+ }
735
+ },
736
+ "prune-policy": {
737
+ "type": "object",
738
+ "properties": {
739
+ "keepDaily": {
740
+ "type": "integer"
741
+ },
742
+ "keepHourly": {
743
+ "type": "integer"
744
+ },
745
+ "keepMinutely": {
746
+ "type": "integer"
747
+ },
748
+ "keepLast": {
749
+ "type": "integer"
750
+ },
751
+ "keepMonthly": {
752
+ "type": "integer"
753
+ },
754
+ "keepWeekly": {
755
+ "type": "integer"
756
+ },
757
+ "keepYearly": {
758
+ "type": "integer"
759
+ },
760
+ "groupBy": {
761
+ "type": "array",
762
+ "items": {
763
+ "type": "string",
764
+ "enum": [
765
+ "packageName",
766
+ "repositoryName",
767
+ "repositoryType"
768
+ ]
769
+ }
770
+ },
771
+ "tags": {
772
+ "$ref": "#/definitions/stringlist-util"
773
+ }
774
+ }
775
+ },
776
+ "paths-object": {
777
+ "type": "object",
778
+ "required": [
779
+ "type"
780
+ ],
781
+ "properties": {
782
+ "type": {
783
+ "type": "string"
784
+ }
785
+ },
786
+ "anyOf": [
787
+ {
788
+ "if": {
789
+ "type": "object",
790
+ "properties": {
791
+ "type": {
792
+ "const": "spawn"
793
+ }
794
+ }
795
+ },
796
+ "then": {
797
+ "type": "object",
798
+ "required": [
799
+ "command"
800
+ ],
801
+ "properties": {
802
+ "command": {
803
+ "type": "string"
804
+ },
805
+ "args": {
806
+ "$ref": "#/definitions/stringlist-util"
807
+ }
808
+ }
809
+ },
810
+ "else": false
811
+ }
812
+ ]
813
+ }
814
+ },
815
+ "$ref": "#/definitions/config"
816
+ }
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "datatruck",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
+ "dependencies": {
5
+ "@datatruck/cli": "0.1.0"
6
+ },
7
+ "engine": {
8
+ "node": ">=16.0.0"
9
+ },
10
+ "bin": {
11
+ "datatruck": "index.js",
12
+ "dtt": "index.js"
13
+ },
4
14
  "description": "Tool for creating and managing backups",
5
15
  "homepage": "https://github.com/swordev/datatruck#readme",
6
16
  "bugs": {
@@ -15,15 +25,5 @@
15
25
  "name": "Juanra GM",
16
26
  "email": "juanrgm724@gmail.com",
17
27
  "url": "https://github.com/juanrgm"
18
- },
19
- "bin": {
20
- "datatruck": "index.js",
21
- "dtt": "index.js"
22
- },
23
- "dependencies": {
24
- "@datatruck/cli": "0.0.4"
25
- },
26
- "engine": {
27
- "node": ">=16.0.0"
28
28
  }
29
29
  }