@schnick371/devsteps-shared 0.7.0-next.3 → 0.7.0-next.4

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.
Files changed (41) hide show
  1. package/dist/core/auto-migrate.d.ts +154 -0
  2. package/dist/core/auto-migrate.d.ts.map +1 -0
  3. package/dist/core/auto-migrate.js +383 -0
  4. package/dist/core/auto-migrate.js.map +1 -0
  5. package/dist/core/auto-migrate.test.d.ts +7 -0
  6. package/dist/core/auto-migrate.test.d.ts.map +1 -0
  7. package/dist/core/auto-migrate.test.js +364 -0
  8. package/dist/core/auto-migrate.test.js.map +1 -0
  9. package/dist/core/index-rebuild.d.ts +75 -0
  10. package/dist/core/index-rebuild.d.ts.map +1 -0
  11. package/dist/core/index-rebuild.js +260 -0
  12. package/dist/core/index-rebuild.js.map +1 -0
  13. package/dist/core/index-rebuild.test.d.ts +8 -0
  14. package/dist/core/index-rebuild.test.d.ts.map +1 -0
  15. package/dist/core/index-rebuild.test.js +582 -0
  16. package/dist/core/index-rebuild.test.js.map +1 -0
  17. package/dist/core/index-refs.d.ts +155 -0
  18. package/dist/core/index-refs.d.ts.map +1 -0
  19. package/dist/core/index-refs.js +442 -0
  20. package/dist/core/index-refs.js.map +1 -0
  21. package/dist/core/index-refs.test.d.ts +7 -0
  22. package/dist/core/index-refs.test.d.ts.map +1 -0
  23. package/dist/core/index-refs.test.js +367 -0
  24. package/dist/core/index-refs.test.js.map +1 -0
  25. package/dist/migration/fix-missing-eisenhower.d.ts +8 -0
  26. package/dist/migration/fix-missing-eisenhower.d.ts.map +1 -0
  27. package/dist/migration/fix-missing-eisenhower.js +58 -0
  28. package/dist/migration/fix-missing-eisenhower.js.map +1 -0
  29. package/dist/migration/remove-priority-field.d.ts +15 -0
  30. package/dist/migration/remove-priority-field.d.ts.map +1 -0
  31. package/dist/migration/remove-priority-field.js +113 -0
  32. package/dist/migration/remove-priority-field.js.map +1 -0
  33. package/dist/schemas/index-refs.schema.d.ts +103 -0
  34. package/dist/schemas/index-refs.schema.d.ts.map +1 -0
  35. package/dist/schemas/index-refs.schema.js +88 -0
  36. package/dist/schemas/index-refs.schema.js.map +1 -0
  37. package/dist/types/index-refs.types.d.ts +123 -0
  38. package/dist/types/index-refs.types.d.ts.map +1 -0
  39. package/dist/types/index-refs.types.js +71 -0
  40. package/dist/types/index-refs.types.js.map +1 -0
  41. package/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Zod Validation Schemas for Refs-Style Index
