timeback 0.1.4 → 0.1.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/README.md CHANGED
@@ -52,6 +52,46 @@ export ONEROSTER_CLIENT_ID="your-client-id"
52
52
  export ONEROSTER_CLIENT_SECRET="your-client-secret"
53
53
  ```
54
54
 
55
+ ### `timeback.config.ts`
56
+
57
+ Many CLI commands (notably `timeback init`, `timeback import`, `timeback edit`, `timeback sync`) read/write a `timeback.config.ts` file.
58
+
59
+ For fields that can differ per environment (staging vs production), use `course.overrides`:
60
+
61
+ ```ts
62
+ export default {
63
+ name: 'My App',
64
+ // Default Caliper sensor (lowest priority)
65
+ sensor: 'https://my-app.example.com/sensors/default',
66
+ courses: [
67
+ {
68
+ subject: 'Math',
69
+ grade: 3,
70
+ courseCode: 'MATH-3',
71
+ // Base values (apply to all envs unless overridden)
72
+ level: 'Elementary',
73
+ metadata: { publishStatus: 'testing' },
74
+ // Env-specific overrides (applied when syncing/editing in that env)
75
+ overrides: {
76
+ staging: {
77
+ level: 'Staging Level',
78
+ sensor: 'https://staging.my-app.example.com/sensors/math',
79
+ metadata: { publishStatus: 'draft' },
80
+ },
81
+ production: {
82
+ metadata: { publishStatus: 'published' },
83
+ },
84
+ },
85
+ },
86
+ ],
87
+ }
88
+ ```
89
+
90
+ Override merge rules:
91
+
92
+ - `defaults` → course → `overrides[env]` (for `level`, `sensor`, `metadata`)
93
+ - `metadata` is merged (not replaced); `goals` and `metrics` are deep-merged
94
+
55
95
  ## Debug Mode
56
96
 
57
97
  ```bash