@usepipr/runtime 0.3.8 → 0.4.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.
@@ -1,2 +1,180 @@
1
- import { C as GitHubPublicationClient, _ as piBuiltinToolNames, b as piThinkingLevels, l as ActionCommandResult, n as runActionCommandWithDependencies, v as piReadOnlyToolNames, y as piRequiredCliFlags } from "../commands-C5_GHGxN.mjs";
2
- export { type ActionCommandResult, type GitHubPublicationClient, piBuiltinToolNames, piReadOnlyToolNames, piRequiredCliFlags, piThinkingLevels, runActionCommandWithDependencies };
1
+ import { P as RepositoryRef, T as RepositoryPermission, _ as piBuiltinToolNames, b as piThinkingLevels, d as HostRunCommandResult, k as ChangeRequestRef, r as runHostRunCommandWithDependencies, v as piReadOnlyToolNames, w as CodeHostAdapter, x as SecretRedactor, y as piRequiredCliFlags } from "../commands-0cyQHxpm.mjs";
2
+ import { z } from "zod";
3
+ //#region src/hosts/github/command.d.ts
4
+ type GitHubPullRequestDetails = {
5
+ repository: RepositoryRef;
6
+ change: ChangeRequestRef;
7
+ };
8
+ type GitHubCommandClient = {
9
+ getPullRequest(options: {
10
+ repository: RepositoryRef;
11
+ changeNumber: number;
12
+ }): Promise<GitHubPullRequestDetails>;
13
+ getRepositoryPermission(options: {
14
+ repository: RepositoryRef;
15
+ actor: string;
16
+ }): Promise<RepositoryPermission>;
17
+ };
18
+ //#endregion
19
+ //#region src/hosts/github/publication-client.d.ts
20
+ declare const githubIssueCommentSchema: z.ZodPipe<z.ZodObject<{
21
+ id: z.ZodNumber;
22
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ user: z.ZodOptional<z.ZodObject<{
24
+ login: z.ZodString;
25
+ }, z.core.$loose>>;
26
+ }, z.core.$loose>, z.ZodTransform<{
27
+ id: number;
28
+ body: string | null | undefined;
29
+ authorLogin: string | undefined;
30
+ }, {
31
+ [x: string]: unknown;
32
+ id: number;
33
+ body?: string | null | undefined;
34
+ user?: {
35
+ [x: string]: unknown;
36
+ login: string;
37
+ } | undefined;
38
+ }>>;
39
+ declare const githubReviewCommentSchema: z.ZodPipe<z.ZodObject<{
40
+ path: z.ZodOptional<z.ZodString>;
41
+ commit_id: z.ZodOptional<z.ZodString>;
42
+ line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
43
+ start_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
+ side: z.ZodOptional<z.ZodEnum<{
45
+ RIGHT: "RIGHT";
46
+ LEFT: "LEFT";
47
+ }>>;
48
+ start_side: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
49
+ RIGHT: "RIGHT";
50
+ LEFT: "LEFT";
51
+ }>>>;
52
+ user: z.ZodOptional<z.ZodObject<{
53
+ login: z.ZodString;
54
+ }, z.core.$loose>>;
55
+ id: z.ZodNumber;
56
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ }, z.core.$loose>, z.ZodTransform<{
58
+ id: number;
59
+ body: string | null | undefined;
60
+ authorLogin: string | undefined;
61
+ path: string | undefined;
62
+ commitId: string | undefined;
63
+ line: number | undefined;
64
+ startLine: number | undefined;
65
+ side: "RIGHT" | "LEFT" | undefined;
66
+ startSide: "RIGHT" | "LEFT" | undefined;
67
+ }, {
68
+ [x: string]: unknown;
69
+ id: number;
70
+ path?: string | undefined;
71
+ commit_id?: string | undefined;
72
+ line?: number | null | undefined;
73
+ start_line?: number | null | undefined;
74
+ side?: "RIGHT" | "LEFT" | undefined;
75
+ start_side?: "RIGHT" | "LEFT" | null | undefined;
76
+ user?: {
77
+ [x: string]: unknown;
78
+ login: string;
79
+ } | undefined;
80
+ body?: string | null | undefined;
81
+ }>>;
82
+ declare const githubReviewThreadSchema: z.ZodObject<{
83
+ id: z.ZodString;
84
+ isResolved: z.ZodBoolean;
85
+ commentIds: z.ZodArray<z.ZodNumber>;
86
+ }, z.core.$strict>;
87
+ declare const githubCheckRunSchema: z.ZodObject<{
88
+ id: z.ZodNumber;
89
+ name: z.ZodString;
90
+ }, z.core.$loose>;
91
+ type GitHubIssueComment = z.infer<typeof githubIssueCommentSchema>;
92
+ type GitHubReviewComment = z.infer<typeof githubReviewCommentSchema>;
93
+ type GitHubReviewThread = z.infer<typeof githubReviewThreadSchema>;
94
+ type GitHubCheckRun = z.infer<typeof githubCheckRunSchema>;
95
+ type GitHubPublicationClient = {
96
+ getAuthenticatedUserLogin(): Promise<string>;
97
+ getPullRequestHeadSha(options: {
98
+ repo: string;
99
+ pullRequestNumber: number;
100
+ }): Promise<string>;
101
+ listIssueComments(options: {
102
+ repo: string;
103
+ issueNumber: number;
104
+ }): Promise<GitHubIssueComment[]>;
105
+ createIssueComment(options: {
106
+ repo: string;
107
+ issueNumber: number;
108
+ body: string;
109
+ }): Promise<{
110
+ id: number;
111
+ }>;
112
+ updateIssueComment(options: {
113
+ repo: string;
114
+ commentId: number;
115
+ body: string;
116
+ }): Promise<{
117
+ id: number;
118
+ }>;
119
+ listReviewComments(options: {
120
+ repo: string;
121
+ pullRequestNumber: number;
122
+ }): Promise<GitHubReviewComment[]>;
123
+ listReviewThreads(options: {
124
+ repo: string;
125
+ pullRequestNumber: number;
126
+ }): Promise<GitHubReviewThread[]>;
127
+ createReviewComment(options: {
128
+ repo: string;
129
+ pullRequestNumber: number;
130
+ body: string;
131
+ path: string;
132
+ commit_id: string;
133
+ line: number;
134
+ side: "RIGHT" | "LEFT";
135
+ start_line?: number;
136
+ start_side?: "RIGHT" | "LEFT";
137
+ }): Promise<{
138
+ id: number;
139
+ }>;
140
+ createReviewCommentReply(options: {
141
+ repo: string;
142
+ pullRequestNumber: number;
143
+ commentId: number;
144
+ body: string;
145
+ }): Promise<{
146
+ id: number;
147
+ }>;
148
+ resolveReviewThread(options: {
149
+ threadId: string;
150
+ }): Promise<void>;
151
+ createCheckRun(options: {
152
+ repo: string;
153
+ name: string;
154
+ headSha: string;
155
+ summary?: string;
156
+ }): Promise<GitHubCheckRun>;
157
+ updateCheckRun(options: {
158
+ repo: string;
159
+ checkRunId: number;
160
+ name: string;
161
+ conclusion: "success" | "failure" | "neutral";
162
+ summary?: string;
163
+ }): Promise<void>;
164
+ };
165
+ //#endregion
166
+ //#region src/hosts/github/adapter.d.ts
167
+ type GitHubHostAdapterOptions = {
168
+ env?: NodeJS.ProcessEnv;
169
+ commandClient?: GitHubCommandClient;
170
+ publicationClient?: GitHubPublicationClient;
171
+ };
172
+ declare function createGitHubHostAdapter(options?: GitHubHostAdapterOptions): CodeHostAdapter;
173
+ //#endregion
174
+ //#region src/shared/secret-redactor.d.ts
175
+ declare function createKnownSecretRedactor(options?: {
176
+ env?: NodeJS.ProcessEnv;
177
+ }): SecretRedactor;
178
+ //#endregion
179
+ export { type GitHubPublicationClient, type HostRunCommandResult, createGitHubHostAdapter, createKnownSecretRedactor, piBuiltinToolNames, piReadOnlyToolNames, piRequiredCliFlags, piThinkingLevels, runHostRunCommandWithDependencies };
180
+ //# sourceMappingURL=testing.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.mts","names":[],"sources":["../../src/hosts/github/command.ts","../../src/hosts/github/publication-client.ts","../../src/hosts/github/adapter.ts","../../src/shared/secret-redactor.ts"],"mappings":";;;KAiDY;EACV,YAAY;EACZ,QAAQ;;KAGE;EACV,eAAe;IACb,YAAY;IACZ;MACE,QAAQ;EACZ,wBAAwB;IACtB,YAAY;IACZ;MACE,QAAQ;;;;cChDR,0BAAwB,EAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;cAMxB,2BAAyB,EAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BzB,0BAAwB,EAAA;;;;;cAwExB,sBAAoB,EAAA;;;;KAKd,qBAAqB,EAAE,aAAa;KACpC,sBAAsB,EAAE,aAAa;KACrC,qBAAqB,EAAE,aAAa;KACpC,iBAAiB,EAAE,aAAa;KAEhC;EACV,6BAA6B;EAC7B,sBAAsB;IAAW;IAAc;MAA8B;EAC7E,kBAAkB;IAAW;IAAc;MAAwB,QAAQ;EAC3E,mBAAmB;IACjB;IACA;IACA;MACE;IAAU;;EACd,mBAAmB;IACjB;IACA;IACA;MACE;IAAU;;EACd,mBAAmB;IACjB;IACA;MACE,QAAQ;EACZ,kBAAkB;IAChB;IACA;MACE,QAAQ;EACZ,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;IAAU;;EACd,yBAAyB;IACvB;IACA;IACA;IACA;MACE;IAAU;;EACd,oBAAoB;IAAW;MAAqB;EACpD,eAAe;IACb;IACA;IACA;IACA;MACE,QAAQ;EACZ,eAAe;IACb;IACA;IACA;IACA;IACA;MACE;;;;KCjKM;EACV,MAAM,OAAO;EACb,gBAAgB;EAChB,oBAAoB;;iBAGN,wBAAwB,UAAS,2BAAgC;;;iBCvBjE,0BAA0B;EAAY,MAAM,OAAO;IAAA"}
@@ -1,2 +1,2 @@
1
- import { f as piBuiltinToolNames, h as piThinkingLevels, m as piRequiredCliFlags, n as runActionCommandWithDependencies, p as piReadOnlyToolNames } from "../commands-RY37Y0rG.mjs";
2
- export { piBuiltinToolNames, piReadOnlyToolNames, piRequiredCliFlags, piThinkingLevels, runActionCommandWithDependencies };
1
+ import { _ as piReadOnlyToolNames, c as createGitHubHostAdapter, g as piBuiltinToolNames, r as runHostRunCommandWithDependencies, u as createKnownSecretRedactor, v as piRequiredCliFlags, y as piThinkingLevels } from "../commands-46Q2ZDt0.mjs";
2
+ export { createGitHubHostAdapter, createKnownSecretRedactor, piBuiltinToolNames, piReadOnlyToolNames, piRequiredCliFlags, piThinkingLevels, runHostRunCommandWithDependencies };