@klevar/portal-cli 0.1.9 → 0.1.10
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/dist/commands/updates.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const updateCommands = {
|
|
2
2
|
'updates.list': { method: 'GET', path: '/api/admin/projects/:id/updates', auth: 'apiKey', description: 'List updates' },
|
|
3
3
|
'updates.create': { method: 'POST', path: '/api/admin/projects/:id/updates', auth: 'apiKey', description: 'Create update', body: ['content', 'visibility', 'author'], supportsFiles: true },
|
|
4
|
-
'updates.update': { method: 'PATCH', path: '/api/admin/updates/:updateId', auth: 'apiKey', description: '
|
|
4
|
+
'updates.update': { method: 'PATCH', path: '/api/admin/updates/:updateId', auth: 'apiKey', description: 'Edit an existing update in place', body: ['content', 'visibility'] },
|
|
5
5
|
'updates.delete': { method: 'DELETE', path: '/api/admin/updates/:updateId', auth: 'apiKey', description: 'Delete update' },
|
|
6
6
|
'comments.list': { method: 'GET', path: '/api/admin/projects/:id/updates/:updateId/comments', auth: 'apiKey', description: 'List update comments' },
|
|
7
7
|
'comments.create': { method: 'POST', path: '/api/admin/projects/:id/updates/:updateId/comments', auth: 'apiKey', description: 'Create update comment', body: ['content'] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updates.js","sourceRoot":"","sources":["../../commands/updates.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iCAAiC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE;IACvH,gBAAgB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE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Output(data, commandKey) {
|
|
|
623
623
|
if (data.update) {
|
|
624
624
|
const u = data.update;
|
|
625
625
|
const vis = u.visibility === 'internal' ? ' [INTERNAL]' : '';
|
|
626
|
-
|
|
626
|
+
const action = commandKey === 'updates.update' ? 'Update edited in place' : 'Update posted';
|
|
627
|
+
const edited = commandKey === 'updates.update' && u.editedAt ? ` (edited ${u.editedAt})` : '';
|
|
628
|
+
console.log(`${action}${vis}: ${u.content.slice(0, 80)}${u.content.length > 80 ? '...' : ''} [${u.id}]${edited}`);
|
|
627
629
|
return;
|
|
628
630
|
}
|
|
629
631
|
if (data.portalToken) {
|