attlaz-client 1.8.24 → 1.8.26
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/Project/ProjectDeploy.d.ts +2 -2
- package/dist/Model/Project/ProjectDeploy.js +2 -1
- package/dist/Model/Project/ProjectEnvironment.js +1 -1
- package/dist/Service/ProjectEnvironmentEndpoint.spec.d.ts +1 -0
- package/dist/Service/ProjectEnvironmentEndpoint.spec.js +19 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,7 @@ import { ProjectDeployStatus } from './ProjectDeployStatus';
|
|
|
2
2
|
import { ProjectDeployCommit } from './ProjectDeployCommit';
|
|
3
3
|
export declare class ProjectDeploy {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
6
|
-
projectEnvironmentId: string;
|
|
5
|
+
platformId: string;
|
|
7
6
|
userId: string;
|
|
8
7
|
requested: Date;
|
|
9
8
|
started: Date;
|
|
@@ -11,6 +10,7 @@ export declare class ProjectDeploy {
|
|
|
11
10
|
status: ProjectDeployStatus;
|
|
12
11
|
bytes: number;
|
|
13
12
|
commits: ProjectDeployCommit[];
|
|
13
|
+
path: string;
|
|
14
14
|
commitHash: string;
|
|
15
15
|
errors: {
|
|
16
16
|
message: string;
|
|
@@ -13,7 +13,7 @@ class ProjectDeploy {
|
|
|
13
13
|
static parse(rawProjectDeploy) {
|
|
14
14
|
const projectDeploy = new ProjectDeploy();
|
|
15
15
|
projectDeploy.id = rawProjectDeploy.id.toString();
|
|
16
|
-
projectDeploy.
|
|
16
|
+
projectDeploy.platformId = rawProjectDeploy.platformId;
|
|
17
17
|
projectDeploy.userId = rawProjectDeploy.userId;
|
|
18
18
|
projectDeploy.requested = new Date(rawProjectDeploy.requested);
|
|
19
19
|
projectDeploy.started = new Date(rawProjectDeploy.started);
|
|
@@ -22,6 +22,7 @@ class ProjectDeploy {
|
|
|
22
22
|
if (!Utils_1.Utils.isNullOrUndefined(rawProjectDeploy.bytes)) {
|
|
23
23
|
projectDeploy.bytes = parseInt(rawProjectDeploy.bytes);
|
|
24
24
|
}
|
|
25
|
+
projectDeploy.path = rawProjectDeploy.path;
|
|
25
26
|
projectDeploy.commitHash = rawProjectDeploy.commit_hash;
|
|
26
27
|
const rawProjectDeployCommits = rawProjectDeploy.commits;
|
|
27
28
|
for (let rawProjectDeployCommit of rawProjectDeployCommits) {
|
|
@@ -12,7 +12,7 @@ class ProjectEnvironment {
|
|
|
12
12
|
}
|
|
13
13
|
static parse(rawProjectEnvironment) {
|
|
14
14
|
const projectEnvironment = new ProjectEnvironment();
|
|
15
|
-
projectEnvironment.id = rawProjectEnvironment.id;
|
|
15
|
+
projectEnvironment.id = rawProjectEnvironment.id.toString();
|
|
16
16
|
projectEnvironment.key = rawProjectEnvironment.key;
|
|
17
17
|
if (rawProjectEnvironment.project !== undefined) {
|
|
18
18
|
projectEnvironment.projectId = rawProjectEnvironment.project;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Client_1 = require("../Client");
|
|
4
|
+
jest.setTimeout((60) * 1000);
|
|
5
|
+
const apiEndpoint = 'http://localhost:5728/';
|
|
6
|
+
// const apiEndpoint: string = 'https://api2.attlaz.com';
|
|
7
|
+
const clientCredentialClientId = 'zSGdVWE3FAS8kY5C';
|
|
8
|
+
const clientCredentialClientSecret = '6jhYgFPAUm9HmCus';
|
|
9
|
+
test('Test get project environment', async () => {
|
|
10
|
+
expect.assertions(3);
|
|
11
|
+
let client = new Client_1.Client(apiEndpoint, clientCredentialClientId, clientCredentialClientSecret);
|
|
12
|
+
client.getHttpClient().enableDebug();
|
|
13
|
+
await client.authenticate();
|
|
14
|
+
const existingProjectEnvironment = await client.getProjectEnvironmentEndpoint().getById('11');
|
|
15
|
+
expect(existingProjectEnvironment).not.toBeNull();
|
|
16
|
+
expect(existingProjectEnvironment === null || existingProjectEnvironment === void 0 ? void 0 : existingProjectEnvironment.id).toBe('11');
|
|
17
|
+
const nonExistingProjectDeploy = await client.getProjectEnvironmentEndpoint().getById('random');
|
|
18
|
+
expect(nonExistingProjectDeploy).toBeNull();
|
|
19
|
+
});
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.8.
|
|
1
|
+
export declare const VERSION = "1.8.26";
|
package/dist/version.js
CHANGED