@@ -47,7 +47,7 @@ describe('get', () => {
4747 . get ( {
4848 headers : { authorization : `Bearer ${ apiToken } ` } ,
4949 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
50- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
50+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
5151 } )
5252 . get ( {
5353 response : new Response ( value ) ,
@@ -56,7 +56,7 @@ describe('get', () => {
5656 . get ( {
5757 headers : { authorization : `Bearer ${ apiToken } ` } ,
5858 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
59- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
59+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
6060 } )
6161 . get ( {
6262 response : new Response ( value ) ,
@@ -65,7 +65,7 @@ describe('get', () => {
6565 . get ( {
6666 headers : { authorization : `Bearer ${ apiToken } ` } ,
6767 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
68- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ complexKey } ?context=production ` ,
68+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ complexKey } ` ,
6969 } )
7070 . get ( {
7171 response : new Response ( value ) ,
@@ -97,7 +97,7 @@ describe('get', () => {
9797 . get ( {
9898 headers : { authorization : `Bearer ${ apiToken } ` } ,
9999 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
100- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
100+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
101101 } )
102102 . get ( {
103103 response : new Response ( 'Something went wrong' , { status : 404 } ) ,
@@ -120,7 +120,7 @@ describe('get', () => {
120120 const mockStore = new MockFetch ( ) . get ( {
121121 headers : { authorization : `Bearer ${ apiToken } ` } ,
122122 response : new Response ( null , { status : 401 } ) ,
123- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
123+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
124124 } )
125125
126126 globalThis . fetch = mockStore . fetch
@@ -142,7 +142,7 @@ describe('get', () => {
142142 . get ( {
143143 headers : { authorization : `Bearer ${ apiToken } ` } ,
144144 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
145- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
145+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
146146 } )
147147 . get ( {
148148 response : new Response ( 'Something went wrong' , { status : 401 } ) ,
@@ -361,7 +361,7 @@ describe('getMetadata', () => {
361361 const mockStore = new MockFetch ( ) . head ( {
362362 headers : { authorization : `Bearer ${ apiToken } ` } ,
363363 response : new Response ( null , { headers } ) ,
364- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
364+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
365365 } )
366366
367367 globalThis . fetch = mockStore . fetch
@@ -383,7 +383,7 @@ describe('getMetadata', () => {
383383 const mockStore = new MockFetch ( ) . head ( {
384384 headers : { authorization : `Bearer ${ apiToken } ` } ,
385385 response : new Response ( null , { status : 404 } ) ,
386- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
386+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
387387 } )
388388
389389 globalThis . fetch = mockStore . fetch
@@ -406,7 +406,7 @@ describe('getMetadata', () => {
406406 const mockStore = new MockFetch ( ) . head ( {
407407 headers : { authorization : `Bearer ${ apiToken } ` } ,
408408 response : new Response ( null , { headers } ) ,
409- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
409+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
410410 } )
411411
412412 globalThis . fetch = mockStore . fetch
@@ -476,7 +476,7 @@ describe('getWithMetadata', () => {
476476 . get ( {
477477 headers : { authorization : `Bearer ${ apiToken } ` } ,
478478 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
479- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
479+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
480480 } )
481481 . get ( {
482482 response : new Response ( value , { headers : responseHeaders } ) ,
@@ -485,7 +485,7 @@ describe('getWithMetadata', () => {
485485 . get ( {
486486 headers : { authorization : `Bearer ${ apiToken } ` } ,
487487 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
488- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
488+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
489489 } )
490490 . get ( {
491491 response : new Response ( value , { headers : responseHeaders } ) ,
@@ -518,7 +518,7 @@ describe('getWithMetadata', () => {
518518 . get ( {
519519 headers : { authorization : `Bearer ${ apiToken } ` } ,
520520 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
521- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
521+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
522522 } )
523523 . get ( {
524524 response : new Response ( 'Something went wrong' , { status : 404 } ) ,
@@ -546,7 +546,7 @@ describe('getWithMetadata', () => {
546546 . get ( {
547547 headers : { authorization : `Bearer ${ apiToken } ` } ,
548548 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
549- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
549+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
550550 } )
551551 . get ( {
552552 response : new Response ( value , { headers : responseHeaders } ) ,
@@ -585,7 +585,7 @@ describe('getWithMetadata', () => {
585585 . get ( {
586586 headers : { authorization : `Bearer ${ apiToken } ` } ,
587587 response : new Response ( JSON . stringify ( { url : `${ signedURL } b` } ) ) ,
588- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
588+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
589589 } )
590590 . get ( {
591591 headers : { 'if-none-match' : etags . wrong } ,
@@ -595,7 +595,7 @@ describe('getWithMetadata', () => {
595595 . get ( {
596596 headers : { authorization : `Bearer ${ apiToken } ` } ,
597597 response : new Response ( JSON . stringify ( { url : `${ signedURL } a` } ) ) ,
598- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
598+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
599599 } )
600600 . get ( {
601601 headers : { 'if-none-match' : etags . right } ,
@@ -679,7 +679,7 @@ describe('set', () => {
679679 . put ( {
680680 headers : { authorization : `Bearer ${ apiToken } ` } ,
681681 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
682- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
682+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
683683 } )
684684 . put ( {
685685 body : value ,
@@ -690,7 +690,7 @@ describe('set', () => {
690690 . put ( {
691691 headers : { authorization : `Bearer ${ apiToken } ` } ,
692692 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
693- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ complexKey } ?context=production ` ,
693+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ complexKey } ` ,
694694 } )
695695 . put ( {
696696 body : value ,
@@ -724,7 +724,7 @@ describe('set', () => {
724724 . put ( {
725725 headers : { authorization : `Bearer ${ apiToken } ` , 'netlify-blobs-metadata' : encodedMetadata } ,
726726 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
727- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
727+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
728728 } )
729729 . put ( {
730730 body : value ,
@@ -753,7 +753,7 @@ describe('set', () => {
753753 const mockStore = new MockFetch ( ) . put ( {
754754 headers : { authorization : `Bearer ${ apiToken } ` } ,
755755 response : new Response ( null , { status : 401 } ) ,
756- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
756+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
757757 } )
758758
759759 globalThis . fetch = mockStore . fetch
@@ -795,7 +795,7 @@ describe('set', () => {
795795 . put ( {
796796 headers : { authorization : `Bearer ${ apiToken } ` } ,
797797 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
798- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
798+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
799799 } )
800800 . put ( {
801801 body : value ,
@@ -949,7 +949,7 @@ describe('setJSON', () => {
949949 . put ( {
950950 headers : { authorization : `Bearer ${ apiToken } ` } ,
951951 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
952- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
952+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
953953 } )
954954 . put ( {
955955 body : JSON . stringify ( { value } ) ,
@@ -1058,7 +1058,7 @@ describe('delete', () => {
10581058 . delete ( {
10591059 headers : { authorization : `Bearer ${ apiToken } ` } ,
10601060 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1061- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
1061+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
10621062 } )
10631063 . delete ( {
10641064 response : new Response ( null ) ,
@@ -1067,7 +1067,7 @@ describe('delete', () => {
10671067 . delete ( {
10681068 headers : { authorization : `Bearer ${ apiToken } ` } ,
10691069 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1070- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ complexKey } ?context=production ` ,
1070+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ complexKey } ` ,
10711071 } )
10721072 . delete ( {
10731073 response : new Response ( null ) ,
@@ -1093,7 +1093,7 @@ describe('delete', () => {
10931093 . delete ( {
10941094 headers : { authorization : `Bearer ${ apiToken } ` } ,
10951095 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1096- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
1096+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
10971097 } )
10981098 . delete ( {
10991099 response : new Response ( null , { status : 404 } ) ,
@@ -1117,7 +1117,7 @@ describe('delete', () => {
11171117 const mockStore = new MockFetch ( ) . delete ( {
11181118 headers : { authorization : `Bearer ${ apiToken } ` } ,
11191119 response : new Response ( null , { status : 401 } ) ,
1120- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs /${ key } ?context=production ` ,
1120+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /production /${ key } ` ,
11211121 } )
11221122
11231123 globalThis . fetch = mockStore . fetch
@@ -1244,7 +1244,7 @@ describe('Deploy scope', () => {
12441244 . get ( {
12451245 headers : { authorization : `Bearer ${ apiToken } ` } ,
12461246 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1247- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs/ ${ key } ?context=deploy%3A ${ deployID } ` ,
1247+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /deploy: ${ deployID } / ${ key } ` ,
12481248 } )
12491249 . get ( {
12501250 response : new Response ( value ) ,
@@ -1253,7 +1253,7 @@ describe('Deploy scope', () => {
12531253 . get ( {
12541254 headers : { authorization : `Bearer ${ apiToken } ` } ,
12551255 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1256- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs/ ${ key } ?context=deploy%3A ${ deployID } ` ,
1256+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /deploy: ${ deployID } / ${ key } ` ,
12571257 } )
12581258 . get ( {
12591259 response : new Response ( value ) ,
@@ -1314,7 +1314,7 @@ describe('Deploy scope', () => {
13141314 . get ( {
13151315 headers : { authorization : `Bearer ${ apiToken } ` } ,
13161316 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1317- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs/ ${ key } ?context=deploy%3A ${ deployID } ` ,
1317+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /deploy: ${ deployID } / ${ key } ` ,
13181318 } )
13191319 . get ( {
13201320 response : new Response ( value ) ,
@@ -1323,7 +1323,7 @@ describe('Deploy scope', () => {
13231323 . get ( {
13241324 headers : { authorization : `Bearer ${ apiToken } ` } ,
13251325 response : new Response ( JSON . stringify ( { url : signedURL } ) ) ,
1326- url : `https://api.netlify.com/api/v1/sites /${ siteID } /blobs/ ${ key } ?context=deploy%3A ${ deployID } ` ,
1326+ url : `https://api.netlify.com/api/v1/blobs /${ siteID } /deploy: ${ deployID } / ${ key } ` ,
13271327 } )
13281328 . get ( {
13291329 response : new Response ( value ) ,
0 commit comments