@serviceme/devtools-core 0.4.3 → 0.4.4

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/dist/index.d.mts CHANGED
@@ -667,39 +667,12 @@ declare const defaultRepoSchema: z.ZodObject<{
667
667
  addedAt: z.ZodString;
668
668
  lastSyncAt: z.ZodOptional<z.ZodString>;
669
669
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
670
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
670
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
671
+ ok: "ok";
672
+ error: "error";
673
+ }>>;
671
674
  lastSyncError: z.ZodOptional<z.ZodString>;
672
- }, "strip", z.ZodTypeAny, {
673
- name: string;
674
- id: string;
675
- description: string;
676
- source: "default";
677
- url: string;
678
- branch: string;
679
- enabled: boolean;
680
- useProxy: boolean;
681
- writeEnabled: boolean;
682
- addedAt: string;
683
- lastSyncAt?: string | undefined;
684
- lastSyncCommitSha?: string | undefined;
685
- lastSyncStatus?: "ok" | "error" | undefined;
686
- lastSyncError?: string | undefined;
687
- }, {
688
- name: string;
689
- id: string;
690
- description: string;
691
- source: "default";
692
- url: string;
693
- branch: string;
694
- enabled: boolean;
695
- writeEnabled: boolean;
696
- addedAt: string;
697
- useProxy?: boolean | undefined;
698
- lastSyncAt?: string | undefined;
699
- lastSyncCommitSha?: string | undefined;
700
- lastSyncStatus?: "ok" | "error" | undefined;
701
- lastSyncError?: string | undefined;
702
- }>;
675
+ }, z.core.$strip>;
703
676
  declare const userRepoSchema: z.ZodObject<{
704
677
  source: z.ZodLiteral<"user">;
705
678
  id: z.ZodString;
@@ -712,38 +685,13 @@ declare const userRepoSchema: z.ZodObject<{
712
685
  addedAt: z.ZodString;
713
686
  lastSyncAt: z.ZodOptional<z.ZodString>;
714
687
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
715
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
688
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
689
+ ok: "ok";
690
+ error: "error";
691
+ }>>;
716
692
  lastSyncError: z.ZodOptional<z.ZodString>;
717
- }, "strip", z.ZodTypeAny, {
718
- name: string;
719
- id: string;
720
- source: "user";
721
- url: string;
722
- branch: string;
723
- enabled: boolean;
724
- useProxy: boolean;
725
- writeEnabled: boolean;
726
- addedAt: string;
727
- lastSyncAt?: string | undefined;
728
- lastSyncCommitSha?: string | undefined;
729
- lastSyncStatus?: "ok" | "error" | undefined;
730
- lastSyncError?: string | undefined;
731
- }, {
732
- name: string;
733
- id: string;
734
- source: "user";
735
- url: string;
736
- branch: string;
737
- enabled: boolean;
738
- writeEnabled: boolean;
739
- addedAt: string;
740
- useProxy?: boolean | undefined;
741
- lastSyncAt?: string | undefined;
742
- lastSyncCommitSha?: string | undefined;
743
- lastSyncStatus?: "ok" | "error" | undefined;
744
- lastSyncError?: string | undefined;
745
- }>;
746
- declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
693
+ }, z.core.$strip>;
694
+ declare const repoSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
747
695
  source: z.ZodLiteral<"default">;
748
696
  description: z.ZodString;
749
697
  id: z.ZodString;
@@ -756,39 +704,12 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
756
704
  addedAt: z.ZodString;
757
705
  lastSyncAt: z.ZodOptional<z.ZodString>;
758
706
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
759
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
707
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
708
+ ok: "ok";
709
+ error: "error";
710
+ }>>;
760
711
  lastSyncError: z.ZodOptional<z.ZodString>;
