attlaz-client 1.9.11 → 1.9.13

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.
@@ -11,9 +11,6 @@ class FlowRunSummary extends FlowRun_1.FlowRun {
11
11
  }
12
12
  static parse(rawTaskExecutionSummary) {
13
13
  let taskExecutionSummary = FlowRun_1.FlowRun.parse(rawTaskExecutionSummary);
14
- if (rawTaskExecutionSummary.time === null || rawTaskExecutionSummary.time === undefined) {
15
- throw new Error('Task execution time cannot be empty');
16
- }
17
14
  taskExecutionSummary.time = Utils_1.Utils.parseRawDate(rawTaskExecutionSummary.time);
18
15
  taskExecutionSummary.runDuration = rawTaskExecutionSummary.run_duration;
19
16
  taskExecutionSummary.pendingDuration = rawTaskExecutionSummary.pending_duration;
@@ -16,7 +16,7 @@ class FlowSummary extends Flow_1.Flow {
16
16
  static parse(rawTask) {
17
17
  let task = Flow_1.Flow.parse(rawTask);
18
18
  task.status = FlowRunStatus_1.FlowRunStatus.fromString(rawTask.status);
19
- task.latestRun = Utils_1.Utils.parseRawDate(rawTask.latest_run);
19
+ task.latestRun = rawTask.latest_run === null ? null : Utils_1.Utils.parseRawDate(rawTask.latest_run);
20
20
  task.averageRunDuration = rawTask.average_run_duration;
21
21
  task.averagePendingDuration = rawTask.average_pending_duration;
22
22
  task.runCount = rawTask.run_count;
@@ -29,7 +29,7 @@ class ProjectDeploy {
29
29
  projectDeployCommit.date = new Date(rawProjectDeployCommit.commit_date);
30
30
  projectDeployCommit.message = rawProjectDeployCommit.commit_message;
31
31
  projectDeployCommit.authorName = rawProjectDeployCommit.commit_author_name;
32
- projectDeployCommit.authorMail = rawProjectDeployCommit.commit_author_email;
32
+ projectDeployCommit.authorEmail = rawProjectDeployCommit.commit_author_email;
33
33
  projectDeploy.commits.push(projectDeployCommit);
34
34
  }
35
35
  projectDeploy.errors = rawProjectDeploy.errors;
@@ -3,5 +3,5 @@ export declare class ProjectDeployCommit {
3
3
  date: Date;
4
4
  message: string;
5
5
  authorName: string;
6
- authorMail: string;
6
+ authorEmail: string;
7
7
  }
@@ -1,3 +1,3 @@
1
1
  export declare class ObjectWrapper {
2
- static wrap<T>(raw: T): T;
2
+ static wrap<T>(raw: T, strict?: boolean): T;
3
3
  }
@@ -2,12 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ObjectWrapper = void 0;
4
4
  class ObjectWrapper {
5
- static wrap(raw) {
5
+ static wrap(raw, strict = false) {
6
6
  const handler = {
7
7
  get(target, property, receiver) {
8
8
  const value = target[property];
9
9
  if (value === undefined) {
10
- throw new Error('Property "' + property + '" does not exist');
10
+ if (strict) {
11
+ throw new Error('Property "' + property + '" does not exist');
12
+ }
13
+ else {
14
+ console.error('Property "' + property + '" does not exist', { object: raw });
15
+ }
11
16
  }
12
17
  return value;
13
18
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.9.11",
3
+ "version": "1.9.13",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",