@bitbar/cloud-api-client 1.0.14 → 1.0.16

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.
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env groovy
2
+
3
+ codeqlUrl = "https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.gz"
4
+ outputFile = "results.serif"
5
+ databaseName = "javascript-db"
6
+ scmTargetPath = "api-client-js"
7
+ repo = "git@github.com:bitbar/cloud-api-client-js.git"
8
+ credentialsId = "bitbar-dev-ssh"
9
+ githubApiCredentialsId = "4235c5e0-e60b-4c7d-8816-9508e60f484d"
10
+ branch = "master"
11
+ language = "javascript" //It's for both javascript and typescript
12
+
13
+ properties(
14
+ [
15
+ buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '50', numToKeepStr: '50')),
16
+ disableConcurrentBuilds(),
17
+ pipelineTriggers([pollSCM("@weekly")]),
18
+ ]
19
+ )
20
+
21
+ node('linux && docker') {
22
+ try {
23
+ stage("Repo preparations") {
24
+ def scmVars = checkout([
25
+ $class : 'GitSCM',
26
+ branches : [[name: branch]], doGenerateSubmoduleConfigurations: false,
27
+ extensions : [[$class: 'RelativeTargetDirectory', relativeTargetDir: scmTargetPath]],
28
+ userRemoteConfigs: [[credentialsId: credentialsId, url: repo]]
29
+ ])
30
+ env.GIT_REPO_NAME = scmVars.GIT_URL.replaceFirst(/^.*:(.*)\.git$/, '$1')
31
+ }
32
+
33
+ stage('Init codeQL') {
34
+ init()
35
+ }
36
+
37
+ stage('CodeQL analyze') {
38
+ analyze()
39
+ }
40
+
41
+ stage('CodeQL results publishing') {
42
+ publish()
43
+ }
44
+
45
+ } finally {
46
+ stage('notification') {
47
+ notification()
48
+ cleanWs()
49
+ }
50
+ }
51
+ }
52
+
53
+ def init() {
54
+ sh("curl -sSL ${codeqlUrl} -o code-ql.tar.gz")
55
+ sh("tar -xvzf ./code-ql.tar.gz")
56
+ }
57
+
58
+ def analyze() {
59
+ docker.image("node:14.21.3-bullseye").inside("-u 0:0") {
60
+ sh("${WORKSPACE}/codeql/codeql database create ${databaseName} --language=${language} --source-root=${scmTargetPath}")
61
+ sh("${WORKSPACE}/codeql/codeql database analyze ${databaseName} --format=sarif-latest --output=${outputFile}")
62
+ }
63
+ }
64
+
65
+ def publish() {
66
+ withCredentials([string(credentialsId: githubApiCredentialsId, variable: 'GITHUB_TOKEN')]) {
67
+ sh("${WORKSPACE}/codeql/codeql github upload-results --repository=${env.GIT_REPO_NAME} --ref=refs/heads/${branch} --checkout-path=${WORKSPACE}/${scmTargetPath} --sarif=${outputFile}")
68
+ }
69
+ }
70
+
71
+ def notification() {
72
+ def text = "Scan <${env.BUILD_URL}|${env.JOB_NAME}[${env.BUILD_NUMBER}]>\n Finished with result ${currentBuild.currentResult}"
73
+ colorCode = currentBuild.currentResult == 'SUCCESS' ? '#00FF00' : '#FF0000'
74
+ slackSend color: colorCode, teamDomain: 'smartbear', channel: "bitbar-frontend", message: text, tokenCredentialId:
75
+ 'SLACK_BACKEND_INTEGRATION_TOKEN'
76
+ }
@@ -1,5 +1,7 @@
1
1
  export declare type Account = {
2
+ activeServiceName: string;
2
3
  createTime: number;
4
+ dedicatedDevicesCount: number;
3
5
  id: number;
4
6
  mainUserEmail: string;
5
7
  mainUserFirstName: string;
@@ -20,6 +20,8 @@ export declare enum DeviceState {
20
20
  export declare type AdminDevice = {
21
21
  accountId: number;
22
22
  cluster: unknown;
23
+ comment: string;
24
+ dedicationEndTime: number;
23
25
  deviceModelId: number;
24
26
  deviceModelName: string;
25
27
  enabled: boolean;
@@ -31,6 +33,7 @@ export declare type AdminDevice = {
31
33
  location: string;
32
34
  locked: boolean;
33
35
  mainUserEmail: string;
36
+ mainUserId: number;
34
37
  manufacturer: string;
35
38
  name: string;
36
39
  osType: OsType;
@@ -1,4 +1,4 @@
1
- /* @bitbar/cloud-api-client v1.0.14 | Copyright 2023 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
1
+ /* @bitbar/cloud-api-client v1.0.16 | Copyright 2023 (c) SmartBear Software and contributors | .git/blob/master/LICENSE */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('axios'), require('@bitbar/finka'), require('qs'), require('node-abort-controller')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'axios', '@bitbar/finka', 'qs', 'node-abort-controller'], factory) :
@@ -10,7 +10,7 @@
10
10
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
11
11
  var finka__default = /*#__PURE__*/_interopDefaultLegacy(finka);
12
12
 
13
- var version = "1.0.14";
13
+ var version = "1.0.16";
14
14
 
15
15
  /******************************************************************************
16
16
  Copyright (c) Microsoft Corporation.