@hahnpro/flow-cli 2.16.4 → 2.16.6

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/auth.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  import express from 'express';
3
3
  import getPort from 'get-port';
4
- import HttpsProxyAgent from 'https-proxy-agent';
4
+ import { HttpsProxyAgent } from 'https-proxy-agent';
5
5
  import nconf from 'nconf';
6
6
  import open from 'open';
7
7
  import openidClient, { custom } from 'openid-client';
@@ -24,7 +24,7 @@ nconf.file({ file: join(__dirname, 'config') });
24
24
 
25
25
  if (process.env.https_proxy || process.env.http_proxy) {
26
26
  custom.setHttpOptionsDefaults({
27
- agent: HttpsProxyAgent(process.env.https_proxy || process.env.http_proxy),
27
+ agent: new HttpsProxyAgent(process.env.https_proxy || process.env.http_proxy),
28
28
  });
29
29
  }
30
30
 
package/lib/cli.mjs CHANGED
@@ -10,7 +10,7 @@ import copyfiles from 'copyfiles';
10
10
  import { execa } from 'execa';
11
11
  import FormData from 'form-data';
12
12
  import { glob } from 'glob';
13
- import HttpsProxyAgent from 'https-proxy-agent';
13
+ import { HttpsProxyAgent } from 'https-proxy-agent';
14
14
  import fs from 'node:fs';
15
15
  import { createRequire } from 'node:module';
16
16
  import path from 'node:path';
@@ -20,6 +20,8 @@ import { fileURLToPath } from 'node:url';
20
20
  import { getAccessToken, login, logout } from './auth.mjs';
21
21
  import { handleApiError, handleConvertedOutput, logger, prepareTsFile } from './utils.mjs';
22
22
 
23
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
24
+ // @ts-ignore
23
25
  const require = createRequire(import.meta.url);
24
26
  const BASE_URL = process.env.BASE_URL || process.env.PLATFORM_URL;
25
27
  const BUILD_DIR = process.env.BUILD_DIR || 'dist';
@@ -27,16 +29,16 @@ const BUILD_DIR = process.env.BUILD_DIR || 'dist';
27
29
  const __filename = fileURLToPath(import.meta.url);
28
30
  const __dirname = path.dirname(__filename);
29
31
 
30
- let axios = Axios;
32
+ let axios = Axios.create();
31
33
  if (process.env.https_proxy || process.env.http_proxy) {
32
- const httpsAgent = HttpsProxyAgent(process.env.https_proxy || process.env.http_proxy);
34
+ const httpsAgent = new HttpsProxyAgent(process.env.https_proxy || process.env.http_proxy);
33
35
  axios = Axios.create({ httpsAgent, proxy: false });
34
36
  }
35
37
 
36
38
  let apiToken;
37
39
  let projectsRoot = 'modules';
38
40
 
39
- const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')));
41
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')).toString());
40
42
 
41
43
  const CMD = {
42
44
  AUDIT: 'audit',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-cli",
3
- "version": "2.16.4",
3
+ "version": "2.16.6",
4
4
  "description": "CLI for managing Flow Modules",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,15 +32,15 @@
32
32
  "class-transformer": "0.5.1",
33
33
  "class-validator": "~0.14.0",
34
34
  "class-validator-jsonschema": "^5.0.0",
35
- "commander": "^10.0.1",
35
+ "commander": "^11.0.0",
36
36
  "copyfiles": "^2.4.1",
37
- "dotenv": "^16.0.3",
37
+ "dotenv": "^16.3.1",
38
38
  "ejs": "^3.1.9",
39
39
  "execa": "^7.1.1",
40
40
  "express": "^4.18.2",
41
41
  "form-data": "^4.0.0",
42
- "get-port": "^6.1.2",
43
- "glob": "^10.2.6",
42
+ "get-port": "^7.0.0",
43
+ "glob": "^10.3.0",
44
44
  "https-proxy-agent": "^7.0.0",
45
45
  "nconf": "^0.12.0",
46
46
  "open": "^9.1.0",
@@ -51,10 +51,10 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/express": "^4.17.17",
54
- "@types/jest": "^29.5.1",
54
+ "@types/jest": "^29.5.2",
55
55
  "@types/nconf": "^0.10.3",
56
- "@types/node": "^18.16.16",
57
- "eslint": "^8.41.0",
56
+ "@types/node": "^18.16.18",
57
+ "eslint": "^8.43.0",
58
58
  "eslint-plugin-unicorn": "^47.0.0",
59
59
  "jest": "^29.5.0",
60
60
  "prettier": "^2.8.8",