761
- }, "strip", z.ZodTypeAny, {
762
- name: string;
763
- id: string;
764
- description: string;
765
- source: "default";
766
- url: string;
767
- branch: string;
768
- enabled: boolean;
769
- useProxy: boolean;
770
- writeEnabled: boolean;
771
- addedAt: string;
772
- lastSyncAt?: string | undefined;
773
- lastSyncCommitSha?: string | undefined;
774
- lastSyncStatus?: "ok" | "error" | undefined;
775
- lastSyncError?: string | undefined;
776
- }, {
777
- name: string;
778
- id: string;
779
- description: string;
780
- source: "default";
781
- url: string;
782
- branch: string;
783
- enabled: boolean;
784
- writeEnabled: boolean;
785
- addedAt: string;
786
- useProxy?: boolean | undefined;
787
- lastSyncAt?: string | undefined;
788
- lastSyncCommitSha?: string | undefined;
789
- lastSyncStatus?: "ok" | "error" | undefined;
790
- lastSyncError?: string | undefined;
791
- }>, z.ZodObject<{
712
+ }, z.core.$strip>, z.ZodObject<{
792
713
  source: z.ZodLiteral<"user">;
793
714
  id: z.ZodString;
794
715
  name: z.ZodString;
@@ -800,41 +721,16 @@ declare const repoSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
800
721
  addedAt: z.ZodString;
801
722
  lastSyncAt: z.ZodOptional<z.ZodString>;
802
723
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
803
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
724
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
725
+ ok: "ok";
726
+ error: "error";
727
+ }>>;
804
728
  lastSyncError: z.ZodOptional<z.ZodString>;
805
- }, "strip", z.ZodTypeAny, {
806
- name: string;
807
- id: string;
808
- source: "user";
809
- url: string;
810
- branch: string;
811
- enabled: boolean;
812
- useProxy: boolean;
813
- writeEnabled: boolean;
814
- addedAt: string;
815
- lastSyncAt?: string | undefined;
816
- lastSyncCommitSha?: string | undefined;
817
- lastSyncStatus?: "ok" | "error" | undefined;
818
- lastSyncError?: string | undefined;
819
- }, {
820
- name: string;
821
- id: string;
822
- source: "user";
823
- url: string;
824
- branch: string;
825
- enabled: boolean;
826
- writeEnabled: boolean;
827
- addedAt: string;
828
- useProxy?: boolean | undefined;
829
- lastSyncAt?: string | undefined;
830
- lastSyncCommitSha?: string | undefined;
831
- lastSyncStatus?: "ok" | "error" | undefined;
832
- lastSyncError?: string | undefined;
833
- }>]>;
834
- declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
729
+ }, z.core.$strip>], "source">;
730
+ declare const reposFileSchema: z.ZodObject<{
835
731
  version: z.ZodLiteral<1>;
836
732
  defaultRepoId: z.ZodString;
837
- repos: z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
733
+ repos: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
838
734
  source: z.ZodLiteral<"default">;
839
735
  description: z.ZodString;
840
736
  id: z.ZodString;
@@ -847,39 +743,12 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
847
743
  addedAt: z.ZodString;
848
744
  lastSyncAt: z.ZodOptional<z.ZodString>;
849
745
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
850
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
746
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
747
+ ok: "ok";
748
+ error: "error";
749
+ }>>;
851
750
  lastSyncError: z.ZodOptional<z.ZodString>;
