|
| 1 | +import * as fs from 'node:fs'; |
1 | 2 | import require$$0 from 'os'; |
2 | 3 | import require$$0$1 from 'crypto'; |
3 | 4 | import require$$1 from 'fs'; |
@@ -27,7 +28,6 @@ import require$$6 from 'string_decoder'; |
27 | 28 | import require$$0$9 from 'diagnostics_channel'; |
28 | 29 | import require$$2$2 from 'child_process'; |
29 | 30 | import require$$6$1 from 'timers'; |
30 | | -import * as fs from 'node:fs'; |
31 | 31 |
|
32 | 32 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; |
33 | 33 |
|
@@ -1719,7 +1719,7 @@ function requireTimers () { |
1719 | 1719 | return timers; |
1720 | 1720 | } |
1721 | 1721 |
|
1722 | | -var main = {exports: {}}; |
| 1722 | +var main$1 = {exports: {}}; |
1723 | 1723 |
|
1724 | 1724 | var sbmh; |
1725 | 1725 | var hasRequiredSbmh; |
@@ -3257,7 +3257,7 @@ function requireUrlencoded () { |
3257 | 3257 | var hasRequiredMain; |
3258 | 3258 |
|
3259 | 3259 | function requireMain () { |
3260 | | - if (hasRequiredMain) return main.exports; |
| 3260 | + if (hasRequiredMain) return main$1.exports; |
3261 | 3261 | hasRequiredMain = 1; |
3262 | 3262 |
|
3263 | 3263 | const WritableStream = require$$0$7.Writable; |
@@ -3338,12 +3338,12 @@ function requireMain () { |
3338 | 3338 | this._parser.write(chunk, cb); |
3339 | 3339 | }; |
3340 | 3340 |
|
3341 | | - main.exports = Busboy; |
3342 | | - main.exports.default = Busboy; |
3343 | | - main.exports.Busboy = Busboy; |
| 3341 | + main$1.exports = Busboy; |
| 3342 | + main$1.exports.default = Busboy; |
| 3343 | + main$1.exports.Busboy = Busboy; |
3344 | 3344 |
|
3345 | | - main.exports.Dicer = Dicer; |
3346 | | - return main.exports; |
| 3345 | + main$1.exports.Dicer = Dicer; |
| 3346 | + return main$1.exports; |
3347 | 3347 | } |
3348 | 3348 |
|
3349 | 3349 | var constants$3; |
@@ -27247,43 +27247,44 @@ function requireCore () { |
27247 | 27247 |
|
27248 | 27248 | var coreExports = requireCore(); |
27249 | 27249 |
|
27250 | | -(async () => { |
27251 | | - try { |
27252 | | - const file = coreExports.getInput('file', { required: true }); |
27253 | | - console.log('file:', file); |
27254 | | - const keys = coreExports.getInput('keys', { required: true }).split('\n'); |
27255 | | - console.log('keys:', keys); |
27256 | | - const values = coreExports.getInput('values', { required: true }).split('\n'); |
27257 | | - console.log('values:', values); |
27258 | | - const seperator = coreExports.getInput('seperator', { |
27259 | | - required: true, |
27260 | | - trimWhitespace: false, |
27261 | | - }); |
27262 | | - console.log('seperator:', seperator); |
27263 | | - if (keys.length !== values.length) { |
27264 | | - return coreExports.setFailed('Keys and Values length are not equal.'); |
| 27250 | +async function main() { |
| 27251 | + const file = coreExports.getInput('file', { required: true }); |
| 27252 | + console.log('file:', file); |
| 27253 | + const keys = coreExports.getInput('keys', { required: true }).split('\n'); |
| 27254 | + console.log('keys:', keys); |
| 27255 | + const values = coreExports.getInput('values', { required: true }).split('\n'); |
| 27256 | + console.log('values:', values); |
| 27257 | + const seperator = coreExports.getInput('seperator', { |
| 27258 | + required: true, |
| 27259 | + trimWhitespace: false, |
| 27260 | + }); |
| 27261 | + console.log('seperator:', seperator); |
| 27262 | + if (keys.length !== values.length) { |
| 27263 | + return coreExports.setFailed('Keys and Values length are not equal.'); |
| 27264 | + } |
| 27265 | + const fileData = fs.readFileSync(file); |
| 27266 | + const data = JSON.parse(fileData.toString()); |
| 27267 | + for (let i = 0; i < keys.length; i++) { |
| 27268 | + console.log(`--- ${i + 1}: ${keys[i]}: ${values[i]}`); |
| 27269 | + const key = keys[i].split(seperator); |
| 27270 | + console.log('key:', key); |
| 27271 | + const value = key.reduce((x, y) => x?.[y] ?? null, data); |
| 27272 | + console.log('value:', value); |
| 27273 | + if (values[i] == value) { |
| 27274 | + coreExports.info(`\u001b[32m"${values[i]}" == "${value}"`); |
27265 | 27275 | } |
27266 | | - const fileData = fs.readFileSync(file); |
27267 | | - const data = JSON.parse(fileData.toString()); |
27268 | | - for (let i = 0; i < keys.length; i++) { |
27269 | | - console.log(`--- ${i + 1}: ${keys[i]}: ${values[i]}`); |
27270 | | - const key = keys[i].split(seperator); |
27271 | | - console.log('key:', key); |
27272 | | - const value = key.reduce((x, y) => x?.[y] ?? null, data); |
27273 | | - console.log('value:', value); |
27274 | | - if (values[i] == value) { |
27275 | | - coreExports.info(`\u001b[32m"${values[i]}" == "${value}"`); |
27276 | | - } |
27277 | | - else { |
27278 | | - coreExports.info(`\u001b[31;1m"${values[i]}" != "${value}"`); |
27279 | | - return coreExports.setFailed('One or more values were not equal.'); |
27280 | | - } |
| 27276 | + else { |
| 27277 | + coreExports.info(`\u001b[31;1m"${values[i]}" != "${value}"`); |
| 27278 | + return coreExports.setFailed('One or more values were not equal.'); |
27281 | 27279 | } |
27282 | | - coreExports.info(`\u001b[32;1mFinished Success`); |
27283 | | - } |
27284 | | - catch (e) { |
27285 | | - console.log(e); |
27286 | | - if (e instanceof Error) |
27287 | | - coreExports.setFailed(e.message); |
27288 | 27280 | } |
27289 | | -})(); |
| 27281 | + coreExports.info(`\u001b[32;1mFinished Success`); |
| 27282 | +} |
| 27283 | +try { |
| 27284 | + await main(); |
| 27285 | +} |
| 27286 | +catch (e) { |
| 27287 | + console.log(e); |
| 27288 | + if (e instanceof Error) |
| 27289 | + coreExports.setFailed(e.message); |
| 27290 | +} |
0 commit comments