@internxt/cli 1.2.2 → 1.3.1

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 (92) hide show
  1. package/.env +3 -1
  2. package/README.md +405 -26
  3. package/dist/commands/config.js +1 -1
  4. package/dist/commands/create-folder.js +1 -1
  5. package/dist/commands/list.js +1 -2
  6. package/dist/commands/{move.d.ts → move-file.d.ts} +5 -4
  7. package/dist/commands/move-file.js +84 -0
  8. package/dist/commands/move-folder.d.ts +19 -0
  9. package/dist/commands/move-folder.js +84 -0
  10. package/dist/commands/rename.d.ts +18 -0
  11. package/dist/commands/{move.js → rename.js} +29 -29
  12. package/dist/commands/trash-clear.d.ts +15 -0
  13. package/dist/commands/trash-clear.js +64 -0
  14. package/dist/commands/trash-list.d.ts +20 -0
  15. package/dist/commands/trash-list.js +95 -0
  16. package/dist/commands/trash-restore-file.d.ts +19 -0
  17. package/dist/commands/trash-restore-file.js +87 -0
  18. package/dist/commands/trash-restore-folder.d.ts +19 -0
  19. package/dist/commands/trash-restore-folder.js +87 -0
  20. package/dist/commands/webdav-config.d.ts +17 -0
  21. package/dist/commands/webdav-config.js +91 -0
  22. package/dist/commands/webdav.d.ts +1 -1
  23. package/dist/commands/webdav.js +5 -2
  24. package/dist/database/migrations/20241018114828-add-parent-column.d.ts +1 -0
  25. package/dist/database/migrations/20241018114828-add-parent-column.js +24 -0
  26. package/dist/hooks/prerun/auth_check.js +2 -1
  27. package/dist/services/analytics.service.d.ts +9 -6
  28. package/dist/services/analytics.service.js +2 -35
  29. package/dist/services/config.service.d.ts +6 -1
  30. package/dist/services/config.service.js +24 -0
  31. package/dist/services/crypto.service.js +9 -1
  32. package/dist/services/database/drive-database-manager.service.d.ts +10 -7
  33. package/dist/services/database/drive-database-manager.service.js +34 -24
  34. package/dist/services/database/drive-file/drive-file.attributes.d.ts +1 -0
  35. package/dist/services/database/drive-file/drive-file.domain.d.ts +4 -1
  36. package/dist/services/database/drive-file/drive-file.domain.js +21 -1
  37. package/dist/services/database/drive-file/drive-file.model.d.ts +1 -0
  38. package/dist/services/database/drive-file/drive-file.model.js +4 -0
  39. package/dist/services/database/drive-folder/drive-folder.attributes.d.ts +1 -0
  40. package/dist/services/database/drive-folder/drive-folder.domain.d.ts +4 -1
  41. package/dist/services/database/drive-folder/drive-folder.domain.js +18 -1
  42. package/dist/services/database/drive-folder/drive-folder.model.d.ts +1 -0
  43. package/dist/services/database/drive-folder/drive-folder.model.js +5 -0
  44. package/dist/services/drive/drive-file.service.d.ts +5 -0
  45. package/dist/services/drive/drive-file.service.js +10 -0
  46. package/dist/services/drive/drive-folder.service.d.ts +7 -2
  47. package/dist/services/drive/drive-folder.service.js +16 -0
  48. package/dist/services/drive/trash.service.d.ts +7 -0
  49. package/dist/services/drive/trash.service.js +30 -0
  50. package/dist/services/network/upload.service.js +5 -1
  51. package/dist/services/sdk-manager.service.d.ts +1 -2
  52. package/dist/services/sdk-manager.service.js +0 -5
  53. package/dist/services/usage.service.d.ts +2 -1
  54. package/dist/services/usage.service.js +3 -7
  55. package/dist/services/validation.service.d.ts +2 -0
  56. package/dist/services/validation.service.js +6 -0
  57. package/dist/types/command.types.d.ts +16 -0
  58. package/dist/types/command.types.js +29 -1
  59. package/dist/types/config.types.d.ts +0 -1
  60. package/dist/types/drive.types.d.ts +2 -1
  61. package/dist/types/network.types.d.ts +5 -0
  62. package/dist/types/webdav.types.d.ts +1 -0
  63. package/dist/utils/cli.utils.d.ts +1 -1
  64. package/dist/utils/drive.utils.js +3 -1
  65. package/dist/utils/network.utils.d.ts +3 -9
  66. package/dist/utils/network.utils.js +21 -7
  67. package/dist/utils/webdav.utils.d.ts +16 -2
  68. package/dist/utils/webdav.utils.js +70 -19
  69. package/dist/utils/xml.utils.d.ts +1 -0
  70. package/dist/utils/xml.utils.js +3 -0
  71. package/dist/webdav/handlers/DELETE.handler.d.ts +5 -1
  72. package/dist/webdav/handlers/DELETE.handler.js +15 -12
  73. package/dist/webdav/handlers/GET.handler.d.ts +1 -2
  74. package/dist/webdav/handlers/GET.handler.js +10 -13
  75. package/dist/webdav/handlers/HEAD.handler.d.ts +1 -1
  76. package/dist/webdav/handlers/HEAD.handler.js +2 -2
  77. package/dist/webdav/handlers/MKCOL.handler.d.ts +1 -1
  78. package/dist/webdav/handlers/MKCOL.handler.js +15 -16
  79. package/dist/webdav/handlers/MOVE.handler.d.ts +11 -1
  80. package/dist/webdav/handlers/MOVE.handler.js +73 -2
  81. package/dist/webdav/handlers/OPTIONS.handler.d.ts +1 -1
  82. package/dist/webdav/handlers/OPTIONS.handler.js +2 -2
  83. package/dist/webdav/handlers/PROPFIND.handler.d.ts +11 -12
  84. package/dist/webdav/handlers/PROPFIND.handler.js +62 -76
  85. package/dist/webdav/handlers/PUT.handler.d.ts +5 -8
  86. package/dist/webdav/handlers/PUT.handler.js +34 -18
  87. package/dist/webdav/middewares/request-logger.middleware.js +1 -1
  88. package/dist/webdav/webdav-server.d.ts +14 -14
  89. package/dist/webdav/webdav-server.js +31 -14
  90. package/oclif.manifest.json +441 -8
  91. package/package.json +22 -26
  92. package/scripts/add-cert.sh +19 -5
