@canyonjs/cli 1.0.31 → 1.0.32

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 +14 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import node_fs from "node:fs";
4
4
  import node_path from "node:path";
5
5
  import axios from "axios";
6
6
  var package_namespaceObject = {
7
- rE: "1.0.31"
7
+ rE: "1.0.32"
8
8
  };
9
9
  function mergeNumberMaps(a = {}, b = {}) {
10
10
  const result = {
@@ -89,6 +89,15 @@ async function mapCommand(params, options) {
89
89
  const env_branch = process.env.CI_COMMIT_BRANCH;
90
90
  const env_buildID = process.env.CI_JOB_ID;
91
91
  const env_buildProvider = 'gitlab_runner';
92
+ let diffData;
93
+ const diffJsonPath = node_path.resolve(process.cwd(), 'diff.json');
94
+ if (node_fs.existsSync(diffJsonPath)) try {
95
+ const diffJsonContent = node_fs.readFileSync(diffJsonPath, 'utf-8');
96
+ diffData = JSON.parse(diffJsonContent);
97
+ console.log(`Found diff.json file: ${diffJsonPath}`);
98
+ } catch (error) {
99
+ console.warn(`Failed to read or parse diff.json: ${error}`);
100
+ }
92
101
  let sceneMap;
93
102
  if (scene && Array.isArray(scene)) {
94
103
  sceneMap = {};
@@ -113,13 +122,16 @@ async function mapCommand(params, options) {
113
122
  buildTarget: build_target || '',
114
123
  coverage: Object.keys(data),
115
124
  build: {
116
- provider: isGitHubActions ? "github_actions" : env_buildProvider,
125
+ provider: isGitHubActions ? 'github_actions' : env_buildProvider,
117
126
  event: isGitHubActions ? githubEvent : void 0,
118
127
  buildID: env_buildID,
119
128
  branch: env_branch
120
129
  },
121
130
  ...sceneMap && {
122
131
  scene: sceneMap
132
+ },
133
+ ...diffData && {
134
+ diff: diffData
123
135
  }
124
136
  };
125
137
  if ('true' === debug) console.log(p);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canyonjs/cli",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {