Skip to content

Remote NetSuite script evaluation with Debugger tool.

License

Notifications You must be signed in to change notification settings

vinikira/ns-eval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ns-eval

Remote NetSuite script evaluation with Debugger tool.

Installing

NPM

npm install ns-eval

Get started

Eval string code

require('dotenv').config()

const nsEval = require('ns-eval')({
    accountId: process.env.NSEVAL_ACCOUNT_ID,
    email: process.env.NSEVAL_EMAIL,
    password: process.env.NSEVAL_PASSWORD
})

nsEval('log.debug("testing", "this is just a test.")')
    .then(response => {
        const consoleDebuggerMessages = response.console.map(cout => `${cout.subject}: ${cout.details || cout.timestamp}`)

        console.log(consoleDebuggerMessages.join('\n'))
    })
.catch(console.log)

/**
 * output:
 * testing: this is just a test.
 * usage 0, time 1085: 5/1/2018 17:21:40.357
 */

Eval script file

require('dotenv').config()
const fs = require('fs')

const nsEval = require('ns-eval')({
    accountId: process.env.NSEVAL_ACCOUNT_ID,
    email: process.env.NSEVAL_EMAIL,
    password: process.env.NSEVAL_PASSWORD
})

const scriptFileContent = fs.readFileSync('your-script-file.js', 'utf-8')

nsEval(scriptFileContent)
    .then(response => {
        //your logic here
    })
    .catch(console.log)

About

Remote NetSuite script evaluation with Debugger tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published