@@ -452,10 +452,120 @@
452
452
  "logs.js"
453
453
  ]
454
454
  },
455
- "move": {
455
+ "move-file": {
456
+ "aliases": [
457
+ "move:file"
458
+ ],
459
+ "args": {},
460
+ "description": "Move a file into a destination folder.",
461
+ "examples": [
462
+ "<%= config.bin %> <%= command.id %>"
463
+ ],
464
+ "flags": {
465
+ "non-interactive": {
466
+ "char": "n",
467
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
468
+ "env": "INXT_NONINTERACTIVE",
469
+ "helpGroup": "helper",
470
+ "name": "non-interactive",
471
+ "required": false,
472
+ "allowNo": false,
473
+ "type": "boolean"
474
+ },
475
+ "id": {
476
+ "char": "i",
477
+ "description": "The file id to be moved.",
478
+ "name": "id",
479
+ "required": false,
480
+ "hasDynamicHelp": false,
481
+ "multiple": false,
482
+ "type": "option"
483
+ },
484
+ "destination": {
485
+ "char": "d",
486
+ "description": "The destination folder id where the file is going to be moved.",
487
+ "name": "destination",
488
+ "required": false,
489
+ "hasDynamicHelp": false,
490
+ "multiple": false,
491
+ "type": "option"
492
+ }
493
+ },
494
+ "hasDynamicHelp": false,
495
+ "hiddenAliases": [],
496
+ "id": "move-file",
497
+ "pluginAlias": "@internxt/cli",
498
+ "pluginName": "@internxt/cli",
499
+ "pluginType": "core",
500
+ "strict": true,
501
+ "enableJsonFlag": false,
502
+ "MAX_ATTEMPTS": 3,
503
+ "isESM": false,
504
+ "relativePath": [
505
+ "dist",
506
+ "commands",
507
+ "move-file.js"
508
+ ]
509
+ },
510
+ "move-folder": {
511
+ "aliases": [
512
+ "move:folder"
513
+ ],
514
+ "args": {},
515
+ "description": "Move a folder into a destination folder.",
516
+ "examples": [
517
+ "<%= config.bin %> <%= command.id %>"
518
+ ],
519
+ "flags": {
520
+ "non-interactive": {
521
+ "char": "n",
522
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
523
+ "env": "INXT_NONINTERACTIVE",
524
+ "helpGroup": "helper",
525
+ "name": "non-interactive",
526
+ "required": false,
527
+ "allowNo": false,
528
+ "type": "boolean"
529
+ },
530
+ "id": {
531
+ "char": "i",
532
+ "description": "The folder id to be moved.",
533
+ "name": "id",
534
+ "required": false,
535
+ "hasDynamicHelp": false,
536
+ "multiple": false,
537
+ "type": "option"
538
+ },
539
+ "destination": {
540
+ "char": "d",
541
+ "description": "The destination folder id where the folder is going to be moved.",
542
+ "name": "destination",
543
+ "required": false,
544
+ "hasDynamicHelp": false,
545
+ "multiple": false,
546
+ "type": "option"
547
+ }
548
+ },
549
+ "hasDynamicHelp": false,
550
+ "hiddenAliases": [],
551
+ "id": "move-folder",
552
+ "pluginAlias": "@internxt/cli",
553
+ "pluginName": "@internxt/cli",
554
+ "pluginType": "core",
555
+ "strict": true,
556
+ "enableJsonFlag": false,
557
+ "MAX_ATTEMPTS": 3,
558
+ "isESM": false,
559
+ "relativePath": [
560
+ "dist",
561
+ "commands",
562
+ "move-folder.js"
563
+ ]
564
+ },
565
+ "rename": {
456
566
  "aliases": [],
457
567
  "args": {},
458
- "description": "Move a folder/file into a destination folder.",
568
+ "description": "Rename a folder/file.",
459
569
  "examples": [
460
570
  "<%= config.bin %> <%= command.id %>"
461
571
  ],
@@ -472,7 +582,219 @@
472
582
  },
473
583
  "id": {
474
584
  "char": "i",
475
- "description": "The item id to be moved (it can be a file id or a folder id).",
585
+ "description": "The ID of the item to rename (can be a file ID or a folder ID).",
586
+ "name": "id",
587
+ "required": false,
588
+ "hasDynamicHelp": false,
589
+ "multiple": false,
590
+ "type": "option"
591
+ },
592
+ "name": {
593
+ "char": "n",
594
+ "description": "The new name for the item.",
595
+ "name": "name",
596
+ "required": false,
597
+ "hasDynamicHelp": false,
598
+ "multiple": false,
599
+ "type": "option"
600
+ }
601
+ },
602
+ "hasDynamicHelp": false,
603
+ "hiddenAliases": [],
604
+ "id": "rename",
605
+ "pluginAlias": "@internxt/cli",
606
+ "pluginName": "@internxt/cli",
607
+ "pluginType": "core",
608
+ "strict": true,
609
+ "enableJsonFlag": false,
610
+ "MAX_ATTEMPTS": 3,
611
+ "isESM": false,
612
+ "relativePath": [
613
+ "dist",
614
+ "commands",
615
+ "rename.js"
616
+ ]
617
+ },
618
+ "trash-clear": {
619
+ "aliases": [
620
+ "trash:clear"
621
+ ],
622
+ "args": {},
623
+ "description": "Deletes permanently all the content of the trash. This action cannot be undone.",
624
+ "examples": [
625
+ "<%= config.bin %> <%= command.id %>"
626
+ ],
627
+ "flags": {
628
+ "non-interactive": {
629
+ "char": "n",
630
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
631
+ "env": "INXT_NONINTERACTIVE",
632
+ "helpGroup": "helper",
633
+ "name": "non-interactive",
634
+ "required": false,
635
+ "allowNo": false,
636
+ "type": "boolean"
637
+ },
638
+ "force": {
639
+ "char": "f",
640
+ "description": "It forces the trash to be emptied without confirmation.",
641
+ "name": "force",
642
+ "required": false,
643
+ "allowNo": false,
644
+ "type": "boolean"
645
+ }
646
+ },
647
+ "hasDynamicHelp": false,
648
+ "hiddenAliases": [],
649
+ "id": "trash-clear",
650
+ "pluginAlias": "@internxt/cli",
651
+ "pluginName": "@internxt/cli",
652
+ "pluginType": "core",
653
+ "strict": true,
654
+ "enableJsonFlag": false,
655
+ "isESM": false,
656
+ "relativePath": [
657
+ "dist",
658
+ "commands",
659
+ "trash-clear.js"
660
+ ]
661
+ },
662
+ "trash-list": {
663
+ "aliases": [
664
+ "trash:list"
665
+ ],
666
+ "args": {},
667
+ "description": "Lists the content of the trash.",
668
+ "examples": [
669
+ "<%= config.bin %> <%= command.id %>"
670
+ ],
671
+ "flags": {
672
+ "non-interactive": {
673
+ "char": "n",
674
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
675
+ "env": "INXT_NONINTERACTIVE",
676
+ "helpGroup": "helper",
677
+ "name": "non-interactive",
678
+ "required": false,
679
+ "allowNo": false,
680
+ "type": "boolean"
681
+ },
682
+ "columns": {
683
+ "description": "only show provided columns (comma-separated)",
684
+ "exclusive": [
685
+ "extended"
686
+ ],
687
+ "name": "columns",
688
+ "hasDynamicHelp": false,
689
+ "multiple": false,
690
+ "type": "option"
691
+ },
692
+ "csv": {
693
+ "description": "output is csv format [alias: --output=csv]",
694
+ "exclusive": [
695
+ "no-truncate"
696
+ ],
697
+ "name": "csv",
698
+ "allowNo": false,
699
+ "type": "boolean"
700
+ },
701
+ "extended": {
702
+ "char": "x",
703
+ "description": "show extra columns",
704
+ "exclusive": [
705
+ "columns"
706
+ ],
707
+ "name": "extended",
708
+ "allowNo": false,
709
+ "type": "boolean"
710
+ },
711
+ "filter": {
712
+ "description": "filter property by partial string matching, ex: name=foo",
713
+ "name": "filter",
714
+ "hasDynamicHelp": false,
715
+ "multiple": false,
716
+ "type": "option"
717
+ },
718
+ "no-header": {
719
+ "description": "hide table header from output",
720
+ "exclusive": [
721
+ "csv"
722
+ ],
723
+ "name": "no-header",
724
+ "allowNo": false,
725
+ "type": "boolean"
726
+ },
727
+ "no-truncate": {
728
+ "description": "do not truncate output to fit screen",
729
+ "exclusive": [
730
+ "csv"
731
+ ],
732
+ "name": "no-truncate",
733
+ "allowNo": false,
734
+ "type": "boolean"
735
+ },
736
+ "output": {
737
+ "description": "output in a more machine friendly format",
738
+ "exclusive": [
739
+ "no-truncate",
740
+ "csv"
741
+ ],
742
+ "name": "output",
743
+ "hasDynamicHelp": false,
744
+ "multiple": false,
745
+ "options": [
746
+ "csv",
747
+ "json",
748
+ "yaml"
749
+ ],
750
+ "type": "option"
751
+ },
752
+ "sort": {
753
+ "description": "property to sort by (prepend '-' for descending)",
754
+ "name": "sort",
755
+ "hasDynamicHelp": false,
756
+ "multiple": false,
757
+ "type": "option"
758
+ }
759
+ },
760
+ "hasDynamicHelp": false,
761
+ "hiddenAliases": [],
762
+ "id": "trash-list",
763
+ "pluginAlias": "@internxt/cli",
764
+ "pluginName": "@internxt/cli",
765
+ "pluginType": "core",
766
+ "strict": true,
767
+ "enableJsonFlag": false,
768
+ "isESM": false,
769
+ "relativePath": [
770
+ "dist",
771
+ "commands",
772
+ "trash-list.js"
773
+ ]
774
+ },
775
+ "trash-restore-file": {
776
+ "aliases": [
777
+ "trash:restore:file"
778
+ ],
779
+ "args": {},
780
+ "description": "Restore a trashed file into a destination folder.",
781
+ "examples": [
782
+ "<%= config.bin %> <%= command.id %>"
783
+ ],
784
+ "flags": {
785
+ "non-interactive": {
786
+ "char": "n",
787
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
788
+ "env": "INXT_NONINTERACTIVE",
789
+ "helpGroup": "helper",
790
+ "name": "non-interactive",
791
+ "required": false,
792
+ "allowNo": false,
793
+ "type": "boolean"
794
+ },
795
+ "id": {
796
+ "char": "i",
797
+ "description": "The file id to be restored from the trash.",
476
798
  "name": "id",
477
799
  "required": false,
478
800
  "hasDynamicHelp": false,
@@ -481,7 +803,7 @@
481
803
  },
482
804
  "destination": {
483
805
  "char": "d",
484
- "description": "The destination folder id where the item is going to be moved.",
806
+ "description": "The folder id where the file is going to be restored. Leave empty for the root folder.",
485
807
  "name": "destination",
486
808
  "required": false,
487
809
  "hasDynamicHelp": false,
@@ -491,7 +813,7 @@
491
813
  },
492
814
  "hasDynamicHelp": false,
493
815
  "hiddenAliases": [],
494
- "id": "move",
816
+ "id": "trash-restore-file",
495
817
  "pluginAlias": "@internxt/cli",
496
818
  "pluginName": "@internxt/cli",
497
819
  "pluginType": "core",
@@ -502,7 +824,62 @@
502
824
  "relativePath": [
503
825
  "dist",
504
826
  "commands",
505
- "move.js"
827
+ "trash-restore-file.js"
828
+ ]
829
+ },
830
+ "trash-restore-folder": {
831
+ "aliases": [
832
+ "trash:restore:folder"
833
+ ],
834
+ "args": {},
835
+ "description": "Restore a trashed folder into a destination folder.",
836
+ "examples": [
837
+ "<%= config.bin %> <%= command.id %>"
838
+ ],
839
+ "flags": {
840
+ "non-interactive": {
841
+ "char": "n",
842
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
843
+ "env": "INXT_NONINTERACTIVE",
844
+ "helpGroup": "helper",
845
+ "name": "non-interactive",
846
+ "required": false,
847
+ "allowNo": false,
848
+ "type": "boolean"
849
+ },
850
+ "id": {
851
+ "char": "i",
852
+ "description": "The folder id to be restored from the trash.",
853
+ "name": "id",
854
+ "required": false,
855
+ "hasDynamicHelp": false,
856
+ "multiple": false,
857
+ "type": "option"
858
+ },
859
+ "destination": {
860
+ "char": "d",
861
+ "description": "The folder id where the folder is going to be restored. Leave empty for the root folder.",
862
+ "name": "destination",
863
+ "required": false,
864
+ "hasDynamicHelp": false,
865
+ "multiple": false,
866
+ "type": "option"
867
+ }
868
+ },
869
+ "hasDynamicHelp": false,
870
+ "hiddenAliases": [],
871
+ "id": "trash-restore-folder",
872
+ "pluginAlias": "@internxt/cli",
873
+ "pluginName": "@internxt/cli",
874
+ "pluginType": "core",
875
+ "strict": true,
876
+ "enableJsonFlag": false,
877
+ "MAX_ATTEMPTS": 3,
878
+ "isESM": false,
879
+ "relativePath": [
880
+ "dist",
881
+ "commands",
882
+ "trash-restore-folder.js"
506
883
  ]
507
884
  },
508
885
  "trash": {
@@ -596,6 +973,62 @@
596
973
  "upload.js"
597
974
  ]
598
975
  },
