@playcademy/sandbox 0.9.1-beta.1 → 0.10.0
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/cli.js +8 -6
- package/dist/server.js +8 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1128,7 +1128,7 @@ var package_default;
|
|
|
1128
1128
|
var init_package = __esm(() => {
|
|
1129
1129
|
package_default = {
|
|
1130
1130
|
name: "@playcademy/sandbox",
|
|
1131
|
-
version: "0.
|
|
1131
|
+
version: "0.10.0",
|
|
1132
1132
|
description: "Local development server for Playcademy game development",
|
|
1133
1133
|
type: "module",
|
|
1134
1134
|
exports: {
|
|
@@ -96840,10 +96840,12 @@ function compileResponseProcessing(item, itemIdentifier, maxScore, declarations)
|
|
|
96840
96840
|
if (!onlyAttributes(processing, []) || !onlyWhitespaceText(processing.children) || processingRules.length === 0 || processingRules.some((rule) => rule.localName !== "qti-response-condition")) {
|
|
96841
96841
|
return fallback(itemIdentifier, maxScore, "unsupported-response-processing");
|
|
96842
96842
|
}
|
|
96843
|
-
if (processingRules.length === 1 && declarations.size === 1 &&
|
|
96843
|
+
if (processingRules.length === 1 && declarations.size === 1 && feedbackOutcomeIsDeclared(item)) {
|
|
96844
96844
|
const declaration = [...declarations.values()][0];
|
|
96845
96845
|
const rule = binaryBranchRule(processingRules[0], declaration);
|
|
96846
|
-
|
|
96846
|
+
const scoreIsDeclared = childElements(item, "qti-outcome-declaration").some((outcome) => outcome.attributes.identifier?.trim().toUpperCase() === "SCORE");
|
|
96847
|
+
const completeIdentifierMatch = rule?.comparison.kind === "match" && rule.baseType === "identifier" && (rule.cardinality === "single" || rule.cardinality === "multiple");
|
|
96848
|
+
if (rule && (scoreDefaultIsZero(item) || !scoreIsDeclared && completeIdentifierMatch)) {
|
|
96847
96849
|
return platformResult(itemIdentifier, maxScore, [rule]);
|
|
96848
96850
|
}
|
|
96849
96851
|
}
|
|
@@ -99791,7 +99793,7 @@ function scoringSchema(identity) {
|
|
|
99791
99793
|
if (identity.kind === "assessment") {
|
|
99792
99794
|
return exports_external.object({
|
|
99793
99795
|
items: assessmentScoringArtifactItemsSchema2,
|
|
99794
|
-
reviewBank: exports_external.undefined(),
|
|
99796
|
+
reviewBank: exports_external.undefined().optional(),
|
|
99795
99797
|
diagnostic: diagnosticContextSchema.optional()
|
|
99796
99798
|
}).strict();
|
|
99797
99799
|
}
|
|
@@ -99805,7 +99807,7 @@ function scoringSchema(identity) {
|
|
|
99805
99807
|
standards: exports_external.array(exports_external.unknown())
|
|
99806
99808
|
}).strict())
|
|
99807
99809
|
}).strict(),
|
|
99808
|
-
diagnostic: exports_external.undefined()
|
|
99810
|
+
diagnostic: exports_external.undefined().optional()
|
|
99809
99811
|
}).strict().refine((payload) => payload.reviewBank.items.length === payload.items.length && payload.reviewBank.items.every((item, index2) => item.itemIdentifier === payload.items[index2]?.itemIdentifier));
|
|
99810
99812
|
}
|
|
99811
99813
|
function assertPlayableAssessmentArtifact(payload, identity) {
|
|
@@ -100011,7 +100013,7 @@ var init_assessment_artifact_runtime_util = __esm(() => {
|
|
|
100011
100013
|
}).strict();
|
|
100012
100014
|
diagnosticContextSchema = exports_external.object({
|
|
100013
100015
|
routingRevision: trimmedNonEmptyString3,
|
|
100014
|
-
routingManifest: exports_external.record(exports_external.unknown())
|
|
100016
|
+
routingManifest: exports_external.record(exports_external.string(), exports_external.unknown())
|
|
100015
100017
|
}).strict();
|
|
100016
100018
|
});
|
|
100017
100019
|
|
package/dist/server.js
CHANGED
|
@@ -1127,7 +1127,7 @@ var package_default;
|
|
|
1127
1127
|
var init_package = __esm(() => {
|
|
1128
1128
|
package_default = {
|
|
1129
1129
|
name: "@playcademy/sandbox",
|
|
1130
|
-
version: "0.
|
|
1130
|
+
version: "0.10.0",
|
|
1131
1131
|
description: "Local development server for Playcademy game development",
|
|
1132
1132
|
type: "module",
|
|
1133
1133
|
exports: {
|
|
@@ -96839,10 +96839,12 @@ function compileResponseProcessing(item, itemIdentifier, maxScore, declarations)
|
|
|
96839
96839
|
if (!onlyAttributes(processing, []) || !onlyWhitespaceText(processing.children) || processingRules.length === 0 || processingRules.some((rule) => rule.localName !== "qti-response-condition")) {
|
|
96840
96840
|
return fallback(itemIdentifier, maxScore, "unsupported-response-processing");
|
|
96841
96841
|
}
|
|
96842
|
-
if (processingRules.length === 1 && declarations.size === 1 &&
|
|
96842
|
+
if (processingRules.length === 1 && declarations.size === 1 && feedbackOutcomeIsDeclared(item)) {
|
|
96843
96843
|
const declaration = [...declarations.values()][0];
|
|
96844
96844
|
const rule = binaryBranchRule(processingRules[0], declaration);
|
|
96845
|
-
|
|
96845
|
+
const scoreIsDeclared = childElements(item, "qti-outcome-declaration").some((outcome) => outcome.attributes.identifier?.trim().toUpperCase() === "SCORE");
|
|
96846
|
+
const completeIdentifierMatch = rule?.comparison.kind === "match" && rule.baseType === "identifier" && (rule.cardinality === "single" || rule.cardinality === "multiple");
|
|
96847
|
+
if (rule && (scoreDefaultIsZero(item) || !scoreIsDeclared && completeIdentifierMatch)) {
|
|
96846
96848
|
return platformResult(itemIdentifier, maxScore, [rule]);
|
|
96847
96849
|
}
|
|
96848
96850
|
}
|
|
@@ -99790,7 +99792,7 @@ function scoringSchema(identity) {
|
|
|
99790
99792
|
if (identity.kind === "assessment") {
|
|
99791
99793
|
return exports_external.object({
|
|
99792
99794
|
items: assessmentScoringArtifactItemsSchema2,
|
|
99793
|
-
reviewBank: exports_external.undefined(),
|
|
99795
|
+
reviewBank: exports_external.undefined().optional(),
|
|
99794
99796
|
diagnostic: diagnosticContextSchema.optional()
|
|
99795
99797
|
}).strict();
|
|
99796
99798
|
}
|
|
@@ -99804,7 +99806,7 @@ function scoringSchema(identity) {
|
|
|
99804
99806
|
standards: exports_external.array(exports_external.unknown())
|
|
99805
99807
|
}).strict())
|
|
99806
99808
|
}).strict(),
|
|
99807
|
-
diagnostic: exports_external.undefined()
|
|
99809
|
+
diagnostic: exports_external.undefined().optional()
|
|
99808
99810
|
}).strict().refine((payload) => payload.reviewBank.items.length === payload.items.length && payload.reviewBank.items.every((item, index2) => item.itemIdentifier === payload.items[index2]?.itemIdentifier));
|
|
99809
99811
|
}
|
|
99810
99812
|
function assertPlayableAssessmentArtifact(payload, identity) {
|
|
@@ -100010,7 +100012,7 @@ var init_assessment_artifact_runtime_util = __esm(() => {
|
|
|
100010
100012
|
}).strict();
|
|
100011
100013
|
diagnosticContextSchema = exports_external.object({
|
|
100012
100014
|
routingRevision: trimmedNonEmptyString3,
|
|
100013
|
-
routingManifest: exports_external.record(exports_external.unknown())
|
|
100015
|
+
routingManifest: exports_external.record(exports_external.string(), exports_external.unknown())
|
|
100014
100016
|
}).strict();
|
|
100015
100017
|
});
|
|
100016
100018
|
|