@r5n/hydra 0.12.0 → 0.13.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.
package/package.json CHANGED
@@ -36,5 +36,5 @@
36
36
  },
37
37
  "type": "module",
38
38
  "types": "src/cli.ts",
39
- "version": "0.12.0"
39
+ "version": "0.13.0"
40
40
  }
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "Add this to your .hydra/config.json: \"$schema\": \"https://raw.githubusercontent.com/r5n-labs/clis/refs/heads/develop/packages/hydra/schema.json\"",
2
+ "$comment": "Add this to config.json in your Hydra home (~/.hydra by default): \"$schema\": \"https://raw.githubusercontent.com/r5n-labs/clis/refs/heads/develop/packages/hydra/schema.json\"",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "additionalProperties": false,
5
5
  "definitions": {
@@ -37,12 +37,45 @@
37
37
  },
38
38
  "type": "object"
39
39
  },
40
+ "credentials": {
41
+ "description": "How Hydra authenticates to the GitHub API; the gh login when absent",
42
+ "oneOf": [
43
+ {
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "mode": { "const": "gh", "description": "Use the operator's gh login (gh auth token)", "type": "string" }
47
+ },
48
+ "required": ["mode"],
49
+ "type": "object"
50
+ },
51
+ {
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "appId": { "description": "The GitHub App's id", "minimum": 1, "type": "integer" },
55
+ "installationId": {
56
+ "description": "The id of the App's installation on the organisation or repository",
57
+ "minimum": 1,
58
+ "type": "integer"
59
+ },
60
+ "mode": { "const": "app", "description": "Mint installation tokens as a GitHub App", "type": "string" },
61
+ "privateKeyPath": {
62
+ "description": "Absolute path to the App's PEM private key, owned by the user running Hydra with mode 0600",
63
+ "minLength": 1,
64
+ "pattern": "^/",
65
+ "type": "string"
66
+ }
67
+ },
68
+ "required": ["mode", "appId", "installationId", "privateKeyPath"],
69
+ "type": "object"
70
+ }
71
+ ]
72
+ },
40
73
  "profile": {
41
74
  "additionalProperties": false,
42
75
  "properties": {
43
76
  "directory": {
44
- "default": ".hydra/runners",
45
- "description": "Directory where runners will be created",
77
+ "description": "Directory where runners will be created; hydra init writes runners/ in the Hydra home. A relative path resolves against the home, or against the directory that holds it when the home is named .hydra",
78
+ "minLength": 1,
46
79
  "type": "string"
47
80
  },
48
81
  "jobHooks": {
@@ -100,7 +133,11 @@
100
133
  "type": "object"
101
134
  },
102
135
  "labels": { "description": "Comma-separated list of labels for the runners", "type": "string" },
103
- "name": { "default": "runner", "description": "Base name for the runners", "type": "string" },
136
+ "name": {
137
+ "description": "Base name for the runners; hydra init uses runner unless --name is given",
138
+ "minLength": 1,
139
+ "type": "string"
140
+ },
104
141
  "numberOfMachines": {
105
142
  "default": 1,
106
143
  "description": "Number of runner machines to create",
@@ -108,15 +145,13 @@
108
145
  "type": "integer"
109
146
  },
110
147
  "os": {
111
- "default": "osx",
112
- "description": "Operating system for the runners",
148
+ "description": "Operating system for the runners; hydra init detects it from the host",
113
149
  "enum": ["osx", "linux", "windows"],
114
150
  "type": "string"
115
151
  },
116
152
  "overwrite": { "default": false, "description": "Whether to overwrite existing runners", "type": "boolean" },
117
153
  "provider": {
118
- "default": "github",
119
- "description": "Runner provider backing this profile",
154
+ "description": "Runner provider backing this profile; hydra init writes github",
120
155
  "enum": ["github", "gitlab"],
121
156
  "type": "string"
122
157
  },
@@ -132,9 +167,11 @@
132
167
  "url": {
133
168
  "description": "GitHub repository URL (https://github.com/<owner>/<repo>) or organization URL (https://github.com/<org>)",
134
169
  "format": "uri",
170
+ "minLength": 1,
135
171
  "type": "string"
136
172
  }
137
173
  },
174
+ "required": ["url", "name", "directory", "os", "provider"],
138
175
  "type": "object"
139
176
  },
140
177
  "runnerEntry": {
@@ -163,6 +200,7 @@
163
200
  "$ref": "#/definitions/cleanup",
164
201
  "description": "Disk cleanup behavior for hydra cleanup and automatic cleanup"
165
202
  },
203
+ "credentials": { "$ref": "#/definitions/credentials" },
166
204
  "defaultProfile": { "description": "The default profile to use when no profile is specified", "type": "string" },
167
205
  "profiles": {
168
206
  "additionalProperties": { "$ref": "#/definitions/profile" },