976
+ "webdav-config": {
977
+ "aliases": [],
978
+ "args": {
979
+ "action": {
980
+ "name": "action",
981
+ "options": [
982
+ "set-http",
983
+ "set-https",
984
+ "change-port"
985
+ ],
986
+ "required": true
987
+ }
988
+ },
989
+ "description": "Edit the configuration of the Internxt CLI WebDav server as the port or the protocol.",
990
+ "examples": [
991
+ "<%= config.bin %> <%= command.id %> set-http",
992
+ "<%= config.bin %> <%= command.id %> set-https",
993
+ "<%= config.bin %> <%= command.id %> change-port"
994
+ ],
995
+ "flags": {
996
+ "non-interactive": {
997
+ "char": "n",
998
+ "description": "Blocks the cli from being interactive. If passed, the cli will not request data through the console and will throw errors directly",
999
+ "env": "INXT_NONINTERACTIVE",
1000
+ "helpGroup": "helper",
1001
+ "name": "non-interactive",
1002
+ "required": false,
1003
+ "allowNo": false,
1004
+ "type": "boolean"
1005
+ },
1006
+ "port": {
1007
+ "char": "p",
1008
+ "description": "The new port that the WebDAV server is going to be have.",
1009
+ "name": "port",
1010
+ "required": false,
1011
+ "hasDynamicHelp": false,
1012
+ "multiple": false,
1013
+ "type": "option"
1014
+ }
1015
+ },
1016
+ "hasDynamicHelp": false,
1017
+ "hiddenAliases": [],
1018
+ "id": "webdav-config",
1019
+ "pluginAlias": "@internxt/cli",
1020
+ "pluginName": "@internxt/cli",
1021
+ "pluginType": "core",
1022
+ "strict": true,
1023
+ "enableJsonFlag": false,
1024
+ "MAX_ATTEMPTS": 3,
1025
+ "isESM": false,
1026
+ "relativePath": [
1027
+ "dist",
1028
+ "commands",
1029
+ "webdav-config.js"
1030
+ ]
1031
+ },
599
1032
  "webdav": {
600
1033
  "aliases": [],
601
1034
  "args": {
@@ -610,7 +1043,7 @@
610
1043
  "required": true
611
1044
  }
612
1045
  },
