open-azdo 0.2.4 → 0.2.5
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/dist/open-azdo.js
CHANGED
|
@@ -46932,17 +46932,17 @@ var runGit = (workspace, operation, args2, allowNonZeroExit = false) => exports_
|
|
|
46932
46932
|
allowNonZeroExit
|
|
46933
46933
|
});
|
|
46934
46934
|
});
|
|
46935
|
+
var resolveHeadReviewedSourceCommitCandidate = (workspace) => runGit(workspace, "Git.resolveReviewedSourceCommit.revList", ["rev-list", "--parents", "-n", "1", "HEAD"]).pipe(exports_Effect.map((result4) => {
|
|
46936
|
+
const hashes = result4.stdout.trim().split(/\s+/);
|
|
46937
|
+
return hashes.length === 3 ? "HEAD^2" : "HEAD";
|
|
46938
|
+
}));
|
|
46935
46939
|
var resolveReviewedSourceCommit = ({ workspace, sourceCommitId }) => exports_Effect.gen(function* () {
|
|
46936
|
-
const
|
|
46937
|
-
|
|
46938
|
-
|
|
46939
|
-
"-
|
|
46940
|
-
|
|
46941
|
-
|
|
46942
|
-
]).pipe(exports_Effect.map((result4) => {
|
|
46943
|
-
const hashes = result4.stdout.trim().split(/\s+/);
|
|
46944
|
-
return hashes.length === 3 ? "HEAD^2" : "HEAD";
|
|
46945
|
-
})));
|
|
46940
|
+
const fallbackCandidate = yield* resolveHeadReviewedSourceCommitCandidate(workspace);
|
|
46941
|
+
let candidate = fallbackCandidate;
|
|
46942
|
+
if (sourceCommitId !== undefined) {
|
|
46943
|
+
const explicitCandidate = yield* runGit(workspace, "Git.resolveReviewedSourceCommit.verifyExplicit", ["rev-parse", "--verify", `${sourceCommitId}^{commit}`], true);
|
|
46944
|
+
candidate = explicitCandidate.exitCode === 0 ? sourceCommitId : fallbackCandidate;
|
|
46945
|
+
}
|
|
46946
46946
|
const resolved = yield* runGit(workspace, "Git.resolveReviewedSourceCommit.revParse", [
|
|
46947
46947
|
"rev-parse",
|
|
46948
46948
|
"--verify",
|
|
@@ -47181,6 +47181,7 @@ var GitExecLive = exports_Layer.effect(GitExec, makeGitExec);
|
|
|
47181
47181
|
class OpenCodeRunner extends exports_ServiceMap.Service()("open-azdo/opencode/OpenCodeRunner") {
|
|
47182
47182
|
}
|
|
47183
47183
|
// ../../packages/core/src/opencode/Layers/OpenCodeRunner.ts
|
|
47184
|
+
var OPENCODE_MAX_OUTPUT_BYTES = 1e7;
|
|
47184
47185
|
var buildOpenCodeConfig = (agentName) => ({
|
|
47185
47186
|
$schema: "https://opencode.ai/config.json",
|
|
47186
47187
|
permission: {
|
|
@@ -47371,6 +47372,7 @@ var makeOpenCodeRunner = exports_Effect.gen(function* () {
|
|
|
47371
47372
|
args: buildOpenCodeArgs(request3),
|
|
47372
47373
|
cwd: request3.workspace,
|
|
47373
47374
|
timeout: request3.timeout,
|
|
47375
|
+
maxOutputBytes: OPENCODE_MAX_OUTPUT_BYTES,
|
|
47374
47376
|
env: {
|
|
47375
47377
|
...request3.inheritedEnv,
|
|
47376
47378
|
OPENCODE_CONFIG: configPath,
|
|
@@ -48471,7 +48473,7 @@ var reviewCommandConfig = {
|
|
|
48471
48473
|
var reviewCommand = make33("review", reviewCommandConfig).pipe(withDescription3("Review an Azure DevOps pull request with OpenCode."), withHandler((input) => runReviewCommand(input)));
|
|
48472
48474
|
var openAzdoCli = make33("open-azdo").pipe(withDescription3("Secure Azure DevOps pull-request review CLI powered by OpenCode."), withSubcommands([reviewCommand]));
|
|
48473
48475
|
// package.json
|
|
48474
|
-
var version2 = "0.2.
|
|
48476
|
+
var version2 = "0.2.5";
|
|
48475
48477
|
|
|
48476
48478
|
// src/Main.ts
|
|
48477
48479
|
var cliProgram = run3(openAzdoCli, { version: version2 }).pipe(exports_Effect.scoped, exports_Effect.provide(BaseRuntimeLayer));
|
|
@@ -48480,4 +48482,4 @@ var main = () => runMain2(cliProgram, { disableErrorReporting: true });
|
|
|
48480
48482
|
// bin/open-azdo.ts
|
|
48481
48483
|
main();
|
|
48482
48484
|
|
|
48483
|
-
//# debugId=
|
|
48485
|
+
//# debugId=8152E5963DD16C2864756E2164756E21
|