attlaz-client 1.8.27 → 1.8.29
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/Model/Deployment/CodeSource.d.ts +2 -0
- package/dist/Model/Deployment/CodeSource.js +2 -0
- package/dist/Model/Project/ProjectDeploy.d.ts +1 -0
- package/dist/Model/Project/ProjectDeploy.js +1 -0
- package/dist/Model/Worker/PlatformImage.d.ts +1 -1
- package/dist/Service/SourcesAccountEndpoint.d.ts +2 -2
- package/dist/Service/SourcesAccountEndpoint.js +33 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,8 @@ class CodeSource {
|
|
|
8
8
|
codeSource.codeSourceAccountId = rawCodeSource.codeSourceAccountId;
|
|
9
9
|
codeSource.repository = rawCodeSource.repository;
|
|
10
10
|
codeSource.branch = rawCodeSource.branch;
|
|
11
|
+
codeSource.platformId = rawCodeSource.platformId;
|
|
12
|
+
codeSource.buildStrategyId = rawCodeSource.buildStrategyId;
|
|
11
13
|
return codeSource;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
@@ -14,6 +14,7 @@ class ProjectDeploy {
|
|
|
14
14
|
const projectDeploy = new ProjectDeploy();
|
|
15
15
|
projectDeploy.id = rawProjectDeploy.id.toString();
|
|
16
16
|
projectDeploy.platformId = rawProjectDeploy.platformId;
|
|
17
|
+
projectDeploy.buildStrategyId = rawProjectDeploy.buildStrategyId;
|
|
17
18
|
projectDeploy.userId = rawProjectDeploy.userId;
|
|
18
19
|
projectDeploy.requested = new Date(rawProjectDeploy.requested);
|
|
19
20
|
projectDeploy.started = new Date(rawProjectDeploy.started);
|
|
@@ -4,8 +4,8 @@ import { CodeSourceAccount } from '../Model/Deployment/CodeSourceAccount';
|
|
|
4
4
|
import { CodeSource } from '../Model/Deployment/CodeSource';
|
|
5
5
|
export declare class SourcesAccountEndpoint extends Endpoint {
|
|
6
6
|
getAllCodeSourceAccounts(): Promise<CodeSourceAccount[]>;
|
|
7
|
-
getCodeSourceAccountById(id: string): Promise<CodeSourceAccount>;
|
|
8
|
-
getCodeSourceById(id: string): Promise<CodeSource>;
|
|
7
|
+
getCodeSourceAccountById(id: string): Promise<CodeSourceAccount | null>;
|
|
8
|
+
getCodeSourceById(id: string): Promise<CodeSource | null>;
|
|
9
9
|
getRepositories(codeSourceAccountId: string): Promise<SourcesAccountRepository[]>;
|
|
10
10
|
getRepositoryBranches(codeSourceAccountId: string, repositoryKey: string): Promise<string[]>;
|
|
11
11
|
}
|
|
@@ -6,6 +6,7 @@ const SourcesAccountRepository_1 = require("../Model/SourcesAccountRepository");
|
|
|
6
6
|
const Utils_1 = require("../Utils");
|
|
7
7
|
const CodeSourceAccount_1 = require("../Model/Deployment/CodeSourceAccount");
|
|
8
8
|
const CodeSource_1 = require("../Model/Deployment/CodeSource");
|
|
9
|
+
const HttpClient_1 = require("../Http/HttpClient");
|
|
9
10
|
class SourcesAccountEndpoint extends Endpoint_1.Endpoint {
|
|
10
11
|
async getAllCodeSourceAccounts() {
|
|
11
12
|
const rawSourcesAccounts = await this.httpClient.request('codesourceaccounts');
|
|
@@ -16,8 +17,22 @@ class SourcesAccountEndpoint extends Endpoint_1.Endpoint {
|
|
|
16
17
|
return sourcesAccounts;
|
|
17
18
|
}
|
|
18
19
|
async getCodeSourceAccountById(id) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
try {
|
|
21
|
+
const rawSourcesAccounts = await this.httpClient.request('codesourceaccounts/' + id);
|
|
22
|
+
if (rawSourcesAccounts === null) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return CodeSourceAccount_1.CodeSourceAccount.parse(rawSourcesAccounts);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error.code === HttpClient_1.HttpClient.HTTP_NOTFOUND) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
32
|
+
console.error('Failed to load code source account by id', error);
|
|
33
|
+
}
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
21
36
|
// let sourcesAccounts: CodeSourceAccount[] = [];
|
|
22
37
|
// for (let rawSourcesAccount of rawSourcesAccounts) {
|
|
23
38
|
// sourcesAccounts.push(CodeSourceAccount.parse(rawSourcesAccount));
|
|
@@ -25,8 +40,22 @@ class SourcesAccountEndpoint extends Endpoint_1.Endpoint {
|
|
|
25
40
|
// return sourcesAccounts;
|
|
26
41
|
}
|
|
27
42
|
async getCodeSourceById(id) {
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
try {
|
|
44
|
+
const rawCodeSource = await this.httpClient.request('codesources/' + id);
|
|
45
|
+
if (rawCodeSource === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return CodeSource_1.CodeSource.parse(rawCodeSource);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error.code === HttpClient_1.HttpClient.HTTP_NOTFOUND) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
55
|
+
console.error('Failed to load code source by id', error);
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
30
59
|
}
|
|
31
60
|
async getRepositories(codeSourceAccountId) {
|
|
32
61
|
const rawSourcesAccountRepositories = await this.httpClient.request('codesourceaccounts/' + codeSourceAccountId + '/repositories');
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.8.
|
|
1
|
+
export declare const VERSION = "1.8.29";
|
package/dist/version.js
CHANGED