613
- "description": "Enable,disable, restart or get the status of the Internxt CLI WebDav server",
1046
+ "description": "Enable, disable, restart or get the status of the Internxt CLI WebDav server",
614
1047
  "examples": [
615
1048
  "<%= config.bin %> <%= command.id %> enable",
616
1049
  "<%= config.bin %> <%= command.id %> disable",
@@ -657,5 +1090,5 @@
657
1090
  ]
658
1091
  }
659
1092
  },
660
- "version": "1.2.2"
1093
+ "version": "1.3.1"
661
1094
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "author": "PixoDev",
3
- "version": "1.2.2",
2
+ "author": "Internxt <hello@internxt.com>",
3
+ "version": "1.3.1",
4
4
  "description": "Internxt CLI to manage your encrypted storage",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -8,7 +8,8 @@
8
8
  "postpack": "shx rm -f oclif.manifest.json",
9
9
  "posttest": "yarn lint",
10
10
  "prepack": "yarn build && oclif manifest && oclif readme",
11
- "prepare": "husky",
11
+ "prepare": "husky || true",
12
+ "test": "yarn test:unit",
12
13
  "test:unit": "nyc --reporter=lcov --reporter=text mocha \"test/**/*.test.ts\" --exit",
13
14
  "dev:webdav": "nodemon -e ts --exec ts-node src/webdav/index.ts",
