Skip to content

Commit 612741b

Browse files
authored
Merge pull request #515 from GSA/1790-expose-tooling-scan
1790: Expose Tooling Scan Results
2 parents 44b2efd + 6847b5f commit 612741b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

entities/core-result.entity.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,17 @@ export class CoreResult {
507507
@Expose({ name: 'www_same' })
508508
wwwSame?: boolean;
509509

510+
@Column({ nullable: true })
511+
@Expose({ name: 'tooling' })
512+
@Transform(({ value }: { value: string }) => {
513+
if (value) {
514+
return value.split(',');
515+
} else {
516+
return null;
517+
}
518+
})
519+
tooling?: string;
520+
510521
// Experimental fields #1368 Feb 2025
511522
@Column({ nullable: true })
512523
@Expose({ name: 'dc_date_content' })
@@ -538,18 +549,6 @@ export class CoreResult {
538549
@Exclude()
539550
dateContent?: string;
540551

541-
@Column({ nullable: true })
542-
@Expose({ name: 'tooling' })
543-
@Exclude()
544-
@Transform(({ value }: { value: string }) => {
545-
if (value) {
546-
return value.split(',');
547-
} else {
548-
return null;
549-
}
550-
})
551-
tooling?: string;
552-
553552
static getColumnNames(): string[] {
554553
// return class-transformer version of column names
555554
return Object.keys(classToPlain(new CoreResult()));
@@ -604,6 +603,7 @@ export class CoreResult {
604603
'third_party_service_urls',
605604
'third_party_service_count',
606605
'cookie_domains',
606+
'tooling',
607607
'viewport_meta_tag',
608608
'cumulative_layout_shift',
609609
'largest_contentful_paint',

libs/snapshot/src/serializers/json-serializer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('JsonSerializer', () => {
1111

1212
const result = await serializer.serialize([website]);
1313
const expectedResult =
14-
'[{"source_list":null,"login":null,"third_party_service_domains":null,"third_party_service_urls":null,"cookie_domains":null,"required_links_url":null,"required_links_text":null,"robots_txt_sitemap_locations":null,"uswds_usa_class_list":null}]';
14+
'[{"source_list":null,"login":null,"third_party_service_domains":null,"third_party_service_urls":null,"cookie_domains":null,"tooling":null,"required_links_url":null,"required_links_text":null,"robots_txt_sitemap_locations":null,"uswds_usa_class_list":null}]';
1515

1616
expect(result).toEqual(expectedResult);
1717
});

0 commit comments

Comments
 (0)