(actionScripts)
| 19 | } |
| 20 | |
| 21 | static async writeActionScriptsToFile(actionScripts) { |
| 22 | const buildDir = path.resolve(__dirname, "../build"); |
| 23 | try { |
| 24 | await fs.promises.mkdir(buildDir); |
| 25 | } catch (e) {} |
| 26 | |
| 27 | for (const script of actionScripts) { |
| 28 | const { name } = script; |
| 29 | delete script.variables.wallet; |
| 30 | const scriptJSON = JSON.stringify(script, null, 2); |
| 31 | fs.writeFile( |
| 32 | path.resolve(buildDir, `${name}.json`), |
| 33 | scriptJSON, |
| 34 | "utf8", |
| 35 | (err) => { |
| 36 | if (err) { |
| 37 | console.error(err); |
| 38 | } |
| 39 | } |
| 40 | ); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | static async writeTestToFile(actionScriptName, testYAML, category) { |
| 45 | const testDir = path.resolve(__dirname, "../action-script-tests"); |
no outgoing calls
no test coverage detected