Streamline code styles (#384)

* feat: streamline code styles

* feat: spacing for comments and return statements

* chore: enforce camelcase

* fix: remove npm lock file

* fix: add integrity test

* fix: remove logfile

* chore: update node in test workflow
This commit is contained in:
Webber Takken
2022-04-12 00:43:41 +02:00
committed by GitHub
parent 4be5d2ddf4
commit 5ae03dfef6
57 changed files with 198 additions and 7028 deletions

View File

@@ -30,6 +30,7 @@ export class CloudRunnerBuildCommandProcessor {
throw error;
}
}
return output.filter((x) => x.step !== undefined && x.hook !== undefined && x.hook.length > 0);
}
}

View File

@@ -4,7 +4,7 @@ import { CloudRunner } from '../..';
export class CloudRunnerFolders {
public static readonly repositoryFolder = 'repo';
// only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute /
// Only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute /
public static get uniqueCloudRunnerJobFolderAbsolute(): string {
return path.join(`/`, CloudRunnerFolders.buildVolumeFolder, CloudRunner.buildParameters.buildGuid);

View File

@@ -4,6 +4,7 @@ import CloudRunnerConstants from './cloud-runner-constants';
class CloudRunnerNamespace {
static generateGuid(runNumber: string | number, platform: string) {
const nanoid = customAlphabet(CloudRunnerConstants.alphabet, 4);
return `${runNumber}-${platform.toLowerCase().replace('standalone', '')}-${nanoid()}`;
}
}

View File

@@ -5,6 +5,7 @@ const formatFunction = (value, arguments_) => {
for (const element of arguments_) {
value = value.replace(`{${element.key}}`, element.value);
}
return value;
};
@@ -22,6 +23,7 @@ class CloudRunnerQueryOverride {
) {
return CloudRunnerQueryOverride.queryOverrides[alternativeKey];
}
return;
}
@@ -31,6 +33,7 @@ class CloudRunnerQueryOverride {
const doesInclude =
Input.readInputFromOverrideList().split(',').includes(query) ||
Input.readInputFromOverrideList().split(',').includes(Input.ToEnvVarFormat(query));
return doesInclude ? true : false;
} else {
return true;

View File

@@ -8,6 +8,7 @@ export class CloudRunnerSystem {
RemoteClientLogger.log(element);
}
}
return await new Promise<string>((promise, throwError) => {
let output = '';
const child = exec(command, (error, stdout, stderr) => {

View File

@@ -10,6 +10,7 @@ class DependencyOverrideService {
return false;
}
}
return true;
}
public static async TryStartDependencies() {

View File

@@ -22,6 +22,7 @@ export class LfsHashing {
.replace(' .lfs-assets-guid', '')
.replace(/\n/g, ``),
};
return lfsHashes;
} catch (error) {
throw error;
@@ -34,6 +35,7 @@ export class LfsHashing {
.replace(/\n/g, '')
.split(` `)[0];
process.chdir(startPath);
return result;
}

View File

@@ -40,8 +40,10 @@ export class TaskParameterSerializer {
array = array.map((x) => {
x.name = Input.ToEnvVarFormat(x.name);
x.value = `${x.value}`;
return x;
});
return array;
}
@@ -54,6 +56,7 @@ export class TaskParameterSerializer {
});
}
array.push({ name: 'buildParameters', value: JSON.stringify(CloudRunner.buildParameters) });
return array;
}
@@ -67,6 +70,7 @@ export class TaskParameterSerializer {
});
}
}
return array;
}
@@ -86,6 +90,7 @@ export class TaskParameterSerializer {
};
}),
);
return array;
}
private static getValue(key) {
@@ -104,6 +109,7 @@ export class TaskParameterSerializer {
ParameterValue: value,
});
}
return array;
}
}