@coana-tech/cli 14.12.206 → 14.12.208

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/cli.mjs CHANGED
@@ -12993,7 +12993,7 @@ var require_form_data = __commonJS({
12993
12993
  var util5 = __require("util");
12994
12994
  var path9 = __require("path");
12995
12995
  var http2 = __require("http");
12996
- var https2 = __require("https");
12996
+ var https3 = __require("https");
12997
12997
  var parseUrl = __require("url").parse;
12998
12998
  var fs11 = __require("fs");
12999
12999
  var Stream2 = __require("stream").Stream;
@@ -13262,7 +13262,7 @@ var require_form_data = __commonJS({
13262
13262
  }
13263
13263
  options.headers = this.getHeaders(params.headers);
13264
13264
  if (options.protocol === "https:") {
13265
- request = https2.request(options);
13265
+ request = https3.request(options);
13266
13266
  } else {
13267
13267
  request = http2.request(options);
13268
13268
  }
@@ -14160,7 +14160,7 @@ var require_follow_redirects = __commonJS({
14160
14160
  var url2 = __require("url");
14161
14161
  var URL3 = url2.URL;
14162
14162
  var http2 = __require("http");
14163
- var https2 = __require("https");
14163
+ var https3 = __require("https");
14164
14164
  var Writable = __require("stream").Writable;
14165
14165
  var assert17 = __require("assert");
14166
14166
  var debug = require_debug();
@@ -14645,7 +14645,7 @@ var require_follow_redirects = __commonJS({
14645
14645
  function isURL(value2) {
14646
14646
  return URL3 && value2 instanceof URL3;
14647
14647
  }
14648
- module2.exports = wrap2({ http: http2, https: https2 });
14648
+ module2.exports = wrap2({ http: http2, https: https3 });
14649
14649
  module2.exports.wrap = wrap2;
14650
14650
  }
14651
14651
  });
@@ -25169,7 +25169,7 @@ var require_http = __commonJS({
25169
25169
  "../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/http.js"(exports2, module2) {
25170
25170
  "use strict";
25171
25171
  var http2 = __require("http");
25172
- var https2 = __require("https");
25172
+ var https3 = __require("https");
25173
25173
  var { Stream: Stream2 } = require_readable();
25174
25174
  var TransportStream = require_winston_transport();
25175
25175
  var { configure } = require_safe_stable_stringify();
@@ -25361,7 +25361,7 @@ var require_http = __commonJS({
25361
25361
  if (auth && auth.bearer) {
25362
25362
  headers.Authorization = `Bearer ${auth.bearer}`;
25363
25363
  }
25364
- const req = (this.ssl ? https2 : http2).request({
25364
+ const req = (this.ssl ? https3 : http2).request({
25365
25365
  ...this.options,
25366
25366
  method: "POST",
25367
25367
  host: this.host,
@@ -27084,7 +27084,7 @@ var require_is_retry_allowed = __commonJS({
27084
27084
  var require_hpagent = __commonJS({
27085
27085
  "../../node_modules/.pnpm/hpagent@1.2.0/node_modules/hpagent/index.js"(exports2, module2) {
27086
27086
  "use strict";
27087
- var https2 = __require("https");
27087
+ var https3 = __require("https");
27088
27088
  var http2 = __require("http");
27089
27089
  var { URL: URL3 } = __require("url");
27090
27090
  var HttpProxyAgent2 = class extends http2.Agent {
@@ -27113,7 +27113,7 @@ var require_hpagent = __commonJS({
27113
27113
  if (this.proxy.protocol === "https:") {
27114
27114
  requestOptions.servername = this.proxy.hostname;
27115
27115
  }
27116
- const request = (this.proxy.protocol === "http:" ? http2 : https2).request(requestOptions);
27116
+ const request = (this.proxy.protocol === "http:" ? http2 : https3).request(requestOptions);
27117
27117
  request.once("connect", (response, socket, head) => {
27118
27118
  request.removeAllListeners();
27119
27119
  socket.removeAllListeners();
@@ -27134,7 +27134,7 @@ var require_hpagent = __commonJS({
27134
27134
  request.end();
27135
27135
  }
27136
27136
  };
27137
- var HttpsProxyAgent2 = class extends https2.Agent {
27137
+ var HttpsProxyAgent2 = class extends https3.Agent {
27138
27138
  constructor(options) {
27139
27139
  const { proxy, proxyRequestOptions, ...opts } = options;
27140
27140
  super(opts);
@@ -27160,7 +27160,7 @@ var require_hpagent = __commonJS({
27160
27160
  if (this.proxy.protocol === "https:") {
27161
27161
  requestOptions.servername = this.proxy.hostname;
27162
27162
  }
27163
- const request = (this.proxy.protocol === "http:" ? http2 : https2).request(requestOptions);
27163
+ const request = (this.proxy.protocol === "http:" ? http2 : https3).request(requestOptions);
27164
27164
  request.once("connect", (response, socket, head) => {
27165
27165
  request.removeAllListeners();
27166
27166
  socket.removeAllListeners();
@@ -59319,7 +59319,7 @@ var require_dist3 = __commonJS({
59319
59319
  "use strict";
59320
59320
  exports2 = module2.exports = fetch2;
59321
59321
  var http2 = __require("http");
59322
- var https2 = __require("https");
59322
+ var https3 = __require("https");
59323
59323
  var zlib2 = __require("zlib");
59324
59324
  var Stream2 = __require("stream");
59325
59325
  var dataUriToBuffer = require_src2();
@@ -60074,7 +60074,7 @@ var require_dist3 = __commonJS({
60074
60074
  resolve45(response2);
60075
60075
  return;
60076
60076
  }
60077
- const send = (options.protocol === "https:" ? https2 : http2).request;
60077
+ const send = (options.protocol === "https:" ? https3 : http2).request;
60078
60078
  const { signal } = request;
60079
60079
  let response = null;
60080
60080
  const abort = () => {
@@ -66148,7 +66148,7 @@ var require_agent5 = __commonJS({
66148
66148
  function getNonProxyAgent(uri, opts) {
66149
66149
  const parsedUri = new url_1.URL(uri);
66150
66150
  const isHttps2 = parsedUri.protocol === "https:";
66151
- const { ca, cert, key: certKey } = {
66151
+ const { ca: ca2, cert, key: certKey } = {
66152
66152
  ...opts,
66153
66153
  ...(0, network_config_1.pickSettingByUrl)(opts.clientCertificates, uri)
66154
66154
  };
@@ -66156,7 +66156,7 @@ var require_agent5 = __commonJS({
66156
66156
  `https:${isHttps2.toString()}`,
66157
66157
  `local-address:${opts.localAddress ?? ">no-local-address<"}`,
66158
66158
  `strict-ssl:${isHttps2 ? Boolean(opts.strictSsl).toString() : ">no-strict-ssl<"}`,
66159
- `ca:${isHttps2 && ca?.toString() || ">no-ca<"}`,
66159
+ `ca:${isHttps2 && ca2?.toString() || ">no-ca<"}`,
66160
66160
  `cert:${isHttps2 && cert?.toString() || ">no-cert<"}`,
66161
66161
  `key:${isHttps2 && certKey?.toString() || ">no-key<"}`
66162
66162
  ].join(":");
@@ -66165,7 +66165,7 @@ var require_agent5 = __commonJS({
66165
66165
  }
66166
66166
  const agentTimeout = typeof opts.timeout !== "number" || opts.timeout === 0 ? 0 : opts.timeout + 1;
66167
66167
  const agent = isHttps2 ? new HttpsAgent({
66168
- ca,
66168
+ ca: ca2,
66169
66169
  cert,
66170
66170
  key: certKey,
66171
66171
  localAddress: opts.localAddress,
@@ -100367,7 +100367,7 @@ var require_tunnel = __commonJS({
100367
100367
  var net = __require("net");
100368
100368
  var tls = __require("tls");
100369
100369
  var http2 = __require("http");
100370
- var https2 = __require("https");
100370
+ var https3 = __require("https");
100371
100371
  var events = __require("events");
100372
100372
  var assert17 = __require("assert");
100373
100373
  var util5 = __require("util");
@@ -100389,12 +100389,12 @@ var require_tunnel = __commonJS({
100389
100389
  }
100390
100390
  function httpOverHttps(options) {
100391
100391
  var agent = new TunnelingAgent(options);
100392
- agent.request = https2.request;
100392
+ agent.request = https3.request;
100393
100393
  return agent;
100394
100394
  }
100395
100395
  function httpsOverHttps(options) {
100396
100396
  var agent = new TunnelingAgent(options);
100397
- agent.request = https2.request;
100397
+ agent.request = https3.request;
100398
100398
  agent.createSocket = createSecureSocket;
100399
100399
  agent.defaultPort = 443;
100400
100400
  return agent;
@@ -117417,7 +117417,7 @@ var require_lib28 = __commonJS({
117417
117417
  Object.defineProperty(exports2, "__esModule", { value: true });
117418
117418
  exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0;
117419
117419
  var http2 = __importStar(__require("http"));
117420
- var https2 = __importStar(__require("https"));
117420
+ var https3 = __importStar(__require("https"));
117421
117421
  var pm = __importStar(require_proxy());
117422
117422
  var tunnel = __importStar(require_tunnel2());
117423
117423
  var undici_1 = require_undici();
@@ -117808,7 +117808,7 @@ var require_lib28 = __commonJS({
117808
117808
  const info = {};
117809
117809
  info.parsedUrl = requestUrl;
117810
117810
  const usingSsl = info.parsedUrl.protocol === "https:";
117811
- info.httpModule = usingSsl ? https2 : http2;
117811
+ info.httpModule = usingSsl ? https3 : http2;
117812
117812
  const defaultPort = usingSsl ? 443 : 80;
117813
117813
  info.options = {};
117814
117814
  info.options.host = info.parsedUrl.hostname;
@@ -117878,7 +117878,7 @@ var require_lib28 = __commonJS({
117878
117878
  }
117879
117879
  if (!agent) {
117880
117880
  const options = { keepAlive: this._keepAlive, maxSockets };
117881
- agent = usingSsl ? new https2.Agent(options) : new http2.Agent(options);
117881
+ agent = usingSsl ? new https3.Agent(options) : new http2.Agent(options);
117882
117882
  this._agent = agent;
117883
117883
  }
117884
117884
  if (usingSsl && this._ignoreSslError) {
@@ -193948,7 +193948,7 @@ var require_axios = __commonJS({
193948
193948
  var url2 = __require("url");
193949
193949
  var proxyFromEnv2 = require_proxy_from_env();
193950
193950
  var http2 = __require("http");
193951
- var https2 = __require("https");
193951
+ var https3 = __require("https");
193952
193952
  var util5 = __require("util");
193953
193953
  var followRedirects2 = require_follow_redirects();
193954
193954
  var zlib2 = __require("zlib");
@@ -193962,7 +193962,7 @@ var require_axios = __commonJS({
193962
193962
  var url__default = /* @__PURE__ */ _interopDefaultLegacy(url2);
193963
193963
  var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv2);
193964
193964
  var http__default = /* @__PURE__ */ _interopDefaultLegacy(http2);
193965
- var https__default = /* @__PURE__ */ _interopDefaultLegacy(https2);
193965
+ var https__default = /* @__PURE__ */ _interopDefaultLegacy(https3);
193966
193966
  var util__default = /* @__PURE__ */ _interopDefaultLegacy(util5);
193967
193967
  var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects2);
193968
193968
  var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib2);
@@ -197280,7 +197280,7 @@ var require_form_data2 = __commonJS({
197280
197280
  var util5 = __require("util");
197281
197281
  var path9 = __require("path");
197282
197282
  var http2 = __require("http");
197283
- var https2 = __require("https");
197283
+ var https3 = __require("https");
197284
197284
  var parseUrl = __require("url").parse;
197285
197285
  var fs11 = __require("fs");
197286
197286
  var mime = require_mime_types();
@@ -197546,7 +197546,7 @@ var require_form_data2 = __commonJS({
197546
197546
  }
197547
197547
  options.headers = this.getHeaders(params.headers);
197548
197548
  if (options.protocol == "https:") {
197549
- request = https2.request(options);
197549
+ request = https3.request(options);
197550
197550
  } else {
197551
197551
  request = http2.request(options);
197552
197552
  }
@@ -204079,6 +204079,11 @@ axiosRetry.exponentialDelay = exponentialDelay;
204079
204079
  axiosRetry.isRetryableError = isRetryableError;
204080
204080
  var esm_default = axiosRetry;
204081
204081
 
204082
+ // ../utils/src/dashboard-api/axios-aux.ts
204083
+ import https2 from "node:https";
204084
+ import { readFileSync } from "node:fs";
204085
+ import { rootCertificates } from "node:tls";
204086
+
204082
204087
  // ../../node_modules/.pnpm/hpagent@1.2.0/node_modules/hpagent/index.mjs
204083
204088
  var import_index2 = __toESM(require_hpagent(), 1);
204084
204089
  var HttpProxyAgent = import_index2.default.HttpProxyAgent;
@@ -204088,7 +204093,20 @@ var HttpsProxyAgent = import_index2.default.HttpsProxyAgent;
204088
204093
  var import_lodash = __toESM(require_lodash(), 1);
204089
204094
  var { pickBy } = import_lodash.default;
204090
204095
  function getProxyUrl() {
204091
- return process.env.SOCKET_CLI_API_PROXY;
204096
+ return process.env.SOCKET_CLI_API_PROXY ?? process.env.HTTPS_PROXY ?? process.env.https_proxy ?? process.env.HTTP_PROXY ?? process.env.http_proxy;
204097
+ }
204098
+ function getExtraCaCerts() {
204099
+ if (process.env.NODE_EXTRA_CA_CERTS) {
204100
+ return void 0;
204101
+ }
204102
+ const certPath = process.env.SSL_CERT_FILE;
204103
+ if (!certPath) return void 0;
204104
+ try {
204105
+ const extraCerts = readFileSync(certPath, "utf-8");
204106
+ return [...rootCertificates, extraCerts];
204107
+ } catch {
204108
+ return void 0;
204109
+ }
204092
204110
  }
204093
204111
  function handleError(error, errorMessage, throwErr = true) {
204094
204112
  if (error instanceof AxiosError2) {
@@ -204101,9 +204119,15 @@ function handleError(error, errorMessage, throwErr = true) {
204101
204119
  }
204102
204120
  }
204103
204121
  var proxyUrl = getProxyUrl();
204122
+ var ca = getExtraCaCerts();
204104
204123
  var axiosClient = axios_default.create({
204105
- httpsAgent: proxyUrl ? new HttpsProxyAgent({ proxy: proxyUrl }) : void 0,
204106
- httpAgent: proxyUrl ? new HttpProxyAgent({ proxy: proxyUrl }) : void 0
204124
+ httpsAgent: proxyUrl ? new HttpsProxyAgent({ proxy: proxyUrl, ...ca ? { ca, proxyConnectOptions: { ca } } : {} }) : ca ? new https2.Agent({ ca }) : void 0,
204125
+ httpAgent: proxyUrl ? new HttpProxyAgent({ proxy: proxyUrl }) : void 0,
204126
+ // Disable axios's built-in proxy detection from HTTPS_PROXY/HTTP_PROXY env vars.
204127
+ // When hpagent is configured, axios's own proxy handling would conflict with it.
204128
+ // When no proxy is configured, we don't want axios silently routing through an env proxy
204129
+ // without proper TLS/CA handling.
204130
+ proxy: false
204107
204131
  });
204108
204132
  esm_default(axiosClient, {
204109
204133
  retries: 7,
@@ -204685,7 +204709,7 @@ function getSocketAPI() {
204685
204709
 
204686
204710
  // ../utils/src/tool-extractor.ts
204687
204711
  import { createHash } from "node:crypto";
204688
- import { createReadStream, createWriteStream as createWriteStream3, readFileSync, statSync as statSync2 } from "node:fs";
204712
+ import { createReadStream, createWriteStream as createWriteStream3, readFileSync as readFileSync2, statSync as statSync2 } from "node:fs";
204689
204713
  import { copyFile, cp as cp2, mkdir as mkdir4, writeFile as writeFile2 } from "node:fs/promises";
204690
204714
  import { tmpdir as tmpdir2 } from "node:os";
204691
204715
  import { basename as basename3, dirname as dirname5, join as join5 } from "node:path";
@@ -211677,7 +211701,7 @@ function getCliVersion() {
211677
211701
  if (cliVersion) return cliVersion;
211678
211702
  try {
211679
211703
  const packageJsonPath = isNexeMode() ? join5(NEXE_VIRTUAL_FS_ROOT, "package.json") : join5(dirname5(dirname5(dirname5(dirname5(__filename)))), "npm-package-cli", "package.json");
211680
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
211704
+ const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
211681
211705
  if (process.env.ALWAYS_REEXTRACT_TOOLS === "true") {
211682
211706
  logger.info("ALWAYS_REEXTRACT_TOOLS is set to true, re-extracting tools");
211683
211707
  const randomVersion = Math.random().toString().slice(2, 8);
@@ -211706,7 +211730,7 @@ function loadChecksums() {
211706
211730
  throw new Error("Tool extraction is only supported in nexe mode");
211707
211731
  }
211708
211732
  const checksumsPath = join5(NEXE_VIRTUAL_FS_ROOT, "checksums.json");
211709
- return JSON.parse(readFileSync(checksumsPath, "utf-8"));
211733
+ return JSON.parse(readFileSync2(checksumsPath, "utf-8"));
211710
211734
  } catch (error) {
211711
211735
  logger.warn("Failed to load checksums.json:", error);
211712
211736
  throw new Error(
@@ -224978,7 +225002,7 @@ async function runCommandResolveStdOut4(cmd, dir, options) {
224978
225002
 
224979
225003
  // ../utils/dist/package-utils.js
224980
225004
  import { parse as parse5, join as join11, resolve as resolve17, normalize as normalize2, dirname as dirname12, basename as basename5, relative as relative5 } from "path";
224981
- import { existsSync as existsSync11, readFileSync as readFileSync2, readdirSync as readdirSync2, statSync as statSync3, writeFileSync } from "fs";
225005
+ import { existsSync as existsSync11, readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync3, writeFileSync } from "fs";
224982
225006
  function getPackageJsonObject(workspaceRoot) {
224983
225007
  const packageJSONContent = getPackageJsonContent(workspaceRoot);
224984
225008
  if (!packageJSONContent)
@@ -224988,7 +225012,7 @@ function getPackageJsonObject(workspaceRoot) {
224988
225012
  function getPackageJsonContent(workspaceRoot) {
224989
225013
  const packageJsonPath = getPackageJSONPath(workspaceRoot);
224990
225014
  if (existsSync11(packageJsonPath))
224991
- return readFileSync2(packageJsonPath, "utf8");
225015
+ return readFileSync3(packageJsonPath, "utf8");
224992
225016
  return void 0;
224993
225017
  }
224994
225018
  function getPackageJSONPath(workspaceRoot) {
@@ -225598,7 +225622,7 @@ import { relative as relative9, resolve as resolve23 } from "path";
225598
225622
 
225599
225623
  // ../utils/src/package-utils.ts
225600
225624
  import { parse as parse7, join as join13, resolve as resolve22, normalize as normalize3, dirname as dirname13, basename as basename6, relative as relative8 } from "path";
225601
- import { existsSync as existsSync15, readFileSync as readFileSync3, readdirSync as readdirSync3, statSync as statSync4, writeFileSync as writeFileSync2 } from "fs";
225625
+ import { existsSync as existsSync15, readFileSync as readFileSync4, readdirSync as readdirSync3, statSync as statSync4, writeFileSync as writeFileSync2 } from "fs";
225602
225626
  function setFieldInPackageJson(workspaceRoot, field, value2) {
225603
225627
  const packageJSONContentObj = getPackageJsonObject2(workspaceRoot);
225604
225628
  if (!packageJSONContentObj) return void 0;
@@ -225615,7 +225639,7 @@ function writePackageJsonContent(workspaceRoot, packageJsonContent) {
225615
225639
  }
225616
225640
  function getPackageJsonContent2(workspaceRoot) {
225617
225641
  const packageJsonPath = getPackageJSONPath2(workspaceRoot);
225618
- if (existsSync15(packageJsonPath)) return readFileSync3(packageJsonPath, "utf8");
225642
+ if (existsSync15(packageJsonPath)) return readFileSync4(packageJsonPath, "utf8");
225619
225643
  return void 0;
225620
225644
  }
225621
225645
  function getPackageJSONPath2(workspaceRoot) {
@@ -230426,7 +230450,7 @@ import assert14 from "node:assert";
230426
230450
  var import_good_enough_parser4 = __toESM(require_cjs(), 1);
230427
230451
  init_ruby_lang();
230428
230452
  import { resolve as resolve32, dirname as dirname21, relative as relative14 } from "node:path";
230429
- import { existsSync as existsSync20, readFileSync as readFileSync4, readdirSync as readdirSync4 } from "node:fs";
230453
+ import { existsSync as existsSync20, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
230430
230454
  init_gemspec_utils();
230431
230455
  var booleanQuery2 = import_good_enough_parser4.query.alt(
230432
230456
  import_good_enough_parser4.query.sym(/^true|false$/, (ctx, { value: value2, offset }) => {
@@ -230542,7 +230566,7 @@ var evalGemfileQuery = import_good_enough_parser4.query.sym("eval_gemfile").join
230542
230566
  const rootDir = ctx.gemfile.rootDir;
230543
230567
  const file = relative14(rootDir, resolve32(rootDir, dirname21(ctx.gemfile.file), pathEvaluated));
230544
230568
  if (!existsSync20(resolve32(rootDir, file))) return ctx;
230545
- const sourceText = readFileSync4(resolve32(rootDir, file), "utf-8");
230569
+ const sourceText = readFileSync5(resolve32(rootDir, file), "utf-8");
230546
230570
  const parser2 = import_good_enough_parser4.lang.createLang(lang3);
230547
230571
  const cursor = parser2.parse(sourceText);
230548
230572
  const otherCtx = parser2.query(cursor, treeQuery4, {
@@ -230634,7 +230658,7 @@ var gemspecQuery = import_good_enough_parser4.query.sym("gemspec").opt(
230634
230658
  const gemspecFullPath = resolve32(searchDir, gemspecFile);
230635
230659
  const gemspecRelativePath = relative14(rootDir, gemspecFullPath);
230636
230660
  try {
230637
- const sourceText = readFileSync4(gemspecFullPath, "utf-8");
230661
+ const sourceText = readFileSync5(gemspecFullPath, "utf-8");
230638
230662
  const gemspec = parseGemspec(rootDir, gemspecRelativePath, sourceText);
230639
230663
  ctx.gemspecs.push(gemspec);
230640
230664
  ctx.gems.push(...gemspec.dependencies);
@@ -251718,7 +251742,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
251718
251742
  }
251719
251743
 
251720
251744
  // dist/version.js
251721
- var version3 = "14.12.206";
251745
+ var version3 = "14.12.208";
251722
251746
 
251723
251747
  // dist/cli-core.js
251724
251748
  var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coana-tech/cli",
3
- "version": "14.12.206",
3
+ "version": "14.12.208",
4
4
  "description": "Coana CLI",
5
5
  "type": "module",
6
6
  "bin": {