openmates 0.18.0-alpha.29 → 0.18.0-alpha.30
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/{chunk-DL2SX5XG.js → chunk-QLI5D3XI.js} +11 -4
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -13021,7 +13021,9 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
13021
13021
|
if (filters.externalChatProvider) params.set("external_chat_provider", filters.externalChatProvider);
|
|
13022
13022
|
if (filters.externalChatLookupHash) params.set("external_chat_lookup_hash", filters.externalChatLookupHash);
|
|
13023
13023
|
if (filters.priority !== void 0) params.set("priority", String(filters.priority));
|
|
13024
|
-
const
|
|
13024
|
+
const maximumTaskListPage = 500;
|
|
13025
|
+
const limit = Math.min(filters.limit ?? maximumTaskListPage, maximumTaskListPage);
|
|
13026
|
+
if (!Number.isSafeInteger(limit) || limit <= 0) throw new Error("Invalid task list limit");
|
|
13025
13027
|
if (Number.isSafeInteger(limit) && limit !== void 0 && limit > 0) params.set("limit", String(limit));
|
|
13026
13028
|
const teamId = this.resolveTeamContext({ teamId: filters.teamId, personal: filters.personal });
|
|
13027
13029
|
if (teamId) params.set("team_id", teamId);
|
|
@@ -13033,7 +13035,11 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
13033
13035
|
if (!response.ok) {
|
|
13034
13036
|
throw new Error(`User task list failed with HTTP ${response.status}`);
|
|
13035
13037
|
}
|
|
13036
|
-
|
|
13038
|
+
const tasks = response.data.tasks ?? [];
|
|
13039
|
+
if (tasks.length >= limit) {
|
|
13040
|
+
throw new Error(`TASK_LIST_INCOMPLETE: server limit ${limit} reached; refusing a truncated task inventory.`);
|
|
13041
|
+
}
|
|
13042
|
+
return tasks;
|
|
13037
13043
|
}
|
|
13038
13044
|
async createUserTask(input, context = {}) {
|
|
13039
13045
|
this.requireSession();
|
|
@@ -75097,13 +75103,13 @@ async function handleTasks(client, subcommand, rest, flags, redactor) {
|
|
|
75097
75103
|
return;
|
|
75098
75104
|
}
|
|
75099
75105
|
const tasks = await loadTasks(client, masterKey, scope);
|
|
75100
|
-
if (flags.json === true) printJson2({ tasks: tasks.map(taskToJson) });
|
|
75106
|
+
if (flags.json === true) printJson2({ tasks: tasks.map(taskToJson), complete: true });
|
|
75101
75107
|
else console.log(renderTaskList(tasks));
|
|
75102
75108
|
return;
|
|
75103
75109
|
}
|
|
75104
75110
|
if (subcommand === "board") {
|
|
75105
75111
|
const tasks = await loadTasks(client, masterKey, scope);
|
|
75106
|
-
if (flags.json === true) printJson2({ tasks: tasks.map(taskToJson) });
|
|
75112
|
+
if (flags.json === true) printJson2({ tasks: tasks.map(taskToJson), complete: true });
|
|
75107
75113
|
else console.log(renderTaskBoard(tasks));
|
|
75108
75114
|
return;
|
|
75109
75115
|
}
|
|
@@ -75331,6 +75337,7 @@ async function resolveTaskUpdateOptions(client, masterKey, flags, input) {
|
|
|
75331
75337
|
async function loadTasks(client, masterKey, scope, limit) {
|
|
75332
75338
|
const records = await client.listUserTasks({ status: scope.status, chatId: scope.chatId, projectId: scope.projectId, labelHashes: scope.labelHashes, externalChatProvider: scope.externalChatProvider, externalChatLookupHash: scope.externalChatLookupHash, priority: scope.priority, teamId: scope.teamId, personal: scope.personal, limit });
|
|
75333
75339
|
const tasks = await decryptUserTasksForCli(records, masterKey, console.error);
|
|
75340
|
+
if (tasks.length !== records.length) throw new Error("TASK_LIST_INCOMPLETE: one or more records could not be decrypted.");
|
|
75334
75341
|
return scope.planId ? tasks.filter((task) => task.planId === scope.planId) : tasks;
|
|
75335
75342
|
}
|
|
75336
75343
|
async function resolveTask(client, masterKey, id, scope) {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED