@plainconceptsplatform/workflows 0.4.2 → 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
  });
@@ -39,7 +39,7 @@ export function generateOpencodeCi(baseContent, inspection) {
39
39
  key: nuget-\${{ runner.os }}-\${{ hashFiles('**/*.slnx', '**/Directory.Packages.props') }}
40
40
  restore-keys: nuget-\${{ runner.os }}-
41
41
 
42
- - name: Restore .NET dependencies
42
+ - name: Restore .NET dependencies
43
43
  run: dotnet restore ${solutionPath}
44
44
  `;
45
45
  result = insertBeforeMarker(result, nugetSteps, " - name: Install workspace dependencies");
@@ -120,6 +120,8 @@ describe("generateOpencodeCi", () => {
120
120
  expect(result).toContain("Cache NuGet packages");
121
121
  expect(result).toContain("Restore .NET dependencies");
122
122
  expect(result).toContain("dotnet restore apps/api/Numa.slnx");
123
+ expect(result).toContain("\n - name: Restore .NET dependencies\n");
124
+ expect(result).not.toContain("\n - name: Restore .NET dependencies\n");
123
125
  });
124
126
  it("adds the pinned OpenSpec CLI install step when openspec/ directory exists", () => {
125
127
  const result = generateOpencodeCi(OPENCODE_CI_MD, makeInspection({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/workflows",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",
@@ -40,4 +40,4 @@
40
40
  "typescript": "^5.8.0",
41
41
  "vitest": "^3.0.0"
42
42
  }
43
- }
43
+ }