@intentius/chant-lexicon-forgejo 0.34.1 → 0.37.2

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 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAoFA;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BjF"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AA0JA;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BjF"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "a1453a23ee7e01e5dc02b61f78446bf82ed62ac7f6497c39bbafe93bd5ec0246",
4
+ "manifest.json": "f66dd50d917a3468191e71bd35a81dcfa44e1ccd058b70d5dc143061780cbd5e",
5
5
  "meta.json": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
6
6
  "types/index.d.ts": "66204549b2a864ab5489e3f02c1878e73ab4b3c9d938cfb480b66f71543a43de",
7
7
  "rules/delegate-to-github.ts": "1060cda40f4b73d6cca3ba3fa13b80b4886147d4034c88584c2d80c5510dbe5e",
@@ -9,5 +9,5 @@
9
9
  "rules/wfj011.ts": "fcb8bf6685d744af20ad804ce929488257995c74b9a3353b2eacae3768d1c83e",
10
10
  "skills/chant-forgejo.md": "a1a560429db736c187e0b34cf8dd9efc6ad771afefcbf6f802d160d3d5274257"
11
11
  },
12
- "composite": "fb3e1f92db7ac114fa05f515c85194f5a6fba951e0c695ed2f1f0de275d7ae7f"
12
+ "composite": "3b909700fad85d4139088988700172fb5fb7996cde47f0738de054fbd693d6b4"
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgejo",
3
- "version": "0.34.1",
3
+ "version": "0.37.2",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Forgejo",
6
6
  "intrinsics": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-forgejo",
3
- "version": "0.34.1",
3
+ "version": "0.37.2",
4
4
  "description": "Forgejo / Codeberg / Gitea Actions lexicon for chant — a thin GitHub Actions dialect",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -53,8 +53,8 @@
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "peerDependencies": {
56
- "@intentius/chant": "^0.34.1",
57
- "@intentius/chant-lexicon-github": "^0.34.1"
56
+ "@intentius/chant": "^0.37.2",
57
+ "@intentius/chant-lexicon-github": "^0.37.2"
58
58
  },
59
59
  "scripts": {
60
60
  "generate": "tsx src/codegen/generate-cli.ts",
@@ -82,6 +82,76 @@ takes a workflow file and returns per-property fates plus summary counts —
82
82
  read-only.
83
83
  `;
84
84
 
85
+ const OVERVIEW_CONTENT = `\`@intentius/chant-lexicon-forgejo\` targets **Forgejo Actions** — the CI behind
86
+ [Codeberg](https://codeberg.org), self-hosted [Forgejo](https://forgejo.org),
87
+ and [Gitea](https://about.gitea.com). Forgejo runs **GitHub-Actions-compatible**
88
+ workflows, so the lexicon is a **thin dialect of the [github lexicon](/chant/lexicons/github/)**
89
+ (chant #338): every entity, composite, and expression helper is the same class
90
+ you'd import from the github package. This package supplies only what is
91
+ genuinely Forgejo-specific — the serializer dialect and a github → forgejo
92
+ migration path. One package covers Codeberg, self-hosted Forgejo, and Gitea.
93
+
94
+ Author exactly as you would for GitHub Actions, importing from the forgejo
95
+ package; see [The Forgejo Dialect](/chant/lexicons/forgejo/dialect/) for what
96
+ changes on the way out.
97
+
98
+ ## Build
99
+
100
+ Forgejo reads workflows from \`.forgejo/workflows/\` (or \`.gitea/workflows/\` for
101
+ Gitea), so point the output there — the same way the github lexicon targets
102
+ \`.github/workflows/\`:
103
+
104
+ \`\`\`sh
105
+ chant build src -o .forgejo/workflows/ci.yml
106
+ \`\`\`
107
+
108
+ ## Configuration
109
+
110
+ Override the runner-label map and the actions root in \`chant.config.ts\`:
111
+
112
+ \`\`\`ts
113
+ import type { ChantConfig } from "@intentius/chant";
114
+
115
+ export default {
116
+ lexicons: ["forgejo"],
117
+ forgejo: {
118
+ runnerLabels: {
119
+ "ubuntu-latest": "docker",
120
+ "ubuntu-22.04": "ubuntu-lts",
121
+ },
122
+ actionsRoot: "https://code.forgejo.org",
123
+ },
124
+ } satisfies ChantConfig;
125
+ \`\`\`
126
+
127
+ ## Read-only context tools
128
+
129
+ The forgejo lexicon ships the full \`forgejo:*\` [read-only context tools](/chant/guide/agent-integration/#read-only-context-tools)
130
+ (\`checks\`, \`workflow\`, \`references\`, \`affected\`, \`workflow-yaml\`, \`source\`,
131
+ \`owns\`, \`compare\`). Each builds from source and returns what chant already
132
+ computes — without touching any live forge.
133
+
134
+ ## Runtime observation
135
+
136
+ N/A — workflow definitions are git-tracked, so drift is a \`git diff\`, the same
137
+ rationale as the github and gitlab lexicons. The lexicon implements neither
138
+ \`describeResources()\` nor \`listArtifacts()\` and is warn-skipped on \`--live\`.
139
+
140
+ ## Validating execution
141
+
142
+ A runtime E2E (\`just forgejo-runtime-e2e\`) builds a workflow and **runs** the
143
+ generated \`.forgejo/workflows/ci.yml\` in Docker via a Forgejo runner
144
+ (\`forgejo-runner\` / \`act_runner\` / \`act\` \`exec\`), proving Forgejo Actions
145
+ accepts and executes chant's output. On-demand — it needs Docker and a runner
146
+ tool, and is not part of the gating CI.
147
+
148
+ ## Caveats
149
+
150
+ Flow-style YAML (\`branches: [main]\`) is parsed by chant's lightweight core
151
+ parser, which keeps it as a scalar — prefer block style in sources you intend to
152
+ migrate. This is shared with the github import path.
153
+ `;
154
+
85
155
  /**
86
156
  * Generate documentation site for the Forgejo lexicon.
87
157
  */
@@ -93,8 +163,7 @@ export async function generateDocs(options?: { verbose?: boolean }): Promise<voi
93
163
  distDir: "./dist",
94
164
  outDir: "./docs",
95
165
  basePath: process.env.DOCS_BASE_PATH ?? "/chant/lexicons/forgejo/",
96
- overview:
97
- "Forgejo Actions is a thin dialect of the GitHub Actions lexicon (chant #338): every entity, composite, and expression helper you write for a Forgejo workflow is the same class you'd import from the github lexicon — this package supplies only what's genuinely Forgejo-specific: the serializer dialect (dropped GitHub-only keys, `uses:` action resolution, runner-label mapping) and a github → forgejo migration path.",
166
+ overview: OVERVIEW_CONTENT,
98
167
  outputFormat:
99
168
  "The Forgejo lexicon serializes entities into the same YAML shape as GitHub Actions, then applies the Forgejo dialect (see [The Forgejo Dialect](/chant/lexicons/forgejo/dialect/)) before writing to `.forgejo/workflows/*.yml` (or `.gitea/workflows/*.yml` for Gitea).",
100
169
  extraPages: [