incremnt 0.1.4 → 0.1.5
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 +1 -1
- package/src/remote.js +3 -0
- package/src/sync-service.js +4 -0
package/package.json
CHANGED
package/src/remote.js
CHANGED
|
@@ -27,6 +27,7 @@ const remoteCommandHandlers = {
|
|
|
27
27
|
records: executeRemoteRead,
|
|
28
28
|
'program-list': executeRemoteRead,
|
|
29
29
|
'program-summary': executeRemoteRead,
|
|
30
|
+
'program-detail': executeRemoteRead,
|
|
30
31
|
'planned-vs-actual': executeRemoteRead,
|
|
31
32
|
'why-did-this-change': executeRemoteRead
|
|
32
33
|
};
|
|
@@ -105,6 +106,8 @@ function endpointForCommand(baseUrl, normalizedCommand, options) {
|
|
|
105
106
|
return resolveServiceUrl(baseUrl, '/cli/programs');
|
|
106
107
|
case 'program-summary':
|
|
107
108
|
return resolveServiceUrl(baseUrl, '/cli/programs/current');
|
|
109
|
+
case 'program-detail':
|
|
110
|
+
return resolveServiceUrl(baseUrl, options.id ? `/cli/programs/${options.id}` : '/cli/programs/active');
|
|
108
111
|
case 'exercise-history': {
|
|
109
112
|
const historyUrl = resolveServiceUrl(baseUrl, '/cli/exercises/history');
|
|
110
113
|
historyUrl.searchParams.set('name', options.name ?? options.exercise);
|
package/src/sync-service.js
CHANGED
|
@@ -212,6 +212,10 @@ function routeRequest(url) {
|
|
|
212
212
|
return { command: 'program-summary', options: {} };
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
if (pathname === '/cli/programs/active') {
|
|
216
|
+
return { command: 'program-detail', options: {} };
|
|
217
|
+
}
|
|
218
|
+
|
|
215
219
|
const programShowMatch = pathname.match(/^\/cli\/programs\/([^/]+)$/);
|
|
216
220
|
if (programShowMatch) {
|
|
217
221
|
return { command: 'program-detail', options: { id: programShowMatch[1] } };
|