@motionskit/cli 0.1.0 → 0.2.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/index.js CHANGED
@@ -142,7 +142,10 @@ var RawMotion = z.strictObject({
142
142
  calendar: z.record(id, calendarSpec).optional(),
143
143
  approvers: z.array(z.string()).min(1, "a motion needs at least one approver"),
144
144
  reasons: z.array(id).optional(),
145
- input: z.strictObject({ list: z.string().optional() }).optional(),
145
+ input: z.strictObject({
146
+ list: z.string().optional(),
147
+ columns: z.record(id, z.strictObject({ required: z.boolean().optional(), aliases: z.array(z.string().trim().min(1)).optional() }).nullable()).optional()
148
+ }).optional(),
146
149
  steps: z.array(step).min(1, "a motion needs at least one step"),
147
150
  queues: z.record(id, queue).optional()
148
151
  });
@@ -433,7 +436,7 @@ async function compileMotion(tenant, dir) {
433
436
  reasons: raw.reasons ?? [],
434
437
  rules,
435
438
  rulesVersion: rulesVersion(rules),
436
- input: raw.input ?? {},
439
+ input: compileInput(raw.input),
437
440
  steps,
438
441
  queues
439
442
  };
@@ -441,6 +444,15 @@ async function compileMotion(tenant, dir) {
441
444
  if (errors.length) throw new MotionErrors(where2, errors);
442
445
  return { dir: root, manifest: { ...manifest, sha: versionId2(manifest, files) }, bundles, files };
443
446
  }
447
+ function compileInput(input) {
448
+ if (!input) return {};
449
+ const { columns, ...rest } = input;
450
+ if (!columns) return rest;
451
+ return {
452
+ ...rest,
453
+ columns: Object.fromEntries(Object.entries(columns).map(([name, c]) => [name, { required: c?.required ?? false, aliases: c?.aliases ?? [] }]))
454
+ };
455
+ }
444
456
  async function compileTenant(tenantDir) {
445
457
  const dir = resolve2(tenantDir);
446
458
  const meta = readYaml(join4(dir, "tenant.yaml")) ?? {};
package/dist/main.js CHANGED
@@ -229,7 +229,10 @@ var RawMotion = z.strictObject({
229
229
  calendar: z.record(id, calendarSpec).optional(),
230
230
  approvers: z.array(z.string()).min(1, "a motion needs at least one approver"),
231
231
  reasons: z.array(id).optional(),
232
- input: z.strictObject({ list: z.string().optional() }).optional(),
232
+ input: z.strictObject({
233
+ list: z.string().optional(),
234
+ columns: z.record(id, z.strictObject({ required: z.boolean().optional(), aliases: z.array(z.string().trim().min(1)).optional() }).nullable()).optional()
235
+ }).optional(),
233
236
  steps: z.array(step).min(1, "a motion needs at least one step"),
234
237
  queues: z.record(id, queue).optional()
235
238
  });
@@ -556,7 +559,7 @@ async function compileMotion(tenant, dir) {
556
559
  reasons: raw.reasons ?? [],
557
560
  rules,
558
561
  rulesVersion: rulesVersion(rules),
559
- input: raw.input ?? {},
562
+ input: compileInput(raw.input),
560
563
  steps,
561
564
  queues
562
565
  };
@@ -564,6 +567,15 @@ async function compileMotion(tenant, dir) {
564
567
  if (errors.length) throw new MotionErrors(where2, errors);
565
568
  return { dir: root, manifest: { ...manifest, sha: versionId2(manifest, files) }, bundles, files };
566
569
  }
570
+ function compileInput(input) {
571
+ if (!input) return {};
572
+ const { columns, ...rest } = input;
573
+ if (!columns) return rest;
574
+ return {
575
+ ...rest,
576
+ columns: Object.fromEntries(Object.entries(columns).map(([name, c]) => [name, { required: c?.required ?? false, aliases: c?.aliases ?? [] }]))
577
+ };
578
+ }
567
579
  async function compileTenant(tenantDir) {
568
580
  const dir = resolve2(tenantDir);
569
581
  const meta = readYaml(join5(dir, "tenant.yaml")) ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionskit/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "esbuild": "^0.28.2",
30
30
  "yaml": "^2.9.1",
31
31
  "zod": "^4.6.7",
32
- "@motionskit/kernel": "0.1.0"
32
+ "@motionskit/kernel": "0.2.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^22.19.0",