gitlab-radiator 4.2.0 → 4.3.2

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.
@@ -27,3 +27,7 @@
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
29
  */
30
+
31
+ //! moment.js
32
+
33
+ //! moment.js locale configuration
package/src/app.js CHANGED
@@ -14,7 +14,7 @@ const httpServer = http.Server(app)
14
14
  const socketIoServer = new Server(httpServer)
15
15
 
16
16
  if (process.env.NODE_ENV !== 'production' && fs.existsSync('./src/dev-assets.js')) {
17
- // eslint-disable-next-line global-require
17
+
18
18
  const {bindDevAssets} = await import('./dev-assets.js')
19
19
  bindDevAssets(app)
20
20
  }
@@ -26,7 +26,7 @@ app.use(compression())
26
26
  app.use(basicAuth(config.auth))
27
27
 
28
28
  httpServer.listen(config.port, () => {
29
- // eslint-disable-next-line no-console
29
+
30
30
  console.log(`Listening on port *:${config.port}`)
31
31
  })
32
32
 
@@ -50,7 +50,7 @@ async function runUpdate() {
50
50
  globalState.error = await errorIfRunnerOffline()
51
51
  socketIoServer.emit('state', withDate(globalState))
52
52
  } catch (error) {
53
- // eslint-disable-next-line no-console
53
+
54
54
  console.error(error.message)
55
55
  globalState.error = `Failed to communicate with GitLab API: ${error.message}`
56
56
  socketIoServer.emit('state', withDate(globalState))
package/src/auth.js CHANGED
@@ -2,12 +2,12 @@ import authenticate from 'basic-auth'
2
2
 
3
3
  export function basicAuth(auth) {
4
4
  if (!auth || !auth.username || !auth.password) {
5
- // eslint-disable-next-line no-console
5
+
6
6
  console.log('No authentication configured')
7
7
  return (req, res, next) => next()
8
8
  }
9
9
 
10
- // eslint-disable-next-line no-console
10
+
11
11
  console.log('HTTP basic auth enabled')
12
12
  return (req, res, next) => {
13
13
  const {name, pass} = authenticate(req) || {}
@@ -11,7 +11,7 @@ const clients = new Map()
11
11
  function lazyClient(gitlab) {
12
12
  const gitlabUrl = gitlab.url
13
13
  if (gitlabUrl === undefined) {
14
- // eslint-disable-next-line no-console
14
+
15
15
  console.log('Got undefined url for ' + JSON.stringify(gitlab))
16
16
  }
17
17
  if (!clients.get(gitlabUrl)) {
@@ -19,7 +19,7 @@ export async function fetchLatestPipelines(projectId, gitlab) {
19
19
  return pipelinesWithStages
20
20
  }
21
21
 
22
- // eslint-disable-next-line max-statements
22
+
23
23
  async function fetchLatestAndMasterPipeline(projectId, config) {
24
24
  const pipelines = await fetchPipelines(projectId, config, {per_page: 100})
25
25
  if (pipelines.length === 0) {
@@ -15,7 +15,7 @@ async function fetchOwnProjects(gitlab) {
15
15
  const projects = []
16
16
  const SAFETY_MAX_PAGE = 10
17
17
  for (let page = 1; page <= SAFETY_MAX_PAGE; page += 1) {
18
- // eslint-disable-next-line no-await-in-loop
18
+
19
19
  const {data, headers} = await gitlabRequest('/projects', {page, per_page: 100, membership: true}, gitlab)
20
20
  projects.push(data)
21
21
  if (data.length === 0 || !headers['x-next-page']) {