@taskcluster/client 99.2.0 → 100.0.1
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 +3 -3
- package/src/apis.js +1 -1
- package/src/client.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskcluster/client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "100.0.1",
|
|
4
4
|
"author": "Jonas Finnemann Jensen <jopsen@gmail.com>",
|
|
5
5
|
"description": "Client for interfacing taskcluster components",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"debug": "^4.1.1",
|
|
14
|
-
"got": "^
|
|
14
|
+
"got": "^15.0.3",
|
|
15
15
|
"hawk": "^9.0.1",
|
|
16
16
|
"lodash": "^4.17.4",
|
|
17
17
|
"slugid": "^5.0.1",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"http-proxy": "^1.18.0",
|
|
22
22
|
"mocha": "^11.7.1",
|
|
23
|
-
"nock": "^
|
|
23
|
+
"nock": "^14.0.13"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": "24.15.0"
|
package/src/apis.js
CHANGED
|
@@ -2219,7 +2219,7 @@ export default {
|
|
|
2219
2219
|
"reference": {
|
|
2220
2220
|
"$schema": "/schemas/common/api-reference-v0.json#",
|
|
2221
2221
|
"apiVersion": "v1",
|
|
2222
|
-
"description": "The queue service is responsible for accepting tasks and tracking their state\nas they are executed by workers, in order to ensure they are eventually\nresolved.\n\n## Artifact Storage Types\n\n* **Object artifacts** contain arbitrary data, stored via the object service.\n* **Redirect artifacts**, will redirect the caller to URL when fetched\nwith a a 303 (See Other) response. Clients will not apply any kind of\nauthentication to that URL.\n* **Link artifacts**, will be treated as if the caller requested the linked\nartifact on the same task. Links may be chained, but cycles are forbidden.\nThe caller must have scopes for the linked artifact, or a 403 response will\nbe returned.\n* **Error artifacts**, only consists of meta-data which the queue will\nstore for you. These artifacts are only meant to indicate that you the\nworker or the task failed to generate a specific artifact, that you\nwould otherwise have uploaded. For example
|
|
2222
|
+
"description": "The queue service is responsible for accepting tasks and tracking their state\nas they are executed by workers, in order to ensure they are eventually\nresolved.\n\n## Artifact Storage Types\n\n* **Object artifacts** contain arbitrary data, stored via the object service.\n* **Redirect artifacts**, will redirect the caller to URL when fetched\nwith a a 303 (See Other) response. Clients will not apply any kind of\nauthentication to that URL.\n* **Link artifacts**, will be treated as if the caller requested the linked\nartifact on the same task. Links may be chained, but cycles are forbidden.\nThe caller must have scopes for the linked artifact, or a 403 response will\nbe returned.\n* **Error artifacts**, only consists of meta-data which the queue will\nstore for you. These artifacts are only meant to indicate that you the\nworker or the task failed to generate a specific artifact, that you\nwould otherwise have uploaded. For example generic-worker will upload an\nerror artifact, if the file it was supposed to upload doesn't exists or\nturns out to be a directory. Clients requesting an error artifact will\nget a `424` (Failed Dependency) response. This is mainly designed to\nensure that dependent tasks can distinguish between artifacts that were\nsuppose to be generated and artifacts for which the name is misspelled.\n* **S3 artifacts** are used for static files which will be\nstored on S3. When creating an S3 artifact the queue will return a\npre-signed URL to which you can do a `PUT` request to upload your\nartifact. Note that `PUT` request **must** specify the `content-length`\nheader and **must** give the `content-type` header the same value as in\nthe request to `createArtifact`. S3 artifacts will be deprecated soon,\nand users should prefer object artifacts instead.\n\n## Artifact immutability\n\nGenerally speaking you cannot overwrite an artifact when created.\nBut if you repeat the request with the same properties the request will\nsucceed as the operation is idempotent.\nThis is useful if you need to refresh a signed URL while uploading.\nDo not abuse this to overwrite artifacts created by another entity!\nSuch as worker-host overwriting artifact created by worker-code.\n\nThe queue defines the following *immutability special cases*:\n\n* A `reference` artifact can replace an existing `reference` artifact.\n* A `link` artifact can replace an existing `reference` artifact.\n* Any artifact's `expires` can be extended (made later, but not earlier).",
|
|
2223
2223
|
"entries": [
|
|
2224
2224
|
{
|
|
2225
2225
|
"args": [
|
package/src/client.js
CHANGED
|
@@ -117,8 +117,8 @@ export const makeRequest = async function(client, method, url, payload, query) {
|
|
|
117
117
|
hooks: {
|
|
118
118
|
afterResponse: [res => {
|
|
119
119
|
// parse the body, if one was given (Got's `responseType: json` fails to check content-type)
|
|
120
|
-
if (res.
|
|
121
|
-
res.body = JSON.parse(res.
|
|
120
|
+
if (res.body && (res.headers['content-type'] || '').startsWith('application/json')) {
|
|
121
|
+
res.body = JSON.parse(res.body);
|
|
122
122
|
}
|
|
123
123
|
return res;
|
|
124
124
|
}],
|