Refactor parameter serialization into TaskParameterSerializer

pull/310/head
Frostebite 2021-12-23 19:05:45 +00:00
parent 19a80caf31
commit f0dbb459ff
4 changed files with 4 additions and 4 deletions

2
dist/index.js vendored
View File

@ -2393,7 +2393,7 @@ class TaskParameterSerializer {
array.push({ name: 'buildParameters', value: JSON.stringify(cloud_runner_state_1.CloudRunnerState.buildParams) }); array.push({ name: 'buildParameters', value: JSON.stringify(cloud_runner_state_1.CloudRunnerState.buildParams) });
const input = Object.getOwnPropertyNames(__1.Input); const input = Object.getOwnPropertyNames(__1.Input);
for (const element of input) { for (const element of input) {
if (typeof __1.Input[element] !== 'function') { if (typeof __1.Input[element] != 'function') {
array.push({ array.push({
name: element, name: element,
value: `${__1.Input[element]}`, value: `${__1.Input[element]}`,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@ describe('Cloud Runner', () => {
expect(file).toContain(JSON.stringify(buildParameter)); expect(file).toContain(JSON.stringify(buildParameter));
const inputKeys = Object.getOwnPropertyNames(Input); const inputKeys = Object.getOwnPropertyNames(Input);
for (const element of inputKeys) { for (const element of inputKeys) {
if (Input[element] !== undefined) { if (Input[element] !== undefined && typeof Input[element] != 'function') {
expect(file).toContain(`${element}=${Input[element]}`); expect(file).toContain(`${element}=${Input[element]}`);
} }
} }

View File

@ -73,7 +73,7 @@ export class TaskParameterSerializer {
array.push({ name: 'buildParameters', value: JSON.stringify(CloudRunnerState.buildParams) }); array.push({ name: 'buildParameters', value: JSON.stringify(CloudRunnerState.buildParams) });
const input = Object.getOwnPropertyNames(Input); const input = Object.getOwnPropertyNames(Input);
for (const element of input) { for (const element of input) {
if (typeof Input[element] !== 'function') { if (typeof Input[element] != 'function') {
array.push({ array.push({
name: element, name: element,
value: `${Input[element]}`, value: `${Input[element]}`,