Skip to content

Commit 5316319

Browse files
authored
refactor: update-sysId-to-sysIds [TOL-1601] (#572)
* feat: refactor sys ids * fix: upgrade swc cli to fix compile error * chore: remove update validation logic * chore: update validation package * chore: add validation * chore: fix config type * fix: update tests * chore: add todo for duplicated function
1 parent f653b81 commit 5316319

File tree

9 files changed

+401
-146
lines changed

9 files changed

+401
-146
lines changed

packages/content-source-maps/src/__tests__/csm.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { vercelStegaDecode } from '@vercel/stega';
22
import jsonPointer from 'json-pointer';
3-
import { describe, test, expect } from 'vitest';
3+
import { describe, expect, test } from 'vitest';
44

5-
import { encodeGraphQLResponse } from '../encodeSourceMap.js';
65
import type { SourceMapMetadata } from '../encode.js';
6+
import { encodeGraphQLResponse } from '../encodeSourceMap.js';
77

88
type Mappings = Record<string, SourceMapMetadata | Record<string, SourceMapMetadata> | undefined>;
99

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"items": [
3+
{
4+
"__typename": "FooterMenu",
5+
"sys": {
6+
"id": "6c9tUMxxamKB9R7S16ne1X"
7+
},
8+
"menuItemsCollection": {
9+
"items": [
10+
{
11+
"groupName": "Products",
12+
"featuredPagesCollection": {
13+
"items": [
14+
{
15+
"__typename": "Page",
16+
"slug": "classic-card",
17+
"sys": {
18+
"id": "3Qnjx9WkvM4ZC44AIBDZwt"
19+
},
20+
"pageName": "Classic",
21+
"pageContent": {
22+
"__typename": "TopicProduct",
23+
"sys": {
24+
"id": "4iZO00YnKE8I8c90VIUuhN"
25+
}
26+
}
27+
},
28+
{
29+
"__typename": "Page",
30+
"slug": "black-card",
31+
"sys": {
32+
"id": "6LznwSwpmSWNCMwbgmtB2L"
33+
},
34+
"pageName": "Black",
35+
"pageContent": {
36+
"__typename": "TopicProduct",
37+
"sys": {
38+
"id": "5BfEkkNsrAGLLJQukwIjrJ"
39+
}
40+
}
41+
},
42+
{
43+
"__typename": "Page",
44+
"slug": "corporate-card",
45+
"sys": {
46+
"id": "jYxVlZPpqdeZs93jmpAlF"
47+
},
48+
"pageName": "Corporate",
49+
"pageContent": {
50+
"__typename": "TopicProduct",
51+
"sys": {
52+
"id": "2Jv15oYNaOUzyyJEp5P5z4"
53+
}
54+
}
55+
},
56+
{
57+
"__typename": "Page",
58+
"slug": "pricing",
59+
"sys": {
60+
"id": "2SKWtzmGOnQm80nRGIIclu"
61+
},
62+
"pageName": "Pricing",
63+
"pageContent": {
64+
"__typename": "ComponentProductTable",
65+
"sys": {
66+
"id": "5YZ9fKKF3Vg9bNV7x3Xl08"
67+
}
68+
}
69+
}
70+
]
71+
}
72+
},
73+
{
74+
"groupName": "Customers",
75+
"featuredPagesCollection": {
76+
"items": [
77+
{
78+
"__typename": "Page",
79+
"slug": "about-us33",
80+
"sys": {
81+
"id": "7wGhPNCZNLknpSaJVWfnHf"
82+
},
83+
"pageName": "About us",
84+
"pageContent": null
85+
}
86+
]
87+
}
88+
},
89+
{
90+
"groupName": "Company",
91+
"featuredPagesCollection": {
92+
"items": [
93+
{
94+
"__typename": "Page",
95+
"slug": "about-us33",
96+
"sys": {
97+
"id": "7wGhPNCZNLknpSaJVWfnHf"
98+
},
99+
"pageName": "About us",
100+
"pageContent": null
101+
},
102+
{
103+
"__typename": "Page",
104+
"slug": "this-should-be-updated",
105+
"sys": {
106+
"id": "7aKPwfpCJCy6mz7fefzNUi"
107+
},
108+
"pageName": "This should be updated",
109+
"pageContent": {
110+
"__typename": "TopicProduct",
111+
"sys": {
112+
"id": "6wuDj6hgz4SOQuiq6f8UzX"
113+
}
114+
}
115+
}
116+
]
117+
}
118+
}
119+
]
120+
},
121+
"legalLinks": {
122+
"featuredPagesCollection": {
123+
"items": [
124+
{
125+
"__typename": "Page",
126+
"slug": "accessibility",
127+
"sys": {
128+
"id": "4OSewDgF5UsbHVwRNIIILi"
129+
},
130+
"pageName": "Accessibility",
131+
"pageContent": {
132+
"__typename": "TopicBusinessInfo",
133+
"sys": {
134+
"id": "7evUFWi5oSKaGWo3ZHqiwq"
135+
}
136+
}
137+
}
138+
]
139+
}
140+
},
141+
"twitterLink": "https://twitter.com/",
142+
"facebookLink": "https://facebook.com/",
143+
"linkedinLink": "https://linkedin.com/",
144+
"instagramLink": "https://instagram.com/"
145+
}
146+
]
147+
}

0 commit comments

Comments
 (0)