@playcademy/vite-plugin 1.2.1-beta.18 → 1.2.1-beta.19

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -14
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -24315,7 +24315,7 @@ import path2 from "node:path";
24315
24315
  // package.json
24316
24316
  var package_default = {
24317
24317
  name: "@playcademy/vite-plugin",
24318
- version: "1.2.1-beta.18",
24318
+ version: "1.2.1-beta.19",
24319
24319
  type: "module",
24320
24320
  exports: {
24321
24321
  ".": {
@@ -25921,7 +25921,7 @@ var package_default2;
25921
25921
  var init_package = __esm(() => {
25922
25922
  package_default2 = {
25923
25923
  name: "@playcademy/sandbox",
25924
- version: "0.7.1-beta.17",
25924
+ version: "0.7.1-beta.18",
25925
25925
  description: "Local development server for Playcademy game development",
25926
25926
  type: "module",
25927
25927
  exports: {
@@ -34412,7 +34412,7 @@ function assessmentReviewBankShortage(fulfillment) {
34412
34412
  };
34413
34413
  }
34414
34414
  function assessmentFlowForPurpose(purpose) {
34415
- return purpose === "review" || purpose === "mastery" ? "item-submit" : "attempt-submit";
34415
+ return purpose === "review" ? "item-submit" : "attempt-submit";
34416
34416
  }
34417
34417
  function isObject(value) {
34418
34418
  return typeof value === "object" && value !== null;
@@ -34671,19 +34671,14 @@ function prepareAssessmentItemSubmission(state, input) {
34671
34671
  };
34672
34672
  }
34673
34673
  const itemIndex = state.assessment.items.findIndex((item) => item.identifier === input.itemIdentifier);
34674
- const committed = administeredItemIdentifiers(state.itemSubmissions);
34675
- const expectedItemIndex = state.assessment.items.findIndex((item) => !committed.has(item.identifier));
34676
34674
  const previousItemIdentifier = state.itemSubmissions.at(-1)?.itemIdentifier;
34677
34675
  const previousItemIndex = state.assessment.items.findIndex((item) => item.identifier === previousItemIdentifier);
34678
- const validOrder = state.purpose === "review" ? itemIndex > previousItemIndex : itemIndex === expectedItemIndex;
34679
- if (itemIndex === -1 || !validOrder) {
34676
+ if (itemIndex === -1 || itemIndex <= previousItemIndex) {
34680
34677
  return {
34681
34678
  action: "reject",
34682
- failure: assessmentFlowViolation(state.purpose === "review" ? "Items must be submitted once and in candidate order." : "Items must be submitted once and in presentation order.", {
34679
+ failure: assessmentFlowViolation("Items must be submitted once and in candidate order.", {
34683
34680
  itemIdentifier: input.itemIdentifier,
34684
- ...state.purpose === "review" ? { previousItemIdentifier: previousItemIdentifier ?? null } : {
34685
- expectedItemIdentifier: state.assessment.items[expectedItemIndex]?.identifier ?? null
34686
- },
34681
+ previousItemIdentifier: previousItemIdentifier ?? null,
34687
34682
  flow
34688
34683
  })
34689
34684
  };
@@ -34736,11 +34731,10 @@ function assessmentCompletionFlowFailure(purpose, itemSubmissions, itemCount) {
34736
34731
  if (flow !== "item-submit") {
34737
34732
  return null;
34738
34733
  }
34739
- const complete = purpose === "review" ? itemSubmissions.length > 0 && itemSubmissions.length <= itemCount : itemSubmissions.length === itemCount;
34740
- if (complete) {
34734
+ if (itemSubmissions.length > 0 && itemSubmissions.length <= itemCount) {
34741
34735
  return null;
34742
34736
  }
34743
- return assessmentFlowViolation(purpose === "review" ? "At least one candidate must be administered before the review can be completed." : "Every item must be submitted before the attempt can be completed.", {
34737
+ return assessmentFlowViolation("At least one candidate must be administered before the review can be completed.", {
34744
34738
  flow,
34745
34739
  submittedItemCount: itemSubmissions.length,
34746
34740
  itemCount
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/vite-plugin",
3
- "version": "1.2.1-beta.18",
3
+ "version": "1.2.1-beta.19",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -19,14 +19,14 @@
19
19
  "dependencies": {
20
20
  "archiver": "^7.0.1",
21
21
  "picocolors": "^1.1.1",
22
- "playcademy": "0.28.1-beta.18"
22
+ "playcademy": "0.28.1-beta.19"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@electric-sql/pglite": "^0.3.16",
26
26
  "@inquirer/prompts": "^7.8.6",
27
27
  "@playcademy/constants": "0.0.1",
28
- "@playcademy/sandbox": "0.7.1-beta.17",
29
- "@playcademy/sdk": "0.16.1-beta.17",
28
+ "@playcademy/sandbox": "0.7.1-beta.18",
29
+ "@playcademy/sdk": "0.16.1-beta.18",
30
30
  "@playcademy/types": "0.0.1",
31
31
  "@playcademy/utils": "0.0.1",
32
32
  "@types/archiver": "^6.0.3",