@pie-qti/transform-core 0.1.28 → 0.1.29
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/README.md +52 -0
- package/package.json +6 -6
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @pie-qti/transform-core
|
|
2
|
+
|
|
3
|
+
The transformation engine for the PIE ↔ QTI transform framework: plugin and format registries, format detection, configuration loading, and the in-memory orchestration layer that runs transforms.
|
|
4
|
+
|
|
5
|
+
This package is the engine. For architecture and how-to documentation, see:
|
|
6
|
+
|
|
7
|
+
- [Transformation Engine architecture](../../docs/TRANSFORMATION-ENGINE.md)
|
|
8
|
+
- [Configuration guide](../../docs/CONFIGURATION.md) — config file schema, environment variables, plugin loading
|
|
9
|
+
- [Transformation guide](../../docs/PIE-QTI-TRANSFORMATION-GUIDE.md) — user-facing overview
|
|
10
|
+
- [Vendor plugin guide](../../docs/VENDOR-TRANSFORM-PLUGIN-GUIDE.md) — building vendor extensions
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bun add @pie-qti/transform-core @pie-qti/transform-types
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { TransformEngine } from '@pie-qti/transform-core';
|
|
22
|
+
|
|
23
|
+
const engine = new TransformEngine();
|
|
24
|
+
|
|
25
|
+
// Built-in QTI and PIE format detectors are registered automatically;
|
|
26
|
+
// plugins come from configuration or registration:
|
|
27
|
+
engine.use(myPlugin);
|
|
28
|
+
|
|
29
|
+
// Single-item transform: resolves to { pieConfig, warnings, errors, metadata }
|
|
30
|
+
const handle = await engine.transform(qtiXml, { sourceFormat: 'qti22', targetFormat: 'pie' });
|
|
31
|
+
const output = await handle.result();
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`transformBatch()` requires a storage backend (pass one to the constructor):
|
|
35
|
+
`new TransformEngine(orchestrator?, storage?)`.
|
|
36
|
+
|
|
37
|
+
## What the package exports
|
|
38
|
+
|
|
39
|
+
- **Engine** — `TransformEngine` (`use`, `transform`, `transformBatch`)
|
|
40
|
+
- **Registries** — plugin registry and format-detector registry; built-in `qti-detector` and `pie-detector`
|
|
41
|
+
- **Configuration** — `loadFromFile`, `loadFromEnv`, `merge` (config loader), the plugin loader, and the vendor registry (subpath exports `./config/*`)
|
|
42
|
+
- **Validation** — `PieItemValidator`, `validatePieItemStructure` (see [VALIDATION.md](./VALIDATION.md))
|
|
43
|
+
- **Orchestration** — `InMemoryOrchestrator` plus the workflow/activity definitions transforms run on
|
|
44
|
+
|
|
45
|
+
Types live in [`@pie-qti/transform-types`](../types) and are re-exported from the root entry.
|
|
46
|
+
|
|
47
|
+
## Related packages
|
|
48
|
+
|
|
49
|
+
- [`@pie-qti/to-pie`](../to-pie) — QTI → PIE plugin
|
|
50
|
+
- [`@pie-qti/pie-to-qti2`](../pie-to-qti2) — PIE → QTI 2.2 plugin
|
|
51
|
+
- [`@pie-qti/storage`](../storage) — filesystem/S3/database storage backends
|
|
52
|
+
- [`@pie-qti/transform-cli`](../../tools/cli) — CLI driving this engine
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-qti/transform-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"description": "Core transformation engine and plugin system for PIE Transform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
],
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@pie-qti/element-schemas": "0.
|
|
43
|
-
"@pie-qti/logger": "0.
|
|
44
|
-
"@pie-qti/
|
|
42
|
+
"@pie-qti/element-schemas": "1.0.0-beta.0",
|
|
43
|
+
"@pie-qti/logger": "1.0.0-beta.0",
|
|
44
|
+
"@pie-qti/test-utils": "1.0.0-beta.0",
|
|
45
|
+
"@pie-qti/transform-types": "0.1.29",
|
|
45
46
|
"ajv": "^8.20.0",
|
|
46
47
|
"node-html-parser": "^9.0.4"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"typescript": "^5.9.3"
|
|
50
|
-
"vitest": "^4.1.11"
|
|
50
|
+
"typescript": "^5.9.3"
|
|
51
51
|
},
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|