@rightkit/ci 0.2.49 → 0.3.0

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.
@@ -121,6 +121,43 @@
121
121
  }
122
122
  }
123
123
  }
124
+ ,"workflows": {
125
+ "type": "object",
126
+ "minProperties": 1,
127
+ "maxProperties": 8,
128
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]{0,40}$" },
129
+ "description": "Named workflows rendered by code. kind custom: one build job with triggers (push/pull_request with paths, workflow_dispatch), steps, toolchain pins, a named artifact, per-workflow sparse checkout and concurrency. kind swift-host: swift test on Windows and macOS hosts for chosen packages. kind dispatch-matrix: workflow_dispatch inputs, a plan job emitting a matrix, per-item jobs and a collect job. Every action is pinned to a commit SHA, permissions are contents: read, and no step may read secrets. Validated in full by validateManifest (workflows.mjs).",
130
+ "additionalProperties": {
131
+ "type": "object",
132
+ "required": ["kind"],
133
+ "properties": {
134
+ "kind": { "enum": ["custom", "swift-host", "dispatch-matrix"] },
135
+ "file": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,60}\\.yml$" },
136
+ "on": { "type": "object", "propertyNames": { "enum": ["push", "pull_request", "workflow_dispatch"] } },
137
+ "concurrency": { "type": "object", "additionalProperties": false, "required": ["group"], "properties": { "group": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,60}$" }, "cancelInProgress": { "type": "boolean" } } },
138
+ "checkout": { "type": "object" },
139
+ "timeoutMinutes": { "type": "integer", "minimum": 1, "maximum": 360 },
140
+ "runsOn": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] },
141
+ "os": { "type": "array", "items": { "type": "string" } },
142
+ "packages": { "type": "array", "items": { "type": "string" } },
143
+ "swiftArgs": { "type": "array", "items": { "type": "string" } },
144
+ "toolchain": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "properties": {
148
+ "rust": { "type": "string", "pattern": "^(stable|beta|nightly|[0-9]+\\.[0-9]+(\\.[0-9]+)?)$" },
149
+ "swift": { "type": "object", "additionalProperties": false, "required": ["version", "sha256"], "properties": { "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }
150
+ }
151
+ },
152
+ "steps": { "type": "array", "items": { "type": "object", "required": ["shell", "run"], "additionalProperties": false, "properties": { "name": { "type": "string" }, "shell": { "enum": ["bash", "pwsh"] }, "workingDirectory": { "type": "string" }, "run": { "type": "string" } } } },
153
+ "artifact": { "type": "object", "required": ["name", "path"], "additionalProperties": false, "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "retentionDays": { "type": "integer", "minimum": 1, "maximum": 90 }, "ifNoFilesFound": { "enum": ["error", "warn", "ignore"] }, "when": { "enum": ["success", "always"] } } },
154
+ "inputs": { "type": "object" },
155
+ "plan": { "type": "object" },
156
+ "jobs": { "type": "array" },
157
+ "collect": { "type": "object" }
158
+ }
159
+ }
160
+ }
124
161
  ,"swift": {
125
162
  "type": "object",
126
163
  "additionalProperties": false,
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/ci",
3
- "version": "0.2.49",
3
+ "version": "0.3.0",
4
4
  "description": "Public-repo-only GitHub Actions workflow layer: templates, visibility gate, sync/drift/adopt/uninstall for right-git.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "git+https://github.com/Orthic-Labs/rightkit.git",
33
+ "url": "git+https://github.com/bogusyogi/rightkit.git",
34
34
  "directory": "packages/ci"
35
35
  },
36
36
  "scripts": {
package/sync.mjs CHANGED
@@ -8,6 +8,7 @@ import { fileURLToPath } from "node:url";
8
8
  import { assertPublic } from "./policy/visibility-gate.mjs";
9
9
  import { loadManifest, LANE_FILENAMES, buildRenderContext } from "./manifest.mjs";
10
10
  import { applyCheckoutOptions } from "./checkout.mjs";
11
+ import { renderWorkflows } from "./workflows.mjs";
11
12
  import { renderTemplate, MANAGED_MARKER } from "./render.mjs";
12
13
 
13
14
  const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)));
@@ -32,7 +33,7 @@ function releaseChainDependencyError(repoPath, manifest) {
32
33
 
33
34
  /** Render every lane declared in the manifest. Returns { lane, filename, content }[]. */
34
35
  export function renderLanes(manifest, repoPath) {
35
- return manifest.lanes.map((lane) => {
36
+ const laneFiles = manifest.lanes.map((lane) => {
36
37
  const context = buildRenderContext(manifest, repoPath, lane);
37
38
  const filename = LANE_FILENAMES[lane];
38
39
  const templatePath = manifest.profile === "rust-hybrid"
@@ -41,6 +42,8 @@ export function renderLanes(manifest, repoPath) {
41
42
  const templateText = fs.readFileSync(templatePath, "utf8");
42
43
  return { lane, filename, content: applyCheckoutOptions(renderTemplate(templateText, context), manifest) };
43
44
  });
45
+ // manifest.workflows: named custom, swift-host and dispatch-matrix workflows (see workflows.mjs).
46
+ return [...laneFiles, ...renderWorkflows(manifest, repoPath)];
44
47
  }
45
48
 
46
49
  /** List files in <repo>/.github/workflows that carry the right-git managed marker. */