@alterset/alterspec-client 0.15.0 → 0.17.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/work.d.ts CHANGED
@@ -3,12 +3,18 @@ import { z } from 'zod';
3
3
  /**
4
4
  * `work.json` in an export: the work every signed-off change implies, for an application that hands it to developers
5
5
  * (the alterspec dispatcher). The one definition of the format. It imports nothing but zod, so the alterspec client
6
- * can carry it as it is. Format 2 (alterspec 0.24.0) adds each task's `items`; format 1 is the same without them, and
7
- * a reader of both takes `AnyWorkSchema`.
6
+ * can carry it as it is. Format 3 (alterspec 0.33.0) adds each task's optional `weights`; format 2 (0.24.0) added
7
+ * each task's `items`; format 1 is the same without them. A reader of every format takes `AnyWorkSchema`.
8
8
  */
9
9
  /** `BE` (the backend, API channels included) or the code of a channel with an experience of its own. */
10
10
  declare const TrackCode: z.ZodString;
11
11
  type TrackCode = z.infer<typeof TrackCode>;
12
+ /**
13
+ * The weight of a task item, 1–100: how much specified behaviour the item adds or changes, reasoned at sign-off
14
+ * against alterspec's rubric (a typical acceptance criterion is about 10), never an estimate of anyone's code.
15
+ */
16
+ declare const WorkWeight: z.ZodNumber;
17
+ type WorkWeight = z.infer<typeof WorkWeight>;
12
18
  declare const WorkTrackSchema: z.ZodObject<{
13
19
  code: z.ZodString;
14
20
  kind: z.ZodEnum<{
@@ -26,6 +32,7 @@ declare const WorkTaskSchema: z.ZodObject<{
26
32
  change: z.ZodString;
27
33
  track: z.ZodString;
28
34
  }, z.core.$strict>>;
35
+ weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
29
36
  }, z.core.$strict>;
30
37
  type WorkTask = z.infer<typeof WorkTaskSchema>;
31
38
  declare const WorkChangeSchema: z.ZodObject<{
@@ -43,12 +50,13 @@ declare const WorkChangeSchema: z.ZodObject<{
43
50
  change: z.ZodString;
44
51
  track: z.ZodString;
45
52
  }, z.core.$strict>>;
53
+ weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
46
54
  }, z.core.$strict>>;
47
55
  }, z.core.$strict>;
48
56
  type WorkChange = z.infer<typeof WorkChangeSchema>;
49
- declare const WORK_FORMAT = 2;
57
+ declare const WORK_FORMAT = 3;
50
58
  declare const WorkSchema: z.ZodObject<{
51
- format: z.ZodLiteral<2>;
59
+ format: z.ZodLiteral<3>;
52
60
  alterspec: z.ZodString;
53
61
  exported: z.ZodISODate;
54
62
  baseline: z.ZodNullable<z.ZodObject<{
@@ -78,11 +86,58 @@ declare const WorkSchema: z.ZodObject<{
78
86
  change: z.ZodString;
79
87
  track: z.ZodString;
80
88
  }, z.core.$strict>>;
89
+ weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
81
90
  }, z.core.$strict>>;
82
91
  }, z.core.$strict>>;
83
92
  }, z.core.$strict>;
84
93
  type Work = z.infer<typeof WorkSchema>;
