@plainconceptsplatform/workflows 0.4.3 → 0.4.4
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.
|
@@ -154,6 +154,7 @@ async function validateStagedCatalog(repositoryPath, updates, compileOverride) {
|
|
|
154
154
|
try {
|
|
155
155
|
await copyCompilationInputs(repositoryPath, stagingPath);
|
|
156
156
|
await writeUpdates(stagingPath, updates);
|
|
157
|
+
await initializeStagingRepository(stagingPath);
|
|
157
158
|
const compiler = compileOverride ?? await packageCompiler(stagingPath);
|
|
158
159
|
if (compiler === undefined)
|
|
159
160
|
return [];
|
|
@@ -169,6 +170,9 @@ async function copyCompilationInputs(repositoryPath, stagingPath) {
|
|
|
169
170
|
if (await exists(githubPath))
|
|
170
171
|
await cp(githubPath, join(stagingPath, ".github"), { recursive: true });
|
|
171
172
|
}
|
|
173
|
+
async function initializeStagingRepository(stagingPath) {
|
|
174
|
+
await execFileAsync("git", ["init", "--quiet"], { cwd: stagingPath, windowsHide: true });
|
|
175
|
+
}
|
|
172
176
|
async function packageCompiler(repositoryPath) {
|
|
173
177
|
const scriptPath = join(repositoryPath, "scripts", "compile-agent-workflows.mjs");
|
|
174
178
|
if (!await exists(scriptPath))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
1
|
+
import { access, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { constants } from "node:fs";
|
|
2
3
|
import { tmpdir } from "node:os";
|
|
3
4
|
import { dirname, join } from "node:path";
|
|
4
5
|
import { afterEach, describe, expect, it } from "vitest";
|
|
@@ -296,6 +297,7 @@ describe("catalog installation", () => {
|
|
|
296
297
|
await installCatalog(repositoryPath, {
|
|
297
298
|
sourcePath,
|
|
298
299
|
compile: async (stagingPath) => {
|
|
300
|
+
await expect(access(join(stagingPath, ".git"), constants.F_OK)).resolves.toBeUndefined();
|
|
299
301
|
await writeFile(join(stagingPath, ".github", "workflows", "agent-check.lock.yml"), "opencode run --log-level ERROR\n", "utf8");
|
|
300
302
|
},
|
|
301
303
|
});
|