DepSDF
NetSuite SuiteCloud Development Framework (SDF) Deployment File Manager
Overview
DepSDF is designed to help manage <deploy.xml> files in NetSuite SDF projects, which are used by the following SDF tools provided by NetSuite:
- SuiteCloud CLI for Node.js
- SuiteCloud CLI for Java
All features are available by selecting one or more files and/or folders in the Explorer window and then either right-clicking on those files/folders or typing DepSDF
in the Command Palette (F1
).
Features
DepSDF includes the following features:
DepSDF: Open <deploy.xml>
Opens the <deploy.xml> file in the editor.
DepSDF: Create/Reset <deploy.xml>
Creates a <deploy.xml> file (if it does not exist in the project) and resets it to its initial state.
<deploy></deploy>
DepSDF: Backup/Restore <deploy.xml>
To backup an existing <deploy.xml> file, right-click on <deploy.xml> and select this command. An input prompt will appear. If a value is entered, that value and the current date and time, as a string, will prefix the filename of the <deploy.xml> backup file. If no value is entered, only the current date and time, as a string, will be used.
- EXAMPLE:
'mybackup'
-> mybackup.20240101_1030_050.deploy.xml
- EXAMPLE:
no value
-> 20240101_1030_050.deploy.xml
To restore an existing <deploy.xml> backup file, right-click on a <deploy.xml> backup file and select this command. If an existing <deploy.xml> file already exists, an input prompt will appear. Type OK
to overwrite the <deploy.xml> file.
DepSDF: Add File(s)/Folder(s) To <deploy.xml>
To add files/folders to <deploy.xml>, select one or more files and/or folders in the Explorer window and select this command.
DepSDF: Remove File(s)/Folder(s) From <deploy.xml>
To remove files/folders from <deploy.xml>, select one or more files and/or folders in the Explorer window and select this command.
Requirements
To use DepSDF, ensure at least one of the following SuiteCloud CLI files is present in the project folder:
- <suitecloud.config.js>
- <.sdfcli.json>
Settings
Before using DepSDF, review and set the following extension settings.
Backup/Restore <deploy.xml> Settings
Dep SDF: On Backup Reset Deploy XML
DEFAULT VALUE: false (unchecked)
If true (checked)
, after selecting the DepSDF: Backup/Restore <deploy.xml> command and creating a backup of <deploy.xml>, reset <deploy.xml> to its initial state.
If false (unchecked)
, the <deploy.xml> file will remain intact.
Dep SDF: On Restore Delete Backup Deploy XML
DEFAULT VALUE: false (unchecked)
If true (checked)
, after selecting the DepSDF: Backup/Restore <deploy.xml> command and restoring <deploy.xml> from a <deploy.xml> backup file, delete the <deploy.xml> backup file.
If false (unchecked)
, the <deploy.xml> backup file will remain intact.
Folder Path Settings
A standard SDF project generated by the SuiteCloud CLI will have the following folder structure:
├── src
│ ├── AccountConfiguration
│ ├── FileCabinet
│ │ ├── SuiteScripts
│ ├── Objects
│ ├── Translations
│ ├── deploy.xml
│ ├── manifest.xml
├── .gitignore
└── suitecloud.config.js
The file <suitecloud.config.js> is in the root folder with the rest of the project files in the src
folder. In <suitecloud.config.js>, you see that defaultProjectFolder
is set to "src"
, pointing everything to the src
folder.
module.exports = {
defaultProjectFolder: "src",
commands: {}
};
The default values listed for all of the settings below are designed to work with this type of project setup, but can be changed as needed for other project setups. See the Example SDF Project Setups section for additional examples.
Dep SDF: Folder Path For Default Project Folder
DEFAULT VALUE: /src
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the default project folder.
Dep SDF: Folder Path For Source Script Files
DEFAULT VALUE: /src/FileCabinet/SuiteScripts
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the folder containing the source SuiteScript files.
A standard SDF project generated by the SuiteCloud CLI, the source SuiteScript files and the distribution SuiteScript files are one and the same.
Dep SDF: Folder Path For Distribution Script Files
DEFAULT VALUE: /src/FileCabinet/SuiteScripts
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the folder containing the distribution SuiteScript files.
A standard SDF project generated by the SuiteCloud CLI, the source SuiteScript files and the distribution SuiteScript files are one and the same.
Dep SDF: Folder Path For Account Configuration
DEFAULT VALUE: /src/AccountConfiguration
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the AccountConfiguration folder.
Dep SDF: Folder Path For File Cabinet
DEFAULT VALUE: /src/FileCabinet
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the FileCabinet folder.
Dep SDF: Folder Path For Objects
DEFAULT VALUE: /src/Objects
The folder path (relative to the root folder that contains <suitecloud.config.js>) for the Objects folder.
Dep SDF: Folder Path For Translations
DEFAULT VALUE: /src/Translations
The folder path (relative to the root project folder) for the Translations folder.
Example SDF Project Setups
Below are some example SDF project setups and the folder path values needed for each:
EXAMPLE 1 A standard SDF project generated by the SuiteCloud CLI. Everything is contained within the src
folder and JavaScript (.js
) files in a standard SDF project are both the source files and the files that are ultimately deployed to NetSuite. In <suitecloud.config.js>, defaultProjectFolder
is set to "src"
.
├── src
│ ├── AccountConfiguration
│ ├── FileCabinet
│ │ ├── SuiteScripts
│ │ │ ├── sample.js
│ ├── Objects
│ ├── Translations
│ ├── deploy.xml
│ ├── manifest.xml
├── .gitignore
└── suitecloud.config.js
module.exports = {
defaultProjectFolder: "src",
commands: {}
};
Setting |
Value |
Dep SDF: Folder Path For Default Project Folder |
/src |
Dep SDF: Folder Path For Source Script Files |
/src/FileCabinet/SuiteScripts |
Dep SDF: Folder Path For Distribution Script Files |
/src/FileCabinet/SuiteScripts |
Dep SDF: Folder Path For Account Configuration |
/src/AccountConfiguration |
Dep SDF: Folder Path For File Cabinet |
/src/FileCabinet |
Dep SDF: Folder Path For Objects |
/src/Objects |
Dep SDF: Folder Path For Translations |
/src/Translations |
EXAMPLE 2 Identical to EXAMPLE 1 above, but here, the JavaScript (.js
) files all reside inside a nested CompanyName
folder.
├── src
│ ├── AccountConfiguration
│ ├── FileCabinet
│ │ ├── SuiteScripts
│ │ │ ├── CompanyName
│ │ │ │ ├── sample.js
│ ├── Objects
│ ├── Translations
│ ├── deploy.xml
│ ├── manifest.xml
├── .gitignore
└── suitecloud.config.js
module.exports = {
defaultProjectFolder: "src",
commands: {}
};
Setting |
Value |
Dep SDF: Folder Path For Default Project Folder |
/src |
Dep SDF: Folder Path For Source Script Files |
/src/FileCabinet/SuiteScripts/CompanyName |
Dep SDF: Folder Path For Distribution Script Files |
/src/FileCabinet/SuiteScripts/CompanyName |
Dep SDF: Folder Path For Account Configuration |
/src/AccountConfiguration |
Dep SDF: Folder Path For File Cabinet |
/src/FileCabinet |
Dep SDF: Folder Path For Objects |
/src/Objects |
Dep SDF: Folder Path For Translations |
/src/Translations |
EXAMPLE 3 A custom SDF project uses Typescript. The TypeScript (.ts
) files reside in a folder named Source
that, when compiled by tsc
, are outputted as JavaScript (.js
) files to the /FileCabinet/SuiteScripts
folder. In <suitecloud.config.js>, defaultProjectFolder
is set to "*"
.
├── AccountConfiguration
├── FileCabinet
│ ├── SuiteScripts
│ │ ├── sample.js
├── Objects
├── Source
│ ├── sample.ts
├── Translations
├── .gitignore
├── deploy.xml
├── manifest.xml
└── suitecloud.config.js
module.exports = {
defaultProjectFolder: "*",
commands: {}
};
Setting |
Value |
Dep SDF: Folder Path For Default Project Folder |
/ |
Dep SDF: Folder Path For Source Script Files |
/Source |
Dep SDF: Folder Path For Distribution Script Files |
/FileCabinet/SuiteScripts |
Dep SDF: Folder Path For Account Configuration |
/AccountConfiguration |
Dep SDF: Folder Path For File Cabinet |
/FileCabinet |
Dep SDF: Folder Path For Objects |
/Objects |
Dep SDF: Folder Path For Translations |
/Translations |
EXAMPLE 4 Identical to EXAMPLE 3 above, but here, the outputted JavaScript (.js
) files are placed within a nested CompanyName
folder.
├── AccountConfiguration
├── FileCabinet
│ ├── SuiteScripts
│ │ ├── CompanyName
│ │ │ ├── sample.js
├── Objects
├── Source
│ ├── sample.ts
├── Translations
├── .gitignore
├── deploy.xml
├── manifest.xml
└── suitecloud.config.js
module.exports = {
defaultProjectFolder: "*",
commands: {}
};
Setting |
Value |
Dep SDF: Folder Path For Default Project Folder |
/ |
Dep SDF: Folder Path For Source Script Files |
/Source |
Dep SDF: Folder Path For Distribution Script Files |
/FileCabinet/SuiteScripts/CompanyName |
Dep SDF: Folder Path For Account Configuration |
/AccountConfiguration |
Dep SDF: Folder Path For File Cabinet |
/FileCabinet |
Dep SDF: Folder Path For Objects |
/Objects |
Dep SDF: Folder Path For Translations |
/Translations |
License
This software is released under the terms of the MIT license.