85
- /** Format 1 (alterspec 0.23): the same without `items`. */
94
+ /** Format 2 (alterspec 0.24 to 0.32): the same without `weights`. */
95
+ declare const WorkTaskV2Schema: z.ZodObject<{
96
+ track: z.ZodString;
97
+ objects: z.ZodArray<z.ZodString>;
98
+ items: z.ZodArray<z.ZodString>;
99
+ after: z.ZodArray<z.ZodObject<{
100
+ change: z.ZodString;
101
+ track: z.ZodString;
102
+ }, z.core.$strict>>;
103
+ }, z.core.$strict>;
104
+ type WorkTaskV2 = z.infer<typeof WorkTaskV2Schema>;
105
+ declare const WorkV2Schema: z.ZodObject<{
106
+ alterspec: z.ZodString;
107
+ exported: z.ZodISODate;
108
+ baseline: z.ZodNullable<z.ZodObject<{
109
+ date: z.ZodISODate;
110
+ built: z.ZodBoolean;
111
+ }, z.core.$strict>>;
112
+ tracks: z.ZodArray<z.ZodObject<{
113
+ code: z.ZodString;
114
+ kind: z.ZodEnum<{
115
+ backend: "backend";
116
+ ui: "ui";
117
+ }>;
118
+ channels: z.ZodArray<z.ZodString>;
119
+ }, z.core.$strict>>;
120
+ format: z.ZodLiteral<2>;
121
+ changes: z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ title: z.ZodString;
124
+ signed_off: z.ZodISODate;
125
+ delta: z.ZodString;
126
+ depends_on: z.ZodArray<z.ZodString>;
127
+ level: z.ZodNumber;
128
+ tasks: z.ZodArray<z.ZodObject<{
129
+ track: z.ZodString;
130
+ objects: z.ZodArray<z.ZodString>;
131
+ items: z.ZodArray<z.ZodString>;
132
+ after: z.ZodArray<z.ZodObject<{
133
+ change: z.ZodString;
134
+ track: z.ZodString;
135
+ }, z.core.$strict>>;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>>;
138
+ }, z.core.$strict>;
139
+ type WorkV2 = z.infer<typeof WorkV2Schema>;
140
+ /** Format 1 (alterspec 0.23): the same without `items` and `weights`. */
86
141
  declare const WorkTaskV1Schema: z.ZodObject<{
87
142
  track: z.ZodString;
88
143
  objects: z.ZodArray<z.ZodString>;
@@ -126,7 +181,7 @@ declare const WorkV1Schema: z.ZodObject<{
126
181
  }, z.core.$strict>>;
127
182
  }, z.core.$strict>;
128
183
  type WorkV1 = z.infer<typeof WorkV1Schema>;
129
- /** Either format, told apart by `format`: what a reader of exports from several alterspec versions takes. */
184
+ /** Any format, told apart by `format`: what a reader of exports from several alterspec versions takes. */
130
185
  declare const AnyWorkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
186
  alterspec: z.ZodString;
132
187
  exported: z.ZodISODate;
@@ -160,7 +215,40 @@ declare const AnyWorkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
160
215
  }, z.core.$strict>>;
161
216
  }, z.core.$strict>>;
162
217
  }, z.core.$strict>, z.ZodObject<{
218
+ alterspec: z.ZodString;
219
+ exported: z.ZodISODate;
220
+ baseline: z.ZodNullable<z.ZodObject<{
221
+ date: z.ZodISODate;
222
+ built: z.ZodBoolean;
223
+ }, z.core.$strict>>;
224
+ tracks: z.ZodArray<z.ZodObject<{
225
+ code: z.ZodString;
226
+ kind: z.ZodEnum<{
227
+ backend: "backend";
228
+ ui: "ui";
229
+ }>;
230
+ channels: z.ZodArray<z.ZodString>;
231
+ }, z.core.$strict>>;
163
232
  format: z.ZodLiteral<2>;
233
+ changes: z.ZodArray<z.ZodObject<{
234
+ id: z.ZodString;
235
+ title: z.ZodString;
236
+ signed_off: z.ZodISODate;
237
+ delta: z.ZodString;
238
+ depends_on: z.ZodArray<z.ZodString>;
239
+ level: z.ZodNumber;
240
+ tasks: z.ZodArray<z.ZodObject<{
241
+ track: z.ZodString;
242
+ objects: z.ZodArray<z.ZodString>;
243
+ items: z.ZodArray<z.ZodString>;
244
+ after: z.ZodArray<z.ZodObject<{
245
+ change: z.ZodString;
246
+ track: z.ZodString;
247
+ }, z.core.$strict>>;
248
+ }, z.core.$strict>>;
249
+ }, z.core.$strict>>;
250
+ }, z.core.$strict>, z.ZodObject<{
251
+ format: z.ZodLiteral<3>;
164
252
  alterspec: z.ZodString;
165
253
  exported: z.ZodISODate;
166
254
  baseline: z.ZodNullable<z.ZodObject<{
@@ -190,6 +278,7 @@ declare const AnyWorkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
278
  change: z.ZodString;
191
279
  track: z.ZodString;
192
280
  }, z.core.$strict>>;
281
+ weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
193
282
  }, z.core.$strict>>;
194
283
  }, z.core.$strict>>;
195
284
  }, z.core.$strict>], "format">;
@@ -201,11 +290,11 @@ declare class WorkError extends Error {
201
290
  constructor(message: string, issues?: z.core.$ZodIssue[]);
202
291
  }
203
292
  /**
204
- * Parses and validates the text of a `work.json` of format 1 or 2 (tell them apart by `format`; only 2 has
205
- * `items`); throws a `WorkError` naming every field that is wrong.
293
+ * Parses and validates the text of a `work.json` of format 1, 2 or 3 (tell them apart by `format`; 2 and 3 have
294
+ * `items`, 3 may carry `weights`); throws a `WorkError` naming every field that is wrong.
206
295
  */
207
296
  declare function parseWork(text: string): AnyWork;
208
297
  /** The JSON Schema of `work.json` (either format), as alterspec installs it in `.alterspec/schemas/work.json`. */
209
298
  declare function toWorkJsonSchema(): object;
