@sanity/export 3.2.6-client-v5.17 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/export",
|
|
3
|
-
"version": "3.2.6
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "Export Sanity documents and assets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"archiver": "^5.0.0",
|
|
34
34
|
"debug": "^3.2.7",
|
|
35
|
-
"get-it": "^
|
|
35
|
+
"get-it": "^5.2.1",
|
|
36
36
|
"lodash": "^4.17.21",
|
|
37
37
|
"mississippi": "^4.0.0",
|
|
38
38
|
"p-queue": "^2.3.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "6d10609156909ca7add222b391aa4cfd191ce6d4"
|
|
52
52
|
}
|
|
@@ -2,12 +2,10 @@ const pkg = require('../package.json')
|
|
|
2
2
|
const requestStream = require('./requestStream')
|
|
3
3
|
|
|
4
4
|
module.exports = (client, dataset) => {
|
|
5
|
-
const {token, url: baseUrl} = client.config()
|
|
6
|
-
const apiUrl = baseUrl.replace(/\/+$/, '')
|
|
7
|
-
|
|
8
5
|
// Sanity client doesn't handle streams natively since we want to support node/browser
|
|
9
6
|
// with same API. We're just using it here to get hold of URLs and tokens.
|
|
10
|
-
const url =
|
|
7
|
+
const url = client.getUrl(`/data/export/${dataset}`)
|
|
8
|
+
const token = client.config().token
|
|
11
9
|
const headers = {
|
|
12
10
|
'User-Agent': `${pkg.name}@${pkg.version}`,
|
|
13
11
|
...(token ? {Authorization: `Bearer ${token}`} : {}),
|
package/src/requestStream.js
CHANGED
package/src/validateOptions.js
CHANGED