852
- }, "strip", z.ZodTypeAny, {
853
- name: string;
854
- id: string;
855
- description: string;
856
- source: "default";
857
- url: string;
858
- branch: string;
859
- enabled: boolean;
860
- useProxy: boolean;
861
- writeEnabled: boolean;
862
- addedAt: string;
863
- lastSyncAt?: string | undefined;
864
- lastSyncCommitSha?: string | undefined;
865
- lastSyncStatus?: "ok" | "error" | undefined;
866
- lastSyncError?: string | undefined;
867
- }, {
868
- name: string;
869
- id: string;
870
- description: string;
871
- source: "default";
872
- url: string;
873
- branch: string;
874
- enabled: boolean;
875
- writeEnabled: boolean;
876
- addedAt: string;
877
- useProxy?: boolean | undefined;
878
- lastSyncAt?: string | undefined;
879
- lastSyncCommitSha?: string | undefined;
880
- lastSyncStatus?: "ok" | "error" | undefined;
881
- lastSyncError?: string | undefined;
882
- }>, z.ZodObject<{
751
+ }, z.core.$strip>, z.ZodObject<{
883
752
  source: z.ZodLiteral<"user">;
884
753
  id: z.ZodString;
885
754
  name: z.ZodString;
@@ -891,170 +760,13 @@ declare const reposFileSchema: z.ZodEffects<z.ZodObject<{
891
760
  addedAt: z.ZodString;
892
761
  lastSyncAt: z.ZodOptional<z.ZodString>;
893
762
  lastSyncCommitSha: z.ZodOptional<z.ZodString>;
894
- lastSyncStatus: z.ZodOptional<z.ZodEnum<["ok", "error"]>>;
763
+ lastSyncStatus: z.ZodOptional<z.ZodEnum<{
764
+ ok: "ok";
765
+ error: "error";
766
+ }>>;
895
767
  lastSyncError: z.ZodOptional<z.ZodString>;
896
- }, "strip", z.ZodTypeAny, {
897
- name: string;
898
- id: string;
899
- source: "user";
900
- url: string;
901
- branch: string;
902
- enabled: boolean;
903
- useProxy: boolean;
904
- writeEnabled: boolean;
905
- addedAt: string;
906
- lastSyncAt?: string | undefined;
907
- lastSyncCommitSha?: string | undefined;
908
- lastSyncStatus?: "ok" | "error" | undefined;
909
- lastSyncError?: string | undefined;
910
- }, {
911
- name: string;
912
- id: string;
913
- source: "user";
914
- url: string;
915
- branch: string;
916
- enabled: boolean;
917
- writeEnabled: boolean;
918
- addedAt: string;
919
- useProxy?: boolean | undefined;
920
- lastSyncAt?: string | undefined;
921
- lastSyncCommitSha?: string | undefined;
922
- lastSyncStatus?: "ok" | "error" | undefined;
923
- lastSyncError?: string | undefined;
924
- }>]>, "many">;
925
- }, "strip", z.ZodTypeAny, {
926
- version: 1;
927
- repos: ({
928
- name: string;
929
- id: string;
930
- description: string;
931
- source: "default";
932
- url: string;
933
- branch: string;
934
- enabled: boolean;
935
- useProxy: boolean;
936
- writeEnabled: boolean;
937
- addedAt: string;
938
- lastSyncAt?: string | undefined;
939
- lastSyncCommitSha?: string | undefined;
940
- lastSyncStatus?: "ok" | "error" | undefined;
941
- lastSyncError?: string | undefined;
942
- } | {
943
- name: string;
944
- id: string;
945
- source: "user";
946
- url: string;
947
- branch: string;
948
- enabled: boolean;
949
- useProxy: boolean;
950
- writeEnabled: boolean;
951
- addedAt: string;
952
- lastSyncAt?: string | undefined;
953
- lastSyncCommitSha?: string | undefined;
954
- lastSyncStatus?: "ok" | "error" | undefined;
955
- lastSyncError?: string | undefined;
956
- })[];
957
- defaultRepoId: string;
958
- }, {
959
- version: 1;
960
- repos: ({
961
- name: string;
962
- id: string;
963
- description: string;
964
- source: "default";
965
- url: string;
966
- branch: string;
967
- enabled: boolean;
968
- writeEnabled: boolean;
969
- addedAt: string;
970
- useProxy?: boolean | undefined;
971
- lastSyncAt?: string | undefined;
972
- lastSyncCommitSha?: string | undefined;
973
- lastSyncStatus?: "ok" | "error" | undefined;
974
- lastSyncError?: string | undefined;
975
- } | {
976
- name: string;
977
- id: string;
978
- source: "user";
979
- url: string;
980
- branch: string;
981
- enabled: boolean;
982
- writeEnabled: boolean;
983
- addedAt: string;
984
- useProxy?: boolean | undefined;
985
- lastSyncAt?: string | undefined;
986
- lastSyncCommitSha?: string | undefined;
987
- lastSyncStatus?: "ok" | "error" | undefined;
988
- lastSyncError?: string | undefined;
989
- })[];
990
- defaultRepoId: string;
991
- }>, {
992
- version: 1;
993
- repos: ({
994
- name: string;
995
- id: string;
996
- description: string;
997
- source: "default";
998
- url: string;
999
- branch: string;
1000
- enabled: boolean;
1001
- useProxy: boolean;
1002
- writeEnabled: boolean;
1003
- addedAt: string;
1004
- lastSyncAt?: string | undefined;
1005
- lastSyncCommitSha?: string | undefined;
1006
- lastSyncStatus?: "ok" | "error" | undefined;
1007
- lastSyncError?: string | undefined;
1008
- } | {
1009
- name: string;
1010
- id: string;
1011
- source: "user";
1012
- url: string;
1013
- branch: string;
1014
- enabled: boolean;
1015
- useProxy: boolean;
1016
- writeEnabled: boolean;
1017
- addedAt: string;
1018
- lastSyncAt?: string | undefined;
1019
- lastSyncCommitSha?: string | undefined;
1020
- lastSyncStatus?: "ok" | "error" | undefined;
1021
- lastSyncError?: string | undefined;
1022
- })[];
1023
- defaultRepoId: string;
1024
- }, {
1025
- version: 1;
1026
- repos: ({
1027
- name: string;
1028
- id: string;
1029
- description: string;
1030
- source: "default";
1031
- url: string;
1032
- branch: string;
1033
- enabled: boolean;
1034
- writeEnabled: boolean;
1035
- addedAt: string;
1036
- useProxy?: boolean | undefined;
1037
- lastSyncAt?: string | undefined;
1038
- lastSyncCommitSha?: string | undefined;
1039
- lastSyncStatus?: "ok" | "error" | undefined;
1040
- lastSyncError?: string | undefined;
1041
- } | {
1042
- name: string;
1043
- id: string;
1044
- source: "user";
1045
- url: string;
1046
- branch: string;
1047
- enabled: boolean;
1048
- writeEnabled: boolean;
1049
- addedAt: string;
1050
- useProxy?: boolean | undefined;
1051
- lastSyncAt?: string | undefined;
1052
- lastSyncCommitSha?: string | undefined;
1053
- lastSyncStatus?: "ok" | "error" | undefined;
1054
- lastSyncError?: string | undefined;
1055
- })[];
1056
- defaultRepoId: string;
1057
- }>;
768
+ }, z.core.$strip>], "source">>;
769
+ }, z.core.$strip>;
1058
770
  /** Inferred Zod type — identical to our hand-written `ReposFile`. */
