@velaro/cli 1.4.199 → 1.4.201
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/lib/commands/compliance.js +25 -1
- package/lib/commands/teams.js +9 -0
- package/package.json +1 -1
|
@@ -13,7 +13,8 @@ export const complianceCommand = {
|
|
|
13
13
|
.command(complianceAttestationCommand)
|
|
14
14
|
.command(complianceRedactionTestCommand)
|
|
15
15
|
.command(complianceRedactionStatusCommand)
|
|
16
|
-
.command(complianceRedactionEventsCommand)
|
|
16
|
+
.command(complianceRedactionEventsCommand)
|
|
17
|
+
.command(complianceReadinessCommand),
|
|
17
18
|
// Default: no subcommand = run status (same as `velaro compliance status`)
|
|
18
19
|
handler: runCommand(async () => { await runStatus(); }),
|
|
19
20
|
};
|
|
@@ -227,3 +228,26 @@ const complianceAttestationCommand = {
|
|
|
227
228
|
console.log('\n' + result.attestationText);
|
|
228
229
|
}),
|
|
229
230
|
};
|
|
231
|
+
|
|
232
|
+
// velaro compliance readiness: the Compliance Readiness checklist (settings turned on in your account).
|
|
233
|
+
const complianceReadinessCommand = {
|
|
234
|
+
command: 'readiness',
|
|
235
|
+
describe: 'Show the Compliance Readiness checklist (a check mark means a setting is on, not that it is legally sufficient)',
|
|
236
|
+
builder: (y) => y,
|
|
237
|
+
handler: runCommand(async () => {
|
|
238
|
+
const r = await get('/ComplianceReadiness');
|
|
239
|
+
console.log(`
|
|
240
|
+
Compliance Readiness: ${r.doneCount} of ${r.applicableCount} controls set up
|
|
241
|
+
${'-'.repeat(50)}`);
|
|
242
|
+
const mark = { done: '[x]', outstanding: '[ ]', notApplicable: '[-]', unknown: '[?]' };
|
|
243
|
+
for (const c of r.controls) {
|
|
244
|
+
const by = c.setUpBy ? ` by ${c.setUpBy}` : '';
|
|
245
|
+
const at = c.setUpAt ? ` on ${c.setUpAt}` : '';
|
|
246
|
+
console.log(`${mark[c.status] ?? '[?]'} ${c.title}: ${c.detail}${c.status === 'done' ? ` Set up${by}${at}.` : ''}`);
|
|
247
|
+
if (c.status === 'outstanding') console.log(` How to add: ${c.howTo} (${c.howToPath})`);
|
|
248
|
+
}
|
|
249
|
+
console.log(`
|
|
250
|
+
${r.footerNotice}
|
|
251
|
+
`);
|
|
252
|
+
}),
|
|
253
|
+
};
|
package/lib/commands/teams.js
CHANGED
|
@@ -166,6 +166,9 @@ export const teamsCommand = {
|
|
|
166
166
|
.option('ticket-created', { type: 'boolean', describe: 'Ticket created alerts on/off' })
|
|
167
167
|
.option('ticket-assigned', { type: 'boolean', describe: 'Ticket assigned alerts on/off' })
|
|
168
168
|
.option('daily-digest', { type: 'boolean', describe: 'Daily digest on/off' })
|
|
169
|
+
.option('pin', { type: 'number', describe: 'Pin alerts to this Teams destination (a refId from --list-targets)' })
|
|
170
|
+
.option('unpin', { type: 'boolean', describe: 'Unpin and use the most recently active Teams conversation' })
|
|
171
|
+
.option('list-targets', { type: 'boolean', describe: 'List the Teams destinations alerts can be pinned to' })
|
|
169
172
|
.option('daily-cap', { type: 'number', describe: 'Max alerts per day for this account' })
|
|
170
173
|
.option('reset-daily-cap', { type: 'boolean', describe: 'Clear the account cap and use the platform default' })
|
|
171
174
|
.option('status-every', { type: 'number', describe: 'Post a status into the channel every N minutes (5-1440; plan limits apply)' })
|
|
@@ -173,7 +176,13 @@ export const teamsCommand = {
|
|
|
173
176
|
.option('status-when-queue', { type: 'number', describe: 'Post a status as soon as this many chats are waiting (0 = no limit)' })
|
|
174
177
|
.option('status-when-wait', { type: 'number', describe: 'Post a status as soon as the longest wait reaches this many minutes (0 = no limit)' }),
|
|
175
178
|
async (argv) => {
|
|
179
|
+
if (argv.listTargets) {
|
|
180
|
+
console.log(JSON.stringify(await request('GET', '/TeamsBot/PushTargets'), null, 2));
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
176
183
|
const body = {};
|
|
184
|
+
if (argv.pin !== undefined) body.pinnedConversationRefId = argv.pin;
|
|
185
|
+
if (argv.unpin) body.clearPinnedConversation = true;
|
|
177
186
|
if (argv.newChat !== undefined) body.pushNewChat = argv.newChat;
|
|
178
187
|
if (argv.missed !== undefined) body.pushMissed = argv.missed;
|
|
179
188
|
if (argv.ticketCreated !== undefined) body.pushTicketCreated = argv.ticketCreated;
|
package/package.json
CHANGED