attlaz-client 1.8.15 → 1.8.17
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/dist/Http/HttpClient.d.ts +1 -0
- package/dist/Http/HttpClient.js +1 -0
- package/dist/Model/Error/ClientError.js +3 -0
- package/dist/Model/Project/ProjectEnvironment.js +6 -1
- package/dist/Model/Storage/StorageItem.d.ts +1 -0
- package/dist/Model/Storage/StorageItem.js +2 -1
- package/dist/Model/Storage/StorageItemInformation.js +2 -2
- package/dist/Model/Worker/WorkerConfig.d.ts +1 -1
- package/dist/Model/Worker/WorkerConfig.js +1 -1
- package/dist/Service/StorageEndpoint.js +2 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare class HttpClient {
|
|
|
10
10
|
static HTTP_INTERNAL_SERVER_ERROR: number;
|
|
11
11
|
static HTTP_BAD_GATEWAY: number;
|
|
12
12
|
static HTTP_UNAVAILABLE: number;
|
|
13
|
+
static HTTP_TIMEOUT: number;
|
|
13
14
|
static request2(request: HttpClientRequest): Promise<HttpClientResponse>;
|
|
14
15
|
private static getContentType;
|
|
15
16
|
private static formatContentType;
|
package/dist/Http/HttpClient.js
CHANGED
|
@@ -80,6 +80,9 @@ class ClientError {
|
|
|
80
80
|
case 503:
|
|
81
81
|
return new ClientError('Service not available', HttpClient_1.HttpClient.HTTP_UNAVAILABLE);
|
|
82
82
|
break;
|
|
83
|
+
case 504:
|
|
84
|
+
return new ClientError('Gateway Time-out', HttpClient_1.HttpClient.HTTP_TIMEOUT);
|
|
85
|
+
break;
|
|
83
86
|
default:
|
|
84
87
|
console.error('Unknown status code "' + statusCode + '"', { code: statusCode, text: statusText });
|
|
85
88
|
return new ClientError('Status code ' + statusCode + ': ' + statusText, statusCode);
|
|
@@ -20,7 +20,12 @@ class ProjectEnvironment {
|
|
|
20
20
|
projectEnvironment.projectId = rawProjectEnvironment.projectId;
|
|
21
21
|
}
|
|
22
22
|
projectEnvironment.name = rawProjectEnvironment.name;
|
|
23
|
-
|
|
23
|
+
if (rawProjectEnvironment.sourceBranch !== undefined) {
|
|
24
|
+
projectEnvironment.sourceBranch = rawProjectEnvironment.sourceBranch;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
projectEnvironment.sourceBranch = rawProjectEnvironment.source_branch;
|
|
28
|
+
}
|
|
24
29
|
if (rawProjectEnvironment.parent !== undefined) {
|
|
25
30
|
projectEnvironment.parentId = rawProjectEnvironment.parent;
|
|
26
31
|
}
|
|
@@ -5,8 +5,9 @@ class StorageItem {
|
|
|
5
5
|
static parse(raw) {
|
|
6
6
|
let storageItem = new StorageItem();
|
|
7
7
|
storageItem.key = raw.key;
|
|
8
|
+
storageItem.bytes = raw.bytes;
|
|
8
9
|
storageItem.value = raw.value;
|
|
9
|
-
storageItem.expiration = new Date(raw.expiration);
|
|
10
|
+
storageItem.expiration = raw.expiration === null ? null : new Date(raw.expiration);
|
|
10
11
|
return storageItem;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -4,9 +4,9 @@ exports.StorageItemInformation = void 0;
|
|
|
4
4
|
class StorageItemInformation {
|
|
5
5
|
static parse(raw) {
|
|
6
6
|
let storageItemInformation = new StorageItemInformation();
|
|
7
|
-
storageItemInformation.key = raw.
|
|
7
|
+
storageItemInformation.key = raw.key;
|
|
8
8
|
storageItemInformation.bytes = raw.bytes;
|
|
9
|
-
storageItemInformation.expiration = new Date(raw.expiration);
|
|
9
|
+
storageItemInformation.expiration = raw.expiration === null ? null : new Date(raw.expiration);
|
|
10
10
|
return storageItemInformation;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -8,7 +8,7 @@ export declare class WorkerConfig {
|
|
|
8
8
|
static KEY_WORKER_VERSION: string;
|
|
9
9
|
static KEY_API_ENDPOINT: string;
|
|
10
10
|
static KEY_API_CLIENT_ID: string;
|
|
11
|
-
static
|
|
11
|
+
static KEY_API_CLIENT_SECRET: string;
|
|
12
12
|
projectEnvironment: string;
|
|
13
13
|
key: string;
|
|
14
14
|
value: DataValueValue | null;
|
|
@@ -20,4 +20,4 @@ WorkerConfig.KEY_PLATFORM = 'platform';
|
|
|
20
20
|
WorkerConfig.KEY_WORKER_VERSION = 'worker_version';
|
|
21
21
|
WorkerConfig.KEY_API_ENDPOINT = 'api_endpoint';
|
|
22
22
|
WorkerConfig.KEY_API_CLIENT_ID = 'api_client_id';
|
|
23
|
-
WorkerConfig.
|
|
23
|
+
WorkerConfig.KEY_API_CLIENT_SECRET = 'api_client_secret';
|
|
@@ -49,12 +49,10 @@ class StorageEndpoint extends Endpoint_1.Endpoint {
|
|
|
49
49
|
let cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + poolKey + '/items/' + storageItemKey;
|
|
50
50
|
try {
|
|
51
51
|
const result = await this.request(cmd, null, 'GET');
|
|
52
|
-
if (result.
|
|
52
|
+
if (!result.hasData()) {
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
return StorageItem_1.StorageItem.parse(result.getData());
|
|
57
|
-
}
|
|
55
|
+
return StorageItem_1.StorageItem.parse(result.getData());
|
|
58
56
|
}
|
|
59
57
|
catch (ex) {
|
|
60
58
|
if (this.httpClient.isDebugEnabled()) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.8.
|
|
1
|
+
export declare const VERSION = "1.8.17";
|
package/dist/version.js
CHANGED