@chisquare-tech/origine-ngx-apps-code 0.12.0 → 0.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chisquare-tech/origine-ngx-apps-code",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Origine's Code module screens: repositories, files, commits, branches, pull requests and review, repository settings.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -68,6 +68,57 @@ interface Repo {
68
68
  /** The caller's collaborator permission on this repository (read, write or maintain), if any. */
69
69
  collaborator?: string;
70
70
  createdAt?: string;
71
+ /** The repository is a pull mirror of its import source, read-only for pushes (V6-01). */
72
+ mirror?: boolean;
73
+ }
74
+ /** A repository's pull mirror (V6-01). */
75
+ interface Mirror {
76
+ source: string;
77
+ intervalMinutes: number;
78
+ /** Whom the mirror syncs as: who set it up, or last saved it. */
79
+ setBy: string;
80
+ nextSyncAt: string;
81
+ lastSyncAt?: string;
82
+ lastSuccessAt?: string;
83
+ lastError?: string;
84
+ lfsMissing?: number;
85
+ hasCredentials: boolean;
86
+ waiting: boolean;
87
+ syncing: boolean;
88
+ }
89
+ /** One conflicted file of a pull request, for the resolver (V6-03). */
90
+ interface ConflictFile {
91
+ path: string;
92
+ /** content (resolvable here), binary, modify/delete, rename, large, lfs or other. */
93
+ kind: string;
94
+ resolvable: boolean;
95
+ message?: string;
96
+ base?: string;
97
+ ours?: string;
98
+ theirs?: string;
99
+ merged?: string;
100
+ }
101
+ /** A pull request's conflicts with its target (V6-03). */
102
+ interface Conflicts {
103
+ number: number;
104
+ source: string;
105
+ target: string;
106
+ headSha: string;
107
+ baseSha: string;
108
+ files: ConflictFile[];
109
+ resolvable: boolean;
110
+ canResolve: boolean;
111
+ /** The resolution lands on the head branch; else on a new branch with a pull request into it. */
112
+ direct: boolean;
113
+ }
114
+ /** Where a resolution went (V6-03). */
115
+ interface Resolution {
116
+ branch: string;
117
+ commit: {
118
+ oid: string;
119
+ short: string;
120
+ };
121
+ pull?: number;
71
122
  }
72
123
  interface GitPerson {
73
124
  name: string;
@@ -475,7 +526,22 @@ declare class CodeApi {
475
526
  token?: string;
476
527
  description?: string;
477
528
  visibility?: string;
529
+ mirror?: boolean;
530
+ intervalMinutes?: number;
478
531
  }): Observable<Repo>;
532
+ /** A repository's pull mirror (V6-01). */
533
+ mirror(project: string, name: string): Observable<Mirror>;
534
+ /** Changes the mirror's source, credentials or interval; the saver becomes whom it syncs as. */
535
+ updateMirror(project: string, name: string, body: Partial<{
536
+ url: string;
537
+ username: string;
538
+ token: string;
539
+ clearCredentials: boolean;
540
+ intervalMinutes: number;
541
+ }>): Observable<Mirror>;
542
+ syncMirror(project: string, name: string): Observable<Mirror>;
543
+ /** Stops mirroring: an ordinary repository that takes pushes. */
544
+ stopMirror(project: string, name: string): Observable<Repo>;
479
545
  repo(project: string, name: string): Observable<Repo>;