3
+ *
4
+ * Runtime validation for the distributed index architecture.
5
+ * Ensures data integrity across all index files.
6
+ *
7
+ * @see EPIC-018 Index Architecture Refactoring
8
+ * @see STORY-069 Foundation: Refs-Style Index Schema
9
+ */
10
+ import { z } from 'zod';
11
+ /**
12
+ * Category index schema - base structure for all index files
13
+ */
14
+ export declare const CategoryIndexSchema: z.ZodObject<{
15
+ category: z.ZodString;
16
+ items: z.ZodArray<z.ZodString>;
17
+ updated: z.ZodString;
18
+ }, z.core.$strip>;
19
+ /**
20
+ * Type index schema (by-type/*.json)
21
+ */
22
+ export declare const TypeIndexSchema: z.ZodObject<{
23
+ items: z.ZodArray<z.ZodString>;
24
+ updated: z.ZodString;
25
+ category: z.ZodEnum<{
26
+ epic: "epic";
27
+ story: "story";
28
+ task: "task";
29
+ requirement: "requirement";
30
+ feature: "feature";
31
+ bug: "bug";
32
+ spike: "spike";
33
+ test: "test";
34
+ }>;
35
+ }, z.core.$strip>;
36
+ /**
37
+ * Status index schema (by-status/*.json)
38
+ */
39
+ export declare const StatusIndexSchema: z.ZodObject<{
40
+ items: z.ZodArray<z.ZodString>;
41
+ updated: z.ZodString;
42
+ category: z.ZodEnum<{
43
+ draft: "draft";
44
+ planned: "planned";
45
+ "in-progress": "in-progress";
46
+ review: "review";
47
+ done: "done";
48
+ obsolete: "obsolete";
49
+ blocked: "blocked";
50
+ cancelled: "cancelled";
51
+ }>;
52
+ }, z.core.$strip>;
53
+ /**
54
+ * Priority index schema (by-priority/*.json)
55
+ */
56
+ export declare const PriorityIndexSchema: z.ZodObject<{
57
+ items: z.ZodArray<z.ZodString>;
58
+ updated: z.ZodString;
59
+ category: z.ZodEnum<{
60
+ "urgent-important": "urgent-important";
61
+ "not-urgent-important": "not-urgent-important";
62
+ "urgent-not-important": "urgent-not-important";
63
+ "not-urgent-not-important": "not-urgent-not-important";
64
+ }>;
65
+ }, z.core.$strip>;
66
+ /**
67
+ * Counters schema (index/counters.json)
68
+ *
69
+ * Preserves ID generation counters from legacy index
70
+ */
71
+ export declare const CountersSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
72
+ /**
73
+ * Index paths validation
74
+ */
75
+ export declare const IndexPathsSchema: z.ZodObject<{
76
+ root: z.ZodString;
77
+ byType: z.ZodString;
78
+ byStatus: z.ZodString;
79
+ byPriority: z.ZodString;
80
+ counters: z.ZodString;
81
+ legacy: z.ZodString;
82
+ }, z.core.$strip>;
83
+ /**
84
+ * Validate category index file
85
+ */
86
+ export declare function validateCategoryIndex(data: unknown): z.infer<typeof CategoryIndexSchema>;
87
+ /**
88
+ * Validate type index file
89
+ */
90
+ export declare function validateTypeIndex(data: unknown): z.infer<typeof TypeIndexSchema>;
91
+ /**
92
+ * Validate status index file
93
+ */
94
+ export declare function validateStatusIndex(data: unknown): z.infer<typeof StatusIndexSchema>;
95
+ /**
96
+ * Validate priority index file
97
+ */
98
+ export declare function validatePriorityIndex(data: unknown): z.infer<typeof PriorityIndexSchema>;
99
+ /**
100
+ * Validate counters file
101
+ */
102
+ export declare function validateCounters(data: unknown): z.infer<typeof CountersSchema>;
103
+ //# sourceMappingURL=index-refs.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-refs.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;iBAS9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;iBAE1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAE5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;iBAE9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc,uCAG1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;iBAO3B,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAExF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAEhF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAEpF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAExF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAE9E"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Zod Validation Schemas for Refs-Style Index
3
+ *
4
+ * Runtime validation for the distributed index architecture.
5
+ * Ensures data integrity across all index files.
6
+ *
7
+ * @see EPIC-018 Index Architecture Refactoring
8
+ * @see STORY-069 Foundation: Refs-Style Index Schema
9
+ */
10
+ import { z } from 'zod';
11
+ /**
12
+ * Category index schema - base structure for all index files
13
+ */
14
+ export const CategoryIndexSchema = z.object({
15
+ /** Category name */
16
+ category: z.string(),
17
+ /** Array of item IDs */
18
+ items: z.array(z.string().regex(/^(EPIC|STORY|TASK|REQ|FEAT|BUG|SPIKE|TEST)-\d{3,}$/)),
19
+ /** Last update timestamp (ISO 8601) */
20
+ updated: z.string().datetime(),
21
+ });
22
+ /**
23
+ * Type index schema (by-type/*.json)
24
+ */
25
+ export const TypeIndexSchema = CategoryIndexSchema.extend({
26
+ category: z.enum(['epic', 'story', 'task', 'requirement', 'feature', 'bug', 'spike', 'test']),
27
+ });
28
+ /**
29
+ * Status index schema (by-status/*.json)
30
+ */
31
+ export const StatusIndexSchema = CategoryIndexSchema.extend({
32
+ category: z.enum(['draft', 'planned', 'in-progress', 'review', 'done', 'obsolete', 'blocked', 'cancelled']),
33
+ });
34
+ /**
35
+ * Priority index schema (by-priority/*.json)
36
+ */
37
+ export const PriorityIndexSchema = CategoryIndexSchema.extend({
38
+ category: z.enum(['urgent-important', 'not-urgent-important', 'urgent-not-important', 'not-urgent-not-important']),
39
+ });
40
+ /**
41
+ * Counters schema (index/counters.json)
42
+ *
43
+ * Preserves ID generation counters from legacy index
44
+ */
45
+ export const CountersSchema = z.record(z.string(), // item type key
46
+ z.number().int().nonnegative());
47
+ /**
48
+ * Index paths validation
49
+ */
50
+ export const IndexPathsSchema = z.object({
51
+ root: z.string(),
52
+ byType: z.string(),
53
+ byStatus: z.string(),
54
+ byPriority: z.string(),
55
+ counters: z.string(),
56
+ legacy: z.string(),
57
+ });
58
+ /**
59
+ * Validate category index file
60
+ */
61
+ export function validateCategoryIndex(data) {
62
+ return CategoryIndexSchema.parse(data);
63
+ }
64
+ /**
65
+ * Validate type index file
66
+ */
67
+ export function validateTypeIndex(data) {
68
+ return TypeIndexSchema.parse(data);
69
+ }
70
+ /**
71
+ * Validate status index file
72
+ */
73
+ export function validateStatusIndex(data) {
74
+ return StatusIndexSchema.parse(data);
75
+ }
76
+ /**
77
+ * Validate priority index file
78
+ */
79
+ export function validatePriorityIndex(data) {
80
+ return PriorityIndexSchema.parse(data);
81
+ }
82
+ /**
83
+ * Validate counters file
84
+ */
85
+ export function validateCounters(data) {
86
+ return CountersSchema.parse(data);
87
+ }
88
+ //# sourceMappingURL=index-refs.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-refs.schema.js","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,oBAAoB;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IAEpB,wBAAwB;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAEtF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;CAC7F,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC3D,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;CAC3G,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC7D,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,kBAA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 /**
2
+ * Refs-Style Index Types
3
+ *
4
+ * Git-inspired distributed index architecture where each category
5
+ * (type, status, priority) maintains its own index file containing
6
+ * only item IDs.
7
+ *
8
+ * Benefits:
9
+ * - Eliminates merge conflicts (separate files = no collisions)
10
+ * - Faster queries (load only needed index)
11
+ * - Atomic updates per category
12
+ * - Scales better than monolithic index.json
13
+ *
14
+ * @see EPIC-018 Index Architecture Refactoring
15
+ * @see STORY-069 Foundation: Refs-Style Index Schema
16
+ */
17
+ import type { EisenhowerQuadrant, ItemStatus, ItemType } from '../schemas/index.js';
18
+ /**
19
+ * Single category index file structure
20
+ *
21
+ * Example: .devsteps/index/by-type/tasks.json
22
+ * ```json
23
+ * {
24
+ * "category": "tasks",
25
+ * "items": ["TASK-160", "TASK-161", "TASK-162"],
26
+ * "updated": "2025-12-13T13:30:00.000Z"
27
+ * }
28
+ * ```
29
+ */
30
+ export interface CategoryIndex {
31
+ /** Category name (e.g., "tasks", "draft", "critical") */
32
+ category: string;
33
+ /** Array of item IDs in this category */
34
+ items: string[];
35
+ /** Last update timestamp (ISO 8601) */
36
+ updated: string;
37
+ }
38
+ /**
39
+ * Type-based index (by-type/*.json)
40
+ * Maps each ItemType to its own file
41
+ */
42
+ export interface TypeIndex extends CategoryIndex {
43
+ category: ItemType;
44
+ }
45
+ /**
46
+ * Status-based index (by-status/*.json)
47
+ * Maps each ItemStatus to its own file
48
+ */
49
+ export interface StatusIndex extends CategoryIndex {
50
+ category: ItemStatus;
51
+ }
52
+ /**
53
+ * Priority-based index (by-priority/*.json)
54
+ * Maps each EisenhowerQuadrant to its own file
55
+ */
56
+ export interface PriorityIndex extends CategoryIndex {
57
+ category: EisenhowerQuadrant;
58
+ }
59
+ /**
60
+ * Complete refs-style index structure
61
+ * Aggregates all category indexes
62
+ */
63
+ export interface RefsStyleIndex {
64
+ /** Type indexes (epics.json, stories.json, tasks.json, etc.) */
65
+ byType: Map<ItemType, string[]>;
66
+ /** Status indexes (draft.json, in-progress.json, done.json, etc.) */
67
+ byStatus: Map<ItemStatus, string[]>;
68
+ /** Priority indexes (urgent-important.json, etc.) */
69
+ byPriority: Map<EisenhowerQuadrant, string[]>;
70
+ /** Counters for ID generation (preserved from legacy index) */
71
+ counters: Record<string, number>;
72
+ /** Last update timestamp across all indexes */
73
+ lastUpdated: string;
74
+ }
75
+ /**
76
+ * Index directory paths
77
+ */
78
+ export interface IndexPaths {
79
+ /** Root index directory (.devsteps/index/) */
80
+ root: string;
81
+ /** By-type directory (.devsteps/index/by-type/) */
82
+ byType: string;
83
+ /** By-status directory (.devsteps/index/by-status/) */
84
+ byStatus: string;
85
+ /** By-priority directory (.devsteps/index/by-priority/) */
86
+ byPriority: string;
87
+ /** Counters file (.devsteps/index/counters.json) */
88
+ counters: string;
89
+ /** Legacy index (.devsteps/index.json) - for migration detection */
90
+ legacy: string;
91
+ }
92
+ /**
93
+ * Index file naming conventions
94
+ */
95
+ export declare const INDEX_FILENAMES: {
96
+ /** Type index filenames */
97
+ readonly TYPE: Record<ItemType, string>;
98
+ /** Status index filenames */
99
+ readonly STATUS: Record<ItemStatus, string>;
100
+ /** Priority index filenames */
101
+ readonly PRIORITY: Record<EisenhowerQuadrant, string>;
102
+ };
103
+ /**
104
+ * Index consistency rules
105
+ */
106
+ export declare const INDEX_RULES: {
107
+ /**
108
+ * Every item MUST appear in exactly one file per dimension:
109
+ * - Exactly one by-type/*.json file
110
+ * - Exactly one by-status/*.json file
111
+ * - Exactly one by-priority/*.json file
112
+ */
113
+ readonly UNIQUE_PER_DIMENSION: true;
114
+ /**
115
+ * Performance targets (290 items)
116
+ */
117
+ readonly PERFORMANCE: {
118
+ readonly loadSingleIndex: 10;
119
+ readonly updateSingleIndex: 20;
120
+ readonly loadFullIndex: 100;
121
+ };
122
+ };
123
+ //# sourceMappingURL=index-refs.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-refs.types.d.ts","sourceRoot":"","sources":["../../src/types/index-refs.types.ts"],"names":[],"mappings":"AAAA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AAQ,EAAE,MAAM,CAAC;IAEjB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B,2BAA2B;mBAUtB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE7B,6BAA6B;qBAUxB,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC;IAE/B,+BAA+B;uBAM1B,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;IACvB;;;;;OAKG;;IAGH;;OAEG;;;;;;CAMM,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Refs-Style Index Types
3
+ *
4
+ * Git-inspired distributed index architecture where each category
5
+ * (type, status, priority) maintains its own index file containing
6
+ * only item IDs.
7
+ *
8
+ * Benefits:
9
+ * - Eliminates merge conflicts (separate files = no collisions)
10
+ * - Faster queries (load only needed index)
11
+ * - Atomic updates per category
12
+ * - Scales better than monolithic index.json
13
+ *
14
+ * @see EPIC-018 Index Architecture Refactoring
15
+ * @see STORY-069 Foundation: Refs-Style Index Schema
16
+ */
17
+ /**
18
+ * Index file naming conventions
19
+ */
20
+ export const INDEX_FILENAMES = {
21
+ /** Type index filenames */
22
+ TYPE: {
23
+ epic: 'epics.json',
24
+ story: 'stories.json',
25
+ task: 'tasks.json',
26
+ requirement: 'requirements.json',
27
+ feature: 'features.json',
28
+ bug: 'bugs.json',
29
+ spike: 'spikes.json',
30
+ test: 'tests.json',
31
+ },
32
+ /** Status index filenames */
33
+ STATUS: {
34
+ draft: 'draft.json',
35
+ planned: 'planned.json',
36
+ 'in-progress': 'in-progress.json',
37
+ review: 'review.json',
38
+ done: 'done.json',
39
+ obsolete: 'obsolete.json',
40
+ blocked: 'blocked.json',
41
+ cancelled: 'cancelled.json',
42
+ },
43
+ /** Priority index filenames */
44
+ PRIORITY: {
45
+ 'urgent-important': 'urgent-important.json',
46
+ 'not-urgent-important': 'not-urgent-important.json',
47
+ 'urgent-not-important': 'urgent-not-important.json',
48
+ 'not-urgent-not-important': 'not-urgent-not-important.json',
49
+ },
50
+ };
51
+ /**
52
+ * Index consistency rules
53
+ */
54
+ export const INDEX_RULES = {
55
+ /**
56
+ * Every item MUST appear in exactly one file per dimension:
57
+ * - Exactly one by-type/*.json file
58
+ * - Exactly one by-status/*.json file
59
+ * - Exactly one by-priority/*.json file
60
+ */
61
+ UNIQUE_PER_DIMENSION: true,
62
+ /**
63
+ * Performance targets (290 items)
64
+ */
65
+ PERFORMANCE: {
66
+ loadSingleIndex: 10, // ms
67
+ updateSingleIndex: 20, // ms
68
+ loadFullIndex: 100, // ms
69
+ },
70
+ };
71
+ //# sourceMappingURL=index-refs.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-refs.types.js","sourceRoot":"","sources":["../../src/types/index-refs.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA+FH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,2BAA2B;IAC3B,IAAI,EAAE;QACL,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,eAAe;QACxB,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,YAAY;KACU;IAE7B,6BAA6B;IAC7B,MAAM,EAAE;QACP,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,cAAc;QACvB,aAAa,EAAE,kBAAkB;QACjC,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,gBAAgB;KACG;IAE/B,+BAA+B;IAC/B,QAAQ,EAAE;QACT,kBAAkB,EAAE,uBAAuB;QAC3C,sBAAsB,EAAE,2BAA2B;QACnD,sBAAsB,EAAE,2BAA2B;QACnD,0BAA0B,EAAE,+BAA+B;KACrB;CAC9B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;;;;OAKG;IACH,oBAAoB,EAAE,IAAI;IAE1B;;OAEG;IACH,WAAW,EAAE;QACZ,eAAe,EAAE,EAAE,EAAE,KAAK;QAC1B,iBAAiB,EAAE,EAAE,EAAE,KAAK;QAC5B,aAAa,EAAE,GAAG,EAAE,KAAK;KACzB;CACQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schnick371/devsteps-shared",
3
- "version": "0.7.0-next.3",
3
+ "version": "0.7.0-next.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Never Code Alone. Shared types, schemas, and utilities for DevSteps task tracking.",
6
6
  "author": "Thomas Hertel <thomas.hertel@devsteps.dev>",