airbyte-faros-destination 0.2.10 → 0.2.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.
Files changed (44) hide show
  1. package/lib/converters/gitlab/branches.d.ts +1 -1
  2. package/lib/converters/gitlab/branches.js +3 -3
  3. package/lib/converters/gitlab/commits.d.ts +1 -1
  4. package/lib/converters/gitlab/commits.js +3 -3
  5. package/lib/converters/{common/gitlab.d.ts → gitlab/common.d.ts} +0 -0
  6. package/lib/converters/{common/gitlab.js → gitlab/common.js} +0 -0
  7. package/lib/converters/gitlab/group_labels.d.ts +1 -1
  8. package/lib/converters/gitlab/group_labels.js +2 -2
  9. package/lib/converters/gitlab/group_milestones.d.ts +1 -1
  10. package/lib/converters/gitlab/group_milestones.js +4 -4
  11. package/lib/converters/gitlab/groups.d.ts +1 -1
  12. package/lib/converters/gitlab/groups.js +3 -3
  13. package/lib/converters/gitlab/issues.d.ts +1 -1
  14. package/lib/converters/gitlab/issues.js +3 -3
  15. package/lib/converters/gitlab/jobs.d.ts +1 -1
  16. package/lib/converters/gitlab/jobs.js +4 -4
  17. package/lib/converters/gitlab/merge_request_commits.d.ts +1 -1
  18. package/lib/converters/gitlab/merge_request_commits.js +4 -4
  19. package/lib/converters/gitlab/merge_requests.d.ts +1 -1
  20. package/lib/converters/gitlab/merge_requests.js +3 -3
  21. package/lib/converters/gitlab/pipelines.d.ts +1 -1
  22. package/lib/converters/gitlab/pipelines.js +32 -16
  23. package/lib/converters/gitlab/project_labels.d.ts +1 -1
  24. package/lib/converters/gitlab/project_labels.js +2 -2
  25. package/lib/converters/gitlab/project_milestones.d.ts +1 -1
  26. package/lib/converters/gitlab/project_milestones.js +4 -4
  27. package/lib/converters/gitlab/projects.d.ts +1 -1
  28. package/lib/converters/gitlab/projects.js +6 -6
  29. package/lib/converters/gitlab/releases.d.ts +1 -1
  30. package/lib/converters/gitlab/releases.js +2 -2
  31. package/lib/converters/gitlab/tags.d.ts +1 -1
  32. package/lib/converters/gitlab/tags.js +3 -3
  33. package/lib/converters/gitlab/users.d.ts +1 -1
  34. package/lib/converters/gitlab/users.js +2 -2
  35. package/lib/converters/gitlab-ci/groups.d.ts +1 -1
  36. package/lib/converters/gitlab-ci/groups.js +3 -3
  37. package/lib/converters/gitlab-ci/jobs.d.ts +1 -1
  38. package/lib/converters/gitlab-ci/jobs.js +5 -5
  39. package/lib/converters/gitlab-ci/pipelines.d.ts +1 -1
  40. package/lib/converters/gitlab-ci/pipelines.js +5 -5
  41. package/lib/converters/gitlab-ci/projects.d.ts +1 -1
  42. package/lib/converters/gitlab-ci/projects.js +4 -4
  43. package/lib/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +2 -2
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Jobs = void 0;
4
4
  const faros_airbyte_cdk_1 = require("faros-airbyte-cdk");
5
5
  const faros_feeds_sdk_1 = require("faros-feeds-sdk");
6
- const gitlab_1 = require("../common/gitlab");
7
6
  const converter_1 = require("../converter");
