moodle-cli 0.9.4 → 0.9.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/dist/moodle.js +8 -4
- package/dist/worker/recovery.js +1 -1
- package/dist/worker/worker.js +1 -1
- package/package.json +1 -1
package/dist/moodle.js
CHANGED
|
@@ -4666,6 +4666,10 @@ async function submitAssignmentFiles(deps, request) {
|
|
|
4666
4666
|
checked_at: timestamp(deps)
|
|
4667
4667
|
};
|
|
4668
4668
|
}
|
|
4669
|
+
function submissionReceiptOf(value) {
|
|
4670
|
+
const receipt = record2(value);
|
|
4671
|
+
return { ...receipt, files: receipt.files ?? [], uploads: receipt.uploads ?? [], removed: receipt.removed ?? [], limits: receipt.limits ?? {} };
|
|
4672
|
+
}
|
|
4669
4673
|
function parseSubmissionForm(html, deps) {
|
|
4670
4674
|
const root = parse4(html);
|
|
4671
4675
|
const form = formWithAction(root, "savesubmission");
|
|
@@ -6828,7 +6832,7 @@ function standaloneAssetUrl(version, platform2, arch2) {
|
|
|
6828
6832
|
}
|
|
6829
6833
|
|
|
6830
6834
|
// src/version.ts
|
|
6831
|
-
var VERSION = "0.9.
|
|
6835
|
+
var VERSION = "0.9.5";
|
|
6832
6836
|
|
|
6833
6837
|
// src/update-check.ts
|
|
6834
6838
|
var UPDATE_CACHE_FILENAME = "update-check.json";
|
|
@@ -11667,7 +11671,7 @@ ${tryLines(["moodle due", "moodle units", "moodle --help"])}`}
|
|
|
11667
11671
|
const service = createIntentService(createMoodleGateway(client));
|
|
11668
11672
|
const args = { files: files.map((file2) => resolveSubmissionPath(file2, io.cwd ?? process.cwd())), final: Boolean(options.final), replace: Boolean(options.replace), accept_statement: Boolean(options.acceptStatement) };
|
|
11669
11673
|
const plan = await choose(() => service.run("submit", { ref: ref2, ...args, dry_run: true }), (id2) => service.run("submit", { ref: id2, ...args, dry_run: true }));
|
|
11670
|
-
const planned = plan.submission;
|
|
11674
|
+
const planned = submissionReceiptOf(plan.submission);
|
|
11671
11675
|
if (program.opts().dryRun) return runtime.output(plan, () => formatSubmissionReceipt(planned), options);
|
|
11672
11676
|
if (!await confirm({ summary: submissionSummary(planned, args.final, theme()) }, { yes: Boolean(program.opts().yes), dryRun: false, interactive })) return;
|
|
11673
11677
|
const spin = interactive ? createUi3({ input: io.stdin ?? process.stdin, output: stderr, interactive: true }).spinner() : void 0;
|
|
@@ -11677,7 +11681,7 @@ ${tryLines(["moodle due", "moodle units", "moodle --help"])}`}
|
|
|
11677
11681
|
try {
|
|
11678
11682
|
const live = createIntentService(createMoodleGateway(client, { onSubmitProgress: (message) => spin?.message(message) }));
|
|
11679
11683
|
result = await live.run("submit", { ref: planned.id, ...args, dry_run: false });
|
|
11680
|
-
const receipt = result.submission;
|
|
11684
|
+
const receipt = submissionReceiptOf(result.submission);
|
|
11681
11685
|
spin?.stop(receipt.uploads.length ? `Uploaded ${receipt.uploads.map((file2) => file2.name).join(", ")} to ${receipt.name}` : `Submitted ${receipt.name}`);
|
|
11682
11686
|
} catch (error) {
|
|
11683
11687
|
spin?.error("The upload did not complete");
|
|
@@ -11685,7 +11689,7 @@ ${tryLines(["moodle due", "moodle units", "moodle --help"])}`}
|
|
|
11685
11689
|
} finally {
|
|
11686
11690
|
runtime.busy = false;
|
|
11687
11691
|
}
|
|
11688
|
-
await runtime.output(result, () => formatSubmissionReceipt(result.submission), options);
|
|
11692
|
+
await runtime.output(result, () => formatSubmissionReceipt(submissionReceiptOf(result.submission)), options);
|
|
11689
11693
|
});
|
|
11690
11694
|
const quiz = program.command("quiz").description("Take a quiz: start an attempt, answer questions, finish it. Beta.").summary("Take a quiz (beta)");
|
|
11691
11695
|
quiz.addHelpText("after", `
|
package/dist/worker/recovery.js
CHANGED
|
@@ -26469,7 +26469,7 @@ function stringValue(value) {
|
|
|
26469
26469
|
}
|
|
26470
26470
|
|
|
26471
26471
|
// src/version.ts
|
|
26472
|
-
var VERSION = "0.9.
|
|
26472
|
+
var VERSION = "0.9.5";
|
|
26473
26473
|
|
|
26474
26474
|
// src/worker/http.ts
|
|
26475
26475
|
var HEALTH_PATH = "/healthz";
|
package/dist/worker/worker.js
CHANGED
|
@@ -26469,7 +26469,7 @@ function stringValue(value) {
|
|
|
26469
26469
|
}
|
|
26470
26470
|
|
|
26471
26471
|
// src/version.ts
|
|
26472
|
-
var VERSION = "0.9.
|
|
26472
|
+
var VERSION = "0.9.5";
|
|
26473
26473
|
|
|
26474
26474
|
// src/worker/http.ts
|
|
26475
26475
|
var HEALTH_PATH = "/healthz";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moodle-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "Moodle for terminals and AI agents: deadlines, grades, files, feedback and quiz reviews from your browser session, plus a private MCP server on Cloudflare",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|