@learnosity/lib-qti-converter 0.16.0 → 0.16.1
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 +10 -10
- package/packages/cli/dist/{batchProcessors-C7czhqX0.js → batchProcessors-BI6C89vy.js} +67 -94
- package/packages/cli/dist/batchProcessors-BI6C89vy.js.map +1 -0
- package/packages/cli/dist/batchWorker.js +2 -3
- package/packages/cli/dist/{configOutput-FwkFyQmk.js → configOutput-CJ-ryN3j.js} +5 -9
- package/packages/cli/dist/{configOutput-FwkFyQmk.js.map → configOutput-CJ-ryN3j.js.map} +1 -1
- package/packages/cli/dist/{create-prompt-dWckcotJ.js → create-prompt-m0MC0vT_.js} +38 -57
- package/packages/cli/dist/create-prompt-m0MC0vT_.js.map +1 -0
- package/packages/cli/dist/{dist-DXDR2peT.js → dist-8MaFD1oj.js} +6 -10
- package/packages/cli/dist/dist-8MaFD1oj.js.map +1 -0
- package/packages/cli/dist/{learnosityToQti-D4ddrXaz.js → learnosityToQti-BDf_faIV.js} +5 -6
- package/packages/cli/dist/{learnosityToQti-D4ddrXaz.js.map → learnosityToQti-BDf_faIV.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQtiPackage-Bwzm-uLX.js → learnosityToQtiPackage-w-BXgsLt.js} +15 -14
- package/packages/cli/dist/learnosityToQtiPackage-w-BXgsLt.js.map +1 -0
- package/packages/cli/dist/main.js +22 -29
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/{nodeFileAccess-BhCoGDOi.js → nodeFileAccess-BBS4FAK7.js} +5 -9
- package/packages/cli/dist/{nodeFileAccess-BhCoGDOi.js.map → nodeFileAccess-BBS4FAK7.js.map} +1 -1
- package/packages/cli/dist/pathUtils-BUJJCvvp.js +2919 -0
- package/packages/cli/dist/pathUtils-BUJJCvvp.js.map +1 -0
- package/packages/cli/dist/{qtiPackageToLearnosity-CX9htPId.js → qtiPackageToLearnosity-C24effmB.js} +7 -8
- package/packages/cli/dist/{qtiPackageToLearnosity-CX9htPId.js.map → qtiPackageToLearnosity-C24effmB.js.map} +1 -1
- package/packages/cli/dist/{qtiToLearnosity-JQYOkNbM.js → qtiToLearnosity-BEOaukuf.js} +6 -7
- package/packages/cli/dist/{qtiToLearnosity-JQYOkNbM.js.map → qtiToLearnosity-BEOaukuf.js.map} +1 -1
- package/packages/cli/dist/{resolveOptions-BuNN2KMA.js → resolveOptions-l0Hpn8hY.js} +322 -359
- package/packages/cli/dist/resolveOptions-l0Hpn8hY.js.map +1 -0
- package/packages/cli/dist/{rolldown-runtime-DktXgydw.js → rolldown-runtime-BVN1G_yT.js} +5 -6
- package/packages/cli/dist/{table-DsKq-B4-.js → table-BkrwlSAQ.js} +9724 -2071
- package/packages/cli/dist/table-BkrwlSAQ.js.map +1 -0
- package/packages/core/dist/index.d.ts +8 -58
- package/packages/core/dist/index.js +9712 -2049
- package/packages/core/dist/node.d.ts +10 -80
- package/packages/core/dist/node.js +9731 -2084
- package/packages/cli/dist/batchProcessors-C7czhqX0.js.map +0 -1
- package/packages/cli/dist/create-prompt-dWckcotJ.js.map +0 -1
- package/packages/cli/dist/dist-DXDR2peT.js.map +0 -1
- package/packages/cli/dist/learnosityToQtiPackage-Bwzm-uLX.js.map +0 -1
- package/packages/cli/dist/pathUtils-D_VsVde8.js +0 -2272
- package/packages/cli/dist/pathUtils-D_VsVde8.js.map +0 -1
- package/packages/cli/dist/resolveOptions-BuNN2KMA.js.map +0 -1
- package/packages/cli/dist/table-DsKq-B4-.js.map +0 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Node.js entry point for @learnosity/converter-core.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the entire browser-safe API plus the filesystem- and ZIP-based
|
|
5
|
+
* helpers (package/bundle load & save, disk-based package conversion) and
|
|
6
|
+
* `nodeFileAccess`, which Node callers can pass as `ConversionOptions.fileAccess`
|
|
7
|
+
* to enable passage/LOM resolution from disk.
|
|
8
|
+
*
|
|
9
|
+
* Import this from `@learnosity/converter-core/node`.
|
|
10
|
+
*/
|
|
2
11
|
/**
|
|
3
12
|
* Abstraction over the filesystem lookups the QTI → Learnosity converters may
|
|
4
13
|
* perform.
|
|
@@ -44,8 +53,6 @@ interface FileAccess {
|
|
|
44
53
|
height: number;
|
|
45
54
|
} | undefined;
|
|
46
55
|
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/types.d.ts
|
|
49
56
|
/**
|
|
50
57
|
* Diagnostic levels
|
|
51
58
|
*/
|
|
@@ -297,8 +304,6 @@ interface ConversionResult<T> {
|
|
|
297
304
|
output: T;
|
|
298
305
|
diagnostics: Diagnostic[];
|
|
299
306
|
}
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region src/diagnostics/formatDiagnosticsReport.d.ts
|
|
302
307
|
/**
|
|
303
308
|
* Options for formatting diagnostics report
|
|
304
309
|
*/
|
|
@@ -324,8 +329,6 @@ interface FormatDiagnosticsReportOptions {
|
|
|
324
329
|
* Format diagnostics array into structured report with metadata
|
|
325
330
|
*/
|
|
326
331
|
export declare function formatDiagnosticsReport(diagnostics: Diagnostic[], options: FormatDiagnosticsReportOptions): DiagnosticsReport;
|
|
327
|
-
//#endregion
|
|
328
|
-
//#region src/utils/diagnosticHelpers.d.ts
|
|
329
332
|
/**
|
|
330
333
|
* Add file context to diagnostics
|
|
331
334
|
* Maps diagnostics to include a specific source file path
|
|
@@ -429,8 +432,6 @@ export declare function createDiagnostic(level: 'error' | 'warning' | 'info', co
|
|
|
429
432
|
* const allDiagnostics = mergeDiagnostics(parseResult.diagnostics, mapResult.diagnostics, serializeResult.diagnostics);
|
|
430
433
|
*/
|
|
431
434
|
export declare function mergeDiagnostics(...diagnosticArrays: Diagnostic[][]): Diagnostic[];
|
|
432
|
-
//#endregion
|
|
433
|
-
//#region src/learnosity-model/types.d.ts
|
|
434
435
|
/**
|
|
435
436
|
* Learnosity Item Model types
|
|
436
437
|
*
|
|
@@ -1179,8 +1180,6 @@ export interface LearnosityItemModel {
|
|
|
1179
1180
|
questionsByRef: Map<string, LearnosityQuestion>;
|
|
1180
1181
|
featuresByRef: Map<string, LearnosityFeature>;
|
|
1181
1182
|
}
|
|
1182
|
-
//#endregion
|
|
1183
|
-
//#region src/qti-to-learnosity/types.d.ts
|
|
1184
1183
|
/**
|
|
1185
1184
|
* Learnosity Item JSON types for output (QTI → Learnosity conversion)
|
|
1186
1185
|
* TASK 011 / Updated for new format
|
|
@@ -1445,8 +1444,6 @@ interface LearnosityImageclozeassociationV2QuestionJson {
|
|
|
1445
1444
|
type: 'imageclozeassociationV2';
|
|
1446
1445
|
data: Record<string, unknown>;
|
|
1447
1446
|
}
|
|
1448
|
-
//#endregion
|
|
1449
|
-
//#region src/conversions.d.ts
|
|
1450
1447
|
/**
|
|
1451
1448
|
* Convert QTI XML to Learnosity JSON.
|
|
1452
1449
|
*
|
|
@@ -1466,8 +1463,6 @@ export declare function convertQtiToLearnosity(input: string, opts: ConversionOp
|
|
|
1466
1463
|
* @returns QTI XML string and diagnostics
|
|
1467
1464
|
*/
|
|
1468
1465
|
export declare function convertLearnosityToQti(input: unknown, opts: ConversionOptions): Promise<ConversionResult<string>>;
|
|
1469
|
-
//#endregion
|
|
1470
|
-
//#region src/qti-package/types.d.ts
|
|
1471
1466
|
/**
|
|
1472
1467
|
* QTI Content Package types for IMS Content Packaging
|
|
1473
1468
|
*/
|
|
@@ -1538,8 +1533,6 @@ export interface QtiContentPackage {
|
|
|
1538
1533
|
/** Assets extracted from manifest */
|
|
1539
1534
|
assets: AssetRef[];
|
|
1540
1535
|
}
|
|
1541
|
-
//#endregion
|
|
1542
|
-
//#region src/qti-package/pathSafety.d.ts
|
|
1543
1536
|
/**
|
|
1544
1537
|
* ZIP entry path safety validation (zip-slip protection)
|
|
1545
1538
|
*/
|
|
@@ -1562,8 +1555,6 @@ export declare function validateZipEntryPath(entryPath: string): string | null;
|
|
|
1562
1555
|
* @returns true if safe, false if unsafe
|
|
1563
1556
|
*/
|
|
1564
1557
|
declare function isPathSafe$1(entryPath: string): boolean;
|
|
1565
|
-
//#endregion
|
|
1566
|
-
//#region src/qti-package/parseManifest.d.ts
|
|
1567
1558
|
/**
|
|
1568
1559
|
* Result of parsing a manifest
|
|
1569
1560
|
*/
|
|
@@ -1586,8 +1577,6 @@ export interface ParseManifestResult {
|
|
|
1586
1577
|
* @returns Parsed resources and diagnostics
|
|
1587
1578
|
*/
|
|
1588
1579
|
export declare function parseManifest(manifestXml: string, zipPath: string): ParseManifestResult;
|
|
1589
|
-
//#endregion
|
|
1590
|
-
//#region src/qti-package/buildManifest.d.ts
|
|
1591
1580
|
/**
|
|
1592
1581
|
* Generates a minimal valid imsmanifest.xml from resources
|
|
1593
1582
|
*
|
|
@@ -1605,8 +1594,6 @@ export declare function parseManifest(manifestXml: string, zipPath: string): Par
|
|
|
1605
1594
|
* @returns XML string for imsmanifest.xml
|
|
1606
1595
|
*/
|
|
1607
1596
|
export declare function buildManifest(resources: ManifestResource[], version?: '2.1' | '2.2'): string;
|
|
1608
|
-
//#endregion
|
|
1609
|
-
//#region src/qti-package/testDependencies.d.ts
|
|
1610
1597
|
/**
|
|
1611
1598
|
* Extract item and stimulus dependencies from QTI assessmentTest XML,
|
|
1612
1599
|
* and map hrefs to manifest resource identifiers.
|
|
@@ -1627,8 +1614,6 @@ export declare function extractTestDependencies(testXml: string): {
|
|
|
1627
1614
|
* - "../../items/abc123.xml" -> "item_abc123"
|
|
1628
1615
|
*/
|
|
1629
1616
|
export declare function mapHrefToResourceId(href: string): string | null;
|
|
1630
|
-
//#endregion
|
|
1631
|
-
//#region src/learnosity-model/parseLearnosityItem.d.ts
|
|
1632
1617
|
/**
|
|
1633
1618
|
* Result of parsing a Learnosity item
|
|
1634
1619
|
*/
|
|
@@ -1643,8 +1628,6 @@ export interface ParseLearnosityItemResult {
|
|
|
1643
1628
|
* @returns Validated model if successful, diagnostics in all cases
|
|
1644
1629
|
*/
|
|
1645
1630
|
export declare function parseLearnosityItem(input: unknown): ParseLearnosityItemResult;
|
|
1646
|
-
//#endregion
|
|
1647
|
-
//#region src/learnosity-bundle/types.d.ts
|
|
1648
1631
|
/**
|
|
1649
1632
|
* Types for Learnosity export bundle model (manifest + activities + items + assets)
|
|
1650
1633
|
* Part of TASK 004D
|
|
@@ -1694,8 +1677,6 @@ export interface LearnosityBundleModel {
|
|
|
1694
1677
|
/** Map: itemRef → actual filename on disk (e.g., "items/hash.json") */
|
|
1695
1678
|
itemRefToFilename: Map<string, string>;
|
|
1696
1679
|
}
|
|
1697
|
-
//#endregion
|
|
1698
|
-
//#region src/qti-ast/types.d.ts
|
|
1699
1680
|
/**
|
|
1700
1681
|
* Internal QTI AST types
|
|
1701
1682
|
* Neutral representation independent of source (Learnosity) or target (QTI XML)
|
|
@@ -2239,8 +2220,6 @@ export interface QtiAssessmentStimulus {
|
|
|
2239
2220
|
instructorStimulus?: string;
|
|
2240
2221
|
stimulusBody: string;
|
|
2241
2222
|
}
|
|
2242
|
-
//#endregion
|
|
2243
|
-
//#region src/qti-ast/assessmentTestTypes.d.ts
|
|
2244
2223
|
/**
|
|
2245
2224
|
* QTI 2.2 assessmentTest AST types (TASK 005)
|
|
2246
2225
|
*
|
|
@@ -2321,8 +2300,6 @@ export interface QtiAssessmentTest {
|
|
|
2321
2300
|
/** Test parts */
|
|
2322
2301
|
testParts: QtiTestPart[];
|
|
2323
2302
|
}
|
|
2324
|
-
//#endregion
|
|
2325
|
-
//#region src/qti-ast/downgradeToQti21.d.ts
|
|
2326
2303
|
export interface DowngradeResult<T> {
|
|
2327
2304
|
/** Downgraded AST (modified in place or cloned) */
|
|
2328
2305
|
ast: T;
|
|
@@ -2348,8 +2325,6 @@ export declare function downgradeAssessmentItemToQti21(item: QtiAssessmentItem):
|
|
|
2348
2325
|
* @returns { downgraded test, diagnostics }
|
|
2349
2326
|
*/
|
|
2350
2327
|
export declare function downgradeAssessmentTestToQti21(test: QtiAssessmentTest): DowngradeResult<QtiAssessmentTest>;
|
|
2351
|
-
//#endregion
|
|
2352
|
-
//#region src/learnosity-mapper/mapLearnosityToAst.d.ts
|
|
2353
2328
|
/**
|
|
2354
2329
|
* Map a validated Learnosity Item Model to a QTI AST
|
|
2355
2330
|
*
|
|
@@ -2360,8 +2335,6 @@ export declare function mapLearnosityToAst(model: LearnosityItemModel | null | u
|
|
|
2360
2335
|
ast?: QtiAssessmentItem;
|
|
2361
2336
|
diagnostics: Diagnostic[];
|
|
2362
2337
|
};
|
|
2363
|
-
//#endregion
|
|
2364
|
-
//#region src/learnosity-mapper/mapActivityToTest.d.ts
|
|
2365
2338
|
export interface MapActivityToTestResult {
|
|
2366
2339
|
test?: QtiAssessmentTest;
|
|
2367
2340
|
diagnostics: Diagnostic[];
|
|
@@ -2431,8 +2404,6 @@ export interface ActivityData {
|
|
|
2431
2404
|
* @returns { test?, diagnostics[] }
|
|
2432
2405
|
*/
|
|
2433
2406
|
export declare function mapActivityToTest(activity: ActivityData): MapActivityToTestResult;
|
|
2434
|
-
//#endregion
|
|
2435
|
-
//#region src/learnosity-mapper/convertActivity.d.ts
|
|
2436
2407
|
export interface ConvertedItem {
|
|
2437
2408
|
/** Item reference from Learnosity */
|
|
2438
2409
|
reference: string;
|
|
@@ -2479,8 +2450,6 @@ export interface ConvertActivityOptions {
|
|
|
2479
2450
|
* @returns { testXml?, test?, items[], diagnostics[] }
|
|
2480
2451
|
*/
|
|
2481
2452
|
export declare function convertActivity(bundle: LearnosityBundleModel, activityRef: string, options?: ConvertActivityOptions): ConvertActivityResult;
|
|
2482
|
-
//#endregion
|
|
2483
|
-
//#region src/learnosity-mapper/sanitizeFolderName.d.ts
|
|
2484
2453
|
/**
|
|
2485
2454
|
* Sanitize activity reference for use as folder name
|
|
2486
2455
|
*/
|
|
@@ -2507,8 +2476,6 @@ export declare function sanitizeFolderName(input: string, fallback?: string): st
|
|
|
2507
2476
|
* @returns Unique folder name (may have suffix like _2, _3)
|
|
2508
2477
|
*/
|
|
2509
2478
|
export declare function ensureUniqueFolderName(desiredName: string, usedNames: Set<string>): string;
|
|
2510
|
-
//#endregion
|
|
2511
|
-
//#region src/learnosity-mapper/buildPackageFromActivityTypes.d.ts
|
|
2512
2479
|
interface BuildPackageFromActivityOptions {
|
|
2513
2480
|
/** Source bundle directory for copying assets */
|
|
2514
2481
|
bundleDir: string;
|
|
@@ -2521,8 +2488,6 @@ interface BuildPackageFromActivityResult {
|
|
|
2521
2488
|
package?: QtiContentPackage;
|
|
2522
2489
|
diagnostics: Diagnostic[];
|
|
2523
2490
|
}
|
|
2524
|
-
//#endregion
|
|
2525
|
-
//#region src/learnosity-mapper/mergeActivityPackage.d.ts
|
|
2526
2491
|
/**
|
|
2527
2492
|
* Rewrite item/stimulus/asset hrefs inside an assessmentTest that has been moved
|
|
2528
2493
|
* into tests/<folderName>/ (two levels deep) so they resolve against the package root.
|
|
@@ -2537,8 +2502,6 @@ export declare function rewriteTestHrefs(testXml: string): string;
|
|
|
2537
2502
|
* dependency on the normalize CSS. Duplicate resources (by identifier) are skipped.
|
|
2538
2503
|
*/
|
|
2539
2504
|
export declare function mergeActivityPackage(pkg: QtiContentPackage, folderName: string, packageResult: BuildPackageFromActivityResult, addedResourceIds: Set<string>): void;
|
|
2540
|
-
//#endregion
|
|
2541
|
-
//#region src/qti-serializer/serializeAssessmentItem.d.ts
|
|
2542
2505
|
/**
|
|
2543
2506
|
* Serialize a QTI AST to QTI 2.2 or 2.1 XML
|
|
2544
2507
|
*
|
|
@@ -2567,8 +2530,6 @@ export declare function fixElementIds(xml: string): {
|
|
|
2567
2530
|
xml: string;
|
|
2568
2531
|
changes: number;
|
|
2569
2532
|
};
|
|
2570
|
-
//#endregion
|
|
2571
|
-
//#region src/qti-serializer/serializeAssessmentTest.d.ts
|
|
2572
2533
|
export interface SerializeTestOptions {
|
|
2573
2534
|
/** Format with newlines and indentation */
|
|
2574
2535
|
pretty?: boolean;
|
|
@@ -2587,8 +2548,6 @@ export interface SerializeTestResult {
|
|
|
2587
2548
|
* @returns { xml?, diagnostics[] }
|
|
2588
2549
|
*/
|
|
2589
2550
|
export declare function serializeAssessmentTest(test: QtiAssessmentTest, options?: SerializeTestOptions): SerializeTestResult;
|
|
2590
|
-
//#endregion
|
|
2591
|
-
//#region src/qti-to-learnosity/convertShared.d.ts
|
|
2592
2551
|
/**
|
|
2593
2552
|
* Result of converting a single QTI assessmentItem to a Learnosity item.
|
|
2594
2553
|
*/
|
|
@@ -2596,8 +2555,6 @@ interface ConvertResult$1 {
|
|
|
2596
2555
|
item?: LearnosityItemJson;
|
|
2597
2556
|
diagnostics: Diagnostic[];
|
|
2598
2557
|
}
|
|
2599
|
-
//#endregion
|
|
2600
|
-
//#region src/qti-to-learnosity/convertQtiToLearnosity.d.ts
|
|
2601
2558
|
interface ConvertOptions {
|
|
2602
2559
|
qtiVersion?: QtiVersion;
|
|
2603
2560
|
inputPath?: string;
|
|
@@ -2622,8 +2579,6 @@ interface ConvertOptions {
|
|
|
2622
2579
|
* Supports choiceInteraction (MCQ), textEntryInteraction (clozetext), extendedTextInteraction (longtextV2), matchInteraction (choicematrix), gapMatchInteraction (clozeassociation), inlineChoiceInteraction (clozedropdown), orderInteraction (orderlist), hotspotInteraction (hotspot), hottextInteraction (tokenhighlight), associateInteraction (classification)
|
|
2623
2580
|
*/
|
|
2624
2581
|
export declare function convertQtiAssessmentItemToLearnosity(inputXml: string, opts?: ConvertOptions): ConvertResult$1;
|
|
2625
|
-
//#endregion
|
|
2626
|
-
//#region src/qti-to-learnosity/convertAssessmentTestToActivity.d.ts
|
|
2627
2582
|
type LearnosityActivityJson = {
|
|
2628
2583
|
rendering_type: 'assess';
|
|
2629
2584
|
items: Array<{
|
|
@@ -2647,8 +2602,6 @@ interface ConvertResult {
|
|
|
2647
2602
|
* Supports simple linear tests only (v1)
|
|
2648
2603
|
*/
|
|
2649
2604
|
export declare function convertAssessmentTestToLearnosityActivity(inputXml: string): ConvertResult;
|
|
2650
|
-
//#endregion
|
|
2651
|
-
//#region src/qti-to-learnosity/convertQtiPackageToLearnosityBundle.d.ts
|
|
2652
2605
|
/** A package entry (ZIP or directory) with raw bytes. Buffer satisfies this too. */
|
|
2653
2606
|
interface PackageEntry {
|
|
2654
2607
|
file: string;
|
|
@@ -2695,11 +2648,7 @@ export declare function convertQtiPackageToLearnosityBundle(input: {
|
|
|
2695
2648
|
} | {
|
|
2696
2649
|
entries: ReadonlyMap<string, PackageEntry>;
|
|
2697
2650
|
}, opts?: ConvertQtiPackageToLearnosityBundleOptions): ConvertQtiPackageToLearnosityBundleResult;
|
|
2698
|
-
//#endregion
|
|
2699
|
-
//#region src/qti-to-learnosity/nodeFileAccess.d.ts
|
|
2700
2651
|
export declare const nodeFileAccess: FileAccess;
|
|
2701
|
-
//#endregion
|
|
2702
|
-
//#region src/qti-package/readZip.d.ts
|
|
2703
2652
|
/**
|
|
2704
2653
|
* Result of reading a ZIP file
|
|
2705
2654
|
*/
|
|
@@ -2721,8 +2670,6 @@ interface ReadZipResult {
|
|
|
2721
2670
|
* @returns Map of safe entries and diagnostics
|
|
2722
2671
|
*/
|
|
2723
2672
|
export declare function readZip(zipPath: string): ReadZipResult;
|
|
2724
|
-
//#endregion
|
|
2725
|
-
//#region src/qti-package/writeZip.d.ts
|
|
2726
2673
|
/**
|
|
2727
2674
|
* Deterministic ZIP writing (Node.js file-path entry point).
|
|
2728
2675
|
*
|
|
@@ -2751,8 +2698,6 @@ interface ZipFileEntry {
|
|
|
2751
2698
|
* @param files Array of files to include
|
|
2752
2699
|
*/
|
|
2753
2700
|
export declare function writeZip(zipPath: string, files: ZipFileEntry[]): void;
|
|
2754
|
-
//#endregion
|
|
2755
|
-
//#region src/qti-package/loadPackage.d.ts
|
|
2756
2701
|
/**
|
|
2757
2702
|
* Result of loading a QTI Content Package
|
|
2758
2703
|
*/
|
|
@@ -2775,8 +2720,6 @@ interface LoadPackageResult {
|
|
|
2775
2720
|
* @returns Loaded package and diagnostics
|
|
2776
2721
|
*/
|
|
2777
2722
|
export declare function loadQtiContentPackage(zipPath: string): LoadPackageResult;
|
|
2778
|
-
//#endregion
|
|
2779
|
-
//#region src/qti-package/savePackage.d.ts
|
|
2780
2723
|
/**
|
|
2781
2724
|
* Result of saving a QTI Content Package
|
|
2782
2725
|
*/
|
|
@@ -2797,8 +2740,6 @@ interface SavePackageResult {
|
|
|
2797
2740
|
* @returns Diagnostics from saving
|
|
2798
2741
|
*/
|
|
2799
2742
|
export declare function saveQtiContentPackage(pkg: QtiContentPackage, outputPath: string): SavePackageResult;
|
|
2800
|
-
//#endregion
|
|
2801
|
-
//#region src/learnosity-bundle/loadLearnosityBundle.d.ts
|
|
2802
2743
|
/**
|
|
2803
2744
|
* Load a Learnosity export bundle from a directory
|
|
2804
2745
|
*
|
|
@@ -2809,8 +2750,6 @@ export declare function loadLearnosityBundle(bundleDir: string): {
|
|
|
2809
2750
|
bundle?: LearnosityBundleModel;
|
|
2810
2751
|
diagnostics: Diagnostic[];
|
|
2811
2752
|
};
|
|
2812
|
-
//#endregion
|
|
2813
|
-
//#region src/learnosity-bundle/writeLearnosityBundle.d.ts
|
|
2814
2753
|
interface WriteBundleOptions {
|
|
2815
2754
|
/** Directory or ZIP path to write bundle to */
|
|
2816
2755
|
outDir: string;
|
|
@@ -2830,8 +2769,6 @@ export declare function writeLearnosityBundle(bundle: {
|
|
|
2830
2769
|
assets: Map<string, Uint8Array>;
|
|
2831
2770
|
itemFilenames?: Map<string, string>;
|
|
2832
2771
|
}, options: WriteBundleOptions): Promise<WriteBundleResult>;
|
|
2833
|
-
//#endregion
|
|
2834
|
-
//#region src/learnosity-bundle/pathSafetyFs.d.ts
|
|
2835
2772
|
/**
|
|
2836
2773
|
* Path safety validation for filesystem operations
|
|
2837
2774
|
* Part of TASK 004D - prevents directory traversal attacks similar to zip-slip protection
|
|
@@ -2866,8 +2803,6 @@ export declare function isSymlink(fullPath: string): boolean;
|
|
|
2866
2803
|
* @returns Absolute path if safe, null otherwise
|
|
2867
2804
|
*/
|
|
2868
2805
|
export declare function safeResolve(relativePath: string, baseDir: string): string | null;
|
|
2869
|
-
//#endregion
|
|
2870
|
-
//#region src/learnosity-mapper/buildPackageFromActivity.d.ts
|
|
2871
2806
|
/**
|
|
2872
2807
|
* Build an IMS Content Package from a converted Activity
|
|
2873
2808
|
*
|
|
@@ -2882,8 +2817,6 @@ export declare function safeResolve(relativePath: string, baseDir: string): stri
|
|
|
2882
2817
|
* @returns { package?, diagnostics[] }
|
|
2883
2818
|
*/
|
|
2884
2819
|
export declare function buildPackageFromActivity(conversion: ConvertActivityResult, options: BuildPackageFromActivityOptions): BuildPackageFromActivityResult;
|
|
2885
|
-
//#endregion
|
|
2886
|
-
//#region src/qti-to-learnosity/loadPackageDirectory.d.ts
|
|
2887
2820
|
interface LoadPackageDirectoryResult {
|
|
2888
2821
|
/** Loaded entries keyed by forward-slash relative path (undefined on error). */
|
|
2889
2822
|
entries?: Map<string, ZipEntryMeta>;
|
|
@@ -2894,8 +2827,6 @@ interface LoadPackageDirectoryResult {
|
|
|
2894
2827
|
* forward-slash relative path (matching ZIP entry keys).
|
|
2895
2828
|
*/
|
|
2896
2829
|
export declare function loadPackageDirectory(dirPath: string): LoadPackageDirectoryResult;
|
|
2897
|
-
//#endregion
|
|
2898
|
-
//#region src/conversions.node.d.ts
|
|
2899
2830
|
/**
|
|
2900
2831
|
* Options for converting a QTI Content Package to a Learnosity bundle
|
|
2901
2832
|
*/
|
|
@@ -2996,6 +2927,5 @@ interface ConvertLearnosityToQtiPackageResult {
|
|
|
2996
2927
|
* @returns The built QTI Content Package (in-memory) and diagnostics
|
|
2997
2928
|
*/
|
|
2998
2929
|
export declare function convertLearnosityToQtiPackage(opts: ConvertLearnosityToQtiPackageOptions): ConvertLearnosityToQtiPackageResult;
|
|
2999
|
-
//#endregion
|
|
3000
2930
|
export { type ConversionOptions, type ConversionResult, type ConvertLearnosityToQtiPackageOptions, type ConvertLearnosityToQtiPackageResult, type ConvertQtiPackageToLearnosityBundleOptions, type ConvertQtiPackageToLearnosityBundleResult, type ConvertQtiPackageToLearnosityOptions, type ConvertQtiPackageToLearnosityResult, type Diagnostic, type DiagnosticIssue, type DiagnosticLevel, type DiagnosticsOutput, type DiagnosticsReport, type FileAccess, type FormatDiagnosticsReportOptions, type ItemFilenameSource, type ItemReferenceSource, type LearnosityActivityJson, type LearnosityItemJson, type LearnosityQuestionJson, type LoadPackageDirectoryResult, type LoadPackageResult, type OutputFormat, type PackageEntry, type QtiVersion, type ReadZipResult, type ZipFileEntry, isPathSafe as isBundlePathSafe, isPathSafe$1 as isPathSafe };
|
|
3001
2931
|
//# sourceMappingURL=node.d.ts.map
|