@canyonjs/cli 1.0.21 → 1.0.24

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import node_fs from "node:fs";
5
5
  import node_path from "node:path";
6
6
  import axios from "axios";
7
7
  var package_namespaceObject = {
8
- rE: "1.0.21"
8
+ rE: "1.0.24"
9
9
  };
10
10
  function mergeNumberMaps(a = {}, b = {}) {
11
11
  const result = {
@@ -61,6 +61,7 @@ function mergeCoverageMaps(target = {}, source = {}) {
61
61
  return out;
62
62
  }
63
63
  async function mapCommand(params, options) {
64
+ log('Current working directory:', process.cwd());
64
65
  const { dsn, repo_id: repoID, sha, provider, build_target, debug, instrument_cwd, filter } = params;
65
66
  if (!node_fs.existsSync(node_path.resolve(process.cwd(), '.canyon_output'))) return void log('不存在');
66
67
  const files = node_fs.readdirSync(node_path.resolve(process.cwd(), '.canyon_output'));
@@ -101,8 +102,11 @@ async function mapCommand(params, options) {
101
102
  await axios.post(dsn, {
102
103
  ...p,
103
104
  coverage: data
104
- }).then((r)=>r).catch((err)=>{
105
- if (err.response) log(err.response);
105
+ }).then((r)=>{
106
+ log(JSON.stringify(r.data, null, 2));
107
+ return r;
108
+ }).catch((err)=>{
109
+ log(String(err));
106
110
  return err;
107
111
  });
108
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canyonjs/cli",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {