@chisquare-tech/origine-ngx-apps-code 0.8.0 → 0.9.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.8.0",
3
+ "version": "0.9.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",
@@ -74,6 +74,13 @@ interface Commit {
74
74
  committer: GitPerson;
75
75
  parents: string[];
76
76
  keys: string[];
77
+ signed?: boolean;
78
+ /** The signature checked against the committer's signing keys (DEV-31); absent when unsigned. */
79
+ verification?: {
80
+ verified: boolean;
81
+ reason: string;
82
+ signer?: string;
83
+ };
77
84
  }
78
85
  interface FileChange {
79
86
  status: string;
@@ -257,6 +264,10 @@ interface Protection {
257
264
  dismissStaleApprovals: boolean;
258
265
  requireUpToDate: boolean;
259
266
  requireCodeOwnerReview?: boolean;
267
+ requireSignedCommits?: boolean;
268
+ requireLinearHistory?: boolean;
269
+ /** Roles that may bypass the rule: owner, admin, maintainer. */
270
+ bypass?: string[];
260
271
  requiredChecks: string[];
261
272
  }
262
273
  interface PullBrief {
@@ -556,6 +567,8 @@ declare class CurrentRepo {
556
567
  * component's encapsulation, hence ::ng-deep.
557
568
  */
558
569
  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";
570
+ /** Why a signed commit is not verified (DEV-31). */
571
+ declare function verifyWhy(reason: string): string;
559
572
 
560
573
  /**
561
574
  * What every page under /code/:repo shares: the project, the repository named in the URL (loaded
@@ -572,6 +585,7 @@ declare abstract class RepoPage {
572
585
  protected readonly error: _angular_core.WritableSignal<string>;
573
586
  protected readonly note: _angular_core.WritableSignal<string>;
574
587
  protected readonly people: _angular_core.Signal<People>;
588
+ protected readonly verifyWhy: typeof verifyWhy;
575
589
  protected readonly canWrite: _angular_core.Signal<boolean>;
576
590
  protected readonly canAdmin: _angular_core.Signal<boolean>;
577
591
  /** Repository settings short of a rename, the visibility and deletion: Maintainers, and maintain collaborators. */
@@ -815,6 +829,7 @@ declare class CommitBox {
815
829
  protected readonly toNew: _angular_core.WritableSignal<boolean>;
816
830
  protected readonly newBranch: _angular_core.WritableSignal<string>;
817
831
  private readonly rules;
832
+ /** Direct commits are refused: the rules block direct pushes, or require signed commits (a browser commit is unsigned). */
818
833
  protected readonly blocked: _angular_core.Signal<boolean>;
819
834
  constructor();
820
835
  protected send(): void;
@@ -1087,6 +1102,9 @@ interface RuleForm {
1087
1102
  dismissStaleApprovals: boolean;
1088
1103
  requireUpToDate: boolean;
1089
1104
  requireCodeOwnerReview: boolean;
1105
+ requireSignedCommits: boolean;
1106
+ requireLinearHistory: boolean;
1107
+ bypass: string[];
1090
1108
  requiredChecks: string[];
1091
1109
  }
1092
1110
  declare class RepoSettingsPage extends RepoPage {
@@ -1112,10 +1130,14 @@ declare class RepoSettingsPage extends RepoPage {
1112
1130
  label: string;
1113
1131
  }[];
1114
1132
  protected readonly toggles: {
1115
- key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate' | 'requireCodeOwnerReview';
1133
+ key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate' | 'requireCodeOwnerReview' | 'requireSignedCommits' | 'requireLinearHistory';
1116
1134
  label: string;
1117
1135
  hint: string;
1118
1136
  }[];
1137
+ protected readonly bypassRoles: {
1138
+ id: string;
1139
+ label: string;
1140
+ }[];
1119
1141
  constructor();
1120
1142
  protected readonly collabs: _angular_core.WritableSignal<Collaborator[]>;
1121
1143
  protected readonly perms: {
@@ -1135,6 +1157,7 @@ declare class RepoSettingsPage extends RepoPage {
1135
1157
  protected flipMethod(id: string): void;
1136
1158
  protected summary(p: Protection): string;
1137
1159
  protected edit(p: Protection | null): void;
1160
+ protected flipBypass(f: RuleForm, role: string): void;
1138
1161
  protected flip(f: RuleForm, k: (typeof this.toggles)[number]['key']): void;
1139
1162
  protected addCheck(f: RuleForm): void;
1140
1163
  protected removeCheck(f: RuleForm, c: string): void;
@@ -1221,5 +1244,5 @@ declare class NewFilePage extends RepoPage {
1221
1244
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NewFilePage, "o-code-new-file", never, {}, {}, never, never, true, never>;
1222
1245
  }
1223
1246
 
1224
- export { BranchesPage, CodeApi, CodeHost, 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 };
1247
+ export { BranchesPage, CodeApi, CodeHost, 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 };
1225
1248
  export type { BlameHunk, Blob, CheckStatus, CodePerson, CodeProject, Collaborator, Commit, CommitChoice, CommitDetail, CommitRequest, CommitResult, Comparison, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LineComment, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };