pray-cli 1.6.0 → 1.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/pray/cli/help.rb +118 -48
- data/lib/pray/cli/suggest.rb +2 -1
- data/lib/pray/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3eed0e334baf8334039a526f2221f2122c34bbf490a815fb8a210c21eeba13b
|
|
4
|
+
data.tar.gz: 36cb614f2b19bd710caa82c775e46557d1701f49e3e8b411eadfd23bc88afbc1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7aeea821b13ff710f042ea0834216d1721358a740ed9965c483014fb40835495acf75ebf9ec70c67c3f0703cf02fe5c24c2fd40d6db020220d5ac4a00a857be0
|
|
7
|
+
data.tar.gz: 6e89e827f444588cd1c679e8e185c9a6bd2259c45ed2963edd832ae9e468017d73ba9ce63e476af6f8618de1b2f1ff4bfb5346bee8c4916f1f6ee65188484262
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.7.0 (2026-07-29)
|
|
6
|
+
|
|
7
|
+
- Reshape CLI help around a `Usage` synopsis and `Options` block; cover every listed command; point unknown-command errors at `pray --help`.
|
|
8
|
+
|
|
5
9
|
## 1.6.0 (2026-07-29)
|
|
6
10
|
|
|
7
11
|
- Run tests with polyrun parallel RSpec, coverage gate, Makefile lint/test, and RBS validate.
|
data/lib/pray/cli/help.rb
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
module Pray
|
|
4
4
|
module CLI
|
|
5
5
|
module Help
|
|
6
|
-
DOCS_URL = "https://github.com/kiskolabs/pray"
|
|
7
|
-
|
|
8
6
|
WORKFLOW_COMMANDS = [
|
|
9
7
|
"install [--locked|--frozen|--offline] resolve, render, and write Prayfile.lock",
|
|
10
8
|
"plan [--remote] preview materialization changes",
|
|
@@ -16,10 +14,10 @@ module Pray
|
|
|
16
14
|
].freeze
|
|
17
15
|
|
|
18
16
|
PACKAGE_COMMANDS = [
|
|
19
|
-
"add <name> [constraint] [--path PATH]",
|
|
20
|
-
"remove <name>",
|
|
17
|
+
"add <name> [constraint] [--path PATH] declare a package in Prayfile",
|
|
18
|
+
"remove <name> remove a package from Prayfile",
|
|
21
19
|
"update [package] [--major] [--latest] [--dry-run] [--json]",
|
|
22
|
-
"unlock <package>",
|
|
20
|
+
"unlock <package> clear a locked package pin",
|
|
23
21
|
"vendor copy resolved packages locally",
|
|
24
22
|
"clean remove local cache and vendor trees"
|
|
25
23
|
].freeze
|
|
@@ -38,23 +36,29 @@ module Pray
|
|
|
38
36
|
|
|
39
37
|
INSPECT_COMMANDS = [
|
|
40
38
|
"list list declared packages",
|
|
41
|
-
"outdated [--remote]
|
|
42
|
-
"explain <package>
|
|
43
|
-
"tree
|
|
39
|
+
"outdated [--remote] show constraint vs resolved versions",
|
|
40
|
+
"explain <package> show why a package was selected",
|
|
41
|
+
"tree print the dependency tree"
|
|
44
42
|
].freeze
|
|
45
43
|
|
|
46
44
|
META_COMMANDS = [
|
|
47
|
-
"init [--targets tool_a,tool_b]",
|
|
45
|
+
"init [--targets tool_a,tool_b] create a starter Prayfile",
|
|
48
46
|
"prayer init scaffold a prayer package",
|
|
49
47
|
"repo init scaffold a distribution root",
|
|
50
48
|
"manifest print canonical Prayfile JSON",
|
|
51
49
|
"package build a distributable prayer archive",
|
|
52
|
-
"version | -V | --version"
|
|
50
|
+
"version | -V | --version print the pray CLI version"
|
|
51
|
+
].freeze
|
|
52
|
+
|
|
53
|
+
GLOBAL_OPTIONS = [
|
|
54
|
+
"--no-input disable prompts",
|
|
55
|
+
"--rm use an ephemeral home directory",
|
|
56
|
+
"--trust [--global] import trust on first use"
|
|
53
57
|
].freeze
|
|
54
58
|
|
|
55
59
|
COMMAND_HELP = {
|
|
56
60
|
"install" => <<~TEXT.strip,
|
|
57
|
-
|
|
61
|
+
resolve packages, render targets, and update Prayfile.lock
|
|
58
62
|
|
|
59
63
|
Usage: pray install [--locked|--frozen|--offline]
|
|
60
64
|
|
|
@@ -63,7 +67,7 @@ module Pray
|
|
|
63
67
|
--offline use cache only
|
|
64
68
|
TEXT
|
|
65
69
|
"verify" => <<~TEXT.strip,
|
|
66
|
-
|
|
70
|
+
check rendered files against Prayfile.lock
|
|
67
71
|
|
|
68
72
|
Usage: pray verify [--strict]
|
|
69
73
|
|
|
@@ -71,56 +75,120 @@ module Pray
|
|
|
71
75
|
With --strict, any finding fails with exit code 6.
|
|
72
76
|
TEXT
|
|
73
77
|
"drift" => <<~TEXT.strip,
|
|
74
|
-
|
|
78
|
+
report differences between lockfile and current resolution
|
|
75
79
|
|
|
76
80
|
Usage: pray drift [--semantic]
|
|
77
81
|
|
|
78
82
|
Exits with code 6 when drift is found.
|
|
79
83
|
TEXT
|
|
84
|
+
"render" => <<~TEXT.strip,
|
|
85
|
+
render targets without updating the lockfile
|
|
86
|
+
|
|
87
|
+
Usage: pray render [--check]
|
|
88
|
+
TEXT
|
|
89
|
+
"format" => <<~TEXT.strip,
|
|
90
|
+
rewrite Prayfile to recommended destination DSL
|
|
91
|
+
|
|
92
|
+
Usage: pray format
|
|
93
|
+
pray fmt
|
|
94
|
+
TEXT
|
|
95
|
+
"fmt" => <<~TEXT.strip,
|
|
96
|
+
rewrite Prayfile to recommended destination DSL
|
|
97
|
+
|
|
98
|
+
Usage: pray format
|
|
99
|
+
pray fmt
|
|
100
|
+
TEXT
|
|
80
101
|
"update" => <<~TEXT.strip,
|
|
81
|
-
|
|
102
|
+
refresh package versions within constraints
|
|
82
103
|
|
|
83
104
|
Usage: pray update [package] [--major] [--latest] [--dry-run] [--json]
|
|
84
105
|
TEXT
|
|
85
106
|
"plan" => <<~TEXT.strip,
|
|
86
|
-
|
|
107
|
+
preview install/apply changes
|
|
87
108
|
|
|
88
109
|
Usage: pray plan [--remote]
|
|
89
110
|
TEXT
|
|
90
|
-
"apply" => "
|
|
111
|
+
"apply" => "materialize the current resolution plan\n\nUsage: pray apply",
|
|
112
|
+
"add" => <<~TEXT.strip,
|
|
113
|
+
declare a package in Prayfile
|
|
114
|
+
|
|
115
|
+
Usage: pray add <name> [constraint] [--path PATH]
|
|
116
|
+
TEXT
|
|
117
|
+
"remove" => "remove a package from Prayfile\n\nUsage: pray remove <name>",
|
|
118
|
+
"unlock" => "clear a locked package pin\n\nUsage: pray unlock <package>",
|
|
119
|
+
"vendor" => "copy resolved packages locally\n\nUsage: pray vendor",
|
|
120
|
+
"clean" => "remove local cache and vendor trees\n\nUsage: pray clean",
|
|
121
|
+
"publish" => <<~TEXT.strip,
|
|
122
|
+
upload packages to a registry or local root
|
|
123
|
+
|
|
124
|
+
Usage: pray publish --root PATH [--server URL ...]
|
|
125
|
+
TEXT
|
|
126
|
+
"login" => <<~TEXT.strip,
|
|
127
|
+
authenticate to a registry server
|
|
128
|
+
|
|
129
|
+
Usage: pray login --server URL --email EMAIL
|
|
130
|
+
TEXT
|
|
131
|
+
"serve" => <<~TEXT.strip,
|
|
132
|
+
run a local registry server
|
|
133
|
+
|
|
134
|
+
Usage: pray serve [--root PATH] [--host HOST] [--port PORT] [--stdio]
|
|
135
|
+
TEXT
|
|
136
|
+
"sync" => <<~TEXT.strip,
|
|
137
|
+
sync packages with peer registries
|
|
138
|
+
|
|
139
|
+
Usage: pray sync [--root PATH] [--peer URL ...]
|
|
140
|
+
TEXT
|
|
141
|
+
"confess" => <<~TEXT.strip,
|
|
142
|
+
record an acceptance or rejection for a package confession
|
|
143
|
+
|
|
144
|
+
Usage: pray confess <package> | --from-lock SPAN_ID [--accepted|--rejected]
|
|
145
|
+
TEXT
|
|
91
146
|
"trust" => <<~TEXT.strip,
|
|
92
|
-
|
|
147
|
+
manage client trust policy for remote sources
|
|
93
148
|
|
|
94
149
|
Usage: pray trust <subcommand>
|
|
95
150
|
|
|
96
151
|
Subcommands: list, show, add-key, remove-key, set-signed, set-allow, import-repo, import-registry, check
|
|
97
152
|
TEXT
|
|
98
|
-
"
|
|
99
|
-
|
|
153
|
+
"list" => "list declared packages\n\nUsage: pray list",
|
|
154
|
+
"outdated" => <<~TEXT.strip,
|
|
155
|
+
show constraint vs resolved versions
|
|
100
156
|
|
|
101
|
-
Usage: pray
|
|
157
|
+
Usage: pray outdated [--remote]
|
|
102
158
|
TEXT
|
|
103
|
-
"
|
|
104
|
-
|
|
159
|
+
"explain" => <<~TEXT.strip,
|
|
160
|
+
show why a package was selected
|
|
105
161
|
|
|
106
|
-
Usage: pray
|
|
162
|
+
Usage: pray explain <package>
|
|
107
163
|
TEXT
|
|
108
|
-
"
|
|
109
|
-
|
|
164
|
+
"tree" => "print the dependency tree\n\nUsage: pray tree",
|
|
165
|
+
"init" => <<~TEXT.strip,
|
|
166
|
+
create a starter Prayfile
|
|
110
167
|
|
|
111
|
-
Usage: pray
|
|
168
|
+
Usage: pray init [--targets tool_a,tool_b]
|
|
112
169
|
TEXT
|
|
113
|
-
"
|
|
114
|
-
|
|
170
|
+
"prayer" => "scaffold a prayer package\n\nUsage: pray prayer init",
|
|
171
|
+
"repo" => "scaffold a distribution root\n\nUsage: pray repo init",
|
|
172
|
+
"manifest" => "print canonical Prayfile JSON\n\nUsage: pray manifest",
|
|
173
|
+
"package" => "build a distributable prayer archive\n\nUsage: pray package",
|
|
174
|
+
"version" => <<~TEXT.strip,
|
|
175
|
+
print the pray CLI version
|
|
176
|
+
|
|
177
|
+
Usage: pray version
|
|
178
|
+
pray -V | --version
|
|
179
|
+
TEXT
|
|
180
|
+
"help" => <<~TEXT.strip
|
|
181
|
+
show help for pray or one command
|
|
115
182
|
|
|
116
|
-
Usage: pray
|
|
183
|
+
Usage: pray help [command]
|
|
184
|
+
pray [command] --help
|
|
117
185
|
TEXT
|
|
118
186
|
}.freeze
|
|
119
187
|
|
|
120
188
|
module_function
|
|
121
189
|
|
|
122
190
|
def print_concise_help
|
|
123
|
-
puts "pray
|
|
191
|
+
puts "Usage: pray [OPTIONS] <COMMAND>"
|
|
124
192
|
puts
|
|
125
193
|
puts "Declare shared instructions in Prayfile, lock versions, and render tool-specific output."
|
|
126
194
|
puts
|
|
@@ -133,9 +201,10 @@ module Pray
|
|
|
133
201
|
puts
|
|
134
202
|
print_command_groups
|
|
135
203
|
puts
|
|
136
|
-
puts "
|
|
137
|
-
puts "
|
|
138
|
-
puts
|
|
204
|
+
puts "Options:"
|
|
205
|
+
GLOBAL_OPTIONS.each { |line| puts " #{line}" }
|
|
206
|
+
puts
|
|
207
|
+
puts "See 'pray help <command>' or 'pray <command> --help' for details on a command."
|
|
139
208
|
end
|
|
140
209
|
|
|
141
210
|
def print_command_help(command)
|
|
@@ -143,25 +212,26 @@ module Pray
|
|
|
143
212
|
return false unless text
|
|
144
213
|
|
|
145
214
|
puts text
|
|
146
|
-
puts
|
|
147
|
-
puts "Documentation: #{DOCS_URL}"
|
|
148
215
|
true
|
|
149
216
|
end
|
|
150
217
|
|
|
151
218
|
def print_command_groups
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
219
|
+
print_group("Workflow", WORKFLOW_COMMANDS)
|
|
220
|
+
puts
|
|
221
|
+
print_group("Packages", PACKAGE_COMMANDS)
|
|
222
|
+
puts
|
|
223
|
+
print_group("Distribution", DISTRIBUTION_COMMANDS)
|
|
224
|
+
puts
|
|
225
|
+
print_group("Trust", TRUST_COMMANDS)
|
|
226
|
+
puts
|
|
227
|
+
print_group("Inspect", INSPECT_COMMANDS)
|
|
228
|
+
puts
|
|
229
|
+
print_group("Meta", META_COMMANDS)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
def print_group(title, lines)
|
|
233
|
+
puts "#{title}:"
|
|
234
|
+
lines.each { |line| puts " #{line}" }
|
|
165
235
|
end
|
|
166
236
|
end
|
|
167
237
|
end
|
data/lib/pray/cli/suggest.rb
CHANGED
|
@@ -14,7 +14,8 @@ module Pray
|
|
|
14
14
|
def unknown_command_message(command)
|
|
15
15
|
message = "unknown command: #{command}"
|
|
16
16
|
suggestion = suggest_command(command, TOP_LEVEL_COMMANDS)
|
|
17
|
-
|
|
17
|
+
message = "#{message}\nDid you mean `#{suggestion}`?" if suggestion
|
|
18
|
+
"#{message}\nSee 'pray --help'."
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def suggest_command(input, candidates)
|
data/lib/pray/version.rb
CHANGED