@@ -47,7 +47,7 @@ describe('get', () => {
47
47
. get ( {
48
48
headers : { authorization : `Bearer ${ apiToken } ` } ,
49
49
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 } ` ,
51
51
} )
52
52
. get ( {
53
53
response : new Response ( value ) ,
@@ -56,7 +56,7 @@ describe('get', () => {
56
56
. get ( {
57
57
headers : { authorization : `Bearer ${ apiToken } ` } ,
58
58
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 } ` ,
60
60
} )
61
61
. get ( {
62
62
response : new Response ( value ) ,
@@ -65,7 +65,7 @@ describe('get', () => {
65
65
. get ( {
66
66
headers : { authorization : `Bearer ${ apiToken } ` } ,
67
67
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 } ` ,
69
69
} )
70
70
. get ( {
71
71
response : new Response ( value ) ,
@@ -97,7 +97,7 @@ describe('get', () => {
97
97
. get ( {
98
98
headers : { authorization : `Bearer ${ apiToken } ` } ,
99
99
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 } ` ,
101
101
} )
102
102
. get ( {
103
103
response : new Response ( 'Something went wrong' , { status : 404 } ) ,
@@ -120,7 +120,7 @@ describe('get', () => {
120
120
const mockStore = new MockFetch ( ) . get ( {
121
121
headers : { authorization : `Bearer ${ apiToken } ` } ,
122
122
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 } ` ,
124
124
} )
125
125
126
126
globalThis . fetch = mockStore . fetch
@@ -142,7 +142,7 @@ describe('get', () => {
142
142
. get ( {
143
143
headers : { authorization : `Bearer ${ apiToken } ` } ,
144
144
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 } ` ,
146
146
} )
147
147
. get ( {
148
148
response : new Response ( 'Something went wrong' , { status : 401 } ) ,
@@ -361,7 +361,7 @@ describe('getMetadata', () => {
361
361
const mockStore = new MockFetch ( ) . head ( {
362
362
headers : { authorization : `Bearer ${ apiToken } ` } ,
363
363
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 } ` ,
365
365
} )
366
366
367
367
globalThis . fetch = mockStore . fetch
@@ -383,7 +383,7 @@ describe('getMetadata', () => {
383
383
const mockStore = new MockFetch ( ) . head ( {
384
384
headers : { authorization : `Bearer ${ apiToken } ` } ,
385
385
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 } ` ,
387
387
} )
388
388
389
389
globalThis . fetch = mockStore . fetch
@@ -406,7 +406,7 @@ describe('getMetadata', () => {
406
406
const mockStore = new MockFetch ( ) . head ( {
407
407
headers : { authorization : `Bearer ${ apiToken } ` } ,
408
408
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 } ` ,
410
410
} )
411
411
412
412
globalThis . fetch = mockStore . fetch
@@ -476,7 +476,7 @@ describe('getWithMetadata', () => {
476
476
. get ( {
477
477
headers : { authorization : `Bearer ${ apiToken } ` } ,
478
478
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 } ` ,
480
480
} )
481
481
. get ( {
482
482
response : new Response ( value , { headers : responseHeaders } ) ,
@@ -485,7 +485,7 @@ describe('getWithMetadata', () => {
485
485
. get ( {
486
486
headers : { authorization : `Bearer ${ apiToken } ` } ,
487
487
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 } ` ,
489
489
} )
490
490
. get ( {
491
491
response : new Response ( value , { headers : responseHeaders } ) ,
@@ -518,7 +518,7 @@ describe('getWithMetadata', () => {
518
518
. get ( {
519
519
headers : { authorization : `Bearer ${ apiToken } ` } ,
520
520
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 } ` ,
522
522
} )
523
523
. get ( {
524
524
response : new Response ( 'Something went wrong' , { status : 404 } ) ,
@@ -546,7 +546,7 @@ describe('getWithMetadata', () => {
546
546
. get ( {
547
547
headers : { authorization : `Bearer ${ apiToken } ` } ,
548
548
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 } ` ,
550
550
} )
551
551
. get ( {
552
552
response : new Response ( value , { headers : responseHeaders } ) ,
@@ -585,7 +585,7 @@ describe('getWithMetadata', () => {
585
585
. get ( {
586
586
headers : { authorization : `Bearer ${ apiToken } ` } ,
587
587
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 } ` ,
589
589
} )
590
590
. get ( {
591
591
headers : { 'if-none-match' : etags . wrong } ,
@@ -595,7 +595,7 @@ describe('getWithMetadata', () => {
595
595
. get ( {
596
596
headers : { authorization : `Bearer ${ apiToken } ` } ,
597
597
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 } ` ,
599
599
} )
600
600
. get ( {
601
601
headers : { 'if-none-match' : etags . right } ,
@@ -679,7 +679,7 @@ describe('set', () => {
679
679
. put ( {
680
680
headers : { authorization : `Bearer ${ apiToken } ` } ,
681
681
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 } ` ,
683
683
} )
684
684
. put ( {
685
685
body : value ,
@@ -690,7 +690,7 @@ describe('set', () => {
690
690
. put ( {
691
691
headers : { authorization : `Bearer ${ apiToken } ` } ,
692
692
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 } ` ,
694
694
} )
695
695
. put ( {
696
696
body : value ,
@@ -724,7 +724,7 @@ describe('set', () => {
724
724
. put ( {
725
725
headers : { authorization : `Bearer ${ apiToken } ` , 'netlify-blobs-metadata' : encodedMetadata } ,
726
726
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 } ` ,
728
728
} )
729
729
. put ( {
730
730
body : value ,
@@ -753,7 +753,7 @@ describe('set', () => {
753
753
const mockStore = new MockFetch ( ) . put ( {
754
754
headers : { authorization : `Bearer ${ apiToken } ` } ,
755
755
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 } ` ,
757
757
} )
758
758
759
759
globalThis . fetch = mockStore . fetch
@@ -795,7 +795,7 @@ describe('set', () => {
795
795
. put ( {
796
796
headers : { authorization : `Bearer ${ apiToken } ` } ,
797
797
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 } ` ,
799
799
} )
800
800
. put ( {
801
801
body : value ,
@@ -949,7 +949,7 @@ describe('setJSON', () => {
949
949
. put ( {
950
950
headers : { authorization : `Bearer ${ apiToken } ` } ,
951
951
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 } ` ,
953
953
} )
954
954
. put ( {
955
955
body : JSON . stringify ( { value } ) ,
@@ -1058,7 +1058,7 @@ describe('delete', () => {
1058
1058
. delete ( {
1059
1059
headers : { authorization : `Bearer ${ apiToken } ` } ,
1060
1060
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 } ` ,
1062
1062
} )
1063
1063
. delete ( {
1064
1064
response : new Response ( null ) ,
@@ -1067,7 +1067,7 @@ describe('delete', () => {
1067
1067
. delete ( {
1068
1068
headers : { authorization : `Bearer ${ apiToken } ` } ,
1069
1069
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 } ` ,
1071
1071
} )
1072
1072
. delete ( {
1073
1073
response : new Response ( null ) ,
@@ -1093,7 +1093,7 @@ describe('delete', () => {
1093
1093
. delete ( {
1094
1094
headers : { authorization : `Bearer ${ apiToken } ` } ,
1095
1095
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 } ` ,
1097
1097
} )
1098
1098
. delete ( {
1099
1099
response : new Response ( null , { status : 404 } ) ,
@@ -1117,7 +1117,7 @@ describe('delete', () => {
1117
1117
const mockStore = new MockFetch ( ) . delete ( {
1118
1118
headers : { authorization : `Bearer ${ apiToken } ` } ,
1119
1119
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 } ` ,
1121
1121
} )
1122
1122
1123
1123
globalThis . fetch = mockStore . fetch
@@ -1244,7 +1244,7 @@ describe('Deploy scope', () => {
1244
1244
. get ( {
1245
1245
headers : { authorization : `Bearer ${ apiToken } ` } ,
1246
1246
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 } ` ,
1248
1248
} )
1249
1249
. get ( {
1250
1250
response : new Response ( value ) ,
@@ -1253,7 +1253,7 @@ describe('Deploy scope', () => {
1253
1253
. get ( {
1254
1254
headers : { authorization : `Bearer ${ apiToken } ` } ,
1255
1255
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 } ` ,
1257
1257
} )
1258
1258
. get ( {
1259
1259
response : new Response ( value ) ,
@@ -1314,7 +1314,7 @@ describe('Deploy scope', () => {
1314
1314
. get ( {
1315
1315
headers : { authorization : `Bearer ${ apiToken } ` } ,
1316
1316
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 } ` ,
1318
1318
} )
1319
1319
. get ( {
1320
1320
response : new Response ( value ) ,
@@ -1323,7 +1323,7 @@ describe('Deploy scope', () => {
1323
1323
. get ( {
1324
1324
headers : { authorization : `Bearer ${ apiToken } ` } ,
1325
1325
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 } ` ,
1327
1327
} )
1328
1328
. get ( {
1329
1329
response : new Response ( value ) ,
0 commit comments