holivia 0.18.0 → 0.19.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 +7 -0
- data/README.md +12 -0
- data/SKILL.md +12 -0
- data/lib/holivia/browser_login.rb +2 -0
- data/lib/holivia/cli/help.rb +3 -1
- data/lib/holivia/commands/selfcare.rb +11 -0
- data/lib/holivia/configuration.rb +2 -0
- data/lib/holivia/version.rb +1 -1
- 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: f48cd0cfc125dae15d0ee9bcbdde6ba33bc7776a10a51491c8e604f20ebe5559
|
|
4
|
+
data.tar.gz: 751270d4fdc10546f597e4e3f42ee478a6d9bfbcdb07e72f5598f11eac6c3d74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 584bcae6722a7f2dcd078dd0730653df07f187234eeeebb3c3175efbcdc1fc7fabff2575327a9f42eb46eee915c733f2f1f246d91374f58b884b14612f4c27bc
|
|
7
|
+
data.tar.gz: 1847411588f4980e0820491cf78debe0b32cf7dd0f6656de617c68de5789dab93bb34b07ac63db7b3d8cadb8be23b6526fd5e58c5431d40cd9b4d3d73e213c08
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.19.0] - 2026-11-11
|
|
4
|
+
|
|
5
|
+
- Add `holivia selfcare text <id>` to print the plain text of a selfcare content's text format: slide titles and rich text, in reading order; returns 404 when the content has no text format
|
|
6
|
+
- Add `--format-type TYPE` (`text`, `audio`, or `video`) to `holivia selfcare index`, also with `--all`, to list only contents that have a format of that type
|
|
7
|
+
- Requires a content viewer, content manager, or dev role
|
|
8
|
+
- Requires the matching Holivia backoffice API deployment
|
|
9
|
+
|
|
3
10
|
## [0.18.0] - 2026-11-03
|
|
4
11
|
|
|
5
12
|
- Add `holivia credit-consumption-alert index` with `--enterprise-id`, `--page`, and `--per-page`, listing alerts with their `employees_count` and `consumption`
|
data/README.md
CHANGED
|
@@ -122,6 +122,12 @@ holivia selfcare index --query "communication non violente" --locale fr --state
|
|
|
122
122
|
holivia selfcare index --content-type exercise --page 2 --per-page 100
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
+
Keep only contents that have a format of a given type (`text`, `audio`, or `video`):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
holivia selfcare index --format-type text --all
|
|
129
|
+
```
|
|
130
|
+
|
|
125
131
|
Fetch every matching content as one JSON array (`--all` ignores `--page` and `--per-page`):
|
|
126
132
|
|
|
127
133
|
```bash
|
|
@@ -136,6 +142,12 @@ Show one selfcare content:
|
|
|
136
142
|
holivia selfcare show 123
|
|
137
143
|
```
|
|
138
144
|
|
|
145
|
+
Read the plain text of a content's text format (slide titles and rich text, in reading order; returns 404 when the content has no text format):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
holivia selfcare text 123
|
|
149
|
+
```
|
|
150
|
+
|
|
139
151
|
Create a selfcare content from flags:
|
|
140
152
|
|
|
141
153
|
```bash
|
data/SKILL.md
CHANGED
|
@@ -164,6 +164,12 @@ holivia selfcare index --query "communication non violente" --locale fr --state
|
|
|
164
164
|
holivia selfcare index --content-type exercise --page 2 --per-page 100
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
+
Keep only contents that have a format of a given type (`text`, `audio`, or `video`):
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
holivia selfcare index --format-type text --all
|
|
171
|
+
```
|
|
172
|
+
|
|
167
173
|
Fetch every matching content as one JSON array (`--all` ignores `--page` and `--per-page`):
|
|
168
174
|
|
|
169
175
|
```bash
|
|
@@ -178,6 +184,12 @@ Show one content:
|
|
|
178
184
|
holivia selfcare show 123
|
|
179
185
|
```
|
|
180
186
|
|
|
187
|
+
Read the plain text of a content's text format (slide titles and rich text, in reading order; returns 404 when the content has no text format):
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
holivia selfcare text 123
|
|
191
|
+
```
|
|
192
|
+
|
|
181
193
|
Create a content with flags:
|
|
182
194
|
|
|
183
195
|
```bash
|
|
@@ -53,6 +53,8 @@ module Holivia
|
|
|
53
53
|
|
|
54
54
|
def launch_browser(url)
|
|
55
55
|
command = RUBY_PLATFORM.include?("darwin") ? "open" : "xdg-open"
|
|
56
|
+
# Fixed command with an argument list (no shell); the URL is built by this class.
|
|
57
|
+
# nosemgrep: ruby.lang.security.dangerous-exec.dangerous-exec
|
|
56
58
|
system(command, url, out: File::NULL, err: File::NULL)
|
|
57
59
|
end
|
|
58
60
|
|
data/lib/holivia/cli/help.rb
CHANGED
|
@@ -24,8 +24,10 @@ module Holivia
|
|
|
24
24
|
Selfcare Contents:
|
|
25
25
|
holivia selfcare index [options] List selfcare contents
|
|
26
26
|
(--query TEXT --locale LOCALE --state STATE
|
|
27
|
-
--content-type TYPE --
|
|
27
|
+
--content-type TYPE --format-type TYPE
|
|
28
|
+
--page N --per-page N --all)
|
|
28
29
|
holivia selfcare show <id> Show a selfcare content by id
|
|
30
|
+
holivia selfcare text <id> Show the plain text of a selfcare content's text format
|
|
29
31
|
holivia selfcare create [options] Create a selfcare content
|
|
30
32
|
(--state draft|ongoing_translation|translation_to_be_reviewed|
|
|
31
33
|
translation_reviewed|published)
|
|
@@ -22,6 +22,7 @@ module Holivia
|
|
|
22
22
|
case subcommand
|
|
23
23
|
when "index" then new.index(args)
|
|
24
24
|
when "show" then new.show(args)
|
|
25
|
+
when "text" then new.text(args)
|
|
25
26
|
when "create" then new.create(args)
|
|
26
27
|
when "update" then new.update(args)
|
|
27
28
|
when "compose" then new.compose(args)
|
|
@@ -44,6 +45,9 @@ module Holivia
|
|
|
44
45
|
opts.on("--locale LOCALE") { |v| params[:locale] = v }
|
|
45
46
|
opts.on("--state STATE") { |v| params[:state] = v }
|
|
46
47
|
opts.on("--content-type TYPE") { |v| params[:content_type] = v }
|
|
48
|
+
opts.on("--format-type TYPE", "Only contents with a format of this type (text, audio, video)") do |v|
|
|
49
|
+
params[:format_type] = v
|
|
50
|
+
end
|
|
47
51
|
opts.on("--page N", Integer) { |v| params[:page] = v }
|
|
48
52
|
opts.on("--per-page N", Integer) { |v| params[:per_page] = v }
|
|
49
53
|
opts.on("--all", "Fetch every page and print one JSON array (ignores --page and --per-page)") { all = true }
|
|
@@ -59,6 +63,13 @@ module Holivia
|
|
|
59
63
|
output(client.get("#{BASE_PATH}/#{id}"))
|
|
60
64
|
end
|
|
61
65
|
|
|
66
|
+
def text(args = [])
|
|
67
|
+
id = args.shift
|
|
68
|
+
abort "Usage: holivia selfcare text <id>" unless id
|
|
69
|
+
|
|
70
|
+
output(client.get("#{BASE_PATH}/#{id}/text"))
|
|
71
|
+
end
|
|
72
|
+
|
|
62
73
|
def create(args = []) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
|
63
74
|
options = {}
|
|
64
75
|
OptionParser.new do |opts|
|
|
@@ -58,6 +58,8 @@ module Holivia
|
|
|
58
58
|
return default_config unless raw["environments"].is_a?(Hash)
|
|
59
59
|
return default_config unless raw["current_env"].is_a?(String)
|
|
60
60
|
|
|
61
|
+
# Not a Rails view; raw is a local variable holding the parsed config.
|
|
62
|
+
# nosemgrep: ruby.rails.security.audit.xss.avoid-raw.avoid-raw
|
|
61
63
|
raw
|
|
62
64
|
end
|
|
63
65
|
|
data/lib/holivia/version.rb
CHANGED