airbyte-faros-destination 0.10.52 → 0.10.54
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/lib/converters/github/faros_artifacts.d.ts +8 -0
- package/lib/converters/github/faros_artifacts.js +53 -0
- package/lib/converters/github/faros_artifacts.js.map +1 -0
- package/lib/converters/github/faros_dependabot_alerts.js +6 -5
- package/lib/converters/github/faros_dependabot_alerts.js.map +1 -1
- package/lib/converters/github/faros_workflow_jobs.d.ts +7 -0
- package/lib/converters/github/faros_workflow_jobs.js +41 -0
- package/lib/converters/github/faros_workflow_jobs.js.map +1 -0
- package/lib/converters/github/faros_workflow_runs.d.ts +8 -0
- package/lib/converters/github/faros_workflow_runs.js +27 -0
- package/lib/converters/github/faros_workflow_runs.js.map +1 -0
- package/lib/converters/github/faros_workflows.d.ts +8 -0
- package/lib/converters/github/faros_workflows.js +22 -0
- package/lib/converters/github/faros_workflows.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitHubConverter } from './common';
|
|
4
|
+
export declare class FarosArtifacts extends GitHubConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
private readonly seenRepositories;
|
|
7
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosArtifacts = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
class FarosArtifacts extends common_1.GitHubConverter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.destinationModels = [
|
|
10
|
+
'cicd_Artifact',
|
|
11
|
+
'cicd_Repository',
|
|
12
|
+
];
|
|
13
|
+
this.seenRepositories = new Set();
|
|
14
|
+
}
|
|
15
|
+
async convert(record) {
|
|
16
|
+
const artifact = record.record.data;
|
|
17
|
+
const repository = common_1.GitHubCommon.repoKey(artifact.org, artifact.repo, this.streamName.source);
|
|
18
|
+
const pipeline = {
|
|
19
|
+
uid: artifact.workflow_id.toString(),
|
|
20
|
+
organization: repository.organization,
|
|
21
|
+
};
|
|
22
|
+
const build = {
|
|
23
|
+
uid: artifact.run_id.toString(),
|
|
24
|
+
pipeline,
|
|
25
|
+
};
|
|
26
|
+
const res = [];
|
|
27
|
+
const orgRepoKey = (0, lodash_1.toLower)(`${artifact.org}/${artifact.repo}`);
|
|
28
|
+
if (!this.seenRepositories.has(orgRepoKey)) {
|
|
29
|
+
this.seenRepositories.add(orgRepoKey);
|
|
30
|
+
res.push({
|
|
31
|
+
model: 'cicd_Repository',
|
|
32
|
+
record: {
|
|
33
|
+
...repository,
|
|
34
|
+
name: repository.uid,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
res.push({
|
|
39
|
+
model: 'cicd_Artifact',
|
|
40
|
+
record: {
|
|
41
|
+
uid: artifact.id.toString(),
|
|
42
|
+
name: artifact.name,
|
|
43
|
+
url: artifact.url,
|
|
44
|
+
createdAt: artifact.created_at,
|
|
45
|
+
build,
|
|
46
|
+
repository,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
return res;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.FarosArtifacts = FarosArtifacts;
|
|
53
|
+
//# sourceMappingURL=faros_artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_artifacts.js","sourceRoot":"","sources":["../../../src/converters/github/faros_artifacts.ts"],"names":[],"mappings":";;;AAEA,mCAA+B;AAG/B,qCAAuD;AAEvD,M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,QAAQ,CAAC,IAAI;gBACnB,GAAG,EAAE,QAAQ,CAAC,GAAG;gBACjB,SAAS,EAAE,QAAQ,CAAC,UAAU;gBAC9B,KAAK;gBACL,UAAU;aACX;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAvDD,wCAuDC"}
|
|
@@ -16,7 +16,7 @@ class FarosDependabotAlerts extends common_1.GitHubConverter {
|
|
|
16
16
|
this.alertType = 'dependabot';
|
|
17
17
|
}
|
|
18
18
|
async convert(record) {
|
|
19
|
-
var _a, _b, _c;
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
20
|
const alert = record.record.data;
|
|
21
21
|
const repository = common_1.GitHubCommon.repoKey(alert.org, alert.repo, this.streamName.source);
|
|
22
22
|
const uid = common_1.GitHubCommon.vulnerabilityUid(alert.org, alert.repo, this.alertType, alert.number);
|
|
@@ -30,6 +30,7 @@ class FarosDependabotAlerts extends common_1.GitHubConverter {
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
}));
|
|
33
|
+
const firstPatchedVersion = (_a = alert.security_vulnerability.first_patched_version) === null || _a === void 0 ? void 0 : _a.identifier;
|
|
33
34
|
return [
|
|
34
35
|
{
|
|
35
36
|
model: 'sec_Vulnerability',
|
|
@@ -43,9 +44,9 @@ class FarosDependabotAlerts extends common_1.GitHubConverter {
|
|
|
43
44
|
severity: common_1.GitHubCommon.vulnerabilitySeverity(alert),
|
|
44
45
|
url: alert.html_url,
|
|
45
46
|
publishedAt: faros_js_client_1.Utils.toDate(alert.security_advisory.published_at),
|
|
46
|
-
remediatedInVersions:
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
remediatedInVersions: firstPatchedVersion
|
|
48
|
+
? [firstPatchedVersion]
|
|
49
|
+
: [],
|
|
49
50
|
affectedVersions: [
|
|
50
51
|
alert.security_vulnerability.vulnerable_version_range,
|
|
51
52
|
],
|
|
@@ -66,7 +67,7 @@ class FarosDependabotAlerts extends common_1.GitHubConverter {
|
|
|
66
67
|
repository,
|
|
67
68
|
url: alert.html_url,
|
|
68
69
|
createdAt: faros_js_client_1.Utils.toDate(alert.created_at),
|
|
69
|
-
resolvedAt: (
|
|
70
|
+
resolvedAt: (_d = (_c = (_b = faros_js_client_1.Utils.toDate(alert.fixed_at)) !== null && _b !== void 0 ? _b : faros_js_client_1.Utils.toDate(alert.dismissed_at)) !== null && _c !== void 0 ? _c : faros_js_client_1.Utils.toDate(alert.auto_dismissed_at)) !== null && _d !== void 0 ? _d : null,
|
|
70
71
|
status: common_1.GitHubCommon.vulnerabilityStatus(alert),
|
|
71
72
|
},
|
|
72
73
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faros_dependabot_alerts.js","sourceRoot":"","sources":["../../../src/converters/github/faros_dependabot_alerts.ts"],"names":[],"mappings":";;;AAEA,qDAAsC;AACtC,mCAA4B;AAG5B,qCAAuD;AAEvD,MAAa,qBAAsB,SAAQ,wBAAe;IAA1D;;QACW,sBAAiB,GAAoC;YAC5D,mBAAmB;YACnB,6BAA6B;YAC7B,yCAAyC;YACzC,6BAA6B;SAC9B,CAAC;QAEO,cAAS,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"faros_dependabot_alerts.js","sourceRoot":"","sources":["../../../src/converters/github/faros_dependabot_alerts.ts"],"names":[],"mappings":";;;AAEA,qDAAsC;AACtC,mCAA4B;AAG5B,qCAAuD;AAEvD,MAAa,qBAAsB,SAAQ,wBAAe;IAA1D;;QACW,sBAAiB,GAAoC;YAC5D,mBAAmB;YACnB,6BAA6B;YAC7B,yCAAyC;YACzC,6BAA6B;SAC9B,CAAC;QAEO,cAAS,GAAG,YAAY,CAAC;IA+EpC,CAAC;IA7EC,KAAK,CAAC,OAAO,CACX,MAAqB;;QAErB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAuB,CAAC;QACpD,MAAM,UAAU,GAAG,qBAAY,CAAC,OAAO,CACrC,KAAK,CAAC,GAAG,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CAAC;CACF;AAvFD,sDAuFC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitHubConverter } from './common';
|
|
4
|
+
export declare class FarosWorkflowJobs extends GitHubConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosWorkflowJobs = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
class FarosWorkflowJobs extends common_1.GitHubConverter {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.destinationModels = [
|
|
9
|
+
'cicd_BuildStep',
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
async convert(record) {
|
|
13
|
+
const workflowJob = record.record.data;
|
|
14
|
+
const repository = common_1.GitHubCommon.repoKey(workflowJob.org, workflowJob.repo, this.streamName.source);
|
|
15
|
+
const pipeline = {
|
|
16
|
+
uid: workflowJob.workflow_id.toString(),
|
|
17
|
+
organization: repository.organization,
|
|
18
|
+
};
|
|
19
|
+
const build = {
|
|
20
|
+
uid: workflowJob.run_id.toString(),
|
|
21
|
+
pipeline,
|
|
22
|
+
};
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
model: 'cicd_BuildStep',
|
|
26
|
+
record: {
|
|
27
|
+
uid: workflowJob.id.toString(),
|
|
28
|
+
name: workflowJob.name,
|
|
29
|
+
createdAt: workflowJob.created_at,
|
|
30
|
+
startedAt: workflowJob.started_at,
|
|
31
|
+
endedAt: workflowJob.completed_at,
|
|
32
|
+
status: common_1.GitHubCommon.cicd_BuildStatus(workflowJob.status, workflowJob.conclusion),
|
|
33
|
+
url: workflowJob.url,
|
|
34
|
+
build,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.FarosWorkflowJobs = FarosWorkflowJobs;
|
|
41
|
+
//# sourceMappingURL=faros_workflow_jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_workflow_jobs.js","sourceRoot":"","sources":["../../../src/converters/github/faros_workflow_jobs.ts"],"names":[],"mappings":";;;AAIA,qCAAuD;AAEvD,MAAa,iBAAkB,SAAQ,wBAAe;IAAtD;;QACW,sBAAiB,GAAoC;YAC5D,gBAAgB;SACjB,CAAC;IAuCJ,CAAC;IArCC,KAAK,CAAC,OAAO,CACX,MAAqB;QAErB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAmB,CAAC;QAEtD,MAAM,UAAU,GAAG,qBAAY,CAAC,OAAO,CACrC,WAAW,CAAC,GAAG,EACf,WAAW,CAAC,IAAI,EAChB,IAAI,CAAC,UAAU,CAAC,MAAM,CACvB,CAAC;QACF,MAAM,QAAQ,GAAG;YACf,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE;YACvC,YAAY,EAAE,UAAU,CAAC,YAAY;SACtC,CAAC;QACF,MAAM,KAAK,GAAG;YACZ,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClC,QAAQ;SACT,CAAC;QACF,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,MAAM,EAAE;oBACN,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE;oBAC9B,IAAI,EAAE,WAAW,CAAC,IAAI;oBACtB,SAAS,EAAE,WAAW,CAAC,UAAU;oBACjC,SAAS,EAAE,WAAW,CAAC,UAAU;oBACjC,OAAO,EAAE,WAAW,CAAC,YAAY;oBACjC,MAAM,EAAE,qBAAY,CAAC,gBAAgB,CACnC,WAAW,CAAC,MAAM,EAClB,WAAW,CAAC,UAAU,CACvB;oBACD,GAAG,EAAE,WAAW,CAAC,GAAG;oBACpB,KAAK;iBACN;aACF;SACF,CAAC;IACJ,CAAC;CACF;AA1CD,8CA0CC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitHubConverter } from './common';
|
|
4
|
+
export declare class FarosWorkflowRuns extends GitHubConverter {
|
|
5
|
+
private readonly alias;
|
|
6
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
7
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosWorkflowRuns = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const workflow_runs_1 = require("./workflow_runs");
|
|
6
|
+
class FarosWorkflowRuns extends common_1.GitHubConverter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.alias = new workflow_runs_1.WorkflowRuns();
|
|
10
|
+
this.destinationModels = this.alias.destinationModels;
|
|
11
|
+
}
|
|
12
|
+
async convert(record) {
|
|
13
|
+
const workflowRun = record.record.data;
|
|
14
|
+
record.record.data = {
|
|
15
|
+
...workflowRun,
|
|
16
|
+
repository: {
|
|
17
|
+
full_name: `${workflowRun.org}/${workflowRun.repo}`,
|
|
18
|
+
},
|
|
19
|
+
head_commit: {
|
|
20
|
+
id: workflowRun.head_sha,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
return this.alias.convert(record);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.FarosWorkflowRuns = FarosWorkflowRuns;
|
|
27
|
+
//# sourceMappingURL=faros_workflow_runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_workflow_runs.js","sourceRoot":"","sources":["../../../src/converters/github/faros_workflow_runs.ts"],"names":[],"mappings":";;;AAIA,qCAAyC;AACzC,mDAAsE;AAEtE,MAAa,iBAAkB,SAAQ,wBAAe;IAAtD;;QACmB,UAAK,GAAG,IAAI,4BAAqB,EAAE,CAAC;QAE5C,sBAAiB,GACxB,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAiBjC,CAAC;IAfC,KAAK,CAAC,OAAO,CACX,MAAqB;QAErB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAmB,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG;YACnB,GAAG,WAAW;YACd,UAAU,EAAE;gBACV,SAAS,EAAE,GAAG,WAAW,CAAC,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE;aACpD;YACD,WAAW,EAAE;gBACX,EAAE,EAAE,WAAW,CAAC,QAAQ;aACzB;SACF,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACF;AArBD,8CAqBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitHubConverter } from './common';
|
|
4
|
+
export declare class FarosWorkflows extends GitHubConverter {
|
|
5
|
+
private readonly alias;
|
|
6
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
7
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosWorkflows = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const workflows_1 = require("./workflows");
|
|
6
|
+
class FarosWorkflows extends common_1.GitHubConverter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.alias = new workflows_1.Workflows();
|
|
10
|
+
this.destinationModels = this.alias.destinationModels;
|
|
11
|
+
}
|
|
12
|
+
async convert(record) {
|
|
13
|
+
const workflow = record.record.data;
|
|
14
|
+
record.record.data = {
|
|
15
|
+
...workflow,
|
|
16
|
+
repository: `${workflow.org}/${workflow.repo}`,
|
|
17
|
+
};
|
|
18
|
+
return this.alias.convert(record);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.FarosWorkflows = FarosWorkflows;
|
|
22
|
+
//# sourceMappingURL=faros_workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_workflows.js","sourceRoot":"","sources":["../../../src/converters/github/faros_workflows.ts"],"names":[],"mappings":";;;AAIA,qCAAyC;AACzC,2CAA4D;AAE5D,MAAa,cAAe,SAAQ,wBAAe;IAAnD;;QACmB,UAAK,GAAG,IAAI,qBAAkB,EAAE,CAAC;QAEzC,sBAAiB,GACxB,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAYjC,CAAC;IAVC,KAAK,CAAC,OAAO,CACX,MAAqB;QAErB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAgB,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG;YACnB,GAAG,QAAQ;YACX,UAAU,EAAE,GAAG,QAAQ,CAAC,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE;SAC/C,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACF;AAhBD,wCAgBC"}
|