@intentius/chant-lexicon-github 0.1.5 → 0.1.6

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,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "xxhash64",
3
3
  "artifacts": {
4
- "manifest.json": "62337ef86c01e6d1",
4
+ "manifest.json": "17e903ae969510d5",
5
5
  "meta.json": "2d1cccf3c19883a7",
6
6
  "types/index.d.ts": "9d6f903cca5de1e9",
7
7
  "rules/deprecated-action-version.ts": "9ec91b190557f25f",
@@ -37,5 +37,5 @@
37
37
  "skills/chant-github-patterns.md": "7678ef5c6b4b9bdf",
38
38
  "skills/chant-github-security.md": "f3fcfcd84475b73c"
39
39
  },
40
- "composite": "92e041a88a3b5d8d"
40
+ "composite": "3e0d40105e37712f"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "GitHub",
6
6
  "intrinsics": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-github",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "GitHub Actions lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -319,7 +319,8 @@ describe("multi-workflow output", () => {
319
319
  expect(typeof output).toBe("object");
320
320
  const result = output as { primary: string; files: Record<string, string> };
321
321
  expect(result.files).toBeDefined();
322
- expect(Object.keys(result.files).length).toBe(2);
322
+ expect(Object.keys(result.files).length).toBe(1);
323
+ expect(result.files["ci.yml"]).toBeUndefined(); // primary is not a secondary file
323
324
  expect(result.primary).toContain("name: CI");
324
325
  expect(result.primary).toContain("build:");
325
326
  expect(result.files["deploy.yml"]).toContain("ship:");
package/src/serializer.ts CHANGED
@@ -367,10 +367,12 @@ function serializeMultiWorkflow(
367
367
  if (jobsSection) doc.jobs = jobsSection;
368
368
 
369
369
  const content = emitYAMLDocument(doc);
370
- const fileName = `${toKebabCase(name)}.yml`;
371
- files[fileName] = content;
372
-
373
- if (i === 0) primary = content;
370
+ if (i === 0) {
371
+ primary = content;
372
+ // primary is written to the -o path by the CLI; don't also add it to files[]
373
+ } else {
374
+ files[`${toKebabCase(name)}.yml`] = content;
375
+ }
374
376
  }
375
377
 
376
378
  return { primary, files };