210
299
 
211
- export { type AnyWork, AnyWorkSchema, TrackCode, WORK_FORMAT, type Work, type WorkChange, WorkChangeSchema, WorkError, WorkSchema, type WorkTask, WorkTaskSchema, type WorkTaskV1, WorkTaskV1Schema, type WorkTrack, WorkTrackSchema, type WorkV1, WorkV1Schema, parseWork, toWorkJsonSchema };
300
+ export { type AnyWork, AnyWorkSchema, TrackCode, WORK_FORMAT, type Work, type WorkChange, WorkChangeSchema, WorkError, WorkSchema, type WorkTask, WorkTaskSchema, type WorkTaskV1, WorkTaskV1Schema, type WorkTaskV2, WorkTaskV2Schema, type WorkTrack, WorkTrackSchema, type WorkV1, WorkV1Schema, type WorkV2, WorkV2Schema, WorkWeight, parseWork, toWorkJsonSchema };
package/dist/work.js CHANGED
@@ -4,6 +4,7 @@ import { z as z2 } from "zod";
4
4
  // ../src/schemas/work.ts
5
5
  import { z } from "zod";
6
6
  var TrackCode = z.string().regex(/^[A-Z]{2,5}$/, { message: "must be BE or a channel code" });
7
+ var WorkWeight = z.number().int().min(1).max(100);
7
8
  var ChangeRef = z.string().regex(/^CHG-\d{3,}$/);
8
9
  var Day = z.iso.date();
