@chisquare-tech/origine-ngx-apps-code 0.2.0 → 0.4.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.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -54,6 +54,8 @@ interface Repo {
|
|
|
54
54
|
empty: boolean;
|
|
55
55
|
capabilities: string[];
|
|
56
56
|
readOnly?: boolean;
|
|
57
|
+
/** The caller's collaborator permission on this repository (read, write or maintain), if any. */
|
|
58
|
+
collaborator?: string;
|
|
57
59
|
createdAt?: string;
|
|
58
60
|
}
|
|
59
61
|
interface GitPerson {
|
|
@@ -175,6 +177,52 @@ interface Ref {
|
|
|
175
177
|
merged: boolean;
|
|
176
178
|
canDelete: boolean;
|
|
177
179
|
}
|
|
180
|
+
/** A repository collaborator (DEV-06): access beyond the project role, for one repository. */
|
|
181
|
+
interface Collaborator {
|
|
182
|
+
repoId: string;
|
|
183
|
+
userId: string;
|
|
184
|
+
permission: 'read' | 'write' | 'maintain';
|
|
185
|
+
projectRole: string;
|
|
186
|
+
addedBy: string;
|
|
187
|
+
createdAt: string;
|
|
188
|
+
}
|
|
189
|
+
/** A file on a release (DEV-15). */
|
|
190
|
+
interface ReleaseAsset {
|
|
191
|
+
id: string;
|
|
192
|
+
releaseId: string;
|
|
193
|
+
name: string;
|
|
194
|
+
size: number;
|
|
195
|
+
mediaType: string;
|
|
196
|
+
createdBy: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
}
|
|
199
|
+
/** A release: a tag with a title, Markdown notes and files; a draft until published. */
|
|
200
|
+
interface Release {
|
|
201
|
+
id: string;
|
|
202
|
+
repoId: string;
|
|
203
|
+
tag: string;
|
|
204
|
+
targetSha: string;
|
|
205
|
+
short: string;
|
|
206
|
+
title: string;
|
|
207
|
+
notes: string;
|
|
208
|
+
draft: boolean;
|
|
209
|
+
prerelease: boolean;
|
|
210
|
+
latest: boolean;
|
|
211
|
+
createdBy: string;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
publishedAt: string | null;
|
|
214
|
+
version: number;
|
|
215
|
+
assets: ReleaseAsset[];
|
|
216
|
+
}
|
|
217
|
+
interface ReleaseInput {
|
|
218
|
+
tag?: string;
|
|
219
|
+
target?: string;
|
|
220
|
+
title?: string;
|
|
221
|
+
notes?: string;
|
|
222
|
+
draft?: boolean;
|
|
223
|
+
prerelease?: boolean;
|
|
224
|
+
version?: number;
|
|
225
|
+
}
|
|
178
226
|
interface Protection {
|
|
179
227
|
id: string;
|
|
180
228
|
repoId: string;
|
|
@@ -374,6 +422,21 @@ declare class CodeApi {
|
|
|
374
422
|
}): Observable<FileDiff>;
|
|
375
423
|
compare(project: string, name: string, base: string, head: string): Observable<Comparison>;
|
|
376
424
|
refs(project: string, name: string, kind?: 'branch' | 'tag', q?: string): Observable<Ref[]>;
|
|
425
|
+
collaborators(project: string, name: string): Observable<Collaborator[]>;
|
|
426
|
+
setCollaborator(project: string, name: string, userId: string, permission: string): Observable<Collaborator>;
|
|
427
|
+
removeCollaborator(project: string, name: string, userId: string): Observable<unknown>;
|
|
428
|
+
createTag(project: string, name: string, tag: string, target: string): Observable<Ref>;
|
|
429
|
+
deleteTag(project: string, name: string, tag: string): Observable<unknown>;
|
|
430
|
+
releases(project: string, name: string): Observable<Release[]>;
|
|
431
|
+
createRelease(project: string, name: string, r: ReleaseInput): Observable<Release>;
|
|
432
|
+
updateRelease(project: string, name: string, id: string, r: ReleaseInput): Observable<Release>;
|
|
433
|
+
deleteRelease(project: string, name: string, id: string, deleteTag: boolean): Observable<unknown>;
|
|
434
|
+
/** Notes drafted from the done issues and merged pull requests since the previous release. */
|
|
435
|
+
releaseNotes(project: string, name: string, target: string, tag?: string): Observable<string>;
|
|
436
|
+
addAsset(project: string, name: string, id: string, file: File): Observable<ReleaseAsset>;
|
|
437
|
+
/** A release file's bytes (the download needs the session, so no plain link works). */
|
|
438
|
+
assetBlob(project: string, name: string, id: string, asset: string): Observable<globalThis.Blob>;
|
|
439
|
+
deleteAsset(project: string, name: string, id: string, asset: string): Observable<unknown>;
|
|
377
440
|
createBranch(project: string, name: string, branch: string, from: string): Observable<unknown>;
|
|
378
441
|
deleteBranch(project: string, name: string, branch: string): Observable<unknown>;
|
|
379
442
|
deleteMerged(project: string, name: string): Observable<{
|
|
@@ -475,6 +538,8 @@ declare abstract class RepoPage {
|
|
|
475
538
|
protected readonly people: _angular_core.Signal<People>;
|
|
476
539
|
protected readonly canWrite: _angular_core.Signal<boolean>;
|
|
477
540
|
protected readonly canAdmin: _angular_core.Signal<boolean>;
|
|
541
|
+
/** Repository settings short of a rename, the visibility and deletion: Maintainers, and maintain collaborators. */
|
|
542
|
+
protected readonly canMaintain: _angular_core.Signal<boolean>;
|
|
478
543
|
protected readonly canProtect: _angular_core.Signal<boolean>;
|
|
479
544
|
constructor();
|
|
480
545
|
/** Called with the repository once it has loaded (and again after it changes). */
|
|
@@ -821,7 +886,7 @@ declare class PullsPage {
|
|
|
821
886
|
}
|
|
822
887
|
|
|
823
888
|
type Tab = 'conversation' | 'commits' | 'files' | 'checks';
|
|
824
|
-
interface Event {
|
|
889
|
+
interface Event$1 {
|
|
825
890
|
at: string;
|
|
826
891
|
kind: 'comment' | 'review' | 'thread';
|
|
827
892
|
who: string;
|
|
@@ -883,7 +948,7 @@ declare class PullPage extends RepoPage {
|
|
|
883
948
|
label: string;
|
|
884
949
|
colour: string;
|
|
885
950
|
}[]>;
|
|
886
|
-
protected readonly events: _angular_core.Signal<Event[]>;
|
|
951
|
+
protected readonly events: _angular_core.Signal<Event$1[]>;
|
|
887
952
|
constructor();
|
|
888
953
|
protected onRepo(_: Repo): void;
|
|
889
954
|
protected md(s: string): string;
|
|
@@ -957,6 +1022,18 @@ declare class RepoSettingsPage extends RepoPage {
|
|
|
957
1022
|
hint: string;
|
|
958
1023
|
}[];
|
|
959
1024
|
constructor();
|
|
1025
|
+
protected readonly collabs: _angular_core.WritableSignal<Collaborator[]>;
|
|
1026
|
+
protected readonly perms: {
|
|
1027
|
+
id: string;
|
|
1028
|
+
label: string;
|
|
1029
|
+
}[];
|
|
1030
|
+
protected readonly addable: _angular_core.Signal<_chisquare_tech_origine_ngx_apps_code.CodePerson[]>;
|
|
1031
|
+
protected newCollab: string;
|
|
1032
|
+
protected newPerm: string;
|
|
1033
|
+
protected roleLabel(r: string): string;
|
|
1034
|
+
private loadCollabs;
|
|
1035
|
+
protected setCollab(userId: string, permission: string, adding?: boolean): void;
|
|
1036
|
+
protected removeCollab(userId: string): void;
|
|
960
1037
|
protected onRepo(r: Repo): void;
|
|
961
1038
|
protected go(s: Section): void;
|
|
962
1039
|
protected max0(n: number): number;
|
|
@@ -975,5 +1052,51 @@ declare class RepoSettingsPage extends RepoPage {
|
|
|
975
1052
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RepoSettingsPage, "o-code-settings", never, {}, {}, never, never, true, never>;
|
|
976
1053
|
}
|
|
977
1054
|
|
|
978
|
-
|
|
979
|
-
|
|
1055
|
+
interface Draft {
|
|
1056
|
+
id?: string;
|
|
1057
|
+
version?: number;
|
|
1058
|
+
tag: string;
|
|
1059
|
+
newTag: boolean;
|
|
1060
|
+
target: string;
|
|
1061
|
+
title: string;
|
|
1062
|
+
notes: string;
|
|
1063
|
+
prerelease: boolean;
|
|
1064
|
+
draft: boolean;
|
|
1065
|
+
}
|
|
1066
|
+
declare class ReleasesPage extends RepoPage {
|
|
1067
|
+
protected readonly releases: _angular_core.WritableSignal<Release[]>;
|
|
1068
|
+
protected readonly tags: _angular_core.WritableSignal<Ref[]>;
|
|
1069
|
+
protected readonly loaded: _angular_core.WritableSignal<boolean>;
|
|
1070
|
+
protected readonly tagging: _angular_core.WritableSignal<boolean>;
|
|
1071
|
+
protected readonly draft: _angular_core.WritableSignal<Draft | null>;
|
|
1072
|
+
protected readonly busy: _angular_core.WritableSignal<boolean>;
|
|
1073
|
+
protected readonly confirming: _angular_core.WritableSignal<string>;
|
|
1074
|
+
protected readonly freeTags: _angular_core.Signal<Ref[]>;
|
|
1075
|
+
protected readonly ago: (s?: string) => string;
|
|
1076
|
+
protected tagName: string;
|
|
1077
|
+
protected tagFrom: string;
|
|
1078
|
+
protected alsoTag: boolean;
|
|
1079
|
+
protected onRepo(r: Repo): void;
|
|
1080
|
+
protected md(s: string): string;
|
|
1081
|
+
protected used(tag: string): boolean;
|
|
1082
|
+
private load;
|
|
1083
|
+
private run;
|
|
1084
|
+
protected createTag(): void;
|
|
1085
|
+
protected removeTag(t: Ref): void;
|
|
1086
|
+
protected startRelease(): void;
|
|
1087
|
+
protected setTag(d: Draft, tag: string): void;
|
|
1088
|
+
protected generate(d: Draft): void;
|
|
1089
|
+
protected edit(r: Release): void;
|
|
1090
|
+
protected save(d: Draft, asDraft: boolean): void;
|
|
1091
|
+
protected remove(rel: Release): void;
|
|
1092
|
+
protected upload(rel: Release, ev: Event): void;
|
|
1093
|
+
protected removeAsset(rel: Release, id: string): void;
|
|
1094
|
+
protected download(rel: Release, id: string, filename: string): void;
|
|
1095
|
+
protected archive(rel: Release, format: 'zip' | 'tar.gz'): void;
|
|
1096
|
+
private save_;
|
|
1097
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReleasesPage, never>;
|
|
1098
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ReleasesPage, "o-code-releases", never, {}, {}, never, never, true, never>;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export { BranchesPage, CodeApi, CodeHost, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, pair, shortDate, size };
|
|
1102
|
+
export type { BlameHunk, Blob, CheckStatus, CodePerson, CodeProject, Collaborator, Commit, CommitDetail, 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 };
|