A node wrapper for Netsuite Suitescript Development Framework CLI
npm install node-sdf



This is a node wrapper for Netsuite Suitescript Development Framework CLI. It provides the necessary dependencies to run the sdfcli in an encapsulated manner (NO global JAVA installation required!).
Additionally a wrapper that can be used to create project structures and call sdf commands in a node script is provided through methods in index.js.
:rotating_light: The commands and cli work only for the 2018.1 NS release and are only tested on MacOS X and Linux
- node-sdf
- Installation
- Usage
- Methods node wrapper
- sdf
- sdfCreateAccountCustomizationProject
- sdfCreateSuiteAppProject
- General use CLI
- Install and use commands globally
- Use commands locally
- Commands
- Requirements
- License
- Maintainer
- Whenever editing the repository
``bash`
npm install # downloads and installs the sdfcli dependencies
in a node script.#### sdf
> Please refer to the official NetSuite documentation for information about the commands and their required params
The
sdf method can be used to directly call sdfcli commands:`javascript
sdf('cmd', 'password', { path: 'path' }) // timeout in ms can be specified as last param (stalls hanging processes after 10s by default)
.then(res => console.log(res))
.catch(err => console.error(err));
`#### sdfCreateAccountCustomizationProject
The
sdfCreateAccountCustomizationProject creates the sdf boilerplate for an ACCOUNTCUSTOMIZATION in the specified directory:`javascript
const res = sdfCreateAccountCustomizationProject('NAME', 'PATH');
/**
* {
* type: 'ACCOUNTCUSTOMIZATION',
* dir: '/absolutepath/PATH/NAME',
* filebase: '/absolutepath/PATH/NAME/FileCabinet/SuiteScripts'
* name: 'NAME',
* values: { name: 'NAME' }
* }
*/
`#### sdfCreateSuiteAppProject
The
sdfCreateSuiteAppProject creates the sdf boilerplate for a SUITEAPP in the specified directory:`javascript
const res = sdfCreateSuiteAppProject('NAME', 'ID', 'VERSION', 'PUBLISHERID', 'PATH');
/**
* {
* type: 'SUITEAPP',
* dir: '/absolutepath/PATH/PUBLISHERID.ID',
* filebase: '/absolutepath/PATH/NAME/FileCabinet/SuiteApps'
* name: 'PUBLISHERID.ID',
* values: {
* publisherId: 'PUBLISHERID',
* id: 'ID',
* name: 'NAME',
* version: 'VERSION'
* }
* }
*/
`
$3
The idea is to use the NetSuite sdfcli in a node environment and provide a way to generate boilerplate code for SDF projects #### Install and use commands globally
`bash
npm install -g
sdfcli [options]
sdfcli-createproject [options]
`#### Use commands locally
`bash
./sdfcli [options]
./sdfcli-createproject [options]
`#### Commands
As the commands are routed through to the original NetSuite sdfcli - the following commands are implemented.
> Please refer to the official NetSuite documentation for information about the commands and their required params
| Command | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
adddependencies | Adds missing dependencies to the manifet file. |
| deploy | Deploys the folder or zip file that contains the SuiteCloud project. |
| importbundle | Imports a customization bundle from your NetSuite account and converts it to an ACCOUNTCUSTOMIZATION. |
| importfiles | Imports files from your NetSuite account to the ACCOUNTCUSTOMIZATION. |
| importobjects | Imports custom objects from your NetSuite account to the SuiteCloud project. |
| listbundles | Lists the customization bundles that were created in your NetSuite account. |
| listfiles | Lists the files in the File Cabinet of your NetSuite account. |
| listmissingdependencies | Lists the missing dependencies in the SuiteCloud project. |
| listobjects | Lists the custom objects in your NetSuite account. |
| preview | Previews the deployment steps of a folder or zip file that contains the SuiteCloud project. |
| project | Sets the default project folder or zip file for CLI. |
| update | Updates existing custom objects in the SuiteCloud project folder with the custom objects in your NetSuite account. |
| updatecustomrecordwithinstances | Updates the custom record object and its instances in the SuiteCloud project. |
| validate | Validates the folder or zip file that contains the SuiteCloud project. |
Requirements
- NetSuite account settings have to be updated for SDF
- This project needs node > 8.License
MIT
© mycs 2017Maintainer
jroehlWhenever editing the repository
Should you update the readme, use npm script semantic-release` to check if a new version has to be set and to publish it to npm.