9
10
  var WorkTrackSchema = z.object({
@@ -28,7 +29,14 @@ var WorkTaskSchema = z.object({
28
29
  * changes it builds on that did the same work (an item of both, a line of a whole object this task edits again,
29
30
  * or an object this task names that entered the export with the earlier change).
30
31
  */
31
- after: z.array(z.object({ change: ChangeRef, track: TrackCode }).strict())
32
+ after: z.array(z.object({ change: ChangeRef, track: TrackCode }).strict()),
33
+ /**
34
+ * The weight of each item (format 3): how much specified behaviour it adds or changes, 1–100, reasoned at the
35
+ * change's sign-off against alterspec's rubric (a typical acceptance criterion about 10), never anyone's code.
36
+ * An item the sign-off didn't weigh takes the median of the task's weighed items; a task of a change signed off
37
+ * without weights has no `weights`, and a reader counts each of its items as 10. For weighing progress and ETA.
38
+ */
39
+ weights: z.record(z.string().min(1), WorkWeight).optional()
32
40
  }).strict();
33
41
  var WorkChangeSchema = z.object({
34
42
  id: ChangeRef,
@@ -42,7 +50,7 @@ var WorkChangeSchema = z.object({
42
50
  /** One per track the change is on; empty = no work. */
43
51
  tasks: z.array(WorkTaskSchema)
44
52
  }).strict();
45
- var WORK_FORMAT = 2;
53
+ var WORK_FORMAT = 3;
46
54
  var WorkSchema = z.object({
47
55
  format: z.literal(WORK_FORMAT),
48
56
  /** The alterspec version that wrote the export. */
@@ -54,15 +62,20 @@ var WorkSchema = z.object({
54
62
  /** Every change signed off after the baseline, in the change map's order. */
55
63
  changes: z.array(WorkChangeSchema)
56
64
  }).strict();
57
- var WorkTaskV1Schema = WorkTaskSchema.omit({ items: true });
65
+ var WorkTaskV2Schema = WorkTaskSchema.omit({ weights: true });
66
+ var WorkV2Schema = WorkSchema.extend({
67
+ format: z.literal(2),
68
+ changes: z.array(WorkChangeSchema.extend({ tasks: z.array(WorkTaskV2Schema) }).strict())
69
+ }).strict();
70
+ var WorkTaskV1Schema = WorkTaskV2Schema.omit({ items: true });
58
71
  var WorkV1Schema = WorkSchema.extend({
59
72
  format: z.literal(1),
60
73
  changes: z.array(WorkChangeSchema.extend({ tasks: z.array(WorkTaskV1Schema) }).strict())
61
74
  }).strict();
62
- var AnyWorkSchema = z.discriminatedUnion("format", [WorkV1Schema, WorkSchema]);
75
+ var AnyWorkSchema = z.discriminatedUnion("format", [WorkV1Schema, WorkV2Schema, WorkSchema]);
63
76
 
64
77
  // src/work.ts
65
- var FORMATS = [1, 2];
78
+ var FORMATS = [1, 2, 3];
66
79
  var WorkError = class extends Error {
67
80
  constructor(message, issues = []) {
68
81
  super(message);
@@ -84,7 +97,7 @@ function parseWork(text) {
84
97
  }
85
98
  const format = data?.format;
86
99
  if (typeof format === "number" && !FORMATS.includes(format)) {
87
- throw new WorkError(`work.json has format ${format}; this client knows formats ${FORMATS.join(" and ")}`);
100
+ throw new WorkError(`work.json has format ${format}; this client knows formats ${FORMATS.join(", ")}`);
88
101
  }
89
102
  const r = AnyWorkSchema.safeParse(data);
90
103
  if (r.success) return r.data;
@@ -107,8 +120,11 @@ export {
107
120
  WorkSchema,
108
121
  WorkTaskSchema,
109
122
  WorkTaskV1Schema,
123
+ WorkTaskV2Schema,
110
124
  WorkTrackSchema,
111
125
  WorkV1Schema,
126
+ WorkV2Schema,
127
+ WorkWeight,
112
128
  parseWork,
113
129
  toWorkJsonSchema
114
130
  };
package/dist/work.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/work.ts","../../src/schemas/work.ts"],"sourcesContent":["import { z } from 'zod';\nimport { AnyWorkSchema, type AnyWork } from '../../src/schemas/work.js';\n\n/**\n * `@alterset/alterspec-client/work`: the format of `work.json` in an alterspec export, for the dispatcher and anyone\n * else who reads it. The schema is alterspec's own (`src/schemas/work.ts`), re-exported, never copied. Format 2 is\n * `WorkSchema`, format 1 `WorkV1Schema`; `parseWork` reads both.\n */\n\n/** The formats this client reads. */\nconst FORMATS = [1, 2];\nexport * from '../../src/schemas/work.js';\n\n/** A `work.json` that is not JSON or not the format; `issues` holds zod's issues when it is JSON. */\nexport class WorkError extends Error {\n constructor(\n message: string,\n readonly issues: z.core.$ZodIssue[] = [],\n ) {\n super(message);\n this.name = 'WorkError';\n }\n}\n\n/** `changes[3].delta`: the issue's path as one would write it in JavaScript. */\nfunction pathText(path: readonly PropertyKey[]): string {\n let out = '';\n for (const p of path) out += typeof p === 'number' ? `[${p}]` : `${out ? '.' : ''}${String(p)}`;\n return out || '(root)';\n}\n\n/**\n * Parses and validates the text of a `work.json` of format 1 or 2 (tell them apart by `format`; only 2 has\n * `items`); throws a `WorkError` naming every field that is wrong.\n */\nexport function parseWork(text: string): AnyWork {\n let data: unknown;\n try {\n data = JSON.parse(text);\n } catch (e) {\n throw new WorkError(`work.json is not JSON: ${(e as Error).message}`);\n }\n const format = (data as { format?: unknown } | null)?.format;\n if (typeof format === 'number' && !FORMATS.includes(format)) {\n throw new WorkError(`work.json has format ${format}; this client knows formats ${FORMATS.join(' and ')}`);\n }\n const r = AnyWorkSchema.safeParse(data);\n if (r.success) return r.data;\n const lines = r.error.issues.map((i) => ` ${pathText(i.path)}: ${i.message}`);\n throw new WorkError(`work.json is not valid:\\n${lines.join('\\n')}`, r.error.issues);\n}\n\n/** The JSON Schema of `work.json` (either format), as alterspec installs it in `.alterspec/schemas/work.json`. */\nexport function toWorkJsonSchema(): object {\n return {\n title: 'alterspec work',\n ...z.toJSONSchema(AnyWorkSchema, { io: 'input', unrepresentable: 'any' }),\n };\n}\n","import { z } from 'zod';\n\n/**\n * `work.json` in an export: the work every signed-off change implies, for an application that hands it to developers\n * (the alterspec dispatcher). The one definition of the format. It imports nothing but zod, so the alterspec client\n * can carry it as it is. Format 2 (alterspec 0.24.0) adds each task's `items`; format 1 is the same without them, and\n * a reader of both takes `AnyWorkSchema`.\n */\n\n/** `BE` (the backend, API channels included) or the code of a channel with an experience of its own. */\nexport const TrackCode = z.string().regex(/^[A-Z]{2,5}$/, { message: 'must be BE or a channel code' });\nexport type TrackCode = z.infer<typeof TrackCode>;\n\nconst ChangeRef = z.string().regex(/^CHG-\\d{3,}$/);\nconst Day = z.iso.date();\n\nexport const WorkTrackSchema = z\n .object({\n code: TrackCode,\n kind: z.enum(['backend', 'ui']),\n /** The channel codes the track builds: the API channels for `BE`, the channels sharing the experience for a UI track. */\n channels: z.array(z.string()),\n })\n .strict();\nexport type WorkTrack = z.infer<typeof WorkTrackSchema>;\n\nexport const WorkTaskSchema = z\n .object({\n track: TrackCode,\n /** The keys of the objects in the change's delta that put it on the track. */\n objects: z.array(z.string()),\n /**\n * The task's checklist, derived from the delta: the acceptance criteria (`<CAP>-AC-NN`), screen actions\n * (`<SCR>.Ann`) and contract states (`<UX-SCR>#<state>`) the change adds or changes, and every other object as\n * its key; on `BE`, `<CHG>#data-change` when the proposal declares a one-time data change (alterspec 0.27.0).\n * Sorted, never empty.\n */\n items: z.array(z.string().min(1)).min(1),\n /**\n * The tasks this one waits for, resolved and reduced: the same change's `BE` task, and the track's tasks of the\n * changes it builds on that did the same work (an item of both, a line of a whole object this task edits again,\n * or an object this task names that entered the export with the earlier change).\n */\n after: z.array(z.object({ change: ChangeRef, track: TrackCode }).strict()),\n })\n .strict();\nexport type WorkTask = z.infer<typeof WorkTaskSchema>;\n\nexport const WorkChangeSchema = z\n .object({\n id: ChangeRef,\n title: z.string(),\n signed_off: Day,\n /** The hash of the change's `delta.json`; a signed-off change never changes. */\n delta: z.string().regex(/^[0-9a-f]{16}$/),\n depends_on: z.array(ChangeRef),\n /** The change map's level. */\n level: z.number().int().min(1),\n /** One per track the change is on; empty = no work. */\n tasks: z.array(WorkTaskSchema),\n })\n .strict();\nexport type WorkChange = z.infer<typeof WorkChangeSchema>;\n\nexport const WORK_FORMAT = 2;\n\nexport const WorkSchema = z\n .object({\n format: z.literal(WORK_FORMAT),\n /** The alterspec version that wrote the export. */\n alterspec: z.string(),\n exported: Day,\n /** Everything signed off before the changes began; `built`: the product as it runs (a reverse-spec), no work. */\n baseline: z.object({ date: Day, built: z.boolean() }).strict().nullable(),\n tracks: z.array(WorkTrackSchema),\n /** Every change signed off after the baseline, in the change map's order. */\n changes: z.array(WorkChangeSchema),\n })\n .strict();\nexport type Work = z.infer<typeof WorkSchema>;\n\n/** Format 1 (alterspec 0.23): the same without `items`. */\nexport const WorkTaskV1Schema = WorkTaskSchema.omit({ items: true });\nexport type WorkTaskV1 = z.infer<typeof WorkTaskV1Schema>;\n\nexport const WorkV1Schema = WorkSchema.extend({\n format: z.literal(1),\n changes: z.array(WorkChangeSchema.extend({ tasks: z.array(WorkTaskV1Schema) }).strict()),\n}).strict();\nexport type WorkV1 = z.infer<typeof WorkV1Schema>;\n\n/** Either format, told apart by `format`: what a reader of exports from several alterspec versions takes. */\nexport const AnyWorkSchema = z.discriminatedUnion('format', [WorkV1Schema, WorkSchema]);\nexport type AnyWork = z.infer<typeof AnyWorkSchema>;\n"],"mappings":";AAAA,SAAS,K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A,QAAM,IAAI,cAAc,UAAU,IAAI;AACtC,MAAI,EAAE,QAAS,QAAO,EAAE;AACxB,QAAM,QAAQ,EAAE,MAAM,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7E,QAAM,IAAI,UAAU;AAAA,EAA4B,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,MAAM;AACpF;AAGO,SAAS,mBAA2B;AACzC,SAAO;AAAA,IACL,OAAO;AAAA,IACP,GAAGC,GAAE,aAAa,eAAe,EAAE,IAAI,SAAS,iBAAiB,MAAM,CAAC;AAAA,EAC1E;AACF;","names":["z","z"]}
1
+ {"version":3,"sources":["../src/work.ts","../../src/schemas/work.ts"],"sourcesContent":["import { z } from 'zod';\nimport { AnyWorkSchema, type AnyWork } from '../../src/schemas/work.js';\n\n/**\n * `@alterset/alterspec-client/work`: the format of `work.json` in an alterspec export, for the dispatcher and anyone\n * else who reads it. The schema is alterspec's own (`src/schemas/work.ts`), re-exported, never copied. Format 3 is\n * `WorkSchema`, format 2 `WorkV2Schema` (no `weights`), format 1 `WorkV1Schema` (no `items`); `parseWork` reads all.\n */\n\n/** The formats this client reads. */\nconst FORMATS = [1, 2, 3];\nexport * from '../../src/schemas/work.js';\n\n/** A `work.json` that is not JSON or not the format; `issues` holds zod's issues when it is JSON. */\nexport class WorkError extends Error {\n constructor(\n message: string,\n readonly issues: z.core.$ZodIssue[] = [],\n ) {\n super(message);\n this.name = 'WorkError';\n }\n}\n\n/** `changes[3].delta`: the issue's path as one would write it in JavaScript. */\nfunction pathText(path: readonly PropertyKey[]): string {\n let out = '';\n for (const p of path) out += typeof p === 'number' ? `[${p}]` : `${out ? '.' : ''}${String(p)}`;\n return out || '(root)';\n}\n\n/**\n * Parses and validates the text of a `work.json` of format 1, 2 or 3 (tell them apart by `format`; 2 and 3 have\n * `items`, 3 may carry `weights`); throws a `WorkError` naming every field that is wrong.\n */\nexport function parseWork(text: string): AnyWork {\n let data: unknown;\n try {\n data = JSON.parse(text);\n } catch (e) {\n throw new WorkError(`work.json is not JSON: ${(e as Error).message}`);\n }\n const format = (data as { format?: unknown } | null)?.format;\n if (typeof format === 'number' && !FORMATS.includes(format)) {\n throw new WorkError(`work.json has format ${format}; this client knows formats ${FORMATS.join(', ')}`);\n }\n const r = AnyWorkSchema.safeParse(data);\n if (r.success) return r.data;\n const lines = r.error.issues.map((i) => ` ${pathText(i.path)}: ${i.message}`);\n throw new WorkError(`work.json is not valid:\\n${lines.join('\\n')}`, r.error.issues);\n}\n\n/** The JSON Schema of `work.json` (either format), as alterspec installs it in `.alterspec/schemas/work.json`. */\nexport function toWorkJsonSchema(): object {\n return {\n title: 'alterspec work',\n ...z.toJSONSchema(AnyWorkSchema, { io: 'input', unrepresentable: 'any' }),\n };\n}\n","import { z } from 'zod';\n\n/**\n * `work.json` in an export: the work every signed-off change implies, for an application that hands it to developers\n * (the alterspec dispatcher). The one definition of the format. It imports nothing but zod, so the alterspec client\n * can carry it as it is. Format 3 (alterspec 0.33.0) adds each task's optional `weights`; format 2 (0.24.0) added\n * each task's `items`; format 1 is the same without them. A reader of every format takes `AnyWorkSchema`.\n */\n\n/** `BE` (the backend, API channels included) or the code of a channel with an experience of its own. */\nexport const TrackCode = z.string().regex(/^[A-Z]{2,5}$/, { message: 'must be BE or a channel code' });\nexport type TrackCode = z.infer<typeof TrackCode>;\n\n/**\n * The weight of a task item, 1–100: how much specified behaviour the item adds or changes, reasoned at sign-off\n * against alterspec's rubric (a typical acceptance criterion is about 10), never an estimate of anyone's code.\n */\nexport const WorkWeight = z.number().int().min(1).max(100);\nexport type WorkWeight = z.infer<typeof WorkWeight>;\n\nconst ChangeRef = z.string().regex(/^CHG-\\d{3,}$/);\nconst Day = z.iso.date();\n\nexport const WorkTrackSchema = z\n .object({\n code: TrackCode,\n kind: z.enum(['backend', 'ui']),\n /** The channel codes the track builds: the API channels for `BE`, the channels sharing the experience for a UI track. */\n channels: z.array(z.string()),\n })\n .strict();\nexport type WorkTrack = z.infer<typeof WorkTrackSchema>;\n\nexport const WorkTaskSchema = z\n .object({\n track: TrackCode,\n /** The keys of the objects in the change's delta that put it on the track. */\n objects: z.array(z.string()),\n /**\n * The task's checklist, derived from the delta: the acceptance criteria (`<CAP>-AC-NN`), screen actions\n * (`<SCR>.Ann`) and contract states (`<UX-SCR>#<state>`) the change adds or changes, and every other object as\n * its key; on `BE`, `<CHG>#data-change` when the proposal declares a one-time data change (alterspec 0.27.0).\n * Sorted, never empty.\n */\n items: z.array(z.string().min(1)).min(1),\n /**\n * The tasks this one waits for, resolved and reduced: the same change's `BE` task, and the track's tasks of the\n * changes it builds on that did the same work (an item of both, a line of a whole object this task edits again,\n * or an object this task names that entered the export with the earlier change).\n */\n after: z.array(z.object({ change: ChangeRef, track: TrackCode }).strict()),\n /**\n * The weight of each item (format 3): how much specified behaviour it adds or changes, 1–100, reasoned at the\n * change's sign-off against alterspec's rubric (a typical acceptance criterion about 10), never anyone's code.\n * An item the sign-off didn't weigh takes the median of the task's weighed items; a task of a change signed off\n * without weights has no `weights`, and a reader counts each of its items as 10. For weighing progress and ETA.\n */\n weights: z.record(z.string().min(1), WorkWeight).optional(),\n })\n .strict();\nexport type WorkTask = z.infer<typeof WorkTaskSchema>;\n\nexport const WorkChangeSchema = z\n .object({\n id: ChangeRef,\n title: z.string(),\n signed_off: Day,\n /** The hash of the change's `delta.json`; a signed-off change never changes. */\n delta: z.string().regex(/^[0-9a-f]{16}$/),\n depends_on: z.array(ChangeRef),\n /** The change map's level. */\n level: z.number().int().min(1),\n /** One per track the change is on; empty = no work. */\n tasks: z.array(WorkTaskSchema),\n })\n .strict();\nexport type WorkChange = z.infer<typeof WorkChangeSchema>;\n\nexport const WORK_FORMAT = 3;\n\nexport const WorkSchema = z\n .object({\n format: z.literal(WORK_FORMAT),\n /** The alterspec version that wrote the export. */\n alterspec: z.string(),\n exported: Day,\n /** Everything signed off before the changes began; `built`: the product as it runs (a reverse-spec), no work. */\n baseline: z.object({ date: Day, built: z.boolean() }).strict().nullable(),\n tracks: z.array(WorkTrackSchema),\n /** Every change signed off after the baseline, in the change map's order. */\n changes: z.array(WorkChangeSchema),\n })\n .strict();\nexport type Work = z.infer<typeof WorkSchema>;\n\n/** Format 2 (alterspec 0.24 to 0.32): the same without `weights`. */\nexport const WorkTaskV2Schema = WorkTaskSchema.omit({ weights: true });\nexport type WorkTaskV2 = z.infer<typeof WorkTaskV2Schema>;\n\nexport const WorkV2Schema = WorkSchema.extend({\n format: z.literal(2),\n changes: z.array(WorkChangeSchema.extend({ tasks: z.array(WorkTaskV2Schema) }).strict()),\n}).strict();\nexport type WorkV2 = z.infer<typeof WorkV2Schema>;\n\n/** Format 1 (alterspec 0.23): the same without `items` and `weights`. */\nexport const WorkTaskV1Schema = WorkTaskV2Schema.omit({ items: true });\nexport type WorkTaskV1 = z.infer<typeof WorkTaskV1Schema>;\n\nexport const WorkV1Schema = WorkSchema.extend({\n format: z.literal(1),\n changes: z.array(WorkChangeSchema.extend({ tasks: z.array(WorkTaskV1Schema) }).strict()),\n}).strict();\nexport type WorkV1 = z.infer<typeof WorkV1Schema>;\n\n/** Any format, told apart by `format`: what a reader of exports from several alterspec versions takes. */\nexport const AnyWorkSchema = z.discriminatedUnion('format', [WorkV1Schema, WorkV2Schema, WorkSchema]);\nexport type AnyWork = z.infer<typeof AnyWorkSchema>;\n"],"mappings":";AAAA,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAS;AAUX,IAAM,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,EAAE,SAAS,+BAA+B,CAAC;AAO9F,IAAM,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAGzD,IAAM,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc;AACjD,IAAM,MAAM,EAAE,IAAI,KAAK;AAEhB,IAAM,kBAAkB,EAC5B,OAAO;AAAA,EACN,MAAM;AAAA,EACN,MAAM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,YAAY,CAAC,QAAQ,SAAS,MAAM,GAAG;AAC3D,UAAM,IAAI,UAAU,wBAAwB,MAAM,+BAA+B,QAAQ,KAAK,IAAI,CAAC,EAAE;AAAA,EACvG;AACA,QAAM,IAAI,cAAc,UAAU,IAAI;AACtC,MAAI,EAAE,QAAS,QAAO,EAAE;AACxB,QAAM,QAAQ,EAAE,MAAM,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE;AAC7E,QAAM,IAAI,UAAU;AAAA,EAA4B,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,MAAM;AACpF;AAGO,SAAS,mBAA2B;AACzC,SAAO;AAAA,IACL,OAAO;AAAA,IACP,GAAGC,GAAE,aAAa,eAAe,EAAE,IAAI,SAAS,iBAAiB,MAAM,CAAC;AAAA,EAC1E;AACF;","names":["z","z"]}
@@ -356,6 +356,200 @@
356
356
  "changes"
357
357
  ],
358
358
  "additionalProperties": false
359
+ },
360
+ {
361
+ "type": "object",
362
+ "properties": {
363
+ "format": {
364
+ "type": "number",
365
+ "const": 3
366
+ },
367
+ "alterspec": {
368
+ "type": "string"
369
+ },
370
+ "exported": {
371
+ "type": "string",
372
+ "format": "date",
373
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
374
+ },
375
+ "baseline": {
376
+ "anyOf": [
377
+ {
378
+ "type": "object",
379
+ "properties": {
380
+ "date": {
381
+ "type": "string",
382
+ "format": "date",
383
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
384
+ },
385
+ "built": {
386
+ "type": "boolean"
387
+ }
388
+ },
389
+ "required": [
390
+ "date",
391
+ "built"
392
+ ],
393
+ "additionalProperties": false
394
+ },
395
+ {
396
+ "type": "null"
397
+ }
398
+ ]
399
+ },
400
+ "tracks": {
401
+ "type": "array",
402
+ "items": {
403
+ "type": "object",
404
+ "properties": {
405
+ "code": {
406
+ "type": "string",
407
+ "pattern": "^[A-Z]{2,5}$"
408
+ },
409
+ "kind": {
410
+ "type": "string",
411
+ "enum": [
412
+ "backend",
413
+ "ui"
414
+ ]
415
+ },
416
+ "channels": {
417
+ "type": "array",
418
+ "items": {
419
+ "type": "string"
420
+ }
421
+ }
422
+ },
423
+ "required": [
424
+ "code",
425
+ "kind",
426
+ "channels"
427
+ ],
428
+ "additionalProperties": false
429
+ }
430
+ },
431
+ "changes": {
432
+ "type": "array",
433
+ "items": {
434
+ "type": "object",
435
+ "properties": {
436
+ "id": {
437
+ "type": "string",
438
+ "pattern": "^CHG-\\d{3,}$"
439
+ },
440
+ "title": {
441
+ "type": "string"
442
+ },
443
+ "signed_off": {
444
+ "type": "string",
445
+ "format": "date",
446
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
447
+ },
448
+ "delta": {
449
+ "type": "string",
450
+ "pattern": "^[0-9a-f]{16}$"
451
+ },
452
+ "depends_on": {
453
+ "type": "array",
454
+ "items": {
455
+ "type": "string",
456
+ "pattern": "^CHG-\\d{3,}$"
457
+ }
458
+ },
459
+ "level": {
460
+ "type": "integer",
461
+ "minimum": 1,
462
+ "maximum": 9007199254740991
463
+ },
464
+ "tasks": {
465
+ "type": "array",
466
+ "items": {
467
+ "type": "object",
468
+ "properties": {
469
+ "track": {
470
+ "type": "string",
471
+ "pattern": "^[A-Z]{2,5}$"
472
+ },
473
+ "objects": {
474
+ "type": "array",
475
+ "items": {
476
+ "type": "string"
477
+ }
478
+ },
479
+ "items": {
480
+ "minItems": 1,
481
+ "type": "array",
482
+ "items": {
483
+ "type": "string",
484
+ "minLength": 1
485
+ }
486
+ },
487
+ "after": {
488
+ "type": "array",
489
+ "items": {
490
+ "type": "object",
491
+ "properties": {
492
+ "change": {
493
+ "type": "string",
494
+ "pattern": "^CHG-\\d{3,}$"
495
+ },
496
+ "track": {
497
+ "type": "string",
498
+ "pattern": "^[A-Z]{2,5}$"
499
+ }
500
+ },
501
+ "required": [
502
+ "change",
503
+ "track"
504
+ ],
505
+ "additionalProperties": false
506
+ }
507
+ },
508
+ "weights": {
509
+ "type": "object",
510
+ "propertyNames": {
511
+ "type": "string",
512
+ "minLength": 1
513
+ },
514
+ "additionalProperties": {
515
+ "type": "integer",
516
+ "minimum": 1,
517
+ "maximum": 100
518
+ }
519
+ }
520
+ },
521
+ "required": [
522
+ "track",
523
+ "objects",
524
+ "items",
525
+ "after"
526
+ ],
527
+ "additionalProperties": false
528
+ }
529
+ }
530
+ },
531
+ "required": [
532
+ "id",
533
+ "title",
534
+ "signed_off",
535
+ "delta",
536
+ "depends_on",
537
+ "level",
538
+ "tasks"
539
+ ],
540
+ "additionalProperties": false
541
+ }
542
+ }
543
+ },
544
+ "required": [
545
+ "format",
546
+ "alterspec",
547
+ "exported",
548
+ "baseline",
549
+ "tracks",
550
+ "changes"
551
+ ],
552
+ "additionalProperties": false
359
553
  }
360
554
  ]
361
555
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alterset/alterspec-client",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "The alterspec client: takes tasks of an alterspec export from the dispatcher into a developer's repository.",
5
5
  "license": "MIT",
6
6
  "author": "Alterset d.o.o.",