@attest-it/core 0.0.2 → 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.
@@ -43,6 +43,8 @@ export declare interface AttestItConfig {
43
43
  settings: AttestItSettings;
44
44
  /** Named test suites with their configurations */
45
45
  suites: Record<string, SuiteConfig>;
46
+ /** Named groups of suites */
47
+ groups?: Record<string, string[]>;
46
48
  }
47
49
 
48
50
  /**
@@ -134,6 +136,7 @@ export declare class ConfigNotFoundError extends Error {
134
136
  * Zod schema for the full configuration file.
135
137
  */
136
138
  declare const configSchema: z.ZodObject<{
139
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
137
140
  settings: z.ZodDefault<z.ZodObject<{
138
141
  attestationsPath: z.ZodDefault<z.ZodString>;
139
142
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -152,6 +155,7 @@ declare const configSchema: z.ZodObject<{
152
155
  }, z.ZodTypeAny, "passthrough">>>;
153
156
  suites: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
154
157
  command: z.ZodOptional<z.ZodString>;
158
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
159
  description: z.ZodOptional<z.ZodString>;
156
160
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
157
161
  ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -159,6 +163,7 @@ declare const configSchema: z.ZodObject<{
159
163
  packages: z.ZodArray<z.ZodString, "many">;
160
164
  }, "strict", z.ZodTypeAny, {
161
165
  command?: string | undefined;
166
+ depends_on?: string[] | undefined;
162
167
  description?: string | undefined;
163
168
  files?: string[] | undefined;
164
169
  ignore?: string[] | undefined;
@@ -166,6 +171,7 @@ declare const configSchema: z.ZodObject<{
166
171
  packages: string[];
167
172
  }, {
168
173
  command?: string | undefined;
174
+ depends_on?: string[] | undefined;
169
175
  description?: string | undefined;
170
176
  files?: string[] | undefined;
171
177
  ignore?: string[] | undefined;
@@ -173,6 +179,7 @@ declare const configSchema: z.ZodObject<{
173
179
  packages: string[];
174
180
  }>>, Record<string, {
175
181
  command?: string | undefined;
182
+ depends_on?: string[] | undefined;
176
183
  description?: string | undefined;
177
184
  files?: string[] | undefined;
178
185
  ignore?: string[] | undefined;
@@ -180,6 +187,7 @@ declare const configSchema: z.ZodObject<{
180
187
  packages: string[];
181
188
  }>, Record<string, {
182
189
  command?: string | undefined;
190
+ depends_on?: string[] | undefined;
183
191
  description?: string | undefined;
184
192
  files?: string[] | undefined;
185
193
  ignore?: string[] | undefined;
@@ -188,6 +196,7 @@ declare const configSchema: z.ZodObject<{
188
196
  }>>;
189
197
  version: z.ZodLiteral<1>;
190
198
  }, "strict", z.ZodTypeAny, {
199
+ groups?: Record<string, string[]> | undefined;
191
200
  settings: {
192
201
  attestationsPath: string;
193
202
  defaultCommand?: string | undefined;
@@ -196,6 +205,7 @@ declare const configSchema: z.ZodObject<{
196
205
  } & { [k: string]: unknown };
197
206
  suites: Record<string, {
198
207
  command?: string | undefined;
208
+ depends_on?: string[] | undefined;
199
209
  description?: string | undefined;
200
210
  files?: string[] | undefined;
201
211
  ignore?: string[] | undefined;
@@ -204,6 +214,7 @@ declare const configSchema: z.ZodObject<{
204
214
  }>;
205
215
  version: 1;
206
216
  }, {
217
+ groups?: Record<string, string[]> | undefined;
207
218
  settings?: undefined | z.objectInputType<{
208
219
  attestationsPath: z.ZodDefault<z.ZodString>;
209
220
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -212,6 +223,7 @@ declare const configSchema: z.ZodObject<{
212
223
  }, z.ZodTypeAny, "passthrough">;
213
224
  suites: Record<string, {
214
225
  command?: string | undefined;
226
+ depends_on?: string[] | undefined;
215
227
  description?: string | undefined;
216
228
  files?: string[] | undefined;
217
229
  ignore?: string[] | undefined;
@@ -531,6 +543,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
531
543
  command?: string;
532
544
  /** Other suite names that, when changed, invalidate this suite's attestation */
533
545
  invalidates?: string[];
546
+ /** Array of suite names this suite depends on */
547
+ depends_on?: string[];
534
548
  }
535
549
 
536
550
  /**
@@ -43,6 +43,8 @@ export declare interface AttestItConfig {
43
43
  settings: AttestItSettings;
44
44
  /** Named test suites with their configurations */
45
45
  suites: Record<string, SuiteConfig>;
46
+ /** Named groups of suites */
47
+ groups?: Record<string, string[]>;
46
48
  }
47
49
 
48
50
  /**
@@ -134,6 +136,7 @@ export declare class ConfigNotFoundError extends Error {
134
136
  * Zod schema for the full configuration file.
135
137
  */
136
138
  declare const configSchema: z.ZodObject<{
139
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
137
140
  settings: z.ZodDefault<z.ZodObject<{
138
141
  attestationsPath: z.ZodDefault<z.ZodString>;
139
142
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -152,6 +155,7 @@ declare const configSchema: z.ZodObject<{
152
155
  }, z.ZodTypeAny, "passthrough">>>;
153
156
  suites: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
154
157
  command: z.ZodOptional<z.ZodString>;
158
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
159
  description: z.ZodOptional<z.ZodString>;
156
160
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
157
161
  ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -159,6 +163,7 @@ declare const configSchema: z.ZodObject<{
159
163
  packages: z.ZodArray<z.ZodString, "many">;
160
164
  }, "strict", z.ZodTypeAny, {
161
165
  command?: string | undefined;
166
+ depends_on?: string[] | undefined;
162
167
  description?: string | undefined;
163
168
  files?: string[] | undefined;
164
169
  ignore?: string[] | undefined;
@@ -166,6 +171,7 @@ declare const configSchema: z.ZodObject<{
166
171
  packages: string[];
167
172
  }, {
168
173
  command?: string | undefined;
174
+ depends_on?: string[] | undefined;
169
175
  description?: string | undefined;
170
176
  files?: string[] | undefined;
171
177
  ignore?: string[] | undefined;
@@ -173,6 +179,7 @@ declare const configSchema: z.ZodObject<{
173
179
  packages: string[];
174
180
  }>>, Record<string, {
175
181
  command?: string | undefined;
182
+ depends_on?: string[] | undefined;
176
183
  description?: string | undefined;
177
184
  files?: string[] | undefined;
178
185
  ignore?: string[] | undefined;
@@ -180,6 +187,7 @@ declare const configSchema: z.ZodObject<{
180
187
  packages: string[];
181
188
  }>, Record<string, {
182
189
  command?: string | undefined;
190
+ depends_on?: string[] | undefined;
183
191
  description?: string | undefined;
184
192
  files?: string[] | undefined;
185
193
  ignore?: string[] | undefined;
@@ -188,6 +196,7 @@ declare const configSchema: z.ZodObject<{
188
196
  }>>;
189
197
  version: z.ZodLiteral<1>;
190
198
  }, "strict", z.ZodTypeAny, {
199
+ groups?: Record<string, string[]> | undefined;
191
200
  settings: {
192
201
  attestationsPath: string;
193
202
  defaultCommand?: string | undefined;
@@ -196,6 +205,7 @@ declare const configSchema: z.ZodObject<{
196
205
  } & { [k: string]: unknown };
197
206
  suites: Record<string, {
198
207
  command?: string | undefined;
208
+ depends_on?: string[] | undefined;
199
209
  description?: string | undefined;
200
210
  files?: string[] | undefined;
201
211
  ignore?: string[] | undefined;
@@ -204,6 +214,7 @@ declare const configSchema: z.ZodObject<{
204
214
  }>;
205
215
  version: 1;
206
216
  }, {
217
+ groups?: Record<string, string[]> | undefined;
207
218
  settings?: undefined | z.objectInputType<{
208
219
  attestationsPath: z.ZodDefault<z.ZodString>;
209
220
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -212,6 +223,7 @@ declare const configSchema: z.ZodObject<{
212
223
  }, z.ZodTypeAny, "passthrough">;
213
224
  suites: Record<string, {
214
225
  command?: string | undefined;
226
+ depends_on?: string[] | undefined;
215
227
  description?: string | undefined;
216
228
  files?: string[] | undefined;
217
229
  ignore?: string[] | undefined;
@@ -531,6 +543,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
531
543
  command?: string;
532
544
  /** Other suite names that, when changed, invalidate this suite's attestation */
533
545
  invalidates?: string[];
546
+ /** Array of suite names this suite depends on */
547
+ depends_on?: string[];
534
548
  }
535
549
 
536
550
  /**
@@ -43,6 +43,8 @@ export declare interface AttestItConfig {
43
43
  settings: AttestItSettings;
44
44
  /** Named test suites with their configurations */
45
45
  suites: Record<string, SuiteConfig>;
46
+ /** Named groups of suites */
47
+ groups?: Record<string, string[]>;
46
48
  }
47
49
 
48
50
  /**
@@ -134,6 +136,7 @@ export declare class ConfigNotFoundError extends Error {
134
136
  * Zod schema for the full configuration file.
135
137
  */
136
138
  declare const configSchema: z.ZodObject<{
139
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
137
140
  settings: z.ZodDefault<z.ZodObject<{
138
141
  attestationsPath: z.ZodDefault<z.ZodString>;
139
142
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -152,6 +155,7 @@ declare const configSchema: z.ZodObject<{
152
155
  }, z.ZodTypeAny, "passthrough">>>;
153
156
  suites: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
154
157
  command: z.ZodOptional<z.ZodString>;
158
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
159
  description: z.ZodOptional<z.ZodString>;
156
160
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
157
161
  ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -159,6 +163,7 @@ declare const configSchema: z.ZodObject<{
159
163
  packages: z.ZodArray<z.ZodString, "many">;
160
164
  }, "strict", z.ZodTypeAny, {
161
165
  command?: string | undefined;
166
+ depends_on?: string[] | undefined;
162
167
  description?: string | undefined;
163
168
  files?: string[] | undefined;
164
169
  ignore?: string[] | undefined;
@@ -166,6 +171,7 @@ declare const configSchema: z.ZodObject<{
166
171
  packages: string[];
167
172
  }, {
168
173
  command?: string | undefined;
174
+ depends_on?: string[] | undefined;
169
175
  description?: string | undefined;
170
176
  files?: string[] | undefined;
171
177
  ignore?: string[] | undefined;
@@ -173,6 +179,7 @@ declare const configSchema: z.ZodObject<{
173
179
  packages: string[];
174
180
  }>>, Record<string, {
175
181
  command?: string | undefined;
182
+ depends_on?: string[] | undefined;
176
183
  description?: string | undefined;
177
184
  files?: string[] | undefined;
178
185
  ignore?: string[] | undefined;
@@ -180,6 +187,7 @@ declare const configSchema: z.ZodObject<{
180
187
  packages: string[];
181
188
  }>, Record<string, {
182
189
  command?: string | undefined;
190
+ depends_on?: string[] | undefined;
183
191
  description?: string | undefined;
184
192
  files?: string[] | undefined;
185
193
  ignore?: string[] | undefined;
@@ -188,6 +196,7 @@ declare const configSchema: z.ZodObject<{
188
196
  }>>;
189
197
  version: z.ZodLiteral<1>;
190
198
  }, "strict", z.ZodTypeAny, {
199
+ groups?: Record<string, string[]> | undefined;
191
200
  settings: {
192
201
  attestationsPath: string;
193
202
  defaultCommand?: string | undefined;
@@ -196,6 +205,7 @@ declare const configSchema: z.ZodObject<{
196
205
  } & { [k: string]: unknown };
197
206
  suites: Record<string, {
198
207
  command?: string | undefined;
208
+ depends_on?: string[] | undefined;
199
209
  description?: string | undefined;
200
210
  files?: string[] | undefined;
201
211
  ignore?: string[] | undefined;
@@ -204,6 +214,7 @@ declare const configSchema: z.ZodObject<{
204
214
  }>;
205
215
  version: 1;
206
216
  }, {
217
+ groups?: Record<string, string[]> | undefined;
207
218
  settings?: undefined | z.objectInputType<{
208
219
  attestationsPath: z.ZodDefault<z.ZodString>;
209
220
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -212,6 +223,7 @@ declare const configSchema: z.ZodObject<{
212
223
  }, z.ZodTypeAny, "passthrough">;
213
224
  suites: Record<string, {
214
225
  command?: string | undefined;
226
+ depends_on?: string[] | undefined;
215
227
  description?: string | undefined;
216
228
  files?: string[] | undefined;
217
229
  ignore?: string[] | undefined;
@@ -531,6 +543,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
531
543
  command?: string;
532
544
  /** Other suite names that, when changed, invalidate this suite's attestation */
533
545
  invalidates?: string[];
546
+ /** Array of suite names this suite depends on */
547
+ depends_on?: string[];
534
548
  }
535
549
 
536
550
  /**
@@ -43,6 +43,8 @@ export declare interface AttestItConfig {
43
43
  settings: AttestItSettings;
44
44
  /** Named test suites with their configurations */
45
45
  suites: Record<string, SuiteConfig>;
46
+ /** Named groups of suites */
47
+ groups?: Record<string, string[]>;
46
48
  }
47
49
 
48
50
  /**
@@ -134,6 +136,7 @@ export declare class ConfigNotFoundError extends Error {
134
136
  * Zod schema for the full configuration file.
135
137
  */
136
138
  declare const configSchema: z.ZodObject<{
139
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
137
140
  settings: z.ZodDefault<z.ZodObject<{
138
141
  attestationsPath: z.ZodDefault<z.ZodString>;
139
142
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -152,6 +155,7 @@ declare const configSchema: z.ZodObject<{
152
155
  }, z.ZodTypeAny, "passthrough">>>;
153
156
  suites: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
154
157
  command: z.ZodOptional<z.ZodString>;
158
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
159
  description: z.ZodOptional<z.ZodString>;
156
160
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
157
161
  ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -159,6 +163,7 @@ declare const configSchema: z.ZodObject<{
159
163
  packages: z.ZodArray<z.ZodString, "many">;
160
164
  }, "strict", z.ZodTypeAny, {
161
165
  command?: string | undefined;
166
+ depends_on?: string[] | undefined;
162
167
  description?: string | undefined;
163
168
  files?: string[] | undefined;
164
169
  ignore?: string[] | undefined;
@@ -166,6 +171,7 @@ declare const configSchema: z.ZodObject<{
166
171
  packages: string[];
167
172
  }, {
168
173
  command?: string | undefined;
174
+ depends_on?: string[] | undefined;
169
175
  description?: string | undefined;
170
176
  files?: string[] | undefined;
171
177
  ignore?: string[] | undefined;
@@ -173,6 +179,7 @@ declare const configSchema: z.ZodObject<{
173
179
  packages: string[];
174
180
  }>>, Record<string, {
175
181
  command?: string | undefined;
182
+ depends_on?: string[] | undefined;
176
183
  description?: string | undefined;
177
184
  files?: string[] | undefined;
178
185
  ignore?: string[] | undefined;
@@ -180,6 +187,7 @@ declare const configSchema: z.ZodObject<{
180
187
  packages: string[];
181
188
  }>, Record<string, {
182
189
  command?: string | undefined;
190
+ depends_on?: string[] | undefined;
183
191
  description?: string | undefined;
184
192
  files?: string[] | undefined;
185
193
  ignore?: string[] | undefined;
@@ -188,6 +196,7 @@ declare const configSchema: z.ZodObject<{
188
196
  }>>;
189
197
  version: z.ZodLiteral<1>;
190
198
  }, "strict", z.ZodTypeAny, {
199
+ groups?: Record<string, string[]> | undefined;
191
200
  settings: {
192
201
  attestationsPath: string;
193
202
  defaultCommand?: string | undefined;
@@ -196,6 +205,7 @@ declare const configSchema: z.ZodObject<{
196
205
  } & { [k: string]: unknown };
197
206
  suites: Record<string, {
198
207
  command?: string | undefined;
208
+ depends_on?: string[] | undefined;
199
209
  description?: string | undefined;
200
210
  files?: string[] | undefined;
201
211
  ignore?: string[] | undefined;
@@ -204,6 +214,7 @@ declare const configSchema: z.ZodObject<{
204
214
  }>;
205
215
  version: 1;
206
216
  }, {
217
+ groups?: Record<string, string[]> | undefined;
207
218
  settings?: undefined | z.objectInputType<{
208
219
  attestationsPath: z.ZodDefault<z.ZodString>;
209
220
  defaultCommand: z.ZodOptional<z.ZodString>;
@@ -212,6 +223,7 @@ declare const configSchema: z.ZodObject<{
212
223
  }, z.ZodTypeAny, "passthrough">;
213
224
  suites: Record<string, {
214
225
  command?: string | undefined;
226
+ depends_on?: string[] | undefined;
215
227
  description?: string | undefined;
216
228
  files?: string[] | undefined;
217
229
  ignore?: string[] | undefined;
@@ -531,6 +543,8 @@ export declare function listPackageFiles(packages: string[], ignore?: string[],
531
543
  command?: string;
532
544
  /** Other suite names that, when changed, invalidate this suite's attestation */
533
545
  invalidates?: string[];
546
+ /** Array of suite names this suite depends on */
547
+ depends_on?: string[];
534
548
  }
535
549
 
536
550
  /**
package/dist/index.cjs CHANGED
@@ -272,14 +272,16 @@ var suiteSchema = zod.z.object({
272
272
  files: zod.z.array(zod.z.string().min(1, "File path cannot be empty")).optional(),
273
273
  ignore: zod.z.array(zod.z.string().min(1, "Ignore pattern cannot be empty")).optional(),
274
274
  command: zod.z.string().optional(),
275
- invalidates: zod.z.array(zod.z.string().min(1, "Invalidated suite name cannot be empty")).optional()
275
+ invalidates: zod.z.array(zod.z.string().min(1, "Invalidated suite name cannot be empty")).optional(),
276
+ depends_on: zod.z.array(zod.z.string().min(1, "Dependency suite name cannot be empty")).optional()
276
277
  }).strict();
277
278
  var configSchema = zod.z.object({
278
279
  version: zod.z.literal(1),
279
280
  settings: settingsSchema.default({}),
280
281
  suites: zod.z.record(zod.z.string(), suiteSchema).refine((suites) => Object.keys(suites).length >= 1, {
281
282
  message: "At least one suite must be defined"
282
- })
283
+ }),
284
+ groups: zod.z.record(zod.z.string(), zod.z.array(zod.z.string().min(1, "Suite name in group cannot be empty"))).optional()
283
285
  }).strict();
284
286
  var ConfigValidationError = class extends Error {
285
287
  constructor(message, issues) {
@@ -411,10 +413,12 @@ function toAttestItConfig(config) {
411
413
  ...suite.files !== void 0 && { files: suite.files },
412
414
  ...suite.ignore !== void 0 && { ignore: suite.ignore },
413
415
  ...suite.command !== void 0 && { command: suite.command },
414
- ...suite.invalidates !== void 0 && { invalidates: suite.invalidates }
416
+ ...suite.invalidates !== void 0 && { invalidates: suite.invalidates },
417
+ ...suite.depends_on !== void 0 && { depends_on: suite.depends_on }
415
418
  }
416
419
  ])
417
- )
420
+ ),
421
+ ...config.groups !== void 0 && { groups: config.groups }
418
422
  };
419
423
  }
420
424
  var LARGE_FILE_THRESHOLD = 50 * 1024 * 1024;