cispacempt-v2 0.0.3 → 0.0.5

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/package.json +1 -1
  2. package/src/index.js +6 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "main": "src/index.js",
3
3
  "name": "cispacempt-v2",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "description": "Fast CI engine for CodespaceMPT with script stages and file system hooks",
6
6
  "author": "argentidev",
7
7
  "license": "MIT",
package/src/index.js CHANGED
@@ -89,8 +89,8 @@ const path = require("path"),
89
89
  module.exports = {
90
90
 
91
91
  parse: async function (ciScript, repoName, fileSystem, tmp = true) {
92
- const isLinux = os.platform() === "linux";
93
- const isRoot = process.getuid && process.getuid() === 0;
92
+ let errorIn = [];
93
+ let successIn = [];
94
94
  let finalResult = [];
95
95
  let timeTaken;
96
96
  let combinedExitCode = 0;
@@ -174,8 +174,10 @@ module.exports = {
174
174
  if (result.error) {
175
175
  output += `Error: ${result.error}\n`;
176
176
  output += `${result.stderr ? result.stderr : ''}\n`;
177
+ !errorIn.includes(stage.name) ? errorIn.push(stage.name) : null;
177
178
  } else {
178
179
  output += `${result.stdout ? result.stdout : ''}\n`;
180
+ !successIn.includes(stage.name) ? successIn.push(stage.name) : null;
179
181
  }
180
182
 
181
183
  if (result.exitCode !== 0) {
@@ -205,6 +207,8 @@ module.exports = {
205
207
  version: os.release(),
206
208
  arch: os.arch(),
207
209
  },
210
+ errorIn: errorIn.length > 0 ? errorIn : null,
211
+ successIn: successIn.length > 0 ? successIn : null,
208
212
  };
209
213
 
210
214
  cleanUpAndRespond(tempDir);