8
- class Jobs extends gitlab_1.GitlabConverter {
7
+ const common_1 = require("../gitlab/common");
8
+ class Jobs extends common_1.GitlabConverter {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  this.source = 'GitLab-CI';
@@ -22,7 +22,7 @@ class Jobs extends gitlab_1.GitlabConverter {
22
22
  var _a, _b;
23
23
  const source = this.streamName.source;
24
24
  const job = record.record.data;
25
- const repository = gitlab_1.GitlabCommon.parseRepositoryKey(job.webUrl, source);
25
+ const repository = common_1.GitlabCommon.parseRepositoryKey(job.webUrl, source);
26
26
  const pipelinesStream = this.pipelinesStream.asString;
27
27
  const pipeline = ctx.get(pipelinesStream, String(job.pipeline.id));
28
28
  const pipelineId = (_b = (_a = pipeline === null || pipeline === void 0 ? void 0 : pipeline.record) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id;
@@ -34,7 +34,7 @@ class Jobs extends gitlab_1.GitlabConverter {
34
34
  this.logger.warn(message);
35
35
  return [];
36
36
  }
37
- const buildKey = gitlab_1.GitlabCommon.createBuildKey(pipelineId, repository);
37
+ const buildKey = common_1.GitlabCommon.createBuildKey(pipelineId, repository);
38
38
  return [
39
39
  {
40
40
  model: 'cicd_BuildStep',
@@ -45,7 +45,7 @@ class Jobs extends gitlab_1.GitlabConverter {
45
45
  createdAt: faros_feeds_sdk_1.Utils.toDate(job.createdAt),
46
46
  startedAt: faros_feeds_sdk_1.Utils.toDate(job.startedAt),
47
47
  endedAt: faros_feeds_sdk_1.Utils.toDate(job.finishedAt),
48
- status: gitlab_1.GitlabCommon.convertBuildStatus(job.status),
48
+ status: common_1.GitlabCommon.convertBuildStatus(job.status),
49
49
  url: job.webUrl,
50
50
  build: buildKey,
51
51
  },
@@ -1,6 +1,6 @@
1
1
  import { AirbyteRecord } from 'faros-airbyte-cdk';
2
- import { GitlabConverter } from '../common/gitlab';
3
2
  import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { GitlabConverter } from '../gitlab/common';
4
4
  export declare class Pipelines extends GitlabConverter {
5
5
  source: string;
6
6
  readonly destinationModels: ReadonlyArray<DestinationModel>;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Pipelines = void 0;
4
4
  const faros_feeds_sdk_1 = require("faros-feeds-sdk");
5
- const gitlab_1 = require("../common/gitlab");
6
- class Pipelines extends gitlab_1.GitlabConverter {
5
+ const common_1 = require("../gitlab/common");
6
+ class Pipelines extends common_1.GitlabConverter {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.source = 'GitLab-CI';
@@ -16,14 +16,14 @@ class Pipelines extends gitlab_1.GitlabConverter {
16
16
  const source = this.streamName.source;
17
17
  const pipeline = record.record.data;
18
18
  const res = [];
19
- const repository = gitlab_1.GitlabCommon.parseRepositoryKey(pipeline.webUrl, source);
19
+ const repository = common_1.GitlabCommon.parseRepositoryKey(pipeline.webUrl, source);
20
20
  if (!repository)
21
21
  return [];
22
- const status = gitlab_1.GitlabCommon.convertBuildStatus(pipeline.status);
22
+ const status = common_1.GitlabCommon.convertBuildStatus(pipeline.status);
23
23
  const endedAt = status.category == 'Running' || status.category == 'Queued'
24
24
  ? null
25
25
  : faros_feeds_sdk_1.Utils.toDate(pipeline.updatedAt);
26
- const buildKey = gitlab_1.GitlabCommon.createBuildKey(pipeline.id, repository);
26
+ const buildKey = common_1.GitlabCommon.createBuildKey(pipeline.id, repository);
27
27
  res.push({
28
28
  model: 'cicd_Build',
29
29
  record: {
@@ -1,6 +1,6 @@
1
1
  import { AirbyteRecord } from 'faros-airbyte-cdk';
2
- import { GitlabConverter } from '../common/gitlab';
3
2
  import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { GitlabConverter } from '../gitlab/common';
4
4
  export declare class Projects extends GitlabConverter {
5
5
  source: string;
6
6
  readonly destinationModels: ReadonlyArray<DestinationModel>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Projects = void 0;
4
- const gitlab_1 = require("../common/gitlab");
5
- class Projects extends gitlab_1.GitlabConverter {
4
+ const common_1 = require("../gitlab/common");
5
+ class Projects extends common_1.GitlabConverter {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  this.source = 'GitLab-CI';
@@ -14,7 +14,7 @@ class Projects extends gitlab_1.GitlabConverter {
14
14
  var _a, _b;
15
15
  const source = this.streamName.source;
16
16
  const project = record.record.data;
17
- const repository = gitlab_1.GitlabCommon.parseRepositoryKey(project.webUrl, source);
17
+ const repository = common_1.GitlabCommon.parseRepositoryKey(project.webUrl, source);
18
18
  if (!repository)
19
19
  return [];
20
20
  return [
@@ -23,7 +23,7 @@ class Projects extends gitlab_1.GitlabConverter {
23
23
  record: {
24
24
  uid: (_a = project.path) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
25
25
  name: project.name,
26
- description: (_b = project.description) === null || _b === void 0 ? void 0 : _b.substring(0, gitlab_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
26
+ description: (_b = project.description) === null || _b === void 0 ? void 0 : _b.substring(0, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
27
27
  url: project.webUrl,
28
28
  organization: repository.organization,
29
29
  },