14
15
  "version": "oclif readme && git add README.md",
@@ -16,13 +17,9 @@
16
17
  "migrate": "sequelize db:migrate",
17
18
  "migrate:undo": "sequelize db:migrate:undo",
18
19
  "publish:npm": "npm run build && npm publish --scope=@internxt --registry=https://registry.npmjs.org/ --access public",
19
- "publish:github": "npm publish",
20
+ "publish:github": "npm run build && npm publish --scope=@internxt --registry=https://npm.pkg.github.com",
20
21
  "postinstall": "node ./scripts/skip-in-ci.js || internxt webdav restart"
21
22
  },
22
- "publishConfig": {
23
- "access": "public",
24
- "registry": "https://registry.npmjs.org/"
25
- },
26
23
  "homepage": "https://github.com/internxt/cli",
27
24
  "license": "MIT",
28
25
  "main": "",
@@ -40,30 +37,29 @@
40
37
  "dependencies": {
41
38
  "@internxt/inxt-js": "^2.0.11",
42
39
  "@internxt/lib": "^1.2.1",
43
- "@internxt/sdk": "^1.4.79",
40
+ "@internxt/sdk": "1.6.4",
44
41
  "@oclif/core": "^3",
45
- "@rudderstack/rudder-sdk-node": "^2.0.7",
46
- "axios": "^1.6.7",
42
+ "axios": "^1.7.7",
47
43
  "bip39": "^3.1.0",
48
- "body-parser": "^1.20.2",
44
+ "body-parser": "^1.20.3",
49
45
  "chalk": "^5.3.0",
50
- "dayjs": "^1.11.10",
46
+ "dayjs": "^1.11.13",
51
47
  "dotenv": "^16.4.5",
52
- "express": "^4.18.3",
48
+ "express": "^4.21.1",
53
49
  "express-async-handler": "^1.2.0",
54
50
  "express-basic-auth": "^1.2.1",
55
- "fast-xml-parser": "^4.3.5",
51
+ "fast-xml-parser": "^4.5.0",
56
52
  "mime-types": "^2.1.35",
57
- "node-fetch": "2",
53
+ "node-fetch": "^2",
58
54
  "openpgp": "^5.11.1",
59
- "pm2": "^5.3.1",
55
+ "pm2": "^5.4.2",
60
56
  "reflect-metadata": "^0.2.2",
61
57
  "selfsigned": "^2.4.1",
62
- "sequelize": "^6.37.2",
58
+ "sequelize": "^6.37.5",
63
59
  "sequelize-typescript": "^2.1.6",
64
60
  "sqlite3": "^5.1.7",
65
- "superagent": "^8.1.2",
66
- "winston": "^3.12.0"
61
+ "superagent": "^10.1.1",
62
+ "winston": "^3.16.0"
67
63
  },