480
546
  update(project: string, name: string, body: Partial<{
481
547
  name: string;
@@ -577,6 +643,15 @@ declare class CodeApi {
577
643
  deleteBranch?: boolean;
578
644
  expectHead?: string;
579
645
  }): Observable<Pull>;
646
+ /** A pull request's conflicts with its target, for the resolver (V6-03). */
647
+ conflicts(project: string, name: string, n: number): Observable<Conflicts>;
648
+ /** Commits a resolution of the conflicts (V6-03). */
649
+ resolveConflicts(project: string, name: string, n: number, body: {
650
+ files: Record<string, string>;
651
+ message?: string;
652
+ expectHead: string;
653
+ expectBase: string;
654
+ }): Observable<Resolution>;
580
655
  conversation(project: string, name: string, n: number): Observable<Timeline>;
581
656
  comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment>;
582
657
  /** Arms (method) or disarms (null) auto-merge on a pull request (DEV-25). */
@@ -624,6 +699,17 @@ declare class CurrentRepo {
624
699
  * component's encapsulation, hence ::ng-deep.
625
700
  */
626
701
  declare const TOKEN_CSS = "\n :host ::ng-deep [class^=\"tk-k\"]{color:var(--o-tk-k)}\n :host ::ng-deep [class^=\"tk-s\"], :host ::ng-deep [class^=\"tk-l\"]{color:var(--o-tk-s)}\n :host ::ng-deep [class^=\"tk-c\"]{color:var(--o-tk-c);font-style:italic}\n :host ::ng-deep [class^=\"tk-m\"]{color:var(--o-tk-n)}\n :host ::ng-deep .tk-nf, :host ::ng-deep .tk-nx, :host ::ng-deep .tk-fm{color:var(--o-tk-f)}\n :host ::ng-deep .tk-nb, :host ::ng-deep .tk-nt, :host ::ng-deep .tk-bp{color:var(--o-tk-p)}\n :host ::ng-deep .tk-gi{color:var(--o-add)} :host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n";
702
+ /** A commit's verification badge (DEV-31, V6-04): commits Origine made read "Verified · Origine". */
703
+ declare function verifyLabel(v: {
704
+ verified: boolean;
705
+ signer?: string;
706
+ }): string;
707
+ /** The badge's hover text: whose key signed it, or why it is not verified. */
708
+ declare function verifyTitle(v: {
709
+ verified: boolean;
710
+ reason: string;
711
+ signer?: string;
712
+ }, name: (id: string) => string): string;
627
713
  /** Why a signed commit is not verified (DEV-31). */
628
714
  declare function verifyWhy(reason: string): string;
629
715
 
@@ -643,8 +729,15 @@ declare abstract class RepoPage {
643
729
  protected readonly note: _angular_core.WritableSignal<string>;
644
730
  protected readonly people: _angular_core.Signal<People>;
645
731
  protected readonly verifyWhy: typeof verifyWhy;
732
+ protected readonly verifyLabel: typeof verifyLabel;
733
+ protected verifyTitle(v: {
734
+ verified: boolean;
735
+ reason: string;
736
+ signer?: string;
737
+ }): string;
646
738
  /** Whether the caller holds code capability id on this repository (V4-01): its caps, a collaborator row included. */
647
739
  protected can(id: string): boolean;
740
+ /** Takes writes: not archived, and not a pull mirror (V6-01). */
648
741
  private readonly live;
649
742
  protected readonly canWrite: _angular_core.Signal<boolean>;
650
743
  /** Every repository setting, a rename and the visibility included. */
@@ -810,6 +903,8 @@ declare class NewRepoPage {
810
903
  protected url_: string;
811
904
  protected user: string;
812
905
  protected token: string;
906
+ protected mirror: boolean;
907
+ protected interval: number;
813
908
  constructor();
814
909
  protected nameFromUrl(): void;
815
910
  protected copyUrl(): void;
@@ -1094,6 +1189,10 @@ declare class PullPage extends RepoPage {
1094
1189
  protected readonly method: _angular_core.WritableSignal<string>;
1095
1190
  protected readonly delBranch: _angular_core.WritableSignal<boolean>;
1096
1191
  private number;
1192
+ /** The conflict resolver (V6-03): the conflicts, and each file's resolution as edited. */
1193
+ protected readonly resolver: _angular_core.WritableSignal<Conflicts | null>;
1194
+ protected readonly resolved: _angular_core.WritableSignal<Record<string, string>>;
1195
+ protected readonly resolutionReady: _angular_core.Signal<boolean>;
1097
1196
  protected readonly ago: (s?: string) => string;
1098
1197
  protected readonly initials: typeof initials;
1099
1198
  protected readonly dot: typeof checkDot;
@@ -1164,6 +1263,11 @@ declare class PullPage extends RepoPage {
1164
1263
  resolved: boolean;
1165
1264
  }): void;
1166
1265
  protected merge(): void;
1266
+ protected openResolver(): void;
1267
+ protected take(path: string, text: string): void;
1268
+ protected hasMarkers(text?: string): boolean;
1269
+ protected conflictKind(kind: string): string;
1270
+ protected commitResolution(): void;
1167
1271
  protected close(reopen: boolean): void;
1168
1272
  protected outside(e: MouseEvent): void;
1169
1273
  private sendReview;
@@ -1173,7 +1277,7 @@ declare class PullPage extends RepoPage {
1173
1277
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PullPage, "o-code-pull", never, {}, {}, never, never, true, never>;
1174
1278
  }
1175
1279
 
1176
- type Section = 'general' | 'protect' | 'collab' | 'danger';
1280
+ type Section = 'general' | 'mirror' | 'protect' | 'collab' | 'danger';
1177
1281
  interface RuleForm {
1178
1282
  id: string;
1179
1283
  pattern: string;
@@ -1223,6 +1327,18 @@ declare class RepoSettingsPage extends RepoPage {
1223
1327
  label: string;
1224
1328
  }[]>;
1225
1329
  constructor();
1330
+ protected readonly ago: typeof ago;
1331
+ protected readonly mirror: _angular_core.WritableSignal<Mirror | null>;
1332
+ protected mf: {
1333
+ url: string;
1334
+ username: string;
1335
+ token: string;
1336
+ interval: number;
1337
+ };
1338
+ private loadMirror;
1339
+ protected syncNow(): void;
1340
+ protected saveMirror(): void;
1341
+ protected stopMirror(): void;
1226
1342
  protected readonly collabs: _angular_core.WritableSignal<Collaborator[]>;
1227
1343
  protected readonly perms: {
1228
1344
  id: string;
@@ -1348,5 +1464,5 @@ declare class CodeSearchPage extends RepoPage {
1348
1464
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CodeSearchPage, "o-code-search", never, {}, {}, never, never, true, never>;
1349
1465
  }
1350
1466
 
1351
- export { BranchesPage, CodeApi, CodeHost, CodeSearchPage, CommitBox, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewFilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, matchesPattern, pair, shortDate, size, verifyWhy };
1352
- export type { BlameHunk, Blob, BlobTable, CheckStatus, CodeHit, CodePerson, CodeProject, Collaborator, Commit, CommitChoice, CommitDetail, CommitRequest, CommitResult, Comparison, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LfsObject, LineComment, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };
1467
+ export { BranchesPage, CodeApi, CodeHost, CodeSearchPage, CommitBox, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewFilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, matchesPattern, pair, shortDate, size, verifyLabel, verifyTitle, verifyWhy };
1468
+ export type { BlameHunk, Blob, BlobTable, CheckStatus, CodeHit, CodePerson, CodeProject, Collaborator, Commit, CommitChoice, CommitDetail, CommitRequest, CommitResult, Comparison, ConflictFile, Conflicts, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LfsObject, LineComment, Mirror, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Resolution, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };