userDataSyncStoreService.ts ×6

Frontier kind: Code frontier

unlabeled · c_212bc96e5340

202 tests · 24529 LOC · 133 files · introduces 0 tests · 26 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges26 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3799 ranges24529 lines · 133 files · Browse complete extent
All tests (intent)
202 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 26 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/userDataSync/common/userDataSyncStoreService.ts 22 introduced LOC · 6 ranges

Open complete file

282
283 async deleteCollection(collection?: string, headers: IHeaders = {}): Promise<void> {
284 > if (!this.userDataSyncStoreUrl) { userDataSyncStoreService.ts
285 throw new Error('No settings sync store url configured.');
286 }
288 > const url = collection ? joinPath(this.userDataSyncStoreUrl, 'collection', collection).toString() : joinPath(this.userDataSyncStoreUrl, 'collection').toString();
289 > headers = { ...headers };
290 >
291 > await this.request(url, { type: 'DELETE', headers, callSite: 'userDataSync.deleteCollection' }, [], CancellationToken.None);
292 > }
293
294 // #endregion
336
337 async deleteResources(): Promise<void> {
338 > if (!this.userDataSyncStoreUrl) { userDataSyncStoreService.ts
339 throw new Error('No settings sync store url configured.');
340 }
342 > const url = joinPath(this.userDataSyncStoreUrl, 'resource').toString();
343 > const headers: IHeaders = { 'Content-Type': Mimes.text };
344 >
345 > await this.request(url, { type: 'DELETE', headers, callSite: 'userDataSync.deleteResources' }, [], CancellationToken.None);
346 > }
347
348 async readResource(resource: ServerResource, oldValue: IUserData | null, collection?: string, headers: IHeaders = {}): Promise<IUserData> {
462
463 async clear(): Promise<void> {
464 > if (!this.userDataSyncStoreUrl) { userDataSyncStoreService.ts
465 throw new Error('No settings sync store url configured.');
466 }
468 > await this.deleteCollection();
469 > await this.deleteResources();
470 >
471 > // clear cached session.
472 > this.clearSession();
473 > }
474
475 async getLatestData(headers: IHeaders = {}): Promise<IUserDataSyncLatestData | null> {
src/vs/platform/userDataSync/test/common/userDataSyncClient.ts 4 introduced LOC · 2 ranges

Open complete file

253 }
254 if (options.type === 'DELETE' && segments.length === 1 && segments[0] === 'resource') {
255 > return this.clear(options.headers); userDataSyncClient.ts
256 > }
257 if (options.type === 'DELETE' && segments[0] === 'collection') {
258 > return this.toResponse(204); userDataSyncClient.ts
259 > }
260 if (options.type === 'POST' && segments.length === 1 && segments[0] === 'collection') {
261 return this.createCollection();