@leitwerk-dev/coding 0.3.0 → 0.3.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.
- package/README.md +34 -1
- package/dist/auto-work-branch.js +3 -24
- package/dist/auto-work-branch.js.map +1 -1
- package/dist/chunk-6E5VQPC4.js +28 -0
- package/dist/chunk-6E5VQPC4.js.map +1 -0
- package/dist/chunk-KFELB7ZC.js +70 -0
- package/dist/chunk-KFELB7ZC.js.map +1 -0
- package/dist/profile-bindings-internal.d.ts +3 -0
- package/dist/profile-bindings-internal.d.ts.map +1 -0
- package/dist/pull-request-publication-internal.d.ts +73 -0
- package/dist/pull-request-publication-internal.d.ts.map +1 -0
- package/dist/repository-change-launch-internal-Dd-AONUs.d.ts +67 -0
- package/dist/repository-change-launch-internal.d.ts +30 -0
- package/dist/repository-change-launch-internal.d.ts.map +1 -1
- package/dist/repository-change-launch.d.ts +4 -2
- package/dist/repository-change-launch.d.ts.map +1 -1
- package/dist/repository-change-launch.js +235 -6
- package/dist/repository-change-launch.js.map +1 -1
- package/dist/repository-change-publication.d.ts +2 -2
- package/dist/repository-change-publication.d.ts.map +1 -1
- package/dist/repository-change-publication.js +429 -27
- package/dist/repository-change-publication.js.map +1 -1
- package/dist/repository-change-ui-launcher-internal.d.ts +53 -0
- package/dist/repository-change-ui-launcher-internal.d.ts.map +1 -0
- package/dist/repository-rebase/git.d.ts +31 -0
- package/dist/repository-rebase/git.d.ts.map +1 -0
- package/dist/repository-rebase/index.d.ts +42 -0
- package/dist/repository-rebase/index.d.ts.map +1 -0
- package/dist/repository-rebase/index.js +16 -0
- package/dist/repository-rebase/index.js.map +1 -0
- package/dist/repository-rebase/policy.d.ts +37 -0
- package/dist/repository-rebase/policy.d.ts.map +1 -0
- package/dist/repository-rebase/prompt.d.ts +3 -0
- package/dist/repository-rebase/prompt.d.ts.map +1 -0
- package/package.json +9 -5
- package/src/profile-bindings-internal.ts +39 -0
- package/src/pull-request-publication-internal.ts +286 -0
- package/src/repository-change-launch-internal.ts +76 -0
- package/src/repository-change-launch.ts +9 -0
- package/src/repository-change-publication.ts +29 -45
- package/src/repository-change-ui-launcher-internal.ts +225 -0
- package/src/repository-rebase/git.ts +219 -0
- package/src/repository-rebase/index.ts +144 -0
- package/src/repository-rebase/policy.ts +75 -0
- package/src/repository-rebase/prompt.ts +2 -0
|
@@ -1,7 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildAutoWorkBranchFromSeed
|
|
3
|
+
} from "./chunk-6E5VQPC4.js";
|
|
1
4
|
import "./chunk-PX6F3LHL.js";
|
|
2
5
|
|
|
6
|
+
// src/profile-bindings-internal.ts
|
|
7
|
+
function record(value, label) {
|
|
8
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
9
|
+
throw new Error(`${label} must be an object`);
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
function parseRepositoryProfileBindings(raw, extensionId, fields) {
|
|
13
|
+
const config = raw === void 0 ? {} : record(raw, `${extensionId} configuration`);
|
|
14
|
+
if (config.profile_bindings === void 0) return Object.freeze({});
|
|
15
|
+
const mappings = record(config.profile_bindings, "profile_bindings");
|
|
16
|
+
return Object.freeze(
|
|
17
|
+
Object.fromEntries(
|
|
18
|
+
Object.entries(mappings).map(([profile, value]) => {
|
|
19
|
+
if (!profile.trim() || profile.trim() !== profile)
|
|
20
|
+
throw new Error(
|
|
21
|
+
"profile_bindings keys must be non-empty profile names without surrounding whitespace"
|
|
22
|
+
);
|
|
23
|
+
const mapping = record(value, `profile_bindings.${profile}`);
|
|
24
|
+
for (const key of Object.keys(mapping))
|
|
25
|
+
if (!Object.values(fields).includes(key))
|
|
26
|
+
throw new Error(`Unknown profile_bindings.${profile}.${key}`);
|
|
27
|
+
const binding = Object.fromEntries(
|
|
28
|
+
Object.entries(fields).map(([field, key]) => {
|
|
29
|
+
const value2 = mapping[key];
|
|
30
|
+
if (value2 !== void 0 && (typeof value2 !== "string" || !value2.trim()))
|
|
31
|
+
throw new Error(`profile_bindings.${profile}.${key} must be a non-empty string`);
|
|
32
|
+
return [field, value2 === void 0 ? profile : value2.trim()];
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
return [profile, Object.freeze(binding)];
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
3
41
|
// src/repository-change-launch-internal.ts
|
|
4
42
|
import { parseRepoLocator, trimString } from "@leitwerk-dev/domain";
|
|
43
|
+
function normalizeRepositoryIssueOrigin(record2, displayName, text) {
|
|
44
|
+
const origin = trimString(record2.origin);
|
|
45
|
+
if (origin === "ui") {
|
|
46
|
+
return { origin: "ui", issueNumber: null, issueUrl: null, triggerLabel: null, doneLabel: null };
|
|
47
|
+
}
|
|
48
|
+
if (origin && origin !== "issue") throw new Error(`${displayName} requires a valid origin`);
|
|
49
|
+
if (typeof record2.issueNumber !== "number" || !Number.isInteger(record2.issueNumber) || record2.issueNumber <= 0)
|
|
50
|
+
throw new Error(`${displayName} requires issueNumber`);
|
|
51
|
+
return {
|
|
52
|
+
origin: "issue",
|
|
53
|
+
issueNumber: record2.issueNumber,
|
|
54
|
+
issueUrl: text("issueUrl"),
|
|
55
|
+
triggerLabel: text("triggerLabel"),
|
|
56
|
+
doneLabel: text("doneLabel")
|
|
57
|
+
};
|
|
58
|
+
}
|
|
5
59
|
function repositoryChangeParamsRecord(value, displayName) {
|
|
6
60
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
7
61
|
throw new Error(`${displayName} params must be an object`);
|
|
@@ -9,21 +63,196 @@ function repositoryChangeParamsRecord(value, displayName) {
|
|
|
9
63
|
return value;
|
|
10
64
|
}
|
|
11
65
|
function normalizeRepositoryChangeParamsInput(value, displayName) {
|
|
12
|
-
const
|
|
13
|
-
const rawRepoLocator = trimString(
|
|
66
|
+
const record2 = repositoryChangeParamsRecord(value, displayName);
|
|
67
|
+
const rawRepoLocator = trimString(record2.repoLocator);
|
|
14
68
|
return {
|
|
15
69
|
repoLocator: parseRepoLocator(rawRepoLocator)?.value ?? rawRepoLocator,
|
|
16
|
-
baseBranch: trimString(
|
|
17
|
-
workBranch: trimString(
|
|
18
|
-
prompt: trimString(
|
|
70
|
+
baseBranch: trimString(record2.baseBranch) || "main",
|
|
71
|
+
workBranch: trimString(record2.workBranch),
|
|
72
|
+
prompt: trimString(record2.prompt)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function normalizeRepositoryIssueChangeParams(value, displayName, fields) {
|
|
76
|
+
const shared = normalizeRepositoryChangeParamsInput(value, displayName);
|
|
77
|
+
const record2 = repositoryChangeParamsRecord(value, displayName);
|
|
78
|
+
const text = (name) => {
|
|
79
|
+
const value2 = trimString(record2[name]);
|
|
80
|
+
if (!value2) throw new Error(`${displayName} requires ${name}`);
|
|
81
|
+
return value2;
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
...shared,
|
|
85
|
+
...Object.fromEntries(fields.map((name) => [name, text(name)])),
|
|
86
|
+
...normalizeRepositoryIssueOrigin(record2, displayName, text)
|
|
19
87
|
};
|
|
20
88
|
}
|
|
21
89
|
function createRepositoryChangeParamsCodec(input) {
|
|
22
90
|
return { parse: input.normalize, serialize: (value) => value };
|
|
23
91
|
}
|
|
92
|
+
|
|
93
|
+
// src/repository-change-ui-launcher-internal.ts
|
|
94
|
+
import { trimString as trimString2 } from "@leitwerk-dev/domain";
|
|
95
|
+
import {
|
|
96
|
+
SafeLaunchPreparationError
|
|
97
|
+
} from "@leitwerk-dev/process-sdk";
|
|
98
|
+
function repositoryVisibilityCheck(provider, isVisible) {
|
|
99
|
+
return {
|
|
100
|
+
id: "repository_visibility",
|
|
101
|
+
label: "Check repository visibility",
|
|
102
|
+
async run({ signal }) {
|
|
103
|
+
signal.throwIfAborted();
|
|
104
|
+
const visible = await isVisible();
|
|
105
|
+
signal.throwIfAborted();
|
|
106
|
+
if (!visible)
|
|
107
|
+
throw new SafeLaunchPreparationError(
|
|
108
|
+
"Repository is not visible",
|
|
109
|
+
`Grant the selected ${provider} profile access to the repository, then try again.`
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function createRepositoryChangeUiLauncher(options) {
|
|
115
|
+
const { provider, providerId } = options;
|
|
116
|
+
const profileField = `${providerId}Profile`;
|
|
117
|
+
function validationError(fieldId, message, code = "required") {
|
|
118
|
+
return { code, fieldId, message };
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
async resolveIssueLaunchConfig({ profile, repository, issue, labels }) {
|
|
122
|
+
const title = issue.title.trim();
|
|
123
|
+
const body = issue.body?.trim() ?? "";
|
|
124
|
+
const binding = options.resolveProfiles(profile);
|
|
125
|
+
const identity = await options.resolveGitIdentity(profile);
|
|
126
|
+
return options.launchConfig(
|
|
127
|
+
{
|
|
128
|
+
...options.params(repository, {
|
|
129
|
+
...binding,
|
|
130
|
+
profile,
|
|
131
|
+
workBranch: `leitwerk/issue-${issue.number}`,
|
|
132
|
+
prompt: `${title}${body ? `
|
|
133
|
+
|
|
134
|
+
${body}` : ""}`
|
|
135
|
+
}),
|
|
136
|
+
origin: "issue",
|
|
137
|
+
issueNumber: issue.number,
|
|
138
|
+
issueUrl: issue.html_url,
|
|
139
|
+
triggerLabel: labels.trigger,
|
|
140
|
+
doneLabel: labels.done
|
|
141
|
+
},
|
|
142
|
+
title,
|
|
143
|
+
identity
|
|
144
|
+
);
|
|
145
|
+
},
|
|
146
|
+
id: options.id,
|
|
147
|
+
label: `${provider} Repo Change`,
|
|
148
|
+
description: `Plan, implement, review, and publish a ${provider} change without a source issue`,
|
|
149
|
+
visibility: "ui",
|
|
150
|
+
ui: {
|
|
151
|
+
card: {
|
|
152
|
+
title: `${provider} Repo Change`,
|
|
153
|
+
description: `Start a repository change and publish it as a ${provider} pull request.`
|
|
154
|
+
},
|
|
155
|
+
launchConfigSchema: {
|
|
156
|
+
id: `${providerId}_repo_change_form`,
|
|
157
|
+
title: `${provider} Repo Change`,
|
|
158
|
+
fields: [
|
|
159
|
+
{
|
|
160
|
+
id: profileField,
|
|
161
|
+
label: `${provider} profile`,
|
|
162
|
+
kind: "select",
|
|
163
|
+
required: true,
|
|
164
|
+
description: `${provider} profile with server-configured CI and Git SSH access.`
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "repository",
|
|
168
|
+
label: "Repository",
|
|
169
|
+
kind: "select",
|
|
170
|
+
required: true,
|
|
171
|
+
description: `Repository visible to the selected ${provider} profile.`
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "prompt",
|
|
175
|
+
label: "Requested change",
|
|
176
|
+
kind: "textarea",
|
|
177
|
+
required: true,
|
|
178
|
+
placeholder: "Describe the change to plan, implement, review, and publish."
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
submitLabel: "Start change"
|
|
182
|
+
},
|
|
183
|
+
resolveDefaults() {
|
|
184
|
+
return { [profileField]: options.profiles()[0] ?? "", repository: "", prompt: "" };
|
|
185
|
+
},
|
|
186
|
+
async resolveOptions(input) {
|
|
187
|
+
const profile = trimString2(input[profileField]);
|
|
188
|
+
return {
|
|
189
|
+
[profileField]: options.profiles().map((value) => ({ value, label: value })),
|
|
190
|
+
repository: (await options.repositories(profile)).map((repository) => ({
|
|
191
|
+
value: repository.full_name,
|
|
192
|
+
label: repository.full_name,
|
|
193
|
+
description: repository.html_url
|
|
194
|
+
}))
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
preparationChecks: options.preparationChecks,
|
|
198
|
+
resolveRelaunchInput(input) {
|
|
199
|
+
return {
|
|
200
|
+
[profileField]: trimString2(input[profileField]),
|
|
201
|
+
repository: trimString2(input.repository),
|
|
202
|
+
prompt: trimString2(input.prompt)
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
async resolveLaunchConfig(input) {
|
|
206
|
+
const profile = trimString2(input[profileField]);
|
|
207
|
+
const repositoryName = trimString2(input.repository);
|
|
208
|
+
const prompt = trimString2(input.prompt);
|
|
209
|
+
const errors = [];
|
|
210
|
+
const invalid = (fieldId, message) => ({
|
|
211
|
+
ok: false,
|
|
212
|
+
errors: [validationError(fieldId, message, "custom_rule")]
|
|
213
|
+
});
|
|
214
|
+
options.assertConfigured();
|
|
215
|
+
if (!profile) errors.push(validationError(profileField, `${provider} profile is required`));
|
|
216
|
+
else if (!options.profiles().includes(profile))
|
|
217
|
+
errors.push(
|
|
218
|
+
validationError(profileField, `${provider} profile is not available`, "custom_rule")
|
|
219
|
+
);
|
|
220
|
+
if (!repositoryName) errors.push(validationError("repository", "Repository is required"));
|
|
221
|
+
if (!prompt) errors.push(validationError("prompt", "Requested change is required"));
|
|
222
|
+
if (errors.length > 0) return { ok: false, errors };
|
|
223
|
+
const repository = (await options.repositories(profile)).find(
|
|
224
|
+
(candidate) => candidate.full_name === repositoryName
|
|
225
|
+
);
|
|
226
|
+
if (!repository)
|
|
227
|
+
return invalid(
|
|
228
|
+
"repository",
|
|
229
|
+
`Repository is not available to the selected ${provider} profile`
|
|
230
|
+
);
|
|
231
|
+
let binding;
|
|
232
|
+
try {
|
|
233
|
+
binding = options.resolveProfiles(profile);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
return invalid(profileField, error.message);
|
|
236
|
+
}
|
|
237
|
+
const identity = await options.resolveGitIdentity(profile);
|
|
238
|
+
const workBranch = buildAutoWorkBranchFromSeed(
|
|
239
|
+
prompt,
|
|
240
|
+
`${repository.ssh_url}:${repository.default_branch}`
|
|
241
|
+
);
|
|
242
|
+
const params = options.params(repository, { ...binding, profile, prompt, workBranch });
|
|
243
|
+
return { ok: true, launchConfig: options.launchConfig(params, prompt, identity) };
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
24
248
|
export {
|
|
25
249
|
createRepositoryChangeParamsCodec,
|
|
250
|
+
createRepositoryChangeUiLauncher,
|
|
26
251
|
normalizeRepositoryChangeParamsInput,
|
|
27
|
-
|
|
252
|
+
normalizeRepositoryIssueChangeParams,
|
|
253
|
+
normalizeRepositoryIssueOrigin,
|
|
254
|
+
parseRepositoryProfileBindings,
|
|
255
|
+
repositoryChangeParamsRecord,
|
|
256
|
+
repositoryVisibilityCheck
|
|
28
257
|
};
|
|
29
258
|
//# sourceMappingURL=repository-change-launch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/repository-change-launch-internal.ts"],"sourcesContent":["import { parseRepoLocator, trimString } from \"@leitwerk-dev/domain\";\nimport type { Codec } from \"@leitwerk-dev/process-sdk\";\n\n/** @public */\nexport interface RepositoryChangeParamsBase {\n\t/** @public */\n\trepoLocator: string;\n\t/** @public */\n\tbaseBranch: string;\n\t/** @public */\n\tworkBranch: string;\n\t/** @public */\n\tprompt: string;\n}\n\n/** @public */\nexport type RepositoryChangeLaunchParams<TExtra extends object = Record<never, never>> = TExtra &\n\tRepositoryChangeParamsBase;\n\n/** @public */\nexport interface NormalizedRepositoryChangeParamsInput {\n\t/** @internal */\n\trepoLocator: string;\n\t/** @internal */\n\tbaseBranch: string;\n\t/** @internal */\n\tworkBranch: string;\n\t/** @internal */\n\tprompt: string;\n}\n\n/** @public */\nexport function repositoryChangeParamsRecord(\n\tvalue: unknown,\n\tdisplayName: string,\n): Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new Error(`${displayName} params must be an object`);\n\t}\n\treturn value as Record<string, unknown>;\n}\n\n/** @public */\nexport function normalizeRepositoryChangeParamsInput(\n\tvalue: unknown,\n\tdisplayName: string,\n): NormalizedRepositoryChangeParamsInput {\n\tconst record = repositoryChangeParamsRecord(value, displayName);\n\tconst rawRepoLocator = trimString(record.repoLocator);\n\treturn {\n\t\trepoLocator: parseRepoLocator(rawRepoLocator)?.value ?? rawRepoLocator,\n\t\tbaseBranch: trimString(record.baseBranch) || \"main\",\n\t\tworkBranch: trimString(record.workBranch),\n\t\tprompt: trimString(record.prompt),\n\t};\n}\n\n/** @public */\nexport function createRepositoryChangeParamsCodec<T extends RepositoryChangeParamsBase>(input: {\n\t/** @public */\n\tnormalize(value: unknown): T;\n}): Codec<T> {\n\treturn { parse: input.normalize, serialize: (value) => value };\n}\n"],"mappings":";;;AAAA,SAAS,kBAAkB,kBAAkB;AAgCtC,SAAS,6BACf,OACA,aAC0B;AAC1B,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG;AACxE,UAAM,IAAI,MAAM,GAAG,WAAW,2BAA2B;AAAA,EAC1D;AACA,SAAO;AACR;AAGO,SAAS,qCACf,OACA,aACwC;AACxC,QAAM,SAAS,6BAA6B,OAAO,WAAW;AAC9D,QAAM,iBAAiB,WAAW,OAAO,WAAW;AACpD,SAAO;AAAA,IACN,aAAa,iBAAiB,cAAc,GAAG,SAAS;AAAA,IACxD,YAAY,WAAW,OAAO,UAAU,KAAK;AAAA,IAC7C,YAAY,WAAW,OAAO,UAAU;AAAA,IACxC,QAAQ,WAAW,OAAO,MAAM;AAAA,EACjC;AACD;AAGO,SAAS,kCAAwE,OAG3E;AACZ,SAAO,EAAE,OAAO,MAAM,WAAW,WAAW,CAAC,UAAU,MAAM;AAC9D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/profile-bindings-internal.ts","../src/repository-change-launch-internal.ts","../src/repository-change-ui-launcher-internal.ts"],"sourcesContent":["function record(value: unknown, label: string): Record<string, unknown> {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value))\n\t\tthrow new Error(`${label} must be an object`);\n\treturn value as Record<string, unknown>;\n}\n\n/** Strict profile wiring shared by repository-change extensions. @internal */\nexport function parseRepositoryProfileBindings<K extends string>(\n\traw: unknown,\n\textensionId: string,\n\tfields: Record<K, string>,\n): Readonly<Record<string, Readonly<Record<K, string>>>> {\n\tconst config = raw === undefined ? {} : record(raw, `${extensionId} configuration`);\n\tif (config.profile_bindings === undefined) return Object.freeze({});\n\tconst mappings = record(config.profile_bindings, \"profile_bindings\");\n\treturn Object.freeze(\n\t\tObject.fromEntries(\n\t\t\tObject.entries(mappings).map(([profile, value]) => {\n\t\t\t\tif (!profile.trim() || profile.trim() !== profile)\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"profile_bindings keys must be non-empty profile names without surrounding whitespace\",\n\t\t\t\t\t);\n\t\t\t\tconst mapping = record(value, `profile_bindings.${profile}`);\n\t\t\t\tfor (const key of Object.keys(mapping))\n\t\t\t\t\tif (!Object.values(fields).includes(key))\n\t\t\t\t\t\tthrow new Error(`Unknown profile_bindings.${profile}.${key}`);\n\t\t\t\tconst binding = Object.fromEntries(\n\t\t\t\t\tObject.entries<string>(fields).map(([field, key]) => {\n\t\t\t\t\t\tconst value = mapping[key];\n\t\t\t\t\t\tif (value !== undefined && (typeof value !== \"string\" || !value.trim()))\n\t\t\t\t\t\t\tthrow new Error(`profile_bindings.${profile}.${key} must be a non-empty string`);\n\t\t\t\t\t\treturn [field, value === undefined ? profile : (value as string).trim()];\n\t\t\t\t\t}),\n\t\t\t\t) as Record<K, string>;\n\t\t\t\treturn [profile, Object.freeze(binding)];\n\t\t\t}),\n\t\t),\n\t);\n}\n","import { parseRepoLocator, trimString } from \"@leitwerk-dev/domain\";\nimport type { Codec } from \"@leitwerk-dev/process-sdk\";\n\n/** @public */\nexport interface RepositoryChangeParamsBase {\n\t/** @public */\n\trepoLocator: string;\n\t/** @public */\n\tbaseBranch: string;\n\t/** @public */\n\tworkBranch: string;\n\t/** @public */\n\tprompt: string;\n}\n\n/** @public */\nexport type RepositoryChangeLaunchParams<TExtra extends object = Record<never, never>> = TExtra &\n\tRepositoryChangeParamsBase;\n\n/** Shared source metadata; provider-specific interfaces retain their exported names. @public */\nexport interface RepositoryIssueOriginParams {\n\t/** @public */\n\torigin: \"issue\";\n\t/** @public */\n\tissueNumber: number;\n\t/** @public */\n\tissueUrl: string;\n\t/** @public */\n\ttriggerLabel: string;\n\t/** @public */\n\tdoneLabel: string;\n}\n\n/** @public */\nexport interface RepositoryUiOriginParams {\n\t/** @public */\n\torigin: \"ui\";\n\t/** @public */\n\tissueNumber: null;\n\t/** @public */\n\tissueUrl: null;\n\t/** @public */\n\ttriggerLabel: null;\n\t/** @public */\n\tdoneLabel: null;\n}\n\n/** GitHub/Forgejo legacy origins default to issue; other providers may be stricter. @internal */\nexport function normalizeRepositoryIssueOrigin(\n\trecord: Record<string, unknown>,\n\tdisplayName: string,\n\ttext: (name: string) => string,\n): RepositoryIssueOriginParams | RepositoryUiOriginParams {\n\tconst origin = trimString(record.origin);\n\tif (origin === \"ui\") {\n\t\treturn { origin: \"ui\", issueNumber: null, issueUrl: null, triggerLabel: null, doneLabel: null };\n\t}\n\tif (origin && origin !== \"issue\") throw new Error(`${displayName} requires a valid origin`);\n\tif (\n\t\ttypeof record.issueNumber !== \"number\" ||\n\t\t!Number.isInteger(record.issueNumber) ||\n\t\trecord.issueNumber <= 0\n\t)\n\t\tthrow new Error(`${displayName} requires issueNumber`);\n\treturn {\n\t\torigin: \"issue\",\n\t\tissueNumber: record.issueNumber,\n\t\tissueUrl: text(\"issueUrl\"),\n\t\ttriggerLabel: text(\"triggerLabel\"),\n\t\tdoneLabel: text(\"doneLabel\"),\n\t};\n}\n\n/** @public */\nexport interface NormalizedRepositoryChangeParamsInput {\n\t/** @internal */\n\trepoLocator: string;\n\t/** @internal */\n\tbaseBranch: string;\n\t/** @internal */\n\tworkBranch: string;\n\t/** @internal */\n\tprompt: string;\n}\n\n/** @public */\nexport function repositoryChangeParamsRecord(\n\tvalue: unknown,\n\tdisplayName: string,\n): Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new Error(`${displayName} params must be an object`);\n\t}\n\treturn value as Record<string, unknown>;\n}\n\n/** @public */\nexport function normalizeRepositoryChangeParamsInput(\n\tvalue: unknown,\n\tdisplayName: string,\n): NormalizedRepositoryChangeParamsInput {\n\tconst record = repositoryChangeParamsRecord(value, displayName);\n\tconst rawRepoLocator = trimString(record.repoLocator);\n\treturn {\n\t\trepoLocator: parseRepoLocator(rawRepoLocator)?.value ?? rawRepoLocator,\n\t\tbaseBranch: trimString(record.baseBranch) || \"main\",\n\t\tworkBranch: trimString(record.workBranch),\n\t\tprompt: trimString(record.prompt),\n\t};\n}\n\n/** Normalize issue-capable repository params with provider-owned required text fields. @internal */\nexport function normalizeRepositoryIssueChangeParams<K extends string>(\n\tvalue: unknown,\n\tdisplayName: string,\n\tfields: readonly K[],\n): NormalizedRepositoryChangeParamsInput &\n\tRecord<K, string> &\n\t(RepositoryIssueOriginParams | RepositoryUiOriginParams) {\n\tconst shared = normalizeRepositoryChangeParamsInput(value, displayName);\n\tconst record = repositoryChangeParamsRecord(value, displayName);\n\tconst text = (name: string) => {\n\t\tconst value = trimString(record[name]);\n\t\tif (!value) throw new Error(`${displayName} requires ${name}`);\n\t\treturn value;\n\t};\n\treturn {\n\t\t...shared,\n\t\t...(Object.fromEntries(fields.map((name) => [name, text(name)])) as Record<K, string>),\n\t\t...normalizeRepositoryIssueOrigin(record, displayName, text),\n\t};\n}\n\n/** @public */\nexport function createRepositoryChangeParamsCodec<T extends RepositoryChangeParamsBase>(input: {\n\t/** @public */\n\tnormalize(value: unknown): T;\n}): Codec<T> {\n\treturn { parse: input.normalize, serialize: (value) => value };\n}\n","import { trimString } from \"@leitwerk-dev/domain\";\nimport {\n\ttype LauncherValidationError,\n\ttype LaunchPreparationCheck,\n\ttype ProcessLaunchConfig,\n\ttype ProcessLauncherDefinition,\n\ttype RepositoryIssue,\n\ttype RepositoryIssueWatcherConfig,\n\tSafeLaunchPreparationError,\n} from \"@leitwerk-dev/process-sdk\";\nimport { buildAutoWorkBranchFromSeed } from \"./auto-work-branch.js\";\n\n/** Recheck provider-owned repository visibility before launch. @internal */\nexport function repositoryVisibilityCheck(\n\tprovider: string,\n\tisVisible: () => Promise<boolean>,\n): LaunchPreparationCheck {\n\treturn {\n\t\tid: \"repository_visibility\",\n\t\tlabel: \"Check repository visibility\",\n\t\tasync run({ signal }) {\n\t\t\tsignal.throwIfAborted();\n\t\t\tconst visible = await isVisible();\n\t\t\tsignal.throwIfAborted();\n\t\t\tif (!visible)\n\t\t\t\tthrow new SafeLaunchPreparationError(\n\t\t\t\t\t\"Repository is not visible\",\n\t\t\t\t\t`Grant the selected ${provider} profile access to the repository, then try again.`,\n\t\t\t\t);\n\t\t},\n\t};\n}\n\n/** Shared UI mechanics; providers retain credentials, preparation and launch metadata. @internal */\nexport function createRepositoryChangeUiLauncher<\n\tP,\n\tR extends {\n\t\t/** @internal */\n\t\tfull_name: string;\n\t\t/** @internal */\n\t\thtml_url: string;\n\t\t/** @internal */\n\t\tssh_url: string;\n\t\t/** @internal */\n\t\tdefault_branch: string;\n\t},\n\tB,\n\tI,\n>(options: {\n\t/** @internal */\n\tid: string;\n\t/** @internal */\n\tprovider: string;\n\t/** @internal */\n\tproviderId: string;\n\t/** @internal */\n\tassertConfigured(): void;\n\t/** @internal */\n\tprofiles(): readonly string[];\n\t/** @internal */\n\trepositories(profile: string): Promise<readonly R[]>;\n\t/** @internal */\n\tresolveProfiles(profile: string): B;\n\t/** @internal */\n\tresolveGitIdentity(profile: string): Promise<I>;\n\t/** @internal */\n\tparams(\n\t\trepository: R,\n\t\tinput: B & {\n\t\t\t/** @internal */\n\t\t\tprofile: string;\n\t\t\t/** @internal */\n\t\t\tprompt: string;\n\t\t\t/** @internal */\n\t\t\tworkBranch: string;\n\t\t},\n\t): P;\n\t/** @internal */\n\tlaunchConfig(params: P, title: string, identity: I): ProcessLaunchConfig<P>;\n\t/** @internal */\n\tpreparationChecks: NonNullable<ProcessLauncherDefinition<P>[\"ui\"]>[\"preparationChecks\"];\n}): ProcessLauncherDefinition<P> & {\n\t/** Resolve issue launches using the same provider wiring as UI launches. @internal */\n\tresolveIssueLaunchConfig(event: {\n\t\t/** @internal */ profile: string;\n\t\t/** @internal */ repository: R;\n\t\t/** @internal */ issue: Pick<RepositoryIssue, \"number\" | \"title\" | \"body\" | \"html_url\">;\n\t\t/** @internal */ labels: RepositoryIssueWatcherConfig[\"labels\"];\n\t}): Promise<ProcessLaunchConfig<P>>;\n} {\n\tconst { provider, providerId } = options;\n\tconst profileField = `${providerId}Profile`;\n\tfunction validationError(\n\t\tfieldId: string,\n\t\tmessage: string,\n\t\tcode: LauncherValidationError[\"code\"] = \"required\",\n\t): LauncherValidationError {\n\t\treturn { code, fieldId, message };\n\t}\n\treturn {\n\t\tasync resolveIssueLaunchConfig({ profile, repository, issue, labels }) {\n\t\t\tconst title = issue.title.trim();\n\t\t\tconst body = issue.body?.trim() ?? \"\";\n\t\t\tconst binding = options.resolveProfiles(profile);\n\t\t\tconst identity = await options.resolveGitIdentity(profile);\n\t\t\treturn options.launchConfig(\n\t\t\t\t{\n\t\t\t\t\t...options.params(repository, {\n\t\t\t\t\t\t...binding,\n\t\t\t\t\t\tprofile,\n\t\t\t\t\t\tworkBranch: `leitwerk/issue-${issue.number}`,\n\t\t\t\t\t\tprompt: `${title}${body ? `\\n\\n${body}` : \"\"}`,\n\t\t\t\t\t}),\n\t\t\t\t\torigin: \"issue\",\n\t\t\t\t\tissueNumber: issue.number,\n\t\t\t\t\tissueUrl: issue.html_url,\n\t\t\t\t\ttriggerLabel: labels.trigger,\n\t\t\t\t\tdoneLabel: labels.done,\n\t\t\t\t},\n\t\t\t\ttitle,\n\t\t\t\tidentity,\n\t\t\t);\n\t\t},\n\t\tid: options.id,\n\t\tlabel: `${provider} Repo Change`,\n\t\tdescription: `Plan, implement, review, and publish a ${provider} change without a source issue`,\n\t\tvisibility: \"ui\",\n\t\tui: {\n\t\t\tcard: {\n\t\t\t\ttitle: `${provider} Repo Change`,\n\t\t\t\tdescription: `Start a repository change and publish it as a ${provider} pull request.`,\n\t\t\t},\n\t\t\tlaunchConfigSchema: {\n\t\t\t\tid: `${providerId}_repo_change_form`,\n\t\t\t\ttitle: `${provider} Repo Change`,\n\t\t\t\tfields: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: profileField,\n\t\t\t\t\t\tlabel: `${provider} profile`,\n\t\t\t\t\t\tkind: \"select\",\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tdescription: `${provider} profile with server-configured CI and Git SSH access.`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"repository\",\n\t\t\t\t\t\tlabel: \"Repository\",\n\t\t\t\t\t\tkind: \"select\",\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tdescription: `Repository visible to the selected ${provider} profile.`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"prompt\",\n\t\t\t\t\t\tlabel: \"Requested change\",\n\t\t\t\t\t\tkind: \"textarea\",\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tplaceholder: \"Describe the change to plan, implement, review, and publish.\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tsubmitLabel: \"Start change\",\n\t\t\t},\n\t\t\tresolveDefaults() {\n\t\t\t\treturn { [profileField]: options.profiles()[0] ?? \"\", repository: \"\", prompt: \"\" };\n\t\t\t},\n\t\t\tasync resolveOptions(input) {\n\t\t\t\tconst profile = trimString(input[profileField]);\n\t\t\t\treturn {\n\t\t\t\t\t[profileField]: options.profiles().map((value) => ({ value, label: value })),\n\t\t\t\t\trepository: (await options.repositories(profile)).map((repository) => ({\n\t\t\t\t\t\tvalue: repository.full_name,\n\t\t\t\t\t\tlabel: repository.full_name,\n\t\t\t\t\t\tdescription: repository.html_url,\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t},\n\t\t\tpreparationChecks: options.preparationChecks,\n\t\t\tresolveRelaunchInput(input) {\n\t\t\t\treturn {\n\t\t\t\t\t[profileField]: trimString(input[profileField]),\n\t\t\t\t\trepository: trimString(input.repository),\n\t\t\t\t\tprompt: trimString(input.prompt),\n\t\t\t\t};\n\t\t\t},\n\t\t\tasync resolveLaunchConfig(input) {\n\t\t\t\tconst profile = trimString(input[profileField]);\n\t\t\t\tconst repositoryName = trimString(input.repository);\n\t\t\t\tconst prompt = trimString(input.prompt);\n\t\t\t\tconst errors: LauncherValidationError[] = [];\n\t\t\t\tconst invalid = (fieldId: string, message: string) => ({\n\t\t\t\t\tok: false as const,\n\t\t\t\t\terrors: [validationError(fieldId, message, \"custom_rule\")],\n\t\t\t\t});\n\t\t\t\toptions.assertConfigured();\n\t\t\t\tif (!profile) errors.push(validationError(profileField, `${provider} profile is required`));\n\t\t\t\telse if (!options.profiles().includes(profile))\n\t\t\t\t\terrors.push(\n\t\t\t\t\t\tvalidationError(profileField, `${provider} profile is not available`, \"custom_rule\"),\n\t\t\t\t\t);\n\t\t\t\tif (!repositoryName) errors.push(validationError(\"repository\", \"Repository is required\"));\n\t\t\t\tif (!prompt) errors.push(validationError(\"prompt\", \"Requested change is required\"));\n\t\t\t\tif (errors.length > 0) return { ok: false, errors };\n\t\t\t\tconst repository = (await options.repositories(profile)).find(\n\t\t\t\t\t(candidate) => candidate.full_name === repositoryName,\n\t\t\t\t);\n\t\t\t\tif (!repository)\n\t\t\t\t\treturn invalid(\n\t\t\t\t\t\t\"repository\",\n\t\t\t\t\t\t`Repository is not available to the selected ${provider} profile`,\n\t\t\t\t\t);\n\t\t\t\tlet binding: B;\n\t\t\t\ttry {\n\t\t\t\t\tbinding = options.resolveProfiles(profile);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn invalid(profileField, (error as Error).message);\n\t\t\t\t}\n\t\t\t\tconst identity = await options.resolveGitIdentity(profile);\n\t\t\t\tconst workBranch = buildAutoWorkBranchFromSeed(\n\t\t\t\t\tprompt,\n\t\t\t\t\t`${repository.ssh_url}:${repository.default_branch}`,\n\t\t\t\t);\n\t\t\t\tconst params = options.params(repository, { ...binding, profile, prompt, workBranch });\n\t\t\t\treturn { ok: true, launchConfig: options.launchConfig(params, prompt, identity) };\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;AAAA,SAAS,OAAO,OAAgB,OAAwC;AACvE,MAAI,CAAC,SAAS,OAAO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AM,cAAc,MAAM,QAAQ,aAAa,OAAO,GAAG;AAAA,UACxD,CAAC,cAAc,UAAU,cAAc;AAAA,QACxC;AACA,YAAI,CAAC;AACJ,iBAAO;AAAA,YACN;AAAA,YACA,+CAA+C,QAAQ;AAAA,UACxD;AACD,YAAI;AACJ,YAAI;AACH,oBAAU,QAAQ,gBAAgB,OAAO;AAAA,QAC1C,SAAS,OAAO;AACf,iBAAO,QAAQ,cAAe,MAAgB,OAAO;AAAA,QACtD;AACA,cAAM,WAAW,MAAM,QAAQ,mBAAmB,OAAO;AACzD,cAAM,aAAa;AAAA,UAClB;AAAA,UACA,GAAG,WAAW,OAAO,IAAI,WAAW,cAAc;AAAA,QACnD;AACA,cAAM,SAAS,QAAQ,OAAO,YAAY,EAAE,GAAG,SAAS,SAAS,QAAQ,WAAW,CAAC;AACrF,eAAO,EAAE,IAAI,MAAM,cAAc,QAAQ,aAAa,QAAQ,QAAQ,QAAQ,EAAE;AAAA,MACjF;AAAA,IACD;AAAA,EACD;AACD;","names":["value","record","value","trimString","trimString"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ExternalActionSource, type FlowAutomaticRunContext } from "@leitwerk-dev/process-sdk";
|
|
2
|
-
import { type ConflictEvidence } from "@leitwerk-dev/repository-rebase";
|
|
3
2
|
import { type GitIdentity } from "./finalization-git.js";
|
|
4
3
|
import type { RepositoryChangeState } from "./repository-change-state.js";
|
|
4
|
+
import { type ConflictEvidence } from "./repository-rebase/index.js";
|
|
5
|
+
export { pullRequestPublicationCallbacks, pullRequestPublicationSources, readPullRequestFeedback, reconcilePullRequestSourceIssue, resolvePullRequestGitIdentity, } from "./pull-request-publication-internal.js";
|
|
5
6
|
/** @public */
|
|
6
7
|
export interface PublicationRequest {
|
|
7
8
|
/** @public */
|
|
@@ -225,5 +226,4 @@ export declare function createRepositoryChangePublication<P extends PublicationP
|
|
|
225
226
|
/** @public */
|
|
226
227
|
happyPath: string[];
|
|
227
228
|
};
|
|
228
|
-
export {};
|
|
229
229
|
//# sourceMappingURL=repository-change-publication.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-change-publication.d.ts","sourceRoot":"","sources":["../src/repository-change-publication.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"repository-change-publication.d.ts","sourceRoot":"","sources":["../src/repository-change-publication.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAE5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,8BAA8B,CAAC;AAGpG,OAAO,EACN,+BAA+B,EAC/B,6BAA6B,EAC7B,uBAAuB,EACvB,+BAA+B,EAC/B,6BAA6B,GAC7B,MAAM,wCAAwC,CAAC;AAEhD,cAAc;AACd,MAAM,WAAW,kBAAkB;IAClC,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc;IACd,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AACD,cAAc;AACd,MAAM,WAAW,mBAAmB;IACnC,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AACD,cAAc;AACd,MAAM,WAAW,iBAAiB;IACjC,cAAc;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc;IACd,UAAU,EAAE,MAAM,CA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