1059
771
  type ReposFileInput = z.infer<typeof reposFileSchema>;
1060
772
  /** Result of a load attempt — either a parsed file or a recovery notice. */
@@ -1307,9 +1019,10 @@ declare class CannotRemoveDefaultRepoError extends Error {
1307
1019
  }
1308
1020
  /**
1309
1021
  * Bootstrap helper — invokes `ensureDefaultsInstalled` on the store to
1310
- * guarantee that all default repos are present. Returns the resulting
1311
- * config. Lives here (not in `default-repos.ts`) to keep the default-repo
1312
- * module free of store concerns.
1022
+ * guarantee that all default repos are present and their catalog metadata
1023
+ * is up to date with `DEFAULT_REPO_SEEDS`. Returns the resulting config.
1024
+ * Lives here (not in `default-repos.ts`) to keep the default-repo module
1025
+ * free of store concerns.
1313
1026
  */
1314
1027
  declare function bootstrapDefaults(store: ReposStore): Promise<ReposFile>;
1315
1028
 
@@ -1351,6 +1064,8 @@ interface AddUserRepoInput {
1351
1064
  branch?: string;
1352
1065
  /** Optional display name (defaults to id). */
1353
1066
  name?: string;
1067
+ /** Whether this repo participates in scheduled syncs. Defaults to true. */
1068
+ enabled?: boolean;
1354
1069
  /** Route git traffic via the server proxy (default true). */
1355
1070
  useProxy?: boolean;
1356
1071
  }
@@ -1457,9 +1172,10 @@ declare function getDefaultRepoConfig(id: string, now?: () => string): DefaultRe
1457
1172
  declare function buildDefaultReposFile(now?: () => string, existing?: ReposFile): ReposFile;
1458
1173
  /**
1459
1174
  * `ensureDefaultsInstalled(existing)` — pure helper that returns either
1460
- * `existing` (when defaults are already present) or a merged copy that
1461
- * appends the missing defaults. The companion `ensureDefaultsInstalledInStore`
1462
- * below is the mutating, store-bound counterpart.
1175
+ * `existing` (when defaults are already present and up to date) or a merged
1176
+ * copy that appends the missing defaults and refreshes catalog metadata on
1177
+ * existing ones. The companion `ensureDefaultsInstalledInStore` below is the
1178
+ * mutating, store-bound counterpart.
1463
1179
  */
1464
1180
  declare function ensureDefaultsInstalled(existing: ReposFile, now?: () => string): {
1465
1181
  config: ReposFile;