68
64
  "devDependencies": {
69
65
  "@internxt/eslint-config-internxt": "^1.0.9",
@@ -79,21 +75,21 @@
79
75
  "@types/node-fetch": "^2.6.11",
80
76
  "@types/sinon-chai": "^3.2.12",
81
77
  "@types/sinon-express-mock": "^1.3.12",
82
- "@types/superagent": "^8.1.3",
78
+ "@types/superagent": "^8.1.9",
83
79
  "chai": "^4",
84
80
  "eslint": "^8",
85
81
  "eslint-config-oclif": "^5",
86
82
  "eslint-config-oclif-typescript": "^3",
87
83
  "eslint-config-prettier": "^9.1.0",
88
- "husky": "^9.0.11",
89
- "lint-staged": "^15.2.2",
84
+ "husky": "^9.1.6",
85
+ "lint-staged": "^15.2.10",
90
86
  "makensis": "^2.0.8",
91
87
  "mocha": "^10",
92
88
  "nock": "^13.5.4",
93
- "nodemon": "^3.1.0",
94
- "nyc": "^15.1.0",
89
+ "nodemon": "^3.1.7",
90
+ "nyc": "^17.1.0",
95
91
  "oclif": "^4.5.1",
96
- "prettier": "^3.2.5",
92
+ "prettier": "^3.3.3",
97
93
  "shx": "^0.3.4",
98
94
  "sinon-chai": "^3.7.0",
99
95
  "sinon-express-mock": "^2.2.1",
@@ -1,10 +1,24 @@
1
1
  #!/bin/bash
2
2
 
3
- CERT_PATH=$1
3
+ CERT_PATH="$1"
4
+
5
+ if [[ -z "$CERT_PATH" ]]; then
6
+ echo "Usage: $0 path_to_certificate"
7
+ exit 1
8
+ fi
4
9
 
5
10
  if [[ "$OSTYPE" == "darwin"* ]]; then
6
- sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $CERT_PATH
7
- else
8
- sudo cp $CERT_PATH /usr/local/share/ca-certificates/
11
+ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$CERT_PATH"
12
+ elif [[ -d "/usr/local/share/ca-certificates/" ]]; then # For Debian-based distributions
13
+ sudo cp "$CERT_PATH" /usr/local/share/ca-certificates/
9
14
  sudo update-ca-certificates
10
- fi
15
+ elif [[ -d "/etc/pki/ca-trust/source/anchors/" ]]; then # For Fedora-based distribution
16
+ sudo cp "$CERT_PATH" /etc/pki/ca-trust/source/anchors/
17
+ sudo update-ca-trust -i
18
+ elif [[ -d "/etc/ca-certificates/trust-source/anchors/" ]]; then # For Arch Linux and derivatives
19
+ sudo cp "$CERT_PATH" /etc/ca-certificates/trust-source/anchors/
20
+ sudo trust extract-compat
21
+ else
22
+ echo "Local certificates folder not found"
23
+ exit 1
24
+ fi